1232 lines
53 KiB
TypeScript
1232 lines
53 KiB
TypeScript
/* Metro module 4265; source: modules/clips/ClipsStore.tsx; dependencies: [6, 7, 15, 17, 18, 5, 4266, 1226, 1878, 4281, 661, 4282, 3767, 4283, 4284, 44, 4285, 1391, 4288, 566, 4259, 694, 2] */
|
|
function _fun35927(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:6, offset: 0x0107f678, size: 1298 bytes, params: 8, frame: 26
|
|
const env0_0 = require;
|
|
const _arrayLikeToArray_35933 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
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 = importDefault(5) /* metro dependency 5 */;
|
|
const runningGameStoreNative = importDefault(4266) /* metro dependency 4266: RunningGameStoreNative */;
|
|
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
let value = require(4281) /* metro dependency 4281: ClipsConstants */;
|
|
const env0_12 = value.CLIPS_HARDWARE_CLASSIFICATION_VERSION;
|
|
const env0_13 = value.ClipSaveTypes;
|
|
const ClipsLengthSettings = value.ClipsLengthSettings;
|
|
const ClipsViewerConnectivitySettings = value.ClipsViewerConnectivitySettings;
|
|
const env0_14 = value.ClipsUserEducationType;
|
|
const env0_15 = value.ClipsLogger;
|
|
const env0_16 = value.MAX_SIMULTANEOUS_SAVE_CLIP_OPERATIONS;
|
|
const DEFAULT_MAX_AUTO_CLIPS = value.DEFAULT_MAX_AUTO_CLIPS;
|
|
value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_17 = value.UserFlags;
|
|
const env0_18 = value.VoiceFlags;
|
|
value = require(4282) /* metro dependency 4282: StreamSettingsConstants */;
|
|
const ApplicationStreamFPS = value.ApplicationStreamFPS;
|
|
const ApplicationStreamResolutions = value.ApplicationStreamResolutions;
|
|
const env0_21 = {};
|
|
const env0_22 = {};
|
|
const env0_23 = {};
|
|
const env0_24 = [];
|
|
const env0_29 = {};
|
|
const env0_30 = {};
|
|
let Set = global.Set;
|
|
const set = new Set();
|
|
const Map = global.Map;
|
|
let map = new Map();
|
|
const RESOLUTION_1080 = ApplicationStreamResolutions.RESOLUTION_1080;
|
|
const FPS_30 = ApplicationStreamFPS.FPS_30;
|
|
const SECONDS_30 = ClipsLengthSettings.SECONDS_30;
|
|
const ALL = ClipsViewerConnectivitySettings.ALL;
|
|
let object = {'clipsSettings': null, 'hardwareClassification': null, 'hardwareClassificationForDecoupled': null,
|
|
'hardwareClassificationVersion': 0, 'newClipIds': null, 'hasClips': false, 'hasTakenDecoupledClip': false};
|
|
object.clipsSettings = {'clipsEnabled': false, 'storageLocation': 'default', 'clipsQuality': null,
|
|
'clipsLength': null, 'remindersEnabled': true, 'decoupledClipsEnabled': false, 'viewerClipsEnabled': true,
|
|
clipsQuality: {resolution: RESOLUTION_1080, frameRate: FPS_30}, clipsLength: SECONDS_30,
|
|
viewerConnectivity: ALL, maxAutoClips: DEFAULT_MAX_AUTO_CLIPS, clipSignals: {'enableDistributedSignals': true,
|
|
'enableGameSignals': true}, debugTooltipsEnabled: false, enableAutoclipping: undefined,
|
|
showPovClipsInGallery: false};
|
|
object.newClipIds = [];
|
|
object.clipsEducationState = {'dismissedAt': null, 'numberOfGamesLaunchedSinceDismissal': 0,
|
|
'numberOfTimesDismissed': 0};
|
|
const DeviceSettingsStore = (importDefault(566) /* metro dependency 566: flux */).DeviceSettingsStore;
|
|
map = _fun35938(DeviceSettingsStore);
|
|
map.displayName = 'ClipsStore';
|
|
map.persistKey = 'ClipsStore';
|
|
map.migrations = [_fun35970, _fun35971, function(a0) {
|
|
var r2;
|
|
var object = {};
|
|
copyDataProperties(object, a0, r2);
|
|
object['newClipIds'] = a0.newClipIds ?? [];
|
|
return object;
|
|
}, function(a0) {
|
|
var r5;
|
|
var object = {};
|
|
copyDataProperties(object, a0, r5);
|
|
var property = a0.hardwareClassification;
|
|
var value = null;
|
|
object['hardwareClassification'] = value != property ? property : value;
|
|
property = a0.hardwareClassificationVersion;
|
|
value = 0;
|
|
object['hardwareClassificationVersion'] = value != property ? property : value;
|
|
return object;
|
|
}, function(a0) {
|
|
var r3;
|
|
var object = {};
|
|
copyDataProperties(object, a0, r3);
|
|
var hasClips = a0.hasClips;
|
|
object['hasClips'] = hasClips != null && hasClips;
|
|
return object;
|
|
}, _fun35975, function(a0) {
|
|
var r3;
|
|
var object = {};
|
|
copyDataProperties(object, a0, r3);
|
|
var hardwareClassificationForDecoupled = a0.hardwareClassificationForDecoupled;
|
|
var value = null;
|
|
object['hardwareClassificationForDecoupled'] = value != hardwareClassificationForDecoupled ? hardwareClassificationForDecoupled : value;
|
|
return object;
|
|
}, _fun35977, function(a0) {
|
|
var r2;
|
|
var object = {};
|
|
copyDataProperties(object, a0, r2);
|
|
object['newClipIds'] = a0.newClipIds ?? [];
|
|
object['newClipIDs'] = undefined;
|
|
return object;
|
|
}, _fun35979, _fun35980, function(a0) {
|
|
var r2;
|
|
var object = {};
|
|
copyDataProperties(object, a0, r2);
|
|
object['hasTakenDecoupledClip'] = false;
|
|
object['clipsEducationState'] = {'dismissedAt': null, 'numberOfGamesLaunchedSinceDismissal': 0,
|
|
'numberOfTimesDismissed': 0};
|
|
return object;
|
|
}, _fun35982, function(a0) {
|
|
var r2;
|
|
var object = {};
|
|
copyDataProperties(object, a0, r2);
|
|
var object2 = {};
|
|
copyDataProperties(object2, a0.clipsSettings, object2);
|
|
object['clipsSettings'] = object2;
|
|
return object;
|
|
}, _fun35984, _fun35985];
|
|
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
|
|
{CLIPS_SETTINGS_UPDATE: CLIPS_SETTINGS_UPDATE_35986, CLIPS_SAVE_CLIP: CLIPS_SAVE_CLIP,
|
|
CLIPS_PROMOTE_CLIP_CANDIDATE: CLIPS_PROMOTE_CLIP_CANDIDATE, CLIPS_SAVE_CLIP_START: CLIPS_SAVE_CLIP_START,
|
|
CLIPS_SAVE_CLIP_ERROR: CLIPS_SAVE_CLIP_ERROR, CLIPS_SAVE_CLIP_NO_OP: CLIPS_SAVE_CLIP_NO_OP,
|
|
STREAM_START: STREAM_START_35993, STREAM_STOP: STREAM_STOP_35994,
|
|
CLIPS_CLEAR_LAST_CLIPS_SESSION: CLIPS_CLEAR_LAST_CLIPS_SESSION, CLIPS_SESSION_START: CLIPS_SESSION_START,
|
|
CLIPS_SESSION_STOP: CLIPS_SESSION_STOP, CLIPS_CLEAR_NEW_CLIP_IDS: CLIPS_CLEAR_NEW_CLIP_IDS,
|
|
CLIPS_REMOVE_SINGLE_NEW_CLIP_ID: CLIPS_REMOVE_SINGLE_NEW_CLIP_ID,
|
|
CLIPS_LOAD_DIRECTORY_SUCCESS: CLIPS_LOAD_DIRECTORY_SUCCESS, CLIPS_DELETE_CLIP: CLIPS_DELETE_CLIP,
|
|
CLIPS_UPDATE_METADATA: CLIPS_UPDATE_METADATA, RTC_CONNECTION_FLAGS: RTC_CONNECTION_FLAGS,
|
|
CLIPS_SHOW_CALL_WARNING: function(a0) {
|
|
env0_26 = a0.channelId;
|
|
}, VOICE_CHANNEL_SELECT: VOICE_CHANNEL_SELECT_36007, CLIPS_CLASSIFY_HARDWARE: CLIPS_CLASSIFY_HARDWARE,
|
|
CLIPS_INIT: CLIPS_INIT_36009, CLIPS_INIT_FAILURE: function(a0) {
|
|
env0_31 = a0.errMsg;
|
|
}, CLIPS_DISMISS_EDUCATION: CLIPS_DISMISS_EDUCATION, RUNNING_GAMES_CHANGE: RUNNING_GAMES_CHANGE,
|
|
CLIPS_SET_EXPORTING: function({clipIds}) {
|
|
var r2;
|
|
var Set = global.Set;
|
|
r2 = clipIds ?? [];
|
|
env0_32 = new Set();
|
|
}, MESSAGE_CREATE: MESSAGE_CREATE_36014, LOAD_MESSAGES_SUCCESS: LOAD_MESSAGES_SUCCESS_36015, LOGOUT: LOGOUT_36016});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/clips/ClipsStore.tsx');
|
|
exports.default = map;
|
|
exports.DEFAULT_STORAGE_SENTINEL = 'default';
|
|
exports.DEFAULT_STORAGE_DIRECTORY = 'Discord Clips';
|
|
}
|
|
|
|
function _isNativeReflectConstruct_35928() { // fn#35928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:544, offset: 0x0107fb8a, 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_35928_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _createForOfIteratorHelperLoose_35931(a0, a1) { // fn#35931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:737, offset: 0x0107fbe8, size: 370 bytes, params: 3, frame: 20
|
|
var r6;
|
|
var r9;
|
|
var r5;
|
|
var value3;
|
|
var regexp;
|
|
const env0_0 = a0;
|
|
const Symbol = global.Symbol;
|
|
let value = typeof Symbol !== 'undefined';
|
|
let r1 = value && a0[global.Symbol.iterator];
|
|
r1 = !r1 ? a0['@@iterator'] : r1;
|
|
if (r1) {
|
|
value = r1.call(a0);
|
|
return value.next.bind(value);
|
|
}
|
|
const Array = global.Array;
|
|
if (Array.isArray(a0)) {
|
|
if (r1) {
|
|
}
|
|
return _fun35932;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_35933(a0, value);
|
|
r5 = value;
|
|
} else {
|
|
value3 = ({}).toString.call(a0).slice(8, -1);
|
|
r6 = value3 === 'Object' && a0.constructor;
|
|
r9 = r6 ? a0.constructor.name : value3;
|
|
if (r9 === 'Map') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Set') {
|
|
r6 = global.Array.from(a0);
|
|
} else if (r9 === 'Arguments') {
|
|
value = _arrayLikeToArray_35933(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_35933(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun35932;
|
|
}
|
|
const TypeError = global.TypeError;
|
|
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
|
|
}
|
|
|
|
function _migrateDefaultStorage() { // fn#35934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:2407, offset: 0x0107fd5a, size: 48 bytes, params: 1, frame: 14
|
|
return env0_8(_fun35936).apply(this, arguments);
|
|
}
|
|
|
|
function trackSharedRemoteClipId(a0, a1, a2) { // fn#35937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:2841, offset: 0x0107fec6, size: 247 bytes, params: 4, frame: 25
|
|
var r3;
|
|
var r4;
|
|
var r1;
|
|
var r0;
|
|
var value3;
|
|
var value4;
|
|
var done;
|
|
var value5;
|
|
var value6;
|
|
var clip_remote_id;
|
|
var binding;
|
|
var value7;
|
|
var Set;
|
|
var prototype;
|
|
var value8;
|
|
var set;
|
|
var value9;
|
|
var add;
|
|
var value10;
|
|
var value11;
|
|
const defaultImport = importDefault(4288) /* metro dependency 4288: DistributedClipsExperiment */;
|
|
const getConfig = defaultImport.getConfig;
|
|
if (Reflect.apply(getConfig, defaultImport, [{location: 'trackSharedRemoteClipId'}]).enableDistributedClips) {
|
|
if (a2 !== AuthenticationStore.getId()) {
|
|
return false;
|
|
}
|
|
value3 = _createForOfIteratorHelperLoose_35931(a1);
|
|
value4 = value3();
|
|
done = value4.done;
|
|
value5 = false;
|
|
if (done) {
|
|
r0 = value5;
|
|
} else {
|
|
r3 = value5;
|
|
r4 = value4;
|
|
while (true) {
|
|
value6 = r4.value;
|
|
clip_remote_id = value6.clip_remote_id;
|
|
if (clip_remote_id != null) {
|
|
binding = env0_33;
|
|
value7 = binding.get(a0);
|
|
if (value7 != null) {
|
|
r1 = value7;
|
|
continue;
|
|
}
|
|
Set = global.Set;
|
|
prototype = Set.prototype;
|
|
value8 = Object.create(prototype, {constructor: {value: Set}});
|
|
set = new Set();
|
|
value9 = set instanceof Object ? set : value8;
|
|
binding = env0_33;
|
|
binding.set(a0, value9);
|
|
r1 = value9;
|
|
add = r1.add;
|
|
clip_remote_id = value6.clip_remote_id;
|
|
Reflect.apply(add, r1, [clip_remote_id]);
|
|
value10 = true;
|
|
r3 = value10;
|
|
}
|
|
value11 = value3();
|
|
done = value11.done;
|
|
if (done) {
|
|
r0 = r3;
|
|
break;
|
|
}
|
|
r4 = value11;
|
|
continue;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function _fun35938(a0) { // fn#35938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:3201, offset: 0x0107ffbd, size: 760 bytes, params: 2, frame: 16
|
|
const closure = ClipsStoreClass;
|
|
env0_7(closure, a0);
|
|
return env0_4(closure, [{key: 'initialize', value: value_35940}, {key: 'getClips', value: value_35942},
|
|
{key: 'getClipById', value: value_35943}, {key: 'getClipByRemoteId', value: value_35944},
|
|
{key: 'getClipCandidates', value: value_35945}, {key: 'getClipCandidateById', value: value_35946},
|
|
{key: 'getUserAgnosticState', value: value_35947}, {key: 'getSettings', value: value_35948},
|
|
{key: 'getEnableAutoclipping', value: value_35949}, {key: 'getLastClipsSession', value: value_35950},
|
|
{key: 'getCurrentClipsSession', value: value_35951}, {key: 'getHistoricalClipsSessionById', value: value_35952},
|
|
{key: 'devSetLastClipsSession', value: function(a0) {
|
|
env1_27 = a0;
|
|
this.emitChange();
|
|
}}, {key: 'getClipsWarningShown', value: value_35954}, {key: 'getHardwareClassification', value: value_35955},
|
|
{key: 'getHardwareClassificationForDecoupled', value: value_35956}, {key: 'getHardwareClassificationVersion',
|
|
value: value_35957}, {key: 'getIsAtMaxSaveClipOperations', value: value_35958}, {key: 'getLastClipsError',
|
|
value: value_35959}, {key: 'isClipsEnabledForUser', value: value_35960}, {key: 'isVoiceRecordingAllowedForUser',
|
|
value: value_35961}, {key: 'isViewerClippingAllowedForUser', value: value_35962}, {key: 'hasClips',
|
|
value: value_35963}, {key: 'hasTakenDecoupledClip', value: value_35964}, {key: 'canShowReminders',
|
|
value: value_35965}, {key: 'getNewClipIds', value: value_35966}, {key: 'isClipExporting', value: value_35967},
|
|
{key: 'getExportingClipIds', value: value_35968}, {key: 'wasClipSharedInChannel', value: value_35969}]);
|
|
}
|
|
|
|
function _fun35970(a0) { // fn#35970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:5965, offset: 0x010805c8, size: 34 bytes, params: 2, frame: 3
|
|
return {clipsSettings: a0 ?? env0_34, newClipsCount: 0};
|
|
}
|
|
|
|
function _fun35971(a0) { // fn#35971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:6014, offset: 0x010805ea, size: 55 bytes, params: 2, frame: 12
|
|
const object3 = {};
|
|
copyDataProperties(object3, env0_34, object3);
|
|
copyDataProperties(object3, a0.clipsSettings, object3);
|
|
const object4 = {};
|
|
copyDataProperties(object4, a0, object3);
|
|
object4['clipsSettings'] = object3;
|
|
return object4;
|
|
}
|
|
|
|
function _fun35975(a0) { // fn#35975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:6367, offset: 0x010806c0, size: 63 bytes, params: 2, frame: 13
|
|
const object3 = {};
|
|
copyDataProperties(object3, a0, undefined);
|
|
const object4 = {};
|
|
copyDataProperties(object4, a0.clipsSettings, undefined);
|
|
object4['decoupledClipsEnabled'] = env0_34.decoupledClipsEnabled;
|
|
object3['clipsSettings'] = object4;
|
|
return object3;
|
|
}
|
|
|
|
function _fun35977(a0) { // fn#35977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:6573, offset: 0x0108072b, size: 150 bytes, params: 2, frame: 15
|
|
let value = undefined;
|
|
const property = (require(4259) /* metro dependency 4259: MediaEngineStore */).default;
|
|
let r3 = property == null ? value : property.getHardwareEncoding();
|
|
const object3 = {};
|
|
copyDataProperties(object3, a0, undefined);
|
|
const object4 = {};
|
|
copyDataProperties(object4, a0.clipsSettings, undefined);
|
|
value = !!r3;
|
|
object4['clipsEnabled'] = r3 ? a0.clipsSettings.clipsEnabled : value;
|
|
r3 = r3 ? a0.clipsSettings.decoupledClipsEnabled : value;
|
|
object4['decoupledClipsEnabled'] = r3;
|
|
object3['clipsSettings'] = object4;
|
|
return object3;
|
|
}
|
|
|
|
function _fun35979(a0) { // fn#35979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:6886, offset: 0x010807f8, size: 118 bytes, params: 2, frame: 14
|
|
const object3 = {};
|
|
copyDataProperties(object3, a0, undefined);
|
|
const object4 = {};
|
|
copyDataProperties(object4, a0.clipsSettings, undefined);
|
|
let clipsQuality = a0.clipsSettings.clipsQuality;
|
|
if (typeof clipsQuality === 'number') {
|
|
clipsQuality = env0_34.clipsQuality;
|
|
} else {
|
|
clipsQuality = a0.clipsSettings.clipsQuality;
|
|
clipsQuality = clipsQuality == null ? env0_34.clipsQuality : a0.clipsSettings.clipsQuality;
|
|
}
|
|
object4['clipsQuality'] = clipsQuality;
|
|
object3['clipsSettings'] = object4;
|
|
return object3;
|
|
}
|
|
|
|
function _fun35980(a0) { // fn#35980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:7072, offset: 0x0108086e, size: 81 bytes, params: 2, frame: 13
|
|
const object3 = {};
|
|
copyDataProperties(object3, a0, undefined);
|
|
const object4 = {};
|
|
copyDataProperties(object4, a0.clipsSettings, undefined);
|
|
let remindersEnabled = a0.clipsSettings.remindersEnabled;
|
|
remindersEnabled = remindersEnabled ?? env0_34.remindersEnabled;
|
|
object4['remindersEnabled'] = remindersEnabled;
|
|
object3['clipsSettings'] = object4;
|
|
return object3;
|
|
}
|
|
|
|
function _fun35982(a0) { // fn#35982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:7351, offset: 0x010808ef, size: 119 bytes, params: 2, frame: 15
|
|
const object3 = {};
|
|
copyDataProperties(object3, a0, undefined);
|
|
const object4 = {};
|
|
copyDataProperties(object4, a0.clipsSettings, undefined);
|
|
let maxAutoClips = a0.clipsSettings.maxAutoClips;
|
|
maxAutoClips = maxAutoClips ?? env0_34.maxAutoClips;
|
|
object4['maxAutoClips'] = maxAutoClips;
|
|
let clipSignals = a0.clipsSettings.clipSignals;
|
|
clipSignals = clipSignals ?? env0_34.clipSignals;
|
|
object4['clipSignals'] = clipSignals;
|
|
object3['clipsSettings'] = object4;
|
|
return object3;
|
|
}
|
|
|
|
function _fun35984(a0) { // fn#35984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:7594, offset: 0x0108098f, size: 81 bytes, params: 2, frame: 13
|
|
const object3 = {};
|
|
copyDataProperties(object3, a0, undefined);
|
|
const object4 = {};
|
|
copyDataProperties(object4, a0.clipsSettings, undefined);
|
|
let enableAutoclipping = a0.clipsSettings.enableAutoclipping;
|
|
enableAutoclipping = enableAutoclipping ?? env0_34.enableAutoclipping;
|
|
object4['enableAutoclipping'] = enableAutoclipping;
|
|
object3['clipsSettings'] = object4;
|
|
return object3;
|
|
}
|
|
|
|
function _fun35985(a0) { // fn#35985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:7740, offset: 0x010809e0, size: 81 bytes, params: 2, frame: 13
|
|
const object3 = {};
|
|
copyDataProperties(object3, a0, undefined);
|
|
const object4 = {};
|
|
copyDataProperties(object4, a0.clipsSettings, undefined);
|
|
let showPovClipsInGallery = a0.clipsSettings.showPovClipsInGallery;
|
|
showPovClipsInGallery = showPovClipsInGallery ?? env0_34.showPovClipsInGallery;
|
|
object4['showPovClipsInGallery'] = showPovClipsInGallery;
|
|
object3['clipsSettings'] = object4;
|
|
return object3;
|
|
}
|
|
|
|
function CLIPS_SETTINGS_UPDATE_35986({settings}) { // fn#35986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:7940, offset: 0x01080a31, size: 71 bytes, params: 2, frame: 14
|
|
const object3 = {};
|
|
copyDataProperties(object3, env0_35, undefined);
|
|
const object4 = {};
|
|
const binding = env0_35;
|
|
copyDataProperties(object4, settings, copyDataProperties(object4, binding.clipsSettings, binding));
|
|
object3['clipsSettings'] = object4;
|
|
}
|
|
|
|
function CLIPS_SAVE_CLIP({clip}) { // fn#35987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:8050, offset: 0x01080a78, size: 454 bytes, params: 2, frame: 20
|
|
var r9;
|
|
var r10;
|
|
var r4;
|
|
var newClipIds;
|
|
var r5;
|
|
var r6;
|
|
var object2;
|
|
var binding;
|
|
var id;
|
|
var manualClipsSaved;
|
|
var candidateClipsSaved;
|
|
var value4;
|
|
var items2;
|
|
var value6;
|
|
var items4;
|
|
var value7;
|
|
const Math = global.Math;
|
|
env0_25 = Math.max(env0_25 - 1, 0);
|
|
let isCandidate = clip.isCandidate;
|
|
if (isCandidate) {
|
|
arraySpread([clip], env0_24, 1, r9);
|
|
env0_22[clip.id] = clip;
|
|
r10 = 1;
|
|
}
|
|
if (env0_28 != null) {
|
|
object2 = {};
|
|
copyDataProperties(object2, env0_28, r10);
|
|
manualClipsSaved = env0_28.manualClipsSaved;
|
|
r4 = clip.clipMethod !== 'manual' ? 0 : 1;
|
|
object2['manualClipsSaved'] = manualClipsSaved + r4;
|
|
candidateClipsSaved = env0_28.candidateClipsSaved;
|
|
isCandidate = clip.isCandidate;
|
|
value4 = isCandidate != null;
|
|
r4 = value4 && isCandidate ? 1 : 0;
|
|
object2['candidateClipsSaved'] = candidateClipsSaved + r4;
|
|
r9 = value4;
|
|
}
|
|
if (!clip.isCandidate) {
|
|
object2 = {};
|
|
object2.applicationName = clip.applicationName;
|
|
object2.ended = false;
|
|
copyDataProperties(object2, env0_27, r10);
|
|
binding = env0_27;
|
|
newClipIds = binding?.newClipIds;
|
|
r5 = newClipIds ?? [];
|
|
items2 = [];
|
|
value6 = arraySpread(items2, r5, 0, r9);
|
|
id = clip.id;
|
|
items2[value6] = id;
|
|
value6 + 1;
|
|
object2['newClipIds'] = items2;
|
|
object2 = {};
|
|
copyDataProperties(object2, env0_35, 0);
|
|
newClipIds = env0_35.newClipIds;
|
|
r6 = newClipIds ?? [];
|
|
items4 = [];
|
|
value7 = arraySpread(items4, r6, 0, r9);
|
|
id = clip.id;
|
|
items4[value7] = id;
|
|
value7 + 1;
|
|
object2['newClipIds'] = items4;
|
|
env0_35 = object2;
|
|
binding = env0_21;
|
|
id = clip.id;
|
|
binding[id] = clip;
|
|
if (clip.remoteClipId != null) {
|
|
env0_23[clip.remoteClipId] = clip.id;
|
|
}
|
|
env0_35.hasClips = true;
|
|
}
|
|
}
|
|
|
|
function CLIPS_PROMOTE_CLIP_CANDIDATE({clip}) { // fn#35988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:8609, offset: 0x01080c3e, size: 363 bytes, params: 2, frame: 23
|
|
var r12;
|
|
var r8;
|
|
let object2 = {};
|
|
object2.applicationName = clip.applicationName;
|
|
copyDataProperties(object2, env0_27, undefined);
|
|
object2['ended'] = true;
|
|
const r7 = env0_27?.newClipIds ?? [];
|
|
const items2 = [];
|
|
const value3 = arraySpread(items2, r7, 0, r12);
|
|
let id = clip.id;
|
|
items2[value3] = id;
|
|
value3 + 1;
|
|
object2['newClipIds'] = items2;
|
|
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
|
const value4 = env0_28 != null;
|
|
if (value4) {
|
|
id = env0_28.id;
|
|
r8 = id === clip.gameSessionId;
|
|
r12 = id;
|
|
} else {
|
|
r8 = value4;
|
|
}
|
|
defaultImport(r8, 'Promoting clip candidates that do not match current autoclip session');
|
|
object2 = {};
|
|
copyDataProperties(object2, env0_28, 0);
|
|
object2['candidateClipsPromoted'] = env0_28.candidateClipsPromoted + 1;
|
|
object2 = {};
|
|
copyDataProperties(object2, env0_35, 0);
|
|
r8 = env0_35.newClipIds ?? [];
|
|
const items4 = [];
|
|
const value6 = arraySpread(items4, r8, 0, r12);
|
|
items4[value6] = clip.id;
|
|
value6 + 1;
|
|
object2['newClipIds'] = items4;
|
|
env0_35 = object2;
|
|
env0_24 = env0_24.filter(function({id}) {
|
|
return id !== clip.id;
|
|
});
|
|
delete env0_22[clip.id];
|
|
env0_21[clip.id] = clip;
|
|
env0_35.hasClips = true;
|
|
}
|
|
|
|
function CLIPS_SAVE_CLIP_START({clipType}) { // fn#35990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:9110, offset: 0x01080dc3, size: 66 bytes, params: 2, frame: 5
|
|
env0_25 += 1;
|
|
const binding = env0_35;
|
|
binding.hasTakenDecoupledClip = binding.hasTakenDecoupledClip || clipType === ClipSaveTypes.DECOUPLED;
|
|
}
|
|
|
|
function CLIPS_SAVE_CLIP_ERROR() { // fn#35991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:9246, offset: 0x01080e05, size: 43 bytes, params: 1, frame: 14
|
|
const Math = global.Math;
|
|
env0_25 = Math.max(env0_25 - 1, 0);
|
|
}
|
|
|
|
function CLIPS_SAVE_CLIP_NO_OP({reason}) { // fn#35992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:9318, offset: 0x01080e30, size: 88 bytes, params: 2, frame: 15
|
|
const ClipsSaveNoOpReason = (require(4284) /* metro dependency 4284: ClipsTypes */).ClipsSaveNoOpReason;
|
|
const BUFFER_WARMING_UP = ClipsSaveNoOpReason.BUFFER_WARMING_UP;
|
|
if (reason === BUFFER_WARMING_UP) {
|
|
env0_25 = global.Math.max(env0_25 - 1, 0);
|
|
}
|
|
}
|
|
|
|
function STREAM_START_35993({sourceName, pid}) { // fn#35993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:9445, offset: 0x01080e88, size: 136 bytes, params: 2, frame: 15
|
|
var r2;
|
|
var object;
|
|
if (env0_35.clipsSettings.clipsEnabled) {
|
|
r2 = pid == null ? sourceName : RunningGameStoreNative.getGameForPID(pid)?.name ?? sourceName;
|
|
if (r2 == null) {
|
|
return false;
|
|
}
|
|
if (r2 === '') {
|
|
return false;
|
|
}
|
|
object = {applicationName: r2, newClipIds: [], ended: false};
|
|
return undefined;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function STREAM_STOP_35994({streamKey}) { // fn#35994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:9707, offset: 0x01080f10, size: 146 bytes, params: 2, frame: 16
|
|
var r1;
|
|
var r0;
|
|
var value4;
|
|
var moduleValue;
|
|
var value5;
|
|
var object2;
|
|
const value3 = env0_27 != null;
|
|
if (value3) {
|
|
value4 = undefined;
|
|
moduleValue = require(4285) /* metro dependency 4285: StreamKeyUtils */;
|
|
value5 = moduleValue.decodeStreamKey(streamKey).ownerId === AuthenticationStore.getId();
|
|
if (value5) {
|
|
if (env0_27.newClipIds.length !== 0) {
|
|
object2 = {};
|
|
copyDataProperties(object2, env0_27, require);
|
|
object2['ended'] = true;
|
|
}
|
|
r1 = value4;
|
|
} else {
|
|
r1 = value5;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value3;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function CLIPS_CLEAR_LAST_CLIPS_SESSION() { // fn#35995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:9901, offset: 0x01080fa2, size: 25 bytes, params: 1, frame: 3
|
|
if (env0_27 == null) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function CLIPS_SESSION_START({sessionId, gameId}) { // fn#35996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:9988, offset: 0x01080fbb, size: 83 bytes, params: 2, frame: 6
|
|
if (env0_28 != null) {
|
|
env0_29[env0_28.id] = env0_28;
|
|
}
|
|
const object2 = {'id': null, 'gameId': null, 'manualClipsSaved': 0, 'candidateClipsSaved': 0,
|
|
'candidateClipsPromoted': 0};
|
|
object2.id = sessionId;
|
|
object2.gameId = gameId;
|
|
}
|
|
|
|
function CLIPS_SESSION_STOP() { // fn#35997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:10170, offset: 0x0108100e, size: 46 bytes, params: 1, frame: 5
|
|
if (env0_28 == null) {
|
|
return false;
|
|
}
|
|
env0_29[env0_28.id] = env0_28;
|
|
}
|
|
|
|
function CLIPS_CLEAR_NEW_CLIP_IDS() { // fn#35998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:10267, offset: 0x0108103c, size: 21 bytes, params: 1, frame: 2
|
|
env0_35.newClipIds = [];
|
|
}
|
|
|
|
function CLIPS_REMOVE_SINGLE_NEW_CLIP_ID({clipId}) { // fn#35999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:10343, offset: 0x01081051, size: 55 bytes, params: 2, frame: 12
|
|
const binding = env0_35;
|
|
binding.newClipIds = binding.newClipIds.filter(function(a0) {
|
|
return a0 !== clipId;
|
|
});
|
|
}
|
|
|
|
function CLIPS_LOAD_DIRECTORY_SUCCESS({clips}) { // fn#36001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:10461, offset: 0x01081088, size: 196 bytes, params: 2, frame: 17
|
|
var r3;
|
|
var value4;
|
|
var isCandidate;
|
|
var binding;
|
|
var id;
|
|
var remoteClipId;
|
|
var value5;
|
|
env0_21 = {};
|
|
env0_24 = [];
|
|
const value2 = _createForOfIteratorHelperLoose_35931(clips);
|
|
const value3 = value2();
|
|
let done = value3.done;
|
|
if (!done) {
|
|
r3 = value3;
|
|
while (true) {
|
|
value4 = r3.value;
|
|
isCandidate = value4.isCandidate;
|
|
if (!isCandidate) {
|
|
binding = env0_21;
|
|
id = value4.id;
|
|
binding[id] = value4;
|
|
remoteClipId = value4.remoteClipId;
|
|
if (remoteClipId == null) {
|
|
break;
|
|
}
|
|
binding = env0_23;
|
|
remoteClipId = value4.remoteClipId;
|
|
id = value4.id;
|
|
binding[remoteClipId] = id;
|
|
break;
|
|
}
|
|
binding = env0_22;
|
|
id = value4.id;
|
|
binding[id] = value4;
|
|
binding = env0_24;
|
|
binding.push(value4);
|
|
value5 = value2();
|
|
done = value5.done;
|
|
if (done) {
|
|
break;
|
|
}
|
|
r3 = value5;
|
|
continue;
|
|
}
|
|
}
|
|
binding = env0_35;
|
|
const Object = global.Object;
|
|
binding.hasClips = Object.keys(env0_21).length > 0;
|
|
}
|
|
|
|
function CLIPS_DELETE_CLIP(a0) { // fn#36002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:10742, offset: 0x0108114c, size: 156 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
let binding = env0_21;
|
|
const property = binding[a0.id];
|
|
env0_24 = env0_24.filter(_fun36003);
|
|
delete env0_22[a0.id];
|
|
delete env0_21[a0.id];
|
|
const value2 = undefined;
|
|
if ((property == null ? value2 : property.remoteClipId) != null) {
|
|
delete env0_23[property.remoteClipId];
|
|
}
|
|
binding = env0_35;
|
|
const Object = global.Object;
|
|
binding.hasClips = Object.keys(env0_21).length > 0;
|
|
return value2;
|
|
}
|
|
|
|
function CLIPS_UPDATE_METADATA({clip}) { // fn#36004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:10971, offset: 0x01081202, size: 84 bytes, params: 2, frame: 5
|
|
if (clip.isCandidate) {
|
|
env0_22[clip.id] = clip;
|
|
} else {
|
|
env0_21[clip.id] = clip;
|
|
if (clip.remoteClipId != null) {
|
|
env0_23[clip.remoteClipId] = clip.id;
|
|
}
|
|
}
|
|
}
|
|
|
|
function RTC_CONNECTION_FLAGS(a0) { // fn#36005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:11120, offset: 0x01081256, size: 151 bytes, params: 2, frame: 22
|
|
const binding = env0_30;
|
|
const userId = a0.userId;
|
|
const object2 = {};
|
|
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
|
|
let hasFlag = flagUtilsModule.hasFlag;
|
|
let flags = a0.flags;
|
|
const CLIPS_ENABLED = VoiceFlags.CLIPS_ENABLED;
|
|
object2.clipsEnabled = Reflect.apply(hasFlag, flagUtilsModule, [flags, CLIPS_ENABLED]);
|
|
let value = flagUtilsModule;
|
|
hasFlag = value.hasFlag;
|
|
flags = a0.flags;
|
|
const ALLOW_VOICE_RECORDING = VoiceFlags.ALLOW_VOICE_RECORDING;
|
|
object2.allowVoiceRecording = Reflect.apply(hasFlag, value, [flags, ALLOW_VOICE_RECORDING]);
|
|
value = flagUtilsModule;
|
|
hasFlag = value.hasFlag;
|
|
flags = a0.flags;
|
|
const ALLOW_ANY_VIEWER_CLIPS = VoiceFlags.ALLOW_ANY_VIEWER_CLIPS;
|
|
object2.allowAnyViewerClips = Reflect.apply(hasFlag, value, [flags, ALLOW_ANY_VIEWER_CLIPS]);
|
|
binding[userId] = object2;
|
|
}
|
|
|
|
function VOICE_CHANNEL_SELECT_36007({channelId}) { // fn#36007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:11473, offset: 0x01081300, size: 29 bytes, params: 2, frame: 3
|
|
if (channelId === env0_26) {
|
|
}
|
|
}
|
|
|
|
function CLIPS_CLASSIFY_HARDWARE({classification}) { // fn#36008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:11563, offset: 0x0108131d, size: 292 bytes, params: 2, frame: 16
|
|
const hardwareClassification = env0_35.hardwareClassification;
|
|
env0_35.hardwareClassificationVersion = CLIPS_HARDWARE_CLASSIFICATION_VERSION;
|
|
env0_35.hardwareClassification = classification;
|
|
const hardwareClassification2 = env0_35.hardwareClassification;
|
|
const ClipsHardwareClassification = (require(4284) /* metro dependency 4284: ClipsTypes */).ClipsHardwareClassification;
|
|
let MEETS_AUTO_ENABLE = ClipsHardwareClassification.MEETS_AUTO_ENABLE;
|
|
if (hardwareClassification2 === MEETS_AUTO_ENABLE && hardwareClassification !== ClipsHardwareClassification.MEETS_AUTO_ENABLE) {
|
|
env0_35.clipsSettings.clipsEnabled = true;
|
|
}
|
|
const hardwareClassificationForDecoupled = env0_35.hardwareClassificationForDecoupled;
|
|
env0_35.hardwareClassificationForDecoupled = classification;
|
|
const hardwareClassificationForDecoupled2 = env0_35.hardwareClassificationForDecoupled;
|
|
MEETS_AUTO_ENABLE = ClipsHardwareClassification.MEETS_AUTO_ENABLE;
|
|
if (hardwareClassificationForDecoupled2 === MEETS_AUTO_ENABLE && hardwareClassificationForDecoupled !== ClipsHardwareClassification.MEETS_AUTO_ENABLE && env0_35.clipsSettings.clipsEnabled) {
|
|
env0_35.clipsSettings.decoupledClipsEnabled = true;
|
|
}
|
|
}
|
|
|
|
function CLIPS_INIT_36009({applicationName}) { // fn#36009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:12210, offset: 0x01081441, size: 70 bytes, params: 2, frame: 4
|
|
var object;
|
|
if (env0_35.clipsSettings.clipsEnabled) {
|
|
object = {applicationName: applicationName, newClipIds: [], ended: false};
|
|
return undefined;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
function CLIPS_DISMISS_EDUCATION({educationType}) { // fn#36011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:12443, offset: 0x0108149b, size: 147 bytes, params: 2, frame: 11
|
|
var clipsEducationState;
|
|
const Error = ClipsUserEducationType.Error;
|
|
if (Error !== educationType) {
|
|
if (ClipsUserEducationType.Disabled === educationType) {
|
|
clipsEducationState = env0_35.clipsEducationState;
|
|
clipsEducationState.dismissedAt = global.Date.now();
|
|
clipsEducationState = env0_35.clipsEducationState;
|
|
clipsEducationState.numberOfGamesLaunchedSinceDismissal = 0;
|
|
clipsEducationState = env0_35.clipsEducationState;
|
|
clipsEducationState.numberOfTimesDismissed = clipsEducationState.numberOfTimesDismissed + 1;
|
|
} else if (ClipsUserEducationType.Enabled === educationType) {
|
|
clipsEducationState = env0_35.clipsEducationState;
|
|
clipsEducationState.dismissedAt = global.Date.now();
|
|
clipsEducationState = env0_35.clipsEducationState;
|
|
clipsEducationState.numberOfGamesLaunchedSinceDismissal = 0;
|
|
clipsEducationState = env0_35.clipsEducationState;
|
|
clipsEducationState.numberOfTimesDismissed = clipsEducationState.numberOfTimesDismissed + 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
function RUNNING_GAMES_CHANGE({added}) { // fn#36012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:12742, offset: 0x0108152e, size: 56 bytes, params: 2, frame: 3
|
|
var clipsEducationState;
|
|
if (added.length > 0) {
|
|
clipsEducationState = env0_35.clipsEducationState;
|
|
clipsEducationState.numberOfGamesLaunchedSinceDismissal = clipsEducationState.numberOfGamesLaunchedSinceDismissal + 1;
|
|
}
|
|
}
|
|
|
|
function MESSAGE_CREATE_36014(a0) { // fn#36014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:12964, offset: 0x010815a5, size: 72 bytes, params: 2, frame: 17
|
|
return trackSharedRemoteClipId(a0.channelId, a0.message.attachments ?? [], a0.message.author?.id);
|
|
}
|
|
|
|
function LOAD_MESSAGES_SUCCESS_36015(a0) { // fn#36015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:13147, offset: 0x010815ed, size: 135 bytes, params: 2, frame: 27
|
|
var r4;
|
|
var r5;
|
|
var r13;
|
|
var id;
|
|
var r0;
|
|
var value6;
|
|
var trackSharedRemoteClipIdBinding;
|
|
var channelId;
|
|
var attachments;
|
|
var author;
|
|
var value7;
|
|
var value8;
|
|
const _createForOfIteratorHelperLoose_35931Binding = _createForOfIteratorHelperLoose_35931;
|
|
const messages = a0.messages;
|
|
const value2 = undefined;
|
|
const value3 = _createForOfIteratorHelperLoose_35931Binding(messages);
|
|
const value4 = value3();
|
|
let done = value4.done;
|
|
const value5 = false;
|
|
if (done) {
|
|
r0 = value5;
|
|
} else {
|
|
r4 = value5;
|
|
r5 = value4;
|
|
while (true) {
|
|
value6 = r5.value;
|
|
if (!r4) {
|
|
trackSharedRemoteClipIdBinding = trackSharedRemoteClipId;
|
|
channelId = a0.channelId;
|
|
attachments = value6.attachments;
|
|
if (attachments != null) {
|
|
r13 = attachments;
|
|
continue;
|
|
}
|
|
author = value6.author;
|
|
if (author == null) {
|
|
id = value2;
|
|
continue;
|
|
}
|
|
id = author.id;
|
|
value7 = trackSharedRemoteClipIdBinding(channelId, [], id);
|
|
r4 = value7;
|
|
}
|
|
value8 = value3();
|
|
done = value8.done;
|
|
if (done) {
|
|
r0 = r4;
|
|
break;
|
|
}
|
|
r5 = value8;
|
|
continue;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function LOGOUT_36016() { // fn#36016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:13399, offset: 0x01081674, size: 37 bytes, params: 1, frame: 10
|
|
env0_33.clear();
|
|
env0_30 = {};
|
|
}
|
|
|
|
function* _fun35936() { // fn#35936, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:2474, offset: 0x0107fd93, size: 307 bytes, params: 1, frame: 18
|
|
var r4;
|
|
var binding;
|
|
var app;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var getPath;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var binding3;
|
|
var value8;
|
|
var pathJoin;
|
|
var value9;
|
|
var error;
|
|
var error2;
|
|
var value10;
|
|
var value11;
|
|
var emitChange;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var clipsSettings = env2_35.clipsSettings;
|
|
if (clipsSettings.storageLocation === env2_19) {
|
|
binding = env2_1;
|
|
reducibleJoin27: while (true) {
|
|
if (binding(env2_2[12]) == null) {
|
|
break reducibleJoin27;
|
|
}
|
|
binding = env2_1;
|
|
app = binding(env2_2[12]).app;
|
|
if (app == null) {
|
|
break reducibleJoin27;
|
|
}
|
|
reducibleJoin5: while (true) {
|
|
reduciblePort26: while (true) {
|
|
exceptionLanding24: while (true) {
|
|
try {
|
|
binding = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
break reducibleJoin5;
|
|
}
|
|
binding = env2_15;
|
|
error2 = binding.error;
|
|
Reflect.apply(error2, binding, ['Failed to resolve videos path for default storage migration',
|
|
error]);
|
|
binding = env2_1;
|
|
app = binding(env2_2[12]).app;
|
|
getPath = app.getPath;
|
|
yield Reflect.apply(getPath, app, ['documents']);
|
|
value10 = undefined;
|
|
value11 = false;
|
|
reducibleJoin26: while (true) {
|
|
if (value11) {
|
|
return value10;
|
|
}
|
|
r4 = value10;
|
|
break reducibleJoin26;
|
|
}
|
|
break reduciblePort26;
|
|
}
|
|
clipsSettings = env2_35.clipsSettings;
|
|
clipsSettings.storageLocation = r4;
|
|
binding = env2_36;
|
|
emitChange = binding.emitChange;
|
|
Reflect.apply(emitChange, binding, []);
|
|
break reducibleJoin27;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
property = binding2[12];
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
app = value4.app;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
getPath = app.getPath;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
value5 = Reflect.apply(getPath, app, ['videos']);
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
yield value5;
|
|
try {
|
|
value6 = undefined;
|
|
value7 = false;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
if (value7) {
|
|
return value6;
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
property = binding3[13];
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
value8 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
pathJoin = value8.pathJoin;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
binding = env2_20;
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
try {
|
|
value9 = Reflect.apply(pathJoin, value8, [value6, binding]);
|
|
} catch (error) {
|
|
break exceptionLanding24;
|
|
}
|
|
r4 = value9;
|
|
clipsSettings = env2_35.clipsSettings;
|
|
clipsSettings.storageLocation = r4;
|
|
binding = env2_36;
|
|
emitChange = binding.emitChange;
|
|
Reflect.apply(emitChange, binding, []);
|
|
break reducibleJoin27;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function ClipsStoreClass() { // fn#35939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:3213, offset: 0x010802b5, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_3(this, ClipsStoreClass);
|
|
const value3 = env1_6(ClipsStoreClass);
|
|
return env1_5(this, _isNativeReflectConstruct_35928() ? global.Reflect.construct(value3, arguments,
|
|
env1_6(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_35940(a0) { // fn#35940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:3506, offset: 0x01080326, size: 52 bytes, params: 2, frame: 12
|
|
var environment;
|
|
var value;
|
|
if (a0 != null) {
|
|
value = environment.__proto__;
|
|
env1_35 = a0;
|
|
}
|
|
(function() {
|
|
return _migrateDefaultStorage.apply(this, arguments);
|
|
})();
|
|
this.waitFor(RunningGameStoreNative);
|
|
}
|
|
|
|
function value_35944(a0) { // fn#35944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:3765, offset: 0x01080388, size: 34 bytes, params: 2, frame: 3
|
|
const property = env1_23[a0];
|
|
if (property != null) {
|
|
return env1_21[property];
|
|
}
|
|
}
|
|
|
|
function value_35948() { // fn#35948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:4007, offset: 0x010803ba, size: 15 bytes, params: 1, frame: 1
|
|
return env1_35.clipsSettings;
|
|
}
|
|
|
|
function value_35949() { // fn#35949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:4078, offset: 0x010803c9, size: 99 bytes, params: 1, frame: 16
|
|
var r1;
|
|
var r0;
|
|
var currentUser;
|
|
var value3;
|
|
var moduleValue;
|
|
const value = environment.__proto__;
|
|
const enableAutoclipping = env1_35.clipsSettings.enableAutoclipping;
|
|
if (enableAutoclipping != null) {
|
|
r0 = enableAutoclipping;
|
|
} else {
|
|
currentUser = UserStore.getCurrentUser();
|
|
value3 = currentUser != null;
|
|
if (value3) {
|
|
moduleValue = require(1391) /* metro dependency 1391: FlagUtils */;
|
|
r1 = moduleValue.hasFlag(currentUser.flags, UserFlags.STAFF);
|
|
} else {
|
|
r1 = value3;
|
|
}
|
|
r0 = r1;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_35952(a0) { // fn#35952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:4420, offset: 0x01080435, size: 16 bytes, params: 2, frame: 2
|
|
return env1_29[a0];
|
|
}
|
|
|
|
function value_35954(a0) { // fn#35954, offset: 0x01080460, size: 16 bytes, params: 2, frame: 2
|
|
return env1_26 === a0;
|
|
}
|
|
|
|
function value_35955() { // fn#35955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:4618, offset: 0x01080470, size: 15 bytes, params: 1, frame: 1
|
|
return env1_35.hardwareClassification;
|
|
}
|
|
|
|
function value_35956() { // fn#35956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:4714, offset: 0x0108047f, size: 15 bytes, params: 1, frame: 1
|
|
return env1_35.hardwareClassificationForDecoupled;
|
|
}
|
|
|
|
function value_35957() { // fn#35957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:4817, offset: 0x0108048e, size: 15 bytes, params: 1, frame: 1
|
|
return env1_35.hardwareClassificationVersion;
|
|
}
|
|
|
|
function value_35958() { // fn#35958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:4911, offset: 0x0108049d, size: 17 bytes, params: 1, frame: 2
|
|
return env1_25 >= MAX_SIMULTANEOUS_SAVE_CLIP_OPERATIONS;
|
|
}
|
|
|
|
function value_35960(a0) { // fn#35960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:5024, offset: 0x010804ae, size: 43 bytes, params: 2, frame: 4
|
|
const value = environment.__proto__;
|
|
const clipsEnabled = env1_30[a0]?.clipsEnabled;
|
|
return clipsEnabled != null && clipsEnabled;
|
|
}
|
|
|
|
function value_35961(a0) { // fn#35961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:5147, offset: 0x010804d9, size: 43 bytes, params: 2, frame: 4
|
|
const value = environment.__proto__;
|
|
const allowVoiceRecording = env1_30[a0]?.allowVoiceRecording;
|
|
return allowVoiceRecording != null && allowVoiceRecording;
|
|
}
|
|
|
|
function value_35962(a0) { // fn#35962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:5277, offset: 0x01080504, size: 43 bytes, params: 2, frame: 4
|
|
const value = environment.__proto__;
|
|
const allowAnyViewerClips = env1_30[a0]?.allowAnyViewerClips;
|
|
return allowAnyViewerClips != null && allowAnyViewerClips;
|
|
}
|
|
|
|
function value_35963() { // fn#35963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:5385, offset: 0x0108052f, size: 15 bytes, params: 1, frame: 1
|
|
return env1_35.hasClips;
|
|
}
|
|
|
|
function value_35964() { // fn#35964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:5451, offset: 0x0108053e, size: 15 bytes, params: 1, frame: 1
|
|
return env1_35.hasTakenDecoupledClip;
|
|
}
|
|
|
|
function value_35965() { // fn#35965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:5525, offset: 0x0108054d, size: 21 bytes, params: 1, frame: 1
|
|
return env1_35.clipsSettings.remindersEnabled;
|
|
}
|
|
|
|
function value_35966() { // fn#35966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:5605, offset: 0x01080562, size: 15 bytes, params: 1, frame: 1
|
|
return env1_35.newClipIds;
|
|
}
|
|
|
|
function value_35967(a0) { // fn#35967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:5667, offset: 0x01080571, size: 22 bytes, params: 2, frame: 11
|
|
return env1_32.has(a0);
|
|
}
|
|
|
|
function value_35969(a0, a1) { // fn#35969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:5788, offset: 0x01080590, size: 56 bytes, params: 3, frame: 13
|
|
var r1;
|
|
let value = environment.__proto__;
|
|
value = env1_33.get(a1);
|
|
if (value == null) {
|
|
r1 = undefined;
|
|
} else {
|
|
value = value.has(a0);
|
|
r1 = value;
|
|
}
|
|
return r1 != null && r1;
|
|
}
|
|
|
|
function _fun36003({id}) { // fn#36003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4437:10798, offset: 0x010811e8, size: 26 bytes, params: 2, frame: 2
|
|
return env0_0.id !== id;
|
|
}
|
|
|