117 lines
5.7 KiB
TypeScript
117 lines
5.7 KiB
TypeScript
/* Metro module 9259; source: modules/rtc/VerifiedKeyStore.tsx; dependencies: [6, 7, 15, 17, 18, 9260, 21, 566, 694, 2] */
|
|
function _fun72342(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9444:6, offset: 0x01d42de5, size: 313 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 env0_8 = {};
|
|
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
|
let value = _fun72346(PersistedStore);
|
|
value.displayName = 'VerifiedKeyStore';
|
|
value.persistKey = 'VerifiedKeyStore';
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{SECURE_FRAMES_VERIFIED_KEY_CREATE: SECURE_FRAMES_VERIFIED_KEY_CREATE,
|
|
SECURE_FRAMES_VERIFIED_KEY_DELETE: SECURE_FRAMES_VERIFIED_KEY_DELETE,
|
|
SECURE_FRAMES_USER_VERIFIED_KEYS_DELETE: SECURE_FRAMES_USER_VERIFIED_KEYS_DELETE});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/rtc/VerifiedKeyStore.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_72343() { // fn#72343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9444:148, offset: 0x01d42f1e, 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_72343_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun72346(a0) { // fn#72346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9444:356, offset: 0x01d42f80, size: 199 bytes, params: 2, frame: 16
|
|
const closure = VerifiedKeyStore;
|
|
env0_7(closure, a0);
|
|
return env0_4(closure, [{key: 'initialize', value: function(a0) {
|
|
var r2;
|
|
var value = undefined;
|
|
r2 = a0 == null ? value : a0.users;
|
|
r2 = r2 ?? ({});
|
|
env1_8 = r2;
|
|
return value;
|
|
}}, {key: 'getState', value: value_72349}, {key: 'getKeyTrustedAt', value: value_72350}, {key: 'isKeyVerified',
|
|
value: function(a0, a1) {
|
|
return this.getKeyTrustedAt(a0, a1) != null;
|
|
}}, {key: 'getUserIds', value: value_72352}, {key: 'getUserVerifiedKeys', value: value_72353}]);
|
|
}
|
|
|
|
function SECURE_FRAMES_VERIFIED_KEY_CREATE({userId, key}) { // fn#72354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9444:1236, offset: 0x01d43105, size: 125 bytes, params: 2, frame: 14
|
|
const r3 = env0_8[userId] ?? ({});
|
|
env0_8[userId] = r3;
|
|
const Uint8Array = global.Uint8Array;
|
|
const uint8Array = new Uint8Array(key);
|
|
let value = require(9260) /* metro dependency 9260: libdave */;
|
|
value = value.serializeKey(uint8Array);
|
|
const Date = global.Date;
|
|
r3[value] = Date.now();
|
|
}
|
|
|
|
function SECURE_FRAMES_VERIFIED_KEY_DELETE({userId, serializedKey}) { // fn#72355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9444:1486, offset: 0x01d43182, size: 88 bytes, params: 2, frame: 14
|
|
var r1;
|
|
const property = env0_8[userId];
|
|
if (property == null) {
|
|
return false;
|
|
}
|
|
const value2 = delete property[serializedKey];
|
|
const Object = global.Object;
|
|
if (Object.keys(property).length !== 0) {
|
|
r1 = false;
|
|
} else {
|
|
delete env0_8[userId];
|
|
r1 = true;
|
|
}
|
|
return value2 || r1;
|
|
}
|
|
|
|
function SECURE_FRAMES_USER_VERIFIED_KEYS_DELETE({userId}) { // fn#72356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9444:1712, offset: 0x01d431da, size: 38 bytes, params: 2, frame: 4
|
|
return env0_8[userId] != null && delete env0_8[userId];
|
|
}
|
|
|
|
function value_72349() { // fn#72349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9444:748, offset: 0x01d4306c, size: 16 bytes, params: 1, frame: 2
|
|
return {users: env1_8};
|
|
}
|
|
|
|
function value_72350(a0, a1) { // fn#72350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9444:806, offset: 0x01d4307c, size: 65 bytes, params: 3, frame: 13
|
|
const value2 = undefined;
|
|
const value3 = (require(9260) /* metro dependency 9260: libdave */).serializeKey(a1);
|
|
const property = env1_8[a0];
|
|
return property == null ? value2 : property[value3];
|
|
}
|
|
|
|
function value_72352() { // fn#72352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9444:994, offset: 0x01d430dc, size: 41 bytes, params: 1, frame: 12
|
|
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(env1_8);
|
|
}
|
|
|