180 lines
9.9 KiB
TypeScript
180 lines
9.9 KiB
TypeScript
/* Metro module 7503; source: modules/activities/DeveloperActivityShelfStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 7504, 3829, 566, 694, 2] */
|
|
function _fun60481(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:6, offset: 0x01704658, size: 502 bytes, params: 8, frame: 20
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_4 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_5 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_6 = importDefault(18) /* metro dependency 18 */;
|
|
const env0_7 = (require(661) /* metro dependency 661: Constants */).ApplicationFlags;
|
|
({'lastUsedObject': null, 'useActivityUrlOverride': false, 'activityUrlOverride': null,
|
|
'filter': ''}).lastUsedObject = {};
|
|
object2 = {INITIALIZED: 'INITIALIZED', LOADING: 'LOADING', LOADED: 'LOADED', ERROR: 'ERROR'};
|
|
const env0_10 = object2.INITIALIZED;
|
|
const env0_11 = [];
|
|
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
|
let value = _fun60485(PersistedStore);
|
|
value.displayName = 'DeveloperActivityShelfStore';
|
|
value.persistKey = 'DeveloperActivityShelfStore';
|
|
value.migrations = [function(a0) {
|
|
delete a0.isEnabled;
|
|
var object = {};
|
|
copyDataProperties(object, a0, a0);
|
|
return object;
|
|
}];
|
|
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_60499,
|
|
DEVELOPER_ACTIVITY_SHELF_TOGGLE_USE_ACTIVITY_URL_OVERRIDE: DEVELOPER_ACTIVITY_SHELF_TOGGLE_USE_ACTIVITY_URL_OVERRIDE,
|
|
DEVELOPER_ACTIVITY_SHELF_SET_ACTIVITY_URL_OVERRIDE: DEVELOPER_ACTIVITY_SHELF_SET_ACTIVITY_URL_OVERRIDE,
|
|
DEVELOPER_ACTIVITY_SHELF_MARK_ACTIVITY_USED: DEVELOPER_ACTIVITY_SHELF_MARK_ACTIVITY_USED,
|
|
DEVELOPER_ACTIVITY_SHELF_FETCH_START: DEVELOPER_ACTIVITY_SHELF_FETCH_START,
|
|
DEVELOPER_ACTIVITY_SHELF_FETCH_SUCCESS: DEVELOPER_ACTIVITY_SHELF_FETCH_SUCCESS_60505,
|
|
DEVELOPER_ACTIVITY_SHELF_FETCH_FAIL: DEVELOPER_ACTIVITY_SHELF_FETCH_FAIL,
|
|
DEVELOPER_ACTIVITY_SHELF_UPDATE_FILTER: DEVELOPER_ACTIVITY_SHELF_UPDATE_FILTER,
|
|
USER_SETTINGS_PROTO_UPDATE: function() {
|
|
}});
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/activities/DeveloperActivityShelfStore.tsx');
|
|
exports.default = value;
|
|
exports.DevShelfFetchState = object2;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_60482() { // fn#60482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:175, offset: 0x0170484e, 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_60482_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun60485(a0) { // fn#60485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:592, offset: 0x017048ac, size: 281 bytes, params: 2, frame: 16
|
|
const closure = DeveloperActivityShelfStore;
|
|
env0_6(closure, a0);
|
|
return env0_3(closure, [{key: 'initialize', value: value_60487}, {key: 'getState', value: value_60488},
|
|
{key: 'getIsEnabled', value: value_60489}, {key: 'getLastUsedObject', value: value_60490},
|
|
{key: 'getUseActivityUrlOverride', value: value_60491}, {key: 'getActivityUrlOverride', value: value_60492},
|
|
{key: 'getFetchState', value: function() {
|
|
return INITIALIZED;
|
|
}}, {key: 'getFilter', value: value_60494}, {key: 'getDeveloperShelfItems', value: value_60495},
|
|
{key: 'inDevModeForApplication', value: value_60496}]);
|
|
}
|
|
|
|
function LOGOUT_60499() { // fn#60499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1983, offset: 0x01704b16, size: 55 bytes, params: 1, frame: 2
|
|
({'lastUsedObject': null, 'useActivityUrlOverride': false, 'activityUrlOverride': null,
|
|
'filter': ''}).lastUsedObject = {};
|
|
env0_10 = env0_9.INITIALIZED;
|
|
env0_11 = [];
|
|
}
|
|
|
|
function DEVELOPER_ACTIVITY_SHELF_TOGGLE_USE_ACTIVITY_URL_OVERRIDE() { // fn#60500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2163, offset: 0x01704b4d, size: 26 bytes, params: 1, frame: 2
|
|
const binding = env0_8;
|
|
const useActivityUrlOverride = binding.useActivityUrlOverride;
|
|
binding.useActivityUrlOverride = !useActivityUrlOverride;
|
|
}
|
|
|
|
function DEVELOPER_ACTIVITY_SHELF_SET_ACTIVITY_URL_OVERRIDE({activityUrlOverride}) { // fn#60501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2312, offset: 0x01704b67, size: 26 bytes, params: 2, frame: 2
|
|
env0_8.activityUrlOverride = activityUrlOverride;
|
|
}
|
|
|
|
function DEVELOPER_ACTIVITY_SHELF_MARK_ACTIVITY_USED({applicationId, timestamp}) { // fn#60502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2444, offset: 0x01704b81, size: 71 bytes, params: 2, frame: 14
|
|
if (env0_11.find(function({id}) {
|
|
return id === applicationId;
|
|
}) == null) {
|
|
return false;
|
|
}
|
|
env0_8.lastUsedObject[applicationId] = timestamp;
|
|
}
|
|
|
|
function DEVELOPER_ACTIVITY_SHELF_FETCH_START() { // fn#60504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2570, offset: 0x01704bc8, size: 21 bytes, params: 1, frame: 2
|
|
env0_10 = env0_9.LOADING;
|
|
}
|
|
|
|
function DEVELOPER_ACTIVITY_SHELF_FETCH_SUCCESS_60505({applications}) { // fn#60505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2661, offset: 0x01704bdd, size: 51 bytes, params: 2, frame: 12
|
|
env0_10 = env0_9.LOADED;
|
|
env0_11 = applications.filter(function(a0) {
|
|
return require(dependencyMap[6]).hasApplicationFlag(a0, ApplicationFlags.EMBEDDED);
|
|
});
|
|
}
|
|
|
|
function DEVELOPER_ACTIVITY_SHELF_FETCH_FAIL(a0) { // fn#60507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2852, offset: 0x01704c44, size: 29 bytes, params: 2, frame: 2
|
|
a0.type;
|
|
env0_10 = env0_9.ERROR;
|
|
}
|
|
|
|
function DEVELOPER_ACTIVITY_SHELF_UPDATE_FILTER({filter}) { // fn#60508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:2976, offset: 0x01704c61, size: 25 bytes, params: 2, frame: 2
|
|
env0_8.filter = filter;
|
|
}
|
|
|
|
function value_60487(a0) { // fn#60487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:957, offset: 0x017049c5, size: 54 bytes, params: 2, frame: 12
|
|
copyDataProperties({'lastUsedObject': null, 'useActivityUrlOverride': false, 'activityUrlOverride': null,
|
|
'filter': '', lastUsedObject: {}}, a0 ?? ({}), null);
|
|
value = environment.__proto__;
|
|
}
|
|
|
|
function value_60489() { // fn#60489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1140, offset: 0x017049fb, size: 61 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
|
|
return DeveloperMode.getSetting() && env1_11.length > 0;
|
|
}
|
|
|
|
function value_60490() { // fn#60490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1238, offset: 0x01704a38, size: 15 bytes, params: 1, frame: 1
|
|
return env1_8.lastUsedObject;
|
|
}
|
|
|
|
function value_60491() { // fn#60491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1314, offset: 0x01704a47, size: 31 bytes, params: 1, frame: 9
|
|
return this.getIsEnabled() && env1_8.useActivityUrlOverride;
|
|
}
|
|
|
|
function value_60492() { // fn#60492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1416, offset: 0x01704a66, size: 33 bytes, params: 1, frame: 9
|
|
return this.getIsEnabled() ? env1_8.activityUrlOverride : null;
|
|
}
|
|
|
|
function value_60494() { // fn#60494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1555, offset: 0x01704a87, size: 34 bytes, params: 1, frame: 9
|
|
return this.getIsEnabled() ? env1_8.filter : '';
|
|
}
|
|
|
|
function value_60495() { // fn#60495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1643, offset: 0x01704aa9, size: 31 bytes, params: 1, frame: 9
|
|
const getIsEnabled = this.getIsEnabled;
|
|
return Reflect.apply(getIsEnabled, this, []) ? env1_11 : [];
|
|
}
|
|
|
|
function value_60496(a0) { // fn#60496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7681:1725, offset: 0x01704ac8, size: 56 bytes, params: 2, frame: 12
|
|
var environment;
|
|
var r0;
|
|
const env0_0 = a0;
|
|
let value = this.getIsEnabled();
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = env1_11.find(_fun60497);
|
|
value = value != null;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|