This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,46 +1,51 @@
/* Metro module 10875; source: modules/video_calls/getParticipantTitle.tsx; dependencies: [4299, 10876, 4617, 1244, 2] */
import NicknameUtils from '../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CallConstantsModule from '../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as UseIsGuestOrLurkerModule from '../guild_member/useIsGuestOrLurker.tsx'; /* Metro dependency 10876 */
function _fun83334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11061:6, offset: 0x01f1589e, size: 124 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/getParticipantTitle.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/getParticipantTitle.tsx');
exports.default = getParticipantTitle;
function getParticipantTitle(a0, a1, a2) { // fn#83335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11061:210, offset: 0x01f1591a, size: 269 bytes, params: 4, frame: 21
var r0;
var name;
var intl;
const type = a1.type;
var value;
const ACTIVITY = ParticipantTypes.ACTIVITY;
if (type === ACTIVITY) {
value = null;
name = value == a2 ? undefined : a2.name;
return value != name ? name : value;
}
const value2 = undefined;
const isGuestOrLurkerInGuild = UseIsGuestOrLurkerModule.isGuestOrLurkerInGuild;
const guild_id = a0.guild_id;
let user = a1.user;
let id = user == null ? value2 : user.id;
const isGuestOrLurkerInGuild2 = Reflect.apply(isGuestOrLurkerInGuild, UseIsGuestOrLurkerModule, [guild_id, id]);
const defaultImport = NicknameUtils;
const getName = defaultImport.getName;
const guildId = a0.getGuildId();
id = a0.id;
user = a1.user;
const value4 = Reflect.apply(getName, defaultImport, [guildId, id, user]);
if (isGuestOrLurkerInGuild2) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['pFO/Ph']);
value = ' ' + value;
r0 = value;
} else {
r0 = '';
}
return value4 + r0;
}
}
function getParticipantTitle(a0, a1, a2) { // fn#83335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11061:210, offset: 0x01f1591a, size: 269 bytes, params: 4, frame: 21
var r0;
var name;
var intl;
const type = a1.type;
var value;
const ACTIVITY = ParticipantTypes.ACTIVITY;
if (type === ACTIVITY) {
value = null;
name = value == a2 ? undefined : a2.name;
return value != name ? name : value;
}
const value2 = undefined;
const useIsGuestOrLurkerModule = require(10876) /* metro dependency 10876: useIsGuestOrLurker */;
const isGuestOrLurkerInGuild = useIsGuestOrLurkerModule.isGuestOrLurkerInGuild;
const guild_id = a0.guild_id;
let user = a1.user;
let id = user == null ? value2 : user.id;
const isGuestOrLurkerInGuild2 = Reflect.apply(isGuestOrLurkerInGuild, useIsGuestOrLurkerModule, [guild_id, id]);
const defaultImport = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
const getName = defaultImport.getName;
const guildId = a0.getGuildId();
id = a0.id;
user = a1.user;
const value4 = Reflect.apply(getName, defaultImport, [guildId, id, user]);
if (isGuestOrLurkerInGuild2) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
value = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['pFO/Ph']);
value = ' ' + value;
r0 = value;
} else {
r0 = '';
}
return value4 + r0;
}
global.__d(_fun83334, 10875, [4299, 10876, 4617, 1244,
2]) /* metro module 10875, dependencies: [4299, 10876, 4617, 1244, 2] */;
@@ -1,20 +1,23 @@
/* Metro module 7716; source: modules/video_calls/native/ChannelCallConstants.tsx; dependencies: [661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun61715(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7894:6, offset: 0x01b4924c, size: 328 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const PictureInPicturePositions = (require(661) /* metro dependency 661: Constants */).PictureInPicturePositions;
const object = {VOICE_CONTROLS_TOGGLE_BUTTON: 0};
object[0] = 'VOICE_CONTROLS_TOGGLE_BUTTON';
object.CAMERA_PREVIEW_PICTURE_IN_PICTURE = 1;
object[1] = 'CAMERA_PREVIEW_PICTURE_IN_PICTURE';
const object4 = {OPENING: 0};
object4[0] = 'OPENING';
object4.OPEN = 1;
object4[1] = 'OPEN';
object4.CLOSING = 2;
object4[2] = 'CLOSING';
object4.CLOSED = 3;
object4[3] = 'CLOSED';
const PictureInPicturePositions = (ConstantsModule).PictureInPicturePositions;
const object2 = {VOICE_CONTROLS_TOGGLE_BUTTON: 0};
object2[0] = 'VOICE_CONTROLS_TOGGLE_BUTTON';
object2.CAMERA_PREVIEW_PICTURE_IN_PICTURE = 1;
object2[1] = 'CAMERA_PREVIEW_PICTURE_IN_PICTURE';
const object3 = {OPENING: 0};
object3[0] = 'OPENING';
object3.OPEN = 1;
object3[1] = 'OPEN';
object3.CLOSING = 2;
object3[2] = 'CLOSING';
object3.CLOSED = 3;
object3[3] = 'CLOSED';
const TOP_LEFT = PictureInPicturePositions.TOP_LEFT;
const items2 = [TOP_LEFT];
const TOP_RIGHT = PictureInPicturePositions.TOP_RIGHT;
@@ -23,16 +26,17 @@ function _fun61715(global, require, importDefault, importAll, module, exports, d
items2[2] = BOTTOM_LEFT;
const BOTTOM_RIGHT = PictureInPicturePositions.BOTTOM_RIGHT;
items2[3] = BOTTOM_RIGHT;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/ChannelCallConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/ChannelCallConstants.tsx');
exports.BOX_MODE_ACTIONSHEET_WIDTH = 360;
exports.BOX_MODE_ACTIONSHEET_HEIGHT = 720;
exports.BOX_MODE_THRESHOLD_WIDTH = 512;
exports.ChannelCallScreens = {MAIN_CALL_SCREEN: 'MainCallScreen'};
exports.VoiceCallOverlayType = object;
exports.VoiceChatDrawerState = object4;
exports.VoiceCallOverlayType = object2;
exports.VoiceChatDrawerState = object3;
exports.MIN_MARGIN_BETWEEN_OVERLAYS = 8;
exports.ALL_PICTURE_IN_PICTURE_POSITIONS = items2;
exports.VOICE_CALL_OVERLAY_HORIZONTAL_MARGIN = 16;
exports.VOICE_CALL_OVERLAY_VERTICAL_MARGIN = 8;
}
global.__d(_fun61715, 7716, [661, 2]) /* metro module 7716, dependencies: [661, 2] */;
@@ -1,28 +1,32 @@
/* Metro module 7730; source: modules/video_calls/native/ChannelCallLifecycleStore.tsx; dependencies: [6, 7, 15, 17, 18, 1934, 7716, 7717, 644, 566, 694, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelCallConstantsModule from './ChannelCallConstants.tsx'; /* Metro dependency 7716 */
import * as DeviceOrientationModule from '../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
function _fun61869(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:6, offset: 0x01b4ce4e, size: 568 bytes, params: 8, frame: 24
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const VoiceCallOverlayType = (require(7716) /* metro dependency 7716: ChannelCallConstants */).VoiceCallOverlayType;
object2 = {};
const VoiceCallOverlayType = (ChannelCallConstantsModule).VoiceCallOverlayType;
object = {};
const VOICE_CONTROLS_TOGGLE_BUTTON = VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON;
const OrientationType = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType;
const OrientationType = (DeviceOrientationModule).OrientationType;
let PORTRAIT = OrientationType.PORTRAIT;
object2[VOICE_CONTROLS_TOGGLE_BUTTON] = {x: undefined, y: undefined, width: undefined, height: undefined,
object[VOICE_CONTROLS_TOGGLE_BUTTON] = {x: undefined, y: undefined, width: undefined, height: undefined,
screenOrientation: PORTRAIT, hasUserInteractedSinceOrientationChange: false, isInitialized: false,
isVisible: false};
const CAMERA_PREVIEW_PICTURE_IN_PICTURE = VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE;
PORTRAIT = OrientationType.PORTRAIT;
object2[CAMERA_PREVIEW_PICTURE_IN_PICTURE] = {x: undefined, y: undefined, width: undefined, height: undefined,
object[CAMERA_PREVIEW_PICTURE_IN_PICTURE] = {x: undefined, y: undefined, width: undefined, height: undefined,
screenOrientation: PORTRAIT, hasUserInteractedSinceOrientationChange: false, isInitialized: false,
isVisible: false};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun61873(Store);
value.displayName = 'ChannelCallLifecycleStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -68,73 +72,107 @@ function _fun61869(global, require, importDefault, importAll, module, exports, d
}
env0_15 = true;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/ChannelCallLifecycleStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/ChannelCallLifecycleStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_61870() { // fn#61870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:189, offset: 0x01b4d086, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_61870() { // fn#61870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:189, offset: 0x01b4d086, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_61870_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_61870_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun61873(a0) { // fn#61873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:840, offset: 0x01b4d0e4, size: 233 bytes, params: 2, frame: 16
const closure = ChannelCallLifecycleStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(SelectedChannelStore);
}}, {key: 'shouldReactToSeriousThermalStateWhenActivityFocused', value: value_61876},
{key: 'consumedRequestToRespondToSeriousThermalState', value: value_61877},
{key: 'disregardSeriousThermalState', value: value_61878}, {key: 'isReactingToThermalState',
value: value_61879}, {key: 'getShowActivitiesDebugOverlay', value: value_61880},
{key: 'getVoiceCallOverlayLayoutStates', value: value_61881},
{key: 'isPipEnabledWhileFocusedOnActivityOrStream', value: value_61882}]);
}
function _fun61873(a0) { // fn#61873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:840, offset: 0x01b4d0e4, size: 233 bytes, params: 2, frame: 16
const ChannelCallLifecycleStore2 = ChannelCallLifecycleStore;
Inherits(ChannelCallLifecycleStore2, a0);
return CreateClass(ChannelCallLifecycleStore2, [{key: 'initialize', value: function() {
this.waitFor(SelectedChannelStore);
}}, {key: 'shouldReactToSeriousThermalStateWhenActivityFocused', value: value_61876},
{key: 'consumedRequestToRespondToSeriousThermalState', value: value_61877},
{key: 'disregardSeriousThermalState', value: value_61878}, {key: 'isReactingToThermalState',
value: value_61879}, {key: 'getShowActivitiesDebugOverlay', value: value_61880},
{key: 'getVoiceCallOverlayLayoutStates', value: value_61881},
{key: 'isPipEnabledWhileFocusedOnActivityOrStream', value: value_61882}]);
function ChannelCallLifecycleStore() { // fn#61874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:852, offset: 0x00fc4bce, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, ChannelCallLifecycleStore);
const value3 = env1_5(ChannelCallLifecycleStore);
return env1_4(this, _isNativeReflectConstruct_61870() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_61876() { // fn#61876, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function value_61877() { // fn#61877, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function value_61878() { // fn#61878, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function value_61879() { // fn#61879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:1494, offset: 0x01b4d1cd, size: 19 bytes, params: 1, frame: 3
const value = environment.__proto__;
return env1_10 && !env1_11;
}
function value_61880() { // fn#61880, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_61881() { // fn#61881, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function value_61882() { // fn#61882, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
function VOICE_CHANNEL_SELECT_61883(a0) { // fn#61883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:1833, offset: 0x01b4d1e0, size: 85 bytes, params: 2, frame: 14
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
if (SelectedChannelStore.getVoiceChannelId() === env0_8) {
function VOICE_CHANNEL_SELECT_61883(a0) { // fn#61883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:1833, offset: 0x01b4d1e0, size: 85 bytes, params: 2, frame: 14
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
if (SelectedChannelStore.getVoiceChannelId() === env0_8) {
}
}
}
function VOICE_CALL_OVERLAY_LAYOUT_STATE_UPDATE({voiceCallOverlayType, voiceCallOverlayLayoutState}) { // fn#61888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:2478, offset: 0x01b4d2be, size: 76 bytes, params: 2, frame: 15
const binding = env0_14;
const object2 = {};
copyDataProperties(object2, binding, undefined);
object2[voiceCallOverlayType] = voiceCallOverlayLayoutState;
if ((importDefault(644) /* metro dependency 644 */)(object2, binding)) {
function VOICE_CALL_OVERLAY_LAYOUT_STATE_UPDATE({voiceCallOverlayType, voiceCallOverlayLayoutState}) { // fn#61888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:2478, offset: 0x01b4d2be, size: 76 bytes, params: 2, frame: 15
const binding = env0_14;
const object = {};
copyDataProperties(object, binding, undefined);
object[voiceCallOverlayType] = voiceCallOverlayLayoutState;
if ((importDefault(644) /* metro dependency 644 */)(object, binding)) {
}
}
}
function value_61879() { // fn#61879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7908:1494, offset: 0x01b4d1cd, size: 19 bytes, params: 1, frame: 3
const value = environment.__proto__;
return env1_10 && !env1_11;
}
global.__d(_fun61869, 7730, [6, 7, 15, 17, 18, 1934, 7716, 7717, 644, 566, 694,
2]) /* metro module 7730, dependencies: [6, 7, 15, 17, 18, 1934, 7716, 7717, 644, 566, 694, 2] */;
@@ -1,243 +1,261 @@
/* Metro module 7715; source: modules/video_calls/native/ChannelCallStore.tsx; dependencies: [31, 1378, 7716, 4237, 4299, 4041, 7717, 629, 690, 694, 7712, 22, 7719, 7720, 7721, 566, 4092, 2] */
import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
import EmbeddedActivitiesStore from '../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelRTCActionCreators from '../../../actions/ChannelRTCActionCreators.tsx'; /* Metro dependency 7712 */
import UseIsPrivateAudioOnlyCall from './useIsPrivateAudioOnlyCall.tsx'; /* Metro dependency 7719 */
import UseSelectedParticipant from '../useSelectedParticipant.tsx'; /* Metro dependency 7720 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as Module00629Module from '../../../by-id/module-00629.js'; /* Metro dependency 629 */
import * as ReactBatchUpdatesNativeModule from '../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
import * as TimersModule from '../../../external/discord_common/js/packages/timers/Timers.tsx'; /* Metro dependency 4041 */
import * as ConstantsModule from '../../activities/Constants.tsx'; /* Metro dependency 4237 */
import * as CallConstantsModule from '../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as ChannelCallConstantsModule from './ChannelCallConstants.tsx'; /* Metro dependency 7716 */
import * as DeviceOrientationModule from '../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as VoiceChatHooksModule from '../../voice_chat/VoiceChatHooks.tsx'; /* Metro dependency 7721 */
function _fun61691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:6, offset: 0x01b48901, size: 631 bytes, params: 8, frame: 28
var object3;
const env0_0 = require;
const closure = useIsVoiceChatFocused;
const useIsVoiceChatFocused2 = useIsVoiceChatFocused;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const {VoiceCallOverlayType, VoiceChatDrawerState} = require(7716) /* metro dependency 7716: ChannelCallConstants */;
const env0_6 = (require(4237) /* metro dependency 4237: Constants */).OrientationLockState;
const env0_7 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
const {VoiceCallOverlayType, VoiceChatDrawerState} = ChannelCallConstantsModule;
const Timeout = (TimersModule).Timeout;
const timeout = new Timeout();
Object = global.Object;
const freeze = Object.freeze;
object3 = {'focus': true, 'pipFocus': false, 'isGestureEnabled': true};
object = {'focus': true, 'pipFocus': false, 'isGestureEnabled': true};
const CLOSED = VoiceChatDrawerState.CLOSED;
object3.voiceChatDrawerState = CLOSED;
const object4 = {};
object.voiceChatDrawerState = CLOSED;
const object2 = {};
const VOICE_CONTROLS_TOGGLE_BUTTON = VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON;
const OrientationType = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType;
const OrientationType = (DeviceOrientationModule).OrientationType;
let PORTRAIT = OrientationType.PORTRAIT;
object4[VOICE_CONTROLS_TOGGLE_BUTTON] = {x: undefined, y: undefined, width: undefined, height: undefined,
object2[VOICE_CONTROLS_TOGGLE_BUTTON] = {x: undefined, y: undefined, width: undefined, height: undefined,
screenOrientation: PORTRAIT, hasUserInteractedSinceOrientationChange: false, isInitialized: false,
isVisible: false};
const CAMERA_PREVIEW_PICTURE_IN_PICTURE = VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE;
PORTRAIT = OrientationType.PORTRAIT;
object4[CAMERA_PREVIEW_PICTURE_IN_PICTURE] = {x: undefined, y: undefined, width: undefined, height: undefined,
object2[CAMERA_PREVIEW_PICTURE_IN_PICTURE] = {x: undefined, y: undefined, width: undefined, height: undefined,
screenOrientation: PORTRAIT, hasUserInteractedSinceOrientationChange: false, isInitialized: false,
isVisible: false};
object3.voiceCallOverlayLayoutStates = object4;
const env0_9 = Reflect.apply(freeze, Object, [object3]);
const value3 = (require(629) /* metro dependency 629 */).create(_fun61693);
const closure2 = resetFocusTimer;
const value5 = (importDefault(22) /* metro dependency 22 */).throttle(_fun61697, 300);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/ChannelCallStore.tsx');
object.voiceCallOverlayLayoutStates = object2;
const env0_9 = Reflect.apply(freeze, Object, [object]);
const value3 = (Module00629Module).create(_fun61693);
const resetFocusTimer2 = resetFocusTimer;
const value5 = (Module00022).throttle(_fun61697, 300);
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/ChannelCallStore.tsx');
exports.focusTimeout = timeout;
exports.setFocus = setFocus;
exports.toggleFocus = toggleFocus;
exports.resetFocusTimer = closure2;
exports.resetFocusTimer = resetFocusTimer2;
exports.resetFocus = resetFocus;
exports.clearFocusTimer = clearFocusTimer;
exports.setVoiceChatDrawerState = setVoiceChatDrawerState;
exports.togglePipFocus = value5;
exports.useIsVoiceChatFocused = closure;
exports.useIsVoiceChatFocused = useIsVoiceChatFocused2;
exports.useChannelCallOrientationHandlers = useChannelCallOrientationHandlers;
exports.resetChannelCallStore = resetChannelCallStore;
exports.useChannelCallStore = value3;
}
function useIsVoiceChatFocused() { // fn#61692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1035, offset: 0x01b48b78, size: 52 bytes, params: 1, frame: 11
const voiceChatDrawerState = env0_10().voiceChatDrawerState;
const OPEN = VoiceChatDrawerState.OPEN;
return voiceChatDrawerState === OPEN || voiceChatDrawerState === VoiceChatDrawerState.CLOSING;
}
function resetFocusTimer() { // fn#61694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:833, offset: 0x01b48bac, size: 45 bytes, params: 1, frame: 13
const binding = env0_8;
binding.stop();
binding.start(5000, _fun61695);
}
function _fun61697() { // fn#61697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:941, offset: 0x01b48c23, size: 69 bytes, params: 1, frame: 12
const binding = env0_10;
const getState = binding.getState;
const env0_0 = Reflect.apply(getState, binding, []).pipFocus;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61698);
}
function setFocus(a0) { // fn#61699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1250, offset: 0x01b48c8d, size: 52 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61700);
}
function toggleFocus() { // fn#61701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1319, offset: 0x01b48ce3, size: 69 bytes, params: 1, frame: 12
const binding = env0_10;
const getState = binding.getState;
const env0_0 = Reflect.apply(getState, binding, []).focus;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61702);
}
function resetFocus() { // fn#61703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1460, offset: 0x01b48d54, size: 82 bytes, params: 1, frame: 12
const binding = env0_10;
const getState = binding.getState;
if (Reflect.apply(getState, binding, []).focus) {
resetFocusTimer();
} else {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61704);
function useIsVoiceChatFocused() { // fn#61692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1035, offset: 0x01b48b78, size: 52 bytes, params: 1, frame: 11
const voiceChatDrawerState = env0_10().voiceChatDrawerState;
const OPEN = VoiceChatDrawerState.OPEN;
return voiceChatDrawerState === OPEN || voiceChatDrawerState === VoiceChatDrawerState.CLOSING;
}
}
function clearFocusTimer() { // fn#61705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1572, offset: 0x01b48dc3, size: 21 bytes, params: 1, frame: 9
env0_8.stop();
}
function setVoiceChatDrawerState(a0, a1) { // fn#61706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1613, offset: 0x01b48dd8, size: 131 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const OPEN = VoiceChatDrawerState.OPEN;
if (!(a1 !== OPEN && a1 !== VoiceChatDrawerState.CLOSED)) {
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun61707);
function _fun61693() { // fn#61693, offset: 0x0133aed9, size: 9 bytes, params: 1, frame: 1
return env0_9;
}
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61708);
}
function useChannelCallOrientationHandlers(a0) { // fn#61709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1872, offset: 0x01b48ebd, size: 303 bytes, params: 2, frame: 23
const value2 = undefined;
const value3 = (importDefault(7719) /* metro dependency 7719: useIsPrivateAudioOnlyCall */)(a0);
const value4 = (importDefault(7720) /* metro dependency 7720: useSelectedParticipant */)(a0);
const r6 = a0.isGuildStageVoice() && value4 == null;
const value6 = useIsVoiceChatFocused();
const voiceChatHooksModule = require(7721) /* metro dependency 7721: VoiceChatHooks */;
const useIsConnectedToVoiceChannel = voiceChatHooksModule.useIsConnectedToVoiceChannel;
const r5 = value6 || !Reflect.apply(useIsConnectedToVoiceChannel, voiceChatHooksModule, [a0]);
const env0_3 = r5;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
const applicationId = currentEmbeddedActivity == null ? value2 : currentEmbeddedActivity.applicationId;
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun61710, [applicationId]);
const binding = env0_3;
binding.useEffect(function() {
return require(dependencyMap[6]).restoreDefaultOrientation;
}, []);
binding.useEffect(_fun61712, [value9, value4, applicationId, value3, r6, r5]);
return value2;
}
function resetChannelCallStore() { // fn#61713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:2865, offset: 0x01b491f9, size: 59 bytes, params: 1, frame: 12
env0_8.stop();
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61714);
}
function _fun61695() { // fn#61695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:860, offset: 0x01b48bd9, size: 45 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61696);
}
function _fun61698() { // fn#61698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:996, offset: 0x01b48c68, size: 37 bytes, params: 1, frame: 12
return env1_10.setState({pipFocus: !pipFocus});
}
function _fun61700() { // fn#61700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1276, offset: 0x01b48cc1, size: 34 bytes, params: 1, frame: 12
return env1_10.setState({focus: env0_0});
}
function _fun61702() { // fn#61702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1371, offset: 0x01b48d28, size: 44 bytes, params: 1, frame: 12
return env1_10.setState({focus: !focus, pipFocus: false});
}
function _fun61704() { // fn#61704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1524, offset: 0x01b48da6, size: 29 bytes, params: 1, frame: 12
return env1_10.setState({focus: true});
}
function _fun61707() { // fn#61707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1661, offset: 0x01b48e5b, size: 64 bytes, params: 1, frame: 14
const defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
const updateChatOpen = defaultImport.updateChatOpen;
const binding = env0_0;
const OPEN = VoiceChatDrawerState.OPEN;
return Reflect.apply(updateChatOpen, defaultImport, [binding, require === OPEN]);
}
function _fun61708() { // fn#61708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1727, offset: 0x01b48e9b, size: 34 bytes, params: 1, frame: 12
return env1_10.setState({voiceChatDrawerState: require});
}
function _fun61710() { // fn#61710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:2119, offset: 0x01b48fec, size: 54 bytes, params: 1, frame: 12
return applicationId == null ? OrientationLockState.UNLOCKED : EmbeddedActivitiesStore.getOrientationLockStateForApp(applicationId) ?? OrientationLockState.UNLOCKED;
}
function _fun61712() { // fn#61712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:2280, offset: 0x01b49043, size: 438 bytes, params: 1, frame: 17
var type;
var value2;
var binding;
var moduleValue;
var value;
if (env0_2) {
value = environment.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
value.lockOrientationForiOS('PORTRAIT');
} else if (env0_3) {
value = environment.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
value.lockOrientationForiOS('PORTRAIT');
} else if (env0_1 == null) {
binding = env0_0;
value = environment.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
if (binding) {
value.lockOrientationForiOS('PORTRAIT');
} else {
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
}
} else {
type = env0_1.type;
value2 = environment.__proto__;
if (type !== ParticipantTypes.ACTIVITY) {
binding = env0_0;
value = environment.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
if (binding) {
value.lockOrientationForiOS('PORTRAIT');
} else {
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
function resetFocusTimer() { // fn#61694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:833, offset: 0x01b48bac, size: 45 bytes, params: 1, frame: 13
const binding = env0_8;
binding.stop();
binding.start(5000, _fun61695);
function _fun61695() { // fn#61695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:860, offset: 0x01b48bd9, size: 45 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun61696);
function _fun61696() { // fn#61696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:887, offset: 0x01b48c06, size: 29 bytes, params: 1, frame: 12
return env2_10.setState({focus: false});
}
} else if (env0_1.applicationId === applicationId) {
moduleValue = require(4092) /* metro dependency 4092: DeviceUtils */;
if (!moduleValue.isIpadOS()) {
binding = env0_5;
if (OrientationLockState.UNLOCKED === binding) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).unlockOrientation({unlockAfterRotatingToPreviousLock: true});
} else if (OrientationLockState.PORTRAIT === binding) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
} else if (OrientationLockState.LANDSCAPE === binding) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('LANDSCAPE', true);
}
}
function _fun61697() { // fn#61697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:941, offset: 0x01b48c23, size: 69 bytes, params: 1, frame: 12
const binding = env0_10;
const getState = binding.getState;
const env0_0 = Reflect.apply(getState, binding, []).pipFocus;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun61698);
function _fun61698() { // fn#61698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:996, offset: 0x01b48c68, size: 37 bytes, params: 1, frame: 12
return env1_10.setState({pipFocus: !pipFocus});
}
}
function setFocus(a0) { // fn#61699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1250, offset: 0x01b48c8d, size: 52 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun61700);
function _fun61700() { // fn#61700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1276, offset: 0x01b48cc1, size: 34 bytes, params: 1, frame: 12
return env1_10.setState({focus: env0_0});
}
}
function toggleFocus() { // fn#61701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1319, offset: 0x01b48ce3, size: 69 bytes, params: 1, frame: 12
const binding = env0_10;
const getState = binding.getState;
const env0_0 = Reflect.apply(getState, binding, []).focus;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun61702);
function _fun61702() { // fn#61702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1371, offset: 0x01b48d28, size: 44 bytes, params: 1, frame: 12
return env1_10.setState({focus: !focus, pipFocus: false});
}
}
function resetFocus() { // fn#61703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1460, offset: 0x01b48d54, size: 82 bytes, params: 1, frame: 12
const binding = env0_10;
const getState = binding.getState;
if (Reflect.apply(getState, binding, []).focus) {
resetFocusTimer();
} else {
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun61704);
}
function _fun61704() { // fn#61704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1524, offset: 0x01b48da6, size: 29 bytes, params: 1, frame: 12
return env1_10.setState({focus: true});
}
}
function clearFocusTimer() { // fn#61705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1572, offset: 0x01b48dc3, size: 21 bytes, params: 1, frame: 9
env0_8.stop();
}
function setVoiceChatDrawerState(a0, a1) { // fn#61706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1613, offset: 0x01b48dd8, size: 131 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const OPEN = VoiceChatDrawerState.OPEN;
if (!(a1 !== OPEN && a1 !== VoiceChatDrawerState.CLOSED)) {
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun61707);
}
(ReactBatchUpdatesNativeModule).batchUpdates(_fun61708);
function _fun61707() { // fn#61707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1661, offset: 0x01b48e5b, size: 64 bytes, params: 1, frame: 14
const defaultImport = ChannelRTCActionCreators;
const updateChatOpen = defaultImport.updateChatOpen;
const binding = env0_0;
const OPEN = VoiceChatDrawerState.OPEN;
return Reflect.apply(updateChatOpen, defaultImport, [binding, require === OPEN]);
}
function _fun61708() { // fn#61708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1727, offset: 0x01b48e9b, size: 34 bytes, params: 1, frame: 12
return env1_10.setState({voiceChatDrawerState: require});
}
}
function useChannelCallOrientationHandlers(a0) { // fn#61709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:1872, offset: 0x01b48ebd, size: 303 bytes, params: 2, frame: 23
const value2 = undefined;
const value3 = (UseIsPrivateAudioOnlyCall)(a0);
const value4 = (UseSelectedParticipant)(a0);
const r6 = a0.isGuildStageVoice() && value4 == null;
const value6 = useIsVoiceChatFocused();
const useIsConnectedToVoiceChannel = VoiceChatHooksModule.useIsConnectedToVoiceChannel;
const r5 = value6 || !Reflect.apply(useIsConnectedToVoiceChannel, VoiceChatHooksModule, [a0]);
const env0_3 = r5;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
const applicationId = currentEmbeddedActivity == null ? value2 : currentEmbeddedActivity.applicationId;
const value9 = (FluxModule).useStateFromStores([EmbeddedActivitiesStore],
_fun61710, [applicationId]);
const binding = env0_3;
binding.useEffect(function() {
return require(dependencyMap[6]).restoreDefaultOrientation;
}, []);
binding.useEffect(_fun61712, [value9, value4, applicationId, value3, r6, r5]);
return value2;
function _fun61710() { // fn#61710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:2119, offset: 0x01b48fec, size: 54 bytes, params: 1, frame: 12
return applicationId == null ? OrientationLockState.UNLOCKED : EmbeddedActivitiesStore.getOrientationLockStateForApp(applicationId) ?? OrientationLockState.UNLOCKED;
}
function _fun61712() { // fn#61712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:2280, offset: 0x01b49043, size: 438 bytes, params: 1, frame: 17
var type;
var value2;
var binding;
var moduleValue;
var value;
if (env0_2) {
value = environment.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
value.lockOrientationForiOS('PORTRAIT');
} else if (env0_3) {
value = environment.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
value.lockOrientationForiOS('PORTRAIT');
} else if (env0_1 == null) {
binding = env0_0;
value = environment.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
if (binding) {
value.lockOrientationForiOS('PORTRAIT');
} else {
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
}
} else {
type = env0_1.type;
value2 = environment.__proto__;
if (type !== ParticipantTypes.ACTIVITY) {
binding = env0_0;
value = environment.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
if (binding) {
value.lockOrientationForiOS('PORTRAIT');
} else {
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
}
} else if (env0_1.applicationId === applicationId) {
moduleValue = require(4092) /* metro dependency 4092: DeviceUtils */;
if (!moduleValue.isIpadOS()) {
binding = env0_5;
if (OrientationLockState.UNLOCKED === binding) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).unlockOrientation({unlockAfterRotatingToPreviousLock: true});
} else if (OrientationLockState.PORTRAIT === binding) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT', true);
} else if (OrientationLockState.LANDSCAPE === binding) {
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('LANDSCAPE', true);
}
}
} else {
binding = env0_0;
value = environment.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
if (binding) {
value.lockOrientationForiOS('PORTRAIT');
} else {
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
}
}
}
} else {
binding = env0_0;
value = environment.__proto__;
value = require(7717) /* metro dependency 7717: DeviceOrientation */;
if (binding) {
value.lockOrientationForiOS('PORTRAIT');
} else {
value.unlockOrientation({unlockAfterRotatingToPreviousLock: false});
}
}
}
function resetChannelCallStore() { // fn#61713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:2865, offset: 0x01b491f9, size: 59 bytes, params: 1, frame: 12
env0_8.stop();
(ReactBatchUpdatesNativeModule).batchUpdates(_fun61714);
function _fun61714() { // fn#61714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:2901, offset: 0x01b49234, size: 24 bytes, params: 1, frame: 11
return env1_10.setState(env1_9);
}
}
}
function _fun61714() { // fn#61714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:2901, offset: 0x01b49234, size: 24 bytes, params: 1, frame: 11
return env1_10.setState(env1_9);
}
function _fun61696() { // fn#61696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7893:887, offset: 0x01b48c06, size: 29 bytes, params: 1, frame: 12
return env2_10.setState({focus: false});
}
global.__d(_fun61691, 7715, [31, 1378, 7716, 4237, 4299, 4041, 7717, 629, 690, 694, 7712, 22, 7719, 7720, 7721, 566,
4092,
2]) /* metro module 7715, dependencies: [31, 1378, 7716, 4237, 4299, 4041, 7717, 629, 690, 694, 7712, 22, 7719, 7720, 7721, 566, 4092, 2] */;
@@ -1,17 +1,23 @@
/* Metro module 15555; source: modules/video_calls/native/ChannelCallUtils.tsx; dependencies: [31, 4395, 661, 33, 1244, 15556, 7007, 4080, 7712, 4496, 15553, 1962, 15557, 4285, 15558, 9151, 4007, 10832, 8151, 12, 3857, 9212, 2] */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import StreamRTCConnectionStore from '../../../stores/StreamRTCConnectionStore.tsx'; /* Metro dependency 4395 */
import AlertActionCreators from '../../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as LogAggregatorModule from '../../debug/LogAggregator.tsx'; /* Metro dependency 12 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NavigationRouteUtilsNativeModule from '../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as OpenUserSettingsModule from '../../user_settings/core/native/openUserSettings.tsx'; /* Metro dependency 7007 */
import * as InstantInviteUtilsModule from '../../instant_invite/native/InstantInviteUtils.tsx'; /* Metro dependency 9151 */
function _fun119067(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:6, offset: 0x024fb6c5, size: 303 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const streamRTCConnectionStore = importDefault(4395) /* metro dependency 4395: StreamRTCConnectionStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.UserSettingsSections;
const env0_5 = constantsModule.AnalyticsPages;
const env0_6 = constantsModule.InstantInviteSources;
const env0_7 = constantsModule.RPC_APPLICATION_LOGGING_CATEGORY;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/ChannelCallUtils.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/ChannelCallUtils.tsx');
exports.voiceSettings = function() {
var object = {};
object.label = require(dependencyMap[4]).intl.string(require(dependencyMap[4]).t.NiTd0e);
@@ -61,207 +67,208 @@ function _fun119067(global, require, importDefault, importAll, module, exports,
object.onPress = _fun119088;
return object;
};
}
function voiceSettings() { // fn#119068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:342, offset: 0x024fb7f4, size: 101 bytes, params: 1, frame: 16
const object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const NiTd0e = (IndexNativeModule).t.NiTd0e;
object.label = Reflect.apply(string, intl, [NiTd0e]);
object.icon = importDefault(15556) /* metro dependency 15556 */;
object.onPress = onPress_119069;
return object;
function voiceSettingsOnPress() { // fn#119069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:413, owner: voiceSettings.onPress, offset: 0x024fb859, size: 81 bytes, params: 1, frame: 15
const value = environment.__proto__;
const openUserSettings = OpenUserSettingsModule.openUserSettings;
const VOICE = UserSettingsSections.VOICE;
Reflect.apply(openUserSettings, OpenUserSettingsModule, [{screen: VOICE}]);
(ActionSheetActionCreators).hideActionSheet();
}
function voiceSettings() { // fn#119068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:342, offset: 0x024fb7f4, size: 101 bytes, params: 1, frame: 16
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const NiTd0e = (require(1244) /* metro dependency 1244: indexNative */).t.NiTd0e;
object2.label = Reflect.apply(string, intl, [NiTd0e]);
object2.icon = importDefault(15556) /* metro dependency 15556 */;
object2.onPress = onPress_119069;
return object2;
}
function videoParticipantsHidden(a0, a1) { // fn#119070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:516, offset: 0x024fb8aa, size: 105 bytes, params: 3, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hoZYAA);
object2.switchValue = !a1;
object2.onPress = onPress_119071;
return object2;
}
function openHideSelfStreamAndVideoConfirmDialog(a0, a1) { // fn#119072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:689, offset: 0x024fb94d, size: 68 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_119073});
}
function selfVideoHidden(a0, a1) { // fn#119076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:876, offset: 0x024fba29, size: 99 bytes, params: 3, frame: 16
const env0_0 = a1;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const MH8ESU = (require(1244) /* metro dependency 1244: indexNative */).t.MH8ESU;
return {label: Reflect.apply(string, intl, [MH8ESU]), switchValue: !a0, onPress: function() {
require();
}};
}
function reportStreamIssue(a0) { // fn#119078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:984, offset: 0x024fba8c, size: 110 bytes, params: 2, frame: 17
const env0_0 = a0;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const KHGhHf = (require(1244) /* metro dependency 1244: indexNative */).t.KHGhHf;
object2.label = Reflect.apply(string, intl, [KHGhHf]);
object2.icon = importDefault(15557) /* metro dependency 15557 */;
object2.onPress = onPress_119079;
return object2;
}
function invite(a0, a1, a2) { // fn#119080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1398, offset: 0x024fbbff, size: 168 bytes, params: 4, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
let r1 = a1 != null ? inviteOnPress_119082 : a2 == null ? inviteOnPress : inviteOnPress_119083;
r1 = a0.isPrivate() ? inviteOnPress_119084 : r1;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const VINpSK = (require(1244) /* metro dependency 1244: indexNative */).t.VINpSK;
object2.label = Reflect.apply(string, intl, [VINpSK]);
object2.icon = importDefault(10832) /* metro dependency 10832 */;
object2.onPress = r1;
return object2;
}
function rtcDebugPanel(a0) { // fn#119085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1871, offset: 0x024fbdb0, size: 108 bytes, params: 2, frame: 17
const env0_0 = a0;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const X8bCMe = (require(1244) /* metro dependency 1244: indexNative */).t.X8bCMe;
object2.label = Reflect.apply(string, intl, [X8bCMe]);
object2.icon = importDefault(8151) /* metro dependency 8151 */;
object2.onPress = onPress_119086;
return object2;
}
function shareActivityLogs() { // fn#119087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:2000, offset: 0x024fbe4c, size: 101 bytes, params: 1, frame: 16
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iQzQs3);
object2.icon = importDefault(8151) /* metro dependency 8151 */;
object2.onPress = onPress_119088;
return object2;
}
function voiceSettingsOnPress() { // fn#119069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:413, owner: voiceSettings.onPress, offset: 0x024fb859, size: 81 bytes, params: 1, frame: 15
const value = environment.__proto__;
const openUserSettingsModule = require(7007) /* metro dependency 7007: openUserSettings */;
const openUserSettings = openUserSettingsModule.openUserSettings;
const VOICE = UserSettingsSections.VOICE;
Reflect.apply(openUserSettings, openUserSettingsModule, [{screen: VOICE}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function videoParticipantsHiddenOnPress() { // fn#119071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:592, owner: videoParticipantsHidden.onPress, offset: 0x024fb913, size: 58 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.toggleVoiceParticipantsHidden(env0_0.id, !require);
}
function openHideSelfStreamAndVideoConfirmDialogImporter() { // fn#119073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:770, owner: openHideSelfStreamAndVideoConfirmDialog.importer, offset: 0x024fb991, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun119075;
});
}
function reportStreamIssueOnPress() { // fn#119079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1055, owner: reportStreamIssue.onPress, offset: 0x024fbafa, size: 261 bytes, params: 1, frame: 19
let value = environment.__proto__;
const value3 = require(dependencyMap[13]).encodeStreamKey(env0_0);
const r2 = StreamRTCConnectionStore.getVideoStats(value3) ?? ({});
const object2 = {};
object2.media_session_id = StreamRTCConnectionStore.getMediaSessionId(value3);
object2.rtc_connection_id = StreamRTCConnectionStore.getRtcConnectionId(value3);
object2.stream_region = StreamRTCConnectionStore.getRegion(value3);
object2.max_viewers = StreamRTCConnectionStore.getMaxViewers(value3);
copyDataProperties(object2, r2, undefined);
const defaultImport = importDefault(dependencyMap[7]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[14], dependencyMap.paths);
const binding = env0_0;
Reflect.apply(openLazy, defaultImport, [value, 'StreamReportProblem' + binding.ownerId, {stream: binding,
analyticsData: object2}]);
}
function inviteOnPress() { // fn#119081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1420, owner: invite.onPress, offset: 0x024fbca7, size: 62 bytes, params: 1, frame: 14
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const showInstantInviteActionSheet = instantInviteUtilsModule.showInstantInviteActionSheet;
const binding = env0_0;
const VOICE_CHANNEL = InstantInviteSources.VOICE_CHANNEL;
return Reflect.apply(showInstantInviteActionSheet, instantInviteUtilsModule, [binding, {source: VOICE_CHANNEL}]);
}
function inviteOnPress_119082() { // fn#119082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1513, owner: invite.onPress, offset: 0x024fbce5, size: 71 bytes, params: 1, frame: 15
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const showInstantInviteActionSheet = instantInviteUtilsModule.showInstantInviteActionSheet;
const binding = env0_0;
const STREAM = InstantInviteSources.STREAM;
return Reflect.apply(showInstantInviteActionSheet, instantInviteUtilsModule, [binding, {source: STREAM,
stream: require}]);
}
function inviteOnPress_119083() { // fn#119083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1603, owner: invite.onPress, offset: 0x024fbd2c, size: 71 bytes, params: 1, frame: 15
const instantInviteUtilsModule = require(9151) /* metro dependency 9151: InstantInviteUtils */;
const showInstantInviteActionSheet = instantInviteUtilsModule.showInstantInviteActionSheet;
const binding = env0_0;
const ACTIVITY_INVITE = InstantInviteSources.ACTIVITY_INVITE;
return Reflect.apply(showInstantInviteActionSheet, instantInviteUtilsModule, [binding, {source: ACTIVITY_INVITE,
targetApplicationId: importDefault}]);
}
function inviteOnPress_119084() { // fn#119084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1722, owner: invite.onPress, offset: 0x024fbd73, size: 61 bytes, params: 1, frame: 13
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
const navigateToNewGroupDM = navigationRouteUtilsNativeModule.navigateToNewGroupDM;
const id = env0_0.id;
const CHANNEL_CALL = AnalyticsPages.CHANNEL_CALL;
return Reflect.apply(navigateToNewGroupDM, navigationRouteUtilsNativeModule, [id, CHANNEL_CALL]);
}
function rtcDebugPanelOnPress() { // fn#119086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1942, owner: rtcDebugPanel.onPress, offset: 0x024fbe1c, size: 48 bytes, params: 1, frame: 12
env0_0();
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function shareActivityLogsOnPress() { // fn#119088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:2072, owner: shareActivityLogs.onPress, offset: 0x024fbeb1, size: 202 bytes, params: 1, frame: 18
var defaultImport;
var open;
var intl;
let value = environment.__proto__;
const logAggregatorModule = require(12) /* metro dependency 12: LogAggregator */;
const stringify = logAggregatorModule.stringify;
let object = [RPC_APPLICATION_LOGGING_CATEGORY];
const value2 = Reflect.apply(stringify, logAggregatorModule, [object]);
if (value2 === '') {
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport.open;
object = {key: 'EMBEDDED_ACTIVITIES_SHARE_EMPTY_LOGS_ERROR_MESSAGE'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['i+9VWy']);
Reflect.apply(open, defaultImport, [object]);
} else {
value = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
value.showShareActionSheet({message: value2}, 'Activity Logs');
}
function videoParticipantsHidden(a0, a1) { // fn#119070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:516, offset: 0x024fb8aa, size: 105 bytes, params: 3, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hoZYAA);
object.switchValue = !a1;
object.onPress = onPress_119071;
return object;
function videoParticipantsHiddenOnPress() { // fn#119071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:592, owner: videoParticipantsHidden.onPress, offset: 0x024fb913, size: 58 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.toggleVoiceParticipantsHidden(env0_0.id, !require);
}
}
function openHideSelfStreamAndVideoConfirmDialog(a0, a1) { // fn#119072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:689, offset: 0x024fb94d, size: 68 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
AlertActionCreators.openLazy({importer: importer_119073});
function openHideSelfStreamAndVideoConfirmDialogImporter() { // fn#119073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:770, owner: openHideSelfStreamAndVideoConfirmDialog.importer, offset: 0x024fb991, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun119075;
});
function _fun119074({default: env0_0}) { // fn#119074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:804, offset: 0x024fb9d1, size: 23 bytes, params: 2, frame: 2
return _fun119075;
function _fun119075(a0) { // fn#119075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:819, offset: 0x024fb9e8, size: 65 bytes, params: 2, frame: 15
return ((Component) => <Component {...a0} {...{['type']: env2_0}} {...{['onConfirm']: require}} />)(env0_0);
}
}
}
}
function selfVideoHidden(a0, a1) { // fn#119076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:876, offset: 0x024fba29, size: 99 bytes, params: 3, frame: 16
const env0_0 = a1;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const MH8ESU = (IndexNativeModule).t.MH8ESU;
return {label: Reflect.apply(string, intl, [MH8ESU]), switchValue: !a0, onPress: function() {
require();
}};
function selfVideoHiddenOnPress() { // fn#119077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:952, owner: selfVideoHidden.onPress, offset: 0x00da750c, size: 15 bytes, params: 1, frame: 9
require();
}
}
function reportStreamIssue(a0) { // fn#119078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:984, offset: 0x024fba8c, size: 110 bytes, params: 2, frame: 17
const env0_0 = a0;
const object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const KHGhHf = (IndexNativeModule).t.KHGhHf;
object.label = Reflect.apply(string, intl, [KHGhHf]);
object.icon = importDefault(15557) /* metro dependency 15557 */;
object.onPress = onPress_119079;
return object;
function reportStreamIssueOnPress() { // fn#119079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1055, owner: reportStreamIssue.onPress, offset: 0x024fbafa, size: 261 bytes, params: 1, frame: 19
let value = environment.__proto__;
const value3 = require(dependencyMap[13]).encodeStreamKey(env0_0);
const r2 = StreamRTCConnectionStore.getVideoStats(value3) ?? ({});
const object = {};
streamRTCConnectionStoreBinding = StreamRTCConnectionStore;
object.media_session_id = streamRTCConnectionStoreBinding.getMediaSessionId(value3);
object.rtc_connection_id = streamRTCConnectionStoreBinding.getRtcConnectionId(value3);
object.stream_region = streamRTCConnectionStoreBinding.getRegion(value3);
object.max_viewers = streamRTCConnectionStoreBinding.getMaxViewers(value3);
copyDataProperties(object, r2, undefined);
const defaultImport = importDefault(dependencyMap[7]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[14], dependencyMap.paths);
const binding = env0_0;
Reflect.apply(openLazy, defaultImport, [value, 'StreamReportProblem' + binding.ownerId, {stream: binding,
analyticsData: object}]);
}
}
function invite(a0, a1, a2) { // fn#119080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1398, offset: 0x024fbbff, size: 168 bytes, params: 4, frame: 17
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
let r1 = a1 != null ? inviteOnPress_119082 : a2 == null ? inviteOnPress : inviteOnPress_119083;
r1 = a0.isPrivate() ? inviteOnPress_119084 : r1;
const object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const VINpSK = (IndexNativeModule).t.VINpSK;
object.label = Reflect.apply(string, intl, [VINpSK]);
object.icon = importDefault(10832) /* metro dependency 10832 */;
object.onPress = r1;
return object;
function inviteOnPress() { // fn#119081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1420, owner: invite.onPress, offset: 0x024fbca7, size: 62 bytes, params: 1, frame: 14
const showInstantInviteActionSheet = InstantInviteUtilsModule.showInstantInviteActionSheet;
const binding = env0_0;
const VOICE_CHANNEL = InstantInviteSources.VOICE_CHANNEL;
return Reflect.apply(showInstantInviteActionSheet, InstantInviteUtilsModule, [binding, {source: VOICE_CHANNEL}]);
}
function inviteOnPress_119082() { // fn#119082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1513, owner: invite.onPress, offset: 0x024fbce5, size: 71 bytes, params: 1, frame: 15
const showInstantInviteActionSheet = InstantInviteUtilsModule.showInstantInviteActionSheet;
const binding = env0_0;
const STREAM = InstantInviteSources.STREAM;
return Reflect.apply(showInstantInviteActionSheet, InstantInviteUtilsModule, [binding, {source: STREAM,
stream: require}]);
}
function inviteOnPress_119083() { // fn#119083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1603, owner: invite.onPress, offset: 0x024fbd2c, size: 71 bytes, params: 1, frame: 15
const showInstantInviteActionSheet = InstantInviteUtilsModule.showInstantInviteActionSheet;
const binding = env0_0;
const ACTIVITY_INVITE = InstantInviteSources.ACTIVITY_INVITE;
return Reflect.apply(showInstantInviteActionSheet, InstantInviteUtilsModule, [binding, {source: ACTIVITY_INVITE,
targetApplicationId: importDefault}]);
}
function inviteOnPress_119084() { // fn#119084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1722, owner: invite.onPress, offset: 0x024fbd73, size: 61 bytes, params: 1, frame: 13
const navigateToNewGroupDM = NavigationRouteUtilsNativeModule.navigateToNewGroupDM;
const id = env0_0.id;
const CHANNEL_CALL = AnalyticsPages.CHANNEL_CALL;
return Reflect.apply(navigateToNewGroupDM, NavigationRouteUtilsNativeModule, [id, CHANNEL_CALL]);
}
}
function rtcDebugPanel(a0) { // fn#119085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1871, offset: 0x024fbdb0, size: 108 bytes, params: 2, frame: 17
const env0_0 = a0;
const object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const X8bCMe = (IndexNativeModule).t.X8bCMe;
object.label = Reflect.apply(string, intl, [X8bCMe]);
object.icon = importDefault(8151) /* metro dependency 8151 */;
object.onPress = onPress_119086;
return object;
function rtcDebugPanelOnPress() { // fn#119086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:1942, owner: rtcDebugPanel.onPress, offset: 0x024fbe1c, size: 48 bytes, params: 1, frame: 12
env0_0();
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
function shareActivityLogs() { // fn#119087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:2000, offset: 0x024fbe4c, size: 101 bytes, params: 1, frame: 16
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iQzQs3);
object.icon = importDefault(8151) /* metro dependency 8151 */;
object.onPress = onPress_119088;
return object;
function shareActivityLogsOnPress() { // fn#119088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:2072, owner: shareActivityLogs.onPress, offset: 0x024fbeb1, size: 202 bytes, params: 1, frame: 18
var defaultImport;
var open;
var intl;
let value = environment.__proto__;
const stringify = LogAggregatorModule.stringify;
let object = [RPC_APPLICATION_LOGGING_CATEGORY];
const value2 = Reflect.apply(stringify, LogAggregatorModule, [object]);
if (value2 === '') {
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport.open;
object = {key: 'EMBEDDED_ACTIVITIES_SHARE_EMPTY_LOGS_ERROR_MESSAGE'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['i+9VWy']);
Reflect.apply(open, defaultImport, [object]);
} else {
value = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
value.showShareActionSheet({message: value2}, 'Activity Logs');
}
}
}
}
function _fun119074({default: env0_0}) { // fn#119074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:804, offset: 0x024fb9d1, size: 23 bytes, params: 2, frame: 2
return _fun119075;
}
function _fun119075(a0) { // fn#119075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15752:819, offset: 0x024fb9e8, size: 65 bytes, params: 2, frame: 15
return ((Component) => <Component {...a0} {...{['type']: env2_0}} {...{['onConfirm']: require}} />)(env0_0);
}
global.__d(_fun119067, 15555, [31, 4395, 661, 33, 1244, 15556, 7007, 4080, 7712, 4496, 15553, 1962, 15557, 4285,
15558, 9151, 4007, 10832, 8151, 12, 3857, 9212,
2]) /* metro module 15555, dependencies: [31, 4395, 661, 33, 1244, 15556, 7007, 4080, 7712, 4496, 15553, 1962, 15557, 4285, 15558, 9151, 4007, 10832, 8151, 12, 3857, 9212, 2] */;
@@ -1,36 +1,41 @@
/* Metro module 10678; source: modules/video_calls/native/SurfaceDirectRendererExperiment.tsx; dependencies: [1226, 1854, 566, 2] */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun82108(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10864:6, offset: 0x01eeb885, size: 212 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_3 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'kind': 'user',
const env0_3 = (ApexModule).createApexExperiment({'kind': 'user',
'name': '2026-03-surface-direct-renderer', defaultConfig: {enableSurfaceDirectRenderer: false},
variations: {[1]: {enableSurfaceDirectRenderer: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/SurfaceDirectRendererExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/SurfaceDirectRendererExperiment.tsx');
exports.ANDROID_SURFACE_DIRECT_RENDERER_EXPERIMENT = '2026-03-surface-direct-renderer';
exports.isSurfaceDirectRendererExperimentEnabled = isSurfaceDirectRendererExperimentEnabled;
exports.useSurfaceDirectRendererExperiment = useSurfaceDirectRendererExperiment;
function isSurfaceDirectRendererExperimentEnabled() { // fn#82109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10864:476, offset: 0x01eeb959, size: 38 bytes, params: 1, frame: 12
const binding = env0_3;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding,
[{location: 'RTCConnection_media_engine_connect'}]).enableSurfaceDirectRenderer;
}
function useSurfaceDirectRendererExperiment(a0, a1) { // fn#82110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10864:662, offset: 0x01eeb97f, size: 117 bytes, params: 3, frame: 18
const env0_0 = a0;
const binding = env0_3;
const useConfig = binding.useConfig;
return a0 != null && !(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
_fun82111, [a0]) && Reflect.apply(useConfig, binding, [a1]).enableSurfaceDirectRenderer;
function _fun82111() { // fn#82111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10864:794, offset: 0x01eeb9f4, size: 30 bytes, params: 1, frame: 10
const binding = env0_0;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
return binding === Reflect.apply(getId, authenticationStoreBinding, []);
}
}
}
function isSurfaceDirectRendererExperimentEnabled() { // fn#82109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10864:476, offset: 0x01eeb959, size: 38 bytes, params: 1, frame: 12
const binding = env0_3;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding,
[{location: 'RTCConnection_media_engine_connect'}]).enableSurfaceDirectRenderer;
}
function useSurfaceDirectRendererExperiment(a0, a1) { // fn#82110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10864:662, offset: 0x01eeb97f, size: 117 bytes, params: 3, frame: 18
const env0_0 = a0;
const binding = env0_3;
const useConfig = binding.useConfig;
return a0 != null && !(require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
_fun82111, [a0]) && Reflect.apply(useConfig, binding, [a1]).enableSurfaceDirectRenderer;
}
function _fun82111() { // fn#82111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10864:794, offset: 0x01eeb9f4, size: 30 bytes, params: 1, frame: 10
const binding = env0_0;
const getId = AuthenticationStore.getId;
return binding === Reflect.apply(getId, AuthenticationStore, []);
}
global.__d(_fun82108, 10678, [1226, 1854, 566, 2]) /* metro module 10678, dependencies: [1226, 1854, 566, 2] */;
@@ -1,58 +1,60 @@
/* Metro module 10834; source: modules/video_calls/native/VoiceActionUtils.tsx; dependencies: [9228, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun83086(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11020:6, offset: 0x01f0cd51, size: 196 bytes, params: 8, frame: 18
var object2;
const env0_0 = require;
const NOOP_83087 = function() {
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {SERVER_MUTE: 0};
object2[0] = 'SERVER_MUTE';
object2.SUPPRESS = 1;
object2[1] = 'SUPPRESS';
object2.SELF_MUTE = 2;
object2[2] = 'SELF_MUTE';
object2.NONE = 3;
object2[3] = 'NONE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/VoiceActionUtils.tsx');
exports.DominantMuteState = object2;
object = {SERVER_MUTE: 0};
object[0] = 'SERVER_MUTE';
object.SUPPRESS = 1;
object[1] = 'SUPPRESS';
object.SELF_MUTE = 2;
object[2] = 'SELF_MUTE';
object.NONE = 3;
object[3] = 'NONE';
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/VoiceActionUtils.tsx');
exports.DominantMuteState = object;
exports.createMuteHandler = createMuteHandler;
exports.createDeafHandler = function(a0) {
return {deaf: a0.selfDeaf || a0.deaf,
onPress: a0.deaf ? require(dependencyMap[0]).showServerDeafenAlert : require(dependencyMap[0]).handleToggleSelfDeaf};
};
function createMuteHandler(a0) { // fn#83088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11020:372, offset: 0x01f0ce15, size: 210 bytes, params: 2, frame: 16
var r1;
var r2;
var showSuppressedAlert;
var showServerMuteAlert;
const value = a1;
const r0 = value !== undefined ? value : false;
const NONE = env0_2.NONE;
if (a0.selfMute) {
r1 = env0_2.SELF_MUTE;
} else {
r1 = NONE;
}
if (r0) {
r2 = NOOP_83087;
} else {
r2 = (require(9228) /* metro dependency 9228: CallsUtils */).handleToggleSelfMute;
}
if (a0.suppress) {
showSuppressedAlert = (require(9228) /* metro dependency 9228: CallsUtils */).showSuppressedAlert;
r1 = env0_2.SUPPRESS;
r2 = showSuppressedAlert;
}
if (a0.mute) {
showServerMuteAlert = (require(9228) /* metro dependency 9228: CallsUtils */).showServerMuteAlert;
r1 = env0_2.SERVER_MUTE;
r2 = showServerMuteAlert;
}
let r3 = a0.selfMute || a0.mute;
r3 = !r3 ? a0.suppress : r3;
return {mute: r3, onPress: r2, dominantMuteState: r1};
}
}
function createMuteHandler(a0) { // fn#83088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11020:372, offset: 0x01f0ce15, size: 210 bytes, params: 2, frame: 16
var r1;
var r2;
var showSuppressedAlert;
var showServerMuteAlert;
const value = a1;
const r0 = value !== undefined ? value : false;
const NONE = env0_2.NONE;
if (a0.selfMute) {
r1 = env0_2.SELF_MUTE;
} else {
r1 = NONE;
}
if (r0) {
r2 = NOOP_83087;
} else {
r2 = (require(9228) /* metro dependency 9228: CallsUtils */).handleToggleSelfMute;
}
if (a0.suppress) {
showSuppressedAlert = (require(9228) /* metro dependency 9228: CallsUtils */).showSuppressedAlert;
r1 = env0_2.SUPPRESS;
r2 = showSuppressedAlert;
}
if (a0.mute) {
showServerMuteAlert = (require(9228) /* metro dependency 9228: CallsUtils */).showServerMuteAlert;
r1 = env0_2.SERVER_MUTE;
r2 = showServerMuteAlert;
}
let r3 = a0.selfMute || a0.mute;
r3 = !r3 ? a0.suppress : r3;
return {mute: r3, onPress: r2, dominantMuteState: r1};
}
global.__d(_fun83086, 10834, [9228, 2]) /* metro module 10834, dependencies: [9228, 2] */;
@@ -1,22 +1,62 @@
/* Metro module 10660; source: modules/video_calls/native/VoiceCallOverlayUtils.tsx; dependencies: [7716, 694, 2] */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelCallConstantsModule from './ChannelCallConstants.tsx'; /* Metro dependency 7716 */
function _fun81988(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:6, offset: 0x01ee658d, size: 272 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const {MIN_MARGIN_BETWEEN_OVERLAYS,
VoiceCallOverlayType} = require(7716) /* metro dependency 7716: ChannelCallConstants */;
const closure = doRectanglesIntersectWorklet;
closure.__closure = {};
closure.__workletHash = 16149528537623;
closure.__initData = {code: 'function VoiceCallOverlayUtilsTsx1(rectA,rectB,minMarginBetweenOverlays){if(rectA==null||rectA.x==null||rectA.y==null||rectA.width==null||rectA.height==null||rectB==null||rectB.x==null||rectB.y==null||rectB.width==null||rectB.height==null){return false;}const minAx=rectA.x-minMarginBetweenOverlays;const maxAx=rectA.x+rectA.width+minMarginBetweenOverlays;const minAy=rectA.y-minMarginBetweenOverlays;const maxAy=rectA.y+rectA.height+minMarginBetweenOverlays;const minBx=rectB.x;const maxBx=rectB.x+rectB.width;const minBy=rectB.y;const maxBy=rectB.y+rectB.height;const aLeftOfB=maxAx<minBx;const aRightOfB=minAx>maxBx;const aBelowB=minAy>maxBy;const aAboveB=maxAy<minBy;return!(aLeftOfB||aRightOfB||aAboveB||aBelowB);}'};
const closure2 = doesTargetPositionIntersectOtherOverlaysWorklet;
closure2.__closure = {VoiceCallOverlayType: VoiceCallOverlayType, doRectanglesIntersectWorklet: closure,
VoiceCallOverlayType} = ChannelCallConstantsModule;
const doRectanglesIntersectWorklet2 = doRectanglesIntersectWorklet;
doRectanglesIntersectWorklet2.__closure = {};
doRectanglesIntersectWorklet2.__workletHash = 16149528537623;
doRectanglesIntersectWorklet2.__initData = {code: 'function VoiceCallOverlayUtilsTsx1(rectA,rectB,minMarginBetweenOverlays){if(rectA==null||rectA.x==null||rectA.y==null||rectA.width==null||rectA.height==null||rectB==null||rectB.x==null||rectB.y==null||rectB.width==null||rectB.height==null){return false;}const minAx=rectA.x-minMarginBetweenOverlays;const maxAx=rectA.x+rectA.width+minMarginBetweenOverlays;const minAy=rectA.y-minMarginBetweenOverlays;const maxAy=rectA.y+rectA.height+minMarginBetweenOverlays;const minBx=rectB.x;const maxBx=rectB.x+rectB.width;const minBy=rectB.y;const maxBy=rectB.y+rectB.height;const aLeftOfB=maxAx<minBx;const aRightOfB=minAx>maxBx;const aBelowB=minAy>maxBy;const aAboveB=maxAy<minBy;return!(aLeftOfB||aRightOfB||aAboveB||aBelowB);}'};
const doesTargetPositionIntersectOtherOverlaysWorklet2 = doesTargetPositionIntersectOtherOverlaysWorklet;
doesTargetPositionIntersectOtherOverlaysWorklet2.__closure = {VoiceCallOverlayType: VoiceCallOverlayType,
doRectanglesIntersectWorklet: doRectanglesIntersectWorklet2,
MIN_MARGIN_BETWEEN_OVERLAYS: MIN_MARGIN_BETWEEN_OVERLAYS};
closure2.__workletHash = 10902657864288;
closure2.__initData = {code: 'function VoiceCallOverlayUtilsTsx2(voiceCallOverlayLayoutStates,voiceCallOverlayType,targetRectangle){const{VoiceCallOverlayType,doRectanglesIntersectWorklet,MIN_MARGIN_BETWEEN_OVERLAYS}=this.__closure;switch(voiceCallOverlayType){case VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON:{if(!voiceCallOverlayLayoutStates[VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE].isVisible){return false;}const doRectanglesIntersect=doRectanglesIntersectWorklet(targetRectangle,voiceCallOverlayLayoutStates[VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE],MIN_MARGIN_BETWEEN_OVERLAYS);if(doRectanglesIntersect){return true;}break;}case VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE:{if(!voiceCallOverlayLayoutStates[VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON].isVisible){return false;}const doRectanglesIntersect=doRectanglesIntersectWorklet(targetRectangle,voiceCallOverlayLayoutStates[VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON],MIN_MARGIN_BETWEEN_OVERLAYS);if(doRectanglesIntersect){return true;}break;}}return false;}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/VoiceCallOverlayUtils.tsx');
exports.doesTargetPositionIntersectOtherOverlaysWorklet = closure2;
doesTargetPositionIntersectOtherOverlaysWorklet2.__workletHash = 10902657864288;
doesTargetPositionIntersectOtherOverlaysWorklet2.__initData = {code: 'function VoiceCallOverlayUtilsTsx2(voiceCallOverlayLayoutStates,voiceCallOverlayType,targetRectangle){const{VoiceCallOverlayType,doRectanglesIntersectWorklet,MIN_MARGIN_BETWEEN_OVERLAYS}=this.__closure;switch(voiceCallOverlayType){case VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON:{if(!voiceCallOverlayLayoutStates[VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE].isVisible){return false;}const doRectanglesIntersect=doRectanglesIntersectWorklet(targetRectangle,voiceCallOverlayLayoutStates[VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE],MIN_MARGIN_BETWEEN_OVERLAYS);if(doRectanglesIntersect){return true;}break;}case VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE:{if(!voiceCallOverlayLayoutStates[VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON].isVisible){return false;}const doRectanglesIntersect=doRectanglesIntersectWorklet(targetRectangle,voiceCallOverlayLayoutStates[VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON],MIN_MARGIN_BETWEEN_OVERLAYS);if(doRectanglesIntersect){return true;}break;}}return false;}'};
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/VoiceCallOverlayUtils.tsx');
exports.doesTargetPositionIntersectOtherOverlaysWorklet = doesTargetPositionIntersectOtherOverlaysWorklet2;
exports.updateVoiceCallOverlayLayoutState = updateVoiceCallOverlayLayoutState;
exports.setPipEnabledWhileFocusedOnActivityOrStream = setPipEnabledWhileFocusedOnActivityOrStream;
function doesTargetPositionIntersectOtherOverlaysWorklet(a0, a1, a2) { // fn#81990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:2305, offset: 0x01ee6794, size: 177 bytes, params: 4, frame: 17
const VOICE_CONTROLS_TOGGLE_BUTTON = VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON;
if (VOICE_CONTROLS_TOGGLE_BUTTON === a1) {
if (a0[VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE].isVisible) {
if (doRectanglesIntersectWorklet(a2, a0[VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE],
MIN_MARGIN_BETWEEN_OVERLAYS)) {
return true;
}
return false;
}
} else {
if (VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE !== a1) {
return false;
}
if (a0[VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON].isVisible) {
if (doRectanglesIntersectWorklet(a2, a0[VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON],
MIN_MARGIN_BETWEEN_OVERLAYS)) {
return true;
}
return false;
}
}
return false;
}
function updateVoiceCallOverlayLayoutState(a0, a1) { // fn#81991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:2973, offset: 0x01ee6845, size: 65 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'VOICE_CALL_OVERLAY_LAYOUT_STATE_UPDATE',
voiceCallOverlayType: a0, voiceCallOverlayLayoutState: a1});
}
function setPipEnabledWhileFocusedOnActivityOrStream(a0) { // fn#81992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:3187, offset: 0x01ee6886, size: 57 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'VOICE_CALL_SET_PIP_ENABLED_FOR_ACTIVITY_OR_STREAM',
pipEnabledWhileFocusedOnActivityOrStream: a0});
}
}
function doRectanglesIntersectWorklet(a0, a1, a2) { // fn#81989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:904, offset: 0x01ee669d, size: 247 bytes, params: 4, frame: 9
@@ -66,38 +106,4 @@ function doRectanglesIntersectWorklet(a0, a1, a2) { // fn#81989, source: /ci/bui
return !r0;
}
function doesTargetPositionIntersectOtherOverlaysWorklet(a0, a1, a2) { // fn#81990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:2305, offset: 0x01ee6794, size: 177 bytes, params: 4, frame: 17
const VOICE_CONTROLS_TOGGLE_BUTTON = VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON;
if (VOICE_CONTROLS_TOGGLE_BUTTON === a1) {
if (a0[VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE].isVisible) {
if (doRectanglesIntersectWorklet(a2, a0[VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE],
MIN_MARGIN_BETWEEN_OVERLAYS)) {
return true;
}
return false;
}
} else {
if (VoiceCallOverlayType.CAMERA_PREVIEW_PICTURE_IN_PICTURE !== a1) {
return false;
}
if (a0[VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON].isVisible) {
if (doRectanglesIntersectWorklet(a2, a0[VoiceCallOverlayType.VOICE_CONTROLS_TOGGLE_BUTTON],
MIN_MARGIN_BETWEEN_OVERLAYS)) {
return true;
}
return false;
}
}
return false;
}
function updateVoiceCallOverlayLayoutState(a0, a1) { // fn#81991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:2973, offset: 0x01ee6845, size: 65 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VOICE_CALL_OVERLAY_LAYOUT_STATE_UPDATE',
voiceCallOverlayType: a0, voiceCallOverlayLayoutState: a1});
}
function setPipEnabledWhileFocusedOnActivityOrStream(a0) { // fn#81992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10846:3187, offset: 0x01ee6886, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'VOICE_CALL_SET_PIP_ENABLED_FOR_ACTIVITY_OR_STREAM',
pipEnabledWhileFocusedOnActivityOrStream: a0});
}
global.__d(_fun81988, 10660, [7716, 694, 2]) /* metro module 10660, dependencies: [7716, 694, 2] */;
@@ -1,224 +1,293 @@
/* Metro module 10700; source: modules/video_calls/native/components/ActivityTile.tsx; dependencies: [5, 57, 31, 27, 1378, 1878, 661, 1309, 4237, 33, 1305, 4501, 697, 566, 1360, 6777, 4617, 3995, 10701, 6771, 6789, 8620, 1244, 8107, 8109, 10703, 8106, 5278, 10704, 10717, 4579, 3868, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import NicknameUtils from '../../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UseGetOrFetchApplications from '../../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import HandlePressJoinActivity from '../../../activities/handlePressJoinActivity.tsx'; /* Metro dependency 8106 */
import UseCurrentEmbeddedApplication from '../../../activities/utils/useCurrentEmbeddedApplication.tsx'; /* Metro dependency 10701 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as FormConstantsModule from '../../../../design/void/Form/native/FormConstants.tsx'; /* Metro dependency 1309 */
import * as GlobalUtilsModule from '../../../../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */
import * as NativeModule2 from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ConstantsModule2 from '../../../activities/Constants.tsx'; /* Metro dependency 4237 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as AnalyticsModule from '../../../../hooks/analytics.tsx'; /* Metro dependency 8620 */
function _fun82226(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:6, offset: 0x01eefa39, size: 686 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const Fonts = value.Fonts;
const env0_8 = value.ThemeTypes;
const getThemedRippleConfig = (require(1309) /* metro dependency 1309: FormConstants */).getThemedRippleConfig;
const env0_9 = (require(4237) /* metro dependency 4237: Constants */).ActivityLayoutMode;
const getThemedRippleConfig = (FormConstantsModule).getThemedRippleConfig;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const AvatarSizes = (NativeModule).AvatarSizes;
const XSMALL = AvatarSizes.XSMALL;
const env0_13 = getThemedRippleConfig({foreground: true});
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.pressableOpacity = {'width': '100%', 'height': '100%', 'backgroundColor': null, 'justifyContent': 'center',
object.pressableOpacity = {'width': '100%', 'height': '100%', 'backgroundColor': null, 'justifyContent': 'center',
'alignItems': 'center', backgroundColor: BACKGROUND_SURFACE_HIGH};
object2.activityPreview = {'alignItems': 'center', 'display': 'flex', 'width': '100%', 'padding': 16};
object.activityPreview = {'alignItems': 'center', 'display': 'flex', 'width': '100%', 'padding': 16};
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.activityViewContainer = {flex: 1, backgroundColor: BACKGROUND_SURFACE_HIGH};
object.activityViewContainer = {flex: 1, backgroundColor: BACKGROUND_SURFACE_HIGH};
let TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
object2.titleText = {'fontSize': 16, 'lineHeight': 24, 'color': null, 'fontFamily': null, 'textAlign': 'center',
object.titleText = {'fontSize': 16, 'lineHeight': 24, 'color': null, 'fontFamily': null, 'textAlign': 'center',
'marginLeft': 16, 'marginRight': 16, color: TEXT_DEFAULT, fontFamily: DISPLAY_EXTRABOLD};
TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
const PRIMARY_NORMAL = Fonts.PRIMARY_NORMAL;
object2.subtitleText = {'fontSize': 14, 'lineHeight': 18, 'color': null, 'fontFamily': null, 'textAlign': 'center',
object.subtitleText = {'fontSize': 14, 'lineHeight': 18, 'color': null, 'fontFamily': null, 'textAlign': 'center',
'marginLeft': 16, 'marginRight': 16, color: TEXT_DEFAULT, fontFamily: PRIMARY_NORMAL};
const object3 = {};
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
object3.height = AVATAR_SIZE_MAP[XSMALL];
const object4 = {};
const AVATAR_SIZE_MAP = (NativeModule).AVATAR_SIZE_MAP;
object4.height = AVATAR_SIZE_MAP[XSMALL];
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object3.backgroundColor = BACKGROUND_MOD_NORMAL;
object2.overflow = object3;
object2.buttonWrapper = {'marginTop': 8, 'alignSelf': 'center'};
object2.buttonPill = {borderRadius: 100};
const env0_14 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ActivityTile.tsx');
object4.backgroundColor = BACKGROUND_MOD_NORMAL;
object.overflow = object4;
object.buttonWrapper = {'marginTop': 8, 'alignSelf': 'center'};
object.buttonPill = {borderRadius: 100};
const env0_14 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ActivityTile.tsx');
exports.default = ActivityTile;
}
function ActivityTileInner({participant, style, channel, onSingleTap}) { // fn#82227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1155, offset: 0x01eefce7, size: 1566 bytes, params: 2, frame: 39
var r11;
var r14;
var defaultImport3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
var items2;
var items3;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var BaseTextButton;
const env0_4 = undefined;
const ActivityTileInnerHandleCanJoin = function() {
return _handleCanJoin.apply(this, arguments);
};
const closure = onPress_82232;
const styles = useStyles();
const defaultImport = importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */;
const items4 = [participant.applicationId];
const property = env0_4(defaultImport(items4), 1)[0];
const value5 = ((a0) => {
var env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun82234);
})(participant);
const defaultImport2 = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
const getName = defaultImport2.getName;
const guildId = channel.getGuildId();
let id = channel.id;
const value8 = Reflect.apply(getName, defaultImport2, [guildId, id, value5?.[0]]);
if (value8 != null) {
r11 = value8;
} else {
defaultImport3 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r11 = defaultImport3.getName(value5?.[0]);
}
const value10 = (importDefault(10701) /* metro dependency 10701: useCurrentEmbeddedApplication */)();
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun82236);
const defaultImport4 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const ACTIVITY_TILE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ACTIVITY_TILE;
const env0_5 = defaultImport4(ACTIVITY_TILE).analyticsLocations;
const env0_6 = (require(8620) /* metro dependency 8620: analytics */).useAnalyticsContext();
const r20 = property?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WCNe7F);
id = UserStore.getCurrentUser()?.id;
let r0 = value10 != null && value10.id === property?.id;
r0 = !r0 ? id != null && (value11 == null ? undefined : value11.userIds.has(id)) : r0;
const value19 = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).useEmbeddedActivityJoinability({userId: UserStore.getCurrentUser()?.id,
channelId: channel.id, application: property});
const EmbeddedActivityJoinability = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).EmbeddedActivityJoinability;
const CAN_JOIN = EmbeddedActivityJoinability.CAN_JOIN;
if (r0) {
r0 = <PressableOpacity pointerEvents="box-only" style={styles.activityViewContainer} onPress={onSingleTap} activeOpacity={1}>{((Component) => <Component channel={channel} layoutMode={ActivityLayoutMode.PIP} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */)}</PressableOpacity>;
} else {
var pressableOpacityProps = {accessibilityRole: 'button',
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Yw5Hr2,
{applicationName: r20}), androidRippleConfig: env0_13, onPress: closure, style: styles.pressableOpacity};
items2 = [((Component) => <Component application={property} resizeMode="cover" />)(importDefault(10717) /* metro dependency 10717: EmbeddedActivityBackgroundImageWithOverlay */)];
var viewBindingProps = {style: [styles.activityPreview, style]};
items3 = [((SummarizedIconRow) => <SummarizedIconRow offsetAmount={-6} overflowStyle={styles.overflow} overflowComponent={(require(1305) /* metro dependency 1305: native */).OverflowText} items={value5} max={4} renderItem={renderItem_82238} />)((require(1305) /* metro dependency 1305: native */).SummarizedIconRow)];
items3[1] = <LegacyText style={styles.subtitleText} numberOfLines={2}>{value5.length > 1 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.cpe6CK,
{username: r11,
count: value5.length - 1}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7Uuia2'],
{username: r11})}</LegacyText>;
items3[2] = <LegacyText style={styles.titleText}>{r20}</LegacyText>;
if (value19 !== CAN_JOIN) {
r14 = null;
function ActivityTileInner({participant, style, channel, onSingleTap}) { // fn#82227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1155, offset: 0x01eefce7, size: 1566 bytes, params: 2, frame: 39
var r11;
var r14;
var defaultImport3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const PressableOpacity = (PressablesModule).PressableOpacity;
var items2;
var items3;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var BaseTextButton;
const env0_4 = undefined;
const ActivityTileInnerHandleCanJoin = function() {
return ActivityTileInner_handleCanJoin.apply(this, arguments);
};
const onPress_822322 = onPress_82232;
const styles = useStyles();
const defaultImport = UseGetOrFetchApplications;
const items = [participant.applicationId];
const property = env0_4(defaultImport(items), 1)[0];
const value5 = ((a0) => {
var env0_0 = a0;
return (FluxModule).useStateFromStoresArray([UserStore], _fun82234);
})(participant);
const defaultImport2 = NicknameUtils;
const getName = defaultImport2.getName;
const guildId = channel.getGuildId();
let id = channel.id;
const value8 = Reflect.apply(getName, defaultImport2, [guildId, id, value5?.[0]]);
if (value8 != null) {
r11 = value8;
} else {
var viewBinding2Props = {style: styles.buttonWrapper};
BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
r14 = <View {...viewBinding2Props}><BaseTextButton onPress={closure} pillStyle={styles.buttonPill} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4i2vj+'])} variant="secondary" /></View>;
defaultImport3 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r11 = defaultImport3.getName(value5?.[0]);
}
items3[3] = r14;
items2[1] = <View {...viewBindingProps}>{items3}</View>;
r0 = <PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>;
}
return r0;
}
function ActivityTile(a0) { // fn#82239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:4114, offset: 0x01ef061c, size: 89 bytes, params: 2, frame: 17
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
return (
<ThemeContextProvider theme={DARK}>
<ActivityTileInner {...a0} />
</ThemeContextProvider>
);
}
function _handleCanJoin() { // fn#82229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:2283, owner: ActivityTileInner._handleCanJoin, offset: 0x01ef0305, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun82231).apply(this, arguments);
}
function ActivityTileInnerOnPress() { // fn#82232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:2546, owner: ActivityTileInner.onPress, offset: 0x01ef03f7, size: 73 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(8106) /* metro dependency 8106: handlePressJoinActivity */)({embeddedActivityJoinability: env0_7,
handleCanJoin: ActivityTileInnerHandleCanJoin});
if (onSingleTap != null) {
onSingleTap();
}
}
function useUsersForActivityParticipant(a0) { // fn#82233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1293, owner: ActivityTileInner.useUsersForActivityParticipant, offset: 0x01ef0440, size: 67 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserStore], _fun82234);
}
function _fun82236() { // fn#82236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1653, offset: 0x01ef04fc, size: 52 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const getEmbeddedActivitiesForChannel = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel;
return Reflect.apply(getEmbeddedActivitiesForChannel, EmbeddedActivitiesStore, [channel.id]).find(_fun82237);
}
function ActivityTileInnerRenderItem(a0, a1) { // fn#82238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:3467, owner: ActivityTileInner.renderItem, offset: 0x01ef0559, size: 195 bytes, params: 3, frame: 20
var object3;
const value2 = undefined;
const CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
const object4 = {user: a0};
let r4 = participant.guildId ?? value2;
object4.guildId = r4;
object4.size = XSMALL;
if (a1) {
r4 = value2;
} else {
object3 = {};
object3.radius = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[XSMALL] / 2 + 3;
object3.direction = (require(1305) /* metro dependency 1305: native */).CutoutDirection.RIGHT;
object3.inset = -6;
r4 = object3;
}
object4.cutout = r4;
return <CutoutableAvatarImage {...object4} />;
}
function* _fun82231() { // fn#82231, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:2334, offset: 0x01ef0345, size: 178 bytes, params: 1, frame: 15
var value5;
var binding;
if (true) {
value = environment.__proto__.__proto__;
if (env2_4 != null && env2_3 != null) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_1;
yield binding(env3_2[24])({applicationId: env2_4.applicationId, activityChannelId: importDefault.id,
locationObject: EmbeddedActivitiesStore.location, analyticsLocations: View});
if (false) {
return undefined;
const value10 = (UseCurrentEmbeddedApplication)();
const value11 = (FluxModule).useStateFromStores([EmbeddedActivitiesStore],
_fun82236);
const defaultImport4 = UseAnalyticsLocations;
const ACTIVITY_TILE = (AnalyticsLocation).ACTIVITY_TILE;
const env0_5 = defaultImport4(ACTIVITY_TILE).analyticsLocations;
const env0_6 = (AnalyticsModule).useAnalyticsContext();
const r20 = property?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WCNe7F);
id = UserStore.getCurrentUser()?.id;
let r0 = value10 != null && value10.id === property?.id;
r0 = !r0 ? id != null && (value11 == null ? undefined : value11.userIds.has(id)) : r0;
const value19 = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).useEmbeddedActivityJoinability({userId: UserStore.getCurrentUser()?.id,
channelId: channel.id, application: property});
const EmbeddedActivityJoinability = (require(8107) /* metro dependency 8107: getEmbeddedActivityJoinability */).EmbeddedActivityJoinability;
const CAN_JOIN = EmbeddedActivityJoinability.CAN_JOIN;
if (r0) {
r0 = (
<PressableOpacity
pointerEvents="box-only"
style={styles.activityViewContainer}
onPress={onSingleTap}
activeOpacity={1}
>
{((Component) => <Component channel={channel} layoutMode={ActivityLayoutMode.PIP} />)(importDefault(10704) /* metro dependency 10704: EmbeddedActivityView */)}
</PressableOpacity>
);
} else {
var pressableOpacityProps = {accessibilityRole: 'button',
accessibilityLabel: intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Yw5Hr2,
{applicationName: r20}), androidRippleConfig: env0_13, onPress: onPress_822322,
style: styles.pressableOpacity};
items2 = [
((Component) => <Component application={property} resizeMode="cover" />)(importDefault(10717) /* metro dependency 10717: EmbeddedActivityBackgroundImageWithOverlay */),
];
var viewBindingProps = {style: [styles.activityPreview, style]};
const SummarizedIconRow = (require(1305) /* metro dependency 1305: native */).SummarizedIconRow;
items3 = [
<SummarizedIconRow
offsetAmount={-6}
overflowStyle={styles.overflow}
overflowComponent={(require(1305) /* metro dependency 1305: native */).OverflowText}
items={value5}
max={4}
renderItem={renderItem_82238}
/>,
];
items3[1] = (
<LegacyText style={styles.subtitleText} numberOfLines={2}>
{value5.length > 1 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.cpe6CK,
{username: r11,
count: value5.length - 1}) : intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7Uuia2'],
{username: r11})}
</LegacyText>
);
items3[2] = (
<LegacyText style={styles.titleText}>
{r20}
</LegacyText>
);
if (value19 !== CAN_JOIN) {
r14 = null;
} else {
var viewBinding2Props = {style: styles.buttonWrapper};
BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
r14 = (
<View {...viewBinding2Props}>
<BaseTextButton
onPress={onPress_822322}
pillStyle={styles.buttonPill}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4i2vj+'])}
variant="secondary"
/>
</View>
);
}
binding = env3_0;
binding(env3_2[25]).setOrientationLockState(env2_3);
items3[3] = r14;
items2[1] = (
<View {...viewBindingProps}>
{items3}
</View>
);
r0 = (
<PressableOpacity {...pressableOpacityProps}>
{items2}
</PressableOpacity>
);
}
return r0;
function ActivityTileInner_handleCanJoin() { // fn#82229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:2283, owner: ActivityTileInner._handleCanJoin, offset: 0x01ef0305, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun82231).apply(this, arguments);
function* _fun82231() { // fn#82231, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:2334, offset: 0x01ef0345, size: 178 bytes, params: 1, frame: 15
var value5;
var binding;
if (true) {
value = environment.__proto__.__proto__;
if (env2_4 != null && env2_3 != null) {
value5 = environment.__proto__.__proto__.__proto__;
binding = env3_1;
yield binding(env3_2[24])({applicationId: env2_4.applicationId, activityChannelId: importDefault.id,
locationObject: EmbeddedActivitiesStore.location, analyticsLocations: View});
if (false) {
return undefined;
}
binding = env3_0;
binding(env3_2[25]).setOrientationLockState(env2_3);
}
}
}
}
function ActivityTileInnerOnPress() { // fn#82232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:2546, owner: ActivityTileInner.onPress, offset: 0x01ef03f7, size: 73 bytes, params: 1, frame: 13
const value = environment.__proto__;
(HandlePressJoinActivity)({embeddedActivityJoinability: env0_7,
handleCanJoin: ActivityTileInnerHandleCanJoin});
if (onSingleTap != null) {
onSingleTap();
}
}
function useUsersForActivityParticipant(a0) { // fn#82233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1293, owner: ActivityTileInner.useUsersForActivityParticipant, offset: 0x01ef0440, size: 67 bytes, params: 2, frame: 14
const env0_0 = a0;
return (FluxModule).useStateFromStoresArray([UserStore], _fun82234);
function _fun82234() { // fn#82234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1381, offset: 0x01ef0483, size: 93 bytes, params: 1, frame: 13
const participants = env0_0.participants;
const Array = global.Array;
let value = Array.from(participants);
value = value.map(function(a0) {
return UserStore.getUser(a0.userId);
});
return value.filter((GlobalUtilsModule).isNotNullish);
}
}
function _fun82236() { // fn#82236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1653, offset: 0x01ef04fc, size: 52 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
const getEmbeddedActivitiesForChannel = embeddedActivitiesStoreBinding.getEmbeddedActivitiesForChannel;
return Reflect.apply(getEmbeddedActivitiesForChannel, embeddedActivitiesStoreBinding, [channel.id]).find(_fun82237);
function _fun82237({applicationId}) { // fn#82237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1703, offset: 0x01ef0530, size: 41 bytes, params: 2, frame: 4
return applicationId === env1_3?.id;
}
}
function ActivityTileInnerRenderItem(a0, a1) { // fn#82238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:3467, owner: ActivityTileInner.renderItem, offset: 0x01ef0559, size: 195 bytes, params: 3, frame: 20
var object;
const value2 = undefined;
const CutoutableAvatarImage = (require(1305) /* metro dependency 1305: native */).CutoutableAvatarImage;
const object2 = {user: a0};
let r4 = participant.guildId ?? value2;
object2.guildId = r4;
object2.size = XSMALL;
if (a1) {
r4 = value2;
} else {
object = {};
object.radius = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[XSMALL] / 2 + 3;
object.direction = (require(1305) /* metro dependency 1305: native */).CutoutDirection.RIGHT;
object.inset = -6;
r4 = object;
}
object2.cutout = r4;
return <CutoutableAvatarImage {...object2} />;
}
}
function ActivityTile(a0) { // fn#82239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:4114, offset: 0x01ef061c, size: 89 bytes, params: 2, frame: 17
const ThemeContextProvider = (NativeModule2).ThemeContextProvider;
const DARK = ThemeTypes.DARK;
return (
<ThemeContextProvider theme={DARK}>
<ActivityTileInner {...a0} />
</ThemeContextProvider>
);
}
}
function _fun82234() { // fn#82234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1381, offset: 0x01ef0483, size: 93 bytes, params: 1, frame: 13
const participants = env0_0.participants;
const Array = global.Array;
let value = Array.from(participants);
value = value.map(function(a0) {
return UserStore.getUser(a0.userId);
});
return value.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
function _fun82237({applicationId}) { // fn#82237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10886:1703, offset: 0x01ef0530, size: 41 bytes, params: 2, frame: 4
return applicationId === env1_3?.id;
}
global.__d(_fun82226, 10700, [5, 57, 31, 27, 1378, 1878, 661, 1309, 4237, 33, 1305, 4501, 697, 566, 1360, 6777,
4617, 3995, 10701, 6771, 6789, 8620, 1244, 8107, 8109, 10703, 8106, 5278, 10704, 10717, 4579, 3868,
2]) /* metro module 10700, dependencies: [5, 57, 31, 27, 1378, 1878, 661, 1309, 4237, 33, 1305, 4501, 697, 566, 1360, 6777, 4617, 3995, 10701, 6771, 6789, 8620, 1244, 8107, 8109, 10703, 8106, 5278, 10704, 10717, 4579, 3868, 2] */;
@@ -1,80 +1,121 @@
/* Metro module 15486; source: modules/video_calls/native/components/AndroidAudioCaptureBugWarning.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 10779, 4573, 1244, 1305, 11299, 4578, 3853, 1948, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseLocalStorageStateModule from '../../../../hooks/useLocalStorageState.tsx'; /* Metro dependency 10779 */
function _fun118551(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15683:6, offset: 0x024e1683, size: 481 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_4 = value.Pressable;
const env0_5 = value.View;
const env0_6 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object = {};
const object2 = {};
const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL;
object4.backgroundColor = BACKGROUND_FEEDBACK_CRITICAL;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.backgroundColor = BACKGROUND_FEEDBACK_CRITICAL;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object4.marginHorizontal = PX_32;
object2.marginHorizontal = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object4.marginBottom = PX_32;
object2.marginBottom = PX_32;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
object2.padding = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.gap = PX_12;
object3.container = object4;
object2.gap = PX_12;
object.container = object2;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.row = {'flexDirection': 'row', 'alignItems': 'center', 'width': '100%', gap: PX_8};
object3.text = {flex: 1};
object.row = {'flexDirection': 'row', 'alignItems': 'center', 'width': '100%', gap: PX_8};
object.text = {flex: 1};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.closeIcon = {tintColor: WHITE};
const env0_9 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/AndroidAudioCaptureBugWarning.tsx');
object.closeIcon = {tintColor: WHITE};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/AndroidAudioCaptureBugWarning.tsx');
exports.default = _default_118552;
}
function _default_118552() { // fn#118552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15683:601, offset: 0x024e1864, size: 555 bytes, params: 1, frame: 28
var r0;
var Text;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var items3;
var object;
var items2;
var Button;
var view;
const styles = useStyles();
const value3 = Module00057((UseLocalStorageStateModule).useLocalStorageState('android-audio-capture-bug-warning-dismissed',
false), 2);
const property = value3[0];
const env0_0 = value3[1];
if (property === true) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container, accessibilityRole: 'alert'};
var viewBindingProps2 = {style: styles.row};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
items3 = [
<Text
style={styles.text}
variant="text-sm/medium"
color="always-white"
>
{Reflect.apply(string, intl, [t['7MKLU1']])}
</Text>,
];
items3[1] = (
<Pressable
onPress={onPress_118553}
accessibilityLabel={intl.string(t.OorFv3)}
accessibilityRole="button"
>
{((Icon) => <Icon style={styles.closeIcon} source={importDefault(11299) /* metro dependency 11299 */} size={(require(1305) /* metro dependency 1305: native */).IconSizes.MEDIUM} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</Pressable>
);
view = (
<View {...viewBindingProps2}>
{items3}
</View>
);
items2 = [view];
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[1] = (
<Button
size="lg"
variant="primary-overlay"
onPress={function() {
return importDefault(dependencyMap[13]).openURL(importDefault(dependencyMap[14]).getArticleURL(HelpdeskArticles.ANDROID_SCREENSHARE_AUDIO_BUG));
}}
text={Reflect.apply(string, intl, [t.hvVgAZ])}
/>
);
view = (
<View {...viewBindingProps}>
{items2}
</View>
);
r0 = view;
}
return r0;
function _default_118552OnPress() { // fn#118553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15683:964, owner: _default_118552.onPress, offset: 0x01d72e0f, size: 18 bytes, params: 1, frame: 11
return env0_0(true);
}
function _default_118552() { // fn#118552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15683:601, offset: 0x024e1864, size: 555 bytes, params: 1, frame: 28
var r0;
var Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
var object4;
var items2;
var Button;
var view;
const styles = useStyles();
const value3 = env0_3((require(10779) /* metro dependency 10779: useLocalStorageState */).useLocalStorageState('android-audio-capture-bug-warning-dismissed',
false), 2);
const property = value3[0];
const env0_0 = value3[1];
if (property === true) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container, accessibilityRole: 'alert'};
var viewBindingProps2 = {style: styles.row};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
items3 = [<Text style={styles.text} variant="text-sm/medium" color="always-white">{Reflect.apply(string, intl,
[t['7MKLU1']])}</Text>];
items3[1] = <Pressable onPress={onPress_118553} accessibilityLabel={intl.string(t.OorFv3)} accessibilityRole="button">{((Icon) => <Icon style={styles.closeIcon} source={importDefault(11299) /* metro dependency 11299 */} size={(require(1305) /* metro dependency 1305: native */).IconSizes.MEDIUM} />)((require(1305) /* metro dependency 1305: native */).Icon)}</Pressable>;
view = <View {...viewBindingProps2}>{items3}</View>;
items2 = [view];
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[1] = <Button size="lg" variant="primary-overlay" onPress={function() {
return importDefault(dependencyMap[13]).openURL(importDefault(dependencyMap[14]).getArticleURL(HelpdeskArticles.ANDROID_SCREENSHARE_AUDIO_BUG));
}} text={Reflect.apply(string, intl, [t.hvVgAZ])} />;
view = <View {...viewBindingProps}>{items2}</View>;
r0 = view;
}
return r0;
}
global.__d(_fun118551, 15486, [57, 31, 27, 661, 33, 4501, 697, 10779, 4573, 1244, 1305, 11299, 4578, 3853, 1948,
2]) /* metro module 15486, dependencies: [57, 31, 27, 661, 33, 4501, 697, 10779, 4573, 1244, 1305, 11299, 4578, 3853, 1948, 2] */;
@@ -1,194 +1,218 @@
/* Metro module 7741; source: modules/video_calls/native/components/CallBarAction.tsx; dependencies: [31, 27, 7715, 33, 4000, 697, 4501, 7742, 5278, 7743, 4573, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
function _fun61963(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:6, offset: 0x01b500e3, size: 611 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const env0_6 = (require(7715) /* metro dependency 7715: ChannelCallStore */).resetFocusTimer;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4000) /* metro dependency 4000: ColorUtils */;
const hexWithOpacity = value.hexWithOpacity;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const WHITE = (Native).unsafe_rawColors.WHITE;
const env0_9 = Reflect.apply(hexWithOpacity, value, [WHITE, 0.24]);
Object = global.Object;
const env0_10 = Object.freeze({'buttonRadius': 28, 'badgeRadius': 6, 'cutoutInset': 3});
Object = global.Object;
value = Object.freeze({'buttonRadius': 24, 'badgeRadius': 4, 'cutoutInset': 2});
const env0_12 = 24 + 2 * value.buttonRadius * 5 + 96;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.buttonContainer = {position: 'absolute'};
object2.iconContainer = {'position': 'absolute', 'justifyContent': 'center', 'alignItems': 'center'};
object2.badge = {'backgroundColor': 'white', 'position': 'absolute'};
const PRIMARY_760 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_760;
object2.notificationArea = {'position': 'absolute', 'top': -4, 'right': -4, 'height': 24, 'minWidth': 24,
const createStyles = CreateStylesModule.createStyles;
object = {};
object.buttonContainer = {position: 'absolute'};
object.iconContainer = {'position': 'absolute', 'justifyContent': 'center', 'alignItems': 'center'};
object.badge = {'backgroundColor': 'white', 'position': 'absolute'};
const PRIMARY_760 = (Native).unsafe_rawColors.PRIMARY_760;
object.notificationArea = {'position': 'absolute', 'top': -4, 'right': -4, 'height': 24, 'minWidth': 24,
'paddingHorizontal': 4, 'borderRadius': 12, 'borderWidth': 4, 'borderColor': null, 'alignItems': 'center',
'justifyContent': 'center', borderColor: PRIMARY_760};
object2.notificationText = {lineHeight: 16};
const CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
object2.notificationAreaMentioned = {backgroundColor: CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT};
const PRIMARY_600 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_600;
object2.notificationAreaUnread = {backgroundColor: PRIMARY_600};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
const closure = ActionButton;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/CallBarAction.tsx');
object.notificationText = {lineHeight: 16};
const CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT = (Native).colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT;
object.notificationAreaMentioned = {backgroundColor: CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT};
const PRIMARY_600 = (Native).unsafe_rawColors.PRIMARY_600;
object.notificationAreaUnread = {backgroundColor: PRIMARY_600};
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const ActionButton2 = ActionButton;
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/CallBarAction.tsx');
exports.SMALL_ACTION_BUTTON_DIMENSIONS = value;
exports.ActionButton = closure;
exports.ActionButton = ActionButton2;
exports.ToggledActionButton = ToggledActionButton;
exports.PrimaryActionButton = PrimaryActionButton;
exports.NotifiedActionButton = NotifiedActionButton;
}
function ActionButton({appearsDisabled, backgroundColor, imageStyle, onPress, accessibilityLabel, accessibilityState, source, showBadge, isSmallSize, children, lottieComponent, lottieComponentColor, IconComponent}) { // fn#61964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:1045, offset: 0x01b50346, size: 781 bytes, params: 2, frame: 39
var r9;
var items4;
var object;
var getBadgeTop;
var getBadgeLeft;
appearsDisabled = !(appearsDisabled === undefined) && appearsDisabled;
showBadge = !(showBadge === undefined) && showBadge;
isSmallSize = !(isSmallSize === undefined) && isSmallSize;
var value;
const styles = useStyles();
const r5 = isSmallSize && (importDefault(7742) /* metro dependency 7742: useBottomVoiceControlsSheetWidth */)() < env0_12 ? 6 : 12;
const r15 = isSmallSize ? env0_11 : env0_10;
let buttonRadius = r15.buttonRadius;
const value5 = 2 * buttonRadius;
let badgeRadius = r15.badgeRadius;
const value6 = 2 * badgeRadius;
const value7 = r15.badgeRadius + r15.cutoutInset;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object3 = {width: value5, height: value5};
object3.borderRadius = r15.buttonRadius;
object3.marginHorizontal = r5;
const items3 = [styles.buttonContainer];
items3[1] = {width: value5, height: value5, borderRadius: r15.buttonRadius};
items3[2] = {opacity: appearsDisabled ? 0.25 : 1};
const items2 = [((Component) => <Component circleRadius={r15.buttonRadius} cutoutRadius={value7} enableCutout={showBadge} cutoutPositionInDegrees={45} circleFillColor={backgroundColor ?? env0_9} />)(importDefault(7743) /* metro dependency 7743: CircleWithCutoutUtils */)];
items2[1] = <View style={[styles.iconContainer, {width: value5,
height: value5}]}>{lottieComponent != null ? env0_3.cloneElement(lottieComponent,
{color: lottieComponentColor}) : IconComponent != null ? <IconComponent style={imageStyle} /> : <Image source={source} style={imageStyle} />}</View>;
if (showBadge) {
items4 = [styles.badge];
object = {width: value6, height: value6};
badgeRadius = r15.badgeRadius;
object.borderRadius = badgeRadius;
value = require(7743) /* metro dependency 7743: CircleWithCutoutUtils */;
getBadgeTop = value.getBadgeTop;
badgeRadius = r15.badgeRadius;
buttonRadius = r15.buttonRadius;
object.top = Reflect.apply(getBadgeTop, value, [badgeRadius, buttonRadius, 45]);
value = require(7743) /* metro dependency 7743: CircleWithCutoutUtils */;
getBadgeLeft = value.getBadgeLeft;
badgeRadius = r15.badgeRadius;
buttonRadius = r15.buttonRadius;
object.left = Reflect.apply(getBadgeLeft, value, [badgeRadius, buttonRadius, 45]);
items4[1] = object;
value = <View style={items4} />;
r9 = value;
} else {
r9 = null;
}
items2[2] = r9;
items2[3] = children;
return (
<PressableOpacity
accessibilityLabel={accessibilityLabel}
accessibilityRole="button"
accessibilityState={accessibilityState}
onPress={function() {
resetFocusTimer();
onPress();
}}
disabled={false}
style={object3}
>
<View style={items3}>
{items2}
function ActionButton({appearsDisabled, backgroundColor, imageStyle, onPress, accessibilityLabel, accessibilityState, source, showBadge, isSmallSize, children, lottieComponent, lottieComponentColor, IconComponent}) { // fn#61964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:1045, offset: 0x01b50346, size: 781 bytes, params: 2, frame: 39
var r9;
var items4;
var object2;
var getBadgeTop;
var getBadgeLeft;
appearsDisabled = !(appearsDisabled === undefined) && appearsDisabled;
showBadge = !(showBadge === undefined) && showBadge;
isSmallSize = !(isSmallSize === undefined) && isSmallSize;
var value;
const styles = useStyles();
const r5 = isSmallSize && (importDefault(7742) /* metro dependency 7742: useBottomVoiceControlsSheetWidth */)() < env0_12 ? 6 : 12;
const r15 = isSmallSize ? env0_11 : env0_10;
let buttonRadius = r15.buttonRadius;
const value5 = 2 * buttonRadius;
let badgeRadius = r15.badgeRadius;
const value6 = 2 * badgeRadius;
const value7 = r15.badgeRadius + r15.cutoutInset;
const PressableOpacity = (PressablesModule).PressableOpacity;
const object4 = {width: value5, height: value5};
object4.borderRadius = r15.buttonRadius;
object4.marginHorizontal = r5;
const items3 = [styles.buttonContainer];
items3[1] = {width: value5, height: value5, borderRadius: r15.buttonRadius};
items3[2] = {opacity: appearsDisabled ? 0.25 : 1};
const items2 = [
((Component) => <Component circleRadius={r15.buttonRadius} cutoutRadius={value7} enableCutout={showBadge} cutoutPositionInDegrees={45} circleFillColor={backgroundColor ?? env0_9} />)(importDefault(7743) /* metro dependency 7743: CircleWithCutoutUtils */),
];
items2[1] = (
<View style={[styles.iconContainer, {width: value5, height: value5}]}>
{
lottieComponent != null
? ReactModule.cloneElement(lottieComponent, {color: lottieComponentColor})
: (
IconComponent != null
? (
<IconComponent style={imageStyle} />
)
: (
<Image source={source} style={imageStyle} />
)
)
}
</View>
</PressableOpacity>
);
}
function ToggledActionButton(a0) { // fn#61966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:2343, offset: 0x01b5066d, size: 292 bytes, params: 2, frame: 24
const isActive = a0.isActive;
let disableTint = a0.disableTint;
const value = undefined;
disableTint = !(disableTint === value) && disableTint;
let showBadge = a0.showBadge;
showBadge = !(showBadge === value) && showBadge;
let isSmallSize = a0.isSmallSize;
isSmallSize = !(isSmallSize === value) && isSmallSize;
const backgroundColor = a0.backgroundColor;
const tintColor = a0.tintColor;
const object2 = {'isActive': 0, 'disableTint': 0, 'showBadge': 0, 'isSmallSize': 0, 'backgroundColor': 0,
'tintColor': 0};
const value5 = null;
silentSetPrototypeOf(object2, value5, undefined);
const value6 = copyDataProperties({}, a0, object2, undefined);
const WHITE = isActive ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : value5;
const unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
let r5 = disableTint ? value : isActive ? unsafe_rawColors.PRIMARY_900 : unsafe_rawColors.WHITE;
const actionButtonProps = {backgroundColor: value5 == backgroundColor ? WHITE : backgroundColor,
imageStyle: {tintColor: value5 == tintColor ? r5 : tintColor}, accessibilityState: {selected: isActive},
isSmallSize: isSmallSize, ...value6};
actionButtonProps['showBadge'] = showBadge;
r5 = value5 != tintColor ? tintColor : r5;
actionButtonProps['lottieComponentColor'] = r5;
return <ActionButton {...actionButtonProps} />;
}
function PrimaryActionButton(a0) { // fn#61967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:2780, offset: 0x01b50791, size: 141 bytes, params: 2, frame: 18
let isSmallSize = a0.isSmallSize;
isSmallSize = !(isSmallSize === undefined) && isSmallSize;
const value = Object.create(null);
value.isSmallSize = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
return (
<ActionButton
backgroundColor={RED_400}
imageStyle={{tintColor: WHITE}}
isSmallSize={isSmallSize}
{...value2}
/>
);
}
function NotifiedActionButton(a0) { // fn#61968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:2991, offset: 0x01b5081e, size: 230 bytes, params: 2, frame: 23
const notifications = a0.notifications;
const isMentioned = a0.isMentioned;
const value = Object.create(null);
value.notifications = 0;
value.isMentioned = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const actionButtonBindingProps = {...value2};
const items2 = [styles.notificationArea];
items2[1] = isMentioned === true || isMentioned === undefined ? styles.notificationAreaMentioned : styles.notificationAreaUnread;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View>
<ActionButton {...actionButtonBindingProps}>
<View style={items2}>
<Text
style={styles.notificationText}
variant="text-xs/semibold"
color="always-white"
>
{notifications}
</Text>
);
if (showBadge) {
items4 = [styles.badge];
object2 = {width: value6, height: value6};
badgeRadius = r15.badgeRadius;
object2.borderRadius = badgeRadius;
value = require(7743) /* metro dependency 7743: CircleWithCutoutUtils */;
getBadgeTop = value.getBadgeTop;
badgeRadius = r15.badgeRadius;
buttonRadius = r15.buttonRadius;
object2.top = Reflect.apply(getBadgeTop, value, [badgeRadius, buttonRadius, 45]);
value = require(7743) /* metro dependency 7743: CircleWithCutoutUtils */;
getBadgeLeft = value.getBadgeLeft;
badgeRadius = r15.badgeRadius;
buttonRadius = r15.buttonRadius;
object2.left = Reflect.apply(getBadgeLeft, value, [badgeRadius, buttonRadius, 45]);
items4[1] = object2;
value = <View style={items4} />;
r9 = value;
} else {
r9 = null;
}
items2[2] = r9;
items2[3] = children;
return (
<PressableOpacity
accessibilityLabel={accessibilityLabel}
accessibilityRole="button"
accessibilityState={accessibilityState}
onPress={function() {
resetFocusTimer();
onPress();
}}
disabled={false}
style={object4}
>
<View style={items3}>
{items2}
</View>
</ActionButton>
</View>
);
</PressableOpacity>
);
}
function ToggledActionButton(a0) { // fn#61966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:2343, offset: 0x01b5066d, size: 292 bytes, params: 2, frame: 24
const isActive = a0.isActive;
let disableTint = a0.disableTint;
const value = undefined;
disableTint = !(disableTint === value) && disableTint;
let showBadge = a0.showBadge;
showBadge = !(showBadge === value) && showBadge;
let isSmallSize = a0.isSmallSize;
isSmallSize = !(isSmallSize === value) && isSmallSize;
const backgroundColor = a0.backgroundColor;
const tintColor = a0.tintColor;
const object = {'isActive': 0, 'disableTint': 0, 'showBadge': 0, 'isSmallSize': 0, 'backgroundColor': 0,
'tintColor': 0};
const value5 = null;
silentSetPrototypeOf(object, value5, undefined);
const value6 = copyDataProperties({}, a0, object, undefined);
const WHITE = isActive ? (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE : value5;
const unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
let r5 = disableTint ? value : isActive ? unsafe_rawColors.PRIMARY_900 : unsafe_rawColors.WHITE;
const actionButtonProps = {backgroundColor: value5 == backgroundColor ? WHITE : backgroundColor,
imageStyle: {tintColor: value5 == tintColor ? r5 : tintColor}, accessibilityState: {selected: isActive},
isSmallSize: isSmallSize, ...value6};
actionButtonProps['showBadge'] = showBadge;
r5 = value5 != tintColor ? tintColor : r5;
actionButtonProps['lottieComponentColor'] = r5;
return <ActionButton {...actionButtonProps} />;
}
function PrimaryActionButton(a0) { // fn#61967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:2780, offset: 0x01b50791, size: 141 bytes, params: 2, frame: 18
let isSmallSize = a0.isSmallSize;
isSmallSize = !(isSmallSize === undefined) && isSmallSize;
const value = Object.create(null);
value.isSmallSize = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const RED_400 = (Native).unsafe_rawColors.RED_400;
const WHITE = (Native).unsafe_rawColors.WHITE;
return (
<ActionButton
backgroundColor={RED_400}
imageStyle={{tintColor: WHITE}}
isSmallSize={isSmallSize}
{...value2}
/>
);
}
function NotifiedActionButton(a0) { // fn#61968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7919:2991, offset: 0x01b5081e, size: 230 bytes, params: 2, frame: 23
const notifications = a0.notifications;
const isMentioned = a0.isMentioned;
const value = Object.create(null);
value.notifications = 0;
value.isMentioned = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const actionButtonBindingProps = {...value2};
const items2 = [styles.notificationArea];
items2[1] = isMentioned === true || isMentioned === undefined ? styles.notificationAreaMentioned : styles.notificationAreaUnread;
const Text = (TextModule).Text;
return (
<View>
<ActionButton {...actionButtonBindingProps}>
<View style={items2}>
<Text
style={styles.notificationText}
variant="text-xs/semibold"
color="always-white"
>
{notifications}
</Text>
</View>
</ActionButton>
</View>
);
}
}
global.__d(_fun61963, 7741, [31, 27, 7715, 33, 4000, 697, 4501, 7742, 5278, 7743, 4573,
2]) /* metro module 7741, dependencies: [31, 27, 7715, 33, 4000, 697, 4501, 7742, 5278, 7743, 4573, 2] */;
@@ -1,194 +1,244 @@
/* Metro module 10884; source: modules/video_calls/native/components/CallTile.tsx; dependencies: [31, 27, 4492, 1878, 7715, 4299, 33, 4501, 4000, 697, 6771, 1585, 566, 7712, 8743, 10670, 10851, 10693, 10700, 10885, 10889, 10890, 9416, 9437, 10891, 1305, 7723, 4017, 4504, 10892, 2] */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import ApplicationStreamingStore from '../../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import ShowUserProfileActionSheet from '../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ColorUtilsModule from '../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CallConstantsModule from '../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as RevealProviderModule from './RevealProvider.tsx'; /* Metro dependency 7723 */
function _fun83366(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:6, offset: 0x01f173ba, size: 700 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.StyleSheet;
const env0_5 = value2.View;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
const env0_8 = channelCallStoreModule.resetFocus;
const env0_9 = channelCallStoreModule.toggleFocus;
const callConstantsModule = require(4299) /* metro dependency 4299: CallConstants */;
const env0_10 = callConstantsModule.ParticipantTypes;
const env0_11 = callConstantsModule.isStreamParticipant;
const env0_12 = callConstantsModule.VoicePlatforms;
const value5 = require(33) /* metro dependency 33 */;
const env0_13 = value5.jsx;
const env0_14 = value5.Fragment;
const env0_15 = value5.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {liveContainer: {'position': 'absolute', 'top': 8, 'right': 8}};
object2.titleIcon = {marginRight: 6};
const object5 = {'flexDirection': 'row', 'alignItems': 'center', 'alignSelf': 'flex-start', 'backgroundColor': null,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {liveContainer: {'position': 'absolute', 'top': 8, 'right': 8}};
object.titleIcon = {marginRight: 6};
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'alignSelf': 'flex-start', 'backgroundColor': null,
'borderRadius': null, 'paddingHorizontal': 8, 'paddingVertical': 4};
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexOpacityToRgba = colorUtilsModule.hexOpacityToRgba;
const hexOpacityToRgba = ColorUtilsModule.hexOpacityToRgba;
const PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
object5.backgroundColor = Reflect.apply(hexOpacityToRgba, colorUtilsModule, [PRIMARY_700, 0.5]);
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.usernameContainer = object5;
const object6 = {'overflow': 'hidden', 'position': 'absolute', 'bottom': 8, 'left': 8, 'right': 40};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.usernamePosition = object6;
object3.backgroundColor = Reflect.apply(hexOpacityToRgba, ColorUtilsModule, [PRIMARY_700, 0.5]);
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.usernameContainer = object3;
const object4 = {'overflow': 'hidden', 'position': 'absolute', 'bottom': 8, 'left': 8, 'right': 40};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.usernamePosition = object4;
const PRIMARY_600 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_600;
object2.streamPreview = {'flex': 1, 'width': '100%', backgroundColor: PRIMARY_600};
object.streamPreview = {'flex': 1, 'width': '100%', backgroundColor: PRIMARY_600};
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.screenshareContainer = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden',
object.screenshareContainer = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden',
'width': '100%', backgroundColor: BLACK};
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.stageStreamContainer = {backgroundColor: BLACK};
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object2]);
object.stageStreamContainer = {backgroundColor: BLACK};
const env0_16 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun83368);
const closure = StreamPreviewTile;
object2 = {code: 'function CallTileTsx1(){const{withTiming,reveal,STANDARD_EASING}=this.__closure;return{opacity:withTiming(reveal?1:0,{easing:STANDARD_EASING,duration:250})};}'};
const closure2 = TileOverlay;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/CallTile.tsx');
const StreamPreviewTile2 = StreamPreviewTile;
object = {code: 'function CallTileTsx1(){const{withTiming,reveal,STANDARD_EASING}=this.__closure;return{opacity:withTiming(reveal?1:0,{easing:STANDARD_EASING,duration:250})};}'};
const TileOverlay2 = TileOverlay;
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/CallTile.tsx');
exports.default = value;
exports.StreamPreviewTile = closure;
exports.TileOverlay = closure2;
}
exports.StreamPreviewTile = StreamPreviewTile2;
exports.TileOverlay = TileOverlay2;
function ParticipantIcon({participant}) { // fn#83367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:3055, offset: 0x01f17676, size: 363 bytes, params: 2, frame: 20
const styles = useStyles();
const type = participant.type;
const STREAM = ParticipantTypes.STREAM;
const r10 = type === STREAM ? importDefault(10889) /* metro dependency 10889 */ : participant.type !== ParticipantTypes.USER ? undefined : VoicePlatforms.MOBILE === participant.voicePlatform ? importDefault(10890) /* metro dependency 10890 */ : VoicePlatforms.XBOX === participant.voicePlatform ? importDefault(9416) /* metro dependency 9416 */ : VoicePlatforms.PLAYSTATION === participant.voicePlatform ? importDefault(9437) /* metro dependency 9437 */ : VoicePlatforms.QUEST !== participant.voicePlatform ? undefined : importDefault(10891) /* metro dependency 10891 */;
if (r10 == null) {
return null;
} else {
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
return (
<Icon
source={r10}
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16}
color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE}
style={styles.titleIcon}
/>
);
}
}
function ParticipantIcon({participant}) { // fn#83367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:3055, offset: 0x01f17676, size: 363 bytes, params: 2, frame: 20
const styles = useStyles();
const type = participant.type;
const STREAM = ParticipantTypes.STREAM;
const r10 = type === STREAM ? importDefault(10889) /* metro dependency 10889 */ : participant.type !== ParticipantTypes.USER ? undefined : VoicePlatforms.MOBILE === participant.voicePlatform ? importDefault(10890) /* metro dependency 10890 */ : VoicePlatforms.XBOX === participant.voicePlatform ? importDefault(9416) /* metro dependency 9416 */ : VoicePlatforms.PLAYSTATION === participant.voicePlatform ? importDefault(9437) /* metro dependency 9437 */ : VoicePlatforms.QUEST !== participant.voicePlatform ? undefined : importDefault(10891) /* metro dependency 10891 */;
if (r10 == null) {
return null;
} else {
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
function _fun83368({participant, avatarSize, channel, hasTopSafeArea, hasLeftSafeArea, hasRightSafeArea, hasBottomSafeArea, shrinkStreamEmptyState, contentStyle, hasNotch, resizeMode}) { // fn#83368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1063, offset: 0x01f177e1, size: 1006 bytes, params: 2, frame: 37
const hasBottomSafeArea2 = hasBottomSafeArea;
hasNotch = !(hasNotch === undefined) && hasNotch;
const styles = useStyles();
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const {bottom, right} = (UseSafeAreaInsetsNative)();
const {stream,
activeStream} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ApplicationStreamingStore],
_fun83369);
const binding = hasBottomSafeArea2;
const value6 = binding.useCallback(_fun83370, [channel.id, participant.id]);
const value7 = binding.useCallback(_fun83371, [channel.id, analyticsLocations]);
const value8 = binding.useMemo(_fun83372, [hasBottomSafeArea, hasRightSafeArea, bottom, right]);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
let type = participant.type;
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
const r6 = (
HIDDEN_STREAM === type
? (
<StreamPreviewTile participant={participant} style={contentStyle} />
)
: (
ParticipantTypes.STREAM === type
? (
activeStream != null
? (
activeStream.ownerId !== currentUser?.id
? ((Component) => <Component participant={participant} onSingleTap={toggleFocus} onDoubleTap={value6} removeEmptyStateImage={shrinkStreamEmptyState} onFullScreen={value6} fullscreenIconStyle={value8} style={contentStyle} />)(importDefault(10670) /* metro dependency 10670: StreamTile */)
: (
<View style={styles.screenshareContainer}>
{((Component) => <Component participant={participant} onSingleTap={toggleFocus} onDoubleTap={value6} containerStyle={channel.isGuildStageVoice() ? styles.stageStreamContainer : undefined} />)(importDefault(10851) /* metro dependency 10851: ScreenshareParticipant */)}
</View>
)
)
: (
stream != null
? (
<StreamPreviewTile participant={participant} style={contentStyle} />
)
: null
)
)
: (
ParticipantTypes.USER === type
? ((Component) => <Component participant={participant} avatarSize={avatarSize} onSingleTap={toggleFocus} onDoubleTap={value6} onLongPress={value7} statusStyle={value8} hasNotch={hasNotch} resizeMode={resizeMode} style={contentStyle} />)(importDefault(10693) /* metro dependency 10693: UserTile */)
: (
ParticipantTypes.ACTIVITY !== type
? null
: ((Component) => <Component participant={participant} style={contentStyle} channel={channel} onSingleTap={toggleFocus} />)(importDefault(10700) /* metro dependency 10700: ActivityTile */)
)
)
)
);
type = participant.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
return (
<Icon
source={r10}
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.REFRESH_SMALL_16}
color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE}
style={styles.titleIcon}
/>
<>
{r6}
{
type === ACTIVITY
? null
: (
<TileOverlay
participant={participant}
isActiveStream={activeStream != null}
channel={channel}
hasTopSafeArea={hasTopSafeArea}
hasLeftSafeArea={hasLeftSafeArea}
hasRightSafeArea={hasRightSafeArea}
hasBottomSafeArea={hasBottomSafeArea}
/>
)
}
</>
);
function _fun83369() { // fn#83369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1370, offset: 0x01f17bcf, size: 140 bytes, params: 1, frame: 19
const object = {};
const value = environment.__proto__;
const isStreamParticipant2 = isStreamParticipant(participant);
const value3 = null;
object.stream = isStreamParticipant2 ? ApplicationStreamingStore.getStreamForUser(participant.user.id,
participant.stream.guildId) : value3;
object.activeStream = isStreamParticipant(participant) ? ApplicationStreamingStore.getActiveStreamForUser(participant.user.id,
participant.stream.guildId) : value3;
return object;
}
function _fun83370() { // fn#83370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1565, offset: 0x01f17c5b, size: 68 bytes, params: 1, frame: 14
let value = environment.__proto__;
resetFocus();
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.selectParticipant(channel.id, participant.id);
}
function _fun83371({user}) { // fn#83371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1644, offset: 0x01f17c9f, size: 83 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ShowUserProfileActionSheet)({userId: user.id,
channelId: channel.id, isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
}
function _fun83372() { // fn#83372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1762, offset: 0x01f17cf2, size: 54 bytes, params: 1, frame: 5
const hasBottomSafeAreaBinding = hasBottomSafeArea;
const value2 = 8;
return {bottom: hasBottomSafeAreaBinding ? value2 + bottom : value2,
right: hasRightSafeArea ? value2 + right : value2};
}
}
function StreamPreviewTile({participant, style}) { // fn#83374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:2828, offset: 0x01f17d28, size: 169 bytes, params: 2, frame: 19
const styles = useStyles();
const user = participant.user;
return (
<View style={[styles.streamPreview, style]}>
{((Component) => <Component guildId={participant.stream.guildId} userId={user.id} style={{aspectRatio: undefined,
borderRadius: 0}} disableTransition onPress={function() {
return resetFocus();
}} />)(importDefault(10885) /* metro dependency 10885: TouchableStreamPreview */)}
</View>
);
}
}
function _fun83368({participant, avatarSize, channel, hasTopSafeArea, hasLeftSafeArea, hasRightSafeArea, hasBottomSafeArea, shrinkStreamEmptyState, contentStyle, hasNotch, resizeMode}) { // fn#83368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1063, offset: 0x01f177e1, size: 1006 bytes, params: 2, frame: 37
const env0_3 = hasBottomSafeArea;
hasNotch = !(hasNotch === undefined) && hasNotch;
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const {bottom, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const {stream,
activeStream} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ApplicationStreamingStore],
_fun83369);
const binding = env0_3;
const value6 = binding.useCallback(_fun83370, [channel.id, participant.id]);
const value7 = binding.useCallback(_fun83371, [channel.id, analyticsLocations]);
const value8 = binding.useMemo(_fun83372, [hasBottomSafeArea, hasRightSafeArea, bottom, right]);
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
let type = participant.type;
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
const r6 = HIDDEN_STREAM === type ? <StreamPreviewTile participant={participant} style={contentStyle} /> : ParticipantTypes.STREAM === type ? activeStream != null ? activeStream.ownerId !== currentUser?.id ? ((Component) => <Component participant={participant} onSingleTap={toggleFocus} onDoubleTap={value6} removeEmptyStateImage={shrinkStreamEmptyState} onFullScreen={value6} fullscreenIconStyle={value8} style={contentStyle} />)(importDefault(10670) /* metro dependency 10670: StreamTile */) : <View style={styles.screenshareContainer}>{((Component) => <Component participant={participant} onSingleTap={toggleFocus} onDoubleTap={value6} containerStyle={channel.isGuildStageVoice() ? styles.stageStreamContainer : undefined} />)(importDefault(10851) /* metro dependency 10851: ScreenshareParticipant */)}</View> : stream != null ? <StreamPreviewTile participant={participant} style={contentStyle} /> : null : ParticipantTypes.USER === type ? ((Component) => <Component participant={participant} avatarSize={avatarSize} onSingleTap={toggleFocus} onDoubleTap={value6} onLongPress={value7} statusStyle={value8} hasNotch={hasNotch} resizeMode={resizeMode} style={contentStyle} />)(importDefault(10693) /* metro dependency 10693: UserTile */) : ParticipantTypes.ACTIVITY !== type ? null : ((Component) => <Component participant={participant} style={contentStyle} channel={channel} onSingleTap={toggleFocus} />)(importDefault(10700) /* metro dependency 10700: ActivityTile */);
type = participant.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
return (
<>
{r6}
{type === ACTIVITY ? null : <TileOverlay participant={participant} isActiveStream={activeStream != null} channel={channel} hasTopSafeArea={hasTopSafeArea} hasLeftSafeArea={hasLeftSafeArea} hasRightSafeArea={hasRightSafeArea} hasBottomSafeArea={hasBottomSafeArea} />}
</>
);
}
function StreamPreviewTile({participant, style}) { // fn#83374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:2828, offset: 0x01f17d28, size: 169 bytes, params: 2, frame: 19
const styles = useStyles();
const user = participant.user;
return (
<View style={[styles.streamPreview, style]}>
{((Component) => <Component guildId={participant.stream.guildId} userId={user.id} style={{aspectRatio: undefined,
borderRadius: 0}} disableTransition onPress={function() {
return resetFocus();
}} />)(importDefault(10885) /* metro dependency 10885: TouchableStreamPreview */)}
</View>
);
}
function TileOverlay({participant, isActiveStream, channel, hasLeftSafeArea, hasRightSafeArea, hasBottomSafeArea, hasTopSafeArea}) { // fn#83376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:3640, offset: 0x01f17de0, size: 602 bytes, params: 2, frame: 32
const styles = useStyles();
const {bottom, left, top, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const binding = env0_3;
const useContext = binding.useContext;
const RevealContext = (require(7723) /* metro dependency 7723: RevealProvider */).RevealContext;
const reveal = Reflect.apply(useContext, binding, [RevealContext]).reveal;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var r2;
var moduleValue = require(dependencyMap[28]);
var withTiming = moduleValue.withTiming;
r2 = reveal ? 1 : 0;
var object2 = {};
object2.easing = require(dependencyMap[25]).STANDARD_EASING;
object2.duration = 250;
return {opacity: Reflect.apply(withTiming, moduleValue, [r2, object2])};
};
let object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.reveal = reveal;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.STANDARD_EASING = STANDARD_EASING;
closure.__closure = object2;
closure.__workletHash = 15640123774063;
closure.__initData = env0_18;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
object2 = {bottom: hasBottomSafeArea ? bottom : 0, right: hasRightSafeArea ? right : 0,
left: hasLeftSafeArea ? left : 0, top: hasTopSafeArea ? top : 0};
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 pointerEvents="none" style={[StyleSheet.absoluteFill, object2, value3]}>
{isActiveStream && <View style={styles.liveContainer}>{((LiveTag) => <LiveTag />)((require(1305) /* metro dependency 1305: native */).LiveTag)}</View>}
<View style={styles.usernamePosition}>
<View style={styles.usernameContainer}>
<ParticipantIcon participant={participant} />
{((Component) => <Component channel={channel} participant={participant} />)(importDefault(10892) /* metro dependency 10892: ParticipantTitle */)}
function TileOverlay({participant, isActiveStream, channel, hasLeftSafeArea, hasRightSafeArea, hasBottomSafeArea, hasTopSafeArea}) { // fn#83376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:3640, offset: 0x01f17de0, size: 602 bytes, params: 2, frame: 32
const styles = useStyles();
const {bottom, left, top, right} = (UseSafeAreaInsetsNative)();
const binding = env0_3;
const useContext = binding.useContext;
const RevealContext = (RevealProviderModule).RevealContext;
const reveal = Reflect.apply(useContext, binding, [RevealContext]).reveal;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var r2;
var moduleValue = require(dependencyMap[28]);
var withTiming = moduleValue.withTiming;
r2 = reveal ? 1 : 0;
var object2 = {};
object2.easing = require(dependencyMap[25]).STANDARD_EASING;
object2.duration = 250;
return {opacity: Reflect.apply(withTiming, moduleValue, [r2, object2])};
};
let object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.reveal = reveal;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object.STANDARD_EASING = STANDARD_EASING;
closure.__closure = object;
closure.__workletHash = 15640123774063;
closure.__initData = env0_18;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
object = {bottom: hasBottomSafeArea ? bottom : 0, right: hasRightSafeArea ? right : 0,
left: hasLeftSafeArea ? left : 0, top: hasTopSafeArea ? top : 0};
const View2 = (ReanimatedRexport).View;
return (
<View2 pointerEvents="none" style={[StyleSheet.absoluteFill, object, value3]}>
{isActiveStream && <View style={styles.liveContainer}>{((LiveTag) => <LiveTag />)((require(1305) /* metro dependency 1305: native */).LiveTag)}</View>}
<View style={styles.usernamePosition}>
<View style={styles.usernameContainer}>
<ParticipantIcon participant={participant} />
{((Component) => <Component channel={channel} participant={participant} />)(importDefault(10892) /* metro dependency 10892: ParticipantTitle */)}
</View>
</View>
</View>
</View2>
);
}
</View2>
);
}
function _fun83369() { // fn#83369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1370, offset: 0x01f17bcf, size: 140 bytes, params: 1, frame: 19
const object2 = {};
const value = environment.__proto__;
const isStreamParticipant2 = isStreamParticipant(participant);
const value3 = null;
object2.stream = isStreamParticipant2 ? ApplicationStreamingStore.getStreamForUser(participant.user.id,
participant.stream.guildId) : value3;
object2.activeStream = isStreamParticipant(participant) ? ApplicationStreamingStore.getActiveStreamForUser(participant.user.id,
participant.stream.guildId) : value3;
return object2;
}
function _fun83370() { // fn#83370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1565, offset: 0x01f17c5b, size: 68 bytes, params: 1, frame: 14
let value = environment.__proto__;
resetFocus();
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.selectParticipant(channel.id, participant.id);
}
function _fun83371({user}) { // fn#83371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1644, offset: 0x01f17c9f, size: 83 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: user.id,
channelId: channel.id, isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
}
function _fun83372() { // fn#83372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11070:1762, offset: 0x01f17cf2, size: 54 bytes, params: 1, frame: 5
const hasBottomSafeAreaBinding = hasBottomSafeArea;
const value2 = 8;
return {bottom: hasBottomSafeAreaBinding ? value2 + bottom : value2,
right: hasRightSafeArea ? value2 + right : value2};
}
global.__d(_fun83366, 10884, [31, 27, 4492, 1878, 7715, 4299, 33, 4501, 4000, 697, 6771, 1585, 566, 7712, 8743,
10670, 10851, 10693, 10700, 10885, 10889, 10890, 9416, 9437, 10891, 1305, 7723, 4017, 4504, 10892,
2]) /* metro module 10884, dependencies: [31, 27, 4492, 1878, 7715, 4299, 33, 4501, 4000, 697, 6771, 1585, 566, 7712, 8743, 10670, 10851, 10693, 10700, 10885, 10889, 10890, 9416, 9437, 10891, 1305, 7723, 4017, 4504, 10892, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,386 +1,456 @@
/* Metro module 10790; source: modules/video_calls/native/components/ChannelCallActionBar.tsx; dependencies: [31, 27, 1378, 4606, 4295, 4492, 1226, 4259, 7730, 4299, 33, 4501, 7740, 10600, 566, 9234, 4809, 10791, 9228, 10661, 7741, 1244, 10793, 10794, 7721, 10810, 10811, 7712, 8913, 4285, 8092, 10812, 6861, 9438, 6771, 6789, 7856, 10813, 10833, 10840, 2] */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import MediaEngineStore from '../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import GameConsoleStore from '../../../game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import ApplicationStreamingStore from '../../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseIsRemote from '../../../game_console/hooks/useIsRemote.tsx'; /* Metro dependency 6861 */
import ChannelRTCActionCreators from '../../../../actions/ChannelRTCActionCreators.tsx'; /* Metro dependency 7712 */
import ChannelCallLifecycleStore from '../ChannelCallLifecycleStore.tsx'; /* Metro dependency 7730 */
import UseChannelVideoLimit from '../../useChannelVideoLimit.tsx'; /* Metro dependency 9234 */
import UseIsVideoMode from '../useIsVideoMode.tsx'; /* Metro dependency 9438 */
import UseHasVideoPermission from '../../useHasVideoPermission.tsx'; /* Metro dependency 10600 */
import Module10793 from '../../../../by-id/module-10793.js'; /* Metro dependency 10793 */
import UseScreenshareUtils from '../useScreenshareUtils.tsx'; /* Metro dependency 10794 */
import Module10810 from '../../../../by-id/module-10810.js'; /* Metro dependency 10810 */
import Module10812 from '../../../../by-id/module-10812.js'; /* Metro dependency 10812 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as StreamKeyUtilsModule from '../../../go_live/utils/StreamKeyUtils.tsx'; /* Metro dependency 4285 */
import * as CallConstantsModule from '../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as StageMediaHooksModule from '../../../stage_channels/StageMediaHooks.tsx'; /* Metro dependency 4809 */
import * as UseAnalyticsLocationsModule from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as VoiceChatHooksModule from '../../../voice_chat/VoiceChatHooks.tsx'; /* Metro dependency 7721 */
import * as UseActionBarHeightModule from '../useActionBarHeight.tsx'; /* Metro dependency 7740 */
import * as CallBarActionModule from './CallBarAction.tsx'; /* Metro dependency 7741 */
import * as UseIsFiveButtonLayoutModule from '../useIsFiveButtonLayout.tsx'; /* Metro dependency 7856 */
import * as CallsUtilsModule from '../../../voice_calls/native/CallsUtils.tsx'; /* Metro dependency 9228 */
import * as CameraLottieModule from '../../../../design/components/LottieIcon/native/generated/CameraLottie.tsx'; /* Metro dependency 10791 */
function _fun82873(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:6, offset: 0x01f04847, size: 782 bytes, params: 8, frame: 31
var object2;
const env0_0 = require;
const closure = useActionBarSecondButtons;
const closure2 = useActionBarSecondButton;
const closure3 = useActionBarPrimaryButtons;
const closure4 = useActionBarPrimaryButton;
const useActionBarSecondButtons2 = useActionBarSecondButtons;
const useActionBarSecondButton2 = useActionBarSecondButton;
const useActionBarPrimaryButtons2 = useActionBarPrimaryButtons;
const useActionBarPrimaryButton2 = useActionBarPrimaryButton;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
const env0_13 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_14 = value.jsx;
const env0_15 = value.Fragment;
const env0_16 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const CALL_ACTION_BAR_HEIGHT = (require(7740) /* metro dependency 7740: useActionBarHeight */).CALL_ACTION_BAR_HEIGHT;
object2.container = {'height': null, 'justifyContent': 'center', 'alignItems': 'center', 'flexDirection': 'row',
object = {};
const CALL_ACTION_BAR_HEIGHT = (UseActionBarHeightModule).CALL_ACTION_BAR_HEIGHT;
object.container = {'height': null, 'justifyContent': 'center', 'alignItems': 'center', 'flexDirection': 'row',
height: CALL_ACTION_BAR_HEIGHT};
const object5 = {'height': null, 'paddingHorizontal': 16, 'paddingTop': null, 'paddingBottom': null,
const object3 = {'height': null, 'paddingHorizontal': 16, 'paddingTop': null, 'paddingBottom': null,
'justifyContent': 'center', 'flexDirection': 'row'};
const FIVE_BUTTON_LAYOUT_ACTION_BAR_HEIGHT = (require(7740) /* metro dependency 7740: useActionBarHeight */).FIVE_BUTTON_LAYOUT_ACTION_BAR_HEIGHT;
object5.height = FIVE_BUTTON_LAYOUT_ACTION_BAR_HEIGHT;
const FIVE_BUTTON_CONTAINER_PADDING_TOP = (require(7740) /* metro dependency 7740: useActionBarHeight */).FIVE_BUTTON_CONTAINER_PADDING_TOP;
object5.paddingTop = FIVE_BUTTON_CONTAINER_PADDING_TOP;
const FIVE_BUTTON_CONTAINER_PADDING_BOTTOM = (require(7740) /* metro dependency 7740: useActionBarHeight */).FIVE_BUTTON_CONTAINER_PADDING_BOTTOM;
object5.paddingBottom = FIVE_BUTTON_CONTAINER_PADDING_BOTTOM;
object2.containerForFiveButtonLayout = object5;
const env0_17 = Reflect.apply(createStyles, value, [object2]);
const closure5 = VideoButton;
const closure6 = ScreenshareButton;
const closure7 = AudioRouteButton;
const closure8 = DisconnectCallButton;
const closure9 = DisconnectStreamButton;
object2 = {NONE: 0};
object2[0] = 'NONE';
object2.SCREEN_SHARE_START = 1;
object2[1] = 'SCREEN_SHARE_START';
object2.SCREEN_SHARE_END = 2;
object2[2] = 'SCREEN_SHARE_END';
object2.AUDIO_ROUTE = 3;
object2[3] = 'AUDIO_ROUTE';
const object6 = {END_STREAM: 0};
object6[0] = 'END_STREAM';
object6.END_ACTIVITY = 1;
object6[1] = 'END_ACTIVITY';
object6.END_CALL = 2;
object6[2] = 'END_CALL';
object6.END_REMOTE = 3;
object6[3] = 'END_REMOTE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallActionBar.tsx');
const FIVE_BUTTON_LAYOUT_ACTION_BAR_HEIGHT = (UseActionBarHeightModule).FIVE_BUTTON_LAYOUT_ACTION_BAR_HEIGHT;
object3.height = FIVE_BUTTON_LAYOUT_ACTION_BAR_HEIGHT;
const FIVE_BUTTON_CONTAINER_PADDING_TOP = (UseActionBarHeightModule).FIVE_BUTTON_CONTAINER_PADDING_TOP;
object3.paddingTop = FIVE_BUTTON_CONTAINER_PADDING_TOP;
const FIVE_BUTTON_CONTAINER_PADDING_BOTTOM = (UseActionBarHeightModule).FIVE_BUTTON_CONTAINER_PADDING_BOTTOM;
object3.paddingBottom = FIVE_BUTTON_CONTAINER_PADDING_BOTTOM;
object.containerForFiveButtonLayout = object3;
const env0_17 = Reflect.apply(createStyles, value, [object]);
const VideoButton2 = VideoButton;
const ScreenshareButton2 = ScreenshareButton;
const AudioRouteButton2 = AudioRouteButton;
const DisconnectCallButton2 = DisconnectCallButton;
const DisconnectStreamButton2 = DisconnectStreamButton;
object = {NONE: 0};
object[0] = 'NONE';
object.SCREEN_SHARE_START = 1;
object[1] = 'SCREEN_SHARE_START';
object.SCREEN_SHARE_END = 2;
object[2] = 'SCREEN_SHARE_END';
object.AUDIO_ROUTE = 3;
object[3] = 'AUDIO_ROUTE';
const object4 = {END_STREAM: 0};
object4[0] = 'END_STREAM';
object4.END_ACTIVITY = 1;
object4[1] = 'END_ACTIVITY';
object4.END_CALL = 2;
object4[2] = 'END_CALL';
object4.END_REMOTE = 3;
object4[3] = 'END_REMOTE';
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelCallActionBar.tsx');
exports.default = _default_82901;
exports.VideoButton = closure5;
exports.ScreenshareButton = closure6;
exports.AudioRouteButton = closure7;
exports.DisconnectCallButton = closure8;
exports.DisconnectStreamButton = closure9;
exports.ActionBarSecondButton = object2;
exports.useActionBarSecondButtons = closure;
exports.useActionBarSecondButton = closure2;
exports.ActionBarPrimaryButton = object6;
exports.useActionBarPrimaryButtons = closure3;
exports.useActionBarPrimaryButton = closure4;
}
exports.VideoButton = VideoButton2;
exports.ScreenshareButton = ScreenshareButton2;
exports.AudioRouteButton = AudioRouteButton2;
exports.DisconnectCallButton = DisconnectCallButton2;
exports.DisconnectStreamButton = DisconnectStreamButton2;
exports.ActionBarSecondButton = object;
exports.useActionBarSecondButtons = useActionBarSecondButtons2;
exports.useActionBarSecondButton = useActionBarSecondButton2;
exports.ActionBarPrimaryButton = object4;
exports.useActionBarPrimaryButtons = useActionBarPrimaryButtons2;
exports.useActionBarPrimaryButton = useActionBarPrimaryButton2;
function useActionBarSecondButtons({channel}) { // fn#82874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:3356, offset: 0x01f04b55, size: 183 bytes, params: 2, frame: 16
const value2 = (VoiceChatHooksModule).useIsConnectedToVoiceChannel(channel);
const isActive = (UseScreenshareUtils)(channel).isActive;
const value3 = (UseIsRemote)();
const AUDIO_ROUTE = env0_24.AUDIO_ROUTE;
const NONE = env0_24.NONE;
const SCREEN_SHARE_END = env0_24.SCREEN_SHARE_END;
const SCREEN_SHARE_START = env0_24.SCREEN_SHARE_START;
return {[AUDIO_ROUTE]: value2 && !value3, [NONE]: true, [SCREEN_SHARE_END]: value2 && !value3 && isActive,
[SCREEN_SHARE_START]: value2 && !value3};
}
function useActionBarSecondButtons({channel}) { // fn#82874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:3356, offset: 0x01f04b55, size: 183 bytes, params: 2, frame: 16
const value2 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
const isActive = (importDefault(10794) /* metro dependency 10794: useScreenshareUtils */)(channel).isActive;
const value3 = (importDefault(6861) /* metro dependency 6861: useIsRemote */)();
const AUDIO_ROUTE = env0_24.AUDIO_ROUTE;
const NONE = env0_24.NONE;
const SCREEN_SHARE_END = env0_24.SCREEN_SHARE_END;
const SCREEN_SHARE_START = env0_24.SCREEN_SHARE_START;
return {[AUDIO_ROUTE]: value2 && !value3, [NONE]: true, [SCREEN_SHARE_END]: value2 && !value3 && isActive,
[SCREEN_SHARE_START]: value2 && !value3};
}
function useActionBarSecondButton({channel}) { // fn#82875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:3588, offset: 0x01f04c0c, size: 176 bytes, params: 2, frame: 15
const value2 = useActionBarSecondButtons({channel: channel});
const value3 = (UseIsVideoMode)();
const SCREEN_SHARE_END = env0_24.SCREEN_SHARE_END;
const property = value2[SCREEN_SHARE_END];
const binding = env0_24;
return property ? binding.SCREEN_SHARE_END : value2[binding.AUDIO_ROUTE] && channel.isPrivate() ? env0_24.AUDIO_ROUTE : value2[env0_24.AUDIO_ROUTE] ? value3 ? value2[env0_24.SCREEN_SHARE_START] ? env0_24.SCREEN_SHARE_START : env0_24.NONE : env0_24.AUDIO_ROUTE : value2[env0_24.SCREEN_SHARE_START] ? env0_24.SCREEN_SHARE_START : env0_24.NONE;
}
function useActionBarSecondButton({channel}) { // fn#82875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:3588, offset: 0x01f04c0c, size: 176 bytes, params: 2, frame: 15
const value2 = useActionBarSecondButtons({channel: channel});
const value3 = (importDefault(9438) /* metro dependency 9438: useIsVideoMode */)();
const SCREEN_SHARE_END = env0_24.SCREEN_SHARE_END;
const property = value2[SCREEN_SHARE_END];
const binding = env0_24;
return property ? binding.SCREEN_SHARE_END : value2[binding.AUDIO_ROUTE] && channel.isPrivate() ? env0_24.AUDIO_ROUTE : value2[env0_24.AUDIO_ROUTE] ? value3 ? value2[env0_24.SCREEN_SHARE_START] ? env0_24.SCREEN_SHARE_START : env0_24.NONE : env0_24.AUDIO_ROUTE : value2[env0_24.SCREEN_SHARE_START] ? env0_24.SCREEN_SHARE_START : env0_24.NONE;
}
function useActionBarPrimaryButtons({channel}) { // fn#82876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4017, offset: 0x01f04cbc, size: 313 bytes, params: 2, frame: 21
const value2 = (VoiceChatHooksModule).useIsConnectedToVoiceChannel(channel);
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
AuthenticationStore], _fun82877);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore],
_fun82878);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun82879);
const {awaitingRemote,
remoteSessionId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GameConsoleStore],
function() {
var object = {};
object.awaitingRemote = GameConsoleStore.getAwaitingRemoteSessionInfo() != null;
object.remoteSessionId = GameConsoleStore.getRemoteSessionId();
return object;
});
const END_ACTIVITY = env0_25.END_ACTIVITY;
const END_CALL = env0_25.END_CALL;
const END_REMOTE = env0_25.END_REMOTE;
const END_STREAM = env0_25.END_STREAM;
return {[END_ACTIVITY]: value4, [END_CALL]: value2, [END_REMOTE]: awaitingRemote || remoteSessionId != null,
[END_STREAM]: value3 != null};
function _fun82877() { // fn#82877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4150, offset: 0x01f04df5, size: 104 bytes, params: 1, frame: 13
const value = environment.__proto__;
const selectedParticipant = ChannelRTCStore.getSelectedParticipant(channel.id);
const value4 = null;
return value4 == selectedParticipant || selectedParticipant.type === ParticipantTypes.ACTIVITY ? value4 == selectedParticipant ? undefined : selectedParticipant.id : selectedParticipant.user.id === AuthenticationStore.getId() ? value4 : value4 == selectedParticipant ? undefined : selectedParticipant.id;
}
function useActionBarPrimaryButtons({channel}) { // fn#82876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4017, offset: 0x01f04cbc, size: 313 bytes, params: 2, frame: 21
const value2 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
AuthenticationStore], _fun82877);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore],
_fun82878);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmbeddedActivitiesStore],
_fun82879);
const {awaitingRemote,
remoteSessionId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GameConsoleStore],
function() {
var object = {};
object.awaitingRemote = GameConsoleStore.getAwaitingRemoteSessionInfo() != null;
object.remoteSessionId = GameConsoleStore.getRemoteSessionId();
return object;
});
const END_ACTIVITY = env0_25.END_ACTIVITY;
const END_CALL = env0_25.END_CALL;
const END_REMOTE = env0_25.END_REMOTE;
const END_STREAM = env0_25.END_STREAM;
return {[END_ACTIVITY]: value4, [END_CALL]: value2, [END_REMOTE]: awaitingRemote || remoteSessionId != null,
[END_STREAM]: value3 != null};
}
function _fun82878() { // fn#82878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4314, offset: 0x01f04e5d, size: 40 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_1 ? ApplicationStreamingStore.getActiveStreamForStreamKey(env0_1) : value2;
}
function useActionBarPrimaryButton({channel}) { // fn#82881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4718, offset: 0x01f04ed1, size: 115 bytes, params: 2, frame: 13
const value2 = useActionBarPrimaryButtons({channel: channel});
const END_STREAM = env0_25.END_STREAM;
const property = value2[END_STREAM];
const binding = env0_25;
return property ? binding.END_STREAM : value2[binding.END_REMOTE] ? env0_25.END_REMOTE : value2[env0_25.END_ACTIVITY] ? env0_25.END_ACTIVITY : env0_25.END_CALL;
}
function _fun82879() { // fn#82879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4401, offset: 0x01f04e85, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return EmbeddedActivitiesStore.getCurrentEmbeddedActivity() != null;
}
function VideoButton({channel, isSmallSize}) { // fn#82882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:676, offset: 0x01f04f44, size: 465 bytes, params: 2, frame: 25
const value2 = (importDefault(10600) /* metro dependency 10600: useHasVideoPermission */)(channel);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelCallLifecycleStore],
function() {
return ChannelCallLifecycleStore.isReactingToThermalState();
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
return MediaEngineStore.isVideoEnabled();
});
const reachedLimit = (importDefault(9234) /* metro dependency 9234: useChannelVideoLimit */)(channel).reachedLimit;
const value5 = (require(4809) /* metro dependency 4809: StageMediaHooks */).useStageHasMedia(channel.id);
const binding = env0_4;
var env0_4 = binding.useRef(null);
const value6 = binding.useMemo(_fun82885, [value4]);
const value8 = binding.useCallback(_fun82887, [channel, value2, value3, binding.useCallback(_fun82886, [])]);
const ToggledActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).ToggledActionButton;
const r9 = value2 ? !value5 && reachedLimit : !value2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HK4JIu = (require(1244) /* metro dependency 1244: indexNative */).t.HK4JIu;
return (
<ToggledActionButton
appearsDisabled={r9}
isActive={value4}
onPress={value8}
accessibilityLabel={Reflect.apply(string, intl, [HK4JIu])}
source={importDefault(10793) /* metro dependency 10793 */}
isSmallSize={isSmallSize}
lottieComponent={value6}
/>
);
}
}
function ScreenshareButton({channel, isSmallSize}) { // fn#82889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1460, offset: 0x01f05258, size: 202 bytes, params: 2, frame: 20
const {isActive, onPress, imgSource,
isFeatureEnabled} = (importDefault(10794) /* metro dependency 10794: useScreenshareUtils */)(channel);
const r5 = isFeatureEnabled ? onPress : function() {
};
const ToggledActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).ToggledActionButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const XF1nZz = (require(1244) /* metro dependency 1244: indexNative */).t.XF1nZz;
return (
<ToggledActionButton
appearsDisabled={!isFeatureEnabled}
source={imgSource}
isActive={isActive}
accessibilityLabel={Reflect.apply(string, intl, [XF1nZz])}
onPress={r5}
isSmallSize={isSmallSize}
/>
);
}
function useActionBarPrimaryButton({channel}) { // fn#82881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4718, offset: 0x01f04ed1, size: 115 bytes, params: 2, frame: 13
const value2 = useActionBarPrimaryButtons({channel: channel});
const END_STREAM = env0_25.END_STREAM;
const property = value2[END_STREAM];
const binding = env0_25;
return property ? binding.END_STREAM : value2[binding.END_REMOTE] ? env0_25.END_REMOTE : value2[env0_25.END_ACTIVITY] ? env0_25.END_ACTIVITY : env0_25.END_CALL;
}
function AudioRouteButton({channel, isSmallSize}) { // fn#82891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1762, offset: 0x01f05322, size: 216 bytes, params: 2, frame: 20
const value2 = (require(9228) /* metro dependency 9228: CallsUtils */).useMaskedSpeakerStates();
const isAudioRouteEnabled = value2.isAudioRouteEnabled;
const env0_1 = value2.toggleAudio;
const routeSource = value2.routeSource;
const env0_2 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
const ToggledActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).ToggledActionButton;
const object2 = {isActive: isAudioRouteEnabled, source: routeSource, onPress: onPress_82892};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['A/Ly/2']);
object2.isSmallSize = isSmallSize;
return <ToggledActionButton {...object2} />;
}
function VideoButton({channel, isSmallSize}) { // fn#82882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:676, offset: 0x01f04f44, size: 465 bytes, params: 2, frame: 25
const value2 = (UseHasVideoPermission)(channel);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelCallLifecycleStore],
function() {
return ChannelCallLifecycleStore.isReactingToThermalState();
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], function() {
return MediaEngineStore.isVideoEnabled();
});
const reachedLimit = (UseChannelVideoLimit)(channel).reachedLimit;
const value5 = (StageMediaHooksModule).useStageHasMedia(channel.id);
const binding = env0_4;
var env0_4 = binding.useRef(null);
const value6 = binding.useMemo(_fun82885, [value4]);
const value8 = binding.useCallback(_fun82887, [channel, value2, value3, binding.useCallback(_fun82886, [])]);
const ToggledActionButton = (CallBarActionModule).ToggledActionButton;
const r9 = value2 ? !value5 && reachedLimit : !value2;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const HK4JIu = (IndexNativeModule).t.HK4JIu;
return (
<ToggledActionButton
appearsDisabled={r9}
isActive={value4}
onPress={value8}
accessibilityLabel={Reflect.apply(string, intl, [HK4JIu])}
source={Module10793}
isSmallSize={isSmallSize}
lottieComponent={value6}
/>
);
function _fun82885() { // fn#82885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:945, offset: 0x01f05128, size: 76 bytes, params: 1, frame: 15
const value = environment.__proto__;
const CameraLottie = (CameraLottieModule).CameraLottie;
return <CameraLottie ref={env0_4} animation={env0_3 ? 'mute' : 'unmute'} />;
}
function DisconnectCallButton({channel, isSmallSize}) { // fn#82893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2114, offset: 0x01f05418, size: 156 bytes, params: 2, frame: 20
const PrimaryActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).PrimaryActionButton;
const primaryActionButtonProps = {source: importDefault(10810) /* metro dependency 10810 */};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
primaryActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6vrfgt']);
primaryActionButtonProps.isSmallSize = isSmallSize;
primaryActionButtonProps.onPress = onPress_82894;
return <PrimaryActionButton {...primaryActionButtonProps} />;
}
function _fun82886(a0) { // fn#82886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1033, offset: 0x01f05174, size: 88 bytes, params: 2, frame: 14
var r1;
var r2;
var current;
let value = environment.__proto__;
value = undefined;
(CallsUtilsModule).handleToggleVideo(a0);
const value3 = env0_4 == null;
if (value3) {
r1 = value3;
r2 = value;
} else {
current = env0_4.current;
r1 = current == null;
r2 = current;
}
if (!r1) {
r2.play();
}
return value;
}
function DisconnectStreamButton({channel, isSmallSize}) { // fn#82895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2335, offset: 0x01f054e1, size: 273 bytes, params: 2, frame: 21
var r0;
var PrimaryActionButton;
var intl;
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
AuthenticationStore], _fun82896);
if ((require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore],
_fun82897) == null) {
r0 = null;
} else {
PrimaryActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).PrimaryActionButton;
var primaryActionButtonProps = {source: importDefault(10811) /* metro dependency 10811 */};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
primaryActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q3O3J8);
function _fun82887() { // fn#82887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1135, offset: 0x01f051cc, size: 120 bytes, params: 1, frame: 12
var environment;
var value;
if (env0_1) {
if (env0_2) {
value = environment.__proto__;
value = require(10661) /* metro dependency 10661: openIgnoreThermalStateAlert */;
value.openIgnoreThermalStateAlert(_fun82888);
} else {
(0, ReactNativeModule.View)(channel);
}
} else {
value = environment.__proto__;
value = require(9228) /* metro dependency 9228: CallsUtils */;
value.showCameraDisabledAlert();
}
function _fun82888() { // fn#82888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1182, offset: 0x01f05244, size: 20 bytes, params: 1, frame: 11
return env1_5(channel);
}
}
}
function ScreenshareButton({channel, isSmallSize}) { // fn#82889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1460, offset: 0x01f05258, size: 202 bytes, params: 2, frame: 20
const {isActive, onPress, imgSource,
isFeatureEnabled} = (UseScreenshareUtils)(channel);
const r5 = isFeatureEnabled ? onPress : function() {
};
const ToggledActionButton = (CallBarActionModule).ToggledActionButton;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const XF1nZz = (IndexNativeModule).t.XF1nZz;
return (
<ToggledActionButton
appearsDisabled={!isFeatureEnabled}
source={imgSource}
isActive={isActive}
accessibilityLabel={Reflect.apply(string, intl, [XF1nZz])}
onPress={r5}
isSmallSize={isSmallSize}
/>
);
}
function AudioRouteButton({channel, isSmallSize}) { // fn#82891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1762, offset: 0x01f05322, size: 216 bytes, params: 2, frame: 20
const value2 = (CallsUtilsModule).useMaskedSpeakerStates();
const isAudioRouteEnabled = value2.isAudioRouteEnabled;
const env0_1 = value2.toggleAudio;
const routeSource = value2.routeSource;
const env0_2 = (VoiceChatHooksModule).useIsConnectedToVoiceChannel(channel);
const ToggledActionButton = (CallBarActionModule).ToggledActionButton;
const object = {isActive: isAudioRouteEnabled, source: routeSource, onPress: onPress_82892};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['A/Ly/2']);
object.isSmallSize = isSmallSize;
return <ToggledActionButton {...object} />;
function AudioRouteButtonOnPress() { // fn#82892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1998, owner: AudioRouteButton.onPress, offset: 0x01f053fa, size: 30 bytes, params: 1, frame: 13
toggleAudio(channel.id, env0_2);
}
}
function DisconnectCallButton({channel, isSmallSize}) { // fn#82893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2114, offset: 0x01f05418, size: 156 bytes, params: 2, frame: 20
const PrimaryActionButton = (CallBarActionModule).PrimaryActionButton;
const primaryActionButtonProps = {source: Module10810};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
primaryActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6vrfgt']);
primaryActionButtonProps.isSmallSize = isSmallSize;
primaryActionButtonProps.onPress = onPress_82898;
r0 = <PrimaryActionButton {...primaryActionButtonProps} />;
}
return r0;
}
function LeaveActivityButton({isSmallSize}) { // fn#82899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2887, offset: 0x01f0565d, size: 147 bytes, params: 2, frame: 20
const PrimaryActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).PrimaryActionButton;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<PrimaryActionButton
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.k0Aph0)}
onPress={onPress_82900}
source={importDefault(10812) /* metro dependency 10812 */}
isSmallSize={isSmallSize}
/>
);
}
function _default_82901({channel, shouldShowConnectingScreen}) { // fn#82901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4934, offset: 0x01f0574c, size: 709 bytes, params: 2, frame: 29
var r13;
var r6;
var jsxRuntimeEnv0_15Binding;
var value6;
var items2;
shouldShowConnectingScreen = !(shouldShowConnectingScreen === undefined) && shouldShowConnectingScreen;
const styles = useStyles();
const value2 = (importDefault(6861) /* metro dependency 6861: useIsRemote */)();
const value3 = useActionBarSecondButton({channel: channel});
const value4 = useActionBarPrimaryButton({channel: channel});
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const CHANNEL_CALL_ACTION_BAR = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).CHANNEL_CALL_ACTION_BAR;
const analyticsLocations = defaultImport(CHANNEL_CALL_ACTION_BAR).analyticsLocations;
const value5 = (require(7856) /* metro dependency 7856: useIsFiveButtonLayout */).useIsFiveButtonLayout(channel.id);
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const r8 = value5 ? styles.containerForFiveButtonLayout : styles.container;
if (shouldShowConnectingScreen) {
const CallConnectingActionBar = (require(10813) /* metro dependency 10813: ChannelCallConnectingScreen */).CallConnectingActionBar;
r6 = <CallConnectingActionBar channel={channel} />;
} else {
jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
value6 = null;
r13 = value2 ? value6 : <VideoButton channel={channel} isSmallSize={value5} />;
items2 = [r13];
if (env0_24.AUDIO_ROUTE === value3) {
r13 = <AudioRouteButton isSmallSize={value5} channel={channel} />;
} else if (env0_24.SCREEN_SHARE_START === value3) {
r13 = <ScreenshareButton channel={channel} isSmallSize={value5} />;
} else if (env0_24.SCREEN_SHARE_END === value3) {
r13 = <ScreenshareButton channel={channel} isSmallSize={value5} />;
} else {
env0_24.NONE;
r13 = value6;
primaryActionButtonProps.onPress = onPress_82894;
return <PrimaryActionButton {...primaryActionButtonProps} />;
function DisconnectCallButtonOnPress() { // fn#82894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2275, owner: DisconnectCallButton.onPress, offset: 0x01f054b4, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(9228) /* metro dependency 9228: CallsUtils */;
value.handleDisconnect(channel);
}
items2[1] = r13;
items2[2] = ((ChannelCallMicButton) => <ChannelCallMicButton channel={channel} isSmallSize={value5} />)((require(10833) /* metro dependency 10833: ChannelCallMicButton */).ChannelCallMicButton);
items2[3] = env0_25.END_REMOTE === value4 ? ((DisconnectRemoteButton) => <DisconnectRemoteButton channel={channel} isSmallSize={value5} />)((require(10840) /* metro dependency 10840: DisconnectRemoteButton */).DisconnectRemoteButton) : env0_25.END_STREAM === value4 ? <DisconnectStreamButton channel={channel} isSmallSize={value5} /> : env0_25.END_ACTIVITY === value4 ? <LeaveActivityButton isSmallSize={value5} /> : env0_25.END_CALL !== value4 ? value6 : <DisconnectCallButton channel={channel} isSmallSize={value5} />;
r6 = <>{items2}</>;
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View pointerEvents="box-none" style={r8}>
{r6}
</View>
</AnalyticsLocationProvider>
);
}
function _fun82877() { // fn#82877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4150, offset: 0x01f04df5, size: 104 bytes, params: 1, frame: 13
const value = environment.__proto__;
const selectedParticipant = ChannelRTCStore.getSelectedParticipant(channel.id);
const value4 = null;
return value4 == selectedParticipant || selectedParticipant.type === ParticipantTypes.ACTIVITY ? value4 == selectedParticipant ? undefined : selectedParticipant.id : selectedParticipant.user.id === AuthenticationStore.getId() ? value4 : value4 == selectedParticipant ? undefined : selectedParticipant.id;
}
function _fun82878() { // fn#82878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4314, offset: 0x01f04e5d, size: 40 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_1 ? ApplicationStreamingStore.getActiveStreamForStreamKey(env0_1) : value2;
}
function _fun82879() { // fn#82879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4401, offset: 0x01f04e85, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return EmbeddedActivitiesStore.getCurrentEmbeddedActivity() != null;
}
function _fun82885() { // fn#82885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:945, offset: 0x01f05128, size: 76 bytes, params: 1, frame: 15
const value = environment.__proto__;
const CameraLottie = (require(10791) /* metro dependency 10791: CameraLottie */).CameraLottie;
return <CameraLottie ref={env0_4} animation={env0_3 ? 'mute' : 'unmute'} />;
}
function _fun82886(a0) { // fn#82886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1033, offset: 0x01f05174, size: 88 bytes, params: 2, frame: 14
var r1;
var r2;
var current;
let value = environment.__proto__;
value = undefined;
(require(9228) /* metro dependency 9228: CallsUtils */).handleToggleVideo(a0);
const value3 = env0_4 == null;
if (value3) {
r1 = value3;
r2 = value;
} else {
current = env0_4.current;
r1 = current == null;
r2 = current;
}
if (!r1) {
r2.play();
}
return value;
}
function _fun82887() { // fn#82887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1135, offset: 0x01f051cc, size: 120 bytes, params: 1, frame: 12
var environment;
var value;
if (env0_1) {
if (env0_2) {
value = environment.__proto__;
value = require(10661) /* metro dependency 10661: openIgnoreThermalStateAlert */;
value.openIgnoreThermalStateAlert(_fun82888);
function DisconnectStreamButton({channel, isSmallSize}) { // fn#82895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2335, offset: 0x01f054e1, size: 273 bytes, params: 2, frame: 21
var r0;
var PrimaryActionButton;
var intl;
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
AuthenticationStore], _fun82896);
if ((require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore],
_fun82897) == null) {
r0 = null;
} else {
env0_5(channel);
PrimaryActionButton = (importAll(7741) /* metro dependency 7741: CallBarAction */).PrimaryActionButton;
var primaryActionButtonProps = {source: importDefault(10811) /* metro dependency 10811 */};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
primaryActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q3O3J8);
primaryActionButtonProps.isSmallSize = isSmallSize;
primaryActionButtonProps.onPress = onPress_82898;
r0 = <PrimaryActionButton {...primaryActionButtonProps} />;
}
} else {
value = environment.__proto__;
value = require(9228) /* metro dependency 9228: CallsUtils */;
value.showCameraDisabledAlert();
return r0;
function _fun82896() { // fn#82896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2406, offset: 0x01f04df5, size: 104 bytes, params: 1, frame: 13
const value = environment.__proto__;
const selectedParticipant = ChannelRTCStore.getSelectedParticipant(channel.id);
const value4 = null;
return value4 == selectedParticipant || selectedParticipant.type === ParticipantTypes.ACTIVITY ? value4 == selectedParticipant ? undefined : selectedParticipant.id : selectedParticipant.user.id === AuthenticationStore.getId() ? value4 : value4 == selectedParticipant ? undefined : selectedParticipant.id;
}
function _fun82897() { // fn#82897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2570, offset: 0x01f04e5d, size: 40 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_1 ? ApplicationStreamingStore.getActiveStreamForStreamKey(env0_1) : value2;
}
function DisconnectStreamButtonOnPress() { // fn#82898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2771, owner: DisconnectStreamButton.onPress, offset: 0x01f055f2, size: 107 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = ChannelRTCActionCreators;
defaultImport.selectParticipant(channel.id, null);
value = require(8913) /* metro dependency 8913: StreamActionCreators */;
const stopStream = value.stopStream;
Reflect.apply(stopStream, value, [StreamKeyUtilsModule.encodeStreamKey(env0_2)]);
}
}
function LeaveActivityButton({isSmallSize}) { // fn#82899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2887, offset: 0x01f0565d, size: 147 bytes, params: 2, frame: 20
const PrimaryActionButton = (CallBarActionModule).PrimaryActionButton;
const intl = (IndexNativeModule).intl;
return (
<PrimaryActionButton
accessibilityLabel={intl.string((IndexNativeModule).t.k0Aph0)}
onPress={onPress_82900}
source={Module10812}
isSmallSize={isSmallSize}
/>
);
function LeaveActivityButtonOnPress() { // fn#82900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:3005, owner: LeaveActivityButton.onPress, offset: 0x01f056f0, size: 92 bytes, params: 1, frame: 16
let value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
value = undefined;
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: currentEmbeddedActivity == null ? value : currentEmbeddedActivity.location,
applicationId: currentEmbeddedActivity == null ? value : currentEmbeddedActivity.applicationId});
return value;
}
}
function _default_82901({channel, shouldShowConnectingScreen}) { // fn#82901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:4934, offset: 0x01f0574c, size: 709 bytes, params: 2, frame: 29
var r13;
var r6;
var jsxRuntimeEnv0_15Binding;
var value6;
var items2;
shouldShowConnectingScreen = !(shouldShowConnectingScreen === undefined) && shouldShowConnectingScreen;
const styles = useStyles();
const value2 = (UseIsRemote)();
const value3 = useActionBarSecondButton({channel: channel});
const value4 = useActionBarPrimaryButton({channel: channel});
const defaultImport = UseAnalyticsLocations;
const CHANNEL_CALL_ACTION_BAR = (AnalyticsLocation).CHANNEL_CALL_ACTION_BAR;
const analyticsLocations = defaultImport(CHANNEL_CALL_ACTION_BAR).analyticsLocations;
const value5 = (UseIsFiveButtonLayoutModule).useIsFiveButtonLayout(channel.id);
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const r8 = value5 ? styles.containerForFiveButtonLayout : styles.container;
if (shouldShowConnectingScreen) {
const CallConnectingActionBar = (require(10813) /* metro dependency 10813: ChannelCallConnectingScreen */).CallConnectingActionBar;
r6 = <CallConnectingActionBar channel={channel} />;
} else {
jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
value6 = null;
r13 = (
value2
? value6
: (
<VideoButton channel={channel} isSmallSize={value5} />
)
);
items2 = [r13];
if (env0_24.AUDIO_ROUTE === value3) {
r13 = <AudioRouteButton isSmallSize={value5} channel={channel} />;
} else if (env0_24.SCREEN_SHARE_START === value3) {
r13 = <ScreenshareButton channel={channel} isSmallSize={value5} />;
} else if (env0_24.SCREEN_SHARE_END === value3) {
r13 = <ScreenshareButton channel={channel} isSmallSize={value5} />;
} else {
env0_24.NONE;
r13 = value6;
}
items2[1] = r13;
items2[2] = ((ChannelCallMicButton) => <ChannelCallMicButton channel={channel} isSmallSize={value5} />)((require(10833) /* metro dependency 10833: ChannelCallMicButton */).ChannelCallMicButton);
items2[3] = (
env0_25.END_REMOTE === value4
? ((DisconnectRemoteButton) => <DisconnectRemoteButton channel={channel} isSmallSize={value5} />)((require(10840) /* metro dependency 10840: DisconnectRemoteButton */).DisconnectRemoteButton)
: (
env0_25.END_STREAM === value4
? (
<DisconnectStreamButton channel={channel} isSmallSize={value5} />
)
: (
env0_25.END_ACTIVITY === value4
? (
<LeaveActivityButton isSmallSize={value5} />
)
: (
env0_25.END_CALL !== value4
? value6
: (
<DisconnectCallButton channel={channel} isSmallSize={value5} />
)
)
)
)
);
r6 = (
<>
{items2}
</>
);
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View pointerEvents="box-none" style={r8}>
{r6}
</View>
</AnalyticsLocationProvider>
);
}
}
function AudioRouteButtonOnPress() { // fn#82892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1998, owner: AudioRouteButton.onPress, offset: 0x01f053fa, size: 30 bytes, params: 1, frame: 13
toggleAudio(channel.id, env0_2);
}
function DisconnectCallButtonOnPress() { // fn#82894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2275, owner: DisconnectCallButton.onPress, offset: 0x01f054b4, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(9228) /* metro dependency 9228: CallsUtils */;
value.handleDisconnect(channel);
}
function DisconnectStreamButtonOnPress() { // fn#82898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:2771, owner: DisconnectStreamButton.onPress, offset: 0x01f055f2, size: 107 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
defaultImport.selectParticipant(channel.id, null);
value = require(8913) /* metro dependency 8913: StreamActionCreators */;
const stopStream = value.stopStream;
const streamKeyUtilsModule = require(4285) /* metro dependency 4285: StreamKeyUtils */;
Reflect.apply(stopStream, value, [streamKeyUtilsModule.encodeStreamKey(env0_2)]);
}
function LeaveActivityButtonOnPress() { // fn#82900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:3005, owner: LeaveActivityButton.onPress, offset: 0x01f056f0, size: 92 bytes, params: 1, frame: 16
let value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
value = undefined;
(importDefault(8092) /* metro dependency 8092: EmbeddedActivitiesNativeManager */).leaveActivity({location: currentEmbeddedActivity == null ? value : currentEmbeddedActivity.location,
applicationId: currentEmbeddedActivity == null ? value : currentEmbeddedActivity.applicationId});
return value;
}
function _fun82888() { // fn#82888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10976:1182, offset: 0x01f05244, size: 20 bytes, params: 1, frame: 11
return env1_5(channel);
}
global.__d(_fun82873, 10790, [31, 27, 1378, 4606, 4295, 4492, 1226, 4259, 7730, 4299, 33, 4501, 7740, 10600, 566,
9234, 4809, 10791, 9228, 10661, 7741, 1244, 10793, 10794, 7721, 10810, 10811, 7712, 8913, 4285, 8092, 10812,
6861, 9438, 6771, 6789, 7856, 10813, 10833, 10840,
2]) /* metro module 10790, dependencies: [31, 27, 1378, 4606, 4295, 4492, 1226, 4259, 7730, 4299, 33, 4501, 7740, 10600, 566, 9234, 4809, 10791, 9228, 10661, 7741, 1244, 10793, 10794, 7721, 10810, 10811, 7712, 8913, 4285, 8092, 10812, 6861, 9438, 6771, 6789, 7856, 10813, 10833, 10840, 2] */;
@@ -1,202 +1,227 @@
/* Metro module 10813; source: modules/video_calls/native/components/ChannelCallConnectingScreen.tsx; dependencies: [31, 27, 4295, 4259, 3784, 4296, 7715, 661, 482, 33, 4501, 7740, 4080, 6275, 6277, 10814, 4805, 10785, 9151, 10831, 10832, 1244, 8899, 4796, 4048, 10833, 9325, 566, 9324, 6952, 10838, 9421, 10839, 697, 10696, 9803, 2] */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import MediaEngineStore from '../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import GameConsoleStore from '../../../game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import SessionsStore from '../../../../stores/SessionsStore.tsx'; /* Metro dependency 4296 */
import SelectedChannelActionCreators from '../../../../actions/SelectedChannelActionCreators.tsx'; /* Metro dependency 4796 */
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import UserSettingsVoice from '../../../user_settings/voice/native/UserSettingsVoice.tsx'; /* Metro dependency 10814 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as moduleValue2 from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ConstantsModule2 from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as UseActionBarHeightModule from '../useActionBarHeight.tsx'; /* Metro dependency 7740 */
import * as UseIsVoiceChannelFullModule from '../../../voice_calls/useIsVoiceChannelFull.tsx'; /* Metro dependency 10785 */
import * as ChannelCallMicButtonModule from './ChannelCallMicButton.tsx'; /* Metro dependency 10833 */
function _fun82973(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:6, offset: 0x01f0857a, size: 453 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
const env0_9 = (require(7715) /* metro dependency 7715: ChannelCallStore */).resetFocus;
const env0_10 = (require(661) /* metro dependency 661: Constants */).InstantInviteSources;
const env0_11 = (require(482) /* metro dependency 482: Constants */).Permissions;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_12 = value.jsx;
const env0_13 = value.Fragment;
const env0_14 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const CALL_ACTION_BAR_HEIGHT = (require(7740) /* metro dependency 7740: useActionBarHeight */).CALL_ACTION_BAR_HEIGHT;
const CALL_ACTION_BAR_HEIGHT = (UseActionBarHeightModule).CALL_ACTION_BAR_HEIGHT;
const env0_15 = Reflect.apply(createStyles, value, [{spacer: {width: 8},
actionBarContainer: {'paddingHorizontal': 12, 'paddingTop': 16, 'justifyContent': 'center',
'alignItems': 'flex-start', 'flexDirection': 'row', height: CALL_ACTION_BAR_HEIGHT}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallConnectingScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelCallConnectingScreen.tsx');
exports.showVoiceSettingsActionSheet = showVoiceSettingsActionSheet;
exports.ChannelCallConnectingHeader = ChannelCallConnectingHeader;
exports.CallConnectingActionBar = CallConnectingActionBar;
}
function VoiceSettingsActionSheet() { // fn#82974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:482, offset: 0x01f0873f, size: 118 bytes, params: 1, frame: 20
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
return (
<BottomSheet scrollable>
<BottomSheetScrollView>
{((Component) => <Component />)(importDefault(10814) /* metro dependency 10814: UserSettingsVoice */)}
</BottomSheetScrollView>
</BottomSheet>
);
}
function JoinMutedButton({channel}) { // fn#82975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:634, offset: 0x01f087b5, size: 97 bytes, params: 2, frame: 16
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const ChannelCallMicButton = (require(10833) /* metro dependency 10833: ChannelCallMicButton */).ChannelCallMicButton;
return (
<ChannelCallMicButton
channel={channel}
disableTint={value2 === 'light'}
isSmallSize={false}
/>
);
}
function JoinVoiceButton({channel}) { // fn#82976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:780, offset: 0x01f08816, size: 645 bytes, params: 2, frame: 25
var object2;
const env0_1 = importDefault(dependencyMap[26])();
const value2 = require(dependencyMap[27]).useStateFromStores([GameConsoleStore], _fun82977);
const value3 = require(dependencyMap[27]).useStateFromStores([SessionsStore], _fun82978);
const value4 = importDefault(dependencyMap[28])();
const env0_3 = value4;
const value5 = importDefault(dependencyMap[29])(channel);
let r5 = value5.selfMute || value5.mute;
r5 = !r5 ? value5.suppress : r5;
const value6 = env0_3.useCallback(_fun82979, [channel, value3, value4, r5]);
const value7 = importDefault(dependencyMap[17])(channel);
const value8 = require(dependencyMap[17]).useIsVoiceChannelLocked(channel);
const LabeledActionButton = require(dependencyMap[32]).LabeledActionButton;
object2 = {};
let r8 = value7 || value8;
r8 = !r8 ? value2 : r8;
object2.disabled = r8;
const GREEN_360 = importDefault(dependencyMap[33]).unsafe_rawColors.GREEN_360;
object2.backgroundColor = GREEN_360;
const WHITE = importDefault(dependencyMap[33]).unsafe_rawColors.WHITE;
object2.imageStyle = {tintColor: WHITE};
const intl = require(dependencyMap[21]).intl;
let string = intl.string;
const t = require(dependencyMap[21]).t;
object2.accessibilityLabel = Reflect.apply(string, intl, [t['96ANUN']]);
object2.source = importDefault(r5 ? dependencyMap[34] : dependencyMap[35]);
object2.onPress = value6;
string = intl.string;
r5 = value8 ? Reflect.apply(string, intl, [t.TVBCKZ]) : value7 ? Reflect.apply(string, intl,
[t.rZfiNq]) : r5 ? Reflect.apply(string, intl, [t['Bd/Liz']]) : Reflect.apply(string, intl, [t['96ANUN']]);
object2.label = r5;
const IconPosition = require(dependencyMap[32]).IconPosition;
const RIGHT = IconPosition.RIGHT;
object2.iconPosition = RIGHT;
return <LabeledActionButton {...object2} />;
}
function showVoiceSettingsActionSheet(a0) { // fn#82980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:2218, offset: 0x01f08c24, size: 64 bytes, params: 2, frame: 16
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).openLazy(function() {
var Promise = global.Promise;
return Promise.resolve(VoiceSettingsActionSheet);
}, 'voice settings', {guildId: a0});
}
function ChannelCallConnectingHeader({channel}) { // fn#82982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:2386, offset: 0x01f08c7f, size: 367 bytes, params: 2, frame: 27
var r6;
var VoiceChatHeaderIcon;
var object;
var intl;
const styles = useStyles();
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const value3 = (require(10785) /* metro dependency 10785: useIsVoiceChannelFull */).useIsVoiceChannelLocked(channel);
const can = PermissionStore.can;
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
const r12 = Reflect.apply(can, PermissionStore, [CREATE_INSTANT_INVITE, channel]) ? value3 ? null : function() {
return require(dependencyMap[18]).showInstantInviteActionSheet(channel,
{source: InstantInviteSources.VOICE_CHANNEL});
} : null;
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const items2 = [<View style={{width: 4}} />];
if (r12 != null) {
VoiceChatHeaderIcon = importDefault(10831) /* metro dependency 10831: VoiceChatHeaderIcon */;
object = {source: importDefault(10832) /* metro dependency 10832 */, onPress: r12};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['dHHb/2'],
{channelName: value2});
r6 = <VoiceChatHeaderIcon {...object} />;
} else {
r6 = null;
function VoiceSettingsActionSheet() { // fn#82974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:482, offset: 0x01f0873f, size: 118 bytes, params: 1, frame: 20
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
return (
<BottomSheet scrollable>
<BottomSheetScrollView>
{((Component) => <Component />)(UserSettingsVoice)}
</BottomSheetScrollView>
</BottomSheet>
);
}
items2[1] = r6;
items2[2] = <View style={styles.spacer} />;
items2[3] = <View style={{width: 4}} />;
return (
<>
{items2}
</>
);
}
function CallConnectingActionBar({channel}) { // fn#82984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:2876, offset: 0x01f08e2c, size: 105 bytes, params: 2, frame: 19
const styles = useStyles();
return (
<View style={styles.actionBarContainer}>
<JoinMutedButton channel={channel} />
<JoinVoiceButton channel={channel} />
</View>
);
}
function JoinMutedButton({channel}) { // fn#82975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:634, offset: 0x01f087b5, size: 97 bytes, params: 2, frame: 16
const value2 = (UseTheme)();
const ChannelCallMicButton = (ChannelCallMicButtonModule).ChannelCallMicButton;
return (
<ChannelCallMicButton
channel={channel}
disableTint={value2 === 'light'}
isSmallSize={false}
/>
);
}
function _fun82978() { // fn#82978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:950, offset: 0x01f08a9b, size: 83 bytes, params: 1, frame: 15
let value = environment.__proto__;
const value2 = undefined;
value = SessionsStore.getSessionById((env0_1 == null ? value2 : env0_1.sessionId) ?? '');
return value == null ? value2 : value.clientInfo.os;
}
function _fun82979() { // fn#82979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:1143, offset: 0x01f08aee, size: 310 bytes, params: 1, frame: 23
var r7;
var r10;
var r9;
var NativeModules;
var KeyboardManager;
var moduleValue3;
if (env0_2 != null) {
var moduleValue = require(10838) /* metro dependency 10838: coercePlatformTypeToConsoleType */;
var value3 = moduleValue.coerceConsoleTypeToPlatformType(env0_2, env0_3);
if (value3 != null) {
moduleValue3 = require(9421) /* metro dependency 9421: beginConsoleTransfer */;
return moduleValue3.beginConsoleTransfer(channel, value3);
function JoinVoiceButton({channel}) { // fn#82976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:780, offset: 0x01f08816, size: 645 bytes, params: 2, frame: 25
const env0_1 = importDefault(dependencyMap[26])();
const value2 = require(dependencyMap[27]).useStateFromStores([GameConsoleStore], _fun82977);
const value3 = require(dependencyMap[27]).useStateFromStores([SessionsStore], _fun82978);
const value4 = importDefault(dependencyMap[28])();
const env0_3 = value4;
const value5 = importDefault(dependencyMap[29])(channel);
let r5 = value5.selfMute || value5.mute;
r5 = !r5 ? value5.suppress : r5;
const value6 = env0_3.useCallback(_fun82979, [channel, value3, value4, r5]);
const value7 = importDefault(dependencyMap[17])(channel);
const value8 = require(dependencyMap[17]).useIsVoiceChannelLocked(channel);
const LabeledActionButton = require(dependencyMap[32]).LabeledActionButton;
object = {};
let r8 = value7 || value8;
r8 = !r8 ? value2 : r8;
object.disabled = r8;
const GREEN_360 = importDefault(dependencyMap[33]).unsafe_rawColors.GREEN_360;
object.backgroundColor = GREEN_360;
const WHITE = importDefault(dependencyMap[33]).unsafe_rawColors.WHITE;
object.imageStyle = {tintColor: WHITE};
const intl = require(dependencyMap[21]).intl;
let string = intl.string;
const t = require(dependencyMap[21]).t;
object.accessibilityLabel = Reflect.apply(string, intl, [t['96ANUN']]);
object.source = importDefault(r5 ? dependencyMap[34] : dependencyMap[35]);
object.onPress = value6;
string = intl.string;
r5 = value8 ? Reflect.apply(string, intl, [t.TVBCKZ]) : value7 ? Reflect.apply(string, intl,
[t.rZfiNq]) : r5 ? Reflect.apply(string, intl, [t['Bd/Liz']]) : Reflect.apply(string, intl, [t['96ANUN']]);
object.label = r5;
const IconPosition = require(dependencyMap[32]).IconPosition;
const RIGHT = IconPosition.RIGHT;
object.iconPosition = RIGHT;
return <LabeledActionButton {...object} />;
function _fun82977() { // fn#82977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:870, offset: 0x01b4a7c0, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return GameConsoleStore.getAwaitingRemoteSessionInfo() != null;
}
}
const id = channel.id;
const binding = env0_4;
const value = environment.__proto__;
resetFocus();
const moduleValue2 = require(27) /* metro dependency 27 */;
const value4 = moduleValue2 == null;
if (value4) {
r7 = value4;
r10 = moduleValue2;
} else {
NativeModules = moduleValue2.NativeModules;
r7 = NativeModules == null;
r10 = NativeModules;
}
if (r7) {
r9 = r10;
} else {
KeyboardManager = r10.KeyboardManager;
r7 = KeyboardManager == null;
r9 = KeyboardManager;
}
r7 = !r7 ? r9.dismissGlobalKeyboard == null : r7;
if (!r7) {
r9.dismissGlobalKeyboard();
}
if (binding) {
if (!MediaEngineStore.getSettings().mute) {
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).toggleSelfMute();
function _fun82978() { // fn#82978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:950, offset: 0x01f08a9b, size: 83 bytes, params: 1, frame: 15
let value = environment.__proto__;
const sessionsStoreBinding = SessionsStore;
const value2 = undefined;
value = sessionsStoreBinding.getSessionById((env0_1 == null ? value2 : env0_1.sessionId) ?? '');
return value == null ? value2 : value.clientInfo.os;
}
function _fun82979() { // fn#82979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:1143, offset: 0x01f08aee, size: 310 bytes, params: 1, frame: 23
var r7;
var r10;
var r9;
var NativeModules;
var KeyboardManager;
var mediaEngineStoreBinding;
var moduleValue3;
if (env0_2 != null) {
var moduleValue = require(10838) /* metro dependency 10838: coercePlatformTypeToConsoleType */;
var value3 = moduleValue.coerceConsoleTypeToPlatformType(env0_2, env0_3);
if (value3 != null) {
moduleValue3 = require(9421) /* metro dependency 9421: beginConsoleTransfer */;
return moduleValue3.beginConsoleTransfer(channel, value3);
}
}
const id = channel.id;
const value = environment.__proto__;
resetFocus();
const value4 = moduleValue2 == null;
if (value4) {
r7 = value4;
r10 = moduleValue2;
} else {
NativeModules = moduleValue2.NativeModules;
r7 = NativeModules == null;
r10 = NativeModules;
}
if (r7) {
r9 = r10;
} else {
KeyboardManager = r10.KeyboardManager;
r7 = KeyboardManager == null;
r9 = KeyboardManager;
}
r7 = !r7 ? r9.dismissGlobalKeyboard == null : r7;
if (!r7) {
r9.dismissGlobalKeyboard();
}
if (moduleValue2.View) {
mediaEngineStoreBinding = MediaEngineStore;
if (!mediaEngineStoreBinding.getSettings().mute) {
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).toggleSelfMute();
}
}
(SelectedChannelActionCreators).selectVoiceChannel(id, false,
false);
}
}
(importDefault(4796) /* metro dependency 4796: SelectedChannelActionCreators */).selectVoiceChannel(id, false,
false);
function showVoiceSettingsActionSheet(a0) { // fn#82980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:2218, offset: 0x01f08c24, size: 64 bytes, params: 2, frame: 16
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).openLazy(function() {
var Promise = global.Promise;
return Promise.resolve(VoiceSettingsActionSheet);
}, 'voice settings', {guildId: a0});
}
function ChannelCallConnectingHeader({channel}) { // fn#82982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:2386, offset: 0x01f08c7f, size: 367 bytes, params: 2, frame: 27
var r6;
var VoiceChatHeaderIcon;
var object2;
var intl;
const styles = useStyles();
const value2 = (UseChannelName)(channel);
const value3 = (UseIsVoiceChannelFullModule).useIsVoiceChannelLocked(channel);
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const CREATE_INSTANT_INVITE = Permissions.CREATE_INSTANT_INVITE;
const r12 = Reflect.apply(can, permissionStoreBinding, [CREATE_INSTANT_INVITE,
channel]) ? value3 ? null : function() {
return require(dependencyMap[18]).showInstantInviteActionSheet(channel,
{source: InstantInviteSources.VOICE_CHANNEL});
} : null;
const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13;
const items2 = [
<View style={{width: 4}} />,
];
if (r12 != null) {
VoiceChatHeaderIcon = importDefault(10831) /* metro dependency 10831: VoiceChatHeaderIcon */;
object2 = {source: importDefault(10832) /* metro dependency 10832 */, onPress: r12};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['dHHb/2'],
{channelName: value2});
r6 = <VoiceChatHeaderIcon {...object2} />;
} else {
r6 = null;
}
items2[1] = r6;
items2[2] = <View style={styles.spacer} />;
items2[3] = <View style={{width: 4}} />;
return (
<>
{items2}
</>
);
}
function CallConnectingActionBar({channel}) { // fn#82984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10999:2876, offset: 0x01f08e2c, size: 105 bytes, params: 2, frame: 19
const styles = useStyles();
return (
<View style={styles.actionBarContainer}>
<JoinMutedButton channel={channel} />
<JoinVoiceButton channel={channel} />
</View>
);
}
}
global.__d(_fun82973, 10813, [31, 27, 4295, 4259, 3784, 4296, 7715, 661, 482, 33, 4501, 7740, 4080, 6275, 6277,
10814, 4805, 10785, 9151, 10831, 10832, 1244, 8899, 4796, 4048, 10833, 9325, 566, 9324, 6952, 10838, 9421,
10839, 697, 10696, 9803,
2]) /* metro module 10813, dependencies: [31, 27, 4295, 4259, 3784, 4296, 7715, 661, 482, 33, 4501, 7740, 4080, 6275, 6277, 10814, 4805, 10785, 9151, 10831, 10832, 1244, 8899, 4796, 4048, 10833, 9325, 566, 9324, 6952, 10838, 9421, 10839, 697, 10696, 9803, 2] */;
@@ -1,74 +1,94 @@
/* Metro module 10861; source: modules/video_calls/native/components/ChannelCallHeaderButtons.tsx; dependencies: [31, 4259, 33, 566, 10772, 1244, 10862, 8899, 7719, 7720, 10863, 7712, 2] */
import MediaEngineStore from '../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun83188(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:6, offset: 0x01f10bd4, size: 167 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallHeaderButtons.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelCallHeaderButtons.tsx');
exports.CameraButton = CameraButton;
exports.GridButton = GridButton;
}
function CameraButton() { // fn#83189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:244, offset: 0x01f10c7b, size: 212 bytes, params: 1, frame: 21
var r0;
var ChannelCallNavigatorIcon;
var intl;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MediaEngineStore],
function() {
var object = {};
var mediaEngineStoreBinding = MediaEngineStore;
object.isVideoEnabled = mediaEngineStoreBinding.isVideoEnabled();
object.videoDeviceId = mediaEngineStoreBinding.getVideoDeviceId();
object.videoDevices = mediaEngineStoreBinding.getVideoDevices();
return object;
});
const isVideoEnabled = value2.isVideoEnabled;
const env0_0 = value2.videoDeviceId;
const env0_1 = value2.videoDevices;
if (isVideoEnabled) {
ChannelCallNavigatorIcon = importDefault(10772) /* metro dependency 10772: ChannelCallNavigatorIcon */;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<ChannelCallNavigatorIcon
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['t9eQ/g'])}
source={importDefault(10862) /* metro dependency 10862 */}
onPress={onPress_83191}
disableBackground
/>
);
} else {
r0 = null;
}
return r0;
function CameraButtonOnPress() { // fn#83191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:562, owner: CameraButton.onPress, offset: 0x01f10d87, size: 91 bytes, params: 1, frame: 12
var environment;
var value2;
const Object = global.Object;
let value = Object.keys(videoDevices);
value = value.find(function(a0) {
return a0 !== videoDeviceId;
});
if (value != null) {
value2 = environment.__proto__;
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).setVideoDevice(value);
}
}
function CameraButton() { // fn#83189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:244, offset: 0x01f10c7b, size: 212 bytes, params: 1, frame: 21
var r0;
var ChannelCallNavigatorIcon;
var intl;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([MediaEngineStore],
function() {
var object = {};
object.isVideoEnabled = MediaEngineStore.isVideoEnabled();
object.videoDeviceId = MediaEngineStore.getVideoDeviceId();
object.videoDevices = MediaEngineStore.getVideoDevices();
return object;
});
const isVideoEnabled = value2.isVideoEnabled;
const env0_0 = value2.videoDeviceId;
const env0_1 = value2.videoDevices;
if (isVideoEnabled) {
ChannelCallNavigatorIcon = importDefault(10772) /* metro dependency 10772: ChannelCallNavigatorIcon */;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <ChannelCallNavigatorIcon accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['t9eQ/g'])} source={importDefault(10862) /* metro dependency 10862 */} onPress={onPress_83191} disableBackground />;
} else {
r0 = null;
}
return r0;
}
function GridButton({channel}) { // fn#83193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:683, offset: 0x01f10de2, size: 203 bytes, params: 2, frame: 21
var r0;
var ChannelCallNavigatorIcon;
var intl;
if ((importDefault(7720) /* metro dependency 7720: useSelectedParticipant */)(channel) == null) {
r0 = null;
} else if ((importDefault(7719) /* metro dependency 7719: useIsPrivateAudioOnlyCall */)(channel)) {
r0 = null;
} else {
ChannelCallNavigatorIcon = importDefault(10772) /* metro dependency 10772: ChannelCallNavigatorIcon */;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <ChannelCallNavigatorIcon accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HK4JIu)} source={importDefault(10863) /* metro dependency 10863 */} onPress={onPress_83194} disableBackground />;
function GridButton({channel}) { // fn#83193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:683, offset: 0x01f10de2, size: 203 bytes, params: 2, frame: 21
var r0;
var ChannelCallNavigatorIcon;
var intl;
if ((importDefault(7720) /* metro dependency 7720: useSelectedParticipant */)(channel) == null) {
r0 = null;
} else if ((importDefault(7719) /* metro dependency 7719: useIsPrivateAudioOnlyCall */)(channel)) {
r0 = null;
} else {
ChannelCallNavigatorIcon = importDefault(10772) /* metro dependency 10772: ChannelCallNavigatorIcon */;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<ChannelCallNavigatorIcon
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.HK4JIu)}
source={importDefault(10863) /* metro dependency 10863 */}
onPress={onPress_83194}
disableBackground
/>
);
}
return r0;
function GridButtonOnPress() { // fn#83194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:840, owner: GridButton.onPress, offset: 0x01f10ead, size: 53 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
return value.selectParticipant(channel.id, null);
}
}
return r0;
}
function CameraButtonOnPress() { // fn#83191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:562, owner: CameraButton.onPress, offset: 0x01f10d87, size: 91 bytes, params: 1, frame: 12
var environment;
var value2;
const Object = global.Object;
let value = Object.keys(videoDevices);
value = value.find(function(a0) {
return a0 !== videoDeviceId;
});
if (value != null) {
value2 = environment.__proto__;
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).setVideoDevice(value);
}
}
function GridButtonOnPress() { // fn#83194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11047:840, owner: GridButton.onPress, offset: 0x01f10ead, size: 53 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
return value.selectParticipant(channel.id, null);
}
global.__d(_fun83188, 10861, [31, 4259, 33, 566, 10772, 1244, 10862, 8899, 7719, 7720, 10863, 7712,
2]) /* metro module 10861, dependencies: [31, 4259, 33, 566, 10772, 1244, 10862, 8899, 7719, 7720, 10863, 7712, 2] */;
@@ -1,40 +1,49 @@
/* Metro module 10833; source: modules/video_calls/native/components/ChannelCallMicButton.tsx; dependencies: [31, 4295, 33, 6952, 566, 10834, 10835, 7741, 1244, 10836, 10837, 697, 2] */
import GameConsoleStore from '../../../game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as VoicePanelRiveMicButtonModule from '../../../voice_panel/native/controls/buttons/VoicePanelRiveMicButton.tsx'; /* Metro dependency 10835 */
function _fun83082(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11019:6, offset: 0x01f0cb05, size: 162 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallMicButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelCallMicButton.tsx');
exports.ChannelCallMicButton = ChannelCallMicButton;
function ChannelCallMicButton({channel, isSmallSize, disableTint}) { // fn#83083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11019:250, offset: 0x01f0cba7, size: 369 bytes, params: 2, frame: 25
disableTint = !(disableTint === undefined) && disableTint;
const value4 = importDefault(dependencyMap[3])(channel);
const value5 = require(dependencyMap[4]).useStateFromStores([GameConsoleStore], _fun83084);
const {mute, onPress} = require(dependencyMap[5]).createMuteHandler(value4, value5);
const value6 = ReactModule.useMemo(_fun83085, [mute]);
const ToggledActionButton = importAll(dependencyMap[7]).ToggledActionButton;
object = {appearsDisabled: value5};
const intl = require(dependencyMap[8]).intl;
const string = intl.string;
const B3zz0G = require(dependencyMap[8]).t.B3zz0G;
object.accessibilityLabel = Reflect.apply(string, intl, [B3zz0G]);
object.onPress = onPress;
object.source = importDefault(mute ? dependencyMap[9] : dependencyMap[10]);
object.isActive = disableTint || mute;
object.isSmallSize = isSmallSize;
object.lottieComponent = value6;
const RED_400 = mute ? importDefault(dependencyMap[11]).unsafe_rawColors.RED_400 : undefined;
object.tintColor = RED_400;
return <ToggledActionButton {...object} />;
function _fun83084() { // fn#83084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11019:348, offset: 0x01b4a7c0, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return GameConsoleStore.getAwaitingRemoteSessionInfo() != null;
}
function _fun83085() { // fn#83085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11019:460, offset: 0x01f0cd18, size: 57 bytes, params: 1, frame: 14
const VoicePanelRiveMicButton = (VoicePanelRiveMicButtonModule).VoicePanelRiveMicButton;
return <VoicePanelRiveMicButton muted={mute} />;
}
}
}
function ChannelCallMicButton({channel, isSmallSize, disableTint}) { // fn#83083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11019:250, offset: 0x01f0cba7, size: 369 bytes, params: 2, frame: 25
var object2;
disableTint = !(disableTint === undefined) && disableTint;
const value4 = importDefault(dependencyMap[3])(channel);
const value5 = require(dependencyMap[4]).useStateFromStores([GameConsoleStore], _fun83084);
const {mute, onPress} = require(dependencyMap[5]).createMuteHandler(value4, value5);
const value6 = env0_4.useMemo(_fun83085, [mute]);
const ToggledActionButton = importAll(dependencyMap[7]).ToggledActionButton;
object2 = {appearsDisabled: value5};
const intl = require(dependencyMap[8]).intl;
const string = intl.string;
const B3zz0G = require(dependencyMap[8]).t.B3zz0G;
object2.accessibilityLabel = Reflect.apply(string, intl, [B3zz0G]);
object2.onPress = onPress;
object2.source = importDefault(mute ? dependencyMap[9] : dependencyMap[10]);
object2.isActive = disableTint || mute;
object2.isSmallSize = isSmallSize;
object2.lottieComponent = value6;
const RED_400 = mute ? importDefault(dependencyMap[11]).unsafe_rawColors.RED_400 : undefined;
object2.tintColor = RED_400;
return <ToggledActionButton {...object2} />;
}
function _fun83085() { // fn#83085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11019:460, offset: 0x01f0cd18, size: 57 bytes, params: 1, frame: 14
const VoicePanelRiveMicButton = (require(10835) /* metro dependency 10835: VoicePanelRiveMicButton */).VoicePanelRiveMicButton;
return <VoicePanelRiveMicButton muted={mute} />;
}
global.__d(_fun83082, 10833, [31, 4295, 33, 6952, 566, 10834, 10835, 7741, 1244, 10836, 10837, 697,
2]) /* metro module 10833, dependencies: [31, 4295, 33, 6952, 566, 10834, 10835, 7741, 1244, 10836, 10837, 697, 2] */;
@@ -1,28 +1,36 @@
/* Metro module 7714; source: modules/video_calls/native/components/ChannelCallModal.tsx; dependencies: [57, 31, 4606, 1379, 7715, 7716, 7722, 661, 33, 7721, 7723, 4007, 7728, 10722, 7725, 10723, 4017, 4015, 12072, 566, 1478, 7724, 12073, 6771, 6789, 12083, 7709, 5321, 10665, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseIsActivityFocused from '../../../activities/useIsActivityFocused.tsx'; /* Metro dependency 7724 */
import PanGestureAnimations from '../../../action_sheet/native/PanGestureAnimations.tsx'; /* Metro dependency 12072 */
import UseModalPanGesture from './useModalPanGesture.tsx'; /* Metro dependency 12083 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NavigationRouteUtilsNativeModule from '../../../main_tabs_v2/helpers/NavigationRouteUtils.native.tsx'; /* Metro dependency 4007 */
import * as ChatInputUtilsModule from '../../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as ChannelCallConstantsModule from '../ChannelCallConstants.tsx'; /* Metro dependency 7716 */
import * as VoiceChatHooksModule from '../../../voice_chat/VoiceChatHooks.tsx'; /* Metro dependency 7721 */
import * as ConstantsModule2 from './Constants.tsx'; /* Metro dependency 7722 */
function _fun61664(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6, offset: 0x01b47685, size: 598 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = ChannelCallCameraPreview;
const closure2 = ChannelCallModal;
const ChannelCallCameraPreview2 = ChannelCallCameraPreview;
const ChannelCallModal2 = ChannelCallModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
const env0_7 = channelCallStoreModule.useChannelCallOrientationHandlers;
const env0_8 = channelCallStoreModule.resetChannelCallStore;
const env0_9 = channelCallStoreModule.useChannelCallStore;
const env0_10 = channelCallStoreModule.setVoiceChatDrawerState;
const env0_11 = channelCallStoreModule.useIsVoiceChatFocused;
const env0_12 = (require(7716) /* metro dependency 7716: ChannelCallConstants */).VoiceChatDrawerState;
const constantsModule = require(7722) /* metro dependency 7722: Constants */;
const value = ReactModule;
const constantsModule = ConstantsModule2;
const env0_13 = constantsModule.PAN_GESTURE_FAIL_OFFSET_Y;
const env0_14 = constantsModule.SWIPE_TO_CHAT_ACTIVE_OFFSET;
const ModalAnimation = (require(661) /* metro dependency 661: Constants */).ModalAnimation;
const value4 = require(33) /* metro dependency 33 */;
const env0_15 = value4.jsx;
const env0_16 = value4.jsxs;
const ModalAnimation = (ConstantsModule).ModalAnimation;
const env0_17 = value.memo(_fun61668);
object = {code: 'function ChannelCallModalTsx1(){const{width}=this.__closure;return[0,-width];}'};
object = {code: 'function ChannelCallModalTsx2(){const{runOnJS,dismissKeyboard}=this.__closure;runOnJS(dismissKeyboard)();}'};
@@ -37,367 +45,367 @@ function _fun61664(global, require, importDefault, importAll, module, exports, d
object = {code: 'function ChannelCallModalTsx11(){const{translateX,withPanGestureTiming}=this.__closure;translateX.set(withPanGestureTiming(0));}'};
const env0_29 = value.memo(_fun61671);
const SLIDE_UP = ModalAnimation.SLIDE_UP;
closure2.modalConfig = {animation: SLIDE_UP, shouldPersistUnderModals: true};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallModal.tsx');
exports.default = closure2;
exports.ChannelCallCameraPreview = closure;
exports.ChannelCallModal = closure2;
}
function ChannelCallCameraPreview({channel}) { // fn#61665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:443, offset: 0x01b478db, size: 220 bytes, params: 2, frame: 21
var r0;
var Provider;
var object2;
var value;
const value2 = useIsVoiceChatFocused();
const value3 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
const value5 = (require(7723) /* metro dependency 7723: RevealProvider */).useRevealProviderValue(useChannelCallStore(function(a0) {
return a0.focus;
}), channel);
const navigationRouteUtilsNativeModule = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
if (value3) {
Provider = (require(7723) /* metro dependency 7723: RevealProvider */).RevealContext.Provider;
object2 = {value: value5};
value = importDefault(7728) /* metro dependency 7728: CameraPreview */;
value = <Provider {...object2}>{((Component) => <Component channel={channel} participantScreenIsFocused={!value2} isChannelCallModalOpen={navigationRouteUtilsNativeModule.isModalOpen(ChannelCallModal)} />)(value)}</Provider>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function ChannelCallModal({channel}) { // fn#61667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:8007, offset: 0x01b479c2, size: 49 bytes, params: 2, frame: 14
return ((Component) => <Component channelId={channel.id} guildId={channel.guild_id} />)(env0_29);
}
function _fun61668({channelId}) { // fn#61668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:801, offset: 0x01b479f3, size: 146 bytes, params: 2, frame: 17
var r0;
var value;
const binding = env0_4;
const useState = binding.useState;
const getChannel = ChannelStore.getChannel;
const property = env0_3(Reflect.apply(useState, binding, [Reflect.apply(getChannel, ChannelStore, [channelId])]),
1)[0];
useChannelCallOrientationHandlers(property);
binding.useEffect(_fun61669, [property]);
if (property == null) {
r0 = null;
} else {
value = importDefault(10723) /* metro dependency 10723: ChannelCallNavigator */;
value = ((Component) => <Component channel={property} />)(value);
r0 = value;
}
return r0;
}
function _fun61671({channelId, guildId}) { // fn#61671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:3659, offset: 0x01b47b2f, size: 1486 bytes, params: 2, frame: 42
var object2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]);
let binding = env0_4;
const value3 = binding.useRef(undefined);
const value4 = binding.useRef(undefined);
const env0_3 = value4;
const value5 = binding.useRef(undefined);
var env0_4 = value5;
const value6 = binding.useRef(undefined);
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const voiceChatDrawerState = useChannelCallStore().voiceChatDrawerState;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = function() {
return voiceChatDrawerState;
};
closure.__closure = {voiceChatDrawerStoreState: voiceChatDrawerState};
closure.__workletHash = 4903837231689;
closure.__initData = env0_20;
const value9 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const value11 = reanimatedRexportModule.useSharedValue(false);
const value12 = 0.8 * height;
const value13 = (importDefault(7724) /* metro dependency 7724: useIsActivityFocused */)(channelId);
const [property, env0_13] = env0_3(binding.useState(false), 2);
const r1 = value13 || value2 != null && value2.isGuildStageVoice();
binding = env0_4;
const env0_15 = binding.useRef({channelId: channelId, guildId: guildId});
binding.useEffect(_fun61674);
binding.useEffect(_fun61675, [width, value7]);
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const CHANNEL_CALL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).CHANNEL_CALL;
const analyticsLocations = defaultImport(CHANNEL_CALL).analyticsLocations;
const moduleValue6 = reanimatedRexportModule;
let useAnimatedReaction = moduleValue6.useAnimatedReaction;
closure = ae;
closure.__closure = {isSwipeToChatInProgress: value11, translateX: value7, width: width,
voiceChatDrawerState: value9, VoiceChatDrawerState: VoiceChatDrawerState};
closure.__workletHash = 16786813095205;
closure.__initData = env0_22;
const closure2 = te;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setVoiceChatDrawerState: setVoiceChatDrawerState,
channelId: channelId, VoiceChatDrawerState: VoiceChatDrawerState,
transitionToVoiceRoute: (require(12073) /* metro dependency 12073: RouteManagerUtils */).transitionToVoiceRoute,
guildId: guildId};
closure2.__workletHash = 14188334620807;
closure2.__initData = env0_23;
Reflect.apply(useAnimatedReaction, moduleValue6, [closure, closure2]);
const moduleValue7 = reanimatedRexportModule;
useAnimatedReaction = moduleValue7.useAnimatedReaction;
closure = re;
closure.__closure = {voiceChatDrawerState: value9};
closure.__workletHash = 14044794538420;
closure.__initData = env0_24;
const closure3 = ne_61680;
object2 = {VoiceChatDrawerState: VoiceChatDrawerState, translateX: value7};
object2.withPanGestureTiming = (require(12072) /* metro dependency 12072: PanGestureAnimations */).withPanGestureTiming;
closure3.__closure = object2;
closure3.__workletHash = 260500087614;
closure3.__initData = env0_25;
Reflect.apply(useAnimatedReaction, moduleValue7, [closure, closure3]);
const value20 = useSwipeToChatGesture({isGestureInProgress: value11, channelId: channelId, width: width,
translateX: value7, enabled: !property && !value13}).withRef(value3);
const value23 = (importDefault(12083) /* metro dependency 12083: useModalPanGesture */)({gestureEnabled: !r1,
height: height, maxTranslate: value12, thresholdTranslate: 0.5 * height,
translateY: value8}).withRef(value6).requireExternalGestureToFail(value5, value4);
binding = env0_4;
binding.useLayoutEffect(_fun61684, [channelId]);
const moduleValue8 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue8.useAnimatedStyle;
closure = oe;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, translateY: value8,
maxVerticalTranslate: value12};
closure.__workletHash = 8643926178558;
closure.__initData = env0_26;
if (value2 == null) {
return null;
} else {
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{((GestureDetector) => <GestureDetector gesture={(require(5321) /* metro dependency 5321 */).Gesture.Exclusive(value20,
value23)}>{((View) => <View style={Reflect.apply(useAnimatedStyle, moduleValue8,
[closure])}>{((Provider) => <Provider value={binding.useMemo(_fun61686, [value5, value6, value3,
value4,
value7, width,
channelId])}>{((Component) => <Component channelId={channelId} />)(env0_17)}<ChannelCallCameraPreview channel={value2} /></Provider>)((require(10665) /* metro dependency 10665: VoiceChatModalContext */).VoiceChatNavigationContext.Provider)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</GestureDetector>)((require(5321) /* metro dependency 5321 */).GestureDetector)}
</AnalyticsLocationProvider>
);
}
}
function _fun61669() { // fn#61669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:896, offset: 0x01b47a85, size: 66 bytes, params: 1, frame: 12
var environment;
var value2;
if (env0_0 != null) {
value2 = environment.__proto__;
(importDefault(10722) /* metro dependency 10722: ChannelCallModalManager */).initialize(env0_0);
return function() {
importDefault(dependencyMap[13]).terminate();
importDefault(dependencyMap[14]).setHidden(false);
if (!require(dependencyMap[11]).isModalOpen(ChannelCallModal)) {
resetChannelCallStore();
}
};
}
}
function _fun61675() { // fn#61675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:4300, offset: 0x01b4812c, size: 225 bytes, params: 1, frame: 22
var moduleValue;
var runOnUI;
var closure;
var value;
const {channelId, guildId} = env0_15.current;
const getState = useChannelCallStore.getState;
const voiceChatDrawerState = Reflect.apply(getState, useChannelCallStore, []).voiceChatDrawerState;
const OPEN = VoiceChatDrawerState.OPEN;
if (voiceChatDrawerState === OPEN || ChannelRTCStore.getChatOpen(channelId)) {
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnUI = moduleValue.runOnUI;
closure = t_61676;
closure.__closure = {translateX: env0_6, width: width};
closure.__workletHash = 15726690166344;
closure.__initData = env1_21;
Reflect.apply(runOnUI, moduleValue, [closure])();
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS((require(12073) /* metro dependency 12073: RouteManagerUtils */).transitionToVoiceRoute)(guildId,
channelId);
}
}
function ae() { // fn#61677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:4712, offset: 0x01b48229, size: 245 bytes, params: 1, frame: 16
let binding = env0_11;
const value2 = binding.get();
const r6 = env0_6.get() === -width || env0_6.get() === 0;
binding = env0_9;
const value7 = binding.get();
const OPEN = VoiceChatDrawerState.OPEN;
const value9 = binding.get();
const CLOSED = VoiceChatDrawerState.CLOSED;
return value2 ? value7 !== OPEN ? value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null : env0_6.get() > -width ? VoiceChatDrawerState.CLOSING : value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null : r6 ? env0_6.get() === -width ? VoiceChatDrawerState.OPEN : VoiceChatDrawerState.CLOSED : value7 !== OPEN ? value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null : env0_6.get() > -width ? VoiceChatDrawerState.CLOSING : value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null;
}
function te(a0, a1) { // fn#61678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5062, offset: 0x01b4831e, size: 163 bytes, params: 3, frame: 16
var moduleValue;
let value = a0 !== a1;
if (value && a0 != null && value) {
value = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(setVoiceChatDrawerState)(channelId, a0);
if (a0 === VoiceChatDrawerState.OPEN) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS((require(12073) /* metro dependency 12073: RouteManagerUtils */).transitionToVoiceRoute);
value(guildId, channelId);
ChannelCallModal2.modalConfig = {animation: SLIDE_UP, shouldPersistUnderModals: true};
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelCallModal.tsx');
exports.default = ChannelCallModal2;
exports.ChannelCallCameraPreview = ChannelCallCameraPreview2;
exports.ChannelCallModal = ChannelCallModal2;
function ChannelCallCameraPreview({channel}) { // fn#61665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:443, offset: 0x01b478db, size: 220 bytes, params: 2, frame: 21
var r0;
var Provider;
var object;
var value;
const value2 = useIsVoiceChatFocused();
const value3 = (VoiceChatHooksModule).useIsConnectedToVoiceChannel(channel);
const value5 = (require(7723) /* metro dependency 7723: RevealProvider */).useRevealProviderValue(useChannelCallStore(function(a0) {
return a0.focus;
}), channel);
if (value3) {
Provider = (require(7723) /* metro dependency 7723: RevealProvider */).RevealContext.Provider;
object = {value: value5};
value = importDefault(7728) /* metro dependency 7728: CameraPreview */;
value = (
<Provider {...object}>
{((Component) => <Component channel={channel} participantScreenIsFocused={!value2} isChannelCallModalOpen={NavigationRouteUtilsNativeModule.isModalOpen(ChannelCallModal)} />)(value)}
</Provider>
);
r0 = value;
} else {
r0 = null;
}
return r0;
}
}
function re() { // fn#61679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5444, offset: 0x01b483c1, size: 18 bytes, params: 1, frame: 9
return env0_9.get();
}
function ne_61680(a0, a1) { // fn#61680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5563, offset: 0x01b483d3, size: 99 bytes, params: 3, frame: 13
var binding;
var set;
let value = environment.__proto__;
const CLOSED = VoiceChatDrawerState.CLOSED;
if (a0 === CLOSED && a1 === VoiceChatDrawerState.OPEN) {
binding = env0_6;
set = binding.set;
value = require(12072) /* metro dependency 12072: PanGestureAnimations */;
Reflect.apply(set, binding, [value.withPanGestureTiming(0)]);
function ChannelCallModal({channel}) { // fn#61667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:8007, offset: 0x01b479c2, size: 49 bytes, params: 2, frame: 14
return ((Component) => <Component channelId={channel.id} guildId={channel.guild_id} />)(env0_29);
}
}
function useSwipeToChatGesture({translateX, width, enabled, isGestureInProgress}) { // fn#61681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5802, offset: 0x01b48436, size: 346 bytes, params: 2, frame: 24
var object2;
var environment;
const value = environment.__proto__;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = useSwipeToChatGestureU;
closure.__closure = {width: width};
closure.__workletHash = 15383459308604;
closure.__initData = env1_18;
const value2 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const binding = env1_4;
const useCallback = binding.useCallback;
closure = useSwipeToChatGestureC;
object2 = {};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.dismissKeyboard = (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard;
closure.__closure = object2;
closure.__workletHash = 4086900686382;
closure.__initData = env1_19;
const value5 = (importDefault(12072) /* metro dependency 12072: PanGestureAnimations */)({lowerBounds: -width,
upperBounds: 0, translate: translateX, vertical: false, snapPositions: value2,
onStart: Reflect.apply(useCallback, binding, [closure, []]),
isGestureInProgress: isGestureInProgress}).enabled(enabled);
const value7 = value5.failOffsetY([-PAN_GESTURE_FAIL_OFFSET_Y, PAN_GESTURE_FAIL_OFFSET_Y]);
return value7.activeOffsetX([-SWIPE_TO_CHAT_ACTIVE_OFFSET, SWIPE_TO_CHAT_ACTIVE_OFFSET]);
}
function _fun61668({channelId}) { // fn#61668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:801, offset: 0x01b479f3, size: 146 bytes, params: 2, frame: 17
var r0;
var value;
const binding = env0_4;
const useState = binding.useState;
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const property = Module00057(Reflect.apply(useState, binding, [Reflect.apply(getChannel, channelStoreBinding,
[channelId])]), 1)[0];
useChannelCallOrientationHandlers(property);
binding.useEffect(_fun61669, [property]);
if (property == null) {
r0 = null;
} else {
value = importDefault(10723) /* metro dependency 10723: ChannelCallNavigator */;
value = ((Component) => <Component channel={property} />)(value);
r0 = value;
}
return r0;
function _fun61669() { // fn#61669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:896, offset: 0x01b47a85, size: 66 bytes, params: 1, frame: 12
var environment;
var value2;
if (env0_0 != null) {
value2 = environment.__proto__;
(importDefault(10722) /* metro dependency 10722: ChannelCallModalManager */).initialize(env0_0);
return function() {
importDefault(dependencyMap[13]).terminate();
importDefault(dependencyMap[14]).setHidden(false);
if (!require(dependencyMap[11]).isModalOpen(ChannelCallModal)) {
resetChannelCallStore();
}
};
}
}
function _fun61684() { // fn#61684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6632, offset: 0x01b485e5, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
value.maybeShowAgeGateModal(channelId);
}
function oe() { // fn#61685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6719, offset: 0x01b48612, size: 116 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
let binding = env0_7;
const value3 = binding.get();
binding = env0_12;
return {flex: 1, transform: [{translateY: Reflect.apply(interpolate, value, [value3, [0, binding], [0, binding]])}]};
}
function _fun61686() { // fn#61686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6949, offset: 0x01b48686, size: 89 bytes, params: 1, frame: 4
return {memberListRef: env0_4, translateX: env0_6, swipeDismissRef: env0_5, swipeToChatRef: env0_2,
videoGridRef: env0_3, openChat: openChat, openVoice: openVoice, setIsSwipeToChatDisabled: env0_13};
}
function t_61676() { // fn#61676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:4436, offset: 0x01b4820d, size: 28 bytes, params: 1, frame: 11
const binding = env1_6;
binding.set(-width);
}
function useSwipeToChatGestureU() { // fn#61682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5928, owner: useSwipeToChatGesture.u, offset: 0x01b48590, size: 26 bytes, params: 1, frame: 2
return [0, -width];
}
function useSwipeToChatGestureC() { // fn#61683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6029, owner: useSwipeToChatGesture.c, offset: 0x01b485aa, size: 59 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS((require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard)();
}
function openChat(a0) { // fn#61687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7034, offset: 0x01b486df, size: 203 bytes, params: 2, frame: 20
const env0_0 = a0;
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const value2 = reanimatedRexportModule.runOnJS(setVoiceChatDrawerState);
const channelIdBinding = channelId;
const OPENING = VoiceChatDrawerState.OPENING;
value2(channelIdBinding, OPENING);
const moduleValue3 = reanimatedRexportModule;
const runOnUI = moduleValue3.runOnUI;
const closure = openChatN;
const object2 = {immediate: a0, translateX: env1_6};
object2.width = width;
object2.withPanGestureTiming = (require(12072) /* metro dependency 12072: PanGestureAnimations */).withPanGestureTiming;
closure.__closure = object2;
closure.__workletHash = 16904415853957;
closure.__initData = env2_27;
Reflect.apply(runOnUI, moduleValue3, [closure])();
}
function openVoice() { // fn#61689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7352, offset: 0x01b48811, size: 183 bytes, params: 1, frame: 18
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const value2 = reanimatedRexportModule.runOnJS(setVoiceChatDrawerState);
const channelIdBinding = channelId;
const CLOSING = VoiceChatDrawerState.CLOSING;
value2(channelIdBinding, CLOSING);
(require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard();
const moduleValue3 = reanimatedRexportModule;
const runOnUI = moduleValue3.runOnUI;
const closure = openVoiceT;
const object2 = {translateX: env1_6};
object2.withPanGestureTiming = (require(12072) /* metro dependency 12072: PanGestureAnimations */).withPanGestureTiming;
closure.__closure = object2;
closure.__workletHash = 15753790715008;
closure.__initData = env2_28;
Reflect.apply(runOnUI, moduleValue3, [closure])();
}
function openChatN() { // fn#61688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7133, owner: openChat.n, offset: 0x01b487aa, size: 103 bytes, params: 1, frame: 14
var binding;
var set;
var value2;
var moduleValue;
if (env0_0 === true) {
value = environment.__proto__.__proto__;
binding = env2_6;
binding.set(-width);
} else {
value = environment.__proto__.__proto__;
binding = env2_6;
set = binding.set;
value2 = environment.__proto__.__proto__.__proto__;
moduleValue = require(12072) /* metro dependency 12072: PanGestureAnimations */;
Reflect.apply(set, binding, [moduleValue.withPanGestureTiming(-width)]);
}
function _fun61671({channelId, guildId}) { // fn#61671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:3659, offset: 0x01b47b2f, size: 1486 bytes, params: 2, frame: 42
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
}, [channelId]);
let binding = env0_4;
const value3 = binding.useRef(undefined);
const value4 = binding.useRef(undefined);
const env0_3 = value4;
const value5 = binding.useRef(undefined);
var env0_4 = value5;
const value6 = binding.useRef(undefined);
const value7 = (ReanimatedRexportModule).useSharedValue(0);
const value8 = (ReanimatedRexportModule).useSharedValue(0);
const voiceChatDrawerState = useChannelCallStore().voiceChatDrawerState;
const useDerivedValue = ReanimatedRexportModule.useDerivedValue;
let closure = function() {
return voiceChatDrawerState;
};
closure.__closure = {voiceChatDrawerStoreState: voiceChatDrawerState};
closure.__workletHash = 4903837231689;
closure.__initData = env0_20;
const value9 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const {width, height} = (UseWindowDimensionsNative)();
const value11 = ReanimatedRexportModule.useSharedValue(false);
const value12 = 0.8 * height;
const value13 = (UseIsActivityFocused)(channelId);
const [property, env0_13] = env0_3(binding.useState(false), 2);
const r1 = value13 || value2 != null && value2.isGuildStageVoice();
binding = env0_4;
const env0_15 = binding.useRef({channelId: channelId, guildId: guildId});
binding.useEffect(_fun61674);
binding.useEffect(_fun61675, [width, value7]);
const defaultImport = UseAnalyticsLocations;
const CHANNEL_CALL = (AnalyticsLocation).CHANNEL_CALL;
const analyticsLocations = defaultImport(CHANNEL_CALL).analyticsLocations;
let useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = ae;
closure.__closure = {isSwipeToChatInProgress: value11, translateX: value7, width: width,
voiceChatDrawerState: value9, VoiceChatDrawerState: VoiceChatDrawerState};
closure.__workletHash = 16786813095205;
closure.__initData = env0_22;
const te2 = te;
te2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS, setVoiceChatDrawerState: setVoiceChatDrawerState,
channelId: channelId, VoiceChatDrawerState: VoiceChatDrawerState,
transitionToVoiceRoute: (require(12073) /* metro dependency 12073: RouteManagerUtils */).transitionToVoiceRoute,
guildId: guildId};
te2.__workletHash = 14188334620807;
te2.__initData = env0_23;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, te2]);
useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = re;
closure.__closure = {voiceChatDrawerState: value9};
closure.__workletHash = 14044794538420;
closure.__initData = env0_24;
const ne2 = ne;
object = {VoiceChatDrawerState: VoiceChatDrawerState, translateX: value7};
object.withPanGestureTiming = (require(12072) /* metro dependency 12072: PanGestureAnimations */).withPanGestureTiming;
ne2.__closure = object;
ne2.__workletHash = 260500087614;
ne2.__initData = env0_25;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, ne2]);
const value20 = useSwipeToChatGesture({isGestureInProgress: value11, channelId: channelId, width: width,
translateX: value7, enabled: !property && !value13}).withRef(value3);
const value23 = (UseModalPanGesture)({gestureEnabled: !r1,
height: height, maxTranslate: value12, thresholdTranslate: 0.5 * height,
translateY: value8}).withRef(value6).requireExternalGestureToFail(value5, value4);
binding = env0_4;
binding.useLayoutEffect(_fun61684, [channelId]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = oe;
closure.__closure = {interpolate: ReanimatedRexportModule.interpolate, translateY: value8,
maxVerticalTranslate: value12};
closure.__workletHash = 8643926178558;
closure.__initData = env0_26;
if (value2 == null) {
return null;
} else {
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
{((GestureDetector) => <GestureDetector gesture={(require(5321) /* metro dependency 5321 */).Gesture.Exclusive(value20,
value23)}>{((View) => <View style={Reflect.apply(useAnimatedStyle, ReanimatedRexportModule,
[closure])}>{((Provider) => <Provider value={binding.useMemo(_fun61686, [value5, value6, value3,
value4,
value7, width,
channelId])}>{((Component) => <Component channelId={channelId} />)(env0_17)}<ChannelCallCameraPreview channel={value2} /></Provider>)((require(10665) /* metro dependency 10665: VoiceChatModalContext */).VoiceChatNavigationContext.Provider)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)}</GestureDetector>)((require(5321) /* metro dependency 5321 */).GestureDetector)}
</AnalyticsLocationProvider>
);
}
function _fun61674() { // fn#61674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:4266, offset: 0x01b48117, size: 21 bytes, params: 1, frame: 2
env0_15.current = env0_14;
}
function _fun61675() { // fn#61675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:4300, offset: 0x01b4812c, size: 225 bytes, params: 1, frame: 22
var moduleValue;
var runOnUI;
var t_616762;
var value;
const {channelId, guildId} = env0_15.current;
const getState = useChannelCallStore.getState;
const voiceChatDrawerState = Reflect.apply(getState, useChannelCallStore, []).voiceChatDrawerState;
const OPEN = VoiceChatDrawerState.OPEN;
if (voiceChatDrawerState === OPEN || ChannelRTCStore.getChatOpen(channelId)) {
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnUI = moduleValue.runOnUI;
t_616762 = t_61676;
t_616762.__closure = {translateX: env0_6, width: width};
t_616762.__workletHash = 15726690166344;
t_616762.__initData = env1_21;
Reflect.apply(runOnUI, moduleValue, [t_616762])();
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS((require(12073) /* metro dependency 12073: RouteManagerUtils */).transitionToVoiceRoute)(guildId,
channelId);
}
function t_61676() { // fn#61676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:4436, offset: 0x01b4820d, size: 28 bytes, params: 1, frame: 11
const binding = env1_6;
binding.set(-width);
}
}
function ae() { // fn#61677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:4712, offset: 0x01b48229, size: 245 bytes, params: 1, frame: 16
let binding = ChannelCallStoreModule.useIsVoiceChatFocused;
const value2 = binding.get();
const r6 = env0_6.get() === -width || env0_6.get() === 0;
binding = ChannelCallStoreModule.useChannelCallStore;
const value7 = binding.get();
const OPEN = VoiceChatDrawerState.OPEN;
const value9 = binding.get();
const CLOSED = VoiceChatDrawerState.CLOSED;
return value2 ? value7 !== OPEN ? value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null : env0_6.get() > -width ? VoiceChatDrawerState.CLOSING : value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null : r6 ? env0_6.get() === -width ? VoiceChatDrawerState.OPEN : VoiceChatDrawerState.CLOSED : value7 !== OPEN ? value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null : env0_6.get() > -width ? VoiceChatDrawerState.CLOSING : value9 !== CLOSED ? null : env0_6.get() < 0 ? VoiceChatDrawerState.OPENING : null;
}
function te(a0, a1) { // fn#61678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5062, offset: 0x01b4831e, size: 163 bytes, params: 3, frame: 16
var moduleValue;
let value = a0 !== a1;
if (value && a0 != null && value) {
value = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(setVoiceChatDrawerState)(channelId, a0);
if (a0 === VoiceChatDrawerState.OPEN) {
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS((require(12073) /* metro dependency 12073: RouteManagerUtils */).transitionToVoiceRoute);
value(guildId, channelId);
}
}
}
function re() { // fn#61679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5444, offset: 0x01b483c1, size: 18 bytes, params: 1, frame: 9
return ChannelCallStoreModule.useChannelCallStore.get();
}
function ne(a0, a1) { // fn#61680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5563, offset: 0x01b483d3, size: 99 bytes, params: 3, frame: 13
var binding;
var set;
let value = environment.__proto__;
const CLOSED = VoiceChatDrawerState.CLOSED;
if (a0 === CLOSED && a1 === VoiceChatDrawerState.OPEN) {
binding = env0_6;
set = binding.set;
value = require(12072) /* metro dependency 12072: PanGestureAnimations */;
Reflect.apply(set, binding, [value.withPanGestureTiming(0)]);
}
}
function useSwipeToChatGesture({translateX, width, enabled, isGestureInProgress}) { // fn#61681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5802, offset: 0x01b48436, size: 346 bytes, params: 2, frame: 24
var environment;
const value = environment.__proto__;
const useDerivedValue = ReanimatedRexportModule.useDerivedValue;
let closure = useSwipeToChatGestureU;
closure.__closure = {width: width};
closure.__workletHash = 15383459308604;
closure.__initData = env1_18;
const value2 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const binding = env1_4;
const useCallback = binding.useCallback;
closure = useSwipeToChatGestureC;
object = {};
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.dismissKeyboard = (require(4015) /* metro dependency 4015: ChatInputUtils */).dismissKeyboard;
closure.__closure = object;
closure.__workletHash = 4086900686382;
closure.__initData = env1_19;
const value5 = (PanGestureAnimations)({lowerBounds: -width,
upperBounds: 0, translate: translateX, vertical: false, snapPositions: value2,
onStart: Reflect.apply(useCallback, binding, [closure, []]),
isGestureInProgress: isGestureInProgress}).enabled(enabled);
const value7 = value5.failOffsetY([-PAN_GESTURE_FAIL_OFFSET_Y, PAN_GESTURE_FAIL_OFFSET_Y]);
return value7.activeOffsetX([-SWIPE_TO_CHAT_ACTIVE_OFFSET, SWIPE_TO_CHAT_ACTIVE_OFFSET]);
function useSwipeToChatGestureU() { // fn#61682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:5928, owner: useSwipeToChatGesture.u, offset: 0x01b48590, size: 26 bytes, params: 1, frame: 2
return [0, -width];
}
function useSwipeToChatGestureC() { // fn#61683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6029, owner: useSwipeToChatGesture.c, offset: 0x01b485aa, size: 59 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS((ChatInputUtilsModule).dismissKeyboard)();
}
}
function _fun61684() { // fn#61684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6632, offset: 0x01b485e5, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
value.maybeShowAgeGateModal(channelId);
}
function oe() { // fn#61685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6719, offset: 0x01b48612, size: 116 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
let binding = ChannelCallStoreModule.useChannelCallOrientationHandlers;
const value3 = binding.get();
binding = ChannelCallConstantsModule.VoiceChatDrawerState;
return {flex: 1, transform: [{translateY: Reflect.apply(interpolate, value, [value3, [0, binding], [0, binding]])}]};
}
function _fun61686() { // fn#61686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:6949, offset: 0x01b48686, size: 89 bytes, params: 1, frame: 4
return {memberListRef: env0_4, translateX: env0_6, swipeDismissRef: env0_5, swipeToChatRef: env0_2,
videoGridRef: env0_3, openChat: openChat, openVoice: openVoice, setIsSwipeToChatDisabled: env0_13};
function openChat(a0) { // fn#61687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7034, offset: 0x01b486df, size: 203 bytes, params: 2, frame: 20
const env0_0 = a0;
(ChatInputUtilsModule).dismissKeyboard();
const value2 = ReanimatedRexportModule.runOnJS(setVoiceChatDrawerState);
const channelIdBinding = channelId;
const OPENING = VoiceChatDrawerState.OPENING;
value2(channelIdBinding, OPENING);
const runOnUI = ReanimatedRexportModule.runOnUI;
const openChatN2 = openChatN;
const object = {immediate: a0, translateX: env1_6};
object.width = width;
object.withPanGestureTiming = (require(12072) /* metro dependency 12072: PanGestureAnimations */).withPanGestureTiming;
openChatN2.__closure = object;
openChatN2.__workletHash = 16904415853957;
openChatN2.__initData = env2_27;
Reflect.apply(runOnUI, ReanimatedRexportModule, [openChatN2])();
function openChatN() { // fn#61688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7133, owner: openChat.n, offset: 0x01b487aa, size: 103 bytes, params: 1, frame: 14
var binding;
var set;
var value2;
var moduleValue;
if (env0_0 === true) {
value = environment.__proto__.__proto__;
binding = env2_6;
binding.set(-width);
} else {
value = environment.__proto__.__proto__;
binding = env2_6;
set = binding.set;
value2 = environment.__proto__.__proto__.__proto__;
moduleValue = require(12072) /* metro dependency 12072: PanGestureAnimations */;
Reflect.apply(set, binding, [moduleValue.withPanGestureTiming(-width)]);
}
}
}
function openVoice() { // fn#61689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7352, offset: 0x01b48811, size: 183 bytes, params: 1, frame: 18
const value2 = ReanimatedRexportModule.runOnJS(setVoiceChatDrawerState);
const channelIdBinding = channelId;
const CLOSING = VoiceChatDrawerState.CLOSING;
value2(channelIdBinding, CLOSING);
(ChatInputUtilsModule).dismissKeyboard();
const runOnUI = ReanimatedRexportModule.runOnUI;
const openVoiceT2 = openVoiceT;
const object = {translateX: env1_6};
object.withPanGestureTiming = (require(12072) /* metro dependency 12072: PanGestureAnimations */).withPanGestureTiming;
openVoiceT2.__closure = object;
openVoiceT2.__workletHash = 15753790715008;
openVoiceT2.__initData = env2_28;
Reflect.apply(runOnUI, ReanimatedRexportModule, [openVoiceT2])();
function openVoiceT() { // fn#61690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7451, owner: openVoice.t, offset: 0x01b488c8, size: 57 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
const binding = env2_6;
const set = binding.set;
value = environment.__proto__.__proto__.__proto__;
value = require(12072) /* metro dependency 12072: PanGestureAnimations */;
Reflect.apply(set, binding, [value.withPanGestureTiming(0)]);
}
}
}
}
}
function openVoiceT() { // fn#61690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7892:7451, owner: openVoice.t, offset: 0x01b488c8, size: 57 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
const binding = env2_6;
const set = binding.set;
value = environment.__proto__.__proto__.__proto__;
value = require(12072) /* metro dependency 12072: PanGestureAnimations */;
Reflect.apply(set, binding, [value.withPanGestureTiming(0)]);
}
global.__d(_fun61664, 7714, [57, 31, 4606, 1379, 7715, 7716, 7722, 661, 33, 7721, 7723, 4007, 7728, 10722, 7725,
10723, 4017, 4015, 12072, 566, 1478, 7724, 12073, 6771, 6789, 12083, 7709, 5321, 10665,
2]) /* metro module 7714, dependencies: [57, 31, 4606, 1379, 7715, 7716, 7722, 661, 33, 7721, 7723, 4007, 7728, 10722, 7725, 10723, 4017, 4015, 12072, 566, 1478, 7724, 12073, 6771, 6789, 12083, 7709, 5321, 10665, 2] */;
@@ -1,104 +1,109 @@
/* Metro module 10722; source: modules/video_calls/native/components/ChannelCallModalManager.tsx; dependencies: [6, 7, 15, 17, 18, 1878, 4297, 694, 7709, 4561, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import VoiceStateStore from '../../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import LifecycleManager from '../../../../lib/LifecycleManager.tsx'; /* Metro dependency 4561 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun82368(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:6, offset: 0x01ef480c, size: 262 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
let value = LifecycleManager;
value = _fun82372(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallModalManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelCallModalManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_82369() { // fn#82369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:168, offset: 0x01ef4912, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_82369() { // fn#82369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:168, offset: 0x01ef4912, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_82369_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_82369_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun82372(a0) { // fn#82372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:371, offset: 0x01ef4974, size: 97 bytes, params: 2, frame: 16
const closure = ChannelCallModalManager;
env0_7(closure, a0);
return env0_4(closure, [{key: '_initialize', value: function(a0) {
this.channel = a0;
var value2 = UserStore.getCurrentUser();
this.inVoiceChannel = a0 != null && value2 != null && VoiceStateStore.isInChannel(a0.id, value2.id);
VoiceStateStore.addChangeListener(this.handleCloseModal);
}}, {key: '_terminate', value: function() {
VoiceStateStore.removeChangeListener(this.handleCloseModal);
}}]);
}
function _fun82372(a0) { // fn#82372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:371, offset: 0x01ef4974, size: 97 bytes, params: 2, frame: 16
const ChannelCallModalManager2 = ChannelCallModalManager;
Inherits(ChannelCallModalManager2, a0);
return CreateClass(ChannelCallModalManager2, [{key: '_initialize', value: function(a0) {
this.channel = a0;
var value2 = UserStore.getCurrentUser();
this.inVoiceChannel = a0 != null && value2 != null && VoiceStateStore.isInChannel(a0.id, value2.id);
VoiceStateStore.addChangeListener(this.handleCloseModal);
}}, {key: '_terminate', value: function() {
VoiceStateStore.removeChangeListener(this.handleCloseModal);
}}]);
function ChannelCallModalManager(a0) { // fn#82373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:383, offset: 0x01ef49d5, size: 153 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ChannelCallModalManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(ChannelCallModalManager);
binding = env1_5;
if (_isNativeReflectConstruct_82369()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.inVoiceChannel = false;
value.handleCloseModal = handleCloseModal;
return value;
function handleCloseModal() { // fn#82374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:677, owner: ChannelCallModalManager.handleCloseModal, offset: 0x01ef4a6e, size: 181 bytes, params: 1, frame: 19
const channel = channel2.channel;
var channel2 = channel;
const currentUser = UserStore.getCurrentUser();
const r1 = channel != null && currentUser != null && VoiceStateStore.isInChannel(channel.id, currentUser.id);
if (channel != null && channel2.inVoiceChannel && channel2.inVoiceChannel !== r1) {
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun82375);
channel2.terminate();
}
channel2.inVoiceChannel = r1;
function _fun82375() { // fn#82375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:828, offset: 0x01ef4b23, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
value.dismissVoiceChannelScreens(channel);
}
}
}
function ChannelCallModalManager(a0) { // fn#82373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:383, offset: 0x01ef49d5, size: 153 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ChannelCallModalManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(ChannelCallModalManager);
binding = env1_5;
if (_isNativeReflectConstruct_82369()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.inVoiceChannel = false;
value.handleCloseModal = handleCloseModal;
return value;
}
function handleCloseModal() { // fn#82374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:677, owner: ChannelCallModalManager.handleCloseModal, offset: 0x01ef4a6e, size: 181 bytes, params: 1, frame: 19
const channel = env0_0.channel;
var env0_0 = channel;
const currentUser = UserStore.getCurrentUser();
const r1 = channel != null && currentUser != null && VoiceStateStore.isInChannel(channel.id, currentUser.id);
if (channel != null && env0_0.inVoiceChannel && env0_0.inVoiceChannel !== r1) {
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun82375);
env0_0.terminate();
}
env0_0.inVoiceChannel = r1;
}
function _fun82375() { // fn#82375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10908:828, offset: 0x01ef4b23, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
value.dismissVoiceChannelScreens(channel);
}
global.__d(_fun82368, 10722, [6, 7, 15, 17, 18, 1878, 4297, 694, 7709, 4561,
2]) /* metro module 10722, dependencies: [6, 7, 15, 17, 18, 1878, 4297, 694, 7709, 4561, 2] */;
@@ -1,6 +1,26 @@
/* Metro module 10723; source: modules/video_calls/native/components/ChannelCallNavigator.tsx; dependencies: [5, 57, 31, 27, 10724, 7716, 661, 8871, 33, 4501, 1478, 10665, 4017, 10725, 10902, 7721, 5072, 5080, 10206, 1962, 1239, 10785, 11982, 4003, 10737, 477, 3868, 4037, 5280, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseColorThemeBackground from '../../../client_themes/native/useColorThemeBackground.tsx'; /* Metro dependency 4003 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import GuildThemeGuildIdOverrideContext from '../../../guild_themes/native/GuildThemeGuildIdOverrideContext.tsx'; /* Metro dependency 4037 */
import SafeAreaDisabledStore from '../../../panels/morphable/native/SafeAreaDisabledStore.tsx'; /* Metro dependency 10724 */
import GlobalStatusIndicator from '../../../connectivity/native/components/GlobalStatusIndicator.tsx'; /* Metro dependency 10737 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ComponentDispatchUtilsModule from '../../../../utils/ComponentDispatchUtils.tsx'; /* Metro dependency 1239 */
import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as AgeGateUtilsModule from '../../../age_gate/AgeGateUtils.tsx'; /* Metro dependency 5072 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as ChannelCallConstantsModule from '../ChannelCallConstants.tsx'; /* Metro dependency 7716 */
import * as VoiceChatHooksModule from '../../../voice_chat/VoiceChatHooks.tsx'; /* Metro dependency 7721 */
import * as ConstantsModule2 from '../../../oauth2/native/Constants.tsx'; /* Metro dependency 8871 */
function _fun82378(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:6, offset: 0x01ef4bd4, size: 528 bytes, params: 8, frame: 22
var object5;
const env0_0 = require;
const getScreens_82379 = function({channel}) {
var MAIN_CALL_SCREEN = ChannelCallScreens.MAIN_CALL_SCREEN;
@@ -9,246 +29,274 @@ function _fun82378(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.View;
const StyleSheet = value.StyleSheet;
const safeAreaDisabledStore = importDefault(10724) /* metro dependency 10724: SafeAreaDisabledStore */;
const env0_9 = (require(7716) /* metro dependency 7716: ChannelCallConstants */).ChannelCallScreens;
const env0_10 = (require(661) /* metro dependency 661: Constants */).ComponentActions;
const env0_11 = (require(8871) /* metro dependency 8871: Constants */).OAUTH2_AUTHORIZE_MODAL_KEY;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {flex: {'flex': 1, 'alignSelf': 'stretch'}};
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['right'] = undefined;
object5.textInVoiceContainer = object6;
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['right'] = '50%';
object5.voiceContainer = object7;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['left'] = '50%';
object5.textContainer = object8;
const env0_14 = Reflect.apply(createStyles, value, [object5]);
object5 = {code: 'function ChannelCallNavigatorTsx1(){const{width,translateX}=this.__closure;var _translateX$get,_translateX;return{width:width,transform:[{translateX:(_translateX$get=(_translateX=translateX)===null||_translateX===void 0?void 0:_translateX.get())!==null&&_translateX$get!==void 0?_translateX$get:0}]};}'};
object5 = {code: "function ChannelCallNavigatorTsx2(){const{interpolate,translateX,width}=this.__closure;var _translateX$get,_translateX;return{backgroundColor:'black',opacity:interpolate((_translateX$get=(_translateX=translateX)===null||_translateX===void 0?void 0:_translateX.get())!==null&&_translateX$get!==void 0?_translateX$get:0,[-width,0],[0.9,0])};}"};
object5 = {code: 'function ChannelCallNavigatorTsx3(){const{translateX}=this.__closure;var _translateX$get,_translateX;return Math.abs((_translateX$get=(_translateX=translateX)===null||_translateX===void 0?void 0:_translateX.get())!==null&&_translateX$get!==void 0?_translateX$get:0)>0;}'};
object5 = {code: 'function ChannelCallNavigatorTsx4(isMoving,previous){const{runOnJS,setShouldRenderChat}=this.__closure;if(!isMoving||isMoving===previous)return;runOnJS(setShouldRenderChat)(true);}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallNavigator.tsx');
exports.default = ChannelCallNavigator;
}
function getScreens_82379({channel}) { // fn#82379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:514, offset: 0x01ef4de4, size: 62 bytes, params: 2, frame: 4
const MAIN_CALL_SCREEN = ChannelCallScreens.MAIN_CALL_SCREEN;
return {[MAIN_CALL_SCREEN]: {'headerShown': false, 'ignoreKeyboard': true, 'gestureEnabled': false, 'title': '',
render: render_82380}};
}
function CallWithVoiceChat({channel}) { // fn#82381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:1821, offset: 0x01ef4e44, size: 810 bytes, params: 2, frame: 28
const styles = useStyles();
const value3 = 2 * (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const translateX = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.translateX;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = CallWithVoiceChatH;
closure.__closure = {width: value3, translateX: translateX};
closure.__workletHash = 4309613236072;
closure.__initData = env0_15;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = CallWithVoiceChat_;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, translateX: translateX, width: value3};
closure.__workletHash = 1339801810447;
closure.__initData = env0_16;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const binding = env0_5;
const useState = binding.useState;
const value11 = env0_4(Reflect.apply(useState, binding, [(translateX?.get() ?? 0) > 0]), 2);
const property = value11[0];
const property2 = value11[1];
const moduleValue4 = reanimatedRexportModule;
const useAnimatedReaction = moduleValue4.useAnimatedReaction;
closure = CallWithVoiceChatC;
closure.__closure = {translateX: translateX};
closure.__workletHash = 3076815293699;
closure.__initData = env0_17;
const closure2 = CallWithVoiceChatV;
closure2.__closure = {runOnJS: reanimatedRexportModule.runOnJS, setShouldRenderChat: property2};
closure2.__workletHash = 661145094859;
closure2.__initData = env0_18;
Reflect.apply(useAnimatedReaction, moduleValue4, [closure, closure2]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.textInVoiceContainer, value6];
const r13 = channel.isGuildStageVoice() ? ((Component) => <Component channel={channel} />)(importDefault(10725) /* metro dependency 10725: StageChannelCallNavigator */) : null;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={items2}>
<View style={styles.voiceContainer}>
{r13}
<View3 pointerEvents="box-none" style={[value7, StyleSheet.absoluteFill]} />
</View>
<View style={styles.textContainer}>
{property ? ((Component) => <Component channel={channel} />)(importDefault(10902) /* metro dependency 10902: ChannelVoiceChat */) : null}
</View>
</View2>
);
}
function MainCallScreen({channel}) { // fn#82386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3187, offset: 0x01ef52c4, size: 524 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
env0_5.useEffect(_fun82387, [value2, env0_5.useId()]);
const value4 = (require(5072) /* metro dependency 5072: AgeGateUtils */).useIsChannelContentGated(channel);
env0_5.useEffect(function() {
var env0_1 = _fun82390;
var closure = _fun82391;
var env0_2 = closure;
var env0_3 = _fun82392;
var env0_0 = false;
var ComponentDispatch = require(dependencyMap[20]).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.SHOW_OAUTH2_MODAL, closure);
return _fun82395;
}, []);
const r7 = value4 ? ((Component) => <Component onReturnToSafety={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop} guildId={channel.guild_id} channelId={channel.id} />)(importDefault(11982) /* metro dependency 11982: GuildNSFW */) : (require(10785) /* metro dependency 10785: useIsVoiceChannelFull */).useIsVoiceChannelLocked(channel) || channel.isVocalThread() ? <View style={styles.flex}>{channel.isGuildStageVoice() ? ((Component) => <Component channel={channel} />)(importDefault(10725) /* metro dependency 10725: StageChannelCallNavigator */) : null}</View> : <CallWithVoiceChat channel={channel} />;
const value11 = (importDefault(4003) /* metro dependency 4003: useColorThemeBackground */)();
const GlobalStatusIndicator = importDefault(10737) /* metro dependency 10737: GlobalStatusIndicator */;
const r6 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || !value2;
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
return (
<GlobalStatusIndicator forceHide={r6} showWhenParticipantOnScreen={!value2}>
<ThemeContextProvider gradient={value11}>
{r7}
</ThemeContextProvider>
</GlobalStatusIndicator>
);
}
function ChannelCallNavigator({channel}) { // fn#82396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:4596, offset: 0x01ef570d, size: 151 bytes, params: 2, frame: 20
const MAIN_CALL_SCREEN = ChannelCallScreens.MAIN_CALL_SCREEN;
const Provider = (importDefault(4037) /* metro dependency 4037: GuildThemeGuildIdOverrideContext */).Provider;
const r4 = channel.guild_id ?? null;
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return (
<Provider value={r4}>
<Navigator screens={getScreens_82379({channel: channel})} initialRouteName={MAIN_CALL_SCREEN} />
</Provider>
);
}
function getScreens_82379Render() { // fn#82380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:643, owner: getScreens_82379.render, offset: 0x01ef4e22, size: 34 bytes, params: 1, frame: 13
return <MainCallScreen channel={channel} />;
}
function CallWithVoiceChatH() { // fn#82382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2009, owner: CallWithVoiceChat.h, offset: 0x01ef516e, size: 74 bytes, params: 1, frame: 13
object = {flex: {'flex': 1, 'alignSelf': 'stretch'}};
const object2 = {};
object2.width = env0_0;
object2.transform = [{translateX: translateX?.get() ?? 0}];
return object2;
}
function CallWithVoiceChat_() { // fn#82383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2220, owner: CallWithVoiceChat._, offset: 0x01ef51b8, size: 126 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = undefined;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
const r6 = translateX == null ? value : translateX.get();
value = 0;
return {backgroundColor: 'black', opacity: Reflect.apply(interpolate, reanimatedRexportModule, [r6 ?? value,
[-env0_0, value], [0.9, 0]])};
}
function CallWithVoiceChatC() { // fn#82384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2585, owner: CallWithVoiceChat.C, offset: 0x01ef5236, size: 70 bytes, params: 1, frame: 14
const Math = global.Math;
const abs = Math.abs;
const r4 = translateX?.get();
const value = 0;
return Reflect.apply(abs, Math, [r4 ?? value]) > value;
}
function CallWithVoiceChatV(a0, a1) { // fn#82385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2737, owner: CallWithVoiceChat.v, offset: 0x01ef527c, size: 72 bytes, params: 3, frame: 12
var r0;
let value = a0;
if (value) {
value = value !== a1;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_2);
value(true);
}
}
function _fun82387() { // fn#82387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3302, offset: 0x01ef54d0, size: 61 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env0_1, lockEnabled: env0_0});
return _fun82388;
}
function _fun82389() { // fn#82389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3505, offset: 0x01ef5541, size: 103 bytes, params: 1, frame: 15
const closure = function() {
return _showOAuth2Modal.apply(this, arguments);
};
let ComponentDispatch = (require(1239) /* metro dependency 1239: ComponentDispatchUtils */).ComponentDispatch;
const subscribe = ComponentDispatch.subscribe;
let SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
Reflect.apply(subscribe, ComponentDispatch, [SHOW_OAUTH2_MODAL, closure]);
return function() {
var ComponentDispatch = require(dependencyMap[20]).ComponentDispatch;
var SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
ComponentDispatch.unsubscribe(SHOW_OAUTH2_MODAL, showOAuth2Modal);
dismissOAuthModal();
};
}
function _fun82388() { // fn#82388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3370, offset: 0x01ef550d, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env1_1, lockEnabled: false});
}
function dismissOAuthModal() { // fn#82390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3519, offset: 0x01ef55a8, size: 60 bytes, params: 1, frame: 13
var value2;
if (env0_0) {
value2 = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(OAUTH2_AUTHORIZE_MODAL_KEY);
}
}
function _showOAuth2Modal() { // fn#82392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3654, offset: 0x01ef55e4, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun82394).apply(this, arguments);
}
function* _fun82394(a0) { // fn#82394, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3709, offset: 0x01ef5624, size: 163 bytes, params: 2, frame: 20
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_1;
var binding2 = env4_2;
binding(binding2[17]).popWithKey(env4_11);
var value4 = binding(binding2[17]);
var pushLazy = value4.pushLazy;
var value6 = env4_0(binding2[19])(binding2[18], binding2.paths);
var object2 = {};
copyDataProperties(object2, a0, undefined);
object2['dismissOAuthModal'] = env2_1;
yield Reflect.apply(pushLazy, value4, [value6, object2, env4_11]);
if (false) {
return undefined;
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['right'] = undefined;
object.textInVoiceContainer = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['right'] = '50%';
object.voiceContainer = object3;
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['left'] = '50%';
object.textContainer = object4;
const env0_14 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function ChannelCallNavigatorTsx1(){const{width,translateX}=this.__closure;var _translateX$get,_translateX;return{width:width,transform:[{translateX:(_translateX$get=(_translateX=translateX)===null||_translateX===void 0?void 0:_translateX.get())!==null&&_translateX$get!==void 0?_translateX$get:0}]};}'};
object = {code: "function ChannelCallNavigatorTsx2(){const{interpolate,translateX,width}=this.__closure;var _translateX$get,_translateX;return{backgroundColor:'black',opacity:interpolate((_translateX$get=(_translateX=translateX)===null||_translateX===void 0?void 0:_translateX.get())!==null&&_translateX$get!==void 0?_translateX$get:0,[-width,0],[0.9,0])};}"};
object = {code: 'function ChannelCallNavigatorTsx3(){const{translateX}=this.__closure;var _translateX$get,_translateX;return Math.abs((_translateX$get=(_translateX=translateX)===null||_translateX===void 0?void 0:_translateX.get())!==null&&_translateX$get!==void 0?_translateX$get:0)>0;}'};
object = {code: 'function ChannelCallNavigatorTsx4(isMoving,previous){const{runOnJS,setShouldRenderChat}=this.__closure;if(!isMoving||isMoving===previous)return;runOnJS(setShouldRenderChat)(true);}'};
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelCallNavigator.tsx');
exports.default = ChannelCallNavigator;
function getScreens_82379({channel}) { // fn#82379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:514, offset: 0x01ef4de4, size: 62 bytes, params: 2, frame: 4
const MAIN_CALL_SCREEN = ChannelCallScreens.MAIN_CALL_SCREEN;
return {[MAIN_CALL_SCREEN]: {'headerShown': false, 'ignoreKeyboard': true, 'gestureEnabled': false, 'title': '',
render: render_82380}};
function getScreens_82379Render() { // fn#82380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:643, owner: getScreens_82379.render, offset: 0x01ef4e22, size: 34 bytes, params: 1, frame: 13
return <MainCallScreen channel={channel} />;
}
}
function CallWithVoiceChat({channel}) { // fn#82381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:1821, offset: 0x01ef4e44, size: 810 bytes, params: 2, frame: 28
const styles = useStyles();
const value3 = 2 * (UseWindowDimensionsNative)().width;
const translateX = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.translateX;
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = CallWithVoiceChatH;
closure.__closure = {width: value3, translateX: translateX};
closure.__workletHash = 4309613236072;
closure.__initData = env0_15;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = CallWithVoiceChat_;
closure.__closure = {interpolate: ReanimatedRexportModule.interpolate, translateX: translateX, width: value3};
closure.__workletHash = 1339801810447;
closure.__initData = env0_16;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const useState = ReactModule.useState;
const value11 = Module00057(Reflect.apply(useState, ReactModule, [(translateX?.get() ?? 0) > 0]), 2);
const property = value11[0];
const property2 = value11[1];
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = CallWithVoiceChatC;
closure.__closure = {translateX: translateX};
closure.__workletHash = 3076815293699;
closure.__initData = env0_17;
const CallWithVoiceChatV2 = CallWithVoiceChatV;
CallWithVoiceChatV2.__closure = {runOnJS: ReanimatedRexportModule.runOnJS, setShouldRenderChat: property2};
CallWithVoiceChatV2.__workletHash = 661145094859;
CallWithVoiceChatV2.__initData = env0_18;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, CallWithVoiceChatV2]);
const View2 = (ReanimatedRexport).View;
const items2 = [styles.textInVoiceContainer, value6];
const r13 = (
channel.isGuildStageVoice()
? ((Component) => <Component channel={channel} />)(importDefault(10725) /* metro dependency 10725: StageChannelCallNavigator */)
: null
);
const View3 = (ReanimatedRexport).View;
return (
<View2 style={items2}>
<View style={styles.voiceContainer}>
{r13}
<View3 pointerEvents="box-none" style={[value7, StyleSheet.absoluteFill]} />
</View>
<View style={styles.textContainer}>
{
property
? ((Component) => <Component channel={channel} />)(importDefault(10902) /* metro dependency 10902: ChannelVoiceChat */)
: null
}
</View>
</View2>
);
function CallWithVoiceChatH() { // fn#82382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2009, owner: CallWithVoiceChat.h, offset: 0x01ef516e, size: 74 bytes, params: 1, frame: 13
const object = {};
object.width = env0_0;
object.transform = [{translateX: translateX?.get() ?? 0}];
return object;
}
function CallWithVoiceChat_() { // fn#82383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2220, owner: CallWithVoiceChat._, offset: 0x01ef51b8, size: 126 bytes, params: 1, frame: 18
let value = environment.__proto__;
value = undefined;
const interpolate = ReanimatedRexportModule.interpolate;
const r6 = translateX == null ? value : translateX.get();
value = 0;
return {backgroundColor: 'black', opacity: Reflect.apply(interpolate, ReanimatedRexportModule, [r6 ?? value,
[-env0_0, value], [0.9, 0]])};
}
function CallWithVoiceChatC() { // fn#82384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2585, owner: CallWithVoiceChat.C, offset: 0x01ef5236, size: 70 bytes, params: 1, frame: 14
const Math = global.Math;
const abs = Math.abs;
const r4 = translateX?.get();
const value = 0;
return Reflect.apply(abs, Math, [r4 ?? value]) > value;
}
function CallWithVoiceChatV(a0, a1) { // fn#82385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:2737, owner: CallWithVoiceChat.v, offset: 0x01ef527c, size: 72 bytes, params: 3, frame: 12
var r0;
let value = a0;
if (value) {
value = value !== a1;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env0_2);
value(true);
}
}
}
function MainCallScreen({channel}) { // fn#82386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3187, offset: 0x01ef52c4, size: 524 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (VoiceChatHooksModule).useIsConnectedToVoiceChannel(channel);
ReactModule.useEffect(_fun82387, [value2, ReactModule.useId()]);
const value4 = (AgeGateUtilsModule).useIsChannelContentGated(channel);
ReactModule.useEffect(function() {
var env0_1 = _fun82390;
var closure = _fun82391;
var env0_2 = closure;
var env0_3 = _fun82392;
var env0_0 = false;
var ComponentDispatch = require(dependencyMap[20]).ComponentDispatch;
ComponentDispatch.subscribe(ComponentActions.SHOW_OAUTH2_MODAL, closure);
return _fun82395;
}, []);
const r7 = (
value4
? ((Component) => <Component onReturnToSafety={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop} guildId={channel.guild_id} channelId={channel.id} />)(importDefault(11982) /* metro dependency 11982: GuildNSFW */)
: (
(require(10785) /* metro dependency 10785: useIsVoiceChannelFull */).useIsVoiceChannelLocked(channel) || channel.isVocalThread()
? (
<View style={styles.flex}>
{
channel.isGuildStageVoice()
? ((Component) => <Component channel={channel} />)(importDefault(10725) /* metro dependency 10725: StageChannelCallNavigator */)
: null
}
</View>
)
: (
<CallWithVoiceChat channel={channel} />
)
)
);
const value11 = (UseColorThemeBackground)();
const r6 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || !value2;
const ThemeContextProvider = (NativeModule).ThemeContextProvider;
return (
<GlobalStatusIndicator forceHide={r6} showWhenParticipantOnScreen={!value2}>
<ThemeContextProvider gradient={value11}>
{r7}
</ThemeContextProvider>
</GlobalStatusIndicator>
);
function _fun82387() { // fn#82387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3302, offset: 0x01ef54d0, size: 61 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env0_1, lockEnabled: env0_0});
return _fun82388;
function _fun82388() { // fn#82388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3370, offset: 0x01ef550d, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
SafeAreaDisabledStore.getState().requestSafeAreaDisableLock({key: env1_1, lockEnabled: false});
}
}
function _fun82389() { // fn#82389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3505, offset: 0x01ef5541, size: 103 bytes, params: 1, frame: 15
const closure = function() {
return _showOAuth2Modal.apply(this, arguments);
};
let ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
const subscribe = ComponentDispatch.subscribe;
let SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
Reflect.apply(subscribe, ComponentDispatch, [SHOW_OAUTH2_MODAL, closure]);
return function() {
var ComponentDispatch = require(dependencyMap[20]).ComponentDispatch;
var SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
ComponentDispatch.unsubscribe(SHOW_OAUTH2_MODAL, showOAuth2Modal);
dismissOAuthModal_82390();
};
function dismissOAuthModal_82390() { // fn#82390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3519, offset: 0x01ef55a8, size: 60 bytes, params: 1, frame: 13
var value2;
if (env0_0) {
value2 = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(OAUTH2_AUTHORIZE_MODAL_KEY);
}
}
function showOAuth2Modal() { // fn#82391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3581, offset: 0x00d6afe6, size: 30 bytes, params: 1, frame: 13
return _showOAuth2Modal.apply(this, arguments);
}
function _showOAuth2Modal() { // fn#82392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3654, offset: 0x01ef55e4, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun82394).apply(this, arguments);
function* _fun82394(a0) { // fn#82394, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3709, offset: 0x01ef5624, size: 163 bytes, params: 2, frame: 20
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var binding = env4_1;
var binding2 = env4_2;
binding(binding2[17]).popWithKey(env4_11);
var value4 = binding(binding2[17]);
var pushLazy = value4.pushLazy;
var value6 = env4_0(binding2[19])(binding2[18], binding2.paths);
var object = {};
copyDataProperties(object, a0, undefined);
object['dismissOAuthModal'] = env2_1;
yield Reflect.apply(pushLazy, value4, [value6, object, env4_11]);
if (false) {
return undefined;
}
}
}
}
function _fun82395() { // fn#82395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:3951, offset: 0x01ef56c7, size: 70 bytes, params: 1, frame: 15
const ComponentDispatch = (ComponentDispatchUtilsModule).ComponentDispatch;
const unsubscribe = ComponentDispatch.unsubscribe;
const SHOW_OAUTH2_MODAL = ComponentActions.SHOW_OAUTH2_MODAL;
Reflect.apply(unsubscribe, ComponentDispatch, [SHOW_OAUTH2_MODAL, showOAuth2Modal]);
dismissOAuthModal_82390();
}
}
}
function ChannelCallNavigator({channel}) { // fn#82396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10909:4596, offset: 0x01ef570d, size: 151 bytes, params: 2, frame: 20
const MAIN_CALL_SCREEN = ChannelCallScreens.MAIN_CALL_SCREEN;
const Provider = (GuildThemeGuildIdOverrideContext).Provider;
const r4 = channel.guild_id ?? null;
const Navigator = (NavigatorNativeModule).Navigator;
return (
<Provider value={r4}>
<Navigator screens={getScreens_82379({channel: channel})} initialRouteName={MAIN_CALL_SCREEN} />
</Provider>
);
}
}
global.__d(_fun82378, 10723, [5, 57, 31, 27, 10724, 7716, 661, 8871, 33, 4501, 1478, 10665, 4017, 10725, 10902,
7721, 5072, 5080, 10206, 1962, 1239, 10785, 11982, 4003, 10737, 477, 3868, 4037, 5280,
2]) /* metro module 10723, dependencies: [5, 57, 31, 27, 10724, 7716, 661, 8871, 33, 4501, 1478, 10665, 4017, 10725, 10902, 7721, 5072, 5080, 10206, 1962, 1239, 10785, 11982, 4003, 10737, 477, 3868, 4037, 5280, 2] */;
@@ -1,72 +1,93 @@
/* Metro module 10772; source: modules/video_calls/native/components/ChannelCallNavigatorIcon.tsx; dependencies: [31, 27, 7715, 661, 33, 4501, 697, 5278, 4002, 4564, 1305, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
function _fun82831(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10958:6, offset: 0x01f031d4, size: 464 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.StyleSheet;
const env0_5 = (require(7715) /* metro dependency 7715: ChannelCallStore */).resetFocusTimer;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.pressableContainer = {marginHorizontal: 4};
const object6 = {};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.pressable = object6;
const object7 = {'flexDirection': 'row', 'height': 32, 'width': 32, 'borderRadius': null, 'alignItems': 'center',
object = {};
object.pressableContainer = {marginHorizontal: 4};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.pressable = object3;
const object4 = {'flexDirection': 'row', 'height': 32, 'width': 32, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center', 'overflow': 'hidden'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object7.backgroundColor = BACKGROUND_BASE_LOW;
object2.container = object7;
const object8 = {'marginLeft': 4, 'fontSize': 14};
object4.backgroundColor = BACKGROUND_BASE_LOW;
object.container = object4;
const object5 = {'marginLeft': 4, 'fontSize': 14};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object8.fontFamily = PRIMARY_SEMIBOLD;
object5.fontFamily = PRIMARY_SEMIBOLD;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object8.color = WHITE;
object2.text = object8;
object2.disabled = {opacity: 0.5};
object5.color = WHITE;
object.text = object5;
object.disabled = {opacity: 0.5};
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
object2.iconColor = {color: ICON_SUBTLE};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallNavigatorIcon.tsx');
object.iconColor = {color: ICON_SUBTLE};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelCallNavigatorIcon.tsx');
exports.default = _default_82832;
function _default_82832({onPress, source, accessibilityLabel, children, membersCount, disabled, theme, disableBackground, containerStyle, IconComponent}) { // fn#82832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10958:674, offset: 0x01f033a4, size: 568 bytes, params: 2, frame: 31
theme = theme === undefined ? 'dark' : theme;
disableBackground = disableBackground === undefined || disableBackground;
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {accessibilityRole: 'button', accessibilityLabel: accessibilityLabel,
disabled: disabled, style: styles.pressable, onPress: function() {
if (resetFocusTimer != null) {
resetFocusTimer();
}
onPress();
}};
const items3 = [styles.container, containerStyle];
disabled = disabled && styles.disabled;
items3[2] = disabled;
const items2 = [
(require(4002) /* metro dependency 4002: shared */).isThemeDark(theme)
? (
disableBackground
? null
: ((Component) => <Component blurTheme="dark" style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */)
)
: null,
];
items2[1] = (
IconComponent != null
? (
<IconComponent color={styles.iconColor.color} size="sm" />
)
: ((Icon) => <Icon source={source} color={styles.iconColor.color} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} />)((require(1305) /* metro dependency 1305: native */).Icon)
);
items2[2] = membersCount != null && membersCount > 0 && ((LegacyText) => <LegacyText style={styles.text}>{membersCount}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText);
return (
<View style={styles.pressableContainer}>
<PressableOpacity {...pressableOpacityProps}>
<View style={items3}>
{items2}
</View>
{children}
</PressableOpacity>
</View>
);
}
}
function _default_82832({onPress, source, accessibilityLabel, children, membersCount, disabled, theme, disableBackground, containerStyle, IconComponent}) { // fn#82832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10958:674, offset: 0x01f033a4, size: 568 bytes, params: 2, frame: 31
theme = theme === undefined ? 'dark' : theme;
disableBackground = disableBackground === undefined || disableBackground;
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {accessibilityRole: 'button', accessibilityLabel: accessibilityLabel,
disabled: disabled, style: styles.pressable, onPress: function() {
if (resetFocusTimer != null) {
resetFocusTimer();
}
onPress();
}};
const items3 = [styles.container, containerStyle];
disabled = disabled && styles.disabled;
items3[2] = disabled;
const items2 = [(require(4002) /* metro dependency 4002: shared */).isThemeDark(theme) ? disableBackground ? null : ((Component) => <Component blurTheme="dark" style={StyleSheet.absoluteFill} />)(importDefault(4564) /* metro dependency 4564: VisualEffectView */) : null];
items2[1] = IconComponent != null ? <IconComponent color={styles.iconColor.color} size="sm" /> : ((Icon) => <Icon source={source} color={styles.iconColor.color} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} />)((require(1305) /* metro dependency 1305: native */).Icon);
items2[2] = membersCount != null && membersCount > 0 && ((LegacyText) => <LegacyText style={styles.text}>{membersCount}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText);
return (
<View style={styles.pressableContainer}>
<PressableOpacity {...pressableOpacityProps}>
<View style={items3}>
{items2}
</View>
{children}
</PressableOpacity>
</View>
);
}
global.__d(_fun82831, 10772, [31, 27, 7715, 661, 33, 4501, 697, 5278, 4002, 4564, 1305,
2]) /* metro module 10772, dependencies: [31, 27, 7715, 661, 33, 4501, 697, 5278, 4002, 4564, 1305, 2] */;
@@ -1,68 +1,72 @@
/* Metro module 10849; source: modules/video_calls/native/components/ChannelCallSingleController.tsx; dependencies: [31, 4492, 1226, 661, 4299, 33, 683, 4863, 566, 10850, 10852, 10853, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ApplicationStreamingStore from '../../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as CallConstantsModule from '../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
function _fun83136(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11035:6, offset: 0x01f0ed91, size: 218 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_7 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelCallSingleController.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelCallSingleController.tsx');
exports.ChannelCallSingleController = ChannelCallSingleController;
}
function ChannelCallSingleController({selectedParticipant, channel}) { // fn#83137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11035:326, offset: 0x01f0ee6b, size: 356 bytes, params: 2, frame: 18
var r0;
var id2;
var value3;
var value;
const binding = env0_3;
const useEffect = binding.useEffect;
let id = channel.id;
Reflect.apply(useEffect, binding, [_fun83138, [id]]);
const activeStreamForStreamKey = require(dependencyMap[8]).useStateFromStores([ApplicationStreamingStore],
function() {
return ApplicationStreamingStore.getActiveStreamForStreamKey(selectedParticipant.id);
});
const type = selectedParticipant.type;
const STREAM = ParticipantTypes.STREAM;
if (STREAM === type) {
id = selectedParticipant.user.id;
id2 = AuthenticationStore.getId();
value3 = null;
if (value3 != activeStreamForStreamKey) {
value = importDefault(id === id2 ? dependencyMap[9] : dependencyMap[10]);
value = ((Component) => <Component participant={selectedParticipant} channel={channel} />)(value);
r0 = value;
} else {
r0 = value3;
function ChannelCallSingleController({selectedParticipant, channel}) { // fn#83137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11035:326, offset: 0x01f0ee6b, size: 356 bytes, params: 2, frame: 18
var r0;
var id2;
var value3;
var value;
const useEffect = ReactModule.useEffect;
let id = channel.id;
Reflect.apply(useEffect, ReactModule, [_fun83138, [id]]);
const activeStreamForStreamKey = require(dependencyMap[8]).useStateFromStores([ApplicationStreamingStore],
function() {
return ApplicationStreamingStore.getActiveStreamForStreamKey(selectedParticipant.id);
});
const type = selectedParticipant.type;
const STREAM = ParticipantTypes.STREAM;
if (STREAM === type) {
id = selectedParticipant.user.id;
id2 = AuthenticationStore.getId();
value3 = null;
if (value3 != activeStreamForStreamKey) {
value = importDefault(id === id2 ? dependencyMap[9] : dependencyMap[10]);
value = ((Component) => <Component participant={selectedParticipant} channel={channel} />)(value);
r0 = value;
} else {
r0 = value3;
}
return r0;
}
return r0;
}
const USER = ParticipantTypes.USER;
if (USER === type) {
return ((Component) => <Component participant={selectedParticipant} channel={channel} />)(importDefault(dependencyMap[11]));
}
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
if (HIDDEN_STREAM === type) {
return null;
}
const ACTIVITY = ParticipantTypes.ACTIVITY;
if (ACTIVITY === type) {
throw new global.Error('Activities are not supported on old voice UI');
const USER = ParticipantTypes.USER;
if (USER === type) {
return ((Component) => <Component participant={selectedParticipant} channel={channel} />)(importDefault(dependencyMap[11]));
}
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
if (HIDDEN_STREAM === type) {
return null;
}
const ACTIVITY = ParticipantTypes.ACTIVITY;
if (ACTIVITY === type) {
throw new global.Error('Activities are not supported on old voice UI');
}
function _fun83138() { // fn#83138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11035:377, offset: 0x01f0efcf, size: 105 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const VIDEO_LAYOUT_TOGGLED = AnalyticEvents.VIDEO_LAYOUT_TOGGLED;
const object = {video_layout: 'focus'};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object, value.collectVoiceAnalyticsMetadata(channel.id), value);
Reflect.apply(track, defaultImport, [VIDEO_LAYOUT_TOGGLED, object]);
}
}
}
function _fun83138() { // fn#83138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11035:377, offset: 0x01f0efcf, size: 105 bytes, params: 1, frame: 17
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const VIDEO_LAYOUT_TOGGLED = AnalyticEvents.VIDEO_LAYOUT_TOGGLED;
const object2 = {video_layout: 'focus'};
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
copyDataProperties(object2, value.collectVoiceAnalyticsMetadata(channel.id), value);
Reflect.apply(track, defaultImport, [VIDEO_LAYOUT_TOGGLED, object2]);
}
global.__d(_fun83136, 10849, [31, 4492, 1226, 661, 4299, 33, 683, 4863, 566, 10850, 10852, 10853,
2]) /* metro module 10849, dependencies: [31, 4492, 1226, 661, 4299, 33, 683, 4863, 566, 10850, 10852, 10853, 2] */;
@@ -1,97 +1,126 @@
/* Metro module 10902; source: modules/video_calls/native/components/ChannelVoiceChat.tsx; dependencies: [31, 27, 7715, 33, 4501, 697, 9597, 1585, 10665, 22, 7721, 4048, 7704, 10903, 7725, 11273, 5278, 1244, 1305, 11377, 12067, 2] */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import ThemedGradient from '../../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import MessageManager from '../../../messages/MessageManager.tsx'; /* Metro dependency 9597 */
import Module11377 from '../../../../by-id/module-11377.js'; /* Metro dependency 11377 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as VoiceChatHooksModule from '../../../voice_chat/VoiceChatHooks.tsx'; /* Metro dependency 7721 */
import * as VoiceChatModalContextModule from '../../../voice_chat/native/VoiceChatModalContext.tsx'; /* Metro dependency 10665 */
import * as ChannelContainerModule from '../../../../components_native/ChannelContainer.tsx'; /* Metro dependency 10903 */
import * as ChannelNavbarModule from '../../../navbars/native/components/ChannelNavbar.tsx'; /* Metro dependency 12067 */
function _fun83458(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11088:6, offset: 0x01f1b337, size: 441 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(7715) /* metro dependency 7715: ChannelCallStore */).useIsVoiceChatFocused;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.chat = {'flex': 1, 'backgroundColor': null, 'alignSelf': 'stretch', backgroundColor: BACKGROUND_BASE_LOW};
object.chat = {'flex': 1, 'backgroundColor': null, 'alignSelf': 'stretch', backgroundColor: BACKGROUND_BASE_LOW};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.chatHeaderSpacer = {height: 44, backgroundColor: BACKGROUND_BASE_LOW};
object.chatHeaderSpacer = {height: 44, backgroundColor: BACKGROUND_BASE_LOW};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.chatHeader = {'flexDirection': 'row', 'alignSelf': 'stretch', 'height': 44, 'backgroundColor': null,
object.chatHeader = {'flexDirection': 'row', 'alignSelf': 'stretch', 'height': 44, 'backgroundColor': null,
'alignItems': 'center', 'justifyContent': 'flex-start', 'position': 'absolute', 'left': 0, 'right': 0,
'paddingHorizontal': 16, backgroundColor: BACKGROUND_BASE_LOW};
object2.chatHeaderBackIconContainer = {'width': 32, 'height': 32, 'alignItems': 'flex-start',
object.chatHeaderBackIconContainer = {'width': 32, 'height': 32, 'alignItems': 'flex-start',
'justifyContent': 'center'};
object2.chatHeaderTitleContainer = {'alignSelf': 'stretch', 'flex': 1, 'justifyContent': 'center',
'marginStart': 16};
object.chatHeaderTitleContainer = {'alignSelf': 'stretch', 'flex': 1, 'justifyContent': 'center', 'marginStart': 16};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.safeAreaTop = {alignSelf: 'stretch', backgroundColor: BACKGROUND_BASE_LOW};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
object.safeAreaTop = {alignSelf: 'stretch', backgroundColor: BACKGROUND_BASE_LOW};
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun83459);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelVoiceChat.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelVoiceChat.tsx');
exports.default = value;
function _fun83459(a0) { // fn#83459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11088:874, offset: 0x01f1b4f0, size: 1026 bytes, params: 2, frame: 35
let channel = a0.channel;
const id = channel.id;
const guild_id = channel.guild_id;
channel = a0.channel;
let inModal = a0.inModal;
const value = undefined;
inModal = !(inModal === value) && inModal;
const styles = useStyles();
const value4 = useIsVoiceChatFocused();
env0_3.useEffect(_fun83460, [id, guild_id]);
const top = (UseSafeAreaInsetsNative)().top;
const value5 = (VoiceChatModalContextModule).useVoiceChatNavigationContext();
const value6 = null;
const openVoice = value6 == value5 ? value : value5.openVoice;
const r21 = value6 != openVoice ? openVoice : (importDefault(22) /* metro dependency 22 */).noop;
const value7 = (VoiceChatHooksModule).useIsConnectedToVoiceChannel(channel);
const value8 = env0_3.useRef(value6);
const value9 = (UseTheme)();
const r4 = value4 ? 'yes' : 'no-hide-descendants';
const value12 = !value4;
const value13 = ((Component) => <Component absolute tall />)(ThemedGradient);
const ChannelContainer = (ChannelContainerModule).ChannelContainer;
const items2 = [
inModal
? value6
: ((Component) => <Component hidden={value4 ? value12 : value} animated barStyle={value7 ? 'light-content' : value9 !== 'dark' ? 'dark-content' : 'light-content'} />)(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */),
];
items2[1] = <View style={[styles.safeAreaTop, {height: top, display: inModal ? 'none' : value}]} />;
items2[2] = <View style={[styles.chatHeaderSpacer, {display: inModal ? 'none' : value}]} />;
items2[3] = ((Component) => <Component guildId={guild_id} channelId={id} chatInputRef={value8} screenIndex="voice-panel" />)(importDefault(11273) /* metro dependency 11273: ChatView */);
const items5 = [styles.chatHeader];
items5[1] = {top: top, display: inModal ? 'none' : value};
const PressableOpacity = (PressablesModule).PressableOpacity;
const object2 = {accessibilityRole: 'button', onPress: r21};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
object2.style = styles.chatHeaderBackIconContainer;
const Icon = (NativeModule).Icon;
const iconProps = {source: Module11377};
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
iconProps.size = MEDIUM;
const pressableOpacity = (
<PressableOpacity {...object2}>
<Icon {...iconProps} />
</PressableOpacity>
);
const ChannelTitle = (ChannelNavbarModule).ChannelTitle;
items2[4] = (
<View style={items5}>
{pressableOpacity}
<View style={styles.chatHeaderTitleContainer}>
<ChannelTitle guildId={guild_id} channelId={id} />
</View>
</View>
);
return (
<View
importantForAccessibility={r4}
accessibilityElementsHidden={value12}
style={styles.chat}
>
{value13}
<ChannelContainer guildId={guild_id} channelId={id}>
{items2}
</ChannelContainer>
</View>
);
function _fun83460() { // fn#83460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11088:968, offset: 0x01f1b8f2, size: 59 bytes, params: 1, frame: 14
const value = environment.__proto__;
(MessageManager).fetchMessages({guildId: guild_id, channelId: id});
}
}
}
function _fun83459(a0) { // fn#83459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11088:874, offset: 0x01f1b4f0, size: 1026 bytes, params: 2, frame: 35
let channel = a0.channel;
const id = channel.id;
const guild_id = channel.guild_id;
channel = a0.channel;
let inModal = a0.inModal;
const value = undefined;
inModal = !(inModal === value) && inModal;
const styles = useStyles();
const value4 = useIsVoiceChatFocused();
env0_3.useEffect(_fun83460, [id, guild_id]);
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const value5 = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext();
const value6 = null;
const openVoice = value6 == value5 ? value : value5.openVoice;
const r21 = value6 != openVoice ? openVoice : (importDefault(22) /* metro dependency 22 */).noop;
const value7 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
const value8 = env0_3.useRef(value6);
const value9 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const r4 = value4 ? 'yes' : 'no-hide-descendants';
const value12 = !value4;
const value13 = ((Component) => <Component absolute tall />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const ChannelContainer = (require(10903) /* metro dependency 10903: ChannelContainer */).ChannelContainer;
const items2 = [inModal ? value6 : ((Component) => <Component hidden={value4 ? value12 : value} animated barStyle={value7 ? 'light-content' : value9 !== 'dark' ? 'dark-content' : 'light-content'} />)(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */)];
items2[1] = <View style={[styles.safeAreaTop, {height: top, display: inModal ? 'none' : value}]} />;
items2[2] = <View style={[styles.chatHeaderSpacer, {display: inModal ? 'none' : value}]} />;
items2[3] = ((Component) => <Component guildId={guild_id} channelId={id} chatInputRef={value8} screenIndex="voice-panel" />)(importDefault(11273) /* metro dependency 11273: ChatView */);
const items5 = [styles.chatHeader];
items5[1] = {top: top, display: inModal ? 'none' : value};
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object = {accessibilityRole: 'button', onPress: r21};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
object.style = styles.chatHeaderBackIconContainer;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(11377) /* metro dependency 11377 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
iconProps.size = MEDIUM;
const pressableOpacity = <PressableOpacity {...object}><Icon {...iconProps} /></PressableOpacity>;
const ChannelTitle = (require(12067) /* metro dependency 12067: ChannelNavbar */).ChannelTitle;
items2[4] = <View style={items5}>{pressableOpacity}<View style={styles.chatHeaderTitleContainer}><ChannelTitle guildId={guild_id} channelId={id} /></View></View>;
return (
<View
importantForAccessibility={r4}
accessibilityElementsHidden={value12}
style={styles.chat}
>
{value13}
<ChannelContainer guildId={guild_id} channelId={id}>
{items2}
</ChannelContainer>
</View>
);
}
function _fun83460() { // fn#83460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11088:968, offset: 0x01f1b8f2, size: 59 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(9597) /* metro dependency 9597: MessageManager */).fetchMessages({guildId: guild_id, channelId: id});
}
global.__d(_fun83458, 10902, [31, 27, 7715, 33, 4501, 697, 9597, 1585, 10665, 22, 7721, 4048, 7704, 10903, 7725,
11273, 5278, 1244, 1305, 11377, 12067,
2]) /* metro module 10902, dependencies: [31, 27, 7715, 33, 4501, 697, 9597, 1585, 10665, 22, 7721, 4048, 7704, 10903, 7725, 11273, 5278, 1244, 1305, 11377, 12067, 2] */;
@@ -1,53 +1,60 @@
/* Metro module 12153; source: modules/video_calls/native/components/ChannelVoiceChatModal.tsx; dependencies: [31, 33, 4805, 7712, 9883, 6707, 4037, 10902, 2] */
import GuildThemeGuildIdOverrideContext from '../../../guild_themes/native/GuildThemeGuildIdOverrideContext.tsx'; /* Metro dependency 4037 */
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import ModalStackNavigator from '../../../main_tabs_v2/native/utils/ModalStackNavigator.tsx'; /* Metro dependency 9883 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as StageIconModule from '../../../../design/components/Icon/native/redesign/generated/StageIcon.tsx'; /* Metro dependency 6707 */
function _fun93221(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:6, offset: 0x020ab18b, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ChannelVoiceChatModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ChannelVoiceChatModal.tsx');
exports.default = ChannelVoiceChatModal;
function ChannelVoiceChatModal({channel}) { // fn#93222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:227, offset: 0x020ab219, size: 199 bytes, params: 2, frame: 19
const value2 = (UseChannelName)(channel);
ReactModule.useEffect(_fun93223, [channel.id]);
const r6 = value2 ?? '';
const StageIcon = (StageIconModule).StageIcon;
return (
<ModalStackNavigator
screenKey="StageVoiceChat"
title={r6}
titleIcon={<StageIcon size="sm" />}
render={render_93225}
/>
);
function _fun93223() { // fn#93223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:308, offset: 0x020ab2e0, size: 62 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.updateChatOpen(channel.id, true);
return _fun93224;
function _fun93224() { // fn#93224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:345, offset: 0x020ab31e, size: 53 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.updateChatOpen(channel.id, false);
}
}
function ChannelVoiceChatModalRender() { // fn#93225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:500, owner: ChannelVoiceChatModal.render, offset: 0x020ab353, size: 124 bytes, params: 1, frame: 18
const value = environment.__proto__;
const Provider = (GuildThemeGuildIdOverrideContext).Provider;
const guild_id = channel.guild_id;
const value3 = null;
return (
<Provider value={value3 != guild_id ? guild_id : value3}>
{((Component) => <Component channel={channel} inModal />)(importDefault(10902) /* metro dependency 10902: ChannelVoiceChat */)}
</Provider>
);
}
}
}
function ChannelVoiceChatModal({channel}) { // fn#93222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:227, offset: 0x020ab219, size: 199 bytes, params: 2, frame: 19
const value2 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
env0_3.useEffect(_fun93223, [channel.id]);
const ModalStackNavigator = importDefault(9883) /* metro dependency 9883: ModalStackNavigator */;
const r6 = value2 ?? '';
const StageIcon = (require(6707) /* metro dependency 6707: StageIcon */).StageIcon;
return (
<ModalStackNavigator
screenKey="StageVoiceChat"
title={r6}
titleIcon={<StageIcon size="sm" />}
render={render_93225}
/>
);
}
function _fun93223() { // fn#93223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:308, offset: 0x020ab2e0, size: 62 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.updateChatOpen(channel.id, true);
return _fun93224;
}
function ChannelVoiceChatModalRender() { // fn#93225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:500, owner: ChannelVoiceChatModal.render, offset: 0x020ab353, size: 124 bytes, params: 1, frame: 18
const value = environment.__proto__;
const Provider = (importDefault(4037) /* metro dependency 4037: GuildThemeGuildIdOverrideContext */).Provider;
const guild_id = channel.guild_id;
const value3 = null;
return (
<Provider value={value3 != guild_id ? guild_id : value3}>
{((Component) => <Component channel={channel} inModal />)(importDefault(10902) /* metro dependency 10902: ChannelVoiceChat */)}
</Provider>
);
}
function _fun93224() { // fn#93224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12339:345, offset: 0x020ab31e, size: 53 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.updateChatOpen(channel.id, false);
}
global.__d(_fun93221, 12153, [31, 33, 4805, 7712, 9883, 6707, 4037, 10902,
2]) /* metro module 12153, dependencies: [31, 33, 4805, 7712, 9883, 6707, 4037, 10902, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 7722; source: modules/video_calls/native/components/Constants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun61773(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7900:6, offset: 0x01b4a508, size: 129 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/Constants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/Constants.tsx');
exports.PIP_GESTURE_ACTIVE_OFFSET = 2;
exports.SWIPE_TO_CHAT_ACTIVE_OFFSET = 16;
exports.PAN_GESTURE_FAIL_OFFSET_Y = 5;
@@ -10,3 +12,4 @@ function _fun61773(global, require, importDefault, importAll, module, exports, d
exports.OLD_VOICE_UI_ERROR_STRING = '\nOld Voice UI slated for deletion, if you are seeing\nthis error some old voice code can still run in the mobile redesign,\nand may have been deleted accidentally.\n';
}
global.__d(_fun61773, 7722, [2]) /* metro module 7722, dependencies: [2] */;
@@ -1,11 +1,15 @@
/* Metro module 10687; source: modules/video_calls/native/components/DCDVideoRenderer.tsx; dependencies: [4567, 10688, 2] */
import RequireNativeComponentOrDefaultNative from '../../../../utils/native/requireNativeComponentOrDefault.native.tsx'; /* Metro dependency 4567 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun82162(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10873:6, offset: 0x01eecefb, size: 128 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(4567) /* metro dependency 4567: requireNativeComponentOrDefaultNative */;
let value = RequireNativeComponentOrDefaultNative;
value = value({componentName: 'DCDVideoRenderer',
componentFoundInstance: importDefault(10688) /* metro dependency 10688: VideoRendererNativeComponent */});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/DCDVideoRenderer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/DCDVideoRenderer.tsx');
exports.default = value;
}
global.__d(_fun82162, 10687, [4567, 10688, 2]) /* metro module 10687, dependencies: [4567, 10688, 2] */;
@@ -1,51 +1,57 @@
/* Metro module 10840; source: modules/video_calls/native/components/DisconnectRemoteButton.tsx; dependencies: [31, 4295, 33, 566, 7741, 8160, 10810, 1244, 9422, 9228, 2] */
import GameConsoleStore from '../../../game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun83101(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:6, offset: 0x01f0d6f8, size: 158 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/DisconnectRemoteButton.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/DisconnectRemoteButton.tsx');
exports.DisconnectRemoteButton = DisconnectRemoteButton;
}
function DisconnectRemoteButton({channel, isSmallSize}) { // fn#83102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:252, offset: 0x01f0d796, size: 239 bytes, params: 2, frame: 20
const value2 = require(dependencyMap[3]).useStateFromStoresObject([GameConsoleStore], _fun83103);
const env0_1 = value2.remoteSessionId;
const awaitingRemote = value2.awaitingRemote;
const PrimaryActionButton = importAll(dependencyMap[4]).PrimaryActionButton;
const primaryActionButtonProps = {source: importDefault(awaitingRemote ? dependencyMap[5] : dependencyMap[6])};
const intl = require(dependencyMap[7]).intl;
primaryActionButtonProps.accessibilityLabel = intl.string(require(dependencyMap[7]).t['6vrfgt']);
primaryActionButtonProps.isSmallSize = isSmallSize;
primaryActionButtonProps.onPress = onPress_83104;
return <PrimaryActionButton {...primaryActionButtonProps} />;
function _fun83103() { // fn#83103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:326, offset: 0x01f0d885, size: 47 bytes, params: 1, frame: 11
const object = {};
const value = environment.__proto__;
const gameConsoleStoreBinding = GameConsoleStore;
object.awaitingRemote = gameConsoleStoreBinding.getAwaitingRemoteSessionInfo() != null;
object.remoteSessionId = gameConsoleStoreBinding.getRemoteSessionId();
return object;
}
function DisconnectRemoteButton({channel, isSmallSize}) { // fn#83102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:252, offset: 0x01f0d796, size: 239 bytes, params: 2, frame: 20
const value2 = require(dependencyMap[3]).useStateFromStoresObject([GameConsoleStore], _fun83103);
const env0_1 = value2.remoteSessionId;
const awaitingRemote = value2.awaitingRemote;
const PrimaryActionButton = importAll(dependencyMap[4]).PrimaryActionButton;
const primaryActionButtonProps = {source: importDefault(awaitingRemote ? dependencyMap[5] : dependencyMap[6])};
const intl = require(dependencyMap[7]).intl;
primaryActionButtonProps.accessibilityLabel = intl.string(require(dependencyMap[7]).t['6vrfgt']);
primaryActionButtonProps.isSmallSize = isSmallSize;
primaryActionButtonProps.onPress = onPress_83104;
return <PrimaryActionButton {...primaryActionButtonProps} />;
}
function DisconnectRemoteButtonOnPress() { // fn#83104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:610, owner: DisconnectRemoteButton.onPress, offset: 0x01f0d8b4, size: 121 bytes, params: 1, frame: 15
var value2;
var moduleValue;
var moduleValue2;
var value;
if (remoteSessionId != null) {
value2 = environment.__proto__;
moduleValue = require(9422) /* metro dependency 9422: GameConsoleActionCreators */;
moduleValue.remoteDisconnect(remoteSessionId);
moduleValue2 = require(9228) /* metro dependency 9228: CallsUtils */;
moduleValue2.handleDisconnect(channel);
} else {
value = environment.__proto__;
value = require(9422) /* metro dependency 9422: GameConsoleActionCreators */;
value.disconnectRemote();
}
}
function _fun83103() { // fn#83103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:326, offset: 0x01f0d885, size: 47 bytes, params: 1, frame: 11
const object2 = {};
const value = environment.__proto__;
object2.awaitingRemote = GameConsoleStore.getAwaitingRemoteSessionInfo() != null;
object2.remoteSessionId = GameConsoleStore.getRemoteSessionId();
return object2;
}
function DisconnectRemoteButtonOnPress() { // fn#83104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11026:610, owner: DisconnectRemoteButton.onPress, offset: 0x01f0d8b4, size: 121 bytes, params: 1, frame: 15
var value2;
var moduleValue;
var moduleValue2;
var value;
if (remoteSessionId != null) {
value2 = environment.__proto__;
moduleValue = require(9422) /* metro dependency 9422: GameConsoleActionCreators */;
moduleValue.remoteDisconnect(remoteSessionId);
moduleValue2 = require(9228) /* metro dependency 9228: CallsUtils */;
moduleValue2.handleDisconnect(channel);
} else {
value = environment.__proto__;
value = require(9422) /* metro dependency 9422: GameConsoleActionCreators */;
value.disconnectRemote();
}
}
global.__d(_fun83101, 10840, [31, 4295, 33, 566, 7741, 8160, 10810, 1244, 9422, 9228,
2]) /* metro module 10840, dependencies: [31, 4295, 33, 566, 7741, 8160, 10810, 1244, 9422, 9228, 2] */;
@@ -1,198 +1,249 @@
/* Metro module 10732; source: modules/video_calls/native/components/FocusedControls.tsx; dependencies: [31, 27, 661, 33, 4501, 1305, 4017, 10733, 4504, 6618, 1478, 7744, 10734, 10737, 7723, 4559, 6771, 6789, 10702, 10745, 683, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseCurrentEmbeddedActivity from '../../../activities/utils/useCurrentEmbeddedActivity.tsx'; /* Metro dependency 10702 */
import UseIsInvitedToSpeak from '../../../stage_channels/useIsInvitedToSpeak.tsx'; /* Metro dependency 10733 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as UseIsScreenReaderEnabledNativeModule from '../../../a11y/native/useIsScreenReaderEnabled.native.tsx'; /* Metro dependency 4559 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as RevealProviderModule from './RevealProvider.tsx'; /* Metro dependency 7723 */
import * as Module07744Module from '../../../../by-id/module-07744.js'; /* Metro dependency 7744 */
import * as UseGlobalStatusIndicatorStateModule from '../../../connectivity/native/useGlobalStatusIndicatorState.tsx'; /* Metro dependency 10734 */
import * as GlobalStatusIndicatorModule from '../../../connectivity/native/components/GlobalStatusIndicator.tsx'; /* Metro dependency 10737 */
function _fun82446(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:6, offset: 0x01ef701a, size: 427 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.StyleSheet;
const env0_5 = value2.View;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({backgroundGradient: {'position': 'absolute',
let value = ReactModule;
const env0_9 = (CreateStylesModule).createStyles({backgroundGradient: {'position': 'absolute',
'left': 0, 'right': 0, 'top': 0, 'height': 130}, headerContainer: {'position': 'relative', 'height': 54}});
object2 = {};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.easing = STANDARD_EASING;
object2.duration = 250;
object2 = {code: 'function FocusedControlsTsx1(){const{reveal,FOCUSED_CONTROLS_HEADER_HEIGHT}=this.__closure;return reveal?0:-FOCUSED_CONTROLS_HEADER_HEIGHT;}'};
object2 = {code: 'function FocusedControlsTsx2(){const{withTiming,offsetY,TIMING_CONFIG}=this.__closure;return{transform:[{translateY:withTiming(offsetY.get(),TIMING_CONFIG)}]};}'};
object2 = {code: 'function FocusedControlsTsx3(){const{isInvitedToSpeak,statusIndicatorHeight}=this.__closure;return isInvitedToSpeak?statusIndicatorHeight.get():0;}'};
object2 = {code: 'function FocusedControlsTsx4(){const{reveal}=this.__closure;return reveal?1:0;}'};
object2 = {code: 'function FocusedControlsTsx5(){const{withTiming,top,TIMING_CONFIG,revealOpacity}=this.__closure;return{top:withTiming(top.get(),TIMING_CONFIG),opacity:withTiming(revealOpacity.get(),TIMING_CONFIG)};}'};
object = {};
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.easing = STANDARD_EASING;
object.duration = 250;
object = {code: 'function FocusedControlsTsx1(){const{reveal,FOCUSED_CONTROLS_HEADER_HEIGHT}=this.__closure;return reveal?0:-FOCUSED_CONTROLS_HEADER_HEIGHT;}'};
object = {code: 'function FocusedControlsTsx2(){const{withTiming,offsetY,TIMING_CONFIG}=this.__closure;return{transform:[{translateY:withTiming(offsetY.get(),TIMING_CONFIG)}]};}'};
object = {code: 'function FocusedControlsTsx3(){const{isInvitedToSpeak,statusIndicatorHeight}=this.__closure;return isInvitedToSpeak?statusIndicatorHeight.get():0;}'};
object = {code: 'function FocusedControlsTsx4(){const{reveal}=this.__closure;return reveal?1:0;}'};
object = {code: 'function FocusedControlsTsx5(){const{withTiming,top,TIMING_CONFIG,revealOpacity}=this.__closure;return{top:withTiming(top.get(),TIMING_CONFIG),opacity:withTiming(revealOpacity.get(),TIMING_CONFIG)};}'};
value = value.memo(_fun82451);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/FocusedControls.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/FocusedControls.tsx');
exports.default = value;
exports.FOCUSED_CONTROLS_HEADER_HEIGHT = 54;
}
function FocusedControlsHeader({header, reveal, isTouchingLeftScreenEdge}) { // fn#82447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:711, offset: 0x01ef71c5, size: 361 bytes, params: 2, frame: 25
const styles = useStyles();
const useDerivedValue = ReanimatedRexportModule.useDerivedValue;
let closure = FocusedControlsHeaderL;
closure.__closure = {reveal: reveal, FOCUSED_CONTROLS_HEADER_HEIGHT: 54};
closure.__workletHash = 15509217225804;
closure.__initData = env0_11;
const value2 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const value3 = (UseIsInvitedToSpeak)();
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = FocusedControlsHeaderC;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, offsetY: value2,
TIMING_CONFIG: env0_10};
closure.__workletHash = 12710345257882;
closure.__initData = env0_12;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const View2 = (ReanimatedRexport).View;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
return (
<View2 style={value4}>
<SafeAreaPaddingView
top={!value3}
left={isTouchingLeftScreenEdge}
right
>
<View style={styles.headerContainer}>
{header}
</View>
</SafeAreaPaddingView>
</View2>
);
function FocusedControlsHeaderL() { // fn#82448, owner: FocusedControlsHeader.l, offset: 0x01ef732e, size: 20 bytes, params: 1, frame: 2
return reveal ? 0 : -54;
}
function FocusedControlsHeader({header, reveal, isTouchingLeftScreenEdge}) { // fn#82447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:711, offset: 0x01ef71c5, size: 361 bytes, params: 2, frame: 25
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = FocusedControlsHeaderL;
closure.__closure = {reveal: reveal, FOCUSED_CONTROLS_HEADER_HEIGHT: 54};
closure.__workletHash = 15509217225804;
closure.__initData = env0_11;
const value2 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const value3 = (importDefault(10733) /* metro dependency 10733: useIsInvitedToSpeak */)();
const moduleValue2 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue2.useAnimatedStyle;
closure = FocusedControlsHeaderC;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, offsetY: value2,
TIMING_CONFIG: env0_10};
closure.__workletHash = 12710345257882;
closure.__initData = env0_12;
const value4 = Reflect.apply(useAnimatedStyle, moduleValue2, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
return (
<View2 style={value4}>
<SafeAreaPaddingView
top={!value3}
left={isTouchingLeftScreenEdge}
right
>
<View style={styles.headerContainer}>
{header}
</View>
</SafeAreaPaddingView>
</View2>
);
}
function FocusedControlsHeaderC() { // fn#82449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:1009, owner: FocusedControlsHeader.c, offset: 0x01ef7342, size: 79 bytes, params: 1, frame: 16
const object2 = {};
object2.translateY = TimingModule.withTiming(env0_1.get(), env1_10);
return {transform: [object2]};
}
function FocusedControlsHeaderGradient() { // fn#82450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:1351, offset: 0x01ef7391, size: 408 bytes, params: 1, frame: 31
const styles = useStyles();
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const items3 = [styles.backgroundGradient];
items3[1] = {width: width};
const Svg = (require(7744) /* metro dependency 7744 */).Svg;
const Defs = (require(7744) /* metro dependency 7744 */).Defs;
const LinearGradient = (require(7744) /* metro dependency 7744 */).LinearGradient;
const Stop = (require(7744) /* metro dependency 7744 */).Stop;
const items2 = [<Stop offset="0%" stopColor="black" stopOpacity=".8" />];
items2[1] = <Stop offset="66%" stopColor="black" stopOpacity=".51" />;
items2[2] = <Stop offset="100%" stopColor="black" stopOpacity="0" />;
const defs = <Defs><LinearGradient id="grad" y1="0%" x1="0" x2="0" y2="100%">{items2}</LinearGradient></Defs>;
const Rect = (require(7744) /* metro dependency 7744 */).Rect;
return (
<View style={items3}>
<Svg height="100%" width={width}>
{defs}
<Rect
height="100%"
width={width}
fill="url(#grad)"
/>
</Svg>
</View>
);
}
}
function _fun82451({header, expandedControls, actionBar, children, forceReveal, disableGradient, containerStyle, omitPTT, bottomHeader, onDrawerClose, channel, isTouchingLeftScreenEdge}) { // fn#82451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:2379, offset: 0x01ef7529, size: 858 bytes, params: 2, frame: 33
var object2;
var r5;
forceReveal = !(forceReveal === undefined) && forceReveal;
disableGradient = !(disableGradient === undefined) && disableGradient;
var value;
const value3 = (require(10737) /* metro dependency 10737: GlobalStatusIndicator */).useGlobalStatusIndicatorHeightSharedValue((require(10734) /* metro dependency 10734: useGlobalStatusIndicatorState */).useGlobalStatusIndicatorState());
const value4 = (importDefault(10733) /* metro dependency 10733: useIsInvitedToSpeak */)();
const binding = undefined;
const useContext = binding.useContext;
const RevealContext = (require(7723) /* metro dependency 7723: RevealProvider */).RevealContext;
const reveal = Reflect.apply(useContext, binding, [RevealContext]).reveal;
const value5 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
let r10 = reveal || forceReveal;
r10 = !r10 ? value5 : r10;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = D_82452;
closure.__closure = {isInvitedToSpeak: value4, statusIndicatorHeight: value3};
closure.__workletHash = 14833624951450;
closure.__initData = env0_13;
const value6 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue5 = reanimatedRexportModule;
useDerivedValue = moduleValue5.useDerivedValue;
closure = F_82453;
closure.__closure = {reveal: r10};
closure.__workletHash = 15022275245977;
closure.__initData = env0_14;
const value7 = Reflect.apply(useDerivedValue, moduleValue5, [closure]);
const moduleValue6 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue6.useAnimatedStyle;
closure = y_82454;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, top: value6,
TIMING_CONFIG: env0_10, revealOpacity: value7};
closure.__workletHash = 8532538341439;
closure.__initData = env0_15;
const value8 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const FOCUSED_VOICE_CONTROLS = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).FOCUSED_VOICE_CONTROLS;
const env0_6 = defaultImport(FOCUSED_VOICE_CONTROLS).analyticsLocations;
const env0_7 = (importDefault(10702) /* metro dependency 10702: useCurrentEmbeddedActivity */)();
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
object2 = {style: [containerStyle ?? StyleSheet.absoluteFill, value8], pointerEvents: r10 ? 'box-none' : 'none'};
const items2 = [disableGradient ? null : <FocusedControlsHeaderGradient />];
items2[1] = <FocusedControlsHeader header={header} reveal={r10} isTouchingLeftScreenEdge={isTouchingLeftScreenEdge} />;
if (actionBar != null) {
if (expandedControls != null) {
value = importDefault(10745) /* metro dependency 10745: FocusedControlsBottomControls */;
value = ((Component) => <Component onDrawerOpen={onDrawerOpen} omitPTT={omitPTT} actionBar={actionBar} expandedControls={expandedControls} header={bottomHeader} onDrawerClose={onDrawerClose} reveal={r10}>{children}</Component>)(value);
r5 = value;
function FocusedControlsHeaderGradient() { // fn#82450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:1351, offset: 0x01ef7391, size: 408 bytes, params: 1, frame: 31
const styles = useStyles();
const width = (UseWindowDimensionsNative)().width;
const items3 = [styles.backgroundGradient];
items3[1] = {width: width};
const Svg = (Module07744Module).Svg;
const Defs = (Module07744Module).Defs;
const LinearGradient = (Module07744Module).LinearGradient;
const Stop = (Module07744Module).Stop;
const items2 = [
<Stop
offset="0%"
stopColor="black"
stopOpacity=".8"
/>,
];
items2[1] = (
<Stop
offset="66%"
stopColor="black"
stopOpacity=".51"
/>
);
items2[2] = (
<Stop
offset="100%"
stopColor="black"
stopOpacity="0"
/>
);
const defs = (
<Defs>
<LinearGradient
id="grad"
y1="0%"
x1="0"
x2="0"
y2="100%"
>
{items2}
</LinearGradient>
</Defs>
);
const Rect = (Module07744Module).Rect;
return (
<View style={items3}>
<Svg height="100%" width={width}>
{defs}
<Rect
height="100%"
width={width}
fill="url(#grad)"
/>
</Svg>
</View>
);
}
function _fun82451({header, expandedControls, actionBar, children, forceReveal, disableGradient, containerStyle, omitPTT, bottomHeader, onDrawerClose, channel, isTouchingLeftScreenEdge}) { // fn#82451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:2379, offset: 0x01ef7529, size: 858 bytes, params: 2, frame: 33
var r5;
forceReveal = !(forceReveal === undefined) && forceReveal;
disableGradient = !(disableGradient === undefined) && disableGradient;
var value;
const value3 = (GlobalStatusIndicatorModule).useGlobalStatusIndicatorHeightSharedValue((UseGlobalStatusIndicatorStateModule).useGlobalStatusIndicatorState());
const value4 = (UseIsInvitedToSpeak)();
const binding = undefined;
const useContext = binding.useContext;
const RevealContext = (RevealProviderModule).RevealContext;
const reveal = Reflect.apply(useContext, binding, [RevealContext]).reveal;
const value5 = (UseIsScreenReaderEnabledNativeModule).useIsScreenReaderEnabled();
let r10 = reveal || forceReveal;
r10 = !r10 ? value5 : r10;
let useDerivedValue = ReanimatedRexportModule.useDerivedValue;
let closure = D_82452;
closure.__closure = {isInvitedToSpeak: value4, statusIndicatorHeight: value3};
closure.__workletHash = 14833624951450;
closure.__initData = env0_13;
const value6 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = F_82453;
closure.__closure = {reveal: r10};
closure.__workletHash = 15022275245977;
closure.__initData = env0_14;
const value7 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = y_82454;
closure.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, top: value6,
TIMING_CONFIG: env0_10, revealOpacity: value7};
closure.__workletHash = 8532538341439;
closure.__initData = env0_15;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const defaultImport = UseAnalyticsLocations;
const FOCUSED_VOICE_CONTROLS = (AnalyticsLocation).FOCUSED_VOICE_CONTROLS;
const env0_6 = defaultImport(FOCUSED_VOICE_CONTROLS).analyticsLocations;
const env0_7 = (UseCurrentEmbeddedActivity)();
const View = (ReanimatedRexport).View;
object = {style: [containerStyle ?? StyleSheet.absoluteFill, value8], pointerEvents: r10 ? 'box-none' : 'none'};
const items2 = [
disableGradient
? null
: (
<FocusedControlsHeaderGradient />
),
];
items2[1] = (
<FocusedControlsHeader
header={header}
reveal={r10}
isTouchingLeftScreenEdge={isTouchingLeftScreenEdge}
/>
);
if (actionBar != null) {
if (expandedControls != null) {
value = importDefault(10745) /* metro dependency 10745: FocusedControlsBottomControls */;
value = ((Component) => <Component onDrawerOpen={onDrawerOpen} omitPTT={omitPTT} actionBar={actionBar} expandedControls={expandedControls} header={bottomHeader} onDrawerClose={onDrawerClose} reveal={r10}>{children}</Component>)(value);
r5 = value;
} else {
r5 = null;
}
} else {
r5 = null;
}
} else {
r5 = null;
items2[2] = r5;
return (
<View {...object}>
{items2}
</View>
);
function D_82452() { // fn#82452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:2820, offset: 0x01ef7883, size: 27 bytes, params: 1, frame: 10
return env0_2 ? env0_1.get() : 0;
}
function F_82453() { // fn#82453, offset: 0x01ef789e, size: 17 bytes, params: 1, frame: 2
return env0_3 ? 1 : 0;
}
function y_82454() { // fn#82454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:3113, offset: 0x01ef78af, size: 105 bytes, params: 1, frame: 20
const object = {};
object.top = TimingModule.withTiming(ReactNativeModule.StyleSheet.get(), env1_10);
object.opacity = TimingModule.withTiming(ReactNativeModule.View.get(), env1_10);
return object;
}
function onDrawerOpen() { // fn#82455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:3670, offset: 0x01ef7918, size: 141 bytes, params: 1, frame: 18
const value2 = undefined;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const VOICE_BOTTOM_SHEET_EXPANDED = AnalyticEvents.VOICE_BOTTOM_SHEET_EXPANDED;
const channelBinding = channel;
Reflect.apply(track, defaultImport, [VOICE_BOTTOM_SHEET_EXPANDED, {channel_id: channelBinding.id,
guild_id: channelBinding.guild_id, application_id: env0_7 == null ? value2 : env0_7.applicationId,
activity_session_id: env0_7 == null ? value2 : env0_7.compositeInstanceId, location_stack: analyticsLocations}]);
return value2;
}
}
items2[2] = r5;
return (
<View {...object2}>
{items2}
</View>
);
}
function FocusedControlsHeaderL() { // fn#82448, owner: FocusedControlsHeader.l, offset: 0x01ef732e, size: 20 bytes, params: 1, frame: 2
return reveal ? 0 : -54;
}
function FocusedControlsHeaderC() { // fn#82449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:1009, owner: FocusedControlsHeader.c, offset: 0x01ef7342, size: 79 bytes, params: 1, frame: 16
const object = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
object.translateY = timingModule.withTiming(env0_1.get(), env1_10);
return {transform: [object]};
}
function D_82452() { // fn#82452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:2820, offset: 0x01ef7883, size: 27 bytes, params: 1, frame: 10
return env0_2 ? env0_1.get() : 0;
}
function F_82453() { // fn#82453, offset: 0x01ef789e, size: 17 bytes, params: 1, frame: 2
return env0_3 ? 1 : 0;
}
function y_82454() { // fn#82454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:3113, offset: 0x01ef78af, size: 105 bytes, params: 1, frame: 20
const object2 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
object2.top = timingModule.withTiming(env0_4.get(), env1_10);
const moduleValue2 = timingModule;
object2.opacity = moduleValue2.withTiming(env0_5.get(), env1_10);
return object2;
}
function onDrawerOpen() { // fn#82455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10918:3670, offset: 0x01ef7918, size: 141 bytes, params: 1, frame: 18
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const VOICE_BOTTOM_SHEET_EXPANDED = AnalyticEvents.VOICE_BOTTOM_SHEET_EXPANDED;
const channelBinding = channel;
Reflect.apply(track, defaultImport, [VOICE_BOTTOM_SHEET_EXPANDED, {channel_id: channelBinding.id,
guild_id: channelBinding.guild_id, application_id: env0_7 == null ? value2 : env0_7.applicationId,
activity_session_id: env0_7 == null ? value2 : env0_7.compositeInstanceId, location_stack: analyticsLocations}]);
return value2;
}
global.__d(_fun82446, 10732, [31, 27, 661, 33, 4501, 1305, 4017, 10733, 4504, 6618, 1478, 7744, 10734, 10737, 7723,
4559, 6771, 6789, 10702, 10745, 683,
2]) /* metro module 10732, dependencies: [31, 27, 661, 33, 4501, 1305, 4017, 10733, 4504, 6618, 1478, 7744, 10734, 10737, 7723, 4559, 6771, 6789, 10702, 10745, 683, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,143 +1,188 @@
/* Metro module 10842; source: modules/video_calls/native/components/FocusedExpandedControls.tsx; dependencies: [31, 27, 4492, 1226, 4291, 33, 4501, 697, 1305, 10843, 10844, 7972, 566, 10268, 1244, 10272, 477, 9228, 9239, 10794, 10845, 10834, 10846, 10847, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ApplicationStreamingStore from '../../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import UseMuteAwareLocalVolume from '../../../media_engine/useMuteAwareLocalVolume.tsx'; /* Metro dependency 10268 */
import VolumeSlider from '../../../../components_native/common/VolumeSlider.tsx'; /* Metro dependency 10272 */
import UseScreenshareUtils from '../useScreenshareUtils.tsx'; /* Metro dependency 10794 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ConstantsModule from '../../../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
import * as CallsUtilsModule from '../../../voice_calls/native/CallsUtils.tsx'; /* Metro dependency 9228 */
function _fun83112(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:6, offset: 0x01f0dd74, size: 435 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_7 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
object2.formTintColor = {tintColor: ICON_STRONG};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.formColor = {color: MOBILE_TEXT_HEADING_PRIMARY};
object2.sparkle = {'position': 'absolute', 'bottom': -4, 'right': '70%'};
object2.sparkle2 = {'position': 'absolute', 'right': -5, 'height': 10, 'width': 10};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/FocusedExpandedControls.tsx');
object = {};
const ICON_STRONG = (Native).colors.ICON_STRONG;
object.formTintColor = {tintColor: ICON_STRONG};
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
object.formColor = {color: MOBILE_TEXT_HEADING_PRIMARY};
object.sparkle = {'position': 'absolute', 'bottom': -4, 'right': '70%'};
object.sparkle2 = {'position': 'absolute', 'right': -5, 'height': 10, 'width': 10};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/FocusedExpandedControls.tsx');
exports.StreamVolumeItem = StreamVolumeItem;
exports.AudioRouteButton = AudioRouteButton_83118;
exports.ScreenshareButton = ScreenshareButton_83120;
exports.DeafenButton = DeafenButton;
}
function ExpandedControlItemIcon({iconSource, showIconSparkle}) { // fn#83113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:478, offset: 0x01f0df27, size: 266 bytes, params: 2, frame: 24
const styles = useStyles();
if (iconSource == null) {
return null;
}
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
const icon = <Icon size={MEDIUM} source={iconSource} style={styles.formTintColor} disableColor />;
return showIconSparkle ? <View>{icon}<Image style={styles.sparkle2} source={importDefault(10843) /* metro dependency 10843 */} /><Image style={styles.sparkle} source={importDefault(10844) /* metro dependency 10844 */} /></View> : icon;
}
function ExpandedControlItem({disabled, iconSource, showIconSparkle, label, onPress, onSwitchValueChange, switchValue, trailing}) { // fn#83114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:789, offset: 0x01f0e031, size: 304 bytes, params: 2, frame: 26
showIconSparkle = !(showIconSparkle === undefined) && showIconSparkle;
const styles = useStyles();
const r4 = trailing == null && switchValue != null ? ((FormSwitch) => <FormSwitch tintColor={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500} renderIosBackground value={switchValue} disabled={disabled} onValueChange={onSwitchValueChange} />)((require(7972) /* metro dependency 7972: native */).FormSwitch) : trailing;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const formRowProps = {disabled: disabled,
leading: <ExpandedControlItemIcon iconSource={iconSource} showIconSparkle={showIconSparkle} />};
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
formRowProps.label = <FormLabel text={label} style={styles.formColor} />;
formRowProps.onPress = onPress;
formRowProps.trailing = r4;
return <FormRow {...formRowProps} />;
}
function StreamVolumeItem() { // fn#83115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:1394, offset: 0x01f0e161, size: 469 bytes, params: 1, frame: 29
let value2 = undefined;
const styles = useStyles();
let value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore,
AuthenticationStore], function() {
var value2 = ApplicationStreamingStore.getLastActiveStream();
var value3 = null;
return value3 != value2 ? value2.ownerId === AuthenticationStore.getId() ? value3 : value2 : value3;
});
const defaultImport = importDefault(10268) /* metro dependency 10268: useMuteAwareLocalVolume */;
const value4 = null;
const ownerId = value4 == value3 ? value2 : value3.ownerId;
const STREAM = MediaEngineContextTypes.STREAM;
const {effectiveVolume, handleVolumeChange} = defaultImport(ownerId, STREAM);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formLabel = <FormLabel text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pEAl4b)} style={[styles.formColor,
{marginBottom: 16}]} />;
const VolumeSlider = importDefault(10272) /* metro dependency 10272: VolumeSlider */;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const r14 = platformUtilsModule.isAndroid() ? function() {
return true;
} : value2;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const PRIMARY_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_300;
if (value4 != value3) {
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
return (
<FormRow
label={<>{formLabel}<VolumeSlider onResponderGrant={r14} value={effectiveVolume} onValueChange={handleVolumeChange} color={WHITE} maxTrackTintColor={PRIMARY_300} /></>}
function ExpandedControlItemIcon({iconSource, showIconSparkle}) { // fn#83113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:478, offset: 0x01f0df27, size: 266 bytes, params: 2, frame: 24
const styles = useStyles();
if (iconSource == null) {
return null;
}
const Icon = (NativeModule).Icon;
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
const icon = (
<Icon
size={MEDIUM}
source={iconSource}
style={styles.formTintColor}
disableColor
/>
);
} else {
return value4;
return (
showIconSparkle
? (
<View>
{icon}
<Image style={styles.sparkle2} source={importDefault(10843) /* metro dependency 10843 */} />
<Image style={styles.sparkle} source={importDefault(10844) /* metro dependency 10844 */} />
</View>
)
: icon
);
}
function ExpandedControlItem({disabled, iconSource, showIconSparkle, label, onPress, onSwitchValueChange, switchValue, trailing}) { // fn#83114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:789, offset: 0x01f0e031, size: 304 bytes, params: 2, frame: 26
showIconSparkle = !(showIconSparkle === undefined) && showIconSparkle;
const styles = useStyles();
const r4 = (
trailing == null && switchValue != null
? ((FormSwitch) => <FormSwitch tintColor={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500} renderIosBackground value={switchValue} disabled={disabled} onValueChange={onSwitchValueChange} />)((require(7972) /* metro dependency 7972: native */).FormSwitch)
: trailing
);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const formRowProps = {disabled: disabled,
leading: <ExpandedControlItemIcon iconSource={iconSource} showIconSparkle={showIconSparkle} />};
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
formRowProps.label = <FormLabel text={label} style={styles.formColor} />;
formRowProps.onPress = onPress;
formRowProps.trailing = r4;
return <FormRow {...formRowProps} />;
}
function StreamVolumeItem() { // fn#83115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:1394, offset: 0x01f0e161, size: 469 bytes, params: 1, frame: 29
let value2 = undefined;
const styles = useStyles();
let value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore,
AuthenticationStore], function() {
var value2 = ApplicationStreamingStore.getLastActiveStream();
var value3 = null;
return value3 != value2 ? value2.ownerId === AuthenticationStore.getId() ? value3 : value2 : value3;
});
const defaultImport = UseMuteAwareLocalVolume;
const value4 = null;
const ownerId = value4 == value3 ? value2 : value3.ownerId;
const STREAM = MediaEngineContextTypes.STREAM;
const {effectiveVolume, handleVolumeChange} = defaultImport(ownerId, STREAM);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
const intl = (IndexNativeModule).intl;
const formLabel = (
<FormLabel
text={intl.string((IndexNativeModule).t.pEAl4b)}
style={[styles.formColor, {marginBottom: 16}]}
/>
);
const r14 = PlatformUtilsModule.isAndroid() ? function() {
return true;
} : value2;
const WHITE = (Native).unsafe_rawColors.WHITE;
const PRIMARY_300 = (Native).unsafe_rawColors.PRIMARY_300;
if (value4 != value3) {
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
return (
<FormRow
label={<>
{formLabel}
<VolumeSlider
onResponderGrant={r14}
value={effectiveVolume}
onValueChange={handleVolumeChange}
color={WHITE}
maxTrackTintColor={PRIMARY_300}
/>
</>}
/>
);
} else {
return value4;
}
}
function AudioRouteButton_83118({channelId, isConnectedToVoiceChannel}) { // fn#83118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2020, offset: 0x01f0e336, size: 150 bytes, params: 2, frame: 18
const useMaskedSpeakerStates = CallsUtilsModule.useMaskedSpeakerStates;
const object = {onPress: onPress_83119, iconSource: Reflect.apply(useMaskedSpeakerStates, CallsUtilsModule,
[]).routeSource};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['A/Ly/2']);
return <ExpandedControlItem {...object} />;
function AudioRouteButton_83118OnPress() { // fn#83119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2179, owner: AudioRouteButton_83118.onPress, offset: 0x01f0e3cc, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(9239) /* metro dependency 9239: showAudioOutputSelector */;
value.showAudioOutputSelector(channelId, isConnectedToVoiceChannel);
}
}
function ScreenshareButton_83120({channel, disabled}) { // fn#83120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2308, offset: 0x01f0e3fe, size: 109 bytes, params: 2, frame: 19
const {onPress, imgSource, text,
isFeatureEnabled} = (UseScreenshareUtils)(channel);
return (
<ExpandedControlItem
disabled={isFeatureEnabled ? disabled : !isFeatureEnabled}
onPress={onPress}
iconSource={imgSource}
label={text}
/>
);
}
function DeafenButton({channel, disabled}) { // fn#83121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2503, offset: 0x01f0e46b, size: 205 bytes, params: 2, frame: 18
disabled = !(disabled === undefined) && disabled;
const {deaf, onPress} = require(dependencyMap[21]).createDeafHandler(importDefault(dependencyMap[20])(channel));
const defaultImport = importDefault(deaf ? dependencyMap[22] : dependencyMap[23]);
const intl = require(dependencyMap[14]).intl;
return (
<ExpandedControlItem
disabled={disabled}
onPress={onPress}
iconSource={defaultImport}
label={intl.string(require(dependencyMap[14]).t.wjcRFX)}
/>
);
}
}
function AudioRouteButton_83118({channelId, isConnectedToVoiceChannel}) { // fn#83118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2020, offset: 0x01f0e336, size: 150 bytes, params: 2, frame: 18
const callsUtilsModule = require(9228) /* metro dependency 9228: CallsUtils */;
const useMaskedSpeakerStates = callsUtilsModule.useMaskedSpeakerStates;
const object2 = {onPress: onPress_83119, iconSource: Reflect.apply(useMaskedSpeakerStates, callsUtilsModule,
[]).routeSource};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['A/Ly/2']);
return <ExpandedControlItem {...object2} />;
}
function ScreenshareButton_83120({channel, disabled}) { // fn#83120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2308, offset: 0x01f0e3fe, size: 109 bytes, params: 2, frame: 19
const {onPress, imgSource, text,
isFeatureEnabled} = (importDefault(10794) /* metro dependency 10794: useScreenshareUtils */)(channel);
return (
<ExpandedControlItem
disabled={isFeatureEnabled ? disabled : !isFeatureEnabled}
onPress={onPress}
iconSource={imgSource}
label={text}
/>
);
}
function DeafenButton({channel, disabled}) { // fn#83121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2503, offset: 0x01f0e46b, size: 205 bytes, params: 2, frame: 18
disabled = !(disabled === undefined) && disabled;
const {deaf, onPress} = require(dependencyMap[21]).createDeafHandler(importDefault(dependencyMap[20])(channel));
const defaultImport = importDefault(deaf ? dependencyMap[22] : dependencyMap[23]);
const intl = require(dependencyMap[14]).intl;
return (
<ExpandedControlItem
disabled={disabled}
onPress={onPress}
iconSource={defaultImport}
label={intl.string(require(dependencyMap[14]).t.wjcRFX)}
/>
);
}
function AudioRouteButton_83118OnPress() { // fn#83119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11028:2179, owner: AudioRouteButton_83118.onPress, offset: 0x01f0e3cc, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(9239) /* metro dependency 9239: showAudioOutputSelector */;
value.showAudioOutputSelector(channelId, isConnectedToVoiceChannel);
}
global.__d(_fun83112, 10842, [31, 27, 4492, 1226, 4291, 33, 4501, 697, 1305, 10843, 10844, 7972, 566, 10268, 1244,
10272, 477, 9228, 9239, 10794, 10845, 10834, 10846, 10847,
2]) /* metro module 10842, dependencies: [31, 27, 4492, 1226, 4291, 33, 4501, 697, 1305, 10843, 10844, 7972, 566, 10268, 1244, 10272, 477, 9228, 9239, 10794, 10845, 10834, 10846, 10847, 2] */;
@@ -1,123 +1,133 @@
/* Metro module 10848; source: modules/video_calls/native/components/GestureContainer.tsx; dependencies: [31, 27, 7715, 7722, 33, 4501, 697, 1478, 4017, 5321, 5080, 4504, 1305, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as ConstantsModule from './Constants.tsx'; /* Metro dependency 7722 */
function _fun83130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:6, offset: 0x01f0e7fc, size: 327 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(7715) /* metro dependency 7715: ChannelCallStore */).useChannelCallStore;
let value = require(7722) /* metro dependency 7722: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_5 = value.PAN_GESTURE_FAIL_OFFSET_Y;
const env0_6 = value.SWIPE_TO_CHAT_ACTIVE_OFFSET;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
const BLACK = (Native).colors.BLACK;
const env0_8 = Reflect.apply(createStyles, value, [{background: {flex: 1, backgroundColor: BLACK}}]);
object = {code: 'function GestureContainerTsx1({velocityY:velocityY}){const{position,THRESHOLD_VELOCITY,runOnJS,ModalActionCreators,withTiming,DECELERATED_EASING}=this.__closure;if(position.get()===1||velocityY>THRESHOLD_VELOCITY){runOnJS(ModalActionCreators.pop)();}else{position.set(withTiming(0,{duration:300,easing:DECELERATED_EASING}));}}'};
object = {code: 'function GestureContainerTsx2({translationY:translationY}){const{THRESHOLD_TRANSLATE,position}=this.__closure;const boundedGestureY=Math.max(Math.min(translationY,THRESHOLD_TRANSLATE),0)/THRESHOLD_TRANSLATE;const easeOutCubic=1-Math.pow(1-boundedGestureY,3);position.set(easeOutCubic);}'};
object = {code: 'function GestureContainerTsx3(){const{interpolate,position,height}=this.__closure;return{flex:1,transform:[{translateY:interpolate(position.get(),[0,1],[0,height*0.06])},{scale:interpolate(position.get(),[0,1],[1,0.9])}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/GestureContainer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/GestureContainer.tsx');
exports.default = GestureContainer;
}
function GestureContainer({children}) { // fn#83131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:1292, offset: 0x01f0e943, size: 600 bytes, params: 2, frame: 26
const styles = useStyles();
const value2 = useChannelCallStore(function(a0) {
return a0.isGestureEnabled;
});
const height = (UseWindowDimensionsNative)().height;
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const Gesture = (Module05321Module).Gesture;
const value5 = Gesture.Pan().enabled(value2);
const onUpdate = value5.onUpdate;
let closure = GestureContainerS;
closure.__closure = {THRESHOLD_TRANSLATE: 200, position: value3};
closure.__workletHash = 9476726087456;
closure.__initData = env0_10;
const value6 = Reflect.apply(onUpdate, value5, [closure]);
const onEnd = value6.onEnd;
closure = GestureContainerH;
object = {position: value3, THRESHOLD_VELOCITY: 500};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const DECELERATED_EASING = (NativeModule).DECELERATED_EASING;
object.DECELERATED_EASING = DECELERATED_EASING;
closure.__closure = object;
closure.__workletHash = 10736744030668;
closure.__initData = env0_9;
const value11 = Reflect.apply(onEnd, value6, [closure]).activeOffsetY([-PAN_GESTURE_FAIL_OFFSET_Y,
PAN_GESTURE_FAIL_OFFSET_Y]).failOffsetX([-SWIPE_TO_CHAT_ACTIVE_OFFSET, SWIPE_TO_CHAT_ACTIVE_OFFSET]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = GestureContainerP;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, position: value3, height: height};
closure.__workletHash = 16049033434372;
closure.__initData = env0_11;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const GestureDetector = (Module05321Module).GestureDetector;
const View2 = (ReanimatedRexport).View;
return (
<View style={styles.background}>
<GestureDetector gesture={value11}>
<View2 style={value12}>
{children}
</View2>
</GestureDetector>
</View>
);
function GestureContainerS({translationY}) { // fn#83133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:1471, owner: GestureContainer.S, offset: 0x01f0eba6, size: 107 bytes, params: 2, frame: 16
let Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
let value = Math2.min(translationY, 200);
value = Reflect.apply(max, Math, [value, 0]) / 200;
Math = global.Math;
value = 1 - Math.pow(1 - value, 3);
env0_1.set(value);
}
function GestureContainer({children}) { // fn#83131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:1292, offset: 0x01f0e943, size: 600 bytes, params: 2, frame: 26
var object2;
const styles = useStyles();
const value2 = useChannelCallStore(function(a0) {
return a0.isGestureEnabled;
});
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value5 = Gesture.Pan().enabled(value2);
const onUpdate = value5.onUpdate;
let closure = GestureContainerS;
closure.__closure = {THRESHOLD_TRANSLATE: 200, position: value3};
closure.__workletHash = 9476726087456;
closure.__initData = env0_10;
const value6 = Reflect.apply(onUpdate, value5, [closure]);
const onEnd = value6.onEnd;
closure = GestureContainerH;
object2 = {position: value3, THRESHOLD_VELOCITY: 500};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
const DECELERATED_EASING = (require(1305) /* metro dependency 1305: native */).DECELERATED_EASING;
object2.DECELERATED_EASING = DECELERATED_EASING;
closure.__closure = object2;
closure.__workletHash = 10736744030668;
closure.__initData = env0_9;
const value11 = Reflect.apply(onEnd, value6, [closure]).activeOffsetY([-PAN_GESTURE_FAIL_OFFSET_Y,
PAN_GESTURE_FAIL_OFFSET_Y]).failOffsetX([-SWIPE_TO_CHAT_ACTIVE_OFFSET, SWIPE_TO_CHAT_ACTIVE_OFFSET]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = GestureContainerP;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, position: value3, height: height};
closure.__workletHash = 16049033434372;
closure.__initData = env0_11;
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={styles.background}>
<GestureDetector gesture={value11}>
<View2 style={value12}>
{children}
</View2>
</GestureDetector>
</View>
);
}
function GestureContainerH({velocityY}) { // fn#83134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:1673, owner: GestureContainer.h, offset: 0x01f0ec11, size: 196 bytes, params: 2, frame: 18
var set;
var withTiming;
var object;
var moduleValue;
var value;
let binding = env0_1;
if (binding.get() === 1) {
value = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop)();
} else if (velocityY > 500) {
value = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop)();
} else {
binding = env0_1;
set = binding.set;
value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
withTiming = value.withTiming;
object = {duration: 300};
object.easing = (require(1305) /* metro dependency 1305: native */).DECELERATED_EASING;
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [0, object])]);
}
}
function GestureContainerS({translationY}) { // fn#83133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:1471, owner: GestureContainer.S, offset: 0x01f0eba6, size: 107 bytes, params: 2, frame: 16
let Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
let value = Math2.min(translationY, 200);
value = Reflect.apply(max, Math, [value, 0]) / 200;
Math = global.Math;
value = 1 - Math.pow(1 - value, 3);
env0_1.set(value);
}
function GestureContainerP() { // fn#83135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:2130, owner: GestureContainer.p, offset: 0x01f0ecd5, size: 188 bytes, params: 1, frame: 22
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const binding = env0_1;
const items2 = [{translateY: Reflect.apply(interpolate, value, [binding.get(), [0, 1], [0, 0.06 * height]])}];
const object2 = {};
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object2.scale = value.interpolate(binding.get(), [0, 1], [1, 0.9]);
items2[1] = object2;
return {flex: 1, transform: items2};
}
function GestureContainerH({velocityY}) { // fn#83134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:1673, owner: GestureContainer.h, offset: 0x01f0ec11, size: 196 bytes, params: 2, frame: 18
var set;
var withTiming;
var object2;
var moduleValue;
var value;
let binding = env0_1;
if (binding.get() === 1) {
value = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop)();
} else if (velocityY > 500) {
value = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop)();
} else {
binding = env0_1;
set = binding.set;
value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
withTiming = value.withTiming;
object2 = {duration: 300};
object2.easing = (require(1305) /* metro dependency 1305: native */).DECELERATED_EASING;
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [0, object2])]);
}
}
function GestureContainerP() { // fn#83135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11034:2130, owner: GestureContainer.p, offset: 0x01f0ecd5, size: 188 bytes, params: 1, frame: 22
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = value.interpolate;
const binding = env0_1;
const items2 = [{translateY: Reflect.apply(interpolate, value, [binding.get(), [0, 1], [0, 0.06 * height]])}];
const object = {};
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
object.scale = value.interpolate(binding.get(), [0, 1], [1, 0.9]);
items2[1] = object;
return {flex: 1, transform: items2};
}
global.__d(_fun83130, 10848, [31, 27, 7715, 7722, 33, 4501, 697, 1478, 4017, 5321, 5080, 4504, 1305,
2]) /* metro module 10848, dependencies: [31, 27, 7715, 7722, 33, 4501, 697, 1478, 4017, 5321, 5080, 4504, 1305, 2] */;
@@ -1,57 +1,78 @@
/* Metro module 15553; source: modules/video_calls/native/components/HideSelfStreamAndVideoConfirmDialog.tsx; dependencies: [31, 27, 15552, 33, 4501, 1244, 4596, 4573, 7896, 2] */
import Alert from '../../../../components_native/common/Alert.tsx'; /* Metro dependency 4596 */
import UserSettingsActionCreators from '../../../../actions/UserSettingsActionCreators.tsx'; /* Metro dependency 7896 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HideSelfStreamAndVideoConstantsModule from '../../../calls/HideSelfStreamAndVideoConstants.tsx'; /* Metro dependency 15552 */
function _fun119058(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15750:6, offset: 0x024fb054, size: 276 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(15552) /* metro dependency 15552: HideSelfStreamAndVideoConstants */).SelfStreamAndVideoAlertType;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {padding: 16},
ReactModule;
const env0_7 = (CreateStylesModule).createStyles({wrapper: {padding: 16},
body: {paddingTop: 16}, description: {lineHeight: 18}, ctaLink: {'paddingTop': 8, 'textAlign': 'center',
'textDecorationLine': 'underline'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/HideSelfStreamAndVideoConfirmDialog.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/HideSelfStreamAndVideoConfirmDialog.tsx');
exports.default = HideSelfStreamAndVideoConfirmDialog;
function HideSelfStreamAndVideoConfirmDialog(a0) { // fn#119059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15750:474, offset: 0x024fb168, size: 767 bytes, params: 2, frame: 29
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const type = a0.type;
const onConfirm = a0.onConfirm;
let value = Object.create(null);
value.type = 0;
value.onConfirm = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = undefined;
const styles = useStyles();
let STREAM = SelfStreamAndVideoAlertType.STREAM;
const r10 = type === STREAM ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/lFMWr']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xzxhZS);
STREAM = SelfStreamAndVideoAlertType.STREAM;
const r16 = type === STREAM ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xaOX7d) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oU1p9O);
const defaultImportProps = {...value2};
defaultImportProps['title'] = r10;
defaultImportProps['style'] = styles.wrapper;
defaultImportProps['cancelText'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
defaultImportProps['onCancel'] = value2 == null ? value4 : value2.onClose;
defaultImportProps['confirmText'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cY+Oob']);
defaultImportProps['onConfirm'] = onConfirm;
const Text = (TextModule).Text;
value = (
<Text style={styles.description} variant="text-sm/medium">
{r16}
</Text>
);
value = (
<View style={styles.body}>
{value}
<Text
accessibilityRole="link"
style={[styles.ctaLink, styles.description]}
onPress={onPress_119060}
variant="text-sm/medium"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JdIQ/Y'])}
</Text>
</View>
);
return (
<Alert {...defaultImportProps}>
{value}
</Alert>
);
function HideSelfStreamAndVideoConfirmDialogOnPress() { // fn#119060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15750:1131, owner: HideSelfStreamAndVideoConfirmDialog.onPress, offset: 0x024fb467, size: 58 bytes, params: 1, frame: 13
const value = environment.__proto__;
(UserSettingsActionCreators).updatedUnsyncedSettings({disableHideSelfStreamAndVideoConfirmationAlert: true});
onConfirm();
}
}
}
function HideSelfStreamAndVideoConfirmDialog(a0) { // fn#119059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15750:474, offset: 0x024fb168, size: 767 bytes, params: 2, frame: 29
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const type = a0.type;
const onConfirm = a0.onConfirm;
let value = Object.create(null);
value.type = 0;
value.onConfirm = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = undefined;
const styles = useStyles();
let STREAM = SelfStreamAndVideoAlertType.STREAM;
const r10 = type === STREAM ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/lFMWr']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xzxhZS);
STREAM = SelfStreamAndVideoAlertType.STREAM;
const r16 = type === STREAM ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xaOX7d) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oU1p9O);
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const defaultImportProps = {...value2};
defaultImportProps['title'] = r10;
defaultImportProps['style'] = styles.wrapper;
defaultImportProps['cancelText'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
defaultImportProps['onCancel'] = value2 == null ? value4 : value2.onClose;
defaultImportProps['confirmText'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cY+Oob']);
defaultImportProps['onConfirm'] = onConfirm;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={styles.description} variant="text-sm/medium">{r16}</Text>;
value = <View style={styles.body}>{value}<Text accessibilityRole="link" style={[styles.ctaLink,
styles.description]} onPress={onPress_119060} variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JdIQ/Y'])}</Text></View>;
return (
<Alert {...defaultImportProps}>
{value}
</Alert>
);
}
function HideSelfStreamAndVideoConfirmDialogOnPress() { // fn#119060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15750:1131, owner: HideSelfStreamAndVideoConfirmDialog.onPress, offset: 0x024fb467, size: 58 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(7896) /* metro dependency 7896: UserSettingsActionCreators */).updatedUnsyncedSettings({disableHideSelfStreamAndVideoConfirmationAlert: true});
onConfirm();
}
global.__d(_fun119058, 15553, [31, 27, 15552, 33, 4501, 1244, 4596, 4573, 7896,
2]) /* metro module 15553, dependencies: [31, 27, 15552, 33, 4501, 1244, 4596, 4573, 7896, 2] */;
@@ -1,26 +1,34 @@
/* Metro module 10892; source: modules/video_calls/native/components/ParticipantTitle.tsx; dependencies: [31, 33, 4501, 697, 1305, 10875, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GetParticipantTitle from '../../getParticipantTitle.tsx'; /* Metro dependency 10875 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun83411(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11078:6, offset: 0x01f1925c, size: 208 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{usernameText: {fontSize: 14, color: WHITE}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ParticipantTitle.tsx');
ReactModule;
const createStyles = CreateStylesModule.createStyles;
const WHITE = (Native).colors.WHITE;
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [{usernameText: {fontSize: 14, color: WHITE}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ParticipantTitle.tsx');
exports.default = ParticipantTitle;
function ParticipantTitle({channel, participant, style}) { // fn#83412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11078:300, offset: 0x01f1932c, size: 128 bytes, params: 2, frame: 20
const styles = useStyles();
const LegacyText = (NativeModule).LegacyText;
const usernameText = styles.usernameText;
return (
<LegacyText style={[usernameText, style]} numberOfLines={1}>
{(GetParticipantTitle)(channel, participant)}
</LegacyText>
);
}
}
function ParticipantTitle({channel, participant, style}) { // fn#83412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11078:300, offset: 0x01f1932c, size: 128 bytes, params: 2, frame: 20
const styles = useStyles();
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const usernameText = styles.usernameText;
return (
<LegacyText style={[usernameText, style]} numberOfLines={1}>
{(importDefault(10875) /* metro dependency 10875: getParticipantTitle */)(channel, participant)}
</LegacyText>
);
}
global.__d(_fun83411, 10892, [31, 33, 4501, 697, 1305, 10875,
2]) /* metro module 10892, dependencies: [31, 33, 4501, 697, 1305, 10875, 2] */;
@@ -1,33 +1,44 @@
/* Metro module 7732; source: modules/video_calls/native/components/PictureInPicture.tsx; dependencies: [57, 31, 27, 7715, 661, 33, 4501, 1305, 7733, 1478, 5463, 7736, 4017, 4577, 7737, 7738, 5321, 477, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import UsePipDimensions from './usePipDimensions.tsx'; /* Metro dependency 7736 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as UseShouldForcePipOrientationModule from './useShouldForcePipOrientation.tsx'; /* Metro dependency 7733 */
import * as UseIsViewingActivityModule from '../../../activities/native/useIsViewingActivity.tsx'; /* Metro dependency 7737 */
function _fun61896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:6, offset: 0x01b4d4a7, size: 447 bytes, params: 8, frame: 25
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_5 = value2.View;
const env0_6 = (require(7715) /* metro dependency 7715: ChannelCallStore */).toggleFocus;
const PictureInPicturePositions = (require(661) /* metro dependency 661: Constants */).PictureInPicturePositions;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['alignItems'] = 'baseline';
object4.pipOuterContainer = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['alignItems'] = 'baseline';
object4.pipInnerContainer = object6;
const nativeModule = require(1305) /* metro dependency 1305: native */;
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = nativeModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
object4.elevationShadow = Reflect.apply(generateBoxShadowStyle, nativeModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object4]);
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const PictureInPicturePositions = (ConstantsModule).PictureInPicturePositions;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['alignItems'] = 'baseline';
object.pipOuterContainer = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['alignItems'] = 'baseline';
object.pipInnerContainer = object3;
const generateBoxShadowStyle = NativeModule.generateBoxShadowStyle;
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = NativeModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
object.elevationShadow = Reflect.apply(generateBoxShadowStyle, NativeModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const closure = function(a0) {
return {'mass': 0.2, 'damping': 7.5, 'stiffness': 100, 'restDisplacementThreshold': 0.1,
'restSpeedThreshold': 0.1,
@@ -37,82 +48,82 @@ function _fun61896(global, require, importDefault, importAll, module, exports, d
closure.__workletHash = 14089987184261;
closure.__initData = {code: 'function PictureInPictureTsx1(velocity){return{mass:0.2,damping:7.5,stiffness:100,restDisplacementThreshold:0.1,restSpeedThreshold:0.1,overshootClamping:true,velocity:velocity};}'};
const TOP_LEFT = PictureInPicturePositions.TOP_LEFT;
object4 = {code: 'function PictureInPictureTsx2(){const{insets,withSpring,getSpringAnimationConfig}=this.__closure;return{marginTop:insets.top,marginBottom:withSpring(insets.bottom,getSpringAnimationConfig())};}'};
object = {code: 'function PictureInPictureTsx2(){const{insets,withSpring,getSpringAnimationConfig}=this.__closure;return{marginTop:insets.top,marginBottom:withSpring(insets.bottom,getSpringAnimationConfig())};}'};
value = value.memo(_fun61898);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/PictureInPicture.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/PictureInPicture.tsx');
exports.default = value;
exports.DEFAULT_PIP_POSITION = TOP_LEFT;
}
function _fun61898({children, style, preferredPosition, channel}) { // fn#61898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:1095, offset: 0x01b4d67e, size: 779 bytes, params: 2, frame: 27
if (preferredPosition === undefined) {
PictureInPicturePositions.TOP_LEFT;
}
const styles = useStyles();
const value4 = (UseShouldForcePipOrientationModule).useShouldForcePipOrientation({channel: channel});
const {width, height} = (UseWindowDimensionsNative)();
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const value6 = (UsePipDimensions)({channelId: channel.id,
forcedOrientation: value4});
const binding = env0_4;
const useState = binding.useState;
const value8 = Module00057(Reflect.apply(useState, binding, [{'x': 0, 'y': 0, 'width': null, 'height': null, 'pageX': 0,
'pageY': 0, width: width, height: height}]), 2);
const property = value8[0];
const env0_1 = value8[1];
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
object.marginTop = insets.top;
object.marginBottom = require(dependencyMap[13]).withSpring(insets.bottom, t_61897());
return object;
};
object = {insets: insets};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.getSpringAnimationConfig = t_61897;
closure.__closure = object;
closure.__workletHash = 16677290574613;
closure.__initData = env0_11;
const value9 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const value10 = (UseIsViewingActivityModule).useIsViewingActivity({channelId: channel.id});
const {gesture,
draggableGridItemStyles} = (require(7738) /* metro dependency 7738: useDraggablePip */).useDraggablePip({width: value6.width,
height: value6.height, containerWidth: property.width, containerHeight: property.height,
snapToCorners: !value10, onPress: value10 ? toggleFocus : undefined});
const value12 = env0_4.useRef(null);
const View2 = (ReanimatedRexport).View;
const items3 = [styles.pipOuterContainer, value9, style];
const viewBindingProps = {ref: value12, style: styles.pipInnerContainer, pointerEvents: 'box-none',
onLayout: onLayout_61900};
const GestureDetector = (Module05321Module).GestureDetector;
const View3 = (ReanimatedRexport).View;
const items2 = [draggableGridItemStyles];
items2[1] = PlatformUtilsModule.isIOS() ? styles.elevationShadow : undefined;
return (
<View2 style={items3} pointerEvents="box-none">
<View {...viewBindingProps}>
<GestureDetector gesture={gesture}>
<View3 style={items2}>
<View>
{children}
</View>
</View3>
</GestureDetector>
</View>
</View2>
);
function onLayout_61900() { // fn#61900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:2095, offset: 0x01b4d9d6, size: 49 bytes, params: 1, frame: 11
if (env0_2.current != null) {
env0_2.current.measure(_fun61901);
}
function _fun61901(a0, a1, a2, a3, a4, a5) { // fn#61901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:2136, offset: 0x01b4da07, size: 62 bytes, params: 7, frame: 11
env1_1({x: a0, y: a1, width: a2, height: a3, pageX: a4, pageY: a5});
}
}
function _fun61898({children, style, preferredPosition, channel}) { // fn#61898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:1095, offset: 0x01b4d67e, size: 779 bytes, params: 2, frame: 27
var object2;
if (preferredPosition === undefined) {
PictureInPicturePositions.TOP_LEFT;
}
const styles = useStyles();
const value4 = (require(7733) /* metro dependency 7733: useShouldForcePipOrientation */).useShouldForcePipOrientation({channel: channel});
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value6 = (importDefault(7736) /* metro dependency 7736: usePipDimensions */)({channelId: channel.id,
forcedOrientation: value4});
const binding = env0_4;
const useState = binding.useState;
const value8 = env0_3(Reflect.apply(useState, binding, [{'x': 0, 'y': 0, 'width': null, 'height': null, 'pageX': 0,
'pageY': 0, width: width, height: height}]), 2);
const property = value8[0];
const env0_1 = value8[1];
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object = {};
object.marginTop = insets.top;
object.marginBottom = require(dependencyMap[13]).withSpring(insets.bottom, t_61897());
return object;
};
object2 = {insets: insets};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.getSpringAnimationConfig = t_61897;
closure.__closure = object2;
closure.__workletHash = 16677290574613;
closure.__initData = env0_11;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const value10 = (require(7737) /* metro dependency 7737: useIsViewingActivity */).useIsViewingActivity({channelId: channel.id});
const {gesture,
draggableGridItemStyles} = (require(7738) /* metro dependency 7738: useDraggablePip */).useDraggablePip({width: value6.width,
height: value6.height, containerWidth: property.width, containerHeight: property.height,
snapToCorners: !value10, onPress: value10 ? toggleFocus : undefined});
const value12 = env0_4.useRef(null);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [styles.pipOuterContainer, value9, style];
const viewBindingProps = {ref: value12, style: styles.pipInnerContainer, pointerEvents: 'box-none',
onLayout: onLayout};
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [draggableGridItemStyles];
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
items2[1] = platformUtilsModule.isIOS() ? styles.elevationShadow : undefined;
return (
<View2 style={items3} pointerEvents="box-none">
<View {...viewBindingProps}>
<GestureDetector gesture={gesture}>
<View3 style={items2}>
<View>
{children}
</View>
</View3>
</GestureDetector>
</View>
</View2>
);
}
function onLayout() { // fn#61900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:2095, offset: 0x01b4d9d6, size: 49 bytes, params: 1, frame: 11
if (env0_2.current != null) {
env0_2.current.measure(_fun61901);
}
}
function _fun61901(a0, a1, a2, a3, a4, a5) { // fn#61901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7910:2136, offset: 0x01b4da07, size: 62 bytes, params: 7, frame: 11
env1_1({x: a0, y: a1, width: a2, height: a3, pageX: a4, pageY: a5});
}
global.__d(_fun61896, 7732, [57, 31, 27, 7715, 661, 33, 4501, 1305, 7733, 1478, 5463, 7736, 4017, 4577, 7737, 7738,
5321, 477,
2]) /* metro module 7732, dependencies: [57, 31, 27, 7715, 661, 33, 4501, 1305, 7733, 1478, 5463, 7736, 4017, 4577, 7737, 7738, 5321, 477, 2] */;
@@ -1,247 +1,278 @@
/* Metro module 15262; source: modules/video_calls/native/components/PictureInPictureGlobal.tsx; dependencies: [57, 31, 27, 1378, 4606, 7729, 1226, 4259, 661, 4299, 33, 4501, 1305, 697, 7734, 566, 4610, 7724, 7709, 7733, 8750, 7736, 7717, 10666, 10670, 10677, 10693, 10700, 8111, 10667, 7732, 10915, 4017, 4504, 5314, 15263, 1585, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import MediaEngineStore from '../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import UseIsActivityFocused from '../../../activities/useIsActivityFocused.tsx'; /* Metro dependency 7724 */
import PictureInPicture from './PictureInPicture.tsx'; /* Metro dependency 7732 */
import UsePipVideoOrStream from '../usePipVideoOrStream.tsx'; /* Metro dependency 7734 */
import UsePipDimensions from './usePipDimensions.tsx'; /* Metro dependency 7736 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CallConstantsModule from '../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as UseChatBottomManagerUIStoreModule from '../../../chat_input/native/useChatBottomManagerUIStore.tsx'; /* Metro dependency 7729 */
import * as UseShouldForcePipOrientationModule from './useShouldForcePipOrientation.tsx'; /* Metro dependency 7733 */
import * as UseIsScreenLandscapeNativeModule from '../../../screen/useIsScreenLandscape.native.tsx'; /* Metro dependency 8750 */
import * as GetPIPBottomOffsetForPIPModeModule from '../../../panels/morphable/native/getPIPBottomOffsetForPIPMode.tsx'; /* Metro dependency 15263 */
function _fun116691(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:6, offset: 0x024936e9, size: 604 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.StyleSheet;
const env0_7 = value2.TouchableOpacity;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const env0_10 = (require(7729) /* metro dependency 7729: useChatBottomManagerUIStore */).useBestActiveChatInputContainerHeight;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const env0_13 = (require(661) /* metro dependency 661: Constants */).PictureInPicturePositions;
const env0_14 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_15 = value3.jsx;
const env0_16 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {container: {'flex': 1, 'marginLeft': 12, 'marginRight': 12}};
const nativeModule = require(1305) /* metro dependency 1305: native */;
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = nativeModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
object4.elevationShadow = Reflect.apply(generateBoxShadowStyle, nativeModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object5.overflow = 'hidden';
object4.pip = object5;
const object6 = {};
const createStyles = CreateStylesModule.createStyles;
object = {container: {'flex': 1, 'marginLeft': 12, 'marginRight': 12}};
const generateBoxShadowStyle = NativeModule.generateBoxShadowStyle;
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = NativeModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
object.elevationShadow = Reflect.apply(generateBoxShadowStyle, NativeModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
const object2 = {};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.overflow = 'hidden';
object.pip = object2;
const object3 = {};
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object6.backgroundColor = BLACK;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object6.overflow = 'hidden';
object4.background = object6;
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object4]);
const env0_18 = value.memo(_fun116692);
const env0_19 = value.memo(_fun116701);
object4 = {code: 'function PictureInPictureGlobalTsx1(){const{withTiming,drawerState,STANDARD_EASING}=this.__closure;return withTiming(drawerState,{easing:STANDARD_EASING,duration:250});}'};
object4 = {code: 'function PictureInPictureGlobalTsx2(){const{interpolate,animatedDrawerState,NAV_BAR_HEIGHT,PADDING,chatInputContainerHeight,PIP_AVOIDANCE_TAB_BAR_HEIGHT}=this.__closure;return{marginTop:interpolate(animatedDrawerState.get(),[0,1],[NAV_BAR_HEIGHT+PADDING,PADDING]),marginBottom:interpolate(animatedDrawerState.get(),[0,1],[chatInputContainerHeight+PADDING,PIP_AVOIDANCE_TAB_BAR_HEIGHT+PADDING])};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/PictureInPictureGlobal.tsx');
object3.backgroundColor = BLACK;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.overflow = 'hidden';
object.background = object3;
const env0_17 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_18 = ReactModule.memo(_fun116692);
const env0_19 = ReactModule.memo(_fun116701);
object = {code: 'function PictureInPictureGlobalTsx1(){const{withTiming,drawerState,STANDARD_EASING}=this.__closure;return withTiming(drawerState,{easing:STANDARD_EASING,duration:250});}'};
object = {code: 'function PictureInPictureGlobalTsx2(){const{interpolate,animatedDrawerState,NAV_BAR_HEIGHT,PADDING,chatInputContainerHeight,PIP_AVOIDANCE_TAB_BAR_HEIGHT}=this.__closure;return{marginTop:interpolate(animatedDrawerState.get(),[0,1],[NAV_BAR_HEIGHT+PADDING,PADDING]),marginBottom:interpolate(animatedDrawerState.get(),[0,1],[chatInputContainerHeight+PADDING,PIP_AVOIDANCE_TAB_BAR_HEIGHT+PADDING])};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/PictureInPictureGlobal.tsx');
exports.default = PictureInPictureGlobal;
}
function _fun116692({channel}) { // fn#116692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:684, offset: 0x02493945, size: 1263 bytes, params: 2, frame: 33
const env0_4 = undefined;
const styles = useStyles();
let value3 = (UsePipVideoOrStream)(channel.id);
const useStateFromStores = FluxModule.useStateFromStores;
const channelRTCStoreBinding = ChannelRTCStore;
let value4 = Reflect.apply(useStateFromStores, FluxModule, [[channelRTCStoreBinding, AuthenticationStore],
_fun116693]);
const value5 = FluxModule.useStateFromStores([channelRTCStoreBinding, EmbeddedActivitiesStore], _fun116695);
const value6 = (UseIsActivityFocused)(channel.id);
let r4 = value3 == null || value3.user.id === AuthenticationStore.getId() ? value5 : value3;
r4 = value6 ? value5 : r4;
const value8 = FluxModule.useStateFromStores([MediaEngineStore], _fun116696, [r4]);
const value9 = FluxModule.useStateFromStores([ChannelRTCStore, AuthenticationStore], function() {
var value3 = ChannelRTCStore.getParticipant(channel.id, AuthenticationStore.getId());
var value4 = null;
return value4 != value3 ? value3.type !== ParticipantTypes.USER ? value4 : value4 != value3.streamId ? value3 : value4 : value4;
});
const binding = env0_4;
const value10 = binding.useCallback(_fun116698, [channel]);
const value11 = (UseShouldForcePipOrientationModule).useShouldForcePipOrientation({channel: channel});
const value12 = (UseIsScreenLandscapeNativeModule).useIsScreenLandscape();
const value13 = (UsePipDimensions)({channelId: channel.id,
forcedOrientation: value11});
const value14 = binding.useMemo(_fun116699, [value11, value12, value13.height, value13.width]);
let type = r4?.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
const r16 = type === ACTIVITY && (importDefault(10666) /* metro dependency 10666: isWatchTogetherApplication */)(r4.applicationId) && value4 == null;
type = r4?.type;
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
const r10 = (
HIDDEN_STREAM === type || ParticipantTypes.STREAM === type
? ((Component) => <Component resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.CONTAIN} participant={r4} onSingleTap={value10} onDoubleTap={value10} />)(importDefault(10670) /* metro dependency 10670: StreamTile */)
: (
ParticipantTypes.USER === type
? (
value8
? null
: ((Component) => <Component participant={r4} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={value10} onDoubleTap={value10} />)(importDefault(10693) /* metro dependency 10693: UserTile */)
)
: (
ParticipantTypes.ACTIVITY !== type
? null
: ((Component) => <Component participant={r4} channel={channel} onSingleTap={onSingleTap_116700} />)(importDefault(10700) /* metro dependency 10700: ActivityTile */)
)
)
);
const items2 = [styles.pip];
items2[1] = styles.elevationShadow;
items2[2] = value14;
const items3 = [
value9 != null && !r16 && ((Component) => <Component participant={value9} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={value10} />)(importDefault(10693) /* metro dependency 10693: UserTile */),
];
items3[1] = value4 != null && !r16 && ((Component) => <Component onSingleTap={value10} />)(importDefault(10667) /* metro dependency 10667: ScreenshareTile */);
let r9 = value9 == null || value4 == null;
r9 = (!r9 ? value5 == null : r9) && r10;
items3[2] = r9;
return (
<View style={styles.background}>
<TouchableOpacity activeOpacity={0.7}>
<View style={items2}>
{items3}
</View>
</TouchableOpacity>
</View>
);
function _fun116693() { // fn#116693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:770, offset: 0x02493e34, size: 52 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const channelRTCStoreBinding = ChannelRTCStore;
const getStreamParticipants = channelRTCStoreBinding.getStreamParticipants;
return Reflect.apply(getStreamParticipants, channelRTCStoreBinding, [channel.id]).find(function(a0) {
return a0.user.id === AuthenticationStore.getId();
});
}
function _fun116692({channel}) { // fn#116692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:684, offset: 0x02493945, size: 1263 bytes, params: 2, frame: 33
const env0_4 = undefined;
const styles = useStyles();
let value3 = (importDefault(7734) /* metro dependency 7734: usePipVideoOrStream */)(channel.id);
let value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
AuthenticationStore], _fun116693);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
EmbeddedActivitiesStore], _fun116695);
const value6 = (importDefault(7724) /* metro dependency 7724: useIsActivityFocused */)(channel.id);
let r4 = value3 == null || value3.user.id === AuthenticationStore.getId() ? value5 : value3;
r4 = value6 ? value5 : r4;
const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], _fun116696,
[r4]);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
AuthenticationStore], function() {
var value3 = ChannelRTCStore.getParticipant(channel.id, AuthenticationStore.getId());
var value4 = null;
return value4 != value3 ? value3.type !== ParticipantTypes.USER ? value4 : value4 != value3.streamId ? value3 : value4 : value4;
});
const binding = env0_4;
const value10 = binding.useCallback(_fun116698, [channel]);
const value11 = (require(7733) /* metro dependency 7733: useShouldForcePipOrientation */).useShouldForcePipOrientation({channel: channel});
const value12 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
const value13 = (importDefault(7736) /* metro dependency 7736: usePipDimensions */)({channelId: channel.id,
forcedOrientation: value11});
const value14 = binding.useMemo(_fun116699, [value11, value12, value13.height, value13.width]);
let type = r4?.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
const r16 = type === ACTIVITY && (importDefault(10666) /* metro dependency 10666: isWatchTogetherApplication */)(r4.applicationId) && value4 == null;
type = r4?.type;
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
const r10 = HIDDEN_STREAM === type || ParticipantTypes.STREAM === type ? ((Component) => <Component resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.CONTAIN} participant={r4} onSingleTap={value10} onDoubleTap={value10} />)(importDefault(10670) /* metro dependency 10670: StreamTile */) : ParticipantTypes.USER === type ? value8 ? null : ((Component) => <Component participant={r4} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={value10} onDoubleTap={value10} />)(importDefault(10693) /* metro dependency 10693: UserTile */) : ParticipantTypes.ACTIVITY !== type ? null : ((Component) => <Component participant={r4} channel={channel} onSingleTap={onSingleTap_116700} />)(importDefault(10700) /* metro dependency 10700: ActivityTile */);
const items2 = [styles.pip];
items2[1] = styles.elevationShadow;
items2[2] = value14;
const items3 = [value9 != null && !r16 && ((Component) => <Component participant={value9} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={value10} />)(importDefault(10693) /* metro dependency 10693: UserTile */)];
items3[1] = value4 != null && !r16 && ((Component) => <Component onSingleTap={value10} />)(importDefault(10667) /* metro dependency 10667: ScreenshareTile */);
let r9 = value9 == null || value4 == null;
r9 = (!r9 ? value5 == null : r9) && r10;
items3[2] = r9;
return (
<View style={styles.background}>
<TouchableOpacity activeOpacity={0.7}>
<View style={items2}>
{items3}
</View>
</TouchableOpacity>
</View>
);
}
function _fun116695() { // fn#116695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:876, offset: 0x02493e8c, size: 111 bytes, params: 1, frame: 18
var r0;
var channelRTCStoreBinding;
var getParticipant;
var id;
let value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
const value3 = null;
if (value3 != currentEmbeddedActivity) {
channelRTCStoreBinding = ChannelRTCStore;
getParticipant = channelRTCStoreBinding.getParticipant;
id = channel.id;
value = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
value = Reflect.apply(getParticipant, channelRTCStoreBinding, [id,
value.getEmbeddedActivityParticipantId({applicationId: currentEmbeddedActivity.applicationId,
instanceId: currentEmbeddedActivity.compositeInstanceId})]);
r0 = value;
} else {
r0 = value3;
}
return r0;
}
function _fun116701({channel}) { // fn#116701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:2628, offset: 0x0249406e, size: 130 bytes, params: 2, frame: 18
const value3 = env0_3(env0_4.useState(function() {
return PictureInPicturePositions.TOP_RIGHT;
}), 2);
return ((Component) => <Component channel={channel} preferredPosition={value3[0]} onMove={value3[1]}>{((Component) => <Component channel={channel} />)(env0_18)}</Component>)(importDefault(7732) /* metro dependency 7732: PictureInPicture */);
}
function _fun116696() { // fn#116696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:1169, offset: 0x02493efb, size: 45 bytes, params: 1, frame: 12
return env0_1 != null && MediaEngineStore.isLocalVideoDisabled(env0_1.id);
}
function PictureInPictureGlobal({channel}) { // fn#116703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:3496, offset: 0x024940ff, size: 529 bytes, params: 2, frame: 24
const styles = useStyles();
const r12 = (require(10915) /* metro dependency 10915: isChannelFocusedNative */).useIsChannelFocused() ? 0 : 1;
const value5 = useBestActiveChatInputContainerHeight();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = PictureInPictureGlobalN;
let object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.drawerState = r12;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.STANDARD_EASING = STANDARD_EASING;
closure.__closure = object2;
closure.__workletHash = 5168896066356;
closure.__initData = env0_20;
const value6 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = PictureInPictureGlobalO;
object2 = {interpolate: reanimatedRexportModule.interpolate, animatedDrawerState: value6};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object2.NAV_BAR_HEIGHT = NAV_BAR_HEIGHT;
object2.PADDING = 12;
object2.chatInputContainerHeight = value5;
const PIP_AVOIDANCE_TAB_BAR_HEIGHT = (require(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */).PIP_AVOIDANCE_TAB_BAR_HEIGHT;
object2.PIP_AVOIDANCE_TAB_BAR_HEIGHT = PIP_AVOIDANCE_TAB_BAR_HEIGHT;
closure.__closure = object2;
closure.__workletHash = 8833756900366;
closure.__initData = env0_21;
const value7 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const {left, right} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items2 = [StyleSheet.absoluteFill];
items2[1] = {paddingLeft: left, paddingRight: right};
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={items2} pointerEvents="box-none">
<View2 style={[styles.container, value7]} pointerEvents="box-none">
{((Component) => <Component channel={channel} />)(env0_19)}
</View2>
</View>
);
}
function _fun116698() { // fn#116698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:1375, offset: 0x02493f89, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
value.openGuildVoiceModal(channel, 'PIP');
}
function _fun116693() { // fn#116693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:770, offset: 0x02493e34, size: 52 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const getStreamParticipants = ChannelRTCStore.getStreamParticipants;
return Reflect.apply(getStreamParticipants, ChannelRTCStore, [channel.id]).find(function(a0) {
return a0.user.id === AuthenticationStore.getId();
});
}
function _fun116699() { // fn#116699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:1595, offset: 0x02493fbb, size: 87 bytes, params: 1, frame: 13
var r1;
var binding;
var LANDSCAPE;
const object = {};
var value;
object.height = height;
object.width = width;
if (env0_4) {
r1 = 'row';
} else {
binding = Module00057;
value = environment.__proto__;
LANDSCAPE = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType.LANDSCAPE;
value = 'column';
r1 = binding !== LANDSCAPE ? value : 'row';
}
object.flexDirection = r1;
return object;
}
function onSingleTap_116700() { // fn#116700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:2179, offset: 0x02494012, size: 92 bytes, params: 1, frame: 15
const value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
if (currentEmbeddedActivity != null) {
(importDefault(8111) /* metro dependency 8111: transitionToActivityNative */)(channel.guild_id,
currentEmbeddedActivity?.location);
}
env0_2();
}
function _fun116695() { // fn#116695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:876, offset: 0x02493e8c, size: 111 bytes, params: 1, frame: 18
var r0;
var getParticipant;
var id;
let value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
const value3 = null;
if (value3 != currentEmbeddedActivity) {
getParticipant = ChannelRTCStore.getParticipant;
id = channel.id;
value = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
value = Reflect.apply(getParticipant, ChannelRTCStore, [id,
value.getEmbeddedActivityParticipantId({applicationId: currentEmbeddedActivity.applicationId,
instanceId: currentEmbeddedActivity.compositeInstanceId})]);
r0 = value;
} else {
r0 = value3;
}
return r0;
}
function _fun116696() { // fn#116696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:1169, offset: 0x02493efb, size: 45 bytes, params: 1, frame: 12
return env0_1 != null && MediaEngineStore.isLocalVideoDisabled(env0_1.id);
}
function _fun116698() { // fn#116698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:1375, offset: 0x02493f89, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
value.openGuildVoiceModal(channel, 'PIP');
}
function _fun116699() { // fn#116699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:1595, offset: 0x02493fbb, size: 87 bytes, params: 1, frame: 13
var r1;
var binding;
var LANDSCAPE;
const object2 = {};
var value;
object2.height = height;
object2.width = width;
if (env0_4) {
r1 = 'row';
} else {
binding = env0_3;
value = environment.__proto__;
LANDSCAPE = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType.LANDSCAPE;
value = 'column';
r1 = binding !== LANDSCAPE ? value : 'row';
function _fun116701({channel}) { // fn#116701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:2628, offset: 0x0249406e, size: 130 bytes, params: 2, frame: 18
const value3 = Module00057(env0_4.useState(function() {
return PictureInPicturePositions.TOP_RIGHT;
}), 2);
return ((Component) => <Component channel={channel} preferredPosition={value3[0]} onMove={value3[1]}>{((Component) => <Component channel={channel} />)(env0_18)}</Component>)(PictureInPicture);
}
object2.flexDirection = r1;
return object2;
}
function onSingleTap_116700() { // fn#116700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:2179, offset: 0x02494012, size: 92 bytes, params: 1, frame: 15
const value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
if (currentEmbeddedActivity != null) {
(importDefault(8111) /* metro dependency 8111: transitionToActivityNative */)(channel.guild_id,
currentEmbeddedActivity?.location);
function PictureInPictureGlobal({channel}) { // fn#116703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:3496, offset: 0x024940ff, size: 529 bytes, params: 2, frame: 24
const styles = useStyles();
const r12 = (require(10915) /* metro dependency 10915: isChannelFocusedNative */).useIsChannelFocused() ? 0 : 1;
const value5 = useBestActiveChatInputContainerHeight();
const useDerivedValue = ReanimatedRexportModule.useDerivedValue;
let closure = PictureInPictureGlobalN;
let object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.drawerState = r12;
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.STANDARD_EASING = STANDARD_EASING;
closure.__closure = object;
closure.__workletHash = 5168896066356;
closure.__initData = env0_20;
const value6 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = PictureInPictureGlobalO;
object = {interpolate: ReanimatedRexportModule.interpolate, animatedDrawerState: value6};
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object.NAV_BAR_HEIGHT = NAV_BAR_HEIGHT;
object.PADDING = 12;
object.chatInputContainerHeight = value5;
const PIP_AVOIDANCE_TAB_BAR_HEIGHT = (GetPIPBottomOffsetForPIPModeModule).PIP_AVOIDANCE_TAB_BAR_HEIGHT;
object.PIP_AVOIDANCE_TAB_BAR_HEIGHT = PIP_AVOIDANCE_TAB_BAR_HEIGHT;
closure.__closure = object;
closure.__workletHash = 8833756900366;
closure.__initData = env0_21;
const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const {left, right} = (UseSafeAreaInsetsNative)();
const items2 = [StyleSheet.absoluteFill];
items2[1] = {paddingLeft: left, paddingRight: right};
const View2 = (ReanimatedRexport).View;
return (
<View style={items2} pointerEvents="box-none">
<View2 style={[styles.container, value7]} pointerEvents="box-none">
{((Component) => <Component channel={channel} />)(env0_19)}
</View2>
</View>
);
function PictureInPictureGlobalN() { // fn#116704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:3629, owner: PictureInPictureGlobal.n, offset: 0x02494310, size: 77 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const binding = env0_0;
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
return Reflect.apply(withTiming, value, [binding, {easing: STANDARD_EASING, duration: 250}]);
}
function PictureInPictureGlobalO() { // fn#116705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:3898, owner: PictureInPictureGlobal.o, offset: 0x0249435d, size: 200 bytes, params: 1, frame: 22
const object = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let interpolate = value.interpolate;
const value3 = env0_2.get();
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object.marginTop = Reflect.apply(interpolate, value, [value3, [0, 1], [NAV_BAR_HEIGHT + 12, 12]]);
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = value.interpolate;
const value5 = env0_2.get();
const items2 = [env0_1 + 12];
const PIP_AVOIDANCE_TAB_BAR_HEIGHT = (GetPIPBottomOffsetForPIPModeModule).PIP_AVOIDANCE_TAB_BAR_HEIGHT;
items2[1] = PIP_AVOIDANCE_TAB_BAR_HEIGHT + 12;
object.marginBottom = Reflect.apply(interpolate, value, [value5, [0, 1], items2]);
return object;
}
}
env0_2();
}
function PictureInPictureGlobalN() { // fn#116704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:3629, owner: PictureInPictureGlobal.n, offset: 0x02494310, size: 77 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const binding = env0_0;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
return Reflect.apply(withTiming, value, [binding, {easing: STANDARD_EASING, duration: 250}]);
}
function PictureInPictureGlobalO() { // fn#116705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15459:3898, owner: PictureInPictureGlobal.o, offset: 0x0249435d, size: 200 bytes, params: 1, frame: 22
const object2 = {};
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let interpolate = value.interpolate;
const value3 = env0_2.get();
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object2.marginTop = Reflect.apply(interpolate, value, [value3, [0, 1], [NAV_BAR_HEIGHT + 12, 12]]);
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
interpolate = value.interpolate;
const value5 = env0_2.get();
const items2 = [env0_1 + 12];
const PIP_AVOIDANCE_TAB_BAR_HEIGHT = (require(15263) /* metro dependency 15263: getPIPBottomOffsetForPIPMode */).PIP_AVOIDANCE_TAB_BAR_HEIGHT;
items2[1] = PIP_AVOIDANCE_TAB_BAR_HEIGHT + 12;
object2.marginBottom = Reflect.apply(interpolate, value, [value5, [0, 1], items2]);
return object2;
}
global.__d(_fun116691, 15262, [57, 31, 27, 1378, 4606, 7729, 1226, 4259, 661, 4299, 33, 4501, 1305, 697, 7734, 566,
4610, 7724, 7709, 7733, 8750, 7736, 7717, 10666, 10670, 10677, 10693, 10700, 8111, 10667, 7732, 10915, 4017,
4504, 5314, 15263, 1585,
2]) /* metro module 15262, dependencies: [57, 31, 27, 1378, 4606, 7729, 1226, 4259, 661, 4299, 33, 4501, 1305, 697, 7734, 566, 4610, 7724, 7709, 7733, 8750, 7736, 7717, 10666, 10670, 10677, 10693, 10700, 8111, 10667, 7732, 10915, 4017, 4504, 5314, 15263, 1585, 2] */;
@@ -1,70 +1,390 @@
/* Metro module 10664; source: modules/video_calls/native/components/PictureInPictureVideo.tsx; dependencies: [57, 31, 27, 1378, 4606, 1226, 4259, 1934, 4607, 7730, 7715, 4299, 33, 4501, 1305, 697, 10665, 22, 7724, 10666, 566, 7712, 10667, 10670, 10677, 10692, 10693, 10700, 8111, 10719, 3860, 8372, 9149, 7737, 7733, 7736, 1478, 477, 7717, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import SelectedChannelStore from '../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import MediaEngineStore from '../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import SpeakingStore from '../../../../stores/SpeakingStore.tsx'; /* Metro dependency 4607 */
import UseIsActivityFocused from '../../../activities/useIsActivityFocused.tsx'; /* Metro dependency 7724 */
import ChannelCallLifecycleStore from '../ChannelCallLifecycleStore.tsx'; /* Metro dependency 7730 */
import UsePipDimensions from './usePipDimensions.tsx'; /* Metro dependency 7736 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as CallConstantsModule from '../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as UseShouldForcePipOrientationModule from './useShouldForcePipOrientation.tsx'; /* Metro dependency 7733 */
import * as UseIsViewingActivityModule from '../../../activities/native/useIsViewingActivity.tsx'; /* Metro dependency 7737 */
function _fun82024(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:6, offset: 0x01ee7977, size: 804 bytes, params: 8, frame: 25
var object6;
const env0_0 = require;
const closure = areParticipantsEqual_82025;
const areParticipantsEqual_820252 = areParticipantsEqual_82025;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.TouchableOpacity;
const env0_5 = value2.View;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const speakingStore = importDefault(4607) /* metro dependency 4607: SpeakingStore */;
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
const env0_13 = channelCallStoreModule.togglePipFocus;
const env0_14 = channelCallStoreModule.useIsVoiceChatFocused;
const env0_15 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_16 = value4.jsx;
const env0_17 = value4.Fragment;
const env0_18 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object6 = {};
const nativeModule = require(1305) /* metro dependency 1305: native */;
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = nativeModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
object6.elevationShadow = Reflect.apply(generateBoxShadowStyle, nativeModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
const object7 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const generateBoxShadowStyle = NativeModule.generateBoxShadowStyle;
const EIGHT_DP_ELEVATION_SHADOW_PARAMS = NativeModule.EIGHT_DP_ELEVATION_SHADOW_PARAMS;
object.elevationShadow = Reflect.apply(generateBoxShadowStyle, NativeModule, [EIGHT_DP_ELEVATION_SHADOW_PARAMS]);
const object2 = {};
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object7.backgroundColor = BLACK;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object7.overflow = 'hidden';
object6.background = object7;
const object8 = {};
object2.backgroundColor = BLACK;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.overflow = 'hidden';
object.background = object2;
const object3 = {};
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object8.backgroundColor = BLACK;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object6.backgroundPipFab = object8;
const object9 = {};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object9.overflow = 'hidden';
object6.pip = object9;
const object10 = {};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object10.overflow = 'hidden';
object6.pipFab = object10;
object6.avatarContainer = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center'};
object6.activityPipContainer = {'flex': 1, 'width': '100%'};
object6.thermalAlertIconContainer = {'width': 22, 'height': 22, 'backgroundColor': 'rgba(78, 80, 88, 0.48)',
object3.backgroundColor = BLACK;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.backgroundPipFab = object3;
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.overflow = 'hidden';
object.pip = object4;
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object5.overflow = 'hidden';
object.pipFab = object5;
object.avatarContainer = {'width': '100%', 'height': '100%', 'alignItems': 'center', 'justifyContent': 'center'};
object.activityPipContainer = {'flex': 1, 'width': '100%'};
object.thermalAlertIconContainer = {'width': 22, 'height': 22, 'backgroundColor': 'rgba(78, 80, 88, 0.48)',
'borderRadius': 11, 'justifyContent': 'center', 'alignItems': 'center', 'position': 'absolute', 'top': 6,
'left': 6};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object6.thermalAlertIcon = {'width': 14, 'height': 14, color: WHITE};
const env0_19 = Reflect.apply(createStyles, createStylesModule, [object6]);
object.thermalAlertIcon = {'width': 14, 'height': 14, color: WHITE};
const env0_19 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_20 = value.memo(_fun82026);
const env0_21 = value.memo(_fun82032);
value = value.memo(_fun82041);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/PictureInPictureVideo.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/PictureInPictureVideo.tsx');
exports.default = value;
exports.areParticipantsEqual = closure;
exports.areParticipantsEqual = areParticipantsEqual_820252;
function _fun82026({channel, pipParticipant, selfParticipant}) { // fn#82026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1161, offset: 0x01ee7d83, size: 931 bytes, params: 2, frame: 27
const env0_2 = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.openVoice ?? (importDefault(22) /* metro dependency 22 */).noop;
const env0_3 = useIsVoiceChatFocused();
const env0_4 = (UseIsActivityFocused)(channel.id);
let type = pipParticipant?.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
const r4 = type === ACTIVITY && (importDefault(10666) /* metro dependency 10666: isWatchTogetherApplication */)(pipParticipant?.applicationId);
const value7 = (FluxModule).useStateFromStores([MediaEngineStore], _fun82027,
[pipParticipant]);
const onSingleTap_820282 = onSingleTap_82028;
const onSingleTap_820292 = onSingleTap_82029;
type = pipParticipant?.type;
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
return (
<>
{
selfParticipant == null || r4
? null
: ((Component) => <Component participant={selfParticipant} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={onSingleTap_82031} />)(importDefault(10693) /* metro dependency 10693: UserTile */)
}
{
HIDDEN_STREAM === type || ParticipantTypes.STREAM === type
? (
pipParticipant.user.id === AuthenticationStore.getId()
? ((Component) => <Component onSingleTap={onSingleTap_820282} onDoubleTap={onSingleTap_820282} />)(importDefault(10667) /* metro dependency 10667: ScreenshareTile */)
: ((Component) => <Component removeEmptyStateButton removeEmptyStateImage resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.CONTAIN} participant={pipParticipant} onSingleTap={onSingleTap_820292} onDoubleTap={onSingleTap_820292} />)(importDefault(10670) /* metro dependency 10670: StreamTile */)
)
: (
ParticipantTypes.USER === type
? (
(importDefault(10692) /* metro dependency 10692: participantHasVideo */)(pipParticipant)
? (
value7
? null
: ((Component) => <Component participant={pipParticipant} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={onSingleTap_820292} onDoubleTap={onSingleTap_820292} />)(importDefault(10693) /* metro dependency 10693: UserTile */)
)
: null
)
: (
ParticipantTypes.ACTIVITY !== type
? null
: ((Component) => <Component participant={pipParticipant} channel={channel} onSingleTap={onSingleTap} />)(importDefault(10700) /* metro dependency 10700: ActivityTile */)
)
)
}
</>
);
function _fun82027() { // fn#82027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1463, offset: 0x01ee8126, size: 45 bytes, params: 1, frame: 12
return pipParticipant != null && MediaEngineStore.isLocalVideoDisabled(pipParticipant.id);
}
function onDoubleTap() { // fn#82028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1528, offset: 0x01ee8153, size: 113 bytes, params: 1, frame: 17
var id;
var defaultImport;
var selectParticipant;
let value = environment.__proto__;
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
const value3 = null;
if (value3 != voiceChannelId) {
value = undefined;
defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
selectParticipant = defaultImport.selectParticipant;
id = value3 == pipParticipant ? value : pipParticipant.id;
Reflect.apply(selectParticipant, defaultImport, [voiceChannelId, value3 != id ? id : value3]);
if (env0_3) {
env0_2();
}
}
}
function onDoubleTap_82029() { // fn#82029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1658, offset: 0x01ee81c4, size: 91 bytes, params: 1, frame: 13
var defaultImport;
if (env0_3) {
env0_2();
}
if (env0_4) {
defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
defaultImport.selectParticipant(channel.id, null);
} else {
togglePipFocus();
}
}
function onSingleTap() { // fn#82030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2303, offset: 0x01ee821f, size: 92 bytes, params: 1, frame: 13
const value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
if (currentEmbeddedActivity != null) {
(importDefault(8111) /* metro dependency 8111: transitionToActivityNative */)(channel.guild_id,
currentEmbeddedActivity.location);
}
if (env0_3) {
env0_2();
}
}
function onSingleTap_82031() { // fn#82031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2549, offset: 0x01ee827b, size: 39 bytes, params: 1, frame: 10
if (env0_3) {
env0_2();
} else {
value = environment.__proto__;
togglePipFocus();
}
}
}
function _fun82032({channel, selfParticipant}) { // fn#82032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2645, offset: 0x01ee82a2, size: 669 bytes, params: 2, frame: 26
var Icon;
var object2;
var thermalAlertIcon;
const styles = useStyles();
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const value4 = Module00057(Reflect.apply(useStateFromStoresArray, FluxModule, [[ChannelCallLifecycleStore], _fun82033]),
2);
const property = value4[0];
const property2 = value4[1];
const value5 = _fun82034({channelId: channel.id, selfParticipant: selfParticipant});
const useToken = UseTokenModule.useToken;
const PRIMARY_800 = (Native).unsafe_rawColors.PRIMARY_800;
const value9 = (importDefault(8372) /* metro dependency 8372: useAvatarColor */)(value5 == null ? undefined : value5.user.getAvatarURL(channel.guild_id,
80), Reflect.apply(useToken, UseTokenModule, [PRIMARY_800]));
if (value5 == null) {
return null;
}
let r6 = value5.streamId != null && value5.voiceState?.selfVideo;
const items3 = [styles.avatarContainer];
items3[1] = {backgroundColor: value9};
if (r6) {
if (property2) {
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
r6 = (
<Avatar
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48}
channel={channel}
guildId={channel.guild_id}
user={value5.user}
speaking={value5.speaking}
/>
);
} else {
r6 = ((Component) => <Component participant={value5} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} />)(importDefault(10693) /* metro dependency 10693: UserTile */);
}
} else {
const Avatar2 = (require(1305) /* metro dependency 1305: native */).Avatar;
r6 = (
<Avatar2
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48}
channel={channel}
guildId={channel.guild_id}
user={value5.user}
speaking={value5.speaking}
/>
);
}
const items2 = [r6];
if (property) {
var viewBinding2Props = {style: styles.thermalAlertIconContainer};
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
object2 = {};
thermalAlertIcon = styles.thermalAlertIcon;
object2.style = thermalAlertIcon;
object2.source = importDefault(9149) /* metro dependency 9149 */;
thermalAlertIcon = styles.thermalAlertIcon;
object2.color = thermalAlertIcon.color;
r6 = (
<View {...viewBinding2Props}>
<Icon {...object2} />
</View>
);
} else {
r6 = null;
}
items2[1] = r6;
return (
<View style={items3}>
{items2}
</View>
);
function _fun82033() { // fn#82033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2737, offset: 0x01ee853f, size: 41 bytes, params: 1, frame: 10
const value = environment.__proto__;
const channelCallLifecycleStoreBinding = ChannelCallLifecycleStore;
const items2 = [channelCallLifecycleStoreBinding.consumedRequestToRespondToSeriousThermalState()];
items2[1] = channelCallLifecycleStoreBinding.isReactingToThermalState();
return items2;
}
function _fun82034({channelId, selfParticipant}) { // fn#82034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2850, offset: 0x01ee8568, size: 364 bytes, params: 2, frame: 26
let useStateFromStores = FluxModule.useStateFromStores;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [[ChannelCallLifecycleStore], function() {
return ChannelCallLifecycleStore.isReactingToThermalState();
}]);
useStateFromStores = FluxModule.useStateFromStores;
items2 = [ChannelRTCStore];
const areParticipantsEqual_82025Binding = areParticipantsEqual_82025;
const value5 = env1_3(Reflect.apply(useStateFromStores, FluxModule, [items2, _fun82036, [channelId],
areParticipantsEqual_82025Binding]), 2);
const property = value5[0];
const property2 = value5[1];
useStateFromStores = FluxModule.useStateFromStores;
if ((require(10719) /* metro dependency 10719: useLeadingEdgeDebounce */).useLeadingEdgeDebounce(Reflect.apply(useStateFromStores,
FluxModule, [[SpeakingStore], _fun82037, [selfParticipant]]), 1000) != null) {
var value8 = property.find(_fun82039);
if (value8 == null) {
if (selfParticipant?.streamId != null) {
return selfParticipant;
}
if (value3) {
return selfParticipant;
}
items2 = [];
arraySpread(items2, property2, 0, areParticipantsEqual_82025Binding);
return items2.sort(function({lastSpoke}, a1) {
return lastSpoke < a1.lastSpoke ? 1 : -1;
})[0] ?? selfParticipant;
}
var type = value8.type;
var USER = ParticipantTypes.USER;
if (type === USER) {
return value8;
}
}
if (selfParticipant?.streamId != null) {
return selfParticipant;
}
if (value3) {
return selfParticipant;
}
items2 = [];
arraySpread(items2, property2, 0, areParticipantsEqual_82025Binding);
return items2.sort(function({lastSpoke}, a1) {
return lastSpoke < a1.lastSpoke ? 1 : -1;
})[0] ?? selfParticipant;
function _fun82036() { // fn#82036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2995, offset: 0x01ee86e7, size: 65 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
const channelRTCStoreBinding = ChannelRTCStore;
const getParticipants = channelRTCStoreBinding.getParticipants;
const channelIdBinding = channelId;
const getVideoParticipants = channelRTCStoreBinding.getVideoParticipants;
const getParticipantsVersion = channelRTCStoreBinding.getParticipantsVersion;
return [Reflect.apply(getParticipants, channelRTCStoreBinding, [channelIdBinding]),
Reflect.apply(getVideoParticipants, channelRTCStoreBinding, [channelIdBinding]),
Reflect.apply(getParticipantsVersion, channelRTCStoreBinding, [channelIdBinding])];
}
function _fun82037() { // fn#82037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:3161, offset: 0x01ee8728, size: 55 bytes, params: 1, frame: 12
var environment;
var r0;
const selfParticipantBinding = selfParticipant;
let value = null;
if (value == selfParticipantBinding) {
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = SpeakingStore.getSpeakers();
value = value.find(_fun82038);
r0 = value;
}
return r0;
function _fun82038(a0) { // fn#82038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:3200, offset: 0x01ee875f, size: 47 bytes, params: 2, frame: 12
var r0;
let value = environment.__proto__;
const user = selfParticipant.user;
value = a0 !== user.id;
if (value) {
value = environment.__proto__.__proto__.__proto__;
value = SpeakingStore.isSpeaking(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
function _fun82039({id}) { // fn#82039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:3309, offset: 0x01de46be, size: 21 bytes, params: 2, frame: 2
return id === env0_2;
}
}
}
function _fun82041({channel, pipParticipant, selfParticipant}) { // fn#82041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:4218, offset: 0x01ee87b2, size: 493 bytes, params: 2, frame: 32
const styles = useStyles();
const value3 = (UseIsViewingActivityModule).useIsViewingActivity({channelId: channel.id});
const value4 = (UseShouldForcePipOrientationModule).useShouldForcePipOrientation({channel: channel});
const value5 = (UsePipDimensions)({channelId: channel.id,
forcedOrientation: value4});
const {width, height} = (UseWindowDimensionsNative)();
const r4 = value3 ? styles.backgroundPipFab : styles.background;
const items2 = [value3 ? styles.pipFab : styles.pip];
items2[1] = PlatformUtilsModule.isAndroid() ? styles.elevationShadow : undefined;
const object2 = {};
object2.flexDirection = width > height ? 'row' : value4 !== (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType.LANDSCAPE ? 'column' : 'row';
items2[2] = object2;
items2[3] = value5;
return (
<View style={r4}>
<TouchableOpacity activeOpacity={0.7}>
<View style={items2}>
{
value3
? (
<View pointerEvents="none" style={styles.activityPipContainer}>
{((Component) => <Component channel={channel} pipParticipant={pipParticipant} selfParticipant={selfParticipant} />)(env0_21)}
</View>
)
: ((Component) => <Component channel={channel} pipParticipant={pipParticipant} selfParticipant={selfParticipant} />)(env0_20)
}
</View>
</TouchableOpacity>
</View>
);
}
}
function areParticipantsEqual_82025(a0, a1) { // fn#82025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2575, offset: 0x01ee7c9b, size: 232 bytes, params: 3, frame: 14
@@ -174,263 +494,7 @@ function areParticipantsEqual_82025(a0, a1) { // fn#82025, source: /ci/build/dis
return r3 === r8;
}
function _fun82026({channel, pipParticipant, selfParticipant}) { // fn#82026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1161, offset: 0x01ee7d83, size: 931 bytes, params: 2, frame: 27
const env0_2 = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.openVoice ?? (importDefault(22) /* metro dependency 22 */).noop;
const env0_3 = useIsVoiceChatFocused();
const env0_4 = (importDefault(7724) /* metro dependency 7724: useIsActivityFocused */)(channel.id);
let type = pipParticipant?.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
const r4 = type === ACTIVITY && (importDefault(10666) /* metro dependency 10666: isWatchTogetherApplication */)(pipParticipant?.applicationId);
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], _fun82027,
[pipParticipant]);
const closure = onSingleTap_82028;
const closure2 = onSingleTap_82029;
type = pipParticipant?.type;
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
return (
<>
{selfParticipant == null || r4 ? null : ((Component) => <Component participant={selfParticipant} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={onSingleTap_82031} />)(importDefault(10693) /* metro dependency 10693: UserTile */)}
{HIDDEN_STREAM === type || ParticipantTypes.STREAM === type ? pipParticipant.user.id === AuthenticationStore.getId() ? ((Component) => <Component onSingleTap={closure} onDoubleTap={closure} />)(importDefault(10667) /* metro dependency 10667: ScreenshareTile */) : ((Component) => <Component removeEmptyStateButton removeEmptyStateImage resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.CONTAIN} participant={pipParticipant} onSingleTap={closure2} onDoubleTap={closure2} />)(importDefault(10670) /* metro dependency 10670: StreamTile */) : ParticipantTypes.USER === type ? (importDefault(10692) /* metro dependency 10692: participantHasVideo */)(pipParticipant) ? value7 ? null : ((Component) => <Component participant={pipParticipant} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} onSingleTap={closure2} onDoubleTap={closure2} />)(importDefault(10693) /* metro dependency 10693: UserTile */) : null : ParticipantTypes.ACTIVITY !== type ? null : ((Component) => <Component participant={pipParticipant} channel={channel} onSingleTap={onSingleTap} />)(importDefault(10700) /* metro dependency 10700: ActivityTile */)}
</>
);
}
function _fun82032({channel, selfParticipant}) { // fn#82032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2645, offset: 0x01ee82a2, size: 669 bytes, params: 2, frame: 26
var Icon;
var object;
var thermalAlertIcon;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value4 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[ChannelCallLifecycleStore], _fun82033]),
2);
const property = value4[0];
const property2 = value4[1];
const value5 = _fun82034({channelId: channel.id, selfParticipant: selfParticipant});
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const PRIMARY_800 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800;
const value9 = (importDefault(8372) /* metro dependency 8372: useAvatarColor */)(value5 == null ? undefined : value5.user.getAvatarURL(channel.guild_id,
80), Reflect.apply(useToken, useTokenModule, [PRIMARY_800]));
if (value5 == null) {
return null;
}
let r6 = value5.streamId != null && value5.voiceState?.selfVideo;
const items3 = [styles.avatarContainer];
items3[1] = {backgroundColor: value9};
if (r6) {
if (property2) {
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
r6 = <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48} channel={channel} guildId={channel.guild_id} user={value5.user} speaking={value5.speaking} />;
} else {
r6 = ((Component) => <Component participant={value5} avatarSize={(require(1305) /* metro dependency 1305: native */).AvatarSizes.PROFILE} resizeMode={(require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode.COVER} />)(importDefault(10693) /* metro dependency 10693: UserTile */);
}
} else {
const Avatar2 = (require(1305) /* metro dependency 1305: native */).Avatar;
r6 = <Avatar2 size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.LARGE_48} channel={channel} guildId={channel.guild_id} user={value5.user} speaking={value5.speaking} />;
}
const items2 = [r6];
if (property) {
var viewBinding2Props = {style: styles.thermalAlertIconContainer};
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
object = {};
thermalAlertIcon = styles.thermalAlertIcon;
object.style = thermalAlertIcon;
object.source = importDefault(9149) /* metro dependency 9149 */;
thermalAlertIcon = styles.thermalAlertIcon;
object.color = thermalAlertIcon.color;
r6 = <View {...viewBinding2Props}><Icon {...object} /></View>;
} else {
r6 = null;
}
items2[1] = r6;
return (
<View style={items3}>
{items2}
</View>
);
}
function _fun82041({channel, pipParticipant, selfParticipant}) { // fn#82041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:4218, offset: 0x01ee87b2, size: 493 bytes, params: 2, frame: 32
const styles = useStyles();
const value3 = (require(7737) /* metro dependency 7737: useIsViewingActivity */).useIsViewingActivity({channelId: channel.id});
const value4 = (require(7733) /* metro dependency 7733: useShouldForcePipOrientation */).useShouldForcePipOrientation({channel: channel});
const value5 = (importDefault(7736) /* metro dependency 7736: usePipDimensions */)({channelId: channel.id,
forcedOrientation: value4});
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const r4 = value3 ? styles.backgroundPipFab : styles.background;
const items2 = [value3 ? styles.pipFab : styles.pip];
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
items2[1] = platformUtilsModule.isAndroid() ? styles.elevationShadow : undefined;
const object = {};
object.flexDirection = width > height ? 'row' : value4 !== (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType.LANDSCAPE ? 'column' : 'row';
items2[2] = object;
items2[3] = value5;
return (
<View style={r4}>
<TouchableOpacity activeOpacity={0.7}>
<View style={items2}>
{value3 ? <View pointerEvents="none" style={styles.activityPipContainer}>{((Component) => <Component channel={channel} pipParticipant={pipParticipant} selfParticipant={selfParticipant} />)(env0_21)}</View> : ((Component) => <Component channel={channel} pipParticipant={pipParticipant} selfParticipant={selfParticipant} />)(env0_20)}
</View>
</TouchableOpacity>
</View>
);
}
function _fun82027() { // fn#82027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1463, offset: 0x01ee8126, size: 45 bytes, params: 1, frame: 12
return pipParticipant != null && MediaEngineStore.isLocalVideoDisabled(pipParticipant.id);
}
function onDoubleTap() { // fn#82028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1528, offset: 0x01ee8153, size: 113 bytes, params: 1, frame: 17
var id;
var defaultImport;
var selectParticipant;
let value = environment.__proto__;
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
const value3 = null;
if (value3 != voiceChannelId) {
value = undefined;
defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
selectParticipant = defaultImport.selectParticipant;
id = value3 == pipParticipant ? value : pipParticipant.id;
Reflect.apply(selectParticipant, defaultImport, [voiceChannelId, value3 != id ? id : value3]);
if (env0_3) {
env0_2();
}
}
}
function onDoubleTap_82029() { // fn#82029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:1658, offset: 0x01ee81c4, size: 91 bytes, params: 1, frame: 13
var defaultImport;
if (env0_3) {
env0_2();
}
if (env0_4) {
defaultImport = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
defaultImport.selectParticipant(channel.id, null);
} else {
togglePipFocus();
}
}
function onSingleTap() { // fn#82030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2303, offset: 0x01ee821f, size: 92 bytes, params: 1, frame: 13
const value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
if (currentEmbeddedActivity != null) {
(importDefault(8111) /* metro dependency 8111: transitionToActivityNative */)(channel.guild_id,
currentEmbeddedActivity.location);
}
if (env0_3) {
env0_2();
}
}
function onSingleTap_82031() { // fn#82031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2549, offset: 0x01ee827b, size: 39 bytes, params: 1, frame: 10
if (env0_3) {
env0_2();
} else {
value = environment.__proto__;
togglePipFocus();
}
}
function _fun82033() { // fn#82033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2737, offset: 0x01ee853f, size: 41 bytes, params: 1, frame: 10
const value = environment.__proto__;
const items2 = [ChannelCallLifecycleStore.consumedRequestToRespondToSeriousThermalState()];
items2[1] = ChannelCallLifecycleStore.isReactingToThermalState();
return items2;
}
function _fun82034({channelId, selfParticipant}) { // fn#82034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2850, offset: 0x01ee8568, size: 364 bytes, params: 2, frame: 26
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const value3 = Reflect.apply(useStateFromStores, fluxModule, [[ChannelCallLifecycleStore], function() {
return ChannelCallLifecycleStore.isReactingToThermalState();
}]);
const moduleValue2 = fluxModule;
useStateFromStores = moduleValue2.useStateFromStores;
items2 = [ChannelRTCStore];
const areParticipantsEqual_82025Binding = areParticipantsEqual_82025;
const value5 = env1_3(Reflect.apply(useStateFromStores, moduleValue2, [items2, _fun82036, [channelId],
areParticipantsEqual_82025Binding]), 2);
const property = value5[0];
const property2 = value5[1];
const moduleValue3 = fluxModule;
useStateFromStores = moduleValue3.useStateFromStores;
if ((require(10719) /* metro dependency 10719: useLeadingEdgeDebounce */).useLeadingEdgeDebounce(Reflect.apply(useStateFromStores,
moduleValue3, [[SpeakingStore], _fun82037, [selfParticipant]]), 1000) != null) {
var value8 = property.find(_fun82039);
if (value8 == null) {
if (selfParticipant?.streamId != null) {
return selfParticipant;
}
if (value3) {
return selfParticipant;
}
items2 = [];
arraySpread(items2, property2, 0, areParticipantsEqual_82025Binding);
return items2.sort(function({lastSpoke}, a1) {
return lastSpoke < a1.lastSpoke ? 1 : -1;
})[0] ?? selfParticipant;
}
var type = value8.type;
var USER = ParticipantTypes.USER;
if (type === USER) {
return value8;
}
}
if (selfParticipant?.streamId != null) {
return selfParticipant;
}
if (value3) {
return selfParticipant;
}
items2 = [];
arraySpread(items2, property2, 0, areParticipantsEqual_82025Binding);
return items2.sort(function({lastSpoke}, a1) {
return lastSpoke < a1.lastSpoke ? 1 : -1;
})[0] ?? selfParticipant;
}
function _fun82036() { // fn#82036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:2995, offset: 0x01ee86e7, size: 65 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
const getParticipants = ChannelRTCStore.getParticipants;
const channelIdBinding = channelId;
const getVideoParticipants = ChannelRTCStore.getVideoParticipants;
const getParticipantsVersion = ChannelRTCStore.getParticipantsVersion;
return [Reflect.apply(getParticipants, ChannelRTCStore, [channelIdBinding]), Reflect.apply(getVideoParticipants,
ChannelRTCStore, [channelIdBinding]), Reflect.apply(getParticipantsVersion, ChannelRTCStore,
[channelIdBinding])];
}
function _fun82037() { // fn#82037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:3161, offset: 0x01ee8728, size: 55 bytes, params: 1, frame: 12
var environment;
var r0;
const selfParticipantBinding = selfParticipant;
let value = null;
if (value == selfParticipantBinding) {
r0 = value;
} else {
value = environment.__proto__.__proto__;
value = SpeakingStore.getSpeakers();
value = value.find(_fun82038);
r0 = value;
}
return r0;
}
function _fun82038(a0) { // fn#82038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10850:3200, offset: 0x01ee875f, size: 47 bytes, params: 2, frame: 12
var r0;
let value = environment.__proto__;
const user = selfParticipant.user;
value = a0 !== user.id;
if (value) {
value = environment.__proto__.__proto__.__proto__;
value = SpeakingStore.isSpeaking(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
global.__d(_fun82024, 10664, [57, 31, 27, 1378, 4606, 1226, 4259, 1934, 4607, 7730, 7715, 4299, 33, 4501, 1305, 697,
10665, 22, 7724, 10666, 566, 7712, 10667, 10670, 10677, 10692, 10693, 10700, 8111, 10719, 3860, 8372, 9149,
7737, 7733, 7736, 1478, 477, 7717,
2]) /* metro module 10664, dependencies: [57, 31, 27, 1378, 4606, 1226, 4259, 1934, 4607, 7730, 7715, 4299, 33, 4501, 1305, 697, 10665, 22, 7724, 10666, 566, 7712, 10667, 10670, 10677, 10692, 10693, 10700, 8111, 10719, 3860, 8372, 9149, 7737, 7733, 7736, 1478, 477, 7717, 2] */;
@@ -1,321 +1,359 @@
/* Metro module 10663; source: modules/video_calls/native/components/PopoutMenu.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 6746, 1305, 7972, 1478, 1585, 22, 4017, 4504, 4083, 5321, 2] */
import Module00022 from '../../../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import FormRow from '../../../../design/void/Form/native/FormRow.tsx'; /* Metro dependency 6746 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as Module04083Module from '../../../../by-id/module-04083.js'; /* Metro dependency 4083 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as NativeModule2 from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun82001(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:6, offset: 0x01ee6ccf, size: 405 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.jsxs;
const env0_8 = value2.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {position: 'absolute'};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {position: 'absolute'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{container: object3, popoutMenuRow: {flex: 1},
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [{container: object2, popoutMenuRow: {flex: 1},
popoutMenuRowLabel: {width: '100%'}}]);
object = {code: "function PopoutMenuTsx1(){const{withTiming,animateIn,STANDARD_EASING,ANIMATION_DURATION,runOnJS,handleClose,EXTRA_PADDING}=this.__closure;return{opacity:withTiming(animateIn?1:0,{easing:STANDARD_EASING,duration:ANIMATION_DURATION},'respect-motion-settings',function(finished){if(finished){runOnJS(handleClose)();}}),transform:[{translateY:withTiming(animateIn?-EXTRA_PADDING:0,{easing:STANDARD_EASING,duration:ANIMATION_DURATION})}]};}"};
object = {code: 'function PopoutMenuTsx2(finished){const{runOnJS,handleClose}=this.__closure;if(finished){runOnJS(handleClose)();}}'};
object = {code: 'function PopoutMenuTsx3(){const{runOnJS,handleLongPress}=this.__closure;runOnJS(handleLongPress)();}'};
object = {code: 'function PopoutMenuTsx4(){const{runOnJS,_setClose}=this.__closure;runOnJS(_setClose)(true);}'};
value = value.forwardRef(PopoutMenu);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/PopoutMenu.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/PopoutMenu.tsx');
exports.default = value;
}
function PopoutMenuRow({icon, text, onClick, onClose}) { // fn#82002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:370, offset: 0x01ee6e64, size: 241 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = env0_4.useCallback(function() {
if (onClick != null) {
onClick();
}
if (onClose != null) {
onClose();
}
}, [onClick, onClose]);
object = {leading: icon != null ? ((Icon) => <Icon source={icon} />)((require(1305) /* metro dependency 1305: native */).Icon) : null};
const FormLabel = (NativeModule2).FormLabel;
object.label = <FormLabel style={styles.popoutMenuRowLabel} text={text} />;
object.style = styles.popoutMenuRow;
object.onPress = value2;
return <FormRow {...object} />;
}
function PopoutMenuRow({icon, text, onClick, onClose}) { // fn#82002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:370, offset: 0x01ee6e64, size: 241 bytes, params: 2, frame: 23
var object2;
const styles = useStyles();
const value2 = env0_4.useCallback(function() {
if (onClick != null) {
onClick();
}
if (onClose != null) {
onClose();
}
}, [onClick, onClose]);
const FormRow = importDefault(6746) /* metro dependency 6746: FormRow */;
object2 = {leading: icon != null ? ((Icon) => <Icon source={icon} />)((require(1305) /* metro dependency 1305: native */).Icon) : null};
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
object2.label = <FormLabel style={styles.popoutMenuRowLabel} text={text} />;
object2.style = styles.popoutMenuRow;
object2.onPress = value2;
return <FormRow {...object2} />;
}
function PopoutMenu({disabled, title, trigger, rows, style, onOpen, onClose}, a1) { // fn#82004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:1473, offset: 0x01ee6f82, size: 1186 bytes, params: 3, frame: 40
var object2;
var r6;
var r0;
var jsxRuntimeEnv0_8Binding;
var items2;
var View2;
var object4;
var items3;
const styles = useStyles();
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
const env0_3 = height;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const env0_4 = bottom;
let binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [0]);
binding = env0_3;
const value4 = binding(value3, 2);
const property = value4[0];
const property2 = value4[1];
const binding2 = env0_4;
useState = binding2.useState;
const value5 = binding(Reflect.apply(useState, binding2, [false]), 2);
const property3 = value5[0];
const property4 = value5[1];
const binding3 = env0_4;
useState = binding3.useState;
const value6 = binding(Reflect.apply(useState, binding3, [false]), 2);
const property5 = value6[0];
const env0_9 = value6[1];
const value8 = env0_4.useRef(null);
const env0_10 = value8;
const value9 = env0_4.useRef(null);
const binding6 = env0_4;
useState = binding6.useState;
const value10 = binding(Reflect.apply(useState, binding6, [{'top': 0, 'left': 0, 'width': 0, 'height': 0}]), 2);
const property6 = value10[0];
const env0_13 = value10[1];
const binding7 = env0_4;
useState = binding7.useState;
const value11 = binding(Reflect.apply(useState, binding7, [{'width': 0, 'height': 0}]), 2);
const property7 = value11[0];
const env0_15 = value11[1];
env0_4.useEffect(_fun82005, [property5]);
binding = env0_4;
let useMemo = binding.useMemo;
const {top, left} = Reflect.apply(useMemo, binding, [_fun82009, [property7, bottom, height, width, property6]]);
env0_4.useImperativeHandle(a1, function() {
return {close: _fun82011};
}, [property4]);
const env0_16 = env0_4.useMemo(_fun82012, [property2]);
const r17 = property > 0 && !property3;
const value15 = env0_4.useCallback(_fun82014, [property3, onClose]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = PopoutMenuTe;
object2 = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, animateIn: r17};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.STANDARD_EASING = STANDARD_EASING;
object2.ANIMATION_DURATION = 250;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.handleClose = value15;
object2.EXTRA_PADDING = 8;
closure.__closure = object2;
closure.__workletHash = 2727321893876;
closure.__initData = env0_10;
const value16 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const env0_19 = env0_4.useCallback(_fun82017, []);
const value17 = env0_4.useCallback(_fun82018, [onOpen]);
binding = env0_4;
useMemo = binding.useMemo;
if (disabled) {
r0 = trigger;
} else {
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
items2 = [((GestureDetector) => <GestureDetector gesture={Reflect.apply(useMemo, binding, [_fun82019,
[value17]])}><View ref={value8}>{trigger}</View></GestureDetector>)((require(5321) /* metro dependency 5321 */).GestureDetector)];
if (property5) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {ref: value9, style: [styles.container, style, {left: left, top: top}, value16],
onLayout: onLayout_82022};
items3 = [title != null ? <PopoutMenuRow text={title} /> : null];
items3[1] = title != null ? ((FormDivider) => <FormDivider />)((require(7972) /* metro dependency 7972: native */).FormDivider) : null;
items3[2] = rows.map(_fun82023);
r6 = <View2 {...view2Props}>{items3}</View2>;
function PopoutMenu({disabled, title, trigger, rows, style, onOpen, onClose}, a1) { // fn#82004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:1473, offset: 0x01ee6f82, size: 1186 bytes, params: 3, frame: 40
var r6;
var r0;
var jsxRuntimeEnv0_8Binding;
var items2;
var View2;
var object2;
var items3;
const styles = useStyles();
const {width, height} = (UseWindowDimensionsNative)();
const height2 = height;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const bottom2 = bottom;
let binding = bottom2;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [0]);
binding = height2;
const value4 = binding(value3, 2);
const property = value4[0];
const property2 = value4[1];
const binding2 = bottom2;
useState = binding2.useState;
const value5 = binding(Reflect.apply(useState, binding2, [false]), 2);
const property3 = value5[0];
const property4 = value5[1];
const binding3 = bottom2;
useState = binding3.useState;
const value6 = binding(Reflect.apply(useState, binding3, [false]), 2);
const property5 = value6[0];
const env0_9 = value6[1];
const value8 = bottom2.useRef(null);
const env0_10 = value8;
const value9 = bottom2.useRef(null);
const binding6 = bottom2;
useState = binding6.useState;
const value10 = binding(Reflect.apply(useState, binding6, [{'top': 0, 'left': 0, 'width': 0, 'height': 0}]), 2);
const property6 = value10[0];
const env0_13 = value10[1];
const binding7 = bottom2;
useState = binding7.useState;
const value11 = binding(Reflect.apply(useState, binding7, [{'width': 0, 'height': 0}]), 2);
const property7 = value11[0];
const env0_15 = value11[1];
bottom2.useEffect(_fun82005, [property5]);
binding = bottom2;
let useMemo = binding.useMemo;
const {top, left} = Reflect.apply(useMemo, binding, [_fun82009, [property7, bottom, height, width, property6]]);
bottom2.useImperativeHandle(a1, function() {
return {close: _fun82011};
}, [property4]);
const env0_16 = bottom2.useMemo(_fun82012, [property2]);
const r17 = property > 0 && !property3;
const value15 = bottom2.useCallback(_fun82014, [property3, onClose]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const PopoutMenuTe2 = PopoutMenuTe;
object = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming, animateIn: r17};
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.STANDARD_EASING = STANDARD_EASING;
object.ANIMATION_DURATION = 250;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.handleClose = value15;
object.EXTRA_PADDING = 8;
PopoutMenuTe2.__closure = object;
PopoutMenuTe2.__workletHash = 2727321893876;
PopoutMenuTe2.__initData = env0_10;
const value16 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [PopoutMenuTe2]);
const env0_19 = bottom2.useCallback(_fun82017, []);
const value17 = bottom2.useCallback(_fun82018, [onOpen]);
binding = bottom2;
useMemo = binding.useMemo;
if (disabled) {
r0 = trigger;
} else {
r6 = null;
jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
items2 = [
<GestureDetector gesture={Reflect.apply(useMemo, binding, [_fun82019, [value17]])}>
<View ref={value8}>
{trigger}
</View>
</GestureDetector>,
];
if (property5) {
View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var view2Props = {ref: value9, style: [styles.container, style, {left: left, top: top}, value16],
onLayout: onLayout_82022};
items3 = [
title != null
? (
<PopoutMenuRow text={title} />
)
: null,
];
items3[1] = (
title != null
? ((FormDivider) => <FormDivider />)((require(7972) /* metro dependency 7972: native */).FormDivider)
: null
);
items3[2] = rows.map(_fun82023);
r6 = (
<View2 {...view2Props}>
{items3}
</View2>
);
} else {
r6 = null;
}
items2[1] = r6;
r0 = (
<>
{items2}
</>
);
}
items2[1] = r6;
r0 = <>{items2}</>;
}
return r0;
}
return r0;
function _fun82005() { // fn#82005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:1915, offset: 0x01ee7424, size: 121 bytes, params: 1, frame: 15
var current;
var r4;
var value4;
let r1 = JsxRuntimeModule.Fragment && env0_10?.current != null;
if (r1) {
value4 = env0_10 == null;
if (value4) {
r1 = value4;
r4 = undefined;
} else {
current = env0_10.current;
r1 = current == null;
r4 = current;
}
if (!r1) {
r4.measureInWindow(_fun82006);
}
global.setTimeout(_fun82007);
}
function _fun82006(a0, a1, a2, a3) { // fn#82006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2013, offset: 0x01ee749d, size: 67 bytes, params: 5, frame: 15
const binding = env1_13;
const object = {};
const Math = global.Math;
object.top = Math.max(a1, 0);
object.left = a0;
object.width = a2;
object.height = a3;
binding(object);
}
function _fun82007() { // fn#82007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2087, offset: 0x01ee74e0, size: 61 bytes, params: 1, frame: 14
var environment;
var r1;
var r3;
var current;
const value = environment.__proto__;
const value2 = env1_11 == null;
const value3 = undefined;
if (value2) {
r1 = value2;
r3 = value3;
} else {
current = env1_11.current;
r1 = current == null;
r3 = current;
}
if (!r1) {
r3.measureInWindow(_fun82008);
}
return value3;
function _fun82008(a0, a1, a2, a3) { // fn#82008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2147, offset: 0x01ee751d, size: 32 bytes, params: 5, frame: 11
env2_15({width: a2, height: a3});
}
}
function _fun82005() { // fn#82005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:1915, offset: 0x01ee7424, size: 121 bytes, params: 1, frame: 15
var current;
var r4;
var value4;
let r1 = env0_8 && env0_10?.current != null;
if (r1) {
value4 = env0_10 == null;
if (value4) {
r1 = value4;
r4 = undefined;
} else {
current = env0_10.current;
r1 = current == null;
r4 = current;
}
if (!r1) {
r4.measureInWindow(_fun82006);
function _fun82009() { // fn#82009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2212, offset: 0x01ee753d, size: 154 bytes, params: 1, frame: 5
const binding = env0_14;
const value2 = -binding.height;
const binding2 = env0_12;
return {top: binding2.top + binding2.height + binding.height + 8 + bottom < height ? env0_12.height + 16 : value2,
left: env0_12.left + env0_14.width + 8 > width ? env0_12.width - env0_14.width : 0};
}
global.setTimeout(_fun82007);
function _fun82010() { // fn#82010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2405, offset: 0x01ee75d7, size: 18 bytes, params: 1, frame: 2
return {close: close_82011};
function close_82011() { // fn#82011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2417, offset: 0x01dcf3ef, size: 18 bytes, params: 1, frame: 11
env1_7(true);
}
}
function _fun82012() { // fn#82012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2458, offset: 0x01ee75e9, size: 51 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return (Module00022).debounce(_fun82013, 16);
function _fun82013(a0) { // fn#82013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2481, offset: 0x00e76efe, size: 19 bytes, params: 2, frame: 11
env1_5(a0);
}
}
function _fun82014() { // fn#82014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2531, offset: 0x01ee761c, size: 35 bytes, params: 1, frame: 11
if (JsxRuntimeModule.jsx) {
onClose();
env0_9(false);
}
}
function PopoutMenuTe() { // fn#82015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2594, owner: PopoutMenu.te, offset: 0x01ee763f, size: 276 bytes, params: 1, frame: 28
const object = {};
const withTiming = TimingModule.withTiming;
const value3 = 0;
const r13 = env0_17 ? 1 : value3;
const object2 = {};
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object2.easing = STANDARD_EASING;
object2.duration = 250;
const teN2 = teN;
const object3 = {};
object3.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object3.handleClose = env0_18;
teN2.__closure = object3;
teN2.__workletHash = 7805688342878;
teN2.__initData = env1_11;
object.opacity = Reflect.apply(withTiming, TimingModule, [r13, object2, 'respect-motion-settings', teN2]);
object.transform = [{translateY: TimingModule.withTiming(env0_17 ? -8 : value3, {easing: STANDARD_EASING,
duration: 250})}];
return object;
function teN(a0) { // fn#82016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2722, owner: PopoutMenu.te.n, offset: 0x01ee7753, size: 56 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [env1_18])();
}
}
}
function _fun82017() { // fn#82017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3218, offset: 0x01ee778b, size: 18 bytes, params: 1, frame: 11
return (0, JsxRuntimeModule.jsxs)(true);
}
function _fun82018() { // fn#82018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3251, offset: 0x01ee779d, size: 75 bytes, params: 1, frame: 13
(0, JsxRuntimeModule.jsxs)(false);
(Module04083Module).trigger('impactHeavy');
env0_9(true);
onOpen();
}
function _fun82019() { // fn#82019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3325, offset: 0x01ee77e8, size: 211 bytes, params: 1, frame: 20
const Gesture = (Module05321Module).Gesture;
const value2 = Gesture.LongPress();
const onBegin = value2.onBegin;
let closure = t_82020;
const runOnJS = (ReanimatedRexportModule).runOnJS;
closure.__closure = {runOnJS: runOnJS, _setClose: JsxRuntimeModule.jsxs};
closure.__workletHash = 15929711498886;
closure.__initData = env1_13;
const value4 = Reflect.apply(onBegin, value2, [closure]);
const onStart = value4.onStart;
closure = n_82021;
closure.__closure = {runOnJS: runOnJS, handleLongPress: env0_20};
closure.__workletHash = 1649917173815;
closure.__initData = env1_12;
return Reflect.apply(onStart, value4, [closure]);
function t_82020() { // fn#82020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3377, offset: 0x01ee78bb, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env1_7);
value(true);
}
function n_82021() { // fn#82021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3525, offset: 0x01ee78ee, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env1_20)();
}
}
function PopoutMenuOnLayout({nativeEvent}) { // fn#82022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3858, owner: PopoutMenu.onLayout, offset: 0x01ee791e, size: 36 bytes, params: 2, frame: 11
env0_16(nativeEvent.layout.height);
}
function _fun82023(a0, a1) { // fn#82023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3990, offset: 0x01ee7942, size: 53 bytes, params: 3, frame: 15
return (
<PopoutMenuRow
{...a0}
{...{['onClose']: env0_19}}
key={a1}
/>
);
}
}
}
function _fun82009() { // fn#82009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2212, offset: 0x01ee753d, size: 154 bytes, params: 1, frame: 5
const binding = env0_14;
const value2 = -binding.height;
const binding2 = env0_12;
return {top: binding2.top + binding2.height + binding.height + 8 + bottom < height ? env0_12.height + 16 : value2,
left: env0_12.left + env0_14.width + 8 > width ? env0_12.width - env0_14.width : 0};
}
function _fun82010() { // fn#82010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2405, offset: 0x01ee75d7, size: 18 bytes, params: 1, frame: 2
return {close: close_82011};
}
function _fun82012() { // fn#82012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2458, offset: 0x01ee75e9, size: 51 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return (importDefault(22) /* metro dependency 22 */).debounce(_fun82013, 16);
}
function _fun82014() { // fn#82014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2531, offset: 0x01ee761c, size: 35 bytes, params: 1, frame: 11
if (env0_6) {
onClose();
env0_9(false);
}
}
function PopoutMenuTe() { // fn#82015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2594, owner: PopoutMenu.te, offset: 0x01ee763f, size: 276 bytes, params: 1, frame: 28
const object4 = {};
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const value3 = 0;
const r13 = env0_17 ? 1 : value3;
const object5 = {};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object5.easing = STANDARD_EASING;
object5.duration = 250;
const closure = teN;
const object6 = {};
object6.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object6.handleClose = env0_18;
closure.__closure = object6;
closure.__workletHash = 7805688342878;
closure.__initData = env1_11;
object4.opacity = Reflect.apply(withTiming, timingModule, [r13, object5, 'respect-motion-settings', closure]);
const moduleValue2 = timingModule;
object4.transform = [{translateY: moduleValue2.withTiming(env0_17 ? -8 : value3, {easing: STANDARD_EASING,
duration: 250})}];
return object4;
}
function _fun82017() { // fn#82017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3218, offset: 0x01ee778b, size: 18 bytes, params: 1, frame: 11
return env0_7(true);
}
function _fun82018() { // fn#82018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3251, offset: 0x01ee779d, size: 75 bytes, params: 1, frame: 13
env0_7(false);
(require(4083) /* metro dependency 4083 */).trigger('impactHeavy');
env0_9(true);
onOpen();
}
function _fun82019() { // fn#82019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3325, offset: 0x01ee77e8, size: 211 bytes, params: 1, frame: 20
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value2 = Gesture.LongPress();
const onBegin = value2.onBegin;
let closure = t_82020;
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
closure.__closure = {runOnJS: runOnJS, _setClose: env0_7};
closure.__workletHash = 15929711498886;
closure.__initData = env1_13;
const value4 = Reflect.apply(onBegin, value2, [closure]);
const onStart = value4.onStart;
closure = n_82021;
closure.__closure = {runOnJS: runOnJS, handleLongPress: env0_20};
closure.__workletHash = 1649917173815;
closure.__initData = env1_12;
return Reflect.apply(onStart, value4, [closure]);
}
function PopoutMenuOnLayout({nativeEvent}) { // fn#82022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3858, owner: PopoutMenu.onLayout, offset: 0x01ee791e, size: 36 bytes, params: 2, frame: 11
env0_16(nativeEvent.layout.height);
}
function _fun82023(a0, a1) { // fn#82023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3990, offset: 0x01ee7942, size: 53 bytes, params: 3, frame: 15
return (
<PopoutMenuRow
{...a0}
{...{['onClose']: env0_19}}
key={a1}
/>
);
}
function _fun82006(a0, a1, a2, a3) { // fn#82006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2013, offset: 0x01ee749d, size: 67 bytes, params: 5, frame: 15
const binding = env1_13;
const object2 = {};
const Math = global.Math;
object2.top = Math.max(a1, 0);
object2.left = a0;
object2.width = a2;
object2.height = a3;
binding(object2);
}
function _fun82007() { // fn#82007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2087, offset: 0x01ee74e0, size: 61 bytes, params: 1, frame: 14
var environment;
var r1;
var r3;
var current;
const value = environment.__proto__;
const value2 = env1_11 == null;
const value3 = undefined;
if (value2) {
r1 = value2;
r3 = value3;
} else {
current = env1_11.current;
r1 = current == null;
r3 = current;
}
if (!r1) {
r3.measureInWindow(_fun82008);
}
return value3;
}
function teN(a0) { // fn#82016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2722, owner: PopoutMenu.te.n, offset: 0x01ee7753, size: 56 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [env1_18])();
}
}
function t_82020() { // fn#82020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3377, offset: 0x01ee78bb, size: 51 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value = value.runOnJS(env1_7);
value(true);
}
function n_82021() { // fn#82021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:3525, offset: 0x01ee78ee, size: 48 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
value.runOnJS(env1_20)();
}
function _fun82008(a0, a1, a2, a3) { // fn#82008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10849:2147, offset: 0x01ee751d, size: 32 bytes, params: 5, frame: 11
env2_15({width: a2, height: a3});
}
global.__d(_fun82001, 10663, [57, 31, 27, 33, 4501, 697, 6746, 1305, 7972, 1478, 1585, 22, 4017, 4504, 4083, 5321,
2]) /* metro module 10663, dependencies: [57, 31, 27, 33, 4501, 697, 6746, 1305, 7972, 1478, 1585, 22, 4017, 4504, 4083, 5321, 2] */;
@@ -1,87 +1,95 @@
/* Metro module 7723; source: modules/video_calls/native/components/RevealProvider.tsx; dependencies: [31, 3849, 4295, 7715, 33, 566, 7719, 7724, 477, 4048, 7725, 7727, 2] */
import ActionSheetStore from '../../../action_sheet/native/ActionSheetStore.tsx'; /* Metro dependency 3849 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import GameConsoleStore from '../../../game_console/GameConsoleStore.tsx'; /* Metro dependency 4295 */
import UseIsPrivateAudioOnlyCall from '../useIsPrivateAudioOnlyCall.tsx'; /* Metro dependency 7719 */
import UseIsActivityFocused from '../../../activities/useIsActivityFocused.tsx'; /* Metro dependency 7724 */
import StatusBarAndroid from '../../../status_bar/native/components/StatusBar.android.tsx'; /* Metro dependency 7725 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
function _fun61774(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:6, offset: 0x01b4a589, size: 276 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = useRevealProviderValue;
const useRevealProviderValue2 = useRevealProviderValue;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const actionSheetStore = importDefault(3849) /* metro dependency 3849: ActionSheetStore */;
const gameConsoleStore = importDefault(4295) /* metro dependency 4295: GameConsoleStore */;
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
const env0_6 = channelCallStoreModule.useChannelCallStore;
const env0_7 = channelCallStoreModule.focusTimeout;
const env0_8 = channelCallStoreModule.resetFocusTimer;
const env0_9 = channelCallStoreModule.useIsVoiceChatFocused;
const value3 = require(33) /* metro dependency 33 */;
const env0_10 = value3.jsx;
const env0_11 = value3.jsxs;
let value = ReactModule;
value = value.createContext({reveal: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/RevealProvider.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/RevealProvider.tsx');
exports.default = RevealProvider;
exports.RevealContext = value;
exports.useRevealProviderValue = closure;
}
exports.useRevealProviderValue = useRevealProviderValue2;
function useRevealProviderValue(a0, a1) { // fn#61775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:281, offset: 0x01b4a69d, size: 266 bytes, params: 3, frame: 23
let value = a0;
const value3 = (FluxModule).useStateFromStores([ActionSheetStore], _fun61776);
const value4 = (UseIsPrivateAudioOnlyCall)(a1);
const value5 = useIsVoiceChatFocused();
const value6 = (FluxModule).useStateFromStores([GameConsoleStore], _fun61777);
const value7 = (UseIsActivityFocused)(a1.id);
let r5 = value || value3;
r5 = !r5 ? value4 : r5;
r5 = !r5 ? a1 === null : r5;
r5 = !r5 ? value5 : r5;
r5 = !r5 ? value6 : r5;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isIOS();
return env0_3.useMemo(_fun61778, [r5, value ? value7 : !!value]);
function _fun61776() { // fn#61776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:356, offset: 0x01b4a7a7, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return ActionSheetStore.getKey() != null;
}
function useRevealProviderValue(a0, a1) { // fn#61775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:281, offset: 0x01b4a69d, size: 266 bytes, params: 3, frame: 23
let value = a0;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ActionSheetStore], _fun61776);
const value4 = (importDefault(7719) /* metro dependency 7719: useIsPrivateAudioOnlyCall */)(a1);
const value5 = useIsVoiceChatFocused();
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GameConsoleStore], _fun61777);
const value7 = (importDefault(7724) /* metro dependency 7724: useIsActivityFocused */)(a1.id);
let r5 = value || value3;
r5 = !r5 ? value4 : r5;
r5 = !r5 ? a1 === null : r5;
r5 = !r5 ? value5 : r5;
r5 = !r5 ? value6 : r5;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isIOS();
return env0_3.useMemo(_fun61778, [r5, value ? value7 : !!value]);
}
function _fun61777() { // fn#61777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:432, offset: 0x01b4a7c0, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return GameConsoleStore.getAwaitingRemoteSessionInfo() != null;
}
function RevealProvider({channel, children, showStatus, useThemedBarStyle}) { // fn#61779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:719, offset: 0x01b4a7f2, size: 328 bytes, params: 2, frame: 24
showStatus = !(showStatus === undefined) && showStatus;
useThemedBarStyle = !(useThemedBarStyle === undefined) && useThemedBarStyle;
const value2 = useChannelCallStore(function(a0) {
return a0.focus;
});
const value3 = useRevealProviderValue(value2, channel);
const reveal = value3.reveal;
const prefersDeferringSystemGestures = value3.prefersDeferringSystemGestures;
env0_3.useEffect(_fun61781, [value2]);
const value4 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const value5 = 'light-content';
const r11 = useThemedBarStyle ? value4 === 'dark' ? value5 : 'dark-content' : value5;
const Provider = env0_12.Provider;
const StatusBarAndroid = importDefault(7725) /* metro dependency 7725: StatusBarAndroid */;
const value7 = !reveal;
return (
<Provider value={value3}>
<StatusBarAndroid
hidden={reveal ? value7 : !showStatus}
animated
barStyle={r11}
/>
{children}
{((Component) => <Component prefersHidden={reveal ? value7 : !prefersDeferringSystemGestures} prefersDeferringSystemGestures={prefersDeferringSystemGestures} />)(importDefault(7727) /* metro dependency 7727: HomeIndicator */)}
</Provider>
);
}
function _fun61778() { // fn#61778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:560, offset: 0x01b4a7d9, size: 25 bytes, params: 1, frame: 3
return {reveal: env0_0, prefersDeferringSystemGestures: env0_1};
}
function _fun61776() { // fn#61776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:356, offset: 0x01b4a7a7, size: 25 bytes, params: 1, frame: 9
const value = environment.__proto__;
return ActionSheetStore.getKey() != null;
}
function _fun61778() { // fn#61778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:560, offset: 0x01b4a7d9, size: 25 bytes, params: 1, frame: 3
return {reveal: env0_0, prefersDeferringSystemGestures: env0_1};
}
function _fun61781() { // fn#61781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:917, offset: 0x01b4a93a, size: 43 bytes, params: 1, frame: 10
if (env0_0) {
resetFocusTimer();
} else {
focusTimeout.stop();
}
function RevealProvider({channel, children, showStatus, useThemedBarStyle}) { // fn#61779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:719, offset: 0x01b4a7f2, size: 328 bytes, params: 2, frame: 24
showStatus = !(showStatus === undefined) && showStatus;
useThemedBarStyle = !(useThemedBarStyle === undefined) && useThemedBarStyle;
const value2 = useChannelCallStore(function(a0) {
return a0.focus;
});
const value3 = useRevealProviderValue(value2, channel);
const reveal = value3.reveal;
const prefersDeferringSystemGestures = value3.prefersDeferringSystemGestures;
env0_3.useEffect(_fun61781, [value2]);
const value4 = (UseTheme)();
const value5 = 'light-content';
const r11 = useThemedBarStyle ? value4 === 'dark' ? value5 : 'dark-content' : value5;
const Provider = env0_12.Provider;
const value7 = !reveal;
return (
<Provider value={value3}>
<StatusBarAndroid
hidden={reveal ? value7 : !showStatus}
animated
barStyle={r11}
/>
{children}
{((Component) => <Component prefersHidden={reveal ? value7 : !prefersDeferringSystemGestures} prefersDeferringSystemGestures={prefersDeferringSystemGestures} />)(importDefault(7727) /* metro dependency 7727: HomeIndicator */)}
</Provider>
);
function _fun61781() { // fn#61781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7901:917, offset: 0x01b4a93a, size: 43 bytes, params: 1, frame: 10
if (env0_0) {
resetFocusTimer();
} else {
focusTimeout.stop();
}
}
}
}
global.__d(_fun61774, 7723, [31, 3849, 4295, 7715, 33, 566, 7719, 7724, 477, 4048, 7725, 7727,
2]) /* metro module 7723, dependencies: [31, 3849, 4295, 7715, 33, 566, 7719, 7724, 477, 4048, 7725, 7727, 2] */;
@@ -1,10 +1,19 @@
/* Metro module 10851; source: modules/video_calls/native/components/ScreenshareParticipant.tsx; dependencies: [31, 27, 33, 4501, 697, 10668, 5321, 10669, 4573, 1244, 4578, 10794, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseParticipantTileTapGesture from '../useParticipantTileTapGesture.tsx'; /* Metro dependency 10668 */
import Module10669 from '../../../../by-id/module-10669.js'; /* Metro dependency 10669 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
function _fun83145(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11037:6, offset: 0x01f0f20b, size: 302 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.Image;
value = require(33) /* metro dependency 33 */;
@@ -12,39 +21,71 @@ function _fun83145(global, require, importDefault, importAll, module, exports, d
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const env0_8 = Reflect.apply(createStyles, value, [{container: {'alignItems': 'center', 'justifyContent': 'center',
'flex': 1, backgroundColor: BACKGROUND_BASE_LOW}, image: {marginBottom: 12}, title: {'textAlign': 'center',
'marginBottom': 8}, description: {'lineHeight': 18, 'textAlign': 'center', 'marginBottom': 16}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ScreenshareParticipant.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ScreenshareParticipant.tsx');
exports.default = _default_83146;
function _default_83146({participant, onSingleTap, onDoubleTap, containerStyle}) { // fn#83146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11037:440, offset: 0x01f0f339, size: 596 bytes, params: 2, frame: 27
const value4 = (UseParticipantTileTapGesture)({onSingleTapStart: ReactModule.useCallback(_fun83147,
[onSingleTap, participant]), onDoubleTapStart: ReactModule.useCallback(_fun83148, [onDoubleTap, participant])});
const styles = useStyles();
const GestureDetector = (Module05321Module).GestureDetector;
const items3 = [styles.container, containerStyle];
const items2 = [
<Image source={Module10669} style={styles.image} />,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-lg/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.gMOwov])}
</Text>
);
items2[2] = (
<Text
style={styles.description}
variant="text-sm/medium"
color="interactive-text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dKeLGt)}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const CpkXwZ = (require(1244) /* metro dependency 1244: indexNative */).t.CpkXwZ;
items2[3] = (
<Button
variant="primary-overlay"
text={Reflect.apply(string, intl, [CpkXwZ])}
onPress={(require(10794) /* metro dependency 10794: useScreenshareUtils */).stopScreenshare}
/>
);
return (
<GestureDetector gesture={value4}>
<View style={items3}>
{items2}
</View>
</GestureDetector>
);
function _fun83147() { // fn#83147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11037:526, offset: 0x01ee9933, size: 35 bytes, params: 1, frame: 12
return onSingleTap?.(participant);
}
function _fun83148() { // fn#83148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11037:575, offset: 0x01ee9956, size: 35 bytes, params: 1, frame: 12
return onDoubleTap?.(participant);
}
}
}
function _default_83146({participant, onSingleTap, onDoubleTap, containerStyle}) { // fn#83146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11037:440, offset: 0x01f0f339, size: 596 bytes, params: 2, frame: 27
const binding = env0_3;
const value4 = (importDefault(10668) /* metro dependency 10668: useParticipantTileTapGesture */)({onSingleTapStart: binding.useCallback(_fun83147,
[onSingleTap, participant]), onDoubleTapStart: binding.useCallback(_fun83148, [onDoubleTap, participant])});
const styles = useStyles();
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const items3 = [styles.container, containerStyle];
const items2 = [<Image source={importDefault(10669) /* metro dependency 10669 */} style={styles.image} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-lg/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.gMOwov])}</Text>;
items2[2] = <Text style={styles.description} variant="text-sm/medium" color="interactive-text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dKeLGt)}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const CpkXwZ = (require(1244) /* metro dependency 1244: indexNative */).t.CpkXwZ;
items2[3] = <Button variant="primary-overlay" text={Reflect.apply(string, intl,
[CpkXwZ])} onPress={(require(10794) /* metro dependency 10794: useScreenshareUtils */).stopScreenshare} />;
return (
<GestureDetector gesture={value4}>
<View style={items3}>
{items2}
</View>
</GestureDetector>
);
}
global.__d(_fun83145, 10851, [31, 27, 33, 4501, 697, 10668, 5321, 10669, 4573, 1244, 4578, 10794,
2]) /* metro module 10851, dependencies: [31, 27, 33, 4501, 697, 10668, 5321, 10669, 4573, 1244, 4578, 10794, 2] */;
@@ -1,47 +1,76 @@
/* Metro module 10667; source: modules/video_calls/native/components/ScreenshareTile.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 10668, 5321, 1305, 10669, 4573, 1244, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseParticipantTileTapGesture from '../useParticipantTileTapGesture.tsx'; /* Metro dependency 10668 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
function _fun82046(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10853:6, offset: 0x01ee8af0, size: 331 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
const env0_5 = (require(661) /* metro dependency 661: Constants */).NOOP;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
const BLACK = (Native).colors.BLACK;
const env0_8 = Reflect.apply(createStyles, value, [{container: {'alignItems': 'center', 'justifyContent': 'center',
'backgroundColor': null, 'overflow': 'hidden', 'flex': 1, backgroundColor: BLACK}, image: {'marginBottom': 8,
'width': 60, 'height': 40}, label: {'lineHeight': 18, 'textAlign': 'center'},
liveContainer: {'position': 'absolute', 'top': 8, 'right': 8, 'zIndex': 2}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/ScreenshareTile.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/ScreenshareTile.tsx');
exports.default = _default_82047;
function _default_82047({onSingleTap = NOOP, onDoubleTap = NOOP}) { // fn#82047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10853:470, offset: 0x01ee8c3b, size: 372 bytes, params: 2, frame: 24
const styles = useStyles();
const value2 = (UseParticipantTileTapGesture)({onSingleTapStart: onSingleTap,
onDoubleTapStart: onDoubleTap});
const GestureDetector = (Module05321Module).GestureDetector;
const LiveTag = (NativeModule).LiveTag;
const items2 = [
<View style={styles.liveContainer}>
<LiveTag />
</View>,
];
items2[1] = (
<Image
source={importDefault(10669) /* metro dependency 10669 */}
style={styles.image}
resizeMode="contain"
/>
);
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const G84gtR = (IndexNativeModule).t.G84gtR;
items2[2] = (
<Text
style={styles.label}
variant="text-xs/bold"
color="always-white"
>
{Reflect.apply(string, intl, [G84gtR])}
</Text>
);
return (
<GestureDetector gesture={value2}>
<View style={styles.container}>
{items2}
</View>
</GestureDetector>
);
}
}
function _default_82047({onSingleTap = NOOP, onDoubleTap = NOOP}) { // fn#82047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10853:470, offset: 0x01ee8c3b, size: 372 bytes, params: 2, frame: 24
const styles = useStyles();
const value2 = (importDefault(10668) /* metro dependency 10668: useParticipantTileTapGesture */)({onSingleTapStart: onSingleTap,
onDoubleTapStart: onDoubleTap});
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const LiveTag = (require(1305) /* metro dependency 1305: native */).LiveTag;
const items2 = [<View style={styles.liveContainer}><LiveTag /></View>];
items2[1] = <Image source={importDefault(10669) /* metro dependency 10669 */} style={styles.image} resizeMode="contain" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const G84gtR = (require(1244) /* metro dependency 1244: indexNative */).t.G84gtR;
items2[2] = <Text style={styles.label} variant="text-xs/bold" color="always-white">{Reflect.apply(string, intl,
[G84gtR])}</Text>;
return (
<GestureDetector gesture={value2}>
<View style={styles.container}>
{items2}
</View>
</GestureDetector>
);
}
global.__d(_fun82046, 10667, [31, 27, 661, 33, 4501, 697, 10668, 5321, 1305, 10669, 4573, 1244,
2]) /* metro module 10667, dependencies: [31, 27, 661, 33, 4501, 697, 10668, 5321, 1305, 10669, 4573, 1244, 2] */;
@@ -1,34 +1,41 @@
/* Metro module 10850; source: modules/video_calls/native/components/SingleScreenshare.tsx; dependencies: [31, 7715, 33, 4501, 697, 4594, 10851, 7712, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
function _fun83140(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11036:6, offset: 0x01f0f058, size: 228 bytes, params: 8, frame: 21
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(7715) /* metro dependency 7715: ChannelCallStore */;
ReactModule;
let value = ChannelCallStoreModule;
const env0_2 = value.resetFocus;
const env0_3 = value.toggleFocus;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
const BLACK = (Native).colors.BLACK;
const env0_5 = Reflect.apply(createStyles, value, [{stageStreamContainer: {backgroundColor: BLACK}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/SingleScreenshare.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/SingleScreenshare.tsx');
exports.default = _default_83141;
function _default_83141({participant, channel}) { // fn#83141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11036:254, offset: 0x01f0f13c, size: 146 bytes, params: 2, frame: 19
const styles = useStyles();
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
resetFocus();
});
return ((Component) => <Component participant={participant} onSingleTap={function() {
toggleFocus();
}} onDoubleTap={onDoubleTap_83144} containerStyle={channel.isGuildStageVoice() ? styles.stageStreamContainer : undefined} />)(importDefault(10851) /* metro dependency 10851: ScreenshareParticipant */);
function _default_83141OnDoubleTap() { // fn#83144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11036:381, owner: _default_83141.onDoubleTap, offset: 0x01f0f1ce, size: 61 bytes, params: 1, frame: 14
let value = environment.__proto__;
resetFocus();
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.selectParticipant(channel.id, null);
}
}
}
function _default_83141({participant, channel}) { // fn#83141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11036:254, offset: 0x01f0f13c, size: 146 bytes, params: 2, frame: 19
const styles = useStyles();
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
resetFocus();
});
return ((Component) => <Component participant={participant} onSingleTap={function() {
toggleFocus();
}} onDoubleTap={onDoubleTap_83144} containerStyle={channel.isGuildStageVoice() ? styles.stageStreamContainer : undefined} />)(importDefault(10851) /* metro dependency 10851: ScreenshareParticipant */);
}
function _default_83141OnDoubleTap() { // fn#83144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11036:381, owner: _default_83141.onDoubleTap, offset: 0x01f0f1ce, size: 61 bytes, params: 1, frame: 14
let value = environment.__proto__;
resetFocus();
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.selectParticipant(channel.id, null);
}
global.__d(_fun83140, 10850, [31, 7715, 33, 4501, 697, 4594, 10851, 7712,
2]) /* metro module 10850, dependencies: [31, 7715, 33, 4501, 697, 4594, 10851, 7712, 2] */;
@@ -1,39 +1,43 @@
/* Metro module 10852; source: modules/video_calls/native/components/SingleStream.tsx; dependencies: [31, 7715, 33, 10670, 10677, 7712, 2] */
import StreamTile from './StreamTile.tsx'; /* Metro dependency 10670 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as VideoRendererModule from './VideoRenderer.tsx'; /* Metro dependency 10677 */
function _fun83149(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11038:6, offset: 0x01f0f58d, size: 170 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
const env0_3 = channelCallStoreModule.toggleFocus;
const env0_4 = channelCallStoreModule.resetFocus;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/SingleStream.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/SingleStream.tsx');
exports.default = _default_83150;
function _default_83150({participant, channel}) { // fn#83150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11038:168, offset: 0x01f0f637, size: 140 bytes, params: 2, frame: 18
const ResizeMode = (VideoRendererModule).ResizeMode;
const CONTAIN = ResizeMode.CONTAIN;
return (
<StreamTile
gestureEnabled
resizeMode={CONTAIN}
onSingleTap={function() {
toggleFocus();
}}
onDoubleTap={onDoubleTap_83152}
participant={participant}
style={{flex: 1}}
/>
);
function _default_83150OnDoubleTap() { // fn#83152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11038:298, owner: _default_83150.onDoubleTap, offset: 0x01f0f6c3, size: 61 bytes, params: 1, frame: 14
let value = environment.__proto__;
resetFocus();
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.selectParticipant(channel.id, null);
}
}
}
function _default_83150({participant, channel}) { // fn#83150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11038:168, offset: 0x01f0f637, size: 140 bytes, params: 2, frame: 18
const StreamTile = importDefault(10670) /* metro dependency 10670: StreamTile */;
const ResizeMode = (require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode;
const CONTAIN = ResizeMode.CONTAIN;
return (
<StreamTile
gestureEnabled
resizeMode={CONTAIN}
onSingleTap={function() {
toggleFocus();
}}
onDoubleTap={onDoubleTap_83152}
participant={participant}
style={{flex: 1}}
/>
);
}
function _default_83150OnDoubleTap() { // fn#83152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11038:298, owner: _default_83150.onDoubleTap, offset: 0x01f0f6c3, size: 61 bytes, params: 1, frame: 14
let value = environment.__proto__;
resetFocus();
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.selectParticipant(channel.id, null);
}
global.__d(_fun83149, 10852, [31, 7715, 33, 10670, 10677, 7712,
2]) /* metro module 10852, dependencies: [31, 7715, 33, 10670, 10677, 7712, 2] */;
@@ -1,51 +1,57 @@
/* Metro module 10853; source: modules/video_calls/native/components/SingleVideoCall.tsx; dependencies: [31, 7715, 33, 1585, 6771, 10693, 1305, 10677, 7712, 8743, 2] */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ShowUserProfileActionSheet from '../../../user_profile/native/showUserProfileActionSheet.tsx'; /* Metro dependency 8743 */
import UserTile from './UserTile.tsx'; /* Metro dependency 10693 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ChannelCallStoreModule from '../ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as VideoRendererModule from './VideoRenderer.tsx'; /* Metro dependency 10677 */
function _fun83153(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:6, offset: 0x01f0f700, size: 174 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelCallStoreModule = require(7715) /* metro dependency 7715: ChannelCallStore */;
const env0_4 = channelCallStoreModule.resetFocus;
const env0_5 = channelCallStoreModule.toggleFocus;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/SingleVideoCall.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/SingleVideoCall.tsx');
exports.default = _default_83154;
function _default_83154({participant, channel}) { // fn#83154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:170, offset: 0x01f0f7ae, size: 264 bytes, params: 2, frame: 20
const value2 = (UseSafeAreaInsetsNative)();
const value3 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations.useMemo(function() {
return {marginRight: right, marginBottom: bottom};
}, [value2.right, value2.bottom]);
const AvatarSizes = (NativeModule).AvatarSizes;
const PROFILE = AvatarSizes.PROFILE;
const ResizeMode = (VideoRendererModule).ResizeMode;
const AUTO = ResizeMode.AUTO;
return (
<UserTile
gestureEnabled
participant={participant}
avatarSize={PROFILE}
resizeMode={AUTO}
statusStyle={value3}
onSingleTap={toggleFocus}
onDoubleTap={onDoubleTap_83156}
onLongPress={onLongPress_83157}
/>
);
function _default_83154OnDoubleTap() { // fn#83156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:490, owner: _default_83154.onDoubleTap, offset: 0x01f0f8ce, size: 61 bytes, params: 1, frame: 14
let value = environment.__proto__;
resetFocus();
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.selectParticipant(channel.id, null);
}
function _default_83154OnLongPress({user}) { // fn#83157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:549, owner: _default_83154.onLongPress, offset: 0x01f0f90b, size: 83 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ShowUserProfileActionSheet)({userId: user.id,
channelId: channel.id, isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
}
}
}
function _default_83154({participant, channel}) { // fn#83154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:170, offset: 0x01f0f7ae, size: 264 bytes, params: 2, frame: 20
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value3 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations.useMemo(function() {
return {marginRight: right, marginBottom: bottom};
}, [value2.right, value2.bottom]);
const UserTile = importDefault(10693) /* metro dependency 10693: UserTile */;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const PROFILE = AvatarSizes.PROFILE;
const ResizeMode = (require(10677) /* metro dependency 10677: VideoRenderer */).ResizeMode;
const AUTO = ResizeMode.AUTO;
return (
<UserTile
gestureEnabled
participant={participant}
avatarSize={PROFILE}
resizeMode={AUTO}
statusStyle={value3}
onSingleTap={toggleFocus}
onDoubleTap={onDoubleTap_83156}
onLongPress={onLongPress_83157}
/>
);
}
function _default_83154OnDoubleTap() { // fn#83156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:490, owner: _default_83154.onDoubleTap, offset: 0x01f0f8ce, size: 61 bytes, params: 1, frame: 14
let value = environment.__proto__;
resetFocus();
value = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */;
value.selectParticipant(channel.id, null);
}
function _default_83154OnLongPress({user}) { // fn#83157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11039:549, owner: _default_83154.onLongPress, offset: 0x01f0f90b, size: 83 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({userId: user.id,
channelId: channel.id, isVoiceContext: true, sourceAnalyticsLocations: analyticsLocations});
}
global.__d(_fun83153, 10853, [31, 7715, 33, 1585, 6771, 10693, 1305, 10677, 7712, 8743,
2]) /* metro module 10853, dependencies: [31, 7715, 33, 1585, 6771, 10693, 1305, 10677, 7712, 8743, 2] */;
@@ -1,190 +1,215 @@
/* Metro module 10670; source: modules/video_calls/native/components/StreamTile.tsx; dependencies: [31, 27, 4492, 1226, 661, 4291, 33, 4501, 697, 4000, 4573, 1305, 566, 10671, 10673, 1244, 4617, 10677, 10689, 10680, 10668, 5321, 5278, 10691, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ApplicationStreamingStore from '../../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import UseParticipantTileTapGesture from '../useParticipantTileTapGesture.tsx'; /* Metro dependency 10668 */
import UseVideoStreamError from '../../../errors/hooks/useVideoStreamError.tsx'; /* Metro dependency 10671 */
import StreamQualityLiveIndicator from '../../../go_live/native/StreamQualityLiveIndicator.tsx'; /* Metro dependency 10689 */
import Module10691 from '../../../../by-id/module-10691.js'; /* Metro dependency 10691 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ColorUtilsModule from '../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as ConstantsModule2 from '../../../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
function _fun82051(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:6, offset: 0x01ee8ee6, size: 704 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const StyleSheet = value2.StyleSheet;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_8 = (require(661) /* metro dependency 661: Constants */).ApplicationStreamStates;
const env0_9 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
const value3 = require(33) /* metro dependency 33 */;
const env0_10 = value3.jsx;
const env0_11 = value3.jsxs;
const env0_12 = value3.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const StyleSheet = ReactNativeModule.StyleSheet;
const createStyles = CreateStylesModule.createStyles;
object = {};
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.container = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden',
object.container = {'flex': 1, 'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden',
'width': '100%', backgroundColor: BLACK};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['flex'] = 1;
object4['padding'] = 8;
object4['alignItems'] = 'center';
object4['justifyContent'] = 'center';
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
let hexWithOpacity = colorUtilsModule.hexWithOpacity;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['flex'] = 1;
object3['padding'] = 8;
object3['alignItems'] = 'center';
object3['justifyContent'] = 'center';
let hexWithOpacity = ColorUtilsModule.hexWithOpacity;
BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
object4['backgroundColor'] = Reflect.apply(hexWithOpacity, colorUtilsModule, [BLACK, 0.7]);
object2.screenMessageContainer = object4;
object2.screenMessageText = {lineHeight: 18};
object3['backgroundColor'] = Reflect.apply(hexWithOpacity, ColorUtilsModule, [BLACK, 0.7]);
object.screenMessageContainer = object3;
object.screenMessageText = {lineHeight: 18};
const PRIMARY_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_300;
object2.screenMessageSubtext = {'color': null, 'fontSize': 14, 'lineHeight': 18, 'textAlign': 'center',
object.screenMessageSubtext = {'color': null, 'fontSize': 14, 'lineHeight': 18, 'textAlign': 'center',
color: PRIMARY_300};
const object5 = {'position': 'absolute', 'bottom': 8, 'right': 8, 'backgroundColor': null, 'borderRadius': null,
const object6 = {'position': 'absolute', 'bottom': 8, 'right': 8, 'backgroundColor': null, 'borderRadius': null,
'width': 24, 'height': 24, 'justifyContent': 'center', 'alignItems': 'center'};
const value7 = colorUtilsModule;
hexWithOpacity = value7.hexWithOpacity;
hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
object5.backgroundColor = Reflect.apply(hexWithOpacity, value7, [PRIMARY_700, 0.5]);
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.statusWrapper = object5;
object2.liveTag = {'position': 'absolute', 'right': 8, 'top': 8};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
const closure = StreamTextOverlay;
const env0_15 = value.memo(_fun82053);
const env0_16 = value.memo(_fun82056);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/StreamTile.tsx');
object6.backgroundColor = Reflect.apply(hexWithOpacity, ColorUtilsModule, [PRIMARY_700, 0.5]);
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.statusWrapper = object6;
object.liveTag = {'position': 'absolute', 'right': 8, 'top': 8};
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const StreamTextOverlay2 = StreamTextOverlay;
const env0_15 = ReactModule.memo(_fun82053);
const env0_16 = ReactModule.memo(_fun82056);
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/StreamTile.tsx');
exports.default = _default_82057;
exports.StreamTextOverlay = closure;
}
function StreamTextOverlay({title, subtext}) { // fn#82052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:1042, offset: 0x01ee91a6, size: 197 bytes, params: 2, frame: 21
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.screenMessageContainer}>
<Text
style={styles.screenMessageText}
variant="text-md/semibold"
color="always-white"
>
{title}
</Text>
{subtext != null ? ((LegacyText) => <LegacyText style={styles.screenMessageSubtext}>{subtext}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText) : null}
</View>
);
}
function _fun82053({participant, streamId, user, resizeMode, gestureEnabled, removeEmptyStateButton, removeEmptyStateImage}) { // fn#82053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:1325, offset: 0x01ee926b, size: 997 bytes, params: 2, frame: 34
var r10;
var state;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var formatToPlainString;
var meVVlb;
var defaultImport2;
var ownerId;
var id;
var jsxRuntimeEnv0_12Binding;
var VideoRenderer;
const env0_1 = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const items = [ApplicationStreamingStore];
const activeStreamForStreamKey = Reflect.apply(useStateFromStores, fluxModule, [items, function() {
return ApplicationStreamingStore.getActiveStreamForStreamKey(participant.id);
}]);
const defaultImport = importDefault(10671) /* metro dependency 10671: useVideoStreamError */;
const STREAM = MediaEngineContextTypes.STREAM;
const user2 = participant.user;
const value2 = defaultImport(STREAM, user2.id);
if (activeStreamForStreamKey != null) {
state = activeStreamForStreamKey.state;
if (ApplicationStreamStates.FAILED === state) {
return ((Component) => <Component stream={activeStreamForStreamKey} removeCloseButton={removeEmptyStateButton} removeSplashImage={removeEmptyStateImage} type={(require(10673) /* metro dependency 10673: VideoEmptyState */).VideoEmptyTypes.STREAM_FAILED} style={StyleSheet.absoluteFill} />)(importDefault(10673) /* metro dependency 10673: VideoEmptyState */);
}
if (ApplicationStreamStates.ENDED === state) {
return ((Component) => <Component stream={activeStreamForStreamKey} removeCloseButton={removeEmptyStateButton} removeSplashImage={removeEmptyStateImage} type={(require(10673) /* metro dependency 10673: VideoEmptyState */).VideoEmptyTypes.STREAM_ENDED} style={StyleSheet.absoluteFill} />)(importDefault(10673) /* metro dependency 10673: VideoEmptyState */);
}
if (ApplicationStreamStates.RECONNECTING === state) {
r10 = <StreamTextOverlay title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['pdFFK+'])} />;
} else if (ApplicationStreamStates.PAUSED !== state) {
r10 = null;
} else {
var streamTextOverlayProps = {title: intl.string(t['5q17w5'])};
formatToPlainString = intl.formatToPlainString;
meVVlb = t.meVVlb;
defaultImport2 = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
streamTextOverlayProps.subtext = Reflect.apply(formatToPlainString, intl, [meVVlb,
{username: defaultImport2.getName(activeStreamForStreamKey.guildId, activeStreamForStreamKey.channelId,
user)}]);
r10 = <StreamTextOverlay {...streamTextOverlayProps} />;
}
if (value2 != null) {
return ((Component) => <Component stream={activeStreamForStreamKey} removeCloseButton={removeEmptyStateButton} removeSplashImage={removeEmptyStateImage} type={(require(10673) /* metro dependency 10673: VideoEmptyState */).VideoEmptyTypes.STREAM_FAILED} style={StyleSheet.absoluteFill} avError={value2} />)(importDefault(10673) /* metro dependency 10673: VideoEmptyState */);
}
ownerId = activeStreamForStreamKey.ownerId;
id = AuthenticationStore.getId();
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
VideoRenderer = importDefault(10677) /* metro dependency 10677: VideoRenderer */;
var defaultImport3Props = {resizeMode: resizeMode, streamId: streamId, gestureEnabled: gestureEnabled,
renderTag: renderTag,
videoSpinnerContext: ownerId === id ? (require(10680) /* metro dependency 10680: VideoSpinnerTimer */).VideoSpinnerContext.SELF_STREAM : (require(10680) /* metro dependency 10680: VideoSpinnerTimer */).VideoSpinnerContext.REMOTE_STREAM,
userId: user.id};
state = activeStreamForStreamKey.state;
defaultImport3Props.paused = state === ApplicationStreamStates.PAUSED;
exports.StreamTextOverlay = StreamTextOverlay2;
function StreamTextOverlay({title, subtext}) { // fn#82052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:1042, offset: 0x01ee91a6, size: 197 bytes, params: 2, frame: 21
const styles = useStyles();
const Text = (TextModule).Text;
return (
<>
<VideoRenderer {...defaultImport3Props} />
{r10}
</>
<View style={styles.screenMessageContainer}>
<Text
style={styles.screenMessageText}
variant="text-md/semibold"
color="always-white"
>
{title}
</Text>
{
subtext != null
? ((LegacyText) => <LegacyText style={styles.screenMessageSubtext}>{subtext}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)
: null
}
</View>
);
}
return null;
}
function _fun82056({onFullScreen, style}) { // fn#82056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:2692, offset: 0x01ee96b1, size: 226 bytes, params: 2, frame: 20
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const items2 = [styles.statusWrapper, style];
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(10691) /* metro dependency 10691 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
iconProps.size = SMALL;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
iconProps.color = WHITE;
return (
<PressableOpacity
accessibilityRole="button"
onPress={onFullScreen}
style={items2}
hitSlop={{'top': 4, 'left': 4, 'right': 4, 'bottom': 4}}
>
<Icon {...iconProps} />
</PressableOpacity>
);
}
function _fun82053({participant, streamId, user, resizeMode, gestureEnabled, removeEmptyStateButton, removeEmptyStateImage}) { // fn#82053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:1325, offset: 0x01ee926b, size: 997 bytes, params: 2, frame: 34
var r10;
var state;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var formatToPlainString;
var meVVlb;
var defaultImport2;
var ownerId;
var id;
var jsxRuntimeEnv0_12Binding;
var VideoRenderer;
const env0_1 = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
const items = [ApplicationStreamingStore];
const activeStreamForStreamKey = Reflect.apply(useStateFromStores, FluxModule, [items, function() {
return ApplicationStreamingStore.getActiveStreamForStreamKey(participant.id);
}]);
const defaultImport = UseVideoStreamError;
const STREAM = MediaEngineContextTypes.STREAM;
const user2 = participant.user;
const value2 = defaultImport(STREAM, user2.id);
if (activeStreamForStreamKey != null) {
state = activeStreamForStreamKey.state;
if (ApplicationStreamStates.FAILED === state) {
return ((Component) => <Component stream={activeStreamForStreamKey} removeCloseButton={removeEmptyStateButton} removeSplashImage={removeEmptyStateImage} type={(require(10673) /* metro dependency 10673: VideoEmptyState */).VideoEmptyTypes.STREAM_FAILED} style={StyleSheet.absoluteFill} />)(importDefault(10673) /* metro dependency 10673: VideoEmptyState */);
}
if (ApplicationStreamStates.ENDED === state) {
return ((Component) => <Component stream={activeStreamForStreamKey} removeCloseButton={removeEmptyStateButton} removeSplashImage={removeEmptyStateImage} type={(require(10673) /* metro dependency 10673: VideoEmptyState */).VideoEmptyTypes.STREAM_ENDED} style={StyleSheet.absoluteFill} />)(importDefault(10673) /* metro dependency 10673: VideoEmptyState */);
}
if (ApplicationStreamStates.RECONNECTING === state) {
r10 = <StreamTextOverlay title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['pdFFK+'])} />;
} else if (ApplicationStreamStates.PAUSED !== state) {
r10 = null;
} else {
var streamTextOverlayProps = {title: intl.string(t['5q17w5'])};
formatToPlainString = intl.formatToPlainString;
meVVlb = t.meVVlb;
defaultImport2 = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
streamTextOverlayProps.subtext = Reflect.apply(formatToPlainString, intl, [meVVlb,
{username: defaultImport2.getName(activeStreamForStreamKey.guildId, activeStreamForStreamKey.channelId,
user)}]);
r10 = <StreamTextOverlay {...streamTextOverlayProps} />;
}
if (value2 != null) {
return ((Component) => <Component stream={activeStreamForStreamKey} removeCloseButton={removeEmptyStateButton} removeSplashImage={removeEmptyStateImage} type={(require(10673) /* metro dependency 10673: VideoEmptyState */).VideoEmptyTypes.STREAM_FAILED} style={StyleSheet.absoluteFill} avError={value2} />)(importDefault(10673) /* metro dependency 10673: VideoEmptyState */);
}
ownerId = activeStreamForStreamKey.ownerId;
id = AuthenticationStore.getId();
jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
VideoRenderer = importDefault(10677) /* metro dependency 10677: VideoRenderer */;
var defaultImport3Props = {resizeMode: resizeMode, streamId: streamId, gestureEnabled: gestureEnabled,
renderTag: renderTag,
videoSpinnerContext: ownerId === id ? (require(10680) /* metro dependency 10680: VideoSpinnerTimer */).VideoSpinnerContext.SELF_STREAM : (require(10680) /* metro dependency 10680: VideoSpinnerTimer */).VideoSpinnerContext.REMOTE_STREAM,
userId: user.id};
state = activeStreamForStreamKey.state;
defaultImport3Props.paused = state === ApplicationStreamStates.PAUSED;
return (
<>
<VideoRenderer {...defaultImport3Props} />
{r10}
</>
);
}
return null;
function renderTag() { // fn#82055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:2468, offset: 0x01ee9670, size: 65 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component style={styles.liveTag} participant={participant} />)(StreamQualityLiveIndicator);
}
function _default_82057({participant, onSingleTap, onDoubleTap, resizeMode = require(dependencyMap[17]).ResizeMode.CONTAIN, gestureEnabled, removeEmptyStateButton, removeEmptyStateImage, onFullScreen, fullscreenIconStyle, style}) { // fn#82057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:3002, offset: 0x01ee9793, size: 416 bytes, params: 2, frame: 29
const styles = useStyles();
const binding = env0_3;
const value4 = (importDefault(10668) /* metro dependency 10668: useParticipantTileTapGesture */)({onSingleTapStart: binding.useCallback(_fun82058,
[onSingleTap, participant]), onDoubleTapStart: binding.useCallback(_fun82059, [onDoubleTap, participant])});
const streamId = participant.streamId;
const user = participant.user;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
return (
<GestureDetector gesture={value4}>
<View style={[styles.container, style]}>
{((Component) => <Component streamId={streamId} participant={participant} user={user} resizeMode={resizeMode} gestureEnabled={gestureEnabled} removeEmptyStateButton={removeEmptyStateButton} removeEmptyStateImage={removeEmptyStateImage} />)(env0_15)}
{onFullScreen != null && ((Component) => <Component onFullScreen={onFullScreen} style={fullscreenIconStyle} />)(env0_16)}
</View>
</GestureDetector>
);
}
}
function _fun82056({onFullScreen, style}) { // fn#82056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:2692, offset: 0x01ee96b1, size: 226 bytes, params: 2, frame: 20
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const items2 = [styles.statusWrapper, style];
const Icon = (NativeModule).Icon;
const iconProps = {source: Module10691};
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
iconProps.size = SMALL;
const WHITE = (Native).unsafe_rawColors.WHITE;
iconProps.color = WHITE;
return (
<PressableOpacity
accessibilityRole="button"
onPress={onFullScreen}
style={items2}
hitSlop={{
'top': 4,
'left': 4,
'right': 4,
'bottom': 4,
}}
>
<Icon {...iconProps} />
</PressableOpacity>
);
}
function _default_82057({participant, onSingleTap, onDoubleTap, resizeMode = require(dependencyMap[17]).ResizeMode.CONTAIN, gestureEnabled, removeEmptyStateButton, removeEmptyStateImage, onFullScreen, fullscreenIconStyle, style}) { // fn#82057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:3002, offset: 0x01ee9793, size: 416 bytes, params: 2, frame: 29
const styles = useStyles();
const binding = env0_3;
const value4 = (UseParticipantTileTapGesture)({onSingleTapStart: binding.useCallback(_fun82058,
[onSingleTap, participant]), onDoubleTapStart: binding.useCallback(_fun82059, [onDoubleTap, participant])});
const streamId = participant.streamId;
const user = participant.user;
const GestureDetector = (Module05321Module).GestureDetector;
return (
<GestureDetector gesture={value4}>
<View style={[styles.container, style]}>
{((Component) => <Component streamId={streamId} participant={participant} user={user} resizeMode={resizeMode} gestureEnabled={gestureEnabled} removeEmptyStateButton={removeEmptyStateButton} removeEmptyStateImage={removeEmptyStateImage} />)(env0_15)}
{onFullScreen != null && ((Component) => <Component onFullScreen={onFullScreen} style={fullscreenIconStyle} />)(env0_16)}
</View>
</GestureDetector>
);
function _fun82058() { // fn#82058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:3229, offset: 0x01ee9933, size: 35 bytes, params: 1, frame: 12
return onSingleTap?.(participant);
}
function _fun82059() { // fn#82059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:3278, offset: 0x01ee9956, size: 35 bytes, params: 1, frame: 12
return onDoubleTap?.(participant);
}
}
function renderTag() { // fn#82055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10856:2468, offset: 0x01ee9670, size: 65 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component style={styles.liveTag} participant={participant} />)(importDefault(10689) /* metro dependency 10689: StreamQualityLiveIndicator */);
}
global.__d(_fun82051, 10670, [31, 27, 4492, 1226, 661, 4291, 33, 4501, 697, 4000, 4573, 1305, 566, 10671, 10673,
1244, 4617, 10677, 10689, 10680, 10668, 5321, 5278, 10691,
2]) /* metro module 10670, dependencies: [31, 27, 4492, 1226, 661, 4291, 33, 4501, 697, 4000, 4573, 1305, 566, 10671, 10673, 1244, 4617, 10677, 10689, 10680, 10668, 5321, 5278, 10691, 2] */;
@@ -1,293 +1,399 @@
/* Metro module 10693; source: modules/video_calls/native/components/UserTile.tsx; dependencies: [57, 31, 27, 10694, 1226, 1379, 4259, 661, 4299, 4291, 33, 4501, 697, 4000, 566, 8421, 1305, 9149, 4573, 1244, 10677, 10680, 8133, 10695, 10696, 10697, 4612, 10692, 10698, 10665, 10668, 5321, 10699, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import MediaEngineStore from '../../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import UseIsSpeaking from '../../../../hooks/useIsSpeaking.tsx'; /* Metro dependency 4612 */
import UseParticipantTileTapGesture from '../useParticipantTileTapGesture.tsx'; /* Metro dependency 10668 */
import ParticipantHasVideo from '../../participantHasVideo.tsx'; /* Metro dependency 10692 */
import VoiceChannelEffectsStore from '../../../voice_channel_effects/VoiceChannelEffectsStore.tsx'; /* Metro dependency 10694 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as ColorUtilsModule from '../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as ConstantsModule2 from '../../../../external/discord_common/js/packages/media-engine/Constants.tsx'; /* Metro dependency 4291 */
import * as CallConstantsModule from '../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as VoiceChannelEffectsStoreModule from '../../../voice_channel_effects/VoiceChannelEffectsStore.tsx'; /* Metro dependency 10694 */
function _fun82181(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:6, offset: 0x01eeddf7, size: 735 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const voiceChannelEffectsStore = importDefault(10694) /* metro dependency 10694: VoiceChannelEffectsStore */;
const env0_7 = (require(10694) /* metro dependency 10694: VoiceChannelEffectsStore */).clearVoiceChannelEffectForUser;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).VideoToggleState;
const env0_12 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
const env0_13 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
const value2 = require(33) /* metro dependency 33 */;
const env0_14 = value2.jsx;
const env0_15 = value2.jsxs;
const env0_16 = value2.Fragment;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const createStyles = CreateStylesModule.createStyles;
object = {};
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object2.container = {'flex': 1, 'width': '100%', 'alignItems': 'center', 'justifyContent': 'center',
object.container = {'flex': 1, 'width': '100%', 'alignItems': 'center', 'justifyContent': 'center',
'overflow': 'hidden', backgroundColor: BLACK};
object2.imageBackground = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', 'alignSelf': 'stretch'};
object2.autoDisabledVideoWrapper = {'width': '100%', 'flexDirection': 'row', 'justifyContent': 'center'};
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
let hexWithOpacity = colorUtilsModule.hexWithOpacity;
object.imageBackground = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', 'alignSelf': 'stretch'};
object.autoDisabledVideoWrapper = {'width': '100%', 'flexDirection': 'row', 'justifyContent': 'center'};
let hexWithOpacity = ColorUtilsModule.hexWithOpacity;
let PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
object2.autoDisabledVideo = {'backgroundColor': null, 'alignItems': 'center', 'height': 24,
backgroundColor: Reflect.apply(hexWithOpacity, colorUtilsModule, [PRIMARY_700, 0.5])};
const object3 = {'borderRadius': null, 'flexDirection': 'row', 'justifyContent': 'space-evenly',
object.autoDisabledVideo = {'backgroundColor': null, 'alignItems': 'center', 'height': 24,
backgroundColor: Reflect.apply(hexWithOpacity, ColorUtilsModule, [PRIMARY_700, 0.5])};
const object4 = {'borderRadius': null, 'flexDirection': 'row', 'justifyContent': 'space-evenly',
'paddingHorizontal': 8, 'paddingVertical': 4, 'alignItems': 'center'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.autoDisabledVideoTextWrapper = object3;
const object6 = {'position': 'absolute', 'bottom': 8, 'right': 8, 'backgroundColor': null, 'borderRadius': null,
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.autoDisabledVideoTextWrapper = object4;
const object5 = {'position': 'absolute', 'bottom': 8, 'right': 8, 'backgroundColor': null, 'borderRadius': null,
'width': 24, 'height': 24, 'justifyContent': 'center', 'alignItems': 'center'};
const value5 = colorUtilsModule;
hexWithOpacity = value5.hexWithOpacity;
hexWithOpacity = ColorUtilsModule.hexWithOpacity;
PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
object6.backgroundColor = Reflect.apply(hexWithOpacity, value5, [PRIMARY_700, 0.5]);
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.statusWrapper = object6;
object2.labelText = {'marginLeft': 8, 'height': 20, 'alignItems': 'center'};
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_18 = value.memo(_fun82182);
const env0_19 = value.memo(_fun82187);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/UserTile.tsx');
object5.backgroundColor = Reflect.apply(hexWithOpacity, ColorUtilsModule, [PRIMARY_700, 0.5]);
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object.statusWrapper = object5;
object.labelText = {'marginLeft': 8, 'height': 20, 'alignItems': 'center'};
const env0_17 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_18 = ReactModule.memo(_fun82182);
const env0_19 = ReactModule.memo(_fun82187);
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/UserTile.tsx');
exports.default = _default_82189;
}
function _fun82182({streamId, user, resizeMode, ringing, avatarSize, speaking, gestureEnabled, hasVideo, guildId}) { // fn#82182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1269, offset: 0x01eee0d6, size: 481 bytes, params: 2, frame: 34
var r0;
var VideoRenderer;
var VideoSpinnerContext;
var value;
const styles = useStyles();
const id = user.id;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [AuthenticationStore];
const value2 = Reflect.apply(useStateFromStores, fluxModule, [object, _fun82183, [hasVideo, id]]);
const moduleValue2 = fluxModule;
const useStateFromStoresArray = moduleValue2.useStateFromStoresArray;
const env0_3Binding = env0_3(Reflect.apply(useStateFromStoresArray, moduleValue2, [[MediaEngineStore], _fun82184,
[id]]), 1)[0];
const value5 = fluxModule.useStateFromStores([MediaEngineStore], _fun82185, [id]);
const AUTO_PROBING = VideoToggleState.AUTO_PROBING;
if (ringing) {
value = importDefault(8421) /* metro dependency 8421: VideoBackground */;
value = ((Component) => <Component style={styles.imageBackground} url={user.getAvatarURL(guildId,
128)} speaking={speaking} size={avatarSize} renderVideoDetails={renderVideoDetails} />)(value);
r0 = value;
} else if (hasVideo) {
if (value5 === AUTO_PROBING) {
function _fun82182({streamId, user, resizeMode, ringing, avatarSize, speaking, gestureEnabled, hasVideo, guildId}) { // fn#82182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1269, offset: 0x01eee0d6, size: 481 bytes, params: 2, frame: 34
var r0;
var VideoRenderer;
var VideoSpinnerContext;
var value;
const styles = useStyles();
const id = user.id;
const useStateFromStores = FluxModule.useStateFromStores;
let object = [AuthenticationStore];
const value2 = Reflect.apply(useStateFromStores, FluxModule, [object, _fun82183, [hasVideo, id]]);
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const mediaEngineStoreBinding = MediaEngineStore;
const env0_3Binding = Module00057(Reflect.apply(useStateFromStoresArray, FluxModule, [[mediaEngineStoreBinding],
_fun82184, [id]]), 1)[0];
const value5 = FluxModule.useStateFromStores([mediaEngineStoreBinding], _fun82185, [id]);
const AUTO_PROBING = VideoToggleState.AUTO_PROBING;
if (ringing) {
value = importDefault(8421) /* metro dependency 8421: VideoBackground */;
value = ((Component) => <Component style={styles.imageBackground} url={user.getAvatarURL(guildId,
128)} speaking={speaking} size={avatarSize} renderVideoDetails={renderVideoDetails} />)(value);
r0 = value;
} else if (hasVideo) {
if (value5 === AUTO_PROBING) {
value = importDefault(8421) /* metro dependency 8421: VideoBackground */;
value = ((Component) => <Component style={styles.imageBackground} url={user.getAvatarURL(guildId,
128)} speaking={speaking} size={avatarSize} renderVideoDetails={renderVideoDetails} />)(value);
r0 = value;
} else {
VideoRenderer = importDefault(10677) /* metro dependency 10677: VideoRenderer */;
object = {resizeMode: resizeMode, streamId: streamId, gestureEnabled: gestureEnabled};
VideoSpinnerContext = (require(10680) /* metro dependency 10680: VideoSpinnerTimer */).VideoSpinnerContext;
object.videoSpinnerContext = value2 ? VideoSpinnerContext.SELF_VIDEO : VideoSpinnerContext.REMOTE_VIDEO;
object.userId = user.id;
r0 = <VideoRenderer {...object} />;
}
} else {
VideoRenderer = importDefault(10677) /* metro dependency 10677: VideoRenderer */;
object = {resizeMode: resizeMode, streamId: streamId, gestureEnabled: gestureEnabled};
VideoSpinnerContext = (require(10680) /* metro dependency 10680: VideoSpinnerTimer */).VideoSpinnerContext;
object.videoSpinnerContext = value2 ? VideoSpinnerContext.SELF_VIDEO : VideoSpinnerContext.REMOTE_VIDEO;
object.userId = user.id;
r0 = <VideoRenderer {...object} />;
value = importDefault(8421) /* metro dependency 8421: VideoBackground */;
value = ((Component) => <Component style={styles.imageBackground} url={user.getAvatarURL(guildId,
128)} speaking={speaking} size={avatarSize} renderVideoDetails={renderVideoDetails} />)(value);
r0 = value;
}
return r0;
function _fun82183() { // fn#82183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1436, offset: 0x01eee2b7, size: 37 bytes, params: 1, frame: 11
var r0;
var idBinding;
var authenticationStoreBinding;
var value;
const hasVideoBinding = hasVideo;
if (hasVideoBinding) {
idBinding = id;
value = environment.__proto__;
authenticationStoreBinding = AuthenticationStore;
value = idBinding === authenticationStoreBinding.getId();
r0 = value;
} else {
r0 = hasVideoBinding;
}
return r0;
}
} else {
value = importDefault(8421) /* metro dependency 8421: VideoBackground */;
value = ((Component) => <Component style={styles.imageBackground} url={user.getAvatarURL(guildId,
128)} speaking={speaking} size={avatarSize} renderVideoDetails={renderVideoDetails} />)(value);
r0 = value;
}
return r0;
}
function _fun82187({muted, deafened, userId, style}) { // fn#82187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:2326, offset: 0x01eee473, size: 607 bytes, params: 2, frame: 32
var r6;
var r0;
var value6;
var jsxRuntimeEnv0_16Binding;
var value7;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var items3;
var object4;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value4 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[MediaEngineStore], _fun82188, [userId]]),
3);
const property = value4[0];
const property2 = value4[1];
const property3 = value4[2];
const r14 = property ? importDefault(8133) /* metro dependency 8133 */ : deafened ? importDefault(10695) /* metro dependency 10695 */ : muted ? importDefault(10696) /* metro dependency 10696 */ : undefined;
const r12 = property2 && !property3;
if (r12) {
jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
value7 = null;
r6 = r12 ? <View style={[styles.statusWrapper,
style]}><Icon source={importDefault(10697) /* metro dependency 10697 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor /></View> : value7;
items3 = [r6];
if (value7 != r14) {
r6 = <View style={[styles.statusWrapper, style,
r12 ? {right: 38} : value7]}><Icon source={r14} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} disableColor={r14 === (importDefault(8133) /* metro dependency 8133 */)} /></View>;
} else {
r6 = value7;
function _fun82184() { // fn#82184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1505, offset: 0x01eee2dc, size: 35 bytes, params: 1, frame: 11
const value = environment.__proto__;
const mediaEngineStoreBinding = MediaEngineStore;
return [mediaEngineStoreBinding.isLocalVideoAutoDisabled(id)];
}
items3[1] = r6;
r0 = <>{items3}</>;
} else {
value6 = null;
if (value6 != r14) {
function _fun82185() { // fn#82185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1594, offset: 0x01eee2ff, size: 65 bytes, params: 1, frame: 14
return id != null ? MediaEngineStore.getVideoToggleState(id,
MediaEngineContextTypes.DEFAULT) : VideoToggleState.NONE;
}
function renderVideoDetails() { // fn#82186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1786, offset: 0x01eee340, size: 307 bytes, params: 1, frame: 24
var r0;
var value3;
var object;
var stylesBinding;
var object4;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var items2;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
if (Module00057) {
value3 = environment.__proto__;
object = {};
stylesBinding = styles;
object.style = stylesBinding.autoDisabledVideoWrapper;
var viewProps = {style: [stylesBinding.autoDisabledVideo, stylesBinding.autoDisabledVideoTextWrapper]};
value = (
<Icon
source={importDefault(9149) /* metro dependency 9149 */}
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL}
disableColor
/>
);
items2 = [value];
items2[1] = (
<Text
variant="text-sm/normal"
color="text-default"
style={stylesBinding.labelText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m2Hyj0)}
</Text>
);
value = (
<View {...object}>
<View {...viewProps}>
{items2}
</View>
</View>
);
r0 = value;
} else if (result) {
value3 = environment.__proto__;
object = {};
stylesBinding = styles;
object.style = stylesBinding.autoDisabledVideoWrapper;
var viewProps = {style: [stylesBinding.autoDisabledVideo, stylesBinding.autoDisabledVideoTextWrapper]};
value = (
<Icon
source={importDefault(9149) /* metro dependency 9149 */}
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL}
disableColor
/>
);
items2 = [value];
items2[1] = (
<Text
variant="text-sm/normal"
color="text-default"
style={stylesBinding.labelText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m2Hyj0)}
</Text>
);
value = (
<View {...object}>
<View {...viewProps}>
{items2}
</View>
</View>
);
r0 = value;
} else {
r0 = null;
}
return r0;
}
}
function _fun82187({muted, deafened, userId, style}) { // fn#82187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:2326, offset: 0x01eee473, size: 607 bytes, params: 2, frame: 32
var r6;
var r0;
var value6;
var jsxRuntimeEnv0_16Binding;
var value7;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var items3;
var object;
const styles = useStyles();
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const value4 = Module00057(Reflect.apply(useStateFromStoresArray, FluxModule, [[MediaEngineStore], _fun82188, [userId]]),
3);
const property = value4[0];
const property2 = value4[1];
const property3 = value4[2];
const r14 = property ? importDefault(8133) /* metro dependency 8133 */ : deafened ? importDefault(10695) /* metro dependency 10695 */ : muted ? importDefault(10696) /* metro dependency 10696 */ : undefined;
const r12 = property2 && !property3;
if (r12) {
jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
value7 = null;
r6 = r12 ? <View style={[styles.statusWrapper,
style]}><Icon source={importDefault(10697) /* metro dependency 10697 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor /></View> : value7;
r6 = (
r12
? (
<View style={[styles.statusWrapper, style]}>
<Icon
source={importDefault(10697) /* metro dependency 10697 */}
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL}
disableColor
/>
</View>
)
: value7
);
items3 = [r6];
if (value7 != r14) {
r6 = <View style={[styles.statusWrapper, style,
r12 ? {right: 38} : value7]}><Icon source={r14} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE} disableColor={r14 === (importDefault(8133) /* metro dependency 8133 */)} /></View>;
r6 = (
<View style={[styles.statusWrapper, style, r12 ? {right: 38} : value7]}>
<Icon
source={r14}
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL}
color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE}
disableColor={r14 === (importDefault(8133) /* metro dependency 8133 */)}
/>
</View>
);
} else {
r6 = value7;
}
items3[1] = r6;
r0 = <>{items3}</>;
r0 = (
<>
{items3}
</>
);
} else {
r0 = value6;
value6 = null;
if (value6 != r14) {
jsxRuntimeEnv0_16Binding = jsxRuntimeEnv0_16;
value7 = null;
r6 = (
r12
? (
<View style={[styles.statusWrapper, style]}>
<Icon
source={importDefault(10697) /* metro dependency 10697 */}
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL}
disableColor
/>
</View>
)
: value7
);
items3 = [r6];
if (value7 != r14) {
r6 = (
<View style={[styles.statusWrapper, style, r12 ? {right: 38} : value7]}>
<Icon
source={r14}
size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL}
color={(importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE}
disableColor={r14 === (importDefault(8133) /* metro dependency 8133 */)}
/>
</View>
);
} else {
r6 = value7;
}
items3[1] = r6;
r0 = (
<>
{items3}
</>
);
} else {
r0 = value6;
}
}
return r0;
function _fun82188() { // fn#82188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:2426, offset: 0x01eee6d2, size: 65 bytes, params: 1, frame: 12
const value = environment.__proto__;
const mediaEngineStoreBinding = MediaEngineStore;
const isLocalMute = mediaEngineStoreBinding.isLocalMute;
const userIdBinding = userId;
return [Reflect.apply(isLocalMute, mediaEngineStoreBinding, [userIdBinding]),
mediaEngineStoreBinding.isLocalVideoDisabled(userIdBinding),
mediaEngineStoreBinding.isLocalVideoAutoDisabled(userIdBinding)];
}
}
return r0;
}
function _default_82189({participant, onSingleTap, onDoubleTap, onLongPress, avatarSize, resizeMode = require(dependencyMap[20]).ResizeMode.COVER, statusStyle, gestureEnabled, hasNotch, style}) { // fn#82189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:2975, offset: 0x01eee713, size: 1055 bytes, params: 2, frame: 41
const env0_4 = undefined;
const styles = useStyles();
const binding = env0_4;
const value4 = binding.useCallback(_fun82190, [onSingleTap, participant]);
const value5 = binding.useCallback(_fun82191, [onDoubleTap, participant]);
const value6 = binding.useCallback(_fun82192, [participant, onLongPress]);
const streamId = participant.streamId;
const ringing = participant.ringing;
const user = participant.user;
const voiceState = participant.voiceState;
const defaultImport = importDefault(4612) /* metro dependency 4612: useIsSpeaking */;
let id = participant.id;
const value7 = defaultImport({userId: id});
const r28 = ChannelStore.getChannel(voiceState?.channelId)?.guild_id ?? undefined;
const value10 = (importDefault(10692) /* metro dependency 10692: participantHasVideo */)(participant);
let r1 = voiceState?.isVoiceMuted();
const r14 = r1 != null && r1;
r1 = voiceState?.isVoiceDeafened();
const r13 = r1 != null && r1;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let type = participant.type;
const value13 = Reflect.apply(useStateFromStores, fluxModule, [[MediaEngineStore], _fun82193, [user.id, type]]);
const swipeDismissRef = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.swipeDismissRef;
const user2 = participant.user;
id = user2?.id;
const value15 = fluxModule.useStateFromStores([VoiceChannelEffectsStore], _fun82194);
type = participant.type;
const USER = ParticipantTypes.USER;
const r10 = type === USER && id != null && value15 != null;
const value19 = (importDefault(10668) /* metro dependency 10668: useParticipantTileTapGesture */)({onDoubleTapStart: value5,
onSingleTapStart: value4});
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value22 = Gesture.LongPress().onStart(value6).minDuration(800);
const r6 = swipeDismissRef == null ? value22 : value22.requireExternalGestureToFail(swipeDismissRef);
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
return (
<GestureDetector gesture={Gesture.Simultaneous(r6, value19)}>
<View style={[styles.container, style]}>
{((Component) => <Component guildId={r28} hasVideo={value10 && !value13} streamId={streamId} user={user} resizeMode={resizeMode} ringing={ringing} speaking={value7} avatarSize={avatarSize} gestureEnabled={gestureEnabled} />)(env0_18)}
{r10 ? ((Component) => <Component voiceChannelEffect={value15} onComplete={function() {
return clearVoiceChannelEffectForUser(id);
}} userId={id} hasNotch={hasNotch} />)(importDefault(10699) /* metro dependency 10699: AnimatedEffectEmoji */) : null}
{((Component) => <Component muted={r14} deafened={r13} userId={user.id} style={statusStyle} />)(env0_19)}
</View>
</GestureDetector>
);
}
function _default_82189({participant, onSingleTap, onDoubleTap, onLongPress, avatarSize, resizeMode = require(dependencyMap[20]).ResizeMode.COVER, statusStyle, gestureEnabled, hasNotch, style}) { // fn#82189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:2975, offset: 0x01eee713, size: 1055 bytes, params: 2, frame: 41
const env0_4 = undefined;
const styles = useStyles();
const binding = env0_4;
const value4 = binding.useCallback(_fun82190, [onSingleTap, participant]);
const value5 = binding.useCallback(_fun82191, [onDoubleTap, participant]);
const value6 = binding.useCallback(_fun82192, [participant, onLongPress]);
const streamId = participant.streamId;
const ringing = participant.ringing;
const user = participant.user;
const voiceState = participant.voiceState;
const defaultImport = UseIsSpeaking;
let id = participant.id;
const value7 = defaultImport({userId: id});
const r28 = ChannelStore.getChannel(voiceState?.channelId)?.guild_id ?? undefined;
const value10 = (ParticipantHasVideo)(participant);
let r1 = voiceState?.isVoiceMuted();
const r14 = r1 != null && r1;
r1 = voiceState?.isVoiceDeafened();
const r13 = r1 != null && r1;
const useStateFromStores = FluxModule.useStateFromStores;
let type = participant.type;
const value13 = Reflect.apply(useStateFromStores, FluxModule, [[MediaEngineStore], _fun82193, [user.id, type]]);
const swipeDismissRef = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.swipeDismissRef;
const user2 = participant.user;
id = user2?.id;
const value15 = FluxModule.useStateFromStores([VoiceChannelEffectsStore], _fun82194);
type = participant.type;
const USER = ParticipantTypes.USER;
const r10 = type === USER && id != null && value15 != null;
const value19 = (UseParticipantTileTapGesture)({onDoubleTapStart: value5,
onSingleTapStart: value4});
const Gesture = (Module05321Module).Gesture;
const value22 = Gesture.LongPress().onStart(value6).minDuration(800);
const r6 = swipeDismissRef == null ? value22 : value22.requireExternalGestureToFail(swipeDismissRef);
const GestureDetector = (Module05321Module).GestureDetector;
return (
<GestureDetector gesture={Gesture.Simultaneous(r6, value19)}>
<View style={[styles.container, style]}>
{((Component) => <Component guildId={r28} hasVideo={value10 && !value13} streamId={streamId} user={user} resizeMode={resizeMode} ringing={ringing} speaking={value7} avatarSize={avatarSize} gestureEnabled={gestureEnabled} />)(env0_18)}
{
r10
? ((Component) => <Component voiceChannelEffect={value15} onComplete={function() {
return clearVoiceChannelEffectForUser(id);
}} userId={id} hasNotch={hasNotch} />)(importDefault(10699) /* metro dependency 10699: AnimatedEffectEmoji */)
: null
}
{((Component) => <Component muted={r14} deafened={r13} userId={user.id} style={statusStyle} />)(env0_19)}
</View>
</GestureDetector>
);
function _fun82190() { // fn#82190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3178, offset: 0x01ee9933, size: 35 bytes, params: 1, frame: 12
return onSingleTap?.(participant);
}
function _fun82191() { // fn#82191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3227, offset: 0x01ee9956, size: 35 bytes, params: 1, frame: 12
return onDoubleTap?.(participant);
}
function _fun82192() { // fn#82192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3276, offset: 0x01eeeb32, size: 35 bytes, params: 1, frame: 12
return onLongPress?.(participant);
}
function _fun82193() { // fn#82193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3619, offset: 0x01eeeb55, size: 87 bytes, params: 1, frame: 17
return user.id != null && MediaEngineStore.isLocalVideoDisabled(user.id,
(importDefault(10698) /* metro dependency 10698: mediaEngineContextFromParticipantType */)(participant.type));
}
function _fun82194() { // fn#82194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3841, offset: 0x01eeebac, size: 42 bytes, params: 1, frame: 12
const idBinding = id;
const value2 = null;
return value2 != idBinding ? VoiceChannelEffectsStore.getEffectForUserId(id) : value2;
}
function _fun82183() { // fn#82183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1436, offset: 0x01eee2b7, size: 37 bytes, params: 1, frame: 11
var r0;
var idBinding;
var value;
const hasVideoBinding = hasVideo;
if (hasVideoBinding) {
idBinding = id;
value = environment.__proto__;
value = idBinding === AuthenticationStore.getId();
r0 = value;
} else {
r0 = hasVideoBinding;
}
return r0;
}
function _fun82184() { // fn#82184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1505, offset: 0x01eee2dc, size: 35 bytes, params: 1, frame: 11
const value = environment.__proto__;
return [MediaEngineStore.isLocalVideoAutoDisabled(id)];
}
function _fun82185() { // fn#82185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1594, offset: 0x01eee2ff, size: 65 bytes, params: 1, frame: 14
return id != null ? MediaEngineStore.getVideoToggleState(id,
MediaEngineContextTypes.DEFAULT) : VideoToggleState.NONE;
}
function renderVideoDetails() { // fn#82186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:1786, offset: 0x01eee340, size: 307 bytes, params: 1, frame: 24
var r0;
var value3;
var object3;
var stylesBinding;
var object2;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
if (env0_3) {
value3 = environment.__proto__;
object3 = {};
stylesBinding = styles;
object3.style = stylesBinding.autoDisabledVideoWrapper;
var viewProps = {style: [stylesBinding.autoDisabledVideo, stylesBinding.autoDisabledVideoTextWrapper]};
value = <Icon source={importDefault(9149) /* metro dependency 9149 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor />;
items2 = [value];
items2[1] = <Text variant="text-sm/normal" color="text-default" style={stylesBinding.labelText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m2Hyj0)}</Text>;
value = <View {...object3}><View {...viewProps}>{items2}</View></View>;
r0 = value;
} else if (result) {
value3 = environment.__proto__;
object3 = {};
stylesBinding = styles;
object3.style = stylesBinding.autoDisabledVideoWrapper;
var viewProps = {style: [stylesBinding.autoDisabledVideo, stylesBinding.autoDisabledVideoTextWrapper]};
value = <Icon source={importDefault(9149) /* metro dependency 9149 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor />;
items2 = [value];
items2[1] = <Text variant="text-sm/normal" color="text-default" style={stylesBinding.labelText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m2Hyj0)}</Text>;
value = <View {...object3}><View {...viewProps}>{items2}</View></View>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function _fun82188() { // fn#82188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:2426, offset: 0x01eee6d2, size: 65 bytes, params: 1, frame: 12
const value = environment.__proto__;
const isLocalMute = MediaEngineStore.isLocalMute;
const userIdBinding = userId;
return [Reflect.apply(isLocalMute, MediaEngineStore, [userIdBinding]),
MediaEngineStore.isLocalVideoDisabled(userIdBinding), MediaEngineStore.isLocalVideoAutoDisabled(userIdBinding)];
}
function _fun82192() { // fn#82192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3276, offset: 0x01eeeb32, size: 35 bytes, params: 1, frame: 12
return onLongPress?.(participant);
}
function _fun82193() { // fn#82193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3619, offset: 0x01eeeb55, size: 87 bytes, params: 1, frame: 17
return user.id != null && MediaEngineStore.isLocalVideoDisabled(user.id,
(importDefault(10698) /* metro dependency 10698: mediaEngineContextFromParticipantType */)(participant.type));
}
function _fun82194() { // fn#82194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10879:3841, offset: 0x01eeebac, size: 42 bytes, params: 1, frame: 12
const idBinding = id;
const value2 = null;
return value2 != idBinding ? VoiceChannelEffectsStore.getEffectForUserId(id) : value2;
}
global.__d(_fun82181, 10693, [57, 31, 27, 10694, 1226, 1379, 4259, 661, 4299, 4291, 33, 4501, 697, 4000, 566, 8421,
1305, 9149, 4573, 1244, 10677, 10680, 8133, 10695, 10696, 10697, 4612, 10692, 10698, 10665, 10668, 5321, 10699,
2]) /* metro module 10693, dependencies: [57, 31, 27, 10694, 1226, 1379, 4259, 661, 4299, 4291, 33, 4501, 697, 4000, 566, 8421, 1305, 9149, 4573, 1244, 10677, 10680, 8133, 10695, 10696, 10697, 4612, 10692, 10698, 10665, 10668, 5321, 10699, 2] */;
@@ -1,72 +1,100 @@
/* Metro module 15495; source: modules/video_calls/native/components/UserVideoFailed.tsx; dependencies: [27, 661, 33, 4501, 697, 9235, 9933, 4573, 1244, 4578, 10685, 4406, 8899, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AudioActionCreators from '../../../../actions/AudioActionCreators.tsx'; /* Metro dependency 8899 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as MediaEngineModule from '../../../../external/discord_common/js/packages/media-engine/index.tsx'; /* Metro dependency 4406 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as AVErrorModule from '../../../errors/av_errors/AVError.tsx'; /* Metro dependency 9235 */
import * as VideoStreamReadyActionCreatorsModule from '../../../errors/VideoStreamReadyActionCreators.tsx'; /* Metro dependency 10685 */
function _fun118639(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15692:6, offset: 0x024e5e7f, size: 298 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).VideoToggleState;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PRIMARY_700 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_700;
const PRIMARY_700 = (Native).unsafe_rawColors.PRIMARY_700;
const env0_8 = Reflect.apply(createStyles, value, [{container: {'alignItems': 'center', 'justifyContent': 'center',
'backgroundColor': null, 'padding': 8, backgroundColor: PRIMARY_700}, placeholderImage: {'marginBottom': 8,
'width': '100%', 'resizeMode': 'contain'}, button: {'marginTop': 16, 'alignSelf': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/UserVideoFailed.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/UserVideoFailed.tsx');
exports.default = UserVideoFailed;
function UserVideoFailed(a0) { // fn#118640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15692:534, offset: 0x024e5fa9, size: 610 bytes, params: 2, frame: 32
const env0_0 = a0.userId;
const style = a0.style;
const avError = a0.avError;
const removeRetryButton = a0.removeRetryButton;
const removeSplashImage = a0.removeSplashImage;
let object = {'userId': 0, 'style': 0, 'avError': 0, 'removeRetryButton': 0, 'removeSplashImage': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const styles = useStyles();
const getErrorInfo = AVErrorModule.getErrorInfo;
const errorCode = Reflect.apply(getErrorInfo, AVErrorModule, [avError]).errorCode;
const viewBindingProps = {...value};
viewBindingProps['style'] = [styles.container, style];
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
const r4 = !removeSplashImage && ((StreamFailed) => <StreamFailed style={styles.placeholderImage} />)((require(9933) /* metro dependency 9933: StreamFailed */).StreamFailed);
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object = [
<>
{r4}
<Text variant="text-md/semibold" color="text-strong">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['z+mxvo'])}
</Text>
</>,
];
object[1] = (
<Text
variant="text-sm/semibold"
color="text-muted"
selectable
>
{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ejOT95,
{errorCode: errorCode})}
</Text>
);
object[2] = (
<View style={styles.button}>
{!removeRetryButton && ((Button) => <Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['hxmQ/e'])} onPress={onPress_118641} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
</View>
);
return (
<View {...viewBindingProps}>
{object}
</View>
);
function UserVideoFailedOnPress() { // fn#118641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15692:1194, owner: UserVideoFailed.onPress, offset: 0x024e620b, size: 164 bytes, params: 1, frame: 20
const clearVideoStreamTimeout = VideoStreamReadyActionCreatorsModule.clearVideoStreamTimeout;
const MediaEngineContextTypes = (MediaEngineModule).MediaEngineContextTypes;
let DEFAULT = MediaEngineContextTypes.DEFAULT;
let userIdBinding = userId;
Reflect.apply(clearVideoStreamTimeout, VideoStreamReadyActionCreatorsModule, [DEFAULT, userIdBinding]);
let defaultImport = AudioActionCreators;
const setDisableLocalVideo = defaultImport.setDisableLocalVideo;
const DISABLED = VideoToggleState.DISABLED;
DEFAULT = MediaEngineContextTypes.DEFAULT;
Reflect.apply(setDisableLocalVideo, defaultImport, [userIdBinding, DISABLED, DEFAULT, false]);
global.setTimeout(function() {
var defaultImport = importDefault(dependencyMap[12]);
var userIdBinding = userId;
var MANUAL_ENABLED = VideoToggleState.MANUAL_ENABLED;
var DEFAULT = require(dependencyMap[11]).MediaEngineContextTypes.DEFAULT;
defaultImport.setDisableLocalVideo(userIdBinding, MANUAL_ENABLED, DEFAULT, false);
}, 1000);
}
}
}
function UserVideoFailed(a0) { // fn#118640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15692:534, offset: 0x024e5fa9, size: 610 bytes, params: 2, frame: 32
const env0_0 = a0.userId;
const style = a0.style;
const avError = a0.avError;
const removeRetryButton = a0.removeRetryButton;
const removeSplashImage = a0.removeSplashImage;
let object = {'userId': 0, 'style': 0, 'avError': 0, 'removeRetryButton': 0, 'removeSplashImage': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const styles = useStyles();
const avErrorModule = require(9235) /* metro dependency 9235: AVError */;
const getErrorInfo = avErrorModule.getErrorInfo;
const errorCode = Reflect.apply(getErrorInfo, avErrorModule, [avError]).errorCode;
const viewBindingProps = {...value};
viewBindingProps['style'] = [styles.container, style];
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
const r4 = !removeSplashImage && ((StreamFailed) => <StreamFailed style={styles.placeholderImage} />)((require(9933) /* metro dependency 9933: StreamFailed */).StreamFailed);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object = [<>{r4}<Text variant="text-md/semibold" color="text-strong">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['z+mxvo'])}</Text></>];
object[1] = <Text variant="text-sm/semibold" color="text-muted" selectable>{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.ejOT95,
{errorCode: errorCode})}</Text>;
object[2] = <View style={styles.button}>{!removeRetryButton && ((Button) => <Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['hxmQ/e'])} onPress={onPress_118641} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
return (
<View {...viewBindingProps}>
{object}
</View>
);
}
function UserVideoFailedOnPress() { // fn#118641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15692:1194, owner: UserVideoFailed.onPress, offset: 0x024e620b, size: 164 bytes, params: 1, frame: 20
const videoStreamReadyActionCreatorsModule = require(10685) /* metro dependency 10685: VideoStreamReadyActionCreators */;
const clearVideoStreamTimeout = videoStreamReadyActionCreatorsModule.clearVideoStreamTimeout;
const MediaEngineContextTypes = (require(4406) /* metro dependency 4406: mediaEngine */).MediaEngineContextTypes;
let DEFAULT = MediaEngineContextTypes.DEFAULT;
let userIdBinding = userId;
Reflect.apply(clearVideoStreamTimeout, videoStreamReadyActionCreatorsModule, [DEFAULT, userIdBinding]);
let defaultImport = importDefault(8899) /* metro dependency 8899: AudioActionCreators */;
const setDisableLocalVideo = defaultImport.setDisableLocalVideo;
const DISABLED = VideoToggleState.DISABLED;
DEFAULT = MediaEngineContextTypes.DEFAULT;
Reflect.apply(setDisableLocalVideo, defaultImport, [userIdBinding, DISABLED, DEFAULT, false]);
global.setTimeout(function() {
var defaultImport = importDefault(dependencyMap[12]);
var userIdBinding = userId;
var MANUAL_ENABLED = VideoToggleState.MANUAL_ENABLED;
var DEFAULT = require(dependencyMap[11]).MediaEngineContextTypes.DEFAULT;
defaultImport.setDisableLocalVideo(userIdBinding, MANUAL_ENABLED, DEFAULT, false);
}, 1000);
}
global.__d(_fun118639, 15495, [27, 661, 33, 4501, 697, 9235, 9933, 4573, 1244, 4578, 10685, 4406, 8899,
2]) /* metro module 15495, dependencies: [27, 661, 33, 4501, 697, 9235, 9933, 4573, 1244, 4578, 10685, 4406, 8899, 2] */;
@@ -1,6 +1,16 @@
/* Metro module 10677; source: modules/video_calls/native/components/VideoRenderer.tsx; dependencies: [57, 31, 27, 33, 4501, 10678, 10679, 10681, 1478, 477, 7717, 10686, 9944, 10687, 4017, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseVideoSpinnerTimer from '../../useVideoSpinnerTimer.tsx'; /* Metro dependency 10679 */
import UseVideoReadyTimeout from '../../../errors/hooks/useVideoReadyTimeout.tsx'; /* Metro dependency 10681 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SurfaceDirectRendererExperimentModule from '../SurfaceDirectRendererExperiment.tsx'; /* Metro dependency 10678 */
function _fun82091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:6, offset: 0x01eeaac2, size: 356 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const resetIOSScrollZoom = function(a0, a1, a2) {
if (!(a1 <= 0 || a2 <= 0)) {
@@ -11,249 +21,282 @@ function _fun82091(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.StyleSheet;
const env0_7 = value2.ScrollView;
const value3 = require(33) /* metro dependency 33 */;
const env0_8 = value3.jsx;
const env0_9 = value3.jsxs;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({spinner: {'height': 32,
let value = ReactModule;
const env0_10 = (CreateStylesModule).createStyles({spinner: {'height': 32,
'width': 32}, center: {'alignItems': 'center', 'justifyContent': 'center'}, zoomLayoutAndroid: {flex: 1}});
object2 = {COVER: 0};
object2[0] = 'COVER';
object2.CONTAIN = 1;
object2[1] = 'CONTAIN';
object2.AUTO = 2;
object2[2] = 'AUTO';
object = {COVER: 0};
object[0] = 'COVER';
object.CONTAIN = 1;
object[1] = 'CONTAIN';
object.AUTO = 2;
object[2] = 'AUTO';
value = value.memo(_fun82093);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/VideoRenderer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/VideoRenderer.tsx');
exports.default = value;
exports.ResizeMode = object2;
}
function _fun82093({streamId, resizeMode = env0_11.CONTAIN, gestureEnabled, renderTag, videoSpinnerContext, userId, streamKey, paused}) { // fn#82093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:581, offset: 0x01eeac81, size: 1830 bytes, params: 2, frame: 43
var object;
var object2;
var items3;
var items4;
let value = undefined;
gestureEnabled = !(gestureEnabled === value) && gestureEnabled;
paused = !(paused === value) && paused;
const env0_3 = value;
let env0_4 = value;
const styles = useStyles();
const value6 = (require(10678) /* metro dependency 10678: SurfaceDirectRendererExperiment */).useSurfaceDirectRendererExperiment(userId,
{location: 'VideoRenderer'});
const binding = env0_4;
let useState = binding.useState;
const value7 = Reflect.apply(useState, binding, [0]);
const binding2 = env0_3;
const value8 = binding2(value7, 2);
const property = value8[0];
const env0_2 = value8[1];
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property2 = value9[0];
env0_4 = value9[1];
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property3 = value10[0];
const property4 = value10[1];
useState = binding.useState;
const value11 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property5 = value11[0];
const property6 = value11[1];
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [true]), 2);
const property7 = value12[0];
const env0_9 = value12[1];
(importDefault(10679) /* metro dependency 10679: useVideoSpinnerTimer */)({location: 'VideoRenderer',
videoSpinnerContext: videoSpinnerContext, userId: userId, streamId: streamId, paused: paused,
loading: property7});
const onReady = (importDefault(10681) /* metro dependency 10681: useVideoReadyTimeout */)({streamId: streamId,
userId: userId, videoSpinnerContext: videoSpinnerContext, paused: paused, loading: property7,
streamKey: streamKey}).onReady;
const value14 = binding.useRef(null);
const value15 = binding.useRef(null);
const env0_13 = binding.useRef({'width': 0, 'height': 0});
const value16 = binding.useCallback(_fun82094, [property4, property6]);
const value17 = binding.useCallback(_fun82095, [onReady]);
const value18 = binding.useCallback(_fun82096, []);
const value19 = binding.useCallback(_fun82097, []);
const value20 = binding.useMemo(_fun82099, [property, property2, property3, property5, resizeMode]);
const value21 = (require(7717) /* metro dependency 7717: DeviceOrientation */).useStore(function(a0) {
return a0.orientation;
});
binding.useLayoutEffect(_fun82101, [property, property2, property3, property5, value20]);
binding.useLayoutEffect(_fun82102, [property3, property5]);
const value22 = binding.useMemo(_fun82103, [value20, property3, property5]);
const value23 = binding.useMemo(_fun82104, [value20, property3, property5]);
const value24 = binding.useMemo(_fun82105, [property3, value20, property, property5, property2]);
const value25 = binding.useMemo(_fun82106, [property, property2]);
const value26 = binding.useMemo(_fun82107, [property3, value20, property, property5, property2]);
const r16 = property7 ? ((Component) => <Component animate style={styles.spinner} />)(importDefault(10686) /* metro dependency 10686: MessageLoadingSpinner */) : null;
const OrientationType = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType;
const PORTRAIT = OrientationType.PORTRAIT;
const value28 = value21 === PORTRAIT;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
value = <View onLayout={value18} style={[styles.center,
StyleSheet.absoluteFillObject]}>{((Component) => <Component ref={value15} style={styles.zoomLayoutAndroid} minimumZoomScale={1} gestureEnabled={gestureEnabled}><View collapsable={false} style={{width: property,
height: property2, alignItems: 'center',
justifyContent: 'center'}}>{((Component) => <Component useSurfaceDirectRenderer={value6} streamId={streamId} onSize={value16} onReady={value17} style={value23} />)(importDefault(10687) /* metro dependency 10687: DCDVideoRenderer */)}{r16}</View></Component>)(importDefault(9944) /* metro dependency 9944: ZoomLayoutAndroid */)}<View style={value26}>{property7 ? null : gestureEnabled && value28 ? renderTag == null ? value : renderTag() : null}</View></View>;
resizeMode = value;
} else if (gestureEnabled) {
var scrollViewBindingProps = {ref: value14, onLayout: value18, style: StyleSheet.absoluteFillObject,
contentContainerStyle: value25, bounces: false, pinchGestureEnabled: !property7, maximumZoomScale: 8,
minimumZoomScale: 1, showsVerticalScrollIndicator: false, showsHorizontalScrollIndicator: false,
scrollEventThrottle: 16};
object = {collapsable: false, style: value25, onLayout: value19};
object2 = {style: value24};
items3 = [((View) => <View>{((Component) => <Component useSurfaceDirectRenderer={value6} streamId={streamId} onSize={value16} onReady={value17} style={value22} />)(importDefault(10687) /* metro dependency 10687: DCDVideoRenderer */)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View)];
items3[1] = value28 ? renderTag == null ? value : renderTag() : null;
items4 = [<View {...object2}>{items3}</View>];
items4[1] = r16 != null ? <View style={[StyleSheet.absoluteFillObject, styles.center]}>{r16}</View> : null;
value = <ScrollView {...scrollViewBindingProps}><View {...object}>{items4}</View></ScrollView>;
resizeMode = value;
} else {
resizeMode = <View onLayout={value18} style={[styles.center,
StyleSheet.absoluteFillObject]}>{((Component) => <Component useSurfaceDirectRenderer={value6} streamId={streamId} onSize={value16} onReady={value17} style={value22} />)(importDefault(10687) /* metro dependency 10687: DCDVideoRenderer */)}{r16}</View>;
}
return resizeMode;
}
function _fun82094({nativeEvent}) { // fn#82094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1272, offset: 0x01eeb3a7, size: 153 bytes, params: 2, frame: 18
const width = nativeEvent.width;
const height = nativeEvent.height;
let value = environment.__proto__;
value = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
value = value.getWindowDimensions();
const width2 = value.width;
const height2 = value.height;
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
const sqrt = Math2.sqrt;
value = width2 * height2 * 4;
value = Reflect.apply(sqrt, Math2, [value / (width * height)]);
value = Reflect.apply(min, Math, [value, 1]);
env0_6(width * value);
env0_8(height * value);
}
function _fun82095() { // fn#82095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1443, offset: 0x01eeb440, size: 26 bytes, params: 1, frame: 12
env0_9(false);
onReady();
}
function _fun82096({nativeEvent}) { // fn#82096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1482, offset: 0x01eeb45a, size: 70 bytes, params: 2, frame: 13
const {width, height} = nativeEvent.layout;
env0_2(width);
env0_4(height);
env0_13.current = {width: width, height: height};
}
function _fun82097({nativeEvent}) { // fn#82097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1590, offset: 0x01eeb4a0, size: 139 bytes, params: 2, frame: 18
const {width, height} = nativeEvent.layout;
if (!((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || env0_11.current == null)) {
resetIOSScrollZoom(env0_11.current, width, height);
global.requestAnimationFrame(_fun82098);
}
}
function _fun82099() { // fn#82099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1812, offset: 0x01eeb565, size: 240 bytes, params: 1, frame: 8
const value2 = 0;
if (value2 === env0_1) {
return value2;
}
if (value2 === env0_3) {
return value2;
}
if (value2 === env0_5) {
return value2;
}
if (value2 === env0_7) {
return value2;
}
const binding = env0_0;
const value3 = env0_1 / env0_3;
const value4 = env0_5 / env0_7;
const AUTO = env1_11.AUTO;
const r6 = binding !== AUTO ? binding : value3 > 1 && value4 > 1 || value3 < 1 && value4 < 1 ? env1_11.COVER : env1_11.CONTAIN;
const CONTAIN = env1_11.CONTAIN;
return r6 === CONTAIN ? value3 > value4 ? env0_3 / env0_7 : env0_1 / env0_5 : r6 !== env1_11.COVER ? value2 : value4 > value3 ? env0_3 / env0_7 : env0_1 / env0_5;
}
function _fun82101() { // fn#82101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2063, offset: 0x01eeb660, size: 99 bytes, params: 1, frame: 13
var current;
let value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
if (value && env0_12.current != null) {
current = env0_12.current;
if (current != null) {
current.unzoom({animated: false});
exports.ResizeMode = object;
function _fun82093({streamId, resizeMode = env0_11.CONTAIN, gestureEnabled, renderTag, videoSpinnerContext, userId, streamKey, paused}) { // fn#82093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:581, offset: 0x01eeac81, size: 1830 bytes, params: 2, frame: 43
var object3;
var object4;
var items3;
var items4;
let value = undefined;
gestureEnabled = !(gestureEnabled === value) && gestureEnabled;
paused = !(paused === value) && paused;
const env0_3 = value;
let env0_4 = value;
const styles = useStyles();
const value6 = (SurfaceDirectRendererExperimentModule).useSurfaceDirectRendererExperiment(userId,
{location: 'VideoRenderer'});
const binding = env0_4;
let useState = binding.useState;
const value7 = Reflect.apply(useState, binding, [0]);
const binding2 = env0_3;
const value8 = binding2(value7, 2);
const property = value8[0];
const env0_2 = value8[1];
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property2 = value9[0];
env0_4 = value9[1];
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property3 = value10[0];
const property4 = value10[1];
useState = binding.useState;
const value11 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property5 = value11[0];
const property6 = value11[1];
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [true]), 2);
const property7 = value12[0];
const env0_9 = value12[1];
(UseVideoSpinnerTimer)({location: 'VideoRenderer',
videoSpinnerContext: videoSpinnerContext, userId: userId, streamId: streamId, paused: paused,
loading: property7});
const onReady = (UseVideoReadyTimeout)({streamId: streamId,
userId: userId, videoSpinnerContext: videoSpinnerContext, paused: paused, loading: property7,
streamKey: streamKey}).onReady;
const value14 = binding.useRef(null);
const value15 = binding.useRef(null);
const env0_13 = binding.useRef({'width': 0, 'height': 0});
const value16 = binding.useCallback(_fun82094, [property4, property6]);
const value17 = binding.useCallback(_fun82095, [onReady]);
const value18 = binding.useCallback(_fun82096, []);
const value19 = binding.useCallback(_fun82097, []);
const value20 = binding.useMemo(_fun82099, [property, property2, property3, property5, resizeMode]);
const value21 = (require(7717) /* metro dependency 7717: DeviceOrientation */).useStore(function(a0) {
return a0.orientation;
});
binding.useLayoutEffect(_fun82101, [property, property2, property3, property5, value20]);
binding.useLayoutEffect(_fun82102, [property3, property5]);
const value22 = binding.useMemo(_fun82103, [value20, property3, property5]);
const value23 = binding.useMemo(_fun82104, [value20, property3, property5]);
const value24 = binding.useMemo(_fun82105, [property3, value20, property, property5, property2]);
const value25 = binding.useMemo(_fun82106, [property, property2]);
const value26 = binding.useMemo(_fun82107, [property3, value20, property, property5, property2]);
const r16 = (
property7
? ((Component) => <Component animate style={styles.spinner} />)(importDefault(10686) /* metro dependency 10686: MessageLoadingSpinner */)
: null
);
const OrientationType = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType;
const PORTRAIT = OrientationType.PORTRAIT;
const value28 = value21 === PORTRAIT;
if (PlatformUtilsModule.isAndroid()) {
value = (
<View onLayout={value18} style={[styles.center, StyleSheet.absoluteFillObject]}>
{((Component) => <Component ref={value15} style={styles.zoomLayoutAndroid} minimumZoomScale={1} gestureEnabled={gestureEnabled}><View collapsable={false} style={{width: property,
height: property2, alignItems: 'center',
justifyContent: 'center'}}>{((Component) => <Component useSurfaceDirectRenderer={value6} streamId={streamId} onSize={value16} onReady={value17} style={value23} />)(importDefault(10687) /* metro dependency 10687: DCDVideoRenderer */)}{r16}</View></Component>)(importDefault(9944) /* metro dependency 9944: ZoomLayoutAndroid */)}
<View style={value26}>
{property7 ? null : gestureEnabled && value28 ? renderTag == null ? value : renderTag() : null}
</View>
</View>
);
resizeMode = value;
} else if (gestureEnabled) {
var scrollViewBindingProps = {ref: value14, onLayout: value18, style: StyleSheet.absoluteFillObject,
contentContainerStyle: value25, bounces: false, pinchGestureEnabled: !property7, maximumZoomScale: 8,
minimumZoomScale: 1, showsVerticalScrollIndicator: false, showsHorizontalScrollIndicator: false,
scrollEventThrottle: 16};
object3 = {collapsable: false, style: value25, onLayout: value19};
object4 = {style: value24};
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items3 = [
<View2>
{((Component) => <Component useSurfaceDirectRenderer={value6} streamId={streamId} onSize={value16} onReady={value17} style={value22} />)(importDefault(10687) /* metro dependency 10687: DCDVideoRenderer */)}
</View2>,
];
items3[1] = value28 ? renderTag == null ? value : renderTag() : null;
items4 = [
<View {...object4}>
{items3}
</View>,
];
items4[1] = (
r16 != null
? (
<View style={[StyleSheet.absoluteFillObject, styles.center]}>
{r16}
</View>
)
: null
);
value = (
<ScrollView {...scrollViewBindingProps}>
<View {...object3}>
{items4}
</View>
</ScrollView>
);
resizeMode = value;
} else {
resizeMode = (
<View onLayout={value18} style={[styles.center, StyleSheet.absoluteFillObject]}>
{((Component) => <Component useSurfaceDirectRenderer={value6} streamId={streamId} onSize={value16} onReady={value17} style={value22} />)(importDefault(10687) /* metro dependency 10687: DCDVideoRenderer */)}
{r16}
</View>
);
}
return resizeMode;
function _fun82094({nativeEvent}) { // fn#82094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1272, offset: 0x01eeb3a7, size: 153 bytes, params: 2, frame: 18
const width = nativeEvent.width;
const height = nativeEvent.height;
let value = environment.__proto__;
value = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
value = value.getWindowDimensions();
const width2 = value.width;
const height2 = value.height;
const Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
const sqrt = Math2.sqrt;
value = width2 * height2 * 4;
value = Reflect.apply(sqrt, Math2, [value / (width * height)]);
value = Reflect.apply(min, Math, [value, 1]);
(0, ReactNativeModule.StyleSheet)(width * value);
(0, JsxRuntimeModule.jsx)(height * value);
}
}
}
function _fun82102() { // fn#82102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2194, offset: 0x01eeb6c3, size: 115 bytes, params: 1, frame: 15
var current;
var width;
var height;
var resetIOSScrollZoomBinding;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (!platformUtilsModule.isAndroid()) {
current = env0_11.current;
if (current != null) {
if (env0_5 > 0) {
if (env0_7 > 0) {
current = env0_13.current;
width = current.width;
height = current.height;
resetIOSScrollZoomBinding = resetIOSScrollZoom;
current = env0_11.current;
resetIOSScrollZoomBinding(current, width, height);
function _fun82095() { // fn#82095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1443, offset: 0x01eeb440, size: 26 bytes, params: 1, frame: 12
env0_9(false);
onReady();
}
function _fun82096({nativeEvent}) { // fn#82096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1482, offset: 0x01eeb45a, size: 70 bytes, params: 2, frame: 13
const {width, height} = nativeEvent.layout;
env0_2(width);
env0_4(height);
env0_13.current = {width: width, height: height};
}
function _fun82097({nativeEvent}) { // fn#82097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1590, offset: 0x01eeb4a0, size: 139 bytes, params: 2, frame: 18
const {width, height} = nativeEvent.layout;
if (!((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() || env0_11.current == null)) {
resetIOSScrollZoom(env0_11.current, width, height);
global.requestAnimationFrame(_fun82098);
}
function _fun82098() { // fn#82098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1732, offset: 0x01eeb52b, size: 58 bytes, params: 1, frame: 15
var value2;
if (env1_11.current != null) {
value2 = environment.__proto__.__proto__;
resetIOSScrollZoom(env1_11.current, width, height);
}
}
}
function _fun82099() { // fn#82099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1812, offset: 0x01eeb565, size: 240 bytes, params: 1, frame: 8
const value2 = 0;
if (value2 === env0_1) {
return value2;
}
if (value2 === env0_3) {
return value2;
}
if (value2 === ReactNativeModule.View) {
return value2;
}
if (value2 === ReactNativeModule.ScrollView) {
return value2;
}
const binding = env0_0;
const value3 = env0_1 / env0_3;
const value4 = ReactNativeModule.View / ReactNativeModule.ScrollView;
const AUTO = env1_11.AUTO;
const r6 = binding !== AUTO ? binding : value3 > 1 && value4 > 1 || value3 < 1 && value4 < 1 ? env1_11.COVER : env1_11.CONTAIN;
const CONTAIN = env1_11.CONTAIN;
return r6 === CONTAIN ? value3 > value4 ? env0_3 / ReactNativeModule.ScrollView : env0_1 / ReactNativeModule.View : r6 !== env1_11.COVER ? value2 : value4 > value3 ? env0_3 / ReactNativeModule.ScrollView : env0_1 / ReactNativeModule.View;
}
function _fun82101() { // fn#82101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2063, offset: 0x01eeb660, size: 99 bytes, params: 1, frame: 13
var current;
let value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
if (value && env0_12.current != null) {
current = env0_12.current;
if (current != null) {
current.unzoom({animated: false});
}
}
}
function _fun82102() { // fn#82102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2194, offset: 0x01eeb6c3, size: 115 bytes, params: 1, frame: 15
var current;
var width;
var height;
var resetIOSScrollZoomBinding;
if (!PlatformUtilsModule.isAndroid()) {
current = env0_11.current;
if (current != null) {
if (ReactNativeModule.View > 0) {
if (ReactNativeModule.ScrollView > 0) {
current = env0_13.current;
width = current.width;
height = current.height;
resetIOSScrollZoomBinding = resetIOSScrollZoom;
current = env0_11.current;
resetIOSScrollZoomBinding(current, width, height);
}
}
}
}
}
function _fun82103() { // fn#82103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2350, offset: 0x01eeb736, size: 39 bytes, params: 1, frame: 4
return {width: ReactNativeModule.View * env0_14, height: ReactNativeModule.ScrollView * env0_14};
}
function _fun82104() { // fn#82104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2406, offset: 0x01eeb736, size: 39 bytes, params: 1, frame: 4
return {width: ReactNativeModule.View * env0_14, height: ReactNativeModule.ScrollView * env0_14};
}
function _fun82105() { // fn#82105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2462, offset: 0x01eeb75d, size: 147 bytes, params: 1, frame: 15
let Math = global.Math;
const value3 = Math.min(ReactNativeModule.View * env0_14, env0_1);
Math = global.Math;
const value5 = Math.min(ReactNativeModule.ScrollView * env0_14, env0_3);
return {position: 'absolute', left: (env0_1 - value3) / 2, top: (env0_3 - value5) / 2, width: value3,
height: value5, alignItems: 'center', justifyContent: 'center', overflow: 'hidden'};
}
function _fun82106() { // fn#82106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2671, offset: 0x01eeb7f0, size: 23 bytes, params: 1, frame: 3
return {width: env0_1, height: env0_3};
}
function _fun82107() { // fn#82107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2718, offset: 0x01eeb807, size: 126 bytes, params: 1, frame: 15
let Math = global.Math;
const value3 = Math.min(ReactNativeModule.ScrollView * env0_14, env0_3);
Math = global.Math;
return {position: 'absolute', top: env0_3 / 2 - value3 / 2,
right: env0_1 / 2 - Math.min(ReactNativeModule.View * env0_14, env0_1) / 2};
}
}
}
function _fun82103() { // fn#82103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2350, offset: 0x01eeb736, size: 39 bytes, params: 1, frame: 4
return {width: env0_5 * env0_14, height: env0_7 * env0_14};
}
function _fun82105() { // fn#82105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2462, offset: 0x01eeb75d, size: 147 bytes, params: 1, frame: 15
let Math = global.Math;
const value3 = Math.min(env0_5 * env0_14, env0_1);
Math = global.Math;
const value5 = Math.min(env0_7 * env0_14, env0_3);
return {position: 'absolute', left: (env0_1 - value3) / 2, top: (env0_3 - value5) / 2, width: value3,
height: value5, alignItems: 'center', justifyContent: 'center', overflow: 'hidden'};
}
function _fun82106() { // fn#82106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2671, offset: 0x01eeb7f0, size: 23 bytes, params: 1, frame: 3
return {width: env0_1, height: env0_3};
}
function _fun82107() { // fn#82107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:2718, offset: 0x01eeb807, size: 126 bytes, params: 1, frame: 15
let Math = global.Math;
const value3 = Math.min(env0_7 * env0_14, env0_3);
Math = global.Math;
return {position: 'absolute', top: env0_3 / 2 - value3 / 2,
right: env0_1 / 2 - Math.min(env0_5 * env0_14, env0_1) / 2};
}
function _fun82098() { // fn#82098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10863:1732, offset: 0x01eeb52b, size: 58 bytes, params: 1, frame: 15
var value2;
if (env1_11.current != null) {
value2 = environment.__proto__.__proto__;
resetIOSScrollZoom(env1_11.current, width, height);
}
}
global.__d(_fun82091, 10677, [57, 31, 27, 33, 4501, 10678, 10679, 10681, 1478, 477, 7717, 10686, 9944, 10687, 4017,
2]) /* metro module 10677, dependencies: [57, 31, 27, 33, 4501, 10678, 10679, 10681, 1478, 477, 7717, 10686, 9944, 10687, 4017, 2] */;
@@ -1,4 +1,9 @@
/* Metro module 12083; source: modules/video_calls/native/components/useModalPanGesture.tsx; dependencies: [4017, 5321, 4577, 5080, 2] */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
function _fun92848(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:6, offset: 0x0209b67f, size: 167 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
@@ -7,168 +12,167 @@ function _fun92848(global, require, importDefault, importAll, module, exports, d
object = {code: 'function useModalPanGestureTsx2({translationY:translationY}){const{translateY,interpolate,start,maxTranslate,Extrapolate}=this.__closure;translateY.set(interpolate(start.get().y+translationY,[0,maxTranslate],[0,maxTranslate],Extrapolate.CLAMP));}'};
object = {code: 'function useModalPanGestureTsx3(){const{onStart,runOnJS,start,translateY}=this.__closure;if(onStart!=null){runOnJS(onStart)();}start.set({y:translateY.get()});}'};
object = {code: 'function useModalPanGestureTsx4(){const{runOnJS,ModalActionCreators}=this.__closure;runOnJS(ModalActionCreators.pop)();}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/useModalPanGesture.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/useModalPanGesture.tsx');
exports.default = useModalPanGesture;
}
function useModalPanGesture({thresholdVelocity, gestureEnabled, maxTranslate, thresholdTranslate, height, translateY, onStart, onEnd, onClose}) { // fn#92849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:1409, offset: 0x0209b726, size: 573 bytes, params: 2, frame: 27
var object2;
thresholdVelocity = thresholdVelocity === undefined ? 500 : thresholdVelocity;
const env0_3 = height;
const env0_4 = translateY;
const env0_5 = onStart;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({y: 0});
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value4 = Gesture.Pan().enabled(gestureEnabled);
const onStart2 = value4.onStart;
let closure = useModalPanGestureJ;
object2 = {onStart: onStart};
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.runOnJS = runOnJS;
object2.start = value2;
object2.translateY = translateY;
closure.__closure = object2;
closure.__workletHash = 15847989720945;
closure.__initData = env0_5;
const value5 = Reflect.apply(onStart2, value4, [closure]);
const onUpdate = value5.onUpdate;
closure = useModalPanGestureX;
object2 = {translateY: translateY};
object2.interpolate = (require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate;
object2.start = value2;
object2.maxTranslate = maxTranslate;
const Extrapolate = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolate;
object2.Extrapolate = Extrapolate;
closure.__closure = object2;
closure.__workletHash = 6809176231356;
closure.__initData = env0_4;
const value6 = Reflect.apply(onUpdate, value5, [closure]);
const onEnd2 = value6.onEnd;
closure = useModalPanGestureO;
object2 = {translateY: translateY, thresholdTranslate: thresholdTranslate, thresholdVelocity: thresholdVelocity};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.height = height;
object2.runOnJS = runOnJS;
object2.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
object2.onClose = onClose;
object2.onEnd = onEnd;
closure.__closure = object2;
closure.__workletHash = 16881029664873;
closure.__initData = env0_3;
let value = Reflect.apply(onEnd2, value6, [closure]);
value = value.failOffsetY(-0.01);
return value.activeOffsetY([-5, 15]);
}
function useModalPanGestureJ() { // fn#92850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:1660, owner: useModalPanGesture.J, offset: 0x0209b963, size: 92 bytes, params: 1, frame: 13
var value2;
var moduleValue;
if (onStart != null) {
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(onStart)();
}
const binding = env0_8;
const set = binding.set;
const object2 = {};
object2.y = translateY.get();
Reflect.apply(set, binding, [object2]);
}
function useModalPanGestureX({translationY}) { // fn#92851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:1851, owner: useModalPanGesture.x, offset: 0x0209b9bf, size: 149 bytes, params: 2, frame: 23
const translateYBinding = translateY;
const set = translateYBinding.set;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolate = reanimatedRexportModule.interpolate;
const binding = env0_8;
const get = binding.get;
const value3 = Reflect.apply(get, binding, []).y + translationY;
const maxTranslateBinding = maxTranslate;
const items3 = [0];
items3[1] = maxTranslateBinding;
const items2 = [0];
items2[1] = maxTranslateBinding;
const Extrapolate = reanimatedRexportModule.Extrapolate;
const CLAMP = Extrapolate.CLAMP;
Reflect.apply(set, translateYBinding, [Reflect.apply(interpolate, reanimatedRexportModule, [value3, items3, items2,
CLAMP])]);
}
function useModalPanGestureO({velocityY}) { // fn#92852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:2129, owner: useModalPanGesture.O, offset: 0x0209ba54, size: 372 bytes, params: 2, frame: 26
var environment;
var set;
var value3;
var moduleValue;
var withSpring;
var value4;
var moduleValue2;
var heightBinding;
var closure;
var object3;
var moduleValue3;
var value5;
var moduleValue4;
const object4 = {'damping': 15, 'mass': 1, 'stiffness': 250, 'overshootClamping': true, 'restSpeedThreshold': 0.001,
'restDisplacementThreshold': 0.001};
object4.velocity = velocityY;
if (translateY.get() >= thresholdTranslate) {
translateYBinding = translateY;
set = translateYBinding.set;
value4 = environment.__proto__;
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
withSpring = moduleValue2.withSpring;
heightBinding = height;
closure = function() {
require(dependencyMap[0]).runOnJS(importDefault(dependencyMap[3]).pop)();
};
object3 = {};
object3.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object3.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
closure.__closure = object3;
closure.__workletHash = 14223008059411;
closure.__initData = env1_6;
Reflect.apply(set, translateYBinding, [Reflect.apply(withSpring, moduleValue2, [heightBinding, object4,
'respect-motion-settings', closure])]);
if (onClose != null) {
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue3.runOnJS(onClose)();
function useModalPanGesture({thresholdVelocity, gestureEnabled, maxTranslate, thresholdTranslate, height, translateY, onStart, onEnd, onClose}) { // fn#92849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:1409, offset: 0x0209b726, size: 573 bytes, params: 2, frame: 27
thresholdVelocity = thresholdVelocity === undefined ? 500 : thresholdVelocity;
const height2 = height;
const translateY2 = translateY;
const onStart3 = onStart;
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue({y: 0});
const Gesture = (Module05321Module).Gesture;
const value4 = Gesture.Pan().enabled(gestureEnabled);
const onStart2 = value4.onStart;
let closure = useModalPanGestureJ;
object = {onStart: onStart};
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.runOnJS = runOnJS;
object.start = value2;
object.translateY = translateY;
closure.__closure = object;
closure.__workletHash = 15847989720945;
closure.__initData = onStart3;
const value5 = Reflect.apply(onStart2, value4, [closure]);
const onUpdate = value5.onUpdate;
closure = useModalPanGestureX;
object = {translateY: translateY};
object.interpolate = (require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate;
object.start = value2;
object.maxTranslate = maxTranslate;
const Extrapolate = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolate;
object.Extrapolate = Extrapolate;
closure.__closure = object;
closure.__workletHash = 6809176231356;
closure.__initData = translateY2;
const value6 = Reflect.apply(onUpdate, value5, [closure]);
const onEnd2 = value6.onEnd;
closure = useModalPanGestureO;
object = {translateY: translateY, thresholdTranslate: thresholdTranslate, thresholdVelocity: thresholdVelocity};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.height = height;
object.runOnJS = runOnJS;
object.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
object.onClose = onClose;
object.onEnd = onEnd;
closure.__closure = object;
closure.__workletHash = 16881029664873;
closure.__initData = height2;
let value = Reflect.apply(onEnd2, value6, [closure]);
value = value.failOffsetY(-0.01);
return value.activeOffsetY([-5, 15]);
function useModalPanGestureJ() { // fn#92850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:1660, owner: useModalPanGesture.J, offset: 0x0209b963, size: 92 bytes, params: 1, frame: 13
var value2;
var moduleValue;
if (onStart != null) {
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(onStart)();
}
const binding = env0_8;
const set = binding.set;
const object = {};
object.y = translateY.get();
Reflect.apply(set, binding, [object]);
}
} else if (velocityY >= thresholdVelocity) {
translateYBinding = translateY;
set = translateYBinding.set;
value4 = environment.__proto__;
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
withSpring = moduleValue2.withSpring;
heightBinding = height;
closure = ON;
object3 = {};
object3.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object3.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
closure.__closure = object3;
closure.__workletHash = 14223008059411;
closure.__initData = env1_6;
Reflect.apply(set, translateYBinding, [Reflect.apply(withSpring, moduleValue2, [heightBinding, object4,
'respect-motion-settings', closure])]);
if (onClose != null) {
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue3.runOnJS(onClose)();
function useModalPanGestureX({translationY}) { // fn#92851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:1851, owner: useModalPanGesture.x, offset: 0x0209b9bf, size: 149 bytes, params: 2, frame: 23
const translateYBinding = translateY;
const set = translateYBinding.set;
const interpolate = ReanimatedRexportModule.interpolate;
const binding = env0_8;
const get = binding.get;
const value3 = Reflect.apply(get, binding, []).y + translationY;
const maxTranslateBinding = maxTranslate;
const items3 = [0];
items3[1] = maxTranslateBinding;
const items2 = [0];
items2[1] = maxTranslateBinding;
const Extrapolate = ReanimatedRexportModule.Extrapolate;
const CLAMP = Extrapolate.CLAMP;
Reflect.apply(set, translateYBinding, [Reflect.apply(interpolate, ReanimatedRexportModule, [value3, items3, items2,
CLAMP])]);
}
} else {
translateYBinding = translateY;
set = translateYBinding.set;
value3 = environment.__proto__;
moduleValue = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, translateYBinding, [moduleValue.withSpring(0, object4)]);
}
if (onEnd != null) {
value5 = environment.__proto__;
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue4.runOnJS(onEnd)();
function useModalPanGestureO({velocityY}) { // fn#92852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:2129, owner: useModalPanGesture.O, offset: 0x0209ba54, size: 372 bytes, params: 2, frame: 26
var environment;
var set;
var value3;
var moduleValue;
var withSpring;
var value4;
var moduleValue2;
var heightBinding;
var closure;
var object;
var moduleValue3;
var value5;
var moduleValue4;
const object2 = {'damping': 15, 'mass': 1, 'stiffness': 250, 'overshootClamping': true, 'restSpeedThreshold': 0.001,
'restDisplacementThreshold': 0.001};
object2.velocity = velocityY;
if (translateY.get() >= thresholdTranslate) {
translateYBinding = translateY;
set = translateYBinding.set;
value4 = environment.__proto__;
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
withSpring = moduleValue2.withSpring;
heightBinding = height;
closure = function() {
require(dependencyMap[0]).runOnJS(importDefault(dependencyMap[3]).pop)();
};
object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
closure.__closure = object;
closure.__workletHash = 14223008059411;
closure.__initData = env1_6;
Reflect.apply(set, translateYBinding, [Reflect.apply(withSpring, moduleValue2, [heightBinding, object2,
'respect-motion-settings', closure])]);
if (onClose != null) {
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue3.runOnJS(onClose)();
}
} else if (velocityY >= thresholdVelocity) {
translateYBinding = translateY;
set = translateYBinding.set;
value4 = environment.__proto__;
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
withSpring = moduleValue2.withSpring;
heightBinding = height;
closure = ON;
object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.ModalActionCreators = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
closure.__closure = object;
closure.__workletHash = 14223008059411;
closure.__initData = env1_6;
Reflect.apply(set, translateYBinding, [Reflect.apply(withSpring, moduleValue2, [heightBinding, object2,
'respect-motion-settings', closure])]);
if (onClose != null) {
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue3.runOnJS(onClose)();
}
} else {
translateYBinding = translateY;
set = translateYBinding.set;
value3 = environment.__proto__;
moduleValue = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, translateYBinding, [moduleValue.withSpring(0, object2)]);
}
if (onEnd != null) {
value5 = environment.__proto__;
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue4.runOnJS(onEnd)();
}
function ON() { // fn#92853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:2359, owner: useModalPanGesture.O.n, offset: 0x0209bbc8, size: 62 bytes, params: 1, frame: 14
ReanimatedRexportModule.runOnJS((ModalActionCreators).pop)();
}
}
}
}
function ON() { // fn#92853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12269:2359, owner: useModalPanGesture.O.n, offset: 0x0209bbc8, size: 62 bytes, params: 1, frame: 14
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
reanimatedRexportModule.runOnJS((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop)();
}
global.__d(_fun92848, 12083, [4017, 5321, 4577, 5080,
2]) /* metro module 12083, dependencies: [4017, 5321, 4577, 5080, 2] */;
@@ -1,47 +1,174 @@
/* Metro module 7736; source: modules/video_calls/native/components/usePipDimensions.tsx; dependencies: [31, 7737, 1478, 7717, 2] */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as DeviceOrientationModule from '../../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
import * as UseIsViewingActivityModule from '../../../activities/native/useIsViewingActivity.tsx'; /* Metro dependency 7737 */
function _fun61929(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7914:6, offset: 0x01b4eb76, size: 119 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/usePipDimensions.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/usePipDimensions.tsx');
exports.default = usePipDimensions;
}
function usePipDimensions({channelId, forcedOrientation}) { // fn#61930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7914:216, offset: 0x01b4ebed, size: 164 bytes, params: 2, frame: 18
forcedOrientation = forcedOrientation === undefined ? null : forcedOrientation;
const value2 = (require(7737) /* metro dependency 7737: useIsViewingActivity */).useIsViewingActivity({channelId: channelId});
const {width, height} = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)();
return height.useMemo(_fun61931, [height, width, forcedOrientation, value2]);
}
function _fun61931() { // fn#61931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7914:383, offset: 0x01b4ec91, size: 425 bytes, params: 1, frame: 18
var r1;
var r3;
var r2;
var Math;
var value8;
var value10;
var value12;
var value;
const value2 = width > height;
const forcedOrientationBinding = forcedOrientation;
const OrientationType = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType;
const LANDSCAPE = OrientationType.LANDSCAPE;
const r4 = forcedOrientationBinding === LANDSCAPE || value2 && forcedOrientation !== OrientationType.PORTRAIT;
const value6 = 96;
if (env0_1) {
r1 = value6;
r2 = value6;
} else if (value2) {
if (value2) {
if (value2) {
if (r4) {
function usePipDimensions({channelId, forcedOrientation}) { // fn#61930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7914:216, offset: 0x01b4ebed, size: 164 bytes, params: 2, frame: 18
forcedOrientation = forcedOrientation === undefined ? null : forcedOrientation;
const value2 = (UseIsViewingActivityModule).useIsViewingActivity({channelId: channelId});
const {width, height} = (UseWindowDimensionsNative)();
return height.useMemo(_fun61931, [height, width, forcedOrientation, value2]);
function _fun61931() { // fn#61931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7914:383, offset: 0x01b4ec91, size: 425 bytes, params: 1, frame: 18
var r1;
var r3;
var r2;
var Math;
var value8;
var value10;
var value12;
var value;
const value2 = width > height;
const forcedOrientationBinding = forcedOrientation;
const OrientationType = (DeviceOrientationModule).OrientationType;
const LANDSCAPE = OrientationType.LANDSCAPE;
const r4 = forcedOrientationBinding === LANDSCAPE || value2 && forcedOrientation !== OrientationType.PORTRAIT;
const value6 = 96;
if (env0_1) {
r1 = value6;
r2 = value6;
} else if (value2) {
if (value2) {
if (value2) {
if (r4) {
Math = global.Math;
value = Math.min(0.25 * width, 400);
value12 = value * 0.5625;
r1 = value;
r2 = value12;
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else if (r4) {
Math = global.Math;
value = Math.min(0.25 * width, 400);
value12 = value * 0.5625;
value = Math.min(0.5 * width, 400);
value8 = value * 0.5625;
r1 = value;
r2 = value12;
r2 = value8;
} else if (value2) {
if (r4) {
Math = global.Math;
value = Math.min(0.25 * width, 400);
value12 = value * 0.5625;
r1 = value;
r2 = value12;
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else if (r4) {
if (value2) {
if (value2) {
if (r4) {
Math = global.Math;
value = Math.min(0.25 * width, 400);
value12 = value * 0.5625;
r1 = value;
r2 = value12;
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else if (r4) {
Math = global.Math;
value = Math.min(0.5 * width, 400);
value8 = value * 0.5625;
r1 = value;
r2 = value8;
} else if (value2) {
if (r4) {
Math = global.Math;
value = Math.min(0.25 * width, 400);
value12 = value * 0.5625;
r1 = value;
r2 = value12;
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else {
r3 = value2 && !r4;
value10 = 1;
@@ -56,137 +183,17 @@ function _fun61931() { // fn#61931, source: /ci/build/discord/discord/discord_an
}
}
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else if (r4) {
Math = global.Math;
value = Math.min(0.5 * width, 400);
value8 = value * 0.5625;
r1 = value;
r2 = value8;
} else if (value2) {
if (r4) {
Math = global.Math;
value = Math.min(0.25 * width, 400);
value12 = value * 0.5625;
r1 = value;
r2 = value12;
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
value = Math.min(0.25 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
return {height: r2, width: r1};
}
} else if (r4) {
if (value2) {
if (value2) {
if (r4) {
Math = global.Math;
value = Math.min(0.25 * width, 400);
value12 = value * 0.5625;
r1 = value;
r2 = value12;
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else if (r4) {
Math = global.Math;
value = Math.min(0.5 * width, 400);
value8 = value * 0.5625;
r1 = value;
r2 = value8;
} else if (value2) {
if (r4) {
Math = global.Math;
value = Math.min(0.25 * width, 400);
value12 = value * 0.5625;
r1 = value;
r2 = value12;
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else {
r3 = value2 && !r4;
value10 = 1;
if (r3) {
Math = global.Math;
value = Math.min(0.5 * height, 300);
r1 = value * 0.5625;
r2 = value;
} else {
r1 = value10;
r2 = value10;
}
}
} else {
Math = global.Math;
value = Math.min(0.25 * height, 300);
r1 = value * 0.5625;
r2 = value;
}
return {height: r2, width: r1};
}
global.__d(_fun61929, 7736, [31, 7737, 1478, 7717,
2]) /* metro module 7736, dependencies: [31, 7737, 1478, 7717, 2] */;
@@ -1,30 +1,33 @@
/* Metro module 7731; source: modules/video_calls/native/components/usePipPosition.tsx; dependencies: [57, 31, 587, 7732, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as StorageModule from '../../../../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
function _fun61892(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7909:6, offset: 0x01b4d345, size: 131 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/usePipPosition.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/usePipPosition.tsx');
exports.default = usePipPosition;
function usePipPosition() { // fn#61893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7909:242, offset: 0x01b4d3c8, size: 90 bytes, params: 1, frame: 15
const value = Module00057(ReactModule.useState(function() {
var Storage = require(dependencyMap[2]).Storage;
var DEFAULT_PIP_POSITION = require(dependencyMap[3]).DEFAULT_PIP_POSITION;
return Storage.get('CameraPreviewPosition', DEFAULT_PIP_POSITION);
}), 2);
const property = value[0];
const env0_0 = value[1];
const useCallback = ReactModule.useCallback;
return [property, Reflect.apply(useCallback, ReactModule, [_fun61895, []])];
function _fun61895(a0) { // fn#61895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7909:391, offset: 0x01b4d466, size: 65 bytes, params: 2, frame: 14
const Storage = (StorageModule).Storage;
Storage.set('CameraPreviewPosition', a0);
env0_0(a0);
}
}
}
function usePipPosition() { // fn#61893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7909:242, offset: 0x01b4d3c8, size: 90 bytes, params: 1, frame: 15
const binding = env0_3;
const value = env0_2(binding.useState(function() {
var Storage = require(dependencyMap[2]).Storage;
var DEFAULT_PIP_POSITION = require(dependencyMap[3]).DEFAULT_PIP_POSITION;
return Storage.get('CameraPreviewPosition', DEFAULT_PIP_POSITION);
}), 2);
const property = value[0];
const env0_0 = value[1];
const useCallback = binding.useCallback;
return [property, Reflect.apply(useCallback, binding, [_fun61895, []])];
}
function _fun61895(a0) { // fn#61895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7909:391, offset: 0x01b4d466, size: 65 bytes, params: 2, frame: 14
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set('CameraPreviewPosition', a0);
env0_0(a0);
}
global.__d(_fun61892, 7731, [57, 31, 587, 7732, 2]) /* metro module 7731, dependencies: [57, 31, 587, 7732, 2] */;
@@ -1,46 +1,81 @@
/* Metro module 7733; source: modules/video_calls/native/components/useShouldForcePipOrientation.tsx; dependencies: [1378, 4606, 1226, 4237, 4299, 7734, 566, 4610, 7717, 2] */
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import EmbeddedActivitiesStore from '../../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelRTCStore from '../../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import UsePipVideoOrStream from '../usePipVideoOrStream.tsx'; /* Metro dependency 7734 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../activities/Constants.tsx'; /* Metro dependency 4237 */
import * as CallConstantsModule from '../../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
import * as DeviceOrientationModule from '../../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */
function _fun61902(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7911:6, offset: 0x01b4da45, size: 202 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_6 = (require(4237) /* metro dependency 4237: Constants */).OrientationLockState;
const callConstantsModule = require(4299) /* metro dependency 4299: CallConstants */;
const env0_7 = callConstantsModule.isStreamParticipant;
const env0_8 = callConstantsModule.ParticipantTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/components/useShouldForcePipOrientation.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/components/useShouldForcePipOrientation.tsx');
exports.useShouldForcePipOrientation = useShouldForcePipOrientation;
}
function useShouldForcePipOrientation({channel}) { // fn#61903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7911:347, offset: 0x01b4db0f, size: 396 bytes, params: 2, frame: 21
var PORTRAIT;
var r1;
const OrientationType = (require(7717) /* metro dependency 7717: DeviceOrientation */).OrientationType;
const value2 = (importDefault(7734) /* metro dependency 7734: usePipVideoOrStream */)(channel.id);
let value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
AuthenticationStore], function() {
var value3 = ChannelRTCStore.getParticipant(channel.id, AuthenticationStore.getId());
var value4 = null;
return value4 != value3 ? value3.type !== ParticipantTypes.USER ? value4 : value4 != value3.streamId ? value3 : value4 : value4;
});
const {focusedEmbeddedActivityParticipant,
activityLockOrientation} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([EmbeddedActivitiesStore,
ChannelRTCStore], _fun61905);
const r3 = value2 != null ? value2.user.id === AuthenticationStore.getId() ? null : value2 : null;
let r0 = focusedEmbeddedActivityParticipant ?? r3;
if (r0 == null) {
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
r1 = OrientationType.LANDSCAPE;
} else {
PORTRAIT = OrientationLockState.PORTRAIT;
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
r1 = PORTRAIT;
}
r0 = r1;
} else if (isStreamParticipant(r0)) {
if (value3 != null) {
function useShouldForcePipOrientation({channel}) { // fn#61903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7911:347, offset: 0x01b4db0f, size: 396 bytes, params: 2, frame: 21
var PORTRAIT;
var r1;
const OrientationType = (DeviceOrientationModule).OrientationType;
const value2 = (UsePipVideoOrStream)(channel.id);
const useStateFromStores = FluxModule.useStateFromStores;
const channelRTCStoreBinding = ChannelRTCStore;
let value3 = Reflect.apply(useStateFromStores, FluxModule, [[channelRTCStoreBinding, AuthenticationStore],
function() {
var value3 = ChannelRTCStore.getParticipant(channel.id, AuthenticationStore.getId());
var value4 = null;
return value4 != value3 ? value3.type !== ParticipantTypes.USER ? value4 : value4 != value3.streamId ? value3 : value4 : value4;
}]);
const {focusedEmbeddedActivityParticipant,
activityLockOrientation} = FluxModule.useStateFromStoresObject([EmbeddedActivitiesStore,
channelRTCStoreBinding], _fun61905);
const r3 = value2 != null ? value2.user.id === AuthenticationStore.getId() ? null : value2 : null;
let r0 = focusedEmbeddedActivityParticipant ?? r3;
if (r0 == null) {
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
r1 = OrientationType.LANDSCAPE;
} else {
PORTRAIT = OrientationLockState.PORTRAIT;
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
r1 = PORTRAIT;
}
r0 = r1;
} else if (isStreamParticipant(r0)) {
if (value3 != null) {
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
r1 = OrientationType.LANDSCAPE;
} else {
PORTRAIT = OrientationLockState.PORTRAIT;
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
r1 = PORTRAIT;
}
r0 = r1;
} else if (r3 == null) {
r0 = OrientationType.LANDSCAPE;
} else if (r3.id !== r0.id) {
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
r1 = OrientationType.LANDSCAPE;
} else {
PORTRAIT = OrientationLockState.PORTRAIT;
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
r1 = PORTRAIT;
}
r0 = r1;
} else {
r0 = OrientationType.LANDSCAPE;
}
} else if (activityLockOrientation !== OrientationLockState.LANDSCAPE) {
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
r1 = OrientationType.LANDSCAPE;
} else {
PORTRAIT = OrientationLockState.PORTRAIT;
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
r1 = PORTRAIT;
}
r0 = r1;
} else if (value3 != null) {
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
r1 = OrientationType.LANDSCAPE;
} else {
@@ -63,60 +98,33 @@ function useShouldForcePipOrientation({channel}) { // fn#61903, source: /ci/buil
} else {
r0 = OrientationType.LANDSCAPE;
}
} else if (activityLockOrientation !== OrientationLockState.LANDSCAPE) {
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
r1 = OrientationType.LANDSCAPE;
} else {
PORTRAIT = OrientationLockState.PORTRAIT;
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
r1 = PORTRAIT;
return r0;
function _fun61905() { // fn#61905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7911:600, offset: 0x01b4dcfc, size: 190 bytes, params: 1, frame: 19
var r4;
var moduleValue;
const value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
const channelRTCStoreBinding = ChannelRTCStore;
const getSelectedParticipant = channelRTCStoreBinding.getSelectedParticipant;
let id = channel.id;
const value4 = Reflect.apply(getSelectedParticipant, channelRTCStoreBinding, [id]);
const value5 = null;
const value6 = undefined;
if (value5 != (value5 == currentEmbeddedActivity ? value6 : currentEmbeddedActivity.applicationId)) {
id = value5 == value4 ? value6 : value4.id;
moduleValue = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
r4 = id !== moduleValue.getEmbeddedActivityParticipantId({applicationId: currentEmbeddedActivity.applicationId,
instanceId: currentEmbeddedActivity.compositeInstanceId}) ? value5 : value4;
} else {
r4 = value5;
}
return {focusedEmbeddedActivityParticipant: r4,
activityLockOrientation: value5 == currentEmbeddedActivity ? value5 : EmbeddedActivitiesStore.getPipOrientationLockStateForApp(currentEmbeddedActivity.applicationId)};
}
r0 = r1;
} else if (value3 != null) {
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
r1 = OrientationType.LANDSCAPE;
} else {
PORTRAIT = OrientationLockState.PORTRAIT;
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
r1 = PORTRAIT;
}
r0 = r1;
} else if (r3 == null) {
r0 = OrientationType.LANDSCAPE;
} else if (r3.id !== r0.id) {
if (activityLockOrientation === OrientationLockState.LANDSCAPE) {
r1 = OrientationType.LANDSCAPE;
} else {
PORTRAIT = OrientationLockState.PORTRAIT;
PORTRAIT = activityLockOrientation !== PORTRAIT ? null : OrientationType.PORTRAIT;
r1 = PORTRAIT;
}
r0 = r1;
} else {
r0 = OrientationType.LANDSCAPE;
}
return r0;
}
function _fun61905() { // fn#61905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7911:600, offset: 0x01b4dcfc, size: 190 bytes, params: 1, frame: 19
var r4;
var moduleValue;
const value = environment.__proto__;
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
const getSelectedParticipant = ChannelRTCStore.getSelectedParticipant;
let id = channel.id;
const value4 = Reflect.apply(getSelectedParticipant, ChannelRTCStore, [id]);
const value5 = null;
const value6 = undefined;
if (value5 != (value5 == currentEmbeddedActivity ? value6 : currentEmbeddedActivity.applicationId)) {
id = value5 == value4 ? value6 : value4.id;
moduleValue = require(4610) /* metro dependency 4610: ChannelRTCParticipants */;
r4 = id !== moduleValue.getEmbeddedActivityParticipantId({applicationId: currentEmbeddedActivity.applicationId,
instanceId: currentEmbeddedActivity.compositeInstanceId}) ? value5 : value4;
} else {
r4 = value5;
}
return {focusedEmbeddedActivityParticipant: r4,
activityLockOrientation: value5 == currentEmbeddedActivity ? value5 : EmbeddedActivitiesStore.getPipOrientationLockStateForApp(currentEmbeddedActivity.applicationId)};
}
global.__d(_fun61902, 7733, [1378, 4606, 1226, 4237, 4299, 7734, 566, 4610, 7717,
2]) /* metro module 7733, dependencies: [1378, 4606, 1226, 4237, 4299, 7734, 566, 4610, 7717, 2] */;
@@ -1,25 +1,30 @@
/* Metro module 7740; source: modules/video_calls/native/useActionBarHeight.tsx; dependencies: [4259, 661, 6276, 7741, 7856, 10659, 566, 2] */
import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as CallBarActionModule from './components/CallBarAction.tsx'; /* Metro dependency 7741 */
function _fun61960(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7918:6, offset: 0x01b4ff51, size: 230 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).InputModes;
const env0_5 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_HANDLE_SPACING;
const SMALL_ACTION_BUTTON_DIMENSIONS = (require(7741) /* metro dependency 7741: CallBarAction */).SMALL_ACTION_BUTTON_DIMENSIONS;
const SMALL_ACTION_BUTTON_DIMENSIONS = (CallBarActionModule).SMALL_ACTION_BUTTON_DIMENSIONS;
const value = 2 * SMALL_ACTION_BUTTON_DIMENSIONS.buttonRadius + 16 + 16;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useActionBarHeight.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useActionBarHeight.tsx');
exports.default = _default_61961;
exports.CALL_ACTION_BAR_HEIGHT = 88;
exports.FIVE_BUTTON_CONTAINER_PADDING_TOP = 16;
exports.FIVE_BUTTON_CONTAINER_PADDING_BOTTOM = 16;
exports.FIVE_BUTTON_LAYOUT_ACTION_BAR_HEIGHT = value;
function _default_61961(a0) { // fn#61961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7918:236, offset: 0x01b50037, size: 139 bytes, params: 2, frame: 17
return ((require(7856) /* metro dependency 7856: useIsFiveButtonLayout */).useIsFiveButtonLayout(a0) ? env0_6 : 88) + ACTION_SHEET_HANDLE_SPACING + ((require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore],
function() {
return MediaEngineStore.getMode() === InputModes.PUSH_TO_TALK;
}) && (importDefault(10659) /* metro dependency 10659: useCanSpeakInChannel */)(a0) ? 56 : 0);
}
}
function _default_61961(a0) { // fn#61961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7918:236, offset: 0x01b50037, size: 139 bytes, params: 2, frame: 17
return ((require(7856) /* metro dependency 7856: useIsFiveButtonLayout */).useIsFiveButtonLayout(a0) ? env0_6 : 88) + ACTION_SHEET_HANDLE_SPACING + ((require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore],
function() {
return MediaEngineStore.getMode() === InputModes.PUSH_TO_TALK;
}) && (importDefault(10659) /* metro dependency 10659: useCanSpeakInChannel */)(a0) ? 56 : 0);
}
global.__d(_fun61960, 7740, [4259, 661, 6276, 7741, 7856, 10659, 566,
2]) /* metro module 7740, dependencies: [4259, 661, 6276, 7741, 7856, 10659, 566, 2] */;
@@ -1,14 +1,15 @@
/* Metro module 7742; source: modules/video_calls/native/useBottomVoiceControlsSheetWidth.tsx; dependencies: [7716, 1478, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ChannelCallConstantsModule from './ChannelCallConstants.tsx'; /* Metro dependency 7716 */
function _fun61969(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7920:6, offset: 0x01b50904, size: 128 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelCallConstantsModule = require(7716) /* metro dependency 7716: ChannelCallConstants */;
const env0_2 = channelCallConstantsModule.BOX_MODE_ACTIONSHEET_WIDTH;
const env0_3 = channelCallConstantsModule.BOX_MODE_THRESHOLD_WIDTH;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useBottomVoiceControlsSheetWidth.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useBottomVoiceControlsSheetWidth.tsx');
exports.default = function() {
var width = importDefault(dependencyMap[1])().width;
return width > BOX_MODE_THRESHOLD_WIDTH ? BOX_MODE_ACTIONSHEET_WIDTH : width;
};
}
global.__d(_fun61969, 7742, [7716, 1478, 2]) /* metro module 7742, dependencies: [7716, 1478, 2] */;
@@ -1,56 +1,62 @@
/* Metro module 15414; source: modules/video_calls/native/useChannelFloatingCTAContent.tsx; dependencies: [31, 4259, 4294, 632, 9324, 1365, 2] */
import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import UseGameConsoleAccounts from '../../game_console/useGameConsoleAccounts.tsx'; /* Metro dependency 9324 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
function _fun117912(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15611:6, offset: 0x024c4eba, size: 153 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useChannelFloatingCTAContent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useChannelFloatingCTAContent.tsx');
exports.default = useChannelFloatingCTAContent;
}
function useChannelFloatingCTAContent(a0) { // fn#117913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15611:229, offset: 0x024c4f53, size: 175 bytes, params: 2, frame: 19
const env0_0 = a0;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([RTCConnectionStore],
_fun117914);
const value3 = (UseGameConsoleAccounts)();
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([MediaEngineStore],
function() {
return MediaEngineStore.isAnyLocalVideoAutoDisabled();
});
return value4.useMemo(_fun117916, [value4, value3, value2]);
function _fun117914() { // fn#117914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15611:308, offset: 0x024c5002, size: 43 bytes, params: 1, frame: 11
return env0_0 != null && RTCConnectionStore.getChannelId() === env0_0;
}
function useChannelFloatingCTAContent(a0) { // fn#117913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15611:229, offset: 0x024c4f53, size: 175 bytes, params: 2, frame: 19
const env0_0 = a0;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([RTCConnectionStore],
_fun117914);
const value3 = (importDefault(9324) /* metro dependency 9324: useGameConsoleAccounts */)();
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([MediaEngineStore],
function() {
return MediaEngineStore.isAnyLocalVideoAutoDisabled();
});
return value4.useMemo(_fun117916, [value4, value3, value2]);
}
function _fun117916() { // fn#117916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15611:450, offset: 0x024c5042, size: 191 bytes, params: 1, frame: 14
var environment;
var push;
var value2;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
var value3;
const items2 = [];
if (ReactModule) {
push = items2.push;
value2 = environment.__proto__;
Reflect.apply(push, items2, [DismissibleContent.VOICE_PANEL_BAD_CONNECTION_CTA]);
}
if (env0_2) {
push = items2.push;
value3 = environment.__proto__;
Reflect.apply(push, items2, [DismissibleContent.SOUNDBOARD_MOBILE_FLOATING_CTA]);
}
const binding = env0_1;
if (binding.some(function(a0) {
return a0.twoWayLink;
})) {
push = items2.push;
value = environment.__proto__;
Reflect.apply(push, items2, [DismissibleContent.DONUT_MOBILE_NUX]);
}
return items2;
}
function _fun117914() { // fn#117914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15611:308, offset: 0x024c5002, size: 43 bytes, params: 1, frame: 11
return env0_0 != null && RTCConnectionStore.getChannelId() === env0_0;
}
function _fun117916() { // fn#117916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15611:450, offset: 0x024c5042, size: 191 bytes, params: 1, frame: 14
var environment;
var push;
var value2;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
var value3;
const items2 = [];
if (env0_3) {
push = items2.push;
value2 = environment.__proto__;
Reflect.apply(push, items2, [DismissibleContent.VOICE_PANEL_BAD_CONNECTION_CTA]);
}
if (env0_2) {
push = items2.push;
value3 = environment.__proto__;
Reflect.apply(push, items2, [DismissibleContent.SOUNDBOARD_MOBILE_FLOATING_CTA]);
}
const binding = env0_1;
if (binding.some(function(a0) {
return a0.twoWayLink;
})) {
push = items2.push;
value = environment.__proto__;
Reflect.apply(push, items2, [DismissibleContent.DONUT_MOBILE_NUX]);
}
return items2;
}
global.__d(_fun117912, 15414, [31, 4259, 4294, 632, 9324, 1365,
2]) /* metro module 15414, dependencies: [31, 4259, 4294, 632, 9324, 1365, 2] */;
@@ -1,13 +1,19 @@
/* Metro module 7738; source: modules/video_calls/native/useDraggablePip.tsx; dependencies: [57, 7715, 7722, 4017, 4504, 1305, 7739, 5321, 4577, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as SpringModule from '../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as Module05321Module from '../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as ChannelCallStoreModule from './ChannelCallStore.tsx'; /* Metro dependency 7715 */
import * as ConstantsModule from './components/Constants.tsx'; /* Metro dependency 7722 */
import * as CheapWorkletShallowEqualModule from '../../reanimated/native/cheapWorkletShallowEqual.tsx'; /* Metro dependency 7739 */
function _fun61935(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:6, offset: 0x01b4ef5b, size: 453 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = (require(7715) /* metro dependency 7715: ChannelCallStore */).useChannelCallStore;
const constantsModule = require(7722) /* metro dependency 7722: Constants */;
const env0_4 = constantsModule.PIP_FOCUS_SCALE;
const env0_5 = constantsModule.PIP_GESTURE_ACTIVE_OFFSET;
const env0_6 = {'mass': 1, 'stiffness': 250, 'overshootClamping': true, 'restSpeedThreshold': 0.001,
'restDisplacementThreshold': 0.001, 'damping': 20};
object = {code: 'function useDraggablePipTsx1(){const{withTiming,pipFocus,PIP_FOCUS_SCALE,STANDARD_EASING}=this.__closure;return withTiming(pipFocus?PIP_FOCUS_SCALE:1,{easing:STANDARD_EASING,duration:250});}'};
@@ -27,420 +33,404 @@ function _fun61935(global, require, importDefault, importAll, module, exports, d
object = {code: 'function useDraggablePipTsx15(){const{xPosition,scaledWidthDv,widthDv,yPosition,scaledHeightDv,heightDv,pipScale}=this.__closure;return{transform:[{translateX:xPosition.get()+(scaledWidthDv.get()-widthDv.get())/2},{translateY:yPosition.get()+(scaledHeightDv.get()-heightDv.get())/2},{scale:pipScale.get()}]};}'};
object = {code: 'function clamp_useDraggablePipTsx16(value,min,max){return Math.min(Math.max(value,min),max);}'};
const env0_23 = _fun61936();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useDraggablePip.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useDraggablePip.tsx');
exports.useDraggablePip = useDraggablePip;
}
function _fun61936() { // fn#61936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:4843, offset: 0x01b4f120, size: 46 bytes, params: 1, frame: 2
const closure = function(a0, a1, a2) {
var Math = global.Math;
var Math2 = global.Math;
return Math.min(Math2.max(a0, a1), a2);
};
closure.__closure = {};
closure.__workletHash = 1988116204206;
closure.__initData = env0_22;
return closure;
}
function _fun61936() { // fn#61936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:4843, offset: 0x01b4f120, size: 46 bytes, params: 1, frame: 2
const closure = function(a0, a1, a2) {
var Math = global.Math;
var Math2 = global.Math;
return Math.min(Math2.max(a0, a1), a2);
};
closure.__closure = {};
closure.__workletHash = 1988116204206;
closure.__initData = env0_22;
return closure;
}
function useDraggablePip({width, height, containerWidth, containerHeight, onPress, onMoved, snapToCorners}) { // fn#61938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:5100, offset: 0x01b4f14e, size: 1642 bytes, params: 2, frame: 39
const snapToCorners2 = snapToCorners;
const value2 = useChannelCallStore(function(a0) {
return a0.pipFocus;
});
const env0_7 = value2;
let useDerivedValue = ReanimatedRexportModule.useDerivedValue;
let closure = useDraggablePipX;
let object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.pipFocus = value2;
object.PIP_FOCUS_SCALE = PIP_FOCUS_SCALE;
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.STANDARD_EASING = STANDARD_EASING;
closure.__closure = object;
closure.__workletHash = 7848271415351;
closure.__initData = env0_7;
const value3 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const env0_8 = value3;
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = function() {
return width;
};
closure.__closure = {width: width};
closure.__workletHash = 14810909441301;
closure.__initData = env0_8;
const value4 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const env0_9 = value4;
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = function() {
return height;
};
closure.__closure = {height: height};
closure.__workletHash = 15343935194036;
closure.__initData = env0_9;
const value5 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const env0_10 = value5;
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = useDraggablePipV;
closure.__closure = {pipScale: value3, width: width};
closure.__workletHash = 3468337829868;
closure.__initData = env0_10;
const value6 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const env0_11 = value6;
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = useDraggablePipF;
closure.__closure = {pipScale: value3, height: height};
closure.__workletHash = 7163944260205;
closure.__initData = env0_11;
const value7 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const env0_12 = value7;
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = function() {
return containerWidth;
};
closure.__closure = {containerWidth: containerWidth};
closure.__workletHash = 13449836478609;
closure.__initData = env0_12;
const value8 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const env0_13 = value8;
useDerivedValue = ReanimatedRexportModule.useDerivedValue;
closure = function() {
return containerHeight;
};
closure.__closure = {containerHeight: containerHeight};
closure.__workletHash = 4105281399152;
closure.__initData = env0_13;
const value9 = Reflect.apply(useDerivedValue, ReanimatedRexportModule, [closure]);
const env0_14 = value9;
let useSharedValue = ReanimatedRexportModule.useSharedValue;
const value10 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [0]);
const env0_15 = value10;
useSharedValue = ReanimatedRexportModule.useSharedValue;
let get = value10.get;
const value11 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [Reflect.apply(get, value10, [])]);
const env0_16 = value11;
const value12 = ReanimatedRexportModule.useSharedValue(0);
const env0_17 = value12;
useSharedValue = ReanimatedRexportModule.useSharedValue;
get = value12.get;
const value13 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [Reflect.apply(get, value12, [])]);
const env0_18 = value13;
const value14 = ReanimatedRexportModule.useSharedValue(false);
const env0_19 = value14;
let useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = useDraggablePipJ;
closure.__closure = {containerWidth: containerWidth, scaledWidthDv: value6, xPosition: value11};
closure.__workletHash = 2741340788440;
closure.__initData = env0_14;
const useDraggablePipQ2 = useDraggablePipQ;
const cheapWorkletArrayShallowEqual = (CheapWorkletShallowEqualModule).cheapWorkletArrayShallowEqual;
const binding = env0_23;
useDraggablePipQ2.__closure = {cheapWorkletArrayShallowEqual: cheapWorkletArrayShallowEqual, clamp: binding,
xPosition: value11, xDestination: value10};
useDraggablePipQ2.__workletHash = 15748808822770;
useDraggablePipQ2.__initData = env0_15;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useDraggablePipQ2]);
useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
closure = useDraggablePipU;
closure.__closure = {containerHeight: containerHeight, scaledHeightDv: value7, yPosition: value13};
closure.__workletHash = 11475249153313;
closure.__initData = env0_16;
const useDraggablePipR2 = useDraggablePipR;
useDraggablePipR2.__closure = {cheapWorkletArrayShallowEqual: cheapWorkletArrayShallowEqual, clamp: binding,
yPosition: value13, yDestination: value12};
useDraggablePipR2.__workletHash = 7685377389843;
useDraggablePipR2.__initData = env0_17;
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useDraggablePipR2]);
const Gesture = (Module05321Module).Gesture;
const value15 = Gesture.Pan();
const value17 = value15.activeOffsetX([-PIP_GESTURE_ACTIVE_OFFSET, PIP_GESTURE_ACTIVE_OFFSET]);
const value19 = value17.activeOffsetY([-PIP_GESTURE_ACTIVE_OFFSET, PIP_GESTURE_ACTIVE_OFFSET]);
const onUpdate = value19.onUpdate;
closure = useDraggablePipAe;
object = {xPosition: value11, xDestination: value10, yPosition: value13, yDestination: value12,
trackedVoiceControlsToggleMovedForGestureSv: value14, onMoved: onMoved};
const runOnJS = ReanimatedRexportModule.runOnJS;
object.runOnJS = runOnJS;
closure.__closure = object;
closure.__workletHash = 14964390506971;
closure.__initData = env0_19;
const value20 = Reflect.apply(onUpdate, value19, [closure]);
const onEnd = value20.onEnd;
closure = se;
object = {xPosition: value11, containerWidthDv: value8, scaledWidthDv: value6, clamp: binding, yPosition: value13,
containerHeightDv: value9, scaledHeightDv: value7, snapToCorners: snapToCorners};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.spring = snapToCorners2;
object.xDestination = value10;
object.yDestination = value12;
closure.__closure = object;
closure.__workletHash = 690760681755;
closure.__initData = env0_18;
const value21 = Reflect.apply(onEnd, value20, [closure]);
const value22 = Gesture.Tap();
const onStart = value22.onStart;
closure = useDraggablePipRe;
closure.__closure = {onPress: onPress, runOnJS: runOnJS};
closure.__workletHash = 4692146362189;
closure.__initData = env0_20;
const value23 = Reflect.apply(onStart, value22, [closure]);
object = {};
object.gesture = Gesture.Race(value21, value23);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = le;
closure.__closure = {xPosition: value11, scaledWidthDv: value6, widthDv: value4, yPosition: value13,
scaledHeightDv: value7, heightDv: value5, pipScale: value3};
closure.__workletHash = 12534173786665;
closure.__initData = env0_21;
object.draggableGridItemStyles = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
return object;
function useDraggablePipX() { // fn#61940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:5293, owner: useDraggablePip.X, offset: 0x01b4f7c3, size: 95 bytes, params: 1, frame: 17
const withTiming = TimingModule.withTiming;
const PIP_FOCUS_SCALE2 = env0_7 ? PIP_FOCUS_SCALE : 1;
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
return Reflect.apply(withTiming, TimingModule, [PIP_FOCUS_SCALE2, {easing: STANDARD_EASING, duration: 250}]);
}
function useDraggablePip({width, height, containerWidth, containerHeight, onPress, onMoved, snapToCorners}) { // fn#61938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:5100, offset: 0x01b4f14e, size: 1642 bytes, params: 2, frame: 39
const env0_6 = snapToCorners;
const value2 = useChannelCallStore(function(a0) {
return a0.pipFocus;
});
const env0_7 = value2;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
let closure = useDraggablePipX;
let object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.pipFocus = value2;
object2.PIP_FOCUS_SCALE = PIP_FOCUS_SCALE;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.STANDARD_EASING = STANDARD_EASING;
closure.__closure = object2;
closure.__workletHash = 7848271415351;
closure.__initData = env0_7;
const value3 = Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
const env0_8 = value3;
const moduleValue2 = reanimatedRexportModule;
useDerivedValue = moduleValue2.useDerivedValue;
closure = function() {
return width;
};
closure.__closure = {width: width};
closure.__workletHash = 14810909441301;
closure.__initData = env0_8;
const value4 = Reflect.apply(useDerivedValue, moduleValue2, [closure]);
const env0_9 = value4;
const moduleValue3 = reanimatedRexportModule;
useDerivedValue = moduleValue3.useDerivedValue;
closure = function() {
return height;
};
closure.__closure = {height: height};
closure.__workletHash = 15343935194036;
closure.__initData = env0_9;
const value5 = Reflect.apply(useDerivedValue, moduleValue3, [closure]);
const env0_10 = value5;
const moduleValue4 = reanimatedRexportModule;
useDerivedValue = moduleValue4.useDerivedValue;
closure = useDraggablePipV;
closure.__closure = {pipScale: value3, width: width};
closure.__workletHash = 3468337829868;
closure.__initData = env0_10;
const value6 = Reflect.apply(useDerivedValue, moduleValue4, [closure]);
const env0_11 = value6;
const moduleValue5 = reanimatedRexportModule;
useDerivedValue = moduleValue5.useDerivedValue;
closure = useDraggablePipF;
closure.__closure = {pipScale: value3, height: height};
closure.__workletHash = 7163944260205;
closure.__initData = env0_11;
const value7 = Reflect.apply(useDerivedValue, moduleValue5, [closure]);
const env0_12 = value7;
const moduleValue6 = reanimatedRexportModule;
useDerivedValue = moduleValue6.useDerivedValue;
closure = function() {
return containerWidth;
};
closure.__closure = {containerWidth: containerWidth};
closure.__workletHash = 13449836478609;
closure.__initData = env0_12;
const value8 = Reflect.apply(useDerivedValue, moduleValue6, [closure]);
const env0_13 = value8;
const moduleValue7 = reanimatedRexportModule;
useDerivedValue = moduleValue7.useDerivedValue;
closure = function() {
return containerHeight;
};
closure.__closure = {containerHeight: containerHeight};
closure.__workletHash = 4105281399152;
closure.__initData = env0_13;
const value9 = Reflect.apply(useDerivedValue, moduleValue7, [closure]);
const env0_14 = value9;
const moduleValue8 = reanimatedRexportModule;
let useSharedValue = moduleValue8.useSharedValue;
const value10 = Reflect.apply(useSharedValue, moduleValue8, [0]);
const env0_15 = value10;
const moduleValue9 = reanimatedRexportModule;
useSharedValue = moduleValue9.useSharedValue;
let get = value10.get;
const value11 = Reflect.apply(useSharedValue, moduleValue9, [Reflect.apply(get, value10, [])]);
const env0_16 = value11;
const value12 = reanimatedRexportModule.useSharedValue(0);
const env0_17 = value12;
const moduleValue11 = reanimatedRexportModule;
useSharedValue = moduleValue11.useSharedValue;
get = value12.get;
const value13 = Reflect.apply(useSharedValue, moduleValue11, [Reflect.apply(get, value12, [])]);
const env0_18 = value13;
const value14 = reanimatedRexportModule.useSharedValue(false);
const env0_19 = value14;
const moduleValue13 = reanimatedRexportModule;
let useAnimatedReaction = moduleValue13.useAnimatedReaction;
closure = useDraggablePipJ;
closure.__closure = {containerWidth: containerWidth, scaledWidthDv: value6, xPosition: value11};
closure.__workletHash = 2741340788440;
closure.__initData = env0_14;
const closure2 = useDraggablePipQ;
const cheapWorkletArrayShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletArrayShallowEqual;
const binding = env0_23;
closure2.__closure = {cheapWorkletArrayShallowEqual: cheapWorkletArrayShallowEqual, clamp: binding,
xPosition: value11, xDestination: value10};
closure2.__workletHash = 15748808822770;
closure2.__initData = env0_15;
Reflect.apply(useAnimatedReaction, moduleValue13, [closure, closure2]);
const moduleValue14 = reanimatedRexportModule;
useAnimatedReaction = moduleValue14.useAnimatedReaction;
closure = useDraggablePipU;
closure.__closure = {containerHeight: containerHeight, scaledHeightDv: value7, yPosition: value13};
closure.__workletHash = 11475249153313;
closure.__initData = env0_16;
const closure3 = useDraggablePipR;
closure3.__closure = {cheapWorkletArrayShallowEqual: cheapWorkletArrayShallowEqual, clamp: binding,
yPosition: value13, yDestination: value12};
closure3.__workletHash = 7685377389843;
closure3.__initData = env0_17;
Reflect.apply(useAnimatedReaction, moduleValue14, [closure, closure3]);
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value15 = Gesture.Pan();
const value17 = value15.activeOffsetX([-PIP_GESTURE_ACTIVE_OFFSET, PIP_GESTURE_ACTIVE_OFFSET]);
const value19 = value17.activeOffsetY([-PIP_GESTURE_ACTIVE_OFFSET, PIP_GESTURE_ACTIVE_OFFSET]);
const onUpdate = value19.onUpdate;
closure = useDraggablePipAe;
object2 = {xPosition: value11, xDestination: value10, yPosition: value13, yDestination: value12,
trackedVoiceControlsToggleMovedForGestureSv: value14, onMoved: onMoved};
const runOnJS = reanimatedRexportModule.runOnJS;
object2.runOnJS = runOnJS;
closure.__closure = object2;
closure.__workletHash = 14964390506971;
closure.__initData = env0_19;
const value20 = Reflect.apply(onUpdate, value19, [closure]);
const onEnd = value20.onEnd;
closure = useDraggablePipSe;
object2 = {xPosition: value11, containerWidthDv: value8, scaledWidthDv: value6, clamp: binding, yPosition: value13,
containerHeightDv: value9, scaledHeightDv: value7, snapToCorners: snapToCorners};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.spring = env0_6;
object2.xDestination = value10;
object2.yDestination = value12;
closure.__closure = object2;
closure.__workletHash = 690760681755;
closure.__initData = env0_18;
const value21 = Reflect.apply(onEnd, value20, [closure]);
const value22 = Gesture.Tap();
const onStart = value22.onStart;
closure = useDraggablePipRe;
closure.__closure = {onPress: onPress, runOnJS: runOnJS};
closure.__workletHash = 4692146362189;
closure.__initData = env0_20;
const value23 = Reflect.apply(onStart, value22, [closure]);
object2 = {};
object2.gesture = Gesture.Race(value21, value23);
const moduleValue15 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue15.useAnimatedStyle;
closure = useDraggablePipLe;
closure.__closure = {xPosition: value11, scaledWidthDv: value6, widthDv: value4, yPosition: value13,
scaledHeightDv: value7, heightDv: value5, pipScale: value3};
closure.__workletHash = 12534173786665;
closure.__initData = env0_21;
object2.draggableGridItemStyles = Reflect.apply(useAnimatedStyle, moduleValue15, [closure]);
return object2;
}
function useDraggablePipV() { // fn#61943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:5788, owner: useDraggablePip.V, offset: 0x01b4f822, size: 26 bytes, params: 1, frame: 10
return env0_8.get() * width;
}
function useDraggablePipX() { // fn#61940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:5293, owner: useDraggablePip.X, offset: 0x01b4f7c3, size: 95 bytes, params: 1, frame: 17
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const PIP_FOCUS_SCALE2 = env0_7 ? PIP_FOCUS_SCALE : 1;
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
return Reflect.apply(withTiming, timingModule, [PIP_FOCUS_SCALE2, {easing: STANDARD_EASING, duration: 250}]);
}
function useDraggablePipF() { // fn#61944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:5913, owner: useDraggablePip.F, offset: 0x01b4f83c, size: 26 bytes, params: 1, frame: 10
return env0_8.get() * height;
}
function useDraggablePipV() { // fn#61943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:5788, owner: useDraggablePip.V, offset: 0x01b4f822, size: 26 bytes, params: 1, frame: 10
return env0_8.get() * width;
}
function useDraggablePipJ() { // fn#61947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:6432, owner: useDraggablePip.J, offset: 0x01b4f856, size: 51 bytes, params: 1, frame: 11
const containerWidthBinding = containerWidth;
let binding = env0_11;
let get = binding.get;
const items2 = [containerWidthBinding - Reflect.apply(get, binding, [])];
binding = env0_16;
get = binding.get;
items2[1] = Reflect.apply(get, binding, []);
return items2;
}
function useDraggablePipF() { // fn#61944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:5913, owner: useDraggablePip.F, offset: 0x01b4f83c, size: 26 bytes, params: 1, frame: 10
return env0_8.get() * height;
}
function useDraggablePipQ(a0, a1) { // fn#61948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:6582, owner: useDraggablePip.q, offset: 0x01b4f889, size: 173 bytes, params: 3, frame: 21
var binding;
var value4;
var property;
var property2;
var property3;
let value = a1;
const value3 = undefined;
if (!CheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
binding = env1_2;
value4 = binding(a0, 2);
property = value4[0];
property2 = value4[1];
property3 = binding(value ?? [0, 0], 1)[0];
if (value != null) {
if (property !== property3) {
binding = env1_23;
value = binding(property2 * (property / property3), 0, property);
binding = env0_16;
binding.set(value);
binding = env0_15;
binding.set(value);
}
}
}
return value3;
}
function useDraggablePipJ() { // fn#61947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:6432, owner: useDraggablePip.J, offset: 0x01b4f856, size: 51 bytes, params: 1, frame: 11
const containerWidthBinding = containerWidth;
let binding = env0_11;
let get = binding.get;
const items2 = [containerWidthBinding - Reflect.apply(get, binding, [])];
binding = env0_16;
get = binding.get;
items2[1] = Reflect.apply(get, binding, []);
return items2;
}
function useDraggablePipU() { // fn#61949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:6974, owner: useDraggablePip.U, offset: 0x01b4f936, size: 51 bytes, params: 1, frame: 11
const containerHeightBinding = containerHeight;
let binding = env0_12;
let get = binding.get;
const items2 = [containerHeightBinding - Reflect.apply(get, binding, [])];
binding = env0_18;
get = binding.get;
items2[1] = Reflect.apply(get, binding, []);
return items2;
}
function useDraggablePipQ(a0, a1) { // fn#61948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:6582, owner: useDraggablePip.q, offset: 0x01b4f889, size: 173 bytes, params: 3, frame: 21
var binding;
var value4;
var property;
var property2;
var property3;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
if (!cheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
binding = env1_2;
value4 = binding(a0, 2);
property = value4[0];
property2 = value4[1];
property3 = binding(value ?? [0, 0], 1)[0];
if (value != null) {
if (property !== property3) {
binding = env1_23;
value = binding(property2 * (property / property3), 0, property);
binding = env0_16;
binding.set(value);
binding = env0_15;
binding.set(value);
function useDraggablePipR(a0, a1) { // fn#61950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:7126, owner: useDraggablePip.R, offset: 0x01b4f969, size: 173 bytes, params: 3, frame: 21
var binding;
var value4;
var property;
var property2;
var property3;
let value = a1;
const value3 = undefined;
if (!CheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
binding = env1_2;
value4 = binding(a0, 2);
property = value4[0];
property2 = value4[1];
property3 = binding(value ?? [0, 0], 1)[0];
if (value != null) {
if (property !== property3) {
binding = env1_23;
value = binding(property2 * (property / property3), 0, property);
binding = env0_18;
binding.set(value);
binding = env0_17;
binding.set(value);
}
}
}
return value3;
}
function useDraggablePipAe({translationX, translationY}) { // fn#61951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:7584, owner: useDraggablePip.ae, offset: 0x01b4fa16, size: 169 bytes, params: 2, frame: 14
var value4;
var moduleValue;
let binding = env0_16;
const set = binding.set;
const binding2 = env0_15;
let get = binding2.get;
Reflect.apply(set, binding, [Reflect.apply(get, binding2, []) + translationX]);
binding = env0_18;
binding.set(env0_17.get() + translationY);
binding = env0_19;
get = binding.get;
if (!Reflect.apply(get, binding, [])) {
if (onMoved != null) {
value4 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(onMoved)();
}
env0_19.set(true);
}
}
}
return value3;
}
function useDraggablePipU() { // fn#61949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:6974, owner: useDraggablePip.U, offset: 0x01b4f936, size: 51 bytes, params: 1, frame: 11
const containerHeightBinding = containerHeight;
let binding = env0_12;
let get = binding.get;
const items2 = [containerHeightBinding - Reflect.apply(get, binding, [])];
binding = env0_18;
get = binding.get;
items2[1] = Reflect.apply(get, binding, []);
return items2;
}
function se(a0) { // fn#61952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:7931, owner: useDraggablePip.se, offset: 0x01b4fabf, size: 553 bytes, params: 2, frame: 27
var r10;
var r4;
var r3;
var r11;
let binding = env0_16;
let get = binding.get;
const value3 = Reflect.apply(get, binding, []) + 0.0875 * a0.velocityX;
binding = env0_13;
const value4 = binding.get();
const binding2 = env0_11;
get = binding2.get;
const value5 = value4 - Reflect.apply(get, binding2, []);
const binding3 = env1_23;
const value7 = 0;
const value8 = binding3(value3, value7, value5);
const value10 = env0_18.get() + 0.0875 * a0.velocityY;
const binding5 = env0_14;
const value11 = binding5.get();
const binding6 = env0_12;
get = binding6.get;
const value12 = value11 - Reflect.apply(get, binding6, []);
const value13 = binding3(value10, value7, value12);
const value14 = binding5.get();
get = binding6.get;
const value15 = value14 - Reflect.apply(get, binding6, []) - value13;
const value16 = binding.get();
get = binding2.get;
const value17 = value16 - Reflect.apply(get, binding2, []) - value8;
const Math = global.Math;
const value18 = Math.min(value13, value15, value8, value17);
if (value13 === value18) {
if (snapToCorners) {
r4 = value8 < value17 ? value7 : value5;
r3 = value7;
r11 = r4;
} else {
r3 = value7;
r11 = value8;
}
} else if (value15 === value18) {
if (snapToCorners) {
r10 = value8 < value17 ? value7 : value5;
r3 = value12;
r11 = r10;
} else {
r3 = value12;
r11 = value8;
}
} else if (value8 === value18) {
if (snapToCorners) {
r3 = value13 < value15 ? value7 : value12;
r11 = value7;
} else {
r3 = value13;
r11 = value7;
}
} else if (value17 !== value18) {
r3 = value13;
r11 = value8;
} else if (snapToCorners) {
r3 = value13 < value15 ? value7 : value12;
r11 = value5;
} else {
r3 = value13;
r11 = value5;
}
binding = env0_16;
let set = binding.set;
let withSpring = SpringModule.withSpring;
let object = {};
const binding7 = env1_6;
copyDataProperties(object, binding7, value8);
object['velocity'] = a0.velocityX;
Reflect.apply(set, binding, [Reflect.apply(withSpring, SpringModule, [r11, object])]);
env0_15.set(r11);
binding = env0_18;
set = binding.set;
withSpring = SpringModule.withSpring;
object = {};
copyDataProperties(object, binding7, value8);
object['velocity'] = a0.velocityY;
Reflect.apply(set, binding, [Reflect.apply(withSpring, SpringModule, [r3, object])]);
env0_17.set(r3);
}
function useDraggablePipR(a0, a1) { // fn#61950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:7126, owner: useDraggablePip.R, offset: 0x01b4f969, size: 173 bytes, params: 3, frame: 21
var binding;
var value4;
var property;
var property2;
var property3;
let value = a1;
const value3 = undefined;
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
if (!cheapWorkletShallowEqualModule.cheapWorkletArrayShallowEqual(a0, value ?? value3)) {
binding = env1_2;
value4 = binding(a0, 2);
property = value4[0];
property2 = value4[1];
property3 = binding(value ?? [0, 0], 1)[0];
if (value != null) {
if (property !== property3) {
binding = env1_23;
value = binding(property2 * (property / property3), 0, property);
binding = env0_18;
binding.set(value);
binding = env0_17;
binding.set(value);
function useDraggablePipRe() { // fn#61953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:8699, owner: useDraggablePip.re, offset: 0x01b4fce8, size: 60 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (onPress != null) {
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(onPress)();
}
}
}
return value3;
}
function useDraggablePipAe({translationX, translationY}) { // fn#61951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:7584, owner: useDraggablePip.ae, offset: 0x01b4fa16, size: 169 bytes, params: 2, frame: 14
var value4;
var moduleValue;
let binding = env0_16;
const set = binding.set;
const binding2 = env0_15;
let get = binding2.get;
Reflect.apply(set, binding, [Reflect.apply(get, binding2, []) + translationX]);
binding = env0_18;
binding.set(env0_17.get() + translationY);
binding = env0_19;
get = binding.get;
if (!Reflect.apply(get, binding, [])) {
if (onMoved != null) {
value4 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(onMoved)();
function le() { // fn#61954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:8937, owner: useDraggablePip.le, offset: 0x01b4fd24, size: 166 bytes, params: 1, frame: 16
let binding = env0_16;
let get = binding.get;
const value2 = Reflect.apply(get, binding, []);
const value3 = env0_11.get();
binding = env0_9;
get = binding.get;
const items2 = [{translateX: value2 + (value3 - Reflect.apply(get, binding, [])) / 2}];
const value5 = env0_18.get();
const value6 = env0_12.get();
binding = env0_10;
get = binding.get;
items2[1] = {translateY: value5 + (value6 - Reflect.apply(get, binding, [])) / 2};
const object2 = {};
object2.scale = env0_8.get();
items2[2] = object2;
return {transform: items2};
}
env0_19.set(true);
}
}
function useDraggablePipSe(a0) { // fn#61952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:7931, owner: useDraggablePip.se, offset: 0x01b4fabf, size: 553 bytes, params: 2, frame: 27
var r10;
var r4;
var r3;
var r11;
let binding = env0_16;
let get = binding.get;
const value3 = Reflect.apply(get, binding, []) + 0.0875 * a0.velocityX;
binding = env0_13;
const value4 = binding.get();
const binding2 = env0_11;
get = binding2.get;
const value5 = value4 - Reflect.apply(get, binding2, []);
const binding3 = env1_23;
const value7 = 0;
const value8 = binding3(value3, value7, value5);
const value10 = env0_18.get() + 0.0875 * a0.velocityY;
const binding5 = env0_14;
const value11 = binding5.get();
const binding6 = env0_12;
get = binding6.get;
const value12 = value11 - Reflect.apply(get, binding6, []);
const value13 = binding3(value10, value7, value12);
const value14 = binding5.get();
get = binding6.get;
const value15 = value14 - Reflect.apply(get, binding6, []) - value13;
const value16 = binding.get();
get = binding2.get;
const value17 = value16 - Reflect.apply(get, binding2, []) - value8;
const Math = global.Math;
const value18 = Math.min(value13, value15, value8, value17);
if (value13 === value18) {
if (snapToCorners) {
r4 = value8 < value17 ? value7 : value5;
r3 = value7;
r11 = r4;
} else {
r3 = value7;
r11 = value8;
}
} else if (value15 === value18) {
if (snapToCorners) {
r10 = value8 < value17 ? value7 : value5;
r3 = value12;
r11 = r10;
} else {
r3 = value12;
r11 = value8;
}
} else if (value8 === value18) {
if (snapToCorners) {
r3 = value13 < value15 ? value7 : value12;
r11 = value7;
} else {
r3 = value13;
r11 = value7;
}
} else if (value17 !== value18) {
r3 = value13;
r11 = value8;
} else if (snapToCorners) {
r3 = value13 < value15 ? value7 : value12;
r11 = value5;
} else {
r3 = value13;
r11 = value5;
}
binding = env0_16;
let set = binding.set;
const springModule = require(4577) /* metro dependency 4577: spring */;
let withSpring = springModule.withSpring;
let object2 = {};
const binding7 = env1_6;
copyDataProperties(object2, binding7, value8);
object2['velocity'] = a0.velocityX;
Reflect.apply(set, binding, [Reflect.apply(withSpring, springModule, [r11, object2])]);
env0_15.set(r11);
binding = env0_18;
set = binding.set;
const moduleValue2 = springModule;
withSpring = moduleValue2.withSpring;
object2 = {};
copyDataProperties(object2, binding7, value8);
object2['velocity'] = a0.velocityY;
Reflect.apply(set, binding, [Reflect.apply(withSpring, moduleValue2, [r3, object2])]);
env0_17.set(r3);
}
function useDraggablePipRe() { // fn#61953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:8699, owner: useDraggablePip.re, offset: 0x01b4fce8, size: 60 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (onPress != null) {
value2 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
moduleValue.runOnJS(onPress)();
}
}
function useDraggablePipLe() { // fn#61954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7916:8937, owner: useDraggablePip.le, offset: 0x01b4fd24, size: 166 bytes, params: 1, frame: 16
let binding = env0_16;
let get = binding.get;
const value2 = Reflect.apply(get, binding, []);
const value3 = env0_11.get();
binding = env0_9;
get = binding.get;
const items2 = [{translateX: value2 + (value3 - Reflect.apply(get, binding, [])) / 2}];
const value5 = env0_18.get();
const value6 = env0_12.get();
binding = env0_10;
get = binding.get;
items2[1] = {translateY: value5 + (value6 - Reflect.apply(get, binding, [])) / 2};
const object = {};
object.scale = env0_8.get();
items2[2] = object;
return {transform: items2};
}
global.__d(_fun61935, 7738, [57, 7715, 7722, 4017, 4504, 1305, 7739, 5321, 4577,
2]) /* metro module 7738, dependencies: [57, 7715, 7722, 4017, 4504, 1305, 7739, 5321, 4577, 2] */;
@@ -1,37 +1,49 @@
/* Metro module 7856; source: modules/video_calls/native/useIsFiveButtonLayout.tsx; dependencies: [1379, 1867, 566, 7721, 7857, 7859, 6861, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UseIsRemote from '../../game_console/hooks/useIsRemote.tsx'; /* Metro dependency 6861 */
import UseIsActivitiesAvailableInShelf from '../../activities/useIsActivitiesAvailableInShelf.tsx'; /* Metro dependency 7857 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as VoiceChatHooksModule from '../../voice_chat/VoiceChatHooks.tsx'; /* Metro dependency 7721 */
function _fun62719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#62719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8034:6, offset: 0x01b64b5d, size: 132 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useIsFiveButtonLayout.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useIsFiveButtonLayout.tsx');
exports.useIsFiveButtonLayout = useIsFiveButtonLayout;
function useIsFiveButtonLayout(a0) { // fn#62720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8034:226, offset: 0x01b64be1, size: 380 bytes, params: 2, frame: 23
const env0_0 = a0;
const value2 = undefined;
const channel = (FluxModule).useStateFromStores([ChannelStore], _fun62721);
const value3 = (VoiceChatHooksModule).useIsConnectedToVoiceChannel(channel);
const value4 = null;
let guild_id = value4 == channel ? value2 : channel.guild_id;
const r12 = value4 != guild_id ? guild_id : value4;
const defaultImport = UseIsActivitiesAvailableInShelf;
guild_id = value4 == channel ? value2 : channel.guild_id;
const value5 = defaultImport(value4 != guild_id ? guild_id : value4, value4 == channel ? value2 : channel.id);
const value6 = (FluxModule).useStateFromStores([GuildStore], _fun62722, [r12]);
const afkChannelId = value4 == value6 ? value2 : value6.afkChannelId;
const r8 = value4 == channel ? value2 : channel.isGuildVoice();
const r4 = value4 != r8 && r8;
const value8 = (importDefault(7859) /* metro dependency 7859: useIsPrivateChannelWithEnabledActivities */)(value4 == channel ? value2 : channel.id);
const value = (UseIsRemote)();
let r0 = value3 && value5 && (!r4 ? value8 : r4);
r0 = r0 && !value && !(afkChannelId === a0);
return r0;
function _fun62721() { // fn#62721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8034:274, offset: 0x01b64d5d, size: 26 bytes, params: 1, frame: 11
return ChannelStore.getChannel(env0_0);
}
function _fun62722() { // fn#62722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8034:491, offset: 0x01b64d77, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_1);
}
}
}
function useIsFiveButtonLayout(a0) { // fn#62720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8034:226, offset: 0x01b64be1, size: 380 bytes, params: 2, frame: 23
const env0_0 = a0;
const value2 = undefined;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun62721);
const value3 = (require(7721) /* metro dependency 7721: VoiceChatHooks */).useIsConnectedToVoiceChannel(channel);
const value4 = null;
let guild_id = value4 == channel ? value2 : channel.guild_id;
const r12 = value4 != guild_id ? guild_id : value4;
const defaultImport = importDefault(7857) /* metro dependency 7857: useIsActivitiesAvailableInShelf */;
guild_id = value4 == channel ? value2 : channel.guild_id;
const value5 = defaultImport(value4 != guild_id ? guild_id : value4, value4 == channel ? value2 : channel.id);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun62722, [r12]);
const afkChannelId = value4 == value6 ? value2 : value6.afkChannelId;
const r8 = value4 == channel ? value2 : channel.isGuildVoice();
const r4 = value4 != r8 && r8;
const value8 = (importDefault(7859) /* metro dependency 7859: useIsPrivateChannelWithEnabledActivities */)(value4 == channel ? value2 : channel.id);
const value = (importDefault(6861) /* metro dependency 6861: useIsRemote */)();
let r0 = value3 && value5 && (!r4 ? value8 : r4);
r0 = r0 && !value && !(afkChannelId === a0);
return r0;
}
function _fun62722() { // fn#62722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8034:491, offset: 0x01b64d77, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_1);
}
global.__d(_fun62719, 7856, [1379, 1867, 566, 7721, 7857, 7859, 6861,
2]) /* metro module 7856, dependencies: [1379, 1867, 566, 7721, 7857, 7859, 6861, 2] */;
@@ -1,49 +1,132 @@
/* Metro module 7719; source: modules/video_calls/native/useIsPrivateAudioOnlyCall.tsx; dependencies: [57, 1378, 4606, 4492, 4259, 4297, 4299, 566, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import EmbeddedActivitiesStore from '../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import ChannelRTCStore from '../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CallConstantsModule from '../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
function _fun61761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:6, offset: 0x01b4a073, size: 223 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_8 = (require(4299) /* metro dependency 4299: CallConstants */).isActivityParticipant;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useIsPrivateAudioOnlyCall.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useIsPrivateAudioOnlyCall.tsx');
exports.default = _default_61763;
}
function _default_61763(a0) { // fn#61763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:260, offset: 0x01b4a152, size: 221 bytes, params: 2, frame: 22
const env0_0 = a0;
const useStateFromStores = FluxModule.useStateFromStores;
const property = Module00057(Reflect.apply(useStateFromStores, FluxModule, [[ChannelRTCStore], _fun61764, [a0],
areParticipantStatesEqual]), 1)[0];
const embeddedActivitiesStoreBinding = EmbeddedActivitiesStore;
const getEmbeddedActivitiesForChannel = embeddedActivitiesStoreBinding.getEmbeddedActivitiesForChannel;
return FluxModule.useStateFromStores([VoiceStateStore, MediaEngineStore, ApplicationStreamingStore], _fun61765, [a0,
Reflect.apply(getEmbeddedActivitiesForChannel, embeddedActivitiesStoreBinding,
[a0.id]).length > 0 || isActivityParticipant(property)]);
function _fun61764() { // fn#61764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:302, offset: 0x01b4a22f, size: 60 bytes, params: 1, frame: 12
const value = environment.__proto__;
const channelRTCStoreBinding = ChannelRTCStore;
const getSelectedParticipant = channelRTCStoreBinding.getSelectedParticipant;
const binding = env0_0;
const getParticipantsVersion = channelRTCStoreBinding.getParticipantsVersion;
return [Reflect.apply(getSelectedParticipant, channelRTCStoreBinding, [binding.id]),
Reflect.apply(getParticipantsVersion, channelRTCStoreBinding, [binding.id])];
}
function _default_61763(a0) { // fn#61763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:260, offset: 0x01b4a152, size: 221 bytes, params: 2, frame: 22
const env0_0 = a0;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const property = env0_2(Reflect.apply(useStateFromStores, fluxModule, [[ChannelRTCStore], _fun61764, [a0],
areParticipantStatesEqual]), 1)[0];
const getEmbeddedActivitiesForChannel = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel;
return fluxModule.useStateFromStores([VoiceStateStore, MediaEngineStore, ApplicationStreamingStore], _fun61765, [a0,
Reflect.apply(getEmbeddedActivitiesForChannel, EmbeddedActivitiesStore,
[a0.id]).length > 0 || isActivityParticipant(property)]);
}
function _fun61765() { // fn#61765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:514, offset: 0x01b4a26b, size: 167 bytes, params: 1, frame: 13
var mediaEngineStoreBinding;
var value;
let r0 = env0_0.isPrivate() && !VoiceStateStore.hasVideo(env0_0.id) && !env0_1;
r0 = r0 && ApplicationStreamingStore.getAllApplicationStreamsForChannel(env0_0.id).length === 0 && ApplicationStreamingStore.getAllActiveStreamsForChannel(env0_0.id).length === 0;
if (r0) {
value = environment.__proto__;
mediaEngineStoreBinding = MediaEngineStore;
value = !mediaEngineStoreBinding.isVideoEnabled();
r0 = value;
}
return r0;
}
function _fun61764() { // fn#61764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:302, offset: 0x01b4a22f, size: 60 bytes, params: 1, frame: 12
const value = environment.__proto__;
const getSelectedParticipant = ChannelRTCStore.getSelectedParticipant;
const binding = env0_0;
const getParticipantsVersion = ChannelRTCStore.getParticipantsVersion;
return [Reflect.apply(getSelectedParticipant, ChannelRTCStore, [binding.id]), Reflect.apply(getParticipantsVersion,
ChannelRTCStore, [binding.id])];
}
function _fun61765() { // fn#61765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:514, offset: 0x01b4a26b, size: 167 bytes, params: 1, frame: 13
var value;
let r0 = env0_0.isPrivate() && !VoiceStateStore.hasVideo(env0_0.id) && !env0_1;
r0 = r0 && ApplicationStreamingStore.getAllApplicationStreamsForChannel(env0_0.id).length === 0 && ApplicationStreamingStore.getAllActiveStreamsForChannel(env0_0.id).length === 0;
if (r0) {
value = environment.__proto__;
value = !MediaEngineStore.isVideoEnabled();
r0 = value;
}
return r0;
}
function areParticipantStatesEqual(a0, a1) { // fn#61762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7897:188, offset: 0x010e59c7, size: 168 bytes, params: 3, frame: 14
var r1;
var r2;
var r3;
var r4;
var r5;
var r8;
var item3;
var value3;
var item5;
var value5;
let iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
if (value2) {
}
if (value2) {
r1 = item2;
r2 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r3 = value;
} else {
r1 = item3;
r2 = value3;
r3 = item;
}
}
if (!r2) {
r1.return();
}
iterator = a1[Symbol.iterator]();
const iterator3 = iterator.next;
let item4 = Reflect.apply(iterator3, iterator, []);
item = item4.value;
item4 = item4.done ? undefined : iterator;
const value4 = item4 === value;
if (value4) {
}
if (value4) {
r4 = item4;
r5 = value4;
r8 = value;
} else {
item5 = Reflect.apply(iterator3, item4, []);
item = item5.value;
item5 = item5.done ? undefined : item4;
value5 = item5 === value;
if (value5) {
r4 = item5;
r5 = value5;
r8 = value;
} else {
r4 = item5;
r5 = value5;
r8 = item;
}
}
if (!r5) {
r4.return();
}
return r3 === r8;
}
global.__d(_fun61761, 7719, [57, 1378, 4606, 4492, 4259, 4297, 4299, 566,
2]) /* metro module 7719, dependencies: [57, 1378, 4606, 4492, 4259, 4297, 4299, 566, 2] */;
@@ -1,53 +1,61 @@
/* Metro module 9438; source: modules/video_calls/native/useIsVideoMode.tsx; dependencies: [4492, 1379, 4259, 1934, 4297, 566, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoiceStateStore from '../../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun73440(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9624:6, offset: 0x01d6cb85, size: 195 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = isVideoMode;
const isVideoMode2 = isVideoMode;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useIsVideoMode.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useIsVideoMode.tsx');
exports.default = function() {
return require(dependencyMap[5]).useStateFromStores([ChannelStore, SelectedChannelStore, MediaEngineStore,
VoiceStateStore, ApplicationStreamingStore], _fun73443);
};
exports.isVideoMode = closure;
}
exports.isVideoMode = isVideoMode2;
function isVideoMode() { // fn#73441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9624:146, offset: 0x01d6cc48, size: 159 bytes, params: 1, frame: 15
var r1;
var r0;
const value = a0;
const value2 = a1;
const value3 = a2;
const value4 = a3;
const value5 = a4;
const r2 = value !== undefined ? value : ChannelStore;
const r6 = value2 !== undefined ? value2 : SelectedChannelStore;
const r4 = value3 !== undefined ? value3 : ApplicationStreamingStore;
const r5 = value4 !== undefined ? value4 : VoiceStateStore;
const r3 = value5 !== undefined ? value5 : MediaEngineStore;
const getChannel = r2.getChannel;
const getVoiceChannelId = r6.getVoiceChannelId;
const value6 = Reflect.apply(getChannel, r2, [Reflect.apply(getVoiceChannelId, r6, [])]) != null;
if (value6) {
r1 = r4.getAllActiveStreams().length > 0 || r5.hasVideo(value.id);
r1 = !r1 ? r3.isVideoEnabled() : r1;
r0 = r1;
} else {
r0 = value6;
}
return r0;
}
function isVideoMode() { // fn#73441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9624:146, offset: 0x01d6cc48, size: 159 bytes, params: 1, frame: 15
var r1;
var r0;
const value = a0;
const value2 = a1;
const value3 = a2;
const value4 = a3;
const value5 = a4;
const r2 = value !== undefined ? value : ChannelStore;
const r6 = value2 !== undefined ? value2 : SelectedChannelStore;
const r4 = value3 !== undefined ? value3 : ApplicationStreamingStore;
const r5 = value4 !== undefined ? value4 : VoiceStateStore;
const r3 = value5 !== undefined ? value5 : MediaEngineStore;
const getChannel = r2.getChannel;
const getVoiceChannelId = r6.getVoiceChannelId;
const value6 = Reflect.apply(getChannel, r2, [Reflect.apply(getVoiceChannelId, r6, [])]) != null;
if (value6) {
r1 = r4.getAllActiveStreams().length > 0 || r5.hasVideo(value.id);
r1 = !r1 ? r3.isVideoEnabled() : r1;
r0 = r1;
} else {
r0 = value6;
function _default_73442() { // fn#73442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9624:332, offset: 0x01d6cce7, size: 91 bytes, params: 1, frame: 14
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, SelectedChannelStore,
MediaEngineStore, VoiceStateStore, ApplicationStreamingStore], function() {
return isVideoMode(ChannelStore, SelectedChannelStore, ApplicationStreamingStore, VoiceStateStore,
MediaEngineStore);
});
function _fun73443() { // fn#73443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9624:376, offset: 0x01d6cd42, size: 35 bytes, params: 1, frame: 19
return isVideoMode(ChannelStore, SelectedChannelStore, ApplicationStreamingStore, VoiceStateStore, MediaEngineStore);
}
}
return r0;
}
function _default_73442() { // fn#73442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9624:332, offset: 0x01d6cce7, size: 91 bytes, params: 1, frame: 14
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, SelectedChannelStore,
MediaEngineStore, VoiceStateStore, ApplicationStreamingStore], function() {
return isVideoMode(ChannelStore, SelectedChannelStore, ApplicationStreamingStore, VoiceStateStore,
MediaEngineStore);
});
}
global.__d(_fun73440, 9438, [4492, 1379, 4259, 1934, 4297, 566,
2]) /* metro module 9438, dependencies: [4492, 1379, 4259, 1934, 4297, 566, 2] */;
@@ -1,31 +1,50 @@
/* Metro module 9326; source: modules/video_calls/native/useOnConnectToConsole.tsx; dependencies: [31, 661, 3968, 1365, 9327, 9355, 9421, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentUnsafeUtilsModule from '../../dismissible_content/DismissibleContentUnsafeUtils.tsx'; /* Metro dependency 3968 */
function _fun72829(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9512:6, offset: 0x01d551f3, size: 170 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = onConnectToConsole;
const onConnectToConsole2 = onConnectToConsole;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.AnalyticsLocations;
const env0_5 = constantsModule.PlatformTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useOnConnectToConsole.tsx');
exports.onConnectToConsole = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useOnConnectToConsole.tsx');
exports.onConnectToConsole = onConnectToConsole2;
exports.useOnConnectToConsole = useOnConnectToConsole;
}
function onConnectToConsole(a0, a1) { // fn#72830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9512:157, offset: 0x01d5529d, size: 280 bytes, params: 3, frame: 17
var beginConsoleTransfer;
var type;
var defaultImport;
var defaultImport2;
var value;
const dismissibleContentUnsafeUtilsModule = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = dismissibleContentUnsafeUtilsModule.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const DONUT_MOBILE_NUX = DismissibleContent.DONUT_MOBILE_NUX;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, dismissibleContentUnsafeUtilsModule, [DONUT_MOBILE_NUX]);
if (a1.twoWayLink) {
if (a1.revoked) {
function onConnectToConsole(a0, a1) { // fn#72830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9512:157, offset: 0x01d5529d, size: 280 bytes, params: 3, frame: 17
var beginConsoleTransfer;
var type;
var defaultImport;
var defaultImport2;
var value;
const UNSAFE_markDismissibleContentAsDismissed = DismissibleContentUnsafeUtilsModule.UNSAFE_markDismissibleContentAsDismissed;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const DONUT_MOBILE_NUX = DismissibleContent.DONUT_MOBILE_NUX;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, DismissibleContentUnsafeUtilsModule, [DONUT_MOBILE_NUX]);
if (a1.twoWayLink) {
if (a1.revoked) {
type = a1.type;
if (PlatformTypes.XBOX === type) {
defaultImport2 = importDefault(9327) /* metro dependency 9327: XboxLinkModalActionCreators */;
return defaultImport2.showModal([AnalyticsLocations.CHANNEL_CALL]);
}
if (PlatformTypes.PLAYSTATION === type) {
defaultImport = importDefault(9355) /* metro dependency 9355: PlayStationLinkModalActionCreators */;
return defaultImport.showModal([AnalyticsLocations.CHANNEL_CALL], a1.type);
}
if (PlatformTypes.PLAYSTATION_STAGING === type) {
defaultImport = importDefault(9355) /* metro dependency 9355: PlayStationLinkModalActionCreators */;
return defaultImport.showModal([AnalyticsLocations.CHANNEL_CALL], a1.type);
}
return undefined;
}
value = require(9421) /* metro dependency 9421: beginConsoleTransfer */;
beginConsoleTransfer = value.beginConsoleTransfer;
type = a1.type;
Reflect.apply(beginConsoleTransfer, value, [a0, type]);
} else {
type = a1.type;
if (PlatformTypes.XBOX === type) {
defaultImport2 = importDefault(9327) /* metro dependency 9327: XboxLinkModalActionCreators */;
@@ -39,36 +58,20 @@ function onConnectToConsole(a0, a1) { // fn#72830, source: /ci/build/discord/dis
defaultImport = importDefault(9355) /* metro dependency 9355: PlayStationLinkModalActionCreators */;
return defaultImport.showModal([AnalyticsLocations.CHANNEL_CALL], a1.type);
}
return undefined;
}
value = require(9421) /* metro dependency 9421: beginConsoleTransfer */;
beginConsoleTransfer = value.beginConsoleTransfer;
type = a1.type;
Reflect.apply(beginConsoleTransfer, value, [a0, type]);
} else {
type = a1.type;
if (PlatformTypes.XBOX === type) {
defaultImport2 = importDefault(9327) /* metro dependency 9327: XboxLinkModalActionCreators */;
return defaultImport2.showModal([AnalyticsLocations.CHANNEL_CALL]);
}
if (PlatformTypes.PLAYSTATION === type) {
defaultImport = importDefault(9355) /* metro dependency 9355: PlayStationLinkModalActionCreators */;
return defaultImport.showModal([AnalyticsLocations.CHANNEL_CALL], a1.type);
}
if (PlatformTypes.PLAYSTATION_STAGING === type) {
defaultImport = importDefault(9355) /* metro dependency 9355: PlayStationLinkModalActionCreators */;
return defaultImport.showModal([AnalyticsLocations.CHANNEL_CALL], a1.type);
}
}
function useOnConnectToConsole(a0, a1) { // fn#72831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9512:682, offset: 0x01d553b5, size: 55 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
return ReactModule.useCallback(_fun72832, [a0, a1]);
function _fun72832() { // fn#72832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9512:740, offset: 0x01d553ec, size: 28 bytes, params: 1, frame: 13
onConnectToConsole(env0_0, require);
}
}
}
function useOnConnectToConsole(a0, a1) { // fn#72831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9512:682, offset: 0x01d553b5, size: 55 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
return env0_3.useCallback(_fun72832, [a0, a1]);
}
function _fun72832() { // fn#72832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9512:740, offset: 0x01d553ec, size: 28 bytes, params: 1, frame: 13
onConnectToConsole(env0_0, require);
}
global.__d(_fun72829, 9326, [31, 661, 3968, 1365, 9327, 9355, 9421,
2]) /* metro module 9326, dependencies: [31, 661, 3968, 1365, 9327, 9355, 9421, 2] */;
@@ -1,16 +1,20 @@
/* Metro module 10668; source: modules/video_calls/native/useParticipantTileTapGesture.tsx; dependencies: [5321, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module05321Module from '../../../by-id/module-05321.js'; /* Metro dependency 5321 */
function _fun82048(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10854:6, offset: 0x01ee8daf, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useParticipantTileTapGesture.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useParticipantTileTapGesture.tsx');
exports.default = useParticipantTileTapGesture;
function useParticipantTileTapGesture({onSingleTapStart, onDoubleTapStart}) { // fn#82049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10854:195, offset: 0x01ee8e0f, size: 145 bytes, params: 2, frame: 17
const Gesture = (Module05321Module).Gesture;
let value = Gesture.Tap();
value = value.onStart(onSingleTapStart);
return Gesture.Exclusive(Gesture.Tap().onStart(onDoubleTapStart).numberOfTaps(2), value);
}
}
function useParticipantTileTapGesture({onSingleTapStart, onDoubleTapStart}) { // fn#82049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10854:195, offset: 0x01ee8e0f, size: 145 bytes, params: 2, frame: 17
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
let value = Gesture.Tap();
value = value.onStart(onSingleTapStart);
return Gesture.Exclusive(Gesture.Tap().onStart(onDoubleTapStart).numberOfTaps(2), value);
}
global.__d(_fun82048, 10668, [5321, 2]) /* metro module 10668, dependencies: [5321, 2] */;
@@ -1,123 +1,130 @@
/* Metro module 7734; source: modules/video_calls/native/usePipVideoOrStream.tsx; dependencies: [1378, 4606, 7735, 4492, 1226, 1379, 4259, 4294, 4299, 566, 4285, 4007, 7714, 2] */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import EmbeddedActivitiesStore from '../../activities/EmbeddedActivitiesStore.tsx'; /* Metro dependency 1378 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import MediaEngineStore from '../../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import ChannelRTCStore2 from '../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import VideoSpeakerStore2 from '../../calls/VideoSpeakerStore.tsx'; /* Metro dependency 7735 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as StreamKeyUtilsModule from '../../go_live/utils/StreamKeyUtils.tsx'; /* Metro dependency 4285 */
import * as CallConstantsModule from '../../calls/CallConstants.tsx'; /* Metro dependency 4299 */
function _fun61906(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:6, offset: 0x01b4ddba, size: 294 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const videoSpeakerStore = importDefault(7735) /* metro dependency 7735: VideoSpeakerStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const callConstantsModule = require(4299) /* metro dependency 4299: CallConstants */;
const env0_11 = callConstantsModule.isStreamParticipant;
const env0_12 = callConstantsModule.isUserParticipant;
const env0_13 = callConstantsModule.ParticipantTypes;
const channelRTCStore = ChannelRTCStore2;
const videoSpeakerStore = VideoSpeakerStore2;
const closure = function(a0) {
var env0_0 = a0;
return require(dependencyMap[9]).useStateFromStores([ChannelRTCStore, VideoSpeakerStore,
return require(dependencyMap[9]).useStateFromStores([channelRTCStore, videoSpeakerStore,
ApplicationStreamingStore],
_fun61908, [a0]);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/usePipVideoOrStream.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/usePipVideoOrStream.tsx');
exports.default = closure;
exports.useHasPipParticipant = useHasPipParticipant;
}
function usePipVideoOrStream(a0) { // fn#61907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:273, offset: 0x01b4dee0, size: 89 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStores([channelRTCStore, videoSpeakerStore,
ApplicationStreamingStore], _fun61908, [a0]);
function _fun61908() { // fn#61908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:312, offset: 0x01b4df39, size: 398 bytes, params: 1, frame: 19
var value;
const value2 = null;
const r2 = value2 != env0_0 ? channelRTCStore.getVideoParticipants(env0_0) : [];
const r5 = value2 != env0_0 ? channelRTCStore.getSelectedParticipant(env0_0) : value2;
const value7 = r2.find(_fun61909);
const getVideoOrStreamParticipantBinding = getVideoOrStreamParticipant;
const binding = env0_0;
const value9 = undefined;
const videoOrStreamParticipantBinding = getVideoOrStreamParticipantBinding({channelId: binding,
VideoSpeakerStore: videoSpeakerStore, ChannelRTCStore: channelRTCStore});
const r10 = value2 != binding ? ApplicationStreamingStore.getAllActiveStreamsForChannel(env0_0) : [];
const r7 = isStreamParticipant(videoOrStreamParticipantBinding) ? r10.filter(_fun61910).length > 0 ? videoOrStreamParticipantBinding : value9 : videoOrStreamParticipantBinding;
let r1 = value2 == r7 ? value7 : r7;
let r4 = value2 != r5 && r5.id === (value2 == r7 ? value9 : r7.id) && value2 != r1 && r1.id === (value2 == r7 ? value9 : r7.id);
if (r4) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.isModalOpen(importDefault(7714) /* metro dependency 7714: ChannelCallModal */);
r4 = value;
}
r1 = r4 ? value7 : r1;
return value2 != r1 ? r1.type === ParticipantTypes.ACTIVITY ? value2 : value2 != r1.streamId ? r1 : value2 : value2;
function _fun61909(a0) { // fn#61909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:417, offset: 0x01b4e0c7, size: 39 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__.__proto__;
const USER = ParticipantTypes.USER;
return type === USER && !a0.localVideoDisabled;
}
function usePipVideoOrStream(a0) { // fn#61907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:273, offset: 0x01b4dee0, size: 89 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore, VideoSpeakerStore,
ApplicationStreamingStore], _fun61908, [a0]);
}
function _fun61910({streamType, guildId, channelId, ownerId}) { // fn#61910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:613, offset: 0x01b4e0ee, size: 108 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = undefined;
const value2 = (StreamKeyUtilsModule).encodeStreamKey({streamType: streamType,
guildId: guildId, channelId: channelId, ownerId: ownerId});
const binding = env0_0;
return value2 === (binding == null ? value : binding.id);
}
function getVideoOrStreamParticipant({channelId, VideoSpeakerStore, ChannelRTCStore}) { // fn#61911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:1031, offset: 0x01b4e15a, size: 135 bytes, params: 2, frame: 17
const r1 = (channelId != null ? ChannelRTCStore.getParticipant(channelId,
VideoSpeakerStore.getSpeaker(channelId)) : null) ?? (channelId != null ? ChannelRTCStore.getVideoParticipants(channelId) : []).find(_fun61912);
return isUserParticipant(r1) && r1.localVideoDisabled ? null : r1;
}
}
function useHasPipParticipant({isActivityViewFocused}) { // fn#61913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:1440, offset: 0x01b4e21d, size: 183 bytes, params: 2, frame: 19
const value = undefined;
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore],
function() {
return RTCConnectionStore.getChannelId();
});
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, EmbeddedActivitiesStore,
MediaEngineStore], _fun61915, [channelId, usePipVideoOrStream(channelId ?? value), isActivityViewFocused]);
}
function _fun61908() { // fn#61908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:312, offset: 0x01b4df39, size: 398 bytes, params: 1, frame: 19
var value;
const value2 = null;
const r2 = value2 != env0_0 ? ChannelRTCStore.getVideoParticipants(env0_0) : [];
const r5 = value2 != env0_0 ? ChannelRTCStore.getSelectedParticipant(env0_0) : value2;
const value7 = r2.find(_fun61909);
const getVideoOrStreamParticipantBinding = getVideoOrStreamParticipant;
const binding = env0_0;
const value9 = undefined;
const videoOrStreamParticipantBinding = getVideoOrStreamParticipantBinding({channelId: binding,
VideoSpeakerStore: VideoSpeakerStore, ChannelRTCStore: ChannelRTCStore});
const r10 = value2 != binding ? ApplicationStreamingStore.getAllActiveStreamsForChannel(env0_0) : [];
const r7 = isStreamParticipant(videoOrStreamParticipantBinding) ? r10.filter(_fun61910).length > 0 ? videoOrStreamParticipantBinding : value9 : videoOrStreamParticipantBinding;
let r1 = value2 == r7 ? value7 : r7;
let r4 = value2 != r5 && r5.id === (value2 == r7 ? value9 : r7.id) && value2 != r1 && r1.id === (value2 == r7 ? value9 : r7.id);
if (r4) {
value = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
value = value.isModalOpen(importDefault(7714) /* metro dependency 7714: ChannelCallModal */);
r4 = value;
}
r1 = r4 ? value7 : r1;
return value2 != r1 ? r1.type === ParticipantTypes.ACTIVITY ? value2 : value2 != r1.streamId ? r1 : value2 : value2;
}
function _fun61912(a0) { // fn#61912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:1138, offset: 0x01b4e1e1, size: 60 bytes, params: 2, frame: 13
var r0;
const id = a0.id;
let value = environment.__proto__;
const getId = AuthenticationStore.getId;
const value2 = id !== Reflect.apply(getId, AuthenticationStore, []);
if (value2) {
value = isUserParticipant(a0);
r0 = value ? a0.localVideoDisabled : !value;
} else {
r0 = value2;
function getVideoOrStreamParticipant({channelId, VideoSpeakerStore, ChannelRTCStore}) { // fn#61911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:1031, offset: 0x01b4e15a, size: 135 bytes, params: 2, frame: 17
const r1 = (channelId != null ? ChannelRTCStore.getParticipant(channelId,
VideoSpeakerStore.getSpeaker(channelId)) : null) ?? (channelId != null ? ChannelRTCStore.getVideoParticipants(channelId) : []).find(_fun61912);
return isUserParticipant(r1) && r1.localVideoDisabled ? null : r1;
function _fun61912(a0) { // fn#61912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:1138, offset: 0x01b4e1e1, size: 60 bytes, params: 2, frame: 13
var r0;
const id = a0.id;
let value = environment.__proto__;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
const value2 = id !== Reflect.apply(getId, authenticationStoreBinding, []);
if (value2) {
value = isUserParticipant(a0);
r0 = value ? a0.localVideoDisabled : !value;
} else {
r0 = value2;
}
return r0;
}
}
return r0;
}
function _fun61915() { // fn#61915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:1614, offset: 0x01b4e2e7, size: 136 bytes, params: 1, frame: 15
var r1;
const value = environment.__proto__;
const getChannel = ChannelStore.getChannel;
if (Reflect.apply(getChannel, ChannelStore, [channelId]) == null) {
return false;
function useHasPipParticipant({isActivityViewFocused}) { // fn#61913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:1440, offset: 0x01b4e21d, size: 183 bytes, params: 2, frame: 19
const value = undefined;
const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore],
function() {
return RTCConnectionStore.getChannelId();
});
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, EmbeddedActivitiesStore,
MediaEngineStore], _fun61915, [channelId, usePipVideoOrStream(channelId ?? value), isActivityViewFocused]);
function _fun61915() { // fn#61915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:1614, offset: 0x01b4e2e7, size: 136 bytes, params: 1, frame: 15
var r1;
const value = environment.__proto__;
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
if (Reflect.apply(getChannel, channelStoreBinding, [channelId]) == null) {
return false;
}
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
const r2 = env0_2 != null && MediaEngineStore.isLocalVideoDisabled(env0_2.id);
let r0 = currentEmbeddedActivity != null && !isActivityViewFocused;
if (!r0) {
r1 = env0_2 != null && env0_2.streamId != null;
r1 = r1 && !r2;
r0 = r1;
}
return r0;
}
}
const currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity();
const r2 = env0_2 != null && MediaEngineStore.isLocalVideoDisabled(env0_2.id);
let r0 = currentEmbeddedActivity != null && !isActivityViewFocused;
if (!r0) {
r1 = env0_2 != null && env0_2.streamId != null;
r1 = r1 && !r2;
r0 = r1;
}
return r0;
}
function _fun61909(a0) { // fn#61909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:417, offset: 0x01b4e0c7, size: 39 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__.__proto__;
const USER = ParticipantTypes.USER;
return type === USER && !a0.localVideoDisabled;
}
function _fun61910({streamType, guildId, channelId, ownerId}) { // fn#61910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7912:613, offset: 0x01b4e0ee, size: 108 bytes, params: 2, frame: 14
let value = environment.__proto__.__proto__;
value = undefined;
const value2 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey({streamType: streamType,
guildId: guildId, channelId: channelId, ownerId: ownerId});
const binding = env0_0;
return value2 === (binding == null ? value : binding.id);
}
global.__d(_fun61906, 7734, [1378, 4606, 7735, 4492, 1226, 1379, 4259, 4294, 4299, 566, 4285, 4007, 7714,
2]) /* metro module 7734, dependencies: [1378, 4606, 7735, 4492, 1226, 1379, 4259, 4294, 4299, 566, 4285, 4007, 7714, 2] */;
@@ -1,136 +1,148 @@
/* Metro module 10794; source: modules/video_calls/native/useScreenshareUtils.tsx; dependencies: [31, 27, 4492, 661, 4092, 7145, 4261, 9228, 8913, 4285, 8899, 9235, 10795, 10600, 1581, 10806, 10807, 10808, 10809, 10801, 566, 6771, 1244, 2] */
import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import AudioActionCreators from '../../../actions/AudioActionCreators.tsx'; /* Metro dependency 8899 */
import UseHasVideoPermission from '../useHasVideoPermission.tsx'; /* Metro dependency 10600 */
import MobileGoLiveUpsellExperiment from '../../go_live/native/MobileGoLiveUpsellExperiment.tsx'; /* Metro dependency 10801 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as DeviceUtilsModule from '../../../utils/native/DeviceUtils.tsx'; /* Metro dependency 4092 */
import * as InjectModule from '../../../external/discord_common/js/packages/media-engine/native/inject.tsx'; /* Metro dependency 4261 */
import * as CallsUtilsModule from '../../voice_calls/native/CallsUtils.tsx'; /* Metro dependency 9228 */
function _fun82906(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:6, offset: 0x01f05b65, size: 326 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = startStream_82907;
const closure2 = getOSRequirement;
const closure3 = getStreamPressHandler;
const startStream_829072 = startStream_82907;
const getOSRequirement2 = getOSRequirement;
const getStreamPressHandler2 = getStreamPressHandler;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).ApplicationStreamStates;
const env0_6 = (require(4092) /* metro dependency 4092: DeviceUtils */).getSystemVersionMajor();
const NativeModules = (ReactNativeModule).NativeModules;
const env0_6 = (DeviceUtilsModule).getSystemVersionMajor();
const env0_7 = NativeModules.BroadcastUploadManager;
const closure4 = handleCloseScreenshare;
const handleCloseScreenshare2 = handleCloseScreenshare;
const closure5 = function() {
require(dependencyMap[6]).getVoiceEngine().stopBroadcast();
handleCloseScreenshare();
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useScreenshareUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useScreenshareUtils.tsx');
exports.default = _default_82916;
exports.handleCloseScreenshare = closure4;
exports.handleCloseScreenshare = handleCloseScreenshare2;
exports.stopScreenshare = closure5;
exports.startStream = closure;
exports.getOSRequirement = closure2;
exports.getStreamPressHandler = closure3;
exports.startStream = startStream_829072;
exports.getOSRequirement = getOSRequirement2;
exports.getStreamPressHandler = getStreamPressHandler2;
exports.tryStartScreenShare = function(a0) {
if (getOSRequirement() && require(dependencyMap[13]).getVideoPermission(a0)) {
startStream_82907();
}
};
}
function startStream_82907() { // fn#82907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:476, offset: 0x01f05cab, size: 109 bytes, params: 1, frame: 12
const getVoiceEngine = InjectModule.getVoiceEngine;
if (Reflect.apply(getVoiceEngine, InjectModule, []).platform === 'android') {
(importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */).isForegroundServiceRunning(_fun82908);
} else {
BroadcastUploadManager.showPicker();
}
function _fun82908(a0) { // fn#82908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:581, offset: 0x01f05d18, size: 83 bytes, params: 2, frame: 12
let value = environment.__proto__;
if (a0) {
value = require(4261) /* metro dependency 4261: inject */;
value = value.getVoiceEngine();
value.startBroadcast();
} else {
(require(9228) /* metro dependency 9228: CallsUtils */).showScreenshareDisabledAlert();
}
}
function startStream_82907() { // fn#82907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:476, offset: 0x01f05cab, size: 109 bytes, params: 1, frame: 12
const injectModule = require(4261) /* metro dependency 4261: inject */;
const getVoiceEngine = injectModule.getVoiceEngine;
if (Reflect.apply(getVoiceEngine, injectModule, []).platform === 'android') {
(importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */).isForegroundServiceRunning(_fun82908);
} else {
BroadcastUploadManager.showPicker();
}
}
function getOSRequirement() { // fn#82909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:686, offset: 0x01f05d6b, size: 16 bytes, params: 1, frame: 2
return env0_6 >= 12;
}
function getStreamPressHandler({channel, hasPermission, isActive, osRequirement, showMobileGoLiveUpsell, analyticsLocations}) { // fn#82910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:727, offset: 0x01f05d7b, size: 130 bytes, params: 2, frame: 18
showMobileGoLiveUpsell = !(showMobileGoLiveUpsell === undefined) && showMobileGoLiveUpsell;
return osRequirement ? hasPermission ? showMobileGoLiveUpsell ? getStreamPressHandlerS : isActive ? stopScreenshare : startStream_82907 : (require(9228) /* metro dependency 9228: CallsUtils */).showScreenshareDisabledAlert : getStreamPressHandlerS_82912;
}
function handleCloseScreenshare() { // fn#82913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:258, offset: 0x01f05e91, size: 114 bytes, params: 1, frame: 17
var moduleValue;
var stopStream;
var moduleValue2;
const currentUserActiveStream = ApplicationStreamingStore.getCurrentUserActiveStream();
if (currentUserActiveStream != null) {
moduleValue = require(8913) /* metro dependency 8913: StreamActionCreators */;
stopStream = moduleValue.stopStream;
moduleValue2 = require(4285) /* metro dependency 4285: StreamKeyUtils */;
Reflect.apply(stopStream, moduleValue, [moduleValue2.encodeStreamKey(currentUserActiveStream)]);
function getOSRequirement() { // fn#82909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:686, offset: 0x01f05d6b, size: 16 bytes, params: 1, frame: 2
return env0_6 >= 12;
}
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).setGoLiveSource(null);
}
function getShareIcon(a0, a1) { // fn#82915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:1168, offset: 0x01f05f3a, size: 116 bytes, params: 3, frame: 14
var r0;
if (require(dependencyMap[14]).isMetaQuest()) {
r0 = importDefault(a0 ? dependencyMap[15] : dependencyMap[16]);
} else {
r0 = a1 ? dependencyMap[17] : a0 ? dependencyMap[18] : dependencyMap[17];
r0 = importDefault(r0);
function getStreamPressHandler({channel, hasPermission, isActive, osRequirement, showMobileGoLiveUpsell, analyticsLocations}) { // fn#82910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:727, offset: 0x01f05d7b, size: 130 bytes, params: 2, frame: 18
showMobileGoLiveUpsell = !(showMobileGoLiveUpsell === undefined) && showMobileGoLiveUpsell;
return osRequirement ? hasPermission ? showMobileGoLiveUpsell ? getStreamPressHandlerS : isActive ? stopScreenshare : startStream_82907 : (require(9228) /* metro dependency 9228: CallsUtils */).showScreenshareDisabledAlert : getStreamPressHandlerS_82912;
function getStreamPressHandlerS() { // fn#82911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:896, owner: getStreamPressHandler.S, offset: 0x01f05dfd, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(10795) /* metro dependency 10795: MobileGoLiveActionSheet */;
return value.showMobileGoLiveActionSheet(analyticsLocations);
}
function getStreamPressHandlerS_82912() { // fn#82912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:1004, owner: getStreamPressHandler.S, offset: 0x01f05e2a, size: 103 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9235) /* metro dependency 9235: AVError */;
const reportAVError = value.reportAVError;
const AVError = (require(9235) /* metro dependency 9235: AVError */).AVError;
const SCREENSHARE_OS_NOT_SUPPORTED = AVError.SCREENSHARE_OS_NOT_SUPPORTED;
Reflect.apply(reportAVError, value, [{type: SCREENSHARE_OS_NOT_SUPPORTED, channelId: channel.id}]);
(CallsUtilsModule).showMinOSScreenshareRequirementAlert();
}
}
return r0;
}
function _default_82916(a0) { // fn#82916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:1249, offset: 0x01f05fae, size: 228 bytes, params: 2, frame: 22
const env0_0 = a0;
const value2 = (importDefault(10600) /* metro dependency 10600: useHasVideoPermission */)(a0);
const oSRequirement = getOSRequirement();
const defaultImport = importDefault(10801) /* metro dependency 10801: MobileGoLiveUpsellExperiment */;
const useConfig = defaultImport.useConfig;
const showMobileGoLiveUpsell = Reflect.apply(useConfig, defaultImport,
[{location: 'useScreenshareUtils'}]).showMobileGoLiveUpsell;
return showMobileGoLiveUpsell.useMemo(_fun82918,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore], function() {
return ApplicationStreamingStore.getCurrentUserActiveStream();
}), a0, value2, oSRequirement, showMobileGoLiveUpsell,
(importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations]);
}
function _fun82908(a0) { // fn#82908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:581, offset: 0x01f05d18, size: 83 bytes, params: 2, frame: 12
let value = environment.__proto__;
if (a0) {
value = require(4261) /* metro dependency 4261: inject */;
value = value.getVoiceEngine();
value.startBroadcast();
} else {
(require(9228) /* metro dependency 9228: CallsUtils */).showScreenshareDisabledAlert();
function handleCloseScreenshare() { // fn#82913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:258, offset: 0x01f05e91, size: 114 bytes, params: 1, frame: 17
var moduleValue;
var stopStream;
var moduleValue2;
const currentUserActiveStream = ApplicationStreamingStore.getCurrentUserActiveStream();
if (currentUserActiveStream != null) {
moduleValue = require(8913) /* metro dependency 8913: StreamActionCreators */;
stopStream = moduleValue.stopStream;
moduleValue2 = require(4285) /* metro dependency 4285: StreamKeyUtils */;
Reflect.apply(stopStream, moduleValue, [moduleValue2.encodeStreamKey(currentUserActiveStream)]);
}
(AudioActionCreators).setGoLiveSource(null);
}
function getShareIcon(a0, a1) { // fn#82915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:1168, offset: 0x01f05f3a, size: 116 bytes, params: 3, frame: 14
var r0;
if (require(dependencyMap[14]).isMetaQuest()) {
r0 = importDefault(a0 ? dependencyMap[15] : dependencyMap[16]);
} else {
r0 = a1 ? dependencyMap[17] : a0 ? dependencyMap[18] : dependencyMap[17];
r0 = importDefault(r0);
}
return r0;
}
function _default_82916(a0) { // fn#82916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:1249, offset: 0x01f05fae, size: 228 bytes, params: 2, frame: 22
const env0_0 = a0;
const value2 = (UseHasVideoPermission)(a0);
const oSRequirement = getOSRequirement();
const defaultImport = MobileGoLiveUpsellExperiment;
const useConfig = defaultImport.useConfig;
const showMobileGoLiveUpsell = Reflect.apply(useConfig, defaultImport,
[{location: 'useScreenshareUtils'}]).showMobileGoLiveUpsell;
return showMobileGoLiveUpsell.useMemo(_fun82918,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore], function() {
return ApplicationStreamingStore.getCurrentUserActiveStream();
}), a0, value2, oSRequirement, showMobileGoLiveUpsell,
(importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations]);
function _fun82918() { // fn#82918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:1492, offset: 0x01f060a5, size: 287 bytes, params: 1, frame: 19
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const r4 = currentUserActiveStream != null && currentUserActiveStream.state === ApplicationStreamStates.ACTIVE;
const object = {};
object.isFeatureEnabled = env0_1 && env0_2;
object.isActive = r4;
object.text = showMobileGoLiveUpsell ? intl.string(t.fjBNo1) : r4 ? intl.string(t.CpkXwZ) : intl.string(t.fjBNo1);
const getStreamPressHandlerBinding = getStreamPressHandler;
showMobileGoLiveUpsellBinding = showMobileGoLiveUpsell;
object.onPress = getStreamPressHandlerBinding({channel: env0_0, hasPermission: env0_1, isActive: r4,
osRequirement: env0_2, showMobileGoLiveUpsell: showMobileGoLiveUpsellBinding,
analyticsLocations: analyticsLocations});
object.imgSource = getShareIcon(r4, showMobileGoLiveUpsellBinding);
return object;
}
}
}
function getStreamPressHandlerS() { // fn#82911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:896, owner: getStreamPressHandler.S, offset: 0x01f05dfd, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(10795) /* metro dependency 10795: MobileGoLiveActionSheet */;
return value.showMobileGoLiveActionSheet(analyticsLocations);
}
function getStreamPressHandlerS_82912() { // fn#82912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:1004, owner: getStreamPressHandler.S, offset: 0x01f05e2a, size: 103 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9235) /* metro dependency 9235: AVError */;
const reportAVError = value.reportAVError;
const AVError = (require(9235) /* metro dependency 9235: AVError */).AVError;
const SCREENSHARE_OS_NOT_SUPPORTED = AVError.SCREENSHARE_OS_NOT_SUPPORTED;
Reflect.apply(reportAVError, value, [{type: SCREENSHARE_OS_NOT_SUPPORTED, channelId: channel.id}]);
(require(9228) /* metro dependency 9228: CallsUtils */).showMinOSScreenshareRequirementAlert();
}
function _fun82918() { // fn#82918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10980:1492, offset: 0x01f060a5, size: 287 bytes, params: 1, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r4 = currentUserActiveStream != null && currentUserActiveStream.state === ApplicationStreamStates.ACTIVE;
const object2 = {};
object2.isFeatureEnabled = env0_1 && env0_2;
object2.isActive = r4;
object2.text = showMobileGoLiveUpsell ? intl.string(t.fjBNo1) : r4 ? intl.string(t.CpkXwZ) : intl.string(t.fjBNo1);
const getStreamPressHandlerBinding = getStreamPressHandler;
showMobileGoLiveUpsellBinding = showMobileGoLiveUpsell;
object2.onPress = getStreamPressHandlerBinding({channel: env0_0, hasPermission: env0_1, isActive: r4,
osRequirement: env0_2, showMobileGoLiveUpsell: showMobileGoLiveUpsellBinding,
analyticsLocations: analyticsLocations});
object2.imgSource = getShareIcon(r4, showMobileGoLiveUpsellBinding);
return object2;
}
global.__d(_fun82906, 10794, [31, 27, 4492, 661, 4092, 7145, 4261, 9228, 8913, 4285, 8899, 9235, 10795, 10600, 1581,
10806, 10807, 10808, 10809, 10801, 566, 6771, 1244,
2]) /* metro module 10794, dependencies: [31, 27, 4492, 661, 4092, 7145, 4261, 9228, 8913, 4285, 8899, 9235, 10795, 10600, 1581, 10806, 10807, 10808, 10809, 10801, 566, 6771, 1244, 2] */;
@@ -1,27 +1,31 @@
/* Metro module 12113; source: modules/video_calls/native/useSelectedActiveStream.tsx; dependencies: [4606, 4492, 566, 2] */
import ApplicationStreamingStore from '../../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import ChannelRTCStore from '../../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun92995(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12299:6, offset: 0x020a2171, size: 130 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useSelectedActiveStream.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useSelectedActiveStream.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStores([ChannelRTCStore, ApplicationStreamingStore], _fun92997);
};
function _default_92996(a0) { // fn#92996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12299:125, offset: 0x020a21f3, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (FluxModule).useStateFromStores([ChannelRTCStore,
ApplicationStreamingStore], _fun92997);
function _fun92997() { // fn#92997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12299:162, offset: 0x020a223d, size: 56 bytes, params: 1, frame: 12
const value = environment.__proto__;
const selectedParticipantId = ChannelRTCStore.getSelectedParticipantId(env0_0.id);
const value4 = null;
return value4 != selectedParticipantId ? ApplicationStreamingStore.getActiveStreamForStreamKey(selectedParticipantId) : value4;
}
}
}
function _default_92996(a0) { // fn#92996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12299:125, offset: 0x020a21f3, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore,
ApplicationStreamingStore], _fun92997);
}
function _fun92997() { // fn#92997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12299:162, offset: 0x020a223d, size: 56 bytes, params: 1, frame: 12
const value = environment.__proto__;
const selectedParticipantId = ChannelRTCStore.getSelectedParticipantId(env0_0.id);
const value4 = null;
return value4 != selectedParticipantId ? ApplicationStreamingStore.getActiveStreamForStreamKey(selectedParticipantId) : value4;
}
global.__d(_fun92995, 12113, [4606, 4492, 566, 2]) /* metro module 12113, dependencies: [4606, 4492, 566, 2] */;
@@ -1,52 +1,58 @@
/* Metro module 10721; source: modules/video_calls/native/useTrackActivityVideoPip.tsx; dependencies: [31, 7730, 661, 632, 6266, 10702, 683, 2] */
import UsePrevious from '../../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */
import ChannelCallLifecycleStore from './ChannelCallLifecycleStore.tsx'; /* Metro dependency 7730 */
import UseCurrentEmbeddedActivity from '../../activities/utils/useCurrentEmbeddedActivity.tsx'; /* Metro dependency 10702 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun82364(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10907:6, offset: 0x01ef4624, size: 159 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelCallLifecycleStore = importDefault(7730) /* metro dependency 7730: ChannelCallLifecycleStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/native/useTrackActivityVideoPip.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/native/useTrackActivityVideoPip.tsx');
exports.default = useTrackActivityPip;
}
function useTrackActivityPip(a0) { // fn#82365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10907:240, offset: 0x01ef46c3, size: 157 bytes, params: 2, frame: 18
const env0_0 = a0;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelCallLifecycleStore],
function() {
return ChannelCallLifecycleStore.isPipEnabledWhileFocusedOnActivityOrStream();
});
const value3 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(value2);
const value4 = (importDefault(10702) /* metro dependency 10702: useCurrentEmbeddedActivity */)();
value4.useEffect(_fun82367, [value2, value3, a0, value4]);
}
function _fun82367() { // fn#82367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10907:401, offset: 0x01ef4773, size: 153 bytes, params: 1, frame: 16
var r3;
var binding;
var value2;
var defaultImport;
var track;
var object2;
if (env0_3 != null) {
if (env0_2 != null) {
binding = env0_1;
if (binding !== env0_2) {
binding = env0_1;
value2 = environment.__proto__;
r3 = binding ? AnalyticEvents.ACTIVITY_VIDEO_PIP_SHOWN : AnalyticEvents.ACTIVITY_VIDEO_PIP_HIDDEN;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
object2 = {};
binding = env0_0;
object2.channel_id = binding.id;
object2.guild_id = binding.guild_id;
binding = env0_3;
object2.application_id = binding.applicationId;
object2.activity_session_id = binding.compositeInstanceId;
Reflect.apply(track, defaultImport, [r3, object2]);
function useTrackActivityPip(a0) { // fn#82365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10907:240, offset: 0x01ef46c3, size: 157 bytes, params: 2, frame: 18
const env0_0 = a0;
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ChannelCallLifecycleStore],
function() {
return ChannelCallLifecycleStore.isPipEnabledWhileFocusedOnActivityOrStream();
});
const value3 = (UsePrevious)(value2);
const value4 = (UseCurrentEmbeddedActivity)();
value4.useEffect(_fun82367, [value2, value3, a0, value4]);
function _fun82367() { // fn#82367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10907:401, offset: 0x01ef4773, size: 153 bytes, params: 1, frame: 16
var r3;
var binding;
var value2;
var defaultImport;
var track;
var object;
if (ReactModule != null) {
if (env0_2 != null) {
binding = env0_1;
if (binding !== env0_2) {
binding = env0_1;
value2 = environment.__proto__;
r3 = binding ? AnalyticEvents.ACTIVITY_VIDEO_PIP_SHOWN : AnalyticEvents.ACTIVITY_VIDEO_PIP_HIDDEN;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
object = {};
binding = env0_0;
object.channel_id = binding.id;
object.guild_id = binding.guild_id;
binding = ReactModule;
object.application_id = binding.applicationId;
object.activity_session_id = binding.compositeInstanceId;
Reflect.apply(track, defaultImport, [r3, object]);
}
}
}
}
}
}
global.__d(_fun82364, 10721, [31, 7730, 661, 632, 6266, 10702, 683,
2]) /* metro module 10721, dependencies: [31, 7730, 661, 632, 6266, 10702, 683, 2] */;
@@ -1,62 +1,68 @@
/* Metro module 10692; source: modules/video_calls/participantHasVideo.tsx; dependencies: [1226, 4259, 4299, 566, 2] */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CallConstantsModule from '../calls/CallConstants.tsx'; /* Metro dependency 4299 */
function _fun82176(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:6, offset: 0x01eedbfd, size: 206 bytes, params: 8, frame: 21
let env0_0 = require;
const closure = participantHasVideo;
const closure2 = canRenderParticipantVideo;
const participantHasVideo2 = participantHasVideo;
const canRenderParticipantVideo2 = canRenderParticipantVideo;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const callConstantsModule = require(4299) /* metro dependency 4299: CallConstants */;
const env0_4 = callConstantsModule.ParticipantTypes;
const env0_5 = callConstantsModule.isStreamParticipant;
const env0_6 = callConstantsModule.isUserParticipant;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/participantHasVideo.tsx');
exports.default = closure;
exports.canRenderParticipantVideo = closure2;
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/participantHasVideo.tsx');
exports.default = participantHasVideo2;
exports.canRenderParticipantVideo = canRenderParticipantVideo2;
exports.useCanRenderParticipantVideo = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStores([MediaEngineStore], _fun82180);
};
}
function participantHasVideo(a0) { // fn#82177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:193, offset: 0x01eedccb, size: 94 bytes, params: 2, frame: 14
const type = a0.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
return type !== ACTIVITY && (isStreamParticipant(a0) ? a0.streamId != null : a0.voiceState?.selfVideo ?? a0.voiceState?.selfVideo != null);
}
function participantHasVideo(a0) { // fn#82177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:193, offset: 0x01eedccb, size: 94 bytes, params: 2, frame: 14
const type = a0.type;
const ACTIVITY = ParticipantTypes.ACTIVITY;
return type !== ACTIVITY && (isStreamParticipant(a0) ? a0.streamId != null : a0.voiceState?.selfVideo ?? a0.voiceState?.selfVideo != null);
}
function canRenderParticipantVideo(a0) { // fn#82178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:340, offset: 0x01eedd29, size: 140 bytes, params: 2, frame: 18
var r2;
var r1;
var r0;
var value2;
var isStreamParticipant2;
let value = a1;
const r6 = value !== undefined ? value : MediaEngineStore;
value = a0 != null;
if (value) {
value2 = participantHasVideo(a0);
if (value2) {
isStreamParticipant2 = isStreamParticipant(a0);
r2 = isStreamParticipant2 ? a0.user.id !== AuthenticationStore.getId() : !isStreamParticipant2;
if (r2) {
value = isUserParticipant(a0);
r2 = value ? !r6.isLocalVideoDisabled(a0.id) : !value;
function canRenderParticipantVideo(a0) { // fn#82178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:340, offset: 0x01eedd29, size: 140 bytes, params: 2, frame: 18
var r2;
var r1;
var r0;
var value2;
var isStreamParticipant2;
let value = a1;
const r6 = value !== undefined ? value : MediaEngineStore;
value = a0 != null;
if (value) {
value2 = participantHasVideo(a0);
if (value2) {
isStreamParticipant2 = isStreamParticipant(a0);
r2 = isStreamParticipant2 ? a0.user.id !== AuthenticationStore.getId() : !isStreamParticipant2;
if (r2) {
value = isUserParticipant(a0);
r2 = value ? !r6.isLocalVideoDisabled(a0.id) : !value;
}
r1 = r2;
} else {
r1 = !!value2;
}
r1 = r2;
r0 = r1;
} else {
r1 = !!value2;
r0 = value;
}
return r0;
}
function useCanRenderParticipantVideo(a0) { // fn#82179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:691, offset: 0x01eeddb5, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (FluxModule).useStateFromStores([MediaEngineStore], _fun82180);
function _fun82180() { // fn#82180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:771, offset: 0x013d7e42, size: 28 bytes, params: 1, frame: 13
return canRenderParticipantVideo(env0_0, MediaEngineStore);
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
function useCanRenderParticipantVideo(a0) { // fn#82179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10878:691, offset: 0x01eeddb5, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], _fun82180);
}
global.__d(_fun82176, 10692, [1226, 4259, 4299, 566,
2]) /* metro module 10692, dependencies: [1226, 4259, 4299, 566, 2] */;
@@ -1,80 +1,89 @@
/* Metro module 9234; source: modules/video_calls/useChannelVideoLimit.tsx; dependencies: [1867, 4300, 661, 566, 2] */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import SortedVoiceStateStore from '../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun72229(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9419:6, offset: 0x01d3ec88, size: 165 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/useChannelVideoLimit.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/useChannelVideoLimit.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStoresObject([SortedVoiceStateStore, GuildStore], _fun72231, [a0]);
};
exports.getChannelVideoLimit = getChannelVideoLimit;
}
function useChannelVideoLimit(a0) { // fn#72230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9419:227, offset: 0x01d3ed2d, size: 84 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStoresObject([SortedVoiceStateStore, GuildStore],
_fun72231, [a0]);
function _fun72231() { // fn#72231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9419:307, offset: 0x01d3ed81, size: 176 bytes, params: 1, frame: 15
var r0;
var object;
var maxVideoChannelUsers;
var maxStageVideoChannelUsers;
let value = environment.__proto__;
const sortedVoiceStateStoreBinding = SortedVoiceStateStore;
const countVoiceStatesForChannel = sortedVoiceStateStoreBinding.countVoiceStatesForChannel;
const binding = env0_0;
const value3 = Reflect.apply(countVoiceStatesForChannel, sortedVoiceStateStoreBinding, [binding.id]);
const guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
const getGuildId = binding.getGuildId;
const value4 = Reflect.apply(getGuild, guildStoreBinding, [Reflect.apply(getGuildId, binding, [])]);
if (value4 == null) {
r0 = {'reachedLimit': false, 'limit': -1};
} else if (env0_0.type === ChannelTypes.GUILD_STAGE_VOICE) {
object = {};
maxStageVideoChannelUsers = value4.maxStageVideoChannelUsers;
object.reachedLimit = value3 > maxStageVideoChannelUsers;
maxStageVideoChannelUsers = value4.maxStageVideoChannelUsers;
object.limit = maxStageVideoChannelUsers;
r0 = object;
} else {
maxVideoChannelUsers = value4.maxVideoChannelUsers;
value = maxVideoChannelUsers > 0;
maxVideoChannelUsers = value4.maxVideoChannelUsers;
r0 = {reachedLimit: value && value3 > value4.maxVideoChannelUsers, limit: maxVideoChannelUsers};
}
return r0;
}
function useChannelVideoLimit(a0) { // fn#72230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9419:227, offset: 0x01d3ed2d, size: 84 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SortedVoiceStateStore, GuildStore],
_fun72231, [a0]);
}
function getChannelVideoLimit(a0) { // fn#72232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9419:658, offset: 0x01d3ee31, size: 168 bytes, params: 2, frame: 14
var r0;
var object2;
var maxVideoChannelUsers;
var maxStageVideoChannelUsers;
var value;
const value2 = SortedVoiceStateStore.countVoiceStatesForChannel(a0.id);
const getGuild = GuildStore.getGuild;
const getGuildId = a0.getGuildId;
const value3 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, a0, [])]);
if (value3 == null) {
r0 = {'reachedLimit': false, 'limit': -1};
} else if (a0.type === ChannelTypes.GUILD_STAGE_VOICE) {
object2 = {};
maxStageVideoChannelUsers = value3.maxStageVideoChannelUsers;
object2.reachedLimit = value2 > maxStageVideoChannelUsers;
maxStageVideoChannelUsers = value3.maxStageVideoChannelUsers;
object2.limit = maxStageVideoChannelUsers;
r0 = object2;
} else {
maxVideoChannelUsers = value3.maxVideoChannelUsers;
value = maxVideoChannelUsers > 0;
maxVideoChannelUsers = value3.maxVideoChannelUsers;
r0 = {reachedLimit: value && value2 > value3.maxVideoChannelUsers, limit: maxVideoChannelUsers};
}
return r0;
}
function _fun72231() { // fn#72231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9419:307, offset: 0x01d3ed81, size: 176 bytes, params: 1, frame: 15
var r0;
var object2;
var maxVideoChannelUsers;
var maxStageVideoChannelUsers;
let value = environment.__proto__;
const countVoiceStatesForChannel = SortedVoiceStateStore.countVoiceStatesForChannel;
const binding = env0_0;
const value3 = Reflect.apply(countVoiceStatesForChannel, SortedVoiceStateStore, [binding.id]);
const getGuild = GuildStore.getGuild;
const getGuildId = binding.getGuildId;
const value4 = Reflect.apply(getGuild, GuildStore, [Reflect.apply(getGuildId, binding, [])]);
if (value4 == null) {
r0 = {'reachedLimit': false, 'limit': -1};
} else if (env0_0.type === ChannelTypes.GUILD_STAGE_VOICE) {
object2 = {};
maxStageVideoChannelUsers = value4.maxStageVideoChannelUsers;
object2.reachedLimit = value3 > maxStageVideoChannelUsers;
maxStageVideoChannelUsers = value4.maxStageVideoChannelUsers;
object2.limit = maxStageVideoChannelUsers;
r0 = object2;
} else {
maxVideoChannelUsers = value4.maxVideoChannelUsers;
value = maxVideoChannelUsers > 0;
maxVideoChannelUsers = value4.maxVideoChannelUsers;
r0 = {reachedLimit: value && value3 > value4.maxVideoChannelUsers, limit: maxVideoChannelUsers};
function getChannelVideoLimit(a0) { // fn#72232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9419:658, offset: 0x01d3ee31, size: 168 bytes, params: 2, frame: 14
var r0;
var object;
var maxVideoChannelUsers;
var maxStageVideoChannelUsers;
var value;
const sortedVoiceStateStoreBinding = SortedVoiceStateStore;
const value2 = sortedVoiceStateStoreBinding.countVoiceStatesForChannel(a0.id);
const guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
const getGuildId = a0.getGuildId;
const value3 = Reflect.apply(getGuild, guildStoreBinding, [Reflect.apply(getGuildId, a0, [])]);
if (value3 == null) {
r0 = {'reachedLimit': false, 'limit': -1};
} else if (a0.type === ChannelTypes.GUILD_STAGE_VOICE) {
object = {};
maxStageVideoChannelUsers = value3.maxStageVideoChannelUsers;
object.reachedLimit = value2 > maxStageVideoChannelUsers;
maxStageVideoChannelUsers = value3.maxStageVideoChannelUsers;
object.limit = maxStageVideoChannelUsers;
r0 = object;
} else {
maxVideoChannelUsers = value3.maxVideoChannelUsers;
value = maxVideoChannelUsers > 0;
maxVideoChannelUsers = value3.maxVideoChannelUsers;
r0 = {reachedLimit: value && value2 > value3.maxVideoChannelUsers, limit: maxVideoChannelUsers};
}
return r0;
}
return r0;
}
global.__d(_fun72229, 9234, [1867, 4300, 661, 566,
2]) /* metro module 9234, dependencies: [1867, 4300, 661, 566, 2] */;
+36 -31
View File
@@ -1,47 +1,52 @@
/* Metro module 10845; source: modules/video_calls/useDeafStates.tsx; dependencies: [1226, 4259, 4297, 566, 2] */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoiceStateStore from '../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun83124(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:6, offset: 0x01f0e5c4, size: 163 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = getDeafStates;
const getDeafStates2 = getDeafStates;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/useDeafStates.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/useDeafStates.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStoresObject([VoiceStateStore, MediaEngineStore,
AuthenticationStore],
_fun83127, [a0]);
};
exports.getDeafStates = closure;
}
exports.getDeafStates = getDeafStates2;
function getDeafStates(a0) { // fn#83125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:126, offset: 0x01f0e667, size: 139 bytes, params: 2, frame: 18
let value = a1;
const value2 = a2;
const value3 = a3;
const value4 = undefined;
const r7 = value !== value4 ? value : VoiceStateStore;
const r5 = value2 !== value4 ? value2 : MediaEngineStore;
const r8 = value3 !== value4 ? value3 : AuthenticationStore;
value = null;
const r3 = value != a0 ? r7.getVoiceState(a0.getGuildId(), r8.getId()) : value;
const object = {};
object.selfDeaf = r5.isSelfDeaf();
const deaf = value == r3 ? value4 : r3.deaf;
value = value != deaf;
object.deaf = value && deaf;
return object;
}
function getDeafStates(a0) { // fn#83125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:126, offset: 0x01f0e667, size: 139 bytes, params: 2, frame: 18
let value = a1;
const value2 = a2;
const value3 = a3;
const value4 = undefined;
const r7 = value !== value4 ? value : VoiceStateStore;
const r5 = value2 !== value4 ? value2 : MediaEngineStore;
const r8 = value3 !== value4 ? value3 : AuthenticationStore;
value = null;
const r3 = value != a0 ? r7.getVoiceState(a0.getGuildId(), r8.getId()) : value;
const object2 = {};
object2.selfDeaf = r5.isSelfDeaf();
const deaf = value == r3 ? value4 : r3.deaf;
value = value != deaf;
object2.deaf = value && deaf;
return object2;
}
function useDeafStates(a0) { // fn#83126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:380, offset: 0x01f0e6f2, size: 92 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStoresObject([VoiceStateStore, MediaEngineStore,
AuthenticationStore], _fun83127, [a0]);
function _fun83127() { // fn#83127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:455, offset: 0x01f0e74e, size: 34 bytes, params: 1, frame: 17
return getDeafStates(env0_0, VoiceStateStore, MediaEngineStore, AuthenticationStore);
}
function useDeafStates(a0) { // fn#83126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:380, offset: 0x01f0e6f2, size: 92 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([VoiceStateStore, MediaEngineStore,
AuthenticationStore], _fun83127, [a0]);
}
}
function _fun83127() { // fn#83127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11031:455, offset: 0x01f0e74e, size: 34 bytes, params: 1, frame: 17
return getDeafStates(env0_0, VoiceStateStore, MediaEngineStore, AuthenticationStore);
}
global.__d(_fun83124, 10845, [1226, 4259, 4297, 566,
2]) /* metro module 10845, dependencies: [1226, 4259, 4297, 566, 2] */;
@@ -1,49 +1,62 @@
/* Metro module 10600; source: modules/video_calls/useHasVideoPermission.tsx; dependencies: [1867, 3784, 566, 7118, 2] */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun81719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10786:6, offset: 0x01edb841, size: 143 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/useHasVideoPermission.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/useHasVideoPermission.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStores([GuildStore, PermissionStore], _fun81721, [a0]);
};
exports.getVideoPermission = getVideoPermission;
}
function useHasVideoPermission(a0) { // fn#81720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10786:205, offset: 0x01edb8d0, size: 83 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, PermissionStore], _fun81721,
[a0]);
}
function getVideoPermission(a0) { // fn#81722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10786:375, offset: 0x01edb97d, size: 69 bytes, params: 2, frame: 18
return a0.isPrivate() || (require(7118) /* metro dependency 7118: StreamPermissionUtils */).canStreamInChannel(a0,
GuildStore, PermissionStore, false);
}
function _fun81721() { // fn#81721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10786:280, offset: 0x01edb923, size: 90 bytes, params: 1, frame: 19
var r1;
var r0;
var isPrivate2;
var value3;
var moduleValue;
const value2 = env0_0 != null;
if (value2) {
isPrivate2 = env0_0.isPrivate();
if (isPrivate2) {
r1 = isPrivate2;
} else {
value3 = environment.__proto__;
moduleValue = require(7118) /* metro dependency 7118: StreamPermissionUtils */;
r1 = moduleValue.canStreamInChannel(env0_0, GuildStore, PermissionStore, false);
function useHasVideoPermission(a0) { // fn#81720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10786:205, offset: 0x01edb8d0, size: 83 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStores([GuildStore, PermissionStore], _fun81721,
[a0]);
function _fun81721() { // fn#81721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10786:280, offset: 0x01edb923, size: 90 bytes, params: 1, frame: 19
var r1;
var r0;
var isPrivate2;
var value3;
var moduleValue;
const value2 = env0_0 != null;
if (value2) {
isPrivate2 = env0_0.isPrivate();
if (isPrivate2) {
r1 = isPrivate2;
} else {
value3 = environment.__proto__;
moduleValue = require(7118) /* metro dependency 7118: StreamPermissionUtils */;
r1 = moduleValue.canStreamInChannel(env0_0, GuildStore, PermissionStore, false);
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
function getVideoPermission(a0) { // fn#81722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10786:375, offset: 0x01edb97d, size: 69 bytes, params: 2, frame: 18
var r0;
var moduleValue;
const isPrivate = a0.isPrivate();
if (isPrivate) {
r0 = isPrivate;
} else {
moduleValue = require(7118) /* metro dependency 7118: StreamPermissionUtils */;
r0 = moduleValue.canStreamInChannel(a0, GuildStore, PermissionStore, false);
}
return r0;
}
}
global.__d(_fun81719, 10600, [1867, 3784, 566, 7118,
2]) /* metro module 10600, dependencies: [1867, 3784, 566, 7118, 2] */;
@@ -1,22 +1,26 @@
/* Metro module 10720; source: modules/video_calls/useIsStreamFocused.tsx; dependencies: [4606, 4299, 566, 2] */
import ChannelRTCStore from '../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CallConstantsModule from '../calls/CallConstants.tsx'; /* Metro dependency 4299 */
function _fun82361(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10906:6, offset: 0x01ef4520, size: 136 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const env0_3 = (require(4299) /* metro dependency 4299: CallConstants */).isStreamParticipant;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/useIsStreamFocused.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/useIsStreamFocused.tsx');
exports.useIsStreamFocused = useIsStreamFocused;
function useIsStreamFocused(a0) { // fn#82362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10906:233, offset: 0x01ef45a8, size: 84 bytes, params: 2, frame: 16
const env0_0 = a0;
const value2 = (FluxModule).useStateFromStores([ChannelRTCStore], _fun82363);
return value2 != null && isStreamParticipant(value2);
function _fun82363() { // fn#82363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10906:302, offset: 0x01ef45fc, size: 40 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_0 ? ChannelRTCStore.getSelectedParticipant(env0_0) : value2;
}
}
}
function useIsStreamFocused(a0) { // fn#82362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10906:233, offset: 0x01ef45a8, size: 84 bytes, params: 2, frame: 16
const env0_0 = a0;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore], _fun82363);
return value2 != null && isStreamParticipant(value2);
}
function _fun82363() { // fn#82363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10906:302, offset: 0x01ef45fc, size: 40 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_0 ? ChannelRTCStore.getSelectedParticipant(env0_0) : value2;
}
global.__d(_fun82361, 10720, [4606, 4299, 566, 2]) /* metro module 10720, dependencies: [4606, 4299, 566, 2] */;
+39 -32
View File
@@ -1,48 +1,55 @@
/* Metro module 6952; source: modules/video_calls/useMuteStates.tsx; dependencies: [1937, 1226, 4259, 3784, 4297, 661, 566, 2] */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ImpersonateStore from '../impersonate/ImpersonateStore.tsx'; /* Metro dependency 1937 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import MediaEngineStore from '../../stores/MediaEngineStore.tsx'; /* Metro dependency 4259 */
import VoiceStateStore from '../../stores/VoiceStateStore.tsx'; /* Metro dependency 4297 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun55305(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7130:6, offset: 0x0137b2e9, size: 213 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = getMuteStates;
const getMuteStates2 = getMuteStates;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const impersonateStore = importDefault(1937) /* metro dependency 1937: ImpersonateStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/useMuteStates.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/useMuteStates.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[6]).useStateFromStoresObject([AuthenticationStore, VoiceStateStore,
MediaEngineStore,
PermissionStore, ImpersonateStore], _fun55308);
};
exports.getMuteStates = closure;
}
exports.getMuteStates = getMuteStates2;
function getMuteStates({channel, authenticationStore, voiceStateStore, mediaEngineStore, permissionStore, impersonateStore}) { // fn#55306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7130:168, offset: 0x0137b3be, size: 287 bytes, params: 2, frame: 21
const value = undefined;
const authenticationStore2 = authenticationStore !== value ? authenticationStore : authenticationStore;
const voiceStateStore2 = voiceStateStore !== value ? voiceStateStore : voiceStateStore;
const mediaEngineStore2 = mediaEngineStore !== value ? mediaEngineStore : mediaEngineStore;
const permissionStore2 = permissionStore !== value ? permissionStore : permissionStore;
const impersonateStore2 = impersonateStore !== value ? impersonateStore : impersonateStore;
const r3 = channel != null ? voiceStateStore2.getVoiceState(channel.getGuildId(),
authenticationStore2.getId()) : null;
const r4 = mediaEngineStore2.isSelfMute() || mediaEngineStore2.isSelfMutedTemporarily();
const r5 = impersonateStore2.isViewingRoles(channel == null ? value : channel.getGuildId()) && !permissionStore2.can(Permissions.SPEAK,
channel);
const suppress = r3 == null ? value : r3.suppress;
const mute = r3 == null ? value : r3.mute;
return {selfMute: r4, suppress: suppress || r5, mute: mute != null && mute};
}
function getMuteStates({channel, authenticationStore, voiceStateStore, mediaEngineStore, permissionStore, impersonateStore}) { // fn#55306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7130:168, offset: 0x0137b3be, size: 287 bytes, params: 2, frame: 21
const value = undefined;
const r11 = authenticationStore !== value ? authenticationStore : AuthenticationStore;
const r10 = voiceStateStore !== value ? voiceStateStore : VoiceStateStore;
let r5 = mediaEngineStore !== value ? mediaEngineStore : MediaEngineStore;
const r7 = permissionStore !== value ? permissionStore : PermissionStore;
const r6 = impersonateStore !== value ? impersonateStore : ImpersonateStore;
const r3 = channel != null ? r10.getVoiceState(channel.getGuildId(), r11.getId()) : null;
const r4 = r5.isSelfMute() || r5.isSelfMutedTemporarily();
r5 = r6.isViewingRoles(channel == null ? value : channel.getGuildId()) && !r7.can(Permissions.SPEAK, channel);
const suppress = r3 == null ? value : r3.suppress;
const mute = r3 == null ? value : r3.mute;
return {selfMute: r4, suppress: suppress || r5, mute: mute != null && mute};
}
function useMuteStates(a0) { // fn#55307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7130:671, offset: 0x0137b4dd, size: 97 bytes, params: 2, frame: 15
const env0_0 = a0;
return (FluxModule).useStateFromStoresObject([AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore], _fun55308);
function _fun55308() { // fn#55308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7130:750, offset: 0x0137b53e, size: 74 bytes, params: 1, frame: 12
return getMuteStates({channel: env0_0, authenticationStore: AuthenticationStore, voiceStateStore: VoiceStateStore,
mediaEngineStore: MediaEngineStore, permissionStore: PermissionStore, impersonateStore: ImpersonateStore});
}
function useMuteStates(a0) { // fn#55307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7130:671, offset: 0x0137b4dd, size: 97 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([AuthenticationStore,
VoiceStateStore, MediaEngineStore, PermissionStore, ImpersonateStore], _fun55308);
}
}
function _fun55308() { // fn#55308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7130:750, offset: 0x0137b53e, size: 74 bytes, params: 1, frame: 12
return getMuteStates({channel: env0_0, authenticationStore: AuthenticationStore, voiceStateStore: VoiceStateStore,
mediaEngineStore: MediaEngineStore, permissionStore: PermissionStore, impersonateStore: ImpersonateStore});
}
global.__d(_fun55305, 6952, [1937, 1226, 4259, 3784, 4297, 661, 566,
2]) /* metro module 6952, dependencies: [1937, 1226, 4259, 3784, 4297, 661, 566, 2] */;
@@ -1,22 +1,26 @@
/* Metro module 7720; source: modules/video_calls/useSelectedParticipant.tsx; dependencies: [4606, 566, 2] */
import ChannelRTCStore from '../calls/ChannelRTCStore.tsx'; /* Metro dependency 4606 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun61766(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7898:6, offset: 0x01b4a312, size: 112 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/useSelectedParticipant.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/useSelectedParticipant.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[1]).useStateFromStores([ChannelRTCStore], _fun61768);
};
function _default_61767(a0) { // fn#61767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7898:115, offset: 0x01b4a382, size: 64 bytes, params: 2, frame: 14
const env0_0 = a0;
return (FluxModule).useStateFromStores([ChannelRTCStore], _fun61768);
function _fun61768() { // fn#61768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7898:150, offset: 0x01b4a3c2, size: 32 bytes, params: 1, frame: 11
return ChannelRTCStore.getSelectedParticipant(env0_0.id);
}
}
}
function _default_61767(a0) { // fn#61767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7898:115, offset: 0x01b4a382, size: 64 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelRTCStore], _fun61768);
}
function _fun61768() { // fn#61768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7898:150, offset: 0x01b4a3c2, size: 32 bytes, params: 1, frame: 11
return ChannelRTCStore.getSelectedParticipant(env0_0.id);
}
global.__d(_fun61766, 7720, [4606, 566, 2]) /* metro module 7720, dependencies: [4606, 566, 2] */;
@@ -1,41 +1,45 @@
/* Metro module 10679; source: modules/video_calls/useVideoSpinnerTimer.tsx; dependencies: [57, 31, 10680, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as VideoSpinnerTimerModule from '../../lib/VideoSpinnerTimer.tsx'; /* Metro dependency 10680 */
function _fun82112(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10865:6, offset: 0x01eeba12, size: 133 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_calls/useVideoSpinnerTimer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/video_calls/useVideoSpinnerTimer.tsx');
exports.default = useVideoSpinnerTimer;
}
function useVideoSpinnerTimer({location, videoSpinnerContext, userId, streamId, loading, paused}) { // fn#82113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10865:204, offset: 0x01eeba97, size: 170 bytes, params: 2, frame: 20
const env0_2 = userId;
const env0_3 = streamId;
paused = !(paused === undefined) && paused;
const binding = env0_3;
binding.useEffect(_fun82115, [loading, paused, streamId, env0_2(binding.useState(_fun82114), 1)[0],
videoSpinnerContext, userId]);
}
function _fun82114() { // fn#82114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10865:330, offset: 0x01eebb41, size: 60 bytes, params: 1, frame: 11
let value = environment.__proto__;
const VideoSpinnerTimer = (require(10680) /* metro dependency 10680: VideoSpinnerTimer */).VideoSpinnerTimer;
const locationBinding = location;
value = Object.create(VideoSpinnerTimer.prototype, {constructor: {value: VideoSpinnerTimer}});
const videoSpinnerTimer = new VideoSpinnerTimer(locationBinding);
return videoSpinnerTimer instanceof Object ? videoSpinnerTimer : value;
}
function _fun82115() { // fn#82115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10865:395, offset: 0x01eebb7d, size: 80 bytes, params: 1, frame: 16
var binding;
if (!paused) {
if (loading) {
env0_6.onSpinnerStarted();
} else if (streamId != null) {
binding = env0_6;
binding.trackSpinnerDuration(videoSpinnerContext, userId, streamId);
function useVideoSpinnerTimer({location, videoSpinnerContext, userId, streamId, loading, paused}) { // fn#82113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10865:204, offset: 0x01eeba97, size: 170 bytes, params: 2, frame: 20
const userId2 = userId;
const streamId2 = streamId;
paused = !(paused === undefined) && paused;
const binding = streamId2;
binding.useEffect(_fun82115, [loading, paused, streamId, userId2(binding.useState(_fun82114), 1)[0],
videoSpinnerContext, userId]);
function _fun82114() { // fn#82114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10865:330, offset: 0x01eebb41, size: 60 bytes, params: 1, frame: 11
let value = environment.__proto__;
const VideoSpinnerTimer = (VideoSpinnerTimerModule).VideoSpinnerTimer;
const locationBinding = location;
value = Object.create(VideoSpinnerTimer.prototype, {constructor: {value: VideoSpinnerTimer}});
const videoSpinnerTimer = new VideoSpinnerTimer(locationBinding);
return videoSpinnerTimer instanceof Object ? videoSpinnerTimer : value;
}
function _fun82115() { // fn#82115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10865:395, offset: 0x01eebb7d, size: 80 bytes, params: 1, frame: 16
var binding;
if (!paused) {
if (loading) {
env0_6.onSpinnerStarted();
} else if (streamId != null) {
binding = env0_6;
binding.trackSpinnerDuration(videoSpinnerContext, userId, streamId);
}
}
}
}
}
global.__d(_fun82112, 10679, [57, 31, 10680, 2]) /* metro module 10679, dependencies: [57, 31, 10680, 2] */;