/* Metro module 4267; source: stores/DetectableGameStore.tsx; dependencies: [6, 7, 15, 17, 18, 4235, 661, 4238, 672, 4268, 587, 477, 4269, 21, 1360, 1909, 683, 3829, 566, 694, 2] */ import ClassCallCheck from '../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */ import CreateClass from '../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */ import PossibleConstructorReturn from '../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */ import Module00017 from '../by-id/module-00017.js'; /* Metro dependency 17 */ import Inherits from '../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */ import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import ApplicationRecord from '../records/ApplicationRecord.tsx'; /* Metro dependency 4235 */ import CachedEntriesMap from '../lib/CachedEntriesMap.tsx'; /* Metro dependency 4268 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as PlatformUtilsModule from '../utils/PlatformUtils.tsx'; /* Metro dependency 477 */ import * as StorageModule from '../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */ import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */ import * as GlobalUtilsModule from '../utils/GlobalUtils.tsx'; /* Metro dependency 1360 */ import * as ServerModule from '../flow/Server.tsx'; /* Metro dependency 1909 */ import * as UserSettingsModule from '../modules/user_settings/UserSettings.tsx'; /* Metro dependency 3829 */ import * as ApplicationRecordModule from '../records/ApplicationRecord.tsx'; /* Metro dependency 4235 */ import * as ApplicationConstantsModule from '../modules/applications/ApplicationConstants.tsx'; /* Metro dependency 4238 */ import * as GameDetectionTypesModule from '../modules/game_detection/GameDetectionTypes.tsx'; /* Metro dependency 4269 */ function _fun36063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:6, offset: 0x01081d09, size: 924 bytes, params: 8, frame: 23 var r9; var value4; var value13; const env0_0 = require; const _arrayLikeToArray_36069 = 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 gameFromServer2 = gameFromServer; let Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis; const env0_12 = Millis.DAY; let value = CachedEntriesMap; value = new value(); Object = global.Object; value = null; Object = global.Object; const Storage = (StorageModule).Storage; if (value == Storage.get('GameStoreReportedGames')) { value4 = global.Object.create(value); } const env0_24 = []; const env0_25 = []; const Map = global.Map; const map = new Map(); Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis; const env0_27 = Millis.HOUR; const Set = global.Set; const set = new Set(); if (!(require(477) /* metro dependency 477: PlatformUtils */).isWindows()) { if (!(require(477) /* metro dependency 477: PlatformUtils */).isMac()) { value13 = require(477) /* metro dependency 477: PlatformUtils */; r9 = value13.isLinux() ? 'linux' : value; } } const PersistedStore = (Flux).PersistedStore; value = _fun36074(PersistedStore); value.displayName = 'GameStore'; value.persistKey = 'GameStore'; value.migrations = [function(a0) { var r2; var r0; var object; if (a0 != null) { object = {detectableGamesEtag: a0.detectableGamesEtag}; r2 = a0.detectableGames?.map(_fun36113); r2 = r2 ?? []; object.detectableGames = r2; r0 = object; } else { r0 = {detectableGamesEtag: '', detectableGames: []}; } return r0; }, function(a0) { return require(dependencyMap[11]).isDesktop() ? a0 : {detectableGamesEtag: '', detectableGames: []}; }, function() { return {detectableGamesEtag: '', detectableGames: []}; }, function(a0) { var r5; var object = {}; copyDataProperties(object, a0, r5); object['blocklistEtag'] = a0.blocklistEtag ?? ''; object['blocklistExecutables'] = a0.blocklistExecutables ?? []; object['blocklistPatterns'] = a0.blocklistPatterns ?? []; return object; }]; value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {OVERLAY_INITIALIZE: OVERLAY_INITIALIZE_36117, GAMES_DATABASE_FETCH: function() { env0_18 = true; }, GAMES_DATABASE_FETCH_FAIL: function() { env0_18 = false; env0_20 = true; }, GAMES_DATABASE_UPDATE: GAMES_DATABASE_UPDATE, GAMES_BLOCKLIST_FETCH: function() { env0_22 = true; }, GAMES_BLOCKLIST_FETCH_FAIL: function() { env0_22 = false; }, GAMES_BLOCKLIST_UPDATE: GAMES_BLOCKLIST_UPDATE}); (FileImportTrackerModule).fileFinishedImporting('stores/DetectableGameStore.tsx'); exports.default = value; exports.gameFromServer = gameFromServer2; function _isNativeReflectConstruct_36064() { // fn#36064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:248, offset: 0x010820a5, 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_36064_isNativeReflectConstruct = function() { return !!result; })(); } function _createForOfIteratorHelperLoose_36067(a0, a1) { // fn#36067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:441, offset: 0x01082103, 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 _fun36068; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_36069(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_36069(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_36069(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun36068; } 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 _fun36068() { // fn#36068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:1012, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5 return env0_1 >= env0_0.length ? {done: true} : {done: false, value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]}; } } function gameFromServer({id, name, executables, overlay, overlay_warn, overlay_compatibility_hook, hook, aliases, overlay_methods, themes, icon_hash, third_party_skus, cover_image_hash, content_classification}) { // fn#36070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:1708, offset: 0x01082275, size: 298 bytes, params: 2, frame: 15 const object = {}; object.id = id; object.name = name; const r6 = executables ?? []; object.executables = r6.map(createExecutable); object.overlay = overlay != null && overlay; object.overlayWarn = overlay_warn != null && overlay_warn; object.overlayCompatibilityHook = overlay_compatibility_hook != null && overlay_compatibility_hook; object.hook = hook == null || hook; object.aliases = aliases ?? []; object.supportsOutOfProcessOverlay = ApplicationRecord.supportsOutOfProcessOverlay(overlay_methods); object.themes = themes ?? []; object.icon = icon_hash ?? undefined; object.thirdPartySkus = third_party_skus ?? []; object.cover_image_hash = cover_image_hash ?? undefined; object.content_classification = content_classification ?? undefined; return object; } function addGameIdToNameCache(a0, a1) { // fn#36072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:2848, offset: 0x01082464, size: 57 bytes, params: 3, frame: 12 if (env0_14[a1] == null) { env0_14[a1] = []; } env0_14[a1].push(a0); } function addDetectableGame(a0) { // fn#36073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:2918, offset: 0x0108249d, size: 275 bytes, params: 2, frame: 19 var r4; var r3; var r2; var value3; var value6; var value7; var executables; var value8; var value9; var value10; let value = a0; const DetectableGameRecord = (GameDetectionTypesModule).DetectableGameRecord; reducibleJoin2: while (true) { if (value instanceof DetectableGameRecord) { value3 = convertGameRecordToGame(value); r4 = value3; break reducibleJoin2; } r4 = value; break reducibleJoin2; } let binding = env0_13; const set = binding.set; let id = value.id; Reflect.apply(set, binding, [id, r4]); let addGameIdToNameCacheBinding = addGameIdToNameCache; id = r4.id; let name = r4.name; let toLowerCase = name.toLowerCase; addGameIdToNameCacheBinding(id, Reflect.apply(toLowerCase, name, [])); const value4 = _createForOfIteratorHelperLoose_36067(value.aliases); const value5 = value4(); let done = value5.done; if (!done) { r3 = value5; reducibleLoop3: while (true) { value6 = r3.value; addGameIdToNameCacheBinding = addGameIdToNameCache; id = r4.id; toLowerCase = value6.toLowerCase; addGameIdToNameCacheBinding(id, Reflect.apply(toLowerCase, value6, [])); value7 = value4(); done = value7.done; if (done) { break reducibleLoop3; } r3 = value7; continue reducibleLoop3; } } reducibleJoin7: while (true) { if (!PlatformUtilsModule.isDesktop()) { break reducibleJoin7; } _createForOfIteratorHelperLoose_36067Binding = _createForOfIteratorHelperLoose_36067; executables = value.executables; value = _createForOfIteratorHelperLoose_36067Binding(executables); value8 = value(); done = value8.done; if (done) { break reducibleJoin7; } r2 = value8; reducibleLoop6: while (true) { value9 = r2.value; binding = env0_15; name = value9.name; id = r4.id; binding[name] = id; value10 = value(); done = value10.done; if (done) { break reducibleJoin7; } r2 = value10; continue reducibleLoop6; } } } function _fun36074(a0) { // fn#36074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:3353, offset: 0x010825b0, size: 621 bytes, params: 2, frame: 16 const DetectableGameStore2 = DetectableGameStore; Inherits(DetectableGameStore2, a0); return CreateClass(DetectableGameStore2, [{key: 'initialize', value: value_36076}, {key: 'getState', value: value_36079}, {key: 'games', get: get_36081}, {key: 'getDetectableGame', value: value_36082}, {key: 'searchGamesByName', value: value_36083}, {key: 'findGame', value: value_36084}, {key: 'getOfficialGame', value: function(a0) { var r3; var value3; var value4; var value = null; if (value == a0) { return value; } var property = a0.type; if (property === ApplicationTypes.GAME) { r3 = a0.id; } else { property = a0.linkedGames; value3 = undefined; if (value == property) { r3 = value3; } else { value4 = property.find(_fun36088); r3 = value == value4 ? value3 : value4.id; } } return value == r3 ? value : this.getDetectableGame(r3); }}, {key: 'getGameByApplication', value: value_36089}, {key: 'isGameInDatabase', value: function(a0) { var value = this.findGame(a0); value = value != null; return value || a0.nativeProcessObserverId !== undefined && !(2147483648 & a0.nativeProcessObserverId); }}, {key: 'fetching', get: get_36092}, {key: 'detectableGamesEtag', get: get_36093}, {key: 'blocklistEtag', get: get_36094}, {key: 'lastFetched', get: get_36095}, {key: 'hasAttemptedFetch', get: get_36096}, {key: 'detectableGamesTtl', get: function() { return DAY; }}, {key: 'canFetchDetectableGames', value: value_36098}, {key: 'canFetchExecutableBlocklist', value: value_36099}, {key: 'getGameByExecutable', value: value_36100}, {key: 'shouldBlock', value: value_36101}, {key: 'getBlockReason', value: value_36105}, {key: 'maybeTrackApplicationLookupFallthrough', value: value_36108}, {key: 'maybeTrackBlock', value: value_36109}, {key: 'shouldReport', value: value_36110}, {key: 'markGameReported', value: value_36111}]); function DetectableGameStore() { // fn#36075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:3365, offset: 0x0108281d, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_3(this, DetectableGameStore); const value3 = env1_6(DetectableGameStore); return env1_5(this, _isNativeReflectConstruct_36064() ? global.Reflect.construct(value3, arguments, env1_6(this).constructor) : value3.apply(this, arguments)); } function value_36076(a0) { // fn#36076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:3678, offset: 0x0108288e, size: 150 bytes, params: 2, frame: 14 var environment; var detectableGamesEtag; var value; var blocklistEtag; var blocklistExecutables; var value2; var detectableGames; if (a0 != null) { detectableGamesEtag = a0.detectableGamesEtag; if (detectableGamesEtag != null) { detectableGamesEtag = a0.detectableGamesEtag; value = environment.__proto__; } blocklistEtag = a0.blocklistEtag; if (blocklistEtag != null) { blocklistEtag = a0.blocklistEtag; value = environment.__proto__; } blocklistExecutables = a0.blocklistExecutables; if (blocklistExecutables != null) { blocklistExecutables = a0.blocklistExecutables; value = environment.__proto__; } if (a0.blocklistPatterns != null) { value = a0.blocklistPatterns.map(function(a0) { var RegExp = global.RegExp; var value = Object.create(RegExp.prototype, {constructor: {value: RegExp}}); var value2 = new RegExp(a0, 'i'); return value2 instanceof Object ? value2 : value; }); value2 = environment.__proto__; } detectableGames = a0.detectableGames; if (detectableGames != null) { detectableGames.forEach(_fun36078); } } function _fun36078(a0) { // fn#36078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:3980, offset: 0x01082949, size: 19 bytes, params: 2, frame: 11 addDetectableGame(a0); } } function value_36079() { // fn#36079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:4031, offset: 0x0108295c, size: 160 bytes, params: 1, frame: 13 var r0; var object; var binding; if (PlatformUtilsModule.isDesktop()) { object = {detectableGamesEtag: env1_17}; binding = env1_13; object.detectableGames = binding.values(); object.blocklistEtag = env1_23; object.blocklistExecutables = env1_24; binding = env1_25; object.blocklistPatterns = binding.map(function(a0) { return a0.source; }); r0 = object; } else { r0 = {'detectableGamesEtag': '', 'detectableGames': null, 'blocklistEtag': '', detectableGames: [], blocklistExecutables: [], blocklistPatterns: []}; } return r0; } function get_36081() { // fn#36081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:4325, offset: 0x010829fc, size: 18 bytes, params: 1, frame: 9 return env1_13.values(); } function value_36082(a0) { // fn#36082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:4387, offset: 0x01082a0e, size: 55 bytes, params: 2, frame: 13 let value = environment.__proto__; const binding = env1_13; const get = binding.get; value = importDefault(21) /* metro dependency 21: SnowflakeUtils */; return Reflect.apply(get, binding, [value.cast(a0)]); } function value_36083(a0) { // fn#36083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:4463, offset: 0x01082a45, size: 81 bytes, params: 2, frame: 14 if (a0 == null) { return []; } const value = a0.toLowerCase(); const Object = global.Object; const hasOwnProperty = Object.prototype.hasOwnProperty; return hasOwnProperty.call(env1_14, value) ? env1_14[value] : []; } function value_36084(a0, a1) { // fn#36084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:4598, offset: 0x01082a96, size: 354 bytes, params: 3, frame: 21 var environment; var r7; var value_36084_loop2; var _createForOfIteratorHelperLoose_36067Binding; var value2; var done; var value3; var value4; var value5; var filter; var value6; const isNotNullish = (GlobalUtilsModule).isNotNullish; const env0_0 = a0; const env0_1 = a1; let value = this.getDetectableGame(a0.id); if (value != null) { return value; } if (a0.name != null) { value_36084_loop2 = value_36084_loop; value = environment.__proto__; _createForOfIteratorHelperLoose_36067Binding = _createForOfIteratorHelperLoose_36067; value = this.searchGamesByName(a0.name); value = _createForOfIteratorHelperLoose_36067Binding(value); value2 = value(); done = value2.done; if (!done) { r7 = value2; reducibleLoop3: while (true) { value3 = r7.value; var env0_4 = value3; value4 = value_36084_loop2(); if (value4 !== 0) { reducibleJoin5: while (true) { if (value4) { return value4.v; } break reducibleJoin5; } } value5 = value(); done = value5.done; if (done) { break reducibleLoop3; } r7 = value5; continue reducibleLoop3; } } } let exePath = a0.exePath; if (exePath != null) { exePath = a0.exePath; value = exePath.split('/'); filter = value.filter; value6 = environment.__proto__; value = Reflect.apply(filter, value, [isNotNullish]); value = value.pop(); value = this.getGameByExecutable(value); if (value != null) { return value; } exePath = a0.exePath; value = exePath.split('/'); value = value.filter(isNotNullish); value = value.slice(-2); value = value.join('/'); value = this.getGameByExecutable(value); reducibleJoin10: while (true) { if (value != null) { return value; } break reducibleJoin10; } } return env0_2; function value_36084_loop() { // fn#36085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:4710, owner: value_36084._loop, offset: 0x01082bf8, size: 207 bytes, params: 1, frame: 16 const detectableGame = ClassCallCheck.getDetectableGame(value); if (detectableGame == null) { return 0; } if (require != null) { require(detectableGame); return 0; } if (env0_0.exePath != null) { var executables = detectableGame.executables; if (executables == null) { return undefined; } var value4 = env0_0.exePath.split('/'); var env0_0 = value4.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).pop(); executables = detectableGame.executables; if (executables.some(_fun36086)) { return {v: detectableGame}; } } function _fun36086({name}) { // fn#36086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:4923, offset: 0x00e6222e, size: 21 bytes, params: 2, frame: 2 return name === env0_0; } } } function value_36087(a0) { // fn#36087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:5387, offset: 0x01082cc7, size: 112 bytes, params: 2, frame: 16 var id; var linkedGames; var value3; var value4; const value = null; if (value == a0) { return value; } const type = a0.type; const GAME = ApplicationTypes.GAME; if (type === GAME) { id = a0.id; } else { linkedGames = a0.linkedGames; value3 = undefined; if (value == linkedGames) { id = value3; } else { value4 = linkedGames.find(function({type}) { return type === require(dependencyMap[15]).GameLinkTypes.OFFICIAL; }); id = value == value4 ? value3 : value4.id; } } return value == id ? value : this.getDetectableGame(id); function _fun36088({type}) { // fn#36088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:5513, offset: 0x01082d37, size: 51 bytes, params: 2, frame: 12 const GameLinkTypes = (ServerModule).GameLinkTypes; const OFFICIAL = GameLinkTypes.OFFICIAL; return type === OFFICIAL; } } function value_36089(a0) { // fn#36089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:5655, offset: 0x01082d6a, size: 249 bytes, params: 2, frame: 24 var environment; var r3; var r7; var r8; var r1; var value3; var value4; var value5; var done; var value7; var value8; var value9; var property; let getDetectableGame = this.getDetectableGame; let id = a0.id; let value = Reflect.apply(getDetectableGame, this, [id]); if (value != null) { return value; } const linkedGames = a0.linkedGames; value = undefined; const value2 = 'none'; if (linkedGames != null) { value3 = environment.__proto__; value4 = _createForOfIteratorHelperLoose_36067(a0.linkedGames); value5 = value4(); done = value5.done; if (done) { r7 = value2; r8 = value; } else { r3 = value5; while (true) { value7 = r3.value; getDetectableGame = this.getDetectableGame; id = value7.id; value8 = Reflect.apply(getDetectableGame, this, [id]); if (value8 != null) { r7 = 'linked_game'; r8 = value8; break; } value9 = value4(); done = value9.done; if (done) { r7 = value2; r8 = value; break; } r3 = value9; continue; } } } else { r7 = value2; r8 = value; } if (r8 != null) { r1 = r8; r3 = r7; } else { value = this.searchGamesByName(a0.name); value = value.map(_fun36090); value = value.reverse(); property = value[0]; if (property == null) { r1 = r8; r3 = r7; } else { value = 'name'; r1 = property; r3 = value; } } this.maybeTrackApplicationLookupFallthrough(a0, r3, r1); return r1; function _fun36090(a0) { // fn#36090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:5994, offset: 0x01082e63, size: 23 bytes, params: 2, frame: 11 return env0_0.getDetectableGame(a0); } } function get_36092() { // fn#36092, offset: 0x01082ebf, size: 15 bytes, params: 1, frame: 2 return env1_18 === true; } function get_36093() { // fn#36093, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1 return env1_17; } function get_36094() { // fn#36094, offset: 0x00df3ac4, size: 9 bytes, params: 1, frame: 1 return env1_23; } function get_36095() { // fn#36095, offset: 0x00d406a2, size: 9 bytes, params: 1, frame: 1 return env1_19; } function get_36096() { // fn#36096, offset: 0x00e4253a, size: 9 bytes, params: 1, frame: 1 return env1_20; } function value_36098() { // fn#36098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:6623, offset: 0x01082ece, size: 67 bytes, params: 1, frame: 12 const value = environment.__proto__; return env1_18 !== true && (env1_19 == null || global.Date.now() >= env1_19 + DAY); } function value_36099() { // fn#36099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:6742, offset: 0x01082f11, size: 64 bytes, params: 1, frame: 12 const value = environment.__proto__; return !env1_22 && (env1_21 == null || global.Date.now() >= env1_21 + DAY); } function value_36100(a0) { // fn#36100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:6853, offset: 0x01082f51, size: 40 bytes, params: 2, frame: 11 var value; if (a0 != null) { value = environment.__proto__; return this.getDetectableGame(env1_15[a0]); } } function value_36101(a0) { // fn#36101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:6969, offset: 0x01082f79, size: 242 bytes, params: 2, frame: 18 var environment; var r0; var value; var binding; var value2; var value3; const env0_0 = a0; if (a0.exePath == null) { return false; } if (a0.exePath === '') { return false; } const env0_1 = a0.exePath.toLowerCase(); if (a0.id == null) { value = environment.__proto__; binding = env1_24; value2 = binding.find(_fun36103); if (value2 != null) { this.maybeTrackBlock(a0, 'explicit_list', value2); return true; } binding = env1_25; value = binding.find(_fun36104); value3 = value != null; } else { value = environment.__proto__; if (env1_29 == null) { value = environment.__proto__; binding = env1_24; value2 = binding.find(_fun36103); if (value2 != null) { this.maybeTrackBlock(a0, 'explicit_list', value2); return true; } binding = env1_25; value = binding.find(_fun36104); value3 = value != null; if (value3) { this.maybeTrackBlock(a0, 'pattern_match', value.source); value = true; r0 = value; } else { r0 = value3; } return r0; } value = this.getDetectableGame(a0.id); if (value == null) { value = environment.__proto__; binding = env1_24; value2 = binding.find(_fun36103); if (value2 != null) { this.maybeTrackBlock(a0, 'explicit_list', value2); return true; } binding = env1_25; value = binding.find(_fun36104); value3 = value != null; if (value3) { this.maybeTrackBlock(a0, 'pattern_match', value.source); value = true; r0 = value; } else { r0 = value3; } return r0; } var executables = value.executables; if (executables.some(_fun36102)) { return false; } value = environment.__proto__; value2 = env1_24.find(_fun36103); if (value2 != null) { this.maybeTrackBlock(a0, 'explicit_list', value2); return true; } value3 = env1_25.find(_fun36104) != null; } if (value3) { this.maybeTrackBlock(a0, 'pattern_match', value.source); value = true; r0 = value; } else { r0 = value3; } return r0; function _fun36102(a0) { // fn#36102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:7158, offset: 0x0108306b, size: 58 bytes, params: 2, frame: 13 const os = a0.os; const value = environment.__proto__.__proto__; return os === env2_29 && env0_1.endsWith(a0.name.toLowerCase()); } function _fun36103(a0) { // fn#36103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:7229, offset: 0x00e3c4e9, size: 22 bytes, params: 2, frame: 11 return env0_1.includes(a0); } function _fun36104(a0) { // fn#36104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:7325, offset: 0x010830a5, size: 28 bytes, params: 2, frame: 11 return a0.test(env0_0.exePath); } } function value_36105(a0) { // fn#36105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:7448, offset: 0x010830c1, size: 152 bytes, params: 2, frame: 14 const env0_0 = a0; const exePath = a0.exePath; const value = null; if (value == exePath) { return value; } if (a0.exePath === '') { return value; } const env0_1 = a0.exePath.toLowerCase(); const value3 = env1_24.find(_fun36106); if (value != value3) { return {matchedExe: value3, matchedPattern: value}; } const value4 = env1_25.find(_fun36107); return value != value4 ? {matchedExe: value, matchedPattern: value4.source} : value; function _fun36106(a0) { // fn#36106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:7562, offset: 0x00e3c4e9, size: 22 bytes, params: 2, frame: 11 return env0_1.includes(a0); } function _fun36107(a0) { // fn#36107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:7647, offset: 0x010830a5, size: 28 bytes, params: 2, frame: 11 return a0.test(env0_0.exePath); } } function value_36108(a0, a1, a2) { // fn#36108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:7786, offset: 0x01083159, size: 202 bytes, params: 4, frame: 19 var r7; var name; var value2; var defaultImport; var track; var GAME_APPLICATION_LOOKUP_FALLTHROUGH; var object; let id = a0.id; let value = environment.__proto__; const binding = env1_28; if (!binding.has(id)) { env1_28.add(id); value2 = undefined; defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; track = defaultImport.track; GAME_APPLICATION_LOOKUP_FALLTHROUGH = AnalyticEvents.GAME_APPLICATION_LOOKUP_FALLTHROUGH; object = {application_id: id}; name = a0.name; value = null; r7 = value != name ? name : value; object.application_name = r7; object.match_type = a1; id = value == a2 ? value2 : a2.id; r7 = value != id ? id : value; object.matched_game_id = r7; name = value == a2 ? value2 : a2.name; object.matched_game_name = value != name ? name : value; Reflect.apply(track, defaultImport, [GAME_APPLICATION_LOOKUP_FALLTHROUGH, object]); } } function value_36109(a0, a1, a2) { // fn#36109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:8147, offset: 0x01083223, size: 227 bytes, params: 4, frame: 17 var defaultImport; let value = a0.exePath.split(RegExp('[/\\\\]', '')); value = value.pop(); const r4 = value ?? 'unknown'; value = environment.__proto__; const value3 = env1_26.get(r4); const Date = global.Date; const value4 = Date.now(); if (value3 == null || value4 - value3 >= HOUR) { env1_26.set(r4, value4); defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */; defaultImport.track(AnalyticEvents.GAME_BLOCKLIST_TRIGGERED, {block_type: a1, matched_entry: a2, game_name: a0.gameName ?? a0.origGameName, executable_name: r4}); } } function value_36110(a0) { // fn#36110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:8466, offset: 0x01083306, size: 140 bytes, params: 2, frame: 14 if (this.shouldBlock(a0)) { return false; } let value = this.findGame(a0); value = value != null; const r2 = a0.name != null && env1_16[a0.name] != null; const ShowCurrentGame = (UserSettingsModule).ShowCurrentGame; return ShowCurrentGame.getSetting() && !env1_18 && !(value || r2); } function value_36111(a0) { // fn#36111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:8675, offset: 0x01083392, size: 67 bytes, params: 2, frame: 14 env1_16[a0] = true; const Storage = (StorageModule).Storage; Storage.set('GameStoreReportedGames', env1_16); } } function _fun36112(a0) { // fn#36112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:8834, offset: 0x010833d5, size: 94 bytes, params: 2, frame: 15 var r2; var r0; var object; if (a0 != null) { object = {}; object.detectableGamesEtag = a0.detectableGamesEtag; r2 = a0.detectableGames?.map(_fun36113); r2 = r2 ?? []; object.detectableGames = r2; r0 = object; } else { r0 = {detectableGamesEtag: '', detectableGames: []}; } return r0; function _fun36113(a0) { // fn#36113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:8971, offset: 0x01083433, size: 65 bytes, params: 2, frame: 13 const value = environment.__proto__; const convertGameRecordToGameBinding = convertGameRecordToGame; const DetectableGameRecord = (GameDetectionTypesModule).DetectableGameRecord; return convertGameRecordToGameBinding(new DetectableGameRecord(a0)); } } function OVERLAY_INITIALIZE_36117({detectableApplications}) { // fn#36117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:9440, offset: 0x0108352a, size: 126 bytes, params: 2, frame: 14 var r2; var addDetectableGameBinding; var value4; var value5; env0_13.clear(); let Object = global.Object; Object = global.Object; const value2 = _createForOfIteratorHelperLoose_36067(detectableApplications); const value3 = value2(); let done = value3.done; if (!done) { for (r2 = value3; true; r2 = value5) { addDetectableGameBinding = addDetectableGame; value4 = r2.value; addDetectableGameBinding(value4); value5 = value2(); done = value5.done; if (done) { break; } } } } function GAMES_DATABASE_UPDATE({games, etag}) { // fn#36120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:9807, offset: 0x010835bb, size: 198 bytes, params: 2, frame: 15 var r0; var r3; var binding; var clear; var Object; var create; var addDetectableGameBinding; var gameFromServerBinding; var value4; var value5; let value = etag != null; reducibleJoin2: while (true) { if (value) { value = environment; value = etag2 !== etag; r0 = value; break reducibleJoin2; } r0 = value; break reducibleJoin2; } reducibleJoin4: while (true) { if (r0) { value = environment; binding = env0_13; clear = binding.clear; Reflect.apply(clear, binding, []); Object = global.Object; create = Object.create; env0_14 = Reflect.apply(create, Object, [null]); Object = global.Object; create = Object.create; env0_15 = Reflect.apply(create, Object, [null]); etag2 = etag; break reducibleJoin4; } break reducibleJoin4; } const value2 = _createForOfIteratorHelperLoose_36067(games); const value3 = value2(); let done = value3.done; if (!done) { r3 = value3; reducibleLoop5: while (true) { addDetectableGameBinding = addDetectableGame; gameFromServerBinding = gameFromServer; value4 = r3.value; addDetectableGameBinding(gameFromServerBinding(value4)); value5 = value2(); done = value5.done; if (done) { break reducibleLoop5; } r3 = value5; continue reducibleLoop5; } } const Date = global.Date; env0_19 = Date.now(); } function GAMES_BLOCKLIST_UPDATE({executables, patterns, etag}) { // fn#36123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:10235, offset: 0x0108369b, size: 125 bytes, params: 2, frame: 14 if (etag != null && env0_23 !== etag) { env0_24 = executables.map(function(a0) { return a0.toLowerCase(); }); env0_25 = patterns.map(_fun36125); } const Date = global.Date; env0_21 = Date.now(); } } function convertGameRecordToGame({id, name, executables, overlayWarn, overlayCompatibilityHook, overlay, hook, aliases, supportsOutOfProcessOverlay, themes, icon, thirdPartySkus, cover_image_hash, content_classification}) { // fn#36071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:2350, offset: 0x0108239f, size: 197 bytes, params: 2, frame: 7 return {id: id, name: name, executables: executables, overlayWarn: overlayWarn, overlayCompatibilityHook: overlayCompatibilityHook, overlay: overlay, hook: hook, aliases: aliases, supportsOutOfProcessOverlay: supportsOutOfProcessOverlay, themes: themes ?? [], icon: icon, thirdPartySkus: thirdPartySkus ?? [], cover_image_hash: cover_image_hash ?? undefined, content_classification: content_classification ?? undefined}; } function _fun36125(a0) { // fn#36125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4439:10367, offset: 0x01082924, size: 37 bytes, params: 2, frame: 13 const RegExp = global.RegExp; const value = Object.create(RegExp.prototype, {constructor: {value: RegExp}}); const regExp = new RegExp(a0, 'i'); return regExp instanceof Object ? regExp : value; } global.__d(_fun36063, 4267, [6, 7, 15, 17, 18, 4235, 661, 4238, 672, 4268, 587, 477, 4269, 21, 1360, 1909, 683, 3829, 566, 694, 2]) /* metro module 4267, dependencies: [6, 7, 15, 17, 18, 4235, 661, 4238, 672, 4268, 587, 477, 4269, 21, 1360, 1909, 683, 3829, 566, 694, 2] */;