Files
discord-decomp/sources/modules/parent_tools/FamilyCenterStore.tsx
T
2026-07-28 01:06:53 +03:00

672 lines
35 KiB
TypeScript

/* Metro module 5116; source: modules/parent_tools/FamilyCenterStore.tsx; dependencies: [6, 7, 15, 17, 18, 57, 3837, 1228, 1878, 5117, 1418, 21, 5118, 5187, 5188, 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 SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import MobileCacheSnapshotStore from '../../stores/MobileCacheSnapshotStore.tsx'; /* Metro dependency 1228 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CountryCodeUtilsModule from '../i18n/CountryCodeUtils.tsx'; /* Metro dependency 3837 */
import * as FamilyCenterConstantsModule from './FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
import * as FamilyCenterUtilsModule from './FamilyCenterUtils.tsx'; /* Metro dependency 5187 */
import * as FamilyCenterV3ExperimentModule from './FamilyCenterV3Experiment.tsx'; /* Metro dependency 5188 */
function _fun44700(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:6, offset: 0x0117702e, size: 681 bytes, params: 8, frame: 23
const env0_0 = require;
const getDefaultSelectedTab2 = getDefaultSelectedTab;
const freshTeenActivityWithMap2 = freshTeenActivityWithMap;
const freshTeenActivityTotals2 = freshTeenActivityTotals;
const processInvoices = function(a0) {
env0_34 = a0.reduce(_fun44715, {});
};
const processGifts = function(a0) {
env0_35 = a0.reduce(_fun44717, {});
};
const handleFetchStart = function() {
env0_25 = true;
};
const handleLinkedUserFetch_44720 = function({linkedUsers}) {
processLinkedUsers(linkedUsers);
};
const handleRequestLinkSuccess_44721 = function({linkedUsers}) {
processLinkedUsers(linkedUsers);
};
const handleTeenActivityMoreFetch_44723 = function({familyCenterTeenActivity}) {
var actions = familyCenterTeenActivity.actions;
familyCenterTeenActivity = familyCenterTeenActivity.guilds;
processTeenActions(actions, true);
processGuilds(familyCenterTeenActivity);
};
const handleUserLinkStatusUpdate = function({linkedUsers}) {
processLinkedUsers(linkedUsers);
};
const handleUserLinkRemove = function({linkedUsers}) {
processLinkedUsers(linkedUsers);
};
const handleLinkCodeFetch = function({linkCode, expiresAt}) {
env0_21 = linkCode;
env0_22 = expiresAt;
};
const handleTabSelect = function(a0) {
env0_23 = a0.tab;
};
const handleConnectionOpen_44730 = function({linkedUsers}) {
if (linkedUsers == null) {
return false;
}
processLinkedUsers(linkedUsers);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = MobileCacheSnapshotStore;
const env0_17 = {};
const env0_19 = freshTeenActivityWithMap2();
const env0_20 = freshTeenActivityTotals2();
let env0_23 = getDefaultSelectedTab2();
const env0_28 = [];
const env0_29 = [];
let env0_34 = {};
let env0_35 = {};
const env0_37 = {};
value = _fun44733(value);
value.displayName = 'FamilyCenterStore';
value.LATEST_SNAPSHOT_VERSION = 3;
value = new value();
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/FamilyCenterStore.tsx');
exports.default = value;
function _isNativeReflectConstruct_44701() { // fn#44701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:336, offset: 0x011772d7, 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_44701_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getDefaultSelectedTab() { // fn#44704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:738, offset: 0x01177335, size: 141 bytes, params: 1, frame: 6
const window = global.window;
const value = undefined;
const pathname = window == null || window.location == null ? value : window.location.pathname;
const FAMILY_CENTER_MY_FAMILY = FAMILY_CENTER_SUB_ROUTES.FAMILY_CENTER_MY_FAMILY;
return pathname === FAMILY_CENTER_MY_FAMILY ? FamilyCenterSubPages.REQUESTS : (global.window == null || global.window.location == null ? value : global.window.location.pathname) === FAMILY_CENTER_SUB_ROUTES.FAMILY_CENTER_SETTINGS ? FamilyCenterSubPages.SETTINGS : FamilyCenterSubPages.ACTIVITY;
}
function freshTeenActivityWithMap() { // fn#44705, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:991, offset: 0x011773c2, size: 409 bytes, params: 1, frame: 16
let Map = global.Map;
let map = new Map();
let set = map.set;
const USER_ADD = TeenActionDisplayType.USER_ADD;
Map = global.Map;
const value3 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
Reflect.apply(set, map, [USER_ADD, map instanceof Object ? map : value3]);
set = map.set;
const GUILD_ADD = TeenActionDisplayType.GUILD_ADD;
Map = global.Map;
const value5 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
Reflect.apply(set, map, [GUILD_ADD, map instanceof Object ? map : value5]);
set = map.set;
const USER_INTERACTION = TeenActionDisplayType.USER_INTERACTION;
Map = global.Map;
const value7 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
Reflect.apply(set, map, [USER_INTERACTION, map instanceof Object ? map : value7]);
set = map.set;
const GUILD_INTERACTION = TeenActionDisplayType.GUILD_INTERACTION;
Map = global.Map;
const value9 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
Reflect.apply(set, map, [GUILD_INTERACTION, map instanceof Object ? map : value9]);
set = map.set;
const USER_CALLED = TeenActionDisplayType.USER_CALLED;
Map = global.Map;
const value11 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
Reflect.apply(set, map, [USER_CALLED, map instanceof Object ? map : value11]);
set = map.set;
const TOTAL_VOICE_MINUTES = TeenActionDisplayType.TOTAL_VOICE_MINUTES;
Map = global.Map;
const value13 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
Reflect.apply(set, map, [TOTAL_VOICE_MINUTES, map instanceof Object ? map : value13]);
set = map.set;
const PURCHASES = TeenActionDisplayType.PURCHASES;
Map = global.Map;
const value15 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
Reflect.apply(set, map, [PURCHASES, map instanceof Object ? map : value15]);
set = map.set;
const GIFTS = TeenActionDisplayType.GIFTS;
Map = global.Map;
const value17 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map();
Reflect.apply(set, map, [GIFTS, map instanceof Object ? map : value17]);
return map;
}
function freshTeenActivityTotals() { // fn#44706, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:1288, offset: 0x0117755b, size: 129 bytes, params: 1, frame: 4
const USER_ADD = TeenActionDisplayType.USER_ADD;
const GUILD_ADD = TeenActionDisplayType.GUILD_ADD;
const USER_INTERACTION = TeenActionDisplayType.USER_INTERACTION;
const GUILD_INTERACTION = TeenActionDisplayType.GUILD_INTERACTION;
const USER_CALLED = TeenActionDisplayType.USER_CALLED;
const TOTAL_VOICE_MINUTES = TeenActionDisplayType.TOTAL_VOICE_MINUTES;
const PURCHASES = TeenActionDisplayType.PURCHASES;
const GIFTS = TeenActionDisplayType.GIFTS;
return {[USER_ADD]: 0, [GUILD_ADD]: 0, [USER_INTERACTION]: 0, [GUILD_INTERACTION]: 0, [USER_CALLED]: 0,
[TOTAL_VOICE_MINUTES]: 0, [PURCHASES]: 0, [GIFTS]: 0};
}
function processLinkedUsers() { // fn#44707, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:1481, offset: 0x011775dc, size: 64 bytes, params: 1, frame: 14
const value = a0;
const r4 = value !== undefined ? value : [];
return r4.length > 0 ? r4.reduce(function(a0, a1) {
var object = {};
copyDataProperties(object, a0, a1);
object[a1.user_id] = a1;
return object;
}, {}) : {};
}
function processTeenActivityTotals(a0) { // fn#44709, offset: 0x01177638, size: 18 bytes, params: 2, frame: 3
if (a0 !== undefined) {
env0_20 = a0;
}
}
function processTeenActions(a0, a1) { // fn#44710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:1648, offset: 0x0117764a, size: 55 bytes, params: 3, frame: 13
const r0 = a1 ? env0_19 : freshTeenActivityWithMap();
a0.forEach(_fun44711);
return r0;
function _fun44711(a0) { // fn#44711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:1736, offset: 0x01177681, size: 73 bytes, params: 2, frame: 15
const display_type = a0.display_type;
const value = env0_0.get(display_type);
if (!(value === undefined || value.has(a0.event_id))) {
value.set(a0.event_id, a0);
}
}
}
function processGuilds(a0) { // fn#44712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:1830, offset: 0x011776ca, size: 37 bytes, params: 2, frame: 14
env0_37 = a0.reduce(_fun44713, env0_37);
function _fun44713(a0, a1) { // fn#44713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:1868, offset: 0x011776ef, size: 101 bytes, params: 3, frame: 16
const object = {};
copyDataProperties(object, a0, undefined);
const id = a1.id;
const object2 = {};
let value = environment.__proto__;
value = require(1418) /* metro dependency 1418: GuildRecordUtils */;
copyDataProperties(object2, value.dangerouslyConstructGuildRecordFromUntypedObject(a1), require);
object2['approximateMemberCount'] = a1.approximate_member_count ?? 0;
object[id] = object2;
return object;
}
}
function processInvoices(a0) { // fn#44714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:2037, offset: 0x01177754, size: 35 bytes, params: 2, frame: 13
const value = a0.reduce(function(a0, a1) {
var property;
var sku_id;
if (a1.invoice_items != null) {
if (a1.invoice_items.length > 0) {
property = a1.invoice_items[0];
sku_id = property.sku_id;
property = property.subscription_plan_id;
if (!(sku_id == null && property == null)) {
a0[a1.id] = {sku_id: sku_id, subscription_plan_id: property, total: a1.total,
currency: a1.currency};
}
}
}
return a0;
}, {});
}
function processGifts(a0) { // fn#44716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:2309, offset: 0x011777eb, size: 35 bytes, params: 2, frame: 13
const value = a0.reduce(function(a0, a1) {
a0[a1.entitlement_id] = a1;
return a0;
}, {});
}
function handleInitialLoad({linkedUsers, familyCenterTeenActivity, ageGroup}) { // fn#44719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:2417, offset: 0x0117782d, size: 306 bytes, params: 2, frame: 24
const actions = familyCenterTeenActivity.actions;
const guilds = familyCenterTeenActivity.guilds;
const totals = familyCenterTeenActivity.totals;
const teenId = familyCenterTeenActivity.teenId;
const rangeStartId = familyCenterTeenActivity.rangeStartId;
const topUserActivities = familyCenterTeenActivity.topUserActivities;
const topGuildActivities = familyCenterTeenActivity.topGuildActivities;
const totalSpendAmount = familyCenterTeenActivity.totalSpendAmount;
const totalSpendCurrency = familyCenterTeenActivity.totalSpendCurrency;
const spendingLimit = familyCenterTeenActivity.spendingLimit;
const monthlyPurchases = familyCenterTeenActivity.monthlyPurchases;
const invoices = familyCenterTeenActivity.invoices;
const gifts = familyCenterTeenActivity.gifts;
processTeenActions(actions);
processTeenActivityTotals(totals);
processGuilds(guilds);
processLinkedUsers(linkedUsers);
if (invoices != null) {
processInvoices(invoices);
}
if (gifts != null) {
processGifts(gifts);
}
let r4 = spendingLimit ?? null;
r4 = monthlyPurchases ?? null;
env0_36 = ageGroup ?? null;
const defaultImport = SnowflakeUtils;
const fromTimestamp = defaultImport.fromTimestamp;
const Date = global.Date;
env0_26 = Reflect.apply(fromTimestamp, defaultImport, [Date.now()]);
}
function handleTeenActivityFetch_44722({familyCenterTeenActivity}) { // fn#44722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:3124, offset: 0x01177978, size: 274 bytes, params: 2, frame: 23
if (familyCenterTeenActivity === undefined) {
return false;
}
const actions = familyCenterTeenActivity.actions;
const totals = familyCenterTeenActivity.totals;
const guilds = familyCenterTeenActivity.guilds;
const teenId = familyCenterTeenActivity.teenId;
const rangeStartId = familyCenterTeenActivity.rangeStartId;
const topUserActivities = familyCenterTeenActivity.topUserActivities;
const topGuildActivities = familyCenterTeenActivity.topGuildActivities;
const totalSpendAmount = familyCenterTeenActivity.totalSpendAmount;
const totalSpendCurrency = familyCenterTeenActivity.totalSpendCurrency;
const invoices = familyCenterTeenActivity.invoices;
const gifts = familyCenterTeenActivity.gifts;
const spendingLimit = familyCenterTeenActivity.spendingLimit;
const monthlyPurchases = familyCenterTeenActivity.monthlyPurchases;
processTeenActions(actions);
processTeenActivityTotals(totals);
processGuilds(guilds);
if (invoices != null) {
processInvoices(invoices);
}
if (gifts != null) {
processGifts(gifts);
}
const defaultImport = SnowflakeUtils;
const fromTimestamp = defaultImport.fromTimestamp;
const Date = global.Date;
env0_26 = Reflect.apply(fromTimestamp, defaultImport, [Date.now()]);
env0_32 = spendingLimit ?? null;
env0_33 = monthlyPurchases ?? null;
}
function handleCurrentUserUpdate_44728({user}) { // fn#44728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:4029, offset: 0x01177aed, size: 170 bytes, params: 2, frame: 15
var length;
var Object;
let linked_users = user.linked_users;
if (linked_users === undefined) {
return false;
}
const env0_0 = UserStore.getUsers();
linked_users = user.linked_users;
if (linked_users.some(_fun44729)) {
length = user.linked_users.length;
Object = global.Object;
if (length > Object.keys(env0_17).length) {
(importDefault(5118) /* metro dependency 5118: FamilyCenterActionCreators */).fetchLinkedUsers();
} else {
processLinkedUsers(user.linked_users);
}
} else {
processLinkedUsers(user.linked_users);
}
function _fun44729({user_id}) { // fn#44729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:4148, offset: 0x01177b97, size: 28 bytes, params: 2, frame: 2
return env0_0[user_id] === undefined;
}
}
function handleSetLocationMetadata({countryCode}) { // fn#44731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:4376, offset: 0x01177bd6, size: 49 bytes, params: 2, frame: 13
var r1;
if (countryCode != null) {
r1 = getCountryCodeByAlpha2(countryCode) ?? null;
}
}
function reset_44732() { // fn#44732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:4469, offset: 0x01177c07, size: 139 bytes, params: 1, frame: 12
env0_17 = {};
env0_19 = freshTeenActivityWithMap();
env0_20 = freshTeenActivityTotals();
env0_37 = {};
env0_23 = getDefaultSelectedTab();
env0_28 = [];
env0_29 = [];
env0_34 = {};
env0_35 = {};
}
function _fun44733(a0) { // fn#44733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:4690, offset: 0x01177c92, size: 738 bytes, params: 2, frame: 16
const FamilyCenterStore2 = FamilyCenterStore;
Inherits(FamilyCenterStore2, a0);
return CreateClass(FamilyCenterStore2, [{key: 'initialize', value: function() {
this.waitFor(UserStore);
}}, {key: 'loadCache', value: value_44737}, {key: 'takeSnapshot', value: value_44740}, {key: 'getSelectedTeenId',
value: value_44743}, {key: 'getLinkedUsers', value: value_44744}, {key: 'getLinkTimestamp', value: value_44745},
{key: 'getRangeStartTimestamp', value: value_44746}, {key: 'getActionsForDisplayType', value: value_44747},
{key: 'getTotalForDisplayType', value: value_44748}, {key: 'getLinkCode', value: value_44749},
{key: 'getLinkCodeExpiresAt', value: value_44750}, {key: 'getGuild', value: value_44751},
{key: 'getSelectedTab', value: value_44752}, {key: 'getStartId', value: value_44753}, {key: 'getIsInitialized',
value: value_44754}, {key: 'getAreLinkedUsersProcessed', value: value_44755}, {key: 'getUserCountry',
value: value_44756}, {key: 'isLoading', value: value_44757}, {key: 'getTopUserActivities', value: value_44758},
{key: 'getTopGuildActivities', value: value_44759}, {key: 'getTotalSpendAmount', value: value_44760},
{key: 'getTotalSpendCurrency', value: value_44761}, {key: 'getSpendingLimit', value: value_44762},
{key: 'getMonthlyPurchases', value: value_44763}, {key: 'getPurchaseInfo', value: value_44764},
{key: 'getGiftInfo', value: value_44765}, {key: 'getAgeGroup', value: value_44766}, {key: 'canRefetch',
value: value_44767}, {key: 'isCurrentUserInRestrictedHours', value: value_44768}]);
function FamilyCenterStore() { // fn#44734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:4702, offset: 0x01177f74, size: 266 bytes, params: 1, frame: 20
var environment;
const value = environment.__proto__;
env1_3(this, FamilyCenterStore);
const items2 = [{CONNECTION_OPEN: handleConnectionOpen_44730, CURRENT_USER_UPDATE: handleCurrentUserUpdate_44728,
CACHE_LOADED_LAZY: CACHE_LOADED_LAZY_44735, FAMILY_CENTER_INITIAL_LOAD: handleInitialLoad,
FAMILY_CENTER_FETCH_START: handleFetchStart,
FAMILY_CENTER_LINKED_USERS_FETCH_SUCCESS: handleLinkedUserFetch_44720,
FAMILY_CENTER_TEEN_ACTIVITY_FETCH_SUCCESS: handleTeenActivityFetch_44722,
FAMILY_CENTER_TEEN_ACTIVITY_MORE_FETCH_SUCCESS: handleTeenActivityMoreFetch_44723,
FAMILY_CENTER_REQUEST_LINK_SUCCESS: handleRequestLinkSuccess_44721,
FAMILY_CENTER_REQUEST_LINK_UPDATE_SUCCESS: handleUserLinkStatusUpdate,
FAMILY_CENTER_REQUEST_LINK_REMOVE_SUCCESS: handleUserLinkRemove,
FAMILY_CENTER_LINK_CODE_FETCH_SUCCESS: handleLinkCodeFetch, FAMILY_CENTER_HANDLE_TAB_SELECT: handleTabSelect,
SET_LOCATION_METADATA: handleSetLocationMetadata, LOGOUT: reset_44732}];
const value3 = env1_6(FamilyCenterStore);
return env1_5(this, _isNativeReflectConstruct_44701() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
function FamilyCenterStoreCACHE_LOADED_LAZY() { // fn#44735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:5028, owner: FamilyCenterStore.CACHE_LOADED_LAZY, offset: 0x010e7f68, size: 19 bytes, params: 1, frame: 9
return env0_0.loadCache();
}
}
function value_44737() { // fn#44737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:5827, offset: 0x01178097, size: 105 bytes, params: 1, frame: 13
var environment;
var value2;
const readSnapshot = this.readSnapshot;
const LATEST_SNAPSHOT_VERSION = FamilyCenterStore.LATEST_SNAPSHOT_VERSION;
const value = Reflect.apply(readSnapshot, this, [LATEST_SNAPSHOT_VERSION]);
if (value != null) {
value2 = environment.__proto__;
processLinkedUsers(value.linkedUsers);
processGuilds(value.guilds);
processTeenActions(value.teenActivity);
((a0) => {
env2_20 = a0.reduce(_fun44739, freshTeenActivityTotals());
})(value.teenActivityTotals);
}
function teenActivityTotalsFromSnapshot(a0) { // fn#44738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:6008, owner: value_44737.teenActivityTotalsFromSnapshot, offset: 0x01178100, size: 41 bytes, params: 2, frame: 15
env2_20 = a0.reduce(_fun44739, freshTeenActivityTotals());
function _fun44739(a0, a1) { // fn#44739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:6063, offset: 0x01178129, size: 128 bytes, params: 3, frame: 16
var r0;
var object;
const value = a0;
const value4 = env3_8(a1.split(':'), 2);
const property = value4[0];
const property2 = value4[1];
const value5 = (FamilyCenterUtilsModule).displayTypeFromString(property);
if (value5 === undefined) {
r0 = value;
} else {
object = {};
copyDataProperties(object, value, undefined);
object[value5] = global.parseInt(property2, 10);
r0 = object;
}
return r0;
}
}
}
function value_44740() { // fn#44740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:6276, offset: 0x011781a9, size: 158 bytes, params: 1, frame: 16
var environment;
const object = {};
const LATEST_SNAPSHOT_VERSION = FamilyCenterStore.LATEST_SNAPSHOT_VERSION;
object.version = LATEST_SNAPSHOT_VERSION;
const object2 = {};
let Object = global.Object;
const values = Object.values;
let value = environment.__proto__;
object2.linkedUsers = Reflect.apply(values, Object, [env1_17]);
Object = global.Object;
object2.teenActivityTotals = Object.entries(env1_20).map(function(a0) {
var r0;
var r1;
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 r4 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r3 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r3 = value;
} else {
r0 = item3;
r1 = value3;
r3 = item;
}
}
if (!r1) {
r0.return();
}
return '' + r4 + ':' + r3;
});
env1_19.forEach(_fun44742);
object2.teenActivity = [];
Object = global.Object;
object2.guilds = Object.values(env1_37);
object.data = object2;
return object;
function _fun44742(a0) { // fn#44742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:6474, offset: 0x011782a4, size: 72 bytes, params: 2, frame: 16
const binding = env0_0;
const push = binding.push;
const Array = global.Array;
const value = Array.from(a0.values());
const items2 = [];
arraySpread(items2, value, 0, a0);
apply(push, items2, binding, a0);
}
}
function value_44743() { // fn#44743, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
function value_44744() { // fn#44744, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1
return env1_17;
}
function value_44745(a0) { // fn#44745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:6685, offset: 0x011782ec, size: 46 bytes, params: 2, frame: 4
let value = environment.__proto__;
const property = env1_17[a0];
value = null;
return value == property ? value : value != property.updated_at ? property.updated_at : property.created_at;
}
function value_44746() { // fn#44746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:6806, offset: 0x0117831a, size: 55 bytes, params: 1, frame: 13
const value = environment.__proto__;
const value2 = null;
return value2 == env1_16 ? value2 : (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(env1_16);
}
function value_44747(a0) { // fn#44747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:6906, offset: 0x01178351, size: 61 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = env1_19.get(a0);
return value != null ? global.Array.from(value.values()) : [];
}
function value_44748(a0) { // fn#44748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:7012, offset: 0x010a0ef4, size: 16 bytes, params: 2, frame: 2
return env1_20[a0];
}
function value_44749() { // fn#44749, offset: 0x00f854d6, size: 9 bytes, params: 1, frame: 1
return env1_21;
}
function value_44750() { // fn#44750, offset: 0x00e425c8, size: 9 bytes, params: 1, frame: 1
return env1_22;
}
function value_44751(a0) { // fn#44751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:7163, offset: 0x0117838e, size: 16 bytes, params: 2, frame: 2
return env1_37[a0];
}
function value_44752() { // fn#44752, offset: 0x00df3ac4, size: 9 bytes, params: 1, frame: 1
return env1_23;
}
function value_44753() { // fn#44753, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1
return env1_16;
}
function value_44754() { // fn#44754, offset: 0x00df3acd, size: 9 bytes, params: 1, frame: 1
return env1_24;
}
function value_44755() { // fn#44755, offset: 0x00df0e82, size: 9 bytes, params: 1, frame: 1
return env1_18;
}
function value_44756() { // fn#44756, offset: 0x00df3b32, size: 9 bytes, params: 1, frame: 1
return env1_27;
}
function value_44757() { // fn#44757, offset: 0x00df3ad6, size: 9 bytes, params: 1, frame: 1
return env1_25;
}
function value_44758() { // fn#44758, offset: 0x0108042c, size: 9 bytes, params: 1, frame: 1
return env1_28;
}
function value_44759() { // fn#44759, offset: 0x00ef0ca7, size: 9 bytes, params: 1, frame: 1
return env1_29;
}
function value_44760() { // fn#44760, offset: 0x00e45481, size: 9 bytes, params: 1, frame: 1
return env1_30;
}
function value_44761() { // fn#44761, offset: 0x00df3abb, size: 9 bytes, params: 1, frame: 1
return env1_31;
}
function value_44762() { // fn#44762, offset: 0x01080587, size: 9 bytes, params: 1, frame: 1
return env1_32;
}
function value_44763() { // fn#44763, offset: 0x0117839e, size: 9 bytes, params: 1, frame: 1
return env1_33;
}
function value_44764(a0) { // fn#44764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:7855, offset: 0x0113d8a0, size: 16 bytes, params: 2, frame: 2
return env1_34[a0];
}
function value_44765(a0) { // fn#44765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:7906, offset: 0x011783a7, size: 16 bytes, params: 2, frame: 2
return env1_35[a0];
}
function value_44766() { // fn#44766, offset: 0x00e427ca, size: 9 bytes, params: 1, frame: 1
return env1_36;
}
function value_44767() { // fn#44767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:8003, offset: 0x011783b7, size: 63 bytes, params: 1, frame: 13
const value = environment.__proto__;
return env1_26 === null || (importDefault(21) /* metro dependency 21: SnowflakeUtils */).age(env1_26) > FAMILY_CENTER_REFETCH_COOLDOWN;
}
function value_44768() { // fn#44768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:8095, offset: 0x011783f6, size: 114 bytes, params: 1, frame: 14
var r1;
let value = environment.__proto__;
const value2 = undefined;
const getIsFamilyCenterV3Enabled = FamilyCenterV3ExperimentModule.getIsFamilyCenterV3Enabled;
if (Reflect.apply(getIsFamilyCenterV3Enabled, FamilyCenterV3ExperimentModule,
[{location: 'isInRestrictedHours'}])) {
value = UserStore.getCurrentUser();
r1 = value == null || value.restrictedSchedule == null ? value2 : value.restrictedSchedule.isInRestrictedHours();
value = r1 != null;
return value && r1;
}
return false;
}
}
}
function _fun44715(a0, a1) { // fn#44715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:2077, offset: 0x01177777, size: 116 bytes, params: 3, frame: 7
var property;
var sku_id;
var subscription_plan_id;
if (a1.invoice_items != null) {
if (a1.invoice_items.length > 0) {
property = a1.invoice_items[0];
sku_id = property.sku_id;
subscription_plan_id = property.subscription_plan_id;
if (!(sku_id == null && subscription_plan_id == null)) {
a0[a1.id] = {sku_id: sku_id, subscription_plan_id: subscription_plan_id, total: a1.total,
currency: a1.currency};
}
}
}
return a0;
}
function _fun44717(a0, a1) { // fn#44717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5294:2346, offset: 0x0117780e, size: 18 bytes, params: 3, frame: 3
a0[a1.entitlement_id] = a1;
return a0;
}
global.__d(_fun44700, 5116, [6, 7, 15, 17, 18, 57, 3837, 1228, 1878, 5117, 1418, 21, 5118, 5187, 5188,
2]) /* metro module 5116, dependencies: [6, 7, 15, 17, 18, 57, 3837, 1228, 1878, 5117, 1418, 21, 5118, 5187, 5188, 2] */;