This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,268 +1,307 @@
/* Metro module 13122; source: modules/devtools/native/components/DevToolsContent.tsx; dependencies: [57, 31, 27, 10557, 4107, 1220, 33, 4501, 697, 566, 10558, 13123, 4573, 5278, 4081, 14278, 14280, 1484, 1585, 6231, 6238, 3857, 13121, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ApexExperimentStore from '../../../experiments/apex/ApexExperimentStore.tsx'; /* Metro dependency 1220 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ExperimentStore from '../../../experiments/ExperimentStore.tsx'; /* Metro dependency 4107 */
import BuildOverrideStore from '../../../build_overrides/BuildOverrideStore.tsx'; /* Metro dependency 10557 */
import UseSortedDevToolsScreens from '../useSortedDevToolsScreens.tsx'; /* Metro dependency 13123 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as ArrowSmallUpIconModule from '../../../../design/components/Icon/native/redesign/generated/ArrowSmallUpIcon.tsx'; /* Metro dependency 14278 */
import * as ArrowSmallDownIconModule from '../../../../design/components/Icon/native/redesign/generated/ArrowSmallDownIcon.tsx'; /* Metro dependency 14280 */
function _fun100275(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:6, offset: 0x021e2f4d, size: 552 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.ScrollView;
const buildOverrideStore = importDefault(10557) /* metro dependency 10557: BuildOverrideStore */;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const apexExperimentStore = importDefault(1220) /* metro dependency 1220: ApexExperimentStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_10 = value3.jsx;
const env0_11 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.padding = PX_16;
object3.devToolsContainer = object5;
object2.padding = PX_16;
object.devToolsContainer = object2;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.sortingIcons = {flexDirection: 'row', gap: PX_8};
const object6 = {};
object.sortingIcons = {flexDirection: 'row', gap: PX_8};
const object4 = {};
const CONTROL_SECONDARY_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object6.backgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
object4.backgroundColor = CONTROL_SECONDARY_BACKGROUND_DEFAULT;
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object6.width = PX_32;
object4.width = PX_32;
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object6.height = PX_32;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object6.justifyContent = 'center';
object6.alignItems = 'center';
object3.button = object6;
object3.disabledButton = {opacity: 0.5};
const env0_12 = Reflect.apply(createStyles, createStylesModule, [object3]);
object4.height = PX_32;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.justifyContent = 'center';
object4.alignItems = 'center';
object.button = object4;
object.disabledButton = {opacity: 0.5};
const env0_12 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const value5 = value.memo(_fun100279);
value = value.memo(DevToolsContent);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/DevToolsContent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/DevToolsContent.tsx');
exports.default = value;
exports.DevToolsContentSubLabel = value5;
}
function DevToolsContentSortButtons({screenKey, start, end}) { // fn#100276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:811, offset: 0x021e3175, size: 355 bytes, params: 2, frame: 27
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_100277, disabled: start, style: [styles.button,
start && styles.disabledButton], accessibilityRole: 'button', accessibilityLabel: 'Shift up'};
const ArrowSmallUpIcon = (require(14278) /* metro dependency 14278: ArrowSmallUpIcon */).ArrowSmallUpIcon;
const pressableOpacity = <PressableOpacity {...pressableOpacityProps}><ArrowSmallUpIcon /></PressableOpacity>;
const pressableOpacityProps2 = {onPress: onPress_100278, disabled: end, style: [styles.button,
end && styles.disabledButton], accessibilityRole: 'button', accessibilityLabel: 'Shift down'};
const ArrowSmallDownIcon = (require(14280) /* metro dependency 14280: ArrowSmallDownIcon */).ArrowSmallDownIcon;
return (
<View style={styles.sortingIcons}>
{pressableOpacity}
<PressableOpacity {...pressableOpacityProps2}>
<ArrowSmallDownIcon />
function DevToolsContentSortButtons({screenKey, start, end}) { // fn#100276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:811, offset: 0x021e3175, size: 355 bytes, params: 2, frame: 27
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {onPress: onPress_100277, disabled: start, style: [styles.button,
start && styles.disabledButton], accessibilityRole: 'button', accessibilityLabel: 'Shift up'};
const ArrowSmallUpIcon = (ArrowSmallUpIconModule).ArrowSmallUpIcon;
const pressableOpacity = (
<PressableOpacity {...pressableOpacityProps}>
<ArrowSmallUpIcon />
</PressableOpacity>
</View>
);
}
);
const pressableOpacityProps2 = {onPress: onPress_100278, disabled: end, style: [styles.button,
end && styles.disabledButton], accessibilityRole: 'button', accessibilityLabel: 'Shift down'};
const ArrowSmallDownIcon = (ArrowSmallDownIconModule).ArrowSmallDownIcon;
return (
<View style={styles.sortingIcons}>
{pressableOpacity}
<PressableOpacity {...pressableOpacityProps2}>
<ArrowSmallDownIcon />
</PressableOpacity>
</View>
);
function DevToolsContentSortButtonsOnPress() { // fn#100277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:966, owner: DevToolsContentSortButtons.onPress, offset: 0x021e32d8, size: 94 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
value = require(13123) /* metro dependency 13123: useSortedDevToolsScreens */;
value.updateSortOrder(screenKey, 'up');
}
function _fun100279({label, value}) { // fn#100279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:639, offset: 0x021e3394, size: 121 bytes, params: 2, frame: 20
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const Text2 = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-xs/medium" color="text-subtle">
{label}
<Text2 variant="text-xs/semibold">
{value}
</Text2>
</Text>
);
}
function DevToolsContentSortButtonsOnPress_100278() { // fn#100278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:1265, owner: DevToolsContentSortButtons.onPress, offset: 0x021e3336, size: 94 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
value = require(13123) /* metro dependency 13123: useSortedDevToolsScreens */;
value.updateSortOrder(screenKey, 'down');
}
function DevToolsContent({title, embedded}) { // fn#100280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:1550, offset: 0x021e340d, size: 319 bytes, params: 2, frame: 22
var r0;
var object;
const styles = useStyles();
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const env0_1 = useDevToolsContentSublabels();
const [env0_2, env0_3] = env0_3Binding(env0_4.useState(false), 2);
const value5 = (importDefault(13123) /* metro dependency 13123: useSortedDevToolsScreens */)();
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const tableRowGroup = <TableRowGroup title={title} hasIcons>{value5.map(_fun100286)}</TableRowGroup>;
if (embedded) {
r0 = tableRowGroup;
} else {
var scrollViewBindingProps = {style: styles.devToolsContainer};
object = {};
object.paddingBottom = value2.bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
scrollViewBindingProps.contentContainerStyle = object;
r0 = <ScrollView {...scrollViewBindingProps}>{tableRowGroup}</ScrollView>;
}
return r0;
}
function DevToolsContentSortButtonsOnPress() { // fn#100277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:966, owner: DevToolsContentSortButtons.onPress, offset: 0x021e32d8, size: 94 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
value = require(13123) /* metro dependency 13123: useSortedDevToolsScreens */;
value.updateSortOrder(screenKey, 'up');
}
function _fun100279({label, value}) { // fn#100279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:639, offset: 0x021e3394, size: 121 bytes, params: 2, frame: 20
const Text = (TextModule).Text;
const Text2 = (TextModule).Text;
return (
<Text variant="text-xs/medium" color="text-subtle">
{label}
<Text2 variant="text-xs/semibold">
{value}
</Text2>
</Text>
);
}
function DevToolsContentSortButtonsOnPress_100278() { // fn#100278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:1265, owner: DevToolsContentSortButtons.onPress, offset: 0x021e3336, size: 94 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
value = require(13123) /* metro dependency 13123: useSortedDevToolsScreens */;
value.updateSortOrder(screenKey, 'down');
}
function useDevToolsContentSublabels() { // fn#100281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:1649, owner: DevToolsContent.useDevToolsContentSublabels, offset: 0x021e354c, size: 186 bytes, params: 1, frame: 19
var environment;
const value = environment.__proto__;
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
const env0_0 = Reflect.apply(useStateFromStores, fluxModule, [[BuildOverrideStore], function() {
function DevToolsContent({title, embedded}) { // fn#100280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:1550, offset: 0x021e340d, size: 319 bytes, params: 2, frame: 22
var r0;
var property = BuildOverrideStore.getCurrentBuildOverride().overrides;
var value2 = undefined;
if (property == null) {
r0 = value2;
var object2;
const styles = useStyles();
const env0_0 = (UseNavigationNativeModule).useNavigation();
const value2 = (UseSafeAreaInsetsNative)();
const env0_1 = useDevToolsContentSublabels();
const [env0_2, env0_3] = env0_3Binding(env0_4.useState(false), 2);
const value5 = (UseSortedDevToolsScreens)();
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const tableRowGroup = (
<TableRowGroup title={title} hasIcons>
{value5.map(_fun100286)}
</TableRowGroup>
);
if (embedded) {
r0 = tableRowGroup;
} else {
property = property[require(dependencyMap[10]).DEVICE_FIELD];
r0 = property == null ? value2 : property.id;
var scrollViewBindingProps = {style: styles.devToolsContainer};
object2 = {};
object2.paddingBottom = value2.bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
scrollViewBindingProps.contentContainerStyle = object2;
r0 = (
<ScrollView {...scrollViewBindingProps}>
{tableRowGroup}
</ScrollView>
);
}
return r0;
}]);
const length = fluxModule.useStateFromStores([ExperimentStore], function() {
var Object = global.Object;
return Object.keys(ExperimentStore.getAllExperimentOverrideDescriptors()).length;
});
const moduleValue3 = fluxModule;
useStateFromStores = moduleValue3.useStateFromStores;
const env0_1 = length + Reflect.apply(useStateFromStores, moduleValue3, [[ApexExperimentStore], function() {
var Object = global.Object;
return Object.keys(ApexExperimentStore.getClientOverrides()).length;
}]);
return (importDefault(13123) /* metro dependency 13123: useSortedDevToolsScreens */)().map(_fun100285);
}
function _fun100286(a0, a1) { // fn#100286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2381, offset: 0x021e375a, size: 319 bytes, params: 3, frame: 28
var r1;
var r2;
var r42;
var item3;
var value3;
var headerTitle;
var Icon;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
try {
headerTitle = r42.headerTitle;
Icon = r42.Icon;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
function useDevToolsContentSublabels() { // fn#100281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:1649, owner: DevToolsContent.useDevToolsContentSublabels, offset: 0x021e354c, size: 186 bytes, params: 1, frame: 19
var environment;
const value = environment.__proto__;
let useStateFromStores = FluxModule.useStateFromStores;
const env0_0 = Reflect.apply(useStateFromStores, FluxModule, [[BuildOverrideStore], function() {
var r0;
var property = BuildOverrideStore.getCurrentBuildOverride().overrides;
var value2 = undefined;
if (property == null) {
r0 = value2;
} else {
property = property[require(dependencyMap[10]).DEVICE_FIELD];
r0 = property == null ? value2 : property.id;
}
return r0;
}]);
const length = FluxModule.useStateFromStores([ExperimentStore], function() {
var Object = global.Object;
return Object.keys(ExperimentStore.getAllExperimentOverrideDescriptors()).length;
});
useStateFromStores = FluxModule.useStateFromStores;
const env0_1 = length + Reflect.apply(useStateFromStores, FluxModule, [[ApexExperimentStore], function() {
var Object = global.Object;
return Object.keys(ApexExperimentStore.getClientOverrides()).length;
}]);
return (UseSortedDevToolsScreens)().map(_fun100285);
function _fun100285(a0) { // fn#100285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2047, offset: 0x021e36ac, size: 174 bytes, params: 2, frame: 16
const iterator = a0[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r1 = value2 ? value : item;
if (!value2) {
item2.return();
}
if (r1 === 'buildOverride') {
return (
env0_0 != null
? ((Component) => <Component label="Build override: " value={env0_0} />)(env2_13)
: value
);
}
if (r1 === 'experiments') {
return (
env0_1 > 0
? ((Component) => <Component label="Experiments overridden: " value={env0_1.toString()} />)(env2_13)
: value
);
}
return value;
}
}
throw error;
}
if (!r2) {
r1.return();
}
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {label: headerTitle, subLabel: env0_1[a1]};
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon2 = TableRow2.Icon;
tableRowProps.icon = <Icon2 IconComponent={Icon} />;
const binding = env0_2;
tableRowProps.arrow = !binding;
tableRowProps.trailing = binding ? <DevToolsContentSortButtons screenKey={r4} start={a1 === 0} end={a1 === env0_4.length - 1} /> : value;
tableRowProps.onLongPress = onLongPress_100287;
tableRowProps.onPress = onPress_100289;
return <TableRow {...tableRowProps} key={r4} />;
}
function _fun100285(a0) { // fn#100285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2047, offset: 0x021e36ac, size: 174 bytes, params: 2, frame: 16
const iterator = a0[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r1 = value2 ? value : item;
if (!value2) {
item2.return();
}
if (r1 === 'buildOverride') {
return env0_0 != null ? ((Component) => <Component label="Build override: " value={env0_0} />)(env2_13) : value;
}
if (r1 === 'experiments') {
return env0_1 > 0 ? ((Component) => <Component label="Experiments overridden: " value={env0_1.toString()} />)(env2_13) : value;
}
return value;
}
function _fun100286(a0, a1) { // fn#100286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2381, offset: 0x021e375a, size: 319 bytes, params: 3, frame: 28
var r1;
var r2;
var r42;
var item3;
var value3;
var headerTitle;
var Icon;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
try {
headerTitle = r42.headerTitle;
Icon = r42.Icon;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
const TableRow = (TableRowNativeModule).TableRow;
const tableRowProps = {label: headerTitle, subLabel: env0_1[a1]};
const TableRow2 = (TableRowNativeModule).TableRow;
const Icon2 = TableRow2.Icon;
tableRowProps.icon = <Icon2 IconComponent={Icon} />;
const binding = env0_2;
tableRowProps.arrow = !binding;
tableRowProps.trailing = (
binding
? (
<DevToolsContentSortButtons
screenKey={r4}
start={a1 === 0}
end={a1 === env0_4.length - 1}
/>
)
: value
);
tableRowProps.onLongPress = onLongPress_100287;
tableRowProps.onPress = onPress_100289;
return <TableRow {...tableRowProps} key={r4} />;
function onLongPress_100287() { // fn#100287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2619, offset: 0x021e3899, size: 159 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__.__proto__;
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: env1_2 ? 'sorting-disabled' : 'sorting-enabled',
content: env1_2 ? 'Sorting disabled' : 'Sorting enabled'});
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
env1_3(function(a0) {
return !a0;
});
}
function onLongPress_100287() { // fn#100287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2619, offset: 0x021e3899, size: 159 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__.__proto__;
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: env1_2 ? 'sorting-disabled' : 'sorting-enabled',
content: env1_2 ? 'Sorting disabled' : 'Sorting enabled'});
value = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = value.triggerHapticFeedback;
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
const IMPACT_MEDIUM = HapticFeedbackTypes.IMPACT_MEDIUM;
Reflect.apply(triggerHapticFeedback, value, [IMPACT_MEDIUM]);
env1_3(function(a0) {
return !a0;
});
}
function onPress_100289() { // fn#100289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2826, offset: 0x021e3938, size: 102 bytes, params: 1, frame: 13
let value = environment.__proto__;
if (!env1_2) {
if (env1_0.push != null) {
env1_0.push(env0_0);
} else {
value = environment.__proto__.__proto__;
value = require(13121) /* metro dependency 13121: DevToolsNavigator */;
value.navigateToDevTools({screenKey: env0_0});
}
}
}
function onPress_100289() { // fn#100289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13312:2826, offset: 0x021e3938, size: 102 bytes, params: 1, frame: 13
let value = environment.__proto__;
if (!env1_2) {
if (env1_0.push != null) {
env1_0.push(env0_0);
} else {
value = environment.__proto__.__proto__;
value = require(13121) /* metro dependency 13121: DevToolsNavigator */;
value.navigateToDevTools({screenKey: env0_0});
}
}
}
global.__d(_fun100275, 13122, [57, 31, 27, 10557, 4107, 1220, 33, 4501, 697, 566, 10558, 13123, 4573, 5278, 4081,
14278, 14280, 1484, 1585, 6231, 6238, 3857, 13121,
2]) /* metro module 13122, dependencies: [57, 31, 27, 10557, 4107, 1220, 33, 4501, 697, 566, 10558, 13123, 4573, 5278, 4081, 14278, 14280, 1484, 1585, 6231, 6238, 3857, 13121, 2] */;
@@ -1,16 +1,20 @@
/* Metro module 13119; source: modules/devtools/native/components/DevToolsLazy.tsx; dependencies: [5, 31, 27, 7112, 7111, 33, 477, 13120, 13121, 1962, 566, 13115, 14282, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import DevToolsSettingsStore from '../../DevToolsSettingsStore.tsx'; /* Metro dependency 7111 */
import DeveloperExperimentStore from '../../../../stores/DeveloperExperimentStore.tsx'; /* Metro dependency 7112 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
function _fun100255(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:6, offset: 0x021e2742, size: 319 bytes, params: 8, frame: 20
var keyModifierControl;
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 = importAll(31) /* metro dependency 31 */;
const NativeModules = (require(27) /* metro dependency 27 */).NativeModules;
const developerExperimentStore = importDefault(7112) /* metro dependency 7112: DeveloperExperimentStore */;
const devToolsSettingsStore = importDefault(7111) /* metro dependency 7111: DevToolsSettingsStore */;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
let value = require(477) /* metro dependency 477: PlatformUtils */;
const NativeModules = (ReactNativeModule).NativeModules;
let value = PlatformUtilsModule;
if (value.isAndroid()) {
value = importDefault(13120) /* metro dependency 13120: NativeKeyCommandsModule */;
keyModifierControl = value.getConstants().keyModifierControl;
@@ -19,65 +23,66 @@ function _fun100255(global, require, importDefault, importAll, module, exports,
}
const env0_8 = [{'input': 'o', 'modifierFlags': null, 'eventName': 'keyCommandShowDevTools',
'discoverabilityTitle': 'Open DevTools Panel', modifierFlags: keyModifierControl, onKeyCommand: onKeyCommand}];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/DevToolsLazy.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/DevToolsLazy.tsx');
exports.default = DevToolsLazy;
}
function onKeyCommand() { // fn#100256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:392, offset: 0x021e2881, size: 29 bytes, params: 1, frame: 11
return env0_2(_fun100258)();
}
function DevToolsLazy() { // fn#100259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:569, offset: 0x021e28f8, size: 206 bytes, params: 1, frame: 19
const isDeveloper = (require(566) /* metro dependency 566: flux */).useStateFromStores([DeveloperExperimentStore],
function() {
return DeveloperExperimentStore.isDeveloper;
});
const showDevWidget = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevToolsSettingsStore],
function() {
return DevToolsSettingsStore.showDevWidget;
});
env0_3.useEffect(function() {
if (require(dependencyMap[6]).isIOS()) {
DeveloperExperimentStore.addChangeListener(_fun100263);
function onKeyCommand() { // fn#100256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:392, offset: 0x021e2881, size: 29 bytes, params: 1, frame: 11
return Module00005(_fun100258)();
function* _fun100258() { // fn#100258, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:399, offset: 0x021e28a9, size: 79 bytes, params: 1, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_1;
yield binding(binding2[9])(binding2[8], binding2.paths);
value = undefined;
if (false) {
return value;
}
value.navigateToDevTools();
}
}
});
(require(13115) /* metro dependency 13115: KeyCommandsView */).useKeyCommands(isDeveloper ? env0_8 : []);
if (isDeveloper) {
if (showDevWidget) {
return ((Component) => <Component />)((require(14282) /* metro dependency 14282: DevWidget */).default);
}
function DevToolsLazy() { // fn#100259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:569, offset: 0x021e28f8, size: 206 bytes, params: 1, frame: 19
const isDeveloper = (require(566) /* metro dependency 566: flux */).useStateFromStores([DeveloperExperimentStore],
function() {
return DeveloperExperimentStore.isDeveloper;
});
const showDevWidget = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevToolsSettingsStore],
function() {
return DevToolsSettingsStore.showDevWidget;
});
ReactModule.useEffect(function() {
if (require(dependencyMap[6]).isIOS()) {
DeveloperExperimentStore.addChangeListener(_fun100263);
}
});
(require(13115) /* metro dependency 13115: KeyCommandsView */).useKeyCommands(isDeveloper ? env0_8 : []);
if (isDeveloper) {
if (showDevWidget) {
return ((Component) => <Component />)((require(14282) /* metro dependency 14282: DevWidget */).default);
}
}
}
return null;
}
return null;
function _fun100262() { // fn#100262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:725, offset: 0x021e29e4, size: 64 bytes, params: 1, frame: 12
if (PlatformUtilsModule.isIOS()) {
DeveloperExperimentStore.addChangeListener(_fun100263);
}
function _fun100263() { // fn#100263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:768, offset: 0x021e2a24, size: 43 bytes, params: 1, frame: 11
var setIsDiscordDeveloper;
const NSUserDefaultsBridge = NativeModules.NSUserDefaultsBridge;
if (NSUserDefaultsBridge != null) {
setIsDiscordDeveloper = NSUserDefaultsBridge.setIsDiscordDeveloper;
value = environment.__proto__;
Reflect.apply(setIsDiscordDeveloper, NSUserDefaultsBridge, [isDeveloper]);
}
}
function* _fun100258() { // fn#100258, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:399, offset: 0x021e28a9, size: 79 bytes, params: 1, frame: 14
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_1;
yield binding(binding2[9])(binding2[8], binding2.paths);
value = undefined;
if (false) {
return value;
}
value.navigateToDevTools();
}
}
function _fun100262() { // fn#100262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:725, offset: 0x021e29e4, size: 64 bytes, params: 1, frame: 12
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
DeveloperExperimentStore.addChangeListener(_fun100263);
}
}
function _fun100263() { // fn#100263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13309:768, offset: 0x021e2a24, size: 43 bytes, params: 1, frame: 11
var setIsDiscordDeveloper;
const NSUserDefaultsBridge = NativeModules.NSUserDefaultsBridge;
if (NSUserDefaultsBridge != null) {
setIsDiscordDeveloper = NSUserDefaultsBridge.setIsDiscordDeveloper;
value = environment.__proto__;
Reflect.apply(setIsDiscordDeveloper, NSUserDefaultsBridge, [isDeveloper]);
}
}
global.__d(_fun100255, 13119, [5, 31, 27, 7112, 7111, 33, 477, 13120, 13121, 1962, 566, 13115, 14282,
2]) /* metro module 13119, dependencies: [5, 31, 27, 7112, 7111, 33, 477, 13120, 13121, 1962, 566, 13115, 14282, 2] */;
@@ -1,165 +1,181 @@
/* Metro module 13121; source: modules/devtools/native/components/DevToolsNavigator.tsx; dependencies: [31, 27, 33, 9884, 5280, 9603, 13122, 9409, 4573, 697, 13124, 4080, 5080, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as HammerIconModule from '../../../../design/components/Icon/native/redesign/generated/HammerIcon.tsx'; /* Metro dependency 9409 */
import * as HeaderSharedModule from '../../../main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
import * as Module09884Module from '../../../../by-id/module-09884.js'; /* Metro dependency 9884 */
import * as DevToolsScreensModule from './DevToolsScreens.tsx'; /* Metro dependency 13124 */
function _fun100265(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:6, offset: 0x021e2ac0, size: 215 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const env0_6 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
const env0_7 = value.memo(_fun100266);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/DevToolsNavigator.tsx');
const env0_6 = (Module09884Module).createNativeStackNavigator();
const env0_7 = ReactModule.memo(_fun100266);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/DevToolsNavigator.tsx');
exports.navigateToDevTools = navigateToDevTools;
}
function _fun100266({screenKey}) { // fn#100266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:197, offset: 0x021e2b97, size: 277 bytes, params: 2, frame: 22
var environment;
let value = environment;
const env0_0 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const Navigator = env0_6.Navigator;
const object2 = {};
const value2 = 'home';
object2.initialRouteName = screenKey ?? value2;
object2.screenOptions = screenOptions;
const Screen = env0_6.Screen;
const items2 = [<Screen name={value2} component={importDefault(13122) /* metro dependency 13122: DevToolsContent */} options={function() {
return {headerTitle: _fun100270, title: 'DevTools'};
}} />];
const Object = global.Object;
const entries = Object.entries;
const object4 = {};
const DevToolsScreens = (require(13124) /* metro dependency 13124: DevToolsScreens */).DevToolsScreens;
value = copyDataProperties(object4, DevToolsScreens, value);
const PerformanceTestingScreens = (require(13124) /* metro dependency 13124: DevToolsScreens */).PerformanceTestingScreens;
copyDataProperties(object4, PerformanceTestingScreens, value);
value = Reflect.apply(entries, Object, [object4]);
items2[1] = value.map(_fun100271);
return (
<Navigator {...object2}>
{items2}
</Navigator>
);
}
function navigateToDevTools() { // fn#100273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:1144, offset: 0x021e2ecf, size: 99 bytes, params: 1, frame: 16
let value = a0;
const screenKey = (value !== undefined ? value : {}).screenKey;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
value.pushLazy(_fun100274, {screenKey: screenKey}, 'DevToolsNavigator');
}
function screenOptions({navigation}) { // fn#100267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:342, offset: 0x021e2cac, size: 91 bytes, params: 2, frame: 14
var environment;
const object2 = {headerTitle: headerTitle_100268};
const value = environment.__proto__;
object2.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
object2.headerTitleAlign = 'center';
copyDataProperties(object2, env0_0, require);
return object2;
}
function options_100269() { // fn#100269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:580, offset: 0x021e2d5e, size: 28 bytes, params: 1, frame: 2
return {headerTitle: headerTitle_100270, title: 'DevTools'};
}
function _fun100271(a0) { // fn#100271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:934, offset: 0x021e2e29, size: 151 bytes, params: 2, frame: 22
var r1;
var r2;
var r42;
var item3;
var value3;
var headerTitle;
var render;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
try {
headerTitle = r42.headerTitle;
var env0_0 = headerTitle;
render = r42.render;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
function _fun100266({screenKey}) { // fn#100266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:197, offset: 0x021e2b97, size: 277 bytes, params: 2, frame: 22
var environment;
let value = environment;
const env0_0 = (NavigatorNativeModule).useAccessibilityNativeStackOptions();
const Navigator = env0_6.Navigator;
const object = {};
const value2 = 'home';
object.initialRouteName = screenKey ?? value2;
object.screenOptions = screenOptions_100267;
const Screen = env0_6.Screen;
const items2 = [
<Screen
name={value2}
component={importDefault(13122) /* metro dependency 13122: DevToolsContent */}
options={function() {
return {headerTitle: _fun100270, title: 'DevTools'};
}}
/>,
];
const Object = global.Object;
const entries = Object.entries;
const object3 = {};
const DevToolsScreens = (DevToolsScreensModule).DevToolsScreens;
value = copyDataProperties(object3, DevToolsScreens, value);
const PerformanceTestingScreens = (DevToolsScreensModule).PerformanceTestingScreens;
copyDataProperties(object3, PerformanceTestingScreens, value);
value = Reflect.apply(entries, Object, [object3]);
items2[1] = value.map(_fun100271);
return (
<Navigator {...object}>
{items2}
</Navigator>
);
function screenOptions_100267({navigation}) { // fn#100267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:342, offset: 0x021e2cac, size: 91 bytes, params: 2, frame: 14
var environment;
const object = {headerTitle: headerTitle_100268};
const value = environment.__proto__;
object.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
object.headerTitleAlign = 'center';
copyDataProperties(object, env0_0, require);
return object;
function screenOptions_100267HeaderTitle(a0) { // fn#100268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:374, owner: screenOptions_100267.headerTitle, offset: 0x021e2d07, size: 87 bytes, params: 2, frame: 16
const children = a0.children;
const value = Object.create(null);
value.children = 0;
const value2 = copyDataProperties({}, a0, value, children);
const GenericHeaderTitle = (HeaderSharedModule).GenericHeaderTitle;
return <GenericHeaderTitle title={children} {...value2} />;
}
}
throw error;
function options_100269() { // fn#100269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:580, offset: 0x021e2d5e, size: 28 bytes, params: 1, frame: 2
return {headerTitle: headerTitle_100270, title: 'DevTools'};
function options_100269HeaderTitle() { // fn#100270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:598, owner: options_100269.headerTitle, offset: 0x021e2d7a, size: 175 bytes, params: 1, frame: 21
const HammerIcon = (HammerIconModule).HammerIcon;
const hammerIcon = <HammerIcon size="sm" />;
const Text = (TextModule).Text;
const PX_8 = (Native).space.PX_8;
return (
<View style={{flexDirection: 'row'}}>
{hammerIcon}
<Text
style={{marginLeft: PX_8}}
variant="heading-md/semibold"
color="mobile-text-heading-primary"
>
{'DevTools'}
</Text>
</View>
);
}
}
function _fun100271(a0) { // fn#100271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:934, offset: 0x021e2e29, size: 151 bytes, params: 2, frame: 22
var r1;
var r2;
var r42;
var item3;
var value3;
var headerTitle;
var render;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
try {
headerTitle = r42.headerTitle;
var env0_0 = headerTitle;
render = r42.render;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
const Screen = env1_6.Screen;
return (
<Screen
name={r4}
children={render}
options={function() {
return {title: headerTitle};
}}
key={r4}
/>
);
}
}
if (!r2) {
r1.return();
function navigateToDevTools() { // fn#100273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:1144, offset: 0x021e2ecf, size: 99 bytes, params: 1, frame: 16
let value = a0;
const screenKey = (value !== undefined ? value : {}).screenKey;
(ActionSheetActionCreators).hideActionSheet();
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
value.pushLazy(_fun100274, {screenKey: screenKey}, 'DevToolsNavigator');
function _fun100274() { // fn#100274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:1236, offset: 0x021e2f32, size: 27 bytes, params: 1, frame: 11
const Promise = global.Promise;
return Promise.resolve(env1_7);
}
}
const Screen = env1_6.Screen;
return (
<Screen
name={r4}
children={render}
options={function() {
return {title: headerTitle};
}}
key={r4}
/>
);
}
function _fun100274() { // fn#100274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:1236, offset: 0x021e2f32, size: 27 bytes, params: 1, frame: 11
const Promise = global.Promise;
return Promise.resolve(env1_7);
}
function screenOptionsHeaderTitle_100268(a0) { // fn#100268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:374, owner: screenOptions.headerTitle, offset: 0x021e2d07, size: 87 bytes, params: 2, frame: 16
const children = a0.children;
const value = Object.create(null);
value.children = 0;
const value2 = copyDataProperties({}, a0, value, children);
const GenericHeaderTitle = (require(9603) /* metro dependency 9603: HeaderShared */).GenericHeaderTitle;
return <GenericHeaderTitle title={children} {...value2} />;
}
function options_100269HeaderTitle() { // fn#100270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13311:598, owner: options_100269.headerTitle, offset: 0x021e2d7a, size: 175 bytes, params: 1, frame: 21
const HammerIcon = (require(9409) /* metro dependency 9409: HammerIcon */).HammerIcon;
const hammerIcon = <HammerIcon size="sm" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
return (
<View style={{flexDirection: 'row'}}>
{hammerIcon}
<Text
style={{marginLeft: PX_8}}
variant="heading-md/semibold"
color="mobile-text-heading-primary"
>
{'DevTools'}
</Text>
</View>
);
}
global.__d(_fun100265, 13121, [31, 27, 33, 9884, 5280, 9603, 13122, 9409, 4573, 697, 13124, 4080, 5080,
2]) /* metro module 13121, dependencies: [31, 27, 33, 9884, 5280, 9603, 13122, 9409, 4573, 697, 13124, 4080, 5080, 2] */;
@@ -1,163 +1,215 @@
/* Metro module 13124; source: modules/devtools/native/components/DevToolsScreens.tsx; dependencies: [31, 33, 8931, 13125, 13127, 13129, 13132, 10570, 10330, 13134, 13135, 11441, 13136, 13164, 13166, 13167, 13169, 14157, 14161, 13813, 14164, 4062, 14199, 10227, 14202, 10945, 14207, 13140, 14230, 9646, 14248, 13797, 14249, 8036, 14251, 9411, 14253, 10358, 14260, 14261, 13144, 14263, 4056, 14266, 10802, 14267, 14268, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as LinkIconModule from '../../../../design/components/Icon/native/redesign/generated/LinkIcon.tsx'; /* Metro dependency 4056 */
import * as DownloadIconModule from '../../../../design/components/Icon/native/redesign/generated/DownloadIcon.tsx'; /* Metro dependency 4062 */
import * as ShieldIconModule from '../../../../design/components/Icon/native/redesign/generated/ShieldIcon.tsx'; /* Metro dependency 8036 */
import * as ClipboardListIconModule from '../../../../design/components/Icon/native/redesign/generated/ClipboardListIcon.tsx'; /* Metro dependency 8931 */
import * as RobotIconModule from '../../../../design/components/Icon/native/redesign/generated/RobotIcon.tsx'; /* Metro dependency 9411 */
import * as PencilIconModule from '../../../../design/components/Icon/native/redesign/generated/PencilIcon.tsx'; /* Metro dependency 9646 */
import * as TimerIconModule from '../../../../design/components/Icon/native/redesign/generated/TimerIcon.tsx'; /* Metro dependency 10227 */
import * as PaperIconModule from '../../../../design/components/Icon/native/redesign/generated/PaperIcon.tsx'; /* Metro dependency 10330 */
import * as ShopIconModule from '../../../../design/components/Icon/native/redesign/generated/ShopIcon.tsx'; /* Metro dependency 10358 */
import * as DevToolsExperimentsScreenModule from './screens/DevToolsExperimentsScreen.tsx'; /* Metro dependency 10570 */
import * as SpeedometerIconModule from '../../../../design/components/Icon/native/redesign/generated/SpeedometerIcon.tsx'; /* Metro dependency 10802 */
import * as MagicWandIconModule from '../../../../design/components/Icon/native/redesign/generated/MagicWandIcon.tsx'; /* Metro dependency 10945 */
import * as UserIconModule from '../../../../design/components/Icon/native/redesign/generated/UserIcon.tsx'; /* Metro dependency 11441 */
import * as DevToolsAnalyticsScreenModule from './screens/DevToolsAnalyticsScreen.tsx'; /* Metro dependency 13125 */
import * as RefreshIconModule from '../../../../design/components/Icon/native/redesign/generated/RefreshIcon.tsx'; /* Metro dependency 13127 */
import * as DevToolsBuildOverrideScreenModule from './screens/DevToolsBuildOverrideScreen.tsx'; /* Metro dependency 13129 */
import * as BeakerIconModule from '../../../../design/components/Icon/native/redesign/generated/BeakerIcon.tsx'; /* Metro dependency 13132 */
import * as DevToolsLoggingFlagsScreenModule from './screens/DevToolsLoggingFlagsScreen.tsx'; /* Metro dependency 13134 */
import * as DevToolsLocalMessageCacheModule from './screens/DevToolsLocalMessageCache.tsx'; /* Metro dependency 13135 */
import * as DevToolsGeneratedTestUsersScreenModule from './screens/DevToolsGeneratedTestUsersScreen.tsx'; /* Metro dependency 13136 */
import * as PiggyBankIconModule from '../../../../design/components/Icon/native/redesign/generated/PiggyBankIcon.tsx'; /* Metro dependency 13140 */
import * as CompassIconModule from '../../../../design/components/Icon/native/redesign/generated/CompassIcon.tsx'; /* Metro dependency 13144 */
import * as FileUpIconModule from '../../../../design/components/Icon/native/redesign/generated/FileUpIcon.tsx'; /* Metro dependency 13164 */
import * as DevToolsDataStorageScreenModule from './screens/DevToolsDataStorageScreen.tsx'; /* Metro dependency 13166 */
import * as PaintPaletteIconModule from '../../../../design/components/Icon/native/redesign/generated/PaintPaletteIcon.tsx'; /* Metro dependency 13167 */
import * as UserSettingsDesignSystemsScreenModule from '../../../user_settings/design_system/native/UserSettingsDesignSystemsScreen.tsx'; /* Metro dependency 13169 */
import * as EyeDropperIconModule from '../../../../design/components/Icon/native/redesign/generated/EyeDropperIcon.tsx'; /* Metro dependency 13797 */
import * as LanguageIconModule from '../../../../design/components/Icon/native/redesign/generated/LanguageIcon.tsx'; /* Metro dependency 13813 */
import * as DevToolsDismissableContentsScreenModule from './screens/DevToolsDismissableContentsScreen.tsx'; /* Metro dependency 14157 */
import * as GameCommunityUpsellDevToolsModule from '../../../game_community_upsell/native/GameCommunityUpsellDevTools.tsx'; /* Metro dependency 14161 */
import * as IntlTestingSettingsPageModule from '../../../intl/native/IntlTestingSettingsPage.tsx'; /* Metro dependency 14164 */
import * as DevToolsOTATestScreenModule from './screens/DevToolsOTATestScreen.tsx'; /* Metro dependency 14199 */
import * as DevToolsProfilingScreenModule from './screens/DevToolsProfilingScreen.tsx'; /* Metro dependency 14202 */
import * as DevToolsQuickActionsScreenModule from './screens/DevToolsQuickActionsScreen.tsx'; /* Metro dependency 14207 */
import * as DevToolsRevenuePlaygroundScreenModule from './screens/DevToolsRevenuePlaygroundScreen.tsx'; /* Metro dependency 14230 */
import * as UserSettingsSurveyChangelogOverrideModule from '../../../user_settings/changelog/native/UserSettingsSurveyChangelogOverride.tsx'; /* Metro dependency 14248 */
import * as DevToolsTogglesScreenModule from './screens/DevToolsTogglesScreen.tsx'; /* Metro dependency 14249 */
import * as DevToolsAgeVerificationScreenModule from './screens/DevToolsAgeVerificationScreen.tsx'; /* Metro dependency 14251 */
import * as DevToolsComponentsTestingScreenModule from './screens/DevToolsComponentsTestingScreen.tsx'; /* Metro dependency 14253 */
import * as DevToolsShopScreenModule from './screens/DevToolsShopScreen.tsx'; /* Metro dependency 14260 */
import * as CollectiblesToolModule from '../../../collectibles/native/tooling/CollectiblesTool.tsx'; /* Metro dependency 14261 */
import * as DevToolsActionSheetsScreenModule from './screens/DevToolsActionSheetsScreen.tsx'; /* Metro dependency 14263 */
import * as DevToolsAccountLinkingScreenModule from './screens/DevToolsAccountLinkingScreen.tsx'; /* Metro dependency 14266 */
import * as DevToolsPerformanceTestingScreenModule from './screens/DevToolsPerformanceTestingScreen.tsx'; /* Metro dependency 14267 */
import * as DevToolsDisplayNameEffectsBenchmarkScreenModule from './screens/DevToolsDisplayNameEffectsBenchmarkScreen.tsx'; /* Metro dependency 14268 */
function _fun100300(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:6, offset: 0x021e3e74, size: 1463 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
object2 = {};
const ClipboardListIcon = (require(8931) /* metro dependency 8931: ClipboardListIcon */).ClipboardListIcon;
object2.analytics = {headerTitle: 'Analytics', Icon: ClipboardListIcon, render: render_100301};
const RefreshIcon = (require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon;
object2.buildOverride = {headerTitle: 'Build Override', Icon: RefreshIcon, render: render_100302};
const BeakerIcon = (require(13132) /* metro dependency 13132: BeakerIcon */).BeakerIcon;
object2.experiments = {headerTitle: 'Experiment Overrides', Icon: BeakerIcon, render: render_100303};
const PaperIcon = (require(10330) /* metro dependency 10330: PaperIcon */).PaperIcon;
object2.loggingFlags = {headerTitle: 'Logging Flags', Icon: PaperIcon, render: render_100304};
object2.cacheStats = {headerTitle: 'Cache Stats', Icon: PaperIcon, predicate: function() {
ReactModule;
object = {};
const ClipboardListIcon = (ClipboardListIconModule).ClipboardListIcon;
object.analytics = {headerTitle: 'Analytics', Icon: ClipboardListIcon, render: render_100301};
const RefreshIcon = (RefreshIconModule).RefreshIcon;
object.buildOverride = {headerTitle: 'Build Override', Icon: RefreshIcon, render: render_100302};
const BeakerIcon = (BeakerIconModule).BeakerIcon;
object.experiments = {headerTitle: 'Experiment Overrides', Icon: BeakerIcon, render: render_100303};
const PaperIcon = (PaperIconModule).PaperIcon;
object.loggingFlags = {headerTitle: 'Logging Flags', Icon: PaperIcon, render: render_100304};
object.cacheStats = {headerTitle: 'Cache Stats', Icon: PaperIcon, predicate: function() {
return false;
}, render: render_100306};
const UserIcon = (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
object2.generatedTestUsers = {headerTitle: 'Generated Test Users', Icon: UserIcon, render: render_100307};
const FileUpIcon = (require(13164) /* metro dependency 13164: FileUpIcon */).FileUpIcon;
object2.dataStorage = {headerTitle: 'Data Storage', Icon: FileUpIcon, render: render_100308};
const PaintPaletteIcon = (require(13167) /* metro dependency 13167: PaintPaletteIcon */).PaintPaletteIcon;
object2.designSystems = {headerTitle: 'Design Systems', Icon: PaintPaletteIcon, render: render_100309};
object2.dismissibleContent = {headerTitle: 'Dismissible Contents', Icon: PaperIcon, render: render_100310};
object2.gameCommunityUpsell = {headerTitle: 'Game Community Upsell', Icon: PaperIcon, render: render_100311};
const LanguageIcon = (require(13813) /* metro dependency 13813: LanguageIcon */).LanguageIcon;
object2.i18n = {headerTitle: 'Intl Testing', Icon: LanguageIcon, render: render_100312};
const DownloadIcon = (require(4062) /* metro dependency 4062: DownloadIcon */).DownloadIcon;
object2.otatest = {headerTitle: 'OTA Test', Icon: DownloadIcon, render: render_100313};
const TimerIcon = (require(10227) /* metro dependency 10227: TimerIcon */).TimerIcon;
object2.profiling = {headerTitle: 'Profiling', Icon: TimerIcon, render: render_100314};
const MagicWandIcon = (require(10945) /* metro dependency 10945: MagicWandIcon */).MagicWandIcon;
object2.quickActions = {headerTitle: 'Quick Actions', Icon: MagicWandIcon, render: render_100315};
const PiggyBankIcon = (require(13140) /* metro dependency 13140: PiggyBankIcon */).PiggyBankIcon;
object2.revenuePlayground = {headerTitle: 'Revenue Playground', Icon: PiggyBankIcon, render: render_100316};
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
object2.surveyOverride = {headerTitle: 'Survey & Changelog Override', Icon: PencilIcon, render: render_100317};
const EyeDropperIcon = (require(13797) /* metro dependency 13797: EyeDropperIcon */).EyeDropperIcon;
object2.toggles = {headerTitle: 'Toggles (Design, Reporting, etc)', Icon: EyeDropperIcon, render: render_100318};
const ShieldIcon = (require(8036) /* metro dependency 8036: ShieldIcon */).ShieldIcon;
object2.ageVerification = {headerTitle: 'Age Verification', Icon: ShieldIcon, render: render_100319};
const RobotIcon = (require(9411) /* metro dependency 9411: RobotIcon */).RobotIcon;
object2.components = {headerTitle: 'Bot Components Testing', Icon: RobotIcon, render: render_100320};
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
object2.shop = {headerTitle: 'Shop', Icon: ShopIcon, render: render_100321};
object2.shopProductPreview = {headerTitle: 'Collectibles Tool', Icon: ShopIcon, render: render_100322};
const CompassIcon = (require(13144) /* metro dependency 13144: CompassIcon */).CompassIcon;
object2.actionSheets = {headerTitle: 'Action Sheets', Icon: CompassIcon, render: render_100323};
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
object2.accountLinking = {headerTitle: 'Account Linking', Icon: LinkIcon, render: render_100324};
const SpeedometerIcon = (require(10802) /* metro dependency 10802: SpeedometerIcon */).SpeedometerIcon;
object2.performanceTesting = {headerTitle: 'Performance Testing', Icon: SpeedometerIcon, render: render_100325};
const object3 = {};
object3.displayNameEffectsBenchmark = {headerTitle: 'Display Name Effects Benchmark', Icon: PaintPaletteIcon,
const UserIcon = (UserIconModule).UserIcon;
object.generatedTestUsers = {headerTitle: 'Generated Test Users', Icon: UserIcon, render: render_100307};
const FileUpIcon = (FileUpIconModule).FileUpIcon;
object.dataStorage = {headerTitle: 'Data Storage', Icon: FileUpIcon, render: render_100308};
const PaintPaletteIcon = (PaintPaletteIconModule).PaintPaletteIcon;
object.designSystems = {headerTitle: 'Design Systems', Icon: PaintPaletteIcon, render: render_100309};
object.dismissibleContent = {headerTitle: 'Dismissible Contents', Icon: PaperIcon, render: render_100310};
object.gameCommunityUpsell = {headerTitle: 'Game Community Upsell', Icon: PaperIcon, render: render_100311};
const LanguageIcon = (LanguageIconModule).LanguageIcon;
object.i18n = {headerTitle: 'Intl Testing', Icon: LanguageIcon, render: render_100312};
const DownloadIcon = (DownloadIconModule).DownloadIcon;
object.otatest = {headerTitle: 'OTA Test', Icon: DownloadIcon, render: render_100313};
const TimerIcon = (TimerIconModule).TimerIcon;
object.profiling = {headerTitle: 'Profiling', Icon: TimerIcon, render: render_100314};
const MagicWandIcon = (MagicWandIconModule).MagicWandIcon;
object.quickActions = {headerTitle: 'Quick Actions', Icon: MagicWandIcon, render: render_100315};
const PiggyBankIcon = (PiggyBankIconModule).PiggyBankIcon;
object.revenuePlayground = {headerTitle: 'Revenue Playground', Icon: PiggyBankIcon, render: render_100316};
const PencilIcon = (PencilIconModule).PencilIcon;
object.surveyOverride = {headerTitle: 'Survey & Changelog Override', Icon: PencilIcon, render: render_100317};
const EyeDropperIcon = (EyeDropperIconModule).EyeDropperIcon;
object.toggles = {headerTitle: 'Toggles (Design, Reporting, etc)', Icon: EyeDropperIcon, render: render_100318};
const ShieldIcon = (ShieldIconModule).ShieldIcon;
object.ageVerification = {headerTitle: 'Age Verification', Icon: ShieldIcon, render: render_100319};
const RobotIcon = (RobotIconModule).RobotIcon;
object.components = {headerTitle: 'Bot Components Testing', Icon: RobotIcon, render: render_100320};
const ShopIcon = (ShopIconModule).ShopIcon;
object.shop = {headerTitle: 'Shop', Icon: ShopIcon, render: render_100321};
object.shopProductPreview = {headerTitle: 'Collectibles Tool', Icon: ShopIcon, render: render_100322};
const CompassIcon = (CompassIconModule).CompassIcon;
object.actionSheets = {headerTitle: 'Action Sheets', Icon: CompassIcon, render: render_100323};
const LinkIcon = (LinkIconModule).LinkIcon;
object.accountLinking = {headerTitle: 'Account Linking', Icon: LinkIcon, render: render_100324};
const SpeedometerIcon = (SpeedometerIconModule).SpeedometerIcon;
object.performanceTesting = {headerTitle: 'Performance Testing', Icon: SpeedometerIcon, render: render_100325};
const object4 = {};
object4.displayNameEffectsBenchmark = {headerTitle: 'Display Name Effects Benchmark', Icon: PaintPaletteIcon,
render: render_100326};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/DevToolsScreens.tsx');
exports.DevToolsScreens = object2;
exports.PerformanceTestingScreens = object3;
}
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/DevToolsScreens.tsx');
exports.DevToolsScreens = object;
exports.PerformanceTestingScreens = object4;
function render_100301() { // fn#100301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:194, offset: 0x021e442b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsAnalyticsScreenModule).default);
}
function render_100301() { // fn#100301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:194, offset: 0x021e442b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13125) /* metro dependency 13125: DevToolsAnalyticsScreen */).default);
}
function render_100302() { // fn#100302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:314, offset: 0x021e4457, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsBuildOverrideScreenModule).default);
}
function render_100302() { // fn#100302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:314, offset: 0x021e4457, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13129) /* metro dependency 13129: DevToolsBuildOverrideScreen */).default);
}
function render_100303() { // fn#100303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:437, offset: 0x021e4483, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsExperimentsScreenModule).default);
}
function render_100303() { // fn#100303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:437, offset: 0x021e4483, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(10570) /* metro dependency 10570: DevToolsExperimentsScreen */).default);
}
function render_100304() { // fn#100304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:553, offset: 0x021e44af, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsLoggingFlagsScreenModule).default);
}
function render_100304() { // fn#100304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:553, offset: 0x021e44af, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13134) /* metro dependency 13134: DevToolsLoggingFlagsScreen */).default);
}
function render_100306() { // fn#100306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:682, offset: 0x021e44db, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsLocalMessageCacheModule).default);
}
function render_100306() { // fn#100306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:682, offset: 0x021e44db, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13135) /* metro dependency 13135: DevToolsLocalMessageCache */).default);
}
function render_100307() { // fn#100307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:812, offset: 0x021e4507, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsGeneratedTestUsersScreenModule).default);
}
function render_100307() { // fn#100307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:812, offset: 0x021e4507, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13136) /* metro dependency 13136: DevToolsGeneratedTestUsersScreen */).default);
}
function render_100308() { // fn#100308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:929, offset: 0x021e4533, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsDataStorageScreenModule).default);
}
function render_100308() { // fn#100308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:929, offset: 0x021e4533, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13166) /* metro dependency 13166: DevToolsDataStorageScreen */).default);
}
function render_100309() { // fn#100309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1056, offset: 0x021e455f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((UserSettingsDesignSystemsScreenModule).default);
}
function render_100309() { // fn#100309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1056, offset: 0x021e455f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(13169) /* metro dependency 13169: UserSettingsDesignSystemsScreen */).default);
}
function render_100310() { // fn#100310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1186, offset: 0x021e458b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsDismissableContentsScreenModule).default);
}
function render_100310() { // fn#100310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1186, offset: 0x021e458b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14157) /* metro dependency 14157: DevToolsDismissableContentsScreen */).default);
}
function render_100311() { // fn#100311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1318, offset: 0x021e45b7, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((GameCommunityUpsellDevToolsModule).default);
}
function render_100311() { // fn#100311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1318, offset: 0x021e45b7, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14161) /* metro dependency 14161: GameCommunityUpsellDevTools */).default);
}
function render_100312() { // fn#100312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1430, offset: 0x021e45e3, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((IntlTestingSettingsPageModule).default);
}
function render_100312() { // fn#100312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1430, offset: 0x021e45e3, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14164) /* metro dependency 14164: IntlTestingSettingsPage */).default);
}
function render_100313() { // fn#100313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1541, offset: 0x021e460f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsOTATestScreenModule).default);
}
function render_100313() { // fn#100313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1541, offset: 0x021e460f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14199) /* metro dependency 14199: DevToolsOTATestScreen */).default);
}
function render_100314() { // fn#100314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1652, offset: 0x021e463b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsProfilingScreenModule).default);
}
function render_100314() { // fn#100314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1652, offset: 0x021e463b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14202) /* metro dependency 14202: DevToolsProfilingScreen */).default);
}
function render_100315() { // fn#100315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1774, offset: 0x021e4667, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsQuickActionsScreenModule).default);
}
function render_100315() { // fn#100315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1774, offset: 0x021e4667, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14207) /* metro dependency 14207: DevToolsQuickActionsScreen */).default);
}
function render_100316() { // fn#100316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1906, offset: 0x021e4693, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsRevenuePlaygroundScreenModule).default);
}
function render_100316() { // fn#100316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:1906, offset: 0x021e4693, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14230) /* metro dependency 14230: DevToolsRevenuePlaygroundScreen */).default);
}
function render_100317() { // fn#100317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2041, offset: 0x021e46bf, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((UserSettingsSurveyChangelogOverrideModule).default);
}
function render_100317() { // fn#100317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2041, offset: 0x021e46bf, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14248) /* metro dependency 14248: UserSettingsSurveyChangelogOverride */).default);
}
function render_100318() { // fn#100318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2178, offset: 0x021e46eb, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsTogglesScreenModule).default);
}
function render_100318() { // fn#100318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2178, offset: 0x021e46eb, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14249) /* metro dependency 14249: DevToolsTogglesScreen */).default);
}
function render_100319() { // fn#100319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2303, offset: 0x021e4717, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsAgeVerificationScreenModule).default);
}
function render_100319() { // fn#100319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2303, offset: 0x021e4717, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14251) /* metro dependency 14251: DevToolsAgeVerificationScreen */).default);
}
function render_100320() { // fn#100320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2428, offset: 0x021e4743, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsComponentsTestingScreenModule).default);
}
function render_100320() { // fn#100320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2428, offset: 0x021e4743, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14253) /* metro dependency 14253: DevToolsComponentsTestingScreen */).default);
}
function render_100321() { // fn#100321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2528, offset: 0x021e476f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsShopScreenModule).default);
}
function render_100321() { // fn#100321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2528, offset: 0x021e476f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14260) /* metro dependency 14260: DevToolsShopScreen */).default);
}
function render_100322() { // fn#100322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2655, offset: 0x021e479b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((CollectiblesToolModule).default);
}
function render_100322() { // fn#100322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2655, offset: 0x021e479b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14261) /* metro dependency 14261: CollectiblesTool */).default);
}
function render_100323() { // fn#100323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2775, offset: 0x021e47c7, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsActionSheetsScreenModule).default);
}
function render_100323() { // fn#100323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2775, offset: 0x021e47c7, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14263) /* metro dependency 14263: DevToolsActionSheetsScreen */).default);
}
function render_100324() { // fn#100324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2896, offset: 0x021e47f3, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsAccountLinkingScreenModule).default);
}
function render_100324() { // fn#100324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:2896, offset: 0x021e47f3, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14266) /* metro dependency 14266: DevToolsAccountLinkingScreen */).default);
}
function render_100325() { // fn#100325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:3032, offset: 0x021e481f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsPerformanceTestingScreenModule).default);
}
function render_100325() { // fn#100325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:3032, offset: 0x021e481f, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14267) /* metro dependency 14267: DevToolsPerformanceTestingScreen */).default);
}
function render_100326() { // fn#100326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:3193, offset: 0x021e484b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((DevToolsDisplayNameEffectsBenchmarkScreenModule).default);
}
function render_100326() { // fn#100326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13314:3193, offset: 0x021e484b, size: 44 bytes, params: 1, frame: 13
return ((Component) => <Component />)((require(14268) /* metro dependency 14268: DevToolsDisplayNameEffectsBenchmarkScreen */).default);
}
global.__d(_fun100300, 13124, [31, 33, 8931, 13125, 13127, 13129, 13132, 10570, 10330, 13134, 13135, 11441, 13136,
13164, 13166, 13167, 13169, 14157, 14161, 13813, 14164, 4062, 14199, 10227, 14202, 10945, 14207, 13140, 14230,
9646, 14248, 13797, 14249, 8036, 14251, 9411, 14253, 10358, 14260, 14261, 13144, 14263, 4056, 14266, 10802,
14267, 14268,
2]) /* metro module 13124, dependencies: [31, 33, 8931, 13125, 13127, 13129, 13132, 10570, 10330, 13134, 13135, 11441, 13136, 13164, 13166, 13167, 13169, 14157, 14161, 13813, 14164, 4062, 14199, 10227, 14202, 10945, 14207, 13140, 14230, 9646, 14248, 13797, 14249, 8036, 14251, 9411, 14253, 10358, 14260, 14261, 13144, 14263, 4056, 14266, 10802, 14267, 14268, 2] */;
@@ -1,192 +1,226 @@
/* Metro module 14282; source: modules/devtools/native/components/DevWidget.tsx; dependencies: [31, 7111, 695, 33, 4501, 697, 4017, 11281, 14283, 5321, 4577, 4581, 5278, 13121, 13969, 14284, 13126, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import DevToolsSettingsStore from '../../DevToolsSettingsStore.tsx'; /* Metro dependency 7111 */
import UseSafeAreaInsetsSharedValueNative from '../../../safe_area/useSafeAreaInsetsSharedValue.native.tsx'; /* Metro dependency 11281 */
import UseWindowDimensionsSharedValueNative from '../../../screen/useWindowDimensionsSharedValue.native.tsx'; /* Metro dependency 14283 */
import VEVOO from '../../../visual_effect_view/native/overrides/VEVOO.tsx'; /* Metro dependency 14284 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 695 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SpringPresetsModule from '../../../../design/animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as Module05321Module from '../../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as DevToolsNavigatorModule from './DevToolsNavigator.tsx'; /* Metro dependency 13121 */
import * as DevToolsActionCreatorsModule from '../../DevToolsActionCreators.tsx'; /* Metro dependency 13126 */
import * as StaffBadgeIconModule from '../../../../design/components/Icon/native/redesign/generated/StaffBadgeIcon.tsx'; /* Metro dependency 13969 */
function _fun108017(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:6, offset: 0x02311eb6, size: 462 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const devToolsSettingsStore = importDefault(7111) /* metro dependency 7111: DevToolsSettingsStore */;
const DEV_WIDGET_SIZE = (require(695) /* metro dependency 695: Constants */).DEV_WIDGET_SIZE;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.Fragment;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object2 = {'backgroundColor': null, 'justifyContent': 'center', 'alignItems': 'center'};
const DEV_WIDGET_SIZE = (ConstantsModule).DEV_WIDGET_SIZE;
const createStyles = CreateStylesModule.createStyles;
const object3 = {'backgroundColor': null, 'justifyContent': 'center', 'alignItems': 'center'};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object2.backgroundColor = BACKGROUND_BRAND;
object2.height = DEV_WIDGET_SIZE;
object2.width = DEV_WIDGET_SIZE;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
object3.backgroundColor = BACKGROUND_BRAND;
object3.height = DEV_WIDGET_SIZE;
object3.width = DEV_WIDGET_SIZE;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
const SHADOW_MOBILE_NAVIGATOR_X = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_MOBILE_NAVIGATOR_X;
copyDataProperties(object2, SHADOW_MOBILE_NAVIGATOR_X, undefined);
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{widgetContainer: {position: 'absolute'},
widget: object2}]);
copyDataProperties(object3, SHADOW_MOBILE_NAVIGATOR_X, undefined);
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [{widgetContainer: {position: 'absolute'},
widget: object3}]);
object = {code: 'function DevWidgetTsx1(x,y){const{windowDimensionsSharedValue,insetsSharedValue,clamp,dragBoundsPadding,contentWidth,contentHeight}=this.__closure;const{width:windowWidth,height:windowHeight}=windowDimensionsSharedValue.get();const insets=insetsSharedValue.get();return{x:clamp(x,insets.left+dragBoundsPadding,windowWidth-insets.right-contentWidth-dragBoundsPadding),y:clamp(y,insets.top+dragBoundsPadding,windowHeight-insets.bottom-contentHeight-dragBoundsPadding)};}'};
object = {code: 'function DevWidgetTsx2(){const{runOnJS,onChangePosition,x,y}=this.__closure;runOnJS(onChangePosition)({x:x.get(),y:y.get()});}'};
object = {code: 'function DevWidgetTsx3(event){const{getClampedPosition,originalX,originalY,x,y}=this.__closure;const{x:xClamped,y:yClamped}=getClampedPosition(originalX.get()+event.translationX,originalY.get()+event.translationY);x.set(xClamped);y.set(yClamped);}'};
object = {code: 'function DevWidgetTsx4(){const{originalX,x,originalY,y}=this.__closure;originalX.set(x.get());originalY.set(y.get());}'};
object = {code: 'function DevWidgetTsx5(){const{getClampedPosition,x,y,withSpring,springUnclamped}=this.__closure;const{x:translateX,y:translateY}=getClampedPosition(x.get(),y.get());return{transform:[{translateX:withSpring(translateX,springUnclamped)},{translateY:withSpring(translateY,springUnclamped)}]};}'};
const env0_16 = value.memo(_fun108024);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/DevWidget.tsx');
const env0_16 = ReactModule.memo(_fun108024);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/DevWidget.tsx');
exports.default = DevWidget;
function DraggableContainer({x, y, contentWidth, contentHeight, dragBoundsPadding, onChangePosition, children}) { // fn#108018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:1768, offset: 0x02312084, size: 817 bytes, params: 2, frame: 33
const contentHeight2 = contentHeight;
dragBoundsPadding = dragBoundsPadding === undefined ? 0 : dragBoundsPadding;
const styles = useStyles();
let useSharedValue = ReanimatedRexportModule.useSharedValue;
let get = x.get;
const value2 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [Reflect.apply(get, x, [])]);
useSharedValue = ReanimatedRexportModule.useSharedValue;
get = y.get;
const value3 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [Reflect.apply(get, y, [])]);
const value4 = (UseSafeAreaInsetsSharedValueNative)();
const value5 = (UseWindowDimensionsSharedValueNative)();
const binding = contentHeight2;
const useCallback = binding.useCallback;
let closure = DraggableContainerP;
let object = {windowDimensionsSharedValue: value5, insetsSharedValue: value4};
object.clamp = ReanimatedRexportModule.clamp;
object.dragBoundsPadding = dragBoundsPadding;
object.contentWidth = contentWidth;
object.contentHeight = contentHeight;
closure.__closure = object;
closure.__workletHash = 729779775192;
closure.__initData = undefined;
const value6 = Reflect.apply(useCallback, binding, [closure, [contentHeight, contentWidth, dragBoundsPadding,
value4, value5]]);
const Gesture = (Module05321Module).Gesture;
const value7 = Gesture.Pan();
const onStart = value7.onStart;
closure = DraggableContainerC;
closure.__closure = {originalX: value2, x: x, originalY: value3, y: y};
closure.__workletHash = 7165614533762;
closure.__initData = env0_13;
const value8 = Reflect.apply(onStart, value7, [closure]);
const onUpdate = value8.onUpdate;
closure = DraggableContainerD;
closure.__closure = {getClampedPosition: value6, originalX: value2, originalY: value3, x: x, y: y};
closure.__workletHash = 10056531764801;
closure.__initData = env0_12;
const value9 = Reflect.apply(onUpdate, value8, [closure]);
const onEnd = value9.onEnd;
closure = DraggableContainerF;
closure.__closure = {runOnJS: ReanimatedRexportModule.runOnJS, onChangePosition: onChangePosition, x: x, y: y};
closure.__workletHash = 12890758993684;
closure.__initData = env0_11;
const value10 = Reflect.apply(onEnd, value9, [closure]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = DraggableContainerW;
object = {getClampedPosition: value6, x: x, y: y};
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object.springUnclamped = (require(4581) /* metro dependency 4581: springPresets */).springUnclamped;
closure.__closure = object;
closure.__workletHash = 6251354551691;
closure.__initData = env0_14;
const value11 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const GestureDetector = (Module05321Module).GestureDetector;
const View = (ReanimatedRexport).View;
return (
<GestureDetector gesture={value10}>
<View style={[styles.widgetContainer, value11]}>
{children}
</View>
</GestureDetector>
);
function DraggableContainerP(a0, a1) { // fn#108019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:1996, owner: DraggableContainer.P, offset: 0x023123b5, size: 181 bytes, params: 3, frame: 24
const {width, height} = env0_9.get();
const value3 = JsxRuntimeModule.jsxs.get();
const object = {};
const clamp = ReanimatedRexportModule.clamp;
const left = value3.left;
const dragBoundsPaddingBinding = dragBoundsPadding;
object.x = Reflect.apply(clamp, ReanimatedRexportModule, [a0, left + dragBoundsPaddingBinding,
width - value3.right - contentWidth - dragBoundsPaddingBinding]);
object.y = ReanimatedRexportModule.clamp(a1, value3.top + dragBoundsPaddingBinding,
height - value3.bottom - contentHeight - dragBoundsPaddingBinding);
return object;
}
function DraggableContainerC() { // fn#108020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:2378, owner: DraggableContainer.C, offset: 0x0231246a, size: 61 bytes, params: 1, frame: 13
let binding = JsxRuntimeModule.jsx;
let set = binding.set;
const xBinding = x;
let get = xBinding.get;
Reflect.apply(set, binding, [Reflect.apply(get, xBinding, [])]);
binding = JsxRuntimeModule.Fragment;
set = binding.set;
const yBinding = y;
get = yBinding.get;
Reflect.apply(set, binding, [Reflect.apply(get, yBinding, [])]);
}
function DraggableContainerD({translationX, translationY}) { // fn#108021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:2527, owner: DraggableContainer.D, offset: 0x023124a7, size: 104 bytes, params: 2, frame: 15
const value5 = env0_10(JsxRuntimeModule.jsx.get() + translationX, JsxRuntimeModule.Fragment.get() + translationY);
const x2 = value5.x;
const y2 = value5.y;
x.set(x2);
y.set(y2);
}
function DraggableContainerF() { // fn#108022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:2751, owner: DraggableContainer.f, offset: 0x0231250f, size: 85 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value,
[onChangePosition]);
const object = {};
object.x = x.get();
object.y = y.get();
value(object);
}
function DraggableContainerW() { // fn#108023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:2949, owner: DraggableContainer.W, offset: 0x02312564, size: 172 bytes, params: 1, frame: 21
const binding = env0_10;
const value2 = x.get();
let value = y.get();
value = binding(value2, value);
const x2 = value.x;
const y2 = value.y;
value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
const withSpring = value.withSpring;
const springUnclamped = (SpringPresetsModule).springUnclamped;
const items2 = [{translateX: Reflect.apply(withSpring, value, [x2, springUnclamped])}];
const object2 = {};
object2.translateY = (require(4577) /* metro dependency 4577: spring */).withSpring(y2, springUnclamped);
items2[1] = object2;
return {transform: items2};
}
}
function _fun108024() { // fn#108024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:3426, offset: 0x02312610, size: 141 bytes, params: 1, frame: 16
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {style: styles.widget, accessibilityRole: 'button', onPress: onPress_108025,
activeOpacity: 0.5};
const StaffBadgeIcon = (StaffBadgeIconModule).StaffBadgeIcon;
return (
<PressableOpacity {...pressableOpacityProps}>
<StaffBadgeIcon size="md" color="white" />
</PressableOpacity>
);
function onPress_108025() { // fn#108025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:3533, offset: 0x0231269d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (DevToolsNavigatorModule).navigateToDevTools();
}
}
function DevWidget() { // fn#108026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:3744, offset: 0x023126c2, size: 244 bytes, params: 1, frame: 22
const useSharedValue = ReanimatedRexportModule.useSharedValue;
const devToolsSettingsStoreBinding = DevToolsSettingsStore;
const value2 = Reflect.apply(useSharedValue, ReanimatedRexportModule,
[devToolsSettingsStoreBinding.devWidgetPosition.x]);
const value3 = ReanimatedRexportModule.useSharedValue(devToolsSettingsStoreBinding.devWidgetPosition.y);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const value4 = ((Component) => <Component x={value2} y={value3} />)(VEVOO);
const PX_4 = (Native).space.PX_4;
return (
<>
{value4}
<DraggableContainer
x={value2}
y={value3}
contentWidth={DEV_WIDGET_SIZE}
contentHeight={DEV_WIDGET_SIZE}
dragBoundsPadding={PX_4}
onChangePosition={onChangePosition}
>
{((Component) => <Component />)(env0_16)}
</DraggableContainer>
</>
);
function onChangePosition(a0) { // fn#108027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:4024, owner: DevWidget.onChangePosition, offset: 0x023127b6, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (DevToolsActionCreatorsModule).updateDevToolsSettings({devWidgetPosition: a0});
}
}
}
function DraggableContainer({x, y, contentWidth, contentHeight, dragBoundsPadding, onChangePosition, children}) { // fn#108018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:1768, offset: 0x02312084, size: 817 bytes, params: 2, frame: 33
const env0_3 = contentHeight;
dragBoundsPadding = dragBoundsPadding === undefined ? 0 : dragBoundsPadding;
const styles = useStyles();
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useSharedValue = reanimatedRexportModule.useSharedValue;
let get = x.get;
const value2 = Reflect.apply(useSharedValue, reanimatedRexportModule, [Reflect.apply(get, x, [])]);
const moduleValue2 = reanimatedRexportModule;
useSharedValue = moduleValue2.useSharedValue;
get = y.get;
const value3 = Reflect.apply(useSharedValue, moduleValue2, [Reflect.apply(get, y, [])]);
const value4 = (importDefault(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */)();
const value5 = (importDefault(14283) /* metro dependency 14283: useWindowDimensionsSharedValueNative */)();
const binding = env0_3;
const useCallback = binding.useCallback;
let closure = DraggableContainerP;
let object2 = {windowDimensionsSharedValue: value5, insetsSharedValue: value4};
object2.clamp = reanimatedRexportModule.clamp;
object2.dragBoundsPadding = dragBoundsPadding;
object2.contentWidth = contentWidth;
object2.contentHeight = contentHeight;
closure.__closure = object2;
closure.__workletHash = 729779775192;
closure.__initData = undefined;
const value6 = Reflect.apply(useCallback, binding, [closure, [contentHeight, contentWidth, dragBoundsPadding,
value4, value5]]);
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
const value7 = Gesture.Pan();
const onStart = value7.onStart;
closure = DraggableContainerC;
closure.__closure = {originalX: value2, x: x, originalY: value3, y: y};
closure.__workletHash = 7165614533762;
closure.__initData = env0_13;
const value8 = Reflect.apply(onStart, value7, [closure]);
const onUpdate = value8.onUpdate;
closure = DraggableContainerD;
closure.__closure = {getClampedPosition: value6, originalX: value2, originalY: value3, x: x, y: y};
closure.__workletHash = 10056531764801;
closure.__initData = env0_12;
const value9 = Reflect.apply(onUpdate, value8, [closure]);
const onEnd = value9.onEnd;
closure = DraggableContainerF;
closure.__closure = {runOnJS: reanimatedRexportModule.runOnJS, onChangePosition: onChangePosition, x: x, y: y};
closure.__workletHash = 12890758993684;
closure.__initData = env0_11;
const value10 = Reflect.apply(onEnd, value9, [closure]);
const moduleValue3 = reanimatedRexportModule;
const useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = DraggableContainerW;
object2 = {getClampedPosition: value6, x: x, y: y};
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
object2.springUnclamped = (require(4581) /* metro dependency 4581: springPresets */).springUnclamped;
closure.__closure = object2;
closure.__workletHash = 6251354551691;
closure.__initData = env0_14;
const value11 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<GestureDetector gesture={value10}>
<View style={[styles.widgetContainer, value11]}>
{children}
</View>
</GestureDetector>
);
}
function _fun108024() { // fn#108024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:3426, offset: 0x02312610, size: 141 bytes, params: 1, frame: 16
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {style: styles.widget, accessibilityRole: 'button', onPress: onPress_108025,
activeOpacity: 0.5};
const StaffBadgeIcon = (require(13969) /* metro dependency 13969: StaffBadgeIcon */).StaffBadgeIcon;
return (
<PressableOpacity {...pressableOpacityProps}>
<StaffBadgeIcon size="md" color="white" />
</PressableOpacity>
);
}
function DevWidget() { // fn#108026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:3744, offset: 0x023126c2, size: 244 bytes, params: 1, frame: 22
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(DevToolsSettingsStore.devWidgetPosition.x);
const value3 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(DevToolsSettingsStore.devWidgetPosition.y);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const value4 = ((Component) => <Component x={value2} y={value3} />)(importDefault(14284) /* metro dependency 14284: VEVOO */);
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
return (
<>
{value4}
<DraggableContainer
x={value2}
y={value3}
contentWidth={DEV_WIDGET_SIZE}
contentHeight={DEV_WIDGET_SIZE}
dragBoundsPadding={PX_4}
onChangePosition={onChangePosition}
>
{((Component) => <Component />)(env0_16)}
</DraggableContainer>
</>
);
}
function DraggableContainerP(a0, a1) { // fn#108019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:1996, owner: DraggableContainer.P, offset: 0x023123b5, size: 181 bytes, params: 3, frame: 24
const {width, height} = env0_9.get();
const value3 = env0_8.get();
const object2 = {};
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const clamp = reanimatedRexportModule.clamp;
const left = value3.left;
const dragBoundsPaddingBinding = dragBoundsPadding;
object2.x = Reflect.apply(clamp, reanimatedRexportModule, [a0, left + dragBoundsPaddingBinding,
width - value3.right - contentWidth - dragBoundsPaddingBinding]);
const moduleValue2 = reanimatedRexportModule;
object2.y = moduleValue2.clamp(a1, value3.top + dragBoundsPaddingBinding,
height - value3.bottom - contentHeight - dragBoundsPaddingBinding);
return object2;
}
function DraggableContainerF() { // fn#108022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:2751, owner: DraggableContainer.f, offset: 0x0231250f, size: 85 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, value,
[onChangePosition]);
const object2 = {};
object2.x = x.get();
object2.y = y.get();
value(object2);
}
function DraggableContainerW() { // fn#108023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:2949, owner: DraggableContainer.W, offset: 0x02312564, size: 172 bytes, params: 1, frame: 21
const binding = env0_10;
const value2 = x.get();
let value = y.get();
value = binding(value2, value);
const x2 = value.x;
const y2 = value.y;
value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
const withSpring = value.withSpring;
const springUnclamped = (require(4581) /* metro dependency 4581: springPresets */).springUnclamped;
const items2 = [{translateX: Reflect.apply(withSpring, value, [x2, springUnclamped])}];
const object = {};
object.translateY = (require(4577) /* metro dependency 4577: spring */).withSpring(y2, springUnclamped);
items2[1] = object;
return {transform: items2};
}
function onPress_108025() { // fn#108025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:3533, offset: 0x0231269d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(13121) /* metro dependency 13121: DevToolsNavigator */).navigateToDevTools();
}
function onChangePosition(a0) { // fn#108027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14479:4024, owner: DevWidget.onChangePosition, offset: 0x023127b6, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (require(13126) /* metro dependency 13126: DevToolsActionCreators */).updateDevToolsSettings({devWidgetPosition: a0});
}
global.__d(_fun108017, 14282, [31, 7111, 695, 33, 4501, 697, 4017, 11281, 14283, 5321, 4577, 4581, 5278, 13121,
13969, 14284, 13126,
2]) /* metro module 14282, dependencies: [31, 7111, 695, 33, 4501, 697, 4017, 11281, 14283, 5321, 4577, 4581, 5278, 13121, 13969, 14284, 13126, 2] */;
@@ -1,194 +1,296 @@
/* Metro module 14266; source: modules/devtools/native/components/screens/DevToolsAccountLinkingScreen.tsx; dependencies: [57, 31, 27, 4234, 5109, 1867, 3969, 33, 4501, 697, 566, 6779, 1585, 6777, 6774, 6231, 6238, 4573, 7981, 4578, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseSafeAreaInsetsNative from '../../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import SelectedGuildStore from '../../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import ApplicationStore from '../../../../applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import AuthorizedAppsStore from '../../../../../stores/AuthorizedAppsStore.tsx'; /* Metro dependency 5109 */
import UseStartAuthorize from '../../../../application_account_linking/native/useStartAuthorize.tsx'; /* Metro dependency 6774 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as UseGetOrFetchApplicationsModule from '../../../../applications/useGetOrFetchApplications.tsx'; /* Metro dependency 6777 */
import * as TextInputNativeModule from '../../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
function _fun107931(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:6, offset: 0x0230f172, size: 463 bytes, params: 8, frame: 23
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 */;
let value = ReactNativeModule;
const env0_5 = value.Image;
const env0_6 = value.ScrollView;
const env0_7 = value.View;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const authorizedAppsStore = importDefault(5109) /* metro dependency 5109: AuthorizedAppsStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const object4 = {};
object.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
object3.padding = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.gap = PX_16;
object2.scrollContainer = object4;
object3.gap = PX_16;
object.scrollContainer = object3;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.buttonRow = {gap: PX_8};
const object6 = {'width': 64, 'height': 64};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.rewardImage = object6;
const env0_14 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsAccountLinkingScreen.tsx');
object.buttonRow = {gap: PX_8};
const object5 = {'width': 64, 'height': 64};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.rewardImage = object5;
const env0_14 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsAccountLinkingScreen.tsx');
exports.default = DevToolsAccountLinkingScreen;
}
function DevToolsAccountLinkingScreen() { // fn#107932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:612, offset: 0x0230f341, size: 1876 bytes, params: 1, frame: 43
var r11;
var r5;
var value31;
var object;
var items6;
var reward_name;
var value;
const value2 = undefined;
const styles = useStyles();
const value3 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const [property, property2] = env0_3(env0_4.useState(''), 2);
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], function() {
return SelectedGuildStore.getGuildId();
});
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const value7 = (importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)((guild == null ? value2 : guild.gameApplicationIds) ?? []).filter(function(a0) {
return a0 != null;
});
const value8 = (require(6777) /* metro dependency 6777: useGetOrFetchApplications */).useGetOrFetchApplication(property);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ApplicationStore],
_fun107936);
const value10 = (importDefault(6774) /* metro dependency 6774: useStartAuthorize */)(value8, {debug: true});
const canStartAuthorization = value10.canStartAuthorization;
var env0_4 = value10.startAuthorization;
const hasAlreadyLinked = value10.hasAlreadyLinked;
const debug = value10.debug;
const connectionApp = value10.connectionApp;
const {canDeauthorize, deauthorize} = useDeauthorize(connectionApp == null ? value2 : connectionApp.id);
const length = value9.length;
const value12 = 'N/A';
const r30 = length > 0 ? value9.map(_fun107942).join(', ') : value12;
const items5 = [styles.scrollContainer];
const bottom = value3.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items5[1] = {paddingBottom: bottom + PX_16};
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const items2 = [<TableRowGroup title={'Guild Official Games - ' + ((guild == null ? value2 : guild.name) ?? value12)} hasIcons={false}>{guild != null ? value7.length > 0 ? value7.map(_fun107943) : <TableRow label="No official games" /> : <TableRow label="No guild selected" />}</TableRowGroup>];
const object2 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.padding = PX_12;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const items3 = [<View style={object2}><TextInput label="Application ID" value={property} onChange={property2} /></View>];
var TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
items3[1] = <TableRow label={'Name: ' + (value8 != null ? value8.name : value12)} />;
items3[2] = <TableRow label={'Linked Games: ' + r30} />;
items2[1] = <TableRowGroup title="Application" hasIcons={false}>{items3}</TableRowGroup>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items4 = [<TableRow label="Connection Entrypoint URL" trailing={<Text variant="text-sm/semibold" color={debug.hasConnectionEntrypointUrl ? 'text-feedback-positive' : 'text-feedback-critical'}>{debug.hasConnectionEntrypointUrl ? 'Set' : 'Not set'}</Text>} />];
items4[1] = <TableRow label="Already Linked" trailing={<Text variant="text-sm/semibold" color={hasAlreadyLinked ? 'text-feedback-positive' : 'text-muted'}>{hasAlreadyLinked ? 'Yes' : 'No'}</Text>} />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items4[2] = <View style={styles.buttonRow}><Button disabled={!canStartAuthorization} onPress={function() {
return startAuthorization({});
}} variant="primary" text="Start Authorization" /><Button disabled={!canDeauthorize} onPress={deauthorize} variant="critical-primary" text="Deauthorize" /></View>;
items2[2] = <TableRowGroup title="Authorization" hasIcons={false}>{items4}</TableRowGroup>;
let applicationAccountLinkBenefitConfig = connectionApp == null ? value2 : connectionApp.applicationAccountLinkBenefitConfig;
const value30 = applicationAccountLinkBenefitConfig != null;
if (value30) {
applicationAccountLinkBenefitConfig = connectionApp.applicationAccountLinkBenefitConfig;
value31 = applicationAccountLinkBenefitConfig.reward_image != null;
if (value31) {
object = {};
object.padding = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
r11 = <View style={object}><Image source={{uri: connectionApp.applicationAccountLinkBenefitConfig.reward_image}} style={styles.rewardImage} /></View>;
function DevToolsAccountLinkingScreen() { // fn#107932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:612, offset: 0x0230f341, size: 1876 bytes, params: 1, frame: 43
var r11;
var r5;
var value31;
var object3;
var items6;
var reward_name;
var value;
const value2 = undefined;
const styles = useStyles();
const value3 = (UseSafeAreaInsetsNative)();
const [property, property2] = Module00057(startAuthorization.useState(''), 2);
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], function() {
return SelectedGuildStore.getGuildId();
});
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const value7 = (importDefault(6777) /* metro dependency 6777: useGetOrFetchApplications */)((guild == null ? value2 : guild.gameApplicationIds) ?? []).filter(function(a0) {
return a0 != null;
});
const value8 = (UseGetOrFetchApplicationsModule).useGetOrFetchApplication(property);
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([ApplicationStore],
_fun107936);
const value10 = (UseStartAuthorize)(value8, {debug: true});
const canStartAuthorization = value10.canStartAuthorization;
var startAuthorization = value10.startAuthorization;
const hasAlreadyLinked = value10.hasAlreadyLinked;
const debug = value10.debug;
const connectionApp = value10.connectionApp;
const {canDeauthorize, deauthorize} = useDeauthorize(connectionApp == null ? value2 : connectionApp.id);
const length = value9.length;
const value12 = 'N/A';
const r30 = length > 0 ? value9.map(_fun107942).join(', ') : value12;
const items5 = [styles.scrollContainer];
const bottom = value3.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items5[1] = {paddingBottom: bottom + PX_16};
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const items2 = [
<TableRowGroup
title={'Guild Official Games - ' + ((guild == null ? value2 : guild.name) ?? value12)}
hasIcons={false}
>
{
guild != null
? (
value7.length > 0
? value7.map(_fun107943)
: (
<TableRow label="No official games" />
)
)
: (
<TableRow label="No guild selected" />
)
}
</TableRowGroup>,
];
const object4 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.padding = PX_12;
const TextInput = (TextInputNativeModule).TextInput;
const items3 = [
<View style={object4}>
<TextInput
label="Application ID"
value={property}
onChange={property2}
/>
</View>,
];
var TableRow = (TableRowNativeModule).TableRow;
items3[1] = <TableRow label={'Name: ' + (value8 != null ? value8.name : value12)} />;
items3[2] = <TableRow label={'Linked Games: ' + r30} />;
items2[1] = (
<TableRowGroup title="Application" hasIcons={false}>
{items3}
</TableRowGroup>
);
const Text = (TextModule).Text;
const items4 = [
<TableRow
label="Connection Entrypoint URL"
trailing={<Text
variant="text-sm/semibold"
color={debug.hasConnectionEntrypointUrl ? 'text-feedback-positive' : 'text-feedback-critical'}
>
{debug.hasConnectionEntrypointUrl ? 'Set' : 'Not set'}
</Text>}
/>,
];
items4[1] = (
<TableRow
label="Already Linked"
trailing={<Text variant="text-sm/semibold" color={hasAlreadyLinked ? 'text-feedback-positive' : 'text-muted'}>
{hasAlreadyLinked ? 'Yes' : 'No'}
</Text>}
/>
);
const Button = (ButtonNativeModule).Button;
items4[2] = (
<View style={styles.buttonRow}>
<Button
disabled={!canStartAuthorization}
onPress={function() {
return startAuthorization({});
}}
variant="primary"
text="Start Authorization"
/>
<Button
disabled={!canDeauthorize}
onPress={deauthorize}
variant="critical-primary"
text="Deauthorize"
/>
</View>
);
items2[2] = (
<TableRowGroup title="Authorization" hasIcons={false}>
{items4}
</TableRowGroup>
);
let applicationAccountLinkBenefitConfig = connectionApp == null ? value2 : connectionApp.applicationAccountLinkBenefitConfig;
const value30 = applicationAccountLinkBenefitConfig != null;
if (value30) {
applicationAccountLinkBenefitConfig = connectionApp.applicationAccountLinkBenefitConfig;
value31 = applicationAccountLinkBenefitConfig.reward_image != null;
if (value31) {
object3 = {};
object3.padding = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
r11 = (
<View style={object3}>
<Image
source={{uri: connectionApp.applicationAccountLinkBenefitConfig.reward_image}}
style={styles.rewardImage}
/>
</View>
);
} else {
r11 = value31;
}
items6 = [r11];
applicationAccountLinkBenefitConfig = connectionApp.applicationAccountLinkBenefitConfig;
reward_name = applicationAccountLinkBenefitConfig.reward_name;
value = 'Unnamed Reward';
items6[1] = <TableRow label={'Reward: ' + (reward_name ?? value)} />;
value = (
<TableRowGroup title="Reward Configuration" hasIcons={false}>
{items6}
</TableRowGroup>
);
r5 = value;
} else {
r11 = value31;
r5 = value30;
}
items6 = [r11];
applicationAccountLinkBenefitConfig = connectionApp.applicationAccountLinkBenefitConfig;
reward_name = applicationAccountLinkBenefitConfig.reward_name;
value = 'Unnamed Reward';
items6[1] = <TableRow label={'Reward: ' + (reward_name ?? value)} />;
value = <TableRowGroup title="Reward Configuration" hasIcons={false}>{items6}</TableRowGroup>;
r5 = value;
} else {
r5 = value30;
}
items2[3] = r5;
return (
<ScrollView style={styles.container} contentContainerStyle={items5}>
{items2}
</ScrollView>
);
}
function _fun107936() { // fn#107936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:999, offset: 0x0230fac3, size: 83 bytes, params: 1, frame: 14
var r0;
var linkedGames;
var value;
const value2 = undefined;
if (env0_3 == null) {
r0 = value2;
} else {
linkedGames = env0_3.linkedGames;
if (linkedGames == null) {
r0 = value2;
} else {
value = linkedGames.map(function(a0) {
return ApplicationStore.getApplication(a0.id);
});
value = value.filter(_fun107938);
r0 = value;
items2[3] = r5;
return (
<ScrollView style={styles.container} contentContainerStyle={items5}>
{items2}
</ScrollView>
);
function _fun107936() { // fn#107936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:999, offset: 0x0230fac3, size: 83 bytes, params: 1, frame: 14
var r0;
var linkedGames;
var value;
const value2 = undefined;
if (Module00057 == null) {
r0 = value2;
} else {
linkedGames = Module00057.linkedGames;
if (linkedGames == null) {
r0 = value2;
} else {
value = linkedGames.map(function(a0) {
return ApplicationStore.getApplication(a0.id);
});
value = value.filter(_fun107938);
r0 = value;
}
}
r0 = r0 ?? [];
return r0;
}
function useDeauthorize(a0) { // fn#107939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1258, owner: DevToolsAccountLinkingScreen.useDeauthorize, offset: 0x0230fb32, size: 118 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const newestTokenForApplication = (FluxModule).useStateFromStores([AuthorizedAppsStore],
_fun107940);
const binding = env1_4;
const useCallback = binding.useCallback;
return {canDeauthorize: newestTokenForApplication != null, deauthorize: Reflect.apply(useCallback, binding,
[_fun107941, [newestTokenForApplication]])};
function _fun107940() { // fn#107940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1324, offset: 0x0230fba8, size: 27 bytes, params: 1, frame: 11
return AuthorizedAppsStore.getNewestTokenForApplication(env0_0);
}
function _fun107941() { // fn#107941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1381, offset: 0x0230fbc3, size: 61 bytes, params: 1, frame: 12
var value2;
if (newestTokenForApplication != null) {
value2 = environment.__proto__.__proto__;
(importDefault(6779) /* metro dependency 6779: AuthorizedAppsActionCreators */).delete(newestTokenForApplication.id);
}
}
}
function _fun107942(a0) { // fn#107942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1546, offset: 0x0230fc00, size: 80 bytes, params: 2, frame: 14
return connectionApp?.id === a0.id ? '' + a0.name + '*' : a0.name;
}
function _fun107943(a0) { // fn#107943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1891, offset: 0x0230fc50, size: 190 bytes, params: 2, frame: 24
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = undefined;
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label={'' + a0.name + ' (' + a0.id + ')'}
onPress={onPress_107944}
trailing={env0_0 !== a0.id
? value2
: ((Text) => <Text variant="text-sm/semibold">{'Selected'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
key={a0.id}
/>
);
function onPress_107944() { // fn#107944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1951, offset: 0x01e5a2da, size: 28 bytes, params: 1, frame: 11
return env1_1(env0_0.id);
}
}
}
r0 = r0 ?? [];
return r0;
}
function useDeauthorize(a0) { // fn#107939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1258, owner: DevToolsAccountLinkingScreen.useDeauthorize, offset: 0x0230fb32, size: 118 bytes, params: 2, frame: 15
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const newestTokenForApplication = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthorizedAppsStore],
_fun107940);
const binding = env1_4;
const useCallback = binding.useCallback;
return {canDeauthorize: newestTokenForApplication != null, deauthorize: Reflect.apply(useCallback, binding,
[_fun107941, [newestTokenForApplication]])};
}
function _fun107942(a0) { // fn#107942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1546, offset: 0x0230fc00, size: 80 bytes, params: 2, frame: 14
return connectionApp?.id === a0.id ? '' + a0.name + '*' : a0.name;
}
function _fun107943(a0) { // fn#107943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1891, offset: 0x0230fc50, size: 190 bytes, params: 2, frame: 24
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = undefined;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={'' + a0.name + ' (' + a0.id + ')'}
onPress={onPress_107944}
trailing={env0_0 !== a0.id ? value2 : ((Text) => <Text variant="text-sm/semibold">{'Selected'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
key={a0.id}
/>
);
}
function _fun107940() { // fn#107940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1324, offset: 0x0230fba8, size: 27 bytes, params: 1, frame: 11
return AuthorizedAppsStore.getNewestTokenForApplication(env0_0);
}
function _fun107941() { // fn#107941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1381, offset: 0x0230fbc3, size: 61 bytes, params: 1, frame: 12
var value2;
if (newestTokenForApplication != null) {
value2 = environment.__proto__.__proto__;
(importDefault(6779) /* metro dependency 6779: AuthorizedAppsActionCreators */).delete(newestTokenForApplication.id);
}
function _fun107938(a0) { // fn#107938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14463:1111, offset: 0x00d0b2f0, size: 11 bytes, params: 2, frame: 2
return a0 != null;
}
global.__d(_fun107931, 14266, [57, 31, 27, 4234, 5109, 1867, 3969, 33, 4501, 697, 566, 6779, 1585, 6777, 6774, 6231,
6238, 4573, 7981, 4578,
2]) /* metro module 14266, dependencies: [57, 31, 27, 4234, 5109, 1867, 3969, 33, 4501, 697, 566, 6779, 1585, 6777, 6774, 6231, 6238, 4573, 7981, 4578, 2] */;
@@ -1,12 +1,26 @@
/* Metro module 14263; source: modules/devtools/native/components/screens/DevToolsActionSheetsScreen.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 10195, 10193, 5080, 14264, 1962, 4080, 6275, 6758, 6231, 6238, 8129, 4064, 4572, 6239, 4573, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import SuspiciousDownloadModalActionCreatorsNative from '../../../../suspicious_downloads/SuspiciousDownloadModalActionCreators.native.tsx'; /* Metro dependency 10193 */
import BlockedDomainModalActionCreatorsNative from '../../../../blocked_domains/BlockedDomainModalActionCreators.native.tsx'; /* Metro dependency 10195 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as CardNativeModule from '../../../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as WarningIconModule from '../../../../../design/components/Icon/native/redesign/generated/WarningIcon.tsx'; /* Metro dependency 8129 */
function _fun107883(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:6, offset: 0x0230cf3d, size: 428 bytes, params: 8, frame: 23
var object3;
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 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
@@ -14,129 +28,146 @@ function _fun107883(global, require, importDefault, importAll, module, exports,
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object4.flex = 1;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingHorizontal = PX_12;
object3.wrap = object4;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.contentContainer = {paddingVertical: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object3]);
object = {};
const object2 = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
object2.flex = 1;
const PX_12 = (Native).space.PX_12;
object2.paddingHorizontal = PX_12;
object.wrap = object2;
const PX_16 = (Native).space.PX_16;
object.contentContainer = {paddingVertical: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object]);
const items2 = [{'type': 'blocked-domain', 'label': 'Blocked Domain',
'description': 'Shows a warning for potentially malicious domains', show: show_107888}];
items2[1] = {'type': 'suspicious-download', 'label': 'Suspicious Download',
'description': 'Warns users about potentially dangerous file downloads', show: show_107889};
items2[2] = {'type': 'inappropriate-conversation', 'label': 'Inappropriate Conversation',
'description': 'Shows safety warning for inappropriate conversations', show: show_107890};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsActionSheetsScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsActionSheetsScreen.tsx');
exports.default = DevToolsActionSheetsScreen;
}
function ActionSheetSelector({selectedType, onSelect}) { // fn#107884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1095, offset: 0x0230d0e9, size: 314 bytes, params: 2, frame: 24
var object3;
const env0_2 = env0_4.useCallback(_fun107885, [onSelect]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object3 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object3.header = <BottomSheetTitleHeader title="Select Action Sheet" subtitle={'' + env0_10.length + ' options'} />;
const object2 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.paddingHorizontal = PX_12;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<BottomSheet {...object3}>
<View style={object2}>
<TableRowGroup hasIcons>
{env0_10.map(_fun107886)}
</TableRowGroup>
</View>
</BottomSheet>
);
}
function show_107888() { // fn#107888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:479, offset: 0x0230d35f, size: 44 bytes, params: 1, frame: 11
return (importDefault(10195) /* metro dependency 10195: BlockedDomainModalActionCreatorsNative */).show('https://example-phishing-site.com/malicious-page');
}
function show_107889() { // fn#107889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:679, offset: 0x0230d38b, size: 44 bytes, params: 1, frame: 11
return (importDefault(10193) /* metro dependency 10193: SuspiciousDownloadModalActionCreatorsNative */).show('https://suspicious-file.com/dangerous-file.exe');
}
function show_107890() { // fn#107890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:889, offset: 0x0230d3b7, size: 94 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[8]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[10]);
value = value(dependencyMap[9], dependencyMap.paths);
return Reflect.apply(pushLazy, defaultImport, [value, {'warningId': 'test-warning-123',
'warningType': 'inappropriate_conversation', 'senderId': '123456789', 'channelId': '987654321'},
'INAPPROPRIATE_CONVERSATION_TAKEOVER_MODAL']);
}
function DevToolsActionSheetsScreen() { // fn#107891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1901, offset: 0x0230d415, size: 407 bytes, params: 1, frame: 29
const styles = useStyles();
const [property, env0_1] = env0_3(env0_4.useState('blocked-domain'), 2);
const value4 = env0_10.find(_fun107892);
const value5 = env0_4.useCallback(_fun107893, [property]);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="heading-lg/medium">{'Action Sheets'}</Text>;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.contentContainer}>
<Stack spacing={16}>
<Card>
{text}
<TableRowGroup description="Tap an option to launch the action sheet immediately" hasIcons={false}>
<TableRow
label={value4.label}
subLabel={value4.description}
arrow
onPress={value5}
/>
function ActionSheetSelector({selectedType, onSelect}) { // fn#107884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1095, offset: 0x0230d0e9, size: 314 bytes, params: 2, frame: 24
var object4;
const env0_2 = ReactModule.useCallback(_fun107885, [onSelect]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object4 = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object4.header = <BottomSheetTitleHeader title="Select Action Sheet" subtitle={'' + env0_10.length + ' options'} />;
const object = {};
const PX_12 = (Native).space.PX_12;
object.paddingHorizontal = PX_12;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<BottomSheet {...object4}>
<View style={object}>
<TableRowGroup hasIcons>
{env0_10.map(_fun107886)}
</TableRowGroup>
</Card>
</Stack>
</ScrollView>
);
}
function _fun107885(a0) { // fn#107885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1174, offset: 0x0230d223, size: 74 bytes, params: 2, frame: 13
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('action-sheet-selector');
onSelect(a0.type);
a0.show();
}
function _fun107886(a0, a1) { // fn#107886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1511, offset: 0x0230d26d, size: 242 bytes, params: 3, frame: 22
const env0_0 = a0;
const value2 = undefined;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const WarningIcon = (require(8129) /* metro dependency 8129: WarningIcon */).WarningIcon;
return (
<TableRow
icon={<WarningIcon size="md" />}
label={a0.label}
subLabel={a0.description}
onPress={onPress_107887}
trailing={selectedType !== a0.type ? value2 : ((CheckmarkLargeIcon) => <CheckmarkLargeIcon size="md" color="text-feedback-positive" />)((require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon)}
start={a1 === 0}
end={a1 === env1_10.length - 1}
key={a0.type}
/>
);
}
function _fun107893() { // fn#107893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:2046, offset: 0x0230d5ac, size: 97 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
Reflect.apply(openLazy, defaultImport, [Promise.resolve({default: ActionSheetSelector}), 'action-sheet-selector',
{selectedType: env0_0, onSelect: env0_1}]);
</View>
</BottomSheet>
);
function _fun107885(a0) { // fn#107885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1174, offset: 0x0230d223, size: 74 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet('action-sheet-selector');
onSelect(a0.type);
a0.show();
}
function _fun107886(a0, a1) { // fn#107886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1511, offset: 0x0230d26d, size: 242 bytes, params: 3, frame: 22
const env0_0 = a0;
const value2 = undefined;
const TableRow = (TableRowNativeModule).TableRow;
const WarningIcon = (WarningIconModule).WarningIcon;
return (
<TableRow
icon={<WarningIcon size="md" />}
label={a0.label}
subLabel={a0.description}
onPress={onPress_107887}
trailing={selectedType !== a0.type
? value2
: ((CheckmarkLargeIcon) => <CheckmarkLargeIcon size="md" color="text-feedback-positive" />)((require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon)}
start={a1 === 0}
end={a1 === env1_10.length - 1}
key={a0.type}
/>
);
function onPress_107887() { // fn#107887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1625, offset: 0x016f88b2, size: 23 bytes, params: 1, frame: 11
return env1_2(env0_0);
}
}
}
function show_107888() { // fn#107888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:479, offset: 0x0230d35f, size: 44 bytes, params: 1, frame: 11
return (BlockedDomainModalActionCreatorsNative).show('https://example-phishing-site.com/malicious-page');
}
function show_107889() { // fn#107889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:679, offset: 0x0230d38b, size: 44 bytes, params: 1, frame: 11
return (SuspiciousDownloadModalActionCreatorsNative).show('https://suspicious-file.com/dangerous-file.exe');
}
function show_107890() { // fn#107890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:889, offset: 0x0230d3b7, size: 94 bytes, params: 1, frame: 16
const defaultImport = importDefault(dependencyMap[8]);
const pushLazy = defaultImport.pushLazy;
let value = require(dependencyMap[10]);
value = value(dependencyMap[9], dependencyMap.paths);
return Reflect.apply(pushLazy, defaultImport, [value, {'warningId': 'test-warning-123',
'warningType': 'inappropriate_conversation', 'senderId': '123456789', 'channelId': '987654321'},
'INAPPROPRIATE_CONVERSATION_TAKEOVER_MODAL']);
}
function DevToolsActionSheetsScreen() { // fn#107891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:1901, offset: 0x0230d415, size: 407 bytes, params: 1, frame: 29
const styles = useStyles();
const [property, env0_1] = Module00057(ReactModule.useState('blocked-domain'), 2);
const value4 = env0_10.find(_fun107892);
const value5 = ReactModule.useCallback(_fun107893, [property]);
const Stack = (StackNativeModule).Stack;
const Card = (CardNativeModule).Card;
const Text = (TextModule).Text;
const text = (
<Text variant="heading-lg/medium">
{'Action Sheets'}
</Text>
);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.contentContainer}>
<Stack spacing={16}>
<Card>
{text}
<TableRowGroup description="Tap an option to launch the action sheet immediately" hasIcons={false}>
<TableRow
label={value4.label}
subLabel={value4.description}
arrow
onPress={value5}
/>
</TableRowGroup>
</Card>
</Stack>
</ScrollView>
);
function _fun107892({type}) { // fn#107892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:2013, offset: 0x0108b18c, size: 21 bytes, params: 2, frame: 2
return type === env0_0;
}
function _fun107893() { // fn#107893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14460:2046, offset: 0x0230d5ac, size: 97 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = ActionSheetActionCreators;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
Reflect.apply(openLazy, defaultImport, [Promise.resolve({default: ActionSheetSelector}), 'action-sheet-selector',
{selectedType: env0_0, onSelect: env0_1}]);
}
}
}
global.__d(_fun107883, 14263, [57, 31, 27, 33, 4501, 697, 10195, 10193, 5080, 14264, 1962, 4080, 6275, 6758, 6231,
6238, 8129, 4064, 4572, 6239, 4573,
2]) /* metro module 14263, dependencies: [57, 31, 27, 33, 4501, 697, 10195, 10193, 5080, 14264, 1962, 4080, 6275, 6758, 6231, 6238, 8129, 4064, 4572, 6239, 4573, 2] */;
@@ -1,342 +1,358 @@
/* Metro module 14251; source: modules/devtools/native/components/screens/DevToolsAgeVerificationScreen.tsx; dependencies: [5, 31, 27, 5262, 33, 4501, 697, 14252, 3857, 5263, 5074, 1585, 6231, 6238, 8988, 6243, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AgeVerificationConstantsModule from '../../../../age_assurance/AgeVerificationConstants.tsx'; /* Metro dependency 5262 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableRowArrowNativeModule from '../../../../../design/components/TableRow/native/TableRowArrow.native.tsx'; /* Metro dependency 6243 */
import * as KeyIconModule from '../../../../../design/components/Icon/native/redesign/generated/KeyIcon.tsx'; /* Metro dependency 8988 */
function _fun107813(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:6, offset: 0x02309bb3, size: 312 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(5) /* metro dependency 5 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).ScrollView;
const env0_5 = (require(5262) /* metro dependency 5262: AgeVerificationConstants */).VerificationMethod;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (Native).space.PX_16;
object.content = {padding: PX_16};
const env0_8 = Reflect.apply(createStyles, value, [object]);
const env0_9 = _fun107814();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsAgeVerificationScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsAgeVerificationScreen.tsx');
exports.default = DevToolsAgeVerificationScreen;
}
function _fun107814() { // fn#107814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:324, offset: 0x02309ceb, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun107816);
return _fun107818;
function* _fun107816() { // fn#107816, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:344, offset: 0x02309d1a, size: 222 bytes, params: 1, frame: 17
var environment;
var binding;
var binding2;
var property;
var value3;
var testAgeVerification;
var MODULAR;
var value4;
var value5;
var value6;
var binding3;
var value7;
var showAgeVerification;
var object;
var verification_webview_url;
var onComplete_1078172;
var value8;
var AgeVerificationModalEntryPoint;
var DEV_TOOLS_QUICK_ACTIONS;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
property = binding2[7];
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
testAgeVerification = value3.testAgeVerification;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
MODULAR = binding.MODULAR;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value4 = Reflect.apply(testAgeVerification, value3, [MODULAR]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
if (value6) {
return value5;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
property = binding3[9];
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value7 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
showAgeVerification = value7.showAgeVerification;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
verification_webview_url = value5.verification_webview_url;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object.webviewUrl = verification_webview_url;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
onComplete_1078172 = onComplete_107817;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object.onComplete = onComplete_1078172;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
property = binding3[10];
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value8 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
AgeVerificationModalEntryPoint = value8.AgeVerificationModalEntryPoint;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
DEV_TOOLS_QUICK_ACTIONS = AgeVerificationModalEntryPoint.DEV_TOOLS_QUICK_ACTIONS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object.entryPoint = DEV_TOOLS_QUICK_ACTIONS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
Reflect.apply(showAgeVerification, value7, [object]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
}
}
function onComplete_107817() { // fn#107817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:489, offset: 0x02309df8, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[8]).open({'content': '[On Complete] Successfully age verified',
'key': 'age-verification-test-success'});
}
function _fun107814() { // fn#107814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:324, offset: 0x02309ceb, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun107816);
return _fun107818;
}
}
function DevToolsAgeVerificationScreen() { // fn#107819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:967, offset: 0x02309e2c, size: 384 bytes, params: 1, frame: 25
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const items2 = [styles.content];
items2[1] = {paddingBottom: styles.content.padding + value2.bottom};
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
let object = {label: 'Launch Age Verification Test Tool', onPress: env0_9};
const KeyIcon = (require(8988) /* metro dependency 8988: KeyIcon */).KeyIcon;
object.icon = <KeyIcon />;
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object.trailing = <TableRowArrow />;
const tableRow = <TableRow {...object} />;
return (
<ScrollView style={styles.container} contentContainerStyle={items2}>
<TableRowGroup title="Quick Actions" hasIcons>
{tableRow}
<TableRow
label="Launch Age Verification Modal"
onPress={function() {
var defaultImport = importDefault(dependencyMap[9]);
var object = {};
object.entryPoint = require(dependencyMap[10]).AgeVerificationModalEntryPoint.DEV_TOOLS_QUICK_ACTIONS;
return defaultImport.showAgeVerificationGetStartedModal(object);
}}
icon={<KeyIcon />}
trailing={<TableRowArrow />}
/>
</TableRowGroup>
</ScrollView>
);
}
function _fun107818() { // fn#107818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:799, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function* _fun107816() { // fn#107816, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:344, offset: 0x02309d1a, size: 222 bytes, params: 1, frame: 17
var environment;
var binding;
var binding2;
var property;
var value3;
var testAgeVerification;
var MODULAR;
var value4;
var value5;
var value6;
var binding3;
var value7;
var showAgeVerification;
var object2;
var verification_webview_url;
var closure;
var value8;
var AgeVerificationModalEntryPoint;
var DEV_TOOLS_QUICK_ACTIONS;
var error;
if (true) {
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
property = binding2[7];
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
testAgeVerification = value3.testAgeVerification;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding = env2_5;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
MODULAR = binding.MODULAR;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value4 = Reflect.apply(testAgeVerification, value3, [MODULAR]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
if (value6) {
return value5;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
property = binding3[9];
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value7 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
showAgeVerification = value7.showAgeVerification;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
verification_webview_url = value5.verification_webview_url;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object2.webviewUrl = verification_webview_url;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
closure = onComplete;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object2.onComplete = closure;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
property = binding3[10];
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
value8 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
AgeVerificationModalEntryPoint = value8.AgeVerificationModalEntryPoint;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
DEV_TOOLS_QUICK_ACTIONS = AgeVerificationModalEntryPoint.DEV_TOOLS_QUICK_ACTIONS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
object2.entryPoint = DEV_TOOLS_QUICK_ACTIONS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
return undefined;
}
try {
Reflect.apply(showAgeVerification, value7, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[8]);
value.open({'content': 'Failed to show age verification test modal',
'key': 'age-verification-test-failure'});
}
}
function DevToolsAgeVerificationScreen() { // fn#107819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:967, offset: 0x02309e2c, size: 384 bytes, params: 1, frame: 25
const styles = useStyles();
const value2 = (UseSafeAreaInsetsNative)();
const items2 = [styles.content];
items2[1] = {paddingBottom: styles.content.padding + value2.bottom};
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {label: 'Launch Age Verification Test Tool', onPress: env0_9};
const KeyIcon = (KeyIconModule).KeyIcon;
object2.icon = <KeyIcon />;
const TableRowArrow = (TableRowArrowNativeModule).TableRowArrow;
object2.trailing = <TableRowArrow />;
const tableRow = <TableRow {...object2} />;
return (
<ScrollView style={styles.container} contentContainerStyle={items2}>
<TableRowGroup title="Quick Actions" hasIcons>
{tableRow}
<TableRow
label="Launch Age Verification Modal"
onPress={function() {
var defaultImport = importDefault(dependencyMap[9]);
var object = {};
object.entryPoint = require(dependencyMap[10]).AgeVerificationModalEntryPoint.DEV_TOOLS_QUICK_ACTIONS;
return defaultImport.showAgeVerificationGetStartedModal(object);
}}
icon={<KeyIcon />}
trailing={<TableRowArrow />}
/>
</TableRowGroup>
</ScrollView>
);
}
}
function onComplete() { // fn#107817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14448:489, offset: 0x02309df8, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[8]).open({'content': '[On Complete] Successfully age verified',
'key': 'age-verification-test-success'});
}
global.__d(_fun107813, 14251, [5, 31, 27, 5262, 33, 4501, 697, 14252, 3857, 5263, 5074, 1585, 6231, 6238, 8988,
6243,
2]) /* metro module 14251, dependencies: [5, 31, 27, 5262, 33, 4501, 697, 14252, 3857, 5263, 5074, 1585, 6231, 6238, 8988, 6243, 2] */;
@@ -1,225 +1,338 @@
/* Metro module 13125; source: modules/devtools/native/components/screens/DevToolsAnalyticsScreen.tsx; dependencies: [57, 31, 27, 1878, 12953, 661, 33, 4501, 697, 4573, 6238, 11046, 3738, 9210, 5278, 6797, 4060, 566, 7705, 8416, 4572, 6231, 6808, 11689, 4071, 13126, 6984, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UseScaledRowHeight from '../../../../main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
import AnalyticsLogStore from '../../../AnalyticsLogStore.tsx'; /* Metro dependency 12953 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TrashIconModule from '../../../../../design/components/Icon/native/redesign/generated/TrashIcon.tsx'; /* Metro dependency 4071 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableSwitchRowNativeModule from '../../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as SearchFieldNativeModule from '../../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as FlashListModule from '../../../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as AnalyticsIconModule from '../../../../../design/components/Icon/native/redesign/generated/AnalyticsIcon.tsx'; /* Metro dependency 11046 */
import * as ArrowsUpDownIconModule from '../../../../../design/components/Icon/native/redesign/generated/ArrowsUpDownIcon.tsx'; /* Metro dependency 11689 */
import * as DevToolsActionCreatorsModule from '../../../DevToolsActionCreators.tsx'; /* Metro dependency 13126 */
function _fun100327(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:6, offset: 0x021e4877, size: 580 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;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const analyticsLogStore = importDefault(12953) /* metro dependency 12953: AnalyticsLogStore */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.analyticsContainer = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
object.analyticsContainer = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentContainer = {padding: PX_16};
object.contentContainer = {padding: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.searchFieldContainer = {paddingHorizontal: PX_16};
object.searchFieldContainer = {paddingHorizontal: PX_16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.detailsContainer = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object.detailsContainer = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.commonPropertiesContainer = {backgroundColor: BACKGROUND_BASE_LOWEST, paddingHorizontal: 10};
object2.commonProperty = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
object.commonPropertiesContainer = {backgroundColor: BACKGROUND_BASE_LOWEST, paddingHorizontal: 10};
object.commonProperty = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'marginVertical': 8, 'height': 20};
object2.customPropertiesContainer = {'paddingHorizontal': 10, 'paddingVertical': 4};
object2.customProperty = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap',
object.customPropertiesContainer = {'paddingHorizontal': 10, 'paddingVertical': 4};
object.customProperty = {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap',
'justifyContent': 'flex-start', 'marginVertical': 4};
let CODE_BOLD = Fonts.CODE_BOLD;
object2.customPropertyName = {'fontWeight': '600', 'fontFamily': null, 'marginRight': 4, fontFamily: CODE_BOLD};
object.customPropertyName = {'fontWeight': '600', 'fontFamily': null, 'marginRight': 4, fontFamily: CODE_BOLD};
CODE_BOLD = Fonts.CODE_BOLD;
object2.monospace = {fontFamily: CODE_BOLD};
object2.copyContainer = {'flexDirection': 'row', 'alignItems': 'center'};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsAnalyticsScreen.tsx');
object.monospace = {fontFamily: CODE_BOLD};
object.copyContainer = {'flexDirection': 'row', 'alignItems': 'center'};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsAnalyticsScreen.tsx');
exports.default = DevToolsAnalyticsScreen;
}
function CommonProperty({name, children}) { // fn#100328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:1052, offset: 0x021e4abb, size: 123 bytes, params: 2, frame: 19
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.commonProperty}>
<Text variant="text-sm/semibold" color="text-default">
{name}
</Text>
{children}
</View>
);
}
function LoggedEvent({event, properties, timestamp, fingerprint, start, end}) { // fn#100329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:1234, offset: 0x021e4b36, size: 960 bytes, params: 2, frame: 42
var r5;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
var items5;
var value;
const styles = useStyles();
const [property, env0_2] = env0_3(env0_4.useState(false), 2);
const user = UserStore.getUser(fingerprint);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const AnalyticsIcon = (require(11046) /* metro dependency 11046: AnalyticsIcon */).AnalyticsIcon;
const tableRow = <TableRow arrow={!property} icon={<AnalyticsIcon />} label={event} subLabel={'name' in properties ? properties.name : properties.location?.toString() ?? 'N/A'} onPress={onPress_100330} start={start} end={end} />;
if (property) {
var viewBinding2Props = {style: styles.detailsContainer};
var viewBinding3Props = {style: styles.commonPropertiesContainer};
items2 = [<CommonProperty name="Timestamp (local)"><Text variant="text-sm/semibold" color="mobile-text-heading-primary">{(importDefault(3738) /* metro dependency 3738 */)(timestamp).calendar()}</Text></CommonProperty>];
items2[1] = user != null && <CommonProperty name="User ">{((Component) => <Component user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */)}</CommonProperty>;
items2[2] = <CommonProperty name="Fingerprint">{fingerprint != null ? ((PressableOpacity) => <PressableOpacity style={styles.copyContainer} onPress={onPress_100332}><Text variant="text-sm/medium" color="mobile-text-heading-primary" style={[styles.monospace,
{marginRight: 4}]}>{fingerprint}</Text>{((CopyIcon) => <CopyIcon size="sm" />)((require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity) : <Text variant="text-sm/medium" color="text-muted" style={styles.monospace}>{'null'}</Text>}</CommonProperty>;
items5 = [<View {...viewBinding3Props}>{items2}</View>];
var viewBinding4Props = {style: styles.customPropertiesContainer};
value = global.Object.entries(properties);
items5[1] = <View {...viewBinding4Props}>{value.map(_fun100333)}</View>;
value = <View {...viewBinding2Props}>{items5}</View>;
r5 = value;
} else {
r5 = property;
function CommonProperty({name, children}) { // fn#100328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:1052, offset: 0x021e4abb, size: 123 bytes, params: 2, frame: 19
const styles = useStyles();
const Text = (TextModule).Text;
return (
<View style={styles.commonProperty}>
<Text variant="text-sm/semibold" color="text-default">
{name}
</Text>
{children}
</View>
);
}
return (
<View collapsable={false}>
{tableRow}
{r5}
</View>
);
}
function DevToolsAnalyticsScreen() { // fn#100334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:2944, offset: 0x021e5081, size: 935 bytes, params: 1, frame: 46
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const styles = useStyles();
const loggedEventsVersion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AnalyticsLogStore],
function() {
return AnalyticsLogStore.loggedEventsVersion;
});
const loggedEvents = AnalyticsLogStore.loggedEvents;
const [property, property2] = env0_3(env0_4.useState(false), 2);
const [property3, property4] = env0_3(env0_4.useState(''), 2);
const r0 = property3.toLowerCase().trim() === '' ? loggedEvents : loggedEvents.filter(_fun100336);
items = [];
arraySpread(items, r0, 0, undefined);
const r9 = property ? items.reverse() : items;
const value10 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const ArrowsUpDownIcon = (require(11689) /* metro dependency 11689: ArrowsUpDownIcon */).ArrowsUpDownIcon;
const tableSwitchRow = <TableSwitchRow icon={<ArrowsUpDownIcon />} label="Reverse Events" value={property} onValueChange={property2} />;
const TrashIcon = (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon;
const items2 = [<TableRowGroup title="Actions" hasIcons>{tableSwitchRow}<TableRow arrow variant="danger" icon={<TrashIcon color="text-feedback-critical" />} label="Clear Analytics Log" onPress={(require(13126) /* metro dependency 13126: DevToolsActionCreators */).clearAnalyticsLog} /></TableRowGroup>];
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
items2[1] = <View style={styles.searchFieldContainer}><SearchField placeholder="Search by event name" onChange={property4} /></View>;
items2[2] = <TableRowGroup title="Analytics Events" hasIcons={false}>{loggedEvents.length === 0 ? <TableRow label="No events logged." /> : r0.length !== 0 ? null : <TableRow label={'No events match "' + property3 + '"'} />}</TableRowGroup>;
return (
<View style={styles.analyticsContainer}>
<FlashList
ListHeaderComponent={<Stack spacing={16}>{items2}</Stack>}
contentContainerStyle={styles.contentContainer}
extraData={loggedEventsVersion}
data={r9}
estimatedItemSize={value10}
renderItem={renderItem_100337}
function LoggedEvent({event, properties, timestamp, fingerprint, start, end}) { // fn#100329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:1234, offset: 0x021e4b36, size: 960 bytes, params: 2, frame: 42
var r5;
const Text = (TextModule).Text;
var items2;
var items5;
var value;
const styles = useStyles();
const [property, env0_2] = Module00057(ReactModule.useState(false), 2);
const user = UserStore.getUser(fingerprint);
const TableRow = (TableRowNativeModule).TableRow;
const AnalyticsIcon = (AnalyticsIconModule).AnalyticsIcon;
const tableRow = (
<TableRow
arrow={!property}
icon={<AnalyticsIcon />}
label={event}
subLabel={'name' in properties ? properties.name : properties.location?.toString() ?? 'N/A'}
onPress={onPress_100330}
start={start}
end={end}
/>
</View>
);
}
function LoggedEventOnPress() { // fn#100330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:1591, owner: LoggedEvent.onPress, offset: 0x021e4ef6, size: 25 bytes, params: 1, frame: 11
return env0_2(function(a0) {
return !a0;
});
}
function LoggedEventOnPress_100332() { // fn#100332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:2066, owner: LoggedEvent.onPress, offset: 0x021e4f0f, size: 57 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (fingerprint != null) {
value2 = environment.__proto__;
moduleValue = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
moduleValue.copy(fingerprint);
}
}
function _fun100333(a0) { // fn#100333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:2442, offset: 0x021e4f48, size: 313 bytes, params: 2, frame: 26
var r0;
var r1;
var r12;
var r6;
var item3;
var value3;
var object;
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;
r12 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r12 = value;
);
if (property) {
var viewBinding2Props = {style: styles.detailsContainer};
var viewBinding3Props = {style: styles.commonPropertiesContainer};
items2 = [
<CommonProperty name="Timestamp (local)">
<Text variant="text-sm/semibold" color="mobile-text-heading-primary">
{(importDefault(3738) /* metro dependency 3738 */)(timestamp).calendar()}
</Text>
</CommonProperty>,
];
items2[1] = user != null && <CommonProperty name="User ">{((Component) => <Component user={user} />)(importDefault(9210) /* metro dependency 9210: DiscordTag */)}</CommonProperty>;
items2[2] = (
<CommonProperty name="Fingerprint">
{
fingerprint != null
? ((PressableOpacity) => <PressableOpacity style={styles.copyContainer} onPress={onPress_100332}><Text variant="text-sm/medium" color="mobile-text-heading-primary" style={[styles.monospace,
{marginRight: 4}]}>{fingerprint}</Text>{((CopyIcon) => <CopyIcon size="sm" />)((require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)
: (
<Text
variant="text-sm/medium"
color="text-muted"
style={styles.monospace}
>
{'null'}
</Text>
)
}
</CommonProperty>
);
items5 = [
<View {...viewBinding3Props}>
{items2}
</View>,
];
var viewBinding4Props = {style: styles.customPropertiesContainer};
value = global.Object.entries(properties);
items5[1] = (
<View {...viewBinding4Props}>
{value.map(_fun100333)}
</View>
);
value = (
<View {...viewBinding2Props}>
{items5}
</View>
);
r5 = value;
} else {
r0 = item3;
r1 = value3;
r12 = item;
r5 = property;
}
return (
<View collapsable={false}>
{tableRow}
{r5}
</View>
);
function LoggedEventOnPress() { // fn#100330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:1591, owner: LoggedEvent.onPress, offset: 0x021e4ef6, size: 25 bytes, params: 1, frame: 11
return env0_2(function(a0) {
return !a0;
});
}
function LoggedEventOnPress_100332() { // fn#100332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:2066, owner: LoggedEvent.onPress, offset: 0x021e4f0f, size: 57 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (fingerprint != null) {
value2 = environment.__proto__;
moduleValue = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
moduleValue.copy(fingerprint);
}
}
function _fun100333(a0) { // fn#100333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:2442, offset: 0x021e4f48, size: 313 bytes, params: 2, frame: 26
var r0;
var r1;
var r12;
var r6;
var item3;
var value3;
var object2;
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;
r12 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r12 = value;
} else {
r0 = item3;
r1 = value3;
r12 = item;
}
}
if (!r1) {
r0.return();
}
const stylesBinding = styles;
const customProperty = stylesBinding.customProperty;
const Text = (TextModule).Text;
const text = (
<Text
variant="text-sm/semibold"
color="text-brand"
style={stylesBinding.customPropertyName}
>
{r3}
{':'}
</Text>
);
if (r12 != null) {
object2 = {'variant': 'text-sm/semibold', 'color': 'mobile-text-heading-primary'};
object2.style = styles.monospace;
object2.children = global.JSON.stringify(r12);
r6 = object2;
} else {
r6 = {'variant': 'text-sm/semibold', 'color': 'text-muted', 'style': null, 'children': 'null',
style: styles.monospace};
}
return (
<View style={customProperty} key={r3}>
{text}
<Text {...r6} />
</View>
);
}
}
if (!r1) {
r0.return();
function DevToolsAnalyticsScreen() { // fn#100334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:2944, offset: 0x021e5081, size: 935 bytes, params: 1, frame: 46
const TableRow = (TableRowNativeModule).TableRow;
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
const analyticsLogStoreBinding = AnalyticsLogStore;
const loggedEventsVersion = Reflect.apply(useStateFromStores, FluxModule, [[analyticsLogStoreBinding], function() {
return AnalyticsLogStore.loggedEventsVersion;
}]);
const loggedEvents = analyticsLogStoreBinding.loggedEvents;
const [property, property2] = Module00057(ReactModule.useState(false), 2);
const [property3, property4] = Module00057(ReactModule.useState(''), 2);
const r0 = property3.toLowerCase().trim() === '' ? loggedEvents : loggedEvents.filter(_fun100336);
items3 = [];
arraySpread(items3, r0, 0, undefined);
const r9 = property ? items3.reverse() : items3;
const value10 = (UseScaledRowHeight)();
const FlashList = (FlashListModule).FlashList;
const Stack = (StackNativeModule).Stack;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const ArrowsUpDownIcon = (ArrowsUpDownIconModule).ArrowsUpDownIcon;
const tableSwitchRow = (
<TableSwitchRow
icon={<ArrowsUpDownIcon />}
label="Reverse Events"
value={property}
onValueChange={property2}
/>
);
const TrashIcon = (TrashIconModule).TrashIcon;
const items2 = [
<TableRowGroup title="Actions" hasIcons>
{tableSwitchRow}
<TableRow
arrow
variant="danger"
icon={<TrashIcon color="text-feedback-critical" />}
label="Clear Analytics Log"
onPress={(DevToolsActionCreatorsModule).clearAnalyticsLog}
/>
</TableRowGroup>,
];
const SearchField = (SearchFieldNativeModule).SearchField;
items2[1] = (
<View style={styles.searchFieldContainer}>
<SearchField placeholder="Search by event name" onChange={property4} />
</View>
);
items2[2] = (
<TableRowGroup title="Analytics Events" hasIcons={false}>
{
loggedEvents.length === 0
? (
<TableRow label="No events logged." />
)
: (
r0.length !== 0
? null
: (
<TableRow label={'No events match "' + property3 + '"'} />
)
)
}
</TableRowGroup>
);
return (
<View style={styles.analyticsContainer}>
<FlashList
ListHeaderComponent={<Stack spacing={16}>
{items2}
</Stack>}
contentContainerStyle={styles.contentContainer}
extraData={loggedEventsVersion}
data={r9}
estimatedItemSize={value10}
renderItem={renderItem_100337}
/>
</View>
);
function _fun100336({event}) { // fn#100336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:3195, offset: 0x021e5439, size: 38 bytes, params: 2, frame: 11
return event.toLowerCase().includes(env0_0);
}
function DevToolsAnalyticsScreenRenderItem({item, index}) { // fn#100337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:4175, owner: DevToolsAnalyticsScreen.renderItem, offset: 0x021e545f, size: 117 bytes, params: 2, frame: 16
return (
<LoggedEvent
start={index === 0}
end={index === env0_1.length - 1}
event={item.event}
properties={item.properties}
timestamp={item.timestamp}
fingerprint={item.fingerprint}
/>
);
}
}
const stylesBinding = styles;
const customProperty = stylesBinding.customProperty;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-sm/semibold" color="text-brand" style={stylesBinding.customPropertyName}>{r3}{':'}</Text>;
if (r12 != null) {
object = {'variant': 'text-sm/semibold', 'color': 'mobile-text-heading-primary'};
object.style = styles.monospace;
object.children = global.JSON.stringify(r12);
r6 = object;
} else {
r6 = {'variant': 'text-sm/semibold', 'color': 'text-muted', 'style': null, 'children': 'null',
style: styles.monospace};
}
return (
<View style={customProperty} key={r3}>
{text}
<Text {...r6} />
</View>
);
}
function _fun100336({event}) { // fn#100336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:3195, offset: 0x021e5439, size: 38 bytes, params: 2, frame: 11
return event.toLowerCase().includes(env0_0);
}
function DevToolsAnalyticsScreenRenderItem({item, index}) { // fn#100337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13315:4175, owner: DevToolsAnalyticsScreen.renderItem, offset: 0x021e545f, size: 117 bytes, params: 2, frame: 16
return (
<LoggedEvent
start={index === 0}
end={index === env0_1.length - 1}
event={item.event}
properties={item.properties}
timestamp={item.timestamp}
fingerprint={item.fingerprint}
/>
);
}
global.__d(_fun100327, 13125, [57, 31, 27, 1878, 12953, 661, 33, 4501, 697, 4573, 6238, 11046, 3738, 9210, 5278,
6797, 4060, 566, 7705, 8416, 4572, 6231, 6808, 11689, 4071, 13126, 6984,
2]) /* metro module 13125, dependencies: [57, 31, 27, 1878, 12953, 661, 33, 4501, 697, 4573, 6238, 11046, 3738, 9210, 5278, 6797, 4060, 566, 7705, 8416, 4572, 6231, 6808, 11689, 4071, 13126, 6984, 2] */;
@@ -1,161 +1,232 @@
/* Metro module 13129; source: modules/devtools/native/components/screens/DevToolsBuildOverrideScreen.tsx; dependencies: [57, 31, 27, 10557, 33, 4501, 697, 10078, 13130, 5463, 566, 10558, 4572, 6231, 6238, 4060, 6797, 3856, 13127, 4071, 7988, 7987, 7981, 4578, 1360, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import BuildOverrideStore from '../../../../build_overrides/BuildOverrideStore.tsx'; /* Metro dependency 10557 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ToastUtilsModule from '../../../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TextInputNativeModule from '../../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
import * as TableRadioRowNativeModule from '../../../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as TagIconModule from '../../../../../design/components/Icon/native/redesign/generated/TagIcon.tsx'; /* Metro dependency 10078 */
import * as HashmarkIconModule from '../../../../../design/components/Icon/native/redesign/generated/HashmarkIcon.tsx'; /* Metro dependency 13130 */
function _fun100346(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:6, offset: 0x021e56fc, size: 414 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).ScrollView;
const buildOverrideStore = importDefault(10557) /* metro dependency 10557: BuildOverrideStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.content = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentContainer = {padding: PX_16};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {'label': 'Branch Name', 'value': 'branch'};
const TagIcon = (require(10078) /* metro dependency 10078: TagIcon */).TagIcon;
object2.icon = <TagIcon />;
const items2 = [object2];
object2 = {'label': 'Commit SHA', 'value': 'id'};
const HashmarkIcon = (require(13130) /* metro dependency 13130: HashmarkIcon */).HashmarkIcon;
object2.icon = <HashmarkIcon />;
items2[1] = object2;
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.content = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const PX_16 = (Native).space.PX_16;
object.contentContainer = {padding: PX_16};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {'label': 'Branch Name', 'value': 'branch'};
const TagIcon = (TagIconModule).TagIcon;
object.icon = <TagIcon />;
const items2 = [object];
object = {'label': 'Commit SHA', 'value': 'id'};
const HashmarkIcon = (HashmarkIconModule).HashmarkIcon;
object.icon = <HashmarkIcon />;
items2[1] = object;
value = value.memo(_fun100347);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsBuildOverrideScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsBuildOverrideScreen.tsx');
exports.default = value;
}
function _fun100347() { // fn#100347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:457, offset: 0x021e589a, size: 1081 bytes, params: 1, frame: 38
var r8;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var items3;
const value2 = undefined;
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BuildOverrideStore], function() {
var r0;
var property = BuildOverrideStore.getCurrentBuildOverride().overrides;
if (property == null) {
r0 = undefined;
function _fun100347() { // fn#100347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:457, offset: 0x021e589a, size: 1081 bytes, params: 1, frame: 38
var r8;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
var items3;
const value2 = undefined;
const styles = useStyles();
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([BuildOverrideStore], function() {
var r0;
var property = BuildOverrideStore.getCurrentBuildOverride().overrides;
if (property == null) {
r0 = undefined;
} else {
property = property[require(dependencyMap[11]).DEVICE_FIELD];
r0 = property;
}
return r0;
});
let binding = env0_4;
const value4 = '';
let [property, env0_2] = Module00057(binding.useState({'type': 'branch', 'id': ''}), 2);
const getLabel_1003492 = getLabel_100349;
const object2 = {};
copyDataProperties(object2, styles.contentContainer, undefined);
object2['paddingBottom'] = styles.contentContainer.padding + insets.bottom;
const Stack = (StackNativeModule).Stack;
const value7 = null;
if (value7 != value3) {
items3 = [
<TableRow
icon={((CopyIcon) => <CopyIcon />)((require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon)}
label={getLabel_1003492(value3)}
subLabel={value3.id}
onPress={onPress_100351}
/>,
];
items3[1] = (
<TableRow
icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)}
label="Refresh Override"
onPress={(require(10558) /* metro dependency 10558: BuildOverrideUtils */).refreshBuildOverride}
arrow
/>
);
items3[2] = (
<TableRow
icon={((TrashIcon) => <TrashIcon color="text-feedback-critical" />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)}
label="Clear Override"
variant="danger"
onPress={(require(10558) /* metro dependency 10558: BuildOverrideUtils */).clearBuildOverride}
arrow
/>
);
r8 = (
<TableRowGroup title="Current Override" hasIcons>
{items3}
</TableRowGroup>
);
} else {
property = property[require(dependencyMap[11]).DEVICE_FIELD];
r0 = property;
r8 = value7;
}
return r0;
});
let binding = env0_4;
const value4 = '';
let [property, env0_2] = env0_3(binding.useState({'type': 'branch', 'id': ''}), 2);
const closure = getLabel_100349;
const object = {};
copyDataProperties(object, styles.contentContainer, undefined);
object['paddingBottom'] = styles.contentContainer.padding + insets.bottom;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const value7 = null;
if (value7 != value3) {
items3 = [<TableRow icon={((CopyIcon) => <CopyIcon />)((require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon)} label={closure(value3)} subLabel={value3.id} onPress={onPress_100351} />];
items3[1] = <TableRow icon={((RefreshIcon) => <RefreshIcon />)((require(13127) /* metro dependency 13127: RefreshIcon */).RefreshIcon)} label="Refresh Override" onPress={(require(10558) /* metro dependency 10558: BuildOverrideUtils */).refreshBuildOverride} arrow />;
items3[2] = <TableRow icon={((TrashIcon) => <TrashIcon color="text-feedback-critical" />)((require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon)} label="Clear Override" variant="danger" onPress={(require(10558) /* metro dependency 10558: BuildOverrideUtils */).clearBuildOverride} arrow />;
r8 = <TableRowGroup title="Current Override" hasIcons>{items3}</TableRowGroup>;
} else {
r8 = value7;
const items2 = [r8];
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const r18 = value7 != value3 ? 'New' : value4;
const type = property.type;
binding = env0_10;
items2[1] = (
<TableRadioGroup
title={r18 + ' Override Type'}
defaultValue={type}
onChange={onChange_100352}
hasIcons
>
{binding.map(_fun100353)}
</TableRadioGroup>
);
const object4 = {title: getLabel_1003492(property), hasIcons: true};
const value11 = binding.find(_fun100354);
const icon = value7 == value11 ? value2 : value11.icon;
const TextInput = (TextInputNativeModule).TextInput;
items2[2] = (
<TableRowGroup {...object4}>
<TableRow
icon={icon}
label={<TextInput
size="md"
placeholder={'Enter ' + getLabel_1003492(property)}
onChange={onChange_100355}
autoCapitalize="none"
autoCorrect={false}
autoComplete="off"
isClearable
/>}
/>
</TableRowGroup>
);
const Button = (ButtonNativeModule).Button;
items2[3] = (
<Button
text="Apply Build Override"
disabled={value4 === property.id}
onPress={onPress_100356}
/>
);
return (
<ScrollView style={styles.content} contentContainerStyle={object2}>
<Stack spacing={16}>
{items2}
</Stack>
</ScrollView>
);
function getLabel_100349(a0) { // fn#100349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:729, offset: 0x021e5d17, size: 52 bytes, params: 2, frame: 11
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return env1_10.find(_fun100350)?.label;
function _fun100350({value}) { // fn#100350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:763, offset: 0x021e5d4b, size: 26 bytes, params: 2, frame: 2
return value === env0_0.type;
}
}
function onPress_100351() { // fn#100351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1149, offset: 0x021e5d65, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(env0_0.id);
(ToastUtilsModule).presentCopiedToClipboard();
}
function onChange_100352(a0) { // fn#100352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1615, offset: 0x021e5dad, size: 33 bytes, params: 2, frame: 11
env0_2({type: a0, id: ''});
}
function _fun100353({icon, value, label}) { // fn#100353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1666, offset: 0x021e5dce, size: 76 bytes, params: 2, frame: 18
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
value={value}
label={label}
icon={icon}
key={value}
/>
);
}
function _fun100354({value}) { // fn#100354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1859, offset: 0x021e5e1a, size: 26 bytes, params: 2, frame: 2
return value === env0_1.type;
}
function onChange_100355(a0) { // fn#100355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1982, offset: 0x021e5e34, size: 41 bytes, params: 2, frame: 13
const binding = env0_2;
const object = {};
copyDataProperties(object, env0_1, undefined);
object['id'] = a0;
binding(object);
}
function onPress_100356() { // fn#100356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:2153, offset: 0x021e5e5d, size: 171 bytes, params: 1, frame: 12
var value2;
var moduleValue;
var value3;
var moduleValue2;
var value4;
var moduleValue3;
const type = env0_1.type;
if (type === 'branch') {
value4 = environment.__proto__;
moduleValue3 = require(10558) /* metro dependency 10558: BuildOverrideUtils */;
moduleValue3.setBuildOverrideForBranch(env0_1.id);
} else if (type === 'id') {
value3 = environment.__proto__;
moduleValue2 = require(10558) /* metro dependency 10558: BuildOverrideUtils */;
moduleValue2.setBuildOverrideForId(env0_1.id);
} else {
value2 = environment.__proto__;
moduleValue = require(1360) /* metro dependency 1360: GlobalUtils */;
moduleValue.assertNever(env0_1.type);
}
}
}
const items2 = [r8];
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const r18 = value7 != value3 ? 'New' : value4;
const type = property.type;
binding = env0_10;
items2[1] = <TableRadioGroup title={r18 + ' Override Type'} defaultValue={type} onChange={onChange_100352} hasIcons>{binding.map(_fun100353)}</TableRadioGroup>;
const object3 = {title: closure(property), hasIcons: true};
const value11 = binding.find(_fun100354);
const icon = value7 == value11 ? value2 : value11.icon;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
items2[2] = <TableRowGroup {...object3}><TableRow icon={icon} label={<TextInput size="md" placeholder={'Enter ' + closure(property)} onChange={onChange_100355} autoCapitalize="none" autoCorrect={false} autoComplete="off" isClearable />} /></TableRowGroup>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[3] = <Button text="Apply Build Override" disabled={value4 === property.id} onPress={onPress_100356} />;
return (
<ScrollView style={styles.content} contentContainerStyle={object}>
<Stack spacing={16}>
{items2}
</Stack>
</ScrollView>
);
}
function getLabel_100349(a0) { // fn#100349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:729, offset: 0x021e5d17, size: 52 bytes, params: 2, frame: 11
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return env1_10.find(_fun100350)?.label;
}
function onPress_100351() { // fn#100351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1149, offset: 0x021e5d65, size: 72 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(env0_0.id);
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
}
function onChange_100352(a0) { // fn#100352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1615, offset: 0x021e5dad, size: 33 bytes, params: 2, frame: 11
env0_2({type: a0, id: ''});
}
function _fun100353({icon, value, label}) { // fn#100353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1666, offset: 0x021e5dce, size: 76 bytes, params: 2, frame: 18
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={value}
label={label}
icon={icon}
key={value}
/>
);
}
function _fun100354({value}) { // fn#100354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1859, offset: 0x021e5e1a, size: 26 bytes, params: 2, frame: 2
return value === env0_1.type;
}
function onChange_100355(a0) { // fn#100355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:1982, offset: 0x021e5e34, size: 41 bytes, params: 2, frame: 13
const binding = env0_2;
const object2 = {};
copyDataProperties(object2, env0_1, undefined);
object2['id'] = a0;
binding(object2);
}
function onPress_100356() { // fn#100356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:2153, offset: 0x021e5e5d, size: 171 bytes, params: 1, frame: 12
var value2;
var moduleValue;
var value3;
var moduleValue2;
var value4;
var moduleValue3;
const type = env0_1.type;
if (type === 'branch') {
value4 = environment.__proto__;
moduleValue3 = require(10558) /* metro dependency 10558: BuildOverrideUtils */;
moduleValue3.setBuildOverrideForBranch(env0_1.id);
} else if (type === 'id') {
value3 = environment.__proto__;
moduleValue2 = require(10558) /* metro dependency 10558: BuildOverrideUtils */;
moduleValue2.setBuildOverrideForId(env0_1.id);
} else {
value2 = environment.__proto__;
moduleValue = require(1360) /* metro dependency 1360: GlobalUtils */;
moduleValue.assertNever(env0_1.type);
}
}
function _fun100350({value}) { // fn#100350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13319:763, offset: 0x021e5d4b, size: 26 bytes, params: 2, frame: 2
return value === env0_0.type;
}
global.__d(_fun100346, 13129, [57, 31, 27, 10557, 33, 4501, 697, 10078, 13130, 5463, 566, 10558, 4572, 6231, 6238,
4060, 6797, 3856, 13127, 4071, 7988, 7987, 7981, 4578, 1360,
2]) /* metro module 13129, dependencies: [57, 31, 27, 10557, 33, 4501, 697, 10078, 13130, 5463, 566, 10558, 4572, 6231, 6238, 4060, 6797, 3856, 13127, 4071, 7988, 7987, 7981, 4578, 1360, 2] */;
@@ -1,32 +1,41 @@
/* Metro module 14253; source: modules/devtools/native/components/screens/DevToolsComponentsTestingScreen.tsx; dependencies: [57, 31, 27, 1934, 33, 4501, 697, 4627, 1909, 8357, 6239, 4573, 14254, 14257, 4578, 4572, 14258, 694, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Dispatcher from '../../../../../Dispatcher.tsx'; /* Metro dependency 694 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import SelectedChannelStore from '../../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import TextDisplayComponent from '../../../../interaction_components/native/display/TextDisplayComponent.tsx'; /* Metro dependency 14258 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ServerModule from '../../../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as InteractionComponentUtilsModule from '../../../../interaction_components/InteractionComponentUtils.tsx'; /* Metro dependency 4627 */
import * as CardNativeModule from '../../../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
import * as ComponentStateContextModule from '../../../../interaction_components/ComponentStateContext.tsx'; /* Metro dependency 8357 */
function _fun107826(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:6, offset: 0x0230a131, size: 595 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).ScrollView;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.wrap = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const object4 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object4.paddingBottom = PX_32;
object2.contentContainer = object4;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
const interactionComponentUtilsModule = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
const transformComponents = interactionComponentUtilsModule.transformComponents;
const {STRING_SELECT, TEXT_DISPLAY} = (require(1909) /* metro dependency 1909: Server */).ComponentType;
value = value(Reflect.apply(transformComponents, interactionComponentUtilsModule, [[{'type': null,
let value = Module00057;
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.wrap = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const object3 = {};
const PX_16 = (Native).space.PX_16;
object3.padding = PX_16;
const PX_32 = (Native).space.PX_32;
object3.paddingBottom = PX_32;
object.contentContainer = object3;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const transformComponents = InteractionComponentUtilsModule.transformComponents;
const {STRING_SELECT, TEXT_DISPLAY} = (ServerModule).ComponentType;
value = value(Reflect.apply(transformComponents, InteractionComponentUtilsModule, [[{'type': null,
'custom_id': 'test', 'max_values': 1, 'min_values': 1, 'placeholder': 'Choose...', type: STRING_SELECT,
options: [{'label': 'test with a long label', 'value': 'test'}, {'label': 'test 2 with a long label',
'value': 'test2', 'description': 'with description!'}, {'label': 'star with a long label', 'value': 'star',
@@ -36,88 +45,122 @@ function _fun107826(global, require, importDefault, importAll, module, exports,
2);
const env0_11 = value[0];
const env0_12 = value[1];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsComponentsTestingScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsComponentsTestingScreen.tsx');
exports.default = DevToolsComponentsTestingScreen;
function Select({type, title}) { // fn#107827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:1117, offset: 0x0230a384, size: 691 bytes, params: 2, frame: 29
const Text = (TextModule).Text;
const [property, env0_0] = env0_3(ReactModule.useState(false), 2);
const object = {};
copyDataProperties(object, env0_11, undefined);
object['maxValues'] = property ? 4 : 1;
object['type'] = type;
const String = global.String;
object['id'] = String(type);
const useComponentState = ComponentStateContextModule.useComponentState;
const state = Reflect.apply(useComponentState, ComponentStateContextModule, [object]).state;
const Card = (CardNativeModule).Card;
const text = (
<Text variant="heading-lg/medium">
{title}
</Text>
);
type = object.type;
const ComponentType = (ServerModule).ComponentType;
const STRING_SELECT = ComponentType.STRING_SELECT;
const r7 = (
type === STRING_SELECT
? ((Component) => <Component {...object} />)(importDefault(14254) /* metro dependency 14254: StringSelectActionComponent */)
: ((Component) => <Component {...object} {...{['type']: object.type}} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */)
);
const r6 = (
state?.type === object.type
? (
<Text variant="text-md/normal">
{'Selected values: '}
{('values' in state ? state.values : state.selectedOptions.map(function(a0) {
return a0.label;
})).join(', ')}
</Text>
)
: (
<Text variant="text-md/normal">
{'Nothing selected'}
</Text>
)
);
const Button = (ButtonNativeModule).Button;
return (
<Card style={{gap: 8}}>
{text}
{r7}
{r6}
<Button
text={'Toggle Multi Select (' + (property ? 'on' : 'off') + ')'}
onPress={onPress_107829}
size="sm"
/>
</Card>
);
function SelectOnPress() { // fn#107829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:1801, owner: Select.onPress, offset: 0x0230a637, size: 25 bytes, params: 1, frame: 11
return env0_0(function(a0) {
return !a0;
});
}
}
function DevToolsComponentsTestingScreen() { // fn#107831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:1954, offset: 0x0230a650, size: 598 bytes, params: 1, frame: 29
const styles = useStyles();
const Stack = (StackNativeModule).Stack;
const Text = (TextModule).Text;
const items3 = [
<Text variant="text-md/normal">
{'Test screen for embedding native components in RN'}
</Text>,
];
const ComponentStateContextProvider = (ComponentStateContextModule).ComponentStateContextProvider;
const object2 = {customId: 'modal'};
object2.channelId = SelectedChannelStore.getChannelId();
object2.components = env0_10;
const items2 = [
((Component) => <Component {...env0_12} />)(TextDisplayComponent),
];
const ComponentType = (ServerModule).ComponentType;
const STRING_SELECT = ComponentType.STRING_SELECT;
items2[1] = <Select title="String Select" type={STRING_SELECT} />;
const USER_SELECT = ComponentType.USER_SELECT;
items2[2] = <Select title="User Select" type={USER_SELECT} />;
const ROLE_SELECT = ComponentType.ROLE_SELECT;
items2[3] = <Select title="Role Select" type={ROLE_SELECT} />;
const MENTIONABLE_SELECT = ComponentType.MENTIONABLE_SELECT;
items2[4] = <Select title="Mentionable Select" type={MENTIONABLE_SELECT} />;
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
items2[5] = <Select title="Channel Select" type={CHANNEL_SELECT} />;
items3[1] = (
<ComponentStateContextProvider modal={object2}>
{items2}
</ComponentStateContextProvider>
);
const Button = (ButtonNativeModule).Button;
items3[2] = <Button onPress={onPress_107832} text="Reset Modal State" />;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.contentContainer}>
<Stack spacing={16}>
{items3}
</Stack>
</ScrollView>
);
function DevToolsComponentsTestingScreenOnPress() { // fn#107832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:2764, owner: DevToolsComponentsTestingScreen.onPress, offset: 0x0230a8a6, size: 51 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (Dispatcher).dispatch({'type': 'CLEAR_INTERACTION_MODAL_STATE',
'customId': 'modal'});
}
}
}
function Select({type, title}) { // fn#107827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:1117, offset: 0x0230a384, size: 691 bytes, params: 2, frame: 29
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const [property, env0_0] = env0_3(env0_4.useState(false), 2);
const object2 = {};
copyDataProperties(object2, env0_11, undefined);
object2['maxValues'] = property ? 4 : 1;
object2['type'] = type;
const String = global.String;
object2['id'] = String(type);
const componentStateContextModule = require(8357) /* metro dependency 8357: ComponentStateContext */;
const useComponentState = componentStateContextModule.useComponentState;
const state = Reflect.apply(useComponentState, componentStateContextModule, [object2]).state;
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const text = <Text variant="heading-lg/medium">{title}</Text>;
type = object2.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const STRING_SELECT = ComponentType.STRING_SELECT;
const r7 = type === STRING_SELECT ? ((Component) => <Component {...object2} />)(importDefault(14254) /* metro dependency 14254: StringSelectActionComponent */) : ((Component) => <Component {...object2} {...{['type']: object2.type}} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */);
const r6 = state?.type === object2.type ? <Text variant="text-md/normal">{'Selected values: '}{('values' in state ? state.values : state.selectedOptions.map(function(a0) {
return a0.label;
})).join(', ')}</Text> : <Text variant="text-md/normal">{'Nothing selected'}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<Card style={{gap: 8}}>
{text}
{r7}
{r6}
<Button
text={'Toggle Multi Select (' + (property ? 'on' : 'off') + ')'}
onPress={onPress_107829}
size="sm"
/>
</Card>
);
}
function DevToolsComponentsTestingScreen() { // fn#107831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:1954, offset: 0x0230a650, size: 598 bytes, params: 1, frame: 29
const styles = useStyles();
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const items3 = [<Text variant="text-md/normal">{'Test screen for embedding native components in RN'}</Text>];
const ComponentStateContextProvider = (require(8357) /* metro dependency 8357: ComponentStateContext */).ComponentStateContextProvider;
const object = {customId: 'modal'};
object.channelId = SelectedChannelStore.getChannelId();
object.components = env0_10;
const items2 = [((Component) => <Component {...env0_12} />)(importDefault(14258) /* metro dependency 14258: TextDisplayComponent */)];
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const STRING_SELECT = ComponentType.STRING_SELECT;
items2[1] = <Select title="String Select" type={STRING_SELECT} />;
const USER_SELECT = ComponentType.USER_SELECT;
items2[2] = <Select title="User Select" type={USER_SELECT} />;
const ROLE_SELECT = ComponentType.ROLE_SELECT;
items2[3] = <Select title="Role Select" type={ROLE_SELECT} />;
const MENTIONABLE_SELECT = ComponentType.MENTIONABLE_SELECT;
items2[4] = <Select title="Mentionable Select" type={MENTIONABLE_SELECT} />;
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
items2[5] = <Select title="Channel Select" type={CHANNEL_SELECT} />;
items3[1] = <ComponentStateContextProvider modal={object}>{items2}</ComponentStateContextProvider>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items3[2] = <Button onPress={onPress_107832} text="Reset Modal State" />;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.contentContainer}>
<Stack spacing={16}>
{items3}
</Stack>
</ScrollView>
);
}
function SelectOnPress() { // fn#107829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:1801, owner: Select.onPress, offset: 0x0230a637, size: 25 bytes, params: 1, frame: 11
return env0_0(function(a0) {
return !a0;
});
}
function DevToolsComponentsTestingScreenOnPress() { // fn#107832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14450:2764, owner: DevToolsComponentsTestingScreen.onPress, offset: 0x0230a8a6, size: 51 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({'type': 'CLEAR_INTERACTION_MODAL_STATE',
'customId': 'modal'});
}
global.__d(_fun107826, 14253, [57, 31, 27, 1934, 33, 4501, 697, 4627, 1909, 8357, 6239, 4573, 14254, 14257, 4578,
4572, 14258, 694,
2]) /* metro module 14253, dependencies: [57, 31, 27, 1934, 33, 4501, 697, 4627, 1909, 8357, 6239, 4573, 14254, 14257, 4578, 4572, 14258, 694, 2] */;
@@ -1,312 +1,340 @@
/* Metro module 13166; source: modules/devtools/native/components/screens/DevToolsDataStorageScreen.tsx; dependencies: [57, 31, 27, 567, 1226, 33, 4501, 697, 6238, 1910, 3857, 566, 1926, 1485, 5463, 7705, 7706, 7699, 6984, 4080, 4573, 8671, 6805, 6758, 6807, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Flux from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AuthenticationStore from '../../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import DatabaseDaos from '../../../../app_database/DatabaseDaos.tsx'; /* Metro dependency 1910 */
import DatabaseManager from '../../../../app_database/system/DatabaseManager.tsx'; /* Metro dependency 1926 */
import ToastActionCreators from '../../../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import UseFastestListTableRowPlaceholderConfigNative from '../../../../fastest_list/placeholders/useFastestListTableRowPlaceholderConfig.native.tsx'; /* Metro dependency 7699 */
import UseScaledRowHeight from '../../../../main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
import UseScaledSectionHeight from '../../../../main_tabs_v2/native/shared_components/user_list/useScaledSectionHeight.tsx'; /* Metro dependency 7706 */
import FastestListAndroid from '../../../../fastest_list/FastestList.android.tsx'; /* Metro dependency 8671 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as PersistedStoreModule from '../../../../../external/discord_common/js/packages/flux/PersistedStore.tsx'; /* Metro dependency 567 */
import * as Module01485Module from '../../../../../by-id/module-01485.js'; /* Metro dependency 1485 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ActionSheetNativeModule from '../../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as ActionSheetRowNativeModule from '../../../../../design/components/Sheet/native/ActionSheetRow.native.tsx'; /* Metro dependency 6807 */
function _fun100465(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:6, offset: 0x021e8e49, size: 494 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(567) /* metro dependency 567: PersistedStore */).PersistedStore;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.paddingHorizontal = PX_12;
object4.flex = 1;
object3.container = object4;
object2.paddingHorizontal = PX_12;
object2.flex = 1;
object.container = object2;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.sectionHeader = {'backgroundColor': null, 'verticalAlign': 'middle', 'flexDirection': 'row',
object.sectionHeader = {'backgroundColor': null, 'verticalAlign': 'middle', 'flexDirection': 'row',
'alignItems': 'center', 'flex': 1, backgroundColor: BACKGROUND_BASE_LOW};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
const env0_10 = value.memo(_fun100468);
const env0_11 = value.memo(_fun100470);
const env0_12 = value.memo(_fun100472);
const env0_13 = value.memo(_fun100474);
object3 = {DATABASE_CONTROLS: 0};
object3[0] = 'DATABASE_CONTROLS';
object3.DATABASE_CURRENT = 1;
object3[1] = 'DATABASE_CURRENT';
object3.PERSISTED_STORES = 2;
object3[2] = 'PERSISTED_STORES';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsDataStorageScreen.tsx');
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_10 = ReactModule.memo(_fun100468);
const env0_11 = ReactModule.memo(_fun100470);
const env0_12 = ReactModule.memo(_fun100472);
const env0_13 = ReactModule.memo(_fun100474);
object = {DATABASE_CONTROLS: 0};
object[0] = 'DATABASE_CONTROLS';
object.DATABASE_CURRENT = 1;
object[1] = 'DATABASE_CURRENT';
object.PERSISTED_STORES = 2;
object[2] = 'PERSISTED_STORES';
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsDataStorageScreen.tsx');
exports.default = DevToolsDataStorageScreen;
}
function DevToolsPersistedStoresActionSheet({store, close}) { // fn#100466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1531, offset: 0x021e9037, size: 219 bytes, params: 2, frame: 22
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object.header = <BottomSheetTitleHeader title={store.getName()} />;
const ActionSheetRow = (ActionSheetRowNativeModule).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
<ActionSheet {...object}>
<Group hasIcons={false}>
<ActionSheetRow
variant="danger"
label="Clear persisted store"
subLabel="App restart required to re-init the cleared store"
onPress={function() {
store.clear();
importDefault(dependencyMap[10]).open({'key': 'DevToolsPersistedStoresActionSheet',
'content': 'Store cleared from persisted storage'});
close();
}}
/>
</Group>
</ActionSheet>
);
}
function DevToolsPersistedStoresActionSheet({store, close}) { // fn#100466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1531, offset: 0x021e9037, size: 219 bytes, params: 2, frame: 22
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object2.header = <BottomSheetTitleHeader title={store.getName()} />;
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
const Group = ActionSheetRow.Group;
return (
<ActionSheet {...object2}>
<Group hasIcons={false}>
<ActionSheetRow
variant="danger"
label="Clear persisted store"
subLabel="App restart required to re-init the cleared store"
onPress={function() {
store.clear();
importDefault(dependencyMap[10]).open({'key': 'DevToolsPersistedStoresActionSheet',
'content': 'Store cleared from persisted storage'});
close();
}}
/>
</Group>
</ActionSheet>
);
}
function _fun100468() { // fn#100468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:461, offset: 0x021e915f, size: 70 bytes, params: 1, frame: 14
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label="Disable Database"
start
onPress={onPress_100469}
/>
);
}
function _fun100470() { // fn#100470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:722, offset: 0x021e920e, size: 191 bytes, params: 1, frame: 17
const value2 = undefined;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const items = [importDefault(1926) /* metro dependency 1926: DatabaseManager */];
items[1] = AuthenticationStore;
const value3 = Reflect.apply(useStateFromStores, fluxModule, [items, function() {
return importDefault(dependencyMap[12]).database(AuthenticationStore.getId());
}]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={value3 == null ? 'No active database.' : value3.name}
start
end
subLabel={value3 != null ? 'Handle: ' + value3.handle : value2}
/>
);
}
function _fun100472() { // fn#100472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:963, offset: 0x021e9301, size: 68 bytes, params: 1, frame: 14
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return <TableRow label="Disable + Remove Database" onPress={onPress_100473} />;
}
function _fun100474() { // fn#100474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1224, offset: 0x021e9396, size: 96 bytes, params: 1, frame: 16
const env0_0 = (require(1485) /* metro dependency 1485 */).useNavigation();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label="View Cache Stats"
end
onPress={onPress_100475}
/>
);
}
function DevToolsDataStorageScreen() { // fn#100476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2141, offset: 0x021e9412, size: 391 bytes, params: 1, frame: 26
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value2 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const value3 = (importDefault(7706) /* metro dependency 7706: useScaledSectionHeight */)();
const value4 = (importDefault(7699) /* metro dependency 7699: useFastestListTableRowPlaceholderConfigNative */)();
const binding = env0_4;
const value5 = binding.useCallback(_fun100477, []);
const value7 = env0_3(binding.useState(_fun100480), 2);
const {sections, persistedStores} = value7[0];
var env0_3 = value7[1];
const value8 = binding.useCallback(_fun100481, [persistedStores, value5]);
const value9 = binding.useCallback(_fun100485, [styles]);
const FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
const bottom = insets.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
return (
<View style={styles.container}>
<FastestListAndroid
sections={sections}
renderItem={value8}
renderSectionHeader={value9}
insetEnd={bottom + PX_16}
itemSize={value2}
sectionHeaderSize={value3}
estimatedListSize="windowSize"
placeholderConfig={value4}
wrapChildren
function _fun100468() { // fn#100468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:461, offset: 0x021e915f, size: 70 bytes, params: 1, frame: 14
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label="Disable Database"
start
onPress={onPress_100469}
/>
</View>
);
}
function onPress_100469() { // fn#100469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:541, offset: 0x021e91a5, size: 105 bytes, params: 1, frame: 13
const value = environment.__proto__;
const value2 = (importDefault(1910) /* metro dependency 1910: DatabaseDaos */).database();
if (value2 != null) {
value2.disable('via UserSettingsDatabaseControls');
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'disable_database',
'content': 'Database has been disabled.'});
}
}
function onPress_100473() { // fn#100473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1043, offset: 0x021e9345, size: 81 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(1926) /* metro dependency 1926: DatabaseManager */).replaceDisableAllDatabases('via UserSettingsDatabaseControls');
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'disable_database_and_remove',
'content': 'Database has been removed.'});
}
function onPress_100475() { // fn#100475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1333, offset: 0x021e93f6, size: 28 bytes, params: 1, frame: 11
env0_0.navigate('cacheStats');
}
function _fun100477(a0) { // fn#100477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2290, offset: 0x021e9599, size: 140 bytes, params: 2, frame: 14
const env0_0 = a0;
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const value3 = PersistedStore.getAll().filter(_fun100478);
const object2 = {};
const {DATABASE_CONTROLS, DATABASE_CURRENT, PERSISTED_STORES} = env1_14;
object2.sections = [DATABASE_CONTROLS, DATABASE_CURRENT, PERSISTED_STORES].map(_fun100479);
object2.persistedStores = value3;
return object2;
}
function _fun100481(a0, a1) { // fn#100481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2773, offset: 0x021e96e3, size: 462 bytes, params: 3, frame: 20
var environment;
var persistedStoresBinding;
var length;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object2;
const env0_0 = a1;
const value = environment.__proto__;
const DATABASE_CONTROLS = env1_14.DATABASE_CONTROLS;
if (DATABASE_CONTROLS === a0) {
if (a1 === 0) {
return ((Component) => <Component />)(env1_10);
}
if (a1 === 1) {
return ((Component) => <Component />)(env1_12);
}
if (a1 === 2) {
return ((Component) => <Component />)(env1_13);
}
} else {
var DATABASE_CURRENT = env1_14.DATABASE_CURRENT;
if (DATABASE_CURRENT === a0) {
return a1 !== 0 ? null : ((Component) => <Component />)(env1_11);
}
var PERSISTED_STORES = env1_14.PERSISTED_STORES;
if (PERSISTED_STORES === a0) {
if (a1 === 0) {
return (
<TableRow
label={((SearchField) => <SearchField size="md" onChange={onChange_100482} />)((require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField)}
start
/>
);
);
function onPress_100469() { // fn#100469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:541, offset: 0x021e91a5, size: 105 bytes, params: 1, frame: 13
const value = environment.__proto__;
const value2 = (DatabaseDaos).database();
if (value2 != null) {
value2.disable('via UserSettingsDatabaseControls');
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'disable_database',
'content': 'Database has been disabled.'});
}
if (a1 !== 1) {
persistedStoresBinding = persistedStores;
return (
<TableRow
label={persistedStoresBinding[a1 - 1].getName()}
end={a1 === persistedStoresBinding.length}
onPress={onPress_100483}
/>
);
}
length = persistedStores.length;
if (length === 0) {
return <TableRow label="No results found." end />;
}
object2 = {};
persistedStoresBinding = persistedStores;
object2.label = persistedStoresBinding[a1 - 1].getName();
length = persistedStoresBinding.length;
object2.end = a1 === length;
object2.onPress = onPress_100483;
return <TableRow {...object2} />;
}
}
return null;
}
function _fun100485(a0) { // fn#100485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3524, offset: 0x021e9971, size: 144 bytes, params: 2, frame: 18
const value = environment.__proto__;
const value2 = undefined;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const DATABASE_CONTROLS = env1_14.DATABASE_CONTROLS;
return (
<Text
style={styles.sectionHeader}
variant="text-sm/semibold"
color="text-default"
>
{DATABASE_CONTROLS === a0 ? 'Database Controls' : env1_14.DATABASE_CURRENT === a0 ? 'Database (Current)' : env1_14.PERSISTED_STORES !== a0 ? value2 : 'Persisted Stores'}
</Text>
);
}
function _fun100478(a0) { // fn#100478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2341, offset: 0x021e9625, size: 66 bytes, params: 2, frame: 13
var r0;
var includes;
var binding;
let value = environment.__proto__.__proto__;
value = a0 instanceof PersistedStore;
if (value) {
value = a0.getName();
value = value.toLocaleLowerCase();
includes = value.includes;
binding = env0_0;
value = Reflect.apply(includes, value, [binding.toLocaleLowerCase()]);
r0 = value;
} else {
r0 = value;
function _fun100470() { // fn#100470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:722, offset: 0x021e920e, size: 191 bytes, params: 1, frame: 17
const value2 = undefined;
const useStateFromStores = FluxModule.useStateFromStores;
const items2 = [DatabaseManager];
items2[1] = AuthenticationStore;
const value3 = Reflect.apply(useStateFromStores, FluxModule, [items2, function() {
return importDefault(dependencyMap[12]).database(AuthenticationStore.getId());
}]);
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label={value3 == null ? 'No active database.' : value3.name}
start
end
subLabel={value3 != null ? 'Handle: ' + value3.handle : value2}
/>
);
}
return r0;
}
function _fun100479(a0) { // fn#100479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2507, offset: 0x021e9667, size: 104 bytes, params: 2, frame: 4
var length;
var value2;
const DATABASE_CONTROLS = env2_14.DATABASE_CONTROLS;
if (DATABASE_CONTROLS === a0) {
return 3;
function _fun100472() { // fn#100472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:963, offset: 0x021e9301, size: 68 bytes, params: 1, frame: 14
const TableRow = (TableRowNativeModule).TableRow;
return <TableRow label="Disable + Remove Database" onPress={onPress_100473} />;
function onPress_100473() { // fn#100473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1043, offset: 0x021e9345, size: 81 bytes, params: 1, frame: 14
const value = environment.__proto__;
(DatabaseManager).replaceDisableAllDatabases('via UserSettingsDatabaseControls');
(ToastActionCreators).open({'key': 'disable_database_and_remove',
'content': 'Database has been removed.'});
}
}
const DATABASE_CURRENT = env2_14.DATABASE_CURRENT;
if (DATABASE_CURRENT === a0) {
return 1;
function _fun100474() { // fn#100474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1224, offset: 0x021e9396, size: 96 bytes, params: 1, frame: 16
const env0_0 = (Module01485Module).useNavigation();
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label="View Cache Stats"
end
onPress={onPress_100475}
/>
);
function onPress_100475() { // fn#100475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:1333, offset: 0x021e93f6, size: 28 bytes, params: 1, frame: 11
env0_0.navigate('cacheStats');
}
}
const PERSISTED_STORES = env2_14.PERSISTED_STORES;
if (PERSISTED_STORES === a0) {
length = env0_1.length;
value2 = 1;
return value2 + (length > 0 ? env0_1.length : value2);
function DevToolsDataStorageScreen() { // fn#100476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2141, offset: 0x021e9412, size: 391 bytes, params: 1, frame: 26
const styles = useStyles();
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const value2 = (UseScaledRowHeight)();
const value3 = (UseScaledSectionHeight)();
const value4 = (UseFastestListTableRowPlaceholderConfigNative)();
const binding = env0_4;
const value5 = binding.useCallback(_fun100477, []);
const value7 = env0_3(binding.useState(_fun100480), 2);
const {sections, persistedStores} = value7[0];
var env0_3 = value7[1];
const value8 = binding.useCallback(_fun100481, [persistedStores, value5]);
const value9 = binding.useCallback(_fun100485, [styles]);
const bottom = insets.bottom;
const PX_16 = (Native).space.PX_16;
return (
<View style={styles.container}>
<FastestListAndroid
sections={sections}
renderItem={value8}
renderSectionHeader={value9}
insetEnd={bottom + PX_16}
itemSize={value2}
sectionHeaderSize={value3}
estimatedListSize="windowSize"
placeholderConfig={value4}
wrapChildren
/>
</View>
);
function _fun100477(a0) { // fn#100477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2290, offset: 0x021e9599, size: 140 bytes, params: 2, frame: 14
const env0_0 = a0;
const PersistedStore = (Flux).PersistedStore;
const value3 = PersistedStore.getAll().filter(_fun100478);
const object = {};
const {DATABASE_CONTROLS, DATABASE_CURRENT, PERSISTED_STORES} = env1_14;
object.sections = [DATABASE_CONTROLS, DATABASE_CURRENT, PERSISTED_STORES].map(_fun100479);
object.persistedStores = value3;
return object;
function _fun100478(a0) { // fn#100478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2341, offset: 0x021e9625, size: 66 bytes, params: 2, frame: 13
var r0;
var includes;
var binding;
let value = environment.__proto__.__proto__;
value = a0 instanceof PersistedStore;
if (value) {
value = a0.getName();
value = value.toLocaleLowerCase();
includes = value.includes;
binding = env0_0;
value = Reflect.apply(includes, value, [binding.toLocaleLowerCase()]);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun100479(a0) { // fn#100479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2507, offset: 0x021e9667, size: 104 bytes, params: 2, frame: 4
var length;
var value2;
const DATABASE_CONTROLS = env2_14.DATABASE_CONTROLS;
if (DATABASE_CONTROLS === a0) {
return 3;
}
const DATABASE_CURRENT = env2_14.DATABASE_CURRENT;
if (DATABASE_CURRENT === a0) {
return 1;
}
const PERSISTED_STORES = env2_14.PERSISTED_STORES;
if (PERSISTED_STORES === a0) {
length = env0_1.length;
value2 = 1;
return value2 + (length > 0 ? env0_1.length : value2);
}
}
}
function _fun100480() { // fn#100480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2688, offset: 0x021e96cf, size: 20 bytes, params: 1, frame: 11
return env0_1('');
}
function _fun100481(a0, a1) { // fn#100481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:2773, offset: 0x021e96e3, size: 462 bytes, params: 3, frame: 20
var environment;
var persistedStoresBinding;
var length;
const TableRow = (TableRowNativeModule).TableRow;
var object;
const env0_0 = a1;
const value = environment.__proto__;
const DATABASE_CONTROLS = env1_14.DATABASE_CONTROLS;
if (DATABASE_CONTROLS === a0) {
if (a1 === 0) {
return ((Component) => <Component />)(env1_10);
}
if (a1 === 1) {
return ((Component) => <Component />)(env1_12);
}
if (a1 === 2) {
return ((Component) => <Component />)(env1_13);
}
} else {
var DATABASE_CURRENT = env1_14.DATABASE_CURRENT;
if (DATABASE_CURRENT === a0) {
return (
a1 !== 0
? null
: ((Component) => <Component />)(env1_11)
);
}
var PERSISTED_STORES = env1_14.PERSISTED_STORES;
if (PERSISTED_STORES === a0) {
if (a1 === 0) {
return (
<TableRow
label={((SearchField) => <SearchField size="md" onChange={onChange_100482} />)((require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField)}
start
/>
);
}
if (a1 !== 1) {
persistedStoresBinding = persistedStores;
return (
<TableRow
label={persistedStoresBinding[a1 - 1].getName()}
end={a1 === persistedStoresBinding.length}
onPress={onPress_100483}
/>
);
}
length = persistedStores.length;
if (length === 0) {
return <TableRow label="No results found." end />;
}
object = {};
persistedStoresBinding = persistedStores;
object.label = persistedStoresBinding[a1 - 1].getName();
length = persistedStoresBinding.length;
object.end = a1 === length;
object.onPress = onPress_100483;
return <TableRow {...object} />;
}
}
return null;
function onChange_100482(a0) { // fn#100482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3079, offset: 0x021e98b1, size: 28 bytes, params: 2, frame: 12
return env1_3(env1_1(a0));
}
function onPress_100483() { // fn#100483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3263, offset: 0x021e98cd, size: 120 bytes, params: 1, frame: 18
var environment;
const value = environment.__proto__.__proto__;
const defaultImport = ActionSheetActionCreators;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
Reflect.apply(openLazy, defaultImport, [Promise.resolve({default: DevToolsPersistedStoresActionSheet}),
'DevToolsPersistedStoresActionSheet', {store: persistedStores[require - 1], close: close_100484}]);
function onPress_100483Close() { // fn#100484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3405, owner: onPress_100483.close, offset: 0x021e9945, size: 44 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (ActionSheetActionCreators).hideActionSheet('DevToolsPersistedStoresActionSheet');
}
}
}
function _fun100485(a0) { // fn#100485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3524, offset: 0x021e9971, size: 144 bytes, params: 2, frame: 18
const value = environment.__proto__;
const value2 = undefined;
const Text = (TextModule).Text;
const DATABASE_CONTROLS = env1_14.DATABASE_CONTROLS;
return (
<Text
style={styles.sectionHeader}
variant="text-sm/semibold"
color="text-default"
>
{DATABASE_CONTROLS === a0 ? 'Database Controls' : env1_14.DATABASE_CURRENT === a0 ? 'Database (Current)' : env1_14.PERSISTED_STORES !== a0 ? value2 : 'Persisted Stores'}
</Text>
);
}
}
}
function onChange_100482(a0) { // fn#100482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3079, offset: 0x021e98b1, size: 28 bytes, params: 2, frame: 12
return env1_3(env1_1(a0));
}
function onPress_100483() { // fn#100483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3263, offset: 0x021e98cd, size: 120 bytes, params: 1, frame: 18
var environment;
const value = environment.__proto__.__proto__;
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
Reflect.apply(openLazy, defaultImport, [Promise.resolve({default: DevToolsPersistedStoresActionSheet}),
'DevToolsPersistedStoresActionSheet', {store: persistedStores[require - 1], close: close_100484}]);
}
function onPress_100483Close() { // fn#100484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13356:3405, owner: onPress_100483.close, offset: 0x021e9945, size: 44 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('DevToolsPersistedStoresActionSheet');
}
global.__d(_fun100465, 13166, [57, 31, 27, 567, 1226, 33, 4501, 697, 6238, 1910, 3857, 566, 1926, 1485, 5463, 7705,
7706, 7699, 6984, 4080, 4573, 8671, 6805, 6758, 6807,
2]) /* metro module 13166, dependencies: [57, 31, 27, 567, 1226, 33, 4501, 697, 6238, 1910, 3857, 566, 1926, 1485, 5463, 7705, 7706, 7699, 6984, 4080, 4573, 8671, 6805, 6758, 6807, 2] */;
@@ -1,212 +1,279 @@
/* Metro module 14157; source: modules/devtools/native/components/screens/DevToolsDismissableContentsScreen.tsx; dependencies: [57, 31, 27, 1369, 33, 4501, 697, 1365, 14158, 6808, 5463, 7705, 7706, 10779, 6590, 566, 7699, 4573, 6231, 12715, 6238, 1362, 4071, 6243, 14159, 6984, 8671, 8607, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import DismissibleContentFrameworkStore from '../../../../dismissible_content/DismissibleContentFrameworkStore.tsx'; /* Metro dependency 1369 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import UseFastestListTableRowPlaceholderConfigNative from '../../../../fastest_list/placeholders/useFastestListTableRowPlaceholderConfig.native.tsx'; /* Metro dependency 7699 */
import UseScaledRowHeight from '../../../../main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
import UseScaledSectionHeight from '../../../../main_tabs_v2/native/shared_components/user_list/useScaledSectionHeight.tsx'; /* Metro dependency 7706 */
import ToggleDismissibleContentDismissState from '../../../../dismissible_content/utils/toggleDismissibleContentDismissState.tsx'; /* Metro dependency 14158 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Dismissible_contentModule from '../../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as TrashIconModule from '../../../../../design/components/Icon/native/redesign/generated/TrashIcon.tsx'; /* Metro dependency 4071 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableRowArrowNativeModule from '../../../../../design/components/TableRow/native/TableRowArrow.native.tsx'; /* Metro dependency 6243 */
import * as TableSwitchRowNativeModule from '../../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as SearchFieldNativeModule from '../../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as UseLocalStorageStateModule from '../../../../../hooks/useLocalStorageState.tsx'; /* Metro dependency 10779 */
import * as DismissibleContentFrameworkActionCreatorsModule from '../../../../dismissible_content/DismissibleContentFrameworkActionCreators.tsx'; /* Metro dependency 12715 */
import * as DoubleCheckmarkIconModule from '../../../../../design/components/Icon/native/redesign/generated/DoubleCheckmarkIcon.tsx'; /* Metro dependency 14159 */
function _fun107130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:6, offset: 0x022f450b, size: 522 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(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const dismissibleContentFrameworkStore = importDefault(1369) /* metro dependency 1369: DismissibleContentFrameworkStore */;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingTop = PX_16;
object4.flex = 1;
object3.container = object4;
object2.paddingTop = PX_16;
object2.flex = 1;
object.container = object2;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.list = {flex: 1, paddingHorizontal: PX_16};
object.list = {flex: 1, paddingHorizontal: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.search = {paddingHorizontal: PX_16};
const object6 = {};
object.search = {paddingHorizontal: PX_16};
const object5 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingHorizontal = PX_16;
object5.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingBottom = PX_16;
object3.section = object6;
object5.paddingBottom = PX_16;
object.section = object5;
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.sectionHeader = {'backgroundColor': null, 'verticalAlign': 'middle', 'flexDirection': 'row',
object.sectionHeader = {'backgroundColor': null, 'verticalAlign': 'middle', 'flexDirection': 'row',
'alignItems': 'center', 'flex': 1, backgroundColor: BACKGROUND_BASE_LOW};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object3.emptyState = {'marginVertical': null, 'justifyContent': 'center', 'alignItems': 'center', 'flex': 1,
object.emptyState = {'marginVertical': null, 'justifyContent': 'center', 'alignItems': 'center', 'flex': 1,
marginVertical: PX_32};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
const env0_10 = value.memo(_fun107131);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsDismissableContentsScreen.tsx');
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_10 = ReactModule.memo(_fun107131);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsDismissableContentsScreen.tsx');
exports.default = DevToolsDismissableContentsScreen;
}
function _fun107131({content, start, end}) { // fn#107131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:724, offset: 0x022f4715, size: 139 bytes, params: 2, frame: 19
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const {isDismissed,
handleToggleDismissState} = (importDefault(14158) /* metro dependency 14158: toggleDismissibleContentDismissState */)(DismissibleContent[content]);
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableSwitchRow
start={start}
end={end}
onValueChange={handleToggleDismissState}
value={isDismissed}
label={content}
/>
);
}
function DevToolsDismissableContentsScreen() { // fn#107132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1063, offset: 0x022f47a0, size: 1429 bytes, params: 1, frame: 43
var r5;
var Text;
var object;
var value;
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value2 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const value3 = (importDefault(7706) /* metro dependency 7706: useScaledSectionHeight */)();
const useLocalStorageStateModule = require(10779) /* metro dependency 10779: useLocalStorageState */;
const value4 = '';
const value5 = useLocalStorageStateModule.useLocalStorageState('devtools-dc-search', value4);
const binding = env0_3;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_2 = value6[1];
const binding2 = env0_4;
var env0_3 = binding2.useCallback(_fun107133, []);
const useState = binding2.useState;
const value7 = binding(Reflect.apply(useState, binding2, [_fun107135]), 2);
const {sections, dismissableContent} = value7[0];
const env0_5 = value7[1];
const {dailyCapOverridden,
newUserMinAgeRequiredOverridden} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([DismissibleContentFrameworkStore],
function() {
return {dailyCapOverridden: DismissibleContentFrameworkStore.dailyCapOverridden,
newUserMinAgeRequiredOverridden: DismissibleContentFrameworkStore.newUserMinAgeRequiredOverridden};
});
const value9 = (importDefault(7699) /* metro dependency 7699: useFastestListTableRowPlaceholderConfigNative */)();
const value10 = binding2.useCallback(_fun107137, [dismissableContent]);
const value11 = binding2.useCallback(_fun107138, [styles]);
let section = styles.section;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const items2 = [<View style={section}><TableRowGroup title="Global Overrides" hasIcons={false}><TableSwitchRow onValueChange={(require(12715) /* metro dependency 12715: DismissibleContentFrameworkActionCreators */).overrideDismissibleContentFramework} value={dailyCapOverridden} label="Daily limit" subLabel="When enabled, bypass the daily limit of dismissible content shown" /><TableSwitchRow onValueChange={(require(12715) /* metro dependency 12715: DismissibleContentFrameworkActionCreators */).overrideNewUserMinAgeRequired} value={newUserMinAgeRequiredOverridden} label="New user account minimum age" subLabel="When enabled, bypass the minimum age requirement for new user accounts" /></TableRowGroup></View>];
section = styles.section;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {label: 'Clear all dismissed dismissible contents',
onPress: (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).clearDismissedContents};
const TrashIcon = (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon;
tableRowProps.icon = <TrashIcon />;
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
tableRowProps.trailing = <TableRowArrow />;
const items3 = [<TableRow {...tableRowProps} />];
items3[1] = <TableRow label="Clear all guild dismissed dismissible contents" onPress={(require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).clearGuildDismissedContents} icon={<TrashIcon />} trailing={<TableRowArrow />} />;
const tableRowProps3 = {label: 'Dismiss all dismissible contents',
onPress: (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).checkAllDismissedContents};
const DoubleCheckmarkIcon = (require(14159) /* metro dependency 14159: DoubleCheckmarkIcon */).DoubleCheckmarkIcon;
tableRowProps3.icon = <DoubleCheckmarkIcon />;
tableRowProps3.trailing = <TableRowArrow />;
items3[2] = <TableRow {...tableRowProps3} />;
items2[1] = <View style={section}><TableRowGroup title="Bulk actions" hasIcons>{items3}</TableRowGroup></View>;
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
items2[2] = <View style={styles.search}><SearchField size="md" defaultValue={property ?? value4} onChange={onChange_107139} /></View>;
if (dismissableContent.length > 0) {
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = ((Component) => <Component style={styles.list} estimatedListSize="windowSize" itemSize={value2} placeholderConfig={value9} renderItem={value10} renderSectionHeader={value11} sections={sections} sectionHeaderSize={value3} insetEnd={insets.bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16} wrapChildren />)(value);
r5 = value;
} else {
var viewBinding2Props = {style: styles.emptyState};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object = {};
object.marginBottom = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
value = <Text style={object} variant="heading-lg/semibold">{'No results found'}</Text>;
value = <View {...viewBinding2Props}>{value}{((SearchEmpty) => <SearchEmpty />)((require(8607) /* metro dependency 8607: SearchEmpty */).SearchEmpty)}</View>;
r5 = value;
function _fun107131({content, start, end}) { // fn#107131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:724, offset: 0x022f4715, size: 139 bytes, params: 2, frame: 19
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const {isDismissed,
handleToggleDismissState} = (ToggleDismissibleContentDismissState)(DismissibleContent[content]);
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
return (
<TableSwitchRow
start={start}
end={end}
onValueChange={handleToggleDismissState}
value={isDismissed}
label={content}
/>
);
}
items2[3] = r5;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun107133(a0) { // fn#107133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1287, offset: 0x022f4d35, size: 207 bytes, params: 2, frame: 26
var r8;
var r12;
var propertyName;
var propertyName2;
var defaultImport;
var toLowerCase;
var value3;
var value4;
var isNaN;
var Number;
var isNaN2;
let items2 = [];
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const value2 = a0 === '';
for (propertyName in DismissibleContent) {
if (value2) {
r12 = value2;
continue;
function DevToolsDismissableContentsScreen() { // fn#107132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1063, offset: 0x022f47a0, size: 1429 bytes, params: 1, frame: 43
var r5;
var Text;
var object2;
var value;
const styles = useStyles();
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const value2 = (UseScaledRowHeight)();
const value3 = (UseScaledSectionHeight)();
const value4 = '';
const value5 = UseLocalStorageStateModule.useLocalStorageState('devtools-dc-search', value4);
const binding = env0_3;
const value6 = binding(value5, 2);
const property = value6[0];
const env0_2 = value6[1];
const binding2 = env0_4;
var env0_3 = binding2.useCallback(_fun107133, []);
const useState = binding2.useState;
const value7 = binding(Reflect.apply(useState, binding2, [_fun107135]), 2);
const {sections, dismissableContent} = value7[0];
const env0_5 = value7[1];
const {dailyCapOverridden,
newUserMinAgeRequiredOverridden} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([DismissibleContentFrameworkStore],
function() {
var dismissibleContentFrameworkStoreBinding = DismissibleContentFrameworkStore;
return {dailyCapOverridden: dismissibleContentFrameworkStoreBinding.dailyCapOverridden,
newUserMinAgeRequiredOverridden: dismissibleContentFrameworkStoreBinding.newUserMinAgeRequiredOverridden};
});
const value9 = (UseFastestListTableRowPlaceholderConfigNative)();
const value10 = binding2.useCallback(_fun107137, [dismissableContent]);
const value11 = binding2.useCallback(_fun107138, [styles]);
let section = styles.section;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const items2 = [
<View style={section}>
<TableRowGroup title="Global Overrides" hasIcons={false}>
<TableSwitchRow
onValueChange={(DismissibleContentFrameworkActionCreatorsModule).overrideDismissibleContentFramework}
value={dailyCapOverridden}
label="Daily limit"
subLabel="When enabled, bypass the daily limit of dismissible content shown"
/>
<TableSwitchRow
onValueChange={(DismissibleContentFrameworkActionCreatorsModule).overrideNewUserMinAgeRequired}
value={newUserMinAgeRequiredOverridden}
label="New user account minimum age"
subLabel="When enabled, bypass the minimum age requirement for new user accounts"
/>
</TableRowGroup>
</View>,
];
section = styles.section;
const TableRow = (TableRowNativeModule).TableRow;
const tableRowProps = {label: 'Clear all dismissed dismissible contents',
onPress: (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).clearDismissedContents};
const TrashIcon = (TrashIconModule).TrashIcon;
tableRowProps.icon = <TrashIcon />;
const TableRowArrow = (TableRowArrowNativeModule).TableRowArrow;
tableRowProps.trailing = <TableRowArrow />;
const items3 = [
<TableRow {...tableRowProps} />,
];
items3[1] = (
<TableRow
label="Clear all guild dismissed dismissible contents"
onPress={(require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).clearGuildDismissedContents}
icon={<TrashIcon />}
trailing={<TableRowArrow />}
/>
);
const tableRowProps3 = {label: 'Dismiss all dismissible contents',
onPress: (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).checkAllDismissedContents};
const DoubleCheckmarkIcon = (DoubleCheckmarkIconModule).DoubleCheckmarkIcon;
tableRowProps3.icon = <DoubleCheckmarkIcon />;
tableRowProps3.trailing = <TableRowArrow />;
items3[2] = <TableRow {...tableRowProps3} />;
items2[1] = (
<View style={section}>
<TableRowGroup title="Bulk actions" hasIcons>
{items3}
</TableRowGroup>
</View>
);
const SearchField = (SearchFieldNativeModule).SearchField;
items2[2] = (
<View style={styles.search}>
<SearchField
size="md"
defaultValue={property ?? value4}
onChange={onChange_107139}
/>
</View>
);
if (dismissableContent.length > 0) {
value = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
value = ((Component) => <Component style={styles.list} estimatedListSize="windowSize" itemSize={value2} placeholderConfig={value9} renderItem={value10} renderSectionHeader={value11} sections={sections} sectionHeaderSize={value3} insetEnd={insets.bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16} wrapChildren />)(value);
r5 = value;
} else {
var viewBinding2Props = {style: styles.emptyState};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
object2 = {};
object2.marginBottom = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
value = (
<Text style={object2} variant="heading-lg/semibold">
{'No results found'}
</Text>
);
value = (
<View {...viewBinding2Props}>
{value}
{((SearchEmpty) => <SearchEmpty />)((require(8607) /* metro dependency 8607: SearchEmpty */).SearchEmpty)}
</View>
);
r5 = value;
}
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value3 = a0.toLowerCase();
toLowerCase = propertyName.toLowerCase;
value4 = defaultImport(value3, Reflect.apply(toLowerCase, propertyName, []));
r12 = value4;
if (!r12) {
continue;
items2[3] = r5;
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun107133(a0) { // fn#107133, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1287, offset: 0x022f4d35, size: 207 bytes, params: 2, frame: 26
var r8;
var r12;
var propertyName;
var propertyName2;
var defaultImport;
var toLowerCase;
var value3;
var value4;
var isNaN;
var Number;
var isNaN2;
let items2 = [];
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const value2 = a0 === '';
for (propertyName in DismissibleContent) {
if (value2) {
r12 = value2;
continue;
}
defaultImport = importDefault(6590) /* metro dependency 6590 */;
value3 = a0.toLowerCase();
toLowerCase = propertyName.toLowerCase;
value4 = defaultImport(value3, Reflect.apply(toLowerCase, propertyName, []));
r12 = value4;
if (!r12) {
continue;
}
isNaN = global.isNaN;
Number = global.Number;
isNaN2 = isNaN(Number(propertyName));
r12 = isNaN2;
if (!r12) {
r8 = propertyName2;
continue;
}
items2.push(propertyName);
r8 = propertyName2;
}
items2.sort(function(a0, a1) {
return a0.localeCompare(a1);
});
const object = {dismissableContent: items2};
items2 = [items2.length];
object.sections = items2;
return object;
}
isNaN = global.isNaN;
Number = global.Number;
isNaN2 = isNaN(Number(propertyName));
r12 = isNaN2;
if (!r12) {
r8 = propertyName2;
continue;
function _fun107135() { // fn#107135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1527, offset: 0x022f4e17, size: 37 bytes, params: 1, frame: 12
return env0_3(env0_1 ?? '');
}
items2.push(propertyName);
r8 = propertyName2;
function _fun107137(a0, a1) { // fn#107137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1854, offset: 0x022f4e5d, size: 71 bytes, params: 3, frame: 15
const binding = env1_10;
const dismissableContentBinding = dismissableContent;
return ((Component) => <Component content={dismissableContentBinding[a1]} start={a1 === 0} end={a1 === dismissableContentBinding.length - 1} />)(binding);
}
function _fun107138() { // fn#107138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1935, offset: 0x022f4ea4, size: 75 bytes, params: 1, frame: 14
const Text = (TextModule).Text;
return (
<Text
style={styles.sectionHeader}
variant="text-sm/semibold"
color="text-default"
>
{'Dismissible Contents'}
</Text>
);
}
function DevToolsDismissableContentsScreenOnChange(a0) { // fn#107139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:3372, owner: DevToolsDismissableContentsScreen.onChange, offset: 0x022f4eef, size: 37 bytes, params: 2, frame: 12
env0_2(a0);
env0_5(env0_3(a0));
}
}
items2.sort(function(a0, a1) {
return a0.localeCompare(a1);
});
const object2 = {dismissableContent: items2};
items2 = [items2.length];
object2.sections = items2;
return object2;
}
function _fun107135() { // fn#107135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1527, offset: 0x022f4e17, size: 37 bytes, params: 1, frame: 12
return env0_3(env0_1 ?? '');
}
function _fun107137(a0, a1) { // fn#107137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1854, offset: 0x022f4e5d, size: 71 bytes, params: 3, frame: 15
const binding = env1_10;
const dismissableContentBinding = dismissableContent;
return ((Component) => <Component content={dismissableContentBinding[a1]} start={a1 === 0} end={a1 === dismissableContentBinding.length - 1} />)(binding);
}
function _fun107138() { // fn#107138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:1935, offset: 0x022f4ea4, size: 75 bytes, params: 1, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.sectionHeader}
variant="text-sm/semibold"
color="text-default"
>
{'Dismissible Contents'}
</Text>
);
}
function DevToolsDismissableContentsScreenOnChange(a0) { // fn#107139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14354:3372, owner: DevToolsDismissableContentsScreen.onChange, offset: 0x022f4eef, size: 37 bytes, params: 2, frame: 12
env0_2(a0);
env0_5(env0_3(a0));
}
global.__d(_fun107130, 14157, [57, 31, 27, 1369, 33, 4501, 697, 1365, 14158, 6808, 5463, 7705, 7706, 10779, 6590,
566, 7699, 4573, 6231, 12715, 6238, 1362, 4071, 6243, 14159, 6984, 8671, 8607,
2]) /* metro module 14157, dependencies: [57, 31, 27, 1369, 33, 4501, 697, 1365, 14158, 6808, 5463, 7705, 7706, 10779, 6590, 566, 7699, 4573, 6231, 12715, 6238, 1362, 4071, 6243, 14159, 6984, 8671, 8607, 2] */;
@@ -1,4 +1,23 @@
/* Metro module 14268; source: modules/devtools/native/components/screens/DevToolsDisplayNameEffectsBenchmarkScreen.tsx; dependencies: [57, 31, 27, 1878, 1889, 33, 1890, 8705, 1244, 8701, 2582, 4501, 697, 4572, 4573, 4578, 8696, 8697, 566, 14269, 6231, 6238, 9402, 4637, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UsernameWithEffects from '../../../../display_name_styles/native/UsernameWithEffects.tsx'; /* Metro dependency 8696 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as DisplayNameStylesConstantsModule from '../../../../display_name_styles/DisplayNameStylesConstants.tsx'; /* Metro dependency 1889 */
import * as DisplayNameEffectModule from '../../../../../external/discord_common/js/shared/shared-constants/DisplayNameEffect.tsx'; /* Metro dependency 1890 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TypesModule from '../../../../display_name_styles/types.tsx'; /* Metro dependency 8697 */
import * as UseDisplayNameStylesEffectConfigsModule from '../../../../display_name_styles/hooks/useDisplayNameStylesEffectConfigs.tsx'; /* Metro dependency 8701 */
import * as StringUtilsModule from '../../../../../utils/native/StringUtils.tsx'; /* Metro dependency 8705 */
import * as CheckboxNativeModule from '../../../../../design/components/Checkbox/native/Checkbox.native.tsx'; /* Metro dependency 9402 */
function _fun107950(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:6, offset: 0x02310037, size: 545 bytes, params: 8, frame: 23
const env0_0 = require;
const effectName = function(a0) {
@@ -10,19 +29,16 @@ function _fun107950(global, require, importDefault, importAll, module, exports,
};
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 */;
let value = ReactNativeModule;
const env0_5 = value.ScrollView;
const env0_6 = value.View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const EFFECT_ORDER = (require(1889) /* metro dependency 1889: DisplayNameStylesConstants */).EFFECT_ORDER;
const EFFECT_ORDER = (DisplayNameStylesConstantsModule).EFFECT_ORDER;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
object = [];
value = arraySpread(object, EFFECT_ORDER, 0, undefined);
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
const GUMMY = DisplayNameEffect.GUMMY;
object[value] = GUMMY;
value + 1;
@@ -32,294 +48,347 @@ function _fun107950(global, require, importDefault, importAll, module, exports,
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const object3 = {};
const object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object.wrap = object3;
object2.paddingHorizontal = PX_16;
object.wrap = object2;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.container = {paddingVertical: PX_16};
object.batchRow = {paddingVertical: 2};
object.optionButtons = {flexWrap: 'wrap'};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsDisplayNameEffectsBenchmarkScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsDisplayNameEffectsBenchmarkScreen.tsx');
exports.default = DevToolsDisplayNameEffectsBenchmarkScreen;
}
function makeUniqueName(a0, a1, a2) { // fn#107951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:251, offset: 0x02310258, size: 170 bytes, params: 4, frame: 16
let String = global.String;
const Math = global.Math;
const length = String(Math.max(a2 - 1, 0)).length;
String = global.String;
value = String(a1);
value = value.padStart(length, '0');
const value3 = (StringUtilsModule).splitGraphemes(a0);
return value3.length <= length ? value : value3.slice(0, value3.length - length).join('') + value;
}
function makeUniqueName(a0, a1, a2) { // fn#107951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:251, offset: 0x02310258, size: 170 bytes, params: 4, frame: 16
let String = global.String;
const Math = global.Math;
const length = String(Math.max(a2 - 1, 0)).length;
String = global.String;
value = String(a1);
value = value.padStart(length, '0');
const value3 = (require(8705) /* metro dependency 8705: StringUtils */).splitGraphemes(a0);
return value3.length <= length ? value : value3.slice(0, value3.length - length).join('') + value;
}
function OptionButtons({caption, options, value, onChange}) { // fn#107953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:967, offset: 0x02310365, size: 227 bytes, params: 2, frame: 24
const styles = useStyles();
const Stack = (StackNativeModule).Stack;
const Text = (TextModule).Text;
const text = (
<Text variant="text-sm/semibold" color="text-subtle">
{caption}
</Text>
);
const Stack2 = (StackNativeModule).Stack;
return (
<Stack spacing={8}>
{text}
<Stack2
direction="horizontal"
spacing={8}
style={styles.optionButtons}
>
{options.map(_fun107954)}
</Stack2>
</Stack>
);
function _fun107954(a0) { // fn#107954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1253, offset: 0x02310448, size: 128 bytes, params: 2, frame: 19
const env0_0 = a0;
const Button = (ButtonNativeModule).Button;
const label = a0.label;
const r6 = a0.value !== value ? 'secondary' : 'primary';
const String = global.String;
return (
<Button
size="sm"
text={label}
variant={r6}
onPress={onPress_107955}
key={String(a0.value)}
/>
);
function onPress_107955() { // fn#107955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1348, offset: 0x023104c8, size: 28 bytes, params: 1, frame: 11
const value = environment.__proto__;
return onChange(env0_0.value);
}
function OptionButtons({caption, options, value, onChange}) { // fn#107953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:967, offset: 0x02310365, size: 227 bytes, params: 2, frame: 24
const styles = useStyles();
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-sm/semibold" color="text-subtle">{caption}</Text>;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
return (
<Stack spacing={8}>
{text}
<Stack2
direction="horizontal"
spacing={8}
style={styles.optionButtons}
>
{options.map(_fun107954)}
</Stack2>
</Stack>
);
}
function BenchmarkRow({userId, effect, userName, style}) { // fn#107956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1388, offset: 0x023104e4, size: 172 bytes, params: 2, frame: 21
const value2 = (require(8701) /* metro dependency 8701: useDisplayNameStylesEffectConfigs */).useDisplayNameStylesEffectConfig(effect);
const usernameWithEffects = importDefault(8696) /* metro dependency 8696: UsernameWithEffects */;
const EffectDisplayType = (require(8697) /* metro dependency 8697: types */).EffectDisplayType;
const STATIC = EffectDisplayType.STATIC;
return (
<View style={style}>
{((Component) => <Component userId={userId} userName={userName} effectDisplayType={STATIC} pendingDisplayNameStyles={value2.previewStyles} variant="text-md/semibold" />)(usernameWithEffects)}
</View>
);
}
function DevToolsDisplayNameEffectsBenchmarkScreen() { // fn#107957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1818, offset: 0x02310590, size: 1513 bytes, params: 1, frame: 54
var r8;
var Provider;
var MountMeasure;
var object;
var batchKey;
var Array;
var from;
const styles = useStyles();
let value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun107958);
const binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [_fun107959]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_3 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [100]), 2);
const property2 = value5[0];
const property3 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, ['long']), 2);
const property4 = value6[0];
const property5 = value6[1];
const {results, addMount, addScroll,
clear} = (require(14269) /* metro dependency 14269: performance */).useBenchmarkResults();
const value8 = (require(14269) /* metro dependency 14269: performance */).useMountTimer();
const run = value8.run;
const begin = value8.begin;
const measure = value8.measure;
const env0_10 = measure;
const cancel = value8.cancel;
const value9 = binding.useCallback(function(a0) {
addScroll(a0);
}, [addScroll]);
const value10 = binding.useMemo(_fun107961, [property4]);
const env0_11 = value10;
const value11 = binding.useMemo(_fun107963, [value10]);
const env0_12 = value11;
const value12 = binding.useMemo(_fun107964, [property]);
const value13 = binding.useMemo(_fun107966, [value12]);
const env0_15 = binding.useCallback(_fun107967, []);
const value14 = binding.useCallback(_fun107969, [begin, value12, value13, property2, value10, value11]);
const env0_16 = binding.useCallback(function(a0, a1) {
var value2 = measure(a0);
if (value2 != null) {
addMount('' + a1.effectLabel + ' · ' + a1.rowCount + ' rows · ' + a1.graphemeCount + ' graphemes', value2);
}
}, [measure, addMount]);
const value15 = null;
const r29 = value15 != value2 && value12.length > 0;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-sm/semibold" color="text-subtle">{'Effects (checked render in rotation)'}</Text>;
const Stack3 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const items2 = [<TableRow label={<Stack2 spacing={8}>{text}<Stack3 spacing={4}>{env0_10.map(_fun107971)}</Stack3></Stack2>} />];
items2[1] = <TableRow label={<OptionButtons caption="Rows" value={property2} onChange={property3} options={env0_11.map(function(a0) {
return {value: a0, label: (0, global.String)(a0)};
})} />} />;
items2[2] = <TableRow label={<OptionButtons caption={'Name length (' + value11 + ' graphemes)'} value={property4} onChange={property5} options={env0_12.map(function(a0) {
return {value: a0.key, label: a0.label};
})} />} />;
const items3 = [<TableRowGroup title="Configuration" hasIcons={false}>{items2}</TableRowGroup>];
const tableRow = <TableRow label="Measure mount + layout" subLabel="Mounts the batch and times until native layout completes." arrow disabled={!r29} onPress={value14} />;
const ScrollBenchmark = (require(14269) /* metro dependency 14269: performance */).ScrollBenchmark;
items3[1] = <TableRowGroup title="Run" hasIcons={false}>{tableRow}<ScrollBenchmark onResult={value9} subLabel="Records frame times while you scroll the batch below." /></TableRowGroup>;
const BenchmarkResultsList = (require(14269) /* metro dependency 14269: performance */).BenchmarkResultsList;
items3[2] = <BenchmarkResultsList results={results} onClear={clear} />;
if (value15 != run) {
if (value15 != value2) {
Provider = (require(4637) /* metro dependency 4637: DisplayNameStylesContext */).DisplayNameStylesContext.Provider;
MountMeasure = (require(14269) /* metro dependency 14269: performance */).MountMeasure;
object = {};
batchKey = run.batchKey;
object.batchKey = batchKey;
object.onCancel = cancel;
object.onMeasure = onMeasure;
Array = global.Array;
from = Array.from;
batchKey = run.batchKey;
r8 = <Provider value={{overrideSettings: true}}><MountMeasure {...object} key={batchKey}>{Reflect.apply(from,
Array,
[{length: run.params.rowCount}, _fun107976])}</MountMeasure></Provider>;
}
function BenchmarkRow({userId, effect, userName, style}) { // fn#107956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1388, offset: 0x023104e4, size: 172 bytes, params: 2, frame: 21
const value2 = (UseDisplayNameStylesEffectConfigsModule).useDisplayNameStylesEffectConfig(effect);
const EffectDisplayType = (TypesModule).EffectDisplayType;
const STATIC = EffectDisplayType.STATIC;
return (
<View style={style}>
{((Component) => <Component userId={userId} userName={userName} effectDisplayType={STATIC} pendingDisplayNameStyles={value2.previewStyles} variant="text-md/semibold" />)(UsernameWithEffects)}
</View>
);
}
function DevToolsDisplayNameEffectsBenchmarkScreen() { // fn#107957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1818, offset: 0x02310590, size: 1513 bytes, params: 1, frame: 54
var r8;
var Provider;
var MountMeasure;
var object2;
var batchKey;
var Array;
var from;
const styles = useStyles();
let value2 = (FluxModule).useStateFromStores([UserStore], _fun107958);
let useState = ReactModule.useState;
const value3 = Reflect.apply(useState, ReactModule, [_fun107959]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_3 = value4[1];
useState = ReactModule.useState;
const value5 = binding2(Reflect.apply(useState, ReactModule, [100]), 2);
const property2 = value5[0];
const property3 = value5[1];
useState = ReactModule.useState;
const value6 = binding2(Reflect.apply(useState, ReactModule, ['long']), 2);
const property4 = value6[0];
const property5 = value6[1];
const {results, addMount, addScroll,
clear} = (require(14269) /* metro dependency 14269: performance */).useBenchmarkResults();
const value8 = (require(14269) /* metro dependency 14269: performance */).useMountTimer();
const run = value8.run;
const begin = value8.begin;
const measure = value8.measure;
const measure2 = measure;
const cancel = value8.cancel;
const value9 = ReactModule.useCallback(function(a0) {
addScroll(a0);
}, [addScroll]);
const value10 = ReactModule.useMemo(_fun107961, [property4]);
const env0_11 = value10;
const value11 = ReactModule.useMemo(_fun107963, [value10]);
const env0_12 = value11;
const value12 = ReactModule.useMemo(_fun107964, [property]);
const value13 = ReactModule.useMemo(_fun107966, [value12]);
const env0_15 = ReactModule.useCallback(_fun107967, []);
const value14 = ReactModule.useCallback(_fun107969, [begin, value12, value13, property2, value10, value11]);
const env0_16 = ReactModule.useCallback(function(a0, a1) {
var value2 = measure(a0);
if (value2 != null) {
addMount('' + a1.effectLabel + ' · ' + a1.rowCount + ' rows · ' + a1.graphemeCount + ' graphemes', value2);
}
}, [measure, addMount]);
const value15 = null;
const r29 = value15 != value2 && value12.length > 0;
const Stack = (StackNativeModule).Stack;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const Stack2 = (StackNativeModule).Stack;
const Text = (TextModule).Text;
const text = (
<Text variant="text-sm/semibold" color="text-subtle">
{'Effects (checked render in rotation)'}
</Text>
);
const Stack3 = (StackNativeModule).Stack;
const items2 = [
<TableRow label={<Stack2 spacing={8}>{text}<Stack3 spacing={4}>{measure2.map(_fun107971)}</Stack3></Stack2>} />,
];
items2[1] = (
<TableRow
label={<OptionButtons
caption="Rows"
value={property2}
onChange={property3}
options={env0_11.map(function(a0) {
return {value: a0, label: (0, global.String)(a0)};
})}
/>}
/>
);
items2[2] = (
<TableRow
label={<OptionButtons
caption={'Name length (' + value11 + ' graphemes)'}
value={property4}
onChange={property5}
options={env0_12.map(function(a0) {
return {value: a0.key, label: a0.label};
})}
/>}
/>
);
const items3 = [
<TableRowGroup title="Configuration" hasIcons={false}>
{items2}
</TableRowGroup>,
];
const tableRow = (
<TableRow
label="Measure mount + layout"
subLabel="Mounts the batch and times until native layout completes."
arrow
disabled={!r29}
onPress={value14}
/>
);
const ScrollBenchmark = (require(14269) /* metro dependency 14269: performance */).ScrollBenchmark;
items3[1] = (
<TableRowGroup title="Run" hasIcons={false}>
{tableRow}
<ScrollBenchmark onResult={value9} subLabel="Records frame times while you scroll the batch below." />
</TableRowGroup>
);
const BenchmarkResultsList = (require(14269) /* metro dependency 14269: performance */).BenchmarkResultsList;
items3[2] = <BenchmarkResultsList results={results} onClear={clear} />;
if (value15 != run) {
if (value15 != value2) {
Provider = (require(4637) /* metro dependency 4637: DisplayNameStylesContext */).DisplayNameStylesContext.Provider;
MountMeasure = (require(14269) /* metro dependency 14269: performance */).MountMeasure;
object2 = {};
batchKey = run.batchKey;
object2.batchKey = batchKey;
object2.onCancel = cancel;
object2.onMeasure = onMeasure;
Array = global.Array;
from = Array.from;
batchKey = run.batchKey;
r8 = (
<Provider value={{overrideSettings: true}}>
<MountMeasure {...object2} key={batchKey}>
{Reflect.apply(from, Array, [{length: run.params.rowCount}, _fun107976])}
</MountMeasure>
</Provider>
);
} else {
r8 = value15;
}
} else {
r8 = value15;
}
} else {
r8 = value15;
items3[3] = r8;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.container}>
<Stack spacing={16}>
{items3}
</Stack>
</ScrollView>
);
function _fun107958() { // fn#107958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1916, offset: 0x02310b79, size: 34 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.id;
}
function _fun107959() { // fn#107959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1992, offset: 0x02310b9b, size: 78 bytes, params: 1, frame: 12
const Set = global.Set;
let value = environment.__proto__;
const DisplayNameEffect = (DisplayNameEffectModule).DisplayNameEffect;
const GUMMY = DisplayNameEffect.GUMMY;
const items2 = [GUMMY];
value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(items2);
return set instanceof Object ? set : value;
}
function _fun107961() { // fn#107961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2345, offset: 0x02310be9, size: 34 bytes, params: 1, frame: 11
const binding = env1_12;
return binding.find(_fun107962).name;
function _fun107962({key}) { // fn#107962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2357, offset: 0x02310c0b, size: 21 bytes, params: 2, frame: 2
return key === env1_5;
}
}
function _fun107963() { // fn#107963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2396, offset: 0x02310c20, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(8705) /* metro dependency 8705: StringUtils */;
return value.splitGraphemes(env0_11).length;
}
function _fun107964() { // fn#107964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2452, offset: 0x02310c52, size: 28 bytes, params: 1, frame: 11
return env1_10.filter(_fun107965);
function _fun107965(a0) { // fn#107965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2466, offset: 0x013cc79d, size: 22 bytes, params: 2, frame: 11
return env1_2.has(a0);
}
}
function _fun107966() { // fn#107966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2499, offset: 0x02310c6e, size: 70 bytes, params: 1, frame: 13
var r0;
var binding;
var value;
if (env0_13.length === env1_10.length) {
r0 = 'All (rotation)';
} else {
binding = env0_13;
value = binding.map(effectName);
value = value.join(' + ');
r0 = value;
}
return r0;
}
function _fun107967(a0, a1) { // fn#107967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2593, offset: 0x02310cb4, size: 39 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_3(_fun107968);
function _fun107968(a0) { // fn#107968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2604, offset: 0x02310cdb, size: 73 bytes, params: 2, frame: 12
const Set = global.Set;
const set = new Set(a0);
if (require) {
set.add(env0_0);
} else {
set.delete(env0_0);
}
return set;
}
}
function _fun107969() { // fn#107969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2683, offset: 0x02310d24, size: 79 bytes, params: 1, frame: 12
if (env0_13.length !== 0) {
begin({effects: env0_13, effectLabel: env0_14, rowCount: ReactModule, name: env0_11, graphemeCount: env0_12});
}
}
function _fun107971(a0) { // fn#107971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:3348, offset: 0x02310dd2, size: 102 bytes, params: 2, frame: 18
const env0_0 = a0;
const Checkbox = (CheckboxNativeModule).Checkbox;
return (
<Checkbox
label={effectName(a0)}
checked={env0_2.has(a0)}
onToggle={onToggle_107972}
key={a0}
/>
);
function onToggle_107972(a0) { // fn#107972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:3418, offset: 0x02310e38, size: 27 bytes, params: 2, frame: 13
return env1_15(env0_0, a0);
}
}
function onMeasure(a0) { // fn#107975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:4274, owner: DevToolsDisplayNameEffectsBenchmarkScreen.onMeasure, offset: 0x02310e8a, size: 30 bytes, params: 2, frame: 13
return env0_16(a0, run.params);
}
function _fun107976(a0, a1) { // fn#107976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:4339, offset: 0x02310ea8, size: 137 bytes, params: 3, frame: 19
const runBinding = run;
return (
<BenchmarkRow
userId={env0_1}
effect={runBinding.params.effects[a1 % runBinding.params.effects.length]}
userName={makeUniqueName(runBinding.params.name, a1, runBinding.params.rowCount)}
style={styles.batchRow}
key={a1}
/>
);
}
}
items3[3] = r8;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.container}>
<Stack spacing={16}>
{items3}
</Stack>
</ScrollView>
);
}
function _fun107954(a0) { // fn#107954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1253, offset: 0x02310448, size: 128 bytes, params: 2, frame: 19
const env0_0 = a0;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const label = a0.label;
const r6 = a0.value !== value ? 'secondary' : 'primary';
const String = global.String;
return (
<Button
size="sm"
text={label}
variant={r6}
onPress={onPress_107955}
key={String(a0.value)}
/>
);
}
function _fun107958() { // fn#107958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1916, offset: 0x02310b79, size: 34 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.id;
}
function _fun107959() { // fn#107959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1992, offset: 0x02310b9b, size: 78 bytes, params: 1, frame: 12
const Set = global.Set;
let value = environment.__proto__;
const DisplayNameEffect = (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect;
const GUMMY = DisplayNameEffect.GUMMY;
const items2 = [GUMMY];
value = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set(items2);
return set instanceof Object ? set : value;
}
function _fun107961() { // fn#107961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2345, offset: 0x02310be9, size: 34 bytes, params: 1, frame: 11
const binding = env1_12;
return binding.find(_fun107962).name;
}
function _fun107963() { // fn#107963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2396, offset: 0x02310c20, size: 50 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(8705) /* metro dependency 8705: StringUtils */;
return value.splitGraphemes(env0_11).length;
}
function _fun107964() { // fn#107964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2452, offset: 0x02310c52, size: 28 bytes, params: 1, frame: 11
return env1_10.filter(_fun107965);
}
function _fun107966() { // fn#107966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2499, offset: 0x02310c6e, size: 70 bytes, params: 1, frame: 13
var r0;
var binding;
var value;
if (env0_13.length === env1_10.length) {
r0 = 'All (rotation)';
} else {
binding = env0_13;
value = binding.map(effectName);
value = value.join(' + ');
r0 = value;
}
return r0;
}
function _fun107967(a0, a1) { // fn#107967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2593, offset: 0x02310cb4, size: 39 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_3(_fun107968);
}
function _fun107969() { // fn#107969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2683, offset: 0x02310d24, size: 79 bytes, params: 1, frame: 12
if (env0_13.length !== 0) {
begin({effects: env0_13, effectLabel: env0_14, rowCount: env0_4, name: env0_11, graphemeCount: env0_12});
}
}
function _fun107971(a0) { // fn#107971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:3348, offset: 0x02310dd2, size: 102 bytes, params: 2, frame: 18
const env0_0 = a0;
const Checkbox = (require(9402) /* metro dependency 9402: CheckboxNative */).Checkbox;
return (
<Checkbox
label={effectName(a0)}
checked={env0_2.has(a0)}
onToggle={onToggle_107972}
key={a0}
/>
);
}
function onMeasure(a0) { // fn#107975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:4274, owner: DevToolsDisplayNameEffectsBenchmarkScreen.onMeasure, offset: 0x02310e8a, size: 30 bytes, params: 2, frame: 13
return env0_16(a0, run.params);
}
function _fun107976(a0, a1) { // fn#107976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:4339, offset: 0x02310ea8, size: 137 bytes, params: 3, frame: 19
const runBinding = run;
return (
<BenchmarkRow
userId={env0_1}
effect={runBinding.params.effects[a1 % runBinding.params.effects.length]}
userName={makeUniqueName(runBinding.params.name, a1, runBinding.params.rowCount)}
style={styles.batchRow}
key={a1}
/>
);
}
function onPress_107955() { // fn#107955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:1348, offset: 0x023104c8, size: 28 bytes, params: 1, frame: 11
const value = environment.__proto__;
return onChange(env0_0.value);
}
function _fun107962({key}) { // fn#107962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2357, offset: 0x02310c0b, size: 21 bytes, params: 2, frame: 2
return key === env1_5;
}
function _fun107968(a0) { // fn#107968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:2604, offset: 0x02310cdb, size: 73 bytes, params: 2, frame: 12
const Set = global.Set;
const set = new Set(a0);
if (require) {
set.add(env0_0);
} else {
set.delete(env0_0);
}
return set;
}
function onToggle_107972(a0) { // fn#107972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14465:3418, offset: 0x02310e38, size: 27 bytes, params: 2, frame: 13
return env1_15(env0_0, a0);
}
global.__d(_fun107950, 14268, [57, 31, 27, 1878, 1889, 33, 1890, 8705, 1244, 8701, 2582, 4501, 697, 4572, 4573,
4578, 8696, 8697, 566, 14269, 6231, 6238, 9402, 4637,
2]) /* metro module 14268, dependencies: [57, 31, 27, 1878, 1889, 33, 1890, 8705, 1244, 8701, 2582, 4501, 697, 4572, 4573, 4578, 8696, 8697, 566, 14269, 6231, 6238, 9402, 4637, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,56 +1,89 @@
/* Metro module 13136; source: modules/devtools/native/components/screens/DevToolsGeneratedTestUsersScreen.tsx; dependencies: [5, 57, 31, 27, 13137, 1226, 33, 11441, 8036, 10112, 13138, 13140, 13142, 10802, 13144, 12374, 13146, 13148, 13150, 13152, 8656, 13154, 13156, 13158, 13160, 7002, 4501, 697, 4572, 7981, 4578, 4080, 13162, 6275, 6758, 6231, 6238, 4064, 566, 5463, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AuthenticationStore from '../../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import GeneratedTestUsersStore from '../../../../generated_test_users/GeneratedTestUsersStore.tsx'; /* Metro dependency 13137 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as SettingsIconModule from '../../../../../design/components/Icon/native/redesign/generated/SettingsIcon.tsx'; /* Metro dependency 7002 */
import * as TextInputNativeModule from '../../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
import * as ShieldIconModule from '../../../../../design/components/Icon/native/redesign/generated/ShieldIcon.tsx'; /* Metro dependency 8036 */
import * as FoodIconModule from '../../../../../design/components/Icon/native/redesign/generated/FoodIcon.tsx'; /* Metro dependency 8656 */
import * as GiftIconModule from '../../../../../design/components/Icon/native/redesign/generated/GiftIcon.tsx'; /* Metro dependency 10112 */
import * as SpeedometerIconModule from '../../../../../design/components/Icon/native/redesign/generated/SpeedometerIcon.tsx'; /* Metro dependency 10802 */
import * as UserIconModule from '../../../../../design/components/Icon/native/redesign/generated/UserIcon.tsx'; /* Metro dependency 11441 */
import * as SignPostIconModule from '../../../../../design/components/Icon/native/redesign/generated/SignPostIcon.tsx'; /* Metro dependency 12374 */
import * as AchievementsIconModule from '../../../../../design/components/Icon/native/redesign/generated/AchievementsIcon.tsx'; /* Metro dependency 13138 */
import * as PiggyBankIconModule from '../../../../../design/components/Icon/native/redesign/generated/PiggyBankIcon.tsx'; /* Metro dependency 13140 */
import * as TreehouseIconModule from '../../../../../design/components/Icon/native/redesign/generated/TreehouseIcon.tsx'; /* Metro dependency 13142 */
import * as CompassIconModule from '../../../../../design/components/Icon/native/redesign/generated/CompassIcon.tsx'; /* Metro dependency 13144 */
import * as CarIconModule from '../../../../../design/components/Icon/native/redesign/generated/CarIcon.tsx'; /* Metro dependency 13146 */
import * as TrainIconModule from '../../../../../design/components/Icon/native/redesign/generated/TrainIcon.tsx'; /* Metro dependency 13148 */
import * as TeacupIconModule from '../../../../../design/components/Icon/native/redesign/generated/TeacupIcon.tsx'; /* Metro dependency 13150 */
import * as InventoryIconModule from '../../../../../design/components/Icon/native/redesign/generated/InventoryIcon.tsx'; /* Metro dependency 13152 */
import * as BurgerIconModule from '../../../../../design/components/Icon/native/redesign/generated/BurgerIcon.tsx'; /* Metro dependency 13154 */
import * as MagicDoorIconModule from '../../../../../design/components/Icon/native/redesign/generated/MagicDoorIcon.tsx'; /* Metro dependency 13156 */
import * as PawPrintIconModule from '../../../../../design/components/Icon/native/redesign/generated/PawPrintIcon.tsx'; /* Metro dependency 13158 */
import * as RecordPlayerIconModule from '../../../../../design/components/Icon/native/redesign/generated/RecordPlayerIcon.tsx'; /* Metro dependency 13160 */
function _fun100373(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:6, offset: 0x021e6a21, size: 844 bytes, params: 8, frame: 23
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 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.View;
const env0_7 = value.ScrollView;
const generatedTestUsersStore = importDefault(13137) /* metro dependency 13137: GeneratedTestUsersStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
value = require(33) /* metro dependency 33 */;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
const UserIcon = (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
const UserIcon = (UserIconModule).UserIcon;
object = [UserIcon];
const ShieldIcon = (require(8036) /* metro dependency 8036: ShieldIcon */).ShieldIcon;
const ShieldIcon = (ShieldIconModule).ShieldIcon;
object[1] = ShieldIcon;
const GiftIcon = (require(10112) /* metro dependency 10112: GiftIcon */).GiftIcon;
const GiftIcon = (GiftIconModule).GiftIcon;
object[2] = GiftIcon;
const AchievementsIcon = (require(13138) /* metro dependency 13138: AchievementsIcon */).AchievementsIcon;
const AchievementsIcon = (AchievementsIconModule).AchievementsIcon;
object[3] = AchievementsIcon;
const PiggyBankIcon = (require(13140) /* metro dependency 13140: PiggyBankIcon */).PiggyBankIcon;
const PiggyBankIcon = (PiggyBankIconModule).PiggyBankIcon;
object[4] = PiggyBankIcon;
const TreehouseIcon = (require(13142) /* metro dependency 13142: TreehouseIcon */).TreehouseIcon;
const TreehouseIcon = (TreehouseIconModule).TreehouseIcon;
object[5] = TreehouseIcon;
const SpeedometerIcon = (require(10802) /* metro dependency 10802: SpeedometerIcon */).SpeedometerIcon;
const SpeedometerIcon = (SpeedometerIconModule).SpeedometerIcon;
object[6] = SpeedometerIcon;
const CompassIcon = (require(13144) /* metro dependency 13144: CompassIcon */).CompassIcon;
const CompassIcon = (CompassIconModule).CompassIcon;
object[7] = CompassIcon;
const SignPostIcon = (require(12374) /* metro dependency 12374: SignPostIcon */).SignPostIcon;
const SignPostIcon = (SignPostIconModule).SignPostIcon;
object[8] = SignPostIcon;
const CarIcon = (require(13146) /* metro dependency 13146: CarIcon */).CarIcon;
const CarIcon = (CarIconModule).CarIcon;
object[9] = CarIcon;
const TrainIcon = (require(13148) /* metro dependency 13148: TrainIcon */).TrainIcon;
const TrainIcon = (TrainIconModule).TrainIcon;
object[10] = TrainIcon;
const TeacupIcon = (require(13150) /* metro dependency 13150: TeacupIcon */).TeacupIcon;
const TeacupIcon = (TeacupIconModule).TeacupIcon;
object[11] = TeacupIcon;
const InventoryIcon = (require(13152) /* metro dependency 13152: InventoryIcon */).InventoryIcon;
const InventoryIcon = (InventoryIconModule).InventoryIcon;
object[12] = InventoryIcon;
const FoodIcon = (require(8656) /* metro dependency 8656: FoodIcon */).FoodIcon;
const FoodIcon = (FoodIconModule).FoodIcon;
object[13] = FoodIcon;
const BurgerIcon = (require(13154) /* metro dependency 13154: BurgerIcon */).BurgerIcon;
const BurgerIcon = (BurgerIconModule).BurgerIcon;
object[14] = BurgerIcon;
const MagicDoorIcon = (require(13156) /* metro dependency 13156: MagicDoorIcon */).MagicDoorIcon;
const MagicDoorIcon = (MagicDoorIconModule).MagicDoorIcon;
object[15] = MagicDoorIcon;
const PawPrintIcon = (require(13158) /* metro dependency 13158: PawPrintIcon */).PawPrintIcon;
const PawPrintIcon = (PawPrintIconModule).PawPrintIcon;
object[16] = PawPrintIcon;
const RecordPlayerIcon = (require(13160) /* metro dependency 13160: RecordPlayerIcon */).RecordPlayerIcon;
const RecordPlayerIcon = (RecordPlayerIconModule).RecordPlayerIcon;
object[17] = RecordPlayerIcon;
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
const SettingsIcon = (SettingsIconModule).SettingsIcon;
object[18] = SettingsIcon;
const env0_13 = ['text-default', 'text-feedback-positive', 'text-feedback-warning', 'text-feedback-critical',
'text-link', 'text-brand'];
@@ -64,246 +97,295 @@ function _fun100373(global, require, importDefault, importAll, module, exports,
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.inputContainer = {marginBottom: PX_16};
const env0_14 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsGeneratedTestUsersScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsGeneratedTestUsersScreen.tsx');
exports.default = DevToolsGeneratedTestUsersScreen;
}
function PoolIdInput({onSubmit}) { // fn#100374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:929, offset: 0x021e6d6d, size: 457 bytes, params: 2, frame: 27
const styles = useStyles();
const [property, property2] = env0_4(env0_5Binding.useState(''), 2);
const value5 = env0_4(env0_5Binding.useState(''), 2);
const property3 = value5[0];
const env0_3 = property3;
const property4 = value5[1];
var env0_4 = property4;
var [property5, env0_5] = env0_4(env0_5Binding.useState(false), 2);
const value9 = env0_5Binding.useCallback(env0_3(_fun100376), [property, property3, onSubmit]);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const items2 = [<TextInput size="md" placeholder="Enter Pool ID" onChange={property2} autoCapitalize="none" autoCorrect={false} autoComplete="off" isClearable />];
items2[1] = <TextInput size="md" secureTextEntry placeholder="Enter Password" onChange={property4} autoCapitalize="none" autoCorrect={false} autoComplete="off" isClearable />;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
let r10 = property.length === 0 || property3.length === 0;
r10 = !r10 ? property5 : r10;
items2[2] = <Button size="md" variant="primary" text="Get Pool" disabled={r10} loading={property5} onPress={value9} />;
return (
<Stack spacing={4} style={styles.inputContainer}>
{items2}
</Stack>
);
}
function UserActionSheet({pool}) { // fn#100377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:1708, offset: 0x021e6fcc, size: 348 bytes, params: 2, frame: 25
var object3;
const usersForPool = GeneratedTestUsersStore.getUsersForPool(pool.id);
const env0_2 = AuthenticationStore.getId();
const env0_3 = env0_5.useCallback(_fun100378, [pool.id]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object3 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object3.header = <BottomSheetTitleHeader title={pool.summary} subtitle={'' + usersForPool.length + ' users'} />;
const object2 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object2.paddingHorizontal = PX_12;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<BottomSheet {...object3}>
<View style={object2}>
<TableRowGroup title="Select User to Login As" hasIcons>
{usersForPool.map(_fun100379)}
</TableRowGroup>
</View>
</BottomSheet>
);
}
function PoolUsers({pool, start, end}) { // fn#100381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2471, offset: 0x021e7296, size: 280 bytes, params: 2, frame: 24
const id = pool.id;
const summary = pool.summary;
const usersForPool = GeneratedTestUsersStore.getUsersForPool(id);
let binding = env0_12;
let Number = global.Number;
const property = binding[Number(id) % env0_12.length];
binding = env0_13;
Number = global.Number;
const property2 = binding[Number(id) % env0_13.length];
const value5 = env0_5.useCallback(_fun100382, [pool]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
icon={((Component) => <Component size="md" color={property2} />)(property)}
label={summary}
subLabel={'' + usersForPool.length + ' users'}
arrow
onPress={value5}
start={start}
end={end}
/>
);
}
function DevToolsGeneratedTestUsersScreen() { // fn#100383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2985, offset: 0x021e7406, size: 460 bytes, params: 1, frame: 30
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GeneratedTestUsersStore],
_fun100384);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value4 = env0_5.useCallback(_fun100385(), []);
const items2 = [styles.contentContainer];
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[1] = {paddingBottom: PX_16 + insets.bottom};
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const poolIdInput = <PoolIdInput onSubmit={value4} />;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const items3 = [value2.length === 0 && ((TableRow) => <TableRow label="No pools available." />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow)];
items3[1] = value2.map(_fun100389);
return (
<View style={styles.container}>
<ScrollView contentContainerStyle={items2}>
<Stack spacing={16}>
{poolIdInput}
<TableRowGroup title="Generated Test User Pools" hasIcons>
{items3}
</TableRowGroup>
</Stack>
</ScrollView>
</View>
);
}
function* _fun100376() { // fn#100376, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:1113, offset: 0x021e6f41, size: 139 bytes, params: 1, frame: 15
var binding;
var moduleValue;
var value3;
var value4;
var error;
if (true) {
value = environment.__proto__;
if (importDefault.length !== 0) {
env1_5(true);
try {
} catch (error) {
env1_5(false);
throw error;
function PoolIdInput({onSubmit}) { // fn#100374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:929, offset: 0x021e6d6d, size: 457 bytes, params: 2, frame: 27
const styles = useStyles();
const [property, property2] = property42(env0_5Binding.useState(''), 2);
const value5 = property42(env0_5Binding.useState(''), 2);
const property3 = value5[0];
const property32 = property3;
const property4 = value5[1];
var property42 = property4;
var [property5, env0_5] = property42(env0_5Binding.useState(false), 2);
const value9 = env0_5Binding.useCallback(property32(_fun100376), [property, property3, onSubmit]);
const Stack = (StackNativeModule).Stack;
const TextInput = (TextInputNativeModule).TextInput;
const items2 = [
<TextInput
size="md"
placeholder="Enter Pool ID"
onChange={property2}
autoCapitalize="none"
autoCorrect={false}
autoComplete="off"
isClearable
/>,
];
items2[1] = (
<TextInput
size="md"
secureTextEntry
placeholder="Enter Password"
onChange={property4}
autoCapitalize="none"
autoCorrect={false}
autoComplete="off"
isClearable
/>
);
const Button = (ButtonNativeModule).Button;
let r10 = property.length === 0 || property3.length === 0;
r10 = !r10 ? property5 : r10;
items2[2] = (
<Button
size="md"
variant="primary"
text="Get Pool"
disabled={r10}
loading={property5}
onPress={value9}
/>
);
return (
<Stack spacing={4} style={styles.inputContainer}>
{items2}
</Stack>
);
function* _fun100376() { // fn#100376, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:1113, offset: 0x021e6f41, size: 139 bytes, params: 1, frame: 15
var binding;
var moduleValue;
var value3;
var value4;
var error;
if (true) {
value = environment.__proto__;
if (importDefault.length !== 0) {
env1_5(true);
try {
} catch (error) {
env1_5(false);
throw error;
}
try {
} catch (error) {
env1_5(false);
throw error;
}
try {
binding = env1_3;
} catch (error) {
env1_5(false);
throw error;
}
try {
moduleValue = require(importDefault, binding);
} catch (error) {
env1_5(false);
throw error;
}
yield moduleValue;
try {
value3 = undefined;
value4 = false;
} catch (error) {
env1_5(false);
throw error;
}
if (value4) {
env1_5(false);
return value3;
}
try {
} catch (error) {
env1_5(false);
throw error;
}
try {
dependencyMap('');
} catch (error) {
env1_5(false);
throw error;
}
try {
binding = env1_4;
} catch (error) {
env1_5(false);
throw error;
}
try {
binding('');
} catch (error) {
env1_5(false);
throw error;
}
env1_5(false);
}
}
try {
} catch (error) {
env1_5(false);
throw error;
}
try {
binding = env1_3;
} catch (error) {
env1_5(false);
throw error;
}
try {
moduleValue = require(importDefault, binding);
} catch (error) {
env1_5(false);
throw error;
}
yield moduleValue;
try {
value3 = undefined;
value4 = false;
} catch (error) {
env1_5(false);
throw error;
}
if (value4) {
env1_5(false);
return value3;
}
try {
} catch (error) {
env1_5(false);
throw error;
}
try {
dependencyMap('');
} catch (error) {
env1_5(false);
throw error;
}
try {
binding = env1_4;
} catch (error) {
env1_5(false);
throw error;
}
try {
binding('');
} catch (error) {
env1_5(false);
throw error;
}
env1_5(false);
}
}
}
function _fun100378(a0) { // fn#100378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:1802, offset: 0x021e7128, size: 87 bytes, params: 2, frame: 15
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('generated-test-users');
value = require(13162) /* metro dependency 13162: GeneratedTestUserActionCreators */;
value.loginAsGeneratedUser(pool.id, a0);
}
function UserActionSheet({pool}) { // fn#100377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:1708, offset: 0x021e6fcc, size: 348 bytes, params: 2, frame: 25
var object4;
const usersForPool = GeneratedTestUsersStore.getUsersForPool(pool.id);
const env0_2 = AuthenticationStore.getId();
const env0_3 = ReactModule.useCallback(_fun100378, [pool.id]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
object4 = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object4.header = <BottomSheetTitleHeader title={pool.summary} subtitle={'' + usersForPool.length + ' users'} />;
const object = {};
const PX_12 = (Native).space.PX_12;
object.paddingHorizontal = PX_12;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<BottomSheet {...object4}>
<View style={object}>
<TableRowGroup title="Select User to Login As" hasIcons>
{usersForPool.map(_fun100379)}
</TableRowGroup>
</View>
</BottomSheet>
);
function _fun100378(a0) { // fn#100378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:1802, offset: 0x021e7128, size: 87 bytes, params: 2, frame: 15
let value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet('generated-test-users');
value = require(13162) /* metro dependency 13162: GeneratedTestUserActionCreators */;
value.loginAsGeneratedUser(pool.id, a0);
}
function _fun100379(a0, a1) { // fn#100379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2179, offset: 0x021e717f, size: 251 bytes, params: 3, frame: 24
const env0_0 = a0;
const value2 = a0.id === env0_2;
const value4 = undefined;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const UserIcon = (require(11441) /* metro dependency 11441: UserIcon */).UserIcon;
object2.icon = <UserIcon size="md" />;
const username = a0.username;
object2.label = username;
object2.subLabel = a0.email;
object2.onPress = onPress_100380;
object2.disabled = value2;
object2.trailing = value2 ? ((CheckmarkLargeIcon) => <CheckmarkLargeIcon size="md" color="text-feedback-positive" />)((require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon) : value4;
object2.start = a1 === 0;
object2.end = a1 === env0_1.length - 1;
return <TableRow {...object2} key={a0.id} />;
}
function _fun100379(a0, a1) { // fn#100379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2179, offset: 0x021e717f, size: 251 bytes, params: 3, frame: 24
const env0_0 = a0;
const value2 = a0.id === env0_2;
const value4 = undefined;
const TableRow = (TableRowNativeModule).TableRow;
const object = {};
const UserIcon = (UserIconModule).UserIcon;
object.icon = <UserIcon size="md" />;
const username = a0.username;
object.label = username;
object.subLabel = a0.email;
object.onPress = onPress_100380;
object.disabled = value2;
object.trailing = (
value2
? ((CheckmarkLargeIcon) => <CheckmarkLargeIcon size="md" color="text-feedback-positive" />)((require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon)
: value4
);
object.start = a1 === 0;
object.end = a1 === env0_1.length - 1;
return <TableRow {...object} key={a0.id} />;
function onPress_100380() { // fn#100380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2309, offset: 0x021e727a, size: 28 bytes, params: 1, frame: 11
return env1_3(env0_0.id);
}
function _fun100382() { // fn#100382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2625, offset: 0x021e73ae, size: 88 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
Reflect.apply(openLazy, defaultImport, [Promise.resolve({default: UserActionSheet}), 'generated-test-users',
{pool: pool}]);
}
}
function _fun100384() { // fn#100384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3079, offset: 0x021e75d2, size: 31 bytes, params: 1, frame: 9
const value = environment.__proto__;
return GeneratedTestUsersStore.getPools() ?? [];
}
function _fun100385() { // fn#100385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3190, offset: 0x021e75f1, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun100387);
return _fun100388;
}
function _fun100389(a0, a1) { // fn#100389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3689, offset: 0x021e7665, size: 77 bytes, params: 3, frame: 17
return (
<PoolUsers
pool={a0}
start={a1 === 0}
end={a1 === env0_0.length - 1}
key={a0.id}
/>
);
}
function* _fun100387(a0, a1) { // fn#100387, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3210, offset: 0x021e7620, size: 69 bytes, params: 3, frame: 15
if (true) {
value = environment.__proto__.__proto__.__proto__;
value = env3_0(env3_2[32]);
var getGeneratedPoolById = value.getGeneratedPoolById;
yield Reflect.apply(getGeneratedPoolById, value, [a0, a1]);
}
function PoolUsers({pool, start, end}) { // fn#100381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2471, offset: 0x021e7296, size: 280 bytes, params: 2, frame: 24
const id = pool.id;
const summary = pool.summary;
const usersForPool = GeneratedTestUsersStore.getUsersForPool(id);
let binding = env0_12;
let Number = global.Number;
const property = binding[Number(id) % env0_12.length];
binding = env0_13;
Number = global.Number;
const property2 = binding[Number(id) % env0_13.length];
const value5 = ReactModule.useCallback(_fun100382, [pool]);
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
icon={((Component) => <Component size="md" color={property2} />)(property)}
label={summary}
subLabel={'' + usersForPool.length + ' users'}
arrow
onPress={value5}
start={start}
end={end}
/>
);
function _fun100382() { // fn#100382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2625, offset: 0x021e73ae, size: 88 bytes, params: 1, frame: 17
const value = environment.__proto__;
const defaultImport = ActionSheetActionCreators;
const openLazy = defaultImport.openLazy;
const Promise = global.Promise;
Reflect.apply(openLazy, defaultImport, [Promise.resolve({default: UserActionSheet}), 'generated-test-users',
{pool: pool}]);
}
}
function DevToolsGeneratedTestUsersScreen() { // fn#100383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:2985, offset: 0x021e7406, size: 460 bytes, params: 1, frame: 30
const styles = useStyles();
const value2 = (FluxModule).useStateFromStoresArray([GeneratedTestUsersStore],
_fun100384);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const value4 = ReactModule.useCallback(_fun100385(), []);
const items2 = [styles.contentContainer];
const PX_16 = (Native).space.PX_16;
items2[1] = {paddingBottom: PX_16 + insets.bottom};
const Stack = (StackNativeModule).Stack;
const poolIdInput = <PoolIdInput onSubmit={value4} />;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const items3 = [
value2.length === 0 && ((TableRow) => <TableRow label="No pools available." />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow),
];
items3[1] = value2.map(_fun100389);
return (
<View style={styles.container}>
<ScrollView contentContainerStyle={items2}>
<Stack spacing={16}>
{poolIdInput}
<TableRowGroup title="Generated Test User Pools" hasIcons>
{items3}
</TableRowGroup>
</Stack>
</ScrollView>
</View>
);
function _fun100384() { // fn#100384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3079, offset: 0x021e75d2, size: 31 bytes, params: 1, frame: 9
const value = environment.__proto__;
return GeneratedTestUsersStore.getPools() ?? [];
}
function _fun100385() { // fn#100385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3190, offset: 0x021e75f1, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun100387);
return _fun100388;
function* _fun100387(a0, a1) { // fn#100387, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3210, offset: 0x021e7620, size: 69 bytes, params: 3, frame: 15
if (true) {
value = environment.__proto__.__proto__.__proto__;
value = env3_0(env3_2[32]);
var getGeneratedPoolById = value.getGeneratedPoolById;
yield Reflect.apply(getGeneratedPoolById, value, [a0, a1]);
}
}
function _fun100388() { // fn#100388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3276, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun100389(a0, a1) { // fn#100389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13326:3689, offset: 0x021e7665, size: 77 bytes, params: 3, frame: 17
return (
<PoolUsers
pool={a0}
start={a1 === 0}
end={a1 === env0_0.length - 1}
key={a0.id}
/>
);
}
}
}
global.__d(_fun100373, 13136, [5, 57, 31, 27, 13137, 1226, 33, 11441, 8036, 10112, 13138, 13140, 13142, 10802,
13144, 12374, 13146, 13148, 13150, 13152, 8656, 13154, 13156, 13158, 13160, 7002, 4501, 697, 4572, 7981, 4578,
4080, 13162, 6275, 6758, 6231, 6238, 4064, 566, 5463,
2]) /* metro module 13136, dependencies: [5, 57, 31, 27, 13137, 1226, 33, 11441, 8036, 10112, 13138, 13140, 13142, 10802, 13144, 12374, 13146, 13148, 13150, 13152, 8656, 13154, 13156, 13158, 13160, 7002, 4501, 697, 4572, 7981, 4578, 4080, 13162, 6275, 6758, 6231, 6238, 4064, 566, 5463, 2] */;
@@ -1,39 +1,57 @@
/* Metro module 14244; source: modules/devtools/native/components/screens/DevToolsGuildPowerupsModal.tsx; dependencies: [31, 33, 9884, 5280, 9603, 9893, 14245, 2] */
import GetNavigationModalPresentation from '../../../../main_tabs_v2/native/utils/getNavigationModalPresentation.tsx'; /* Metro dependency 9893 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NavigatorNativeModule from '../../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as HeaderSharedModule from '../../../../main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
import * as Module09884Module from '../../../../../by-id/module-09884.js'; /* Metro dependency 9884 */
function _fun107731(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14441:6, offset: 0x02307181, size: 174 bytes, params: 8, frame: 18
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(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(9884) /* metro dependency 9884 */).createNativeStackNavigator();
let value = ReactModule;
const env0_4 = (Module09884Module).createNativeStackNavigator();
value = value.memo(DevToolsGuildPowerupsModal);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsGuildPowerupsModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsGuildPowerupsModal.tsx');
exports.default = value;
function DevToolsGuildPowerupsModal() { // fn#107732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14441:173, offset: 0x0230722f, size: 137 bytes, params: 1, frame: 19
const env0_0 = (NavigatorNativeModule).useAccessibilityNativeStackOptions();
const {Navigator, Screen} = env0_4;
return (
<Navigator screenOptions={screenOptions_107733}>
<Screen
name="DevToolsGuildPowerups"
options={function() {
return {title: 'Guild Powerups'};
}}
component={importDefault(14245) /* metro dependency 14245: DevToolsGuildPowerupsScreen */}
/>
</Navigator>
);
function DevToolsGuildPowerupsModalScreenOptions({navigation}) { // fn#107733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14441:298, owner: DevToolsGuildPowerupsModal.screenOptions, offset: 0x023072b8, size: 118 bytes, params: 2, frame: 16
const object = {headerTitle: headerTitle_107734};
object.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
object.headerTitleAlign = 'center';
copyDataProperties(object, env0_0, navigation);
copyDataProperties(object, (GetNavigationModalPresentation)(),
navigation);
return object;
function screenOptionsHeaderTitle_107734(a0) { // fn#107734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14441:330, owner: DevToolsGuildPowerupsModal.screenOptions.headerTitle, offset: 0x0230437f, size: 87 bytes, params: 2, frame: 16
const children = a0.children;
const value = Object.create(null);
value.children = 0;
const value2 = copyDataProperties({}, a0, value, children);
const GenericHeaderTitle = (HeaderSharedModule).GenericHeaderTitle;
return <GenericHeaderTitle title={children} {...value2} />;
}
}
}
}
function DevToolsGuildPowerupsModal() { // fn#107732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14441:173, offset: 0x0230722f, size: 137 bytes, params: 1, frame: 19
const env0_0 = (require(5280) /* metro dependency 5280: NavigatorNative */).useAccessibilityNativeStackOptions();
const {Navigator, Screen} = env0_4;
return (
<Navigator screenOptions={screenOptions_107733}>
<Screen
name="DevToolsGuildPowerups"
options={function() {
return {title: 'Guild Powerups'};
}}
component={importDefault(14245) /* metro dependency 14245: DevToolsGuildPowerupsScreen */}
/>
</Navigator>
);
}
function DevToolsGuildPowerupsModalScreenOptions({navigation}) { // fn#107733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14441:298, owner: DevToolsGuildPowerupsModal.screenOptions, offset: 0x023072b8, size: 118 bytes, params: 2, frame: 16
const object2 = {headerTitle: headerTitle_107734};
object2.headerLeft = (require(9603) /* metro dependency 9603: HeaderShared */).getRenderModalCloseImage(navigation);
object2.headerTitleAlign = 'center';
copyDataProperties(object2, env0_0, navigation);
copyDataProperties(object2, (importDefault(9893) /* metro dependency 9893: getNavigationModalPresentation */)(),
navigation);
return object2;
}
global.__d(_fun107731, 14244, [31, 33, 9884, 5280, 9603, 9893, 14245,
2]) /* metro module 14244, dependencies: [31, 33, 9884, 5280, 9603, 9893, 14245, 2] */;
@@ -1,21 +1,30 @@
/* Metro module 14245; source: modules/devtools/native/components/screens/DevToolsGuildPowerupsScreen.tsx; dependencies: [5, 31, 27, 1348, 12346, 1867, 3969, 14246, 661, 33, 4501, 697, 507, 3738, 8251, 12307, 14158, 6808, 14247, 1362, 1365, 1585, 566, 4573, 6231, 6238, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import UserSettingsProtoStore from '../../../../user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import UseSafeAreaInsetsNative from '../../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import SelectedGuildStore from '../../../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import AppliedGuildBoostStore from '../../../../../stores/AppliedGuildBoostStore.tsx'; /* Metro dependency 12346 */
import ToggleDismissibleContentDismissState from '../../../../dismissible_content/utils/toggleDismissibleContentDismissState.tsx'; /* Metro dependency 14158 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableSwitchRowNativeModule from '../../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as GuildPowerupsActionCreatorsModule from '../../../../premium/powerups/GuildPowerupsActionCreators.tsx'; /* Metro dependency 12307 */
function _fun107736(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:6, offset: 0x0230733c, size: 572 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const setWarningBoosts = function() {
return _setWarningBoosts.apply(this, arguments);
};
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 */;
let value = ReactNativeModule;
const env0_5 = value.ScrollView;
const env0_6 = value.View;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const appliedGuildBoostStore = importDefault(12346) /* metro dependency 12346: AppliedGuildBoostStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
value = require(14246) /* metro dependency 14246: DevToolsGuildPowerupsConstants */;
const env0_11 = value.GUILD_DCS;
const env0_12 = value.SERVER_TAG_GUILD_DCS;
@@ -23,234 +32,292 @@ function _fun107736(global, require, importDefault, importAll, module, exports,
const env0_14 = value.VANITY_URL_POWERUP_DCS;
const env0_15 = value.getGuildDCString;
const env0_16 = value.getUserDCString;
const env0_17 = (require(661) /* metro dependency 661: Constants */).Endpoints;
value = require(33) /* metro dependency 33 */;
const env0_18 = value.jsx;
const env0_19 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const object4 = {};
object.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const object3 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
object3.padding = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.gap = PX_16;
object2.scrollContainer = object4;
object3.gap = PX_16;
object.scrollContainer = object3;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object2.noGuildContainer = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', padding: PX_32};
const env0_20 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsGuildPowerupsScreen.tsx');
object.noGuildContainer = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', padding: PX_32};
const env0_20 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsGuildPowerupsScreen.tsx');
exports.default = DevToolsGuildPowerupsScreen;
}
function _setWarningBoosts() { // fn#107738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:711, offset: 0x02307578, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun107740).apply(this, arguments);
}
function _sendPowerupsSystemMessage() { // fn#107742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1063, offset: 0x023076a5, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun107744).apply(this, arguments);
}
function UserDCSwitchRow({dc}) { // fn#107745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1262, offset: 0x02307743, size: 109 bytes, params: 2, frame: 18
const {isDismissed,
handleToggleDismissState} = (importDefault(14158) /* metro dependency 14158: toggleDismissibleContentDismissState */)(dc);
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableSwitchRow
label={getUserDCString(dc)}
value={isDismissed}
onValueChange={handleToggleDismissState}
/>
);
}
function GuildDCSwitchRow({dc, guildId, isDismissed}) { // fn#107746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1429, offset: 0x023077b0, size: 131 bytes, params: 2, frame: 18
const value2 = env0_4.useCallback(_fun107747, [dc, guildId]);
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableSwitchRow
label={getGuildDCString(dc)}
value={isDismissed}
onValueChange={value2}
/>
);
}
function DevToolsGuildPowerupsScreen() { // fn#107748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1891, offset: 0x023078c6, size: 1099 bytes, params: 1, frame: 29
var r0;
var items4;
var object;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var items2;
var items3;
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const guildId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore],
function() {
return SelectedGuildStore.getGuildId();
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun107750);
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserSettingsProtoStore],
function() {
var r3;
var items = [];
arraySpread(items, SERVER_TAG_GUILD_DCS, arraySpread(items, GUILD_DCS, 0, r3), r3);
return items.filter(_fun107752);
});
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([AppliedGuildBoostStore],
_fun107753);
if (guildId == null) {
r0 = <View style={[styles.container,
styles.noGuildContainer]}>{((Text) => <Text variant="heading-md/semibold" color="text-muted">{'No guild selected'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
} else {
var scrollViewBindingProps = {style: styles.container};
items4 = [styles.scrollContainer];
object = {};
object.paddingBottom = value2.bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items4[1] = object;
scrollViewBindingProps.contentContainerStyle = items4;
items2 = [<TableRowGroup title={'Current Guild: ' + (value3 ?? 'Unknown')} hasIcons={false}><TableRow label="Reset Notification Indicators" onPress={onPress_107754} /></TableRowGroup>];
items3 = [<TableRow label="Set Half Boosts expiring in 1 day" onPress={onPress_107755} />];
items3[1] = <TableRow label="Reset End Date" onPress={onPress_107756} />;
items2[1] = <TableRowGroup title="Warning State" hasIcons={false}>{items3}</TableRowGroup>;
items2[2] = <TableRowGroup title="User Level DCs" hasIcons={false}>{USER_DCS.map(_fun107757)}</TableRowGroup>;
items2[3] = <TableRowGroup title="Guild Level DCs" hasIcons={false}>{GUILD_DCS.map(_fun107758)}</TableRowGroup>;
items2[4] = <TableRowGroup title="Server Tag Guild Level DCs" hasIcons={false}>{SERVER_TAG_GUILD_DCS.map(_fun107759)}</TableRowGroup>;
items2[5] = <TableRowGroup title="Powerup Rollback DCs" hasIcons={false}>{VANITY_URL_POWERUP_DCS.map(_fun107760)}</TableRowGroup>;
items2[6] = <TableRowGroup title="System Messages" hasIcons={false}><TableRow label="Send Powerups System Message" onPress={function() {
return _fun107762(guildId);
}} /></TableRowGroup>;
r0 = <ScrollView {...scrollViewBindingProps}>{items2}</ScrollView>;
}
return r0;
}
function* _fun107740(a0, a1, a2) { // fn#107740, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:768, offset: 0x023075b5, size: 240 bytes, params: 4, frame: 22
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var HTTP = binding(env2_2[12]).HTTP;
var patch = HTTP.patch;
var object3 = {};
var APPLIED_BOOST_MODIFY_END_DATE = env2_17.APPLIED_BOOST_MODIFY_END_DATE;
object3.url = APPLIED_BOOST_MODIFY_END_DATE;
var object4 = {};
object4.applied_boost_ids = a1.map(function(a0) {
return a0.id;
});
object4.ends_at = a2 ? null : env2_1(env2_2[13])().add(1, 'day');
object3.body = object4;
object3.rejectWithError = true;
yield Reflect.apply(patch, HTTP, [object3]);
if (false) {
return undefined;
function _setWarningBoosts() { // fn#107738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:711, offset: 0x02307578, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun107740).apply(this, arguments);
function* _fun107740(a0, a1, a2) { // fn#107740, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:768, offset: 0x023075b5, size: 240 bytes, params: 4, frame: 22
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var HTTP = binding(env2_2[12]).HTTP;
var patch = HTTP.patch;
var object = {};
var APPLIED_BOOST_MODIFY_END_DATE = env2_17.APPLIED_BOOST_MODIFY_END_DATE;
object.url = APPLIED_BOOST_MODIFY_END_DATE;
var object2 = {};
object2.applied_boost_ids = a1.map(function(a0) {
return a0.id;
});
object2.ends_at = a2 ? null : env2_1(env2_2[13])().add(1, 'day');
object.body = object2;
object.rejectWithError = true;
yield Reflect.apply(patch, HTTP, [object]);
if (false) {
return undefined;
}
binding = env2_0;
var binding2 = env2_2;
binding(binding2[14]).fetchAppliedGuildBoostsForGuild(a0);
binding(binding2[15]).fetchGuildBoostEntitlements(a0, true);
}
}
binding = env2_0;
var binding2 = env2_2;
binding(binding2[14]).fetchAppliedGuildBoostsForGuild(a0);
binding(binding2[15]).fetchGuildBoostEntitlements(a0, true);
}
}
function* _fun107744(a0) { // fn#107744, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1138, offset: 0x023076e2, size: 97 bytes, params: 2, frame: 16
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[12]).HTTP;
var post = HTTP.post;
var object2 = {};
object2.url = env2_17.SEND_POWERUPS_SYSTEM_MESSAGE(a0);
object2.rejectWithError = true;
yield Reflect.apply(post, HTTP, [object2]);
function _sendPowerupsSystemMessage() { // fn#107742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1063, offset: 0x023076a5, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun107744).apply(this, arguments);
function* _fun107744(a0) { // fn#107744, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1138, offset: 0x023076e2, size: 97 bytes, params: 2, frame: 16
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[12]).HTTP;
var post = HTTP.post;
var object = {};
object.url = env2_17.SEND_POWERUPS_SYSTEM_MESSAGE(a0);
object.rejectWithError = true;
yield Reflect.apply(post, HTTP, [object]);
}
}
}
}
function _fun107747(a0) { // fn#107747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1508, offset: 0x02307833, size: 147 bytes, params: 2, frame: 16
let value = environment.__proto__;
if (a0) {
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
value.markContentAsDismissed(dc, guildId, false);
} else {
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
value.removeDismissedRecurringContent((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.GUILD_POWERUP_NOTIFICATION);
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
value.unmarkContentAsDismissed(dc, guildId);
function UserDCSwitchRow({dc}) { // fn#107745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1262, offset: 0x02307743, size: 109 bytes, params: 2, frame: 18
const {isDismissed,
handleToggleDismissState} = (ToggleDismissibleContentDismissState)(dc);
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
return (
<TableSwitchRow
label={getUserDCString(dc)}
value={isDismissed}
onValueChange={handleToggleDismissState}
/>
);
}
}
function _fun107750() { // fn#107750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2044, offset: 0x02307d11, size: 59 bytes, params: 1, frame: 13
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding ? value2 == GuildStore.getGuild(guildId) ? undefined : GuildStore.getGuild(guildId).name : value2;
}
function GuildDCSwitchRow({dc, guildId, isDismissed}) { // fn#107746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1429, offset: 0x023077b0, size: 131 bytes, params: 2, frame: 18
const value2 = ReactModule.useCallback(_fun107747, [dc, guildId]);
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
return (
<TableSwitchRow
label={getGuildDCString(dc)}
value={isDismissed}
onValueChange={value2}
/>
);
function _fun107747(a0) { // fn#107747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1508, offset: 0x02307833, size: 147 bytes, params: 2, frame: 16
let value = environment.__proto__;
if (a0) {
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
value.markContentAsDismissed(dc, guildId, false);
} else {
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
value.removeDismissedRecurringContent((require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.GUILD_POWERUP_NOTIFICATION);
value = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
value.unmarkContentAsDismissed(dc, guildId);
}
}
function _fun107751() { // fn#107751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2156, offset: 0x02307d4c, size: 52 bytes, params: 1, frame: 14
const items2 = [];
arraySpread(items2, SERVER_TAG_GUILD_DCS, arraySpread(items2, GUILD_DCS, 0, undefined), undefined);
return items2.filter(_fun107752);
}
function _fun107753() { // fn#107753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2269, offset: 0x02307dbe, size: 45 bytes, params: 1, frame: 12
return guildId == null ? [] : AppliedGuildBoostStore.getAppliedGuildBoostsForGuild(guildId) ?? [];
}
function DevToolsGuildPowerupsScreenOnPress() { // fn#107754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2797, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307deb, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(12307) /* metro dependency 12307: GuildPowerupsActionCreators */).guildPowerupsResetNotifications();
}
function DevToolsGuildPowerupsScreenOnPress_107755() { // fn#107755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2989, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307e10, size: 72 bytes, params: 1, frame: 18
const value = environment.__proto__;
const setWarningBoostsBinding = setWarningBoosts;
const guildIdBinding = guildId;
const binding = env0_2;
const slice = binding.slice;
const Math = global.Math;
return setWarningBoostsBinding(guildIdBinding, Reflect.apply(slice, binding,
[Math.floor(binding.length / 2)]), false);
}
function DevToolsGuildPowerupsScreenOnPress_107756() { // fn#107756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3102, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307e58, size: 31 bytes, params: 1, frame: 15
return setWarningBoosts(guildId, env0_2, true);
}
function _fun107757(a0) { // fn#107757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3213, offset: 0x02307e77, size: 32 bytes, params: 2, frame: 15
return <UserDCSwitchRow dc={a0} key={a0} />;
}
function _fun107758(a0) { // fn#107758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3326, offset: 0x02307e97, size: 62 bytes, params: 2, frame: 16
return (
<GuildDCSwitchRow
dc={a0}
guildId={guildId}
isDismissed={env0_1.includes(a0)}
key={a0}
/>
);
}
function DevToolsGuildPowerupsScreenOnPress_107761() { // fn#107761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3814, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307ed5, size: 25 bytes, params: 1, frame: 11
return (function() {
return _sendPowerupsSystemMessage.apply(this, arguments);
})(guildId);
}
function _fun107752(a0) { // fn#107752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2180, offset: 0x02307d80, size: 62 bytes, params: 2, frame: 14
var r0;
var value3;
var moduleValue;
const value = environment.__proto__;
const value2 = guildId != null;
if (value2) {
value3 = environment.__proto__.__proto__;
moduleValue = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
r0 = moduleValue.isContentDismissed(a0, guildId);
} else {
r0 = value2;
}
return r0;
function DevToolsGuildPowerupsScreen() { // fn#107748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:1891, offset: 0x023078c6, size: 1099 bytes, params: 1, frame: 29
var r0;
var items4;
var object2;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
var items2;
var items3;
const styles = useStyles();
const value2 = (UseSafeAreaInsetsNative)();
const guildId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore],
function() {
return SelectedGuildStore.getGuildId();
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun107750);
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserSettingsProtoStore],
function() {
var r3;
var items = [];
arraySpread(items, SERVER_TAG_GUILD_DCS, arraySpread(items, GUILD_DCS, 0, r3), r3);
return items.filter(_fun107752);
});
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([AppliedGuildBoostStore],
_fun107753);
if (guildId == null) {
r0 = (
<View style={[styles.container, styles.noGuildContainer]}>
{((Text) => <Text variant="heading-md/semibold" color="text-muted">{'No guild selected'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
} else {
var scrollViewBindingProps = {style: styles.container};
items4 = [styles.scrollContainer];
object2 = {};
object2.paddingBottom = value2.bottom + (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items4[1] = object2;
scrollViewBindingProps.contentContainerStyle = items4;
items2 = [
<TableRowGroup title={'Current Guild: ' + (value3 ?? 'Unknown')} hasIcons={false}>
<TableRow label="Reset Notification Indicators" onPress={onPress_107754} />
</TableRowGroup>,
];
items3 = [
<TableRow label="Set Half Boosts expiring in 1 day" onPress={onPress_107755} />,
];
items3[1] = <TableRow label="Reset End Date" onPress={onPress_107756} />;
items2[1] = (
<TableRowGroup title="Warning State" hasIcons={false}>
{items3}
</TableRowGroup>
);
items2[2] = (
<TableRowGroup title="User Level DCs" hasIcons={false}>
{USER_DCS.map(_fun107757)}
</TableRowGroup>
);
items2[3] = (
<TableRowGroup title="Guild Level DCs" hasIcons={false}>
{GUILD_DCS.map(_fun107758)}
</TableRowGroup>
);
items2[4] = (
<TableRowGroup title="Server Tag Guild Level DCs" hasIcons={false}>
{SERVER_TAG_GUILD_DCS.map(_fun107759)}
</TableRowGroup>
);
items2[5] = (
<TableRowGroup title="Powerup Rollback DCs" hasIcons={false}>
{VANITY_URL_POWERUP_DCS.map(_fun107760)}
</TableRowGroup>
);
items2[6] = (
<TableRowGroup title="System Messages" hasIcons={false}>
<TableRow label="Send Powerups System Message" onPress={function() {
return _fun107762(guildId);
}} />
</TableRowGroup>
);
r0 = (
<ScrollView {...scrollViewBindingProps}>
{items2}
</ScrollView>
);
}
return r0;
function _fun107750() { // fn#107750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2044, offset: 0x02307d11, size: 59 bytes, params: 1, frame: 13
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding ? value2 == GuildStore.getGuild(guildId) ? undefined : GuildStore.getGuild(guildId).name : value2;
}
function _fun107751() { // fn#107751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2156, offset: 0x02307d4c, size: 52 bytes, params: 1, frame: 14
const items2 = [];
arraySpread(items2, SERVER_TAG_GUILD_DCS, arraySpread(items2, GUILD_DCS, 0, undefined), undefined);
return items2.filter(_fun107752);
function _fun107752(a0) { // fn#107752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2180, offset: 0x02307d80, size: 62 bytes, params: 2, frame: 14
var r0;
var value3;
var moduleValue;
const value = environment.__proto__;
const value2 = guildId != null;
if (value2) {
value3 = environment.__proto__.__proto__;
moduleValue = require(14247) /* metro dependency 14247: GuildDismissibleContentUtils */;
r0 = moduleValue.isContentDismissed(a0, guildId);
} else {
r0 = value2;
}
return r0;
}
}
function _fun107753() { // fn#107753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2269, offset: 0x02307dbe, size: 45 bytes, params: 1, frame: 12
return guildId == null ? [] : AppliedGuildBoostStore.getAppliedGuildBoostsForGuild(guildId) ?? [];
}
function DevToolsGuildPowerupsScreenOnPress() { // fn#107754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2797, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307deb, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (GuildPowerupsActionCreatorsModule).guildPowerupsResetNotifications();
}
function DevToolsGuildPowerupsScreenOnPress_107755() { // fn#107755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:2989, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307e10, size: 72 bytes, params: 1, frame: 18
const value = environment.__proto__;
const setWarningBoostsBinding = setWarningBoosts;
const guildIdBinding = guildId;
const binding = env0_2;
const slice = binding.slice;
const Math = global.Math;
return setWarningBoostsBinding(guildIdBinding, Reflect.apply(slice, binding,
[Math.floor(binding.length / 2)]), false);
}
function DevToolsGuildPowerupsScreenOnPress_107756() { // fn#107756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3102, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307e58, size: 31 bytes, params: 1, frame: 15
return setWarningBoosts(guildId, env0_2, true);
}
function _fun107757(a0) { // fn#107757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3213, offset: 0x02307e77, size: 32 bytes, params: 2, frame: 15
return <UserDCSwitchRow dc={a0} key={a0} />;
}
function _fun107758(a0) { // fn#107758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3326, offset: 0x02307e97, size: 62 bytes, params: 2, frame: 16
return (
<GuildDCSwitchRow
dc={a0}
guildId={guildId}
isDismissed={env0_1.includes(a0)}
key={a0}
/>
);
}
function _fun107759(a0) { // fn#107759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3487, offset: 0x02307e97, size: 62 bytes, params: 2, frame: 16
return (
<GuildDCSwitchRow
dc={a0}
guildId={guildId}
isDismissed={env0_1.includes(a0)}
key={a0}
/>
);
}
function _fun107760(a0) { // fn#107760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3642, offset: 0x02307e77, size: 32 bytes, params: 2, frame: 15
return <UserDCSwitchRow dc={a0} key={a0} />;
}
function DevToolsGuildPowerupsScreenOnPress_107761() { // fn#107761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3814, owner: DevToolsGuildPowerupsScreen.onPress, offset: 0x02307ed5, size: 25 bytes, params: 1, frame: 11
return (function() {
return _sendPowerupsSystemMessage.apply(this, arguments);
})(guildId);
function sendPowerupsSystemMessage() { // fn#107762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14442:3818, owner: DevToolsGuildPowerupsScreen.onPress.sendPowerupsSystemMessage, offset: 0x02307eee, size: 30 bytes, params: 1, frame: 13
return _sendPowerupsSystemMessage.apply(this, arguments);
}
}
}
}
global.__d(_fun107736, 14245, [5, 31, 27, 1348, 12346, 1867, 3969, 14246, 661, 33, 4501, 697, 507, 3738, 8251,
12307, 14158, 6808, 14247, 1362, 1365, 1585, 566, 4573, 6231, 6238,
2]) /* metro module 14245, dependencies: [5, 31, 27, 1348, 12346, 1867, 3969, 14246, 661, 33, 4501, 697, 507, 3738, 8251, 12307, 14158, 6808, 14247, 1362, 1365, 1585, 566, 4573, 6231, 6238, 2] */;
@@ -1,93 +1,134 @@
/* Metro module 13135; source: modules/devtools/native/components/screens/DevToolsLocalMessageCache.tsx; dependencies: [27, 1379, 33, 4501, 697, 6238, 4572, 6231, 4900, 4573, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
function _fun100369(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:6, offset: 0x021e63bb, size: 276 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 */).ScrollView;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentContainer = {padding: PX_16};
const env0_7 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsLocalMessageCache.tsx');
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (Native).space.PX_16;
object.contentContainer = {padding: PX_16};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsLocalMessageCache.tsx');
exports.default = DevToolsLocalMessageCache;
}
function CacheLogEntry({entry}) { // fn#100370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:297, offset: 0x021e64cf, size: 686 bytes, params: 2, frame: 29
var count;
const Date = global.Date;
let date = new Date(entry.startTime);
date = date.toLocaleString();
date = '' + date;
const before = entry.before;
const value2 = 'null';
let r5 = before ?? value2;
let r7 = entry.after ?? value2;
const value3 = 'Before: ' + r5 + ', After: ' + r7 + ', Limit: ' + entry.limit;
let localMessageDetails = entry.localMessageDetails;
if (localMessageDetails != null) {
localMessageDetails = entry.localMessageDetails;
count = localMessageDetails.count;
localMessageDetails = entry.localMessageDetails;
r7 = 'Cache Hit: ' + count + ' messages in ' + (localMessageDetails.loadTime - entry.startTime) + 'ms';
} else {
r7 = 'Cache Missed';
function CacheLogEntry({entry}) { // fn#100370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:297, offset: 0x021e64cf, size: 686 bytes, params: 2, frame: 29
var count;
const Date = global.Date;
let date = new Date(entry.startTime);
date = date.toLocaleString();
date = '' + date;
const before = entry.before;
const value2 = 'null';
let r5 = before ?? value2;
let r7 = entry.after ?? value2;
const value3 = 'Before: ' + r5 + ', After: ' + r7 + ', Limit: ' + entry.limit;
let localMessageDetails = entry.localMessageDetails;
if (localMessageDetails != null) {
localMessageDetails = entry.localMessageDetails;
count = localMessageDetails.count;
localMessageDetails = entry.localMessageDetails;
r7 = 'Cache Hit: ' + count + ' messages in ' + (localMessageDetails.loadTime - entry.startTime) + 'ms';
} else {
r7 = 'Cache Missed';
}
let networkMessageDetails = entry.networkMessageDetails;
if (networkMessageDetails != null) {
networkMessageDetails = entry.networkMessageDetails;
count = networkMessageDetails.count;
networkMessageDetails = entry.networkMessageDetails;
r5 = 'Network: ' + count + ' messages in ' + (networkMessageDetails.loadTime - entry.startTime) + 'ms';
} else {
r5 = 'No Network Fetch';
}
const r4 = entry.localMessageDetails == null ? 'Comparision unavailable (no local cache data)' : entry.networkMessageDetails == null ? 'Comparision unavailable (no network data)' : entry.localMessageDetails.count !== entry.networkMessageDetails.count ? 'Cache had ' + entry.localMessageDetails.count + ' messages vs ' + entry.networkMessageDetails.count + ' from network' : entry.localMessageDetails.lastMessageId === entry.networkMessageDetails.lastMessageId ? 'Cache was up-to-date' : 'Cache last message ID ' + entry.localMessageDetails.lastMessageId + ' differs from network last message ID ' + entry.networkMessageDetails.lastMessageId;
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label={'' + ChannelStore.getChannel(entry.channelId)?.name}
subLabel={[date, value3, r7, r5, r4].join('\n')}
/>
);
}
let networkMessageDetails = entry.networkMessageDetails;
if (networkMessageDetails != null) {
networkMessageDetails = entry.networkMessageDetails;
count = networkMessageDetails.count;
networkMessageDetails = entry.networkMessageDetails;
r5 = 'Network: ' + count + ' messages in ' + (networkMessageDetails.loadTime - entry.startTime) + 'ms';
} else {
r5 = 'No Network Fetch';
function DevToolsLocalMessageCache() { // fn#100371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:1623, offset: 0x021e677d, size: 641 bytes, params: 1, frame: 31
const styles = useStyles();
const Stack = (StackNativeModule).Stack;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const items3 = [
<TableRow
label="Channels Fetched"
subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchStarted.size}
/>,
];
items3[1] = (
<TableRow
label="Cache Hits"
subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedWithLocalMessages.size}
/>
);
items3[2] = (
<TableRow
label="Cache Misses"
subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedNetwork.size - (importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedWithLocalMessages.size}
/>
);
items3[3] = (
<TableRow
label="Incomplete Fetches"
subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchStarted.size - (importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedNetwork.size}
/>
);
const items2 = [
<TableRowGroup title="Local Message Cache Stats" hasIcons={false}>
{items3}
</TableRowGroup>,
];
const Text = (TextModule).Text;
items2[1] = (
<Text variant="text-sm/normal" color="text-muted">
{'Cumulative since app launch. Does not update dynamically.'}
</Text>
);
const Array = global.Array;
const from = Array.from;
const fetchLogs = (importDefault(4900) /* metro dependency 4900: MessageCacheStats */).fetchLogs;
let value = Reflect.apply(from, Array, [fetchLogs.values()]);
value = value.reverse();
items2[2] = (
<TableRowGroup title="Fetch Log (Reversed)" hasIcons={false}>
{value.map(_fun100372)}
</TableRowGroup>
);
return (
<ScrollView style={styles.container} contentContainerStyle={styles.contentContainer}>
<Stack spacing={8}>
{items2}
</Stack>
</ScrollView>
);
function _fun100372(a0, a1) { // fn#100372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:2579, offset: 0x021e69fe, size: 35 bytes, params: 3, frame: 15
return <CacheLogEntry entry={a0} key={a1} />;
}
}
const r4 = entry.localMessageDetails == null ? 'Comparision unavailable (no local cache data)' : entry.networkMessageDetails == null ? 'Comparision unavailable (no network data)' : entry.localMessageDetails.count !== entry.networkMessageDetails.count ? 'Cache had ' + entry.localMessageDetails.count + ' messages vs ' + entry.networkMessageDetails.count + ' from network' : entry.localMessageDetails.lastMessageId === entry.networkMessageDetails.lastMessageId ? 'Cache was up-to-date' : 'Cache last message ID ' + entry.localMessageDetails.lastMessageId + ' differs from network last message ID ' + entry.networkMessageDetails.lastMessageId;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={'' + ChannelStore.getChannel(entry.channelId)?.name}
subLabel={[date, value3, r7, r5, r4].join('\n')}
/>
);
}
function DevToolsLocalMessageCache() { // fn#100371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:1623, offset: 0x021e677d, size: 641 bytes, params: 1, frame: 31
const styles = useStyles();
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const items3 = [<TableRow label="Channels Fetched" subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchStarted.size} />];
items3[1] = <TableRow label="Cache Hits" subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedWithLocalMessages.size} />;
items3[2] = <TableRow label="Cache Misses" subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedNetwork.size - (importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedWithLocalMessages.size} />;
items3[3] = <TableRow label="Incomplete Fetches" subLabel={(importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchStarted.size - (importDefault(4900) /* metro dependency 4900: MessageCacheStats */).channelsFetchedNetwork.size} />;
const items2 = [<TableRowGroup title="Local Message Cache Stats" hasIcons={false}>{items3}</TableRowGroup>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text variant="text-sm/normal" color="text-muted">{'Cumulative since app launch. Does not update dynamically.'}</Text>;
const Array = global.Array;
const from = Array.from;
const fetchLogs = (importDefault(4900) /* metro dependency 4900: MessageCacheStats */).fetchLogs;
let value = Reflect.apply(from, Array, [fetchLogs.values()]);
value = value.reverse();
items2[2] = <TableRowGroup title="Fetch Log (Reversed)" hasIcons={false}>{value.map(_fun100372)}</TableRowGroup>;
return (
<ScrollView style={styles.container} contentContainerStyle={styles.contentContainer}>
<Stack spacing={8}>
{items2}
</Stack>
</ScrollView>
);
}
function _fun100372(a0, a1) { // fn#100372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13325:2579, offset: 0x021e69fe, size: 35 bytes, params: 3, frame: 15
return <CacheLogEntry entry={a0} key={a1} />;
}
global.__d(_fun100369, 13135, [27, 1379, 33, 4501, 697, 6238, 4572, 6231, 4900, 4573,
2]) /* metro module 13135, dependencies: [27, 1379, 33, 4501, 697, 6238, 4572, 6231, 4900, 4573, 2] */;
@@ -1,61 +1,91 @@
/* Metro module 13134; source: modules/devtools/native/components/screens/DevToolsLoggingFlagsScreen.tsx; dependencies: [27, 691, 33, 4501, 697, 566, 6231, 6808, 693, 2] */
import DeveloperOptionsStore from '../../../../../stores/DeveloperOptionsStore.tsx'; /* Metro dependency 691 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as DeveloperOptionsActionCreatorsModule from '../../../../../actions/DeveloperOptionsActionCreators.tsx'; /* Metro dependency 693 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableSwitchRowNativeModule from '../../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
function _fun100363(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:6, offset: 0x021e60a8, size: 256 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).ScrollView;
const developerOptionsStore = importDefault(691) /* metro dependency 691: DeveloperOptionsStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsLoggingFlagsScreen.tsx');
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (Native).space.PX_16;
object.content = {padding: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsLoggingFlagsScreen.tsx');
exports.default = DevToolsLoggingFlagsScreen;
function DevToolsLoggingFlagsScreen() { // fn#100364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:398, offset: 0x021e61a8, size: 343 bytes, params: 1, frame: 25
const styles = useStyles();
const {isLoggingGatewayEvents, isLoggingAnalyticsEvents,
isTracingRequests} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([DeveloperOptionsStore],
function() {
var developerOptionsStoreBinding = DeveloperOptionsStore;
return {isLoggingGatewayEvents: developerOptionsStoreBinding.isLoggingGatewayEvents,
isLoggingAnalyticsEvents: developerOptionsStoreBinding.isLoggingAnalyticsEvents,
isTracingRequests: developerOptionsStoreBinding.isTracingRequests};
});
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const items2 = [
<TableSwitchRow
label="Gateway Events"
subLabel="Logs all gateway events to console, including content. Enable verbose logs to see them."
value={isLoggingGatewayEvents}
onValueChange={onValueChange_100366}
/>,
];
items2[1] = (
<TableSwitchRow
label="Analytics Events"
subLabel="Logs all analytics events to the developer console."
value={isLoggingAnalyticsEvents}
onValueChange={onValueChange_100367}
/>
);
items2[2] = (
<TableSwitchRow
label="Tracing Requests"
subLabel="Force trace all client requests with APM."
value={isTracingRequests}
onValueChange={onValueChange_100368}
/>
);
return (
<ScrollView style={styles.container} contentContainerStyle={styles.content}>
<TableRowGroup title="Logging" hasIcons={false}>
{items2}
</TableRowGroup>
</ScrollView>
);
function DevToolsLoggingFlagsScreenOnValueChange(a0) { // fn#100366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:1016, owner: DevToolsLoggingFlagsScreen.onValueChange, offset: 0x021e632b, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (DeveloperOptionsActionCreatorsModule).setDeveloperOptionSettings({logGatewayEvents: a0});
}
function DevToolsLoggingFlagsScreenOnValueChange_100367(a0) { // fn#100367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:1214, owner: DevToolsLoggingFlagsScreen.onValueChange, offset: 0x021e635b, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (DeveloperOptionsActionCreatorsModule).setDeveloperOptionSettings({logAnalyticsEvents: a0});
}
function DevToolsLoggingFlagsScreenOnValueChange_100368(a0) { // fn#100368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:1404, owner: DevToolsLoggingFlagsScreen.onValueChange, offset: 0x021e638b, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (DeveloperOptionsActionCreatorsModule).setDeveloperOptionSettings({trace: a0});
}
}
}
function DevToolsLoggingFlagsScreen() { // fn#100364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:398, offset: 0x021e61a8, size: 343 bytes, params: 1, frame: 25
const styles = useStyles();
const {isLoggingGatewayEvents, isLoggingAnalyticsEvents,
isTracingRequests} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([DeveloperOptionsStore],
function() {
return {isLoggingGatewayEvents: DeveloperOptionsStore.isLoggingGatewayEvents,
isLoggingAnalyticsEvents: DeveloperOptionsStore.isLoggingAnalyticsEvents,
isTracingRequests: DeveloperOptionsStore.isTracingRequests};
});
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const items2 = [<TableSwitchRow label="Gateway Events" subLabel="Logs all gateway events to console, including content. Enable verbose logs to see them." value={isLoggingGatewayEvents} onValueChange={onValueChange_100366} />];
items2[1] = <TableSwitchRow label="Analytics Events" subLabel="Logs all analytics events to the developer console." value={isLoggingAnalyticsEvents} onValueChange={onValueChange_100367} />;
items2[2] = <TableSwitchRow label="Tracing Requests" subLabel="Force trace all client requests with APM." value={isTracingRequests} onValueChange={onValueChange_100368} />;
return (
<ScrollView style={styles.container} contentContainerStyle={styles.content}>
<TableRowGroup title="Logging" hasIcons={false}>
{items2}
</TableRowGroup>
</ScrollView>
);
}
function DevToolsLoggingFlagsScreenOnValueChange(a0) { // fn#100366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:1016, owner: DevToolsLoggingFlagsScreen.onValueChange, offset: 0x021e632b, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (require(693) /* metro dependency 693: DeveloperOptionsActionCreators */).setDeveloperOptionSettings({logGatewayEvents: a0});
}
function DevToolsLoggingFlagsScreenOnValueChange_100367(a0) { // fn#100367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:1214, owner: DevToolsLoggingFlagsScreen.onValueChange, offset: 0x021e635b, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (require(693) /* metro dependency 693: DeveloperOptionsActionCreators */).setDeveloperOptionSettings({logAnalyticsEvents: a0});
}
function DevToolsLoggingFlagsScreenOnValueChange_100368(a0) { // fn#100368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13324:1404, owner: DevToolsLoggingFlagsScreen.onValueChange, offset: 0x021e638b, size: 48 bytes, params: 2, frame: 12
const value = environment.__proto__;
return (require(693) /* metro dependency 693: DeveloperOptionsActionCreators */).setDeveloperOptionSettings({trace: a0});
}
global.__d(_fun100363, 13134, [27, 691, 33, 4501, 697, 566, 6231, 6808, 693,
2]) /* metro module 13134, dependencies: [27, 691, 33, 4501, 697, 566, 6231, 6808, 693, 2] */;
@@ -1,203 +1,321 @@
/* Metro module 14199; source: modules/devtools/native/components/screens/DevToolsOTATestScreen.tsx; dependencies: [5, 57, 31, 27, 482, 33, 4501, 697, 6275, 6758, 4573, 10560, 4080, 4572, 6231, 6238, 13957, 6797, 10330, 4062, 14200, 2] */
import Module00005 from '../../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import BundleUpdater from '../../../../../lib/native/BundleUpdater.tsx'; /* Metro dependency 10560 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as DownloadIconModule from '../../../../../design/components/Icon/native/redesign/generated/DownloadIcon.tsx'; /* Metro dependency 4062 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as ClipboardUtilsNativeModule from '../../../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as PaperIconModule from '../../../../../design/components/Icon/native/redesign/generated/PaperIcon.tsx'; /* Metro dependency 10330 */
import * as WrenchIconModule from '../../../../../design/components/Icon/native/redesign/generated/WrenchIcon.tsx'; /* Metro dependency 13957 */
import * as ClipboardCheckIconModule from '../../../../../design/components/Icon/native/redesign/generated/ClipboardCheckIcon.tsx'; /* Metro dependency 14200 */
function _fun107364(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:6, offset: 0x022f93af, size: 411 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(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_6 = value.ScrollView;
const env0_7 = value.View;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.wrap = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
object.wrap = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.contentContainer = {padding: PX_16};
const object3 = {};
object.contentContainer = {padding: PX_16};
const object4 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object4.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.paddingVertical = PX_8;
object2.verificationLine = object3;
object4.paddingVertical = PX_8;
object.verificationLine = object4;
const CODE_NORMAL = Fonts.CODE_NORMAL;
object2.verificationFailure = {fontFamily: CODE_NORMAL};
const env0_10 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsOTATestScreen.tsx');
object.verificationFailure = {fontFamily: CODE_NORMAL};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsOTATestScreen.tsx');
exports.default = DevToolsOTATestScreen;
}
function OtaVerificationActionSheet({result}) { // fn#107365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:480, offset: 0x022f954a, size: 954 bytes, params: 2, frame: 33
var length;
var r6;
var r5;
var items5;
var items6;
var failures;
var value;
const styles = useStyles();
const totalFileCount = result.totalFileCount;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object2.header = <BottomSheetTitleHeader title="OTA Verification Result" />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="heading-md/bold">{'Has OTA Applied'}</Text>;
const hasOtaApplied = result.hasOtaApplied;
const value4 = 'No';
const items2 = [<View style={styles.verificationLine}>{text}<Text variant="text-md/normal">{hasOtaApplied ? 'Yes' : value4}</Text></View>];
items2[1] = <View style={styles.verificationLine}><Text variant="heading-md/bold">{'Has Local Copy'}</Text><Text variant="text-md/normal">{result.hasLocalCopy == null ? '--' : result.hasLocalCopy ? 'Yes' : value4}</Text></View>;
items2[2] = <View style={styles.verificationLine}><Text variant="heading-md/bold">{'OTA is Valid'}</Text><Text variant="text-md/normal">{result.isValid ? 'Yes' : value4}</Text></View>;
if (totalFileCount === null) {
r6 = null;
} else {
var viewBindingProps = {style: styles.verificationLine};
items5 = [<Text variant="heading-md/bold">{'File Counts'}</Text>];
items6 = [result.totalFileCount, ' files. '];
length = result.successes?.length;
items6[2] = length;
items6[3] = ' successes, ';
length = result.failures?.length;
items6[4] = length;
items6[5] = ' failures.';
items5[1] = <Text variant="text-md/normal">{items6}</Text>;
r6 = <View {...viewBindingProps}>{items5}</View>;
}
items2[3] = r6;
if (result.failures.length > 0) {
var viewBindingProps = {style: styles.verificationLine};
value = <Text variant="heading-md/bold">{'Failures'}</Text>;
failures = result.failures;
value = <View {...viewBindingProps}>{[value, failures.map(_fun107366)]}</View>;
r5 = value;
} else {
r5 = null;
}
items2[4] = r5;
return (
<BottomSheet {...object2}>
{items2}
</BottomSheet>
);
}
function DevToolsOTATestScreen() { // fn#107367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:1942, offset: 0x022f9953, size: 1316 bytes, params: 1, frame: 39
const value2 = undefined;
const styles = useStyles();
const binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_1 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value5[0];
const env0_2 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property3 = value6[0];
const env0_3 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property4 = value7[0];
var env0_4 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property5 = value8[0];
var env0_5 = value8[1];
binding.useEffect(_fun107371, []);
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const WrenchIcon = (require(13957) /* metro dependency 13957: WrenchIcon */).WrenchIcon;
const items2 = [<TableRowGroup title="OTA Status" hasIcons><TableRow label="Status" subLabel={property4} icon={<WrenchIcon />} /><TableRow label="Root Path (tap to copy)" subLabel={property} onPress={onPress_107372} /></TableRowGroup>];
const tableRow = <TableRow label="Manifest Source" subLabel={(property2 == null ? value2 : property2.source) ?? 'Unknown'} icon={<WrenchIcon />} />;
const PaperIcon = (require(10330) /* metro dependency 10330: PaperIcon */).PaperIcon;
items2[1] = <TableRowGroup title="Manifest" hasIcons>{tableRow}<TableRow icon={<PaperIcon />} label={property2 != null ? global.JSON.stringify(property2.metadata ?? ({}),
null, 2) : '{}'} /></TableRowGroup>;
items2[2] = <TableRowGroup title="Build Override Cookie" hasIcons><TableRow icon={<WrenchIcon />} label="Is cookie set?" subLabel={property3 == null ? 'No' : 'Yes'} />{property3 != null && <TableRow icon={<WrenchIcon />} label={global.JSON.stringify(property3,
null, 2)} />}</TableRowGroup>;
const DownloadIcon = (require(4062) /* metro dependency 4062: DownloadIcon */).DownloadIcon;
const tableRow2 = <TableRow label={'Check for Update & Reload'} icon={<DownloadIcon />} onPress={(importDefault(10560) /* metro dependency 10560: BundleUpdater */).checkForUpdateAndReload} />;
const r18 = property5 ? 'Verification in progress' : 'Verify content hashes for all app files';
const ClipboardCheckIcon = (require(14200) /* metro dependency 14200: ClipboardCheckIcon */).ClipboardCheckIcon;
items2[3] = <TableRowGroup title="Actions" hasIcons>{tableRow2}<TableRow label="Verify OTA Files" subLabel={r18} icon={<ClipboardCheckIcon />} onPress={function() {
return _verifyFiles.apply(this, arguments);
}} disabled={property5} /></TableRowGroup>;
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.contentContainer}>
<Stack spacing={16}>
{items2}
</Stack>
</ScrollView>
);
}
function _fun107366(a0) { // fn#107366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:1728, offset: 0x022f9904, size: 79 bytes, params: 2, frame: 16
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-md/normal"
style={styles.verificationFailure}
key={a0}
>
{a0}
</Text>
);
}
function _verifyFiles() { // fn#107368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2193, owner: DevToolsOTATestScreen._verifyFiles, offset: 0x022f9e77, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun107370).apply(this, arguments);
}
function _fun107371() { // fn#107371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2461, offset: 0x022f9f5a, size: 153 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getOtaRootPath();
value.then(env0_1);
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getManifestInfo();
value.then(env0_2);
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getBuildOverrideCookieContents();
value.then(env0_3);
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getOtaStatus();
value.then(env0_4);
}
function DevToolsOTATestScreenOnPress() { // fn#107372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2949, owner: DevToolsOTATestScreen.onPress, offset: 0x022f9ff3, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_0);
}
function* _fun107370() { // fn#107370, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2240, offset: 0x022f9eb7, size: 163 bytes, params: 1, frame: 19
if (true) {
value = environment.__proto__.__proto__;
env2_5(true);
var value4 = env3_1(env3_2[11]);
yield value4.verifyOtaFiles();
var value5 = undefined;
if (false) {
return value5;
function OtaVerificationActionSheet({result}) { // fn#107365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:480, offset: 0x022f954a, size: 954 bytes, params: 2, frame: 33
var length;
var r6;
var r5;
var items5;
var items6;
var failures;
var value;
const styles = useStyles();
const totalFileCount = result.totalFileCount;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object.header = <BottomSheetTitleHeader title="OTA Verification Result" />;
const Text = (TextModule).Text;
const text = (
<Text variant="heading-md/bold">
{'Has OTA Applied'}
</Text>
);
const hasOtaApplied = result.hasOtaApplied;
const value4 = 'No';
const items2 = [
<View style={styles.verificationLine}>
{text}
<Text variant="text-md/normal">
{hasOtaApplied ? 'Yes' : value4}
</Text>
</View>,
];
items2[1] = (
<View style={styles.verificationLine}>
<Text variant="heading-md/bold">
{'Has Local Copy'}
</Text>
<Text variant="text-md/normal">
{result.hasLocalCopy == null ? '--' : result.hasLocalCopy ? 'Yes' : value4}
</Text>
</View>
);
items2[2] = (
<View style={styles.verificationLine}>
<Text variant="heading-md/bold">
{'OTA is Valid'}
</Text>
<Text variant="text-md/normal">
{result.isValid ? 'Yes' : value4}
</Text>
</View>
);
if (totalFileCount === null) {
r6 = null;
} else {
var viewBindingProps = {style: styles.verificationLine};
items5 = [
<Text variant="heading-md/bold">
{'File Counts'}
</Text>,
];
items6 = [result.totalFileCount, ' files. '];
length = result.successes?.length;
items6[2] = length;
items6[3] = ' successes, ';
length = result.failures?.length;
items6[4] = length;
items6[5] = ' failures.';
items5[1] = (
<Text variant="text-md/normal">
{items6}
</Text>
);
r6 = (
<View {...viewBindingProps}>
{items5}
</View>
);
}
env2_5(false);
value = env3_1(env3_2[12]);
var openLazy = value.openLazy;
var Promise = global.Promise;
Reflect.apply(openLazy, value, [Promise.resolve({default: env3_11}), 'OtaVerificationActionSheet',
{result: value5}]);
items2[3] = r6;
if (result.failures.length > 0) {
var viewBindingProps = {style: styles.verificationLine};
value = (
<Text variant="heading-md/bold">
{'Failures'}
</Text>
);
failures = result.failures;
value = (
<View {...viewBindingProps}>
{[value, failures.map(_fun107366)]}
</View>
);
r5 = value;
} else {
r5 = null;
}
items2[4] = r5;
return (
<BottomSheet {...object}>
{items2}
</BottomSheet>
);
function _fun107366(a0) { // fn#107366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:1728, offset: 0x022f9904, size: 79 bytes, params: 2, frame: 16
const Text = (TextModule).Text;
return (
<Text
variant="text-md/normal"
style={styles.verificationFailure}
key={a0}
>
{a0}
</Text>
);
}
}
function DevToolsOTATestScreen() { // fn#107367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:1942, offset: 0x022f9953, size: 1316 bytes, params: 1, frame: 39
const value2 = undefined;
const styles = useStyles();
const binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_1 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value5[0];
const env0_2 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property3 = value6[0];
const env0_3 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property4 = value7[0];
var env0_4 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property5 = value8[0];
var env0_5 = value8[1];
binding.useEffect(_fun107371, []);
const Stack = (StackNativeModule).Stack;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const WrenchIcon = (WrenchIconModule).WrenchIcon;
const items2 = [
<TableRowGroup title="OTA Status" hasIcons>
<TableRow
label="Status"
subLabel={property4}
icon={<WrenchIcon />}
/>
<TableRow
label="Root Path (tap to copy)"
subLabel={property}
onPress={onPress_107372}
/>
</TableRowGroup>,
];
const tableRow = (
<TableRow
label="Manifest Source"
subLabel={(property2 == null ? value2 : property2.source) ?? 'Unknown'}
icon={<WrenchIcon />}
/>
);
const PaperIcon = (PaperIconModule).PaperIcon;
items2[1] = (
<TableRowGroup title="Manifest" hasIcons>
{tableRow}
<TableRow
icon={<PaperIcon />}
label={property2 != null ? global.JSON.stringify(property2.metadata ?? ({}), null, 2) : '{}'}
/>
</TableRowGroup>
);
items2[2] = (
<TableRowGroup title="Build Override Cookie" hasIcons>
<TableRow
icon={<WrenchIcon />}
label="Is cookie set?"
subLabel={property3 == null ? 'No' : 'Yes'}
/>
{property3 != null && <TableRow icon={<WrenchIcon />} label={global.JSON.stringify(property3, null, 2)} />}
</TableRowGroup>
);
const DownloadIcon = (DownloadIconModule).DownloadIcon;
const tableRow2 = (
<TableRow
label={'Check for Update & Reload'}
icon={<DownloadIcon />}
onPress={(BundleUpdater).checkForUpdateAndReload}
/>
);
const r18 = property5 ? 'Verification in progress' : 'Verify content hashes for all app files';
const ClipboardCheckIcon = (ClipboardCheckIconModule).ClipboardCheckIcon;
items2[3] = (
<TableRowGroup title="Actions" hasIcons>
{tableRow2}
<TableRow
label="Verify OTA Files"
subLabel={r18}
icon={<ClipboardCheckIcon />}
onPress={function() {
return _verifyFiles.apply(this, arguments);
}}
disabled={property5}
/>
</TableRowGroup>
);
return (
<ScrollView style={styles.wrap} contentContainerStyle={styles.contentContainer}>
<Stack spacing={16}>
{items2}
</Stack>
</ScrollView>
);
function _verifyFiles() { // fn#107368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2193, owner: DevToolsOTATestScreen._verifyFiles, offset: 0x022f9e77, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun107370).apply(this, arguments);
function* _fun107370() { // fn#107370, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2240, offset: 0x022f9eb7, size: 163 bytes, params: 1, frame: 19
if (true) {
value = environment.__proto__.__proto__;
env2_5(true);
var value4 = env3_1(env3_2[11]);
yield value4.verifyOtaFiles();
var value5 = undefined;
if (false) {
return value5;
}
env2_5(false);
value = env3_1(env3_2[12]);
var openLazy = value.openLazy;
var Promise = global.Promise;
Reflect.apply(openLazy, value, [Promise.resolve({default: env3_11}), 'OtaVerificationActionSheet',
{result: value5}]);
}
}
}
function _fun107371() { // fn#107371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2461, offset: 0x022f9f5a, size: 153 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getOtaRootPath();
value.then(env0_1);
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getManifestInfo();
value.then(env0_2);
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getBuildOverrideCookieContents();
value.then(env0_3);
value = importDefault(10560) /* metro dependency 10560: BundleUpdater */;
value = value.getOtaStatus();
value.then(env0_4);
}
function DevToolsOTATestScreenOnPress() { // fn#107372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14396:2949, owner: DevToolsOTATestScreen.onPress, offset: 0x022f9ff3, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ClipboardUtilsNativeModule).copy(env0_0);
}
}
}
global.__d(_fun107364, 14199, [5, 57, 31, 27, 482, 33, 4501, 697, 6275, 6758, 4573, 10560, 4080, 4572, 6231, 6238,
13957, 6797, 10330, 4062, 14200,
2]) /* metro module 14199, dependencies: [5, 57, 31, 27, 482, 33, 4501, 697, 6275, 6758, 4573, 10560, 4080, 4572, 6231, 6238, 13957, 6797, 10330, 4062, 14200, 2] */;
@@ -1,118 +1,129 @@
/* Metro module 14267; source: modules/devtools/native/components/screens/DevToolsPerformanceTestingScreen.tsx; dependencies: [31, 27, 33, 4501, 697, 1484, 1585, 6231, 13124, 6238, 13121, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UseNavigationNativeModule from '../../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as DevToolsScreensModule from '../DevToolsScreens.tsx'; /* Metro dependency 13124 */
function _fun107946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:6, offset: 0x0230fd20, size: 254 bytes, params: 8, frame: 23
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 */).ScrollView;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.padding = PX_16;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const PX_16 = (Native).space.PX_16;
object2.padding = PX_16;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{container: object2}]);
value = value.memo(DevToolsPerformanceTestingScreen);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsPerformanceTestingScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsPerformanceTestingScreen.tsx');
exports.default = value;
}
function DevToolsPerformanceTestingScreen() { // fn#107947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:272, offset: 0x0230fe1e, size: 234 bytes, params: 1, frame: 21
const styles = useStyles();
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const object = {};
const bottom = value2.bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = bottom + PX_16;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const Object = global.Object;
const entries = Object.entries;
const PerformanceTestingScreens = (require(13124) /* metro dependency 13124: DevToolsScreens */).PerformanceTestingScreens;
return (
<ScrollView style={styles.container} contentContainerStyle={object}>
<TableRowGroup hasIcons>
{Reflect.apply(entries, Object, [PerformanceTestingScreens]).map(_fun107948)}
</TableRowGroup>
</ScrollView>
);
}
function _fun107948(a0) { // fn#107948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:571, offset: 0x0230ff08, size: 208 bytes, params: 2, frame: 24
var r1;
var r2;
var r42;
var item3;
var value3;
var headerTitle;
var Icon;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
try {
headerTitle = r42.headerTitle;
Icon = r42.Icon;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
function DevToolsPerformanceTestingScreen() { // fn#107947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:272, offset: 0x0230fe1e, size: 234 bytes, params: 1, frame: 21
const styles = useStyles();
const env0_0 = (UseNavigationNativeModule).useNavigation();
const value2 = (UseSafeAreaInsetsNative)();
const object2 = {};
const bottom = value2.bottom;
const PX_16 = (Native).space.PX_16;
object2.paddingBottom = bottom + PX_16;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const Object = global.Object;
const entries = Object.entries;
const PerformanceTestingScreens = (DevToolsScreensModule).PerformanceTestingScreens;
return (
<ScrollView style={styles.container} contentContainerStyle={object2}>
<TableRowGroup hasIcons>
{Reflect.apply(entries, Object, [PerformanceTestingScreens]).map(_fun107948)}
</TableRowGroup>
</ScrollView>
);
function _fun107948(a0) { // fn#107948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:571, offset: 0x0230ff08, size: 208 bytes, params: 2, frame: 24
var r1;
var r2;
var r42;
var item3;
var value3;
var headerTitle;
var Icon;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
try {
headerTitle = r42.headerTitle;
Icon = r42.Icon;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
const TableRow = (TableRowNativeModule).TableRow;
const TableRow2 = (TableRowNativeModule).TableRow;
const Icon2 = TableRow2.Icon;
return (
<TableRow
label={headerTitle}
icon={<Icon2 IconComponent={Icon} />}
arrow
onPress={onPress_107949}
key={r4}
/>
);
function onPress_107949() { // fn#107949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:694, offset: 0x0230ffd8, size: 95 bytes, params: 1, frame: 13
let value = environment.__proto__;
if (env1_0.push != null) {
env1_0.push(env0_0);
} else {
value = environment.__proto__.__proto__;
value = require(13121) /* metro dependency 13121: DevToolsNavigator */;
value.navigateToDevTools({screenKey: env0_0});
}
}
}
throw error;
}
if (!r2) {
r1.return();
}
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon2 = TableRow2.Icon;
return (
<TableRow
label={headerTitle}
icon={<Icon2 IconComponent={Icon} />}
arrow
onPress={onPress_107949}
key={r4}
/>
);
}
function onPress_107949() { // fn#107949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14464:694, offset: 0x0230ffd8, size: 95 bytes, params: 1, frame: 13
let value = environment.__proto__;
if (env1_0.push != null) {
env1_0.push(env0_0);
} else {
value = environment.__proto__.__proto__;
value = require(13121) /* metro dependency 13121: DevToolsNavigator */;
value.navigateToDevTools({screenKey: env0_0});
}
}
global.__d(_fun107946, 14267, [31, 27, 33, 4501, 697, 1484, 1585, 6231, 13124, 6238, 13121,
2]) /* metro module 14267, dependencies: [31, 27, 33, 4501, 697, 1484, 1585, 6231, 13124, 6238, 13121, 2] */;
@@ -1,130 +1,184 @@
/* Metro module 14202; source: modules/devtools/native/components/screens/DevToolsProfilingScreen.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 277, 6231, 6808, 11222, 4572, 6238, 4573, 14203, 477, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableSwitchRowNativeModule from '../../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as ComponentProfilerModule from '../../../../profiling/ComponentProfiler.tsx'; /* Metro dependency 11222 */
import * as DevToolsProfilingUseStateFromStoresModule from './DevToolsProfilingUseStateFromStores.tsx'; /* Metro dependency 14203 */
function _fun107377(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:6, offset: 0x022fa0f0, size: 340 bytes, params: 8, frame: 22
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 */;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_5 = value.ScrollView;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.Fragment;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
copyDataProperties(object, StyleSheet.absoluteFillObject, undefined);
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object['backgroundColor'] = BACKGROUND_BASE_LOW;
object['padding'] = 16;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2['backgroundColor'] = BACKGROUND_BASE_LOW;
object2['padding'] = 16;
const CODE_BOLD = Fonts.CODE_BOLD;
const env0_9 = Reflect.apply(createStyles, value, [{container: object, monospace: {fontFamily: CODE_BOLD}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsProfilingScreen.tsx');
const env0_9 = Reflect.apply(createStyles, value, [{container: object2, monospace: {fontFamily: CODE_BOLD}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsProfilingScreen.tsx');
exports.default = DevToolsProfilingScreen;
}
function TableRowGroupReactProfiling() { // fn#107378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:371, offset: 0x022fa244, size: 256 bytes, params: 1, frame: 19
const useState = ReactModule.useState;
const r6 = (importDefault(277) /* metro dependency 277: NativeStartupFlagsModule */)?.reactProfilingEnabled();
const value6 = Module00057(Reflect.apply(useState, ReactModule, [r6 != null && r6]), 2);
const property = value6[0];
const property2 = value6[1];
ReactModule.useEffect(_fun107379, [property]);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
return (
<TableRowGroup title="React Profiling Renderer" hasIcons={false}>
<TableSwitchRow
label="Enable React Profiling Renderer"
subLabel="Enables React.Profiler, app restart required after change."
onValueChange={property2}
value={property}
/>
</TableRowGroup>
);
function _fun107379() { // fn#107379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:539, offset: 0x022fa344, size: 70 bytes, params: 1, frame: 13
const value = environment.__proto__;
if ((importDefault(277) /* metro dependency 277: NativeStartupFlagsModule */) != null) {
(importDefault(277) /* metro dependency 277: NativeStartupFlagsModule */).setReactProfilingEnabled(env0_0);
}
}
function TableRowGroupReactProfiling() { // fn#107378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:371, offset: 0x022fa244, size: 256 bytes, params: 1, frame: 19
const binding = env0_4;
const useState = binding.useState;
const r6 = (importDefault(277) /* metro dependency 277: NativeStartupFlagsModule */)?.reactProfilingEnabled();
const value6 = env0_3(Reflect.apply(useState, binding, [r6 != null && r6]), 2);
const property = value6[0];
const property2 = value6[1];
env0_4.useEffect(_fun107379, [property]);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableRowGroup title="React Profiling Renderer" hasIcons={false}>
<TableSwitchRow
label="Enable React Profiling Renderer"
subLabel="Enables React.Profiler, app restart required after change."
onValueChange={property2}
value={property}
/>
</TableRowGroup>
);
}
function DevToolsProfilingScreen() { // fn#107380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:960, offset: 0x022fa38a, size: 712 bytes, params: 1, frame: 35
var r8;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var jsxRuntimeEnv0_7Binding;
var items2;
var value10;
const value3 = env0_3(env0_4.useState(false), 2);
value3[0];
const env0_0 = value3[1];
const value4 = env0_4.useCallback(_fun107381, []);
const styles = useStyles();
const componentRenderStats = (require(11222) /* metro dependency 11222: ComponentProfiler */).getComponentRenderStats();
const Object = global.Object;
const value6 = Object.keys(componentRenderStats).length > 0;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
if (value6) {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [<TableRowGroup title="Component Profiler" hasIcons={false}><TableRow variant="danger" arrow label="Reset Stats" onPress={value4} /></TableRowGroup>];
value10 = global.Object.keys(componentRenderStats);
items2[1] = value10.map(_fun107382);
r8 = <>{items2}</>;
} else {
r8 = <TableRowGroup title="Component Profiler" hasIcons={false}><TableRow label="No components rendered yet." subLabel={((Text) => <Text variant="text-xs/medium" color="text-subtle">{'Make sure you wrap your component in '}{((Text) => <Text variant="text-xs/semibold" style={styles.monospace}>{'<ComponentProfiler />'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}{' to enable measurements.'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)} /></TableRowGroup>;
}
const items3 = [r8];
const DevToolsProfilingUseStateFromStores = (require(14203) /* metro dependency 14203: DevToolsProfilingUseStateFromStores */).DevToolsProfilingUseStateFromStores;
items3[1] = <DevToolsProfilingUseStateFromStores />;
items3[2] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? <TableRowGroupReactProfiling /> : null;
return (
<ScrollView style={styles.container}>
<Stack spacing={16}>
{items3}
</Stack>
</ScrollView>
);
}
function _fun107379() { // fn#107379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:539, offset: 0x022fa344, size: 70 bytes, params: 1, frame: 13
const value = environment.__proto__;
if ((importDefault(277) /* metro dependency 277: NativeStartupFlagsModule */) != null) {
(importDefault(277) /* metro dependency 277: NativeStartupFlagsModule */).setReactProfilingEnabled(env0_0);
function DevToolsProfilingScreen() { // fn#107380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:960, offset: 0x022fa38a, size: 712 bytes, params: 1, frame: 35
var r8;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
var jsxRuntimeEnv0_7Binding;
var items2;
var value10;
const value3 = Module00057(ReactModule.useState(false), 2);
value3[0];
const env0_0 = value3[1];
const value4 = ReactModule.useCallback(_fun107381, []);
const styles = useStyles();
const componentRenderStats = (ComponentProfilerModule).getComponentRenderStats();
const Object = global.Object;
const value6 = Object.keys(componentRenderStats).length > 0;
const Stack = (StackNativeModule).Stack;
if (value6) {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
items2 = [
<TableRowGroup title="Component Profiler" hasIcons={false}>
<TableRow
variant="danger"
arrow
label="Reset Stats"
onPress={value4}
/>
</TableRowGroup>,
];
value10 = global.Object.keys(componentRenderStats);
items2[1] = value10.map(_fun107382);
r8 = (
<>
{items2}
</>
);
} else {
r8 = (
<TableRowGroup title="Component Profiler" hasIcons={false}>
<TableRow
label="No components rendered yet."
subLabel={((Text) => <Text variant="text-xs/medium" color="text-subtle">{'Make sure you wrap your component in '}{((Text) => <Text variant="text-xs/semibold" style={styles.monospace}>{'<ComponentProfiler />'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}{' to enable measurements.'}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
/>
</TableRowGroup>
);
}
const items3 = [r8];
const DevToolsProfilingUseStateFromStores = (DevToolsProfilingUseStateFromStoresModule).DevToolsProfilingUseStateFromStores;
items3[1] = <DevToolsProfilingUseStateFromStores />;
items3[2] = (
(require(477) /* metro dependency 477: PlatformUtils */).isAndroid()
? (
<TableRowGroupReactProfiling />
)
: null
);
return (
<ScrollView style={styles.container}>
<Stack spacing={16}>
{items3}
</Stack>
</ScrollView>
);
function _fun107381() { // fn#107381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:1056, offset: 0x022fa652, size: 51 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ComponentProfilerModule).clearComponentRenderStats();
env0_0(true);
}
function _fun107382(a0) { // fn#107382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:1448, offset: 0x022fa685, size: 206 bytes, params: 2, frame: 21
const {mount, update, nestedUpdate} = env0_2[a0];
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<TableRowGroup
title={"Component Profiler Target: '" + a0 + "'"}
hasIcons={false}
key={a0}
>
{[{stat: mount, label: 'Mount'}, {stat: update, label: 'Update'}, {stat: nestedUpdate,
label: 'Nested Update'}].map(_fun107383)}
</TableRowGroup>
);
function _fun107383({stat, label}, a1) { // fn#107383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:1681, offset: 0x022fa753, size: 275 bytes, params: 3, frame: 31
const TableRow = (TableRowNativeModule).TableRow;
const jsxRuntimeEnv2_7Binding = jsxRuntimeEnv2_7;
const Text = (TextModule).Text;
const stylesBinding = styles;
return (
<TableRow
subLabel={<>
<Text
variant="text-sm/medium"
color="text-subtle"
style={stylesBinding.monospace}
>
{'Count - ' + stat.count}
</Text>
<Text
variant="text-sm/medium"
color="text-subtle"
style={stylesBinding.monospace}
>
{'Mean - ' + stat.mean}
</Text>
</>}
label={label}
key={a1}
/>
);
}
}
}
}
function _fun107381() { // fn#107381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:1056, offset: 0x022fa652, size: 51 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(11222) /* metro dependency 11222: ComponentProfiler */).clearComponentRenderStats();
env0_0(true);
}
function _fun107382(a0) { // fn#107382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:1448, offset: 0x022fa685, size: 206 bytes, params: 2, frame: 21
const {mount, update, nestedUpdate} = env0_2[a0];
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup
title={"Component Profiler Target: '" + a0 + "'"}
hasIcons={false}
key={a0}
>
{[{stat: mount, label: 'Mount'}, {stat: update, label: 'Update'}, {stat: nestedUpdate,
label: 'Nested Update'}].map(_fun107383)}
</TableRowGroup>
);
}
function _fun107383({stat, label}, a1) { // fn#107383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14399:1681, offset: 0x022fa753, size: 275 bytes, params: 3, frame: 31
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const jsxRuntimeEnv2_7Binding = jsxRuntimeEnv2_7;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const stylesBinding = styles;
return (
<TableRow
subLabel={<><Text variant="text-sm/medium" color="text-subtle" style={stylesBinding.monospace}>{'Count - ' + stat.count}</Text><Text variant="text-sm/medium" color="text-subtle" style={stylesBinding.monospace}>{'Mean - ' + stat.mean}</Text></>}
label={label}
key={a1}
/>
);
}
global.__d(_fun107377, 14202, [57, 31, 27, 661, 33, 4501, 697, 277, 6231, 6808, 11222, 4572, 6238, 4573, 14203, 477,
2]) /* metro module 14202, dependencies: [57, 31, 27, 661, 33, 4501, 697, 277, 6231, 6808, 11222, 4572, 6238, 4573, 14203, 477, 2] */;
@@ -1,194 +1,241 @@
/* Metro module 14203; source: modules/devtools/native/components/screens/DevToolsProfilingUseStateFromStores.tsx; dependencies: [57, 31, 33, 14204, 4573, 6231, 6808, 6238, 6985, 10227, 11046, 14205, 4071, 1244, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableSwitchRowNativeModule from '../../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as TextFieldNativeModule from '../../../../../design/components/TextField/native/TextField.native.tsx'; /* Metro dependency 6985 */
import * as TimerIconModule from '../../../../../design/components/Icon/native/redesign/generated/TimerIcon.tsx'; /* Metro dependency 10227 */
import * as UseStateFromStoresPerformanceDebuggingModule from '../../../../../external/discord_common/js/packages/flux/useStateFromStoresPerformanceDebugging.tsx'; /* Metro dependency 14204 */
function _fun107384(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:6, offset: 0x022fa866, size: 173 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsProfilingUseStateFromStores.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsProfilingUseStateFromStores.tsx');
exports.DevToolsProfilingUseStateFromStores = DevToolsProfilingUseStateFromStores;
}
function DevToolsProfilingUseStateFromStores() { // fn#107385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:311, offset: 0x022fa913, size: 1376 bytes, params: 1, frame: 38
var r5;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var jsxRuntimeEnv0_5Binding2;
var items2;
const TextField = (require(6985) /* metro dependency 6985: TextFieldNative */).TextField;
const TimerIcon = (require(10227) /* metro dependency 10227: TimerIcon */).TimerIcon;
var items3;
var items4;
var items5;
var items6;
var object;
var intl;
var value;
const binding = env0_3;
let useState = binding.useState;
const useStateFromStoresPerformanceDebuggingModule = require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */;
const getUseStateFromStoresDebuggingEnabled = useStateFromStoresPerformanceDebuggingModule.getUseStateFromStoresDebuggingEnabled;
const value2 = Reflect.apply(useState, binding, [Reflect.apply(getUseStateFromStoresDebuggingEnabled,
useStateFromStoresPerformanceDebuggingModule, [])]);
const binding2 = env0_2;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = binding.useState;
const moduleValue2 = useStateFromStoresPerformanceDebuggingModule;
const getUseStateFromStoresExecutionWindowThresholdMs = moduleValue2.getUseStateFromStoresExecutionWindowThresholdMs;
const value4 = binding2(Reflect.apply(useState, binding,
[Reflect.apply(getUseStateFromStoresExecutionWindowThresholdMs, moduleValue2, [])]), 2);
const property3 = value4[0];
var env0_2 = value4[1];
useState = binding.useState;
const moduleValue3 = useStateFromStoresPerformanceDebuggingModule;
const getUseStateFromStoresExecutionTimeWarningThresholdMs = moduleValue3.getUseStateFromStoresExecutionTimeWarningThresholdMs;
const value5 = binding2(Reflect.apply(useState, binding,
[Reflect.apply(getUseStateFromStoresExecutionTimeWarningThresholdMs, moduleValue3, [])]), 2);
const property4 = value5[0];
const env0_4 = value5[1];
useState = binding.useState;
const moduleValue4 = useStateFromStoresPerformanceDebuggingModule;
const getUseStateFromStoresExecutionCountWarningThreshold = moduleValue4.getUseStateFromStoresExecutionCountWarningThreshold;
const value6 = binding2(Reflect.apply(useState, binding,
[Reflect.apply(getUseStateFromStoresExecutionCountWarningThreshold, moduleValue4, [])]), 2);
const property5 = value6[0];
const env0_6 = value6[1];
useState = binding.useState;
const moduleValue5 = useStateFromStoresPerformanceDebuggingModule;
const getUseStateFromStoresSpecificHookFilter = moduleValue5.getUseStateFromStoresSpecificHookFilter;
const value7 = binding2(Reflect.apply(useState, binding, [Reflect.apply(getUseStateFromStoresSpecificHookFilter,
moduleValue5, [])]), 2);
const property6 = value7[0];
const env0_8 = value7[1];
binding.useEffect(_fun107386, [property]);
binding.useEffect(_fun107387, [property3]);
binding.useEffect(_fun107388, [property4]);
binding.useEffect(_fun107389, [property5]);
binding.useEffect(_fun107390, [property6]);
const value8 = null;
const value9 = binding.useRef(value8);
const closure = DevToolsProfilingUseStateFromStoresRenderLabel;
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const tableRowGroup = <TableRowGroup title="useStateFromStores Profiling" hasIcons={false}><TableSwitchRow label="Enable useStateFromStores profiling" subLabel="May require app restart after changes." onValueChange={property2} value={property} /></TableRowGroup>;
if (property) {
jsxRuntimeEnv0_5Binding2 = jsxRuntimeEnv0_5;
value = closure('Time window to wait for before reporting violations.');
items2 = [value];
items2[1] = <TextField size="sm" defaultValue={property3.toString()} onChange={onChange_107392} keyboardType="numeric" leadingIcon={TimerIcon} trailingText="ms" ref={value9} />;
value = <TableRow label="Execution time window threshold" subLabel={<>{items2}</>} />;
items3 = [value];
value = closure('Total execution time limit for hooks before reporting violations.');
items4 = [value];
items4[1] = <TextField size="sm" defaultValue={property4.toString()} keyboardType="numeric" leadingIcon={TimerIcon} trailingText="ms" onChange={onChange_107393} />;
items3[1] = <TableRow label="Cumulative execution time warning threshold" subLabel={<>{items4}</>} />;
value = closure('Execution counts limit for hooks before reporting violations.');
items5 = [value];
items5[1] = <TextField size="sm" defaultValue={property5.toString()} keyboardType="numeric" leadingIcon={(require(11046) /* metro dependency 11046: AnalyticsIcon */).AnalyticsIcon} trailingText="times" onChange={onChange_107394} />;
items3[2] = <TableRow label="Cumulative execution count warning threshold" subLabel={<>{items5}</>} />;
value = closure('Include a specific hook in the profiling regardless of limits.');
items6 = [value];
var textFieldProps3 = {'size': 'sm', 'keyboardType': 'email-address', 'autoCapitalize': 'none',
'autoCorrect': false, 'defaultValue': null, 'placeholder': 'hookName', defaultValue: property6,
leadingIcon: (require(14205) /* metro dependency 14205: LettersIcon */).LettersIcon,
trailingIcon: (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon};
object = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VkKicb);
object.onPress = onPress_107395;
textFieldProps3.trailingPressableProps = object;
textFieldProps3.onChange = onChange_107396;
items6[1] = <TextField {...textFieldProps3} />;
items3[3] = <TableRow label="Track specific hook" subLabel={<>{items6}</>} />;
value = <TableRowGroup title="useStateFromStores Config" hasIcons={false}>{items3}</TableRowGroup>;
r5 = value;
} else {
r5 = value8;
}
return (
<>
{tableRowGroup}
{r5}
</>
);
}
function _fun107386() { // fn#107386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:841, offset: 0x022fae73, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */).setUseStateFromStoresDebuggingEnabled(env0_0);
}
function _fun107387() { // fn#107387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:915, offset: 0x022faea0, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */).setUseStateFromStoresExecutionWindowThresholdMs(env0_1);
}
function _fun107388() { // fn#107388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:999, offset: 0x022faecd, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */).setUseStateFromStoresExecutionTimeWarningThresholdMs(env0_3);
}
function _fun107389() { // fn#107389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1088, offset: 0x022faefa, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */).setUseStateFromStoresExecutionCountWarningThreshold(env0_5);
}
function _fun107390() { // fn#107390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1176, offset: 0x022faf27, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(14204) /* metro dependency 14204: useStateFromStoresPerformanceDebugging */).setUseStateFromStoresSpecificHookFilter(env0_7);
}
function DevToolsProfilingUseStateFromStoresRenderLabel(a0) { // fn#107391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1272, owner: DevToolsProfilingUseStateFromStores.renderLabel, offset: 0x022faf54, size: 69 bytes, params: 2, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-xs/medium"
color="text-subtle"
style={{marginBottom: 4}}
>
{a0}
</Text>
);
}
function DevToolsProfilingUseStateFromStoresOnChange(a0) { // fn#107392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1926, owner: DevToolsProfilingUseStateFromStores.onChange, offset: 0x022faf99, size: 93 bytes, params: 2, frame: 12
var current;
const Number = global.Number;
const value = Number(a0);
if (global.isNaN(value)) {
current = env0_9.current;
if (current != null) {
current.setText('60000');
function DevToolsProfilingUseStateFromStores() { // fn#107385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:311, offset: 0x022fa913, size: 1376 bytes, params: 1, frame: 38
var r5;
const TableRow = (TableRowNativeModule).TableRow;
var jsxRuntimeEnv0_5Binding2;
var items2;
const TextField = (TextFieldNativeModule).TextField;
const TimerIcon = (TimerIconModule).TimerIcon;
var items3;
var items4;
var items5;
var items6;
var object2;
var intl;
var value;
let useState = ReactModule.useState;
const getUseStateFromStoresDebuggingEnabled = UseStateFromStoresPerformanceDebuggingModule.getUseStateFromStoresDebuggingEnabled;
const value2 = Reflect.apply(useState, ReactModule, [Reflect.apply(getUseStateFromStoresDebuggingEnabled,
UseStateFromStoresPerformanceDebuggingModule, [])]);
const binding2 = env0_2;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = ReactModule.useState;
const getUseStateFromStoresExecutionWindowThresholdMs = UseStateFromStoresPerformanceDebuggingModule.getUseStateFromStoresExecutionWindowThresholdMs;
const value4 = binding2(Reflect.apply(useState, ReactModule,
[Reflect.apply(getUseStateFromStoresExecutionWindowThresholdMs, UseStateFromStoresPerformanceDebuggingModule, [])]), 2);
const property3 = value4[0];
var env0_2 = value4[1];
useState = ReactModule.useState;
const getUseStateFromStoresExecutionTimeWarningThresholdMs = UseStateFromStoresPerformanceDebuggingModule.getUseStateFromStoresExecutionTimeWarningThresholdMs;
const value5 = binding2(Reflect.apply(useState, ReactModule,
[Reflect.apply(getUseStateFromStoresExecutionTimeWarningThresholdMs, UseStateFromStoresPerformanceDebuggingModule, [])]), 2);
const property4 = value5[0];
const env0_4 = value5[1];
useState = ReactModule.useState;
const getUseStateFromStoresExecutionCountWarningThreshold = UseStateFromStoresPerformanceDebuggingModule.getUseStateFromStoresExecutionCountWarningThreshold;
const value6 = binding2(Reflect.apply(useState, ReactModule,
[Reflect.apply(getUseStateFromStoresExecutionCountWarningThreshold, UseStateFromStoresPerformanceDebuggingModule, [])]), 2);
const property5 = value6[0];
const env0_6 = value6[1];
useState = ReactModule.useState;
const getUseStateFromStoresSpecificHookFilter = UseStateFromStoresPerformanceDebuggingModule.getUseStateFromStoresSpecificHookFilter;
const value7 = binding2(Reflect.apply(useState, ReactModule, [Reflect.apply(getUseStateFromStoresSpecificHookFilter,
UseStateFromStoresPerformanceDebuggingModule, [])]), 2);
const property6 = value7[0];
const env0_8 = value7[1];
ReactModule.useEffect(_fun107386, [property]);
ReactModule.useEffect(_fun107387, [property3]);
ReactModule.useEffect(_fun107388, [property4]);
ReactModule.useEffect(_fun107389, [property5]);
ReactModule.useEffect(_fun107390, [property6]);
const value8 = null;
const value9 = ReactModule.useRef(value8);
const DevToolsProfilingUseStateFromStoresRenderLabel2 = DevToolsProfilingUseStateFromStoresRenderLabel;
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const tableRowGroup = (
<TableRowGroup title="useStateFromStores Profiling" hasIcons={false}>
<TableSwitchRow
label="Enable useStateFromStores profiling"
subLabel="May require app restart after changes."
onValueChange={property2}
value={property}
/>
</TableRowGroup>
);
if (property) {
jsxRuntimeEnv0_5Binding2 = jsxRuntimeEnv0_5;
value = DevToolsProfilingUseStateFromStoresRenderLabel2('Time window to wait for before reporting violations.');
items2 = [value];
items2[1] = (
<TextField
size="sm"
defaultValue={property3.toString()}
onChange={onChange_107392}
keyboardType="numeric"
leadingIcon={TimerIcon}
trailingText="ms"
ref={value9}
/>
);
value = <TableRow label="Execution time window threshold" subLabel={<>{items2}</>} />;
items3 = [value];
value = DevToolsProfilingUseStateFromStoresRenderLabel2('Total execution time limit for hooks before reporting violations.');
items4 = [value];
items4[1] = (
<TextField
size="sm"
defaultValue={property4.toString()}
keyboardType="numeric"
leadingIcon={TimerIcon}
trailingText="ms"
onChange={onChange_107393}
/>
);
items3[1] = <TableRow label="Cumulative execution time warning threshold" subLabel={<>{items4}</>} />;
value = DevToolsProfilingUseStateFromStoresRenderLabel2('Execution counts limit for hooks before reporting violations.');
items5 = [value];
items5[1] = (
<TextField
size="sm"
defaultValue={property5.toString()}
keyboardType="numeric"
leadingIcon={(require(11046) /* metro dependency 11046: AnalyticsIcon */).AnalyticsIcon}
trailingText="times"
onChange={onChange_107394}
/>
);
items3[2] = <TableRow label="Cumulative execution count warning threshold" subLabel={<>{items5}</>} />;
value = DevToolsProfilingUseStateFromStoresRenderLabel2('Include a specific hook in the profiling regardless of limits.');
items6 = [value];
var textFieldProps3 = {'size': 'sm', 'keyboardType': 'email-address', 'autoCapitalize': 'none',
'autoCorrect': false, 'defaultValue': null, 'placeholder': 'hookName', defaultValue: property6,
leadingIcon: (require(14205) /* metro dependency 14205: LettersIcon */).LettersIcon,
trailingIcon: (require(4071) /* metro dependency 4071: TrashIcon */).TrashIcon};
object2 = {};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VkKicb);
object2.onPress = onPress_107395;
textFieldProps3.trailingPressableProps = object2;
textFieldProps3.onChange = onChange_107396;
items6[1] = <TextField {...textFieldProps3} />;
items3[3] = <TableRow label="Track specific hook" subLabel={<>{items6}</>} />;
value = (
<TableRowGroup title="useStateFromStores Config" hasIcons={false}>
{items3}
</TableRowGroup>
);
r5 = value;
} else {
r5 = value8;
}
} else if (value > 1000) {
env0_2(value);
} else {
current = env0_9.current;
if (current != null) {
current.setText('60000');
return (
<>
{tableRowGroup}
{r5}
</>
);
function _fun107386() { // fn#107386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:841, offset: 0x022fae73, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(UseStateFromStoresPerformanceDebuggingModule).setUseStateFromStoresDebuggingEnabled(env0_0);
}
function _fun107387() { // fn#107387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:915, offset: 0x022faea0, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(UseStateFromStoresPerformanceDebuggingModule).setUseStateFromStoresExecutionWindowThresholdMs(env0_1);
}
function _fun107388() { // fn#107388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:999, offset: 0x022faecd, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(UseStateFromStoresPerformanceDebuggingModule).setUseStateFromStoresExecutionTimeWarningThresholdMs(ReactModule);
}
function _fun107389() { // fn#107389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1088, offset: 0x022faefa, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(UseStateFromStoresPerformanceDebuggingModule).setUseStateFromStoresExecutionCountWarningThreshold(JsxRuntimeModule.Fragment);
}
function _fun107390() { // fn#107390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1176, offset: 0x022faf27, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(UseStateFromStoresPerformanceDebuggingModule).setUseStateFromStoresSpecificHookFilter(env0_7);
}
function DevToolsProfilingUseStateFromStoresRenderLabel(a0) { // fn#107391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1272, owner: DevToolsProfilingUseStateFromStores.renderLabel, offset: 0x022faf54, size: 69 bytes, params: 2, frame: 15
const Text = (TextModule).Text;
return (
<Text
variant="text-xs/medium"
color="text-subtle"
style={{marginBottom: 4}}
>
{a0}
</Text>
);
}
function DevToolsProfilingUseStateFromStoresOnChange(a0) { // fn#107392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:1926, owner: DevToolsProfilingUseStateFromStores.onChange, offset: 0x022faf99, size: 93 bytes, params: 2, frame: 12
var current;
const Number = global.Number;
const value = Number(a0);
if (global.isNaN(value)) {
current = env0_9.current;
if (current != null) {
current.setText('60000');
}
} else if (value > 1000) {
env0_2(value);
} else {
current = env0_9.current;
if (current != null) {
current.setText('60000');
}
}
}
function DevToolsProfilingUseStateFromStoresOnChange_107393(a0) { // fn#107393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:2409, owner: DevToolsProfilingUseStateFromStores.onChange, offset: 0x022faff6, size: 32 bytes, params: 2, frame: 12
const binding = env0_4;
const Number = global.Number;
binding(Number(a0));
}
function DevToolsProfilingUseStateFromStoresOnChange_107394(a0) { // fn#107394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:2753, owner: DevToolsProfilingUseStateFromStores.onChange, offset: 0x022fb016, size: 32 bytes, params: 2, frame: 12
const binding = env0_6;
const Number = global.Number;
binding(Number(a0));
}
function DevToolsProfilingUseStateFromStoresOnPress() { // fn#107395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:3219, owner: DevToolsProfilingUseStateFromStores.onPress, offset: 0x022fb036, size: 20 bytes, params: 1, frame: 11
env0_8('');
}
function DevToolsProfilingUseStateFromStoresOnChange_107396(a0) { // fn#107396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:3241, owner: DevToolsProfilingUseStateFromStores.onChange, offset: 0x02094aa0, size: 19 bytes, params: 2, frame: 11
env0_8(a0);
}
}
}
function DevToolsProfilingUseStateFromStoresOnChange_107393(a0) { // fn#107393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:2409, owner: DevToolsProfilingUseStateFromStores.onChange, offset: 0x022faff6, size: 32 bytes, params: 2, frame: 12
const binding = env0_4;
const Number = global.Number;
binding(Number(a0));
}
function DevToolsProfilingUseStateFromStoresOnChange_107394(a0) { // fn#107394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:2753, owner: DevToolsProfilingUseStateFromStores.onChange, offset: 0x022fb016, size: 32 bytes, params: 2, frame: 12
const binding = env0_6;
const Number = global.Number;
binding(Number(a0));
}
function DevToolsProfilingUseStateFromStoresOnPress() { // fn#107395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14400:3219, owner: DevToolsProfilingUseStateFromStores.onPress, offset: 0x022fb036, size: 20 bytes, params: 1, frame: 11
env0_8('');
}
global.__d(_fun107384, 14203, [57, 31, 33, 14204, 4573, 6231, 6808, 6238, 6985, 10227, 11046, 14205, 4071, 1244,
2]) /* metro module 14203, dependencies: [57, 31, 33, 14204, 4573, 6231, 6808, 6238, 6985, 10227, 11046, 14205, 4071, 1244, 2] */;
@@ -1,6 +1,48 @@
/* Metro module 14207; source: modules/devtools/native/components/screens/DevToolsQuickActionsScreen.tsx; dependencies: [57, 31, 27, 4502, 4257, 1879, 1949, 1310, 1312, 1878, 7111, 661, 12022, 1880, 9734, 1313, 33, 4501, 697, 12043, 694, 12021, 7896, 12992, 1362, 1365, 3968, 5080, 14208, 1962, 9746, 13304, 13306, 10995, 1585, 566, 3829, 14224, 6231, 6808, 13126, 1305, 13730, 4002, 13783, 14225, 9646, 1244, 6238, 13813, 6243, 8988, 13957, 14226, 8998, 12546, 1216, 1873, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Dispatcher from '../../../../../Dispatcher.tsx'; /* Metro dependency 694 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import SentryUtilsNative from '../../../../../utils/SentryUtils.native.tsx'; /* Metro dependency 1216 */
import ThemeStore from '../../../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import UnsyncedUserSettingsStore from '../../../../user_settings/UnsyncedUserSettingsStore.tsx'; /* Metro dependency 1312 */
import UseSafeAreaInsetsNative from '../../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import OverridePremiumTypeStore from '../../../../premium/OverridePremiumTypeStore.tsx'; /* Metro dependency 1879 */
import LocaleStore from '../../../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import GatewayConnectionStore from '../../../../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import AccessibilityStore from '../../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import DevToolsSettingsStore from '../../../DevToolsSettingsStore.tsx'; /* Metro dependency 7111 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as ThemeConstantsModule from '../../../../user_settings/ThemeConstants.tsx'; /* Metro dependency 1313 */
import * as UserSettingsProtoActionCreatorsModule from '../../../../user_settings/UserSettingsProtoActionCreators.tsx'; /* Metro dependency 1362 */
import * as Dismissible_contentModule from '../../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as ShimNativeModule from '../../../../../external/discord_common/js/packages/libdiscore/js_shim/js/shim.native.tsx'; /* Metro dependency 1873 */
import * as PremiumConstantsModule from '../../../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as UserSettingsModule from '../../../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableRowArrowNativeModule from '../../../../../design/components/TableRow/native/TableRowArrow.native.tsx'; /* Metro dependency 6243 */
import * as TableSwitchRowNativeModule from '../../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as KeyIconModule from '../../../../../design/components/Icon/native/redesign/generated/KeyIcon.tsx'; /* Metro dependency 8988 */
import * as EyeSlashIconModule from '../../../../../design/components/Icon/native/redesign/generated/EyeSlashIcon.tsx'; /* Metro dependency 8998 */
import * as PencilIconModule from '../../../../../design/components/Icon/native/redesign/generated/PencilIcon.tsx'; /* Metro dependency 9646 */
import * as ConstantsModule2 from '../../../../self_mod/Constants.tsx'; /* Metro dependency 9734 */
import * as InAppNotificationExpandNuxModule from '../../../../in_app_notifications/native/InAppNotificationExpandNux.tsx'; /* Metro dependency 10995 */
import * as NUFActionCreatorsModule from '../../../../nuf/native/NUFActionCreators.tsx'; /* Metro dependency 12021 */
import * as NUFConstantsModule from '../../../../nuf/NUFConstants.tsx'; /* Metro dependency 12022 */
import * as NUFActionCreatorsModule2 from '../../../../nuf/NUFActionCreators.tsx'; /* Metro dependency 12043 */
import * as AccessibilityActionCreatorsModule from '../../../../a11y/AccessibilityActionCreators.tsx'; /* Metro dependency 12992 */
import * as DevToolsActionCreatorsModule from '../../../DevToolsActionCreators.tsx'; /* Metro dependency 13126 */
import * as ThemeLightIconModule from '../../../../../design/components/Icon/native/redesign/generated/ThemeLightIcon.tsx'; /* Metro dependency 13730 */
import * as AccessibilityIconModule from '../../../../../design/components/Icon/native/redesign/generated/AccessibilityIcon.tsx'; /* Metro dependency 13783 */
import * as LanguageIconModule from '../../../../../design/components/Icon/native/redesign/generated/LanguageIcon.tsx'; /* Metro dependency 13813 */
import * as WrenchIconModule from '../../../../../design/components/Icon/native/redesign/generated/WrenchIcon.tsx'; /* Metro dependency 13957 */
function _fun107419(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:6, offset: 0x022fbb72, size: 626 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const handleThemeChange = function(a0) {
var defaultImport = importDefault(dependencyMap[22]);
@@ -8,363 +50,497 @@ function _fun107419(global, require, importDefault, importAll, module, exports,
};
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 */).ScrollView;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const overridePremiumTypeStore = importDefault(1879) /* metro dependency 1879: OverridePremiumTypeStore */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const unsyncedUserSettingsStore = importDefault(1312) /* metro dependency 1312: UnsyncedUserSettingsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const devToolsSettingsStore = importDefault(7111) /* metro dependency 7111: DevToolsSettingsStore */;
const env0_14 = (require(661) /* metro dependency 661: Constants */).ThemeTypes;
const env0_15 = (require(12022) /* metro dependency 12022: NUFConstants */).NewUserTypes;
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
let value = PremiumConstantsModule;
const env0_16 = value.PREMIUM_TYPE_OVERRIDE_OPTIONS;
const env0_17 = value.UNSELECTED_PREMIUM_TYPE_OVERRIDE;
const env0_18 = (require(9734) /* metro dependency 9734: Constants */).VIBING_WUMPUS_MODAL_KEY;
const env0_19 = (require(1313) /* metro dependency 1313: ThemeConstants */).SystemThemeState;
value = require(33) /* metro dependency 33 */;
const env0_20 = value.jsx;
const env0_21 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.content = {padding: PX_16};
const env0_22 = Reflect.apply(createStyles, value, [object2]);
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {backgroundColor: BACKGROUND_BASE_LOW};
const PX_16 = (Native).space.PX_16;
object.content = {padding: PX_16};
const env0_22 = Reflect.apply(createStyles, value, [object]);
const showVibingWumpus = function() {
importDefault(dependencyMap[27]).pushLazy(require(dependencyMap[29])(dependencyMap[30], dependencyMap.paths),
{onClose: _fun107429}, VIBING_WUMPUS_MODAL_KEY);
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsQuickActionsScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsQuickActionsScreen.tsx');
exports.default = DevToolsQuickActionsScreen;
}
function handleNewUserOnboarding() { // fn#107420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:567, offset: 0x022fbde4, size: 93 bytes, params: 1, frame: 15
const nufActionCreatorsModule = NUFActionCreatorsModule2;
const setNewUser = nufActionCreatorsModule.setNewUser;
const ORGANIC_REGISTERED = NewUserTypes.ORGANIC_REGISTERED;
Reflect.apply(setNewUser, nufActionCreatorsModule, [ORGANIC_REGISTERED]);
Dispatcher.wait((NUFActionCreatorsModule).startOnboarding);
}
function handleNewUserOnboarding() { // fn#107420, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:567, offset: 0x022fbde4, size: 93 bytes, params: 1, frame: 15
const nufActionCreatorsModule = require(12043) /* metro dependency 12043: NUFActionCreators */;
const setNewUser = nufActionCreatorsModule.setNewUser;
const ORGANIC_REGISTERED = NewUserTypes.ORGANIC_REGISTERED;
Reflect.apply(setNewUser, nufActionCreatorsModule, [ORGANIC_REGISTERED]);
const value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.wait((require(12021) /* metro dependency 12021: NUFActionCreators */).startOnboarding);
}
function handleReducedMotionChange(a0) { // fn#107422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:753, offset: 0x022fbe7d, size: 54 bytes, params: 2, frame: 13
AccessibilityActionCreatorsModule.setPrefersReducedMotion(a0 ? 'reduce' : 'no-preference');
}
function handleReducedMotionChange(a0) { // fn#107422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:753, offset: 0x022fbe7d, size: 54 bytes, params: 2, frame: 13
const value = require(12992) /* metro dependency 12992: AccessibilityActionCreators */;
value.setPrefersReducedMotion(a0 ? 'reduce' : 'no-preference');
}
function handleLaunchWelcomeReset() { // fn#107423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:852, offset: 0x022fbeb3, size: 106 bytes, params: 1, frame: 15
let value = UserSettingsProtoActionCreatorsModule;
const removeDismissedContent = value.removeDismissedContent;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const SEEN_LAUNCH_WELCOME = DismissibleContent.SEEN_LAUNCH_WELCOME;
Reflect.apply(removeDismissedContent, value, [SEEN_LAUNCH_WELCOME]);
value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = value.UNSAFE_markDismissibleContentAsDismissed;
const SEEN_OLD_DESIGN = DismissibleContent.SEEN_OLD_DESIGN;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, value, [SEEN_OLD_DESIGN]);
}
function handleLaunchWelcomeReset() { // fn#107423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:852, offset: 0x022fbeb3, size: 106 bytes, params: 1, frame: 15
let value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
const removeDismissedContent = value.removeDismissedContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const SEEN_LAUNCH_WELCOME = DismissibleContent.SEEN_LAUNCH_WELCOME;
Reflect.apply(removeDismissedContent, value, [SEEN_LAUNCH_WELCOME]);
value = require(3968) /* metro dependency 3968: DismissibleContentUnsafeUtils */;
const UNSAFE_markDismissibleContentAsDismissed = value.UNSAFE_markDismissibleContentAsDismissed;
const SEEN_OLD_DESIGN = DismissibleContent.SEEN_OLD_DESIGN;
Reflect.apply(UNSAFE_markDismissibleContentAsDismissed, value, [SEEN_OLD_DESIGN]);
}
function launchMFA() { // fn#107424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1078, offset: 0x022fbf1d, size: 90 bytes, params: 1, frame: 14
importDefault(dependencyMap[27]).pop();
let value = require(dependencyMap[29]);
value = value(dependencyMap[28], dependencyMap.paths);
value.then(_fun107425);
}
function showVibingWumpus() { // fn#107428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1325, offset: 0x022fbff9, size: 94 bytes, params: 1, frame: 17
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[29])(dependencyMap[30], dependencyMap.paths), {onClose: function() {
}}, VIBING_WUMPUS_MODAL_KEY);
}
function handleResetDoubleTapState() { // fn#107430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1419, offset: 0x022fc057, size: 206 bytes, params: 1, frame: 18
let value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
let removeDismissedContent = value.removeDismissedContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const DOUBLE_TAP_TO_REACT_UPSELL = DismissibleContent.DOUBLE_TAP_TO_REACT_UPSELL;
Reflect.apply(removeDismissedContent, value, [DOUBLE_TAP_TO_REACT_UPSELL]);
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
removeDismissedContent = value.removeDismissedContent;
const DOUBLE_TAP_TO_REACT_REMINDER = DismissibleContent.DOUBLE_TAP_TO_REACT_REMINDER;
Reflect.apply(removeDismissedContent, value, [DOUBLE_TAP_TO_REACT_REMINDER]);
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
removeDismissedContent = value.removeDismissedContent;
const DOUBLE_TAP_TO_REACT_EXPANDED_UPSELL = DismissibleContent.DOUBLE_TAP_TO_REACT_EXPANDED_UPSELL;
Reflect.apply(removeDismissedContent, value, [DOUBLE_TAP_TO_REACT_EXPANDED_UPSELL]);
const PreloadedUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators;
const updateAsync = PreloadedUserSettingsActionCreators.updateAsync;
const UserSettingsDelay = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).UserSettingsDelay;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
Reflect.apply(updateAsync, PreloadedUserSettingsActionCreators, ['textAndImages', function(a0) {
a0.defaultReactionEmoji = undefined;
}, INFREQUENT_USER_ACTION]);
}
function launchTotpSetupSuccess() { // fn#107432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1884, offset: 0x022fc132, size: 148 bytes, params: 1, frame: 18
importDefault(dependencyMap[27]).pop();
const Promise = global.Promise;
const all = Promise.all;
let value = require(dependencyMap[29]);
value = value(dependencyMap[31], dependencyMap.paths);
const items2 = [value];
items2[1] = require(dependencyMap[29])(dependencyMap[32], dependencyMap.paths);
Reflect.apply(all, Promise, [items2]).then(function(a0) {
var r1;
var r2;
var r0;
var property;
var item3;
var value3;
var TwoFAModalSetupSections;
var error;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var value = undefined;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value2 = item2 === value;
var r6 = value2 ? value : item;
try {
property = r6.default;
} catch (error) {
r0 = error;
r1 = item2;
r2 = value2;
if (!r2) {
try {
r1.return();
} catch {
}
}
throw r0;
function launchMFA() { // fn#107424, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1078, offset: 0x022fbf1d, size: 90 bytes, params: 1, frame: 14
importDefault(dependencyMap[27]).pop();
let value = require(dependencyMap[29]);
value = value(dependencyMap[28], dependencyMap.paths);
value.then(_fun107425);
function _fun107425({openMFAModal}) { // fn#107425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1128, offset: 0x022fbf77, size: 130 bytes, params: 2, frame: 16
openMFAModal({ticket: 'ticket', methods: [{'type': 'webauthn', 'challenge': '{}'}, {type: 'totp'}, {type: 'backup'},
{type: 'sms'}, {type: 'password'}]}, function() {
}, function() {
});
}
if (value2) {
r1 = item2;
r2 = value2;
r6 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
}
function showVibingWumpus() { // fn#107428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1325, offset: 0x022fbff9, size: 94 bytes, params: 1, frame: 17
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[29])(dependencyMap[30], dependencyMap.paths), {onClose: function() {
}}, VIBING_WUMPUS_MODAL_KEY);
}
function handleResetDoubleTapState() { // fn#107430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1419, offset: 0x022fc057, size: 206 bytes, params: 1, frame: 18
let value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
let removeDismissedContent = value.removeDismissedContent;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const DOUBLE_TAP_TO_REACT_UPSELL = DismissibleContent.DOUBLE_TAP_TO_REACT_UPSELL;
Reflect.apply(removeDismissedContent, value, [DOUBLE_TAP_TO_REACT_UPSELL]);
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
removeDismissedContent = value.removeDismissedContent;
const DOUBLE_TAP_TO_REACT_REMINDER = DismissibleContent.DOUBLE_TAP_TO_REACT_REMINDER;
Reflect.apply(removeDismissedContent, value, [DOUBLE_TAP_TO_REACT_REMINDER]);
value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
removeDismissedContent = value.removeDismissedContent;
const DOUBLE_TAP_TO_REACT_EXPANDED_UPSELL = DismissibleContent.DOUBLE_TAP_TO_REACT_EXPANDED_UPSELL;
Reflect.apply(removeDismissedContent, value, [DOUBLE_TAP_TO_REACT_EXPANDED_UPSELL]);
const PreloadedUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).PreloadedUserSettingsActionCreators;
const updateAsync = PreloadedUserSettingsActionCreators.updateAsync;
const UserSettingsDelay = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).UserSettingsDelay;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
Reflect.apply(updateAsync, PreloadedUserSettingsActionCreators, ['textAndImages', function(a0) {
a0.defaultReactionEmoji = undefined;
}, INFREQUENT_USER_ACTION]);
}
function launchTotpSetupSuccess() { // fn#107432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1884, offset: 0x022fc132, size: 148 bytes, params: 1, frame: 18
importDefault(dependencyMap[27]).pop();
const Promise = global.Promise;
const all = Promise.all;
let value = require(dependencyMap[29]);
value = value(dependencyMap[31], dependencyMap.paths);
const items2 = [value];
items2[1] = require(dependencyMap[29])(dependencyMap[32], dependencyMap.paths);
Reflect.apply(all, Promise, [items2]).then(function(a0) {
var r1;
var r2;
var r0;
var property;
var item3;
var value3;
var TwoFAModalSetupSections;
var error;
var iterator = a0[Symbol.iterator]();
var iterator2 = iterator.next;
var value = undefined;
var item2 = Reflect.apply(iterator2, iterator, []);
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value2 = item2 === value;
var r6 = value2 ? value : item;
try {
property = r6.default;
} catch (error) {
r0 = error;
r1 = item2;
r2 = value2;
if (!r2) {
try {
r1.return();
} catch {
}
}
throw r0;
}
if (value2) {
r1 = item2;
r2 = value2;
r6 = value;
} else {
r1 = item3;
r2 = value3;
r6 = item;
}
}
try {
TwoFAModalSetupSections = r6.TwoFAModalSetupSections;
} catch (error) {
r0 = error;
if (!r2) {
try {
r1.return();
} catch {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r6 = value;
} else {
r1 = item3;
r2 = value3;
r6 = item;
}
}
throw r0;
}
if (!r2) {
r1.return();
}
property.open(TwoFAModalSetupSections.SUCCESS);
return value;
});
}
function handleResetInAppNotificationExpandNux() { // fn#107434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:2079, offset: 0x022fc241, size: 84 bytes, params: 1, frame: 14
const value = require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */;
const removeDismissedContent = value.removeDismissedContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const IN_APP_NOTIFICATION_EXPAND_NUX = DismissibleContent.IN_APP_NOTIFICATION_EXPAND_NUX;
Reflect.apply(removeDismissedContent, value, [IN_APP_NOTIFICATION_EXPAND_NUX]);
(require(10995) /* metro dependency 10995: InAppNotificationExpandNux */).resetExpandNUXState();
}
function DevToolsQuickActionsScreen() { // fn#107435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:2326, offset: 0x022fc295, size: 2946 bytes, params: 1, frame: 36
const styles = useStyles();
const value2 = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)();
const {theme, usingSystemTheme, locale,
showDevWidget} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ThemeStore,
LocaleStore, UnsyncedUserSettingsStore, DevToolsSettingsStore], function() {
var useSystemTheme = UnsyncedUserSettingsStore.useSystemTheme;
return {theme: ThemeStore.theme, usingSystemTheme: useSystemTheme === SystemThemeState.ON,
locale: LocaleStore.locale, showDevWidget: DevToolsSettingsStore.showDevWidget};
});
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([OverridePremiumTypeStore],
function() {
return OverridePremiumTypeStore.getPremiumTypeOverride();
});
const binding = env0_4;
var [property, env0_4] = env0_3(binding.useState(false), 2);
const IgnoreProfileSpeedbumpDisabled = (require(3829) /* metro dependency 3829: UserSettings */).IgnoreProfileSpeedbumpDisabled;
const value6 = IgnoreProfileSpeedbumpDisabled.useSetting();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value7 = binding.useCallback(_fun107440, [locale]);
if (property) {
return ((Component) => <Component />)((require(14224) /* metro dependency 14224: UserSettingsJSError */).default);
try {
TwoFAModalSetupSections = r6.TwoFAModalSetupSections;
} catch (error) {
r0 = error;
if (!r2) {
try {
r1.return();
} catch {
}
}
throw r0;
}
if (!r2) {
r1.return();
}
property.open(TwoFAModalSetupSections.SUCCESS);
return value;
});
}
const items3 = [styles.content];
items3[1] = {paddingBottom: styles.content.padding + value2.bottom};
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const items2 = [<TableRowGroup title="General" hasIcons={false}><TableSwitchRow label="Show Dev Widget" value={showDevWidget} onValueChange={onValueChange_107441} /></TableRowGroup>];
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[1] = <Spacer size={PX_16} />;
const ThemeLightIcon = (require(13730) /* metro dependency 13730: ThemeLightIcon */).ThemeLightIcon;
const tableSwitchRow = <TableSwitchRow label={usingSystemTheme ? '(using system theme)' : 'Light Theme'} disabled={usingSystemTheme} icon={<ThemeLightIcon />} value={(require(4002) /* metro dependency 4002: shared */).isThemeLight(theme)} onValueChange={handleThemeChange} />;
const AccessibilityIcon = (require(13783) /* metro dependency 13783: AccessibilityIcon */).AccessibilityIcon;
items2[2] = <TableRowGroup title="Appearance" hasIcons>{tableSwitchRow}<TableSwitchRow label="Reduced Motion" icon={<AccessibilityIcon />} value={useReducedMotion} onValueChange={handleReducedMotionChange} /></TableRowGroup>;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[3] = <Spacer size={PX_16} />;
items2[4] = <TableRowGroup title="Override Client-Side Premium Type" hasIcons>{PREMIUM_TYPE_OVERRIDE_OPTIONS.map(_fun107442)}</TableRowGroup>;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[5] = <Spacer size={PX_16} />;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Aojq+L']);
object.hasIcons = true;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRowProps = {label: locale !== 'en-US' ? 'Change to en-US' : 'Change to pt-BR',
subLabel: 'Toggle to a non-english locale for change log testing, etc.', onPress: value7};
const LanguageIcon = (require(13813) /* metro dependency 13813: LanguageIcon */).LanguageIcon;
tableRowProps.icon = <LanguageIcon />;
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
tableRowProps.trailing = <TableRowArrow />;
const items4 = [<TableRow {...tableRowProps} />];
const tableRowProps2 = {'label': 'Reset Double Tap Emoji State',
'subLabel': 'Clears double tap emoji and resets dismissible content.', onPress: handleResetDoubleTapState};
const KeyIcon = (require(8988) /* metro dependency 8988: KeyIcon */).KeyIcon;
tableRowProps2.icon = <KeyIcon />;
tableRowProps2.trailing = <TableRowArrow />;
items4[1] = <TableRow {...tableRowProps2} />;
items4[2] = <TableRow label="Reset In App Notif Expand NUX" subLabel="Resets in app notification expand NUX dismissible content." onPress={handleResetInAppNotificationExpandNux} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
const tableRowProps3 = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yoWDXU),
subLabel: 'Dismisses dev tools when launching.', onPress: handleNewUserOnboarding};
const WrenchIcon = (require(13957) /* metro dependency 13957: WrenchIcon */).WrenchIcon;
tableRowProps3.icon = <WrenchIcon />;
tableRowProps3.trailing = <TableRowArrow />;
items4[3] = <TableRow {...tableRowProps3} />;
items4[4] = <TableRow label="Launch MFA Challenge Modal" subLabel="Dismisses dev tools when launching." onPress={launchMFA} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
items4[5] = <TableRow label="Show TOTP Setup Success" subLabel="Dismisses dev tools when launching." onPress={launchTotpSetupSuccess} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
items4[6] = <TableRow label="Reset Launch Welcome" subLabel="Resets launch welcome NUX flag, requires an app restart to take effect." onPress={handleLaunchWelcomeReset} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
items4[7] = <TableRow label="Launch Vibing Wumpus" subLabel="Vibe with the one and only" onPress={showVibingWumpus} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
items4[8] = <TableRow label="Test captcha" onPress={(require(14226) /* metro dependency 14226: OpenCaptchaTestModal */).showCaptchaTestModal} icon={<KeyIcon />} trailing={<TableRowArrow />} />;
const EyeSlashIcon = (require(8998) /* metro dependency 8998: EyeSlashIcon */).EyeSlashIcon;
items4[9] = <TableSwitchRow label="Ignored Profile Speedbump Suppression" subLabel="Suppresses the speedbump for ignored profiles." icon={<EyeSlashIcon />} value={value6} onValueChange={onValueChange_107444} />;
items4[10] = <TableRow label="Show App Rating Modal" subLabel="Attempts to show the app rating modal -- this may not visually show anything on debug builds or if your device has already been shown the modal recently." onPress={importDefault(12546) /* metro dependency 12546: requestReviewModal */} icon={<WrenchIcon />} />;
items2[6] = <TableRowGroup {...object}>{items4}</TableRowGroup>;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[7] = <Spacer size={PX_16} />;
const items5 = [<TableRow icon={<WrenchIcon />} label="Force Native Crash" onPress={onPress_107445} />];
items5[1] = <TableRow icon={<WrenchIcon />} label="Force JS Crash" onPress={function() {
var Error = global.Error;
throw new Error('Force JS Crash');
}} />;
items5[2] = <TableRow icon={<WrenchIcon />} label="Force JS Boundary Crash" onPress={onPress_107447} />;
items5[3] = <TableRow icon={<WrenchIcon />} label="Force libdiscore Crash" onPress={onPress_107448} />;
items5[4] = <TableRow icon={<WrenchIcon />} label="Force libdiscore Store Crash" subLabel="Dispatches LIBDISCORE_SIMULATE_CRASH to NoteStore" onPress={onPress_107449} />;
items5[5] = <TableRow icon={<WrenchIcon />} label="Force libdiscore Store Error" subLabel="Dispatches LIBDISCORE_SIMULATE_STORE_ERROR with socket reset" onPress={onPress_107450} />;
items2[8] = <TableRowGroup title="Crash Actions" hasIcons>{items5}</TableRowGroup>;
return (
<ScrollView style={styles.container} contentContainerStyle={items3}>
{items2}
</ScrollView>
);
}
function _fun107425({openMFAModal}) { // fn#107425, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:1128, offset: 0x022fbf77, size: 130 bytes, params: 2, frame: 16
openMFAModal({ticket: 'ticket', methods: [{'type': 'webauthn', 'challenge': '{}'}, {type: 'totp'}, {type: 'backup'},
{type: 'sms'}, {type: 'password'}]}, function() {
}, function() {
});
}
function _fun107440() { // fn#107440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:2905, offset: 0x022fce7b, size: 97 bytes, params: 1, frame: 12
var value;
if (locale !== 'en-US') {
value = environment.__proto__;
value = importDefault(7896) /* metro dependency 7896: UserSettingsActionCreators */;
value.updateLocale('en-US');
} else {
value = environment.__proto__;
value = importDefault(7896) /* metro dependency 7896: UserSettingsActionCreators */;
value.updateLocale('pt-BR');
function handleResetInAppNotificationExpandNux() { // fn#107434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:2079, offset: 0x022fc241, size: 84 bytes, params: 1, frame: 14
const removeDismissedContent = UserSettingsProtoActionCreatorsModule.removeDismissedContent;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const IN_APP_NOTIFICATION_EXPAND_NUX = DismissibleContent.IN_APP_NOTIFICATION_EXPAND_NUX;
Reflect.apply(removeDismissedContent, UserSettingsProtoActionCreatorsModule, [IN_APP_NOTIFICATION_EXPAND_NUX]);
(InAppNotificationExpandNuxModule).resetExpandNUXState();
}
function DevToolsQuickActionsScreen() { // fn#107435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:2326, offset: 0x022fc295, size: 2946 bytes, params: 1, frame: 36
const styles = useStyles();
const value2 = (UseSafeAreaInsetsNative)();
const {theme, usingSystemTheme, locale,
showDevWidget} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ThemeStore,
LocaleStore, UnsyncedUserSettingsStore, DevToolsSettingsStore], function() {
var useSystemTheme = UnsyncedUserSettingsStore.useSystemTheme;
return {theme: ThemeStore.theme, usingSystemTheme: useSystemTheme === SystemThemeState.ON,
locale: LocaleStore.locale, showDevWidget: DevToolsSettingsStore.showDevWidget};
});
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([OverridePremiumTypeStore],
function() {
return OverridePremiumTypeStore.getPremiumTypeOverride();
});
const binding = env0_4;
var [property, env0_4] = env0_3(binding.useState(false), 2);
const IgnoreProfileSpeedbumpDisabled = (UserSettingsModule).IgnoreProfileSpeedbumpDisabled;
const value6 = IgnoreProfileSpeedbumpDisabled.useSetting();
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value7 = binding.useCallback(_fun107440, [locale]);
if (property) {
return ((Component) => <Component />)((require(14224) /* metro dependency 14224: UserSettingsJSError */).default);
}
const items3 = [styles.content];
items3[1] = {paddingBottom: styles.content.padding + value2.bottom};
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const items2 = [
<TableRowGroup title="General" hasIcons={false}>
<TableSwitchRow
label="Show Dev Widget"
value={showDevWidget}
onValueChange={onValueChange_107441}
/>
</TableRowGroup>,
];
const Spacer = (NativeModule).Spacer;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[1] = <Spacer size={PX_16} />;
const ThemeLightIcon = (ThemeLightIconModule).ThemeLightIcon;
const tableSwitchRow = (
<TableSwitchRow
label={usingSystemTheme ? '(using system theme)' : 'Light Theme'}
disabled={usingSystemTheme}
icon={<ThemeLightIcon />}
value={(require(4002) /* metro dependency 4002: shared */).isThemeLight(theme)}
onValueChange={handleThemeChange}
/>
);
const AccessibilityIcon = (AccessibilityIconModule).AccessibilityIcon;
items2[2] = (
<TableRowGroup title="Appearance" hasIcons>
{tableSwitchRow}
<TableSwitchRow
label="Reduced Motion"
icon={<AccessibilityIcon />}
value={useReducedMotion}
onValueChange={handleReducedMotionChange}
/>
</TableRowGroup>
);
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[3] = <Spacer size={PX_16} />;
items2[4] = (
<TableRowGroup title="Override Client-Side Premium Type" hasIcons>
{PREMIUM_TYPE_OVERRIDE_OPTIONS.map(_fun107442)}
</TableRowGroup>
);
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[5] = <Spacer size={PX_16} />;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['Aojq+L']);
object2.hasIcons = true;
const TableRow = (TableRowNativeModule).TableRow;
const tableRowProps = {label: locale !== 'en-US' ? 'Change to en-US' : 'Change to pt-BR',
subLabel: 'Toggle to a non-english locale for change log testing, etc.', onPress: value7};
const LanguageIcon = (LanguageIconModule).LanguageIcon;
tableRowProps.icon = <LanguageIcon />;
const TableRowArrow = (TableRowArrowNativeModule).TableRowArrow;
tableRowProps.trailing = <TableRowArrow />;
const items4 = [
<TableRow {...tableRowProps} />,
];
const tableRowProps2 = {'label': 'Reset Double Tap Emoji State',
'subLabel': 'Clears double tap emoji and resets dismissible content.', onPress: handleResetDoubleTapState};
const KeyIcon = (KeyIconModule).KeyIcon;
tableRowProps2.icon = <KeyIcon />;
tableRowProps2.trailing = <TableRowArrow />;
items4[1] = <TableRow {...tableRowProps2} />;
items4[2] = (
<TableRow
label="Reset In App Notif Expand NUX"
subLabel="Resets in app notification expand NUX dismissible content."
onPress={handleResetInAppNotificationExpandNux}
icon={<KeyIcon />}
trailing={<TableRowArrow />}
/>
);
const tableRowProps3 = {label: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yoWDXU),
subLabel: 'Dismisses dev tools when launching.', onPress: handleNewUserOnboarding};
const WrenchIcon = (WrenchIconModule).WrenchIcon;
tableRowProps3.icon = <WrenchIcon />;
tableRowProps3.trailing = <TableRowArrow />;
items4[3] = <TableRow {...tableRowProps3} />;
items4[4] = (
<TableRow
label="Launch MFA Challenge Modal"
subLabel="Dismisses dev tools when launching."
onPress={launchMFA}
icon={<KeyIcon />}
trailing={<TableRowArrow />}
/>
);
items4[5] = (
<TableRow
label="Show TOTP Setup Success"
subLabel="Dismisses dev tools when launching."
onPress={launchTotpSetupSuccess}
icon={<KeyIcon />}
trailing={<TableRowArrow />}
/>
);
items4[6] = (
<TableRow
label="Reset Launch Welcome"
subLabel="Resets launch welcome NUX flag, requires an app restart to take effect."
onPress={handleLaunchWelcomeReset}
icon={<KeyIcon />}
trailing={<TableRowArrow />}
/>
);
items4[7] = (
<TableRow
label="Launch Vibing Wumpus"
subLabel="Vibe with the one and only"
onPress={showVibingWumpus}
icon={<KeyIcon />}
trailing={<TableRowArrow />}
/>
);
items4[8] = (
<TableRow
label="Test captcha"
onPress={(require(14226) /* metro dependency 14226: OpenCaptchaTestModal */).showCaptchaTestModal}
icon={<KeyIcon />}
trailing={<TableRowArrow />}
/>
);
const EyeSlashIcon = (EyeSlashIconModule).EyeSlashIcon;
items4[9] = (
<TableSwitchRow
label="Ignored Profile Speedbump Suppression"
subLabel="Suppresses the speedbump for ignored profiles."
icon={<EyeSlashIcon />}
value={value6}
onValueChange={onValueChange_107444}
/>
);
items4[10] = (
<TableRow
label="Show App Rating Modal"
subLabel="Attempts to show the app rating modal -- this may not visually show anything on debug builds or if your device has already been shown the modal recently."
onPress={importDefault(12546) /* metro dependency 12546: requestReviewModal */}
icon={<WrenchIcon />}
/>
);
items2[6] = (
<TableRowGroup {...object2}>
{items4}
</TableRowGroup>
);
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[7] = <Spacer size={PX_16} />;
const items5 = [
<TableRow
icon={<WrenchIcon />}
label="Force Native Crash"
onPress={onPress_107445}
/>,
];
items5[1] = (
<TableRow
icon={<WrenchIcon />}
label="Force JS Crash"
onPress={function() {
var Error = global.Error;
throw new Error('Force JS Crash');
}}
/>
);
items5[2] = (
<TableRow
icon={<WrenchIcon />}
label="Force JS Boundary Crash"
onPress={onPress_107447}
/>
);
items5[3] = (
<TableRow
icon={<WrenchIcon />}
label="Force libdiscore Crash"
onPress={onPress_107448}
/>
);
items5[4] = (
<TableRow
icon={<WrenchIcon />}
label="Force libdiscore Store Crash"
subLabel="Dispatches LIBDISCORE_SIMULATE_CRASH to NoteStore"
onPress={onPress_107449}
/>
);
items5[5] = (
<TableRow
icon={<WrenchIcon />}
label="Force libdiscore Store Error"
subLabel="Dispatches LIBDISCORE_SIMULATE_STORE_ERROR with socket reset"
onPress={onPress_107450}
/>
);
items2[8] = (
<TableRowGroup title="Crash Actions" hasIcons>
{items5}
</TableRowGroup>
);
return (
<ScrollView style={styles.container} contentContainerStyle={items3}>
{items2}
</ScrollView>
);
function _fun107440() { // fn#107440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:2905, offset: 0x022fce7b, size: 97 bytes, params: 1, frame: 12
var value;
if (locale !== 'en-US') {
value = environment.__proto__;
value = importDefault(7896) /* metro dependency 7896: UserSettingsActionCreators */;
value.updateLocale('en-US');
} else {
value = environment.__proto__;
value = importDefault(7896) /* metro dependency 7896: UserSettingsActionCreators */;
value.updateLocale('pt-BR');
}
}
function DevToolsQuickActionsScreenOnValueChange() { // fn#107441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:3288, owner: DevToolsQuickActionsScreen.onValueChange, offset: 0x022fcedc, size: 55 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (DevToolsActionCreatorsModule).updateDevToolsSettings({showDevWidget: !showDevWidget});
}
function _fun107442({label, value}) { // fn#107442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:3929, offset: 0x022fcf13, size: 126 bytes, params: 2, frame: 19
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const PencilIcon = (PencilIconModule).PencilIcon;
return (
<TableSwitchRow
onValueChange={function(a0) {
var moduleValue = require(dependencyMap[45]);
moduleValue.updateClientPremiumTypeOverride(a0 ? value : UNSELECTED_PREMIUM_TYPE_OVERRIDE, currentUser);
}}
label={label}
icon={<PencilIcon />}
value={value === premiumTypeOverride}
key={label}
/>
);
}
function DevToolsQuickActionsScreenOnValueChange_107444() { // fn#107444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:6302, owner: DevToolsQuickActionsScreen.onValueChange, offset: 0x022fcfd2, size: 54 bytes, params: 1, frame: 11
const IgnoreProfileSpeedbumpDisabled = (UserSettingsModule).IgnoreProfileSpeedbumpDisabled;
return IgnoreProfileSpeedbumpDisabled.updateSetting(!ReactNativeModule.ScrollView);
}
function DevToolsQuickActionsScreenOnPress() { // fn#107445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:6839, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd008, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (SentryUtilsNative).crash();
}
function DevToolsQuickActionsScreenOnPress_107447() { // fn#107447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7079, owner: DevToolsQuickActionsScreen.onPress, offset: 0x0225463c, size: 18 bytes, params: 1, frame: 11
env0_4(true);
}
function DevToolsQuickActionsScreenOnPress_107448() { // fn#107448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7184, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd051, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ShimNativeModule).crash();
}
function DevToolsQuickActionsScreenOnPress_107449() { // fn#107449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7367, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd076, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(Dispatcher).dispatch({type: 'LIBDISCORE_SIMULATE_CRASH'});
}
function DevToolsQuickActionsScreenOnPress_107450() { // fn#107450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7598, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd0a7, size: 87 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
const env0_0 = GatewayConnectionStore.getSocket();
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value = value.dispatch({type: 'LIBDISCORE_SIMULATE_STORE_ERROR'});
value.catch(_fun107451);
function _fun107451(a0) { // fn#107451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7690, offset: 0x022fd0fe, size: 41 bytes, params: 2, frame: 12
env0_0.resetSocketOnDispatchError({error: a0, action: 'LIBDISCORE_SIMULATE_STORE_ERROR'});
}
}
}
}
function DevToolsQuickActionsScreenOnValueChange() { // fn#107441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:3288, owner: DevToolsQuickActionsScreen.onValueChange, offset: 0x022fcedc, size: 55 bytes, params: 1, frame: 12
const value = environment.__proto__;
return (require(13126) /* metro dependency 13126: DevToolsActionCreators */).updateDevToolsSettings({showDevWidget: !showDevWidget});
}
function _fun107442({label, value}) { // fn#107442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:3929, offset: 0x022fcf13, size: 126 bytes, params: 2, frame: 19
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const PencilIcon = (require(9646) /* metro dependency 9646: PencilIcon */).PencilIcon;
return (
<TableSwitchRow
onValueChange={function(a0) {
var moduleValue = require(dependencyMap[45]);
moduleValue.updateClientPremiumTypeOverride(a0 ? value : UNSELECTED_PREMIUM_TYPE_OVERRIDE, currentUser);
}}
label={label}
icon={<PencilIcon />}
value={value === premiumTypeOverride}
key={label}
/>
);
}
function DevToolsQuickActionsScreenOnValueChange_107444() { // fn#107444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:6302, owner: DevToolsQuickActionsScreen.onValueChange, offset: 0x022fcfd2, size: 54 bytes, params: 1, frame: 11
const IgnoreProfileSpeedbumpDisabled = (require(3829) /* metro dependency 3829: UserSettings */).IgnoreProfileSpeedbumpDisabled;
return IgnoreProfileSpeedbumpDisabled.updateSetting(!env0_5);
}
function DevToolsQuickActionsScreenOnPress() { // fn#107445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:6839, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd008, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).crash();
}
function DevToolsQuickActionsScreenOnPress_107448() { // fn#107448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7184, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd051, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(1873) /* metro dependency 1873: shimNative */).crash();
}
function DevToolsQuickActionsScreenOnPress_107449() { // fn#107449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7367, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd076, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'LIBDISCORE_SIMULATE_CRASH'});
}
function DevToolsQuickActionsScreenOnPress_107450() { // fn#107450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7598, owner: DevToolsQuickActionsScreen.onPress, offset: 0x022fd0a7, size: 87 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
const env0_0 = GatewayConnectionStore.getSocket();
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value = value.dispatch({type: 'LIBDISCORE_SIMULATE_STORE_ERROR'});
value.catch(_fun107451);
}
function _fun107451(a0) { // fn#107451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14404:7690, offset: 0x022fd0fe, size: 41 bytes, params: 2, frame: 12
env0_0.resetSocketOnDispatchError({error: a0, action: 'LIBDISCORE_SIMULATE_STORE_ERROR'});
function showVibingWumpusOnClose() { // fn#107429, owner: showVibingWumpus.onClose, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
}
global.__d(_fun107419, 14207, [57, 31, 27, 4502, 4257, 1879, 1949, 1310, 1312, 1878, 7111, 661, 12022, 1880, 9734,
1313, 33, 4501, 697, 12043, 694, 12021, 7896, 12992, 1362, 1365, 3968, 5080, 14208, 1962, 9746, 13304, 13306,
10995, 1585, 566, 3829, 14224, 6231, 6808, 13126, 1305, 13730, 4002, 13783, 14225, 9646, 1244, 6238, 13813,
6243, 8988, 13957, 14226, 8998, 12546, 1216, 1873,
2]) /* metro module 14207, dependencies: [57, 31, 27, 4502, 4257, 1879, 1949, 1310, 1312, 1878, 7111, 661, 12022, 1880, 9734, 1313, 33, 4501, 697, 12043, 694, 12021, 7896, 12992, 1362, 1365, 3968, 5080, 14208, 1962, 9746, 13304, 13306, 10995, 1585, 566, 3829, 14224, 6231, 6808, 13126, 1305, 13730, 4002, 13783, 14225, 9646, 1244, 6238, 13813, 6243, 8988, 13957, 14226, 8998, 12546, 1216, 1873, 2] */;
@@ -1,18 +1,33 @@
/* Metro module 14230; source: modules/devtools/native/components/screens/DevToolsRevenuePlaygroundScreen.tsx; dependencies: [31, 27, 8326, 5221, 1379, 1934, 1878, 4649, 1880, 33, 694, 632, 6231, 6238, 6243, 6803, 3857, 7067, 4501, 697, 7062, 4080, 14231, 1962, 6808, 14234, 10560, 5080, 14235, 14238, 14242, 14244, 1305, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ChannelStore from '../../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import SelectedChannelStore from '../../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import DevSettingsStore from '../../../dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */
import UserAffinitiesV2Store from '../../../../user_affinities/UserAffinitiesV2Store.tsx'; /* Metro dependency 5221 */
import PremiumGiftingIntentStore from '../../../../premium/gifting/PremiumGiftingIntentStore.tsx'; /* Metro dependency 8326 */
import BundleUpdater from '../../../../../lib/native/BundleUpdater.tsx'; /* Metro dependency 10560 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseStateFromStoresModule from '../../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as NativeModule from '../../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as PremiumConstantsModule from '../../../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as DevSettingsStoreModule from '../../../dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableRowArrowNativeModule from '../../../../../design/components/TableRow/native/TableRowArrow.native.tsx'; /* Metro dependency 6243 */
import * as ShowSimpleActionSheetNativeModule from '../../../../../design/components/Sheet/native/showSimpleActionSheet.native.tsx'; /* Metro dependency 6803 */
import * as TableSwitchRowNativeModule from '../../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as UsePremiumTrialOfferNativeModule from '../../../../premium/hooks/usePremiumTrialOffer.native.tsx'; /* Metro dependency 7062 */
import * as DevSettingsActionsModule from '../../../dev_settings/DevSettingsActions.tsx'; /* Metro dependency 14234 */
function _fun107606(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:6, offset: 0x0230227d, size: 651 bytes, params: 8, frame: 23
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 */).ScrollView;
const premiumGiftingIntentStore = importDefault(8326) /* metro dependency 8326: PremiumGiftingIntentStore */;
const userAffinitiesV2Store = importDefault(5221) /* metro dependency 5221: UserAffinitiesV2Store */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
const env0_10 = (require(4649) /* metro dependency 4649: DevSettingsStore */).DevSettingsCategory;
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
ReactModule;
let value = PremiumConstantsModule;
const env0_11 = value.GiftIntentType;
const env0_12 = value.PremiumTypes;
value = require(33) /* metro dependency 33 */;
@@ -24,435 +39,454 @@ function _fun107606(global, require, importDefault, importAll, module, exports,
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_16 = (Native).space.PX_16;
object.scrollContainer = {padding: PX_16};
const env0_16 = Reflect.apply(createStyles, value, [object]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsRevenuePlaygroundScreen.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsRevenuePlaygroundScreen.tsx');
exports.default = DevToolsRevenuePlaygroundScreen;
}
function FriendAnniversary() { // fn#107607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:462, offset: 0x02302508, size: 445 bytes, params: 1, frame: 28
const value2 = undefined;
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([PremiumGiftingIntentStore,
UserStore, UserAffinitiesV2Store], _fun107608, [],
(require(632) /* metro dependency 632: useStateFromStores */).statesWillNeverBeEqual);
const env0_0 = value3.selected;
const highestAffinity = value3.highestAffinity;
const highAffinity = value3.highAffinity;
const value4 = env0_15.find(function({value}) {
return value === selected;
});
const r16 = (value4 == null ? value2 : value4.label) ?? 'None';
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
const items2 = [<TableRow label="Number of anniversaries" subLabel={'Current: ' + r16} trailing={<TableRowArrow />} onPress={onPress_107611} />];
items2[1] = <TableRow label="Trigger Mobile FA message in current DM" subLabel="Sends an ephemeral GIFTING_PROMPT into the selected channel" onPress={onPress_107614} />;
items2[2] = highestAffinity.map(_fun107615);
items2[3] = highAffinity.map(_fun107616);
return (
<TableRowGroup title="Friend Anniversary" hasIcons={false}>
{items2}
</TableRowGroup>
);
}
function TrialOfferSheetExample() { // fn#107617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2802, offset: 0x02302ae9, size: 265 bytes, params: 1, frame: 23
const value2 = undefined;
const value4 = (require(7062) /* metro dependency 7062: usePremiumTrialOfferNative */).usePremiumTrialOffer() != null;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const value5 = 'No trial offer in store';
const r9 = value4 ? value2 : value5;
const value6 = !value4;
return (
<TableRowGroup title="Trial Offers" hasIcons={false}>
function FriendAnniversary() { // fn#107607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:462, offset: 0x02302508, size: 445 bytes, params: 1, frame: 28
const value2 = undefined;
const value3 = (UseStateFromStoresModule).useStateFromStores([PremiumGiftingIntentStore,
UserStore, UserAffinitiesV2Store], _fun107608, [],
(UseStateFromStoresModule).statesWillNeverBeEqual);
const env0_0 = value3.selected;
const highestAffinity = value3.highestAffinity;
const highAffinity = value3.highAffinity;
const value4 = env0_15.find(function({value}) {
return value === selected;
});
const r16 = (value4 == null ? value2 : value4.label) ?? 'None';
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const TableRowArrow = (TableRowArrowNativeModule).TableRowArrow;
const items2 = [
<TableRow
label="Trial Offer Nitro Basic"
subLabel={r9}
disabled={value6}
onPress={function() {
openTrialOfferActionSheet(PremiumTypes.TIER_0);
}}
/>
label="Number of anniversaries"
subLabel={'Current: ' + r16}
trailing={<TableRowArrow />}
onPress={onPress_107611}
/>,
];
items2[1] = (
<TableRow
label="Trial Offer Nitro"
subLabel={value4 ? value2 : value5}
disabled={value6}
onPress={function() {
openTrialOfferActionSheet(PremiumTypes.TIER_2);
}}
label="Trigger Mobile FA message in current DM"
subLabel="Sends an ephemeral GIFTING_PROMPT into the selected channel"
onPress={onPress_107614}
/>
</TableRowGroup>
);
}
);
items2[2] = highestAffinity.map(_fun107615);
items2[3] = highAffinity.map(_fun107616);
return (
<TableRowGroup title="Friend Anniversary" hasIcons={false}>
{items2}
</TableRowGroup>
);
function _fun107608() { // fn#107608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:538, offset: 0x023026c5, size: 99 bytes, params: 1, frame: 13
var environment;
const buildRow2 = buildRow;
const object = {};
const value = environment.__proto__;
object.selected = PremiumGiftingIntentStore.getDevToolTotalFriendAnniversaries();
object.highestAffinity = PremiumGiftingIntentStore.getHighestAffinityFriendAnniversaries().map(buildRow2);
object.highAffinity = PremiumGiftingIntentStore.getHighAffinityFriendAnniversaries().map(buildRow2);
return object;
function buildRow(a0) { // fn#107609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:556, offset: 0x02302728, size: 188 bytes, params: 2, frame: 18
var r1;
let value = environment.__proto__.__proto__;
const userAffinity = UserAffinitiesV2Store.getUserAffinity(a0);
const object = {userId: a0};
value = UserStore.getUser(a0);
const value3 = undefined;
const username = value == null ? value3 : value.username;
object.username = username ?? 'Unknown User (' + a0 + ')';
const dmProbability = userAffinity == null ? value3 : userAffinity.dmProbability;
value = 'N/A';
if (dmProbability != null) {
value = 100 * userAffinity.dmProbability;
value = value.toFixed(3);
value = '' + value + '%';
r1 = value;
} else {
r1 = value;
}
object.affinity = r1;
return object;
}
function PremiumToggles() { // fn#107622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3453, offset: 0x02302cac, size: 145 bytes, params: 1, frame: 22
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([DevSettingsStore],
_fun107623, [], (require(632) /* metro dependency 632: useStateFromStores */).statesWillNeverBeEqual);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup title="Premium Toggles" hasIcons={false}>
{value2.map(_fun107625)}
</TableRowGroup>
);
}
function ForceMockIAP() { // fn#107627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3828, offset: 0x02302e92, size: 163 bytes, params: 1, frame: 19
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([DevSettingsStore],
function() {
return DevSettingsStore.get('force_mock_iap');
});
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableRowGroup title="iOS IAP Mock" hasIcons={false}>
<TableSwitchRow
label="Force mock IAP products"
subLabel="Replaces StoreKit with hardcoded fixture data. App will restart when toggled."
value={value2}
onValueChange={onValueChange_107629}
/>
</TableRowGroup>
);
}
function PaymentFlowTest() { // fn#107630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4258, offset: 0x02302fa6, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {label: 'Test Payment Flow', onPress: onPress_107631};
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Payment Flow Test" hasIcons={false}>
<TableRow {...object} />
</TableRowGroup>
);
}
function Orbs() { // fn#107632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4511, offset: 0x02303083, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {label: 'Test Orbs Flow', onPress: onPress_107633};
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Orbs" hasIcons={false}>
<TableRow {...object} />
</TableRowGroup>
);
}
function RevenueSmokeTests() { // fn#107634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4737, offset: 0x02303160, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {label: 'Test all purchasing flows', onPress: onPress_107635};
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Revenue Smoke Tests" hasIcons={false}>
<TableRow {...object} />
</TableRowGroup>
);
}
function GuildPowerups() { // fn#107636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:5002, offset: 0x0230323d, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {label: 'Guild Powerups', onPress: onPress_107637};
const TableRowArrow = (require(6243) /* metro dependency 6243: TableRowArrowNative */).TableRowArrow;
object.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Guild Powerups" hasIcons={false}>
<TableRow {...object} />
</TableRowGroup>
);
}
function DevToolsRevenuePlaygroundScreen() { // fn#107638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:5370, offset: 0x0230331a, size: 615 bytes, params: 1, frame: 24
const styles = useStyles();
const items2 = [<TrialOfferSheetExample />];
const Spacer = (require(1305) /* metro dependency 1305: native */).Spacer;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[1] = <Spacer size={PX_16} />;
items2[2] = <PremiumToggles />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[3] = <Spacer size={PX_16} />;
items2[4] = <ForceMockIAP />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[5] = <Spacer size={PX_16} />;
items2[6] = <PaymentFlowTest />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[7] = <Spacer size={PX_16} />;
items2[8] = <Orbs />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[9] = <Spacer size={PX_16} />;
items2[10] = <RevenueSmokeTests />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[11] = <Spacer size={PX_16} />;
items2[12] = <GuildPowerups />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[13] = <Spacer size={PX_16} />;
items2[14] = <FriendAnniversary />;
return (
<ScrollView style={styles.container} contentContainerStyle={styles.scrollContainer}>
{items2}
</ScrollView>
);
}
function _fun107608() { // fn#107608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:538, offset: 0x023026c5, size: 99 bytes, params: 1, frame: 13
var environment;
const closure = buildRow;
const object2 = {};
const value = environment.__proto__;
object2.selected = PremiumGiftingIntentStore.getDevToolTotalFriendAnniversaries();
object2.highestAffinity = PremiumGiftingIntentStore.getHighestAffinityFriendAnniversaries().map(closure);
object2.highAffinity = PremiumGiftingIntentStore.getHighAffinityFriendAnniversaries().map(closure);
return object2;
}
function FriendAnniversaryOnPress() { // fn#107611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:1345, owner: FriendAnniversary.onPress, offset: 0x023027e4, size: 100 bytes, params: 1, frame: 15
const showSimpleActionSheetNativeModule = require(6803) /* metro dependency 6803: showSimpleActionSheetNative */;
const showSimpleActionSheet = showSimpleActionSheetNativeModule.showSimpleActionSheet;
const object2 = {key: 'dev-tools-friend-anniversary-count'};
object2.header = {title: 'Anniversaries to generate'};
object2.options = env1_15.map(_fun107612);
object2.hasIcons = false;
Reflect.apply(showSimpleActionSheet, showSimpleActionSheetNativeModule, [object2]);
}
function FriendAnniversaryOnPress_107614() { // fn#107614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:1841, owner: FriendAnniversary.onPress, offset: 0x023028d6, size: 267 bytes, params: 1, frame: 18
var r7;
var channel;
const value = environment.__proto__;
const channelId = SelectedChannelStore.getChannelId();
if (channelId != null) {
channel = ChannelStore.getChannel(channelId);
r7 = channel == null || channel.recipients == null ? undefined : channel.recipients[0];
if (r7 != null) {
(importDefault(7067) /* metro dependency 7067: MessageActionCreators */).sendGiftingPromptSystemMessage(channelId,
{giftIntentType: GiftIntentType.FRIEND_ANNIVERSARY, recipientUserId: r7});
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'dev-tools-gift-intent-triggered',
'content': 'Friendship anniversary card sent.'});
} else {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'dev-tools-gift-intent-no-recipient',
'content': 'Selected channel has no other recipient.'});
}
} else {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'dev-tools-gift-intent-no-channel',
'content': 'Open a DM first.'});
}
}
function _fun107615({userId, username, affinity}) { // fn#107615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2372, offset: 0x023029e1, size: 143 bytes, params: 2, frame: 20
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={'★ ' + username}
subLabel={'Highest affinity (eligible for notification) · ' + affinity}
key={'highest-' + userId}
/>
);
}
function FriendAnniversaryOnPress() { // fn#107611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:1345, owner: FriendAnniversary.onPress, offset: 0x023027e4, size: 100 bytes, params: 1, frame: 15
const showSimpleActionSheet = ShowSimpleActionSheetNativeModule.showSimpleActionSheet;
const object = {key: 'dev-tools-friend-anniversary-count'};
object.header = {title: 'Anniversaries to generate'};
object.options = env1_15.map(_fun107612);
object.hasIcons = false;
Reflect.apply(showSimpleActionSheet, ShowSimpleActionSheetNativeModule, [object]);
function _fun107612({label, value}) { // fn#107612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:1487, offset: 0x02302848, size: 81 bytes, params: 2, frame: 16
return {label: value !== selected ? label : '' + label + ' (selected)', onPress: function() {
importDefault(dependencyMap[10]).dispatch({type: 'DEV_TOOLS_SET_FRIEND_ANNIVERSARY_COUNT', total: value});
}};
}
function _fun107616({userId, username, affinity}) { // fn#107616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2536, offset: 0x02302a70, size: 121 bytes, params: 2, frame: 19
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={username}
subLabel={'High affinity · ' + affinity}
key={'high-' + userId}
/>
);
}
function openTrialOfferActionSheet(a0) { // fn#107618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2910, owner: TrialOfferSheetExample.openTrialOfferActionSheet, offset: 0x02302bf2, size: 128 bytes, params: 2, frame: 17
var environment;
var value2;
var defaultImport;
if (env0_0 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(dependencyMap[21]);
defaultImport.openLazy(require(dependencyMap[23])(dependencyMap[22], dependencyMap.paths),
'PremiumTrialOfferActionSheet', {fallbackPremiumType: a0, userTrialOffer: env0_0,
markAsDismissed: function() {
}});
}
}
function _fun107623() { // fn#107623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3518, offset: 0x02302d3d, size: 49 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
const allByCategory = DevSettingsStore.allByCategory;
const PREMIUM = DevSettingsCategory.PREMIUM;
return Reflect.apply(allByCategory, DevSettingsStore, [PREMIUM]).filter(function(a0) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r1 = value2 ? value : item;
if (!value2) {
item2.return();
}
return r1 !== 'force_mock_iap';
});
}
function _fun107625(a0) { // fn#107625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3709, offset: 0x02302d99, size: 200 bytes, params: 2, frame: 23
var r1;
var r2;
var r42;
var r43;
var item3;
var value3;
var item4;
var value4;
var label;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
if (r2) {
r43 = value;
} else {
item4 = Reflect.apply(iterator2, r1, []);
item = item4.value;
item4 = item4.done ? undefined : r1;
value4 = item4 === value;
if (value4) {
r1 = item4;
r2 = value4;
r43 = value;
} else {
r1 = item4;
r2 = value4;
r43 = item;
}
}
try {
label = r43.label;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
function FriendAnniversaryOnPress_107614() { // fn#107614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:1841, owner: FriendAnniversary.onPress, offset: 0x023028d6, size: 267 bytes, params: 1, frame: 18
var r7;
var channel;
const value = environment.__proto__;
const channelId = SelectedChannelStore.getChannelId();
if (channelId != null) {
channel = ChannelStore.getChannel(channelId);
r7 = channel == null || channel.recipients == null ? undefined : channel.recipients[0];
if (r7 != null) {
(importDefault(7067) /* metro dependency 7067: MessageActionCreators */).sendGiftingPromptSystemMessage(channelId,
{giftIntentType: GiftIntentType.FRIEND_ANNIVERSARY, recipientUserId: r7});
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'dev-tools-gift-intent-triggered',
'content': 'Friendship anniversary card sent.'});
} else {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'dev-tools-gift-intent-no-recipient',
'content': 'Selected channel has no other recipient.'});
}
} else {
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({'key': 'dev-tools-gift-intent-no-channel',
'content': 'Open a DM first.'});
}
}
throw error;
function _fun107615({userId, username, affinity}) { // fn#107615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2372, offset: 0x023029e1, size: 143 bytes, params: 2, frame: 20
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label={'★ ' + username}
subLabel={'Highest affinity (eligible for notification) · ' + affinity}
key={'highest-' + userId}
/>
);
}
function _fun107616({userId, username, affinity}) { // fn#107616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2536, offset: 0x02302a70, size: 121 bytes, params: 2, frame: 19
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label={username}
subLabel={'High affinity · ' + affinity}
key={'high-' + userId}
/>
);
}
}
if (!r2) {
r1.return();
function TrialOfferSheetExample() { // fn#107617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2802, offset: 0x02302ae9, size: 265 bytes, params: 1, frame: 23
const value2 = undefined;
const value4 = (UsePremiumTrialOfferNativeModule).usePremiumTrialOffer() != null;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const value5 = 'No trial offer in store';
const r9 = value4 ? value2 : value5;
const value6 = !value4;
return (
<TableRowGroup title="Trial Offers" hasIcons={false}>
<TableRow
label="Trial Offer Nitro Basic"
subLabel={r9}
disabled={value6}
onPress={function() {
openTrialOfferActionSheet(PremiumTypes.TIER_0);
}}
/>
<TableRow
label="Trial Offer Nitro"
subLabel={value4 ? value2 : value5}
disabled={value6}
onPress={function() {
openTrialOfferActionSheet(PremiumTypes.TIER_2);
}}
/>
</TableRowGroup>
);
function openTrialOfferActionSheet(a0) { // fn#107618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:2910, owner: TrialOfferSheetExample.openTrialOfferActionSheet, offset: 0x02302bf2, size: 128 bytes, params: 2, frame: 17
var environment;
var value2;
var defaultImport;
if (env0_0 != null) {
value2 = environment.__proto__;
defaultImport = importDefault(dependencyMap[21]);
defaultImport.openLazy(require(dependencyMap[23])(dependencyMap[22], dependencyMap.paths),
'PremiumTrialOfferActionSheet', {fallbackPremiumType: a0, userTrialOffer: env0_0,
markAsDismissed: function() {
}});
}
}
}
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
return (
<TableSwitchRow
label={label}
subLabel={r4}
value={r42}
onValueChange={onValueChange_107626}
key={r4}
/>
);
}
function ForceMockIAPOnValueChange(a0) { // fn#107629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4166, owner: ForceMockIAP.onValueChange, offset: 0x02302f4e, size: 88 bytes, params: 2, frame: 16
const value = environment.__proto__;
(require(14234) /* metro dependency 14234: DevSettingsActions */).toggle('force_mock_iap', a0);
DevSettingsStore.persist();
(importDefault(10560) /* metro dependency 10560: BundleUpdater */).checkForUpdateAndReload();
}
function PremiumToggles() { // fn#107622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3453, offset: 0x02302cac, size: 145 bytes, params: 1, frame: 22
const value2 = (UseStateFromStoresModule).useStateFromStores([DevSettingsStore],
_fun107623, [], (UseStateFromStoresModule).statesWillNeverBeEqual);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<TableRowGroup title="Premium Toggles" hasIcons={false}>
{value2.map(_fun107625)}
</TableRowGroup>
);
function _fun107623() { // fn#107623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3518, offset: 0x02302d3d, size: 49 bytes, params: 1, frame: 11
var environment;
let value = environment.__proto__;
const devSettingsStoreBinding = DevSettingsStore;
const allByCategory = devSettingsStoreBinding.allByCategory;
const PREMIUM = DevSettingsCategory.PREMIUM;
return Reflect.apply(allByCategory, devSettingsStoreBinding, [PREMIUM]).filter(function(a0) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r1 = value2 ? value : item;
if (!value2) {
item2.return();
}
return r1 !== 'force_mock_iap';
});
}
function PaymentFlowTestOnPress() { // fn#107631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4420, owner: PaymentFlowTest.onPress, offset: 0x0230303b, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[28], dependencyMap.paths));
}
function _fun107625(a0) { // fn#107625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3709, offset: 0x02302d99, size: 200 bytes, params: 2, frame: 23
var r1;
var r2;
var r42;
var r43;
var item3;
var value3;
var item4;
var value4;
var label;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
if (r2) {
r43 = value;
} else {
item4 = Reflect.apply(iterator2, r1, []);
item = item4.value;
item4 = item4.done ? undefined : r1;
value4 = item4 === value;
if (value4) {
r1 = item4;
r2 = value4;
r43 = value;
} else {
r1 = item4;
r2 = value4;
r43 = item;
}
}
try {
label = r43.label;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
return (
<TableSwitchRow
label={label}
subLabel={r4}
value={r42}
onValueChange={onValueChange_107626}
key={r4}
/>
);
function onValueChange_107626(a0) { // fn#107626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3796, offset: 0x02302e61, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (DevSettingsActionsModule).toggle(env0_0, a0);
}
function OrbsOnPress() { // fn#107633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4646, owner: Orbs.onPress, offset: 0x02303118, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[29], dependencyMap.paths));
}
}
function RevenueSmokeTestsOnPress() { // fn#107635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4911, owner: RevenueSmokeTests.onPress, offset: 0x023031f5, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[30], dependencyMap.paths));
}
function GuildPowerupsOnPress() { // fn#107637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:5156, owner: GuildPowerups.onPress, offset: 0x023032d2, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[31], dependencyMap.paths));
}
function buildRow(a0) { // fn#107609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:556, offset: 0x02302728, size: 188 bytes, params: 2, frame: 18
var r1;
let value = environment.__proto__.__proto__;
const userAffinity = UserAffinitiesV2Store.getUserAffinity(a0);
const object2 = {userId: a0};
value = UserStore.getUser(a0);
const value3 = undefined;
const username = value == null ? value3 : value.username;
object2.username = username ?? 'Unknown User (' + a0 + ')';
const dmProbability = userAffinity == null ? value3 : userAffinity.dmProbability;
value = 'N/A';
if (dmProbability != null) {
value = 100 * userAffinity.dmProbability;
value = value.toFixed(3);
value = '' + value + '%';
r1 = value;
} else {
r1 = value;
}
object2.affinity = r1;
return object2;
}
function _fun107612({label, value}) { // fn#107612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:1487, offset: 0x02302848, size: 81 bytes, params: 2, frame: 16
return {label: value !== selected ? label : '' + label + ' (selected)', onPress: function() {
importDefault(dependencyMap[10]).dispatch({type: 'DEV_TOOLS_SET_FRIEND_ANNIVERSARY_COUNT', total: value});
}};
}
function onValueChange_107626(a0) { // fn#107626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3796, offset: 0x02302e61, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle(env0_0, a0);
function ForceMockIAP() { // fn#107627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:3828, offset: 0x02302e92, size: 163 bytes, params: 1, frame: 19
const value2 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([DevSettingsStore],
function() {
return DevSettingsStore.get('force_mock_iap');
});
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
return (
<TableRowGroup title="iOS IAP Mock" hasIcons={false}>
<TableSwitchRow
label="Force mock IAP products"
subLabel="Replaces StoreKit with hardcoded fixture data. App will restart when toggled."
value={value2}
onValueChange={onValueChange_107629}
/>
</TableRowGroup>
);
function ForceMockIAPOnValueChange(a0) { // fn#107629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4166, owner: ForceMockIAP.onValueChange, offset: 0x02302f4e, size: 88 bytes, params: 2, frame: 16
const value = environment.__proto__;
(DevSettingsActionsModule).toggle('force_mock_iap', a0);
DevSettingsStore.persist();
(BundleUpdater).checkForUpdateAndReload();
}
}
function PaymentFlowTest() { // fn#107630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4258, offset: 0x02302fa6, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {label: 'Test Payment Flow', onPress: onPress_107631};
const TableRowArrow = (TableRowArrowNativeModule).TableRowArrow;
object2.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Payment Flow Test" hasIcons={false}>
<TableRow {...object2} />
</TableRowGroup>
);
function PaymentFlowTestOnPress() { // fn#107631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4420, owner: PaymentFlowTest.onPress, offset: 0x0230303b, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[28], dependencyMap.paths));
}
}
function Orbs() { // fn#107632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4511, offset: 0x02303083, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {label: 'Test Orbs Flow', onPress: onPress_107633};
const TableRowArrow = (TableRowArrowNativeModule).TableRowArrow;
object2.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Orbs" hasIcons={false}>
<TableRow {...object2} />
</TableRowGroup>
);
function OrbsOnPress() { // fn#107633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4646, owner: Orbs.onPress, offset: 0x02303118, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[29], dependencyMap.paths));
}
}
function RevenueSmokeTests() { // fn#107634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4737, offset: 0x02303160, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {label: 'Test all purchasing flows', onPress: onPress_107635};
const TableRowArrow = (TableRowArrowNativeModule).TableRowArrow;
object2.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Revenue Smoke Tests" hasIcons={false}>
<TableRow {...object2} />
</TableRowGroup>
);
function RevenueSmokeTestsOnPress() { // fn#107635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:4911, owner: RevenueSmokeTests.onPress, offset: 0x023031f5, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[30], dependencyMap.paths));
}
}
function GuildPowerups() { // fn#107636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:5002, offset: 0x0230323d, size: 149 bytes, params: 1, frame: 20
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {label: 'Guild Powerups', onPress: onPress_107637};
const TableRowArrow = (TableRowArrowNativeModule).TableRowArrow;
object2.trailing = <TableRowArrow />;
return (
<TableRowGroup title="Guild Powerups" hasIcons={false}>
<TableRow {...object2} />
</TableRowGroup>
);
function GuildPowerupsOnPress() { // fn#107637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:5156, owner: GuildPowerups.onPress, offset: 0x023032d2, size: 72 bytes, params: 1, frame: 15
const value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[27]);
defaultImport.pushLazy(require(dependencyMap[23])(dependencyMap[31], dependencyMap.paths));
}
}
function DevToolsRevenuePlaygroundScreen() { // fn#107638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14427:5370, offset: 0x0230331a, size: 615 bytes, params: 1, frame: 24
const styles = useStyles();
const items2 = [
<TrialOfferSheetExample />,
];
const Spacer = (NativeModule).Spacer;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[1] = <Spacer size={PX_16} />;
items2[2] = <PremiumToggles />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[3] = <Spacer size={PX_16} />;
items2[4] = <ForceMockIAP />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[5] = <Spacer size={PX_16} />;
items2[6] = <PaymentFlowTest />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[7] = <Spacer size={PX_16} />;
items2[8] = <Orbs />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[9] = <Spacer size={PX_16} />;
items2[10] = <RevenueSmokeTests />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[11] = <Spacer size={PX_16} />;
items2[12] = <GuildPowerups />;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[13] = <Spacer size={PX_16} />;
items2[14] = <FriendAnniversary />;
return (
<ScrollView style={styles.container} contentContainerStyle={styles.scrollContainer}>
{items2}
</ScrollView>
);
}
}
global.__d(_fun107606, 14230, [31, 27, 8326, 5221, 1379, 1934, 1878, 4649, 1880, 33, 694, 632, 6231, 6238, 6243,
6803, 3857, 7067, 4501, 697, 7062, 4080, 14231, 1962, 6808, 14234, 10560, 5080, 14235, 14238, 14242, 14244,
1305,
2]) /* metro module 14230, dependencies: [31, 27, 8326, 5221, 1379, 1934, 1878, 4649, 1880, 33, 694, 632, 6231, 6238, 6243, 6803, 3857, 7067, 4501, 697, 7062, 4080, 14231, 1962, 6808, 14234, 10560, 5080, 14235, 14238, 14242, 14244, 1305, 2] */;
@@ -1,88 +1,144 @@
/* Metro module 14260; source: modules/devtools/native/components/screens/DevToolsShopScreen.tsx; dependencies: [31, 27, 4649, 33, 4501, 697, 5463, 566, 14158, 1365, 4572, 6231, 6238, 6809, 14234, 6808, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import DevSettingsStore from '../../../dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import ToggleDismissibleContentDismissState from '../../../../dismissible_content/utils/toggleDismissibleContentDismissState.tsx'; /* Metro dependency 14158 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as Dismissible_contentModule from '../../../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as TableSwitchRowNativeModule from '../../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
import * as FormSwitchNativeModule from '../../../../../design/components/Forms/native/FormSwitch.native.tsx'; /* Metro dependency 6809 */
import * as DevSettingsActionsModule from '../../../dev_settings/DevSettingsActions.tsx'; /* Metro dependency 14234 */
function _fun107857(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:6, offset: 0x0230b889, size: 270 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(27) /* metro dependency 27 */).ScrollView;
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const env0_7 = Reflect.apply(createStyles, value, [{wrap: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsShopScreen.tsx');
const object2 = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const PX_16 = (Native).space.PX_16;
object2.paddingHorizontal = PX_16;
const env0_7 = Reflect.apply(createStyles, value, [{wrap: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsShopScreen.tsx');
exports.default = DevToolsShopScreen;
function DevToolsShopScreen() { // fn#107858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:394, offset: 0x0230b997, size: 835 bytes, params: 1, frame: 33
const styles = useStyles();
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const useStateFromStores = FluxModule.useStateFromStores;
const devSettingsStoreBinding = DevSettingsStore;
const value2 = Reflect.apply(useStateFromStores, FluxModule, [[devSettingsStoreBinding], function() {
return DevSettingsStore.get('shop_disable_cache');
}]);
const value3 = FluxModule.useStateFromStores([devSettingsStoreBinding], function() {
return DevSettingsStore.get('shop_include_unpublished');
});
const value4 = FluxModule.useStateFromStores([devSettingsStoreBinding], function() {
return DevSettingsStore.get('shop_show_debug_overlay');
});
const value5 = FluxModule.useStateFromStores([devSettingsStoreBinding], function() {
return DevSettingsStore.get('bypass_google_sku_sync');
});
const defaultImport2 = ToggleDismissibleContentDismissState;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
const COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const {isDismissed, handleToggleDismissState} = defaultImport2(COLLECTIBLES_SHOP_ENTRY_MARKETING);
const object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingVertical = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingBottom = PX_16 + insets.bottom;
const Stack = (StackNativeModule).Stack;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const FormSwitch = (FormSwitchNativeModule).FormSwitch;
const items2 = [
<TableRow
label="Disable collectibles shop cache"
subLabel="shop_disable_cache"
subLabelLineClamp={1}
trailing={<FormSwitch value={value2} onValueChange={onValueChange_107863} />}
/>,
];
items2[1] = (
<TableRow
label="Show unpublished items in collectibles shop"
subLabel="shop_include_unpublished"
subLabelLineClamp={1}
trailing={<FormSwitch value={value3} onValueChange={onValueChange_107864} />}
/>
);
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
items2[2] = (
<TableSwitchRow
label="Collectibles Marketing"
subLabel="COLLECTIBLES_SHOP_ENTRY_MARKETING"
subLabelLineClamp={1}
value={isDismissed}
onValueChange={handleToggleDismissState}
/>
);
items2[3] = (
<TableRow
label="Show debug log overlay in collectibles shop"
subLabel="shop_show_debug_overlay"
subLabelLineClamp={1}
trailing={<FormSwitch value={value4} onValueChange={onValueChange_107865} />}
/>
);
items2[4] = (
<TableRow
label="[Android] Bypass Google SKU sync in collectibles shop"
subLabel="bypass_google_sku_sync"
subLabelLineClamp={1}
trailing={<FormSwitch value={value5} onValueChange={onValueChange_107866} />}
/>
);
return (
<ScrollView style={styles.wrap} contentContainerStyle={object2}>
<Stack spacing={16}>
<TableRowGroup title="Shop Toggles" hasIcons={false}>
{items2}
</TableRowGroup>
</Stack>
</ScrollView>
);
function DevToolsShopScreenOnValueChange(a0) { // fn#107863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:1292, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bd3e, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (DevSettingsActionsModule).toggle('shop_disable_cache', a0);
}
function DevToolsShopScreenOnValueChange_107864(a0) { // fn#107864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:1522, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bd6e, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (DevSettingsActionsModule).toggle('shop_include_unpublished', a0);
}
function DevToolsShopScreenOnValueChange_107865(a0) { // fn#107865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:1906, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bd9e, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (DevSettingsActionsModule).toggle('shop_show_debug_overlay', a0);
}
function DevToolsShopScreenOnValueChange_107866(a0) { // fn#107866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:2149, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bdce, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (DevSettingsActionsModule).toggle('bypass_google_sku_sync', a0);
}
}
}
function DevToolsShopScreen() { // fn#107858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:394, offset: 0x0230b997, size: 835 bytes, params: 1, frame: 33
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('shop_disable_cache');
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('shop_include_unpublished');
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('shop_show_debug_overlay');
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], function() {
return DevSettingsStore.get('bypass_google_sku_sync');
});
const defaultImport2 = importDefault(14158) /* metro dependency 14158: toggleDismissibleContentDismissState */;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
const COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const {isDismissed, handleToggleDismissState} = defaultImport2(COLLECTIBLES_SHOP_ENTRY_MARKETING);
const object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingVertical = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = PX_16 + insets.bottom;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const FormSwitch = (require(6809) /* metro dependency 6809: FormSwitchNative */).FormSwitch;
const items2 = [<TableRow label="Disable collectibles shop cache" subLabel="shop_disable_cache" subLabelLineClamp={1} trailing={<FormSwitch value={value2} onValueChange={onValueChange_107863} />} />];
items2[1] = <TableRow label="Show unpublished items in collectibles shop" subLabel="shop_include_unpublished" subLabelLineClamp={1} trailing={<FormSwitch value={value3} onValueChange={onValueChange_107864} />} />;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
items2[2] = <TableSwitchRow label="Collectibles Marketing" subLabel="COLLECTIBLES_SHOP_ENTRY_MARKETING" subLabelLineClamp={1} value={isDismissed} onValueChange={handleToggleDismissState} />;
items2[3] = <TableRow label="Show debug log overlay in collectibles shop" subLabel="shop_show_debug_overlay" subLabelLineClamp={1} trailing={<FormSwitch value={value4} onValueChange={onValueChange_107865} />} />;
items2[4] = <TableRow label="[Android] Bypass Google SKU sync in collectibles shop" subLabel="bypass_google_sku_sync" subLabelLineClamp={1} trailing={<FormSwitch value={value5} onValueChange={onValueChange_107866} />} />;
return (
<ScrollView style={styles.wrap} contentContainerStyle={object}>
<Stack spacing={16}>
<TableRowGroup title="Shop Toggles" hasIcons={false}>
{items2}
</TableRowGroup>
</Stack>
</ScrollView>
);
}
function DevToolsShopScreenOnValueChange(a0) { // fn#107863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:1292, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bd3e, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle('shop_disable_cache', a0);
}
function DevToolsShopScreenOnValueChange_107864(a0) { // fn#107864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:1522, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bd6e, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle('shop_include_unpublished', a0);
}
function DevToolsShopScreenOnValueChange_107865(a0) { // fn#107865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:1906, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bd9e, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle('shop_show_debug_overlay', a0);
}
function DevToolsShopScreenOnValueChange_107866(a0) { // fn#107866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14457:2149, owner: DevToolsShopScreen.onValueChange, offset: 0x0230bdce, size: 48 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle('bypass_google_sku_sync', a0);
}
global.__d(_fun107857, 14260, [31, 27, 4649, 33, 4501, 697, 5463, 566, 14158, 1365, 4572, 6231, 6238, 6809, 14234,
6808,
2]) /* metro module 14260, dependencies: [31, 27, 4649, 33, 4501, 697, 5463, 566, 14158, 1365, 4572, 6231, 6238, 6809, 14234, 6808, 2] */;
@@ -1,461 +1,501 @@
/* Metro module 14249; source: modules/devtools/native/components/screens/DevToolsTogglesScreen.tsx; dependencies: [57, 31, 27, 5114, 4649, 33, 6590, 4501, 697, 6238, 3857, 6809, 566, 6231, 14234, 5463, 4572, 14250, 6984, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ToastActionCreators from '../../../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import DevSettingsStore from '../../../dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */
import DesignTogglesStore from '../../../design_toggles/DesignTogglesStore.tsx'; /* Metro dependency 5114 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as DevSettingsStoreModule from '../../../dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */
import * as TableRowGroupNativeModule from '../../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as FormSwitchNativeModule from '../../../../../design/components/Forms/native/FormSwitch.native.tsx'; /* Metro dependency 6809 */
import * as SearchFieldNativeModule from '../../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
import * as DevSettingsActionsModule from '../../../dev_settings/DevSettingsActions.tsx'; /* Metro dependency 14234 */
import * as DesignTogglesActionsModule from '../../../design_toggles/DesignTogglesActions.tsx'; /* Metro dependency 14250 */
function _fun107793(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:6, offset: 0x023090c1, size: 388 bytes, params: 8, frame: 22
var object3;
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 */).ScrollView;
const designTogglesStore = importDefault(5114) /* metro dependency 5114: DesignTogglesStore */;
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
const env0_8 = (require(4649) /* metro dependency 4649: DevSettingsStore */).CATEGORY_LABELS;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {};
object = {};
const object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
object3.wrap = object4;
object2.paddingHorizontal = PX_16;
object.wrap = object2;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.container = {paddingVertical: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsTogglesScreen.tsx');
object.container = {paddingVertical: PX_16};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/DevToolsTogglesScreen.tsx');
exports.default = DevToolsTogglesScreen;
}
function fuzzySearchToggle(a0, a1, a2) { // fn#107794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:210, offset: 0x02309245, size: 125 bytes, params: 4, frame: 19
var r1;
var r0;
var value3;
let value = a0.length === 0;
if (value) {
r0 = value;
} else {
value3 = (importDefault(6590) /* metro dependency 6590 */)(a0.toLowerCase(), a1.toLowerCase());
if (value3) {
r1 = value3;
function fuzzySearchToggle(a0, a1, a2) { // fn#107794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:210, offset: 0x02309245, size: 125 bytes, params: 4, frame: 19
var r1;
var r0;
var value3;
let value = a0.length === 0;
if (value) {
r0 = value;
} else {
value = importDefault(6590) /* metro dependency 6590 */;
value = value(a0.toLowerCase(), a2.toLowerCase());
r1 = value;
}
r0 = r1;
}
return r0;
}
function ToggleTableRow({toggleName, description, value, onValueChange}) { // fn#107795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:524, offset: 0x023092c2, size: 158 bytes, params: 2, frame: 23
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {label: description, labelLineClamp: 1, subLabel: toggleName, subLabelLineClamp: 1,
onPress: onPress_107796};
const FormSwitch = (require(6809) /* metro dependency 6809: FormSwitchNative */).FormSwitch;
object2.trailing = <FormSwitch value={value} onValueChange={onValueChange} />;
return <TableRow {...object2} key={toggleName} />;
}
function DevTogglesForCategory(a0) { // fn#107797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:794, offset: 0x0230939b, size: 124 bytes, params: 2, frame: 18
var r0;
const category = a0.category;
const title = a0.title;
let value = ((a0, a1) => {
var env0_0 = a0;
var env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], _fun107799, [a1,
a0],
(require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
})(category, a0.query);
if (value.length === 0) {
r0 = null;
} else {
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
value = <TableRowGroup title={title} hasIcons={false}>{value.map(_fun107801)}</TableRowGroup>;
r0 = value;
}
return r0;
}
function DevToolsTogglesScreen() { // fn#107803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1389, offset: 0x02309621, size: 635 bytes, params: 1, frame: 34
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const [property, property2] = env0_3(env0_4.useState(''), 2);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([DesignTogglesStore], _fun107804,
[property], (require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
const items2 = [styles.container];
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
items2[1] = {paddingBottom: PX_16 + insets.bottom};
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRow = <TableRow label="Clear All" variant="danger" onPress={onPress_107806} arrow />;
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
const items4 = [<TableRowGroup title="Actions" hasIcons={false}>{tableRow}<TableRow label={<SearchField size="md" placeholder="Search design toggles" onChange={property2} />} /></TableRowGroup>];
items4[1] = value4.length > 0 ? <TableRowGroup title="Design Toggles" hasIcons={false}>{value4.map(_fun107807)}</TableRowGroup> : null;
const Object = global.Object;
const value = Object.entries(CATEGORY_LABELS);
items4[2] = value.map(_fun107809);
return (
<ScrollView style={styles.wrap} contentContainerStyle={items2}>
<Stack spacing={16}>
{items4}
</Stack>
</ScrollView>
);
}
function ToggleTableRowOnPress() { // fn#107796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:693, owner: ToggleTableRow.onPress, offset: 0x02309360, size: 59 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({content: description, key: toggleName});
}
function useFilteredDevTogglesForCategory(a0, a1) { // fn#107798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:861, owner: DevTogglesForCategory.useFilteredDevTogglesForCategory, offset: 0x02309417, size: 107 bytes, params: 3, frame: 22
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], _fun107799, [a1, a0],
(require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
}
function _fun107801(a0) { // fn#107801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1158, offset: 0x0230953e, size: 178 bytes, params: 2, frame: 23
var r1;
var r2;
var r42;
var r43;
var item3;
var value3;
var item4;
var value4;
var label;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
if (r2) {
r43 = value;
} else {
item4 = Reflect.apply(iterator2, r1, []);
item = item4.value;
item4 = item4.done ? undefined : r1;
value4 = item4 === value;
if (value4) {
r1 = item4;
r2 = value4;
r43 = value;
} else {
r1 = item4;
r2 = value4;
r43 = item;
}
}
try {
label = r43.label;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
value3 = (importDefault(6590) /* metro dependency 6590 */)(a0.toLowerCase(), a1.toLowerCase());
if (value3) {
r1 = value3;
} else {
value = importDefault(6590) /* metro dependency 6590 */;
value = value(a0.toLowerCase(), a2.toLowerCase());
r1 = value;
}
r0 = r1;
}
throw error;
return r0;
}
if (!r2) {
r1.return();
function ToggleTableRow({toggleName, description, value, onValueChange}) { // fn#107795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:524, offset: 0x023092c2, size: 158 bytes, params: 2, frame: 23
const TableRow = (TableRowNativeModule).TableRow;
const object = {label: description, labelLineClamp: 1, subLabel: toggleName, subLabelLineClamp: 1,
onPress: onPress_107796};
const FormSwitch = (FormSwitchNativeModule).FormSwitch;
object.trailing = <FormSwitch value={value} onValueChange={onValueChange} />;
return <TableRow {...object} key={toggleName} />;
function ToggleTableRowOnPress() { // fn#107796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:693, owner: ToggleTableRow.onPress, offset: 0x02309360, size: 59 bytes, params: 1, frame: 14
const value = environment.__proto__;
(ToastActionCreators).open({content: description, key: toggleName});
}
}
return (
<ToggleTableRow
toggleName={r4}
description={label}
value={r42}
onValueChange={onValueChange_107802}
key={r4}
/>
);
}
function _fun107804() { // fn#107804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1553, offset: 0x0230989c, size: 40 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
return DesignTogglesStore.allWithDescriptions().filter(_fun107805);
}
function DevToolsTogglesScreenOnPress() { // fn#107806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1946, owner: DevToolsTogglesScreen.onPress, offset: 0x02309928, size: 59 bytes, params: 1, frame: 13
const value = environment.__proto__;
(require(14250) /* metro dependency 14250: DesignTogglesActions */).clearAll();
(require(14234) /* metro dependency 14234: DevSettingsActions */).clearAll();
}
function _fun107807(a0) { // fn#107807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:2205, offset: 0x02309963, size: 146 bytes, params: 2, frame: 20
var r0;
var r1;
var r6;
var r7;
var item3;
var value3;
var item4;
var value4;
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;
r6 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r6 = value;
function DevTogglesForCategory(a0) { // fn#107797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:794, offset: 0x0230939b, size: 124 bytes, params: 2, frame: 18
var r0;
const category = a0.category;
const title = a0.title;
let value = ((a0, a1) => {
var env0_0 = a0;
var env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([DevSettingsStore], _fun107799, [a1,
a0],
(require(566) /* metro dependency 566: flux */).statesWillNeverBeEqual);
})(category, a0.query);
if (value.length === 0) {
r0 = null;
} else {
r0 = item3;
r1 = value3;
r6 = item;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
value = (
<TableRowGroup title={title} hasIcons={false}>
{value.map(_fun107801)}
</TableRowGroup>
);
r0 = value;
}
}
if (r1) {
r7 = value;
} else {
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value4 = item4 === value;
if (value4) {
r0 = item4;
r1 = value4;
r7 = value;
} else {
r0 = item4;
r1 = value4;
r7 = item;
}
}
if (!r1) {
r0.return();
}
return (
<ToggleTableRow
toggleName={r3}
description={r7}
value={r6}
onValueChange={onValueChange_107808}
key={r3}
/>
);
}
return r0;
function useFilteredDevTogglesForCategory(a0, a1) { // fn#107798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:861, owner: DevTogglesForCategory.useFilteredDevTogglesForCategory, offset: 0x02309417, size: 107 bytes, params: 3, frame: 22
const env0_0 = a0;
const env0_1 = a1;
return (FluxModule).useStateFromStores([DevSettingsStore], _fun107799, [a1, a0],
(FluxModule).statesWillNeverBeEqual);
function _fun107799() { // fn#107799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:948, offset: 0x02309482, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__.__proto__;
return DevSettingsStore.allByCategory(env0_0).filter(_fun107800);
function _fun107800(a0) { // fn#107800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:979, offset: 0x023094b0, size: 142 bytes, params: 2, frame: 21
var r1;
var r2;
var r52;
var item3;
var value3;
var item4;
var value4;
var label;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r5 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
} else {
r1 = item3;
r2 = value3;
}
}
if (r2) {
r52 = value;
} else {
item4 = Reflect.apply(iterator2, r1, []);
item = item4.value;
item4 = item4.done ? undefined : r1;
value4 = item4 === value;
if (value4) {
r1 = item4;
r2 = value4;
r52 = value;
} else {
r1 = item4;
r2 = value4;
r52 = item;
}
}
try {
label = r52.label;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
return fuzzySearchToggle(require, r5, label);
}
function _fun107809(a0) { // fn#107809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:2343, offset: 0x02309a26, size: 118 bytes, params: 2, frame: 18
var r0;
var r1;
var r5;
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;
r5 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r5 = value;
} else {
r0 = item3;
r1 = value3;
r5 = item;
}
}
if (!r1) {
r0.return();
}
return (
<DevTogglesForCategory
category={global.parseInt(r3)}
title={r5}
query={env0_0}
key={r3}
/>
);
}
function _fun107799() { // fn#107799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:948, offset: 0x02309482, size: 46 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__.__proto__;
return DevSettingsStore.allByCategory(env0_0).filter(_fun107800);
}
function onValueChange_107802(a0) { // fn#107802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1244, offset: 0x023095f0, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(14234) /* metro dependency 14234: DevSettingsActions */).toggle(env0_0, a0);
}
function _fun107805(a0) { // fn#107805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1589, offset: 0x023098c4, size: 100 bytes, params: 2, frame: 18
var r0;
var r1;
var r2;
var item3;
var value3;
var item4;
var value4;
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;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
r0 = item3;
r1 = value3;
}
if (r1) {
r2 = value;
} else {
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value4 = item4 === value;
if (value4) {
r0 = item4;
r1 = value4;
r2 = value;
} else {
r0 = item4;
r1 = value4;
r2 = item;
}
}
if (!r1) {
r0.return();
}
return fuzzySearchToggle(env1_0, r3, r2);
}
function onValueChange_107808(a0) { // fn#107808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:2283, offset: 0x023099f5, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (require(14250) /* metro dependency 14250: DesignTogglesActions */).toggle(env0_0, a0);
}
function _fun107800(a0) { // fn#107800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:979, offset: 0x023094b0, size: 142 bytes, params: 2, frame: 21
var r1;
var r2;
var r52;
var item3;
var value3;
var item4;
var value4;
var label;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r5 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
} else {
r1 = item3;
r2 = value3;
}
}
if (r2) {
r52 = value;
} else {
item4 = Reflect.apply(iterator2, r1, []);
item = item4.value;
item4 = item4.done ? undefined : r1;
value4 = item4 === value;
if (value4) {
r1 = item4;
r2 = value4;
r52 = value;
} else {
r1 = item4;
r2 = value4;
r52 = item;
}
}
try {
label = r52.label;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
function _fun107801(a0) { // fn#107801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1158, offset: 0x0230953e, size: 178 bytes, params: 2, frame: 23
var r1;
var r2;
var r42;
var r43;
var item3;
var value3;
var item4;
var value4;
var label;
var error;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
const value = undefined;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value2 = item2 === value;
const r4 = value2 ? value : item;
if (value2) {
r1 = item2;
r2 = value2;
r42 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = item3;
r2 = value3;
r42 = value;
} else {
r1 = item3;
r2 = value3;
r42 = item;
}
}
if (r2) {
r43 = value;
} else {
item4 = Reflect.apply(iterator2, r1, []);
item = item4.value;
item4 = item4.done ? undefined : r1;
value4 = item4 === value;
if (value4) {
r1 = item4;
r2 = value4;
r43 = value;
} else {
r1 = item4;
r2 = value4;
r43 = item;
}
}
try {
label = r43.label;
} catch (error) {
if (!r2) {
try {
r1.return();
} catch {
}
}
throw error;
}
if (!r2) {
r1.return();
}
return (
<ToggleTableRow
toggleName={r4}
description={label}
value={r42}
onValueChange={onValueChange_107802}
key={r4}
/>
);
function onValueChange_107802(a0) { // fn#107802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1244, offset: 0x023095f0, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (DevSettingsActionsModule).toggle(env0_0, a0);
}
}
}
if (!r2) {
r1.return();
function DevToolsTogglesScreen() { // fn#107803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1389, offset: 0x02309621, size: 635 bytes, params: 1, frame: 34
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const styles = useStyles();
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const [property, property2] = Module00057(ReactModule.useState(''), 2);
const value4 = (FluxModule).useStateFromStores([DesignTogglesStore], _fun107804,
[property], (FluxModule).statesWillNeverBeEqual);
const items2 = [styles.container];
const PX_16 = (Native).space.PX_16;
items2[1] = {paddingBottom: PX_16 + insets.bottom};
const Stack = (StackNativeModule).Stack;
const TableRow = (TableRowNativeModule).TableRow;
const tableRow = (
<TableRow
label="Clear All"
variant="danger"
onPress={onPress_107806}
arrow
/>
);
const SearchField = (SearchFieldNativeModule).SearchField;
const items4 = [
<TableRowGroup title="Actions" hasIcons={false}>
{tableRow}
<TableRow label={<SearchField size="md" placeholder="Search design toggles" onChange={property2} />} />
</TableRowGroup>,
];
items4[1] = (
value4.length > 0
? (
<TableRowGroup title="Design Toggles" hasIcons={false}>
{value4.map(_fun107807)}
</TableRowGroup>
)
: null
);
const Object = global.Object;
const value = Object.entries(CATEGORY_LABELS);
items4[2] = value.map(_fun107809);
return (
<ScrollView style={styles.wrap} contentContainerStyle={items2}>
<Stack spacing={16}>
{items4}
</Stack>
</ScrollView>
);
function _fun107804() { // fn#107804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1553, offset: 0x0230989c, size: 40 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
return DesignTogglesStore.allWithDescriptions().filter(_fun107805);
function _fun107805(a0) { // fn#107805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1589, offset: 0x023098c4, size: 100 bytes, params: 2, frame: 18
var r0;
var r1;
var r2;
var item3;
var value3;
var item4;
var value4;
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;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
r0 = item3;
r1 = value3;
}
if (r1) {
r2 = value;
} else {
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value4 = item4 === value;
if (value4) {
r0 = item4;
r1 = value4;
r2 = value;
} else {
r0 = item4;
r1 = value4;
r2 = item;
}
}
if (!r1) {
r0.return();
}
return fuzzySearchToggle(env1_0, r3, r2);
}
}
function DevToolsTogglesScreenOnPress() { // fn#107806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:1946, owner: DevToolsTogglesScreen.onPress, offset: 0x02309928, size: 59 bytes, params: 1, frame: 13
const value = environment.__proto__;
(DesignTogglesActionsModule).clearAll();
(DevSettingsActionsModule).clearAll();
}
function _fun107807(a0) { // fn#107807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:2205, offset: 0x02309963, size: 146 bytes, params: 2, frame: 20
var r0;
var r1;
var r6;
var r7;
var item3;
var value3;
var item4;
var value4;
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;
r6 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r6 = value;
} else {
r0 = item3;
r1 = value3;
r6 = item;
}
}
if (r1) {
r7 = value;
} else {
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value4 = item4 === value;
if (value4) {
r0 = item4;
r1 = value4;
r7 = value;
} else {
r0 = item4;
r1 = value4;
r7 = item;
}
}
if (!r1) {
r0.return();
}
return (
<ToggleTableRow
toggleName={r3}
description={r7}
value={r6}
onValueChange={onValueChange_107808}
key={r3}
/>
);
function onValueChange_107808(a0) { // fn#107808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:2283, offset: 0x023099f5, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__.__proto__;
return (DesignTogglesActionsModule).toggle(env0_0, a0);
}
}
function _fun107809(a0) { // fn#107809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14446:2343, offset: 0x02309a26, size: 118 bytes, params: 2, frame: 18
var r0;
var r1;
var r5;
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;
r5 = value;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r0 = item3;
r1 = value3;
r5 = value;
} else {
r0 = item3;
r1 = value3;
r5 = item;
}
}
if (!r1) {
r0.return();
}
return (
<DevTogglesForCategory
category={global.parseInt(r3)}
title={r5}
query={env0_0}
key={r3}
/>
);
}
}
return fuzzySearchToggle(require, r5, label);
}
global.__d(_fun107793, 14249, [57, 31, 27, 5114, 4649, 33, 6590, 4501, 697, 6238, 3857, 6809, 566, 6231, 14234,
5463, 4572, 14250, 6984,
2]) /* metro module 14249, dependencies: [57, 31, 27, 5114, 4649, 33, 6590, 4501, 697, 6238, 3857, 6809, 566, 6231, 14234, 5463, 4572, 14250, 6984, 2] */;
@@ -1,57 +1,65 @@
/* Metro module 14275; source: modules/devtools/native/components/screens/performance/BenchmarkResultsList.tsx; dependencies: [31, 33, 6231, 6238, 14271, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TableRowNativeModule from '../../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
function _fun108002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14472:6, offset: 0x02311844, size: 140 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_2 = value.jsx;
const env0_3 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/BenchmarkResultsList.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/performance/BenchmarkResultsList.tsx');
exports.default = BenchmarkResultsList;
}
function BenchmarkResultsList({results, onClear}) { // fn#108003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14472:254, offset: 0x023118d0, size: 169 bytes, params: 2, frame: 21
var r0;
var TableRowGroup;
var items2;
if (results.length === 0) {
r0 = null;
} else {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items2 = [results.map(_fun108004)];
items2[1] = ((TableRow) => <TableRow label="Clear results" variant="danger" arrow onPress={onClear} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow);
r0 = (
<TableRowGroup title="Results (newest first)" hasIcons={false}>
{items2}
</TableRowGroup>
);
}
return r0;
function _fun108004(a0) { // fn#108004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14472:417, offset: 0x02311979, size: 347 bytes, params: 2, frame: 28
var r0;
var value;
const TableRow = (TableRowNativeModule).TableRow;
var object;
var dropped;
var frames;
if (a0.kind === 'mount') {
value = environment.__proto__;
var tableRowProps = {label: a0.label};
value = a0.elapsedMs.toFixed(1);
tableRowProps.subLabel = '' + value + ' ms total';
value = <TableRow {...tableRowProps} key={a0.id} />;
r0 = value;
} else {
value = environment.__proto__;
object = {};
value = a0.meanMs.toFixed(1);
object.label = 'Scroll · mean ' + value + ' ms · worst ' + a0.worstMs.toFixed(1) + ' ms';
dropped = a0.dropped;
frames = a0.frames;
value = (require(14271) /* metro dependency 14271: startFrameMonitor */).FRAME_BUDGET_MS.toFixed(1);
object.subLabel = '' + dropped + '/' + frames + ' frames over ' + value + ' ms';
value = <TableRow {...object} key={a0.id} />;
r0 = value;
}
return r0;
}
function BenchmarkResultsList({results, onClear}) { // fn#108003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14472:254, offset: 0x023118d0, size: 169 bytes, params: 2, frame: 21
var r0;
var TableRowGroup;
var items2;
if (results.length === 0) {
r0 = null;
} else {
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items2 = [results.map(_fun108004)];
items2[1] = ((TableRow) => <TableRow label="Clear results" variant="danger" arrow onPress={onClear} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow);
r0 = <TableRowGroup title="Results (newest first)" hasIcons={false}>{items2}</TableRowGroup>;
}
return r0;
}
function _fun108004(a0) { // fn#108004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14472:417, offset: 0x02311979, size: 347 bytes, params: 2, frame: 28
var r0;
var value;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var object2;
var dropped;
var frames;
if (a0.kind === 'mount') {
value = environment.__proto__;
var tableRowProps = {label: a0.label};
value = a0.elapsedMs.toFixed(1);
tableRowProps.subLabel = '' + value + ' ms total';
value = <TableRow {...tableRowProps} key={a0.id} />;
r0 = value;
} else {
value = environment.__proto__;
object2 = {};
value = a0.meanMs.toFixed(1);
object2.label = 'Scroll · mean ' + value + ' ms · worst ' + a0.worstMs.toFixed(1) + ' ms';
dropped = a0.dropped;
frames = a0.frames;
value = (require(14271) /* metro dependency 14271: startFrameMonitor */).FRAME_BUDGET_MS.toFixed(1);
object2.subLabel = '' + dropped + '/' + frames + ' frames over ' + value + ' ms';
value = <TableRow {...object2} key={a0.id} />;
r0 = value;
}
return r0;
}
global.__d(_fun108002, 14275, [31, 33, 6231, 6238, 14271,
2]) /* metro module 14275, dependencies: [31, 33, 6231, 6238, 14271, 2] */;
@@ -1,25 +1,29 @@
/* Metro module 14277; source: modules/devtools/native/components/screens/performance/MountMeasure.tsx; dependencies: [31, 27, 33, 4594, 2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun108007(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14474:6, offset: 0x02311c00, size: 152 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_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/MountMeasure.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/performance/MountMeasure.tsx');
exports.default = MountMeasure;
function MountMeasure({batchKey, onMeasure, onCancel, style, children}) { // fn#108008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14474:248, offset: 0x02311c98, size: 126 bytes, params: 2, frame: 17
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(function() {
return onCancel(batchKey);
});
return (
<View style={style} onLayout={function() {
return onMeasure(batchKey);
}}>
{children}
</View>
);
}
}
function MountMeasure({batchKey, onMeasure, onCancel, style, children}) { // fn#108008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14474:248, offset: 0x02311c98, size: 126 bytes, params: 2, frame: 17
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(function() {
return onCancel(batchKey);
});
return (
<View style={style} onLayout={function() {
return onMeasure(batchKey);
}}>
{children}
</View>
);
}
global.__d(_fun108007, 14277, [31, 27, 33, 4594, 2]) /* metro module 14277, dependencies: [31, 27, 33, 4594, 2] */;
@@ -1,26 +1,33 @@
/* Metro module 14276; source: modules/devtools/native/components/screens/performance/ScrollBenchmark.tsx; dependencies: [31, 33, 14273, 6238, 2] */
import UseFrameMonitor from './useFrameMonitor.tsx'; /* Metro dependency 14273 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TableRowNativeModule from '../../../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
function _fun108005(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14473:6, offset: 0x02311ad4, size: 138 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(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/ScrollBenchmark.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/performance/ScrollBenchmark.tsx');
exports.default = ScrollBenchmark;
function ScrollBenchmark({onResult, subLabel}) { // fn#108006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14473:236, offset: 0x02311b5e, size: 162 bytes, params: 2, frame: 19
subLabel = subLabel === undefined ? 'Records frame times while you scroll the content below.' : subLabel;
const {monitoring, start, stop} = (UseFrameMonitor)(onResult);
const TableRow = (TableRowNativeModule).TableRow;
return (
<TableRow
label={monitoring ? 'Stop scroll monitor' : 'Start scroll monitor'}
subLabel={subLabel}
variant={monitoring ? 'danger' : undefined}
arrow
onPress={monitoring ? stop : start}
/>
);
}
}
function ScrollBenchmark({onResult, subLabel}) { // fn#108006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14473:236, offset: 0x02311b5e, size: 162 bytes, params: 2, frame: 19
subLabel = subLabel === undefined ? 'Records frame times while you scroll the content below.' : subLabel;
const {monitoring, start, stop} = (importDefault(14273) /* metro dependency 14273: useFrameMonitor */)(onResult);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={monitoring ? 'Stop scroll monitor' : 'Start scroll monitor'}
subLabel={subLabel}
variant={monitoring ? 'danger' : undefined}
arrow
onPress={monitoring ? stop : start}
/>
);
}
global.__d(_fun108005, 14276, [31, 33, 14273, 6238,
2]) /* metro module 14276, dependencies: [31, 33, 14273, 6238, 2] */;
@@ -1,9 +1,11 @@
/* Metro module 14269; source: modules/devtools/native/components/screens/performance/index.tsx; dependencies: [2, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14277] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun107977(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14466:6, offset: 0x02310f31, size: 281 bytes, params: 8, frame: 23
var propertyName;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/index.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/performance/index.tsx');
for (propertyName in require(14270) /* metro dependency 14270: types */) {
exports[propertyName] = (require(14270) /* metro dependency 14270: types */)[propertyName];
}
@@ -18,3 +20,5 @@ function _fun107977(global, require, importDefault, importAll, module, exports,
exports.MountMeasure = importDefault(14277) /* metro dependency 14277: MountMeasure */;
}
global.__d(_fun107977, 14269, [2, 14270, 14271, 14272, 14273, 14274, 14275, 14276,
14277]) /* metro module 14269, dependencies: [2, 14270, 14271, 14272, 14273, 14274, 14275, 14276, 14277] */;
@@ -1,8 +1,10 @@
/* Metro module 14271; source: modules/devtools/native/components/screens/performance/startFrameMonitor.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun107979(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:6, offset: 0x0231106f, size: 103 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/startFrameMonitor.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/performance/startFrameMonitor.tsx');
exports.FRAME_BUDGET_MS = 16.666666666666668;
exports.startFrameMonitor = function() {
var env0_0 = 0;
@@ -18,34 +20,35 @@ function _fun107979(global, require, importDefault, importAll, module, exports,
env0_0 = (0, global.requestAnimationFrame)(closure);
return {stop: _fun107982};
};
}
function startFrameMonitor() { // fn#107980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:267, offset: 0x023110d6, size: 99 bytes, params: 1, frame: 13
const env0_1 = global.performance.now();
const env0_0 = global.requestAnimationFrame(tick);
return {stop: stop_107982};
}
function tick() { // fn#107981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:355, owner: startFrameMonitor.tick, offset: 0x02311139, size: 135 bytes, params: 1, frame: 14
var value3;
if (env0_2) {
value3 = global.performance.now() - env0_1;
env0_3 += 1;
env0_6 += value3;
if (value3 > env0_5) {
function startFrameMonitor() { // fn#107980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:267, offset: 0x023110d6, size: 99 bytes, params: 1, frame: 13
const env0_1 = global.performance.now();
const env0_0 = global.requestAnimationFrame(tick);
return {stop: stop_107982};
function tick() { // fn#107981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:355, owner: startFrameMonitor.tick, offset: 0x02311139, size: 135 bytes, params: 1, frame: 14
var value3;
if (env0_2) {
value3 = global.performance.now() - env0_1;
env0_3 += 1;
env0_6 += value3;
if (value3 > env0_5) {
}
if (value3 > 16.666666666666668) {
env0_4 += 1;
}
}
env0_0 = global.requestAnimationFrame(tick);
}
if (value3 > 16.666666666666668) {
env0_4 += 1;
function startFrameMonitorStop() { // fn#107982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:521, owner: startFrameMonitor.stop, offset: 0x023111c0, size: 96 bytes, params: 1, frame: 13
if (!env0_7) {
global.cancelAnimationFrame(env0_0);
}
const value2 = 0;
return {frames: env0_3, dropped: env0_4, meanMs: env0_3 > value2 ? env0_6 / env0_3 : value2, worstMs: env0_5};
}
}
env0_0 = global.requestAnimationFrame(tick);
}
function startFrameMonitorStop() { // fn#107982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14468:521, owner: startFrameMonitor.stop, offset: 0x023111c0, size: 96 bytes, params: 1, frame: 13
if (!env0_7) {
global.cancelAnimationFrame(env0_0);
}
const value2 = 0;
return {frames: env0_3, dropped: env0_4, meanMs: env0_3 > value2 ? env0_6 / env0_3 : value2, worstMs: env0_5};
}
global.__d(_fun107979, 14271, [2]) /* metro module 14271, dependencies: [2] */;
@@ -1,5 +1,8 @@
/* Metro module 14270; source: modules/devtools/native/components/screens/performance/types.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun107978(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14467:6, offset: 0x0231104a, size: 37 bytes, params: 8, frame: 12
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/types.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/performance/types.tsx');
}
global.__d(_fun107978, 14270, [2]) /* metro module 14270, dependencies: [2] */;
@@ -1,64 +1,67 @@
/* Metro module 14274; source: modules/devtools/native/components/screens/performance/useBenchmarkResults.tsx; dependencies: [57, 31, 2] */
import Module00057 from '../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun107995(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:6, offset: 0x02311631, size: 125 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/useBenchmarkResults.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/performance/useBenchmarkResults.tsx');
exports.default = useBenchmarkResults;
function useBenchmarkResults() { // fn#107996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:238, offset: 0x023116ae, size: 159 bytes, params: 1, frame: 15
const binding = env0_1;
const value = env0_0(binding.useState([]), 2);
const property = value[0];
var env0_0 = value[1];
var env0_1 = binding.useRef(0);
const object = {results: property};
object.addMount = binding.useCallback(_fun107997, []);
object.addScroll = binding.useCallback(function(a0) {
a0(_fun108000);
}, []);
object.clear = binding.useCallback(_fun108001, []);
return object;
function _fun107997(a0, a1) { // fn#107997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:368, offset: 0x0231174d, size: 39 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_0(_fun107998);
function _fun107998(a0) { // fn#107998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:379, offset: 0x02311774, size: 81 bytes, params: 2, frame: 14
let value = environment.__proto__;
const binding = env1_1;
const current = binding.current;
value = typeof current === 'bigint' ? current : +current;
binding.current = typeof value === 'bigint' ? value + 1n : +value + 1;
const items2 = [{kind: 'mount', id: value, label: env0_0, elapsedMs: require}];
arraySpread(items2, a0, 1, binding);
return items2;
}
}
function _fun107999(a0) { // fn#107999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:472, offset: 0x023117c5, size: 32 bytes, params: 2, frame: 11
a0(_fun108000);
function _fun108000(a0) { // fn#108000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:479, offset: 0x023117e5, size: 75 bytes, params: 2, frame: 14
const object = {kind: 'scroll'};
let value = environment.__proto__;
const binding = env1_1;
const current = binding.current;
value = typeof current === 'bigint' ? current : +current;
binding.current = typeof value === 'bigint' ? value + 1n : +value + 1;
object.id = value;
copyDataProperties(object, env0_0, undefined);
const items2 = [object];
arraySpread(items2, a0, 1, binding);
return items2;
}
}
function _fun108001() { // fn#108001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:554, offset: 0x02311830, size: 20 bytes, params: 1, frame: 11
return env0_0([]);
}
}
}
function useBenchmarkResults() { // fn#107996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:238, offset: 0x023116ae, size: 159 bytes, params: 1, frame: 15
const binding = env0_1;
const value = env0_0(binding.useState([]), 2);
const property = value[0];
var env0_0 = value[1];
var env0_1 = binding.useRef(0);
const object2 = {results: property};
object2.addMount = binding.useCallback(_fun107997, []);
object2.addScroll = binding.useCallback(function(a0) {
a0(_fun108000);
}, []);
object2.clear = binding.useCallback(_fun108001, []);
return object2;
}
function _fun107997(a0, a1) { // fn#107997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:368, offset: 0x0231174d, size: 39 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_0(_fun107998);
}
function _fun107999(a0) { // fn#107999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:472, offset: 0x023117c5, size: 32 bytes, params: 2, frame: 11
a0(_fun108000);
}
function _fun108001() { // fn#108001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:554, offset: 0x02311830, size: 20 bytes, params: 1, frame: 11
return env0_0([]);
}
function _fun107998(a0) { // fn#107998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:379, offset: 0x02311774, size: 81 bytes, params: 2, frame: 14
let value = environment.__proto__;
const binding = env1_1;
const current = binding.current;
value = typeof current === 'bigint' ? current : +current;
binding.current = typeof value === 'bigint' ? value + 1n : +value + 1;
const items2 = [{kind: 'mount', id: value, label: env0_0, elapsedMs: require}];
arraySpread(items2, a0, 1, binding);
return items2;
}
function _fun108000(a0) { // fn#108000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14471:479, offset: 0x023117e5, size: 75 bytes, params: 2, frame: 14
const object2 = {kind: 'scroll'};
let value = environment.__proto__;
const binding = env1_1;
const current = binding.current;
value = typeof current === 'bigint' ? current : +current;
binding.current = typeof value === 'bigint' ? value + 1n : +value + 1;
object2.id = value;
copyDataProperties(object2, env0_0, undefined);
const items2 = [object2];
arraySpread(items2, a0, 1, binding);
return items2;
}
global.__d(_fun107995, 14274, [57, 31, 2]) /* metro module 14274, dependencies: [57, 31, 2] */;
@@ -1,60 +1,67 @@
/* Metro module 14273; source: modules/devtools/native/components/screens/performance/useFrameMonitor.tsx; dependencies: [57, 31, 14271, 2] */
import Module00057 from '../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun107988(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:6, offset: 0x02311414, size: 133 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/useFrameMonitor.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/performance/useFrameMonitor.tsx');
exports.default = useFrameMonitor;
}
function useFrameMonitor(a0) { // fn#107989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:234, offset: 0x02311499, size: 200 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_3;
let value = env0_2(binding.useState(false), 2);
const property = value[0];
const env0_1 = value[1];
var env0_2 = binding.useRef(null);
var env0_3 = binding.useRef(a0);
binding.useEffect(_fun107990, [a0]);
value = binding.useCallback(_fun107991, []);
const value3 = binding.useCallback(_fun107992, []);
binding.useEffect(function() {
return _fun107994;
}, []);
return {monitoring: property, start: value, stop: value3};
function _fun107990() { // fn#107990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:350, offset: 0x00e6e6a5, size: 21 bytes, params: 1, frame: 2
env0_3.current = env0_0;
}
function useFrameMonitor(a0) { // fn#107989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:234, offset: 0x02311499, size: 200 bytes, params: 2, frame: 16
const env0_0 = a0;
const binding = env0_3;
let value = env0_2(binding.useState(false), 2);
const property = value[0];
const env0_1 = value[1];
var env0_2 = binding.useRef(null);
var env0_3 = binding.useRef(a0);
binding.useEffect(_fun107990, [a0]);
value = binding.useCallback(_fun107991, []);
const value3 = binding.useCallback(_fun107992, []);
binding.useEffect(function() {
return _fun107994;
}, []);
return {monitoring: property, start: value, stop: value3};
}
function _fun107991() { // fn#107991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:395, offset: 0x02311561, size: 86 bytes, params: 1, frame: 13
const current = env0_2.current;
if (current != null) {
current.stop();
}
env0_2.current = (require(14271) /* metro dependency 14271: startFrameMonitor */).startFrameMonitor();
env0_1(true);
}
function _fun107992() { // fn#107992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:503, offset: 0x023115b7, size: 69 bytes, params: 1, frame: 13
var value2;
const current = env0_2.current;
if (current != null) {
env0_2.current = null;
value2 = current.stop();
env0_1(false);
env0_3.current(value2);
}
}
function _fun107993() { // fn#107993, offset: 0x023115fc, size: 11 bytes, params: 1, frame: 1
return _fun107994;
function _fun107994() { // fn#107994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:616, offset: 0x02311607, size: 42 bytes, params: 1, frame: 11
const current = env1_2.current;
if (current != null) {
current.stop();
}
env1_2.current = null;
}
}
function _fun107991() { // fn#107991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:395, offset: 0x02311561, size: 86 bytes, params: 1, frame: 13
const current = env0_2.current;
if (current != null) {
current.stop();
}
env0_2.current = (require(14271) /* metro dependency 14271: startFrameMonitor */).startFrameMonitor();
env0_1(true);
}
function _fun107992() { // fn#107992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:503, offset: 0x023115b7, size: 69 bytes, params: 1, frame: 13
var value2;
const current = env0_2.current;
if (current != null) {
env0_2.current = null;
value2 = current.stop();
env0_1(false);
env0_3.current(value2);
}
}
function _fun107993() { // fn#107993, offset: 0x023115fc, size: 11 bytes, params: 1, frame: 1
return _fun107994;
}
function _fun107994() { // fn#107994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14470:616, offset: 0x02311607, size: 42 bytes, params: 1, frame: 11
const current = env1_2.current;
if (current != null) {
current.stop();
}
env1_2.current = null;
}
global.__d(_fun107988, 14273, [57, 31, 14271, 2]) /* metro module 14273, dependencies: [57, 31, 14271, 2] */;
@@ -1,53 +1,56 @@
/* Metro module 14272; source: modules/devtools/native/components/screens/performance/useMountTimer.tsx; dependencies: [57, 31, 2] */
import Module00057 from '../../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun107983(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:6, offset: 0x02311220, size: 125 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(57) /* metro dependency 57 */;
const env0_1 = importAll(31) /* metro dependency 31 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/devtools/native/components/screens/performance/useMountTimer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/devtools/native/components/screens/performance/useMountTimer.tsx');
exports.default = useMountTimer;
}
function useMountTimer() { // fn#107984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:232, offset: 0x0231129d, size: 185 bytes, params: 1, frame: 16
const binding = env0_1;
const value = env0_0(binding.useState(null), 2);
const property = value[0];
var env0_0 = value[1];
var env0_1 = binding.useRef(0);
const env0_2 = binding.useRef(0);
const env0_3 = binding.useRef(null);
const object = {run: property};
object.begin = binding.useCallback(_fun107985, []);
object.measure = binding.useCallback(_fun107986, []);
object.cancel = binding.useCallback(_fun107987, []);
return object;
function _fun107985(a0) { // fn#107985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:382, offset: 0x02311356, size: 90 bytes, params: 2, frame: 13
const binding = env0_1;
const value2 = binding.current + 1;
binding.current = value2;
env0_3.current = value2;
env0_2.current = global.performance.now();
env0_0({batchKey: value2, params: a0});
}
function useMountTimer() { // fn#107984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:232, offset: 0x0231129d, size: 185 bytes, params: 1, frame: 16
const binding = env0_1;
const value = env0_0(binding.useState(null), 2);
const property = value[0];
var env0_0 = value[1];
var env0_1 = binding.useRef(0);
const env0_2 = binding.useRef(0);
const env0_3 = binding.useRef(null);
const object2 = {run: property};
object2.begin = binding.useCallback(_fun107985, []);
object2.measure = binding.useCallback(_fun107986, []);
object2.cancel = binding.useCallback(_fun107987, []);
return object2;
}
function _fun107986(a0) { // fn#107986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:510, offset: 0x023113b0, size: 65 bytes, params: 2, frame: 12
var r0;
const current = env0_3.current;
const value2 = null;
if (a0 !== current) {
r0 = value2;
} else {
env0_3.current = value2;
r0 = global.performance.now() - env0_2.current;
}
return r0;
}
function _fun107985(a0) { // fn#107985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:382, offset: 0x02311356, size: 90 bytes, params: 2, frame: 13
const binding = env0_1;
const value2 = binding.current + 1;
binding.current = value2;
env0_3.current = value2;
env0_2.current = global.performance.now();
env0_0({batchKey: value2, params: a0});
}
function _fun107987(a0) { // fn#107987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:604, offset: 0x023113f1, size: 35 bytes, params: 2, frame: 3
if (a0 === env0_3.current) {
env0_3.current = null;
}
}
function _fun107986(a0) { // fn#107986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:510, offset: 0x023113b0, size: 65 bytes, params: 2, frame: 12
var r0;
const current = env0_3.current;
const value2 = null;
if (a0 !== current) {
r0 = value2;
} else {
env0_3.current = value2;
r0 = global.performance.now() - env0_2.current;
}
return r0;
}
function _fun107987(a0) { // fn#107987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14469:604, offset: 0x023113f1, size: 35 bytes, params: 2, frame: 3
if (a0 === env0_3.current) {
env0_3.current = null;
}
}
global.__d(_fun107983, 14272, [57, 31, 2]) /* metro module 14272, dependencies: [57, 31, 2] */;