297 lines
13 KiB
TypeScript
297 lines
13 KiB
TypeScript
/* Metro module 9278; source: modules/rtc/SecureFramesActionCreators.tsx; dependencies: [5, 1226, 1379, 4297, 9277, 661, 694, 9275, 4131, 4647, 1244, 9279, 4796, 2] */
|
|
function _fun72556(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:6, offset: 0x01d49aea, size: 336 bytes, params: 8, frame: 19
|
|
var object2;
|
|
const env0_0 = require;
|
|
const savePersistentCodesEnabled = function() {
|
|
return _savePersistentCodesEnabled.apply(this, arguments);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
|
|
const env0_7 = (require(9277) /* metro dependency 9277: SecureFramesConstants */).SECURE_FRAMES_PUBLIC_KEY_VERSION;
|
|
const env0_8 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
|
|
object2 = {clearUploadedKeyVersions: clearUploadedKeyVersions, updatePersistentCodesEnabled: function() {
|
|
return _updatePersistentCodesEnabled.apply(this, arguments);
|
|
}, addUploadedKeyVersion: addUploadedKeyVersion, createSecureFramesVerifiedKey: createSecureFramesVerifiedKey,
|
|
deleteSecureFramesVerifiedKey: deleteSecureFramesVerifiedKey,
|
|
deleteSecureFramesUserVerifiedKeys: deleteSecureFramesUserVerifiedKeys,
|
|
createSecureFramesTransientKey: createSecureFramesTransientKey,
|
|
deleteSecureFramesTransientKey: deleteSecureFramesTransientKey};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rtc/SecureFramesActionCreators.tsx');
|
|
exports.default = object2;
|
|
}
|
|
|
|
function _savePersistentCodesEnabled() { // fn#72558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:299, offset: 0x01d49c3a, size: 50 bytes, params: 1, frame: 14
|
|
return env0_3(_fun72560).apply(this, arguments);
|
|
}
|
|
|
|
function _updatePersistentCodesEnabled() { // fn#72561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:934, offset: 0x01d49e17, size: 50 bytes, params: 1, frame: 14
|
|
return env0_3(_fun72563).apply(this, arguments);
|
|
}
|
|
|
|
function clearUploadedKeyVersions() { // fn#72568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:1855, offset: 0x01d4a0b8, size: 49 bytes, params: 1, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SECURE_FRAMES_UPLOADED_KEY_VERSION_CLEAR'});
|
|
}
|
|
|
|
function addUploadedKeyVersion(a0) { // fn#72570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:2111, offset: 0x01d4a0e9, size: 57 bytes, params: 2, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SECURE_FRAMES_UPLOADED_KEY_VERSION_ADD',
|
|
keyVersion: a0});
|
|
}
|
|
|
|
function createSecureFramesVerifiedKey(a0, a1) { // fn#72571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:2255, offset: 0x01d4a122, size: 61 bytes, params: 3, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SECURE_FRAMES_VERIFIED_KEY_CREATE',
|
|
userId: a0, key: a1});
|
|
}
|
|
|
|
function deleteSecureFramesVerifiedKey(a0, a1) { // fn#72572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:2406, offset: 0x01d4a15f, size: 62 bytes, params: 3, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SECURE_FRAMES_VERIFIED_KEY_DELETE',
|
|
userId: a0, serializedKey: a1});
|
|
}
|
|
|
|
function deleteSecureFramesUserVerifiedKeys(a0) { // fn#72573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:2572, offset: 0x01d4a19d, size: 54 bytes, params: 2, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SECURE_FRAMES_USER_VERIFIED_KEYS_DELETE',
|
|
userId: a0});
|
|
}
|
|
|
|
function createSecureFramesTransientKey(a0, a1) { // fn#72574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:2727, offset: 0x01d4a1d3, size: 61 bytes, params: 3, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SECURE_FRAMES_TRANSIENT_KEY_CREATE',
|
|
userId: a0, key: a1});
|
|
}
|
|
|
|
function deleteSecureFramesTransientKey(a0) { // fn#72575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:2881, offset: 0x01d4a210, size: 54 bytes, params: 2, frame: 13
|
|
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SECURE_FRAMES_TRANSIENT_KEY_DELETE',
|
|
userId: a0});
|
|
}
|
|
|
|
function* _fun72560(a0, a1) { // fn#72560, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:376, offset: 0x01d49c77, size: 416 bytes, params: 3, frame: 21
|
|
var r5;
|
|
var binding;
|
|
var value3;
|
|
var dispatch;
|
|
var object2;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var ensureCurrentUserPublicKey;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var error;
|
|
var binding3;
|
|
var APIError;
|
|
var prototype;
|
|
var value9;
|
|
var aPIError;
|
|
var value10;
|
|
var binding4;
|
|
var value11;
|
|
var value12;
|
|
var show;
|
|
var intl;
|
|
var string;
|
|
var t;
|
|
var R0RpRX;
|
|
var getAnyErrorMessage;
|
|
var value13;
|
|
var binding5;
|
|
var eAn6z2;
|
|
let value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
reduciblePort22: while (true) {
|
|
exceptionLanding19: while (true) {
|
|
value = environment.__proto__.__proto__;
|
|
binding = env2_1;
|
|
value3 = binding(env2_2[6]);
|
|
dispatch = value3.dispatch;
|
|
Reflect.apply(dispatch, value3, [{type: 'SECURE_FRAMES_SETTINGS_UPDATE', persistentCodesEnabled: a0}]);
|
|
if (a0) {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
property = binding2[7];
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
ensureCurrentUserPublicKey = value4.ensureCurrentUserPublicKey;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
binding = env2_7;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(ensureCurrentUserPublicKey, value4, [binding]);
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
yield value5;
|
|
try {
|
|
value6 = undefined;
|
|
value7 = false;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
if (value7) {
|
|
return value6;
|
|
}
|
|
try {
|
|
value8 = a1 == null;
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
if (value8) {
|
|
break reduciblePort22;
|
|
}
|
|
try {
|
|
a1();
|
|
} catch (error) {
|
|
break exceptionLanding19;
|
|
}
|
|
break reduciblePort22;
|
|
}
|
|
if (a1 == null) {
|
|
break reduciblePort22;
|
|
}
|
|
a1();
|
|
break reduciblePort22;
|
|
}
|
|
binding = env2_0;
|
|
binding3 = env2_2;
|
|
APIError = binding(binding3[8]).APIError;
|
|
prototype = APIError.prototype;
|
|
value9 = Object.create(prototype, {constructor: {value: APIError}});
|
|
aPIError = new APIError();
|
|
value10 = aPIError instanceof Object ? aPIError : value9;
|
|
binding4 = env2_1;
|
|
value11 = binding4(binding3[6]);
|
|
dispatch = value11.dispatch;
|
|
Reflect.apply(dispatch, value11, [{'type': 'SECURE_FRAMES_SETTINGS_UPDATE', 'persistentCodesEnabled': false}]);
|
|
value12 = binding4(binding3[9]);
|
|
show = value12.show;
|
|
object2 = {};
|
|
intl = binding(binding3[10]).intl;
|
|
string = intl.string;
|
|
t = binding(binding3[10]).t;
|
|
R0RpRX = t.R0RpRX;
|
|
object2.title = Reflect.apply(string, intl, [R0RpRX]);
|
|
getAnyErrorMessage = value10.getAnyErrorMessage;
|
|
value13 = Reflect.apply(getAnyErrorMessage, value10, []);
|
|
reducibleJoin21: while (true) {
|
|
if (value13 != null) {
|
|
r5 = value13;
|
|
break reducibleJoin21;
|
|
}
|
|
binding = env2_0;
|
|
binding5 = env2_2;
|
|
intl = binding(binding5[10]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[10]).t;
|
|
eAn6z2 = t.eAn6z2;
|
|
value = Reflect.apply(string, intl, [eAn6z2]);
|
|
r5 = value;
|
|
break reducibleJoin21;
|
|
}
|
|
object2.body = r5;
|
|
Reflect.apply(show, value12, [object2]);
|
|
break reduciblePort22;
|
|
}
|
|
}
|
|
|
|
function* _fun72563(a0) { // fn#72563, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:1015, offset: 0x01d49e54, size: 480 bytes, params: 2, frame: 22
|
|
var value10;
|
|
var openSecureFramesUpdateConfirmation;
|
|
var object2;
|
|
var binding3;
|
|
var intl;
|
|
var string;
|
|
var t;
|
|
var binding4;
|
|
var binding5;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
const env0_0 = a0;
|
|
value = undefined;
|
|
var env0_1;
|
|
let binding = env2_6;
|
|
const getVoiceStateForUser = binding.getVoiceStateForUser;
|
|
const binding2 = env2_4;
|
|
const getId = binding2.getId;
|
|
const value4 = Reflect.apply(getVoiceStateForUser, binding, [Reflect.apply(getId, binding2, [])]);
|
|
binding = env2_5;
|
|
const value5 = null;
|
|
const channel = binding.getChannel(value5 == value4 ? value : value4.channelId);
|
|
if (value5 != (env2_4.getSessionId() !== (value5 == value4 ? value : value4.sessionId) ? value5 : value5 != channel ? channel.type === env2_8.GUILD_STAGE_VOICE ? value5 : channel.id : value5)) {
|
|
binding = env2_1;
|
|
value10 = binding(env2_2[11]);
|
|
openSecureFramesUpdateConfirmation = value10.openSecureFramesUpdateConfirmation;
|
|
object2 = {};
|
|
binding = env2_0;
|
|
binding3 = env2_2;
|
|
intl = binding(binding3[10]).intl;
|
|
string = intl.string;
|
|
t = binding(binding3[10]).t;
|
|
object2.title = a0 ? Reflect.apply(string, intl, [t.DRFN1B]) : Reflect.apply(string, intl, [t.q29xJz]);
|
|
binding = env2_0;
|
|
binding4 = env2_2;
|
|
intl = binding(binding4[10]).intl;
|
|
string = intl.string;
|
|
t = binding(binding4[10]).t;
|
|
object2.subtitle = a0 ? Reflect.apply(string, intl, [t.y015ZY]) : Reflect.apply(string, intl, [t.E66FQn]);
|
|
binding = env2_0;
|
|
binding5 = env2_2;
|
|
intl = binding(binding5[10]).intl;
|
|
string = intl.string;
|
|
t = binding(binding5[10]).t;
|
|
object2.confirmText = Reflect.apply(string, intl, [t.aTuFYT]);
|
|
binding = env2_3;
|
|
env0_1 = binding(_fun72565);
|
|
object2.onConfirm = onConfirm_72567;
|
|
Reflect.apply(openSecureFramesUpdateConfirmation, value10, [object2]);
|
|
} else {
|
|
yield env2_9(a0);
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function* _fun72565() { // fn#72565, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:1574, offset: 0x01d4a03f, size: 57 bytes, params: 1, frame: 14
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
var binding = env4_9;
|
|
value = environment.__proto__;
|
|
yield binding(env1_0, _fun72566);
|
|
}
|
|
}
|
|
|
|
function _fun72566() { // fn#72566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9464:1622, offset: 0x01d4a078, size: 64 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
|
|
const binding = env5_1;
|
|
const binding2 = env5_2;
|
|
binding(binding2[12]).disconnect();
|
|
binding(binding2[12]).selectVoiceChannel(env2_2);
|
|
}
|
|
|