Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,299 @@
/* Metro module 13421; source: modules/parent_tools/ChangeSpendingLimitFormState.tsx; dependencies: [5, 57, 31, 5116, 13348, 566, 5138, 13350, 2] */
function _fun102121(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13611:6, offset: 0x0222ddd0, size: 165 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/ChangeSpendingLimitFormState.tsx');
exports.useChangeSpendingLimitFormState = useChangeSpendingLimitFormState;
}
function useChangeSpendingLimitFormState(a0) { // fn#102122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13611:257, offset: 0x0222de75, size: 681 bytes, params: 2, frame: 31
const env0_0 = a0;
const value2 = undefined;
const ParentalControlledSpendingLimit = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledSpendingLimit;
const value3 = ParentalControlledSpendingLimit.useControlledSetting(a0);
const spendingLimit = (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getSpendingLimit();
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterStore], _fun102124);
const value5 = null;
const currency = value5 == value3 ? value2 : value3.currency;
const r3 = value5 != currency ? currency : value5 == spendingLimit ? value2 : spendingLimit.currency;
let r5 = value5 != r3 ? r3 : 'usd';
const value7 = r5.toLowerCase();
const env0_2 = value7;
const CurrencyExponents = (require(5138) /* metro dependency 5138: PriceUtils */).CurrencyExponents;
let property = CurrencyExponents[value7];
const value8 = 2;
const r10 = value5 != property ? property : value8;
const env0_3 = r10;
let binding = env0_4;
let useMemo = binding.useMemo;
const value9 = Reflect.apply(useMemo, binding, [_fun102125, [value7]]);
useMemo = binding.useMemo;
const getNextRenewalDateLabel = (require(13350) /* metro dependency 13350: SpendingLimitUtils */).getNextRenewalDateLabel;
const value10 = Reflect.apply(useMemo, binding, [getNextRenewalDateLabel, []]);
const value12 = env0_3(binding.useState(_fun102126), value8);
property = value12[0];
var env0_4 = value12[1];
let useCallback = binding.useCallback;
const value13 = Reflect.apply(useCallback, binding, [_fun102127, [r10]]);
const r6 = property === '' && value5 != value3;
const float = global.parseFloat(property);
const Number = global.Number;
const r15 = !Number.isNaN(float) && float >= 0;
r5 = r6 || r15;
const r7 = r15 ? global.Math.round(float * exponentiationOperator(10, r10, float)) : value5;
binding = env0_4;
const value20 = env0_3(binding.useState(false), value8);
const property2 = value20[0];
const env0_8 = value20[1];
useCallback = binding.useCallback;
let value = env0_2(_fun102129);
value = Reflect.apply(useCallback, binding, [value, [r5, r6, r7, a0, value7]]);
return {amountInput: property, handleAmountChange: value13, currency: value7, currencySymbol: value9, exponent: r10,
isClearingCap: r6, isOverspending: value5 != value4 && value4 > 0 && value5 != r7 && r7 <= value4, canSave: r5,
isSubmitting: property2, renewalDate: value10, monthlySpend: value4, save: value};
}
function _fun102124() { // fn#102124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13611:472, offset: 0x0222e133, size: 48 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = FamilyCenterStore.getMonthlyPurchases();
const value2 = null;
const total_amount = value2 == value ? undefined : value.total_amount;
return value2 != total_amount ? total_amount : value2;
}
function _fun102125() { // fn#102125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13611:726, offset: 0x0222e163, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(13350) /* metro dependency 13350: SpendingLimitUtils */).getCurrencySymbol(env0_2);
}
function _fun102126() { // fn#102126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13611:827, offset: 0x0222e190, size: 62 bytes, params: 1, frame: 14
var r0;
var String;
var value;
if (env0_1 == null) {
r0 = '';
} else {
String = global.String;
value = env0_1.amount / exponentiationOperator(10, env0_3, undefined);
value = String(value);
r0 = value;
}
return r0;
}
function _fun102127(a0) { // fn#102127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13611:907, offset: 0x0222e1ce, size: 58 bytes, params: 2, frame: 15
const binding = env0_4;
const spendingLimitUtilsModule = require(13350) /* metro dependency 13350: SpendingLimitUtils */;
return binding(spendingLimitUtilsModule.sanitizeAmountInput(a0, env0_3));
}
function* _fun102129() { // fn#102129, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13611:1106, offset: 0x0222e213, size: 250 bytes, params: 1, frame: 17
var binding;
var value3;
var binding2;
var property;
var value5;
var ParentalControlledSpendingLimit;
var updateControlledSetting;
var object2;
var value6;
var value7;
var value8;
var value9;
var binding3;
var value10;
var value11;
var value12;
var value13;
var error;
if (true) {
value = environment.__proto__;
if (env1_6) {
env1_8(true);
try {
} catch (error) {
env1_8(false);
throw error;
}
if (FamilyCenterStore) {
value9 = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
env1_8(false);
throw error;
}
try {
binding3 = env2_1;
} catch (error) {
env1_8(false);
throw error;
}
try {
property = binding3[4];
} catch (error) {
env1_8(false);
throw error;
}
try {
value10 = binding(property);
} catch (error) {
env1_8(false);
throw error;
}
try {
ParentalControlledSpendingLimit = value10.ParentalControlledSpendingLimit;
} catch (error) {
env1_8(false);
throw error;
}
try {
updateControlledSetting = ParentalControlledSpendingLimit.updateControlledSetting;
} catch (error) {
env1_8(false);
throw error;
}
try {
} catch (error) {
env1_8(false);
throw error;
}
try {
value11 = Reflect.apply(updateControlledSetting, ParentalControlledSpendingLimit, [require, null]);
} catch (error) {
env1_8(false);
throw error;
}
yield value11;
try {
value12 = undefined;
value13 = false;
} catch (error) {
env1_8(false);
throw error;
}
if (value13) {
env1_8(false);
return value12;
}
env1_8(false);
return undefined;
}
try {
binding = env1_7;
} catch (error) {
env1_8(false);
throw error;
}
try {
value3 = binding == null;
} catch (error) {
env1_8(false);
throw error;
}
if (value3) {
env1_8(false);
return undefined;
}
try {
binding = env2_0;
} catch (error) {
env1_8(false);
throw error;
}
try {
binding2 = env2_1;
} catch (error) {
env1_8(false);
throw error;
}
try {
property = binding2[4];
} catch (error) {
env1_8(false);
throw error;
}
try {
value5 = binding(property);
} catch (error) {
env1_8(false);
throw error;
}
try {
ParentalControlledSpendingLimit = value5.ParentalControlledSpendingLimit;
} catch (error) {
env1_8(false);
throw error;
}
try {
updateControlledSetting = ParentalControlledSpendingLimit.updateControlledSetting;
} catch (error) {
env1_8(false);
throw error;
}
try {
} catch (error) {
env1_8(false);
throw error;
}
try {
object2 = {};
} catch (error) {
env1_8(false);
throw error;
}
try {
binding = env1_7;
} catch (error) {
env1_8(false);
throw error;
}
try {
object2.amount = binding;
} catch (error) {
env1_8(false);
throw error;
}
try {
binding = env1_2;
} catch (error) {
env1_8(false);
throw error;
}
try {
object2.currency = binding;
} catch (error) {
env1_8(false);
throw error;
}
try {
value6 = Reflect.apply(updateControlledSetting, ParentalControlledSpendingLimit, [require, object2]);
} catch (error) {
env1_8(false);
throw error;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
env1_8(false);
throw error;
}
if (value8) {
env1_8(false);
return value7;
}
env1_8(false);
}
}
}
@@ -0,0 +1,289 @@
/* Metro module 2224; source: modules/parent_tools/FamilyCenter.messages.js; dependencies: [1247, 2225, 2226, 2227, 2228, 2229, 2230, 2231, 2232, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240, 2241, 2242, 2243, 2244, 2245, 2246, 2247, 2248, 2249, 2250, 2251, 2252, 2253, 2254, 2255, 1282, 2] */
function _fun22634(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#22634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:6, offset: 0x00f043fc, size: 453 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {bg: bg_22635, cs: cs_22637, da: da_22639, de: de_22641, el: el_22643};
object2['en-GB'] = _fun22645;
object2['es-419'] = _fun22647;
object2['es-ES'] = _fun22649;
object2.fi = fi_22651;
object2.fr = fr_22653;
object2.hi = hi_22655;
object2.hr = hr_22657;
object2.hu = hu_22659;
object2.it = it_22661;
object2.ja = ja_22663;
object2.ko = ko_22665;
object2.lt = lt_22667;
object2.nl = nl_22669;
object2.no = no_22671;
object2.pl = pl_22673;
object2['pt-BR'] = _fun22675;
object2.ro = ro_22677;
object2.ru = ru_22679;
object2['sv-SE'] = _fun22681;
object2.th = th_22683;
object2.tr = tr_22685;
object2.uk = uk_22687;
object2.vi = vi_22689;
object2['zh-CN'] = _fun22691;
object2['zh-TW'] = _fun22693;
object2['en-US'] = _fun22695;
let value = require(1282) /* metro dependency 1282 */;
value = value.createLoader(object2, 'en-US');
const messagesProxy = (require(1282) /* metro dependency 1282 */).makeMessagesProxy(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenter.messages.js');
exports.default = messagesProxy;
exports.messagesLoader = value;
}
function bg_22635() { // fn#22635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:102, offset: 0x00f045c1, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2225) /* metro dependency 2225 */);
return value.then(function(a0) {
return {default: a0};
});
}
function cs_22637() { // fn#22637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:165, offset: 0x00f04602, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2226) /* metro dependency 2226 */);
return value.then(function(a0) {
return {default: a0};
});
}
function da_22639() { // fn#22639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:228, offset: 0x00f04643, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2227) /* metro dependency 2227 */);
return value.then(function(a0) {
return {default: a0};
});
}
function de_22641() { // fn#22641, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:291, offset: 0x00f04684, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2228) /* metro dependency 2228 */);
return value.then(function(a0) {
return {default: a0};
});
}
function el_22643() { // fn#22643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:354, offset: 0x00f046c5, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2229) /* metro dependency 2229 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22645() { // fn#22645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:422, offset: 0x00f04706, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2230) /* metro dependency 2230 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22647() { // fn#22647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:491, offset: 0x00f04747, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2231) /* metro dependency 2231 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22649() { // fn#22649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:559, offset: 0x00f04788, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2232) /* metro dependency 2232 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fi_22651() { // fn#22651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:622, offset: 0x00f047c9, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2233) /* metro dependency 2233 */);
return value.then(function(a0) {
return {default: a0};
});
}
function fr_22653() { // fn#22653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:685, offset: 0x00f0480a, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2234) /* metro dependency 2234 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hi_22655() { // fn#22655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:749, offset: 0x00f0484b, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2235) /* metro dependency 2235 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hr_22657() { // fn#22657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:813, offset: 0x00f0488c, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2236) /* metro dependency 2236 */);
return value.then(function(a0) {
return {default: a0};
});
}
function hu_22659() { // fn#22659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:877, offset: 0x00f048cd, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2237) /* metro dependency 2237 */);
return value.then(function(a0) {
return {default: a0};
});
}
function it_22661() { // fn#22661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:941, offset: 0x00f0490e, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2238) /* metro dependency 2238 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ja_22663() { // fn#22663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1005, offset: 0x00f0494f, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2239) /* metro dependency 2239 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ko_22665() { // fn#22665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1069, offset: 0x00f04990, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2240) /* metro dependency 2240 */);
return value.then(function(a0) {
return {default: a0};
});
}
function lt_22667() { // fn#22667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1133, offset: 0x00f049d1, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2241) /* metro dependency 2241 */);
return value.then(function(a0) {
return {default: a0};
});
}
function nl_22669() { // fn#22669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1197, offset: 0x00f04a12, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2242) /* metro dependency 2242 */);
return value.then(function(a0) {
return {default: a0};
});
}
function no_22671() { // fn#22671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1261, offset: 0x00f04a53, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2243) /* metro dependency 2243 */);
return value.then(function(a0) {
return {default: a0};
});
}
function pl_22673() { // fn#22673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1325, offset: 0x00f04a94, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2244) /* metro dependency 2244 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22675() { // fn#22675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1394, offset: 0x00f04ad5, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2245) /* metro dependency 2245 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ro_22677() { // fn#22677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1458, offset: 0x00f04b16, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2246) /* metro dependency 2246 */);
return value.then(function(a0) {
return {default: a0};
});
}
function ru_22679() { // fn#22679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1522, offset: 0x00f04b57, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2247) /* metro dependency 2247 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22681() { // fn#22681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1591, offset: 0x00f04b98, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2248) /* metro dependency 2248 */);
return value.then(function(a0) {
return {default: a0};
});
}
function th_22683() { // fn#22683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1655, offset: 0x00f04bd9, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2249) /* metro dependency 2249 */);
return value.then(function(a0) {
return {default: a0};
});
}
function tr_22685() { // fn#22685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1719, offset: 0x00f04c1a, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2250) /* metro dependency 2250 */);
return value.then(function(a0) {
return {default: a0};
});
}
function uk_22687() { // fn#22687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1783, offset: 0x00f04c5b, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2251) /* metro dependency 2251 */);
return value.then(function(a0) {
return {default: a0};
});
}
function vi_22689() { // fn#22689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1847, offset: 0x00f04c9c, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2252) /* metro dependency 2252 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22691() { // fn#22691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1916, offset: 0x00f04cdd, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2253) /* metro dependency 2253 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22693() { // fn#22693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:1985, offset: 0x00f04d1e, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2254) /* metro dependency 2254 */);
return value.then(function(a0) {
return {default: a0};
});
}
function _fun22695() { // fn#22695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2351:2054, offset: 0x00f04d5f, size: 65 bytes, params: 1, frame: 14
let value = require(1247) /* metro dependency 1247: AssetJsonUtils */;
value = value.loadJsonAsset(require(2255) /* metro dependency 2255 */);
return value.then(function(a0) {
return {default: a0};
});
}
@@ -0,0 +1,648 @@
/* Metro module 5118; source: modules/parent_tools/FamilyCenterActionCreators.tsx; dependencies: [5, 5119, 5117, 661, 5120, 694, 507, 683, 1363, 1314, 1350, 2] */
function _fun44816(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:6, offset: 0x011799f9, size: 419 bytes, params: 8, frame: 19
var object2;
let env0_0 = require;
const maybeFetchCollectiblesForInvoices = function() {
return _maybeFetchCollectiblesForInvoices.apply(this, arguments);
};
const maybeFetchCollectiblesForGifts = function() {
return _maybeFetchCollectiblesForGifts.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const familyCenterControlledSettingsStore = importDefault(5119) /* metro dependency 5119: FamilyCenterControlledSettingsStore */;
const env0_5 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).FamilyCenterAction;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_6 = constantsModule.AnalyticEvents;
const env0_7 = constantsModule.Endpoints;
object2 = {initialPageLoad: initialPageLoad, fetchLinkedUsers: fetchLinkedUsers,
getConnectionPrerequisites: getConnectionPrerequisites, setPendingConnection: setPendingConnection,
clearPendingConnection: clearPendingConnection, requestLink: requestLink, fetchTeenActivity: fetchTeenActivity,
fetchMoreTeenActivity: function(a0, a1, a2, a3) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
return a3(_fun44862)();
}, selectTab: selectTab, fetchTeenSettingsAndConsents: fetchTeenSettingsAndConsents,
updateTeenSettings: updateTeenSettings, updateTeenConsents: updateTeenConsents};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterActionCreators.tsx');
exports.default = object2;
exports.updateLinkForUserId = function() {
return _updateLinkForUserId.apply(this, arguments);
};
exports.removeLinkForUserId = function() {
return _removeLinkForUserId.apply(this, arguments);
};
exports.getLinkCodeForCurrentUser = function() {
return _getLinkCodeForCurrentUser.apply(this, arguments);
};
exports.shareIarWithParents = function() {
return _shareIarWithParents.apply(this, arguments);
};
}
function _maybeFetchCollectiblesForInvoices() { // fn#44818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:297, offset: 0x01179b9c, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44820).apply(this, arguments);
}
function _maybeFetchCollectiblesForGifts() { // fn#44824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:756, offset: 0x01179cd1, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44826).apply(this, arguments);
}
function _updateLinkForUserId() { // fn#44829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1028, offset: 0x01179db8, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44831).apply(this, arguments);
}
function _removeLinkForUserId() { // fn#44833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1357, offset: 0x01179eaf, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44835).apply(this, arguments);
}
function _getLinkCodeForCurrentUser() { // fn#44837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1684, offset: 0x01179fb0, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44839).apply(this, arguments);
}
function _shareIarWithParents() { // fn#44841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:2024, offset: 0x0117a0a1, size: 48 bytes, params: 1, frame: 14
return env0_3(_fun44843).apply(this, arguments);
}
function initialPageLoad() { // fn#44844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:2237, offset: 0x0117a133, size: 27 bytes, params: 1, frame: 11
return env0_3(_fun44846)();
}
function fetchLinkedUsers() { // fn#44847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:3754, offset: 0x0117a49f, size: 27 bytes, params: 1, frame: 11
return env0_3(_fun44849)();
}
function getConnectionPrerequisites(a0, a1) { // fn#44850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4023, offset: 0x0117a56d, size: 41 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
return env0_3(_fun44852)();
}
function setPendingConnection(a0, a1) { // fn#44853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4183, offset: 0x0117a61a, size: 65 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'FAMILY_CENTER_PENDING_CONNECTION_SET',
teenId: a0, linkCode: a1});
}
function clearPendingConnection() { // fn#44854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4294, offset: 0x0117a65b, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'FAMILY_CENTER_PENDING_CONNECTION_CLEAR'});
}
function requestLink(a0, a1) { // fn#44855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4398, offset: 0x0117a68c, size: 41 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
return env0_3(_fun44857)();
}
function fetchTeenActivity(a0) { // fn#44858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4685, offset: 0x0117a783, size: 34 bytes, params: 2, frame: 11
const env0_0 = a0;
return env0_3(_fun44860)();
}
function fetchMoreTeenActivity(a0, a1, a2, a3) { // fn#44861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:5928, offset: 0x0117aa5c, size: 55 bytes, params: 5, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
return a3(_fun44863)();
}
function selectTab(a0) { // fn#44864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:6785, offset: 0x0117ac88, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'FAMILY_CENTER_HANDLE_TAB_SELECT',
tab: a0});
}
function fetchTeenSettingsAndConsents(a0) { // fn#44865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:6893, offset: 0x0117acc1, size: 93 bytes, params: 2, frame: 15
const env0_0 = a0;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const get = HTTP.get;
const object2 = {};
object2.url = Endpoints.FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS(a0);
object2.rejectWithError = false;
return Reflect.apply(get, HTTP, [object2]).then(_fun44866);
}
function updateTeenSettings(a0, a1, a2) { // fn#44867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:7169, offset: 0x0117ad78, size: 48 bytes, params: 4, frame: 11
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
return env0_3(_fun44869)();
}
function updateTeenConsents(a0, a1, a2) { // fn#44870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:7673, offset: 0x0117af2b, size: 116 bytes, params: 4, frame: 15
const env0_0 = a0;
const HTTP = (require(507) /* metro dependency 507: HTTPUtils */).HTTP;
const patch = HTTP.patch;
const object2 = {};
object2.url = Endpoints.FAMILY_CENTER_TEEN_CONSENTS(a0);
object2.body = {grant: a1, revoke: a2};
object2.rejectWithError = false;
return Reflect.apply(patch, HTTP, [object2]).then(_fun44871);
}
function* _fun44820(a0) { // fn#44820, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:388, offset: 0x01179bd5, size: 132 bytes, params: 2, frame: 16
if (true) {
var Set = global.Set;
var set = new Set();
a0.forEach(_fun44821);
var Promise = global.Promise;
var all = Promise.all;
var Array = global.Array;
set = Array.from(set);
yield Reflect.apply(all, Promise, [set.map(_fun44822)]);
}
}
function* _fun44826(a0) { // fn#44826, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:841, offset: 0x01179d0a, size: 132 bytes, params: 2, frame: 16
if (true) {
var Set = global.Set;
var set = new Set();
a0.forEach(_fun44827);
var Promise = global.Promise;
var all = Promise.all;
var Array = global.Array;
set = Array.from(set);
yield Reflect.apply(all, Promise, [set.map(_fun44828)]);
}
}
function* _fun44831(a0, a1) { // fn#44831, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1091, offset: 0x01179df1, size: 128 bytes, params: 3, frame: 15
var environment;
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[6]).HTTP;
var patch = HTTP.patch;
var FAMILY_CENTER_LINKED_USERS = env2_7.FAMILY_CENTER_LINKED_USERS;
value = Reflect.apply(patch, HTTP, [{url: FAMILY_CENTER_LINKED_USERS, body: {linked_user_id: a0,
link_status: a1},
rejectWithError: false}]);
yield value.then(_fun44832);
}
}
function* _fun44835(a0) { // fn#44835, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1420, offset: 0x01179ee8, size: 124 bytes, params: 2, frame: 16
var environment;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[6]).HTTP;
var del = HTTP.del;
var FAMILY_CENTER_LINKED_USERS = env2_7.FAMILY_CENTER_LINKED_USERS;
value = Reflect.apply(del, HTTP, [{url: FAMILY_CENTER_LINKED_USERS, body: {linked_user_id: a0},
rejectWithError: false}]);
yield value.then(_fun44836);
}
}
function* _fun44839() { // fn#44839, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1759, offset: 0x01179fe9, size: 105 bytes, params: 1, frame: 14
var environment;
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[6]).HTTP;
var get = HTTP.get;
var FAMILY_CENTER_LINK_CODE = env2_7.FAMILY_CENTER_LINK_CODE;
value = Reflect.apply(get, HTTP, [{url: FAMILY_CENTER_LINK_CODE, rejectWithError: false}]);
yield value.then(_fun44840);
}
}
function* _fun44843() { // fn#44843, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:2087, offset: 0x0117a0da, size: 89 bytes, params: 1, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[6]).HTTP;
var post = HTTP.post;
var FAMILY_CENTER_SHARE_IAR_WITH_PARENTS = env2_7.FAMILY_CENTER_SHARE_IAR_WITH_PARENTS;
yield Reflect.apply(post, HTTP, [{url: FAMILY_CENTER_SHARE_IAR_WITH_PARENTS, rejectWithError: true}]);
}
}
function* _fun44846() { // fn#44846, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:2244, offset: 0x0117a157, size: 840 bytes, params: 1, frame: 25
var object2;
var value16;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_1;
const binding2 = env2_2;
const value3 = undefined;
binding(binding2[5]).dispatch({type: 'FAMILY_CENTER_FETCH_START'});
const HTTP = env2_0(binding2[6]).HTTP;
const get = HTTP.get;
const FAMILY_CENTER_TEEN_ACTIVITY_ME = env2_7.FAMILY_CENTER_TEEN_ACTIVITY_ME;
yield Reflect.apply(get, HTTP, [{url: FAMILY_CENTER_TEEN_ACTIVITY_ME, rejectWithError: false}]);
const value5 = undefined;
if (false) {
return value5;
}
const body = value5.body;
const teen_audit_log = body.teen_audit_log;
const linked_users = body.linked_users;
const users2 = body.users;
const age_group = body.age_group;
object2 = {};
const value7 = null;
object2.teenId = value7 == teen_audit_log ? value3 : teen_audit_log.teen_user_id;
object2.rangeStartId = value7 == teen_audit_log ? value3 : teen_audit_log.range_start_id;
const totals = value7 == teen_audit_log ? value3 : teen_audit_log.totals;
object2.totals = value7 != totals ? totals : {};
const actions = value7 == teen_audit_log ? value3 : teen_audit_log.actions;
object2.actions = value7 != actions ? actions : [];
const users = value7 == teen_audit_log ? value3 : teen_audit_log.users;
object2.users = value7 != users ? users : [];
const guilds = value7 == teen_audit_log ? value3 : teen_audit_log.guilds;
object2.guilds = value7 != guilds ? guilds : [];
const top_user_activities = value7 == teen_audit_log ? value3 : teen_audit_log.top_user_activities;
object2.topUserActivities = value7 != top_user_activities ? top_user_activities : [];
const top_guild_activities = value7 == teen_audit_log ? value3 : teen_audit_log.top_guild_activities;
object2.topGuildActivities = value7 != top_guild_activities ? top_guild_activities : [];
const amount = value7 == teen_audit_log || value7 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.amount;
object2.totalSpendAmount = value7 != amount ? amount : value7;
const currency = value7 == teen_audit_log || value7 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.currency;
object2.totalSpendCurrency = value7 != currency ? currency : value7;
const spending_limit = body.spending_limit;
object2.spendingLimit = value7 != spending_limit ? spending_limit : value7;
const monthly_purchases = body.monthly_purchases;
object2.monthlyPurchases = value7 != monthly_purchases ? monthly_purchases : value7;
const invoices = value7 == teen_audit_log ? value3 : teen_audit_log.invoices;
object2.invoices = value7 != invoices ? invoices : [];
const gifts = value7 == teen_audit_log ? value3 : teen_audit_log.gifts;
object2.gifts = value7 != gifts ? gifts : [];
if (value7 != object2.invoices && object2.invoices.length > 0) {
binding = env2_8;
yield binding(object2.invoices);
if (false) {
return undefined;
}
if (value7 != object2.gifts && object2.gifts.length > 0) {
binding = env2_10;
yield binding(object2.gifts);
if (false) {
return undefined;
}
binding = env2_1;
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_INITIAL_LOAD', familyCenterTeenActivity: object2,
linkedUsers: linked_users, users: users2, ageGroup: age_group});
if (value7 != body.restricted_schedule && value7 != object2.teenId) {
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: object2.teenId,
restrictedSchedule: body.restricted_schedule});
}
return object2;
}
binding = env2_1;
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_INITIAL_LOAD', familyCenterTeenActivity: object2,
linkedUsers: linked_users, users: users2, ageGroup: age_group});
} else {
if (value7 != object2.gifts && object2.gifts.length > 0) {
binding = env2_10;
yield binding(object2.gifts);
if (false) {
return undefined;
}
binding = env2_1;
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_INITIAL_LOAD', familyCenterTeenActivity: object2,
linkedUsers: linked_users, users: users2, ageGroup: age_group});
if (value7 != body.restricted_schedule && value7 != object2.teenId) {
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: object2.teenId,
restrictedSchedule: body.restricted_schedule});
}
return object2;
}
value16 = env2_1(env2_2[5]);
value16.dispatch({type: 'FAMILY_CENTER_INITIAL_LOAD', familyCenterTeenActivity: object2,
linkedUsers: linked_users,
users: users2, ageGroup: age_group});
}
if (value7 != body.restricted_schedule && value7 != object2.teenId) {
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: object2.teenId,
restrictedSchedule: body.restricted_schedule});
}
return object2;
}
function* _fun44849() { // fn#44849, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:3761, offset: 0x0117a4c3, size: 170 bytes, params: 1, frame: 16
var object3;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[6]).HTTP;
const get = HTTP.get;
const FAMILY_CENTER_LINKED_USERS = env2_7.FAMILY_CENTER_LINKED_USERS;
yield Reflect.apply(get, HTTP, [{url: FAMILY_CENTER_LINKED_USERS, rejectWithError: false}]);
const value3 = undefined;
if (false) {
return value3;
}
const body = value3.body;
object3 = {};
object3.linkedUsers = body.linked_users;
const users = body.users;
object3.users = users;
value = env2_1(env2_2[5]);
const dispatch = value.dispatch;
const object4 = {type: 'FAMILY_CENTER_LINKED_USERS_FETCH_SUCCESS'};
copyDataProperties(object4, object3, 'FAMILY_CENTER_LINKED_USERS_FETCH_SUCCESS');
Reflect.apply(dispatch, value, [object4]);
return object3;
}
function* _fun44852() { // fn#44852, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4033, offset: 0x0117a59f, size: 123 bytes, params: 1, frame: 15
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[6]).HTTP;
const get = HTTP.get;
const FAMILY_CENTER_CONNECTION_PREREQUISITES = env2_7.FAMILY_CENTER_CONNECTION_PREREQUISITES;
value = environment.__proto__;
yield Reflect.apply(get, HTTP, [{url: FAMILY_CENTER_CONNECTION_PREREQUISITES, query: {teen_id: require,
link_code: importDefault}, rejectWithError: true}]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
function* _fun44857() { // fn#44857, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4408, offset: 0x0117a6be, size: 197 bytes, params: 1, frame: 18
var object2;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[6]).HTTP;
const post = HTTP.post;
const FAMILY_CENTER_LINKED_USERS = env2_7.FAMILY_CENTER_LINKED_USERS;
yield Reflect.apply(post, HTTP, [{url: FAMILY_CENTER_LINKED_USERS, body: {recipient_id: require,
code: importDefault}, rejectWithError: false}]);
const value4 = undefined;
if (false) {
return value4;
}
const body = value4.body;
object2 = {};
object2.linkedUsers = body.linked_users;
const users = body.users;
object2.users = users;
value = env2_1(env2_2[5]);
const dispatch = value.dispatch;
const object4 = {type: 'FAMILY_CENTER_REQUEST_LINK_SUCCESS'};
copyDataProperties(object4, object2, require);
Reflect.apply(dispatch, value, [object4]);
return object2;
}
function* _fun44860() { // fn#44860, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:4691, offset: 0x0117a7ae, size: 686 bytes, params: 1, frame: 23
var object2;
var value16;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_1;
const binding2 = env2_2;
const value3 = undefined;
binding(binding2[5]).dispatch({type: 'FAMILY_CENTER_FETCH_START'});
const value6 = env2_7.FAMILY_CENTER_TEEN_ACTIVITY(require);
const HTTP = env2_0(binding2[6]).HTTP;
const get = HTTP.get;
yield Reflect.apply(get, HTTP, [{url: value6, rejectWithError: false}]);
const value7 = undefined;
if (false) {
return value7;
}
const body = value7.body;
const teen_audit_log = body.teen_audit_log;
object2 = {};
object2.teenId = teen_audit_log.teen_user_id;
object2.rangeStartId = teen_audit_log.range_start_id;
object2.totals = teen_audit_log.totals;
object2.actions = teen_audit_log.actions;
const users = teen_audit_log.users;
object2.users = users;
object2.guilds = teen_audit_log.guilds;
const top_user_activities = teen_audit_log.top_user_activities;
const value9 = null;
object2.topUserActivities = value9 != top_user_activities ? top_user_activities : [];
const top_guild_activities = teen_audit_log.top_guild_activities;
object2.topGuildActivities = value9 != top_guild_activities ? top_guild_activities : [];
const amount = value9 == teen_audit_log || value9 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.amount;
object2.totalSpendAmount = value9 != amount ? amount : value9;
const currency = value9 == teen_audit_log || value9 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.currency;
object2.totalSpendCurrency = value9 != currency ? currency : value9;
const spending_limit = body.spending_limit;
object2.spendingLimit = value9 != spending_limit ? spending_limit : value9;
const monthly_purchases = body.monthly_purchases;
object2.monthlyPurchases = value9 != monthly_purchases ? monthly_purchases : value9;
const invoices = value9 == teen_audit_log ? value3 : teen_audit_log.invoices;
object2.invoices = value9 != invoices ? invoices : [];
const gifts = value9 == teen_audit_log ? value3 : teen_audit_log.gifts;
object2.gifts = value9 != gifts ? gifts : [];
if (object2.invoices && object2.invoices.length > 0) {
binding = env2_8;
yield binding(object2.invoices);
if (false) {
return undefined;
}
if (object2.gifts && object2.gifts.length > 0) {
binding = env2_10;
yield binding(object2.gifts);
if (false) {
return undefined;
}
binding = env2_1;
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_TEEN_ACTIVITY_FETCH_SUCCESS',
familyCenterTeenActivity: object2});
if (value9 != body.restricted_schedule) {
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: require,
restrictedSchedule: body.restricted_schedule});
}
return object2;
}
binding = env2_1;
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_TEEN_ACTIVITY_FETCH_SUCCESS',
familyCenterTeenActivity: object2});
} else {
if (object2.gifts && object2.gifts.length > 0) {
binding = env2_10;
yield binding(object2.gifts);
if (false) {
return undefined;
}
binding = env2_1;
binding(env2_2[5]).dispatch({type: 'FAMILY_CENTER_TEEN_ACTIVITY_FETCH_SUCCESS',
familyCenterTeenActivity: object2});
if (value9 != body.restricted_schedule) {
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: require,
restrictedSchedule: body.restricted_schedule});
}
return object2;
}
value16 = env2_1(env2_2[5]);
value16.dispatch({type: 'FAMILY_CENTER_TEEN_ACTIVITY_FETCH_SUCCESS', familyCenterTeenActivity: object2});
}
if (value9 != body.restricted_schedule) {
env2_1(env2_2[5]).dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: require,
restrictedSchedule: body.restricted_schedule});
}
return object2;
}
function* _fun44863() { // fn#44863, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:5942, offset: 0x0117aa9c, size: 492 bytes, params: 1, frame: 24
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const value3 = undefined;
const HTTP = binding(env2_2[6]).HTTP;
const get = HTTP.get;
let object2 = {};
object2.url = env2_7.FAMILY_CENTER_TEEN_ACTIVITY_MORE(require, importDefault, dependencyMap, env1_3);
object2.rejectWithError = false;
yield Reflect.apply(get, HTTP, [object2]);
const value5 = undefined;
if (false) {
return value5;
}
const teen_audit_log = value5.body.teen_audit_log;
object2 = {};
object2.teenId = teen_audit_log.teen_user_id;
object2.rangeStartId = teen_audit_log.range_start_id;
object2.actions = teen_audit_log.actions;
const users = teen_audit_log.users;
object2.users = users;
object2.guilds = teen_audit_log.guilds;
const top_user_activities = teen_audit_log.top_user_activities;
const value7 = null;
object2.topUserActivities = value7 != top_user_activities ? top_user_activities : [];
const top_guild_activities = teen_audit_log.top_guild_activities;
object2.topGuildActivities = value7 != top_guild_activities ? top_guild_activities : [];
const amount = value7 == teen_audit_log || value7 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.amount;
object2.totalSpendAmount = value7 != amount ? amount : value7;
const currency = value7 == teen_audit_log || value7 == teen_audit_log.total_spend ? value3 : teen_audit_log.total_spend.currency;
object2.totalSpendCurrency = value7 != currency ? currency : value7;
const invoices = value7 == teen_audit_log ? value3 : teen_audit_log.invoices;
object2.invoices = value7 != invoices ? invoices : [];
const gifts = value7 == teen_audit_log ? value3 : teen_audit_log.gifts;
object2.gifts = value7 != gifts ? gifts : [];
binding = env2_1;
const binding2 = env2_2;
const value8 = binding(binding2[7]);
const track = value8.track;
const FAMILY_CENTER_ACTION = env2_6.FAMILY_CENTER_ACTION;
const LoadMore = env2_5.LoadMore;
Reflect.apply(track, value8, [FAMILY_CENTER_ACTION, {action: LoadMore, selected_teen_id: require,
action_display_type: importDefault}]);
value = binding(binding2[5]);
value.dispatch({type: 'FAMILY_CENTER_TEEN_ACTIVITY_MORE_FETCH_SUCCESS', familyCenterTeenActivity: object2});
return teen_audit_log;
}
function _fun44866({body}) { // fn#44866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:6991, offset: 0x0117ad1e, size: 90 bytes, params: 2, frame: 15
const settings = body.settings;
const consents = body.consents;
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS',
userId: env0_0, settings: settings, consents: consents});
}
function* _fun44869() { // fn#44869, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:7181, offset: 0x0117adb1, size: 378 bytes, params: 1, frame: 26
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
let binding = env2_0;
const binding2 = env2_2;
const value3 = undefined;
const value4 = binding(binding2[8]);
const getProtoFieldClass = value4.getProtoFieldClass;
let PreloadedUserSettings = binding(binding2[9]).PreloadedUserSettings;
const value6 = Reflect.apply(getProtoFieldClass, value4, [PreloadedUserSettings, importDefault]);
const settings = env2_4.getSettings(require);
const r10 = settings == null ? value3 : settings[importDefault];
binding = env2_0;
const binding3 = env2_2;
const value8 = binding(binding3[8]);
const createModifiedProto = value8.createModifiedProto;
PreloadedUserSettings = binding(binding3[9]).PreloadedUserSettings;
const modifiedProto = Reflect.apply(createModifiedProto, value8, [r10, dependencyMap, value6, PreloadedUserSettings,
importDefault]);
if (modifiedProto != null) {
binding = env2_0;
var binding4 = env2_2;
var HTTP = binding(binding4[6]).HTTP;
var patch = HTTP.patch;
var object2 = {};
object2.url = env2_7.FAMILY_CENTER_TEEN_SETTINGS(require);
var value9 = binding(binding4[10]);
object2.body = {settings: value9.protoToB64(binding(binding4[9]).PreloadedUserSettings, modifiedProto)};
object2.rejectWithError = false;
yield Reflect.apply(patch, HTTP, [object2]);
var value10 = undefined;
if (false) {
return value10;
}
env2_1(env2_2[5]).dispatch({type: 'FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS', userId: require,
settings: value10.body.settings});
}
return value3;
}
function _fun44871({body}) { // fn#44871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:7790, offset: 0x0117af9f, size: 73 bytes, params: 2, frame: 14
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS',
userId: env0_0, consents: body});
}
function _fun44821(a0) { // fn#44821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:426, offset: 0x01179c59, size: 79 bytes, params: 2, frame: 12
var property;
var binding;
if (a0.invoice_items != null) {
if (a0.invoice_items.length > 0) {
property = a0.invoice_items[0];
if (property.sku_id != null) {
binding = env0_0;
binding.add(property.sku_id);
}
}
}
}
function _fun44822(a0) { // fn#44822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:580, offset: 0x01179ca8, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return env3_0(env3_2[4]).maybeFetchCollectiblesProduct(a0);
}
function _fun44827(a0) { // fn#44827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:879, offset: 0x01179d8e, size: 42 bytes, params: 2, frame: 11
var binding;
if (a0.sku_id != null) {
binding = env0_0;
binding.add(a0.sku_id);
}
}
function _fun44832({body}) { // fn#44832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1230, offset: 0x01179e71, size: 62 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = env3_1(env3_2[5]);
value.dispatch({type: 'FAMILY_CENTER_REQUEST_LINK_UPDATE_SUCCESS', linkedUsers: body});
return body;
}
function _fun44836({body}) { // fn#44836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1541, offset: 0x01179f64, size: 76 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[5]).dispatch({type: 'FAMILY_CENTER_REQUEST_LINK_REMOVE_SUCCESS', linkedUsers: body,
deletedUserId: env0_0});
return body;
}
function _fun44840({body}) { // fn#44840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5296:1852, offset: 0x0117a052, size: 79 bytes, params: 2, frame: 14
const link_code = body.link_code;
const expires_at = body.expires_at;
let value = environment.__proto__.__proto__.__proto__;
value = env3_1(env3_2[5]);
value.dispatch({type: 'FAMILY_CENTER_LINK_CODE_FETCH_SUCCESS', linkCode: link_code, expiresAt: expires_at});
return link_code;
}
@@ -0,0 +1,63 @@
/* Metro module 13417; source: modules/parent_tools/FamilyCenterActivityGiftRowUtils.tsx; dependencies: [1244, 3381, 5137, 2224, 2] */
function _fun102085(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13607:6, offset: 0x0222bd2e, size: 135 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const closure = formatGiftDate;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterActivityGiftRowUtils.tsx');
exports.getGiftRowDisplayInfo = function(a0) {
return {skuId: a0.sku_id, subscriptionPlanId: a0.subscription_plan_id, price: a0.price,
gifterUserId: a0.gifter_user_id, claimed: a0.claimed, offeredAt: a0.offered_at, claimedAt: a0.claimed_at};
};
exports.formatGiftDate = closure;
exports.getGiftSubtext = getGiftSubtext;
}
function formatGiftDate(a0) { // fn#102086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13607:111, offset: 0x0222bdb5, size: 121 bytes, params: 2, frame: 16
const Intl = global.Intl;
const DateTimeFormat = Intl.DateTimeFormat;
const dateTimeFormat = new DateTimeFormat((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
{'month': 'short', 'day': 'numeric'});
const format = dateTimeFormat.format;
const moduleValue = require(3381) /* metro dependency 3381 */;
return Reflect.apply(format, dateTimeFormat, [moduleValue.parseISO(a0)]);
}
function getGiftSubtext({claimed, price, gifterName, offeredAt, claimedAt}) { // fn#102088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13607:560, offset: 0x0222be83, size: 361 bytes, params: 2, frame: 22
var r8;
var r0;
var moduleValue;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var gAG45y;
var object4;
var kDyllq;
var object5;
let value = null;
if (value != price) {
moduleValue = require(5137) /* metro dependency 5137: PriceUtils */;
r8 = moduleValue.formatPrice(price.amount, price.currency);
} else {
r8 = value;
}
const items = [value == r8 ? value != r8 ? r8 : value : value != gifterName ? intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['o44n/1'],
{price: r8, username: gifterName}) : value != r8 ? r8 : value];
const formatToPlainString = intl.formatToPlainString;
const defaultImport = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
if (claimed) {
kDyllq = defaultImport.kDyllq;
object5 = {};
object5.date = formatGiftDate(value == claimedAt ? offeredAt : claimedAt);
value = Reflect.apply(formatToPlainString, intl, [kDyllq, object5]);
r0 = value;
} else {
gAG45y = defaultImport.gAG45y;
object4 = {};
object4.date = formatGiftDate(offeredAt);
r0 = Reflect.apply(formatToPlainString, intl, [gAG45y, object4]);
}
items[1] = r0;
const filter = items.filter;
const Boolean = global.Boolean;
return Reflect.apply(filter, items, [Boolean]).join(' • ');
}
@@ -0,0 +1,110 @@
/* Metro module 13415; source: modules/parent_tools/FamilyCenterActivityPurchaseRowUtils.tsx; dependencies: [5126, 5127, 1880, 1904, 1244, 2224, 1423, 2] */
function _fun102071(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13605:6, offset: 0x0222b070, size: 277 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(5126) /* metro dependency 5126: AvatarDecorationRecord */).isAvatarDecorationRecord;
const env0_4 = (require(5127) /* metro dependency 5127: ProfileEffectRecord */).isProfileEffectRecord;
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_5 = premiumConstantsModule.PremiumSubscriptionSKUs;
const env0_6 = premiumConstantsModule.SubscriptionPlanInfo;
const closure = getCollectibleTypeName;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterActivityPurchaseRowUtils.tsx');
exports.PREVIEW_SIZE = 40;
exports.NAMEPLATE_ASPECT_RATIO = 5.333333333333333;
exports.PROFILE_FRAME_ASPECT_RATIO = 0.66;
exports.getCollectibleTypeName = closure;
exports.getAvatarDecorationPreviewUrl = getAvatarDecorationPreviewUrl;
exports.getProfileEffectPreviewUrl = getProfileEffectPreviewUrl;
exports.isGuildBoostSubscription = function(a0) {
if (a0 == null) {
return false;
}
return SubscriptionPlanInfo[a0]?.skuId === PremiumSubscriptionSKUs.GUILD;
};
exports.getPurchaseDisplayInfo = getPurchaseDisplayInfo;
}
function getCollectibleTypeName(a0) { // fn#102072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13605:249, offset: 0x0222b185, size: 496 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === a0) {
return intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).obi47v);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === a0) {
return intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).RX8BMR);
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === a0) {
return intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).nNGEHk);
}
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === a0) {
return intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).VS1fKo);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === a0) {
return intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).JiIY1l);
}
return '';
}
function getAvatarDecorationPreviewUrl(a0) { // fn#102073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13605:1000, offset: 0x0222b375, size: 119 bytes, params: 2, frame: 14
var r0;
if (a0.items.length === 0) {
return null;
}
const property = a0.items[0];
var value;
if (isAvatarDecorationRecord(property)) {
value = require(1423) /* metro dependency 1423: AvatarUtils */;
value = value.getAvatarDecorationURL({'avatarDecoration': null, 'size': 40, 'canAnimate': true,
avatarDecoration: {asset: property.asset}});
r0 = value;
} else {
r0 = null;
}
return r0;
}
function getProfileEffectPreviewUrl(a0) { // fn#102074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13605:1191, offset: 0x0222b3ec, size: 61 bytes, params: 2, frame: 11
if (a0.items.length === 0) {
return null;
}
const property = a0.items[0];
return isProfileEffectRecord(property) ? property.thumbnailPreviewSrc : null;
}
function getPurchaseDisplayInfo(a0, a1) { // fn#102076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13605:1415, offset: 0x0222b45f, size: 108 bytes, params: 3, frame: 16
var name;
var r2;
var r3;
var value2;
var property;
const value = a1 != null;
if (a0 != null) {
name = a0.name;
r2 = getCollectibleTypeName(a0.type);
r3 = name;
} else {
value2 = undefined;
if (value) {
if (a1 != null) {
property = SubscriptionPlanInfo[a1];
name = property == null ? value2 : property.name;
r2 = value2;
r3 = name;
} else {
r2 = value2;
r3 = value2;
}
} else {
r2 = value2;
r3 = value2;
}
}
return {displayName: r3, typeName: r2, isSubscription: value};
}
@@ -0,0 +1,28 @@
/* Metro module 13876; source: modules/parent_tools/FamilyCenterAgeGroupPrefetch.tsx; dependencies: [5116, 5118, 2] */
function _fun105502(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#105502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14073:6, offset: 0x022bb0eb, size: 114 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterAgeGroupPrefetch.tsx');
exports.prefetchFamilyCenterAgeGroupWhen = prefetchFamilyCenterAgeGroupWhen;
}
function prefetchFamilyCenterAgeGroupWhen(a0) { // fn#105503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14073:228, offset: 0x022bb15d, size: 105 bytes, params: 2, frame: 11
var r0;
let value = a0;
if (value) {
value = FamilyCenterStore.getAgeGroup();
value = value == null;
r0 = value;
} else {
r0 = value;
}
if (r0) {
if (!FamilyCenterStore.isLoading()) {
if (FamilyCenterStore.canRefetch()) {
(importDefault(5118) /* metro dependency 5118: FamilyCenterActionCreators */).initialPageLoad();
}
}
}
}
@@ -0,0 +1,11 @@
/* Metro module 12632; source: modules/parent_tools/FamilyCenterConnectionPrereqExperiment.tsx; dependencies: [1854, 2] */
function _fun96906(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12822:6, offset: 0x0216b761, size: 145 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'name': '2026-06-family-center-connection-prereq', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterConnectionPrereqExperiment.tsx');
exports.FamilyCenterConnectionPrereqExperiment = value;
}
@@ -0,0 +1,386 @@
/* Metro module 5117; source: modules/parent_tools/FamilyCenterConstants.tsx; dependencies: [672, 484, 1244, 2224, 2] */
function _fun44769(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:6, offset: 0x01178468, size: 2170 bytes, params: 8, frame: 42
var object5;
const env0_0 = require;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const SECOND = Millis.SECOND;
const value = 30 * SECOND;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let MINUTE = Millis.MINUTE;
const value2 = 5 * MINUTE;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
MINUTE = Millis.MINUTE;
const value3 = 5 * MINUTE;
const pathUtilsModule = require(484) /* metro dependency 484: PathUtils */;
const wrapPaths = pathUtilsModule.wrapPaths;
Object = global.Object;
const value6 = Reflect.apply(wrapPaths, pathUtilsModule,
[Object.freeze({'FAMILY_CENTER_SETTINGS': '/family-center/settings',
'FAMILY_CENTER_MY_FAMILY': '/family-center/my-family'}), [':', '?', '@']]);
object5 = {DM_MESSAGE_SEND: 1};
object5[1] = 'DM_MESSAGE_SEND';
object5.GDM_MESSAGE_SEND = 2;
object5[2] = 'GDM_MESSAGE_SEND';
object5.MESSAGE_REACT = 3;
object5[3] = 'MESSAGE_REACT';
object5.ADD_FRIEND = 4;
object5[4] = 'ADD_FRIEND';
object5.SEND_CALL = 5;
object5[5] = 'SEND_CALL';
object5.CALL_JOIN = 6;
object5[6] = 'CALL_JOIN';
object5.GUILD_JOIN = 7;
object5[7] = 'GUILD_JOIN';
object5.GUILD_MESSAGE_SEND = 8;
object5[8] = 'GUILD_MESSAGE_SEND';
object5.GUILD_VC_JOIN = 9;
object5[9] = 'GUILD_VC_JOIN';
object5.GUILD_VOICE_CHANNEL_LEAVE = 10;
object5[10] = 'GUILD_VOICE_CHANNEL_LEAVE';
object5.CALL_LEAVE = 11;
object5[11] = 'CALL_LEAVE';
object5.CALL_START = 12;
object5[12] = 'CALL_START';
object5.INVOICE_COMPLETE = 13;
object5[13] = 'INVOICE_COMPLETE';
const object7 = {PARENT: 1};
object7[1] = 'PARENT';
object7.CHILD = 2;
object7[2] = 'CHILD';
const object10 = {PENDING: 1};
object10[1] = 'PENDING';
object10.ACTIVE = 2;
object10[2] = 'ACTIVE';
object10.INACTIVE = 3;
object10[3] = 'INACTIVE';
object10.DECLINED = 4;
object10[4] = 'DECLINED';
object10.EXPIRED = 5;
object10[5] = 'EXPIRED';
const object11 = {USER_ADD: 1};
object11[1] = 'USER_ADD';
object11.GUILD_ADD = 2;
object11[2] = 'GUILD_ADD';
object11.USER_INTERACTION = 3;
object11[3] = 'USER_INTERACTION';
object11.GUILD_INTERACTION = 4;
object11[4] = 'GUILD_INTERACTION';
object11.USER_CALLED = 5;
object11[5] = 'USER_CALLED';
object11.TOTAL_VOICE_MINUTES = 6;
object11[6] = 'TOTAL_VOICE_MINUTES';
object11.PURCHASES = 7;
object11[7] = 'PURCHASES';
object11.GIFTS = 8;
object11[8] = 'GIFTS';
const object12 = {ACTIVITY: 0};
object12[0] = 'ACTIVITY';
object12.REQUESTS = 1;
object12[1] = 'REQUESTS';
object12.SETTINGS = 2;
object12[2] = 'SETTINGS';
object12.CONTENT_AND_SOCIAL = 3;
object12[3] = 'CONTENT_AND_SOCIAL';
object12.DATA_AND_PRIVACY = 4;
object12[4] = 'DATA_AND_PRIVACY';
object12.SCREEN_TIME_CONTROLS = 5;
object12[5] = 'SCREEN_TIME_CONTROLS';
const object13 = {SIDENAV: 0};
object13[0] = 'SIDENAV';
object13.SETTINGS = 1;
object13[1] = 'SETTINGS';
const object14 = {TabChange: 0};
object14[0] = 'TabChange';
object14.ShowQRCodeModal = 1;
object14[1] = 'ShowQRCodeModal';
object14.RevealQRCode = 2;
object14[2] = 'RevealQRCode';
object14.ScanQRCodeButton = 3;
object14[3] = 'ScanQRCodeButton';
object14.ScanQRCode = 4;
object14[4] = 'ScanQRCode';
object14.LoadMore = 5;
object14[5] = 'LoadMore';
object14.SelectTeen = 6;
object14[6] = 'SelectTeen';
object14.HideQRCode = 7;
object14[7] = 'HideQRCode';
object14.NufConsentGateLinkCodeError = 8;
object14[8] = 'NufConsentGateLinkCodeError';
const Map = global.Map;
const USER_INTERACTION = object11.USER_INTERACTION;
const USER_CALLED = object11.USER_CALLED;
const USER_ADD = object11.USER_ADD;
const GUILD_ADD = object11.GUILD_ADD;
const GUILD_INTERACTION = object11.GUILD_INTERACTION;
const TOTAL_VOICE_MINUTES = object11.TOTAL_VOICE_MINUTES;
const PURCHASES = object11.PURCHASES;
const GIFTS = object11.GIFTS;
const map = new Map([[USER_INTERACTION, {priority: 100, tooltipHeader: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).kvTgWP);
}, tooltipDescription: tooltipDescription, sectionHeader: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(importDefault(dependencyMap[3])['4T3zWT'],
{count: a0});
}, sectionDescription: sectionDescription, timestampFormatter: timestampFormatter}], [USER_CALLED, {priority: 200,
tooltipHeader: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).D7Sngz);
}, tooltipDescription: tooltipDescription_44776, sectionHeader: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(importDefault(dependencyMap[3])['0GE4Ni'],
{count: a0});
}, sectionDescription: sectionDescription_44778, timestampFormatter: timestampFormatter_44779}], [USER_ADD,
{priority: 300, tooltipHeader: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).kIcKAj);
}, tooltipDescription: tooltipDescription_44781, sectionHeader: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(importDefault(dependencyMap[3])['TEvo+H'],
{count: a0});
}, sectionDescription: sectionDescription_44783, timestampFormatter: timestampFormatter_44784}], [GUILD_ADD,
{priority: 400, tooltipHeader: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).uav9Bh);
}, tooltipDescription: tooltipDescription_44786, sectionHeader: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(importDefault(dependencyMap[3])['7feG7T'],
{count: a0});
}, sectionDescription: sectionDescription_44788}], [GUILD_INTERACTION, {priority: 500, tooltipHeader: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).CcrbCw);
}, tooltipDescription: tooltipDescription_44790, sectionHeader: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(importDefault(dependencyMap[3]).rcPInc, {count: a0});
}, sectionDescription: sectionDescription_44792}], [TOTAL_VOICE_MINUTES, {priority: 175, tooltipHeader: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).eo4Fxh);
}, tooltipDescription: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3])['O/AElu']);
}, sectionHeader: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(importDefault(dependencyMap[3]).eGFWUd, {count: a0});
}, sectionDescription: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3])['O/AElu']);
}}], [PURCHASES, {priority: 150, tooltipHeader: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).NMYKsh);
}, tooltipDescription: tooltipDescription_44798, sectionHeader: function(a0) {
var intl = require(dependencyMap[2]).intl;
var FPViWL = importDefault(dependencyMap[3]).FPViWL;
return intl.formatToPlainString(FPViWL, {amount: a0});
}, sectionDescription: sectionDescription_44800}], [GIFTS, {priority: 160, tooltipHeader: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).ULUspo);
}, tooltipDescription: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).nH8vlc);
}, sectionHeader: function(a0) {
return require(dependencyMap[2]).intl.formatToPlainString(importDefault(dependencyMap[3]).mojZZz, {count: a0});
}, sectionDescription: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).nH8vlc);
}}]]);
const object15 = {CHECK: 0};
object15[0] = 'CHECK';
object15.X = 1;
object15[1] = 'X';
const object16 = {GENERIC_ERROR: 0};
object16[0] = 'GENERIC_ERROR';
object16.INELIGIBLE_FOR_FAMILY_CENTER = 1;
object16[1] = 'INELIGIBLE_FOR_FAMILY_CENTER';
object16.PENDING_REQUEST_EXISTS = 2;
object16[2] = 'PENDING_REQUEST_EXISTS';
object16.MAX_CONNECTIONS_REACHED = 3;
object16[3] = 'MAX_CONNECTIONS_REACHED';
const object17 = {};
let INELIGIBLE_FOR_FAMILY_CENTER = object16.INELIGIBLE_FOR_FAMILY_CENTER;
object17[290000] = INELIGIBLE_FOR_FAMILY_CENTER;
let MAX_CONNECTIONS_REACHED = object16.MAX_CONNECTIONS_REACHED;
object17[290002] = MAX_CONNECTIONS_REACHED;
let PENDING_REQUEST_EXISTS = object16.PENDING_REQUEST_EXISTS;
object17[290005] = PENDING_REQUEST_EXISTS;
const object22 = {};
const GENERIC_ERROR = object16.GENERIC_ERROR;
let X = object15.X;
object22[GENERIC_ERROR] = {header: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).nGX8Co);
}, description: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).Uss2dn);
}, icon: X};
PENDING_REQUEST_EXISTS = object16.PENDING_REQUEST_EXISTS;
const CHECK = object15.CHECK;
object22[PENDING_REQUEST_EXISTS] = {header: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).tu0MRv);
}, description: description_44808, icon: CHECK};
MAX_CONNECTIONS_REACHED = object16.MAX_CONNECTIONS_REACHED;
X = object15.X;
object22[MAX_CONNECTIONS_REACHED] = {header: header_44809, description: description_44810, icon: X};
INELIGIBLE_FOR_FAMILY_CENTER = object16.INELIGIBLE_FOR_FAMILY_CENTER;
X = object15.X;
object22[INELIGIBLE_FOR_FAMILY_CENTER] = {header: function() {
return require(dependencyMap[2]).intl.string(importDefault(dependencyMap[3]).W9JLJh);
}, description: function() {
var intl = require(dependencyMap[2]).intl;
var On5iRI = importDefault(dependencyMap[3]).On5iRI;
return intl.format(On5iRI, {link: 'https://support.discord.com/hc/requests/new?ticket_form_id=360000029731'});
}, icon: X};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterConstants.tsx');
exports.RESTRICTED_HOURS_LAYER_KEY = 'RESTRICTED_HOURS_LAYER';
exports.FAMILY_CENTER_REFETCH_COOLDOWN = value;
exports.FAMILY_CENTER_AGE_VERIFICATION_RESUME_TIMEOUT = value2;
exports.MAX_PARENT_TO_TEEN_ACTIVE_CONNECTIONS = 8;
exports.MAX_TEEN_TO_PARENT_ACTIVE_CONNECTIONS = 3;
exports.FAMILY_CENTER_REQUEST_SECTION_HEIGHT = 26;
exports.FAMILY_CENTER_REQUEST_ROW_HEIGHT = 64;
exports.FAMILY_CENTER_LINK_REQUEST_REGEX = RegExp('\\/feature\\/family-center\\/my-family\\/(\\w+)\\/(\\w+)', '');
exports.FAMILY_CENTER_REQUEST_QR_CODE_URL = function(a0, a1) {
return 'https://discord.com/feature/family-center/my-family/' + a0 + '/' + a1;
};
exports.FAMILY_CENTER_ITEMS_SHOWN_INCREMENTS = 4;
exports.QR_CODE_AUTO_HIDE_TIMEOUT = value3;
exports.PLACEHOLDER_QR_CODE_URL = 'https://www.youtube.com/watch?v=dQw4w9WgXcQ';
exports.FAMILY_CENTER_SUB_ROUTES = value6;
exports.TeenActionType = object5;
exports.UserLinkType = object7;
exports.UserLinkStatus = object10;
exports.TeenActionDisplayType = object11;
exports.FamilyCenterSubPages = {ACTIVITY: 'ACTIVITY', REQUESTS: 'REQUESTS', SETTINGS: 'SETTINGS',
CONTENT_AND_SOCIAL: 'CONTENT_AND_SOCIAL', DATA_AND_PRIVACY: 'DATA_AND_PRIVACY',
SCREEN_TIME_CONTROLS: 'SCREEN_TIME_CONTROLS'};
exports.FamilyCenterSubPageAnalyticsIds = object12;
exports.FamilyCenterPageLocation = {SIDENAV: 'SIDENAV', SETTINGS: 'SETTINGS'};
exports.FamilyCenterPageLocationAnalyticsIds = object13;
exports.FamilyCenterAction = object14;
exports.ACTION_TO_TEXT = map;
exports.FamilyCenterIconType = object15;
exports.FamilyCenterFailureCode = object16;
exports.FAMILY_CENTER_ERROR_CODE_TO_FAILURE = object17;
exports.FAMILY_CENTER_LINK_REQUEST_ERROR_EXPERIENCES = object22;
exports.PENDING_LINK_REQUEST_TIMESTAMP_FORMATTER = PENDING_LINK_REQUEST_TIMESTAMP_FORMATTER;
exports.ACCEPTED_LINK_REQUEST_TIMESTAMP_FORMATTER = ACCEPTED_LINK_REQUEST_TIMESTAMP_FORMATTER;
}
function tooltipDescription(a0) { // fn#44771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:2480, offset: 0x01178d24, size: 83 bytes, params: 2, frame: 14
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const value = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
return a0 ? Reflect.apply(string, intl, [value.w4wmnb]) : Reflect.apply(string, intl, [value.foTzbd]);
}
function timestampFormatter() { // fn#44774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:2751, offset: 0x01178dc3, size: 141 bytes, params: 1, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.today = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).fLBUx7);
object2.yesterday = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).cHHgxI);
object2.days = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).qvKjp8;
return object2;
}
function tooltipDescription_44776(a0) { // fn#44776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:2971, offset: 0x01178e92, size: 83 bytes, params: 2, frame: 14
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const value = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
return a0 ? Reflect.apply(string, intl, [value.aiAhnQ]) : Reflect.apply(string, intl, [value['4ufgdz']]);
}
function timestampFormatter_44779() { // fn#44779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:3248, offset: 0x01178f31, size: 141 bytes, params: 1, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const IHd5cZ = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).IHd5cZ;
object2.today = Reflect.apply(string, intl, [IHd5cZ]);
object2.yesterday = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).wOsfxv);
object2.days = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).oCk8c4;
return object2;
}
function tooltipDescription_44781(a0) { // fn#44781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:3465, offset: 0x01179000, size: 83 bytes, params: 2, frame: 14
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const value = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
return a0 ? Reflect.apply(string, intl, [value.BkVb1X]) : Reflect.apply(string, intl, [value.mpHHfa]);
}
function timestampFormatter_44784() { // fn#44784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:3736, offset: 0x0117909f, size: 141 bytes, params: 1, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const JUHIYZ = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).JUHIYZ;
object2.today = Reflect.apply(string, intl, [JUHIYZ]);
string = intl.string;
const GiswUW = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).GiswUW;
object2.yesterday = Reflect.apply(string, intl, [GiswUW]);
object2.days = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['fwQgE/'];
return object2;
}
function tooltipDescription_44786(a0) { // fn#44786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:3957, offset: 0x0117916e, size: 83 bytes, params: 2, frame: 14
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const value = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
return a0 ? Reflect.apply(string, intl, [value.LVNgTD]) : Reflect.apply(string, intl, [value.TA8GFt]);
}
function tooltipDescription_44790(a0) { // fn#44790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:4319, offset: 0x0117924f, size: 83 bytes, params: 2, frame: 14
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const value = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
return a0 ? Reflect.apply(string, intl, [value.BLgIrk]) : Reflect.apply(string, intl, [value.sSJauZ]);
}
function tooltipDescription_44798(a0) { // fn#44798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:4963, offset: 0x011793fe, size: 83 bytes, params: 2, frame: 14
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const value = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
return a0 ? Reflect.apply(string, intl, [value.cqIdqZ]) : Reflect.apply(string, intl, [value['85PtWu']]);
}
function description_44808({email}) { // fn#44808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:6125, offset: 0x01179632, size: 155 bytes, params: 2, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return email != null ? intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).xNEkdx,
{email: email}) : intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Xyjnwn);
}
function header_44809({isAdult}) { // fn#44809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:6291, offset: 0x011796cd, size: 93 bytes, params: 2, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const familyCenterMessages = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
return isAdult ? Reflect.apply(string, intl, [familyCenterMessages.bS5x94]) : Reflect.apply(string, intl,
[familyCenterMessages.MzX4RP]);
}
function description_44810({isAdult}) { // fn#44810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:6392, offset: 0x0117972a, size: 121 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const familyCenterMessages = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
return isAdult ? Reflect.apply(format, intl, [familyCenterMessages.GKzqWi,
{link: 'https://support.discord.com/hc/articles/14155043715735'}]) : Reflect.apply(format, intl,
[familyCenterMessages['69F+eS'], {link: 'https://support.discord.com/hc/articles/14155060633623'}]);
}
function PENDING_LINK_REQUEST_TIMESTAMP_FORMATTER() { // fn#44814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:8035, offset: 0x0117985b, size: 207 bytes, params: 1, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const CJdoee = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).CJdoee;
object2.seconds = Reflect.apply(string, intl, [CJdoee]);
const InzMn3 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).InzMn3;
object2.minutes = InzMn3;
const ErkYCI = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).ErkYCI;
object2.hours = ErkYCI;
string = intl.string;
const GvfssA = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).GvfssA;
object2.yesterday = Reflect.apply(string, intl, [GvfssA]);
object2.days = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).pWig18;
const MP3khg = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).MP3khg;
object2.date = MP3khg;
return object2;
}
function ACCEPTED_LINK_REQUEST_TIMESTAMP_FORMATTER() { // fn#44815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5295:8261, offset: 0x0117992a, size: 207 bytes, params: 1, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Bqsamd = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Bqsamd;
object2.seconds = Reflect.apply(string, intl, [Bqsamd]);
object2.minutes = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).kX3wJg;
const J18GbG = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).J18GbG;
object2.hours = J18GbG;
string = intl.string;
const Ln9zMn = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Ln9zMn;
object2.yesterday = Reflect.apply(string, intl, [Ln9zMn]);
const WRtySz = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).WRtySz;
object2.days = WRtySz;
const Y3ZYtM = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Y3ZYtM;
object2.date = Y3ZYtM;
return object2;
}
@@ -0,0 +1,107 @@
/* Metro module 5119; source: modules/parent_tools/FamilyCenterControlledSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1350, 1314, 566, 694, 2] */
function _fun44876(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:6, offset: 0x0117afe8, size: 333 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let env0_8 = {};
let env0_9 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun44880(Store);
value.displayName = 'FamilyCenterControlledSettingsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{FAMILY_CENTER_TEEN_SETTINGS_FETCH_START: function() {
env0_7 = true;
}, FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS: FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS,
FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS: FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS,
FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS: FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS, LOGOUT: function() {
env0_8 = {};
env0_9 = {};
env0_7 = false;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterControlledSettingsStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_44877() { // fn#44877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:148, offset: 0x0117b135, 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_44877_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun44880(a0) { // fn#44880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:366, offset: 0x0117b193, size: 189 bytes, params: 2, frame: 16
const closure = FamilyCenterControlledSettingsStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getSettings', value: value_44882}, {key: 'getControlledSettings',
value: value_44883}, {key: 'hasSettingsForUser', value: value_44884}, {key: 'getConsents', value: value_44885},
{key: 'hasConsented', value: value_44886}, {key: 'isLoading', get: get_44887}]);
}
function FAMILY_CENTER_TEEN_SETTINGS_AND_CONSENTS_FETCH_SUCCESS({userId, settings, consents}) { // fn#44889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1367, offset: 0x0117b2af, size: 98 bytes, params: 2, frame: 16
var value;
var binding;
if (settings != null) {
binding = env0_8;
value = require(1350) /* metro dependency 1350: UserSettingsUtils */;
binding[userId] = value.b64ToPreloadedUserSettingsProto(settings);
}
if (consents != null) {
env0_9[userId] = consents;
}
}
function FAMILY_CENTER_TEEN_CONSENTS_UPDATE_SUCCESS({userId, consents}) { // fn#44890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1578, offset: 0x0117b311, size: 29 bytes, params: 2, frame: 3
env0_9[userId] = consents;
}
function FAMILY_CENTER_TEEN_UPDATE_SETTINGS_SUCCESS({userId, settings}) { // fn#44891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1693, offset: 0x0117b32e, size: 108 bytes, params: 2, frame: 20
const value2 = (require(1350) /* metro dependency 1350: UserSettingsUtils */).b64ToPreloadedUserSettingsProto(settings);
const binding = env0_8;
const userSettingsUtilsModule = require(1350) /* metro dependency 1350: UserSettingsUtils */;
const mergeTopLevelFields = userSettingsUtilsModule.mergeTopLevelFields;
const PreloadedUserSettings = (require(1314) /* metro dependency 1314: preloaded_user_settings */).PreloadedUserSettings;
binding[userId] = Reflect.apply(mergeTopLevelFields, userSettingsUtilsModule, [PreloadedUserSettings,
env0_8[userId], value2]);
}
function value_44884(a0) { // fn#44884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:891, offset: 0x0117b250, size: 22 bytes, params: 2, frame: 2
return env1_8[a0] != null;
}
function value_44886(a0, a1) { // fn#44886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5297:1000, offset: 0x0117b266, size: 60 bytes, params: 3, frame: 5
if (a0 == null) {
return false;
}
const value = environment.__proto__;
const property = env1_9[a0];
return property != null && (property[a1] != null && property[a1].consented);
}
@@ -0,0 +1,79 @@
/* Metro module 13351; source: modules/parent_tools/FamilyCenterControlledSettingsUtils.tsx; dependencies: [1314, 13348, 4844, 4842, 2] */
function _fun101675(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:6, offset: 0x0221baf5, size: 177 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const closure = isSetAndNotDefault;
const closure2 = getGoreContentSettingOrDefault_101677;
const closure3 = resolveExplicitContentSettingWithDefaultsForTeen;
const closure4 = getExplicitContentSettingOrDefault_101679;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterControlledSettingsUtils.tsx');
exports.isSetAndNotDefault = closure;
exports.getGoreContentSettingOrDefault = closure2;
exports.updateGoreContentSetting = updateGoreContentSetting_101680;
exports.resolveExplicitContentSettingWithDefaultsForTeen = closure3;
exports.getExplicitContentSettingOrDefault = closure4;
exports.updateExplicitContentSetting = updateExplicitContentSetting_101681;
}
function isSetAndNotDefault(a0) { // fn#101676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:115, offset: 0x0221bba6, size: 54 bytes, params: 2, frame: 13
return a0 != null && a0 !== (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction.UNSET_EXPLICIT_CONTENT_REDACTION;
}
function getGoreContentSettingOrDefault_101677(a0) { // fn#101677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:228, offset: 0x0221bbdc, size: 224 bytes, params: 2, frame: 17
const ParentalControlledGoreContent = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledGoreContent;
const {goreContentNonFriendDm, goreContentFriendDm} = ParentalControlledGoreContent.getControlledSetting(a0) ?? ({});
const object2 = {};
object2.goreContentNonFriendDm = isSetAndNotDefault(goreContentNonFriendDm) ? goreContentNonFriendDm : (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaultsForTeen({isDm: true});
object2.goreContentFriendDm = isSetAndNotDefault(goreContentFriendDm) ? goreContentFriendDm : (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaultsForTeen({'isDm': true,
'isFriend': true});
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
const BLUR = ExplicitContentRedaction.BLUR;
object2.goreContentGuilds = BLUR;
return object2;
}
function resolveExplicitContentSettingWithDefaultsForTeen({teenId, setting, isFriend}) { // fn#101678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:697, offset: 0x0221bcbc, size: 130 bytes, params: 2, frame: 16
isFriend = !(isFriend === undefined) && isFriend;
if (isSetAndNotDefault(setting)) {
return setting;
}
const ParentalControlledLegacyExplicitContent = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledLegacyExplicitContent;
const controlledSetting = ParentalControlledLegacyExplicitContent.getControlledSetting(teenId);
const value = require(4842) /* metro dependency 4842: SensitiveMediaExplicitRedactionSettingsUtils */;
return isFriend ? value.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_FRIEND_DM[controlledSetting] : value.TEEN_EXPLICIT_CONTENT_FILTER_TO_EXPLICIT_CONTENT_REDACTION_NON_FRIEND_DM[controlledSetting];
}
function getExplicitContentSettingOrDefault_101679(a0) { // fn#101679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:1057, offset: 0x0221bd3e, size: 176 bytes, params: 2, frame: 18
const value2 = undefined;
const ParentalControlledExplicitContent = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledExplicitContent;
const controlledSetting = ParentalControlledExplicitContent.getControlledSetting(a0);
const object2 = {};
object2.explicitContentNonFriendDm = resolveExplicitContentSettingWithDefaultsForTeen({teenId: a0,
setting: controlledSetting == null ? value2 : controlledSetting.explicitContentNonFriendDm});
object2.explicitContentFriendDm = resolveExplicitContentSettingWithDefaultsForTeen({teenId: a0,
setting: controlledSetting == null ? value2 : controlledSetting.explicitContentFriendDm, isFriend: true});
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
const BLUR = ExplicitContentRedaction.BLUR;
object2.explicitContentGuilds = BLUR;
return object2;
}
function updateGoreContentSetting_101680(a0, a1) { // fn#101680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:1713, offset: 0x0221bdee, size: 76 bytes, params: 3, frame: 15
const goreContentSettingOrDefault_101677 = getGoreContentSettingOrDefault_101677(a0);
const ParentalControlledGoreContent = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledGoreContent;
const updateControlledSetting = ParentalControlledGoreContent.updateControlledSetting;
const object2 = {};
copyDataProperties(object2, a1, copyDataProperties(object2, goreContentSettingOrDefault_101677, undefined));
Reflect.apply(updateControlledSetting, ParentalControlledGoreContent, [a0, object2]);
}
function updateExplicitContentSetting_101681(a0, a1) { // fn#101681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13541:2042, offset: 0x0221be3a, size: 76 bytes, params: 3, frame: 15
const explicitContentSettingOrDefault_101679 = getExplicitContentSettingOrDefault_101679(a0);
const ParentalControlledExplicitContent = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledExplicitContent;
const updateControlledSetting = ParentalControlledExplicitContent.updateControlledSetting;
const object2 = {};
copyDataProperties(object2, a1, copyDataProperties(object2, explicitContentSettingOrDefault_101679, undefined));
Reflect.apply(updateControlledSetting, ParentalControlledExplicitContent, [a0, object2]);
}
@@ -0,0 +1,103 @@
/* Metro module 12623; source: modules/parent_tools/FamilyCenterModalRequestRouting.tsx; dependencies: [5, 5117, 5118, 2] */
function _fun96855(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12813:6, offset: 0x02169c17, size: 238 bytes, params: 8, frame: 21
var object2;
const closure = getConnectionPrereqTarget;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const FamilyCenterFailureCode = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).FamilyCenterFailureCode;
Object = global.Object;
const value = Object.freeze({'PREREQ_LOADING': 'PREREQ_LOADING', 'CONFIRM_AGE': 'CONFIRM_AGE',
'VERIFYING': 'VERIFYING', 'REQUEST': 'REQUEST', 'SENT': 'SENT', 'ERROR': 'ERROR',
'INVALID_CODE': 'INVALID_CODE', 'MUST_BE_ADULT': 'MUST_BE_ADULT', 'TEEN_SCAN': 'TEEN_SCAN'});
object2 = {};
const ERROR = value.ERROR;
object2.section = ERROR;
const GENERIC_ERROR = FamilyCenterFailureCode.GENERIC_ERROR;
object2.params = {failureCode: GENERIC_ERROR};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterModalRequestRouting.tsx');
exports.FamilyCenterModalRequestSections = value;
exports.getConnectionPrereqTarget = closure;
exports.resolveConnectionPrereqTarget = function() {
return _resolveConnectionPrereqTarget.apply(this, arguments);
};
}
function getConnectionPrereqTarget(a0) { // fn#96856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12813:420, offset: 0x02169d05, size: 179 bytes, params: 2, frame: 4
return 'ready' in a0 ? {section: env0_3.REQUEST,
params: {teenIdentity: a0.teen_identity}} : 'invalid_link_code' in a0 ? {section: env0_3.INVALID_CODE} : 'verified_teen_blocked' in a0 ? {section: env0_3.MUST_BE_ADULT} : 'requires_adult_verification' in a0 ? {section: env0_3.CONFIRM_AGE} : env0_4;
}
function _resolveConnectionPrereqTarget() { // fn#96857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12813:697, offset: 0x02169db8, size: 50 bytes, params: 1, frame: 14
return env0_2(_fun96859).apply(this, arguments);
}
function* _fun96859(a0, a1) { // fn#96859, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12813:780, offset: 0x02169df5, size: 90 bytes, params: 3, frame: 16
var binding;
var binding2;
var binding3;
var property;
var value3;
var getConnectionPrerequisites;
var value4;
var value5;
var value6;
var value7;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_5;
} catch (error) {
return env2_4;
}
try {
binding2 = env2_0;
} catch (error) {
return env2_4;
}
try {
binding3 = env2_1;
} catch (error) {
return env2_4;
}
try {
property = binding3[2];
} catch (error) {
return env2_4;
}
try {
value3 = binding2(property);
} catch (error) {
return env2_4;
}
try {
getConnectionPrerequisites = value3.getConnectionPrerequisites;
} catch (error) {
return env2_4;
}
try {
value4 = Reflect.apply(getConnectionPrerequisites, value3, [a0, a1]);
} catch (error) {
return env2_4;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
return env2_4;
}
if (value6) {
return value5;
}
try {
value7 = binding(value5);
} catch (error) {
return env2_4;
}
return value7;
}
@@ -0,0 +1,672 @@
/* Metro module 1898; source: modules/parent_tools/FamilyCenterModels.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 1895, 2] */
function _fun20821(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:6, offset: 0x00edcba7, size: 713 bytes, params: 8, frame: 28
const env0_0 = require;
const _arrayLikeToArray_20824 = 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 timeOfDayToMinutes = function(a0) {
return 60 * a0.hours + a0.minutes;
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(1886) /* metro dependency 1886: Record */;
Object = global.Object;
let freeze = Object.freeze;
const DayOfWeek = (require(1895) /* metro dependency 1895: user */).DayOfWeek;
let SUNDAY = DayOfWeek.SUNDAY;
let MONDAY = DayOfWeek.MONDAY;
let TUESDAY = DayOfWeek.TUESDAY;
let WEDNESDAY = DayOfWeek.WEDNESDAY;
let THURSDAY = DayOfWeek.THURSDAY;
let FRIDAY = DayOfWeek.FRIDAY;
let SATURDAY = DayOfWeek.SATURDAY;
let value2 = Reflect.apply(freeze, Object, [{[0]: SUNDAY, [1]: MONDAY, [2]: TUESDAY, [3]: WEDNESDAY, [4]: THURSDAY,
[5]: FRIDAY, [6]: SATURDAY}]);
Object = global.Object;
freeze = Object.freeze;
const DAY_OF_WEEK_UNSPECIFIED = DayOfWeek.DAY_OF_WEEK_UNSPECIFIED;
MONDAY = DayOfWeek.MONDAY;
TUESDAY = DayOfWeek.TUESDAY;
WEDNESDAY = DayOfWeek.WEDNESDAY;
THURSDAY = DayOfWeek.THURSDAY;
FRIDAY = DayOfWeek.FRIDAY;
SATURDAY = DayOfWeek.SATURDAY;
SUNDAY = DayOfWeek.SUNDAY;
const env0_8 = Reflect.apply(freeze, Object, [{[DAY_OF_WEEK_UNSPECIFIED]: 0, [MONDAY]: 1, [TUESDAY]: 2,
[WEDNESDAY]: 3, [THURSDAY]: 4, [FRIDAY]: 5, [SATURDAY]: 6, [SUNDAY]: 0}]);
let value3 = _fun20830(value);
value = _fun20837(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterModels.tsx');
exports.JS_DAY_TO_DAY_OF_WEEK = value2;
exports.ScheduleRuleRecord = value3;
exports.RestrictedScheduleRecord = value;
exports.ensureRestrictedScheduleRecord = ensureRestrictedScheduleRecord;
}
function _createForOfIteratorHelperLoose_20822(a0, a1) { // fn#20822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:160, offset: 0x00edce70, 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 _fun20823;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_20824(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_20824(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_20824(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun20823;
}
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 _callSuper_20825(a0, a1, a2) { // fn#20825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:1070, offset: 0x00edcfe2, size: 94 bytes, params: 4, frame: 20
const value2 = env0_5(a1);
return env0_4(a0, _isNativeReflectConstruct_20826() ? global.Reflect.construct(value2, [],
env0_5(a0).constructor) : value2.apply(a0, undefined));
}
function _isNativeReflectConstruct_20826() { // fn#20826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:1201, offset: 0x00edd040, 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_20826_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun20830(a0) { // fn#20830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:1970, offset: 0x00edd0ba, size: 167 bytes, params: 2, frame: 18
const closure = ScheduleRuleRecord;
env0_6(closure, a0);
return env0_3(closure, [{key: 'isActiveAt', value: value_20832}, {key: 'getEndMinutes', value: value_20833},
{key: 'getStartMinutes', value: value_20834}], [{key: 'fromServer', value: value_20835}, {key: 'fromCache',
value: value_20836}]);
}
function _fun20837(a0) { // fn#20837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:3217, offset: 0x00edd3bf, size: 169 bytes, params: 2, frame: 18
const closure = RestrictedScheduleRecord;
env0_6(closure, a0);
return env0_3(closure, [{key: 'isInRestrictedHours', value: value_20839}, {key: 'getNextStartInfo',
value: value_20841}, {key: 'getNextEndTime', value: value_20843}], [{key: 'fromServer', value: value_20845},
{key: 'fromCache', value: value_20846}]);
}
function ensureRestrictedScheduleRecord(a0) { // fn#20847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:5053, offset: 0x00edd939, size: 146 bytes, params: 2, frame: 15
var r2;
var r1;
var r0;
var value4;
var binding;
let value = a0;
const value2 = null;
if (value2 == value) {
r0 = value2;
} else {
if (value instanceof env0_10) {
r1 = value;
} else {
if (value.rules.length === 0) {
r2 = new env0_10({rules: []});
} else {
value4 = 'ruleId' in value.rules[0];
binding = env0_10;
if (value4) {
value = binding.fromCache(value);
r2 = value;
} else {
value = binding.fromServer(value);
r2 = value;
}
}
r1 = r2;
}
r0 = r1;
}
return r0;
}
function ScheduleRuleRecord({ruleId, label, startTime, endTime, days, enabled}) { // fn#20831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:1982, offset: 0x00edd161, size: 110 bytes, params: 2, frame: 15
let value = environment.__proto__;
env1_2(this, ScheduleRuleRecord);
value = _callSuper_20825(this, ScheduleRuleRecord);
value.ruleId = ruleId;
value.label = label;
value.startTime = startTime;
value.endTime = endTime;
value.days = days;
value.enabled = enabled;
return value;
}
function value_20832(a0, a1) { // fn#20832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:2282, offset: 0x00edd1cf, size: 257 bytes, params: 3, frame: 18
var r4;
var value;
var timeOfDayToMinutesBinding;
var value2;
var value3;
var value4;
const DayOfWeek = (require(1895) /* metro dependency 1895: user */).DayOfWeek;
if (this.startTime != null) {
if (this.endTime == null) {
return false;
}
var days = this.days;
if (days.length === 0) {
return false;
}
if (this.enabled) {
value = environment.__proto__;
timeOfDayToMinutesBinding = timeOfDayToMinutes;
value2 = timeOfDayToMinutesBinding(this.startTime);
value3 = timeOfDayToMinutesBinding(this.endTime);
value4 = value2 > value3;
days = this.days;
if (days.includes(a0)) {
if (value4) {
if (a1 >= value2) {
return true;
}
if (value4) {
r4 = a0 === DayOfWeek.MONDAY ? DayOfWeek.SUNDAY : a0 - 1;
days = this.days;
if (days.includes(r4)) {
if (a1 < value3) {
return true;
}
return false;
}
return false;
}
return false;
}
if (a1 >= value2) {
if (a1 < value3) {
return true;
}
if (value4) {
r4 = a0 === DayOfWeek.MONDAY ? DayOfWeek.SUNDAY : a0 - 1;
days = this.days;
if (days.includes(r4)) {
if (a1 < value3) {
return true;
}
return false;
}
return false;
}
return false;
}
if (value4) {
r4 = a0 === DayOfWeek.MONDAY ? DayOfWeek.SUNDAY : a0 - 1;
days = this.days;
if (days.includes(r4)) {
if (a1 < value3) {
return true;
}
return false;
}
return false;
}
return false;
}
if (value4) {
r4 = a0 === DayOfWeek.MONDAY ? DayOfWeek.SUNDAY : a0 - 1;
days = this.days;
if (days.includes(r4)) {
if (a1 < value3) {
return true;
}
return false;
}
return false;
}
return false;
}
}
return false;
}
function value_20833() { // fn#20833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:2730, offset: 0x00edd2d0, size: 40 bytes, params: 1, frame: 12
var r0;
const endTime = this.endTime;
let value = null;
if (value == endTime) {
r0 = value;
} else {
value = environment.__proto__;
value = timeOfDayToMinutes(this.endTime);
r0 = value;
}
return r0;
}
function value_20834() { // fn#20834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:2836, offset: 0x00edd2f8, size: 40 bytes, params: 1, frame: 12
var r0;
const startTime = this.startTime;
let value = null;
if (value == startTime) {
r0 = value;
} else {
value = environment.__proto__;
value = timeOfDayToMinutes(this.startTime);
r0 = value;
}
return r0;
}
function value_20835({rule_id, label, start_time, end_time, days, enabled}) { // fn#20835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:2943, offset: 0x00edd320, size: 127 bytes, params: 2, frame: 16
const object2 = {};
object2.ruleId = rule_id;
object2.label = label;
let value = undefined;
object2.startTime = start_time ?? value;
object2.endTime = end_time ?? value;
object2.days = days;
object2.enabled = enabled;
value = Object.create(ScheduleRuleRecord.prototype, {constructor: {value: ScheduleRuleRecord}});
const scheduleRuleRecord = new ScheduleRuleRecord(object2);
return scheduleRuleRecord instanceof Object ? scheduleRuleRecord : value;
}
function RestrictedScheduleRecord({rules}) { // fn#20838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:3229, offset: 0x00edd468, size: 52 bytes, params: 2, frame: 14
let value = environment.__proto__;
env1_2(this, RestrictedScheduleRecord);
value = _callSuper_20825(this, RestrictedScheduleRecord);
value.rules = rules;
return value;
}
function value_20839() { // fn#20839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:3472, offset: 0x00edd49c, size: 155 bytes, params: 1, frame: 14
var environment;
let value = a0;
const r4 = value !== undefined ? value : new global.Date();
if (this.rules.length === 0) {
return false;
}
value = environment.__proto__;
const binding = env1_7;
const getDay = r4.getDay;
const env0_0 = binding[Reflect.apply(getDay, r4, [])];
value = r4.getHours();
value = 60 * value;
const getMinutes = r4.getMinutes;
const env0_1 = value + Reflect.apply(getMinutes, r4, []);
return this.rules.some(_fun20840);
}
function value_20841() { // fn#20841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:3659, offset: 0x00edd553, size: 477 bytes, params: 1, frame: 40
var r6;
var r7;
var r23;
var r24;
var r1;
var r29;
var r18;
var r0;
var value10;
var startMinutes;
var days;
var value12;
var value13;
var value14;
var value15;
var value16;
var value17;
var value18;
var value19;
var minutesUntil;
var value20;
var value21;
var value22;
let value = a0;
const r3 = value !== undefined ? value : new global.Date();
let rules = this.rules;
let length = rules.length;
if (length === 0) {
return null;
}
if (this.isInRestrictedHours(r3)) {
return null;
}
value = r3.getDay();
const value3 = 60 * r3.getHours();
const getMinutes = r3.getMinutes;
const value4 = value3 + Reflect.apply(getMinutes, r3, []);
let _createForOfIteratorHelperLoose_20822Binding = _createForOfIteratorHelperLoose_20822;
rules = this.rules;
const value6 = _createForOfIteratorHelperLoose_20822Binding(rules.filter(function(a0) {
return a0.enabled;
}));
const value7 = value6();
let done = value7.done;
const value8 = null;
const value9 = 7;
if (done) {
r0 = value8;
} else {
r6 = value8;
r7 = value7;
while (true) {
value10 = r7.value;
startMinutes = value10.getStartMinutes();
if (value8 == startMinutes) {
r18 = r6;
} else {
days = value10.days;
length = days.length;
if (length === 0) {
r18 = r6;
break;
}
_createForOfIteratorHelperLoose_20822Binding = _createForOfIteratorHelperLoose_20822;
days = value10.days;
value12 = _createForOfIteratorHelperLoose_20822Binding(days);
value13 = value12();
done = value13.done;
if (done) {
r18 = r6;
break;
}
r23 = value13;
r24 = r6;
while (true) {
value14 = r23.value;
value15 = (env1_8[value14] - value + value9) % value9;
value16 = value15 === 0;
if (value16) {
value17 = startMinutes <= value4;
r1 = value17;
} else {
r1 = value16;
}
if (r1) {
r29 = value9;
continue;
}
r29 = value15;
continue;
value18 = 24 * r29 * 60 - value4 + startMinutes;
value19 = value8 == r24;
if (value19) {
r1 = value19;
continue;
}
minutesUntil = r24.minutesUntil;
value20 = value18 < minutesUntil;
r1 = value20;
if (!r1) {
continue;
}
r24 = {minutesUntil: value18, rule: value10};
value21 = value12();
done = value21.done;
if (done) {
r18 = r24;
break;
}
r23 = value21;
continue;
}
}
value22 = value6();
done = value22.done;
if (done) {
r0 = r18;
break;
}
r6 = r18;
r7 = value22;
continue;
}
}
return r0;
}
function value_20843() { // fn#20843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:4191, offset: 0x00edd730, size: 361 bytes, params: 1, frame: 23
var environment;
var r10;
var r2;
var Date;
var prototype;
var date;
var value7;
var getEndMinutes;
var value8;
var getStartMinutes;
var value9;
var value10;
var value13;
var value14;
var setDate;
var getDate;
let value = a0;
reducibleJoin2: while (true) {
if (value !== undefined) {
r10 = value;
break reducibleJoin2;
}
Date = global.Date;
prototype = Date.prototype;
value = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value = date instanceof Object ? date : value;
r10 = value;
break reducibleJoin2;
}
var env0_0;
if (this.rules.length !== 0) {
value = environment.__proto__;
var binding = env1_7;
var getDay = r10.getDay;
env0_0 = binding[Reflect.apply(getDay, r10, [])];
var value3 = 60 * r10.getHours();
var getMinutes = r10.getMinutes;
var value4 = value3 + Reflect.apply(getMinutes, r10, []);
value = _createForOfIteratorHelperLoose_20822(this.rules.filter(_fun20844));
var value6 = value();
var done = value6.done;
if (!done) {
r2 = value6;
reducibleLoop4: while (true) {
value7 = r2.value;
getEndMinutes = value7.getEndMinutes;
value8 = Reflect.apply(getEndMinutes, value7, []);
getStartMinutes = value7.getStartMinutes;
value9 = Reflect.apply(getStartMinutes, value7, []);
if (value8 != null) {
reducibleJoin6: while (true) {
if (value9 != null) {
break reducibleLoop4;
}
break reducibleJoin6;
}
}
value10 = value();
done = value10.done;
if (done) {
return null;
}
r2 = value10;
continue reducibleLoop4;
}
value = value9 > value8;
date = new global.Date();
value13 = global.Math.floor(value8 / 60);
value14 = value8 % 60;
reducibleJoin9: while (true) {
if (value) {
value = value4 >= value9;
r2 = value;
break reducibleJoin9;
}
r2 = value;
break reducibleJoin9;
}
reducibleJoin11: while (true) {
if (r2) {
setDate = date.setDate;
getDate = date.getDate;
value = Reflect.apply(getDate, date, []);
Reflect.apply(setDate, date, [value + 1]);
break reducibleJoin11;
}
break reducibleJoin11;
}
date.setHours(value13, value14, 0, 0);
return date;
}
}
return null;
}
function value_20845(a0) { // fn#20845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:4636, offset: 0x00edd899, size: 80 bytes, params: 2, frame: 14
var r0;
var object2;
var rules;
var map;
let value = null;
if (value == a0) {
r0 = value;
} else {
object2 = {};
rules = a0.rules;
map = rules.map;
value = environment.__proto__;
object2.rules = Reflect.apply(map, rules, [env1_9.fromServer]);
r0 = new RestrictedScheduleRecord();
}
return r0;
}
function value_20846(a0) { // fn#20846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:4757, offset: 0x00edd8e9, size: 80 bytes, params: 2, frame: 14
var r0;
var object2;
var rules;
var map;
let value = null;
if (value == a0) {
r0 = value;
} else {
object2 = {};
rules = a0.rules;
map = rules.map;
value = environment.__proto__;
object2.rules = Reflect.apply(map, rules, [env1_9.fromCache]);
r0 = new RestrictedScheduleRecord();
}
return r0;
}
function _fun20840(a0) { // fn#20840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2025:3604, offset: 0x00edd537, size: 28 bytes, params: 2, frame: 13
return a0.isActiveAt(env0_0, env0_1);
}
@@ -0,0 +1,69 @@
/* Metro module 12621; source: modules/parent_tools/FamilyCenterPendingConnectionStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun96792(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12811:6, offset: 0x02167425, size: 305 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
let value = _fun96796(PersistedStore);
value.displayName = 'FamilyCenterPendingConnectionStore';
value.persistKey = 'FamilyCenterPendingConnectionStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{FAMILY_CENTER_PENDING_CONNECTION_SET: function({teenId, linkCode}) {
env0_5 = {teenId: teenId, linkCode: linkCode};
}, FAMILY_CENTER_PENDING_CONNECTION_CLEAR: function() {
env0_5 = null;
}, LOGOUT: function() {
env0_5 = null;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterPendingConnectionStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_96793() { // fn#96793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12811:148, offset: 0x02167556, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_96793_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun96796(a0) { // fn#96796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12811:358, offset: 0x021675b8, size: 124 bytes, params: 2, frame: 16
const closure = FamilyCenterPendingConnectionStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_96798}, {key: 'getState', value: value_96799},
{key: 'getPendingConnection', value: value_96800}]);
}
function value_96798(a0) { // fn#96798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12811:758, offset: 0x02167634, size: 26 bytes, params: 2, frame: 3
let value = a0;
const value2 = null;
const r1 = value2 != value ? value : value2;
value = environment.__proto__;
}
@@ -0,0 +1,375 @@
/* Metro module 10909; source: modules/parent_tools/FamilyCenterRestrictedHoursUtils.tsx; dependencies: [1895, 1244, 2224, 2] */
function _fun83587(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:6, offset: 0x01f1f5b1, size: 593 bytes, params: 8, frame: 26
let env0_0 = require;
const _arrayLikeToArray_83590 = 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 closure = formatTime_83591;
const closure2 = formatDays;
const closure3 = function(a0) {
return 60 * a0.hours + a0.minutes;
};
const closure4 = getScheduleRuleDateRange;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const DayOfWeek = (require(1895) /* metro dependency 1895: user */).DayOfWeek;
const SUNDAY = DayOfWeek.SUNDAY;
items = [SUNDAY];
const MONDAY = DayOfWeek.MONDAY;
items[1] = MONDAY;
const TUESDAY = DayOfWeek.TUESDAY;
items[2] = TUESDAY;
const WEDNESDAY = DayOfWeek.WEDNESDAY;
items[3] = WEDNESDAY;
const THURSDAY = DayOfWeek.THURSDAY;
items[4] = THURSDAY;
const FRIDAY = DayOfWeek.FRIDAY;
items[5] = FRIDAY;
const SATURDAY = DayOfWeek.SATURDAY;
items[6] = SATURDAY;
let Set = global.Set;
let set = new Set(items.slice(1, 6));
Set = global.Set;
set = new Set([items[0], items[6]]);
Set = global.Set;
set = new Set(items);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterRestrictedHoursUtils.tsx');
exports.DAYS_ORDERED = items;
exports.getShortDayLabels = getShortDayLabels;
exports.formatTime = closure;
exports.formatDays = closure2;
exports.timeToMinutes = closure3;
exports.formatDuration = formatDuration_83600;
exports.getScheduleRuleDateRange = closure4;
exports.formatRestrictedScheduleInAppSubtitle = formatRestrictedScheduleInAppSubtitle;
exports.sortRulesByStartTime = function(a0) {
return a0.slice().sort(_fun83603);
};
exports.toTimeProto = function(a0) {
return {hours: a0.hours, minutes: a0.minutes, seconds: 0, nanos: 0};
};
exports.computeOverlappingInfo = function(a0, a1, a2) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
var items = [];
items.forEach(_fun83606);
return {conflictingEntries: items};
};
}
function _createForOfIteratorHelperLoose_83588(a0, a1) { // fn#83588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:47, offset: 0x01f1f802, size: 372 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 _fun83589;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_83590(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_83590(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_83590(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun83589;
}
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 formatTime_83591({hours, minutes}) { // fn#83591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:1205, offset: 0x01f1f976, size: 148 bytes, params: 2, frame: 21
const Intl = global.Intl;
const DateTimeFormat = Intl.DateTimeFormat;
const dateTimeFormat = new DateTimeFormat((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
{'hour': 'numeric', 'minute': '2-digit'});
const format = dateTimeFormat.format;
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date(2025, 0, 1, hours, minutes);
return Reflect.apply(format, dateTimeFormat, [date instanceof Object ? date : value2]);
}
function setsEqual(a0, a1) { // fn#83592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:1431, offset: 0x01f1fa0a, size: 91 bytes, params: 3, frame: 14
var value3;
var has;
var value4;
if (a0.size === a1.size) {
var value;
value = _createForOfIteratorHelperLoose_83588(a0);
var value2 = value();
var done = value2.done;
if (done) {
return true;
}
var r1 = value2;
loopExit2: while (true) {
value3 = r1.value;
has = a1.has;
if (Reflect.apply(has, a1, [value3])) {
value4 = value();
done = value4.done;
if (done) {
return true;
}
r1 = value4;
continue;
}
break loopExit2;
}
}
return false;
}
function formatDays(a0) { // fn#83593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:1591, offset: 0x01f1fa65, size: 422 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const Set = global.Set;
const set = new Set(a0);
if (setsEqual(set, env0_6)) {
return intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).bPjqd1);
}
if (setsEqual(set, env0_4)) {
return intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['4dr9L9']);
}
if (setsEqual(set, env0_5)) {
return intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['6lTTJ+']);
}
const Intl = global.Intl;
const DateTimeFormat = Intl.DateTimeFormat;
let dateTimeFormat = new DateTimeFormat(intl.currentLocale, {weekday: 'short'});
dateTimeFormat = env0_3.map(_fun83594);
dateTimeFormat = dateTimeFormat.filter(function(a0) {
return a0 !== null;
});
return dateTimeFormat.join(', ');
}
function getScheduleRuleDateRange(a0) { // fn#83597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:2058, offset: 0x01f1fc62, size: 100 bytes, params: 2, frame: 16
var r0;
var formatTime_83591Binding;
const startTime = a0.startTime;
let value = '';
if (startTime != null) {
if (a0.endTime != null) {
formatTime_83591Binding = formatTime_83591;
value = value + formatTime_83591Binding(a0.startTime) + ' – ' + formatTime_83591Binding(a0.endTime);
r0 = value;
} else {
r0 = value;
}
} else {
r0 = value;
}
return r0;
}
function getShortDayLabels(a0) { // fn#83598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:2329, offset: 0x01f1fcc6, size: 112 bytes, params: 2, frame: 15
const Intl = global.Intl;
const DateTimeFormat = Intl.DateTimeFormat;
const dateTimeFormat = new DateTimeFormat((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
{weekday: a0});
return env0_3.map(_fun83599);
}
function formatDuration_83600(a0) { // fn#83600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:2584, offset: 0x01f1fd77, size: 146 bytes, params: 2, frame: 18
var r0;
var wcrXLM;
var object2;
let value = a0 / 60;
const Number = global.Number;
const isInteger2 = Number.isInteger(value);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const defaultImport = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
if (isInteger2) {
value = Reflect.apply(formatToPlainString, intl, [defaultImport.hFDcmZ, {hours: value}]);
r0 = value;
} else {
wcrXLM = defaultImport.wcrXLM;
object2 = {};
object2.hours = global.Math.floor(value);
value = Reflect.apply(formatToPlainString, intl, [wcrXLM, object2]);
r0 = value;
}
return r0;
}
function formatRestrictedScheduleInAppSubtitle(a0) { // fn#83601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:2878, offset: 0x01f1fe09, size: 222 bytes, params: 2, frame: 19
if (a0.startTime == null) {
return null;
}
if (a0.endTime == null) {
return null;
}
const value2 = formatDays(a0.days);
const formatTime_83591Binding = formatTime_83591;
const value3 = formatTime_83591Binding(a0.startTime);
const value4 = formatTime_83591Binding(a0.endTime);
const timeToMinutesBinding = timeToMinutes;
const r4 = timeToMinutesBinding(a0.startTime) > timeToMinutesBinding(a0.endTime) ? (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).OxveI8 : (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['ERTn+E'];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.formatToPlainString(r4, {days: value2, startTime: value3, endTime: value4});
}
function sortRulesByStartTime(a0) { // fn#83602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:3242, offset: 0x01f1fee7, size: 34 bytes, params: 2, frame: 11
return a0.slice().sort(_fun83603);
}
function computeOverlappingInfo(a0, a1, a2) { // fn#83605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:3685, offset: 0x01f1ffd7, size: 64 bytes, params: 4, frame: 12
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const items2 = [];
items2.forEach(_fun83606);
return {conflictingEntries: items2};
}
function _fun83594(a0, a1) { // fn#83594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:1917, offset: 0x01f1fc0b, size: 87 bytes, params: 3, frame: 18
var r0;
var format;
var Date;
var date;
var value;
let binding = env0_0;
if (binding.has(a0)) {
binding = env0_1;
format = binding.format;
Date = global.Date;
value = 5 + a1;
date = new Date(2025, 0);
date = Reflect.apply(format, binding, [date]);
r0 = date;
} else {
r0 = null;
}
return r0;
}
function _fun83599(a0, a1) { // fn#83599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:2444, offset: 0x01f1fd36, size: 65 bytes, params: 3, frame: 17
const binding = env0_0;
const format = binding.format;
const Date = global.Date;
const value = 5 + a1;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date(2025, 0);
return Reflect.apply(format, binding, [date instanceof Object ? date : value2]);
}
function _fun83603(a0, a1) { // fn#83603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:3298, offset: 0x01f1ff09, size: 165 bytes, params: 3, frame: 9
let startTime = a0.startTime;
const value = undefined;
const hours = startTime == null ? value : startTime.hours;
const value2 = 0;
const value3 = 60 * (hours ?? value2);
startTime = a0.startTime;
const value4 = value3 + ((startTime == null ? value : startTime.minutes) ?? value2);
startTime = a1.startTime;
const value5 = 60 * ((startTime == null ? value : startTime.hours) ?? value2);
startTime = a1.startTime;
return value4 - (value5 + ((startTime == null ? value : startTime.minutes) ?? value2));
}
function _fun83606(a0, a1) { // fn#83606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:3751, offset: 0x01f20017, size: 112 bytes, params: 3, frame: 14
var environment;
var value2;
var push;
var object2;
let binding = a0;
if (binding.has(a0)) {
value2 = require.find(_fun83607);
if (value2 != null) {
binding = env0_3;
push = binding.push;
object2 = {};
object2.dayLabel = importDefault[a1];
value = environment.__proto__;
object2.timeRange = getScheduleRuleDateRange(value2);
Reflect.apply(push, binding, [object2]);
}
}
}
function _fun83607({days}) { // fn#83607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11095:3786, offset: 0x01f20087, size: 28 bytes, params: 2, frame: 11
return days.includes(env0_0);
}
@@ -0,0 +1,565 @@
/* 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] */
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 closure = getDefaultSelectedTab;
const closure2 = freshTeenActivityWithMap;
const closure3 = 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});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = importDefault(57) /* metro dependency 57 */;
const env0_9 = (require(3837) /* metro dependency 3837: CountryCodeUtils */).getCountryCodeByAlpha2;
let value = importDefault(1228) /* metro dependency 1228: MobileCacheSnapshotStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterConstantsModule = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_11 = familyCenterConstantsModule.FAMILY_CENTER_REFETCH_COOLDOWN;
const env0_12 = familyCenterConstantsModule.FAMILY_CENTER_SUB_ROUTES;
const env0_13 = familyCenterConstantsModule.FamilyCenterSubPages;
const env0_14 = familyCenterConstantsModule.TeenActionDisplayType;
const env0_17 = {};
const env0_19 = closure2();
const env0_20 = closure3();
let env0_23 = closure();
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();
(require(2) /* metro dependency 2 */).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 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 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 = importDefault(21) /* metro dependency 21: 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 = importDefault(21) /* metro dependency 21: 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 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 closure = FamilyCenterStore;
env0_7(closure, a0);
return env0_4(closure, [{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 _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 _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 object3 = {};
copyDataProperties(object3, a0, undefined);
const id = a1.id;
const object4 = {};
let value = environment.__proto__;
value = require(1418) /* metro dependency 1418: GuildRecordUtils */;
copyDataProperties(object4, value.dangerouslyConstructGuildRecordFromUntypedObject(a1), require);
object4['approximateMemberCount'] = a1.approximate_member_count ?? 0;
object3[id] = object4;
return object3;
}
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 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 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 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 object3 = {};
const LATEST_SNAPSHOT_VERSION = FamilyCenterStore.LATEST_SNAPSHOT_VERSION;
object3.version = LATEST_SNAPSHOT_VERSION;
const object4 = {};
let Object = global.Object;
const values = Object.values;
let value = environment.__proto__;
object4.linkedUsers = Reflect.apply(values, Object, [env1_17]);
Object = global.Object;
object4.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);
object4.teenActivity = [];
Object = global.Object;
object4.guilds = Object.values(env1_37);
object3.data = object4;
return object3;
}
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_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_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_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 familyCenterV3ExperimentModule = require(5188) /* metro dependency 5188: FamilyCenterV3Experiment */;
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 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 _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 _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 object2;
const value = a0;
const value4 = env3_8(a1.split(':'), 2);
const property = value4[0];
const property2 = value4[1];
const value5 = (require(5187) /* metro dependency 5187: FamilyCenterUtils */).displayTypeFromString(property);
if (value5 === undefined) {
r0 = value;
} else {
object2 = {};
copyDataProperties(object2, value, undefined);
object2[value5] = global.parseInt(property2, 10);
r0 = object2;
}
return r0;
}
@@ -0,0 +1,242 @@
/* Metro module 5187; source: modules/parent_tools/FamilyCenterUtils.tsx; dependencies: [5116, 5117, 1244, 2224, 3738, 5118, 2] */
function _fun45681(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:6, offset: 0x01195221, size: 376 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
const familyCenterConstantsModule = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_4 = familyCenterConstantsModule.ACTION_TO_TEXT;
const env0_5 = familyCenterConstantsModule.FAMILY_CENTER_ERROR_CODE_TO_FAILURE;
const env0_6 = familyCenterConstantsModule.FamilyCenterFailureCode;
const env0_7 = familyCenterConstantsModule.TeenActionDisplayType;
const env0_8 = familyCenterConstantsModule.UserLinkStatus;
const env0_9 = familyCenterConstantsModule.UserLinkType;
const closure = getActivityTypeTextConfigs;
const closure2 = hasActiveParentLinks;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterUtils.tsx');
exports.getEmptyActivityFormatter = getEmptyActivityFormatter;
exports.getActivityWindowTimestampFormatter = getActivityWindowTimestampFormatter;
exports.formatUserActivityTimestamp = formatUserActivityTimestamp;
exports.formatLinkTimestamp = formatLinkTimestamp;
exports.isUserAction = isUserAction;
exports.isGuildAction = isGuildAction;
exports.isPurchase = function({display_type}) {
return display_type === TeenActionDisplayType.PURCHASES;
};
exports.isGift = function({display_type}) {
return display_type === TeenActionDisplayType.GIFTS;
};
exports.displayTypeFromString = displayTypeFromString;
exports.getFailureCodeForAPIError = function(a0) {
return FAMILY_CENTER_ERROR_CODE_TO_FAILURE[a0.code] ?? FamilyCenterFailureCode.GENERIC_ERROR;
};
exports.getSortedActivityTypeConfigs = getSortedActivityTypeConfigs;
exports.getActivityTypeTextConfigs = closure;
exports.formatTotalTime = function(a0) {
var Math = global.Math;
var value = Math.floor(a0 / 60);
var value2 = a0 % 60;
return value > 0 ? '' + value + 'h ' + value2 + 'm' : '' + value2 + 'm';
};
exports.getOrFetchLinkedUsers = getOrFetchLinkedUsers;
exports.hasActiveParentLinks = closure2;
exports.isParentallyControlled = function() {
return hasActiveParentLinks();
};
exports.getTopUserOrGuildDescription = getTopUserOrGuildDescription;
}
function getActivityTypeTextConfigs() { // fn#45682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:310, offset: 0x01195399, size: 37 bytes, params: 1, frame: 11
const Map = global.Map;
const value = Object.create(Map.prototype, {constructor: {value: Map}});
const map = new Map(ACTION_TO_TEXT);
return map instanceof Object ? map : value;
}
function hasActiveParentLinks() { // fn#45683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:346, offset: 0x011953be, size: 55 bytes, params: 1, frame: 12
const Object = global.Object;
const values = Object.values;
const getLinkedUsers = FamilyCenterStore.getLinkedUsers;
return Reflect.apply(values, Object, [Reflect.apply(getLinkedUsers, FamilyCenterStore, [])]).some(_fun45684);
}
function getEmptyActivityFormatter() { // fn#45685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:548, offset: 0x01195428, size: 141 bytes, params: 1, frame: 18
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const VjIAQQ = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).VjIAQQ;
object2.today = Reflect.apply(string, intl, [VjIAQQ]);
object2.yesterday = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['2a8xHY']);
const Xt6oND = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Xt6oND;
object2.days = Xt6oND;
return object2;
}
function getActivityWindowTimestampFormatter(a0) { // fn#45686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:705, offset: 0x011954b5, size: 241 bytes, params: 2, frame: 21
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const value = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
if (a0) {
object2.today = Reflect.apply(string, intl, [value['2AtcIs']]);
object2.yesterday = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).stOECr);
object2.days = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).n8n5Ba;
} else {
object2.today = Reflect.apply(string, intl, [value.g1ZX6m]);
object2.yesterday = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).s3qSVt);
object2.days = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).f1UJiC;
}
return object2;
}
function formatUserActivityTimestamp(a0, a1, a2) { // fn#45687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:963, offset: 0x011955a6, size: 248 bytes, params: 4, frame: 21
var r0;
var intl;
var formatToPlainString;
var days;
var object2;
var Math;
let value = a2;
const value3 = (importDefault(3738) /* metro dependency 3738 */)();
const value5 = value3.diff((importDefault(3738) /* metro dependency 3738 */)(a0), 's');
const value6 = a1();
(importDefault(3738) /* metro dependency 3738 */)(a0).format('LL');
if (value5 < 86400) {
r0 = value6.today;
} else if (value5 < 172800) {
r0 = value6.yesterday;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
days = value6.days;
object2 = {};
Math = global.Math;
object2.days = Math.min(global.Math.floor(value5 / 86400), value ?? 999);
value = Reflect.apply(formatToPlainString, intl, [days, object2]);
r0 = value;
}
return r0;
}
function formatLinkTimestamp(a0, a1) { // fn#45688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:1186, offset: 0x0119569e, size: 442 bytes, params: 3, frame: 23
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var object2;
var days;
var hours;
var minutes;
const value2 = (importDefault(3738) /* metro dependency 3738 */)();
const value4 = value2.diff((importDefault(3738) /* metro dependency 3738 */)(a0), 's');
const value5 = a1();
if (value4 < 60) {
r0 = value5.seconds;
} else if (value4 < 3600) {
formatToPlainString = intl.formatToPlainString;
minutes = value5.minutes;
object2 = {};
object2.count = global.Math.floor(value4 / 60);
r0 = Reflect.apply(formatToPlainString, intl, [minutes, object2]);
} else if (value4 < 86400) {
formatToPlainString = intl.formatToPlainString;
hours = value5.hours;
object2 = {};
object2.count = global.Math.floor(value4 / 3600);
r0 = Reflect.apply(formatToPlainString, intl, [hours, object2]);
} else if (value4 < 172800) {
r0 = value5.yesterday;
} else if (value4 < 604800) {
formatToPlainString = intl.formatToPlainString;
days = value5.days;
object2 = {};
object2.count = global.Math.floor(value4 / 86400);
r0 = Reflect.apply(formatToPlainString, intl, [days, object2]);
} else {
r0 = intl.formatToPlainString(value5.date,
{date: (importDefault(3738) /* metro dependency 3738 */)(a0).format('LL')});
}
return r0;
}
function isUserAction(a0) { // fn#45689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:1592, offset: 0x01195858, size: 74 bytes, params: 2, frame: 5
const display_type = a0.display_type;
const USER_ADD = TeenActionDisplayType.USER_ADD;
let r0 = display_type === USER_ADD || a0.display_type === TeenActionDisplayType.USER_INTERACTION;
r0 = !r0 ? a0.display_type === TeenActionDisplayType.USER_CALLED : r0;
return r0;
}
function isGuildAction(a0) { // fn#45690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:1708, offset: 0x011958a2, size: 51 bytes, params: 2, frame: 4
const display_type = a0.display_type;
const GUILD_ADD = TeenActionDisplayType.GUILD_ADD;
return display_type === GUILD_ADD || a0.display_type === TeenActionDisplayType.GUILD_INTERACTION;
}
function displayTypeFromString(a0) { // fn#45693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:1884, offset: 0x0119590d, size: 77 bytes, params: 2, frame: 13
var r2;
var property;
var toString;
var value3;
const Object = global.Object;
const value = Object.values(TeenActionDisplayType);
let length = value.length;
const value2 = 0;
if (value2 < length) {
r2 = value2;
loopExit1: while (true) {
property = value[r2];
toString = property.toString;
if (Reflect.apply(toString, property, []) === a0) {
return property;
}
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value.length;
if (value3 < length) {
r2 = value3;
continue;
}
break loopExit1;
}
}
}
function getSortedActivityTypeConfigs() { // fn#45695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:2092, offset: 0x0119597f, size: 78 bytes, params: 1, frame: 12
var r0;
var Array;
var value;
if (getActivityTypeTextConfigs().size === 0) {
r0 = [];
} else {
Array = global.Array;
value = Array.from(value.entries());
value = value.sort(function(a0, a1) {
return a0[1].priority - a1[1].priority;
});
r0 = value;
}
return r0;
}
function getOrFetchLinkedUsers() { // fn#45698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:2387, offset: 0x01195a57, size: 72 bytes, params: 1, frame: 12
const getAreLinkedUsersProcessed = FamilyCenterStore.getAreLinkedUsersProcessed;
if (Reflect.apply(getAreLinkedUsersProcessed, FamilyCenterStore, [])) {
return FamilyCenterStore.getLinkedUsers();
}
(importDefault(5118) /* metro dependency 5118: FamilyCenterActionCreators */).fetchLinkedUsers();
}
function getTopUserOrGuildDescription(a0, a1) { // fn#45700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:2607, offset: 0x01195a9f, size: 254 bytes, params: 3, frame: 18
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return a1 > 0 && a0 === 0 ? intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['L/Cj7S'],
{callCount: a1}) : a0 > 0 && a1 === 0 ? intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['6X1F0i'],
{messageCount: a0}) : intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).IYqGMG,
{messageCount: a0, callCount: a1});
}
function _fun45684(a0) { // fn#45684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5365:390, offset: 0x011953f5, size: 51 bytes, params: 2, frame: 4
const link_status = a0.link_status;
const value = environment.__proto__;
const ACTIVE = UserLinkStatus.ACTIVE;
return link_status === ACTIVE && a0.link_type === UserLinkType.PARENT;
}
@@ -0,0 +1,13 @@
/* Metro module 5188; source: modules/parent_tools/FamilyCenterV3Experiment.tsx; dependencies: [1854, 2] */
function _fun45701(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5366:6, offset: 0x01195b9d, size: 183 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
value = value.createApexExperiment({'kind': 'user', 'name': '2026-01-family-center-v3',
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterV3Experiment.tsx');
exports.default = value;
exports.getIsFamilyCenterV3Enabled = getIsFamilyCenterV3Enabled;
exports.useIsFamilyCenterV3Enabled = useIsFamilyCenterV3Enabled;
}
@@ -0,0 +1,75 @@
/* Metro module 14316; source: modules/parent_tools/ParentalConsentStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
function _fun108366(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14513:6, offset: 0x0231e6be, size: 309 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
let value = _fun108370(PersistedStore);
value.displayName = 'ParentalConsentStore';
value.persistKey = 'ParentalConsentStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{GUARDIAN_CONNECT_REQUIRED: GUARDIAN_CONNECT_REQUIRED, GUARDIAN_CONNECT_CLEARED: GUARDIAN_CONNECT_CLEARED,
NUF_COMPLETE: NUF_COMPLETE_108377});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/ParentalConsentStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_108367() { // fn#108367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14513:148, offset: 0x0231e7f3, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_108367_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun108370(a0) { // fn#108370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14513:356, offset: 0x0231e855, size: 124 bytes, params: 2, frame: 16
const closure = ParentalConsentStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function(a0) {
var r1;
var value = undefined;
r1 = a0 == null ? value : a0.shouldShowGuardianConnect;
env1_5 = r1 != null && r1;
return value;
}}, {key: 'getShouldShowGuardianConnect', value: value_108373}, {key: 'getState', value: value_108374}]);
}
function GUARDIAN_CONNECT_REQUIRED({shouldShowGuardianConnect}) { // fn#108375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14513:1046, offset: 0x0231e90a, size: 40 bytes, params: 2, frame: 10
result = shouldShowGuardianConnect === true;
env0_6.persist();
}
function GUARDIAN_CONNECT_CLEARED() { // fn#108376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14513:1163, offset: 0x0231e932, size: 27 bytes, params: 1, frame: 9
env0_6.persist();
}
function value_108374() { // fn#108374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14513:850, offset: 0x0231e8fa, size: 16 bytes, params: 1, frame: 2
return {shouldShowGuardianConnect: env1_5};
}
@@ -0,0 +1,18 @@
/* Metro module 15642; source: modules/parent_tools/RestrictedHoursActionCreators.native.tsx; dependencies: [5, 5080, 15643, 1962, 2] */
function _fun119780(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15850:6, offset: 0x025193c4, size: 145 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = closeRestrictedHoursModal;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/RestrictedHoursActionCreators.native.tsx');
exports.openRestrictedHoursModal = openRestrictedHoursModal;
exports.closeRestrictedHoursModal = closure;
}
function openRestrictedHoursModal() { // fn#119782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15850:318, offset: 0x02519455, size: 90 bytes, params: 1, frame: 18
const defaultImport = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
defaultImport.pushLazy(env0_3(_fun119784), {onClose: closeRestrictedHoursModal}, env0_4, {'animation': 'none',
'presentation': 'fullScreenModal'});
}
@@ -0,0 +1,234 @@
/* Metro module 15647; source: modules/parent_tools/RestrictedHoursManager.tsx; dependencies: [6, 7, 15, 17, 18, 10907, 1878, 5116, 1244, 2224, 1898, 10909, 694, 5188, 15642, 4860, 2] */
function _fun119810(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15855:6, offset: 0x0251a42a, size: 381 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function() {
return FamilyCenterStore.isCurrentUserInRestrictedHours();
};
const handleScheduleUpdate = function() {
checkAndUpdateModal();
scheduleUpcomingWarning();
};
const handleScreenDowntimeReminderChanged = function() {
scheduleUpcomingWarning();
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const notificationSettingsStore = importDefault(10907) /* metro dependency 10907: NotificationSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun119823(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/RestrictedHoursManager.tsx');
exports.default = value;
exports.getCurrentRestrictedHoursState = closure;
}
function _isNativeReflectConstruct_119811() { // fn#119811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15855:178, offset: 0x0251a5a7, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_119811_isNativeReflectConstruct = function() {
return !!result;
})();
}
function dispatchWarningIfNeeded(a0) { // fn#119815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15855:485, offset: 0x0251a61c, size: 331 bytes, params: 2, frame: 25
var value3;
var JS_DAY_TO_DAY_OF_WEEK;
var date;
var property;
var moduleValue;
let rule = a0.rule;
const ruleId = rule.ruleId;
let startAtMs = a0.startAtMs;
if ('' + ruleId + ':' + startAtMs !== env0_14) {
rule = a0.rule;
startAtMs = a0.startAtMs;
value3 = (require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['0JlDg0']);
JS_DAY_TO_DAY_OF_WEEK = (require(1898) /* metro dependency 1898: FamilyCenterModels */).JS_DAY_TO_DAY_OF_WEEK;
date = new global.Date(startAtMs);
property = JS_DAY_TO_DAY_OF_WEEK[date.getDay()];
moduleValue = require(10909) /* metro dependency 10909: FamilyCenterRestrictedHoursUtils */;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'RESTRICTED_HOURS_WARNING',
title: value3,
subtitle: ('' + moduleValue.formatDays([property]) + ' ' + (require(10909) /* metro dependency 10909: FamilyCenterRestrictedHoursUtils */).getScheduleRuleDateRange(rule)).trim()});
}
}
function scheduleUpcomingWarning() { // fn#119816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15855:877, offset: 0x0251a767, size: 435 bytes, params: 1, frame: 21
var restrictedSchedule;
var r6;
var r5;
var currentUser;
var nextStartInfo;
var minutesUntil;
var value8;
var value10;
const value2 = null;
if (value2 != env0_13) {
global.clearTimeout(env0_13);
}
let Date = global.Date;
let date = new Date();
const value5 = undefined;
const familyCenterV3ExperimentModule = require(5188) /* metro dependency 5188: FamilyCenterV3Experiment */;
const getIsFamilyCenterV3Enabled = familyCenterV3ExperimentModule.getIsFamilyCenterV3Enabled;
let object2 = {location: 'RestrictedHoursManager'};
if (Reflect.apply(getIsFamilyCenterV3Enabled, familyCenterV3ExperimentModule, [object2])) {
if (NotificationSettingsStore.screenDowntimeReminder) {
currentUser = UserStore.getCurrentUser();
restrictedSchedule = value2 == currentUser ? value5 : currentUser.restrictedSchedule;
if (value2 == restrictedSchedule) {
r5 = value2;
} else {
nextStartInfo = restrictedSchedule.getNextStartInfo(date);
if (value2 == nextStartInfo) {
r6 = value2;
} else {
object2 = {};
minutesUntil = nextStartInfo.minutesUntil;
object2.minutesUntil = minutesUntil;
Date = global.Date;
value8 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(date);
value10 = (date instanceof Object ? date : value8).setSeconds(0, 0);
minutesUntil = nextStartInfo.minutesUntil;
object2.startAtMs = value10 + 60 * minutesUntil * 1000;
object2.rule = nextStartInfo.rule;
r6 = object2;
}
r5 = r6;
}
} else {
r5 = value2;
}
} else {
r5 = value2;
}
if (value2 != r5) {
if (r5.minutesUntil <= 16) {
dispatchWarningIfNeeded(r5);
env0_13 = global.setTimeout(function() {
env1_13 = null;
scheduleUpcomingWarning();
}, 60000);
} else {
env0_13 = global.setTimeout(_fun119818, global.Math.max(0, 60 * (r5.minutesUntil - 16) * 1000));
}
}
return value5;
}
function checkAndUpdateModal() { // fn#119819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15855:1603, offset: 0x0251a92f, size: 135 bytes, params: 1, frame: 14
var defaultImport;
var binding;
var moduleValue;
const currentRestrictedHoursState = getCurrentRestrictedHoursState();
if (currentRestrictedHoursState !== env0_11) {
env0_11 = currentRestrictedHoursState;
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.dispatch({type: 'RESTRICTED_HOURS_STATE_CHANGE', isInRestrictedHours: env0_11});
binding = env0_11;
moduleValue = require(15642) /* metro dependency 15642: RestrictedHoursActionCreatorsNative */;
if (binding) {
moduleValue.openRestrictedHoursModal();
} else {
moduleValue.closeRestrictedHoursModal();
}
scheduleUpcomingWarning();
}
}
function handleLogout_119820() { // fn#119820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15855:1867, offset: 0x0251a9b6, size: 92 bytes, params: 1, frame: 14
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'RESTRICTED_HOURS_STATE_CHANGE',
'isInRestrictedHours': false});
if (env0_13 != null) {
global.clearTimeout(env0_13);
}
}
function _fun119823(a0) { // fn#119823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15855:2181, offset: 0x0251aa29, size: 97 bytes, params: 2, frame: 16
const closure = RestrictedHoursManager;
env0_7(closure, a0);
return env0_4(closure, [{key: '_initialize', value: value_119825}, {key: '_terminate', value: value_119826}]);
}
function RestrictedHoursManager(a0) { // fn#119824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15855:2193, offset: 0x0251aa8a, size: 230 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, RestrictedHoursManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(RestrictedHoursManager);
binding = env1_5;
if (_isNativeReflectConstruct_119811()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
const Map = global.Map;
const map = new Map();
const set = map.set;
const handleScheduleUpdateBinding = handleScheduleUpdate;
value.stores = Reflect.apply(set, map, [UserStore, handleScheduleUpdateBinding]).set(FamilyCenterStore,
handleScheduleUpdateBinding);
value.actions = {POST_CONNECTION_OPEN: handleScheduleUpdateBinding,
CURRENT_USER_UPDATE: handleScheduleUpdateBinding,
NOTIFICATIONS_SET_SCREEN_DOWNTIME_REMINDER: handleScreenDowntimeReminderChanged, LOGOUT: handleLogout_119820};
return value;
}
function value_119825() { // fn#119825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15855:2802, offset: 0x0251ab70, size: 143 bytes, params: 1, frame: 15
env1_11 = getCurrentRestrictedHoursState();
const defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
defaultImport.dispatch({type: 'RESTRICTED_HOURS_STATE_CHANGE', isInRestrictedHours: env1_11});
if (env1_11) {
(require(15642) /* metro dependency 15642: RestrictedHoursActionCreatorsNative */).openRestrictedHoursModal();
}
env1_12 = global.setInterval(checkAndUpdateModal, 60000);
scheduleUpcomingWarning();
}
function value_119826() { // fn#119826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15855:3058, offset: 0x0251abff, size: 111 bytes, params: 1, frame: 13
if (env1_12 != null) {
global.clearInterval(env1_12);
}
if (env1_13 != null) {
global.clearTimeout(env1_13);
}
(require(15642) /* metro dependency 15642: RestrictedHoursActionCreatorsNative */).closeRestrictedHoursModal();
}
@@ -0,0 +1,94 @@
/* Metro module 13449; source: modules/parent_tools/RestrictedScheduleActionCreators.tsx; dependencies: [5, 661, 507, 694, 2] */
function _fun102280(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13639:6, offset: 0x022359e3, size: 199 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/RestrictedScheduleActionCreators.tsx');
exports.addRestrictedScheduleRule = function() {
return _addRestrictedScheduleRule.apply(this, arguments);
};
exports.updateRestrictedScheduleRule = function() {
return _updateRestrictedScheduleRule.apply(this, arguments);
};
exports.deleteRestrictedScheduleRule = function() {
return _deleteRestrictedScheduleRule.apply(this, arguments);
};
}
function _addRestrictedScheduleRule() { // fn#102281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13639:126, offset: 0x02235aaa, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun102283).apply(this, arguments);
}
function _updateRestrictedScheduleRule() { // fn#102284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13639:454, offset: 0x02235b8a, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun102286).apply(this, arguments);
}
function _deleteRestrictedScheduleRule() { // fn#102287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13639:794, offset: 0x02235c6e, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun102289).apply(this, arguments);
}
function* _fun102283(a0, a1) { // fn#102283, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13639:201, offset: 0x02235ae7, size: 163 bytes, params: 3, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[2]).HTTP;
const post = HTTP.post;
const object2 = {};
object2.url = env2_4.FAMILY_CENTER_RESTRICTED_SCHEDULE_RULE(a0);
object2.body = a1;
object2.rejectWithError = false;
yield Reflect.apply(post, HTTP, [object2]);
const value3 = undefined;
if (false) {
return value3;
}
const body = value3.body;
value = env2_1(env2_2[3]);
value.dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: a0, restrictedSchedule: body});
return body;
}
function* _fun102286(a0, a1, a2) { // fn#102286, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13639:535, offset: 0x02235bc7, size: 167 bytes, params: 4, frame: 19
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[2]).HTTP;
const patch = HTTP.patch;
const object2 = {};
object2.url = env2_4.FAMILY_CENTER_RESTRICTED_SCHEDULE_RULES(a0, a1);
object2.body = a2;
object2.rejectWithError = false;
yield Reflect.apply(patch, HTTP, [object2]);
const value3 = undefined;
if (false) {
return value3;
}
const body = value3.body;
value = env2_1(env2_2[3]);
value.dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: a0, restrictedSchedule: body});
return body;
}
function* _fun102289(a0, a1) { // fn#102289, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13639:875, offset: 0x02235cab, size: 160 bytes, params: 3, frame: 19
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[2]).HTTP;
var del = HTTP.del;
var object2 = {};
object2.url = env2_4.FAMILY_CENTER_RESTRICTED_SCHEDULE_RULES(a0, a1);
object2.rejectWithError = false;
yield Reflect.apply(del, HTTP, [object2]);
var value3 = undefined;
if (false) {
return value3;
}
var body = value3.body;
value = env2_1(env2_2[3]);
value.dispatch({type: 'USER_RESTRICTED_SCHEDULE_UPDATE', userId: a0, restrictedSchedule: body});
}
}
@@ -0,0 +1,762 @@
/* Metro module 10908; source: modules/parent_tools/RestrictedScheduleNotificationUtils.tsx; dependencies: [22, 2224, 1244, 10909, 2] */
function _fun83573(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11094:6, offset: 0x01f1eb7c, size: 473 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const _arrayLikeToArray_83576 = 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 Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {Created: 'created', Enabled: 'enabled', Disabled: 'disabled', Updated: 'updated', Removed: 'removed',
Multiple: 'multiple'};
const Map = global.Map;
const map = new Map();
const object4 = {};
const Created = object3.Created;
object4[Created] = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['5V7eBH'];
const Enabled = object3.Enabled;
object4[Enabled] = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).iefrVg;
const Disabled = object3.Disabled;
object4[Disabled] = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['k+s9cM'];
const Updated = object3.Updated;
let Nm6hZV = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Nm6hZV;
object4[Updated] = Nm6hZV;
const Multiple = object3.Multiple;
Nm6hZV = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Nm6hZV;
object4[Multiple] = Nm6hZV;
const Removed = object3.Removed;
object4[Removed] = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).jR6uOs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/RestrictedScheduleNotificationUtils.tsx');
exports.RestrictedScheduleNotificationKind = object3;
exports.EMPTY_SCHEDULE_SNAPSHOT = map;
exports.toScheduleSnapshot = toScheduleSnapshot;
exports.diffSchedules = diffSchedules;
exports.getRestrictedScheduleNotificationTitle = getRestrictedScheduleNotificationTitle;
exports.getRestrictedScheduleNotificationSubtitle = getRestrictedScheduleNotificationSubtitle;
exports.restrictedScheduleNotificationKey = function(a0) {
return 'restricted-schedule-' + a0;
};
}
function _createForOfIteratorHelperLoose_83574(a0, a1) { // fn#83574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11094:47, offset: 0x01f1ed55, size: 372 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 _fun83575;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_83576(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_83576(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_83576(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun83575;
}
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 isOnlyDayLoss(a0, a1) { // fn#83577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11094:1173, offset: 0x01f1eec9, size: 225 bytes, params: 3, frame: 19
var Set;
var days;
var set;
var length;
if (a0.label === a1.label) {
var value;
var defaultImport = importDefault(22) /* metro dependency 22 */;
if (defaultImport.isEqual(a0.startTime, a1.startTime)) {
value = importDefault(22) /* metro dependency 22 */;
if (value.isEqual(a0.endTime, a1.endTime)) {
Set = global.Set;
days = a0.days;
set = new Set();
days = a1.days;
length = days.length;
days = a0.days;
set = length < days.length;
return set && a1.days.every(_fun83578);
}
return false;
}
}
return false;
}
function toScheduleSnapshot(a0) { // fn#83579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11094:1794, offset: 0x01f1efaa, size: 90 bytes, params: 2, frame: 12
var r0;
var Map;
var value;
if (a0 == null) {
r0 = env0_4;
} else if (a0.rules.length === 0) {
r0 = env0_4;
} else {
Map = global.Map;
value = a0.rules.map(function(a0) {
return [a0.ruleId, a0];
});
r0 = new Map();
}
return r0;
}
function diffSchedules(a0, a1) { // fn#83581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11094:1920, offset: 0x01f1f01b, size: 1010 bytes, params: 3, frame: 34
var r23;
var r8;
var r14;
var r19;
var r18;
var r5;
var value8;
var value9;
var value10;
var enabled;
var enabled2;
var value11;
var label;
var label2;
var value12;
var defaultImport;
var isEqual;
var startTime;
var startTime2;
var isEqual2;
var defaultImport2;
var endTime;
var endTime2;
var isEqual3;
var defaultImport3;
var days;
var items2;
var sort;
var value13;
var items3;
var isEqual4;
var Updated;
var binding;
var Disabled;
var Enabled;
var Created;
var value14;
var Removed;
var value15;
var property;
var property2;
var isOnlyDayLossBinding;
var oldRule;
var newRule;
const env0_0 = null;
const env0_1 = null;
const env0_2 = null;
const env0_3 = null;
const env0_4 = 0;
const env0_5 = 0;
const env0_6 = 0;
const env0_7 = 0;
const env0_8 = 0;
const items4 = [];
const closure = diffSchedulesRecord;
const _createForOfIteratorHelperLoose_83574Binding = _createForOfIteratorHelperLoose_83574;
const Set = global.Set;
const value2 = a0.keys();
const items5 = [];
arraySpread(items5, a1.keys(), arraySpread(items5, value2, 0, r23), r23);
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(items5);
const value6 = _createForOfIteratorHelperLoose_83574Binding(set instanceof Object ? set : value4);
const value7 = value6();
let done = value7.done;
if (!done) {
r8 = value7;
while (true) {
value8 = r8.value;
value9 = a0.get(value8);
value10 = a1.get(value8);
if (value10 == null) {
value14 = value9 != null;
if (!value14) {
r5 = value14;
continue;
}
r5 = value9.enabled;
if (r5) {
Removed = env0_3.Removed;
closure(Removed, value9);
break;
}
break;
}
if (value9 == null) {
if (value10.enabled) {
Created = env0_3.Created;
closure(Created, value10);
break;
}
break;
}
enabled = value9.enabled;
enabled2 = value10.enabled;
if (enabled !== enabled2) {
enabled = value10.enabled;
binding = env0_3;
if (enabled) {
Enabled = binding.Enabled;
r18 = Enabled;
} else {
Disabled = binding.Disabled;
r18 = Disabled;
}
enabled = value10.enabled;
if (enabled) {
r5 = value10;
continue;
}
r5 = value9;
continue;
closure(r18, r5);
break;
}
enabled = value10.enabled;
value11 = !enabled;
if (!enabled) {
r19 = value11;
continue;
}
label = value9.label;
label2 = value10.label;
value12 = label === label2;
if (!value12) {
r14 = value12;
continue;
}
defaultImport = importDefault(22) /* metro dependency 22 */;
isEqual = defaultImport.isEqual;
startTime = value9.startTime;
startTime2 = value10.startTime;
isEqual2 = Reflect.apply(isEqual, defaultImport, [startTime, startTime2]);
r14 = isEqual2;
if (!r14) {
continue;
}
defaultImport2 = importDefault(22) /* metro dependency 22 */;
isEqual = defaultImport2.isEqual;
endTime = value9.endTime;
endTime2 = value10.endTime;
isEqual3 = Reflect.apply(isEqual, defaultImport2, [endTime, endTime2]);
r14 = isEqual3;
if (!r14) {
continue;
}
defaultImport3 = importDefault(22) /* metro dependency 22 */;
isEqual = defaultImport3.isEqual;
days = value9.days;
items2 = [];
arraySpread(items2, days, 0, r23);
value13 = items2.sort();
days = value10.days;
items3 = [];
arraySpread(items3, days, 0, items3);
sort = items3.sort;
isEqual4 = Reflect.apply(isEqual, defaultImport3, [value13, Reflect.apply(sort, items3, [])]);
r14 = isEqual4;
r23 = items3;
r19 = r14;
if (r19) {
break;
}
Updated = env0_3.Updated;
closure(Updated, value10);
items4.push({oldRule: value9, newRule: value10});
break;
value15 = value6();
done = value15.done;
if (done) {
break;
}
r8 = value15;
continue;
}
}
if (env0_4 === 0) {
return null;
}
if (env0_6 !== 1) {
if (env0_7 !== 1) {
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 >= 1) {
if (env0_8 === 0) {
return {kind: env0_3.Updated, rule: env0_3};
}
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
} else {
if (env0_8 !== 0) {
if (env0_7 !== 1) {
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 >= 1) {
if (env0_8 === 0) {
return {kind: env0_3.Updated, rule: env0_3};
}
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (items4.every(function({oldRule, newRule}) {
return isOnlyDayLoss(oldRule, newRule);
})) {
return {kind: env0_3.Created, rule: env0_2};
}
if (env0_7 !== 1) {
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 >= 1) {
if (env0_8 === 0) {
return {kind: env0_3.Updated, rule: env0_3};
}
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property.oldRule;
newRule = property.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
isOnlyDayLossBinding = isOnlyDayLoss;
oldRule = property2.oldRule;
newRule = property2.newRule;
if (isOnlyDayLossBinding(oldRule, newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_7 !== 2) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_6 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_5 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
if (env0_8 !== 0) {
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
property = items4[0];
property2 = items4[1];
if (isOnlyDayLoss(property.oldRule, property.newRule)) {
return {kind: env0_3.Updated, rule: property2.newRule};
}
if (isOnlyDayLoss(property2.oldRule, property2.newRule)) {
return {kind: env0_3.Updated, rule: property.newRule};
}
}
return env0_4 > 1 ? {kind: env0_3.Multiple, rule: null} : {kind: env0_0, rule: env0_1};
}
function getRestrictedScheduleNotificationTitle(a0) { // fn#83584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11094:3163, offset: 0x01f1f4e7, size: 53 bytes, params: 2, frame: 12
return (require(1244) /* metro dependency 1244: indexNative */).intl.string(env0_5[a0]);
}
function getRestrictedScheduleNotificationSubtitle(a0) { // fn#83585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11094:3295, offset: 0x01f1f51c, size: 120 bytes, params: 2, frame: 15
const value = null;
let r0 = value != a0 ? (require(10909) /* metro dependency 10909: FamilyCenterRestrictedHoursUtils */).formatRestrictedScheduleInAppSubtitle(a0) : value;
r0 = value == r0 ? (require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['8OlpoY']) : r0;
return r0;
}
function diffSchedulesRecord(a0, a1) { // fn#83582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11094:2022, owner: diffSchedules.record, offset: 0x01f1f40d, size: 186 bytes, params: 3, frame: 14
var items2;
if (env0_4 === 0) {
env0_0 = a0;
env0_1 = a1;
}
let binding = env0_4;
env0_4 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
const Removed = env1_3.Removed;
if (a0 === Removed) {
binding = env0_5;
env0_5 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
} else if (a0 === env1_3.Created) {
env0_2 = a1;
binding = env0_6;
env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
} else if (a0 === env1_3.Updated) {
env0_3 = a1;
binding = env0_7;
env0_7 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
} else {
binding = env1_3;
items2 = [binding.Enabled];
items2[1] = binding.Disabled;
if (items2.includes(a0)) {
binding = env0_8;
env0_8 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
}
@@ -0,0 +1,91 @@
/* Metro module 13422; source: modules/parent_tools/SpendingLimitDisplay.tsx; dependencies: [1348, 5116, 1880, 566, 13350, 5137, 5138, 1244, 2224, 2] */
function _fun102130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13612:6, offset: 0x0222e30d, size: 199 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getSpendingLimitDisplayState;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
const env0_5 = (require(1880) /* metro dependency 1880: PremiumConstants */).SubscriptionIntervalTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/SpendingLimitDisplay.tsx');
exports.useSpendingLimitFromUserSettings = function() {
return require(dependencyMap[3]).useStateFromStores([UserSettingsProtoStore], _fun102133, undefined,
require(dependencyMap[4]).spendingLimitEqual);
};
exports.CLOSE_TO_LIMIT_THRESHOLD_MAJOR_UNITS = 10;
exports.getSpendingLimitDisplayState = closure;
exports.useSpendingLimitDisplayState = useSpendingLimitDisplayState;
}
function getSpendingLimitDisplayState(a0, a1) { // fn#102131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13612:152, offset: 0x0222e3d4, size: 380 bytes, params: 3, frame: 23
var object3;
var intl;
var formatToPlainString;
var object4;
if (a0 == null) {
return {kind: 'off'};
}
if (a0.amount === 0) {
return {kind: 'blocked'};
}
const currency = a0.currency;
const priceUtilsModule = require(5137) /* metro dependency 5137: PriceUtils */;
const formatRate = priceUtilsModule.formatRate;
const moduleValue2 = priceUtilsModule;
const value2 = moduleValue2.formatPrice(a0.amount, currency);
const MONTH = SubscriptionIntervalTypes.MONTH;
const value3 = Reflect.apply(formatRate, priceUtilsModule, [value2, MONTH, 1]);
if (a1 >= a0.amount) {
return {kind: 'spent', monthlyText: value3};
}
const CurrencyExponents = (require(5138) /* metro dependency 5138: PriceUtils */).CurrencyExponents;
let property = CurrencyExponents[a0.currency];
let r0 = property ?? 2;
const value5 = a0.amount - a1;
if (value5 <= 10 * exponentiationOperator(10, r0, undefined)) {
object3 = {kind: 'close-to-limit', monthlyText: value3};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
property = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['+Q+bU1'];
object4 = {};
object4.amount = priceUtilsModule.formatPrice(value5, currency);
object3.remainingText = Reflect.apply(formatToPlainString, intl, [property, object4]);
r0 = object3;
} else {
r0 = {kind: 'on', monthlyText: value3};
}
return r0;
}
function useSpendingLimitFromUserSettings() { // fn#102132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13612:769, offset: 0x0222e550, size: 83 bytes, params: 1, frame: 18
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserSettingsProtoStore], _fun102133,
undefined, (require(13350) /* metro dependency 13350: SpendingLimitUtils */).spendingLimitEqual);
}
function useSpendingLimitDisplayState(a0) { // fn#102134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13612:1203, offset: 0x0222e60b, size: 101 bytes, params: 2, frame: 15
const value2 = undefined;
const monthlyPurchases = (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getMonthlyPurchases();
});
return getSpendingLimitDisplayState(a0, (monthlyPurchases == null ? value2 : monthlyPurchases.total_amount) ?? 0);
}
function _fun102133() { // fn#102133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13612:852, offset: 0x0222e5a3, size: 104 bytes, params: 1, frame: 14
var r0;
var object2;
let value = environment.__proto__;
const safetySettings = UserSettingsProtoStore.settings.safetySettings;
value = null;
const oneTimePurchaseLimit = value == safetySettings || value == safetySettings.spendingLimitSettings ? undefined : safetySettings.spendingLimitSettings.oneTimePurchaseLimit;
if (value == oneTimePurchaseLimit) {
r0 = value;
} else {
object2 = {};
object2.amount = global.Number(oneTimePurchaseLimit.amount);
object2.currency = oneTimePurchaseLimit.currency;
r0 = object2;
}
return r0;
}
@@ -0,0 +1,103 @@
/* Metro module 13350; source: modules/parent_tools/SpendingLimitUtils.tsx; dependencies: [2] */
function _fun101669(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13540:6, offset: 0x0221b831, size: 126 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/SpendingLimitUtils.tsx');
exports.spendingLimitEqual = function(a0, a1) {
var r0;
var r1;
r0 = a0 == null && a1 == null;
if (!r0) {
r1 = a0 != null && a1 != null;
r1 = r1 && (a0.amount === a1.amount && a0.currency === a1.currency);
r0 = r1;
}
return r0;
};
exports.getNextRenewalDateLabel = getNextRenewalDateLabel;
exports.getCurrencySymbol = getCurrencySymbol;
exports.sanitizeAmountInput = sanitizeAmountInput;
}
function getNextRenewalDateLabel() { // fn#101671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13540:341, offset: 0x0221b8fe, size: 160 bytes, params: 1, frame: 17
let Date = global.Date;
let date = new Date();
Date = global.Date;
const Date2 = global.Date;
const UTC = Date2.UTC;
const uTCFullYear = date.getUTCFullYear();
date = date.getUTCMonth();
date = Reflect.apply(UTC, Date2, [uTCFullYear, date + 1, 1]);
date = new Date(date);
const Intl = global.Intl;
const DateTimeFormat = Intl.DateTimeFormat;
const value4 = Object.create(DateTimeFormat.prototype, {constructor: {value: DateTimeFormat}});
const dateTimeFormat = new DateTimeFormat(undefined, {'dateStyle': 'short', 'timeZone': 'UTC'});
return (dateTimeFormat instanceof Object ? dateTimeFormat : value4).format(date);
}
function getCurrencySymbol(a0) { // fn#101672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13540:557, offset: 0x0221b99e, size: 170 bytes, params: 2, frame: 17
var r1;
var Intl;
var NumberFormat;
var object2;
var value2;
var prototype;
var value3;
var numberFormat;
var value4;
var value5;
var closure;
var value6;
var value7;
var error;
let value = undefined;
try {
Intl = global.Intl;
NumberFormat = Intl.NumberFormat;
object2 = {style: 'currency'};
value2 = a0.toUpperCase();
object2.currency = value2;
prototype = NumberFormat.prototype;
value3 = Object.create(prototype, {constructor: {value: NumberFormat}});
numberFormat = new NumberFormat(value);
value4 = numberFormat instanceof Object ? numberFormat : value3;
value5 = value4.formatToParts(0);
closure = function(a0) {
return a0.type === 'currency';
};
value6 = value5.find(closure);
value7 = value6 == null;
r1 = value7 ? value : value6.value;
value = r1 != null;
if (!value) {
value = a0.toUpperCase();
r1 = value;
}
} catch (error) {
return a0.toUpperCase();
}
return r1;
}
function sanitizeAmountInput(a0, a1) { // fn#101674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13540:837, offset: 0x0221ba5a, size: 155 bytes, params: 3, frame: 20
var r0;
var property;
if (a1 === 0) {
return a0.replace(RegExp('[^0-9]', 'g'), '');
}
let value = a0.replace(RegExp('[^0-9.]', 'g'), '');
const value2 = value.split('.');
if (value2.length === 1) {
r0 = value;
} else {
property = value2[0];
value = value2.slice(1);
value = value.join('');
value = value.slice(0, a1);
value = '' + property + '.' + value;
r0 = value;
}
return r0;
}
@@ -0,0 +1,10 @@
/* Metro module 12627; source: modules/parent_tools/hooks/useAgeSpecificText.tsx; dependencies: [8171, 2] */
function _fun96898(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12817:6, offset: 0x0216b534, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useAgeSpecificText.tsx');
exports.useAgeSpecificText = function(a0, a1) {
return importDefault(dependencyMap[0])() ? a1 : a0;
};
}
@@ -0,0 +1,66 @@
/* Metro module 15799; source: modules/parent_tools/hooks/useConnectGuardianGate.tsx; dependencies: [57, 31, 5116, 566, 5118, 4594, 2] */
function _fun121387(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:6, offset: 0x02546e15, size: 153 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useConnectGuardianGate.tsx');
exports.useConnectGuardianGate = useConnectGuardianGate;
}
function useConnectGuardianGate() { // fn#121388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:238, offset: 0x02546eae, size: 289 bytes, params: 1, frame: 23
const {linkCode,
expiresAt} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([FamilyCenterStore],
function() {
var object = {};
object.linkCode = FamilyCenterStore.getLinkCode();
object.expiresAt = FamilyCenterStore.getLinkCodeExpiresAt();
return object;
});
const binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_0 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_1 = value5[1];
const env0_2 = binding.useRef(0);
const value6 = binding.useCallback(_fun121390, []);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(value6);
return property ? {state: 'error'} : property2 ? linkCode == null ? {state: 'error'} : expiresAt != null ? {state: 'gate',
linkCode: linkCode, expiresAt: expiresAt, refresh: value6} : {state: 'error'} : {state: 'loading'};
}
function _fun121390() { // fn#121390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:524, offset: 0x02546ffa, size: 110 bytes, params: 1, frame: 13
var environment;
const binding = env0_2;
const current = binding.current;
const value2 = typeof current === 'bigint' ? current + 1n : +current + 1;
binding.current = value2;
value2(false);
let value = environment.__proto__;
value = require(5118) /* metro dependency 5118: FamilyCenterActionCreators */;
value = value.getLinkCodeForCurrentUser();
value = value.then(_fun121391);
value.catch(_fun121392);
}
function _fun121391() { // fn#121391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:595, offset: 0x02547068, size: 51 bytes, params: 1, frame: 12
if (env0_0 === env1_2.current) {
env1_0(false);
env1_1(true);
}
}
function _fun121392() { // fn#121392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16007:639, offset: 0x0254709b, size: 40 bytes, params: 1, frame: 11
if (env0_0 === env1_2.current) {
env1_0(true);
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,89 @@
/* Metro module 13407; source: modules/parent_tools/hooks/useFamilyCenterActivities.tsx; dependencies: [5116, 5117, 632, 5187, 5137, 2] */
function _fun102029(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:6, offset: 0x02228ae7, size: 179 bytes, params: 8, frame: 19
let env0_0 = require;
const closure = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStores([FamilyCenterStore], _fun102031);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
const env0_3 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).TeenActionDisplayType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useFamilyCenterActivities.tsx');
exports.useActionsForDisplayType = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStoresArray([FamilyCenterStore], _fun102033);
};
exports.useActionTotalsForDisplayType = closure;
exports.useHasActionForAnyDisplayType = function() {
return require(dependencyMap[2]).useStateFromStores([FamilyCenterStore], _fun102035);
};
exports.useFormattedTotalForDisplayType = useFormattedTotalForDisplayType;
}
function useActionTotalsForDisplayType(a0) { // fn#102030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:138, offset: 0x02228b9a, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
_fun102031);
}
function useActionsForDisplayType(a0) { // fn#102032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:370, offset: 0x02228bf7, size: 67 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresArray([FamilyCenterStore],
_fun102033);
}
function useHasActionForAnyDisplayType() { // fn#102034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:582, offset: 0x02228c55, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
_fun102035);
}
function useFormattedTotalForDisplayType(a0) { // fn#102037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:761, offset: 0x02228cdc, size: 174 bytes, params: 2, frame: 18
var r1;
var totalSpendAmount;
var totalSpendCurrency;
var value;
const r2 = useActionTotalsForDisplayType(a0) ?? 0;
const TOTAL_VOICE_MINUTES = TeenActionDisplayType.TOTAL_VOICE_MINUTES;
if (a0 === TOTAL_VOICE_MINUTES) {
return (require(5187) /* metro dependency 5187: FamilyCenterUtils */).formatTotalTime(r2);
}
const PURCHASES = TeenActionDisplayType.PURCHASES;
if (a0 === PURCHASES) {
totalSpendAmount = FamilyCenterStore.getTotalSpendAmount();
totalSpendCurrency = FamilyCenterStore.getTotalSpendCurrency();
if (totalSpendAmount == null) {
r1 = r2;
} else if (totalSpendCurrency == null) {
r1 = r2;
} else {
value = require(5137) /* metro dependency 5137: PriceUtils */;
value = value.shortenAndFormatPrice(totalSpendAmount, totalSpendCurrency);
r1 = value;
}
return r1;
}
return r2;
}
function _fun102031() { // fn#102031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:219, offset: 0x02228bdc, size: 27 bytes, params: 1, frame: 11
return FamilyCenterStore.getTotalForDisplayType(env0_0);
}
function _fun102033() { // fn#102033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:451, offset: 0x02228c3a, size: 27 bytes, params: 1, frame: 11
return FamilyCenterStore.getActionsForDisplayType(env0_0);
}
function _fun102035() { // fn#102035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:662, offset: 0x02228c90, size: 47 bytes, params: 1, frame: 11
var environment;
const Object = global.Object;
const values = Object.values;
const value = environment.__proto__;
return Reflect.apply(values, Object, [TeenActionDisplayType]).some(_fun102036);
}
function _fun102036(a0) { // fn#102036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13597:689, offset: 0x02228cbf, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return FamilyCenterStore.getTotalForDisplayType(a0) > 0;
}
@@ -0,0 +1,35 @@
/* Metro module 15644; source: modules/parent_tools/hooks/useFormattedEndTime.tsx; dependencies: [1878, 1244, 566, 2] */
function _fun119804(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15852:6, offset: 0x0251a1cd, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useFormattedEndTime.tsx');
exports.default = function() {
return require(dependencyMap[2]).useStateFromStores([UserStore], _fun119806);
};
}
function useFormattedEndTime() { // fn#119805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15852:200, offset: 0x0251a23f, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun119806);
}
function _fun119806() { // fn#119806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15852:270, offset: 0x0251a27a, size: 156 bytes, params: 1, frame: 16
var r0;
var dateTimeFormat;
const value = environment.__proto__;
const currentUser = UserStore.getCurrentUser();
const value3 = null;
const r3 = value3 == currentUser || value3 == currentUser.restrictedSchedule ? undefined : currentUser.restrictedSchedule.getNextEndTime();
if (value3 == r3) {
r0 = value3;
} else {
dateTimeFormat = new global.Intl.DateTimeFormat((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
{'hour': 'numeric', 'minute': '2-digit', 'weekday': 'long'});
dateTimeFormat = dateTimeFormat.format(r3);
r0 = dateTimeFormat;
}
return r0;
}
@@ -0,0 +1,45 @@
/* Metro module 9737; source: modules/parent_tools/hooks/useHelpLineVisibility.tsx; dependencies: [31, 1949, 5116, 8171, 632, 9738, 2] */
function _fun76505(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:6, offset: 0x01dd1b0b, size: 250 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
let Set = global.Set;
let set = new Set(['US']);
Set = global.Set;
set = new Set(['en-US', 'es-ES']);
const closure = useShouldShowHelplineLink;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useHelpLineVisibility.tsx');
exports.useShouldShowHelplineLink = closure;
exports.useShouldShowThroughlineLink = useShouldShowThroughlineLink;
}
function useShouldShowHelplineLink() { // fn#76506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:199, offset: 0x01dd1c05, size: 204 bytes, params: 1, frame: 20
const value2 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const userCountry = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getUserCountry();
});
const locale = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([LocaleStore],
function() {
return LocaleStore.locale;
});
env0_3.useEffect(_fun76509, [userCountry]);
return !value2 && userCountry != null && env0_6.has(userCountry.alpha2) && env0_7.has(locale);
}
function useShouldShowThroughlineLink() { // fn#76510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:611, offset: 0x01dd1d18, size: 48 bytes, params: 1, frame: 12
return !(importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)() && !useShouldShowHelplineLink();
}
function _fun76509() { // fn#76509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9923:348, offset: 0x01dd1ce4, size: 52 bytes, params: 1, frame: 11
var value;
if (userCountry == null) {
value = environment.__proto__;
value = require(9738) /* metro dependency 9738: MessageRequestActionCreators */;
value.fetchUserCountryCode();
}
}
@@ -0,0 +1,18 @@
/* Metro module 8171; source: modules/parent_tools/hooks/useIsInAdultAgeGroup.tsx; dependencies: [5116, 566, 2] */
function _fun65588(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8356:6, offset: 0x01bd3f8f, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useIsInAdultAgeGroup.tsx');
exports.default = useIsInAdultAgeGroup;
}
function useIsInAdultAgeGroup() { // fn#65589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8356:201, offset: 0x01bd4001, size: 67 bytes, params: 1, frame: 13
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return Reflect.apply(useStateFromStores, fluxModule, [[FamilyCenterStore], function() {
return FamilyCenterStore.getAgeGroup();
}]) === 'adult';
}
@@ -0,0 +1,14 @@
/* Metro module 15646; source: modules/parent_tools/hooks/useIsInRestrictedHours.tsx; dependencies: [1878, 5116, 566, 15647, 2] */
function _fun119808(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15854:6, offset: 0x0251a35c, size: 130 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useIsInRestrictedHours.tsx');
exports.default = function() {
return require(dependencyMap[2]).useStateFromStores([UserStore, FamilyCenterStore],
require(dependencyMap[3]).getCurrentRestrictedHoursState);
};
}
@@ -0,0 +1,251 @@
/* Metro module 13347; source: modules/parent_tools/hooks/useParentalControlSettings.tsx; dependencies: [5, 31, 5119, 6263, 8172, 13348, 13351, 1314, 4844, 7004, 8170, 566, 5118, 6264, 2] */
function _fun101624(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:6, offset: 0x0221a9b6, size: 242 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const familyCenterControlledSettingsStore = importDefault(5119) /* metro dependency 5119: FamilyCenterControlledSettingsStore */;
const env0_6 = (require(6263) /* metro dependency 6263: Constants */).SafetyToastType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useParentalControlSettings.tsx');
exports.useParentalControlledExplicitContentSettings = useParentalControlledExplicitContentSettings;
exports.useParentalControlledGoreContentSettings = useParentalControlledGoreContentSettings;
exports.useDefaultGuildsRestricted = useDefaultGuildsRestricted;
exports.useAllowFriendsFromMutualGuildsOnlyForTeen = useAllowFriendsFromMutualGuildsOnlyForTeen;
exports.useIsParentallyControlled = useIsParentallyControlled;
exports.useParentalControlledConsent = function(a0) {
return {hasConsented: _fun101632(a0), updateConsent: _fun101634(a0)};
};
}
function useParentalControlledExplicitContentSettings() { // fn#101625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:291, offset: 0x0221aaa8, size: 294 bytes, params: 1, frame: 21
var r0;
var object2;
var moduleValue2;
var resolveExplicitContentSettingWithDefaultsForTeen;
var moduleValue3;
const value2 = undefined;
const value3 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeen();
const ParentalControlledExplicitContent = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledExplicitContent;
const useControlledSetting = ParentalControlledExplicitContent.useControlledSetting;
const value4 = null;
let id = value4 == value3 ? value2 : value3.id;
const value5 = Reflect.apply(useControlledSetting, ParentalControlledExplicitContent, [id]);
if (value4 == value3) {
r0 = value4;
} else {
object2 = {};
moduleValue2 = require(13351) /* metro dependency 13351: FamilyCenterControlledSettingsUtils */;
resolveExplicitContentSettingWithDefaultsForTeen = moduleValue2.resolveExplicitContentSettingWithDefaultsForTeen;
id = value4 == value3 ? value2 : value3.id;
object2.explicitContentNonFriendDm = Reflect.apply(resolveExplicitContentSettingWithDefaultsForTeen,
moduleValue2,
[{teenId: id, setting: value4 == value5 ? value2 : value5.explicitContentNonFriendDm}]);
moduleValue3 = require(13351) /* metro dependency 13351: FamilyCenterControlledSettingsUtils */;
resolveExplicitContentSettingWithDefaultsForTeen = moduleValue3.resolveExplicitContentSettingWithDefaultsForTeen;
id = value4 == value3 ? value2 : value3.id;
object2.explicitContentFriendDm = Reflect.apply(resolveExplicitContentSettingWithDefaultsForTeen, moduleValue3,
[{teenId: id, setting: value4 == value5 ? value2 : value5.explicitContentFriendDm, isFriend: true}]);
object2.explicitContentGuilds = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction.BLUR;
r0 = object2;
}
return r0;
}
function useParentalControlledGoreContentSettings() { // fn#101626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:878, offset: 0x0221abce, size: 308 bytes, params: 1, frame: 19
const value2 = undefined;
const value3 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeen();
const ParentalControlledGoreContent = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledGoreContent;
const value4 = ParentalControlledGoreContent.useControlledSetting(value3 == null ? value2 : value3.id);
if (value3 == null) {
return null;
}
const {goreContentNonFriendDm, goreContentFriendDm} = value4 ?? ({});
const object2 = {};
const familyCenterControlledSettingsUtilsModule = require(13351) /* metro dependency 13351: FamilyCenterControlledSettingsUtils */;
object2.goreContentNonFriendDm = familyCenterControlledSettingsUtilsModule.isSetAndNotDefault(goreContentNonFriendDm) ? goreContentNonFriendDm : (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaultsForTeen({isDm: true});
const moduleValue4 = familyCenterControlledSettingsUtilsModule;
object2.goreContentFriendDm = moduleValue4.isSetAndNotDefault(goreContentFriendDm) ? goreContentFriendDm : (require(4844) /* metro dependency 4844: SensitiveMediaGoreRedactionSettingsUtils */).resolveGoreSettingWithDefaultsForTeen({'isDm': true,
'isFriend': true});
const ExplicitContentRedaction = (require(1314) /* metro dependency 1314: preloaded_user_settings */).ExplicitContentRedaction;
const BLUR = ExplicitContentRedaction.BLUR;
object2.goreContentGuilds = BLUR;
return object2;
}
function useDefaultGuildsRestricted() { // fn#101627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1417, offset: 0x0221ad02, size: 149 bytes, params: 1, frame: 17
const value2 = undefined;
const value3 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeen();
const ParentalControlledDefaultGuildsRestricted = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledDefaultGuildsRestricted;
const value4 = ParentalControlledDefaultGuildsRestricted.useControlledSetting(value3 == null ? value2 : value3.id);
const ParentalControlledDefaultGuildsRestrictedV2 = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledDefaultGuildsRestrictedV2;
return ParentalControlledDefaultGuildsRestrictedV2.useControlledSetting(value3 == null ? value2 : value3.id) ?? (value4 && !!value4);
}
function useAllowFriendsFromMutualGuildsOnlyForTeen() { // fn#101628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1714, offset: 0x0221ad97, size: 134 bytes, params: 1, frame: 16
const value2 = undefined;
const value3 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeen();
const ParentalControlledFriendSourceFlags = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledFriendSourceFlags;
const value = env0_4.useMemo(_fun101629,
[ParentalControlledFriendSourceFlags.useControlledSetting(value3 == null ? value2 : value3.id)]);
return value.mutualGuilds && !value.all;
}
function useIsParentallyControlled() { // fn#101630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1994, offset: 0x0221ae4a, size: 37 bytes, params: 1, frame: 11
return (require(8170) /* metro dependency 8170: useUserLinks */).useHasActiveParentLinks();
}
function useParentalControlledConsent(a0) { // fn#101631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2105, offset: 0x0221ae6f, size: 47 bytes, params: 2, frame: 12
return {hasConsented: ((a0) => {
var env0_0 = a0;
var env0_1 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeenId();
return (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterControlledSettingsStore],
_fun101633);
})(a0), updateConsent: useUpdateParentalControlledConsent(a0)};
}
function _fun101629() { // fn#101629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:1901, offset: 0x0221ae1d, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(7004) /* metro dependency 7004: UserSettingsUtils */).computeFlags(env0_0);
}
function useParentalControlledHasConsented(a0) { // fn#101632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2152, owner: useParentalControlledConsent.useParentalControlledHasConsented, offset: 0x0221ae9e, size: 92 bytes, params: 2, frame: 16
const env0_0 = a0;
const env0_1 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeenId();
return (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterControlledSettingsStore],
_fun101633);
}
function useUpdateParentalControlledConsent(a0) { // fn#101634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2304, owner: useParentalControlledConsent.useUpdateParentalControlledConsent, offset: 0x0221af1a, size: 88 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return env1_4.useCallback(_fun101635(),
[(require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeenId(), a0]);
}
function _fun101633() { // fn#101633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2272, offset: 0x0221aefa, size: 32 bytes, params: 1, frame: 13
return FamilyCenterControlledSettingsStore.hasConsented(env0_1, env0_0);
}
function _fun101635() { // fn#101635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2406, offset: 0x0221af72, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun101637);
return _fun101638;
}
function* _fun101637(a0) { // fn#101637, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13537:2426, offset: 0x0221afa1, size: 193 bytes, params: 2, frame: 19
var items;
var items2;
var binding;
var binding2;
var property;
var value4;
var updateTeenConsents;
var value5;
var error;
var showFailedToast;
var GENERIC_ERROR;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
if (env2_1 == null) {
return undefined;
}
if (a0) {
binding = env2_0;
items = [binding];
} else {
items = [];
}
if (a0) {
items2 = [];
} else {
binding = env2_0;
items2 = [binding];
}
try {
binding = env4_1;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
binding2 = env4_2;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
property = binding2[12];
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
updateTeenConsents = value4.updateTeenConsents;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
binding = env2_1;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
try {
value = Reflect.apply(updateTeenConsents, value4, [binding, items, items2]);
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
yield value;
try {
value = undefined;
value5 = false;
} catch (error) {
binding = env4_1;
value = binding(env4_2[13]);
showFailedToast = value.showFailedToast;
GENERIC_ERROR = env4_6.GENERIC_ERROR;
Reflect.apply(showFailedToast, value, [GENERIC_ERROR]);
return undefined;
}
return value5 ? value : undefined;
}
@@ -0,0 +1,36 @@
/* Metro module 13423; source: modules/parent_tools/hooks/useScheduleTimeControlsRowProps.tsx; dependencies: [33, 4573, 1244, 2224, 2] */
function _fun102136(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13613:6, offset: 0x0222e683, size: 123 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useScheduleTimeControlsRowProps.tsx');
exports.default = useScheduleTimeControlsRowProps;
}
function useScheduleTimeControlsRowProps(a0) { // fn#102137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13613:216, offset: 0x0222e6fe, size: 358 bytes, params: 2, frame: 22
var value;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var string;
if (a0.length === 0) {
object2 = {};
object2.subLabel = <Text variant="text-xs/medium" color="text-muted">{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).fOBIZH)}</Text>;
object2.trailing = undefined;
} else {
value = a0.some(function(a0) {
return a0.enabled;
});
object2 = {};
var formatToPlainString = intl.formatToPlainString;
var XfwcpX = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).XfwcpX;
object2.subLabel = Reflect.apply(formatToPlainString, intl, [XfwcpX, {count: a0.length}]);
string = intl.string;
var defaultImport = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
object2.trailing = <Text variant="text-sm/medium" color="text-muted">{value ? Reflect.apply(string, intl,
[defaultImport['8vDHRq']]) : Reflect.apply(string, intl, [defaultImport['4z9fN+']])}</Text>;
}
return object2;
}
@@ -0,0 +1,47 @@
/* Metro module 13390; source: modules/parent_tools/hooks/useSelectedTab.tsx; dependencies: [5116, 5117, 661, 632, 5118, 683, 2] */
function _fun101951(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13580:6, offset: 0x02224cb5, size: 280 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
const familyCenterConstantsModule = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_4 = familyCenterConstantsModule.FamilyCenterAction;
const FamilyCenterSubPages = familyCenterConstantsModule.FamilyCenterSubPages;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
object2 = {};
const ACTIVITY = FamilyCenterSubPages.ACTIVITY;
object2[ACTIVITY] = 'family_center_activity_tab';
const REQUESTS = FamilyCenterSubPages.REQUESTS;
object2[REQUESTS] = 'family_center_requests_tab';
const SETTINGS = FamilyCenterSubPages.SETTINGS;
object2[SETTINGS] = 'family_center_settings_tab';
const CONTENT_AND_SOCIAL = FamilyCenterSubPages.CONTENT_AND_SOCIAL;
object2[CONTENT_AND_SOCIAL] = 'family_center_content_and_social_panel';
const DATA_AND_PRIVACY = FamilyCenterSubPages.DATA_AND_PRIVACY;
object2[DATA_AND_PRIVACY] = 'family_center_data_and_privacy_panel';
const SCREEN_TIME_CONTROLS = FamilyCenterSubPages.SCREEN_TIME_CONTROLS;
object2[SCREEN_TIME_CONTROLS] = 'family_center_screen_time_controls_panel';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useSelectedTab.tsx');
exports.default = function() {
var object = {};
object.selectedTab = require(dependencyMap[3]).useStateFromStores([FamilyCenterStore], _fun101953);
object.handleTabChange = _fun101954;
return object;
};
exports.FAMILY_CENTER_TAB_ANALYTICS_LABELS = object2;
}
function _default_101952() { // fn#101952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13580:520, offset: 0x02224dcd, size: 80 bytes, params: 1, frame: 15
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
return {selectedTab: Reflect.apply(useStateFromStores, useStateFromStoresModule, [[FamilyCenterStore], function() {
return FamilyCenterStore.getSelectedTab();
}]), handleTabChange: function(a0) {
importDefault(dependencyMap[4]).selectTab(a0);
var defaultImport2 = importDefault(dependencyMap[5]);
var FAMILY_CENTER_ACTION = AnalyticEvents.FAMILY_CENTER_ACTION;
defaultImport2.track(FAMILY_CENTER_ACTION, {action: FamilyCenterAction.TabChange, tab: a0});
}};
}
@@ -0,0 +1,36 @@
/* Metro module 8172; source: modules/parent_tools/hooks/useSelectedTeen.tsx; dependencies: [1878, 5116, 632, 2] */
function _fun65591(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:6, offset: 0x01bd4057, size: 143 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useSelectedTeen.tsx');
exports.useSelectedTeen = function() {
var env0_0 = require(dependencyMap[2]).useStateFromStores([FamilyCenterStore], _fun65593);
return require(dependencyMap[2]).useStateFromStores([UserStore], _fun65594);
};
exports.useSelectedTeenId = function() {
return require(dependencyMap[2]).useStateFromStores([FamilyCenterStore], _fun65596);
};
}
function useSelectedTeen() { // fn#65592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:214, offset: 0x01bd40e6, size: 102 bytes, params: 1, frame: 19
const env0_0 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getSelectedTeenId();
});
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun65594);
}
function useSelectedTeenId() { // fn#65595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:380, offset: 0x01bd4186, size: 59 bytes, params: 1, frame: 13
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getSelectedTeenId();
});
}
function _fun65594() { // fn#65594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8357:324, offset: 0x01bd415f, size: 39 bytes, params: 1, frame: 12
return selectedTeenId === null ? undefined : UserStore.getUser(selectedTeenId);
}
@@ -0,0 +1,63 @@
/* Metro module 13406; source: modules/parent_tools/hooks/useSelectedTeenUser.tsx; dependencies: [1878, 5119, 5116, 8171, 632, 2] */
function _fun102022(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:6, offset: 0x0222887a, size: 176 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterControlledSettingsStore = importDefault(5119) /* metro dependency 5119: FamilyCenterControlledSettingsStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useSelectedTeenUser.tsx');
exports.useSelectedTeenUser = function() {
var env0_0 = importDefault(dependencyMap[3])();
return require(dependencyMap[4]).useStateFromStores([FamilyCenterStore, UserStore], _fun102024);
};
exports.useTeenUserForId = function(a0) {
var env0_0 = a0;
return require(dependencyMap[4]).useStateFromStores([UserStore], _fun102026);
};
exports.useShouldLoadSettingsForSelectedTeenUser = useShouldLoadSettingsForSelectedTeenUser;
}
function useSelectedTeenUser() { // fn#102023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:232, offset: 0x0222892a, size: 91 bytes, params: 1, frame: 15
const env0_0 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore,
UserStore], _fun102024);
}
function useTeenUserForId(a0) { // fn#102025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:422, offset: 0x022289ce, size: 66 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun102026);
}
function useShouldLoadSettingsForSelectedTeenUser() { // fn#102027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:547, offset: 0x02228a35, size: 111 bytes, params: 1, frame: 15
const selectedTeenId = FamilyCenterStore.getSelectedTeenId();
const value = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStoresObject([FamilyCenterControlledSettingsStore],
_fun102028);
return selectedTeenId !== null && (!value.hasLoadedSettings && !value.isLoading);
}
function _fun102024() { // fn#102024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:294, offset: 0x02228985, size: 73 bytes, params: 1, frame: 12
var value;
if (env0_0 !== true) {
value = environment.__proto__;
return UserStore.getCurrentUser();
}
value = environment.__proto__;
const selectedTeenId = FamilyCenterStore.getSelectedTeenId();
return selectedTeenId === null ? undefined : UserStore.getUser(selectedTeenId);
}
function _fun102026() { // fn#102026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:457, offset: 0x02228a10, size: 37 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = UserStore.getUser(env0_0);
if (value != null) {
return value;
}
}
function _fun102028() { // fn#102028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13596:620, offset: 0x02228aa4, size: 67 bytes, params: 1, frame: 13
const r1 = env0_0 != null && FamilyCenterControlledSettingsStore.hasSettingsForUser(env0_0);
const value = environment.__proto__;
return {hasLoadedSettings: r1, isLoading: FamilyCenterControlledSettingsStore.isLoading};
}
@@ -0,0 +1,18 @@
/* Metro module 13448; source: modules/parent_tools/hooks/useTimeValue.tsx; dependencies: [31, 2, 10909] */
function _fun102277(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13638:6, offset: 0x022358fa, size: 130 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useTimeValue.tsx');
exports.default = function({initial, defaultValue}) {
return initial.useState(_fun102279);
};
exports.timeToMinutes = (require(10909) /* metro dependency 10909: FamilyCenterRestrictedHoursUtils */).timeToMinutes;
}
function useTimeValue({initial, defaultValue}) { // fn#102278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13638:193, offset: 0x0223597c, size: 51 bytes, params: 2, frame: 11
return initial.useState(function() {
return initial != null ? {hours: initial.hours, minutes: initial.minutes} : defaultValue;
});
}
@@ -0,0 +1,18 @@
/* Metro module 13389; source: modules/parent_tools/hooks/useUserAgeGroup.tsx; dependencies: [5116, 566, 2] */
function _fun101948(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13579:6, offset: 0x02224c08, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useUserAgeGroup.tsx');
exports.default = function() {
return require(dependencyMap[1]).useStateFromStores([FamilyCenterStore], _fun101950);
};
}
function useUserAgeGroup() { // fn#101949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13579:196, offset: 0x02224c7a, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterStore], function() {
return FamilyCenterStore.getAgeGroup();
});
}
@@ -0,0 +1,16 @@
/* Metro module 11469; source: modules/parent_tools/hooks/useUserIsConsideredAdult.tsx; dependencies: [1878, 566, 2] */
function _fun87809(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11655:6, offset: 0x01fcc1f4, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useUserIsConsideredAdult.tsx');
exports.default = function() {
return require(dependencyMap[1]).useStateFromStores([UserStore], _fun87811);
};
}
function useUserIsConsideredAdult() { // fn#87810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11655:205, offset: 0x01fcc266, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun87811);
}
@@ -0,0 +1,18 @@
/* Metro module 13424; source: modules/parent_tools/hooks/useUserIsTeenAgeGroup.tsx; dependencies: [5116, 566, 2] */
function _fun102139(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13614:6, offset: 0x0222e864, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useUserIsTeenAgeGroup.tsx');
exports.default = useUserIsTeenAgeGroup;
}
function useUserIsTeenAgeGroup() { // fn#102140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13614:202, offset: 0x0222e8d6, size: 69 bytes, params: 1, frame: 13
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
return Reflect.apply(useStateFromStores, fluxModule, [[FamilyCenterStore], function() {
return FamilyCenterStore.getAgeGroup();
}]) === 'teen';
}
@@ -0,0 +1,252 @@
/* Metro module 8170; source: modules/parent_tools/hooks/useUserLinks.tsx; dependencies: [31, 1878, 5116, 5117, 632, 8171, 8172, 5187, 2] */
function _fun65555(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:6, offset: 0x01bd37ad, size: 392 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = useUserIdsForLinkStatus;
const closure2 = function() {
return useUserIdsForLinkStatus(UserLinkStatus.ACTIVE);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
const familyCenterConstantsModule = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_6 = familyCenterConstantsModule.ACCEPTED_LINK_REQUEST_TIMESTAMP_FORMATTER;
const env0_7 = familyCenterConstantsModule.FAMILY_CENTER_REQUEST_QR_CODE_URL;
const env0_8 = familyCenterConstantsModule.MAX_PARENT_TO_TEEN_ACTIVE_CONNECTIONS;
const env0_9 = familyCenterConstantsModule.MAX_TEEN_TO_PARENT_ACTIVE_CONNECTIONS;
const env0_10 = familyCenterConstantsModule.PENDING_LINK_REQUEST_TIMESTAMP_FORMATTER;
const env0_11 = familyCenterConstantsModule.UserLinkStatus;
const env0_12 = familyCenterConstantsModule.UserLinkType;
const closure3 = useUsersForLinkStatus;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/hooks/useUserLinks.tsx');
exports.useUserIdsForLinkStatus = closure;
exports.useUsersForLinkStatus = closure3;
exports.useActiveLinkUserIds = closure2;
exports.useActiveLinkUsers = function() {
return useUsersForLinkStatus(UserLinkStatus.ACTIVE);
};
exports.useHasActiveLinks = function() {
return useActiveLinkUserIds().length > 0;
};
exports.useHasActiveParentLinks = useHasActiveParentLinks;
exports.useUserQRLinkUrl = useUserQRLinkUrl;
exports.useHasMaxConnections = function() {
return useActiveLinkUserIds().length >= (importDefault(dependencyMap[5])() ? MAX_PARENT_TO_TEEN_ACTIVE_CONNECTIONS : MAX_TEEN_TO_PARENT_ACTIVE_CONNECTIONS);
};
exports.usePendingRequestCount = usePendingRequestCount;
exports.useAcceptedRequestsCount = function() {
return useActiveLinkUserIds().length;
};
exports.useActivityWindowTimeStamp = useActivityWindowTimeStamp;
exports.useLinkTimestampText = useLinkTimestampText;
}
function useUserIdsForLinkStatus(a0) { // fn#65556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:387, offset: 0x01bd3935, size: 104 bytes, params: 2, frame: 16
const env0_0 = a0;
return env0_3.useMemo(_fun65558,
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkedUsers();
}), a0]);
}
function useUsersForLinkStatus(a0) { // fn#65564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:721, offset: 0x01bd3aad, size: 93 bytes, params: 2, frame: 15
const env0_0 = useUserIdsForLinkStatus(a0);
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
return Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[UserStore],
_fun65565]).filter(function(a0) {
return a0 != null;
});
}
function useHasActiveParentLinks() { // fn#65570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1318, offset: 0x01bd3b71, size: 93 bytes, params: 1, frame: 15
return env0_3.useMemo(_fun65572,
[(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkedUsers();
})]);
}
function useUserQRLinkUrl() { // fn#65574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1550, offset: 0x01bd3c3c, size: 133 bytes, params: 1, frame: 19
const linkCode = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkCode();
});
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const value2 = null;
return value2 == linkCode || value2 == currentUser ? value2 : FAMILY_CENTER_REQUEST_QR_CODE_URL(currentUser.id,
linkCode);
}
function usePendingRequestCount() { // fn#65578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1886, offset: 0x01bd3d11, size: 153 bytes, params: 1, frame: 19
var length;
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const linkedUsers = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getLinkedUsers();
});
let value = 0;
if (currentUser == null) {
length = value;
} else {
value = global.Object.values(linkedUsers);
length = value.filter(_fun65581).length;
}
return length;
}
function useActivityWindowTimeStamp(a0) { // fn#65583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2285, offset: 0x01bd3dfe, size: 182 bytes, params: 2, frame: 18
var r0;
var formatUserActivityTimestamp;
var Date;
var value4;
var date;
const env0_0 = a0;
var value;
const env0_1 = (require(8172) /* metro dependency 8172: useSelectedTeen */).useSelectedTeenId();
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
_fun65584);
const value3 = null;
if (value3 == value2) {
r0 = value3;
} else {
value = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
formatUserActivityTimestamp = value.formatUserActivityTimestamp;
Date = global.Date;
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date(value2);
value = Reflect.apply(formatUserActivityTimestamp, value, [(date instanceof Object ? date : value4).getTime(),
_fun65585, 7]);
r0 = value;
}
return r0;
}
function useLinkTimestampText(a0, a1) { // fn#65586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2551, offset: 0x01bd3ed9, size: 153 bytes, params: 3, frame: 16
var r0;
var moduleValue2;
const env0_0 = a0;
const linkTimestamp = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
_fun65587);
const value2 = null;
if (value2 != linkTimestamp) {
moduleValue2 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
r0 = moduleValue2.formatLinkTimestamp(global.Date.parse(linkTimestamp),
a1 === UserLinkStatus.PENDING ? PENDING_LINK_REQUEST_TIMESTAMP_FORMATTER : ACCEPTED_LINK_REQUEST_TIMESTAMP_FORMATTER);
} else {
r0 = value2;
}
return r0;
}
function _fun65558() { // fn#65558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:504, offset: 0x01bd39b0, size: 98 bytes, params: 1, frame: 12
const Object = global.Object;
let value = Object.values(linkedUsers);
value = value.filter(_fun65559);
value = value.sort(function(a0, a1) {
var Date = global.Date;
var value2 = new Date(a0.updated_at);
value2 = value2.getTime();
Date = global.Date;
var updated_at2 = a1.updated_at;
var value3 = Object.create(Date.prototype, {constructor: {value: Date}});
var value4 = new Date(updated_at2);
return value2 - (value4 instanceof Object ? value4 : value3).getTime();
});
value = value.map(function(a0) {
return a0.user_id;
});
return value.filter(function(a0) {
return a0 != null;
});
}
function _fun65565() { // fn#65565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:802, offset: 0x01bd3b0a, size: 28 bytes, params: 1, frame: 11
return env0_0.map(function(a0) {
return UserStore.getUser(a0);
});
}
function _fun65572() { // fn#65572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1434, offset: 0x01bd3bce, size: 47 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.values(linkedUsers).some(_fun65573);
}
function _fun65581(a0) { // fn#65581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2084, offset: 0x01bd3daa, size: 64 bytes, params: 2, frame: 4
var r0;
var link_status;
let value = a0 != null;
if (value) {
link_status = a0.link_status;
value = environment.__proto__;
value = link_status === UserLinkStatus.PENDING;
r0 = value;
} else {
r0 = value;
}
r0 = r0 && currentUser.id !== a0.requestor_id;
return r0;
}
function _fun65584() { // fn#65584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2392, offset: 0x01bd3eb4, size: 37 bytes, params: 1, frame: 10
var r0;
let value = null;
if (value == env0_1) {
r0 = value;
} else {
value = environment.__proto__;
value = FamilyCenterStore.getRangeStartTimestamp();
r0 = value;
}
return r0;
}
function _fun65587() { // fn#65587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:2624, offset: 0x01bd3f72, size: 29 bytes, params: 1, frame: 11
return FamilyCenterStore.getLinkTimestamp(env0_0);
}
function _fun65559(a0) { // fn#65559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:533, offset: 0x01bd3a12, size: 31 bytes, params: 2, frame: 3
var r0;
var link_status;
let value = a0 != null;
if (value) {
link_status = a0.link_status;
value = environment.__proto__;
value = link_status === env1_0;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun65573(a0) { // fn#65573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8355:1461, offset: 0x01bd3bfd, size: 63 bytes, params: 2, frame: 4
var r0;
var link_status;
var link_type;
let value = a0 != null;
if (value) {
link_status = a0.link_status;
value = environment.__proto__.__proto__;
value = link_status === UserLinkStatus.ACTIVE;
r0 = value;
} else {
r0 = value;
}
if (r0) {
link_type = a0.link_type;
value = environment.__proto__.__proto__;
value = link_type === UserLinkType.PARENT;
r0 = value;
}
return r0;
}
@@ -0,0 +1,676 @@
/* Metro module 13420; source: modules/parent_tools/native/ChangeSpendingLimitModal.tsx; dependencies: [5, 31, 27, 33, 4501, 697, 8129, 4573, 1244, 2224, 13421, 3857, 4073, 5080, 3856, 5137, 6258, 6259, 4572, 7981, 10120, 6261, 4578, 5282, 10121, 2] */
function _fun102109(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13610:6, offset: 0x0222d270, size: 449 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const StyleSheet = value.StyleSheet;
const env0_5 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
const INPUT_FIELD_RADIUS_LG = (importDefault(697) /* metro dependency 697: native */).modules.mobile.INPUT_FIELD_RADIUS_LG;
object4['borderRadius'] = INPUT_FIELD_RADIUS_LG;
object4['borderWidth'] = 1;
let ICON_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING;
object4['borderColor'] = ICON_FEEDBACK_WARNING;
const BACKGROUND_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_WARNING;
object4['backgroundColor'] = BACKGROUND_FEEDBACK_WARNING;
object3.warningOverlay = object4;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.warningRow = {'flexDirection': 'row', 'gap': null, 'alignItems': 'flex-start', gap: PX_8};
ICON_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING;
object3.warningText = {flex: 1, color: ICON_FEEDBACK_WARNING};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/ChangeSpendingLimitModal.tsx');
exports.default = ChangeSpendingLimitModal;
}
function renderMonthlySpendLine(a0, a1, a2, a3) { // fn#102110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13610:568, offset: 0x0222d431, size: 388 bytes, params: 5, frame: 25
var r1;
var r0;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var items2;
const value = null;
if (value == a0) {
r0 = value;
} else {
if (a1) {
var viewBindingProps = {style: a3.warningRow};
items2 = [((WarningIcon) => <WarningIcon size="xs" color={(importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING} />)((require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon)];
items2[1] = <Text variant="text-sm/normal" style={a3.warningText}>{intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Tk6x4X,
{amount: a0, date: a2})}</Text>;
r1 = <View {...viewBindingProps}>{items2}</View>;
} else {
r1 = <Text variant="text-sm/normal" color="text-muted">{intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).pfAlRY,
{amount: a0})}</Text>;
}
r0 = r1;
}
return r0;
}
function ChangeSpendingLimitScreen({teenId}) { // fn#102111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13610:1016, offset: 0x0222d5b5, size: 1295 bytes, params: 2, frame: 54
var r11;
var object;
var object2;
const styles = useStyles();
const value3 = (require(13421) /* metro dependency 13421: ChangeSpendingLimitFormState */).useChangeSpendingLimitFormState(teenId);
const amountInput = value3.amountInput;
const handleAmountChange = value3.handleAmountChange;
const currency = value3.currency;
const currencySymbol = value3.currencySymbol;
const exponent = value3.exponent;
const isClearingCap = value3.isClearingCap;
const isOverspending = value3.isOverspending;
const canSave = value3.canSave;
const isSubmitting = value3.isSubmitting;
const renewalDate = value3.renewalDate;
const monthlySpend = value3.monthlySpend;
const env0_0 = value3.save;
const value4 = _fun102112();
const r22 = monthlySpend != null && monthlySpend > 0 ? (require(5137) /* metro dependency 5137: PriceUtils */).formatPrice(monthlySpend,
currency) : null;
const value7 = amountInput.length > 0;
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const IFguF2 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).IFguF2;
const text = <Text variant="text-sm/normal">{Reflect.apply(string, intl, [IFguF2])}</Text>;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const items2 = [<Text variant="text-sm/semibold" color="text-subtle">{(require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['1fHSu2'])}</Text>];
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const textInputProps = {accessibilityLabel: (require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['1fHSu2']),
value: amountInput, onChange: handleAmountChange, leadingText: value7 ? currencySymbol : undefined};
string = intl.string;
const DjSv82 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).DjSv82;
textInputProps.placeholder = Reflect.apply(string, intl, [DjSv82]);
textInputProps.keyboardType = exponent > 0 ? 'decimal-pad' : 'number-pad';
textInputProps.isClearable = true;
items2[1] = <View><TextInput {...textInputProps} />{isOverspending ? <View style={styles.warningOverlay} pointerEvents="none" /> : null}</View>;
items2[2] = renderMonthlySpendLine(r22, isOverspending, renewalDate, styles);
const modalContent = <ModalContent><Stack spacing={PX_16}>{text}<Stack2 spacing={PX_8}>{items2}</Stack2></Stack></ModalContent>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
if (isClearingCap) {
object2 = {variant: 'destructive'};
object2.text = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).JZDGJ8);
object2.onPress = value4;
object2.disabled = isSubmitting;
object2.loading = isSubmitting;
r11 = object2;
} else {
object = {};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+']);
object.onPress = value4;
object.disabled = canSave ? isSubmitting : !canSave;
object.loading = isSubmitting;
r11 = object;
}
return (
<ModalScreen>
{modalContent}
<ModalFooter>
<ButtonGroup>
<Button {...r11} />
<Button
variant="tertiary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
/>
</ButtonGroup>
</ModalFooter>
</ModalScreen>
);
}
function ChangeSpendingLimitModal({teenId}) { // fn#102116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13610:2944, offset: 0x0222dc17, size: 158 bytes, params: 2, frame: 18
const value2 = env0_4.useMemo(function() {
return _fun102118(teenId);
}, [teenId]);
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Modal
initialRouteName="CHANGE_SPENDING_LIMIT"
screens={value2}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun102112() { // fn#102112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13610:1313, offset: 0x0222dac4, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun102114);
return _fun102115;
}
function _fun102117() { // fn#102117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13610:3007, offset: 0x0222dcb5, size: 25 bytes, params: 1, frame: 11
return ((a0) => {
var env0_0 = a0;
var object2 = {headerShown: true};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object2.headerTitle = _fun102119;
object2.render = _fun102120;
return {CHANGE_SPENDING_LIMIT: object2};
})(teenId);
}
function* _fun102114() { // fn#102114, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13610:1333, offset: 0x0222daf3, size: 292 bytes, params: 1, frame: 20
var value3;
var binding;
var binding2;
var property;
var value4;
var open;
var object2;
var binding3;
var intl;
var string;
var CircleCheckIcon;
var pop;
var error;
var binding4;
var value5;
var presentFailedToast;
var Wu8BK2;
if (true) {
value = environment.__proto__.__proto__;
try {
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
value = require();
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
yield value;
try {
value = undefined;
value3 = false;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
if (value3) {
return value;
}
value = environment.__proto__.__proto__.__proto__;
try {
binding = env3_1;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
binding2 = env3_2;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
property = binding2[11];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
open = value4.open;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
object2 = {};
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
object2.key = 'SPENDING_CONTROLS_CHANGED';
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
binding3 = env3_0;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
property = binding2[8];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
value = binding3(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
intl = value.intl;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
string = intl.string;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
property = binding2[9];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
property = value['2WKfG1'];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
value = Reflect.apply(string, intl, [property]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
object2.content = value;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
property = binding2[12];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
value = binding3(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
CircleCheckIcon = value.CircleCheckIcon;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
object2.IconComponent = CircleCheckIcon;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
object2.iconColor = 'status-positive';
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
Reflect.apply(open, value4, [object2]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
property = binding2[13];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
pop = value.pop;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
return undefined;
}
try {
Reflect.apply(pop, value, []);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding4 = env3_2;
value5 = binding(binding4[14]);
presentFailedToast = value5.presentFailedToast;
intl = binding(binding4[8]).intl;
string = intl.string;
binding = env3_1;
Wu8BK2 = binding(binding4[9]).Wu8BK2;
Reflect.apply(presentFailedToast, value5, [Reflect.apply(string, intl, [Wu8BK2])]);
}
}
}
function getScreens_102118(a0) { // fn#102118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13610:3011, offset: 0x0222dcce, size: 116 bytes, params: 2, frame: 17
const env0_0 = a0;
const object = {headerShown: true};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object.headerTitle = headerTitle_102119;
object.render = render_102120;
return {CHANGE_SPENDING_LIMIT: object};
}
function getScreens_102118HeaderTitle() { // fn#102119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13610:3146, owner: getScreens_102118.headerTitle, offset: 0x0222dd42, size: 107 bytes, params: 1, frame: 18
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Text variant="text-md/semibold">
{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).xMRO6A)}
</Text>
);
}
function getScreens_102118Render() { // fn#102120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13610:3247, owner: getScreens_102118.render, offset: 0x0222ddad, size: 35 bytes, params: 1, frame: 13
return <ChangeSpendingLimitScreen teenId={env0_0} />;
}
@@ -0,0 +1,77 @@
/* Metro module 15800; source: modules/parent_tools/native/ConnectGuardianCard.tsx; dependencies: [31, 27, 1878, 5117, 33, 4501, 697, 632, 8994, 7054, 1244, 2224, 4572, 9181, 4573, 4690, 2] */
function _fun121393(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16008:6, offset: 0x025470c3, size: 341 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).FAMILY_CENTER_REQUEST_QR_CODE_URL;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.padding = PX_12;
object.borderWidth = 1;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
const BORDER_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_NORMAL;
object.borderColor = BORDER_NORMAL;
const env0_9 = Reflect.apply(createStyles, value, [{card: object, countdown: {textAlign: 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/ConnectGuardianCard.tsx');
exports.ConnectGuardianCard = ConnectGuardianCard;
}
function ConnectGuardianCard({linkCode, expiresAt, onRefresh}) { // fn#121394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16008:487, offset: 0x02547218, size: 562 bytes, params: 2, frame: 30
var environment;
let value = environment;
const styles = useStyles();
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
_fun121395);
const value3 = (importDefault(8994) /* metro dependency 8994: useStableCallback */)(onRefresh);
const {days, hours, minutes, seconds} = (importDefault(7054) /* metro dependency 7054: useCountdown */)(expiresAt);
env0_3.useEffect(_fun121396, [expiresAt, value3]);
if (value2 == null) {
return null;
}
const value5 = FAMILY_CENTER_REQUEST_QR_CODE_URL(value2, linkCode);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const RfkLDs = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).RfkLDs;
const value6 = Reflect.apply(string, intl, [RfkLDs]);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const QRCodeWithOverlay = (require(9181) /* metro dependency 9181: QRCode */).QRCodeWithOverlay;
const items2 = [<QRCodeWithOverlay size={160} text={value5} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const getTimeFormat = (require(4690) /* metro dependency 4690: TimeUtils */).getTimeFormat;
value = Reflect.apply(getTimeFormat, value, [86400 * days + 3600 * hours + 60 * minutes + seconds]);
items2[1] = <Text style={styles.countdown} variant="text-xs/normal">{'' + value6 + ' ' + value}</Text>;
return (
<View style={styles.card}>
<Stack align="center" spacing={PX_8}>
{items2}
</Stack>
</View>
);
}
function _fun121395() { // fn#121395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16008:598, offset: 0x0254744a, size: 34 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.id;
}
function _fun121396() { // fn#121396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16008:745, offset: 0x0254746c, size: 79 bytes, params: 1, frame: 15
const expiresAtBinding = expiresAt;
const Date = global.Date;
const value2 = expiresAtBinding - Date.now();
if (value2 <= 0) {
env0_1();
return undefined;
}
const env0_0 = global.setTimeout(env0_1, value2);
return _fun121397;
}
@@ -0,0 +1,112 @@
/* Metro module 13428; source: modules/parent_tools/native/FamilyCenterAcceptedLinks.tsx; dependencies: [31, 27, 5117, 33, 4501, 697, 8171, 8170, 12627, 1244, 2224, 4573, 13429, 13431, 5278, 5080, 13434, 1962, 1305, 13436, 2] */
function _fun102152(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13618:6, offset: 0x0222f755, size: 474 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_4 = value.MAX_PARENT_TO_TEEN_ACTIVE_CONNECTIONS;
const env0_5 = value.MAX_TEEN_TO_PARENT_ACTIVE_CONNECTIONS;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
const object = {'display': 'flex', 'justifyContent': 'center'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const env0_8 = Reflect.apply(createStyles, value, [{container: {marginTop: 24}, content: object,
empty: {'padding': 20, 'alignSelf': 'center'}, header: {marginBottom: 10}}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object2 = {'backgroundColor': null, 'tintColor': null, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center', 'height': 32, 'width': 32};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.tintColor = INTERACTIVE_TEXT_DEFAULT;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_9 = Reflect.apply(createStyles, value, [{actionButton: object2}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterAcceptedLinks.tsx');
exports.default = FamilyCenterAcceptedLinks;
}
function FamilyCenterAcceptedLinkRow({otherUser}) { // fn#102153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13618:730, offset: 0x0222f92f, size: 320 bytes, params: 2, frame: 27
var r0;
var FamilyCenterLinkRow;
var object2;
var PressableOpacity;
var intl;
var formatToPlainString;
var T7DUoU;
var object4;
const styles = useStyles();
if (otherUser === undefined) {
r0 = null;
} else {
FamilyCenterLinkRow = importDefault(13431) /* metro dependency 13431: FamilyCenterLinkRow */;
object2 = {otherUser: otherUser};
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
T7DUoU = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).T7DUoU;
object4 = {};
object4.name = otherUser?.toString();
object2.actions = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(formatToPlainString,
intl, [T7DUoU,
object4])} onPress={onPress_102154} style={styles.actionButton}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(13436) /* metro dependency 13436 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>;
r0 = <FamilyCenterLinkRow {...object2} />;
}
return r0;
}
function FamilyCenterAcceptedLinks() { // fn#102155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13618:1296, offset: 0x0222fac6, size: 484 bytes, params: 1, frame: 28
const styles = useStyles();
const value2 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const value3 = (require(8170) /* metro dependency 8170: useUserLinks */).useActiveLinkUsers();
const r0 = value2 ? MAX_PARENT_TO_TEEN_ACTIVE_CONNECTIONS : MAX_TEEN_TO_PARENT_ACTIVE_CONNECTIONS;
const object2 = {};
object2.count = value3.length;
object2.max = r0;
const useAgeSpecificTextModule = require(12627) /* metro dependency 12627: useAgeSpecificText */;
const useAgeSpecificText = useAgeSpecificTextModule.useAgeSpecificText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value5 = Reflect.apply(useAgeSpecificText, useAgeSpecificTextModule,
[intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['+tnO34'],
object2),
intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['pu6/U0'],
object2)]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.container}>
<Text
style={styles.header}
variant="eyebrow"
color="text-default"
>
{value5}
</Text>
<View style={styles.content}>
{value3.length === 0 ? <View style={styles.empty}>{((Component) => <Component text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).C4ScLD)} />)(importDefault(13429) /* metro dependency 13429: FamilyCenterEmpty */)}</View> : value3.map(_fun102156)}
</View>
</View>
);
}
function FamilyCenterAcceptedLinkRowOnPress() { // fn#102154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13618:1015, owner: FamilyCenterAcceptedLinkRow.onPress, offset: 0x0222fa6f, size: 87 bytes, params: 1, frame: 15
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[15]);
const pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[17]);
value = value(dependencyMap[16], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {otherUser: otherUser}]);
}
function _fun102156(a0) { // fn#102156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13618:1819, offset: 0x0222fcaa, size: 61 bytes, params: 2, frame: 16
const value = environment.__proto__;
return <FamilyCenterAcceptedLinkRow otherUser={a0} key={'accepted-' + a0.id} />;
}
@@ -0,0 +1,95 @@
/* Metro module 13392; source: modules/parent_tools/native/FamilyCenterActivityBanner.tsx; dependencies: [31, 27, 33, 4501, 8170, 8171, 13393, 697, 12627, 1244, 2224, 13396, 13397, 4573, 6766, 2] */
function _fun101957(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13582:6, offset: 0x02225110, size: 422 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.Image;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
const env0_7 = Reflect.apply(createStyles, value, [{container: {'display': 'flex', 'flexDirection': 'row'}}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object3 = {};
const object4 = {'backgroundColor': null, 'marginTop': 16, 'padding': 24, 'alignItems': 'center',
'borderRadius': null, 'elevation': 2};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.container = object4;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.art = {'maxWidth': 243, 'maxHeight': 119, marginBottom: PX_8};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.header = {marginBottom: PX_8, textAlign: 'center'};
object3.description = {textAlign: 'center'};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivityBanner.tsx');
exports.default = FamilyCenterActivityBanner;
}
function FamilyCenterActivityBannerButton() { // fn#101958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13582:233, offset: 0x022252b6, size: 175 bytes, params: 1, frame: 19
var r0;
var value;
const styles = useStyles();
const value2 = (require(8170) /* metro dependency 8170: useUserLinks */).useHasActiveLinks();
const value3 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const value4 = (require(8170) /* metro dependency 8170: useUserLinks */).useHasMaxConnections();
const value5 = null;
if (value4) {
r0 = value5;
} else if (value3) {
if (value2) {
r0 = value5;
} else {
var viewBindingProps = {style: styles.container};
value = require(13393) /* metro dependency 13393: FamilyCenterBannerButton */;
value = <View {...viewBindingProps}>{((Component) => <Component />)(value3 ? value.FamilyCenterParentQRCodeButton : value.FamilyCenterTeenQRCodeButton)}</View>;
r0 = value;
}
} else {
var viewBindingProps = {style: styles.container};
value = require(13393) /* metro dependency 13393: FamilyCenterBannerButton */;
value = <View {...viewBindingProps}>{((Component) => <Component />)(value3 ? value.FamilyCenterParentQRCodeButton : value.FamilyCenterTeenQRCodeButton)}</View>;
r0 = value;
}
return r0;
}
function FamilyCenterActivityBanner() { // fn#101959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13582:936, offset: 0x02225365, size: 553 bytes, params: 1, frame: 27
const value2 = importDefault(dependencyMap[5])();
const styles = useStyles();
const value3 = require(dependencyMap[4]).useHasMaxConnections();
const moduleValue2 = require(dependencyMap[8]);
let useAgeSpecificText = moduleValue2.useAgeSpecificText;
const intl = require(dependencyMap[9]).intl;
const value5 = Reflect.apply(useAgeSpecificText, moduleValue2,
[intl.string(importDefault(dependencyMap[10])['T7GyW+']), intl.string(importDefault(dependencyMap[10]).goKE2b)]);
const moduleValue3 = require(dependencyMap[8]);
useAgeSpecificText = moduleValue3.useAgeSpecificText;
let format = intl.format;
const MXjDSv = importDefault(dependencyMap[10]).MXjDSv;
const value6 = Reflect.apply(format, intl, [MXjDSv,
{articleLink: 'https://support.discord.com/hc/articles/14155060633623'}]);
format = intl.format;
const EMCf6j = importDefault(dependencyMap[10]).EMCf6j;
const value7 = Reflect.apply(useAgeSpecificText, moduleValue3, [value6, Reflect.apply(format, intl, [EMCf6j,
{articleLink: 'https://support.discord.com/hc/articles/14155043715735'}])]);
const items2 = [<Image source={importDefault(value2 ? dependencyMap[11] : dependencyMap[12])} style={styles.art} />];
const Text = require(dependencyMap[13]).Text;
items2[1] = <Text style={styles.header} variant="heading-lg/semibold">{value5}</Text>;
const TextWithIOSLinkWorkaround = require(dependencyMap[14]).TextWithIOSLinkWorkaround;
items2[2] = <TextWithIOSLinkWorkaround style={styles.description} variant="text-sm/medium" color="text-muted">{value7}</TextWithIOSLinkWorkaround>;
items2[3] = value3 ? null : <FamilyCenterActivityBannerButton />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
@@ -0,0 +1,391 @@
/* Metro module 13402; source: modules/parent_tools/native/FamilyCenterActivityCard.tsx; dependencies: [31, 27, 5117, 661, 33, 4501, 697, 8171, 8170, 5187, 12627, 1244, 2224, 1305, 13403, 4573, 8792, 5080, 13404, 1962, 7548, 13405, 13406, 12624, 4080, 3856, 3995, 9059, 683, 10787, 13407, 13408, 13409, 13412, 13419, 2] */
function _fun101992(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:6, offset: 0x02226c00, size: 1427 bytes, params: 8, frame: 30
var object3;
const env0_0 = require;
const closure = FamilyCenterActivityCardHeader;
const closure2 = FamilyCenterActivityCardAccountSelect;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const familyCenterConstantsModule = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_5 = familyCenterConstantsModule.FamilyCenterAction;
const env0_6 = familyCenterConstantsModule.TeenActionDisplayType;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value3 = require(33) /* metro dependency 33 */;
const env0_8 = value3.jsx;
const env0_9 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
object3 = {container: {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'}};
const object6 = {};
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
object6.color = ICON_SUBTLE;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.width = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.height = PX_16;
object3.icon = object6;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.text = {marginHorizontal: PX_4};
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object3]);
const value5 = createStylesModule;
createStyles = value5.createStyles;
object3 = {};
const object7 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'padding': null, 'flex': 1};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object7.padding = PX_12;
let BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object7.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object7.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object7.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.header = object7;
const object8 = {};
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
object8.borderRadius = AVATAR_SIZE_MAP[NORMAL] / 2;
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object8.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.avatar = object8;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.avatarContainer = {marginRight: PX_12, alignItems: 'flex-start'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.userHeader = {'display': 'flex', 'flexDirection': 'column', 'width': '100%', paddingRight: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.nonSelectorHeader = {flex: 1, paddingRight: PX_16};
const env0_12 = Reflect.apply(createStyles, value5, [object3]);
value = value.memo(_fun102005);
value.displayName = 'FamilyCenterActivityCardAccount';
const value6 = createStylesModule;
createStyles = value6.createStyles;
object3 = {};
const object11 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'flex-start'};
BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object11.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object11, SHADOW_LOW, undefined);
object3.touch = object11;
const object12 = {};
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object12.color = INTERACTIVE_TEXT_DEFAULT;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object12.width = PX_24;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object12.height = PX_24;
object12.transform = [{rotate: '90deg'}];
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object12.marginHorizontal = PX_8;
object3.icon = object12;
const env0_14 = Reflect.apply(createStyles, value6, [object3]);
const value7 = createStylesModule;
createStyles = value7.createStyles;
object3 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.card = {marginTop: PX_16};
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.preface = {display: 'flex', marginBottom: PX_12};
const object13 = {};
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object13.backgroundColor = BACKGROUND_SURFACE_HIGH;
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.container = object13;
const object16 = {'padding': null, 'display': 'flex', 'flexDirection': 'column'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object16.padding = PX_16;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object16.gap = PX_32;
object3.content = object16;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.totals = {'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap', 'justifyContent': 'space-between',
gap: PX_8};
object3.first = {width: '100%'};
object3.other = {width: '48.5%'};
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object3.activities = {'display': 'flex', 'flexDirection': 'column', gap: PX_32};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.settingsControls = {marginTop: PX_24};
const env0_15 = Reflect.apply(createStyles, value7, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivityCard.tsx');
exports.default = FamilyCenterActivityCard;
exports.FamilyCenterActivityCardAccount = value;
exports.FamilyCenterActivityCardHeader = closure;
exports.FamilyCenterActivityCardAccountSelect = closure2;
}
function FamilyCenterActivityCardPrefaceText() { // fn#101993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:495, offset: 0x02227193, size: 610 bytes, params: 1, frame: 27
var r5;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var object;
var icon;
const styles = useStyles();
const value2 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const value3 = (require(8170) /* metro dependency 8170: useUserLinks */).useActiveLinkUserIds();
const value5 = (require(8170) /* metro dependency 8170: useUserLinks */).useActivityWindowTimeStamp((require(5187) /* metro dependency 5187: FamilyCenterUtils */).getActivityWindowTimestampFormatter(!!value2));
const useAgeSpecificTextModule = require(12627) /* metro dependency 12627: useAgeSpecificText */;
const useAgeSpecificText = useAgeSpecificTextModule.useAgeSpecificText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value6 = intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).tazvHQ,
{activeLinks: value3.length});
const string = intl.string;
const KrLnkE = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).KrLnkE;
const value7 = Reflect.apply(useAgeSpecificText, useAgeSpecificTextModule, [value6, Reflect.apply(string, intl,
[KrLnkE])]);
if (value2) {
r5 = null;
} else {
object = {};
icon = styles.icon;
object.color = icon.color;
object.source = importDefault(13403) /* metro dependency 13403 */;
icon = styles.icon;
object.style = icon;
r5 = <Icon {...object} />;
}
const items2 = [r5];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={styles.text} variant="text-xs/semibold" color="text-subtle">{value3.length > 1 && value2 ? value5 : value7}</Text>;
const TouchableHitBox = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
const object3 = {onPress: onPress_101994};
const iconProps = {color: styles.icon.color, source: importDefault(7548) /* metro dependency 7548 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const EXTRA_SMALL = Sizes.EXTRA_SMALL;
iconProps.size = EXTRA_SMALL;
iconProps.style = styles.icon;
items2[2] = <TouchableHitBox {...object3}><Icon {...iconProps} /></TouchableHitBox>;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function FamilyCenterHeaderSubText() { // fn#101995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:1238, offset: 0x0222743d, size: 179 bytes, params: 1, frame: 19
const value2 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
if (value2 && (require(8170) /* metro dependency 8170: useUserLinks */).useActiveLinkUserIds().length > 1) {
return null;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-sm/medium" color="text-muted">
{(require(8170) /* metro dependency 8170: useUserLinks */).useActivityWindowTimeStamp((require(5187) /* metro dependency 5187: FamilyCenterUtils */).getActivityWindowTimestampFormatter(!!value2))}
</Text>
);
}
}
function FamilyCenterActivityCardHeader() { // fn#101996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:2579, offset: 0x022274f0, size: 157 bytes, params: 1, frame: 18
const value2 = (require(8170) /* metro dependency 8170: useUserLinks */).useActiveLinkUserIds();
const value3 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const value4 = (require(13406) /* metro dependency 13406: useSelectedTeenUser */).useSelectedTeenUser();
return value4 === undefined ? null : value3 && value2.length !== 1 ? <FamilyCenterActivityCardAccountSelect /> : <View>{((Component) => <Component user={value4} />)(env0_13)}</View>;
}
function FamilyCenterActivityCardAccountSelect() { // fn#101997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:3244, offset: 0x0222758d, size: 393 bytes, params: 1, frame: 26
var r0;
var TouchableHitBox;
var items2;
const styles = useStyles();
const value2 = (require(8170) /* metro dependency 8170: useUserLinks */).useActiveLinkUsers();
const value3 = (require(13406) /* metro dependency 13406: useSelectedTeenUser */).useSelectedTeenUser();
const useFamilyCenterActionsModule = require(12624) /* metro dependency 12624: useFamilyCenterActions */;
const useFamilyCenterActions = useFamilyCenterActionsModule.useFamilyCenterActions;
const env0_2 = Reflect.apply(useFamilyCenterActions, useFamilyCenterActionsModule, [{onSuccess: onSuccess_101998,
onError: function() {
return require(dependencyMap[25]).presentFailedToast(require(dependencyMap[11]).intl.string(importDefault(dependencyMap[12]).Wu8BK2));
}}]).selectTeenUser;
const env0_3Binding = env0_3.useMemo(_fun102000, [value2]);
if (value3 === undefined) {
r0 = null;
} else {
TouchableHitBox = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var defaultImportProps = {style: styles.touch, accessibilityRole: 'spinbutton', onPress: onPress_102002};
items2 = [((Component) => <Component user={value3} inSelector />)(env0_13)];
items2[1] = ((Icon) => <Icon style={styles.icon} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.MEDIUM} source={importDefault(10787) /* metro dependency 10787 */} />)((require(1305) /* metro dependency 1305: native */).Icon);
r0 = <View><TouchableHitBox {...defaultImportProps}>{items2}</TouchableHitBox></View>;
}
return r0;
}
function _fun102005({user, inSelector}) { // fn#102005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:2151, offset: 0x02227982, size: 336 bytes, params: 2, frame: 25
const styles = useStyles();
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const r14 = inSelector ? AvatarSizes.SMALL : AvatarSizes.NORMAL;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const view = <View style={styles.avatarContainer}><Avatar avatarStyle={styles.avatar} user={user} guildId={undefined} disablePlaceholder avatarDecoration={user.avatarDecoration} size={r14} /></View>;
const userHeader = styles.userHeader;
return (
<View style={styles.header}>
{view}
<View style={[userHeader, inSelector ? undefined : styles.nonSelectorHeader]}>
{((Component) => <Component user={user} />)(importDefault(13405) /* metro dependency 13405: FamilyCenterUsernameHeader */)}
<FamilyCenterHeaderSubText />
</View>
</View>
);
}
function FamilyCenterActivityCard() { // fn#102006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:4867, offset: 0x02227ad2, size: 514 bytes, params: 1, frame: 33
const styles = useStyles();
const value2 = (require(13406) /* metro dependency 13406: useSelectedTeenUser */).useSelectedTeenUser();
const value3 = (require(13407) /* metro dependency 13407: useFamilyCenterActivities */).useHasActionForAnyDisplayType();
if (value2 === undefined) {
return null;
}
const sortedActivityTypeConfigs = (require(5187) /* metro dependency 5187: FamilyCenterUtils */).getSortedActivityTypeConfigs();
const items2 = [<View style={styles.preface}><FamilyCenterActivityCardPrefaceText /></View>];
items2[1] = <View style={styles.container}><FamilyCenterActivityCardHeader /><View style={styles.content}><View style={styles.totals}>{sortedActivityTypeConfigs.filter(_fun102007).map(_fun102008)}</View>{((Component) => <Component />)(importDefault(13409) /* metro dependency 13409: FamilyCenterTopActivity */)}{value3 ? <View style={styles.activities}>{sortedActivityTypeConfigs.map(_fun102009)}</View> : null}</View></View>;
items2[2] = <View style={styles.settingsControls}>{((Component) => <Component />)(importDefault(13419) /* metro dependency 13419: FamilyCenterSettingsControls */)}</View>;
return (
<View style={styles.card}>
{items2}
</View>
);
}
function FamilyCenterActivityCardPrefaceTextOnPress() { // fn#101994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:1071, owner: FamilyCenterActivityCardPrefaceText.onPress, offset: 0x022273f5, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[17]);
defaultImport.pushLazy(require(dependencyMap[19])(dependencyMap[18], dependencyMap.paths));
}
function FamilyCenterActivityCardAccountSelectOnSuccess() { // fn#101998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:3412, owner: FamilyCenterActivityCardAccountSelect.onSuccess, offset: 0x02227716, size: 42 bytes, params: 1, frame: 12
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(env1_10);
}
function _fun102000() { // fn#102000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:3553, offset: 0x02227797, size: 28 bytes, params: 1, frame: 11
return env0_0.map(_fun102001);
}
function FamilyCenterActivityCardAccountSelectOnPress() { // fn#102002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:3751, owner: FamilyCenterActivityCardAccountSelect.onPress, offset: 0x02227823, size: 178 bytes, params: 1, frame: 21
const defaultImport = importDefault(dependencyMap[24]);
const openLazy = defaultImport.openLazy;
const value2 = require(dependencyMap[19])(dependencyMap[27], dependencyMap.paths);
const binding = env1_10;
const object2 = {};
const intl = require(dependencyMap[11]).intl;
object2.title = intl.string(importDefault(dependencyMap[12]).vORl9Q);
object2.items = env0_3;
object2.onItemSelect = onItemSelect_102003;
object2.selectedItem = env0_1.id;
object2.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value2, binding, object2]);
}
function _fun102007(a0) { // fn#102007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:5309, offset: 0x02227cd4, size: 50 bytes, params: 2, frame: 5
const iterator = a0[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
let value = undefined;
const value2 = item2 === value;
const r1 = value2 ? value : item;
if (!value2) {
item2.return();
}
value = environment.__proto__;
const GIFTS = TeenActionDisplayType.GIFTS;
return r1 !== GIFTS;
}
function _fun102008(a0, a1) { // fn#102008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:5335, offset: 0x02227d06, size: 175 bytes, params: 3, frame: 19
var r0;
var r1;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r6 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
r0 = item3;
r1 = value3;
}
if (!r1) {
r0.return();
}
return (
<View style={a1 === 0 ? styles.first : styles.other} key={'total-' + r6}>
{((Component) => <Component displayType={r6} />)(importDefault(13408) /* metro dependency 13408: FamilyCenterActivityTotal */)}
</View>
);
}
function _fun102009(a0) { // fn#102009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:5492, offset: 0x02227db5, size: 114 bytes, params: 2, frame: 17
var r0;
var r1;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r6 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
r0 = item3;
r1 = value3;
}
if (!r1) {
r0.return();
}
return ((Component) => <Component displayType={r6} key={'section-' + r6} />)(importDefault(13412) /* metro dependency 13412: FamilyCenterActivitySection */);
}
function _fun102001(a0) { // fn#102001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:3564, offset: 0x022277b3, size: 112 bytes, params: 2, frame: 19
const object2 = {};
let value = environment.__proto__.__proto__;
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(a0);
object2.label = '' + value + ' (' + (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(a0) + ')';
object2.value = a0.id;
return object2;
}
function onPressOnItemSelect_102003(a0) { // fn#102003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:3853, owner: FamilyCenterActivityCardAccountSelect.onPress.onItemSelect, offset: 0x022278d5, size: 131 bytes, params: 2, frame: 14
var environment;
var r0;
var defaultImport;
let value = a0 != null;
if (value) {
value = environment.__proto__;
value = a0 !== env1_1.id;
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = environment.__proto__;
selectTeenUser(a0);
value = environment.__proto__.__proto__;
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.FAMILY_CENTER_ACTION, {action: FamilyCenterAction.SelectTeen});
}
global.setImmediate(_fun102004);
}
function _fun102004() { // fn#102004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13592:3970, offset: 0x02227958, size: 42 bytes, params: 1, frame: 12
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(env3_10);
}
@@ -0,0 +1,107 @@
/* Metro module 13418; source: modules/parent_tools/native/FamilyCenterActivityGiftRow.tsx; dependencies: [31, 27, 33, 4501, 697, 8405, 13406, 13415, 13417, 3995, 13416, 4573, 2] */
function _fun102089(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13608:6, offset: 0x0222bfec, size: 262 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
const env0_6 = Reflect.apply(createStyles, value, [{container: {'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center', 'borderBottomColor': null, 'borderBottomWidth': 1, 'paddingVertical': 12,
borderBottomColor: BORDER_SUBTLE}, textContainer: {'display': 'flex', 'flexDirection': 'column',
'flexShrink': 1}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivityGiftRow.tsx');
exports.default = FamilyCenterActivityGiftRow;
}
function FamilyCenterActivityGiftRow({skuId, subscriptionPlanId, price, gifterUserId, claimed, offeredAt, claimedAt}) { // fn#102090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13608:496, offset: 0x0222c0f2, size: 519 bytes, params: 2, frame: 27
var moduleValue3;
var getGiftSubtext;
var object2;
var value6;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
const styles = useStyles();
const product = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(skuId).product;
const value2 = (require(13406) /* metro dependency 13406: useSelectedTeenUser */).useTeenUserForId(gifterUserId);
const {displayName,
isSubscription} = (require(13415) /* metro dependency 13415: FamilyCenterActivityPurchaseRowUtils */).getPurchaseDisplayInfo(product ?? null,
subscriptionPlanId);
if (skuId == null) {
if (displayName == null) {
return null;
}
moduleValue3 = require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */;
getGiftSubtext = moduleValue3.getGiftSubtext;
object2 = {claimed: claimed, price: price};
object2.gifterName = value2 != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(value2) : null;
object2.offeredAt = offeredAt;
object2.claimedAt = claimedAt;
value6 = Reflect.apply(getGiftSubtext, moduleValue3, [object2]);
var viewBindingProps = {style: styles.container};
items3 = [((Component) => <Component displayName={displayName} product={product ?? null} isSubscription={isSubscription} subscriptionPlanId={subscriptionPlanId} />)(importDefault(13416) /* metro dependency 13416: FamilyCenterActivityItemPreview */)];
var viewBinding2Props = {style: styles.textContainer};
items2 = [<Text variant="text-md/semibold" color="interactive-text-active" ellipsizeMode="tail" lineClamp={1}>{displayName}</Text>];
items2[1] = <Text variant="text-xs/medium" color="text-muted">{value6}</Text>;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
return (
<View {...viewBindingProps}>
{items3}
</View>
);
}
if (isSubscription) {
if (displayName == null) {
return null;
}
moduleValue3 = require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */;
getGiftSubtext = moduleValue3.getGiftSubtext;
object2 = {claimed: claimed, price: price};
object2.gifterName = value2 != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(value2) : null;
object2.offeredAt = offeredAt;
object2.claimedAt = claimedAt;
value6 = Reflect.apply(getGiftSubtext, moduleValue3, [object2]);
var viewBindingProps = {style: styles.container};
items3 = [((Component) => <Component displayName={displayName} product={product ?? null} isSubscription={isSubscription} subscriptionPlanId={subscriptionPlanId} />)(importDefault(13416) /* metro dependency 13416: FamilyCenterActivityItemPreview */)];
var viewBinding2Props = {style: styles.textContainer};
items2 = [<Text variant="text-md/semibold" color="interactive-text-active" ellipsizeMode="tail" lineClamp={1}>{displayName}</Text>];
items2[1] = <Text variant="text-xs/medium" color="text-muted">{value6}</Text>;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
return (
<View {...viewBindingProps}>
{items3}
</View>
);
}
if (product != null) {
if (displayName == null) {
return null;
}
moduleValue3 = require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */;
getGiftSubtext = moduleValue3.getGiftSubtext;
object2 = {claimed: claimed, price: price};
object2.gifterName = value2 != null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(value2) : null;
object2.offeredAt = offeredAt;
object2.claimedAt = claimedAt;
value6 = Reflect.apply(getGiftSubtext, moduleValue3, [object2]);
var viewBindingProps = {style: styles.container};
items3 = [((Component) => <Component displayName={displayName} product={product ?? null} isSubscription={isSubscription} subscriptionPlanId={subscriptionPlanId} />)(importDefault(13416) /* metro dependency 13416: FamilyCenterActivityItemPreview */)];
var viewBinding2Props = {style: styles.textContainer};
items2 = [<Text variant="text-md/semibold" color="interactive-text-active" ellipsizeMode="tail" lineClamp={1}>{displayName}</Text>];
items2[1] = <Text variant="text-xs/medium" color="text-muted">{value6}</Text>;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
return (
<View {...viewBindingProps}>
{items3}
</View>
);
}
return null;
}
@@ -0,0 +1,137 @@
/* Metro module 13416; source: modules/parent_tools/native/FamilyCenterActivityItemPreview.tsx; dependencies: [31, 27, 33, 4501, 13415, 697, 8484, 8498, 10031, 10358, 7958, 7954, 1904, 1901, 2] */
function _fun102077(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13606:6, offset: 0x0222b4cb, size: 665 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.Image;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object5 = {};
const PREVIEW_SIZE = (require(13415) /* metro dependency 13415: FamilyCenterActivityPurchaseRowUtils */).PREVIEW_SIZE;
object5.width = PREVIEW_SIZE;
object5.height = PREVIEW_SIZE;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.display = 'flex';
object5.alignItems = 'center';
object5.justifyContent = 'center';
object5.marginRight = 12;
object3.purchasePlaceholder = object5;
object3.avatarDecorationPreview = {width: PREVIEW_SIZE, height: PREVIEW_SIZE, marginRight: 12};
const object6 = {'width': null, 'height': null, 'marginRight': 12, 'borderRadius': null, 'overflow': 'hidden',
'position': 'relative'};
object6.width = PREVIEW_SIZE;
object6.height = PREVIEW_SIZE;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.nameplateContainer = object6;
const NAMEPLATE_ASPECT_RATIO = (require(13415) /* metro dependency 13415: FamilyCenterActivityPurchaseRowUtils */).NAMEPLATE_ASPECT_RATIO;
object3.nameplatePreview = {'position': 'absolute', 'right': 0, width: PREVIEW_SIZE * NAMEPLATE_ASPECT_RATIO,
height: PREVIEW_SIZE};
object3.profileFrameContainer = {'width': null, 'height': null, 'marginRight': 12, 'alignItems': 'center',
'justifyContent': 'center', width: PREVIEW_SIZE, height: PREVIEW_SIZE};
const env0_6 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivityItemPreview.tsx');
exports.default = FamilyCenterActivityItemPreview;
}
function AvatarDecorationPreviewImage({product, styles}) { // fn#102078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13606:964, offset: 0x0222b764, size: 105 bytes, params: 2, frame: 17
const avatarDecorationPreviewUrl = (require(13415) /* metro dependency 13415: FamilyCenterActivityPurchaseRowUtils */).getAvatarDecorationPreviewUrl(product);
return avatarDecorationPreviewUrl == null ? null : <Image source={{uri: avatarDecorationPreviewUrl}} style={styles.avatarDecorationPreview} fadeDuration={0} />;
}
function NameplatePreviewImage({nameplateData, styles}) { // fn#102079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13606:1148, offset: 0x0222b7cd, size: 145 bytes, params: 2, frame: 19
const nameplateUtilsModule = require(8484) /* metro dependency 8484: NameplateUtils */;
const getNameplateAssets = nameplateUtilsModule.getNameplateAssets;
const staticImageUrl = Reflect.apply(getNameplateAssets, nameplateUtilsModule, [nameplateData]).staticImageUrl;
return staticImageUrl == null ? null : <View style={styles.nameplateContainer}><Image source={{uri: staticImageUrl}} style={styles.nameplatePreview} resizeMode="cover" fadeDuration={0} /></View>;
}
function ProfileEffectPreviewImage({product, styles}) { // fn#102080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13606:1401, offset: 0x0222b85e, size: 105 bytes, params: 2, frame: 17
const profileEffectPreviewUrl = (require(13415) /* metro dependency 13415: FamilyCenterActivityPurchaseRowUtils */).getProfileEffectPreviewUrl(product);
return profileEffectPreviewUrl == null ? null : <Image source={{uri: profileEffectPreviewUrl}} style={styles.avatarDecorationPreview} fadeDuration={0} />;
}
function ProfileFramePreviewImage({product, styles}) { // fn#102081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13606:1585, offset: 0x0222b8c7, size: 228 bytes, params: 2, frame: 22
var r0;
var ProfileFrameSamplePreview;
var object2;
const PREVIEW_SIZE = (require(13415) /* metro dependency 13415: FamilyCenterActivityPurchaseRowUtils */).PREVIEW_SIZE;
const value2 = (importDefault(8498) /* metro dependency 8498: useMaybeFetchProfileFrame */)(product.skuId,
'FamilyCenterActivityItemPreview');
if (value2 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.profileFrameContainer};
ProfileFrameSamplePreview = importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */;
r0 = <View {...viewBindingProps}><ProfileFrameSamplePreview profileFrame={value2} previewWidth={PREVIEW_SIZE * (require(13415) /* metro dependency 13415: FamilyCenterActivityPurchaseRowUtils */).PROFILE_FRAME_ASPECT_RATIO} previewHeight={PREVIEW_SIZE} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} /></View>;
}
return r0;
}
function SubscriptionPreview({subscriptionPlanId, styles}) { // fn#102082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13606:1944, offset: 0x0222b9ab, size: 264 bytes, params: 2, frame: 18
if (subscriptionPlanId == null) {
return (
<View style={styles.purchasePlaceholder}>
{((ShopIcon) => <ShopIcon size="custom" style={{'width': 20,
'height': 20}} />)((require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon)}
</View>
);
}
return (
<View style={styles.purchasePlaceholder}>
{((Component) => <Component size="custom" style={{'width': 20,
'height': 20}} />)((require(13415) /* metro dependency 13415: FamilyCenterActivityPurchaseRowUtils */).isGuildBoostSubscription(subscriptionPlanId) ? (require(7958) /* metro dependency 7958: BoostGemIcon */).BoostGemIcon : (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}
</View>
);
}
function CollectiblePreview({product, styles}) { // fn#102083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13606:2312, offset: 0x0222bab3, size: 511 bytes, params: 2, frame: 20
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
var nameplateDataFromProductRecord;
let value = null;
if (value == product) {
value = environment;
} else {
var type = product.type;
var CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
var AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return <AvatarDecorationPreviewImage product={product} styles={styles} />;
}
var NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
nameplateDataFromProductRecord = (require(1901) /* metro dependency 1901: utils */).getNameplateDataFromProductRecord(product);
return value != nameplateDataFromProductRecord ? <NameplatePreviewImage nameplateData={nameplateDataFromProductRecord} styles={styles} /> : value;
}
var PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return <ProfileEffectPreviewImage product={product} styles={styles} />;
}
var PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return <ProfileFramePreviewImage product={product} styles={styles} />;
}
}
return (
<View style={styles.purchasePlaceholder}>
<ShopIcon size="custom" style={{'width': 20, 'height': 20}} />
</View>
);
}
function FamilyCenterActivityItemPreview({displayName, product, isSubscription, subscriptionPlanId}) { // fn#102084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13606:3203, offset: 0x0222bcb2, size: 124 bytes, params: 2, frame: 20
const styles = useStyles();
return (
<View accessible accessibilityLabel={displayName}>
{isSubscription ? <SubscriptionPreview subscriptionPlanId={subscriptionPlanId} styles={styles} /> : <CollectiblePreview product={product} styles={styles} />}
</View>
);
}
@@ -0,0 +1,64 @@
/* Metro module 13391; source: modules/parent_tools/native/FamilyCenterActivityPage.tsx; dependencies: [31, 27, 33, 4501, 697, 8170, 6618, 13392, 13398, 12626, 13402, 2] */
function _fun101955(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13581:6, offset: 0x02224e8f, size: 313 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.scrollView = {flex: 1};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.dataConfirmation = {marginTop: PX_8};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingBottom = PX_16;
object2.container = object3;
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivityPage.tsx');
exports.default = FamilyCenterActivityPage;
}
function FamilyCenterActivityPage() { // fn#101956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13581:457, offset: 0x02224fc8, size: 328 bytes, params: 1, frame: 29
var r8;
var jsxRuntimeEnv0_6Binding;
var items2;
var value;
const styles = useStyles();
const value2 = (require(8170) /* metro dependency 8170: useUserLinks */).useActiveLinkUserIds();
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
if (value2.length === 0) {
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
items2 = [((Component) => <Component />)(importDefault(13392) /* metro dependency 13392: FamilyCenterActivityBanner */)];
items2[1] = ((Component) => <Component />)(importDefault(13398) /* metro dependency 13398: FamilyCenterFeatureRow */);
var viewBinding2Props = {style: styles.dataConfirmation};
value = importDefault(12626) /* metro dependency 12626: FamilyCenterDataConfirmation */;
items2[2] = <View {...viewBinding2Props}>{((Component) => <Component source="activity-page" />)(value)}</View>;
value = <>{items2}</>;
r8 = value;
} else {
value = importDefault(13402) /* metro dependency 13402: FamilyCenterActivityCard */;
value = ((Component) => <Component />)(value);
r8 = value;
}
return (
<ScrollView style={styles.scrollView}>
<SafeAreaPaddingView bottom>
<View style={styles.container}>
{r8}
</View>
</SafeAreaPaddingView>
</ScrollView>
);
}
@@ -0,0 +1,89 @@
/* Metro module 13414; source: modules/parent_tools/native/FamilyCenterActivityPurchaseRow.tsx; dependencies: [31, 27, 33, 4501, 697, 8405, 13415, 5137, 13416, 4573, 2] */
function _fun102069(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13604:6, offset: 0x0222ada3, size: 262 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
const env0_6 = Reflect.apply(createStyles, value, [{container: {'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center', 'borderBottomColor': null, 'borderBottomWidth': 1, 'paddingVertical': 12,
borderBottomColor: BORDER_SUBTLE}, textContainer: {'display': 'flex', 'flexDirection': 'column',
'flexShrink': 1}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivityPurchaseRow.tsx');
exports.default = FamilyCenterActivityPurchaseRow;
}
function FamilyCenterActivityPurchaseRow({skuId, subscriptionPlanId, total, currency}) { // fn#102070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13604:500, offset: 0x0222aea9, size: 455 bytes, params: 2, frame: 27
var r16;
var value4;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
const styles = useStyles();
const product = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(skuId).product;
const {displayName, typeName,
isSubscription} = (require(13415) /* metro dependency 13415: FamilyCenterActivityPurchaseRowUtils */).getPurchaseDisplayInfo(product ?? null,
subscriptionPlanId);
if (skuId == null) {
if (displayName == null) {
return null;
}
value4 = (require(5137) /* metro dependency 5137: PriceUtils */).formatPrice(total, currency);
r16 = typeName == null ? displayName : '' + displayName + ' • ' + typeName;
var viewBindingProps = {style: styles.container};
items3 = [((Component) => <Component displayName={displayName} product={product ?? null} isSubscription={isSubscription} subscriptionPlanId={subscriptionPlanId} />)(importDefault(13416) /* metro dependency 13416: FamilyCenterActivityItemPreview */)];
var viewBinding2Props = {style: styles.textContainer};
items2 = [<Text variant="text-md/semibold" color="interactive-text-active" ellipsizeMode="tail" lineClamp={1}>{r16}</Text>];
items2[1] = <Text variant="text-xs/medium" color="text-muted">{value4}</Text>;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
return (
<View {...viewBindingProps}>
{items3}
</View>
);
}
if (isSubscription) {
if (displayName == null) {
return null;
}
value4 = (require(5137) /* metro dependency 5137: PriceUtils */).formatPrice(total, currency);
r16 = typeName == null ? displayName : '' + displayName + ' • ' + typeName;
var viewBindingProps = {style: styles.container};
items3 = [((Component) => <Component displayName={displayName} product={product ?? null} isSubscription={isSubscription} subscriptionPlanId={subscriptionPlanId} />)(importDefault(13416) /* metro dependency 13416: FamilyCenterActivityItemPreview */)];
var viewBinding2Props = {style: styles.textContainer};
items2 = [<Text variant="text-md/semibold" color="interactive-text-active" ellipsizeMode="tail" lineClamp={1}>{r16}</Text>];
items2[1] = <Text variant="text-xs/medium" color="text-muted">{value4}</Text>;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
return (
<View {...viewBindingProps}>
{items3}
</View>
);
}
if (product != null) {
if (displayName == null) {
return null;
}
value4 = (require(5137) /* metro dependency 5137: PriceUtils */).formatPrice(total, currency);
r16 = typeName == null ? displayName : '' + displayName + ' • ' + typeName;
var viewBindingProps = {style: styles.container};
items3 = [((Component) => <Component displayName={displayName} product={product ?? null} isSubscription={isSubscription} subscriptionPlanId={subscriptionPlanId} />)(importDefault(13416) /* metro dependency 13416: FamilyCenterActivityItemPreview */)];
var viewBinding2Props = {style: styles.textContainer};
items2 = [<Text variant="text-md/semibold" color="interactive-text-active" ellipsizeMode="tail" lineClamp={1}>{r16}</Text>];
items2[1] = <Text variant="text-xs/medium" color="text-muted">{value4}</Text>;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
return (
<View {...viewBindingProps}>
{items3}
</View>
);
}
return null;
}
@@ -0,0 +1,273 @@
/* Metro module 13413; source: modules/parent_tools/native/FamilyCenterActivityRow.tsx; dependencies: [31, 27, 1878, 5116, 5117, 661, 33, 4501, 697, 1305, 44, 632, 21, 4573, 3995, 5187, 6819, 8642, 1244, 2224, 13414, 13417, 13418, 2] */
function _fun102063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13603:6, offset: 0x0222a338, size: 802 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
const env0_6 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).ACTION_TO_TEXT;
const env0_7 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
const value2 = require(33) /* metro dependency 33 */;
const env0_8 = value2.jsx;
const env0_9 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = createStylesModule.createStyles;
object2 = {};
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.container = {'display': 'flex', 'flexDirection': 'row', 'borderBottomColor': null, 'borderBottomWidth': 1,
'paddingVertical': 12, borderBottomColor: BORDER_SUBTLE};
const object4 = {};
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
object4.borderRadius = AVATAR_SIZE_MAP[NORMAL] / 2;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.avatar = object4;
object2.avatarContainer = {'marginRight': 12, 'alignItems': 'flex-start'};
object2.textContainer = {'display': 'flex', 'flexDirection': 'column', 'flexShrink': 1};
object2.text = {'display': 'flex', 'flexDirection': 'row', 'flexShrink': 1};
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
value.memo(_fun102064).displayName = 'FamilyCenterActivityRowUser';
const value5 = createStylesModule;
createStyles = value5.createStyles;
object2 = {};
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.container = {'display': 'flex', 'alignItems': 'center', 'flexDirection': 'row', 'borderBottomColor': null,
'borderBottomWidth': 1, 'paddingVertical': 12, borderBottomColor: BORDER_SUBTLE};
const object6 = {'borderRadius': null, 'borderColor': null, 'height': 40, 'width': 40, 'margin': 0,
'backgroundColor': null, 'marginRight': 12};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.borderColor = BACKGROUND_BASE_LOW;
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object6.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object2.avatar = object6;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
object2.avatarText = {color: TEXT_DEFAULT};
object2.text = {'display': 'flex', 'flexDirection': 'column', 'flexShrink': 1};
object2.headerContainer = {'display': 'flex', 'flexDirection': 'row'};
object2.badge = {marginRight: 4};
object2.header = {paddingRight: 16};
object2.headerAndIconContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
const env0_12 = Reflect.apply(createStyles, value5, [object2]);
value = value.memo(_fun102066);
value.displayName = 'FamilyCenterActivityRowGuild';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivityRow.tsx');
exports.default = FamilyCenterActivityRow;
}
function _fun102064({action}) { // fn#102064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13603:696, offset: 0x0222a65a, size: 527 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = ACTION_TO_TEXT.get(action.display_type);
(importDefault(44) /* metro dependency 44 */)(value2, 'No text for action type');
const user = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getUser(action.entity_id);
});
if (user == null) {
return null;
}
const defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const value3 = defaultImport2.extractTimestamp(action.event_id);
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const items3 = [<View style={styles.avatarContainer}><Avatar avatarStyle={styles.avatar} user={user} guildId={undefined} disablePlaceholder avatarDecoration={user.avatarDecoration} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
let value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = <Text style={styles.text} variant="text-md/semibold" color="interactive-text-active" ellipsizeMode="tail" lineClamp={1}>{value.getName(user)}</Text>;
const items2 = [value];
value = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
const formatUserActivityTimestamp = value.formatUserActivityTimestamp;
const Date = global.Date;
const value4 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date(value3);
items2[1] = <Text variant="text-xs/medium" color="channels-default">{Reflect.apply(formatUserActivityTimestamp,
value, [(date instanceof Object ? date : value4).getTime(), value2.timestampFormatter])}</Text>;
items3[1] = <View style={styles.textContainer}>{items2}</View>;
return (
<View style={styles.container}>
{items3}
</View>
);
}
function _fun102066({action}) { // fn#102066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13603:2186, offset: 0x0222a88a, size: 693 bytes, params: 2, frame: 32
var r7;
var intl;
const styles = useStyles();
const guild = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getGuild(action.entity_id);
});
const get = ACTION_TO_TEXT.get;
(importDefault(44) /* metro dependency 44 */)(Reflect.apply(get, ACTION_TO_TEXT, [action.display_type]),
'No text for action type');
if (guild === undefined) {
return null;
}
const features = guild.features;
const has = features.has;
const VERIFIED = GuildFeatures.VERIFIED;
const r12 = Reflect.apply(has, features, [VERIFIED]) || guild.features.has(GuildFeatures.PARTNERED);
const name = guild.name;
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const NORMAL = GuildIconSizes.NORMAL;
const guildIcon = <GuildIcon style={styles.avatar} textStyle={styles.avatarText} guild={guild} size={NORMAL} animate />;
const r8 = r12 ? ((Component) => <Component style={styles.badge} guild={guild} size={(importDefault(8642) /* metro dependency 8642: GuildBadge */).Sizes.SMALL} disableColor />)(importDefault(8642) /* metro dependency 8642: GuildBadge */) : null;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const view = <View style={styles.headerContainer}><View style={styles.headerAndIconContainer}>{r8}<Text style={styles.header} variant="text-md/semibold" color="interactive-text-active" ellipsizeMode="tail" lineClamp={1}>{name}</Text></View></View>;
if (guild.approximateMemberCount === undefined) {
r7 = null;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = <Text variant="text-xs/medium" color="channels-default">{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['5JmNgg'],
{members: guild.approximateMemberCount})}</Text>;
}
return (
<View style={styles.container}>
{guildIcon}
<View style={styles.text}>
{view}
{r7}
</View>
</View>
);
}
function FamilyCenterActivityRow({action}) { // fn#102068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13603:3268, offset: 0x0222ab60, size: 579 bytes, params: 2, frame: 24
var r0;
var moduleValue5;
var moduleValue6;
var value2;
var giftRowDisplayInfo;
var value4;
var value5;
var value;
const familyCenterUtilsModule = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
if (familyCenterUtilsModule.isUserAction(action)) {
moduleValue5 = familyCenterUtilsModule;
if (moduleValue5.isPurchase(action)) {
value4 = FamilyCenterStore.getPurchaseInfo(action.entity_id);
value5 = null;
if (value5 == value4) {
r0 = value5;
} else {
value = importDefault(13414) /* metro dependency 13414: FamilyCenterActivityPurchaseRow */;
value = ((Component) => <Component skuId={value4.sku_id} subscriptionPlanId={value4.subscription_plan_id} total={value4.total} currency={value4.currency} />)(value);
r0 = value;
}
return r0;
}
moduleValue6 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
if (moduleValue6.isGift(action)) {
value2 = FamilyCenterStore.getGiftInfo(action.entity_id);
if (value2 == null) {
return null;
}
giftRowDisplayInfo = (require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */).getGiftRowDisplayInfo(value2);
return ((Component) => <Component skuId={giftRowDisplayInfo.skuId} subscriptionPlanId={giftRowDisplayInfo.subscriptionPlanId} price={giftRowDisplayInfo.price} gifterUserId={giftRowDisplayInfo.gifterUserId} claimed={giftRowDisplayInfo.claimed} offeredAt={giftRowDisplayInfo.offeredAt} claimedAt={giftRowDisplayInfo.claimedAt} />)(importDefault(13418) /* metro dependency 13418: FamilyCenterActivityGiftRow */);
}
return (
<View>
{(require(5187) /* metro dependency 5187: FamilyCenterUtils */).isUserAction(action) ? ((Component) => <Component action={action} />)(env0_11) : ((Component) => <Component action={action} />)(env0_13)}
</View>
);
}
const moduleValue2 = familyCenterUtilsModule;
if (moduleValue2.isGuildAction(action)) {
moduleValue5 = familyCenterUtilsModule;
if (moduleValue5.isPurchase(action)) {
value4 = FamilyCenterStore.getPurchaseInfo(action.entity_id);
value5 = null;
if (value5 == value4) {
r0 = value5;
} else {
value = importDefault(13414) /* metro dependency 13414: FamilyCenterActivityPurchaseRow */;
value = ((Component) => <Component skuId={value4.sku_id} subscriptionPlanId={value4.subscription_plan_id} total={value4.total} currency={value4.currency} />)(value);
r0 = value;
}
return r0;
}
moduleValue6 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
if (moduleValue6.isGift(action)) {
value2 = FamilyCenterStore.getGiftInfo(action.entity_id);
if (value2 == null) {
return null;
}
giftRowDisplayInfo = (require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */).getGiftRowDisplayInfo(value2);
return ((Component) => <Component skuId={giftRowDisplayInfo.skuId} subscriptionPlanId={giftRowDisplayInfo.subscriptionPlanId} price={giftRowDisplayInfo.price} gifterUserId={giftRowDisplayInfo.gifterUserId} claimed={giftRowDisplayInfo.claimed} offeredAt={giftRowDisplayInfo.offeredAt} claimedAt={giftRowDisplayInfo.claimedAt} />)(importDefault(13418) /* metro dependency 13418: FamilyCenterActivityGiftRow */);
}
return (
<View>
{(require(5187) /* metro dependency 5187: FamilyCenterUtils */).isUserAction(action) ? ((Component) => <Component action={action} />)(env0_11) : ((Component) => <Component action={action} />)(env0_13)}
</View>
);
}
const moduleValue3 = familyCenterUtilsModule;
if (moduleValue3.isPurchase(action)) {
moduleValue5 = familyCenterUtilsModule;
if (moduleValue5.isPurchase(action)) {
value4 = FamilyCenterStore.getPurchaseInfo(action.entity_id);
value5 = null;
if (value5 == value4) {
r0 = value5;
} else {
value = importDefault(13414) /* metro dependency 13414: FamilyCenterActivityPurchaseRow */;
value = ((Component) => <Component skuId={value4.sku_id} subscriptionPlanId={value4.subscription_plan_id} total={value4.total} currency={value4.currency} />)(value);
r0 = value;
}
return r0;
}
moduleValue6 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
if (moduleValue6.isGift(action)) {
value2 = FamilyCenterStore.getGiftInfo(action.entity_id);
if (value2 == null) {
return null;
}
giftRowDisplayInfo = (require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */).getGiftRowDisplayInfo(value2);
return ((Component) => <Component skuId={giftRowDisplayInfo.skuId} subscriptionPlanId={giftRowDisplayInfo.subscriptionPlanId} price={giftRowDisplayInfo.price} gifterUserId={giftRowDisplayInfo.gifterUserId} claimed={giftRowDisplayInfo.claimed} offeredAt={giftRowDisplayInfo.offeredAt} claimedAt={giftRowDisplayInfo.claimedAt} />)(importDefault(13418) /* metro dependency 13418: FamilyCenterActivityGiftRow */);
}
return (
<View>
{(require(5187) /* metro dependency 5187: FamilyCenterUtils */).isUserAction(action) ? ((Component) => <Component action={action} />)(env0_11) : ((Component) => <Component action={action} />)(env0_13)}
</View>
);
}
const moduleValue4 = familyCenterUtilsModule;
if (moduleValue4.isGift(action)) {
moduleValue5 = familyCenterUtilsModule;
if (moduleValue5.isPurchase(action)) {
value4 = FamilyCenterStore.getPurchaseInfo(action.entity_id);
value5 = null;
if (value5 == value4) {
r0 = value5;
} else {
value = importDefault(13414) /* metro dependency 13414: FamilyCenterActivityPurchaseRow */;
value = ((Component) => <Component skuId={value4.sku_id} subscriptionPlanId={value4.subscription_plan_id} total={value4.total} currency={value4.currency} />)(value);
r0 = value;
}
return r0;
}
moduleValue6 = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
if (moduleValue6.isGift(action)) {
value2 = FamilyCenterStore.getGiftInfo(action.entity_id);
if (value2 == null) {
return null;
}
giftRowDisplayInfo = (require(13417) /* metro dependency 13417: FamilyCenterActivityGiftRowUtils */).getGiftRowDisplayInfo(value2);
return ((Component) => <Component skuId={giftRowDisplayInfo.skuId} subscriptionPlanId={giftRowDisplayInfo.subscriptionPlanId} price={giftRowDisplayInfo.price} gifterUserId={giftRowDisplayInfo.gifterUserId} claimed={giftRowDisplayInfo.claimed} offeredAt={giftRowDisplayInfo.offeredAt} claimedAt={giftRowDisplayInfo.claimedAt} />)(importDefault(13418) /* metro dependency 13418: FamilyCenterActivityGiftRow */);
}
return (
<View>
{(require(5187) /* metro dependency 5187: FamilyCenterUtils */).isUserAction(action) ? ((Component) => <Component action={action} />)(env0_11) : ((Component) => <Component action={action} />)(env0_13)}
</View>
);
}
return null;
}
@@ -0,0 +1,104 @@
/* Metro module 13412; source: modules/parent_tools/native/FamilyCenterActivitySection.tsx; dependencies: [57, 31, 27, 5117, 33, 4501, 697, 8171, 5187, 13407, 4573, 12624, 1244, 2224, 13413, 5278, 2] */
function _fun102057(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13602:6, offset: 0x02229cc4, size: 505 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.ActivityIndicator;
const env0_6 = value.View;
value = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_7 = value.FAMILY_CENTER_ITEMS_SHOWN_INCREMENTS;
const env0_8 = value.TeenActionDisplayType;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
object2 = {};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.header = {marginBottom: PX_4};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.description = {marginBottom: PX_8};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object3 = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'};
object3.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object3.backgroundColor = BACKGROUND_MOD_SUBTLE;
object3.width = '60%';
const env0_12 = Reflect.apply(createStyles, value, [{container: {display: 'flex'},
loadMoreContainer: {'display': 'flex', 'flexDirection': 'row', 'flex': 1, 'alignItems': 'center',
'justifyContent': 'center', 'width': '100%'}, loadMore: object3, loadMoreButton: {paddingVertical: 4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivitySection.tsx');
exports.default = FamilyCenterActivitySection;
}
function FamilyCenterActivitySectionHeader({displayType}) { // fn#102058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13602:374, offset: 0x02229ebd, size: 385 bytes, params: 2, frame: 23
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const styles = useStyles();
const value3 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const value5 = (require(5187) /* metro dependency 5187: FamilyCenterUtils */).getActivityTypeTextConfigs().get(displayType);
const value6 = (require(13407) /* metro dependency 13407: useFamilyCenterActivities */).useActionsForDisplayType(displayType);
const value7 = (require(13407) /* metro dependency 13407: useFamilyCenterActivities */).useFormattedTotalForDisplayType(displayType);
const PURCHASES = TeenActionDisplayType.PURCHASES;
const r12 = value5?.sectionHeader(displayType !== PURCHASES ? value6.length : value7 !== null ? value7 : value6.length);
const r9 = value5?.sectionDescription === undefined ? null : value5?.sectionDescription(value3 != null && value3);
return (
<View>
<Text variant="text-sm/semibold" style={styles.header}>
{r12}
</Text>
{r9 === null ? null : <Text variant="text-sm/medium" color="text-muted" style={styles.description}>{r9}</Text>}
</View>
);
}
function FamilyCenterActivitySection({displayType}) { // fn#102059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13602:1523, offset: 0x0222a03e, size: 655 bytes, params: 2, frame: 28
const styles = useStyles();
const value2 = (require(13407) /* metro dependency 13407: useFamilyCenterActivities */).useActionsForDisplayType(displayType);
const value3 = (require(13407) /* metro dependency 13407: useFamilyCenterActivities */).useActionTotalsForDisplayType(displayType);
const {loadMore,
isMoreLoading} = (require(12624) /* metro dependency 12624: useFamilyCenterActions */).useFamilyCenterActions({});
const binding = env0_4;
const useState = binding.useState;
const value6 = env0_3(Reflect.apply(useState, binding, [FAMILY_CENTER_ITEMS_SHOWN_INCREMENTS]), 2);
let property = value6[0];
const env0_2 = value6[1];
const value7 = value2.slice(0, property);
const value8 = binding.useCallback(_fun102060, [loadMore, displayType]);
if (value2.length === 0) {
return null;
}
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
property = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['7dMmJY'];
const Math = global.Math;
const value10 = Reflect.apply(formatToPlainString, intl, [property, {pageSize: Math.min(value3 - value7.length,
FAMILY_CENTER_ITEMS_SHOWN_INCREMENTS)}]);
const items2 = [<FamilyCenterActivitySectionHeader displayType={displayType} />];
items2[1] = value7.map(_fun102062);
items2[2] = value7.length < value3 ? <View style={styles.loadMoreContainer}>{isMoreLoading ? <View style={styles.loadMore}><ActivityIndicator style={styles.loadMoreButton} animating color="#fff" size="small" /></View> : ((PressableOpacity) => <PressableOpacity style={styles.loadMore} accessibilityLabel={value10} accessibilityRole="button" onPress={value8}>{((Text) => <Text style={styles.loadMoreButton} variant="text-xs/semibold" color="always-white">{value10}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)}</View> : null;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun102060() { // fn#102060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13602:1808, offset: 0x0222a2cd, size: 38 bytes, params: 1, frame: 12
env0_2(function(a0) {
return a0 + FAMILY_CENTER_ITEMS_SHOWN_INCREMENTS;
});
loadMore(displayType);
}
function _fun102062(a0) { // fn#102062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13602:2061, offset: 0x0222a303, size: 53 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component action={a0} key={a0.event_id} />)(importDefault(13413) /* metro dependency 13413: FamilyCenterActivityRow */);
}
@@ -0,0 +1,43 @@
/* Metro module 13408; source: modules/parent_tools/native/FamilyCenterActivityTotal.tsx; dependencies: [31, 27, 33, 4501, 697, 13407, 5187, 4573, 2] */
function _fun102038(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13598:6, offset: 0x02228d8a, size: 291 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'display': 'flex', 'backgroundColor': null, 'padding': 12, 'justifyContent': 'center',
'alignItems': 'center'};
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const SHADOW_LEDGE = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LEDGE;
copyDataProperties(object, SHADOW_LEDGE, undefined);
const env0_5 = Reflect.apply(createStyles, value, [{container: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterActivityTotal.tsx');
exports.default = FamilyCenterActivityTotal;
}
function FamilyCenterActivityTotal({displayType}) { // fn#102039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13598:475, offset: 0x02228ead, size: 313 bytes, params: 2, frame: 24
const styles = useStyles();
const value3 = (require(13407) /* metro dependency 13407: useFamilyCenterActivities */).useActionTotalsForDisplayType(displayType);
const value4 = (require(13407) /* metro dependency 13407: useFamilyCenterActivities */).useFormattedTotalForDisplayType(displayType);
const r13 = value3 > 0 ? 'text-brand' : 'text-muted';
const r8 = (require(5187) /* metro dependency 5187: FamilyCenterUtils */).getActivityTypeTextConfigs().get(displayType)?.tooltipHeader();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.container}>
<Text variant="heading-xxl/medium" color={r13}>
{value4 ?? 0}
</Text>
<Text variant="text-sm/semibold">
{r8}
</Text>
</View>
);
}
@@ -0,0 +1,58 @@
/* Metro module 13435; source: modules/parent_tools/native/FamilyCenterAvatarPair.tsx; dependencies: [31, 27, 1878, 33, 4501, 697, 632, 1305, 2] */
function _fun102179(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13625:6, offset: 0x02230d92, size: 299 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'backgroundColor': null, 'borderRadius': null, 'display': 'flex', 'flexDirection': 'row',
'justifyContent': 'space-between', 'alignItems': 'center', 'padding': 8};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_6 = Reflect.apply(createStyles, value, [{avatars: object, icon: {'height': 24, 'width': 24,
'marginHorizontal': 16}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterAvatarPair.tsx');
exports.default = FamilyCenterAvatarPair;
}
function FamilyCenterAvatarPair({otherUser, iconSrc, iconStyles}) { // fn#102180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13625:520, offset: 0x02230ebd, size: 378 bytes, params: 2, frame: 26
var r0;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
var LARGE_48;
var avatarDecoration;
var items2;
var value;
const styles = useStyles();
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
if (currentUser === undefined) {
r0 = null;
} else if (otherUser === undefined) {
r0 = null;
} else {
var viewBindingProps = {style: styles.avatars};
LARGE_48 = AvatarSizes.LARGE_48;
avatarDecoration = currentUser.avatarDecoration;
value = <Avatar size={LARGE_48} user={currentUser} guildId={undefined} avatarDecoration={avatarDecoration} />;
items2 = [value];
items2[1] = ((Icon) => <Icon style={[styles.icon,
iconStyles]} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} source={iconSrc} />)((require(1305) /* metro dependency 1305: native */).Icon);
LARGE_48 = AvatarSizes.LARGE_48;
avatarDecoration = otherUser.avatarDecoration;
items2[2] = <Avatar size={LARGE_48} user={otherUser} guildId={undefined} avatarDecoration={avatarDecoration} />;
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
}
return r0;
}
@@ -0,0 +1,136 @@
/* Metro module 13393; source: modules/parent_tools/native/FamilyCenterBannerButton.tsx; dependencies: [31, 27, 5117, 661, 4661, 33, 8170, 1244, 2224, 5080, 13394, 1962, 683, 1471, 12620, 1581, 4662, 12642, 4501, 4578, 13395, 2] */
function _fun101960(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13583:6, offset: 0x0222558e, size: 331 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = FamilyCenterBannerButton;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const familyCenterConstantsModule = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_4 = familyCenterConstantsModule.FAMILY_CENTER_LINK_REQUEST_REGEX;
const env0_5 = familyCenterConstantsModule.FamilyCenterAction;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_7 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NativePermissionTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({button: {'height': 50,
'width': '100%', 'marginTop': 16}, art: {'width': 18, 'height': 18, 'marginRight': 6}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterBannerButton.tsx');
exports.default = closure;
exports.FamilyCenterTeenQRCodeButton = FamilyCenterTeenQRCodeButton;
exports.FamilyCenterParentQRCodeButton = FamilyCenterParentQRCodeButton;
}
function FamilyCenterBannerButton({onPress, text, loading}) { // fn#101961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13583:375, offset: 0x022256d9, size: 193 bytes, params: 2, frame: 23
const styles = useStyles();
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const QrCodeIcon = (require(13395) /* metro dependency 13395: QrCodeIcon */).QrCodeIcon;
return (
<View style={styles.button}>
<Button
grow
shrink
size="md"
variant="primary"
text={text}
onPress={onPress}
loading={loading}
icon={<QrCodeIcon style={styles.art} size="custom" color="white" />}
iconPosition="start"
/>
</View>
);
}
function FamilyCenterTeenQRCodeButton() { // fn#101962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13583:829, offset: 0x0222579a, size: 126 bytes, params: 1, frame: 17
const value2 = (require(8170) /* metro dependency 8170: useUserLinks */).useHasMaxConnections();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return value2 ? null : <FamilyCenterBannerButton text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['8SLtqb'])} onPress={function() {
importDefault(dependencyMap[9]).pushLazy(require(dependencyMap[11])(dependencyMap[10], dependencyMap.paths));
importDefault(dependencyMap[12]).track(AnalyticEvents.FAMILY_CENTER_ACTION,
{action: FamilyCenterAction.ShowQRCodeModal});
}} />;
}
function FamilyCenterParentQRCodeButton() { // fn#101964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13583:1154, offset: 0x02225891, size: 147 bytes, params: 1, frame: 19
const useUserLinksModule = require(8170) /* metro dependency 8170: useUserLinks */;
const useHasMaxConnections = useUserLinksModule.useHasMaxConnections;
if (Reflect.apply(useHasMaxConnections, useUserLinksModule, [])) {
return null;
}
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<FamilyCenterBannerButton
text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).z4a9HP)}
onPress={onPress_101966}
/>
);
}
function handleQrCodeScanSucess(a0) { // fn#101965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13583:1269, owner: FamilyCenterParentQRCodeButton.handleQrCodeScanSucess, offset: 0x02225924, size: 198 bytes, params: 2, frame: 18
var r1;
var defaultImport3;
const value = environment.__proto__;
const value2 = undefined;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
const value3 = (importDefault(1471) /* metro dependency 1471: URLUtils */).toURLSafe(a0);
const value4 = null;
let r0 = value4 != value3 ? value3 : {};
const hostname = r0.hostname;
const pathname = r0.pathname;
if (value4 != hostname) {
if (value4 != pathname) {
defaultImport3 = importDefault(1471) /* metro dependency 1471: URLUtils */;
if (defaultImport3.isDiscordHostname(hostname)) {
if (value4 === pathname.match(FAMILY_CENTER_LINK_REQUEST_REGEX)) {
r1 = value4;
} else {
(require(12620) /* metro dependency 12620: FamilyCenterNativeUtils */).handleFamilyCenterQRCodeScan(pathname,
'FamilyCenterQRCodeScan');
r1 = value2;
}
r0 = r1;
} else {
r0 = value4;
}
} else {
r0 = value4;
}
} else {
r0 = value4;
}
return r0;
}
function FamilyCenterParentQRCodeButtonOnPress() { // fn#101966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13583:1601, owner: FamilyCenterParentQRCodeButton.onPress, offset: 0x022259ea, size: 161 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FAMILY_CENTER_ACTION = AnalyticEvents.FAMILY_CENTER_ACTION;
const ScanQRCodeButton = FamilyCenterAction.ScanQRCodeButton;
Reflect.apply(track, defaultImport, [FAMILY_CENTER_ACTION, {action: ScanQRCodeButton}]);
const r3 = (require(1581) /* metro dependency 1581: MetaQuestUtilsAndroid */).isMetaQuest() ? NativePermissionTypes.HEADSET_CAMERA : NativePermissionTypes.CAMERA;
value = importDefault(4662) /* metro dependency 4662: NativePermissionUtils */;
value = value.requestPermission(r3);
value.then(_fun101967);
}
function _fun101967(a0) { // fn#101967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13583:1764, offset: 0x02225a8b, size: 102 bytes, params: 2, frame: 15
var value;
var defaultImport;
var pushLazy;
var value2;
if (a0) {
value = environment.__proto__.__proto__;
defaultImport = importDefault(dependencyMap[9]);
pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[17], dependencyMap.paths);
value2 = environment.__proto__;
Reflect.apply(pushLazy, defaultImport, [value, {showHelp: false, onScanSuccess: handleQrCodeScanSucess}]);
}
}
@@ -0,0 +1,179 @@
/* Metro module 12626; source: modules/parent_tools/native/FamilyCenterDataConfirmation.tsx; dependencies: [31, 33, 1244, 2224, 12627, 4050, 9390, 6699, 12628, 12630, 8665, 7002, 6238, 4572, 4573, 6231, 6696, 2] */
function _fun96894(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12816:6, offset: 0x0216aaff, size: 157 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.Fragment;
const env0_5 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterDataConfirmation.tsx');
exports.default = FamilyCenterDataConfirmation;
}
function FamilyCenterDataConfirmation({source}) { // fn#96895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12816:249, offset: 0x0216ab9c, size: 2178 bytes, params: 2, frame: 38
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
var r6;
var Stack2;
let value = source === 'request-modal';
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const value3 = Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['+yrQhd']]);
string = intl.string;
const WGz9Dc = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).WGz9Dc;
const value4 = Reflect.apply(string, intl, [WGz9Dc]);
const useAgeSpecificTextModule = require(12627) /* metro dependency 12627: useAgeSpecificText */;
let useAgeSpecificText = useAgeSpecificTextModule.useAgeSpecificText;
const value5 = Reflect.apply(useAgeSpecificText, useAgeSpecificTextModule, [value3, value4]);
const value7 = useAgeSpecificTextModule.useAgeSpecificText((require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['TCzk/e']),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['2OqtJJ']));
const moduleValue3 = useAgeSpecificTextModule;
useAgeSpecificText = moduleValue3.useAgeSpecificText;
string = intl.string;
const ASf7XN = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).ASf7XN;
const value9 = Reflect.apply(useAgeSpecificText, moduleValue3, [Reflect.apply(string, intl, [ASf7XN]),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['82y87X'])]);
const value11 = useAgeSpecificTextModule.useAgeSpecificText((require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['0QDVFN']),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['1xBHHV']));
const value12 = (require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['JvJ3P/']);
const moduleValue5 = useAgeSpecificTextModule;
useAgeSpecificText = moduleValue5.useAgeSpecificText;
const value13 = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).l0ChgF);
string = intl.string;
const S2ss5X = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).S2ss5X;
const value14 = Reflect.apply(useAgeSpecificText, moduleValue5, [value13, Reflect.apply(string, intl, [S2ss5X])]);
const moduleValue6 = useAgeSpecificTextModule;
useAgeSpecificText = moduleValue6.useAgeSpecificText;
string = intl.string;
const LDu4Uk = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).LDu4Uk;
const value16 = Reflect.apply(useAgeSpecificText, moduleValue6, [Reflect.apply(string, intl, [LDu4Uk]),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).fEgtLV)]);
const value17 = (require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['4SCALu']);
const value18 = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).oYf9P7);
const value20 = useAgeSpecificTextModule.useAgeSpecificText((require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['dES/2r']),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).ep6mdN));
const value22 = useAgeSpecificTextModule.useAgeSpecificText((require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['30+sih']),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['0cuLn1']));
const moduleValue9 = useAgeSpecificTextModule;
useAgeSpecificText = moduleValue9.useAgeSpecificText;
const value23 = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).tHTyRh);
string = intl.string;
const TeNlMb = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).TeNlMb;
const value24 = Reflect.apply(useAgeSpecificText, moduleValue9, [value23, Reflect.apply(string, intl, [TeNlMb])]);
const value26 = useAgeSpecificTextModule.useAgeSpecificText(intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).wZejZr),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).tdgcf1));
let object2 = {header: value12, description: value14};
const UserPlusIcon = (require(4050) /* metro dependency 4050: UserPlusIcon */).UserPlusIcon;
object2.IconComponent = UserPlusIcon;
object2.source = source;
const items4 = [object2];
object2 = {header: (require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['44NEx6']),
description: value16};
const ServerIcon = (require(9390) /* metro dependency 9390: ServerIcon */).ServerIcon;
object2.IconComponent = ServerIcon;
object2.source = source;
items4[1] = object2;
object2 = {header: value17, description: value18};
const GroupIcon = (require(6699) /* metro dependency 6699: GroupIcon */).GroupIcon;
object2.IconComponent = GroupIcon;
object2.source = source;
items4[2] = object2;
object2 = {};
const intl3 = (require(1244) /* metro dependency 1244: indexNative */).intl;
string = intl3.string;
const GNs2ZH = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).GNs2ZH;
object2.header = Reflect.apply(string, intl3, [GNs2ZH]);
const intl4 = (require(1244) /* metro dependency 1244: indexNative */).intl;
string = intl4.string;
const Ief2xc = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Ief2xc;
object2.description = Reflect.apply(string, intl4, [Ief2xc]);
const PhoneIcon = (require(12628) /* metro dependency 12628: PhoneIcon */).PhoneIcon;
object2.IconComponent = PhoneIcon;
object2.source = source;
const items2 = [object2];
object2 = {};
const intl5 = (require(1244) /* metro dependency 1244: indexNative */).intl;
string = intl5.string;
const PjM3r5 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).PjM3r5;
object2.header = Reflect.apply(string, intl5, [PjM3r5]);
object2.description = value20;
const CreditCardIcon = (require(12630) /* metro dependency 12630: CreditCardIcon */).CreditCardIcon;
object2.IconComponent = CreditCardIcon;
object2.source = source;
items2[1] = object2;
object2 = {header: value22, description: value24};
const FlagIcon = (require(8665) /* metro dependency 8665: FlagIcon */).FlagIcon;
object2.IconComponent = FlagIcon;
object2.source = source;
items2[2] = object2;
object2 = {};
const intl6 = (require(1244) /* metro dependency 1244: indexNative */).intl;
string = intl6.string;
const UCuHM8 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).UCuHM8;
object2.header = Reflect.apply(string, intl6, [UCuHM8]);
object2.description = value26;
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
object2.IconComponent = SettingsIcon;
object2.source = source;
items2[3] = object2;
const jsxRuntimeEnv0_4Binding = jsxRuntimeEnv0_4;
const items3 = [];
arraySpread(items3, items2, arraySpread(items3, items4, 0, intl), intl);
const fragment = <>{items3.map(_fun96896)}</>;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
if (value) {
Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text accessibilityRole="header" variant="text-sm/semibold" color="text-muted">{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['05xZPR'])}</Text>;
value = <Stack2 spacing={8}>{value}<TableRowGroup hasIcons>{fragment}</TableRowGroup></Stack2>;
r6 = value;
} else {
r6 = <TableRowGroup title={value5} hasIcons>{fragment}</TableRowGroup>;
}
const object3 = {header: value9, description: value11};
const ForumLockIcon = (require(6696) /* metro dependency 6696: ForumLockIcon */).ForumLockIcon;
object3.IconComponent = ForumLockIcon;
object3.source = source;
object3.negative = true;
return (
<Stack spacing={24}>
{r6}
<TableRowGroup title={value7} hasIcons>
{[object3].map(_fun96897)}
</TableRowGroup>
</Stack>
);
}
function _fun96896({header, description, IconComponent}) { // fn#96896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12816:2189, offset: 0x0216b41e, size: 133 bytes, params: 2, frame: 21
const value = environment.__proto__;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
return (
<TableRow
label={header}
subLabel={description}
icon={<Icon variant={result ? 'default' : 'text-status-online'} IconComponent={IconComponent} />}
key={header}
/>
);
}
function _fun96897({header, description, IconComponent, negative}) { // fn#96897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12816:2855, offset: 0x0216b4a3, size: 145 bytes, params: 2, frame: 22
const value = environment.__proto__;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
return (
<TableRow
label={header}
subLabel={description}
icon={<Icon variant={result ? 'default' : negative === true ? 'text-status-dnd' : 'default'} IconComponent={IconComponent} />}
key={header}
/>
);
}
@@ -0,0 +1,32 @@
/* Metro module 13429; source: modules/parent_tools/native/FamilyCenterEmpty.tsx; dependencies: [31, 27, 33, 4501, 13430, 4573, 2] */
function _fun102157(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13619:6, offset: 0x0222fce7, size: 244 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.Image;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({art: {'marginBottom': 10,
'width': 243}, empty: {'display': 'flex', 'alignItems': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterEmpty.tsx');
exports.default = FamilyCenterEmpty;
}
function FamilyCenterEmpty({text}) { // fn#102158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13619:354, offset: 0x0222fddb, size: 169 bytes, params: 2, frame: 22
const styles = useStyles();
const image = <Image source={importDefault(13430) /* metro dependency 13430 */} style={styles.art} resizeMethod="scale" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.empty}>
{image}
<Text variant="text-sm/medium" color="text-muted">
{text}
</Text>
</View>
);
}
@@ -0,0 +1,73 @@
/* Metro module 13398; source: modules/parent_tools/native/FamilyCenterFeatureRow.tsx; dependencies: [31, 27, 33, 4501, 697, 12627, 1244, 2224, 13399, 13400, 11843, 8999, 9178, 13395, 6231, 6238, 2] */
function _fun101985(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13588:6, offset: 0x02226699, size: 228 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{tableGroup: {marginTop: 20, marginBottom: PX_24}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterFeatureRow.tsx');
exports.default = FamilyCenterFeatureRows;
}
function FamilyCenterFeatureRows() { // fn#101986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13588:317, offset: 0x0222677d, size: 759 bytes, params: 1, frame: 25
const styles = useStyles();
const useAgeSpecificTextModule = require(12627) /* metro dependency 12627: useAgeSpecificText */;
const useAgeSpecificText = useAgeSpecificTextModule.useAgeSpecificText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value3 = Reflect.apply(useAgeSpecificText, useAgeSpecificTextModule,
[intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).qITXhY),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).bmhCnL)]);
const value5 = useAgeSpecificTextModule.useAgeSpecificText(intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).t7SkFy),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['68zfxD']));
const value7 = useAgeSpecificTextModule.useAgeSpecificText((require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['+pi4Yt']),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['1xPTwE']));
let object2 = {icon: importDefault(13399) /* metro dependency 13399 */};
const ChatCheckIcon = (require(13400) /* metro dependency 13400: ChatCheckIcon */).ChatCheckIcon;
object2.IconComponent = ChatCheckIcon;
object2.header = (require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['001l3m']);
object2.description = value3;
const items2 = [object2];
object2 = {icon: importDefault(11843) /* metro dependency 11843 */};
const EyeIcon = (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon;
object2.IconComponent = EyeIcon;
object2.header = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).yipAeP);
object2.description = value5;
items2[1] = object2;
object2 = {icon: importDefault(9178) /* metro dependency 9178 */};
const QrCodeIcon = (require(13395) /* metro dependency 13395: QrCodeIcon */).QrCodeIcon;
object2.IconComponent = QrCodeIcon;
object2.header = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).hhOuMe);
object2.description = value7;
items2[2] = object2;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<View style={styles.tableGroup}>
<TableRowGroup
title={(require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['6JkHSg'])}
hasIcons
>
{items2.map(_fun101987)}
</TableRowGroup>
</View>
);
}
function _fun101987({header, description, icon, IconComponent}) { // fn#101987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13588:1142, offset: 0x02226a74, size: 118 bytes, params: 2, frame: 22
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
return (
<TableRow
label={header}
subLabel={description}
icon={<Icon source={icon} IconComponent={IconComponent} />}
key={header}
/>
);
}
@@ -0,0 +1,32 @@
/* Metro module 13431; source: modules/parent_tools/native/FamilyCenterLinkRow.tsx; dependencies: [31, 27, 5117, 33, 4501, 13432, 13433, 2] */
function _fun102160(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13621:6, offset: 0x0222feca, size: 233 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).UserLinkStatus;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({actionContainer: {'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'flex-end', 'height': '100%'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterLinkRow.tsx');
exports.default = FamilyCenterLinkRow;
}
function FamilyCenterLinkRow({otherUser, actions}) { // fn#102161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13621:390, offset: 0x0222ffb3, size: 156 bytes, params: 2, frame: 21
const styles = useStyles();
const FamilyCenterLinkWrapper = importDefault(13432) /* metro dependency 13432: FamilyCenterLinkWrapper */;
const id = otherUser.id;
const FamilyCenterRequestorDetails = importDefault(13433) /* metro dependency 13433: FamilyCenterRequestorDetails */;
const PENDING = UserLinkStatus.PENDING;
return (
<FamilyCenterLinkWrapper userId={id}>
<FamilyCenterRequestorDetails otherUser={otherUser} status={PENDING} />
<View style={styles.actionContainer}>
{actions}
</View>
</FamilyCenterLinkWrapper>
);
}
@@ -0,0 +1,40 @@
/* Metro module 13432; source: modules/parent_tools/native/FamilyCenterLinkWrapper.tsx; dependencies: [31, 33, 4501, 697, 6771, 5278, 8743, 2] */
function _fun102162(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13622:6, offset: 0x0223004f, size: 236 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'paddingTop': 14};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingBottom = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingHorizontal = PX_12;
const env0_4 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterLinkWrapper.tsx');
exports.default = FamilyCenterLinkRowWrapper;
}
function FamilyCenterLinkRowWrapper({userId, children}) { // fn#102163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13622:396, offset: 0x0223013b, size: 136 bytes, params: 2, frame: 18
const styles = useStyles();
const env0_1 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
if (userId === undefined) {
return null;
} else {
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity style={styles.container} onPress={onPress_102164}>
{children}
</PressableOpacity>
);
}
}
function FamilyCenterLinkRowWrapperOnPress() { // fn#102164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13622:573, owner: FamilyCenterLinkRowWrapper.onPress, offset: 0x022301c3, size: 68 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */)({'userId': null, 'disableCalls': true,
'disableMessage': true, userId: userId, sourceAnalyticsLocations: analyticsLocations});
}
@@ -0,0 +1,148 @@
/* Metro module 13426; source: modules/parent_tools/native/FamilyCenterLinkingBanner.tsx; dependencies: [31, 27, 33, 4501, 697, 8171, 12627, 1244, 2224, 13427, 4573, 6766, 13393, 2] */
function _fun102146(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13616:6, offset: 0x0222ef21, size: 667 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.Image;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
object3 = {};
const object4 = {'backgroundColor': null, 'marginVertical': null, 'paddingTop': 0, 'alignItems': 'center',
'borderRadius': null, 'elevation': 2, 'overflow': 'hidden'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginVertical = PX_16;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object3.container = object4;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.content = {padding: PX_16};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.art = {'width': '100%', 'height': 175, marginBottom: PX_12};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.header = {marginBottom: PX_8};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object5 = {};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.marginTop = PX_8;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
object5.width = '100%';
const env0_8 = Reflect.apply(createStyles, value, [{container: object5}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object7 = {'display': 'flex', 'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center',
'overflow': 'hidden', 'width': 32, 'height': 32};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object7.backgroundColor = BACKGROUND_MOD_NORMAL;
const env0_9 = Reflect.apply(createStyles, value, [{row: {'display': 'flex', 'flexDirection': 'row',
'alignItems': 'flex-start'}, gap: {marginBottom: 12}, circle: object7, rowContent: {'marginLeft': 12,
'flex': 1}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterLinkingBanner.tsx');
exports.default = FamilyCenterLinkingBanner;
}
function FamilyCenterLinkingBannerParentContent() { // fn#102147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13616:641, offset: 0x0222f1bc, size: 450 bytes, params: 1, frame: 26
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items2 = [<FamilyCenterLinkingInstructionsRow index={1} header={Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['7xxAni']])} description={(require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['1M9So2'])} />];
const familyCenterLinkingInstructionsRowBindingProps = {index: 2,
header: (require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['AXgx+a'])};
string = intl.string;
const GzMFnb = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).GzMFnb;
familyCenterLinkingInstructionsRowBindingProps.description = Reflect.apply(string, intl, [GzMFnb]);
items2[1] = <FamilyCenterLinkingInstructionsRow {...familyCenterLinkingInstructionsRowBindingProps} />;
string = intl.string;
const MZn1tG = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).MZn1tG;
items2[2] = <FamilyCenterLinkingInstructionsRow index={3} header={Reflect.apply(string, intl,
[MZn1tG])} description={(require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['8rLBxD'])} isLast />;
const FamilyCenterParentQRCodeButton = (require(13393) /* metro dependency 13393: FamilyCenterBannerButton */).FamilyCenterParentQRCodeButton;
items2[3] = <FamilyCenterParentQRCodeButton />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function FamilyCenterLinkingBannerTeenContent() { // fn#102148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13616:1229, offset: 0x0222f37e, size: 61 bytes, params: 1, frame: 15
const FamilyCenterTeenQRCodeButton = (require(13393) /* metro dependency 13393: FamilyCenterBannerButton */).FamilyCenterTeenQRCodeButton;
return (
<View>
<FamilyCenterTeenQRCodeButton />
</View>
);
}
function FamilyCenterLinkingInstructionsRow({header, description, index, isLast}) { // fn#102149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13616:1709, offset: 0x0222f3bb, size: 318 bytes, params: 2, frame: 27
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.row}>
<View style={styles.circle}>
<Text variant="heading-md/semibold" color="text-brand">
{index}
</Text>
</View>
<View style={[styles.rowContent, isLast ? null : styles.gap]}>
<Text variant="heading-sm/bold">
{header}
</Text>
<Text variant="text-sm/medium" color="text-muted">
{description}
</Text>
</View>
</View>
);
}
function FamilyCenterLinkingBanner() { // fn#102150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13616:2237, offset: 0x0222f4f9, size: 534 bytes, params: 1, frame: 27
const styles = useStyles();
const value2 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const useAgeSpecificTextModule = require(12627) /* metro dependency 12627: useAgeSpecificText */;
let useAgeSpecificText = useAgeSpecificTextModule.useAgeSpecificText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const value3 = Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).zUCWEL]);
string = intl.string;
const B0NPbp = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).B0NPbp;
const value4 = Reflect.apply(useAgeSpecificText, useAgeSpecificTextModule, [value3, Reflect.apply(string, intl,
[B0NPbp])]);
const moduleValue2 = useAgeSpecificTextModule;
useAgeSpecificText = moduleValue2.useAgeSpecificText;
const value5 = intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).yMnoDl,
{link: 'https://support.discord.com/hc/articles/14155060633623'});
string = intl.string;
const JsAEDi = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).JsAEDi;
const value6 = Reflect.apply(useAgeSpecificText, moduleValue2, [value5, Reflect.apply(string, intl, [JsAEDi])]);
const image = <Image source={importDefault(13427) /* metro dependency 13427 */} style={styles.art} resizeMethod="resize" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text style={styles.header} variant="heading-lg/semibold">{value4}</Text>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
<View style={styles.container}>
{image}
<View style={styles.content}>
{text}
<TextWithIOSLinkWorkaround variant="text-sm/medium" color="text-muted">
{value6}
</TextWithIOSLinkWorkaround>
</View>
{((Component) => <Component />)(value2 ? FamilyCenterLinkingBannerParentContent : FamilyCenterLinkingBannerTeenContent)}
</View>
);
}
@@ -0,0 +1,132 @@
/* Metro module 13438; source: modules/parent_tools/native/FamilyCenterModalAccept.tsx; dependencies: [31, 27, 33, 4501, 697, 5080, 3856, 1244, 12624, 6258, 6259, 13435, 4057, 4573, 2224, 13405, 12626, 10120, 6261, 4578, 5282, 10121, 2] */
function _fun102190(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:6, offset: 0x022318bb, size: 396 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.header = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', marginBottom: PX_16};
const object4 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginTop = PX_16;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.marginBottom = PX_4;
object2.headerText = object4;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.icon = {transform: [{rotate: '45deg'}], tintColor: INTERACTIVE_TEXT_DEFAULT};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.disclaimer = {marginTop: PX_12};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalAccept.tsx');
exports.default = FamilyCenterModalAccept;
}
function FamilyCenterModalAcceptScreen({otherUser}) { // fn#102191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:479, offset: 0x02231a47, size: 931 bytes, params: 2, frame: 37
const styles = useStyles();
const {acceptLinkRequest,
isAcceptLoading} = (require(12624) /* metro dependency 12624: useFamilyCenterActions */).useFamilyCenterActions({onSuccess: env0_3.useCallback(_fun102192,
[]), onError: env0_3.useCallback(_fun102193, [])});
const value5 = env0_3.useCallback(function() {
acceptLinkRequest(otherUser.id);
}, [acceptLinkRequest, otherUser.id]);
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
const items3 = [((Component) => <Component otherUser={otherUser} iconSrc={importDefault(4057) /* metro dependency 4057 */} iconStyles={styles.icon} />)(importDefault(13435) /* metro dependency 13435: FamilyCenterAvatarPair */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Text style={styles.headerText} variant="text-lg/bold">{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).rlNJwZ)}</Text>;
items3[2] = ((Component) => <Component user={otherUser} />)(importDefault(13405) /* metro dependency 13405: FamilyCenterUsernameHeader */);
const items2 = [<View style={styles.header}>{items3}</View>];
items2[1] = ((Component) => <Component source="accept-modal" />)(importDefault(12626) /* metro dependency 12626: FamilyCenterDataConfirmation */);
const format = intl.format;
const snlFqR = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).snlFqR;
const username = otherUser.username;
items2[2] = <Text style={styles.disclaimer} variant="text-xs/normal" color="text-default">{Reflect.apply(format,
intl, [snlFqR, {username: username}])}</Text>;
const modalContent = <ModalContent>{items2}</ModalContent>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<ModalScreen>
{modalContent}
<ModalFooter>
<ButtonGroup>
<Button
variant="primary"
disabled={isAcceptLoading}
loading={isAcceptLoading}
text={(require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['wI/jo3'])}
onPress={value5}
/>
<Button
variant="tertiary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
/>
</ButtonGroup>
</ModalFooter>
</ModalScreen>
);
}
function FamilyCenterModalAccept({otherUser}) { // fn#102195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:1705, offset: 0x02231e7d, size: 156 bytes, params: 2, frame: 18
const value2 = env0_3.useMemo(function() {
return _fun102197(otherUser);
}, [otherUser]);
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Modal
initialRouteName="ACCEPT"
screens={value2}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun102192() { // fn#102192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:560, offset: 0x02231dea, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function _fun102193() { // fn#102193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:602, offset: 0x02231e0f, size: 85 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(3856) /* metro dependency 3856: ToastUtils */;
const presentFailedToast = value.presentFailedToast;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const R0RpRX = (require(1244) /* metro dependency 1244: indexNative */).t.R0RpRX;
Reflect.apply(presentFailedToast, value, [Reflect.apply(string, intl, [R0RpRX])]);
}
function _fun102196() { // fn#102196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:1770, offset: 0x02231f19, size: 25 bytes, params: 1, frame: 11
return ((a0) => {
var env0_0 = a0;
var object2 = {headerShown: true};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object2.headerTitle = _fun102198;
object2.render = _fun102199;
return {ACCEPT: object2};
})(otherUser);
}
function getScreens_102197(a0) { // fn#102197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13628:1774, offset: 0x02231f32, size: 114 bytes, params: 2, frame: 17
const env0_0 = a0;
const object = {headerShown: true};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object.headerTitle = function() {
return null;
};
object.render = render_102199;
return {ACCEPT: object};
}
@@ -0,0 +1,111 @@
/* Metro module 13440; source: modules/parent_tools/native/FamilyCenterModalCancel.tsx; dependencies: [31, 27, 33, 4501, 697, 8171, 5080, 3856, 1244, 12624, 44, 6258, 6259, 13435, 8160, 4573, 2224, 13405, 10120, 6261, 4578, 5282, 10121, 2] */
function _fun102210(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:6, offset: 0x022326f3, size: 309 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.header = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', marginBottom: PX_16};
const object4 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginTop = PX_16;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object4.marginBottom = PX_4;
object2.headerText = object4;
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalCancel.tsx');
exports.default = FamilyCenterModalCancel;
}
function FamilyCenterModalCancelScreen({otherUser}) { // fn#102211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:350, offset: 0x02232828, size: 801 bytes, params: 2, frame: 35
const styles = useStyles();
const value2 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const {cancelLinkRequest,
isCancelLoading} = (require(12624) /* metro dependency 12624: useFamilyCenterActions */).useFamilyCenterActions({onSuccess: env0_3.useCallback(_fun102212,
[]), onError: env0_3.useCallback(_fun102213, [])});
const value6 = env0_3.useCallback(function() {
cancelLinkRequest(otherUser.id);
}, [cancelLinkRequest, otherUser.id]);
(importDefault(44) /* metro dependency 44 */)(value2,
'FamilyCenterCancelModal should only be rendered for parents.');
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
const items2 = [((Component) => <Component otherUser={otherUser} iconSrc={importDefault(8160) /* metro dependency 8160 */} />)(importDefault(13435) /* metro dependency 13435: FamilyCenterAvatarPair */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const HynllX = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).HynllX;
items2[1] = <Text style={styles.headerText} variant="text-lg/bold">{Reflect.apply(string, intl, [HynllX])}</Text>;
items2[2] = ((Component) => <Component user={otherUser} />)(importDefault(13405) /* metro dependency 13405: FamilyCenterUsernameHeader */);
const modalContent = <ModalContent><View style={styles.header}>{items2}</View></ModalContent>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<ModalScreen>
{modalContent}
<ModalFooter>
<ButtonGroup>
<Button
variant="destructive"
disabled={isCancelLoading}
loading={isCancelLoading}
text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).mK40bk)}
onPress={value6}
/>
<Button
variant="tertiary"
text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).czincX)}
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
/>
</ButtonGroup>
</ModalFooter>
</ModalScreen>
);
}
function FamilyCenterModalCancel({otherUser}) { // fn#102215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:1453, offset: 0x02232b49, size: 156 bytes, params: 2, frame: 18
const value2 = env0_3.useMemo(function() {
return _fun102217(otherUser);
}, [otherUser]);
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Modal
initialRouteName="CANCEL"
screens={value2}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun102216() { // fn#102216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:1518, offset: 0x02232be5, size: 25 bytes, params: 1, frame: 11
return ((a0) => {
var env0_0 = a0;
var object2 = {headerShown: true};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object2.headerTitle = _fun102218;
object2.render = _fun102219;
return {CANCEL: object2};
})(otherUser);
}
function getScreens_102217(a0) { // fn#102217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13630:1522, offset: 0x02232bfe, size: 114 bytes, params: 2, frame: 17
const env0_0 = a0;
const object = {headerShown: true};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object.headerTitle = function() {
return null;
};
object.render = render_102219;
return {CANCEL: object};
}
@@ -0,0 +1,222 @@
/* Metro module 13404; source: modules/parent_tools/native/FamilyCenterModalDataTooltip.tsx; dependencies: [31, 27, 5117, 33, 6682, 12628, 3858, 12324, 6684, 12630, 4076, 10112, 4501, 697, 4573, 12627, 1244, 2224, 8171, 5187, 6258, 6259, 10120, 4578, 5080, 5282, 10121, 2] */
function _fun102011(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13594:6, offset: 0x02227e6d, size: 886 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const TeenActionDisplayType = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).TeenActionDisplayType;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
object3 = {};
const USER_INTERACTION = TeenActionDisplayType.USER_INTERACTION;
const ChatIcon = (require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon;
object3[USER_INTERACTION] = ChatIcon;
const USER_CALLED = TeenActionDisplayType.USER_CALLED;
const PhoneIcon = (require(12628) /* metro dependency 12628: PhoneIcon */).PhoneIcon;
object3[USER_CALLED] = PhoneIcon;
const USER_ADD = TeenActionDisplayType.USER_ADD;
const FriendsIcon = (require(3858) /* metro dependency 3858: FriendsIcon */).FriendsIcon;
object3[USER_ADD] = FriendsIcon;
const GUILD_ADD = TeenActionDisplayType.GUILD_ADD;
const ServerGridIcon = (require(12324) /* metro dependency 12324: ServerGridIcon */).ServerGridIcon;
object3[GUILD_ADD] = ServerGridIcon;
const GUILD_INTERACTION = TeenActionDisplayType.GUILD_INTERACTION;
const ThreadIcon = (require(6684) /* metro dependency 6684: ThreadIcon */).ThreadIcon;
object3[GUILD_INTERACTION] = ThreadIcon;
const PURCHASES = TeenActionDisplayType.PURCHASES;
const CreditCardIcon = (require(12630) /* metro dependency 12630: CreditCardIcon */).CreditCardIcon;
object3[PURCHASES] = CreditCardIcon;
const TOTAL_VOICE_MINUTES = TeenActionDisplayType.TOTAL_VOICE_MINUTES;
const ClockIcon = (require(4076) /* metro dependency 4076: ClockIcon */).ClockIcon;
object3[TOTAL_VOICE_MINUTES] = ClockIcon;
const GIFTS = TeenActionDisplayType.GIFTS;
const GiftIcon = (require(10112) /* metro dependency 10112: GiftIcon */).GiftIcon;
object3[GIFTS] = GiftIcon;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
object3 = {};
const object5 = {'display': 'flex', 'flexDirection': 'row', 'width': '100%', 'alignItems': 'center'};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.marginBottom = PX_8;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingVertical = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.paddingHorizontal = PX_12;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.row = object5;
object3.content = {flexShrink: 1};
const object6 = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'width': 40, 'height': 40,
'backgroundColor': null, 'borderRadius': null, 'flexShrink': 0};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object6.backgroundColor = BACKGROUND_BASE_LOWEST;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.marginRight = PX_12;
object3.iconContainer = object6;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.header = {marginBottom: PX_4};
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
object3.icon = {tintColor: TEXT_BRAND};
const env0_8 = Reflect.apply(createStyles, value, [object3]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object3 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.container = {'display': 'flex', 'alignItems': 'center', 'paddingHorizontal': null, 'width': '100%',
paddingHorizontal: PX_16};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.groupHeader = {marginBottom: PX_24};
const env0_10 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalDataTooltip.tsx');
exports.default = FamilyCenterModalDataTooltip;
}
function FamilyCenterModalDataTooltipScreen() { // fn#102012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13594:1653, offset: 0x022281e3, size: 519 bytes, params: 1, frame: 31
const styles = useStyles();
const useAgeSpecificTextModule = require(12627) /* metro dependency 12627: useAgeSpecificText */;
const useAgeSpecificText = useAgeSpecificTextModule.useAgeSpecificText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const value2 = Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).n6LOrh]);
string = intl.string;
const JNLpDZ = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).JNLpDZ;
const value3 = Reflect.apply(useAgeSpecificText, useAgeSpecificTextModule, [value2, Reflect.apply(string, intl,
[JNLpDZ])]);
const env0_0 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const sortedActivityTypeConfigs = (require(5187) /* metro dependency 5187: FamilyCenterUtils */).getSortedActivityTypeConfigs();
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items2 = [<Text style={styles.groupHeader} variant="text-lg/bold" color="mobile-text-heading-primary">{value3}</Text>];
items2[1] = sortedActivityTypeConfigs.map(_fun102013);
const modalContent = <ModalContent><View style={styles.container}>{items2}</View></ModalContent>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<ModalScreen>
{modalContent}
<ModalFooter>
<Button
variant="primary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN'])}
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
/>
</ModalFooter>
</ModalScreen>
);
}
function Row_102014({header, description, IconComponent}) { // fn#102014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13594:1114, offset: 0x0222847e, size: 273 bytes, params: 2, frame: 27
const styles = useStyles();
const view = <View style={styles.iconContainer}><IconComponent style={styles.icon} /></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.row}>
{view}
<View style={styles.content}>
<Text
style={styles.header}
variant="text-sm/bold"
color="mobile-text-heading-primary"
>
{header}
</Text>
<Text variant="text-xs/medium" color="text-default">
{description}
</Text>
</View>
</View>
);
}
function FamilyCenterModalDataTooltip() { // fn#102015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13594:2468, offset: 0x0222858f, size: 141 bytes, params: 1, frame: 18
const value2 = env0_3.useMemo(function() {
return _fun102017();
}, []);
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Modal
initialRouteName="DATA_TOOLTIP"
screens={value2}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun102013(a0) { // fn#102013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13594:2095, offset: 0x022283ea, size: 148 bytes, params: 2, frame: 20
var r0;
var r1;
var r7;
var item3;
var value3;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r3 = value2 ? value : item;
if (value2) {
r0 = item2;
r1 = value2;
r7 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r7 = value;
} else {
r0 = item3;
r1 = value3;
r7 = item;
}
}
if (!r1) {
r0.return();
}
return (
<Row_102014
IconComponent={env1_7[r3]}
header={r7.tooltipHeader()}
description={r7.tooltipDescription(env0_0 ?? value)}
key={r3}
/>
);
}
function _fun102016() { // fn#102016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13594:2525, offset: 0x0222861c, size: 17 bytes, params: 1, frame: 9
return (() => {
var object2 = {headerShown: true};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object2.headerTitle = _fun102018;
object2.render = _fun102019;
return {DATA_TOOLTIP: object2};
})();
}
function getScreens_102017() { // fn#102017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13594:2529, offset: 0x0222862d, size: 109 bytes, params: 1, frame: 17
const object = {headerShown: true};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object.headerTitle = function() {
return null;
};
object.render = render_102019;
return {DATA_TOOLTIP: object};
}
function getScreens_102017Render() { // fn#102019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13594:2670, owner: getScreens_102017.render, offset: 0x0222869a, size: 23 bytes, params: 1, frame: 13
return <FamilyCenterModalDataTooltipScreen />;
}
@@ -0,0 +1,125 @@
/* Metro module 13439; source: modules/parent_tools/native/FamilyCenterModalDecline.tsx; dependencies: [31, 27, 33, 4501, 697, 8171, 5080, 3856, 1244, 12624, 44, 6258, 6259, 13435, 8160, 4573, 2224, 13405, 10120, 6261, 4578, 5282, 10121, 2] */
function _fun102200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:6, offset: 0x02231fc7, size: 418 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.header = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', marginBottom: PX_16};
const object5 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.marginTop = PX_16;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.marginBottom = PX_4;
object2.headerText = object5;
const object6 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.padding = PX_24;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.body = object6;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.noticeHeader = {marginBottom: PX_4};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalDecline.tsx');
exports.default = FamilyCenterModalDecline;
}
function FamilyCenterModalDeclineScreen({otherUser}) { // fn#102201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:517, offset: 0x02232169, size: 1038 bytes, params: 2, frame: 37
const styles = useStyles();
const value2 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const {declineLinkRequest,
isDeclineLoading} = (require(12624) /* metro dependency 12624: useFamilyCenterActions */).useFamilyCenterActions({onSuccess: env0_3.useCallback(_fun102202,
[]), onError: env0_3.useCallback(_fun102203, [])});
const value6 = env0_3.useCallback(function() {
declineLinkRequest(otherUser.id);
}, [declineLinkRequest, otherUser.id]);
(importDefault(44) /* metro dependency 44 */)(!value2,
'FamilyCenterDeclineLinkModal should only be rendered for teens.');
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
const items2 = [((Component) => <Component otherUser={otherUser} iconSrc={importDefault(8160) /* metro dependency 8160 */} />)(importDefault(13435) /* metro dependency 13435: FamilyCenterAvatarPair */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = <Text style={styles.headerText} variant="text-lg/bold">{Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).teIRCR])}</Text>;
items2[2] = ((Component) => <Component user={otherUser} />)(importDefault(13405) /* metro dependency 13405: FamilyCenterUsernameHeader */);
const view = <View style={styles.header}>{items2}</View>;
const text = <Text style={styles.noticeHeader} variant="eyebrow" color="mobile-text-heading-primary">{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).cXgKMD)}</Text>;
string = intl.string;
const LcM8BS = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).LcM8BS;
const modalContent = <ModalContent>{view}<View style={styles.body}>{text}<Text variant="text-sm/normal" color="text-default">{Reflect.apply(string,
intl, [LcM8BS])}</Text></View></ModalContent>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<ModalScreen>
{modalContent}
<ModalFooter>
<ButtonGroup>
<Button
variant="destructive"
disabled={isDeclineLoading}
loading={isDeclineLoading}
text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).dKxFcn)}
onPress={value6}
/>
<Button
variant="tertiary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
/>
</ButtonGroup>
</ModalFooter>
</ModalScreen>
);
}
function FamilyCenterModalDecline({otherUser}) { // fn#102205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:1916, offset: 0x022325cc, size: 156 bytes, params: 2, frame: 18
const value2 = env0_3.useMemo(function() {
return _fun102207(otherUser);
}, [otherUser]);
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Modal
initialRouteName="DECLINE"
screens={value2}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun102206() { // fn#102206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:1982, offset: 0x02232668, size: 25 bytes, params: 1, frame: 11
return ((a0) => {
var env0_0 = a0;
var object2 = {headerShown: true};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object2.headerTitle = _fun102208;
object2.render = _fun102209;
return {DECLINE: object2};
})(otherUser);
}
function getScreens_102207(a0) { // fn#102207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13629:1986, offset: 0x02232681, size: 114 bytes, params: 2, frame: 17
const env0_0 = a0;
const object = {headerShown: true};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object.headerTitle = function() {
return null;
};
object.render = render_102209;
return {DECLINE: object};
}
@@ -0,0 +1,169 @@
/* Metro module 13434; source: modules/parent_tools/native/FamilyCenterModalDisconnect.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 5080, 8171, 3856, 1244, 12624, 12627, 2224, 6258, 6259, 13435, 8160, 4573, 13405, 6238, 1305, 10120, 6261, 4578, 5282, 10121, 2] */
function _fun102167(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:6, offset: 0x0223048a, size: 434 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.header = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', marginBottom: PX_16};
const object5 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.marginTop = PX_16;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.marginBottom = PX_4;
object2.headerText = object5;
const object6 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object6.padding = PX_24;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
object2.body = object6;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.noticeHeader = {marginBottom: PX_4};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalDisconnect.tsx');
exports.default = FamilyCenterModalDisconnect;
}
function FamilyCenterModalDisconnectScreen({otherUser}) { // fn#102168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:527, offset: 0x0223063c, size: 1399 bytes, params: 2, frame: 44
const styles = useStyles();
const value2 = env0_4.useCallback(_fun102169, []);
const value3 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const [property, env0_1] = env0_3(env0_4.useState(false), 2);
const {disconnectLinkRequest,
isDisconnectLoading} = (require(12624) /* metro dependency 12624: useFamilyCenterActions */).useFamilyCenterActions({onSuccess: value2,
onError: env0_4.useCallback(_fun102170, [])});
const useAgeSpecificTextModule = require(12627) /* metro dependency 12627: useAgeSpecificText */;
let useAgeSpecificText = useAgeSpecificTextModule.useAgeSpecificText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const VJaHUb = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).VJaHUb;
const value9 = Reflect.apply(useAgeSpecificText, useAgeSpecificTextModule, [Reflect.apply(string, intl, [VJaHUb]),
intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['/MYCee'])]);
const moduleValue3 = useAgeSpecificTextModule;
useAgeSpecificText = moduleValue3.useAgeSpecificText;
const value10 = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).f1SUeW);
string = intl.string;
const EvMGLT = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).EvMGLT;
const value11 = Reflect.apply(useAgeSpecificText, moduleValue3, [value10, Reflect.apply(string, intl, [EvMGLT])]);
const value12 = env0_4.useCallback(function() {
disconnectLinkRequest(otherUser.id);
}, [disconnectLinkRequest, otherUser.id]);
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
const items3 = [((Component) => <Component otherUser={otherUser} iconSrc={importDefault(8160) /* metro dependency 8160 */} />)(importDefault(13435) /* metro dependency 13435: FamilyCenterAvatarPair */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const format = intl.format;
const property2 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['NMSTb/'];
const object = {};
const String = global.String;
object.isAdult = String(value3);
items3[1] = <Text style={styles.headerText} variant="text-lg/bold">{Reflect.apply(format, intl, [property2,
object])}</Text>;
items3[2] = ((Component) => <Component user={otherUser} />)(importDefault(13405) /* metro dependency 13405: FamilyCenterUsernameHeader */);
const items2 = [<View style={styles.header}>{items3}</View>];
string = intl.string;
const VKblNt = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).VKblNt;
items2[1] = <View style={styles.body}><Text style={styles.noticeHeader} variant="eyebrow" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [VKblNt])}</Text><Text variant="text-sm/normal" color="text-default">{value11}</Text></View>;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {disabled: isDisconnectLoading, onPress: onPress_102172,
label: <Text variant="text-xs/semibold">{value9}</Text>};
const Checkbox = (require(1305) /* metro dependency 1305: native */).Checkbox;
tableRowProps.icon = <Checkbox selected={property} />;
items2[2] = <TableRow {...tableRowProps} />;
const modalContent = <ModalContent>{items2}</ModalContent>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<ModalScreen>
{modalContent}
<ModalFooter>
<ButtonGroup>
<Button
variant="destructive"
disabled={property ? isDisconnectLoading : !property}
loading={isDisconnectLoading}
text={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['c5L+sl'])}
onPress={value12}
/>
<Button
variant="tertiary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
/>
</ButtonGroup>
</ModalFooter>
</ModalScreen>
);
}
function FamilyCenterModalDisconnect({otherUser}) { // fn#102174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:2275, offset: 0x02230c48, size: 156 bytes, params: 2, frame: 18
const value2 = env0_4.useMemo(function() {
return _fun102176(otherUser);
}, [otherUser]);
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Modal
initialRouteName="DISCONNECT"
screens={value2}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun102170() { // fn#102170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:706, offset: 0x02230bb3, size: 99 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(3856) /* metro dependency 3856: ToastUtils */;
const presentFailedToast = value.presentFailedToast;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const R0RpRX = (require(1244) /* metro dependency 1244: indexNative */).t.R0RpRX;
Reflect.apply(presentFailedToast, value, [Reflect.apply(string, intl, [R0RpRX])]);
env0_1(false);
}
function FamilyCenterModalDisconnectScreenOnPress() { // fn#102172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:1743, owner: FamilyCenterModalDisconnectScreen.onPress, offset: 0x02230c2f, size: 25 bytes, params: 1, frame: 11
env0_1(function(a0) {
return !a0;
});
}
function _fun102175() { // fn#102175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:2344, offset: 0x02230ce4, size: 25 bytes, params: 1, frame: 11
return ((a0) => {
var env0_0 = a0;
var object2 = {headerShown: true};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object2.headerTitle = _fun102177;
object2.render = _fun102178;
return {DISCONNECT: object2};
})(otherUser);
}
function getScreens_102176(a0) { // fn#102176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:2348, offset: 0x02230cfd, size: 114 bytes, params: 2, frame: 17
const env0_0 = a0;
const object = {headerShown: true};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object.headerTitle = function() {
return null;
};
object.render = render_102178;
return {DISCONNECT: object};
}
function getScreens_102176Render() { // fn#102178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13624:2487, owner: getScreens_102176.render, offset: 0x02230d6f, size: 35 bytes, params: 1, frame: 13
return <FamilyCenterModalDisconnectScreen otherUser={env0_0} />;
}
@@ -0,0 +1,202 @@
/* Metro module 13394; source: modules/parent_tools/native/FamilyCenterModalQRCode.tsx; dependencies: [57, 31, 27, 5117, 661, 33, 4501, 697, 8171, 8170, 3856, 1244, 5080, 12624, 44, 4594, 683, 6258, 6259, 1305, 11785, 4573, 2224, 6766, 5278, 9181, 10120, 6261, 4578, 5282, 10121, 2] */
function _fun101968(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:6, offset: 0x02225af1, size: 563 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
let value = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_6 = value.FamilyCenterAction;
const env0_7 = value.PLACEHOLDER_QR_CODE_URL;
const env0_8 = value.QR_CODE_AUTO_HIDE_TIMEOUT;
const env0_9 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const MESSAGE_MENTIONED_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_MENTIONED_BACKGROUND_DEFAULT;
object2.noticeContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'center', 'backgroundColor': null, 'padding': 12, 'marginBottom': 24, 'marginHorizontal': -16,
backgroundColor: MESSAGE_MENTIONED_BACKGROUND_DEFAULT};
const object4 = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null,
'marginRight': 8, 'width': 18, 'height': 18};
let STATUS_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_WARNING;
object4.backgroundColor = STATUS_WARNING;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.noticeIconCircle = object4;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.noticeIcon = {'width': 11, 'height': 11, tintColor: BACKGROUND_BASE_LOW};
STATUS_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_WARNING;
object2.noticeText = {color: STATUS_WARNING};
object2.header = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'textAlign': 'center',
'marginBottom': 16};
object2.headerText = {marginBottom: 4};
object2.description = {textAlign: 'center'};
object2.reminder = {'marginTop': 16, 'textAlign': 'center'};
object2.qrCode = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center'};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalQRCode.tsx');
exports.default = FamilyCenterModalQRCode;
}
function FamilyCenterModalQRCodeScreen() { // fn#101969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:1124, offset: 0x02225d24, size: 1502 bytes, params: 1, frame: 40
const styles = useStyles();
const value2 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const [property, env0_1] = env0_3(env0_4.useState(false), 2);
const value5 = (require(8170) /* metro dependency 8170: useUserLinks */).usePendingRequestCount();
const value6 = env0_4.useRef(value5);
const value8 = (require(12624) /* metro dependency 12624: useFamilyCenterActions */).useFamilyCenterActions({onError: env0_4.useCallback(_fun101970,
[])});
var env0_4 = value8.getLinkCode;
const isGetLinkCodeLoading = value8.isGetLinkCodeLoading;
const value9 = (require(8170) /* metro dependency 8170: useUserLinks */).useUserQRLinkUrl();
(importDefault(44) /* metro dependency 44 */)(!value2, 'FamilyCenterQRCodeModal should only be rendered for teens.');
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
getLinkCode();
});
env0_4.useEffect(_fun101972, [value6, value5]);
const value10 = env0_4.useCallback(_fun101973, [property]);
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const view = <View style={styles.noticeIconCircle}><Icon style={styles.noticeIcon} source={importDefault(11785) /* metro dependency 11785 */} /></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items2 = [<View style={styles.noticeContainer}>{view}<Text style={styles.noticeText} variant="text-sm/semibold">{Reflect.apply(string,
intl, [(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).iHYMAz])}</Text></View>];
string = intl.string;
const AVTZaN = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).AVTZaN;
const text = <Text style={styles.headerText} variant="text-lg/bold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [AVTZaN])}</Text>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const format = intl.format;
const LyyCsE = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).LyyCsE;
items2[1] = <View style={styles.header}>{text}<TextWithIOSLinkWorkaround style={styles.description} variant="text-sm/normal" color="text-default">{Reflect.apply(format,
intl, [LyyCsE,
{link: 'https://support.discord.com/hc/articles/14155060633623'}])}</TextWithIOSLinkWorkaround></View>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const QRCodeWithOverlay = (require(9181) /* metro dependency 9181: QRCode */).QRCodeWithOverlay;
const r11 = property ? isGetLinkCodeLoading ? PLACEHOLDER_QR_CODE_URL : value9 ?? PLACEHOLDER_QR_CODE_URL : PLACEHOLDER_QR_CODE_URL;
const QRCodeOverlaySizes = (require(9181) /* metro dependency 9181: QRCode */).QRCodeOverlaySizes;
const SIZE_60 = QRCodeOverlaySizes.SIZE_60;
items2[2] = <PressableOpacity style={styles.qrCode} onPress={value10} activeOpacity={0.6}><QRCodeWithOverlay size={237} text={r11} overlaySize={SIZE_60} blur={!property} /></PressableOpacity>;
items2[3] = <Text style={styles.reminder} variant="text-xs/semibold" color="text-default">{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).goDyoe)}</Text>;
const modalContent = <ModalContent>{items2}</ModalContent>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const defaultImport3 = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
return (
<ModalScreen>
{modalContent}
<ModalFooter>
<ButtonGroup>
<Button
variant="primary"
disabled={isGetLinkCodeLoading}
loading={isGetLinkCodeLoading}
text={property ? Reflect.apply(string, intl, [defaultImport3.wg2xwQ]) : Reflect.apply(string,
intl, [defaultImport3['10dX6U']])}
onPress={value10}
/>
<Button
variant="tertiary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
/>
</ButtonGroup>
</ModalFooter>
</ModalScreen>
);
}
function FamilyCenterModalQRCode() { // fn#101976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:3313, offset: 0x02226465, size: 139 bytes, params: 1, frame: 18
const value2 = env0_4.useMemo(function() {
return _fun101978();
}, []);
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Modal
initialRouteName="QR_CODE"
screens={value2}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun101970() { // fn#101970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:1293, offset: 0x02226302, size: 111 bytes, params: 1, frame: 17
const value = environment.__proto__;
const toastUtilsModule = require(3856) /* metro dependency 3856: ToastUtils */;
const presentFailedToast = toastUtilsModule.presentFailedToast;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const R0RpRX = (require(1244) /* metro dependency 1244: indexNative */).t.R0RpRX;
Reflect.apply(presentFailedToast, toastUtilsModule, [Reflect.apply(string, intl, [R0RpRX])]);
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function _fun101972() { // fn#101972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:1614, offset: 0x02226371, size: 59 bytes, params: 1, frame: 11
var value;
if (env0_2 > env0_3.current) {
value = environment.__proto__;
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
value.pop();
}
}
function _fun101973() { // fn#101973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:1677, offset: 0x022263ac, size: 60 bytes, params: 1, frame: 14
var environment;
var setTimeout;
env0_1(_fun101974);
if (!env0_0) {
setTimeout = global.setTimeout;
value = environment.__proto__;
setTimeout(_fun101975, QR_CODE_AUTO_HIDE_TIMEOUT);
}
}
function _fun101977() { // fn#101977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:3365, offset: 0x022264f0, size: 17 bytes, params: 1, frame: 9
return (() => {
var object2 = {headerShown: true};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object2.headerTitle = _fun101979;
object2.render = _fun101980;
return {QR_CODE: object2};
})();
}
function _fun101974(a0) { // fn#101974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:1685, offset: 0x022263e8, size: 88 bytes, params: 2, frame: 16
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FAMILY_CENTER_ACTION = AnalyticEvents.FAMILY_CENTER_ACTION;
Reflect.apply(track, defaultImport, [FAMILY_CENTER_ACTION,
{action: env1_0 ? FamilyCenterAction.HideQRCode : FamilyCenterAction.RevealQRCode}]);
return !a0;
}
function _fun101975() { // fn#101975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:1788, offset: 0x02226440, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function getScreens_101978() { // fn#101978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:3369, offset: 0x02226501, size: 107 bytes, params: 1, frame: 17
const object = {headerShown: true};
object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object.headerTitle = function() {
return null;
};
object.render = render_101980;
return {QR_CODE: object};
}
function getScreens_101978Render() { // fn#101980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:3505, owner: getScreens_101978.render, offset: 0x0222656c, size: 23 bytes, params: 1, frame: 13
return <FamilyCenterModalQRCodeScreen />;
}
@@ -0,0 +1,742 @@
/* Metro module 12622; source: modules/parent_tools/native/FamilyCenterModalRequest.tsx; dependencies: [5, 31, 27, 1878, 5117, 33, 4501, 697, 1484, 632, 5118, 12623, 5187, 12624, 6258, 6259, 1305, 1423, 1244, 2224, 4573, 12625, 12626, 10120, 6261, 4578, 5080, 5473, 8171, 44, 11365, 8160, 5461, 6266, 1909, 5263, 5074, 4813, 12620, 5282, 12632, 10121, 2] */
function _fun96804(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:6, offset: 0x02167681, size: 1610 bytes, params: 8, frame: 29
var object3;
const env0_0 = require;
const closure = FamilyCenterModalRequestConfirm;
const closure2 = FamilyCenterModalRequestSuccess;
const closure3 = FamilyCenterModalRequestError;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_5 = value.Image;
const env0_6 = value.View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_8 = value.FAMILY_CENTER_AGE_VERIFICATION_RESUME_TIMEOUT;
const env0_9 = value.FAMILY_CENTER_LINK_REQUEST_ERROR_EXPERIENCES;
const env0_10 = value.FamilyCenterFailureCode;
const env0_11 = value.FamilyCenterIconType;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
object3 = {};
const object5 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.marginTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.marginBottom = PX_16;
object3.headerText = object5;
object3.art = {'width': 165, 'height': 119};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.connectionHeader = {alignItems: 'center', marginBottom: PX_16};
const object7 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'alignSelf': 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.padding = PX_8;
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object7.backgroundColor = BACKGROUND_SURFACE_HIGH;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object7.marginBottom = PX_24;
object3.headerIcons = object7;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.ellipseGroup = {flexDirection: 'row', marginHorizontal: PX_12};
const object8 = {'width': 4, 'height': 4, 'marginHorizontal': 2};
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object8.backgroundColor = ICON_MUTED;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.ellipse = object8;
object3.title = {textAlign: 'center'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.teenName = {marginTop: PX_4, textAlign: 'center'};
const object10 = {};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object10.marginTop = PX_8;
object10.textAlign = 'center';
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object10.paddingHorizontal = PX_16;
object3.consent = object10;
const env0_15 = Reflect.apply(createStyles, value, [object3]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object3 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.content = {'flex': 1, 'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center',
paddingHorizontal: PX_16};
object3.textWrapper = {alignItems: 'center'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.header = {marginBottom: PX_8};
object3.description = {textAlign: 'center'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.illustration = {'position': 'absolute', 'bottom': '100%', 'left': 0, 'right': 0, 'alignItems': 'center',
paddingBottom: PX_24};
const env0_16 = Reflect.apply(createStyles, value, [object3]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object3 = {header: {'marginBottom': 8, 'textAlign': 'center'}};
object3.description = {textAlign: 'center'};
const object11 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'height': 64, 'width': 64,
'borderRadius': null, 'backgroundColor': null, 'marginBottom': 24};
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object11.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.ring = object11;
const object12 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'height': 48, 'width': 48};
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
let STATUS_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE;
object12.backgroundColor = STATUS_POSITIVE;
object3.iconContainer = object12;
STATUS_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_POSITIVE;
object3.positive = {backgroundColor: STATUS_POSITIVE};
const BACKGROUND_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_CRITICAL;
object3.negative = {backgroundColor: BACKGROUND_FEEDBACK_CRITICAL};
const env0_17 = Reflect.apply(createStyles, value, [object3]);
const env0_18 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
'justifyContent': 'center', 'alignItems': 'center'}});
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const env0_19 = Reflect.apply(createStyles, value, [{content: {'flex': 1, 'flexDirection': 'column',
'alignItems': 'center', 'justifyContent': 'center', 'paddingHorizontal': 32}, title: {textAlign: 'center',
marginBottom: PX_8}, description: {textAlign: 'center'}}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object3 = {content: {'flex': 1, 'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center',
'paddingHorizontal': 32}};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.art = {'width': 165, 'height': 119, marginBottom: PX_24};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.title = {textAlign: 'center', marginBottom: PX_8};
object3.description = {textAlign: 'center'};
const env0_20 = Reflect.apply(createStyles, value, [object3]);
object3 = {headerShown: true};
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object3.headerTitle = function() {
return null;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalRequest.tsx');
exports.default = FamilyCenterRequestModal;
exports.FamilyCenterModalRequestConfirm = closure;
exports.FamilyCenterModalRequestSuccess = closure2;
exports.FamilyCenterModalRequestError = closure3;
}
function FamilyCenterModalRequestConfirm({userId, linkCode, teenIdentity}) { // fn#96805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:1178, offset: 0x02167ccb, size: 1841 bytes, params: 2, frame: 43
var r30;
var r8;
var jsxRuntimeEnv0_14Binding;
var items5;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
var LARGE;
var formatToPlainString;
var kFj4h1;
var items2;
var ellipse;
var items3;
var object14;
var global_name;
var items4;
var format;
var yiUJNU;
const styles = useStyles();
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const {requestLink,
isRequestingLink} = (require(12624) /* metro dependency 12624: useFamilyCenterActions */).useFamilyCenterActions({onSuccess: env0_4.useCallback(_fun96807,
[value3]), onError: env0_4.useCallback(_fun96808, [value3])});
const value7 = env0_4.useCallback(function() {
requestLink(userId, linkCode);
}, [requestLink, userId, linkCode]);
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
if (teenIdentity != null) {
var viewBindingProps = {style: styles.connectionHeader};
var viewBinding2Props = {style: styles.headerIcons};
var avatarProps = {source: currentUser != null ? (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource(currentUser) : undefined};
LARGE = AvatarSizes.LARGE;
avatarProps.size = LARGE;
formatToPlainString = intl.formatToPlainString;
kFj4h1 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).kFj4h1;
r30 = currentUser?.globalName ?? currentUser?.username ?? '';
avatarProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [kFj4h1, {name: r30}]);
items2 = [<Avatar {...avatarProps} />];
var viewBinding3Props = {style: styles.ellipseGroup};
ellipse = styles.ellipse;
items3 = [<View style={ellipse} />];
ellipse = styles.ellipse;
items3[1] = <View style={ellipse} />;
ellipse = styles.ellipse;
items3[2] = <View style={ellipse} />;
items2[1] = <View {...viewBinding3Props}>{items3}</View>;
var avatarProps2 = {source: (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource({id: teenIdentity.id,
avatar: teenIdentity.avatar, discriminator: '0'})};
LARGE = AvatarSizes.LARGE;
avatarProps2.size = LARGE;
formatToPlainString = intl.formatToPlainString;
kFj4h1 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).kFj4h1;
global_name = teenIdentity.global_name;
r30 = global_name ?? teenIdentity.username;
avatarProps2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [kFj4h1, {name: r30}]);
items2[2] = <Avatar {...avatarProps2} />;
items4 = [<View {...viewBinding2Props}>{items2}</View>];
items4[1] = <Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={styles.title}>{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).sMmIbm)}</Text>;
global_name = teenIdentity.global_name;
items4[2] = <Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={styles.teenName}>{global_name ?? teenIdentity.username}</Text>;
var textProps2 = {'variant': 'text-sm/medium', 'color': 'text-muted', style: styles.consent};
format = intl.format;
yiUJNU = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).yiUJNU;
global_name = teenIdentity.global_name;
items4[3] = <Text {...textProps2}>{Reflect.apply(format, intl, [yiUJNU,
{username: global_name ?? teenIdentity.username}])}</Text>;
r8 = <View {...viewBindingProps}>{items4}</View>;
} else {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
items5 = [<Image style={styles.art} source={importDefault(12625) /* metro dependency 12625 */} />];
items5[1] = <Text style={styles.headerText} variant="text-lg/bold">{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).GH11eI)}</Text>;
r8 = <>{items5}</>;
}
const modalContent = <ModalContent>{r8}{((Component) => <Component source="request-modal" />)(importDefault(12626) /* metro dependency 12626: FamilyCenterDataConfirmation */)}</ModalContent>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const string = intl.string;
const ISg34l = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).ISg34l;
return (
<ModalScreen>
{modalContent}
<ModalFooter>
<ButtonGroup>
<Button
variant="primary"
size="lg"
disabled={isRequestingLink}
loading={isRequestingLink}
text={Reflect.apply(string, intl, [ISg34l])}
onPress={value7}
/>
<Button
variant="secondary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
/>
</ButtonGroup>
</ModalFooter>
</ModalScreen>
);
}
function FamilyCenterModalRequestSuccess() { // fn#96810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:3903, offset: 0x021684c1, size: 718 bytes, params: 1, frame: 40
const value2 = undefined;
const styles = useStyles();
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const value3 = env0_4.useCallback(_fun96812, []);
if (currentUser === null) {
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
const EnvelopeSpotIllustration = (require(5473) /* metro dependency 5473: native */).EnvelopeSpotIllustration;
const items2 = [<View style={styles.illustration}><EnvelopeSpotIllustration scale={0.7} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const EpwfZl = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).EpwfZl;
items2[1] = <Text variant="heading-lg/bold" color="mobile-text-heading-primary" style={styles.header}>{Reflect.apply(string,
intl, [EpwfZl])}</Text>;
items2[2] = <Text variant="text-sm/medium" color="text-muted" style={styles.description}>{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).dVtWId,
{email: currentUser == null ? value2 : currentUser.email})}</Text>;
const modalContent = <ModalContent><View style={styles.content}><View style={styles.textWrapper}>{items2}</View></View></ModalContent>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<ModalScreen>
{modalContent}
<ModalFooter>
<Button
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={value3}
/>
</ModalFooter>
</ModalScreen>
);
}
function FamilyCenterModalRequestError({failureCode}) { // fn#96813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:5341, offset: 0x021687b4, size: 856 bytes, params: 2, frame: 34
var object2;
const styles = useStyles();
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
const value3 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const nativeModule = require(1305) /* metro dependency 1305: native */;
const generateBoxShadowStyle = nativeModule.generateBoxShadowStyle;
const FOUR_DP_ELEVATION_SHADOW_PARAMS = nativeModule.FOUR_DP_ELEVATION_SHADOW_PARAMS;
const value4 = Reflect.apply(generateBoxShadowStyle, nativeModule, [FOUR_DP_ELEVATION_SHADOW_PARAMS]);
const value5 = env0_4.useCallback(_fun96815, []);
(importDefault(44) /* metro dependency 44 */)(currentUser != null, 'User must be logged in to see this modal.');
const property = FAMILY_CENTER_LINK_REQUEST_ERROR_EXPERIENCES[failureCode];
object2 = {isAdult: value3 ?? undefined, email: currentUser.email ?? undefined};
const value6 = property.header(object2);
const value7 = property.description(object2);
const icon = property.icon;
let CHECK = FamilyCenterIconType.CHECK;
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ModalContent = (require(6259) /* metro dependency 6259: ModalContentNative */).ModalContent;
const items4 = [styles.ring, value4];
const items2 = [styles.iconContainer];
items2[1] = icon === CHECK ? styles.positive : styles.negative;
CHECK = FamilyCenterIconType.CHECK;
const items3 = [<View style={items4}><View style={items2}>{icon === CHECK ? <nativeModule.Icon source={importDefault(11365) /* metro dependency 11365 */} color="#FFF" /> : <nativeModule.Icon source={importDefault(8160) /* metro dependency 8160 */} color="#FFF" />}</View></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items3[1] = <Text variant="heading-lg/bold" color="mobile-text-heading-primary" style={styles.header}>{value6}</Text>;
items3[2] = <Text variant="text-sm/medium" color="text-muted" style={styles.description}>{value7}</Text>;
const modalContent = <ModalContent>{items3}</ModalContent>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<ModalScreen>
{modalContent}
<ModalFooter>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={value5}
/>
</ModalFooter>
</ModalScreen>
);
}
function FamilyCenterPrereqLoading({userId, linkCode}) { // fn#96816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:6483, offset: 0x02168b0c, size: 192 bytes, params: 2, frame: 20
const styles = useStyles();
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
env0_4.useEffect(function() {
var env0_0 = false;
_fun96818()();
return _fun96822;
}, []);
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
return (
<ModalScreen>
<View style={styles.container}>
<ActivityIndicator />
</View>
</ModalScreen>
);
}
function FamilyCenterPrereqScreen({title, description, primaryButton}) { // fn#96823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:7293, offset: 0x02168cf9, size: 315 bytes, params: 2, frame: 28
const styles = useStyles();
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const view = <View style={styles.content}><Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={styles.title}>{title}</Text><Text variant="text-sm/medium" color="text-muted" style={styles.description}>{description}</Text></View>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<ModalScreen>
{view}
<ModalFooter>
<Button text={primaryButton.text} onPress={primaryButton.onPress} />
</ModalFooter>
</ModalScreen>
);
}
function useNavigateToVerifyingOnPending() { // fn#96824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:8029, offset: 0x02168e34, size: 152 bytes, params: 1, frame: 18
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
_fun96825);
env0_4.useEffect(_fun96826, [value3, (importDefault(6266) /* metro dependency 6266: usePrevious */)(value3),
value2]);
}
function FamilyCenterConfirmAgeScreen() { // fn#96827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:8407, offset: 0x02168f80, size: 662 bytes, params: 1, frame: 34
const styles = useStyles();
useNavigateToVerifyingOnPending();
const value2 = env0_4.useCallback(function() {
var defaultImport = importDefault(dependencyMap[35]);
var object = {};
object.entryPoint = require(dependencyMap[36]).AgeVerificationModalEntryPoint.FAMILY_CENTER_CONNECTION;
defaultImport.showAgeVerificationGetStartedModal(object);
}, []);
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const items2 = [<Image style={styles.art} source={importDefault(12625) /* metro dependency 12625 */} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text variant="heading-xl/bold" color="mobile-text-heading-primary" style={styles.title}>{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).pQQMJ7)}</Text>;
items2[2] = <Text variant="text-sm/medium" color="text-muted" style={styles.description}>{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['0o3yg8'],
{link: 'https://support.discord.com/hc/articles/14155060633623'})}</Text>;
const view = <View style={styles.content}>{items2}</View>;
const ModalFooter = (require(10120) /* metro dependency 10120: ModalFooterNative */).ModalFooter;
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<ModalScreen>
{view}
<ModalFooter>
<ButtonGroup>
<Button
variant="primary"
text={(require(1244) /* metro dependency 1244: indexNative */).intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['3oUE4o'])}
onPress={value2}
/>
<Button
variant="tertiary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oEAioF)}
onPress={onPress_96829}
/>
</ButtonGroup>
</ModalFooter>
</ModalScreen>
);
}
function FamilyCenterVerifyingScreen() { // fn#96830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:9377, offset: 0x02169284, size: 304 bytes, params: 1, frame: 21
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value3 = (require(4813) /* metro dependency 4813: AgeVerificationUtils */).useIsAgeVerified();
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
_fun96831);
const env0_3 = env0_4.useRef(false);
env0_4.useEffect(_fun96832, [value3, value4, value2]);
env0_4.useEffect(function() {
var env0_0 = global.setTimeout(_fun96834, FAMILY_CENTER_AGE_VERIFICATION_RESUME_TIMEOUT);
return _fun96835;
}, [value2]);
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const ActivityIndicator = (require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator;
return (
<ModalScreen>
<View style={styles.container}>
<ActivityIndicator />
</View>
</ModalScreen>
);
}
function FamilyCenterPrereqInvalidCodeScreen() { // fn#96836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:10248, offset: 0x0216952a, size: 208 bytes, params: 1, frame: 21
const object3 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object3.title = Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).ewSb6o]);
object3.description = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).jcUN2F);
const object4 = {};
string = intl.string;
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
object4.text = Reflect.apply(string, intl, [WAI6xu]);
object4.onPress = (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop;
object3.primaryButton = object4;
return <FamilyCenterPrereqScreen {...object3} />;
}
function FamilyCenterPrereqMustBeAdultScreen() { // fn#96837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:10508, offset: 0x021695fa, size: 259 bytes, params: 1, frame: 23
useNavigateToVerifyingOnPending();
const value2 = env0_4.useCallback(function() {
var defaultImport = importDefault(dependencyMap[35]);
var object = {};
object.entryPoint = require(dependencyMap[36]).AgeVerificationModalEntryPoint.FAMILY_CENTER_CONNECTION;
defaultImport.showAgeVerificationGetStartedModal(object);
}, []);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const BQFHXW = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).BQFHXW;
const format = intl.format;
const WDjaKn = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).WDjaKn;
let object = {};
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['NX+WJN']);
object.onPress = (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop;
return (
<FamilyCenterPrereqScreen
title={Reflect.apply(string, intl, [BQFHXW])}
description={Reflect.apply(format, intl, [WDjaKn, {link: {onClick: value2}}])}
primaryButton={object}
/>
);
}
function FamilyCenterRequestModal({userId, linkCode}) { // fn#96840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:11179, offset: 0x021696fd, size: 293 bytes, params: 2, frame: 19
const value2 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const FamilyCenterConnectionPrereqExperiment = (require(12632) /* metro dependency 12632: FamilyCenterConnectionPrereqExperiment */).FamilyCenterConnectionPrereqExperiment;
const useConfig = FamilyCenterConnectionPrereqExperiment.useConfig;
const enabled = Reflect.apply(useConfig, FamilyCenterConnectionPrereqExperiment,
[{location: 'FamilyCenterRequestModal'}]).enabled;
const value3 = env0_4.useMemo(function() {
return _fun96842(userId, linkCode);
}, [linkCode, userId]);
const FamilyCenterModalRequestSections = (require(12623) /* metro dependency 12623: FamilyCenterModalRequestRouting */).FamilyCenterModalRequestSections;
const r5 = enabled ? FamilyCenterModalRequestSections.PREREQ_LOADING : value2 ? FamilyCenterModalRequestSections.REQUEST : FamilyCenterModalRequestSections.TEEN_SCAN;
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Modal
initialRouteName={r5}
screens={value3}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function _fun96807() { // fn#96807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:1379, offset: 0x021683fc, size: 82 bytes, params: 1, frame: 14
(importDefault(5118) /* metro dependency 5118: FamilyCenterActionCreators */).clearPendingConnection();
const binding = env0_2;
const push = binding.push;
const FamilyCenterModalRequestSections = (require(12623) /* metro dependency 12623: FamilyCenterModalRequestRouting */).FamilyCenterModalRequestSections;
const SENT = FamilyCenterModalRequestSections.SENT;
Reflect.apply(push, binding, [SENT]);
}
function _fun96808(a0) { // fn#96808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:1497, offset: 0x0216844e, size: 90 bytes, params: 2, frame: 16
let value = environment.__proto__;
value = require(5187) /* metro dependency 5187: FamilyCenterUtils */;
value = value.getFailureCodeForAPIError(a0);
const binding = env0_2;
const push = binding.push;
const FamilyCenterModalRequestSections = (require(12623) /* metro dependency 12623: FamilyCenterModalRequestRouting */).FamilyCenterModalRequestSections;
const ERROR = FamilyCenterModalRequestSections.ERROR;
Reflect.apply(push, binding, [ERROR, {failureCode: value}]);
}
function _fun96812() { // fn#96812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:4032, offset: 0x0216878f, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function _fun96817() { // fn#96817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:6597, offset: 0x02168bcc, size: 34 bytes, params: 1, frame: 10
_fun96818()();
return function() {
env0_0 = true;
};
}
function _fun96825() { // fn#96825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:8136, offset: 0x02168ecc, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.ageVerificationStatus;
}
function _fun96826() { // fn#96826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:8244, offset: 0x02168eef, size: 145 bytes, params: 1, frame: 14
var binding;
var value5;
var replace;
let r1 = env0_2 != null && env0_2 !== env0_1 && env0_1 != null;
if (r1) {
binding = env0_1;
value5 = environment.__proto__;
r1 = binding !== (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly.UNVERIFIED;
}
if (r1) {
binding = env0_0;
replace = binding.replace;
value = environment.__proto__;
Reflect.apply(replace, binding,
[(require(12623) /* metro dependency 12623: FamilyCenterModalRequestRouting */).FamilyCenterModalRequestSections.VERIFYING]);
}
}
function FamilyCenterConfirmAgeScreenOnPress() { // fn#96829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:9348, owner: FamilyCenterConfirmAgeScreen.onPress, offset: 0x0216925f, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function _fun96832() { // fn#96832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:9632, offset: 0x021693b4, size: 255 bytes, params: 1, frame: 17
var binding;
const FamilyCenterModalRequestSections = (require(12623) /* metro dependency 12623: FamilyCenterModalRequestRouting */).FamilyCenterModalRequestSections;
var value3;
var moduleValue;
if (env0_1) {
if (env0_3.current) {
return undefined;
}
env0_3.current = true;
value3 = environment.__proto__;
moduleValue = require(12620) /* metro dependency 12620: FamilyCenterNativeUtils */;
if (!moduleValue.resumeFamilyCenterConnection()) {
binding = env0_0;
binding.replace(FamilyCenterModalRequestSections.ERROR,
{failureCode: FamilyCenterFailureCode.GENERIC_ERROR});
}
} else {
binding = env0_2;
var AgeVerificationStatusUkAndAusOnly = (require(1909) /* metro dependency 1909: Server */).AgeVerificationStatusUkAndAusOnly;
var UNVERIFIED = AgeVerificationStatusUkAndAusOnly.UNVERIFIED;
if (binding === UNVERIFIED) {
binding = env0_0;
binding.replace(FamilyCenterModalRequestSections.ERROR,
{failureCode: FamilyCenterFailureCode.GENERIC_ERROR});
}
}
}
function _fun96833() { // fn#96833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:9991, offset: 0x021694b3, size: 45 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun96834, FAMILY_CENTER_AGE_VERIFICATION_RESUME_TIMEOUT);
return _fun96835;
}
function _fun96841() { // fn#96841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:11375, offset: 0x02169822, size: 30 bytes, params: 1, frame: 13
return getScreens_96842(userId, linkCode);
}
function _fun96818() { // fn#96818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:6613, offset: 0x02168bee, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_3(_fun96820);
return _fun96821;
}
function _fun96834() { // fn#96834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:10014, offset: 0x021694e0, size: 74 bytes, params: 1, frame: 15
const binding = env1_0;
const replace = binding.replace;
const FamilyCenterModalRequestSections = (require(12623) /* metro dependency 12623: FamilyCenterModalRequestRouting */).FamilyCenterModalRequestSections;
const ERROR = FamilyCenterModalRequestSections.ERROR;
const GENERIC_ERROR = FamilyCenterFailureCode.GENERIC_ERROR;
Reflect.apply(replace, binding, [ERROR, {failureCode: GENERIC_ERROR}]);
}
function getScreens_96842(a0, a1) { // fn#96842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:11379, offset: 0x02169840, size: 682 bytes, params: 3, frame: 25
var environment;
const env0_0 = a0;
const env0_1 = a1;
const object11 = {};
const value = environment.__proto__.__proto__;
const FamilyCenterModalRequestSections = (require(12623) /* metro dependency 12623: FamilyCenterModalRequestRouting */).FamilyCenterModalRequestSections;
const PREREQ_LOADING = FamilyCenterModalRequestSections.PREREQ_LOADING;
const object12 = {};
const binding = env2_21;
copyDataProperties(object12, binding, undefined);
object12['render'] = getScreens_96842Render;
object11[PREREQ_LOADING] = object12;
const CONFIRM_AGE = FamilyCenterModalRequestSections.CONFIRM_AGE;
const object13 = {};
copyDataProperties(object13, binding, undefined);
object13['render'] = getScreens_96842Render_96844;
object11[CONFIRM_AGE] = object13;
const VERIFYING = FamilyCenterModalRequestSections.VERIFYING;
const object14 = {};
copyDataProperties(object14, binding, undefined);
object14['render'] = getScreens_96842Render_96845;
object11[VERIFYING] = object14;
const REQUEST = FamilyCenterModalRequestSections.REQUEST;
const object15 = {};
const navigatorHeaderNativeModule = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
object15.headerLeft = navigatorHeaderNativeModule.getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object15.headerShown = true;
object15.headerTitle = function() {
return null;
};
object15.render = render_96847;
object11[REQUEST] = object15;
const INVALID_CODE = FamilyCenterModalRequestSections.INVALID_CODE;
const object16 = {};
copyDataProperties(object16, binding, navigatorHeaderNativeModule);
object16['render'] = getScreens_96842Render_96848;
object11[INVALID_CODE] = object16;
const MUST_BE_ADULT = FamilyCenterModalRequestSections.MUST_BE_ADULT;
const object17 = {};
copyDataProperties(object17, binding, navigatorHeaderNativeModule);
object17['render'] = getScreens_96842Render_96849;
object11[MUST_BE_ADULT] = object17;
const SENT = FamilyCenterModalRequestSections.SENT;
const object18 = {headerShown: true};
object18.headerLeft = navigatorHeaderNativeModule.getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object18.headerTitle = function() {
return null;
};
object18.render = render_96851;
object11[SENT] = object18;
const ERROR = FamilyCenterModalRequestSections.ERROR;
const object19 = {headerShown: true};
object19.headerLeft = navigatorHeaderNativeModule.getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object19.headerTitle = function() {
return null;
};
object19.render = render_96853;
object11[ERROR] = object19;
const TEEN_SCAN = FamilyCenterModalRequestSections.TEEN_SCAN;
const object20 = {fullscreen: true};
object20.headerLeft = navigatorHeaderNativeModule.getHeaderCloseButton((importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop);
object20.render = render_96854;
object11[TEEN_SCAN] = object20;
return object11;
}
function* _fun96820() { // fn#96820, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:6633, offset: 0x02168c1d, size: 220 bytes, params: 1, frame: 18
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
var value3 = env4_0(env4_2[11]);
yield value3.resolveConnectionPrereqTarget(require, importDefault);
var value5 = undefined;
if (false) {
return value5;
}
if (!userId) {
if (value5.section === env4_0(env4_2[11]).FamilyCenterModalRequestSections.ERROR) {
dependencyMap.replace(value5.section, value5.params);
} else if (value5.section === env4_0(env4_2[11]).FamilyCenterModalRequestSections.REQUEST) {
dependencyMap.replace(value5.section, value5.params);
} else {
dependencyMap.replace(value5.section);
}
}
}
}
function getScreens_96842Render() { // fn#96843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:11483, owner: getScreens_96842.render, offset: 0x02169aea, size: 43 bytes, params: 1, frame: 14
return <FamilyCenterPrereqLoading userId={env0_0} linkCode={require} />;
}
function getScreens_96842Render_96844() { // fn#96844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:11608, owner: getScreens_96842.render, offset: 0x02169b15, size: 23 bytes, params: 1, frame: 13
return <FamilyCenterConfirmAgeScreen />;
}
function getScreens_96842Render_96845() { // fn#96845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:11715, owner: getScreens_96842.render, offset: 0x02169b2c, size: 23 bytes, params: 1, frame: 13
return <FamilyCenterVerifyingScreen />;
}
function getScreens_96842Render_96847(a0) { // fn#96847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:11905, owner: getScreens_96842.render, offset: 0x02169b43, size: 68 bytes, params: 2, frame: 16
const value = environment.__proto__.__proto__.__proto__;
return (
<FamilyCenterModalRequestConfirm
userId={env0_0}
linkCode={require}
teenIdentity={a0?.teenIdentity}
/>
);
}
function getScreens_96842Render_96848() { // fn#96848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:12079, owner: getScreens_96842.render, offset: 0x02169b87, size: 23 bytes, params: 1, frame: 13
return <FamilyCenterPrereqInvalidCodeScreen />;
}
function getScreens_96842Render_96849() { // fn#96849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:12197, owner: getScreens_96842.render, offset: 0x02169b9e, size: 23 bytes, params: 1, frame: 13
return <FamilyCenterPrereqMustBeAdultScreen />;
}
function getScreens_96842Render_96851() { // fn#96851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:12392, owner: getScreens_96842.render, offset: 0x02169bb5, size: 23 bytes, params: 1, frame: 13
return <FamilyCenterModalRequestSuccess />;
}
function getScreens_96842Render_96853({failureCode}) { // fn#96853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:12584, owner: getScreens_96842.render, offset: 0x02169bcc, size: 37 bytes, params: 2, frame: 13
return <FamilyCenterModalRequestError failureCode={failureCode} />;
}
function getScreens_96842Render_96854() { // fn#96854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12812:12784, owner: getScreens_96842.render, offset: 0x02169bf1, size: 38 bytes, params: 1, frame: 13
const INELIGIBLE_FOR_FAMILY_CENTER = FamilyCenterFailureCode.INELIGIBLE_FOR_FAMILY_CENTER;
return <FamilyCenterModalRequestError failureCode={INELIGIBLE_FOR_FAMILY_CENTER} />;
}
@@ -0,0 +1,61 @@
/* Metro module 12620; source: modules/parent_tools/native/FamilyCenterNativeUtils.tsx; dependencies: [12621, 5117, 661, 683, 5118, 5080, 12622, 1962, 2] */
function _fun96789(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12810:6, offset: 0x021671ed, size: 199 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterPendingConnectionStore = importDefault(12621) /* metro dependency 12621: FamilyCenterPendingConnectionStore */;
const familyCenterConstantsModule = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_4 = familyCenterConstantsModule.FAMILY_CENTER_LINK_REQUEST_REGEX;
const env0_5 = familyCenterConstantsModule.FamilyCenterAction;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterNativeUtils.tsx');
exports.FAMILY_CENTER_REQUEST_MODAL_KEY = 'family-center-request-modal';
exports.handleFamilyCenterQRCodeScan = handleFamilyCenterQRCodeScan;
exports.resumeFamilyCenterConnection = resumeFamilyCenterConnection;
}
function handleFamilyCenterQRCodeScan(a0, a1) { // fn#96790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12810:389, offset: 0x021672b4, size: 219 bytes, params: 3, frame: 22
const value2 = a0.match(FAMILY_CENTER_LINK_REQUEST_REGEX);
if (value2 === null) {
return null;
}
const property = value2[1];
const property2 = value2[2];
const defaultImport = importDefault(dependencyMap[3]);
const track = defaultImport.track;
const FAMILY_CENTER_ACTION = AnalyticEvents.FAMILY_CENTER_ACTION;
const ScanQRCode = FamilyCenterAction.ScanQRCode;
Reflect.apply(track, defaultImport, [FAMILY_CENTER_ACTION, {action: ScanQRCode, selected_teen_id: property,
source: a1}]);
importDefault(dependencyMap[4]).setPendingConnection(property, property2);
const defaultImport3 = importDefault(dependencyMap[5]);
const pushLazy = defaultImport3.pushLazy;
let value = require(dependencyMap[7]);
value = value(dependencyMap[6], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport3, [value, {userId: property, linkCode: property2},
'family-center-request-modal']);
}
function resumeFamilyCenterConnection() { // fn#96791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12810:674, offset: 0x0216738f, size: 150 bytes, params: 1, frame: 20
var r0;
var defaultImport2;
var pushLazy;
var value;
const pendingConnection = FamilyCenterPendingConnectionStore.getPendingConnection();
const value3 = pendingConnection != null;
if (value3) {
importDefault(dependencyMap[5]).popWithKey('family-center-request-modal');
defaultImport2 = importDefault(dependencyMap[5]);
pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[7]);
value = value(dependencyMap[6], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, {userId: pendingConnection.teenId,
linkCode: pendingConnection.linkCode}, 'family-center-request-modal']);
value = true;
r0 = value;
} else {
r0 = value3;
}
return r0;
}
@@ -0,0 +1,50 @@
/* Metro module 13443; source: modules/parent_tools/native/FamilyCenterParentalControlsContentAndSocial.tsx; dependencies: [31, 27, 661, 8224, 33, 9692, 1244, 1948, 13170, 2] */
function _fun102232(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13633:6, offset: 0x022335ba, size: 203 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
const env0_5 = (require(8224) /* metro dependency 8224: SettingsConstants */).MobileSetting;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterParentalControlsContentAndSocial.tsx');
exports.default = FamilyCenterParentalControlsContentAndSocial;
}
function FamilyCenterParentalControlsContentAndSocial() { // fn#102233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13633:304, offset: 0x02233685, size: 396 bytes, params: 1, frame: 27
const settingBuildersModule = require(9692) /* metro dependency 9692: SettingBuilders */;
const createList = settingBuildersModule.createList;
const object = {};
const PARENTAL_CONTROLS_SENSITIVE_CONTENT_FILTERS = MobileSetting.PARENTAL_CONTROLS_SENSITIVE_CONTENT_FILTERS;
object.settings = [PARENTAL_CONTROLS_SENSITIVE_CONTENT_FILTERS];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const dliU4j = (require(1244) /* metro dependency 1244: indexNative */).t.dliU4j;
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const EXPLICIT_MEDIA_REDACTION = HelpdeskArticles.EXPLICIT_MEDIA_REDACTION;
object.subLabel = Reflect.apply(format, intl, [dliU4j, {learnMoreLink: Reflect.apply(getArticleURL, defaultImport,
[EXPLICIT_MEDIA_REDACTION])}]);
const items2 = [object];
let string = intl.string;
const MeYuqs = (require(1244) /* metro dependency 1244: indexNative */).t.MeYuqs;
const PARENTAL_CONTROLS_DIRECT_MESSAGES = MobileSetting.PARENTAL_CONTROLS_DIRECT_MESSAGES;
const PARENTAL_CONTROLS_MESSAGE_REQUESTS = MobileSetting.PARENTAL_CONTROLS_MESSAGE_REQUESTS;
items2[1] = {label: Reflect.apply(string, intl, [MeYuqs]), settings: [PARENTAL_CONTROLS_DIRECT_MESSAGES,
PARENTAL_CONTROLS_MESSAGE_REQUESTS]};
string = intl.string;
const XlGG9c = (require(1244) /* metro dependency 1244: indexNative */).t.XlGG9c;
const PARENTAL_CONTROLS_FRIEND_REQUESTS_EVERYONE = MobileSetting.PARENTAL_CONTROLS_FRIEND_REQUESTS_EVERYONE;
const PARENTAL_CONTROLS_FRIEND_REQUESTS_MUTUAL_FRIENDS = MobileSetting.PARENTAL_CONTROLS_FRIEND_REQUESTS_MUTUAL_FRIENDS;
const PARENTAL_CONTROLS_FRIEND_REQUESTS_MUTUAL_GUILDS = MobileSetting.PARENTAL_CONTROLS_FRIEND_REQUESTS_MUTUAL_GUILDS;
items2[2] = {label: Reflect.apply(string, intl, [XlGG9c]), settings: [PARENTAL_CONTROLS_FRIEND_REQUESTS_EVERYONE,
PARENTAL_CONTROLS_FRIEND_REQUESTS_MUTUAL_FRIENDS, PARENTAL_CONTROLS_FRIEND_REQUESTS_MUTUAL_GUILDS]};
return (
<View>
{((Component) => <Component node={Reflect.apply(createList, settingBuildersModule,
[{sections: items2}])} />)(importDefault(13170) /* metro dependency 13170: SettingLayout */)}
</View>
);
}
@@ -0,0 +1,74 @@
/* Metro module 13444; source: modules/parent_tools/native/FamilyCenterParentalControlsDataAndPrivacy.tsx; dependencies: [31, 661, 8224, 33, 1244, 2224, 1948, 9692, 13170, 2] */
function _fun102234(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13634:6, offset: 0x02233811, size: 186 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
const env0_5 = (require(8224) /* metro dependency 8224: SettingsConstants */).MobileSetting;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterParentalControlsDataAndPrivacy.tsx');
exports.default = FamilyCenterParentalControlsDataAndPrivacy;
}
function FamilyCenterParentalControlsDataAndPrivacy() { // fn#102235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13634:289, offset: 0x022338cb, size: 102 bytes, params: 1, frame: 15
const binding = env0_3;
return ((Component) => <Component node={binding.useMemo(_fun102237, [binding.useMemo(_fun102236,
[])])} />)(importDefault(13170) /* metro dependency 13170: SettingLayout */);
}
function _fun102236() { // fn#102236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13634:360, offset: 0x02233931, size: 460 bytes, params: 1, frame: 27
let object2 = {};
let value = environment.__proto__;
const PARENTAL_CONTROLS_DATA_USAGE_STATISTICS = MobileSetting.PARENTAL_CONTROLS_DATA_USAGE_STATISTICS;
object2.settings = [PARENTAL_CONTROLS_DATA_USAGE_STATISTICS];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let format = intl.format;
const Z5yJZy = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Z5yJZy;
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
let getArticleURL = defaultImport.getArticleURL;
const DATA_PRIVACY_CONTROLS = HelpdeskArticles.DATA_PRIVACY_CONTROLS;
object2.subLabel = Reflect.apply(format, intl, [Z5yJZy, {helpdeskArticle: Reflect.apply(getArticleURL,
defaultImport, [DATA_PRIVACY_CONTROLS])}]);
const items2 = [object2];
object2 = {};
const PARENTAL_CONTROLS_DATA_USAGE_PERSONALIZATION = MobileSetting.PARENTAL_CONTROLS_DATA_USAGE_PERSONALIZATION;
object2.settings = [PARENTAL_CONTROLS_DATA_USAGE_PERSONALIZATION];
format = intl.format;
const Imp6Ns = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Imp6Ns;
value = defaultImport;
getArticleURL = value.getArticleURL;
const DATA_USED_FOR_RECOMMENDED = HelpdeskArticles.DATA_USED_FOR_RECOMMENDED;
object2.subLabel = Reflect.apply(format, intl, [Imp6Ns, {helpdeskArticle: Reflect.apply(getArticleURL, value,
[DATA_USED_FOR_RECOMMENDED])}]);
items2[1] = object2;
object2 = {};
const PARENTAL_CONTROLS_DATA_USAGE_QUESTS = MobileSetting.PARENTAL_CONTROLS_DATA_USAGE_QUESTS;
object2.settings = [PARENTAL_CONTROLS_DATA_USAGE_QUESTS];
format = intl.format;
const cnCK6b = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).cnCK6b;
value = defaultImport;
getArticleURL = value.getArticleURL;
let QUESTS_PRIVACY_CONTROLS = HelpdeskArticles.QUESTS_PRIVACY_CONTROLS;
object2.subLabel = Reflect.apply(format, intl, [cnCK6b, {helpdeskArticle: Reflect.apply(getArticleURL, value,
[QUESTS_PRIVACY_CONTROLS])}]);
items2[2] = object2;
object2 = {};
const PARENTAL_CONTROLS_DATA_USAGE_QUESTS_3P = MobileSetting.PARENTAL_CONTROLS_DATA_USAGE_QUESTS_3P;
object2.settings = [PARENTAL_CONTROLS_DATA_USAGE_QUESTS_3P];
format = intl.format;
const property = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['6mK5Pz'];
value = defaultImport;
getArticleURL = value.getArticleURL;
QUESTS_PRIVACY_CONTROLS = HelpdeskArticles.QUESTS_PRIVACY_CONTROLS;
object2.subLabel = Reflect.apply(format, intl, [property, {helpdeskArticle: Reflect.apply(getArticleURL, value,
[QUESTS_PRIVACY_CONTROLS])}]);
items2[3] = object2;
return items2;
}
function _fun102237() { // fn#102237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13634:1055, offset: 0x02233afd, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (require(9692) /* metro dependency 9692: SettingBuilders */).createList({sections: env0_0});
}
@@ -0,0 +1,96 @@
/* Metro module 13445; source: modules/parent_tools/native/FamilyCenterParentalControlsScreenTime.tsx; dependencies: [27, 661, 33, 4501, 697, 10909, 6238, 4573, 1244, 2224, 13406, 1484, 6231, 2] */
function _fun102238(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13635:6, offset: 0x02233b31, size: 300 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.header = {paddingTop: PX_24};
const object4 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.gap = PX_8;
object2.container = object4;
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterParentalControlsScreenTime.tsx');
exports.default = FamilyCenterParentalControlsScreenTime;
}
function ScheduleRuleRow({rule, teenId, navigation, readOnly}) { // fn#102239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13635:308, offset: 0x02233c5d, size: 302 bytes, params: 2, frame: 24
readOnly = !(readOnly === undefined) && readOnly;
const scheduleRuleDateRange = (require(10909) /* metro dependency 10909: FamilyCenterRestrictedHoursUtils */).getScheduleRuleDateRange(rule);
const familyCenterRestrictedHoursUtilsModule = require(10909) /* metro dependency 10909: FamilyCenterRestrictedHoursUtils */;
const value5 = familyCenterRestrictedHoursUtilsModule.formatDays(rule.days);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const enabled = rule.enabled;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const defaultImport = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */;
return (
<TableRow
label={scheduleRuleDateRange}
subLabel={value5}
trailing={<Text variant="text-sm/medium" color="text-subtle">{enabled ? Reflect.apply(string, intl,
[defaultImport['8vDHRq']]) : Reflect.apply(string, intl, [defaultImport['4z9fN+']])}</Text>}
arrow={!readOnly}
onPress={readOnly ? undefined : _fun102240}
/>
);
}
function FamilyCenterParentalControlsScreenTime({readOnly}) { // fn#102241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13635:881, offset: 0x02233dca, size: 413 bytes, params: 2, frame: 26
var r0;
var Text;
var intl;
if (readOnly !== undefined) {
}
const styles = useStyles();
const value4 = (require(13406) /* metro dependency 13406: useSelectedTeenUser */).useSelectedTeenUser();
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
if (value4?.id == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-sm/semibold', 'color': 'text-subtle', style: styles.header};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <View {...viewBindingProps}><Text {...textProps}>{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['72CmJd'])}</Text>{((TableRowGroup) => <TableRowGroup hasIcons={false}>{(require(10909) /* metro dependency 10909: FamilyCenterRestrictedHoursUtils */).sortRulesByStartTime((value4 == null || value4.restrictedSchedule == null ? undefined : value4.restrictedSchedule.rules) ?? []).map(_fun102242)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)}</View>;
}
return r0;
}
function _fun102240() { // fn#102240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13635:691, offset: 0x02233d8b, size: 63 bytes, params: 1, frame: 15
const value = environment;
const navigationBinding = navigation;
const navigate = navigationBinding.navigate;
const FAMILY_CENTER_SCHEDULE_DOWNTIME = UserSettingsSections.FAMILY_CENTER_SCHEDULE_DOWNTIME;
const object3 = {};
object3.teenId = teenId;
const object4 = {};
copyDataProperties(object4, rule, value);
object3.rule = object4;
return Reflect.apply(navigate, navigationBinding, [FAMILY_CENTER_SCHEDULE_DOWNTIME, object3]);
}
function _fun102242(a0) { // fn#102242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13635:1383, offset: 0x02233f67, size: 68 bytes, params: 2, frame: 16
return (
<ScheduleRuleRow
rule={a0}
teenId={id}
navigation={env0_1}
readOnly={readOnly}
key={a0.ruleId}
/>
);
}
@@ -0,0 +1,148 @@
/* Metro module 13437; source: modules/parent_tools/native/FamilyCenterPendingLinks.tsx; dependencies: [31, 27, 5117, 33, 4501, 697, 8170, 12627, 1244, 2224, 4573, 8171, 5278, 5080, 13438, 1962, 1305, 8096, 13439, 13436, 13440, 13431, 2] */
function _fun102183(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:6, offset: 0x0223107d, size: 486 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).UserLinkStatus;
let value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
const object4 = {'display': 'flex', 'justifyContent': 'center'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const env0_8 = Reflect.apply(createStyles, value, [{container: {marginTop: 24}, content: object4,
header: {marginBottom: 10}}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object2 = {};
const object6 = {'backgroundColor': null, 'tintColor': null, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center', 'height': 32, 'width': 32};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object6.tintColor = INTERACTIVE_TEXT_DEFAULT;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.actionButton = object6;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.actionButtonFirst = {marginRight: PX_8};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterPendingLinks.tsx');
exports.default = FamilyCenterPendingLinks;
}
function FamilyCenterPendingLinkRow({otherUser}) { // fn#102184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:687, offset: 0x02231263, size: 941 bytes, params: 2, frame: 28
var r9;
var r4;
var jsxRuntimeEnv0_7Binding;
var value5;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var jc1Ip7;
var object;
var items2;
var property;
var object2;
var oUpA6X;
var object4;
const styles = useStyles();
const value3 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)();
const value4 = (require(8170) /* metro dependency 8170: useUserLinks */).useHasMaxConnections();
if (otherUser === undefined) {
return null;
}
if (value3) {
formatToPlainString = intl.formatToPlainString;
oUpA6X = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).oUpA6X;
object4 = {};
object4.name = otherUser?.toString();
r4 = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(formatToPlainString, intl,
[oUpA6X,
object4])} onPress={onPress_102185} style={styles.actionButton}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(13436) /* metro dependency 13436 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>;
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
value5 = null;
if (value4) {
r9 = value5;
} else {
formatToPlainString = intl.formatToPlainString;
jc1Ip7 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).jc1Ip7;
object = {};
object.name = value5 == otherUser ? undefined : otherUser.toString();
r9 = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(formatToPlainString,
intl,
[jc1Ip7, object])} onPress={onPress_102186} style={[styles.actionButton,
styles.actionButtonFirst]}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(8096) /* metro dependency 8096 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>;
}
items2 = [r9];
formatToPlainString = intl.formatToPlainString;
property = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['4GtllP'];
object2 = {};
object2.name = value5 == otherUser ? undefined : otherUser.toString();
items2[1] = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(formatToPlainString,
intl, [property,
object2])} onPress={onPress_102187} style={styles.actionButton}>{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(13436) /* metro dependency 13436 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>;
r4 = <>{items2}</>;
}
return ((Component) => <Component otherUser={otherUser} actions={r4} />)(importDefault(13431) /* metro dependency 13431: FamilyCenterLinkRow */);
}
function FamilyCenterPendingLinks() { // fn#102188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:2054, offset: 0x02231715, size: 361 bytes, params: 1, frame: 25
const styles = useStyles();
const useUserLinksModule = require(8170) /* metro dependency 8170: useUserLinks */;
const useUsersForLinkStatus = useUserLinksModule.useUsersForLinkStatus;
const PENDING = UserLinkStatus.PENDING;
const value2 = Reflect.apply(useUsersForLinkStatus, useUserLinksModule, [PENDING]);
const useAgeSpecificTextModule = require(12627) /* metro dependency 12627: useAgeSpecificText */;
const useAgeSpecificText = useAgeSpecificTextModule.useAgeSpecificText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let formatToPlainString = intl.formatToPlainString;
const IkAgkG = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).IkAgkG;
const value3 = Reflect.apply(formatToPlainString, intl, [IkAgkG, {count: value2.length}]);
formatToPlainString = intl.formatToPlainString;
const Q8XnAa = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Q8XnAa;
({}).count = value2.length;
return value2.length === 0 ? null : <View style={styles.container}>{((Text) => <Text style={styles.header} variant="eyebrow" color="text-default">{Reflect.apply(useAgeSpecificText,
useAgeSpecificTextModule, [value3, Reflect.apply(formatToPlainString, intl, [Q8XnAa,
viewBindingProps])])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}<View style={styles.content}>{value2.map(_fun102189)}</View></View>;
}
function FamilyCenterPendingLinkRowOnPress() { // fn#102185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:995, owner: FamilyCenterPendingLinkRow.onPress, offset: 0x02231610, size: 87 bytes, params: 1, frame: 15
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[13]);
const pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[15]);
value = value(dependencyMap[20], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {otherUser: otherUser}]);
}
function FamilyCenterPendingLinkRowOnPress_102186() { // fn#102186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:1361, owner: FamilyCenterPendingLinkRow.onPress, offset: 0x02231667, size: 87 bytes, params: 1, frame: 15
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[13]);
const pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[15]);
value = value(dependencyMap[14], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {otherUser: otherUser}]);
}
function FamilyCenterPendingLinkRowOnPress_102187() { // fn#102187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:1730, owner: FamilyCenterPendingLinkRow.onPress, offset: 0x022316be, size: 87 bytes, params: 1, frame: 15
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[13]);
const pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[15]);
value = value(dependencyMap[18], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {otherUser: otherUser}]);
}
function _fun102189(a0) { // fn#102189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:2484, offset: 0x0223187e, size: 61 bytes, params: 2, frame: 16
const value = environment.__proto__;
return <FamilyCenterPendingLinkRow otherUser={a0} key={'pending-' + a0.id} />;
}
@@ -0,0 +1,56 @@
/* Metro module 13433; source: modules/parent_tools/native/FamilyCenterRequestorDetails.tsx; dependencies: [31, 27, 33, 4501, 1305, 697, 8170, 13405, 4573, 2] */
function _fun102165(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13623:6, offset: 0x02230207, size: 366 bytes, params: 8, frame: 24
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {container: {'display': 'flex', 'flexDirection': 'row', 'flexGrow': 1, 'flexShrink': 1}};
const object5 = {};
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
object5.borderRadius = AVATAR_SIZE_MAP[NORMAL] / 2;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.avatar = object5;
const object6 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.paddingLeft = PX_12;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.paddingRight = PX_4;
object6.flexGrow = 1;
object6.flexShrink = 1;
object4.detailsContainer = object6;
const env0_6 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterRequestorDetails.tsx');
exports.default = FamilyCenterRequestorDetails;
}
function FamilyCenterRequestorDetails({otherUser, status}) { // fn#102166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13623:585, offset: 0x02230375, size: 277 bytes, params: 2, frame: 23
const styles = useStyles();
const value2 = (require(8170) /* metro dependency 8170: useUserLinks */).useLinkTimestampText(otherUser.id, status);
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatar = <Avatar avatarStyle={styles.avatar} user={otherUser} guildId={undefined} disablePlaceholder avatarDecoration={otherUser.avatarDecoration} />;
let value = importDefault(13405) /* metro dependency 13405: FamilyCenterUsernameHeader */;
value = ((Component) => <Component user={otherUser} />)(value);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.container}>
{avatar}
<View style={styles.detailsContainer}>
{value}
<Text variant="text-xs/semibold" color="text-muted">
{value2}
</Text>
</View>
</View>
);
}
@@ -0,0 +1,93 @@
/* Metro module 13425; source: modules/parent_tools/native/FamilyCenterRequestsPage.tsx; dependencies: [31, 27, 5117, 9734, 33, 4501, 697, 8170, 8171, 12627, 1244, 2224, 4573, 9737, 6766, 6618, 13426, 13428, 13437, 2] */
function _fun102142(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13615:6, offset: 0x0222e91b, size: 558 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.ScrollView;
value = require(5117) /* metro dependency 5117: FamilyCenterConstants */;
const env0_5 = value.MAX_PARENT_TO_TEEN_ACTIVE_CONNECTIONS;
const env0_6 = value.MAX_TEEN_TO_PARENT_ACTIVE_CONNECTIONS;
const env0_7 = (require(9734) /* metro dependency 9734: Constants */).THROUGHLINE_URL;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
const object4 = {display: 'flex'};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingTop = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.marginTop = PX_12;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.borderTopColor = BORDER_SUBTLE;
object4.borderTopWidth = 1;
const env0_10 = Reflect.apply(createStyles, value, [{container: object4}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.container = {display: 'flex', marginTop: PX_16};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.supportHeader = {marginBottom: PX_4};
const env0_11 = Reflect.apply(createStyles, value, [object3]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object5 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingBottom = PX_16;
const env0_13 = Reflect.apply(createStyles, value, [{scrollView: {flex: 1}, container: object5}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterRequestsPage.tsx');
exports.default = FamilyCenterRequestsPage;
}
function FamilyCenterMaxConnectionsBlurb() { // fn#102143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13615:460, offset: 0x0222eb49, size: 305 bytes, params: 1, frame: 26
const styles = useStyles();
const value2 = (require(8170) /* metro dependency 8170: useUserLinks */).useHasMaxConnections();
const r11 = (importDefault(8171) /* metro dependency 8171: useIsInAdultAgeGroup */)() ? MAX_PARENT_TO_TEEN_ACTIVE_CONNECTIONS : MAX_TEEN_TO_PARENT_ACTIVE_CONNECTIONS;
const useAgeSpecificTextModule = require(12627) /* metro dependency 12627: useAgeSpecificText */;
const useAgeSpecificText = useAgeSpecificTextModule.useAgeSpecificText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let formatToPlainString = intl.formatToPlainString;
const value3 = Reflect.apply(formatToPlainString, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['1/PzIj'], {maxConnections: r11}]);
formatToPlainString = intl.formatToPlainString;
const RcTgiE = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).RcTgiE;
return value2 ? <View style={styles.container}>{((Text) => <Text variant="text-xxs/medium" color="text-muted">{Reflect.apply(useAgeSpecificText,
useAgeSpecificTextModule, [value3, Reflect.apply(formatToPlainString, intl, [RcTgiE,
{maxConnections: r11}])])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View> : null;
}
function FamilyCenterHelpLineInfo() { // fn#102144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13615:1018, offset: 0x0222ec7a, size: 425 bytes, params: 1, frame: 25
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const r9 = (require(9737) /* metro dependency 9737: useHelpLineVisibility */).useShouldShowHelplineLink() ? intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['KOwsf/'],
{helpLink: 'https://support.discord.com/hc/articles/7925648993943-Crisis-Text-Line'}) : (require(9737) /* metro dependency 9737: useHelpLineVisibility */).useShouldShowThroughlineLink() ? intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['6tsC8u'],
{helpLink: THROUGHLINE_URL}) : null;
const value7 = null;
return value7 == r9 ? value7 : <View style={styles.container}>{((Text) => <Text style={styles.supportHeader} variant="heading-sm/semibold">{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['7/tVhv'])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}{((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround variant="text-xs/medium" color="text-muted">{r9}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround)}</View>;
}
function FamilyCenterRequestsPage() { // fn#102145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13615:1814, offset: 0x0222ee23, size: 254 bytes, params: 1, frame: 26
const styles = useStyles();
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
return (
<ScrollView style={styles.scrollView}>
<SafeAreaPaddingView bottom>
<View style={styles.container}>
{((Component) => <Component />)(importDefault(13426) /* metro dependency 13426: FamilyCenterLinkingBanner */)}
{((Component) => <Component />)(importDefault(13428) /* metro dependency 13428: FamilyCenterAcceptedLinks */)}
{((Component) => <Component />)(importDefault(13437) /* metro dependency 13437: FamilyCenterPendingLinks */)}
<FamilyCenterMaxConnectionsBlurb />
<FamilyCenterHelpLineInfo />
</View>
</SafeAreaPaddingView>
</ScrollView>
);
}
@@ -0,0 +1,299 @@
/* Metro module 13419; source: modules/parent_tools/native/FamilyCenterSettingsControls.tsx; dependencies: [31, 27, 5117, 661, 33, 4501, 697, 4573, 1244, 2224, 5080, 13420, 1962, 13422, 6238, 8170, 13406, 5188, 1484, 13423, 4572, 6231, 4578, 5177, 4603, 13348, 5118, 13424, 2] */
function _fun102091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:6, offset: 0x0222c2f9, size: 464 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(5117) /* metro dependency 5117: FamilyCenterConstants */).FamilyCenterSubPages;
const env0_6 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.teenControlsContainer = {gap: PX_16};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.controlledSettingsHeader = {gap: PX_4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.parentalControlsContainer = {gap: PX_4};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.controlsGroup = {marginTop: PX_8};
const ICON_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING;
object2.subLabelWarning = {color: ICON_FEEDBACK_WARNING};
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object2.subLabelCritical = {color: TEXT_FEEDBACK_CRITICAL};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterSettingsControls.tsx');
exports.default = FamilyCenterSettingsControls;
}
function SpendingLimitRow({cap, teenId}) { // fn#102092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:575, offset: 0x0222c4c9, size: 221 bytes, params: 2, frame: 22
const styles = useStyles();
const {trailing,
subLabel} = getSpendingLimitRowProps((require(13422) /* metro dependency 13422: SpendingLimitDisplay */).useSpendingLimitDisplayState(cap),
styles);
const value5 = teenId == null;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<TableRow
label={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).gMeekL)}
trailing={trailing}
subLabel={subLabel}
onPress={value5 ? undefined : _fun102096}
arrow={!value5}
disabled={value5}
/>
);
}
function FamilyCenterSettingsTeenControls() { // fn#102097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:1793, offset: 0x0222c869, size: 907 bytes, params: 1, frame: 36
var r5;
var TableRowGroup;
var items3;
var TableRow;
var object9;
var length;
const value2 = undefined;
const styles = useStyles();
const value3 = (require(8170) /* metro dependency 8170: useUserLinks */).useActiveLinkUserIds();
const value4 = (require(13406) /* metro dependency 13406: useSelectedTeenUser */).useSelectedTeenUser();
const value5 = (require(5188) /* metro dependency 5188: FamilyCenterV3Experiment */).useIsFamilyCenterV3Enabled({location: 'FamilyCenterSettingsControls'});
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const r6 = (value4 == null || value4.restrictedSchedule == null ? value2 : value4.restrictedSchedule.rules) ?? [];
const value6 = (require(13422) /* metro dependency 13422: SpendingLimitDisplay */).useSpendingLimitFromUserSettings();
const {subLabel,
trailing} = (importDefault(13423) /* metro dependency 13423: useScheduleTimeControlsRowProps */)(r6);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text variant="text-sm/semibold">{intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).ahKIJO)}</Text>;
const format = intl.format;
const X9rW0j = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).X9rW0j;
const stack = <Stack2 style={styles.controlledSettingsHeader}>{text}<Text variant="text-sm/medium" color="text-muted">{Reflect.apply(format,
intl, [X9rW0j, {openSettingsHook: openSettingsHook}])}</Text></Stack2>;
if (value5) {
var viewBindingProps = {style: styles.controlsGroup};
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items3 = [<SpendingLimitRow cap={value6} />];
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {label: intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['1Op+NP']),
subLabel: subLabel, trailing: trailing};
length = r6.length;
tableRowProps.onPress = length > 0 ? _fun102100 : value2;
length = r6.length;
tableRowProps.arrow = length > 0;
items3[1] = <TableRow {...tableRowProps} />;
r5 = <View {...viewBindingProps}><TableRowGroup hasIcons={false}>{items3}</TableRowGroup></View>;
} else {
r5 = value5;
}
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<Stack style={styles.teenControlsContainer}>
{stack}
{r5}
<Button
text={intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).w0JA3P,
{count: value3.length})}
onPress={onPress_102101}
shrink
grow={false}
variant="secondary"
size="sm"
/>
</Stack>
);
}
function FamilyCenterSettingsParentalControls() { // fn#102102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:3263, offset: 0x0222cce8, size: 1009 bytes, params: 1, frame: 38
const value2 = undefined;
const styles = useStyles();
const value3 = (require(13406) /* metro dependency 13406: useSelectedTeenUser */).useSelectedTeenUser();
const value4 = (require(13406) /* metro dependency 13406: useSelectedTeenUser */).useShouldLoadSettingsForSelectedTeenUser();
const value5 = (require(5188) /* metro dependency 5188: FamilyCenterV3Experiment */).useIsFamilyCenterV3Enabled({location: 'FamilyCenterSettingsControls'});
const env0_2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const r1 = (value3 == null || value3.restrictedSchedule == null ? value2 : value3.restrictedSchedule.rules) ?? [];
const env0_3 = r1;
const ParentalControlledSpendingLimit = (require(13348) /* metro dependency 13348: ParentalControlledUserSettings */).ParentalControlledSpendingLimit;
const value6 = ParentalControlledSpendingLimit.useControlledSetting(value3 == null ? value2 : value3.id);
env0_3.useEffect(_fun102103, [value3 == null ? value2 : value3.id, value4]);
const {subLabel,
trailing} = (importDefault(13423) /* metro dependency 13423: useScheduleTimeControlsRowProps */)(r1);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items3 = [<Text variant="text-sm/semibold">{Reflect.apply(string, intl,
[(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).ahKIJO])}</Text>];
string = intl.string;
const Sv236e = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Sv236e;
items3[1] = <Text variant="text-sm/medium" color="text-muted">{Reflect.apply(string, intl, [Sv236e])}</Text>;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const items2 = [<TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+o1pDZ'])} onPress={function() {
return handleSettingsClick(FamilyCenterSubPages.CONTENT_AND_SOCIAL);
}} arrow />];
string = intl.string;
const OAuOHD = (require(1244) /* metro dependency 1244: indexNative */).t.OAuOHD;
items2[1] = <TableRow label={Reflect.apply(string, intl, [OAuOHD])} onPress={function() {
return handleSettingsClick(FamilyCenterSubPages.DATA_AND_PRIVACY);
}} arrow />;
items2[2] = value5 && (value3 == null ? value2 : value3.id) != null && <SpendingLimitRow cap={value6} teenId={value3.id} />;
items2[3] = value5 && (value3 == null ? value2 : value3.id) != null && <TableRow label={intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['1Op+NP'])} subLabel={subLabel} trailing={trailing} onPress={onPress_102107} arrow />;
items3[2] = <View style={styles.controlsGroup}><TableRowGroup hasIcons={false}>{items2}</TableRowGroup></View>;
return (
<Stack style={styles.parentalControlsContainer}>
{items3}
</Stack>
);
}
function FamilyCenterSettingsControls() { // fn#102108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:4976, offset: 0x0222d201, size: 111 bytes, params: 1, frame: 17
const value2 = (importDefault(13424) /* metro dependency 13424: useUserIsTeenAgeGroup */)();
const useUserLinksModule = require(8170) /* metro dependency 8170: useUserLinks */;
const useActiveLinkUserIds = useUserLinksModule.useActiveLinkUserIds;
return Reflect.apply(useActiveLinkUserIds, useUserLinksModule,
[]).length === 0 ? null : <View>{((Component) => <Component />)(value2 ? FamilyCenterSettingsTeenControls : FamilyCenterSettingsParentalControls)}</View>;
}
function getSpendingLimitRowProps(a0, a1) { // fn#102093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:608, owner: SpendingLimitRow.getSpendingLimitRowProps, offset: 0x0222c5a6, size: 467 bytes, params: 3, frame: 23
var environment;
var object2;
var value;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const closure = getSpendingLimitRowPropsRenderTrailing;
const closure2 = renderSubLabel;
const kind = a0.kind;
if (kind === 'off') {
object2 = {};
value = environment.__proto__;
object2.trailing = closure(intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).YEnpaj));
return object2;
}
if (kind === 'on') {
object2 = {};
object2.trailing = closure(a0.monthlyText);
return object2;
}
if (kind === 'close-to-limit') {
object2 = {};
object2.trailing = closure(a0.monthlyText);
object2.subLabel = closure2(a0.remainingText, a1.subLabelWarning);
return object2;
}
if (kind === 'spent') {
object2 = {};
object2.trailing = closure(a0.monthlyText);
value = environment.__proto__;
value = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Q2msVQ);
object2.subLabel = closure2(value, a1.subLabelCritical);
return object2;
}
if (kind === 'blocked') {
object2 = {};
value = environment.__proto__;
object2.trailing = closure(intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).kGFuGn));
value = intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).FUu2b0);
object2.subLabel = closure2(value, a1.subLabelCritical);
return object2;
}
}
function _fun102096() { // fn#102096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:1596, offset: 0x0222c7fc, size: 109 bytes, params: 1, frame: 18
const teenIdBinding = teenId;
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[10]);
const pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[12]);
value = value(dependencyMap[11], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {teenId: teenIdBinding}, undefined, {animation: 'slide_from_right'}]);
}
function handleOpenSettings() { // fn#102098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:2124, owner: FamilyCenterSettingsTeenControls.handleOpenSettings, offset: 0x0222cbf4, size: 35 bytes, params: 1, frame: 11
const binding = env0_1;
const navigate = binding.navigate;
const CONTENT_AND_SOCIAL = UserSettingsSections.CONTENT_AND_SOCIAL;
Reflect.apply(navigate, binding, [CONTENT_AND_SOCIAL]);
}
function openSettingsHook(a0, a1) { // fn#102099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:2541, owner: FamilyCenterSettingsTeenControls.openSettingsHook, offset: 0x0222cc17, size: 78 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-sm/medium"
color="text-link"
onPress={handleOpenSettings}
key={a1}
>
{a0}
</Text>
);
}
function _fun102100() { // fn#102100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:2878, offset: 0x0222cc65, size: 53 bytes, params: 1, frame: 14
const binding = env0_1;
const navigate = binding.navigate;
const FAMILY_CENTER_PARENTAL_CONTROLS = UserSettingsSections.FAMILY_CENTER_PARENTAL_CONTROLS;
const SCREEN_TIME_CONTROLS = FamilyCenterSubPages.SCREEN_TIME_CONTROLS;
Reflect.apply(navigate, binding, [FAMILY_CENTER_PARENTAL_CONTROLS, {selectedSubPage: SCREEN_TIME_CONTROLS}]);
}
function FamilyCenterSettingsTeenControlsOnPress() { // fn#102101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:3100, owner: FamilyCenterSettingsTeenControls.onPress, offset: 0x0222cc9a, size: 78 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(5177) /* metro dependency 5177: LayerActionCreators */).popLayer();
(importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).openPrivateChannel({recipientIds: env0_0});
}
function _fun102103() { // fn#102103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:3647, offset: 0x0222d0d9, size: 88 bytes, params: 1, frame: 13
var value4;
var defaultImport;
const value2 = undefined;
if ((env0_0 == null ? value2 : env0_0.id) != null && env0_1) {
value4 = environment.__proto__;
defaultImport = importDefault(5118) /* metro dependency 5118: FamilyCenterActionCreators */;
defaultImport.fetchTeenSettingsAndConsents(env0_0.id);
}
return value2;
}
function handleSettingsClick(a0) { // fn#102104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:3779, owner: FamilyCenterSettingsParentalControls.handleSettingsClick, offset: 0x0222d131, size: 46 bytes, params: 2, frame: 14
const binding = env0_2;
const navigate = binding.navigate;
const FAMILY_CENTER_PARENTAL_CONTROLS = UserSettingsSections.FAMILY_CENTER_PARENTAL_CONTROLS;
Reflect.apply(navigate, binding, [FAMILY_CENTER_PARENTAL_CONTROLS, {selectedSubPage: a0}]);
}
function FamilyCenterSettingsParentalControlsOnPress_102107() { // fn#102107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:4701, owner: FamilyCenterSettingsParentalControls.onPress, offset: 0x0222d199, size: 104 bytes, params: 1, frame: 18
const binding = env0_2;
const navigate = binding.navigate;
const FAMILY_CENTER_PARENTAL_CONTROLS = UserSettingsSections.FAMILY_CENTER_PARENTAL_CONTROLS;
const SCREEN_TIME_CONTROLS = FamilyCenterSubPages.SCREEN_TIME_CONTROLS;
Reflect.apply(navigate, binding, [FAMILY_CENTER_PARENTAL_CONTROLS, {selectedSubPage: SCREEN_TIME_CONTROLS,
autoOpenCreate: env0_3.length === 0 && env0_0?.id != null}]);
}
function getSpendingLimitRowPropsRenderTrailing(a0) { // fn#102094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:666, owner: SpendingLimitRow.getSpendingLimitRowProps.renderTrailing, offset: 0x0222c779, size: 63 bytes, params: 2, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-sm/normal" color="text-muted">
{a0}
</Text>
);
}
function renderSubLabel(a0, a1) { // fn#102095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13609:757, owner: SpendingLimitRow.getSpendingLimitRowProps.renderSubLabel, offset: 0x0222c7b8, size: 68 bytes, params: 3, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-sm/normal" style={a1}>
{a0}
</Text>
);
}
@@ -0,0 +1,215 @@
/* Metro module 13409; source: modules/parent_tools/native/FamilyCenterTopActivity.tsx; dependencies: [31, 27, 1878, 5116, 33, 4501, 697, 632, 4080, 13410, 1962, 13411, 8792, 1244, 2224, 4573, 1305, 6819, 2] */
function _fun102040(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13599:6, offset: 0x02228fe6, size: 496 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.container = {'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap', gap: PX_8};
object2.section = {flex: 1};
const object3 = {'display': 'flex', 'flexDirection': 'row', 'gap': null, 'flexWrap': 'wrap'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.gap = PX_4;
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.paddingTop = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object3.paddingBottom = PX_12;
object2.avatarList = object3;
object2.touchableHitBox = {'width': '100%', 'alignItems': 'flex-start'};
const object6 = {};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.borderColor = BACKGROUND_BASE_LOW;
const BACKGROUND_SURFACE_HIGHEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGHEST;
object6.backgroundColor = BACKGROUND_SURFACE_HIGHEST;
object2.guildAvatar = object6;
object2.guildAvatarText = {fontSize: 12};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterTopActivity.tsx');
exports.default = _default_102041;
}
function _default_102041() { // fn#102041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13599:692, offset: 0x022291d6, size: 806 bytes, params: 1, frame: 36
var r6;
var r0;
var value5;
var defaultImport;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
var BxbvS7;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
var value8;
var defaultImport2;
var Lq9Set;
var value;
const styles = useStyles();
const topUserActivities = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getTopUserActivities();
});
const topGuildActivities = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([FamilyCenterStore],
function() {
return FamilyCenterStore.getTopGuildActivities();
});
const binding = env0_3;
const value2 = binding.useCallback(_fun102044, [topUserActivities]);
const value3 = binding.useCallback(_fun102045, [topGuildActivities]);
let length = topUserActivities.length;
if (length !== 0) {
var viewBindingProps = {style: styles.container};
length = topUserActivities.length;
value5 = length > 0;
if (value5) {
var viewBinding2Props = {style: styles.section};
defaultImport = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var defaultImportProps = {style: styles.touchableHitBox, onPress: value2, accessibilityRole: 'button'};
string = intl.string;
BxbvS7 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).BxbvS7;
defaultImportProps.accessibilityLabel = Reflect.apply(string, intl, [BxbvS7]);
string = intl.string;
BxbvS7 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).BxbvS7;
r6 = <View {...viewBinding2Props}>{((Component) => <Component {...defaultImportProps}><Text variant="text-sm/semibold">{Reflect.apply(string,
intl,
[BxbvS7])}</Text><View style={styles.avatarList}>{topUserActivities.map(_fun102046)}</View></Component>)(defaultImport)}</View>;
} else {
r6 = value5;
}
items2 = [r6];
length = topGuildActivities.length;
value8 = length > 0;
if (value8) {
var viewBinding3Props = {style: styles.section};
defaultImport2 = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var defaultImport2Props = {style: styles.touchableHitBox, onPress: value3, accessibilityRole: 'button'};
string = intl.string;
Lq9Set = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Lq9Set;
defaultImport2Props.accessibilityLabel = Reflect.apply(string, intl, [Lq9Set]);
string = intl.string;
Lq9Set = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Lq9Set;
value = <Text variant="text-sm/semibold">{Reflect.apply(string, intl, [Lq9Set])}</Text>;
value = <View {...viewBinding3Props}>{((Component) => <Component {...defaultImport2Props}>{value}<View style={styles.avatarList}>{topGuildActivities.map(_fun102047)}</View></Component>)(defaultImport2)}</View>;
r6 = value;
} else {
r6 = value8;
}
items2[1] = r6;
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
} else {
length = topGuildActivities.length;
if (length === 0) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
length = topUserActivities.length;
value5 = length > 0;
if (value5) {
var viewBinding2Props = {style: styles.section};
defaultImport = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var defaultImportProps = {style: styles.touchableHitBox, onPress: value2, accessibilityRole: 'button'};
string = intl.string;
BxbvS7 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).BxbvS7;
defaultImportProps.accessibilityLabel = Reflect.apply(string, intl, [BxbvS7]);
string = intl.string;
BxbvS7 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).BxbvS7;
r6 = <View {...viewBinding2Props}>{((Component) => <Component {...defaultImportProps}><Text variant="text-sm/semibold">{Reflect.apply(string,
intl,
[BxbvS7])}</Text><View style={styles.avatarList}>{topUserActivities.map(_fun102046)}</View></Component>)(defaultImport)}</View>;
} else {
r6 = value5;
}
items2 = [r6];
length = topGuildActivities.length;
value8 = length > 0;
if (value8) {
var viewBinding3Props = {style: styles.section};
defaultImport2 = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var defaultImport2Props = {style: styles.touchableHitBox, onPress: value3, accessibilityRole: 'button'};
string = intl.string;
Lq9Set = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Lq9Set;
defaultImport2Props.accessibilityLabel = Reflect.apply(string, intl, [Lq9Set]);
string = intl.string;
Lq9Set = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Lq9Set;
value = <Text variant="text-sm/semibold">{Reflect.apply(string, intl, [Lq9Set])}</Text>;
value = <View {...viewBinding3Props}>{((Component) => <Component {...defaultImport2Props}>{value}<View style={styles.avatarList}>{topGuildActivities.map(_fun102047)}</View></Component>)(defaultImport2)}</View>;
r6 = value;
} else {
r6 = value8;
}
items2[1] = r6;
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
}
}
return r0;
}
function _fun102044() { // fn#102044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13599:855, offset: 0x02229526, size: 94 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[8]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[10]);
value = value(dependencyMap[9], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'FamilyCenterTopUsers', {topUserActivities: topUserActivities}]);
}
function _fun102045() { // fn#102045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13599:970, offset: 0x02229584, size: 94 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[8]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[10]);
value = value(dependencyMap[11], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'FamilyCenterTopServers', {topGuildActivities: topGuildActivities}]);
}
function _fun102046({user_id}) { // fn#102046, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13599:1459, offset: 0x022295e2, size: 117 bytes, params: 2, frame: 20
const value = environment.__proto__;
const user = UserStore.getUser(user_id);
if (user == null) {
return null;
} else {
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
return (
<Avatar
user={user}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SMALL}
guildId={undefined}
key={user.id}
/>
);
}
}
function _fun102047(a0) { // fn#102047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13599:1915, offset: 0x02229657, size: 138 bytes, params: 2, frame: 21
var r0;
var GuildIcon;
var stylesBinding;
const value = environment.__proto__;
const guild = FamilyCenterStore.getGuild(a0.guild_id);
const value3 = null;
if (value3 == guild) {
r0 = value3;
} else {
GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
stylesBinding = styles;
r0 = <GuildIcon style={stylesBinding.guildAvatar} textStyle={stylesBinding.guildAvatarText} guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.SMALL} key={guild.id} />;
}
return r0;
}
@@ -0,0 +1,65 @@
/* Metro module 13411; source: modules/parent_tools/native/FamilyCenterTopServersBottomSheet.tsx; dependencies: [5116, 33, 4501, 697, 566, 5187, 6238, 6819, 6805, 4573, 1244, 2224, 6231, 2] */
function _fun102052(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13601:6, offset: 0x022299b1, size: 284 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const familyCenterStore = importDefault(5116) /* metro dependency 5116: FamilyCenterStore */;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.borderColor = BACKGROUND_BASE_LOW;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
const env0_6 = Reflect.apply(createStyles, value, [{header: {textAlign: 'center'}, guildIcon: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterTopServersBottomSheet.tsx');
exports.default = FamilyCenterTopGuildsBottomSheet;
}
function GuildRow({guildActivity}) { // fn#102053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13601:330, offset: 0x02229acd, size: 227 bytes, params: 2, frame: 20
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([FamilyCenterStore], function() {
return FamilyCenterStore.getGuild(guildActivity.guild_id);
});
if (guild == null) {
return null;
}
const topUserOrGuildDescription = (require(5187) /* metro dependency 5187: FamilyCenterUtils */).getTopUserOrGuildDescription(guildActivity.messages_sent,
guildActivity.call_count);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={guild.name}
subLabel={topUserOrGuildDescription}
icon={((Component) => <Component guild={guild} style={styles.guildIcon} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)}
/>
);
}
function FamilyCenterTopGuildsBottomSheet({topGuildActivities}) { // fn#102055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13601:743, offset: 0x02229bb0, size: 239 bytes, params: 2, frame: 24
const styles = useStyles();
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Lq9Set = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).Lq9Set;
const text = <Text variant="text-md/bold" style={styles.header}>{Reflect.apply(string, intl, [Lq9Set])}</Text>;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<ActionSheet>
{text}
<TableRowGroup hasIcons>
{topGuildActivities.map(_fun102056)}
</TableRowGroup>
</ActionSheet>
);
}
function _fun102056(a0) { // fn#102056, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13601:1016, offset: 0x02229c9f, size: 37 bytes, params: 2, frame: 15
return <GuildRow guildActivity={a0} key={a0.guild_id} />;
}
@@ -0,0 +1,58 @@
/* Metro module 13410; source: modules/parent_tools/native/FamilyCenterTopUsersBottomSheet.tsx; dependencies: [31, 1878, 33, 4501, 5187, 6238, 3995, 1305, 6805, 4573, 1244, 2224, 6231, 2] */
function _fun102048(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13600:6, offset: 0x022296e1, size: 216 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {textAlign: 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterTopUsersBottomSheet.tsx');
exports.default = FamilyCenterTopUsersBottomSheet;
}
function UserRow_102049({userActivity}) { // fn#102049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13600:195, offset: 0x022297b9, size: 227 bytes, params: 2, frame: 21
const getUser = UserStore.getUser;
const user_id = userActivity.user_id;
const value2 = Reflect.apply(getUser, UserStore, [user_id]);
if (value2 == null) {
return null;
}
const topUserOrGuildDescription = (require(5187) /* metro dependency 5187: FamilyCenterUtils */).getTopUserOrGuildDescription(userActivity.dms_sent,
userActivity.call_count);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {label: (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(value2),
subLabel: topUserOrGuildDescription};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const SMALL = AvatarSizes.SMALL;
tableRowProps.icon = <Avatar size={SMALL} user={value2} guildId={undefined} />;
return <TableRow {...tableRowProps} />;
}
function FamilyCenterTopUsersBottomSheet({topUserActivities}) { // fn#102050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13600:599, offset: 0x0222989c, size: 239 bytes, params: 2, frame: 24
const styles = useStyles();
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const BxbvS7 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).BxbvS7;
const text = <Text variant="text-md/bold" style={styles.header}>{Reflect.apply(string, intl, [BxbvS7])}</Text>;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<ActionSheet>
{text}
<TableRowGroup hasIcons>
{topUserActivities.map(_fun102051)}
</TableRowGroup>
</ActionSheet>
);
}
function _fun102051(a0) { // fn#102051, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13600:870, offset: 0x0222998b, size: 38 bytes, params: 2, frame: 15
const user_id = a0.user_id;
return <UserRow_102049 userActivity={a0} key={user_id} />;
}
@@ -0,0 +1,42 @@
/* Metro module 13405; source: modules/parent_tools/native/FamilyCenterUsernameHeader.tsx; dependencies: [31, 27, 33, 4501, 3995, 4573, 2] */
function _fun102020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13595:6, offset: 0x022286b1, size: 210 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {justifyContent: 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/FamilyCenterUsernameHeader.tsx');
exports.default = FamilyCenterUsernameHeader;
}
function FamilyCenterUsernameHeader({user}) { // fn#102021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13595:310, offset: 0x02228783, size: 247 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user);
const value4 = ' (@' + (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user,
{decoration: 'never'}) + ')';
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const Text2 = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.container}>
<Text
variant="text-md/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
>
{value2}
<Text2
variant="text-md/medium"
color="text-muted"
lineClamp={1}
>
{value4}
</Text2>
</Text>
</View>
);
}
@@ -0,0 +1,251 @@
/* Metro module 15643; source: modules/parent_tools/native/RestrictedHoursModal.tsx; dependencies: [57, 31, 27, 1878, 33, 4501, 697, 5461, 1585, 15644, 566, 4017, 4504, 1244, 2224, 6258, 15645, 3868, 4573, 5280, 15646, 5076, 15642, 4571, 10121, 2] */
function _fun119785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:6, offset: 0x025194ba, size: 634 bytes, params: 8, frame: 28
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
const StyleSheet = value.StyleSheet;
const env0_5 = value.View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.container = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', paddingHorizontal: PX_24};
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['zIndex'] = 0;
object6['backgroundColor'] = 'rgb(0, 3, 40)';
object2.backgroundFill = object6;
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object7['zIndex'] = 1;
object2.assetLayers = object7;
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object2.sunbeamGradient = object8;
object2.riveContainer = {'width': '100%', 'maxWidth': 523, 'height': 300};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {'alignItems': 'center', 'width': '100%', 'gap': null, 'zIndex': 2, gap: PX_16};
object2.description = {textAlign: 'center'};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.footer = {'position': 'absolute', 'bottom': null, 'alignSelf': 'center', 'zIndex': 2, bottom: PX_32};
const object10 = {};
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
object10['zIndex'] = 10;
object10['justifyContent'] = 'center';
object10['alignItems'] = 'center';
object10['backgroundColor'] = 'rgb(0, 3, 40)';
object2.logoutBlockingLayer = object10;
const env0_10 = Reflect.apply(createStyles, value, [object2]);
object2 = {MAIN: 'main'};
object2 = {code: 'function RestrictedHoursModalTsx1(){const{backgroundOpacity}=this.__closure;return{opacity:backgroundOpacity.get()};}'};
object2 = {code: 'function RestrictedHoursModalTsx2(){const{gradientOpacity}=this.__closure;return{opacity:gradientOpacity.get()};}'};
object2 = {code: 'function RestrictedHoursModalTsx3(){const{contentOpacity,contentScale}=this.__closure;return{opacity:contentOpacity.get(),transform:[{scale:contentScale.get()}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/native/RestrictedHoursModal.tsx');
exports.default = RestrictedHoursModal;
}
function RestrictedHoursLogoutBlockingLayer({visible}) { // fn#119786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:898, offset: 0x02519734, size: 119 bytes, params: 2, frame: 18
const styles = useStyles();
return visible ? <View style={styles.logoutBlockingLayer} pointerEvents="auto" accessibilityLiveRegion="polite">{((ActivityIndicator) => <ActivityIndicator size="large" />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}</View> : null;
}
function RestrictedHoursScreen({onLogin, logoutRequestInFlight}) { // fn#119787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:1554, offset: 0x025197ab, size: 1290 bytes, params: 2, frame: 35
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const {top, bottom} = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const value3 = (importDefault(15644) /* metro dependency 15644: useFormattedEndTime */)();
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun119788);
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value6 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const value8 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.9);
value8.useEffect(_fun119789, [value5, value6, value7, value8]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = RestrictedHoursScreenM;
closure.__closure = {backgroundOpacity: value5};
closure.__workletHash = 17073775693336;
closure.__initData = env0_12;
const value9 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const moduleValue7 = reanimatedRexportModule;
useAnimatedStyle = moduleValue7.useAnimatedStyle;
closure = RestrictedHoursScreenO;
closure.__closure = {gradientOpacity: value6};
closure.__workletHash = 16592270370139;
closure.__initData = env0_13;
const value10 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
const moduleValue8 = reanimatedRexportModule;
useAnimatedStyle = moduleValue8.useAnimatedStyle;
closure = RestrictedHoursScreenZ;
closure.__closure = {contentOpacity: value7, contentScale: value8};
closure.__workletHash = 15616799997783;
closure.__initData = env0_14;
const value11 = Reflect.apply(useAnimatedStyle, moduleValue8, [closure]);
const r24 = value3 != null ? intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).VfqJvY,
{endTime: value3}) : intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).abikhN);
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
object2 = {backgroundColor: env0_9};
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items5 = [styles.container];
items5[1] = {paddingTop: top, paddingBottom: bottom};
items5[2] = value9;
const items2 = [<View style={styles.backgroundFill} pointerEvents="none" />];
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items3 = [styles.assetLayers, value10];
const Image = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).Image;
items2[1] = <View3 style={items3} pointerEvents="none"><Image source={require(15645) /* metro dependency 15645 */} resizeMode="cover" style={styles.sunbeamGradient} /></View3>;
const View4 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items4 = [styles.content, value11];
const TeenScreenTimeRive = (require(3868) /* metro dependency 3868: native */).TeenScreenTimeRive;
const view = <View style={styles.riveContainer}><TeenScreenTimeRive artboard="Teen Screen Time Illo" stateMachine="State Machine 1" /></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[2] = <View4 style={items4}>{view}<Text variant="text-lg/medium" color="text-overlay-light" style={styles.description}>{r24}</Text></View4>;
items2[3] = <View style={styles.footer}><Text variant="text-sm/medium" color="text-subtle" style={styles.description}>{intl.format((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).iqeKDz,
{username: value4, loginHook: loginHook})}</Text></View>;
return (
<ModalScreen {...object2}>
<View2 style={items5}>
{items2}
</View2>
<RestrictedHoursLogoutBlockingLayer visible={logoutRequestInFlight} />
</ModalScreen>
);
}
function RestrictedHoursModal() { // fn#119794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:3988, offset: 0x02519f18, size: 294 bytes, params: 1, frame: 20
const value2 = (importDefault(15646) /* metro dependency 15646: useIsInRestrictedHours */)();
const env0_1 = env0_4.useRef(false);
const env0_2 = env0_4.useRef(true);
env0_4.useEffect(_fun119795, []);
const [property, env0_3] = env0_3Binding(env0_4.useState(false), 2);
const value6 = RestrictedHoursModalUseScreens(env0_4.useCallback(_fun119800, []), property);
env0_4.useEffect(_fun119802, [value2]);
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(function() {
return true;
});
const Modal = (require(10121) /* metro dependency 10121: ModalNative */).Modal;
const MAIN = env0_11.MAIN;
return <Modal screens={value6} initialRouteName={MAIN} />;
}
function _fun119788() { // fn#119788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:1710, offset: 0x02519cb5, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
const username = UserStore.getCurrentUser()?.username;
return username ?? '';
}
function _fun119789() { // fn#119789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:1925, offset: 0x02519ce6, size: 484 bytes, params: 1, frame: 31
let binding = env0_1;
let set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
let withTiming = timingModule.withTiming;
let object2 = {duration: 3000};
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
object2.easing = Easing.bezier(0.24, 0.27, 0.58, 1);
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [1, object2])]);
binding = env0_2;
set = binding.set;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let withDelay = reanimatedRexportModule.withDelay;
const moduleValue3 = timingModule;
withTiming = moduleValue3.withTiming;
object2 = {duration: 1500};
object2.easing = Easing.bezier(0, 0, 1, 1);
Reflect.apply(set, binding, [Reflect.apply(withDelay, reanimatedRexportModule, [1500, Reflect.apply(withTiming,
moduleValue3, [1, object2])])]);
binding = env0_3;
set = binding.set;
const moduleValue4 = reanimatedRexportModule;
withDelay = moduleValue4.withDelay;
const moduleValue5 = timingModule;
withTiming = moduleValue5.withTiming;
object2 = {duration: 1000};
object2.easing = Easing.bezier(0.1, 0.24, 0.32, 1);
Reflect.apply(set, binding, [Reflect.apply(withDelay, moduleValue4, [2000, Reflect.apply(withTiming, moduleValue5,
[1, object2])])]);
binding = env0_4;
set = binding.set;
const value = reanimatedRexportModule;
withDelay = value.withDelay;
const moduleValue6 = timingModule;
withTiming = moduleValue6.withTiming;
object2 = {duration: 1000};
object2.easing = Easing.bezier(0.1, 0.24, 0.32, 1);
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [2000, Reflect.apply(withTiming, moduleValue6, [1,
object2])])]);
}
function loginHook(a0, a1) { // fn#119793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:3737, owner: RestrictedHoursScreen.loginHook, offset: 0x02519eca, size: 78 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-sm/normal"
color="text-link"
onPress={onLogin}
key={a1}
>
{a0}
</Text>
);
}
function _fun119795() { // fn#119795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4080, offset: 0x0251a03e, size: 26 bytes, params: 1, frame: 2
env0_2.current = true;
return _fun119796;
}
function RestrictedHoursModalUseScreens(a0, a1) { // fn#119797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4169, owner: RestrictedHoursModal.useScreens, offset: 0x0251a058, size: 74 bytes, params: 3, frame: 15
var environment;
const env0_0 = a0;
const env0_1 = a1;
const value = environment.__proto__;
return (require(5280) /* metro dependency 5280: NavigatorNative */).useNavigatorScreens(_fun119798, [a0, a1]);
}
function _fun119800() { // fn#119800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4379, offset: 0x0251a100, size: 102 bytes, params: 1, frame: 12
var environment;
var value;
if (!env0_1.current) {
env0_1.current = true;
env0_3(true);
value = environment.__proto__;
value = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
value = value.logout('restricted_hours');
value.finally(_fun119801);
}
}
function _fun119802() { // fn#119802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4530, offset: 0x0251a190, size: 61 bytes, params: 1, frame: 11
var value;
if (!(env0_0 || env0_1.current)) {
value = environment.__proto__;
value = require(15642) /* metro dependency 15642: RestrictedHoursActionCreatorsNative */;
value.closeRestrictedHoursModal();
}
}
function _fun119798() { // fn#119798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4231, offset: 0x0251a0a2, size: 50 bytes, params: 1, frame: 4
const MAIN = env2_11.MAIN;
return {[MAIN]: {'headerShown': false, 'gestureEnabled': false, render: render_119799}};
}
function _fun119801() { // fn#119801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4460, offset: 0x0251a166, size: 42 bytes, params: 1, frame: 11
if (env1_2.current) {
env1_1.current = false;
env1_3(false);
}
}
function render_119799() { // fn#119799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15851:4287, offset: 0x0251a0d4, size: 44 bytes, params: 1, frame: 14
return <RestrictedHoursScreen onLogin={env1_0} logoutRequestInFlight={require} />;
}
File diff suppressed because it is too large. Load diff