1069 lines
44 KiB
TypeScript
1069 lines
44 KiB
TypeScript
/* Metro module 9422; source: modules/game_console/GameConsoleActionCreators.tsx; dependencies: [5, 4294, 4296, 4295, 661, 683, 694, 4647, 1244, 8901, 9423, 507, 1216, 9424, 9425, 9428, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import AnalyticsUtils from '../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
|
|
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
|
|
import GameConsoleStore from './GameConsoleStore.tsx'; /* Metro dependency 4295 */
|
|
import SessionsStore from '../../stores/SessionsStore.tsx'; /* Metro dependency 4296 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as AudioSettingsUtilsModule from '../user_settings/voice/AudioSettingsUtils.tsx'; /* Metro dependency 8901 */
|
|
|
|
function _fun73350(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:6, offset: 0x01d69d3a, size: 448 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const closure = function() {
|
|
return _disconnectRemote.apply(this, arguments);
|
|
};
|
|
const closure2 = function() {
|
|
return _getConnectNonce.apply(this, arguments);
|
|
};
|
|
const closure3 = function(a0) {
|
|
var HTTP = require(dependencyMap[11]).HTTP;
|
|
var object = {};
|
|
object.url = Endpoints.CONNECT_REQUEST(a0);
|
|
object.rejectWithError = false;
|
|
return HTTP.del(object);
|
|
};
|
|
const closure4 = function() {
|
|
return _cancelCommand.apply(this, arguments);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/game_console/GameConsoleActionCreators.tsx');
|
|
exports.waitForSession = waitForSession;
|
|
exports.disconnectRemote = closure;
|
|
exports.connectToRemote = connectToRemote;
|
|
exports.remoteVoiceStateUpdate = function(a0, {selfMute, selfDeaf}) {
|
|
importDefault(dependencyMap[6]).dispatch({type: 'REMOTE_COMMAND', sessionId: a0,
|
|
payload: {type: 'VOICE_STATE_UPDATE', self_mute: selfMute, self_deaf: selfDeaf}});
|
|
logRemoteCommand('VOICE_STATE_UPDATE', a0);
|
|
};
|
|
exports.remoteDisconnect = function(a0) {
|
|
importDefault(dependencyMap[6]).dispatch({type: 'REMOTE_COMMAND', sessionId: a0,
|
|
payload: {type: 'DISCONNECT'}});
|
|
logRemoteCommand('DISCONNECT', a0);
|
|
disconnectRemote();
|
|
};
|
|
exports.remoteAudioSettingsUpdate = remoteAudioSettingsUpdate;
|
|
exports.getConnectNonce = closure2;
|
|
exports.cancelConnectRequest = closure3;
|
|
exports.fetchDevices = function() {
|
|
return _fetchDevices.apply(this, arguments);
|
|
};
|
|
exports.persistSelectedDeviceId = persistSelectedDeviceId;
|
|
exports.cancelCommand = closure4;
|
|
exports.transferToPlayStation = function() {
|
|
return _transferToPlayStation.apply(this, arguments);
|
|
};
|
|
function logRemoteCommand(a0, a1) { // fn#73351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:199, offset: 0x01d69efa, size: 115 bytes, params: 3, frame: 18
|
|
const value2 = undefined;
|
|
const defaultImport = AnalyticsUtils;
|
|
const track = defaultImport.track;
|
|
const REMOTE_COMMAND_SENT = AnalyticEvents.REMOTE_COMMAND_SENT;
|
|
const sessionById = SessionsStore.getSessionById(a1);
|
|
Reflect.apply(track, defaultImport, [REMOTE_COMMAND_SENT, {command_type: a0,
|
|
remote_platform: sessionById == null || sessionById.clientInfo == null ? value2 : sessionById.clientInfo.os}]);
|
|
return value2;
|
|
}
|
|
|
|
function _disconnectRemote() { // fn#73353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:447, offset: 0x01d69f6d, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun73355).apply(this, arguments);
|
|
function* _fun73355() { // fn#73355, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:504, offset: 0x01d69faa, size: 450 bytes, params: 1, frame: 22
|
|
var push;
|
|
var Promise;
|
|
var all;
|
|
var value10;
|
|
var value11;
|
|
var value12;
|
|
var error;
|
|
var binding2;
|
|
var value13;
|
|
var show;
|
|
var intl;
|
|
var string;
|
|
var t;
|
|
var LNhXcL;
|
|
var QnKxtP;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
let binding = env2_6;
|
|
const awaitingRemoteSessionInfo = binding.getAwaitingRemoteSessionInfo();
|
|
const nonce = awaitingRemoteSessionInfo == null ? value : awaitingRemoteSessionInfo.nonce;
|
|
env2_1(env2_2[6]).dispatch({type: 'REMOTE_SESSION_DISCONNECT'});
|
|
object = [];
|
|
const type = awaitingRemoteSessionInfo == null ? value : awaitingRemoteSessionInfo.type;
|
|
const PLAYSTATION = env2_9.PLAYSTATION;
|
|
let r6 = type !== PLAYSTATION && (awaitingRemoteSessionInfo == null ? value : awaitingRemoteSessionInfo.type) !== env2_9.PLAYSTATION_STAGING;
|
|
r6 = !r6 ? (awaitingRemoteSessionInfo == null ? value : awaitingRemoteSessionInfo.commandId) == null : r6;
|
|
r6 = !r6 ? (awaitingRemoteSessionInfo == null ? value : awaitingRemoteSessionInfo.deviceId) == null : r6;
|
|
if (!r6) {
|
|
push = object.push;
|
|
binding = env2_18;
|
|
Reflect.apply(push, object, [binding(awaitingRemoteSessionInfo.type, awaitingRemoteSessionInfo.deviceId,
|
|
awaitingRemoteSessionInfo.commandId)]);
|
|
}
|
|
if (nonce != null) {
|
|
object.push(env2_15(nonce));
|
|
}
|
|
try {
|
|
Promise = global.Promise;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
binding2 = env2_2;
|
|
value13 = binding(binding2[7]);
|
|
show = value13.show;
|
|
object = {};
|
|
binding = env2_0;
|
|
intl = binding(binding2[8]).intl;
|
|
string = intl.string;
|
|
t = binding(binding2[8]).t;
|
|
LNhXcL = t.LNhXcL;
|
|
object.title = Reflect.apply(string, intl, [LNhXcL]);
|
|
intl = binding(binding2[8]).intl;
|
|
string = intl.string;
|
|
t = binding(binding2[8]).t;
|
|
QnKxtP = t.QnKxtP;
|
|
object.body = Reflect.apply(string, intl, [QnKxtP]);
|
|
Reflect.apply(show, value13, [object]);
|
|
return value;
|
|
}
|
|
try {
|
|
all = Promise.all;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
binding2 = env2_2;
|
|
value13 = binding(binding2[7]);
|
|
show = value13.show;
|
|
object = {};
|
|
binding = env2_0;
|
|
intl = binding(binding2[8]).intl;
|
|
string = intl.string;
|
|
t = binding(binding2[8]).t;
|
|
LNhXcL = t.LNhXcL;
|
|
object.title = Reflect.apply(string, intl, [LNhXcL]);
|
|
intl = binding(binding2[8]).intl;
|
|
string = intl.string;
|
|
t = binding(binding2[8]).t;
|
|
QnKxtP = t.QnKxtP;
|
|
object.body = Reflect.apply(string, intl, [QnKxtP]);
|
|
Reflect.apply(show, value13, [object]);
|
|
return value;
|
|
}
|
|
try {
|
|
value10 = Reflect.apply(all, Promise, [object]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
binding2 = env2_2;
|
|
value13 = binding(binding2[7]);
|
|
show = value13.show;
|
|
object = {};
|
|
binding = env2_0;
|
|
intl = binding(binding2[8]).intl;
|
|
string = intl.string;
|
|
t = binding(binding2[8]).t;
|
|
LNhXcL = t.LNhXcL;
|
|
object.title = Reflect.apply(string, intl, [LNhXcL]);
|
|
intl = binding(binding2[8]).intl;
|
|
string = intl.string;
|
|
t = binding(binding2[8]).t;
|
|
QnKxtP = t.QnKxtP;
|
|
object.body = Reflect.apply(string, intl, [QnKxtP]);
|
|
Reflect.apply(show, value13, [object]);
|
|
return value;
|
|
}
|
|
yield value10;
|
|
try {
|
|
value11 = undefined;
|
|
value12 = false;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
binding2 = env2_2;
|
|
value13 = binding(binding2[7]);
|
|
show = value13.show;
|
|
object = {};
|
|
binding = env2_0;
|
|
intl = binding(binding2[8]).intl;
|
|
string = intl.string;
|
|
t = binding(binding2[8]).t;
|
|
LNhXcL = t.LNhXcL;
|
|
object.title = Reflect.apply(string, intl, [LNhXcL]);
|
|
intl = binding(binding2[8]).intl;
|
|
string = intl.string;
|
|
t = binding(binding2[8]).t;
|
|
QnKxtP = t.QnKxtP;
|
|
object.body = Reflect.apply(string, intl, [QnKxtP]);
|
|
Reflect.apply(show, value13, [object]);
|
|
return value;
|
|
}
|
|
return value12 ? value11 : value;
|
|
}
|
|
|
|
}
|
|
|
|
function _getConnectNonce() { // fn#73357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:1134, offset: 0x01d6a16c, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun73359).apply(this, arguments);
|
|
function* _fun73359() { // fn#73359, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:1189, offset: 0x01d6a1a9, size: 251 bytes, params: 1, frame: 17
|
|
var r8;
|
|
var nonce;
|
|
var binding;
|
|
var getRTCConnectionId;
|
|
var value4;
|
|
var value5;
|
|
var binding2;
|
|
var property;
|
|
var value6;
|
|
var ConsoleHandoffType;
|
|
var CREATE_NEW_CALL;
|
|
var binding3;
|
|
var value7;
|
|
var TRANSFER_EXISTING_CALL;
|
|
var binding4;
|
|
var value8;
|
|
var HTTP;
|
|
var post;
|
|
var object;
|
|
var CONNECT_REQUEST_CREATE;
|
|
var object2;
|
|
var object3;
|
|
var value9;
|
|
var value10;
|
|
var value11;
|
|
var body;
|
|
var error;
|
|
var value12;
|
|
var captureException;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
reduciblePort49: while (true) {
|
|
exceptionLanding48: while (true) {
|
|
try {
|
|
binding = env2_4;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
binding = env2_1;
|
|
value12 = binding(env2_2[12]);
|
|
captureException = value12.captureException;
|
|
Reflect.apply(captureException, value12, [error]);
|
|
nonce = undefined;
|
|
break reduciblePort49;
|
|
}
|
|
return nonce;
|
|
}
|
|
try {
|
|
getRTCConnectionId = binding.getRTCConnectionId;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
value4 = Reflect.apply(getRTCConnectionId, binding, []);
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
value5 = value4 != null;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
if (value5) {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
property = binding3[10];
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
value7 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
ConsoleHandoffType = value7.ConsoleHandoffType;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
TRANSFER_EXISTING_CALL = ConsoleHandoffType.TRANSFER_EXISTING_CALL;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
r8 = TRANSFER_EXISTING_CALL;
|
|
} else {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
property = binding2[10];
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
value6 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
ConsoleHandoffType = value6.ConsoleHandoffType;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
CREATE_NEW_CALL = ConsoleHandoffType.CREATE_NEW_CALL;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
r8 = CREATE_NEW_CALL;
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
binding4 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
property = binding4[11];
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
value8 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
HTTP = value8.HTTP;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
post = HTTP.post;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
binding = env2_8;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
CONNECT_REQUEST_CREATE = binding.CONNECT_REQUEST_CREATE;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
object.url = CONNECT_REQUEST_CREATE;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
object3 = {};
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
object3.handoff_type = r8;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
object2.analytics_properties = object3;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
object.body = object2;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
object.rejectWithError = false;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
value9 = Reflect.apply(post, HTTP, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
yield value9;
|
|
try {
|
|
value10 = undefined;
|
|
value11 = false;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
if (value11) {
|
|
return value10;
|
|
}
|
|
try {
|
|
body = value10.body;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
try {
|
|
nonce = body.nonce;
|
|
} catch (error) {
|
|
break exceptionLanding48;
|
|
}
|
|
return nonce;
|
|
}
|
|
|
|
}
|
|
|
|
function _fetchDevices() { // fn#73361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:1655, offset: 0x01d6a2ed, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun73363).apply(this, arguments);
|
|
function* _fun73363(a0) { // fn#73363, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:1704, offset: 0x01d6a32a, size: 272 bytes, params: 2, frame: 20
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var HTTP;
|
|
var get;
|
|
var CONSOLES_DEVICES;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var error;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_1;
|
|
binding(env2_2[6]).dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_START', platform: a0});
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
property = binding2[11];
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
HTTP = value4.HTTP;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
get = HTTP.get;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
binding = env2_8;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
CONSOLES_DEVICES = binding.CONSOLES_DEVICES;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(CONSOLES_DEVICES, binding, [a0]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object.url = value5;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object.rejectWithError = false;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(get, HTTP, [object]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
yield value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
const devices = value7.body.devices;
|
|
value = env2_1(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_FETCH_DEVICES_SUCCESS', platform: a0, devices: devices});
|
|
return devices;
|
|
}
|
|
|
|
}
|
|
|
|
function _sendConnectVoiceCommand() { // fn#73364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:2106, offset: 0x01d6a43a, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun73366).apply(this, arguments);
|
|
function* _fun73366(a0, a1, a2, a3) { // fn#73366, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:2177, offset: 0x01d6a477, size: 366 bytes, params: 5, frame: 27
|
|
var object2;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var HTTP;
|
|
var post;
|
|
var binding3;
|
|
var CONSOLES_DEVICES_COMMANDS;
|
|
var value5;
|
|
var object;
|
|
var value6;
|
|
var ConsoleCommands;
|
|
var CONNECT_VOICE;
|
|
var id;
|
|
var guild_id;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var error;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__;
|
|
let binding = env2_1;
|
|
binding(env2_2[6]).dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_START', platform: a0});
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
property = binding2[11];
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
HTTP = value4.HTTP;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
post = HTTP.post;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object2 = {};
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
binding3 = env2_8;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
CONSOLES_DEVICES_COMMANDS = binding3.CONSOLES_DEVICES_COMMANDS;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(CONSOLES_DEVICES_COMMANDS, binding3, [a0, a1]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object2.url = value5;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
property = binding2[13];
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
value6 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
ConsoleCommands = value6.ConsoleCommands;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
CONNECT_VOICE = ConsoleCommands.CONNECT_VOICE;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object.command = CONNECT_VOICE;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
id = a2.id;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object.channel_id = id;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
guild_id = a2.guild_id;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object.guild_id = guild_id;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object.nonce = a3;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object2.body = object;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object2.rejectWithError = false;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
value7 = Reflect.apply(post, HTTP, [object2]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
yield value7;
|
|
try {
|
|
value8 = undefined;
|
|
value9 = false;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_SEND_COMMAND_FAIL', platform: a0, error: error});
|
|
throw error;
|
|
}
|
|
if (value9) {
|
|
return value8;
|
|
}
|
|
id = value8.body.id;
|
|
env2_1(env2_2[6]).dispatch({type: 'WAIT_FOR_REMOTE_SESSION', sessionType: a0, nonce: a3, channelId: a2.id,
|
|
deviceId: a1, commandId: id});
|
|
return id;
|
|
}
|
|
|
|
}
|
|
|
|
function _cancelCommand() { // fn#73368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:2799, offset: 0x01d6a5e5, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun73370).apply(this, arguments);
|
|
function* _fun73370(a0, a1, a2) { // fn#73370, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:2850, offset: 0x01d6a622, size: 308 bytes, params: 4, frame: 25
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var HTTP;
|
|
var del;
|
|
var CONSOLES_DEVICES_COMMAND;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var error;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var binding = env2_1;
|
|
binding(env2_2[6]).dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_START', platform: a0, deviceId: a1,
|
|
commandId: a2});
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
property = binding2[11];
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
HTTP = value4.HTTP;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
del = HTTP.del;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
binding = env2_8;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
CONSOLES_DEVICES_COMMAND = binding.CONSOLES_DEVICES_COMMAND;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(CONSOLES_DEVICES_COMMAND, binding, [a0, a1, a2]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object.url = value5;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
object.rejectWithError = false;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(del, HTTP, [object]);
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
yield value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
binding = env2_1;
|
|
value = binding(env2_2[6]);
|
|
value.dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_FAIL', platform: a0, deviceId: a1, commandId: a2,
|
|
error: error});
|
|
throw error;
|
|
}
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
env2_1(env2_2[6]).dispatch({type: 'GAME_CONSOLE_DEVICE_CANCEL_COMMAND_SUCCESS', platform: a0, deviceId: a1,
|
|
commandId: a2});
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _transferToPlayStation() { // fn#73371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:3313, offset: 0x01d6a756, size: 50 bytes, params: 1, frame: 14
|
|
return Module00005(_fun73373).apply(this, arguments);
|
|
function* _fun73373(a0, a1, a2) { // fn#73373, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:3380, offset: 0x01d6a793, size: 184 bytes, params: 4, frame: 22
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var value3 = env2_1(env2_2[14]);
|
|
yield value3.maybeShowPTTAlert(a0);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
yield env2_11();
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
yield env2_13();
|
|
var value8 = undefined;
|
|
if (false) {
|
|
return value8;
|
|
}
|
|
yield sendConnectVoiceCommand(a0, a1, a2, value8);
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
env2_1(env2_2[15])(a2.id, a0);
|
|
}
|
|
function sendConnectVoiceCommand() { // fn#73374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:3494, offset: 0x01061eac, size: 30 bytes, params: 1, frame: 13
|
|
return env3_17.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function waitForSession(a0, a1, a2) { // fn#73375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:3761, offset: 0x01d6a84b, size: 70 bytes, params: 4, frame: 13
|
|
(Dispatcher).dispatch({type: 'WAIT_FOR_REMOTE_SESSION',
|
|
sessionType: a0, nonce: a2, channelId: a1});
|
|
}
|
|
|
|
function connectToRemote(a0) { // fn#73376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:3934, offset: 0x01d6a891, size: 55 bytes, params: 2, frame: 13
|
|
(Dispatcher).dispatch({type: 'REMOTE_SESSION_CONNECT',
|
|
sessionId: a0});
|
|
}
|
|
|
|
function remoteAudioSettingsUpdate(a0, a1, a2, a3) { // fn#73379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:4479, offset: 0x01d6a989, size: 143 bytes, params: 5, frame: 19
|
|
var defaultImport;
|
|
var dispatch;
|
|
var object2;
|
|
const value2 = (AudioSettingsUtilsModule).coerceAudioContextForProto(a2);
|
|
if (value2 != null) {
|
|
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
|
|
dispatch = defaultImport.dispatch;
|
|
object2 = {type: 'AUDIO_SETTINGS_UPDATE', context: value2, id: a1};
|
|
copyDataProperties(object2, a3, undefined);
|
|
Reflect.apply(dispatch, defaultImport, [{type: 'REMOTE_COMMAND', sessionId: a0, payload: object2}]);
|
|
logRemoteCommand('AUDIO_SETTINGS_UPDATE', a0);
|
|
}
|
|
}
|
|
|
|
function persistSelectedDeviceId(a0, a1) { // fn#73381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9608:4927, offset: 0x01d6aa18, size: 65 bytes, params: 3, frame: 13
|
|
(Dispatcher).dispatch({type: 'GAME_CONSOLE_SELECT_DEVICE',
|
|
platform: a0, deviceId: a1});
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun73350, 9422, [5, 4294, 4296, 4295, 661, 683, 694, 4647, 1244, 8901, 9423, 507, 1216, 9424, 9425,
|
|
9428,
|
|
2]) /* metro module 9422, dependencies: [5, 4294, 4296, 4295, 661, 683, 694, 4647, 1244, 8901, 9423, 507, 1216, 9424, 9425, 9428, 2] */;
|