/* Metro module 10653; source: modules/activities/utils/selectAndWaitForVoiceChannelJoin.native.tsx; dependencies: [5, 7, 6, 15, 17, 18, 162, 1934, 4796, 2] */ function _fun81939(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:6, offset: 0x01ee5280, size: 271 bytes, params: 8, frame: 19 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_2 = importDefault(5) /* metro dependency 5 */; const env0_3 = importDefault(7) /* metro dependency 7 */; const env0_4 = importDefault(6) /* metro dependency 6 */; const env0_5 = importDefault(15) /* metro dependency 15 */; const env0_6 = importDefault(17) /* metro dependency 17 */; const env0_7 = importDefault(18) /* metro dependency 18 */; let value = importDefault(162) /* metro dependency 162 */; const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */; const Error = global.Error; value = value(Error); const env0_9 = _fun81949(value); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/utils/selectAndWaitForVoiceChannelJoin.native.tsx'); exports.default = function() { return _selectAndWaitForVoiceChannelJoin.apply(this, arguments); }; } function _isNativeReflectConstruct_81940() { // fn#81940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:178, offset: 0x01ee538f, 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_81940_isNativeReflectConstruct = function() { return !!result; })(); } function _selectAndWaitForVoiceChannelJoin() { // fn#81943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:674, offset: 0x01ee53f1, size: 50 bytes, params: 1, frame: 14 return env0_2(_fun81945).apply(this, arguments); } function _fun81949(a0) { // fn#81949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:377, offset: 0x01ee55a7, size: 42 bytes, params: 2, frame: 14 const closure = JoinTimeoutError; env0_7(closure, a0); return env0_3(closure); } async function _fun81945({channelId, timeoutMs}) { // fn#81945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:763, offset: 0x01ee5437, size: 177 bytes, params: 2, frame: 18 var value6; var error; if (false) { return undefined; } if (timeoutMs !== undefined) { } await undefined; if (false) { return undefined; } const Promise = global.Promise; let promise = new Promise(_fun81946); env2_0(env2_1[8]).selectVoiceChannel(channelId); await promise; try { promise = undefined; value6 = false; } catch (error) { if (error instanceof env2_9) { return false; } throw error; } if (value6) { return promise; } return true; } function JoinTimeoutError() { // fn#81950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:389, offset: 0x01ee55d1, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_4(this, JoinTimeoutError); const value3 = env1_6(JoinTimeoutError); return env1_5(this, _isNativeReflectConstruct_81940() ? global.Reflect.construct(value3, arguments, env1_6(this).constructor) : value3.apply(this, arguments)); } function _fun81946(a0, a1) { // fn#81946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:823, offset: 0x01ee54e8, size: 77 bytes, params: 3, frame: 14 const env0_0 = a0; const env0_1 = a1; const env0_2 = global.setTimeout(_fun81947, timeoutMs); env3_8.addConditionalChangeListener(_fun81948); } function _fun81947() { // fn#81947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:849, offset: 0x01ee5535, size: 49 bytes, params: 1, frame: 12 const value = environment.__proto__.__proto__.__proto__.__proto__; require(new env4_9('Joining voice channel has timed out.')); } function _fun81948() { // fn#81948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10839:940, offset: 0x01ee5566, size: 65 bytes, params: 1, frame: 13 var r0; let value = environment.__proto__.__proto__.__proto__.__proto__; value = env4_8.getVoiceChannelId(); value = value !== channelId; if (value) { r0 = value; } else { global.clearTimeout(env0_2); env0_0(); r0 = false; } return r0; }