Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,245 @@
|
||||
/* Metro module 16152; source: modules/quests/managers/QuestFetchManager.tsx; dependencies: [6, 7, 15, 17, 18, 7093, 672, 9479, 9484, 1216, 477, 9493, 7108, 6531, 4860, 2] */
|
||||
function _fun124815(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#124815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:6, offset: 0x025c3cad, size: 414 bytes, params: 8, frame: 20
|
||||
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 questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const env0_9 = Millis.DAY;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
let MINUTE = Millis.MINUTE;
|
||||
const env0_10 = 30 * MINUTE;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const SECOND = Millis.SECOND;
|
||||
const env0_11 = 5 * SECOND;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
MINUTE = Millis.MINUTE;
|
||||
const env0_12 = 5 * MINUTE;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
Millis.HOUR;
|
||||
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
MINUTE = Millis.MINUTE;
|
||||
const env0_13 = 5 * MINUTE;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun124819(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/managers/QuestFetchManager.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_124816() { // fn#124816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:158, offset: 0x025c3e4b, 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_124816_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun124819(a0) { // fn#124819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:509, offset: 0x025c3ead, size: 72 bytes, params: 2, frame: 15
|
||||
const closure = QuestFetchManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: '_fetch', value: value_124829}]);
|
||||
}
|
||||
|
||||
function QuestFetchManager(a0) { // fn#124820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:521, offset: 0x025c3ef5, size: 330 bytes, params: 2, frame: 21
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let binding = env1_3;
|
||||
binding(this, QuestFetchManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(QuestFetchManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_124816()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
const Date = global.Date;
|
||||
value.instantiatedAt = Date.now();
|
||||
value.initialFetchTimerId = null;
|
||||
value.initialQuestHomeHeroFetchTimerId = null;
|
||||
value.recurringFetchTimerId = null;
|
||||
value.lastFetchAttemptedAt = 0;
|
||||
value.lastFetchedQuestForLocaleChangeAt = 0;
|
||||
value.handleQuestsFetchCurrentQuestsBegin = handleQuestsFetchCurrentQuestsBegin;
|
||||
value.handlePostConnectionOpen = handlePostConnectionOpen_124822;
|
||||
value.handleRunningGamesChange = function() {
|
||||
};
|
||||
value.handleUserSettingsProtoUpdate = handleUserSettingsProtoUpdate;
|
||||
value.handleLogout = handleLogout_124828;
|
||||
var handleQuestsFetchCurrentQuestsBegin = value.handleQuestsFetchCurrentQuestsBegin;
|
||||
var handleUserSettingsProtoUpdate = value.handleUserSettingsProtoUpdate;
|
||||
value.actions = {QUESTS_FETCH_CURRENT_QUESTS_BEGIN: handleQuestsFetchCurrentQuestsBegin,
|
||||
POST_CONNECTION_OPEN: value.handlePostConnectionOpen, RUNNING_GAMES_CHANGE: value.handleRunningGamesChange,
|
||||
RUNNING_NON_GAMES_CHANGE: value.handleRunningGamesChange,
|
||||
USER_SETTINGS_PROTO_UPDATE: handleUserSettingsProtoUpdate, LOGOUT: value.handleLogout};
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_124829(a0) { // fn#124829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:2549, offset: 0x025c4341, size: 391 bytes, params: 2, frame: 20
|
||||
var r3;
|
||||
var defaultImport;
|
||||
var addBreadcrumb;
|
||||
var object;
|
||||
var lastFetchedCurrentQuests;
|
||||
var value4;
|
||||
var defaultImport3;
|
||||
let value = environment.__proto__;
|
||||
if ((require(9479) /* metro dependency 9479: QuestsEligibility */).getIsEligibleForQuests() && !QuestStore.isFetchingCurrentQuests) {
|
||||
defaultImport = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
|
||||
addBreadcrumb = defaultImport.addBreadcrumb;
|
||||
object = {callerSource: a0};
|
||||
object.storeSize = QuestStore.quests.size;
|
||||
lastFetchedCurrentQuests = QuestStore.lastFetchedCurrentQuests;
|
||||
object.lastFetchedCurrentQuests = lastFetchedCurrentQuests;
|
||||
value4 = global.Date.now();
|
||||
lastFetchedCurrentQuests = QuestStore.lastFetchedCurrentQuests;
|
||||
object.msSinceLastFetch = value4 - lastFetchedCurrentQuests;
|
||||
object.isFetchingCurrentQuests = QuestStore.isFetchingCurrentQuests;
|
||||
Reflect.apply(addBreadcrumb, defaultImport, [{'category': 'quests.fetch',
|
||||
'message': 'QuestFetchManager._fetch triggered', data: object}]);
|
||||
(require(9484) /* metro dependency 9484: QuestActionCreators */).fetchCurrentQuests();
|
||||
r3 = (require(477) /* metro dependency 477: PlatformUtils */).isMac() && (importDefault(9493) /* metro dependency 9493: DiscordAppStateNative */).getState() !== 'focused';
|
||||
if (!r3) {
|
||||
defaultImport3 = importDefault(7108) /* metro dependency 7108: NewAdRequestBehaviorExperiment */;
|
||||
r3 = defaultImport3.getConfig({location: 'QuestFetchManager'}).enableNewRequestBehavior;
|
||||
}
|
||||
if (!r3) {
|
||||
value = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
||||
value.fetchQuestToDeliver((require(6531) /* metro dependency 6531: QuestTypes */).QuestPlacement.MOBILE_HOME_DOCK_AREA,
|
||||
|
||||
|
||||
a0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function handleQuestsFetchCurrentQuestsBegin() { // fn#124821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:983, owner: QuestFetchManager.handleQuestsFetchCurrentQuestsBegin, offset: 0x025c403f, size: 34 bytes, params: 1, frame: 10
|
||||
const binding = env0_0;
|
||||
const Date = global.Date;
|
||||
binding.lastFetchAttemptedAt = Date.now();
|
||||
}
|
||||
|
||||
function QuestFetchManagerHandlePostConnectionOpen() { // fn#124822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1050, owner: QuestFetchManager.handlePostConnectionOpen, offset: 0x025c4061, size: 305 bytes, params: 1, frame: 19
|
||||
let window = global.window;
|
||||
const clearTimeout = window.clearTimeout;
|
||||
const binding = env0_0;
|
||||
Reflect.apply(clearTimeout, window, [binding.initialFetchTimerId]);
|
||||
window = global.window;
|
||||
window.clearTimeout(binding.initialQuestHomeHeroFetchTimerId);
|
||||
window = global.window;
|
||||
window.clearTimeout(binding.recurringFetchTimerId);
|
||||
window = global.window;
|
||||
binding.recurringFetchTimerId = window.setInterval(_fun124823, env2_10);
|
||||
let Math = global.Math;
|
||||
const floor = Math.floor;
|
||||
const Math2 = global.Math;
|
||||
const value4 = Reflect.apply(floor, Math, [Math2.random() * env2_11]);
|
||||
binding.initialFetchTimerId = global.window.setTimeout(_fun124824, value4);
|
||||
const questsEligibilityModule = require(9479) /* metro dependency 9479: QuestsEligibility */;
|
||||
const getIsEligibleForQuests = questsEligibilityModule.getIsEligibleForQuests;
|
||||
if (Reflect.apply(getIsEligibleForQuests, questsEligibilityModule, [])) {
|
||||
Math = global.Math;
|
||||
env0_0.initialQuestHomeHeroFetchTimerId = global.window.setTimeout(_fun124825,
|
||||
value4 + Math.floor(global.Math.random() * env2_11));
|
||||
}
|
||||
}
|
||||
|
||||
function QuestFetchManagerHandleUserSettingsProtoUpdate({partial, settings, wasSaved}) { // fn#124827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1734, owner: QuestFetchManager.handleUserSettingsProtoUpdate, offset: 0x025c4249, size: 152 bytes, params: 2, frame: 12
|
||||
var value4;
|
||||
var binding;
|
||||
let value = 'localization' in settings.proto;
|
||||
let r0 = value ? !partial : !value;
|
||||
r0 = !r0 ? wasSaved : r0;
|
||||
if (!r0) {
|
||||
value = global.Date.now();
|
||||
value -= env0_0.lastFetchedQuestForLocaleChangeAt;
|
||||
value4 = environment.__proto__.__proto__;
|
||||
value = value <= env2_12;
|
||||
r0 = value;
|
||||
}
|
||||
if (!r0) {
|
||||
binding = env0_0;
|
||||
binding.lastFetchedQuestForLocaleChangeAt = global.Date.now();
|
||||
binding._fetch('user_settings');
|
||||
}
|
||||
}
|
||||
|
||||
function QuestFetchManagerHandleLogout() { // fn#124828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1950, owner: QuestFetchManager.handleLogout, offset: 0x025c42e1, size: 96 bytes, params: 1, frame: 13
|
||||
let window = global.window;
|
||||
const clearTimeout = window.clearTimeout;
|
||||
const binding = env0_0;
|
||||
Reflect.apply(clearTimeout, window, [binding.initialFetchTimerId]);
|
||||
window = global.window;
|
||||
window.clearTimeout(binding.initialQuestHomeHeroFetchTimerId);
|
||||
window = global.window;
|
||||
window.clearTimeout(binding.recurringFetchTimerId);
|
||||
binding.lastFetchAttemptedAt = 0;
|
||||
binding.lastFetchedQuestForLocaleChangeAt = 0;
|
||||
}
|
||||
|
||||
function _fun124823() { // fn#124823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1243, offset: 0x025c4192, size: 70 bytes, params: 1, frame: 11
|
||||
const Date = global.Date;
|
||||
let value = Date.now();
|
||||
value -= env1_0.lastFetchAttemptedAt;
|
||||
if (value > DAY) {
|
||||
env1_0._fetch('post_connect_recurring');
|
||||
}
|
||||
}
|
||||
|
||||
function _fun124824() { // fn#124824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1403, offset: 0x025c41d8, size: 70 bytes, params: 1, frame: 11
|
||||
const Date = global.Date;
|
||||
let value = Date.now();
|
||||
value -= QuestStore.lastFetchedCurrentQuests;
|
||||
if (!(value <= env3_13)) {
|
||||
value = environment.__proto__;
|
||||
env1_0._fetch('post_connect_initial');
|
||||
}
|
||||
}
|
||||
|
||||
function _fun124825() { // fn#124825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16360:1612, offset: 0x025c421e, size: 43 bytes, params: 1, frame: 11
|
||||
var value;
|
||||
var property;
|
||||
var error;
|
||||
try {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
property = dependencyMap[8];
|
||||
value = require(property);
|
||||
value.fetchQuestHomeHero();
|
||||
} catch (error) {
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user