640 lines
34 KiB
TypeScript
640 lines
34 KiB
TypeScript
/* Metro module 4235; source: records/ApplicationRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 4236, 1885, 4237, 4238, 4239, 4240, 1423, 4241, 483, 21, 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 UserRecord from './UserRecord.tsx'; /* Metro dependency 1885 */
|
|
import Record from '../lib/Record.tsx'; /* Metro dependency 1886 */
|
|
import CompanyRecord from './CompanyRecord.tsx'; /* Metro dependency 4236 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as BigFlagUtilsModule from '../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
|
|
import * as ConstantsModule from '../modules/activities/Constants.tsx'; /* Metro dependency 4237 */
|
|
import * as ApplicationConstantsModule from '../modules/applications/ApplicationConstants.tsx'; /* Metro dependency 4238 */
|
|
import * as RiotSocialSDKMigrationModule from '../modules/application_account_linking/experiments/riotSocialSDKMigration.tsx'; /* Metro dependency 4239 */
|
|
import * as ValorantSocialSDKExperimentModule from '../modules/application_account_linking/experiments/valorantSocialSDKExperiment.tsx'; /* Metro dependency 4240 */
|
|
import * as ApplicationOverlayMethodFlagsModule from '../external/discord_common/js/shared/shared-constants/ApplicationOverlayMethodFlags.tsx'; /* Metro dependency 4241 */
|
|
|
|
function _fun35003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#35003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:6, offset: 0x010680c8, size: 350 bytes, params: 8, frame: 21
|
|
const env0_0 = require;
|
|
const closure = function(a0) {
|
|
var object = {os: a0.os, name: a0.name};
|
|
if (a0.arguments != null) {
|
|
object.arguments = a0.arguments;
|
|
}
|
|
if (a0.is_launcher != null) {
|
|
object.isLauncher = a0.is_launcher;
|
|
}
|
|
return object;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = Record;
|
|
const {END_GAME_APPLICATION_ID, POKER_NIGHT_APPLICATION_ID} = ConstantsModule;
|
|
object = {};
|
|
object[POKER_NIGHT_APPLICATION_ID] = 7;
|
|
object[END_GAME_APPLICATION_ID] = 12;
|
|
value = _fun35009(value);
|
|
const value3 = _fun35017(value);
|
|
(FileImportTrackerModule).fileFinishedImporting('records/ApplicationRecord.tsx');
|
|
exports.default = value3;
|
|
exports.createExecutable = closure;
|
|
exports.BasicApplicationRecord = value;
|
|
function _callSuper_35004(a0, a1, a2) { // fn#35004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:275, offset: 0x01068226, size: 100 bytes, params: 4, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = a2;
|
|
const value3 = Module00017(a1);
|
|
if (_isNativeReflectConstruct_35005()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value3, value || [], Module00017(a0).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value3.apply(a0, value);
|
|
r0 = value;
|
|
}
|
|
return PossibleConstructorReturn(a0, r0);
|
|
}
|
|
|
|
function _isNativeReflectConstruct_35005() { // fn#35005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:406, offset: 0x0106828a, 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_35005_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun35009(a0) { // fn#35009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:787, offset: 0x01068331, size: 190 bytes, params: 2, frame: 17
|
|
const BasicApplicationRecord2 = BasicApplicationRecord;
|
|
Inherits(BasicApplicationRecord2, a0);
|
|
return CreateClass(BasicApplicationRecord2, [{key: 'connectionEntrypointUrl', get: get_35011}, {key: 'getIconURL',
|
|
value: value_35012}, {key: 'getIconSource', value: value_35013}, {key: 'getSplashURL', value: value_35014},
|
|
{key: 'getCoverImageURL', value: value_35015}], [{key: 'createFromServer', value: value_35016}]);
|
|
function BasicApplicationRecord(a0) { // fn#35010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:799, offset: 0x010683ef, size: 299 bytes, params: 2, frame: 15
|
|
let value = environment.__proto__;
|
|
env1_4(this, BasicApplicationRecord);
|
|
value = _callSuper_35004(this, BasicApplicationRecord);
|
|
value.id = a0.id;
|
|
value.name = a0.name;
|
|
value.icon = a0.icon;
|
|
value.splash = a0.splash;
|
|
value.primarySkuId = a0.primarySkuId;
|
|
value.thirdPartySkus = a0.thirdPartySkus ?? [];
|
|
value.description = a0.description;
|
|
value.bot = a0.bot;
|
|
value.coverImage = a0.coverImage;
|
|
value.type = a0.type;
|
|
value.isMonetized = a0.is_monetized ?? a0.isMonetized;
|
|
value.isVerified = a0.is_verified ?? a0.isVerified;
|
|
value.roleConnectionsVerificationUrl = a0.role_connections_verification_url ?? a0.roleConnectionsVerificationUrl;
|
|
value.parentId = a0.parent_id ?? a0.parentId;
|
|
value._connectionEntrypointUrl = a0.connection_entrypoint_url ?? a0._connectionEntrypointUrl;
|
|
value.contentClassification = a0.content_classification ?? a0.contentClassification;
|
|
return value;
|
|
}
|
|
|
|
function get_35011() { // fn#35011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:1693, offset: 0x0106851a, size: 149 bytes, params: 1, frame: 15
|
|
const value = environment.__proto__;
|
|
const getIsRiotSocialSDKMigrationEnabled = (RiotSocialSDKMigrationModule).getIsRiotSocialSDKMigrationEnabled;
|
|
const getIsValorantSocialSDKEnabled = (ValorantSocialSDKExperimentModule).getIsValorantSocialSDKEnabled;
|
|
const items2 = ['1443349464290168976', '1443350165678198935', '1443033465766281327'];
|
|
return items2.includes(this.id) && (this.id !== '1443350165678198935' || getIsValorantSocialSDKEnabled({location: 'ApplicationRecord'})) && getIsRiotSocialSDKMigrationEnabled({location: 'ApplicationRecord'}) ? 'https://aes.sgp.pvp.net/providers/discord/link/v1?origin=Discord' : this._connectionEntrypointUrl;
|
|
}
|
|
|
|
function value_35012(a0, a1) { // fn#35012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:2115, offset: 0x010685af, size: 89 bytes, params: 3, frame: 14
|
|
var r0;
|
|
const icon = this.icon;
|
|
let value = null;
|
|
if (value != icon) {
|
|
value = environment.__proto__;
|
|
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
|
value = value.getGameAssetURL({id: this.id, hash: this.icon, size: a0, format: a1});
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_35013(a0, a1) { // fn#35013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:2256, offset: 0x01068608, size: 89 bytes, params: 3, frame: 14
|
|
var r0;
|
|
const icon = this.icon;
|
|
let value = null;
|
|
if (value != icon) {
|
|
value = environment.__proto__;
|
|
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
|
value = value.getGameAssetSource({id: this.id, hash: this.icon, size: a0, format: a1});
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_35014(a0, a1) { // fn#35014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:2399, offset: 0x01068661, size: 98 bytes, params: 3, frame: 14
|
|
var r0;
|
|
const splash = this.splash;
|
|
let value = null;
|
|
if (value != splash) {
|
|
value = environment.__proto__;
|
|
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
|
value = value.getGameAssetURL({id: this.id, hash: this.splash, size: a0, keepAspectRatio: true, format: a1});
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_35015(a0) { // fn#35015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:2566, offset: 0x010686c3, size: 91 bytes, params: 2, frame: 14
|
|
var r0;
|
|
const coverImage = this.coverImage;
|
|
let value = null;
|
|
if (value != coverImage) {
|
|
value = environment.__proto__;
|
|
value = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
|
value = value.getApplicationIconURL({id: this.id, icon: this.coverImage, size: a0, keepAspectRatio: true});
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function value_35016(a0) { // fn#35016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:2738, offset: 0x0106871e, size: 209 bytes, params: 2, frame: 16
|
|
const object = {};
|
|
copyDataProperties(object, a0, undefined);
|
|
object['coverImage'] = a0.cover_image;
|
|
object['primarySkuId'] = a0.primary_sku_id;
|
|
const bot = a0.bot;
|
|
let value = null;
|
|
object['bot'] = value != bot ? new UserRecord(a0.bot) : value;
|
|
object['thirdPartySkus'] = a0.third_party_skus;
|
|
object['roleConnectionsVerificationUrl'] = a0.role_connections_verification_url;
|
|
object['parentId'] = a0.parent_id;
|
|
object['_connectionEntrypointUrl'] = a0.connection_entrypoint_url;
|
|
object['contentClassification'] = a0.content_classification;
|
|
value = Object.create(BasicApplicationRecord.prototype, {constructor: {value: BasicApplicationRecord}});
|
|
const basicApplicationRecord = new BasicApplicationRecord(object);
|
|
return basicApplicationRecord instanceof Object ? basicApplicationRecord : value;
|
|
}
|
|
|
|
}
|
|
|
|
function _fun35017(a0) { // fn#35017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:3113, offset: 0x010687ef, size: 238 bytes, params: 2, frame: 18
|
|
const ApplicationRecord2 = ApplicationRecord;
|
|
Inherits(ApplicationRecord2, a0);
|
|
return CreateClass(ApplicationRecord2, [{key: 'getCanonicalGameId', value: value_35020},
|
|
{key: 'mergeFromApplicationUpdate', value: value_35022}, {key: 'getMaxParticipants', value: value_35025},
|
|
{key: 'supportsIntegrationTypes', value: function(a0) {
|
|
var r3;
|
|
var r0;
|
|
var value = copyRestArgs(0, r3);
|
|
var integrationTypesConfig = this.integrationTypesConfig;
|
|
var env0_0 = integrationTypesConfig;
|
|
var value2 = integrationTypesConfig != null;
|
|
if (value2) {
|
|
value = value.every(_fun35027);
|
|
r0 = value;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}}, {key: 'destinationSkuId', get: function() {
|
|
return this.storeListingSkuId ?? this.primarySkuId;
|
|
}}, {key: 'supportsOutOfProcessOverlay', get: function() {
|
|
return ApplicationRecord.supportsOutOfProcessOverlay(this.overlayMethods);
|
|
}}], [{key: 'createFromServer', value: value_35030}, {key: 'supportsOutOfProcessOverlay', value: value_35033}]);
|
|
function ApplicationRecord(a0) { // fn#35018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:3125, offset: 0x010688dd, size: 741 bytes, params: 2, frame: 19
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const binding = env1_4;
|
|
const value3 = undefined;
|
|
binding(this, ApplicationRecord);
|
|
const value4 = _callSuper_35004(this, ApplicationRecord, [a0]);
|
|
const overlay = a0.overlay;
|
|
value4.overlay = overlay != null && overlay;
|
|
const overlayWarn = a0.overlayWarn;
|
|
value4.overlayWarn = overlayWarn != null && overlayWarn;
|
|
const overlayCompatibilityHook = a0.overlayCompatibilityHook;
|
|
value4.overlayCompatibilityHook = overlayCompatibilityHook != null && overlayCompatibilityHook;
|
|
value4.overlayMethods = a0.overlayMethods ?? (require(4241) /* metro dependency 4241: ApplicationOverlayMethodFlags */).ApplicationOverlayMethodFlags.DEFAULT;
|
|
const hook = a0.hook;
|
|
value4.hook = hook == null || hook;
|
|
value4.aliases = a0.aliases ?? [];
|
|
value4.publishers = a0.publishers ?? [];
|
|
value4.developers = a0.developers ?? [];
|
|
value4.storeListingSkuId = a0.storeListingSkuId;
|
|
value4.guildId = a0.guildId;
|
|
value4.guild = a0.guild;
|
|
const r7 = a0.executables ?? [];
|
|
value4.executables = r7.map(createExecutable);
|
|
value4.hashes = a0.hashes ?? [];
|
|
value4.eulaId = a0.eulaId;
|
|
value4.slug = a0.slug;
|
|
value = importAll(483) /* metro dependency 483: BigFlagUtils */;
|
|
value4.flags = value.deserialize(a0.flags ?? 0);
|
|
value4.tags = a0.tags ?? [];
|
|
value4.maxParticipants = a0.maxParticipants;
|
|
value4.embeddedActivityConfig = a0.embedded_activity_config ?? a0.embeddedActivityConfig;
|
|
value4.team = a0.team;
|
|
value4.integrationTypesConfig = a0.integrationTypesConfig;
|
|
value4.storefront_available = a0.storefront_available;
|
|
value4.termsOfServiceUrl = a0.termsOfServiceUrl;
|
|
value4.privacyPolicyUrl = a0.privacyPolicyUrl;
|
|
value4.isDiscoverable = a0.is_discoverable ?? a0.isDiscoverable;
|
|
value4.customInstallUrl = a0.custom_install_url ?? a0.customInstallUrl;
|
|
value4.installParams = a0.install_params ?? a0.installParams;
|
|
value4.directoryEntry = a0.directory_entry ?? a0.directoryEntry;
|
|
value4.categories = a0.categories;
|
|
const linked_games = a0.linked_games;
|
|
let r1 = linked_games == null ? value3 : linked_games.map(_fun35019);
|
|
r1 = r1 ?? a0.linkedGames;
|
|
value4.linkedGames = r1;
|
|
value4.deepLinkUri = a0.deepLinkUri ?? a0.deeplink_uri;
|
|
value4.applicationAccountLinkBenefitConfig = a0.applicationAccountLinkBenefitConfig ?? a0.application_account_link_benefit_config;
|
|
value4.parentId = a0.parentId ?? a0.parent_id;
|
|
return value4;
|
|
function _fun35019(a0) { // fn#35019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:4607, offset: 0x01068bc2, size: 65 bytes, params: 2, frame: 14
|
|
var r2;
|
|
const object = {};
|
|
copyDataProperties(object, a0, undefined);
|
|
const application = a0.application;
|
|
let value = undefined;
|
|
if (application != null) {
|
|
value = environment.__proto__;
|
|
value = ApplicationRecord.createFromServer(a0.application);
|
|
r2 = value;
|
|
} else {
|
|
r2 = value;
|
|
}
|
|
object['application'] = r2;
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function value_35020() { // fn#35020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:5043, offset: 0x01068c03, size: 128 bytes, params: 1, frame: 16
|
|
var environment;
|
|
var id;
|
|
var r0;
|
|
var linkedGames;
|
|
var value2;
|
|
var value3;
|
|
const type = this.type;
|
|
let value = environment.__proto__;
|
|
const GAME = ApplicationTypes.GAME;
|
|
if (type === GAME) {
|
|
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
|
value = value.cast(this.id);
|
|
r0 = value;
|
|
} else {
|
|
linkedGames = this.linkedGames;
|
|
value = null;
|
|
value2 = undefined;
|
|
if (value == linkedGames) {
|
|
id = value2;
|
|
} else {
|
|
value3 = linkedGames.find(_fun35021);
|
|
id = value == value3 ? value2 : value3.id;
|
|
}
|
|
r0 = value != id ? id : value;
|
|
}
|
|
return r0;
|
|
function _fun35021({application}) { // fn#35021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:5165, offset: 0x01068c83, size: 43 bytes, params: 2, frame: 3
|
|
const type = application?.type;
|
|
value = environment.__proto__.__proto__;
|
|
const GAME = ApplicationTypes.GAME;
|
|
return type === GAME;
|
|
}
|
|
|
|
}
|
|
|
|
function value_35022({id, name, icon, splash, overlay, overlayWarn, overlayCompatibilityHook, overlayMethods, hook, aliases, publishers, developers, primarySkuId, storeListingSkuId, thirdPartySkus, guildId, guild, executables, hashes, description, eulaId, slug, coverImage, bot, flags, maxParticipants, tags, embeddedActivityConfig, type, team, roleConnectionsVerificationUrl, _connectionEntrypointUrl, integrationTypesConfig, isMonetized, storefront_available, termsOfServiceUrl, privacyPolicyUrl, isVerified, customInstallUrl, installParams, isDiscoverable, directoryEntry, categories, linkedGames, deepLinkUri, applicationAccountLinkBenefitConfig, contentClassification, parentId}) { // fn#35022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:5296, offset: 0x01068cae, size: 1090 bytes, params: 2, frame: 19
|
|
var r6;
|
|
var r5;
|
|
var object;
|
|
const object2 = {};
|
|
id = id ?? this.id;
|
|
object2.id = id;
|
|
name = name ?? this.name;
|
|
object2.name = name;
|
|
icon = icon ?? this.icon;
|
|
object2.icon = icon;
|
|
splash = splash ?? this.splash;
|
|
object2.splash = splash;
|
|
overlay = overlay ?? this.overlay;
|
|
object2.overlay = overlay;
|
|
overlayWarn = overlayWarn ?? this.overlayWarn;
|
|
object2.overlayWarn = overlayWarn;
|
|
overlayCompatibilityHook = overlayCompatibilityHook ?? this.overlayCompatibilityHook;
|
|
object2.overlayCompatibilityHook = overlayCompatibilityHook;
|
|
overlayMethods = overlayMethods ?? this.overlayMethods;
|
|
object2.overlayMethods = overlayMethods;
|
|
hook = hook ?? this.hook;
|
|
object2.hook = hook;
|
|
aliases = aliases ?? this.aliases;
|
|
object2.aliases = aliases;
|
|
publishers = publishers ?? this.publishers;
|
|
object2.publishers = publishers;
|
|
developers = developers ?? this.developers;
|
|
object2.developers = developers;
|
|
primarySkuId = primarySkuId ?? this.primarySkuId;
|
|
object2.primarySkuId = primarySkuId;
|
|
storeListingSkuId = storeListingSkuId ?? this.storeListingSkuId;
|
|
object2.storeListingSkuId = storeListingSkuId;
|
|
thirdPartySkus = thirdPartySkus ?? this.thirdPartySkus;
|
|
object2.thirdPartySkus = thirdPartySkus;
|
|
guildId = guildId ?? this.guildId;
|
|
object2.guildId = guildId;
|
|
guild = guild ?? this.guild;
|
|
object2.guild = guild;
|
|
executables = executables ?? this.executables;
|
|
object2.executables = executables;
|
|
hashes = hashes ?? this.hashes;
|
|
object2.hashes = hashes;
|
|
description = description ?? this.description;
|
|
object2.description = description;
|
|
eulaId = eulaId ?? this.eulaId;
|
|
object2.eulaId = eulaId;
|
|
slug = slug ?? this.slug;
|
|
object2.slug = slug;
|
|
coverImage = coverImage ?? this.coverImage;
|
|
object2.coverImage = coverImage;
|
|
bot = bot ?? this.bot;
|
|
object2.bot = bot;
|
|
flags = flags ?? this.flags;
|
|
object2.flags = flags;
|
|
maxParticipants = maxParticipants ?? this.maxParticipants;
|
|
object2.maxParticipants = maxParticipants;
|
|
tags = tags ?? this.tags;
|
|
object2.tags = tags;
|
|
if (embeddedActivityConfig != null) {
|
|
r5 = embeddedActivityConfig;
|
|
} else {
|
|
if (this.embeddedActivityConfig != null) {
|
|
object = {};
|
|
copyDataProperties(object, this.embeddedActivityConfig, undefined);
|
|
r6 = object;
|
|
} else {
|
|
r6 = undefined;
|
|
}
|
|
r5 = r6;
|
|
}
|
|
object2.embeddedActivityConfig = r5;
|
|
type = type ?? this.type;
|
|
object2.type = type;
|
|
team = team ?? this.team;
|
|
object2.team = team;
|
|
roleConnectionsVerificationUrl = roleConnectionsVerificationUrl ?? this.roleConnectionsVerificationUrl;
|
|
object2.roleConnectionsVerificationUrl = roleConnectionsVerificationUrl;
|
|
_connectionEntrypointUrl = _connectionEntrypointUrl ?? this._connectionEntrypointUrl;
|
|
object2._connectionEntrypointUrl = _connectionEntrypointUrl;
|
|
integrationTypesConfig = integrationTypesConfig ?? this.integrationTypesConfig;
|
|
object2.integrationTypesConfig = integrationTypesConfig;
|
|
isMonetized = isMonetized ?? this.isMonetized;
|
|
object2.isMonetized = isMonetized;
|
|
storefront_available = storefront_available ?? this.storefront_available;
|
|
object2.storefront_available = storefront_available;
|
|
termsOfServiceUrl = termsOfServiceUrl ?? this.termsOfServiceUrl;
|
|
object2.termsOfServiceUrl = termsOfServiceUrl;
|
|
privacyPolicyUrl = privacyPolicyUrl ?? this.privacyPolicyUrl;
|
|
object2.privacyPolicyUrl = privacyPolicyUrl;
|
|
isVerified = isVerified ?? this.isVerified;
|
|
object2.isVerified = isVerified;
|
|
customInstallUrl = customInstallUrl ?? this.customInstallUrl;
|
|
object2.customInstallUrl = customInstallUrl;
|
|
installParams = installParams ?? this.installParams;
|
|
object2.installParams = installParams;
|
|
isDiscoverable = isDiscoverable ?? this.isDiscoverable;
|
|
object2.isDiscoverable = isDiscoverable;
|
|
directoryEntry = directoryEntry ?? this.directoryEntry;
|
|
object2.directoryEntry = directoryEntry;
|
|
categories = categories ?? this.categories;
|
|
object2.categories = categories;
|
|
const linkedGames2 = this.linkedGames;
|
|
object2.linkedGames = linkedGames == null ? linkedGames2 : linkedGames2 == null ? linkedGames : linkedGames.map(function(a0) {
|
|
var r1;
|
|
var object;
|
|
var value = a0;
|
|
var env0_0 = value;
|
|
if (value.application != null) {
|
|
return value;
|
|
}
|
|
var value3 = linkedGames.find(_fun35024);
|
|
if (value3?.application == null) {
|
|
r1 = value;
|
|
} else {
|
|
object = {};
|
|
copyDataProperties(object, value, null);
|
|
object['application'] = value3.application;
|
|
r1 = object;
|
|
}
|
|
return r1;
|
|
});
|
|
deepLinkUri = deepLinkUri ?? this.deepLinkUri;
|
|
object2.deepLinkUri = deepLinkUri;
|
|
applicationAccountLinkBenefitConfig = applicationAccountLinkBenefitConfig ?? this.applicationAccountLinkBenefitConfig;
|
|
object2.applicationAccountLinkBenefitConfig = applicationAccountLinkBenefitConfig;
|
|
contentClassification = contentClassification ?? this.contentClassification;
|
|
object2.contentClassification = contentClassification;
|
|
parentId = parentId ?? this.parentId;
|
|
object2.parentId = parentId;
|
|
let value = Object.create(ApplicationRecord.prototype, {constructor: {value: ApplicationRecord}});
|
|
const applicationRecord = new ApplicationRecord(object2);
|
|
return applicationRecord instanceof Object ? applicationRecord : value;
|
|
function _fun35023(a0) { // fn#35023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:7951, offset: 0x010690f0, size: 97 bytes, params: 2, frame: 14
|
|
var r1;
|
|
var object;
|
|
const value = a0;
|
|
if (value.application != null) {
|
|
return value;
|
|
}
|
|
const value3 = linkedGames.find(_fun35024);
|
|
if (value3?.application == null) {
|
|
r1 = value;
|
|
} else {
|
|
object = {};
|
|
copyDataProperties(object, value, null);
|
|
object['application'] = value3.application;
|
|
r1 = object;
|
|
}
|
|
return r1;
|
|
function _fun35024({id}) { // fn#35024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:8002, offset: 0x00fc10ae, size: 26 bytes, params: 2, frame: 2
|
|
return id === env0_0.id;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function value_35025() { // fn#35025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:8451, offset: 0x01069151, size: 45 bytes, params: 1, frame: 4
|
|
return this.maxParticipants ?? env1_12[this.id] ?? 0;
|
|
}
|
|
|
|
function value_35026(a0) { // fn#35026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:8575, offset: 0x0106917e, size: 48 bytes, params: 2, frame: 12
|
|
var r0;
|
|
let value = copyRestArgs(0, undefined);
|
|
const value2 = this.integrationTypesConfig != null;
|
|
if (value2) {
|
|
value = value.every(function(a0) {
|
|
return a0 in integrationTypesConfig;
|
|
});
|
|
r0 = value;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
function _fun35027(a0) { // fn#35027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:8649, offset: 0x010691ae, size: 16 bytes, params: 2, frame: 2
|
|
return a0 in integrationTypesConfig;
|
|
}
|
|
|
|
}
|
|
|
|
function value_35030(a0) { // fn#35030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:8939, offset: 0x010691fa, size: 811 bytes, params: 2, frame: 21
|
|
var environment;
|
|
var r6;
|
|
var value2;
|
|
var userRecord2;
|
|
const object = {};
|
|
copyDataProperties(object, a0, undefined);
|
|
object['coverImage'] = a0.cover_image;
|
|
object['primarySkuId'] = a0.primary_sku_id;
|
|
const bot = a0.bot;
|
|
let value = null;
|
|
if (value != bot) {
|
|
value2 = environment.__proto__;
|
|
userRecord2 = new UserRecord(a0.bot);
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
object['bot'] = r6;
|
|
object['thirdPartySkus'] = a0.third_party_skus;
|
|
object['roleConnectionsVerificationUrl'] = a0.role_connections_verification_url;
|
|
object['overlayWarn'] = a0.overlay_warn;
|
|
object['overlayCompatibilityHook'] = a0.overlay_compatibility_hook;
|
|
const overlay_methods = a0.overlay_methods;
|
|
object['overlayMethods'] = value != overlay_methods ? overlay_methods : (require(4241) /* metro dependency 4241: ApplicationOverlayMethodFlags */).ApplicationOverlayMethodFlags.DEFAULT;
|
|
object['hook'] = a0.hook;
|
|
object['storeListingSkuId'] = a0.store_listing_sku_id;
|
|
object['guildId'] = a0.guild_id;
|
|
object['guild'] = a0.guild;
|
|
object['publishers'] = value != a0.publishers ? a0.publishers.map(CompanyRecord.createFromServer) : [];
|
|
object['developers'] = value != a0.developers ? a0.developers.map(CompanyRecord.createFromServer) : [];
|
|
object['eulaId'] = a0.eula_id;
|
|
object['slug'] = a0.slug;
|
|
const value11 = undefined;
|
|
const deserialize = BigFlagUtilsModule.deserialize;
|
|
const flags_new = a0.flags_new;
|
|
const r9 = value != flags_new ? flags_new : a0.flags;
|
|
object['flags'] = Reflect.apply(deserialize, BigFlagUtilsModule, [value != r9 ? r9 : 0]);
|
|
object['maxParticipants'] = a0.max_participants;
|
|
object['tags'] = a0.tags;
|
|
object['embeddedActivityConfig'] = a0.embedded_activity_config;
|
|
object['integrationTypesConfig'] = value != a0.integration_types_config ? global.Object.fromEntries(global.Object.entries(a0.integration_types_config).map(function(a0) {
|
|
var r0;
|
|
var r2;
|
|
var r3;
|
|
var item3;
|
|
var value3;
|
|
var iterator = a0[Symbol.iterator]();
|
|
var iterator2 = iterator.next;
|
|
var item2 = Reflect.apply(iterator2, iterator, []);
|
|
var item = item2.value;
|
|
item2 = item2.done ? undefined : iterator;
|
|
var value = undefined;
|
|
var value2 = item2 === value;
|
|
var r1 = value2 ? value : item;
|
|
if (value2) {
|
|
r0 = item2;
|
|
r2 = value;
|
|
r3 = value2;
|
|
} else {
|
|
item3 = Reflect.apply(iterator2, item2, []);
|
|
item = item3.value;
|
|
item3 = item3.done ? undefined : item2;
|
|
value3 = item3 === value;
|
|
if (value3) {
|
|
r0 = item3;
|
|
r2 = value;
|
|
r3 = value3;
|
|
} else {
|
|
r0 = item3;
|
|
r2 = item;
|
|
r3 = value3;
|
|
}
|
|
}
|
|
if (!r3) {
|
|
r0.return();
|
|
}
|
|
r2 = r2 ?? ({});
|
|
return [r1, {oauth2InstallParams: r2.oauth2_install_params}];
|
|
})) : value11;
|
|
object['termsOfServiceUrl'] = a0.terms_of_service_url;
|
|
object['privacyPolicyUrl'] = a0.privacy_policy_url;
|
|
object['isDiscoverable'] = a0.is_discoverable;
|
|
object['directoryEntry'] = a0.directory_entry;
|
|
object['categories'] = a0.categories;
|
|
const linked_games = a0.linked_games;
|
|
object['linkedGames'] = value == linked_games ? value11 : linked_games.map(_fun35032);
|
|
object['deepLinkUri'] = a0.deeplink_uri;
|
|
object['applicationAccountLinkBenefitConfig'] = a0.application_account_link_benefit_config;
|
|
object['parentId'] = a0.parent_id;
|
|
value = Object.create(ApplicationRecord.prototype, {constructor: {value: ApplicationRecord}});
|
|
const applicationRecord = new ApplicationRecord(object);
|
|
return applicationRecord instanceof Object ? applicationRecord : value;
|
|
function _fun35032(a0) { // fn#35032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:10212, offset: 0x01068bc2, size: 65 bytes, params: 2, frame: 14
|
|
var r2;
|
|
const object = {};
|
|
copyDataProperties(object, a0, undefined);
|
|
const application = a0.application;
|
|
let value = undefined;
|
|
if (application != null) {
|
|
value = environment.__proto__;
|
|
value = ApplicationRecord.createFromServer(a0.application);
|
|
r2 = value;
|
|
} else {
|
|
r2 = value;
|
|
}
|
|
object['application'] = r2;
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function value_35033(a0) { // fn#35033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4406:10486, offset: 0x01069587, size: 59 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__;
|
|
const ApplicationOverlayMethodFlags = (ApplicationOverlayMethodFlagsModule).ApplicationOverlayMethodFlags;
|
|
const OUT_OF_PROCESS = ApplicationOverlayMethodFlags.OUT_OF_PROCESS;
|
|
return a0 != null && (a0 & OUT_OF_PROCESS) === OUT_OF_PROCESS;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun35003, 4235, [6, 7, 15, 17, 18, 1886, 4236, 1885, 4237, 4238, 4239, 4240, 1423, 4241, 483, 21,
|
|
2]) /* metro module 4235, dependencies: [6, 7, 15, 17, 18, 1886, 4236, 1885, 4237, 4238, 4239, 4240, 1423, 4241, 483, 21, 2] */;
|