Initial commit

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

No files matched your search

@@ -0,0 +1,78 @@
/* Metro module 9692; source: modules/settings/native/renderer/SettingBuilders.tsx; dependencies: [9693, 2] */
function _fun76200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9878:6, offset: 0x01dc64a6, size: 226 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(9693) /* metro dependency 9693: SettingRendererConstants */).NodeType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingBuilders.tsx');
exports.createToggle = function(a0) {
var object = {};
var TOGGLE = NodeType.TOGGLE;
object.type = TOGGLE;
copyDataProperties(object, a0, TOGGLE);
return object;
};
exports.createStatic = function(a0) {
var object = {};
var STATIC = NodeType.STATIC;
object.type = STATIC;
copyDataProperties(object, a0, STATIC);
return object;
};
exports.createRoute = function(a0) {
var object = {};
var ROUTE = NodeType.ROUTE;
object.type = ROUTE;
copyDataProperties(object, a0, ROUTE);
return object;
};
exports.createPressable = function(a0) {
var object = {};
var PRESSABLE = NodeType.PRESSABLE;
object.type = PRESSABLE;
copyDataProperties(object, a0, PRESSABLE);
return object;
};
exports.createVolumeSlider = function(a0) {
var object = {};
var VOLUME_SLIDER = NodeType.VOLUME_SLIDER;
object.type = VOLUME_SLIDER;
copyDataProperties(object, a0, VOLUME_SLIDER);
return object;
};
exports.createSlider = function(a0) {
var object = {};
var SLIDER = NodeType.SLIDER;
object.type = SLIDER;
copyDataProperties(object, a0, SLIDER);
return object;
};
exports.createGuildSelector = function(a0) {
var object = {};
var GUILD_SELECTOR = NodeType.GUILD_SELECTOR;
object.type = GUILD_SELECTOR;
copyDataProperties(object, a0, GUILD_SELECTOR);
return object;
};
exports.createRadio = function(a0) {
var object = {};
var RADIO = NodeType.RADIO;
object.type = RADIO;
copyDataProperties(object, a0, RADIO);
return object;
};
exports.createList = function(a0) {
var object = {};
var LIST = NodeType.LIST;
object.type = LIST;
copyDataProperties(object, a0, LIST);
return object;
};
exports.createSegmentedControl = function(a0) {
var object = {};
var SEGMENTED_CONTROL = NodeType.SEGMENTED_CONTROL;
object.type = SEGMENTED_CONTROL;
copyDataProperties(object, a0, SEGMENTED_CONTROL);
return object;
};
}
@@ -0,0 +1,191 @@
/* Metro module 13176; source: modules/settings/native/renderer/SettingHookHarness.tsx; dependencies: [57, 31, 13173, 9693, 13177, 2] */
function _fun100585(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13366:6, offset: 0x021ed979, size: 275 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const settingBlocklistStore = importDefault(13173) /* metro dependency 13173: SettingBlocklistStore */;
const env0_5 = (require(9693) /* metro dependency 9693: SettingRendererConstants */).NodeType;
const env0_6 = [];
let Map = global.Map;
let map = new Map();
Map = global.Map;
map = new Map();
value = value.memo(SettingHookHarness);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingHookHarness.tsx');
exports.default = value;
exports.getCachedSettingTitle = getCachedSettingTitle;
exports.getCachedSettingSearchTerms = getCachedSettingSearchTerms;
}
function SettingHookHarness() { // fn#100586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13366:187, offset: 0x021eda8c, size: 356 bytes, params: 1, frame: 29
var r5;
var r3;
var r15;
var property;
var value6;
var property2;
var usePredicate;
var value7;
var value8;
var has;
var push;
var value9;
var value10;
var type;
var GUILD_SELECTOR;
var useTitle;
var value11;
var binding;
var set;
var useSearchTerms;
var value12;
var binding2;
var value13;
const field = SettingBlocklistStore.getField('blocklist');
const items3 = [];
const items2 = [];
const Object = global.Object;
const entries = Object.entries;
const value3 = undefined;
const SETTING_RENDERER_CONFIG = (require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG;
const value4 = Reflect.apply(entries, Object, [SETTING_RENDERER_CONFIG]);
let length = value4.length;
const value5 = 0;
if (value5 < length) {
r5 = value5;
reducibleLoop1: while (true) {
property = value4[r5];
value6 = env0_2(property, 2);
property = value6[value5];
property2 = value6[1];
usePredicate = property2.usePredicate;
reducibleJoin3: while (true) {
if (usePredicate == null) {
r3 = value3;
break reducibleJoin3;
}
value7 = usePredicate();
r3 = value7;
break reducibleJoin3;
}
value8 = r3 === false;
reducibleJoin10: while (true) {
reducibleJoin8: while (true) {
if (value8) {
if (field.has(property)) {
if (value8) {
r3 = !value8;
break reducibleJoin8;
}
r3 = field.has(property);
break reducibleJoin8;
}
push = items3.push;
Reflect.apply(push, items3, [property]);
break reducibleJoin10;
}
value9 = !value8;
if (value8) {
r3 = value9;
break reducibleJoin8;
}
has = field.has;
value10 = Reflect.apply(has, field, [property]);
r3 = value10;
break reducibleJoin8;
}
if (r3) {
push = items2.push;
Reflect.apply(push, items2, [property]);
break reducibleJoin10;
}
break reducibleJoin10;
}
type = property2.type;
GUILD_SELECTOR = NodeType.GUILD_SELECTOR;
reducibleJoin16: while (true) {
if (type === GUILD_SELECTOR) {
break reducibleJoin16;
}
useTitle = property2.useTitle;
value11 = Reflect.apply(useTitle, property2, []);
binding = env0_7;
set = binding.set;
Reflect.apply(set, binding, [property, value11]);
useSearchTerms = property2.useSearchTerms;
reducibleJoin13: while (true) {
if (useSearchTerms == null) {
r3 = value3;
break reducibleJoin13;
}
useSearchTerms = property2.useSearchTerms;
value12 = Reflect.apply(useSearchTerms, property2, []);
r3 = value12;
break reducibleJoin13;
}
binding = env0_8;
set = binding.set;
reducibleJoin15: while (true) {
if (r3 != null) {
r15 = r3;
break reducibleJoin15;
}
binding2 = env0_6;
r15 = binding2;
break reducibleJoin15;
}
Reflect.apply(set, binding, [property, r15]);
break reducibleJoin16;
}
value13 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
length = value4.length;
if (value13 < length) {
r5 = value13;
continue reducibleLoop1;
}
break reducibleLoop1;
}
}
env0_3.useEffect(_fun100587);
return null;
}
function getCachedSettingTitle(a0) { // fn#100590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13366:905, offset: 0x021edc87, size: 22 bytes, params: 2, frame: 11
return env0_7.get(a0);
}
function getCachedSettingSearchTerms(a0) { // fn#100591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13366:986, offset: 0x021edc9d, size: 32 bytes, params: 2, frame: 12
return env0_8.get(a0) ?? env0_6;
}
function _fun100587() { // fn#100587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13366:614, offset: 0x021edbf0, size: 151 bytes, params: 1, frame: 15
var environment;
var value2;
var value3;
var set;
var binding;
if (env0_0.length > 0) {
value2 = environment.__proto__;
value3 = SettingBlocklistStore.getField('blocklist');
set = new global.Set();
var env0_0 = set;
binding = env0_0;
binding.forEach(_fun100588);
binding = env0_1;
binding.forEach(_fun100589);
SettingBlocklistStore.setState({blocklist: set});
} else if (env0_1.length > 0) {
value2 = environment.__proto__;
value3 = SettingBlocklistStore.getField('blocklist');
set = new global.Set();
var env0_0 = set;
binding = env0_0;
binding.forEach(_fun100588);
binding = env0_1;
binding.forEach(_fun100589);
SettingBlocklistStore.setState({blocklist: set});
}
}
@@ -0,0 +1,26 @@
/* Metro module 13170; source: modules/settings/native/renderer/SettingLayout.tsx; dependencies: [31, 9693, 33, 13171, 14156, 2] */
function _fun100492(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13360:6, offset: 0x021e9d46, size: 170 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(9693) /* metro dependency 9693: SettingRendererConstants */).NodeType;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(SettingLayout);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingLayout.tsx');
exports.default = value;
}
function SettingLayout({node}) { // fn#100493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13360:153, offset: 0x021e9df0, size: 137 bytes, params: 2, frame: 16
const type = node.type;
const LIST = NodeType.LIST;
if (LIST === type) {
const SettingsList = (require(13171) /* metro dependency 13171: SettingListRenderer */).SettingsList;
return <SettingsList node={node} />;
}
const SEGMENTED_CONTROL = NodeType.SEGMENTED_CONTROL;
if (SEGMENTED_CONTROL === type) {
return ((Component) => <Component node={node} />)(importDefault(14156) /* metro dependency 14156: SettingSegmentedControlRenderer */);
}
}
@@ -0,0 +1,99 @@
/* Metro module 14149; source: modules/settings/native/renderer/SettingListItemHighlight.tsx; dependencies: [31, 27, 13172, 33, 4501, 697, 4017, 4504, 2] */
function _fun107066(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14346:6, offset: 0x022f2261, size: 284 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).StyleSheet;
const userSettingSearchStore = importDefault(13172) /* metro dependency 13172: UserSettingSearchStore */;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const INTERACTIVE_TEXT_HOVER = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_HOVER;
const env0_7 = Reflect.apply(createStyles, createStylesModule,
[{background: {backgroundColor: INTERACTIVE_TEXT_HOVER}}]);
object = {code: "function SettingListItemHighlightTsx1(){const{withSequence,withDelay,withTiming,Easing,runOnJS,clearSelectedSearchResult}=this.__closure;return{opacity:withSequence(withDelay(500,withTiming(0,{duration:0})),withTiming(0.2,{duration:300,easing:Easing.ease}),withTiming(0,{duration:300,easing:Easing.ease},'respect-motion-settings',function(finished){if(finished){runOnJS(clearSelectedSearchResult);}}))};}"};
object = {code: 'function SettingListItemHighlightTsx2(finished){const{runOnJS,clearSelectedSearchResult}=this.__closure;if(finished){runOnJS(clearSelectedSearchResult);}}'};
value = value.memo(_fun107067);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingListItemHighlight.tsx');
exports.default = value;
}
function _fun107067({start, end, style}) { // fn#107067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14346:836, offset: 0x022f237d, size: 362 bytes, params: 2, frame: 23
var object2;
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useMemo(_fun107068, [end, start]);
let closure = function() {
UserSettingSearchStore.setState({selected: null});
};
const value3 = binding.useCallback(closure, []);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
closure = __107070;
object2 = {withSequence: reanimatedRexportModule.withSequence, withDelay: reanimatedRexportModule.withDelay,
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming};
const Easing = reanimatedRexportModule.Easing;
object2.Easing = Easing;
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.clearSelectedSearchResult = value3;
closure.__closure = object2;
closure.__workletHash = 13630242918990;
closure.__initData = env0_8;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return <View pointerEvents="none" style={[StyleSheet.absoluteFill, styles.background, value2, value4, style]} />;
}
function _fun107068() { // fn#107068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14346:895, offset: 0x022f24e7, size: 201 bytes, params: 1, frame: 15
const object2 = {};
const startBinding = start;
const value2 = undefined;
object2.borderTopStartRadius = startBinding ? (importDefault(697) /* metro dependency 697: native */).radii.lg : value2;
object2.borderTopEndRadius = start ? (importDefault(697) /* metro dependency 697: native */).radii.lg : value2;
object2.borderBottomStartRadius = end ? (importDefault(697) /* metro dependency 697: native */).radii.lg : value2;
object2.borderBottomEndRadius = end ? (importDefault(697) /* metro dependency 697: native */).radii.lg : value2;
return object2;
}
function __107070() { // fn#107070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14346:1188, offset: 0x022f25cf, size: 312 bytes, params: 1, frame: 27
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withSequence = reanimatedRexportModule.withSequence;
const moduleValue2 = reanimatedRexportModule;
const withDelay = moduleValue2.withDelay;
const timingModule = require(4504) /* metro dependency 4504: timing */;
let withTiming = timingModule.withTiming;
const value3 = Reflect.apply(withDelay, moduleValue2, [500, Reflect.apply(withTiming, timingModule, [0,
{duration: 0}])]);
const moduleValue4 = timingModule;
withTiming = moduleValue4.withTiming;
const Easing = reanimatedRexportModule.Easing;
const value4 = Reflect.apply(withTiming, moduleValue4, [0.2, {duration: 300, easing: Easing.ease}]);
const moduleValue5 = timingModule;
withTiming = moduleValue5.withTiming;
const object = {duration: 300};
object.easing = Easing.ease;
const closure = __107070T;
const object2 = {};
object2.runOnJS = reanimatedRexportModule.runOnJS;
object2.clearSelectedSearchResult = env0_2;
closure.__closure = object2;
closure.__workletHash = 13391094209244;
closure.__initData = env1_9;
return {opacity: Reflect.apply(withSequence, reanimatedRexportModule, [value3, value4, Reflect.apply(withTiming,
moduleValue5, [0, object, 'respect-motion-settings', closure])])};
}
function __107070T(a0) { // fn#107071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14346:1444, owner: __107070.t, offset: 0x022f2707, size: 52 bytes, params: 2, frame: 11
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__;
Reflect.apply(runOnJS, value, [env1_2]);
}
}
@@ -0,0 +1,237 @@
/* Metro module 13171; source: modules/settings/native/renderer/SettingListRenderer.tsx; dependencies: [31, 27, 13172, 13173, 9693, 33, 4501, 697, 6231, 6766, 13174, 1585, 1357, 13175, 14150, 8416, 14151, 14154, 14155, 1848, 2] */
function _fun100494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:6, offset: 0x021e9e79, size: 436 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_4 = (require(27) /* metro dependency 27 */).View;
const userSettingSearchStore = importDefault(13172) /* metro dependency 13172: UserSettingSearchStore */;
const settingBlocklistStore = importDefault(13173) /* metro dependency 13173: SettingBlocklistStore */;
const settingRendererConstantsModule = require(9693) /* metro dependency 9693: SettingRendererConstants */;
const env0_7 = settingRendererConstantsModule.ListItemType;
const env0_8 = settingRendererConstantsModule.getSettingsListItemEstimatedSize;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
const env0_10 = Reflect.apply(createStyles, createStylesModule,
[{container: {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND, flexGrow: 1},
contentContainer: {paddingHorizontal: 16}, searchResultsHeader: {paddingBottom: 24}, spacer: {paddingTop: 24},
subLabel: {marginTop: 8}}]);
const value4 = value.memo(_fun100500);
value = value.memo(_fun100502);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingListRenderer.tsx');
exports.SettingsList = value4;
exports.SearchableSettingsList = value;
}
function SearchListSectionLabel({label}) { // fn#100495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:454, offset: 0x021ea02d, size: 109 bytes, params: 2, frame: 19
const styles = useStyles();
return (
<View style={styles.spacer}>
{typeof label !== 'string' ? label : ((TableRowGroupTitle) => <TableRowGroupTitle title={label} />)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroupTitle)}
</View>
);
}
function SearchListSectionSubLabel({subLabel}) { // fn#100496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:606, offset: 0x021ea09a, size: 143 bytes, params: 2, frame: 19
const styles = useStyles();
return (
<View style={styles.subLabel}>
{typeof subLabel === 'string' || global.Array.isArray(subLabel) ? ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround variant="text-xs/normal" color="text-muted">{subLabel}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround) : subLabel}
</View>
);
}
function getItemType(a0) { // fn#100497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:838, offset: 0x021ea129, size: 140 bytes, params: 2, frame: 16
const type = a0.type;
const SECTION_HEADER = ListItemType.SECTION_HEADER;
if (SECTION_HEADER === type) {
return a0.type;
}
const SECTION_FOOTER = ListItemType.SECTION_FOOTER;
if (SECTION_FOOTER === type) {
return a0.type;
}
const SECTION_ROW = ListItemType.SECTION_ROW;
if (SECTION_ROW === type) {
return '' + a0.type + '-' + a0.setting;
}
const SETTING_SEARCH_RESULT = ListItemType.SETTING_SEARCH_RESULT;
if (SETTING_SEARCH_RESULT === type) {
return '' + a0.type + '-' + a0.setting;
}
const SECTION_ROW_PLACEHOLDER = ListItemType.SECTION_ROW_PLACEHOLDER;
if (SECTION_ROW_PLACEHOLDER === type) {
return a0.type;
}
}
function renderItem_100498({item}) { // fn#100498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:1060, offset: 0x021ea1b5, size: 260 bytes, params: 2, frame: 15
const type = item.type;
const SECTION_HEADER = ListItemType.SECTION_HEADER;
if (SECTION_HEADER === type) {
return <SearchListSectionLabel label={item.label} />;
}
const SECTION_FOOTER = ListItemType.SECTION_FOOTER;
if (SECTION_FOOTER === type) {
return <SearchListSectionSubLabel subLabel={item.label} />;
}
const SETTING_SEARCH_RESULT = ListItemType.SETTING_SEARCH_RESULT;
if (SETTING_SEARCH_RESULT === type) {
return (require(13174) /* metro dependency 13174: SettingRenderer */).renderSettingSearchResultItem(item);
}
const SECTION_ROW = ListItemType.SECTION_ROW;
if (SECTION_ROW === type) {
return (require(13174) /* metro dependency 13174: SettingRenderer */).renderSettingItem(item);
}
const SECTION_ROW_PLACEHOLDER = ListItemType.SECTION_ROW_PLACEHOLDER;
if (SECTION_ROW_PLACEHOLDER === type) {
return (require(13174) /* metro dependency 13174: SettingRenderer */).renderSettingSearchResultPlaceholderItem(item);
}
}
function keyExtractor_100499(a0, a1) { // fn#100499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:1479, offset: 0x021ea2b9, size: 226 bytes, params: 3, frame: 17
const value = a1;
const type = a0.type;
const SECTION_HEADER = ListItemType.SECTION_HEADER;
if (SECTION_HEADER === type) {
return '' + a0.type + '-' + (typeof a0.label !== 'string' ? value : a0.label);
}
const SECTION_FOOTER = ListItemType.SECTION_FOOTER;
if (SECTION_FOOTER === type) {
return '' + a0.type + '-' + (typeof a0.label !== 'string' ? value : a0.label);
}
const SECTION_ROW = ListItemType.SECTION_ROW;
if (SECTION_ROW === type) {
return '' + a0.type + '-' + a0.setting;
}
const SETTING_SEARCH_RESULT = ListItemType.SETTING_SEARCH_RESULT;
if (SETTING_SEARCH_RESULT === type) {
return '' + a0.type + '-' + a0.setting;
}
const SECTION_ROW_PLACEHOLDER = ListItemType.SECTION_ROW_PLACEHOLDER;
if (SECTION_ROW_PLACEHOLDER === type) {
return '' + a0.type + '-' + value;
}
}
function _fun100500({node}) { // fn#100500, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:1769, offset: 0x021ea39b, size: 379 bytes, params: 2, frame: 26
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('SettingsList');
const value3 = SettingBlocklistStore.useField('blocklist');
const binding = env0_3;
const value4 = binding.useMemo(_fun100501, [value3, node]);
const value5 = binding.useRef(null);
(require(14150) /* metro dependency 14150: useAutoScrollToSetting */).useAutoScrollToSearchResultSetting(value5,
value4, node.scrollTarget);
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const object = {ref: value5};
const ListHeaderComponent = node.ListHeaderComponent;
object.ListHeaderComponent = ListHeaderComponent;
object.estimatedItemSize = getSettingsListItemEstimatedSize(value2);
const object4 = {};
copyDataProperties(object4, styles.contentContainer, undefined);
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4['paddingBottom'] = bottom + PX_16;
object.contentContainerStyle = object4;
object.scrollIndicatorInsets = {right: 0.01};
object.keyExtractor = keyExtractor_100499;
object.renderItem = renderItem_100498;
object.data = value4;
object.getItemType = getItemType;
return (
<View style={styles.container}>
<FlashList {...object} />
</View>
);
}
function _fun100502({node}) { // fn#100502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:2354, offset: 0x021ea548, size: 587 bytes, params: 2, frame: 27
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('SearchableSettingsList');
const value3 = (require(14151) /* metro dependency 14151: useSettingSearchResults */).useSettingSearchResults();
const settings = value3.settings;
const isLoading = value3.isLoading;
const env0_3 = isLoading;
const placeholderCount = value3.placeholderCount;
const value4 = UserSettingSearchStore.useState(function({query}) {
return query.trim() === '';
});
const value5 = SettingBlocklistStore.useField('blocklist');
const binding = env0_3;
const useMemo = binding.useMemo;
const value8 = binding.useMemo(_fun100506, [Reflect.apply(useMemo, binding, [_fun100504, [value5, node]]),
binding.useMemo(_fun100505, [settings, isLoading, placeholderCount]), value4]);
const value9 = binding.useMemo(_fun100507, [styles.searchResultsHeader, value4]);
const value10 = binding.useMemo(_fun100508, [value4, isLoading, value8.length]);
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
const object = {};
copyDataProperties(object, styles.contentContainer, value5);
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object['paddingBottom'] = bottom + PX_16;
return (
<FlashList
keyboardShouldPersistTaps="always"
contentContainerStyle={object}
ListHeaderComponentStyle={value9}
estimatedItemSize={getSettingsListItemEstimatedSize(value2)}
ListHeaderComponent={importDefault(14155) /* metro dependency 14155: SettingSearchBar */}
ListEmptyComponent={value10}
onScroll={(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard}
scrollIndicatorInsets={{right: 0.01}}
keyExtractor={keyExtractor_100499}
renderItem={renderItem_100498}
data={value8}
getItemType={getItemType}
/>
);
}
function _fun100501() { // fn#100501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:1884, offset: 0x021ea516, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(13175) /* metro dependency 13175: SettingRendererUtils */;
return value.toSettingListItems(node, env0_1);
}
function _fun100504() { // fn#100504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:2607, offset: 0x021ea7b0, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(13175) /* metro dependency 13175: SettingRendererUtils */;
return value.toSettingListItems(node, env0_6);
}
function _fun100505() { // fn#100505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:2665, offset: 0x021ea7e2, size: 55 bytes, params: 1, frame: 15
const value = environment.__proto__;
return (require(13175) /* metro dependency 13175: SettingRendererUtils */).getScoredSettingListSearchResultItems(settings,
isLoading, placeholderCount);
}
function _fun100506() { // fn#100506, offset: 0x021ea819, size: 22 bytes, params: 1, frame: 3
return env0_5 ? env0_7 : env0_8;
}
function _fun100507() { // fn#100507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:2779, offset: 0x021ea82f, size: 26 bytes, params: 1, frame: 2
return env0_5 ? {} : styles.searchResultsHeader;
}
function _fun100508() { // fn#100508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13361:2851, offset: 0x021ea849, size: 77 bytes, params: 1, frame: 14
var r0;
var value;
const value2 = null;
if (env0_5) {
r0 = value2;
} else if (isLoading) {
r0 = value2;
} else if (env0_9.length !== 0) {
r0 = value2;
} else {
value = environment.__proto__;
value = importDefault(14154) /* metro dependency 14154: SettingsSearchEmptyState */;
value = ((Component) => <Component />)(value);
r0 = value;
}
return r0;
}
@@ -0,0 +1,684 @@
/* Metro module 13174; source: modules/settings/native/renderer/SettingRenderer.tsx; dependencies: [57, 29, 31, 27, 1949, 13172, 1867, 9693, 33, 4501, 697, 1305, 6238, 1484, 13175, 566, 1244, 8765, 6819, 14148, 14149, 6808, 3875, 7988, 7987, 6797, 3856, 10272, 4081, 4082, 6239, 4572, 4573, 1856, 477, 12809, 5278, 4578, 3860, 7006, 1848, 2] */
function _fun100513(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:6, offset: 0x021ea9a7, size: 991 bytes, params: 8, frame: 25
var object3;
const env0_0 = require;
const env0_3 = ['onSlidingComplete', 'step', 'startIcon', 'endIcon', 'minimumValue', 'maximumValue', 'valueLabel',
'defaultValue', 'onValueChange'];
const env0_4 = ['settingData'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_5 = importDefault(57) /* metro dependency 57 */;
const env0_6 = importDefault(29) /* metro dependency 29 */;
const value = importAll(31) /* metro dependency 31 */;
const env0_8 = (require(27) /* metro dependency 27 */).View;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const userSettingSearchStore = importDefault(13172) /* metro dependency 13172: UserSettingSearchStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const settingRendererConstantsModule = require(9693) /* metro dependency 9693: SettingRendererConstants */;
const env0_12 = settingRendererConstantsModule.GUILD_SELECT_ALL_SERVERS_OPTION_ID;
const env0_13 = settingRendererConstantsModule.NodeType;
const value3 = require(33) /* metro dependency 33 */;
const env0_14 = value3.jsx;
const env0_15 = value3.Fragment;
const env0_16 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.marginTop = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginBottom = PX_8;
object3.slider = object4;
object3.sliderTitle = {'flexDirection': 'row', 'justifyContent': 'space-between'};
object3.radioSettingHighlight = {top: 26};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object3.defaultIcon = {'backgroundColor': null, 'justifyContent': 'center', 'alignItems': 'center',
backgroundColor: BACKGROUND_BRAND};
const object7 = {};
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object7.width = AVATAR_SIZE_MAP[REFRESH_MEDIUM_32];
REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object7.height = AVATAR_SIZE_MAP[REFRESH_MEDIUM_32];
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
let BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object7.backgroundColor = BACKGROUND_MOD_MUTED;
object3.placeholderAvatar = object7;
const object8 = {height: 20};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object8.backgroundColor = BACKGROUND_MOD_MUTED;
object3.placeholderUsername = object8;
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object3]);
const env0_18 = value.memo(_fun100527);
const closure = GuildSelectDefaultIcon;
const env0_20 = value.memo(_fun100530);
const env0_21 = value.memo(_fun100536);
const env0_22 = value.memo(_fun100537);
const env0_23 = value.memo(_fun100538);
const env0_24 = value.memo(_fun100540);
const env0_25 = value.memo(_fun100542);
const env0_26 = value.memo(_fun100543);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingRenderer.tsx');
exports.GuildSelectDefaultIcon = closure;
exports.renderSettingItem = renderSettingItem;
exports.renderSettingSearchResultItem = renderSettingSearchResultItem;
exports.renderSettingSearchResultPlaceholderItem = renderSettingSearchResultPlaceholderItem;
}
function formatSettingsRowTrailing(a0) { // fn#100514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:1087, offset: 0x021ead86, size: 82 bytes, params: 2, frame: 15
var r0;
let value = a0;
if (value != null) {
if (typeof value !== 'string') {
r0 = value;
} else {
value = ((TrailingText) => <TrailingText text={value} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText);
r0 = value;
}
return r0;
}
}
function ForceSwitchIcons({children}) { // fn#100515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:3626, offset: 0x021eadd8, size: 133 bytes, params: 2, frame: 20
const binding = env0_7;
const useContext = binding.useContext;
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
const value3 = env0_7.useMemo(_fun100516, [Reflect.apply(useContext, binding, [AccessibilityPreferencesContext])]);
const Provider = AccessibilityPreferencesContext.Provider;
return (
<Provider value={value3}>
{children}
</Provider>
);
}
function SettingSearchResultBreadcrumbs({breadcrumbs}) { // fn#100517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:7198, offset: 0x021eae7a, size: 94 bytes, params: 2, frame: 17
if (breadcrumbs.length === 0) {
return null;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text variant="text-xs/medium" color="text-muted">
{breadcrumbs.join(' → ')}
</Text>
);
}
}
function SettingSearchResultIcon({IconComponent}) { // fn#100518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:7368, offset: 0x021eaed8, size: 161 bytes, params: 2, frame: 17
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const TABLE_ROW_ICON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_ICON_SIZE;
return IconComponent == null ? <View style={{width: Reflect.apply(useToken, useTokenModule,
[TABLE_ROW_ICON_SIZE])}} /> : ((Icon) => <Icon IconComponent={IconComponent} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon);
}
function RouteSettingSearchResult({settingData, IconComponent, title, breadcrumbs, setting, index, total}) { // fn#100519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:7571, offset: 0x021eaf79, size: 322 bytes, params: 2, frame: 24
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useStackNavigation();
const screen = settingData.screen;
const usePreNavigationAction = settingData.usePreNavigationAction;
const value5 = env0_7.useCallback(_fun100520, [usePreNavigationAction?.(), index, value3, screen, setting, title,
total]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={title}
onPress={value5}
arrow
icon={<SettingSearchResultIcon IconComponent={IconComponent} />}
subLabel={<SettingSearchResultBreadcrumbs breadcrumbs={breadcrumbs} />}
start={index === 0}
end={index === total - 1}
/>
);
}
function PressableSettingSearchResult({settingData, IconComponent, title, breadcrumbs, setting, index, total}) { // fn#100521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:8231, offset: 0x021eb15e, size: 254 bytes, params: 2, frame: 22
const onPress = settingData.onPress;
const withArrow = settingData.withArrow;
const value2 = env0_7.useCallback(_fun100522, [setting, title, index, total, onPress]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={title}
onPress={value2}
icon={<SettingSearchResultIcon IconComponent={IconComponent} />}
subLabel={<SettingSearchResultBreadcrumbs breadcrumbs={breadcrumbs} />}
start={index === 0}
end={index === total - 1}
arrow={withArrow}
/>
);
}
function StaticSettingSearchResult({settingData, IconComponent, title, breadcrumbs, setting, index, total}) { // fn#100523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:8745, offset: 0x021eb2c8, size: 334 bytes, params: 2, frame: 24
const useTrailing = settingData.useTrailing;
const r10 = useTrailing?.();
const value5 = env0_7.useCallback(_fun100524, [index, setting, r10, title, total]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={title}
onPress={r10 != null ? value5 : undefined}
icon={<SettingSearchResultIcon IconComponent={IconComponent} />}
subLabel={<SettingSearchResultBreadcrumbs breadcrumbs={breadcrumbs} />}
trailing={r10 != null ? ((TrailingText) => <TrailingText text={r10} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText) : null}
start={index === 0}
end={index === total - 1}
/>
);
}
function SettingSearchResultPlaceholder({start, end}) { // fn#100525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:9366, offset: 0x021eb4a4, size: 188 bytes, params: 2, frame: 21
const styles = useStyles();
const property = env0_5(env0_7.useState(function() {
var object = {};
var Math = global.Math;
object.width = (10 + 80 * Math.random() | 0) + '%';
return object;
}), 1)[0];
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
start={start}
end={end}
label={<View style={[styles.placeholderUsername, property]} />}
icon={<View style={styles.placeholderAvatar} />}
/>
);
}
function _fun100527({useTitle, useTrailing, usePreNavigationAction, screen, useDescription, useIsDisabled, variant, start, end, IconComponent}) { // fn#100527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:1220, offset: 0x021eb560, size: 364 bytes, params: 2, frame: 27
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useStackNavigation();
const value4 = useTitle();
const r15 = usePreNavigationAction?.();
const r12 = useDescription?.();
const r11 = useIsDisabled?.();
const r9 = useTrailing?.();
const value10 = env0_7.useCallback(_fun100528, [value3, screen, r15]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={value4}
subLabel={r12}
disabled={r11}
arrow
variant={variant}
icon={IconComponent != null ? ((Icon) => <Icon IconComponent={IconComponent} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon) : null}
trailing={r9 != null ? formatSettingsRowTrailing(r9) : null}
onPress={value10}
start={start}
end={end}
/>
);
}
function GuildSelectDefaultIcon({size}) { // fn#100529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:1843, offset: 0x021eb712, size: 168 bytes, params: 2, frame: 18
size = size === undefined ? 'sm' : size;
const styles = useStyles();
const r8 = size !== 'xs' ? 32 : 24;
const object = {};
copyDataProperties(object, styles.defaultIcon, r8);
object['width'] = r8;
object['height'] = r8;
object['borderRadius'] = r8 / 3;
const ClydeIcon = (require(8765) /* metro dependency 8765: ClydeIcon */).ClydeIcon;
return (
<View style={object}>
<ClydeIcon color="white" size={size} />
</View>
);
}
function _fun100530(a0) { // fn#100530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:2026, offset: 0x021eb7ba, size: 245 bytes, params: 2, frame: 19
const useSelectedGuildId = a0.useSelectedGuildId;
const value = Object.create(null);
value.useSelectedGuildId = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value3 = useSelectedGuildId();
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun100531);
const value5 = _fun100532(value3);
let binding = env0_7;
const value6 = binding.memo(_fun100534);
const value7 = env0_7.useCallback(_fun100535, [value5]);
binding = env0_21;
const PRESSABLE = NodeType.PRESSABLE;
return ((Component) => <Component {...value2} {...{['type']: PRESSABLE}} {...{['useTitle']: value7}} {...{['withArrow']: true}} {...{['IconComponent']: value6}} />)(binding);
}
function _fun100536({setting, onPress, useTitle, useDescription, useIsDisabled, useTrailing, variant, withArrow, start, end, IconComponent}) { // fn#100536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:2578, offset: 0x021eba0c, size: 369 bytes, params: 2, frame: 30
var r5;
var value;
const value3 = (require(14148) /* metro dependency 14148: useHighlightSettingItem */).useHighlightSettingItem(setting);
const value4 = useTitle();
const r16 = useDescription?.();
const r11 = useIsDisabled?.();
const r12 = useTrailing?.();
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRow = <TableRow label={value4} subLabel={r16} arrow={withArrow} variant={variant} icon={IconComponent != null ? ((Icon) => <Icon IconComponent={IconComponent} variant={variant} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon) : null} onPress={onPress} disabled={r11} trailing={formatSettingsRowTrailing(r12)} start={start} end={end} />;
if (value3) {
value = importDefault(14149) /* metro dependency 14149: SettingListItemHighlight */;
value = ((Component) => <Component start={start} end={end} />)(value);
r5 = value;
} else {
r5 = value3;
}
return (
<>
{tableRow}
{r5}
</>
);
}
function _fun100537({setting, onValueChange, useTitle, useDescription, useIsDisabled, useValue, variant, start, end, IconComponent, hasIcon}) { // fn#100537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:3105, offset: 0x021ebb7d, size: 379 bytes, params: 2, frame: 28
var r5;
var value;
const value3 = (require(14148) /* metro dependency 14148: useHighlightSettingItem */).useHighlightSettingItem(setting);
const value4 = useTitle();
const value5 = useValue();
const r14 = useDescription?.();
let r7 = useIsDisabled?.();
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const tableSwitchRow = <TableSwitchRow label={value4} subLabel={r14} icon={IconComponent != null ? ((Icon) => <Icon IconComponent={IconComponent} variant={variant} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon) : null} value={value5} variant={variant} disabled={r7} onValueChange={onValueChange} start={start} end={end} />;
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
r7 = hasIcon !== true ? tableSwitchRow : <ForceSwitchIcons>{tableSwitchRow}</ForceSwitchIcons>;
if (value3) {
value = importDefault(14149) /* metro dependency 14149: SettingListItemHighlight */;
value = ((Component) => <Component start={start} end={end} />)(value);
r5 = value;
} else {
r5 = value3;
}
return (
<>
{r7}
{r5}
</>
);
}
function _fun100538({setting, useTitle, useValue, useOptions, onValueChange}) { // fn#100538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:3876, offset: 0x021ebcf8, size: 295 bytes, params: 2, frame: 25
var r5;
var value;
const styles = useStyles();
const value2 = (require(14148) /* metro dependency 14148: useHighlightSettingItem */).useHighlightSettingItem(setting);
const value3 = useTitle();
const value4 = useValue();
const value5 = useOptions();
const r10 = typeof value4 !== 'number' ? value4 : '' + value4;
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const tableRadioGroup = <TableRadioGroup title={value3} defaultValue={r10} onChange={onValueChange} hasIcons={false} key={r10}>{value5.map(_fun100539)}</TableRadioGroup>;
if (value2) {
value = importDefault(14149) /* metro dependency 14149: SettingListItemHighlight */;
value = ((Component) => <Component start end style={styles.radioSettingHighlight} />)(value);
r5 = value;
} else {
r5 = value2;
}
return (
<>
{tableRadioGroup}
{r5}
</>
);
}
function _fun100540({setting, useTitle, variant, useTrailing, useIsDisabled, useDescription, start, end, IconComponent}) { // fn#100540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:4404, offset: 0x021ebea8, size: 450 bytes, params: 2, frame: 29
const value3 = (require(14148) /* metro dependency 14148: useHighlightSettingItem */).useHighlightSettingItem(setting);
const value4 = useTitle();
const r15 = useTrailing?.();
const r13 = useDescription?.();
const r12 = useIsDisabled?.();
const value9 = env0_7.useCallback(_fun100541, [r15]);
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<>
<TableRow
label={value4}
subLabel={r13}
onPress={r15 != null ? value9 : null}
variant={variant}
disabled={r12}
icon={IconComponent != null ? ((Icon) => <Icon IconComponent={IconComponent} variant={variant} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon) : null}
trailing={r15 != null ? ((TrailingText) => <TrailingText text={r15} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText) : null}
start={start}
end={end}
/>
{value3 && ((Component) => <Component start={start} end={end} />)(importDefault(14149) /* metro dependency 14149: SettingListItemHighlight */)}
</>
);
}
function _fun100542({setting, useTitle, useValue, onValueChange, maximum, start, end}) { // fn#100542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:5034, offset: 0x021ec0b9, size: 310 bytes, params: 2, frame: 30
var r5;
var value;
const value3 = (require(14148) /* metro dependency 14148: useHighlightSettingItem */).useHighlightSettingItem(setting);
const styles = useStyles();
const value4 = useTitle();
const r19 = useValue?.();
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const tableRow = <TableRow label={value4} start={start} end={end} subLabel={<View style={styles.slider}>{((Component) => <Component value={r19} maxVolume={maximum} onValueChange={onValueChange} />)(importDefault(10272) /* metro dependency 10272: VolumeSlider */)}</View>} />;
if (value3) {
value = importDefault(14149) /* metro dependency 14149: SettingListItemHighlight */;
value = ((Component) => <Component start={start} end={end} />)(value);
r5 = value;
} else {
r5 = value3;
}
return (
<>
{tableRow}
{r5}
</>
);
}
function _fun100543({useTitle, start, end, useProps, useTrailing}) { // fn#100543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:5397, offset: 0x021ec1ef, size: 1383 bytes, params: 2, frame: 48
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const env0_6 = undefined;
let env0_7 = undefined;
const value2 = useTitle();
const value3 = useProps();
const onSlidingComplete = value3.onSlidingComplete;
const step = value3.step;
const r32 = step === undefined ? 0.1 : step;
const startIcon = value3.startIcon;
const endIcon = value3.endIcon;
const minimumValue = value3.minimumValue;
const r30 = minimumValue === undefined ? 0 : minimumValue;
const maximumValue = value3.maximumValue;
const r27 = maximumValue === undefined ? 1 : maximumValue;
const env0_3 = r27;
const valueLabel = value3.valueLabel;
const defaultValue = value3.defaultValue;
const r15 = defaultValue === undefined ? 1 : defaultValue;
const onValueChange = value3.onValueChange;
const env0_5 = onValueChange;
const value8 = env0_6(value3, env0_3);
const styles = useStyles();
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const value10 = env0_5(env0_7.useState(_fun100545), 2);
const property = value10[0];
env0_7 = property;
const env0_8 = value10[1];
const [property2, env0_9] = env0_5(env0_7.useState(false), 2);
const value13 = env0_7.useCallback(_fun100546, []);
const value14 = env0_7.useCallback(_fun100547, [onValueChange]);
const value15 = env0_7.useCallback(_fun100548, [onSlidingComplete]);
const value16 = env0_7.useCallback(_fun100549, [value14, onSlidingComplete]);
const value17 = env0_7.useCallback(_fun100550, [r15, value16]);
const value18 = env0_7.useCallback(_fun100551, [value16, r27, r32, property]);
const value19 = env0_7.useCallback(_fun100552, [value16, r30, r32, property]);
const r18 = useTrailing?.();
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const items3 = [<Stack2 direction="horizontal" justify="space-between"><View style={styles.sliderTitle}><Text variant="text-md/semibold">{value2}</Text>{r18}</View>{property != null && <Text variant="text-sm/medium" color="text-muted">{valueLabel ?? (require(1856) /* metro dependency 1856: NumberUtils */).formatPercent(locale,
property)}</Text>}</Stack2>];
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
const slider = platformUtilsModule.isAndroid() ? styles.slider : undefined;
const Slider = (require(12809) /* metro dependency 12809: SliderNative */).Slider;
const sliderProps = {...value8};
sliderProps['accessibilityLabel'] = value2;
sliderProps['step'] = r32;
sliderProps['onValueChange'] = value14;
sliderProps['value'] = property;
sliderProps['minimumValue'] = r30;
sliderProps['maximumValue'] = r27;
sliderProps['onSlidingStart'] = value13;
sliderProps['onSlidingComplete'] = value15;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
sliderProps['startIcon'] = <PressableOpacity accessible={false} onPress={value19}>{startIcon}</PressableOpacity>;
sliderProps['endIcon'] = <PressableOpacity accessible={false} onPress={value18}>{endIcon}</PressableOpacity>;
items3[1] = <View style={slider}><Slider {...sliderProps} /></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const r13 = !property2 && property === r15;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[2] = <Button disabled={r13} variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3b//lO'])} onPress={value17} />;
return (
<Card
start={start}
end={end}
shadow="none"
border="none"
>
<Stack>
{items3}
</Stack>
</Card>
);
}
function renderSettingItem({setting, settingData, start, end}) { // fn#100553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:9785, offset: 0x021ec8de, size: 596 bytes, params: 2, frame: 18
const type = settingData.type;
const GUILD_SELECTOR = NodeType.GUILD_SELECTOR;
if (GUILD_SELECTOR === type) {
return ((Component) => <Component {...settingData} {...{['setting']: setting}} {...{['start']: start}} {...{['end']: end}} />)(env0_20);
}
const ROUTE = NodeType.ROUTE;
if (ROUTE === type) {
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} />)(env0_18);
}
const PRESSABLE = NodeType.PRESSABLE;
if (PRESSABLE === type) {
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} {...{['setting']: setting}} />)(env0_21);
}
const TOGGLE = NodeType.TOGGLE;
if (TOGGLE === type) {
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} {...{['setting']: setting}} />)(env0_22);
}
const STATIC = NodeType.STATIC;
if (STATIC === type) {
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} {...{['setting']: setting}} />)(env0_24);
}
const VOLUME_SLIDER = NodeType.VOLUME_SLIDER;
if (VOLUME_SLIDER === type) {
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} {...{['setting']: setting}} />)(env0_25);
}
const RADIO = NodeType.RADIO;
if (RADIO === type) {
return ((Component) => <Component {...settingData} {...{['setting']: setting}} />)(env0_23);
}
const SLIDER = NodeType.SLIDER;
if (SLIDER === type) {
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} {...{['setting']: setting}} />)(env0_26);
}
}
function renderSettingSearchResultItem(a0) { // fn#100554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:10350, offset: 0x021ecb32, size: 235 bytes, params: 2, frame: 17
const settingData = a0.settingData;
const value2 = env0_6(a0, env0_4);
const type = settingData.type;
const ROUTE = NodeType.ROUTE;
if (ROUTE === type) {
return <RouteSettingSearchResult settingData={settingData} {...value2} />;
}
const PRESSABLE = NodeType.PRESSABLE;
if (PRESSABLE === type) {
return <PressableSettingSearchResult settingData={settingData} {...value2} />;
}
const STATIC = NodeType.STATIC;
if (STATIC === type) {
return <StaticSettingSearchResult settingData={settingData} {...value2} />;
}
const Error = global.Error;
const value = '[SettingRenderer] Found unsupported renderer type for setting: ' + a0.setting;
const value3 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value3;
}
function renderSettingSearchResultPlaceholderItem(a0) { // fn#100555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:10801, offset: 0x021ecc1d, size: 44 bytes, params: 2, frame: 14
return <SettingSearchResultPlaceholder start={a0.start} end={a0.end} />;
}
function _fun100516() { // fn#100516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:3740, offset: 0x021eae5d, size: 29 bytes, params: 1, frame: 12
const object2 = {};
copyDataProperties(object2, env0_0, undefined);
object2['switchIconsEnabled'] = true;
return object2;
}
function _fun100520() { // fn#100520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:7798, offset: 0x021eb0bb, size: 163 bytes, params: 1, frame: 17
let value = environment.__proto__;
const setState = UserSettingSearchStore.setState;
const settingBinding = setting;
Reflect.apply(setState, UserSettingSearchStore, [{selected: settingBinding}]);
value = require(7006) /* metro dependency 7006: Tracking */;
const trackSettingSearchResultPress = value.trackSettingSearchResultPress;
const screenBinding = screen;
Reflect.apply(trackSettingSearchResultPress, value, [{setting: settingBinding, title: title,
route: screenBinding.route, searchResultPosition: index, numSearchResults: total}]);
value = require(13175) /* metro dependency 13175: SettingRendererUtils */;
value.onRouteSettingOnPress({navigation: env0_4, screen: screenBinding, preNavigationAction: env0_6});
}
function _fun100522() { // fn#100522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:8397, offset: 0x021eb25c, size: 108 bytes, params: 1, frame: 16
const value = environment.__proto__;
(require(7006) /* metro dependency 7006: Tracking */).trackSettingSearchResultPress({setting: setting, title: title,
searchResultPosition: index, numSearchResults: total});
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
onPress();
}
function _fun100524() { // fn#100524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:8919, offset: 0x021eb416, size: 142 bytes, params: 1, frame: 16
var value2;
if (env0_4 != null) {
value2 = environment.__proto__;
(require(7006) /* metro dependency 7006: Tracking */).trackSettingSearchResultPress({setting: setting,
title: title,
searchResultPosition: index, numSearchResults: total});
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_4);
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
}
}
function _fun100528() { // fn#100528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:1507, offset: 0x021eb6cc, size: 70 bytes, params: 1, frame: 14
const value = environment.__proto__;
(require(13175) /* metro dependency 13175: SettingRendererUtils */).onRouteSettingOnPress({navigation: env0_1,
screen: screen, preNavigationAction: env0_2});
}
function _fun100532(a0) { // fn#100532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:2132, offset: 0x021eb8af, size: 210 bytes, params: 2, frame: 17
var environment;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_0 = a0;
const value = environment.__proto__;
const value2 = undefined;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun100533);
return a0 === GUILD_SELECT_ALL_SERVERS_OPTION_ID ? intl.string(t.OMVg25) : (guild == null ? value2 : guild.name) ?? intl.string(t['XBwns+']);
}
function _fun100534() { // fn#100534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:2342, offset: 0x021eb99c, size: 112 bytes, params: 1, frame: 17
var r0;
var value2;
var value;
if (guild == null) {
value = environment.__proto__;
value = <GuildSelectDefaultIcon />;
r0 = value;
} else {
value2 = environment.__proto__;
r0 = ((Component) => <Component size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.SMALL_32} guild={guild} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
}
return r0;
}
function _fun100539(a0) { // fn#100539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:4157, offset: 0x021ebe1f, size: 137 bytes, params: 2, frame: 16
var r5;
let value = a0.value;
if (typeof value === 'number') {
value = a0.value;
value = '' + value;
r5 = value;
} else {
r5 = a0.value;
}
value = environment.__proto__;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={r5}
label={a0.label}
subLabel={a0.subLabel}
disabled={a0.disabled}
key={a0.value}
/>
);
}
function _fun100541() { // fn#100541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:4652, offset: 0x021ec06a, size: 79 bytes, params: 1, frame: 14
var value2;
if (env0_0 != null) {
value2 = environment.__proto__;
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_0);
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
}
}
function _fun100545() { // fn#100545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:5764, offset: 0x021ec756, size: 24 bytes, params: 1, frame: 3
return env0_6.value ?? env0_4;
}
function _fun100547(a0) { // fn#100547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:5921, offset: 0x021ec780, size: 38 bytes, params: 2, frame: 13
env0_8(a0);
if (onValueChange != null) {
onValueChange(a0);
}
}
function _fun100548(a0) { // fn#100548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:5968, offset: 0x021ec7a6, size: 40 bytes, params: 2, frame: 12
env0_9(false);
if (onSlidingComplete != null) {
onSlidingComplete(a0);
}
}
function _fun100549(a0) { // fn#100549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:6016, offset: 0x021ec7ce, size: 38 bytes, params: 2, frame: 13
env0_10(a0);
if (onSlidingComplete != null) {
onSlidingComplete(a0);
}
}
function _fun100550() { // fn#100550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:6065, offset: 0x021ec7f4, size: 20 bytes, params: 1, frame: 11
return env0_11(env0_4);
}
function _fun100551() { // fn#100551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:6099, offset: 0x021ec808, size: 107 bytes, params: 1, frame: 15
const binding = env0_11;
const Math = global.Math;
binding(Math.min(env0_3, env0_7 + env0_1));
const value = environment.__proto__;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
}
function _fun100552() { // fn#100552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:6207, offset: 0x021ec873, size: 107 bytes, params: 1, frame: 15
const binding = env0_11;
const Math = global.Math;
binding(Math.max(env0_2, env0_7 - env0_1));
const value = environment.__proto__;
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
}
function _fun100533() { // fn#100533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:2177, offset: 0x021eb981, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_0);
}
@@ -0,0 +1,28 @@
/* Metro module 9693; source: modules/settings/native/renderer/SettingRendererConstants.tsx; dependencies: [1357, 697, 2] */
function _fun76211(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9879:6, offset: 0x01dc66be, size: 366 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {ROUTE: 'route', PRESSABLE: 'pressable', TOGGLE: 'toggle', STATIC: 'static', RADIO: 'radio',
VOLUME_SLIDER: 'volume_slider', SLIDER: 'slider', GUILD_SELECTOR: 'guild_selector', LIST: 'list',
SEGMENTED_CONTROL: 'segmented_control'};
const Set = global.Set;
const ROUTE = object2.ROUTE;
const PRESSABLE = object2.PRESSABLE;
const STATIC = object2.STATIC;
const set = new Set([ROUTE, PRESSABLE, STATIC]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingRendererConstants.tsx');
exports.GUILD_SELECT_ALL_SERVERS_OPTION_ID = '0';
exports.NodeType = object2;
exports.ListItemType = {SECTION_HEADER: 'section_header', SECTION_FOOTER: 'section_footer',
SECTION_ROW: 'section_row', SECTION_ROW_PLACEHOLDER: 'section_row_placeholder',
SETTING_SEARCH_RESULT: 'setting_search_result'};
exports.getSettingsListItemEstimatedSize = function(a0) {
var moduleValue = require(dependencyMap[0]);
var TABLE_ROW_HEIGHT = importDefault(dependencyMap[1]).modules.mobile.TABLE_ROW_HEIGHT;
return moduleValue.resolveRefreshToken(TABLE_ROW_HEIGHT, a0);
};
exports.SUPPORTED_SEARCH_RESULT_NO_PARENT_RENDERER_TYPES = set;
}
@@ -0,0 +1,496 @@
/* Metro module 13175; source: modules/settings/native/renderer/SettingRendererUtils.tsx; dependencies: [9693, 661, 7508, 7004, 6996, 477, 1848, 13176, 44, 13177, 14147, 22, 2] */
function _fun100556(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:6, offset: 0x021ecc49, size: 285 bytes, params: 8, frame: 19
let env0_0 = require;
let closure = getSettingTitle;
const getSearchResultIconComponent = function(a0) {
var property = require(dependencyMap[9]).SETTING_RENDERER_CONFIG;
property = property[a0];
var type = property.type;
if (NodeType.RADIO === type) {
return null;
}
if (NodeType.VOLUME_SLIDER === type) {
return null;
}
if (NodeType.SLIDER === type) {
return null;
}
return property.IconComponent;
};
const isSupportedSearchResultSettingData = function(a0) {
return SUPPORTED_SEARCH_RESULT_NO_PARENT_RENDERER_TYPES.has(a0.type);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const settingRendererConstantsModule = require(9693) /* metro dependency 9693: SettingRendererConstants */;
const env0_3 = settingRendererConstantsModule.ListItemType;
const env0_4 = settingRendererConstantsModule.NodeType;
const env0_5 = settingRendererConstantsModule.SUPPORTED_SEARCH_RESULT_NO_PARENT_RENDERER_TYPES;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticsPages;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingRendererUtils.tsx');
exports.onRouteSettingOnPress = function({navigation, screen, preNavigationAction}) {
var closure = _fun100561;
var value = undefined;
if ((preNavigationAction == null ? value : preNavigationAction(closure)) !== false) {
closure();
}
return value;
};
exports.getSettingTitle = closure;
exports.getSettingSearchableTitles = getSettingSearchableTitles;
exports.getSettingScreens = getSettingScreens;
exports.toSettingListItems = function(a0, a1) {
var env0_0 = a1;
a0.sections.forEach(_fun100569);
return [];
};
exports.getSettingListSearchResultItems = getSettingListSearchResultItems;
exports.getScoredSettingListSearchResultItems = getScoredSettingListSearchResultItems;
exports.getInitialScrollIndex = function(a0, a1) {
var env0_0 = a0;
var lastIndex = a1.findLastIndex(_fun100584);
if (lastIndex !== 1) {
return global.Math.max(0, lastIndex);
}
};
}
function getSettingTitle(a0) { // fn#100557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:216, offset: 0x021ecd66, size: 100 bytes, params: 2, frame: 17
const cachedSettingTitle = (require(13176) /* metro dependency 13176: SettingHookHarness */).getCachedSettingTitle(a0);
(importDefault(44) /* metro dependency 44 */)(cachedSettingTitle != null, 'Setting ' + a0 + ' is missing a title.');
return cachedSettingTitle;
}
function onRouteSettingOnPress({navigation, screen, preNavigationAction}) { // fn#100560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:718, offset: 0x021ece45, size: 68 bytes, params: 2, frame: 13
const closure = goToScreen;
if (preNavigationAction?.(closure) !== false) {
closure();
}
}
function getSettingSearchableTitles() { // fn#100564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:1213, offset: 0x021ecfa0, size: 79 bytes, params: 1, frame: 14
const Object = global.Object;
const entries = Object.entries;
const SETTING_RENDERER_CONFIG = (require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG;
Reflect.apply(entries, Object, [SETTING_RENDERER_CONFIG]).forEach(_fun100565);
return [];
}
function getSettingScreens() { // fn#100566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:1495, offset: 0x021ed0ac, size: 109 bytes, params: 1, frame: 15
const Set = global.Set;
const set = new Set();
const Object = global.Object;
const entries = Object.entries;
const SETTING_RENDERER_CONFIG = (require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG;
Reflect.apply(entries, Object, [SETTING_RENDERER_CONFIG]).forEach(_fun100567);
return [];
}
function toSettingListItems({sections}, a1) { // fn#100568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:1732, offset: 0x021ed1ca, size: 45 bytes, params: 3, frame: 12
const env0_0 = a1;
sections.forEach(_fun100569);
return [];
}
function getSettingListSearchResultItems(a0) { // fn#100572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:2169, offset: 0x021ed347, size: 137 bytes, params: 2, frame: 14
a0.forEach(_fun100573);
let value = require(22) /* metro dependency 22 */;
value = value.sortBy([], function(a0) {
return a0.category;
});
const Set = global.Set;
const set = new Set();
value.forEach(_fun100575);
return [];
}
function getScoredSettingListSearchResultItems(a0, a1, a2) { // fn#100576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:2922, offset: 0x021ed548, size: 266 bytes, params: 4, frame: 17
var r1;
var value;
var push;
var SECTION_ROW_PLACEHOLDER;
var value3;
const items2 = [];
if (a1) {
value = 0;
if (value < a2) {
r1 = value;
reducibleLoop3: while (true) {
push = items2.push;
SECTION_ROW_PLACEHOLDER = ListItemType.SECTION_ROW_PLACEHOLDER;
Reflect.apply(push, items2, [{type: SECTION_ROW_PLACEHOLDER, start: value === r1, end: r1 === a2 - 1}]);
value3 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
if (value3 < a2) {
r1 = value3;
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
} else {
var Map = global.Map;
var map = new Map();
Map = global.Map;
map = new Map();
a0.forEach(_fun100577);
var Array = global.Array;
map = Array.from(map.entries());
map = map.sort(function(a0, [, property]) {
return property - a0[1];
});
map = map.map(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 r0 = value2 ? value : item;
if (!value2) {
item2.return();
}
return r0;
});
map.forEach(_fun100580);
}
return items2;
}
function getInitialScrollIndex(a0, a1) { // fn#100583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:4108, offset: 0x021ed90a, size: 64 bytes, params: 3, frame: 13
const env0_0 = a0;
const lastIndex = a1.findLastIndex(_fun100584);
if (lastIndex !== 1) {
return global.Math.max(0, lastIndex);
}
}
function goToScreen() { // fn#100561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:811, owner: onRouteSettingOnPress.goToScreen, offset: 0x021ece89, size: 146 bytes, params: 1, frame: 16
var environment;
var moduleValue2;
const closure = goToScreenOnPress;
const value = environment.__proto__;
const useKeyboardIsOpenModule = require(6996) /* metro dependency 6996: useKeyboardIsOpen */;
const getKeyboardIsOpen = useKeyboardIsOpenModule.getKeyboardIsOpen;
if (Reflect.apply(getKeyboardIsOpen, useKeyboardIsOpenModule, [])) {
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue2.isIOS()) {
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
global.setTimeout(function() {
goToScreenOnPress();
}, 100);
} else {
closure();
}
} else {
closure();
}
}
function _fun100565(a0) { // fn#100565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:1328, offset: 0x021ecfef, size: 189 bytes, params: 2, frame: 19
var r1;
var r2;
var r3;
var item3;
var value3;
var value4;
var cachedSettingTitle;
var binding;
var push;
var items3;
var items2;
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 r7 = value2 ? value : item;
if (value2) {
r1 = value;
r2 = item2;
r3 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = value;
r2 = item3;
r3 = value3;
} else {
r1 = item;
r2 = item3;
r3 = value3;
}
}
if (!r3) {
r2.return();
}
if (!r1.unsearchable) {
value4 = environment.__proto__;
cachedSettingTitle = (require(13176) /* metro dependency 13176: SettingHookHarness */).getCachedSettingTitle(r7);
if (cachedSettingTitle != null) {
binding = env0_0;
push = binding.push;
items3 = [r7];
items2 = [cachedSettingTitle];
arraySpread(items2,
(require(13176) /* metro dependency 13176: SettingHookHarness */).getCachedSettingSearchTerms(r7), 1,
7);
items3[1] = items2;
Reflect.apply(push, binding, [items3]);
}
}
return value;
}
function _fun100567(a0) { // fn#100567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:1607, offset: 0x021ed119, size: 177 bytes, params: 2, frame: 16
var r1;
var r2;
var r3;
var item3;
var value3;
var binding;
var has;
var screen;
var push;
var add;
const iterator = a0[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r6 = value2 ? value : item;
if (value2) {
r1 = value;
r2 = item2;
r3 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value3 = item3 === value;
if (value3) {
r1 = value;
r2 = item3;
r3 = value3;
} else {
r1 = item;
r2 = item3;
r3 = value3;
}
}
if (!r3) {
r2.return();
}
const type = r1.type;
const ROUTE = NodeType.ROUTE;
if (type === ROUTE) {
binding = env0_1;
has = binding.has;
screen = r1.screen;
if (!Reflect.apply(has, binding, [screen.route])) {
binding = env0_0;
push = binding.push;
screen = r1.screen;
Reflect.apply(push, binding, [[r6, screen]]);
binding = env0_1;
add = binding.add;
screen = r1.screen;
Reflect.apply(add, binding, [screen.route]);
}
}
return value;
}
function _fun100569(a0) { // fn#100569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:1801, offset: 0x021ed1f7, size: 161 bytes, params: 2, frame: 17
var environment;
var binding;
var push;
var value3;
const value = a0.settings.filter(_fun100570);
if (value.length !== 0) {
binding = env0_1;
push = binding.push;
value3 = environment.__proto__;
Reflect.apply(push, binding, [{type: ListItemType.SECTION_HEADER, label: a0.label}]);
value.forEach(_fun100571);
if (a0.subLabel != null) {
env0_1.push({type: ListItemType.SECTION_FOOTER, label: a0.subLabel});
}
}
}
function _fun100573(a0) { // fn#100573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:2233, offset: 0x021ed3d0, size: 182 bytes, params: 2, frame: 16
var binding;
var nearestRouteAncestorDataOrSelf;
let value = environment.__proto__;
const SETTING_RENDERER_CONFIG = (require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG;
const property = SETTING_RENDERER_CONFIG[a0];
if (property.parent != null) {
value = importDefault(14147) /* metro dependency 14147: SettingTreeManager */;
value = value.getHighestLevelAncestor(a0);
nearestRouteAncestorDataOrSelf = (importDefault(14147) /* metro dependency 14147: SettingTreeManager */).getNearestRouteAncestorDataOrSelf(a0);
binding = env0_0;
binding.push({category: value, setting: a0, data: nearestRouteAncestorDataOrSelf});
} else if (isSupportedSearchResultSettingData(property)) {
binding = env0_0;
binding.push({category: a0, setting: a0, data: property});
return undefined;
}
}
function _fun100575({category, setting, data}, a1) { // fn#100575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:2601, offset: 0x021ed490, size: 184 bytes, params: 3, frame: 21
const value = environment.__proto__;
const settingTitle = getSettingTitle(setting);
const breadcrumbs = (importDefault(14147) /* metro dependency 14147: SettingTreeManager */).getBreadcrumbs(setting);
let binding = env0_3;
const value6 = binding.has(category);
binding.add(category);
binding = env0_2;
const push = binding.push;
const object2 = {};
const SETTING_SEARCH_RESULT = ListItemType.SETTING_SEARCH_RESULT;
object2.type = SETTING_SEARCH_RESULT;
object2.settingData = data;
object2.title = settingTitle;
object2.IconComponent = value6 ? undefined : getSearchResultIconComponent(category);
object2.breadcrumbs = breadcrumbs;
object2.setting = setting;
object2.index = a1;
object2.total = env0_1.length;
Reflect.apply(push, binding, [object2]);
}
function _fun100577({setting, score}) { // fn#100577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:3124, offset: 0x021ed652, size: 266 bytes, params: 2, frame: 20
var binding;
let value = environment.__proto__;
const SETTING_RENDERER_CONFIG = (require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG;
const property = SETTING_RENDERER_CONFIG[setting];
if (property.parent != null || isSupportedSearchResultSettingData(property)) {
binding = env0_3;
env0_3 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
value = importDefault(14147) /* metro dependency 14147: SettingTreeManager */;
value = value.getHighestLevelAncestor(setting);
const r6 = value !== setting ? score : score + 0.05;
const r10 = env0_2.get(value) ?? 0;
binding = env0_2;
const set = binding.set;
const Math = global.Math;
Reflect.apply(set, binding, [value, Math.max(r10, r6)]);
const r3 = env0_1.get(value) ?? [];
r3.push({setting: setting, score: r6});
env0_1.set(value, r3);
}
function _fun100580(a0) { // fn#100580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:3526, offset: 0x021ed773, size: 71 bytes, params: 2, frame: 12
const env0_0 = a0;
let value = env0_1.get(a0);
if (value != null) {
value = value.sort(_fun100581);
value.forEach(_fun100582);
}
}
function _fun100584(a0) { // fn#100584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:4167, offset: 0x021ed94a, size: 47 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__;
const SECTION_ROW = ListItemType.SECTION_ROW;
return type === SECTION_ROW && a0.setting === env0_0;
}
function goToScreenOnPress() { // fn#100562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:816, owner: onRouteSettingOnPress.goToScreen.onPress, offset: 0x021ecf1b, size: 133 bytes, params: 1, frame: 16
const defaultImport = importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */;
const setSection = defaultImport.setSection;
const screenBinding = screen;
Reflect.apply(setSection, defaultImport, [screenBinding.route]);
const userSettingsUtilsModule = require(7004) /* metro dependency 7004: UserSettingsUtils */;
const trackUserSettingsPaneViewed = userSettingsUtilsModule.trackUserSettingsPaneViewed;
const USER_SETTINGS = AnalyticsPages.USER_SETTINGS;
Reflect.apply(trackUserSettingsPaneViewed, userSettingsUtilsModule, [{destinationPane: screenBinding.route,
source: {page: USER_SETTINGS}}]);
const navigationBinding = navigation;
navigationBinding.navigate(screenBinding.route);
}
function _fun100570(a0) { // fn#100570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:1830, offset: 0x021ed298, size: 52 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__;
value = importDefault(14147) /* metro dependency 14147: SettingTreeManager */;
return !value.isBlocked(a0, require);
}
function _fun100571(a0, a1) { // fn#100571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:1933, offset: 0x021ed2cc, size: 123 bytes, params: 3, frame: 16
const binding = env1_1;
const push = binding.push;
const object2 = {};
const SECTION_ROW = ListItemType.SECTION_ROW;
object2.type = SECTION_ROW;
object2.setting = a0;
const SETTING_RENDERER_CONFIG = (require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG;
object2.settingData = SETTING_RENDERER_CONFIG[a0];
object2.start = a1 === 0;
object2.end = a1 === env0_0.length - 1;
Reflect.apply(push, binding, [object2]);
}
function _fun100581(a0, a1) { // fn#100581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:3562, offset: 0x021ed7ba, size: 67 bytes, params: 3, frame: 6
return a0.setting === env0_0 ? -1 : a1.setting === env0_0 ? 1 : a1.score - a0.score;
}
function _fun100582({setting}, a1) { // fn#100582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13365:3629, offset: 0x021ed7fd, size: 269 bytes, params: 3, frame: 18
var r4;
var r6;
var highestLevelAncestor;
var object2;
var binding;
let value = environment.__proto__.__proto__;
const SETTING_RENDERER_CONFIG = (require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG;
const property = SETTING_RENDERER_CONFIG[setting];
if (property.parent != null) {
highestLevelAncestor = (importDefault(14147) /* metro dependency 14147: SettingTreeManager */).getHighestLevelAncestor(setting);
r4 = (importDefault(14147) /* metro dependency 14147: SettingTreeManager */).getNearestRouteAncestorDataOrSelf(setting);
r6 = highestLevelAncestor;
object2 = {};
object2.type = ListItemType.SETTING_SEARCH_RESULT;
object2.settingData = r4;
object2.title = getSettingTitle(setting);
r4 = a1 !== 0 ? undefined : getSearchResultIconComponent(r6);
object2.IconComponent = r4;
value = importDefault(14147) /* metro dependency 14147: SettingTreeManager */;
object2.breadcrumbs = value.getBreadcrumbs(setting);
object2.setting = setting;
value = environment.__proto__;
object2.index = env1_4;
object2.total = env1_3;
binding = env1_4;
env1_4 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
binding = env1_0;
binding.push(object2);
} else if (isSupportedSearchResultSettingData(property)) {
r4 = property;
r6 = setting;
object2 = {};
object2.type = ListItemType.SETTING_SEARCH_RESULT;
object2.settingData = r4;
object2.title = getSettingTitle(setting);
r4 = a1 !== 0 ? undefined : getSearchResultIconComponent(r6);
object2.IconComponent = r4;
value = importDefault(14147) /* metro dependency 14147: SettingTreeManager */;
object2.breadcrumbs = value.getBreadcrumbs(setting);
object2.setting = setting;
value = environment.__proto__;
object2.index = env1_4;
object2.total = env1_3;
binding = env1_4;
env1_4 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
binding = env1_0;
binding.push(object2);
return undefined;
}
}
@@ -0,0 +1,230 @@
/* Metro module 14156; source: modules/settings/native/renderer/SettingSegmentedControlRenderer.tsx; dependencies: [57, 31, 27, 13172, 9693, 33, 4501, 697, 14147, 13177, 44, 13175, 8853, 9221, 8861, 2] */
function _fun107121(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:6, offset: 0x022f3f3d, size: 354 bytes, params: 8, frame: 23
const env0_0 = require;
const _arrayLikeToArray_107124 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
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 userSettingSearchStore = importDefault(13172) /* metro dependency 13172: UserSettingSearchStore */;
const env0_7 = (require(9693) /* metro dependency 9693: SettingRendererConstants */).NodeType;
let value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingTop = PX_16;
const env0_11 = Reflect.apply(createStyles, value, [{controlContainer: object, pageContainer: {flex: 1}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingSegmentedControlRenderer.tsx');
exports.default = SettingSegmentedControl;
}
function _createForOfIteratorHelperLoose_107122(a0, a1) { // fn#107122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:208, offset: 0x022f409f, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun107123;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_107124(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_107124(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_107124(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun107123;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function SettingSegmentedControl({node}) { // fn#107125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:1375, offset: 0x022f4213, size: 366 bytes, params: 2, frame: 23
const env0_0 = node.defaultIndex;
const settings = node.settings;
const styles = useStyles();
const binding = env0_4;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [0]);
const binding2 = env0_3;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_2 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [_fun107126]), 2);
const property2 = value4[0];
value4[1];
const value5 = binding.useCallback(_fun107127, []);
const value7 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({items: binding.useMemo(function() {
settings.forEach(_fun107129);
return [];
}, [settings]), pageWidth: property, defaultIndex: property2});
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
const view = <View style={styles.controlContainer} onLayout={value5}><SegmentedControl state={value7} /></View>;
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
return (
<>
{view}
<View style={styles.pageContainer}>
<SegmentedControlPages state={value7} />
</View>
</>
);
}
function _fun107126() { // fn#107126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:1511, offset: 0x022f4381, size: 170 bytes, params: 1, frame: 17
var value6;
var value7;
var value8;
let value = environment.__proto__;
const field = UserSettingSearchStore.getField('selected');
if (field == null) {
return defaultIndex;
}
let settingsBinding = settings;
let indexOf = settingsBinding.indexOf;
const value4 = Reflect.apply(indexOf, settingsBinding, [field]);
if (value4 !== -1) {
return value4;
}
const _createForOfIteratorHelperLoose_107122Binding = _createForOfIteratorHelperLoose_107122;
const getAncestors = (importDefault(14147) /* metro dependency 14147: SettingTreeManager */).getAncestors;
value = _createForOfIteratorHelperLoose_107122Binding(Reflect.apply(getAncestors, value, [field]));
const value5 = value();
let done = value5.done;
if (done) {
value = environment;
return defaultIndex;
}
let r3 = value5;
loopExit3: while (true) {
value6 = r3.value;
settingsBinding = settings;
indexOf = settingsBinding.indexOf;
value7 = Reflect.apply(indexOf, settingsBinding, [value6]);
if (value7 !== -1) {
break loopExit3;
}
value8 = value();
done = value8.done;
if (done) {
value = environment;
return defaultIndex;
}
r3 = value8;
continue;
}
return value7;
}
function _fun107128() { // fn#107128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:1842, offset: 0x022f442b, size: 36 bytes, params: 1, frame: 12
settings.forEach(_fun107129);
return [];
}
function _fun107129(a0) { // fn#107129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:1874, offset: 0x022f444f, size: 188 bytes, params: 2, frame: 20
const SETTING_RENDERER_CONFIG = (require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG;
const property = SETTING_RENDERER_CONFIG[a0];
const defaultImport = importDefault(44) /* metro dependency 44 */;
const type = property.type;
const ROUTE = NodeType.ROUTE;
defaultImport(type === ROUTE, 'Invalid setting type for segmented control: ' + a0);
const component = property.screen.getComponent();
const binding = env0_0;
const push = binding.push;
const object2 = {};
object2.label = (require(13175) /* metro dependency 13175: SettingRendererUtils */).getSettingTitle(a0);
object2.id = a0;
object2.page = ((Component) => <Component />)(component);
Reflect.apply(push, binding, [object2]);
}
@@ -0,0 +1,81 @@
/* Metro module 15825; source: modules/settings/native/renderer/SettingTreeCacheLifecycleManager.tsx; dependencies: [7, 6, 15, 17, 18, 14147, 4860, 2] */
function _fun121627(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16033:6, offset: 0x0254c730, size: 226 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun121631(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingTreeCacheLifecycleManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121628() { // fn#121628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16033:148, offset: 0x0254c812, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_121628_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121631(a0) { // fn#121631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16033:351, offset: 0x0254c874, size: 42 bytes, params: 2, frame: 14
const closure = SettingTreeManagerLifecycleManager;
env0_6(closure, a0);
return env0_2(closure);
}
function SettingTreeManagerLifecycleManager(a0) { // fn#121632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16033:363, offset: 0x0254c89e, size: 165 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, SettingTreeManagerLifecycleManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(SettingTreeManagerLifecycleManager);
binding = env1_4;
if (_isNativeReflectConstruct_121628()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_121633};
value.handleConnectionOpen = handleConnectionOpen_121634;
return value;
}
function SettingTreeManagerLifecycleManagerHandleConnectionOpen() { // fn#121634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16033:736, owner: SettingTreeManagerLifecycleManager.handleConnectionOpen, offset: 0x0254c943, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
(importDefault(14147) /* metro dependency 14147: SettingTreeManager */).clearCaches();
}
@@ -0,0 +1,289 @@
/* Metro module 14147; source: modules/settings/native/renderer/SettingTreeManager.tsx; dependencies: [6, 7, 9693, 13177, 13176, 2] */
function _fun107043(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:6, offset: 0x022f1abb, size: 213 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_107046 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = (require(9693) /* metro dependency 9693: SettingRendererConstants */).NodeType;
const env0_5 = _fun107047();
let value = _fun107052();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingTreeManager.tsx');
exports.default = value;
}
function _createForOfIteratorHelperLoose_107044(a0, a1) { // fn#107044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:140, offset: 0x022f1b90, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun107045;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_107046(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_107046(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_107046(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun107045;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function _fun107047() { // fn#107047, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:1056, offset: 0x022f1d04, size: 109 bytes, params: 1, frame: 15
return env0_3(SettingTreeManagerCache, [{key: 'get', value: function(a0) {
return this.cache[a0];
}}, {key: 'set', value: function(a0, a1) {
this.cache[a0] = a1;
}}, {key: 'clear', value: function() {
this.cache = {};
}}]);
}
function _fun107052() { // fn#107052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:1319, offset: 0x022f1da3, size: 234 bytes, params: 1, frame: 15
return env0_3(SettingTreeManager, [{key: 'transformParent', value: function(a0) {
var r1;
var r0;
var value = a0;
var value2 = null;
if (value2 == value) {
r0 = value2;
} else {
if (typeof value === 'string') {
r1 = value;
} else {
value = value();
r1 = value;
}
r0 = r1;
}
return r0;
}}, {key: 'validate', value: function() {
}}, {key: 'getAncestors', value: function(a0) {
var r1;
var value3;
var items = [];
var SETTING_RENDERER_CONFIG = require(dependencyMap[3]).SETTING_RENDERER_CONFIG;
var value2 = this.transformParent(SETTING_RENDERER_CONFIG[a0].parent);
if (value2 != null) {
for (r1 = value2; true; r1 = value3) {
items.push(r1);
value3 = this.transformParent(require(dependencyMap[3]).SETTING_RENDERER_CONFIG[r1].parent);
if (value3 == null) {
break;
}
}
}
return items;
}}, {key: 'isBlocked', value: function(a0, a1) {
var env0_0 = a1;
var value = this.getAncestors(a0);
value.push(a0);
return value.some(_fun107058);
}}, {key: 'getHighestLevelAncestor', value: function(a0) {
var value = a0;
var value2 = this.highestAncestorCache.get(value);
if (value2 != null) {
return value2;
}
var value3 = this.getAncestors(value);
var r1 = value3[value3.length - 1] ?? value;
this.highestAncestorCache.set(value, r1);
return r1;
}}, {key: 'getNearestRouteAncestorDataOrSelf', value: value_107060}, {key: 'getBreadcrumbs', value: value_107061},
{key: 'clearCaches', value: function() {
this.breadcrumbCache.clear();
this.highestAncestorCache.clear();
}}]);
}
function SettingTreeManagerCache() { // fn#107048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:1077, offset: 0x022f1d71, size: 35 bytes, params: 1, frame: 13
env1_2(this, SettingTreeManagerCache);
this.cache = {};
}
function SettingTreeManager() { // fn#107053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:1340, offset: 0x022f1e8d, size: 83 bytes, params: 1, frame: 14
const value = environment.__proto__;
let binding = env1_2;
binding(this, SettingTreeManager);
binding = env1_5;
this.highestAncestorCache = new binding();
this.breadcrumbCache = new binding();
}
function value_107057(a0, a1) { // fn#107057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:1821, offset: 0x022f1f83, size: 56 bytes, params: 3, frame: 12
const env0_0 = a1;
const ancestors = this.getAncestors(a0);
ancestors.push(a0);
return ancestors.some(function(a0) {
return require.has(a0);
});
}
function value_107060(a0) { // fn#107060, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:2163, offset: 0x022f2011, size: 222 bytes, params: 2, frame: 18
var value4;
var value5;
var Error;
var concat;
const value = environment.__proto__;
const SETTING_RENDERER_CONFIG = (require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG;
let property = SETTING_RENDERER_CONFIG[a0];
let type = property.type;
let ROUTE = NodeType.ROUTE;
if (type !== ROUTE) {
var _createForOfIteratorHelperLoose_107044Binding = _createForOfIteratorHelperLoose_107044;
var getAncestors = this.getAncestors;
var value2 = _createForOfIteratorHelperLoose_107044Binding(Reflect.apply(getAncestors, this, [a0]));
var value3 = value2();
var done = value3.done;
if (done) {
throw new global.Error('[SettingTree] No route ancestor found for setting: ' + a0);
}
var r3 = value3;
loopExit2: while (true) {
value4 = r3.value;
property = SETTING_RENDERER_CONFIG[value4];
type = property.type;
ROUTE = NodeType.ROUTE;
if (type === ROUTE) {
break loopExit2;
}
value5 = value2();
done = value5.done;
if (done) {
Error = global.Error;
concat = global.HermesInternal.concat;
throw new Error('[SettingTree] No route ancestor found for setting: ' + a0);
}
r3 = value5;
continue;
}
}
return property;
}
function value_107061(a0) { // fn#107061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:2514, offset: 0x022f20ef, size: 168 bytes, params: 2, frame: 22
var r4;
var value5;
var moduleValue;
var cachedSettingTitle;
var value7;
let breadcrumbCache = this.breadcrumbCache;
let value = breadcrumbCache.get(a0);
if (value != null) {
return value;
}
const items2 = [];
value = environment.__proto__;
const value3 = _createForOfIteratorHelperLoose_107044(this.getAncestors(a0));
const value4 = value3();
let done = value4.done;
if (!done) {
r4 = value4;
while (true) {
value5 = r4.value;
moduleValue = require(13176) /* metro dependency 13176: SettingHookHarness */;
cachedSettingTitle = moduleValue.getCachedSettingTitle(value5);
if (cachedSettingTitle != null) {
items2.push(cachedSettingTitle);
}
value7 = value3();
done = value7.done;
if (done) {
break;
}
r4 = value7;
continue;
}
}
breadcrumbCache = this.breadcrumbCache;
breadcrumbCache.set(a0, items2.reverse());
return items2;
}
@@ -0,0 +1,79 @@
/* Metro module 14150; source: modules/settings/native/renderer/hooks/useAutoScrollToSetting.tsx; dependencies: [31, 13172, 9693, 13177, 13175, 1484, 2] */
function _fun107072(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14347:6, offset: 0x022f273b, size: 155 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const userSettingSearchStore = importDefault(13172) /* metro dependency 13172: UserSettingSearchStore */;
const env0_4 = (require(9693) /* metro dependency 9693: SettingRendererConstants */).NodeType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/hooks/useAutoScrollToSetting.tsx');
exports.useAutoScrollToSearchResultSetting = useAutoScrollToSearchResultSetting;
}
function useAutoScrollToSearchResultSetting(a0, a1, a2) { // fn#107073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14347:271, offset: 0x022f27d6, size: 273 bytes, params: 4, frame: 21
var r8;
var initialScrollIndex;
const env0_0 = a0;
const env0_1 = a1;
const value2 = UserSettingSearchStore.useField('selected');
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const env0_2 = value3;
const r5 = value2 ?? env0_2.useRef(a2).current;
const value5 = false;
if (r5 == null) {
r8 = value5;
} else if ((require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG[r5].type === NodeType.ROUTE) {
r8 = value5;
} else {
initialScrollIndex = (require(13175) /* metro dependency 13175: SettingRendererUtils */).getInitialScrollIndex(r5,
a1);
r8 = initialScrollIndex !== 0 && initialScrollIndex !== 1;
}
env0_2.useEffect(_fun107074, [a1, r8, a0, value3, r5]);
}
function _fun107074() { // fn#107074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14347:614, offset: 0x022f28e7, size: 45 bytes, params: 1, frame: 14
const env0_0 = env0_2.addListener('transitionEnd', _fun107075);
return _fun107076;
}
function _fun107075() { // fn#107075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14347:656, offset: 0x022f2914, size: 140 bytes, params: 1, frame: 16
var r2;
var r4;
var value2;
var value3;
var moduleValue;
var value4;
var value5;
var current;
if (env1_5) {
value2 = environment.__proto__.__proto__;
value3 = undefined;
moduleValue = require(13175) /* metro dependency 13175: SettingRendererUtils */;
value4 = moduleValue.getInitialScrollIndex(env1_4, require);
if (value4 == null) {
return value3;
}
value5 = env1_0 == null;
if (value5) {
r2 = value5;
r4 = value3;
} else {
current = env1_0.current;
r2 = current == null;
r4 = current;
}
if (!r2) {
r4.scrollToIndex({'index': null, 'animated': false, 'viewOffset': 300, index: value4});
}
}
env1_3.current = undefined;
}
function _fun107076() { // fn#107076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14347:838, offset: 0x022f29a0, size: 55 bytes, params: 1, frame: 13
env0_0();
UserSettingSearchStore.setState({selected: null});
env1_3.current = undefined;
}
@@ -0,0 +1,21 @@
/* Metro module 14148; source: modules/settings/native/renderer/hooks/useHighlightSettingItem.tsx; dependencies: [13172, 2] */
function _fun107063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14345:6, offset: 0x022f21be, size: 106 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userSettingSearchStore = importDefault(13172) /* metro dependency 13172: UserSettingSearchStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/hooks/useHighlightSettingItem.tsx');
exports.useHighlightSettingItem = function(a0) {
var env0_0 = a0;
return UserSettingSearchStore.useState(_fun107065);
};
}
function useHighlightSettingItem(a0) { // fn#107064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14345:232, offset: 0x022f2228, size: 35 bytes, params: 2, frame: 11
const env0_0 = a0;
return UserSettingSearchStore.useState(_fun107065);
}
function _fun107065({selected}) { // fn#107065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14345:287, offset: 0x022f224b, size: 22 bytes, params: 2, frame: 2
return selected === env0_0;
}
@@ -0,0 +1,12 @@
/* Metro module 13173; source: modules/settings/native/renderer/stores/SettingBlocklistStore.tsx; dependencies: [4024, 2] */
function _fun100511(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13363:6, offset: 0x021ea914, size: 110 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const zustandStore = (require(4024) /* metro dependency 4024: ZustandStore */).createZustandStore(function() {
var Set = global.Set;
return {blocklist: new Set()};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/stores/SettingBlocklistStore.tsx');
exports.default = zustandStore;
}
@@ -0,0 +1,54 @@
/* Metro module 14155; source: modules/settings/native/search/SettingSearchBar.tsx; dependencies: [31, 27, 13172, 33, 4501, 697, 1848, 7006, 6984, 2] */
function _fun107115(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14352:6, offset: 0x022f3c97, size: 243 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const userSettingSearchStore = importDefault(13172) /* metro dependency 13172: UserSettingSearchStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const SETTINGS_PADDING_TOP = (importDefault(697) /* metro dependency 697: native */).modules.mobile.SETTINGS_PADDING_TOP;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{container: {marginTop: SETTINGS_PADDING_TOP}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/search/SettingSearchBar.tsx');
exports.default = SettingSearchBar;
}
function SettingSearchBar() { // fn#107116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14352:332, offset: 0x022f3d8a, size: 240 bytes, params: 1, frame: 22
const styles = useStyles();
const binding = env0_2;
const value2 = binding.useRef(null);
const value3 = binding.useCallback(_fun107117, []);
const value4 = binding.useCallback(function() {
require(dependencyMap[7]).trackSettingSearchInputFocused();
UserSettingSearchStore.setState({'isActive': true, 'isFocused': true});
}, []);
const value5 = binding.useCallback(function() {
UserSettingSearchStore.setState({isFocused: false});
}, []);
const value6 = binding.useCallback(function(a0) {
UserSettingSearchStore.setState({query: a0});
}, []);
const SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
return (
<View style={styles.container}>
<SearchField
ref={value2}
size="md"
onFocus={value4}
onBlur={value5}
onClear={value3}
defaultValue={UserSettingSearchStore.getField('query')}
onChange={value6}
/>
</View>
);
}
function _fun107117() { // fn#107117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14352:404, offset: 0x022f3e7a, size: 66 bytes, params: 1, frame: 12
const value = environment.__proto__;
UserSettingSearchStore.setState({'isActive': false, 'query': '', 'isFocused': false});
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
}
@@ -0,0 +1,48 @@
/* Metro module 14154; source: modules/settings/native/search/components/SettingsSearchEmptyState.tsx; dependencies: [31, 27, 33, 4501, 3869, 1244, 9105, 4572, 4573, 2] */
function _fun107112(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14351:6, offset: 0x022f39e2, size: 235 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'paddingTop': 24,
'justifyContent': 'center', 'alignItems': 'center'}, textContainer: {marginTop: 24}});
value = value.memo(SettingsSearchEmptyState);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/search/components/SettingsSearchEmptyState.tsx');
exports.default = value;
}
function SettingsSearchEmptyState() { // fn#107113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14351:287, offset: 0x022f3acd, size: 360 bytes, params: 1, frame: 26
const styles = useStyles();
env0_2.useEffect(_fun107114, []);
const NoResultsAlt = (require(9105) /* metro dependency 9105: NoResultsAlt */).NoResultsAlt;
const items2 = [<NoResultsAlt resizeMode="contain" />];
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const text = <Text variant="text-md/semibold" color="mobile-text-heading-primary">{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.zihbmv])}</Text>;
string = intl.string;
const XclvsB = (require(1244) /* metro dependency 1244: indexNative */).t.XclvsB;
items2[1] = <Stack style={styles.textContainer} align="center" justify="center">{text}<Text variant="text-xs/medium" color="text-muted">{Reflect.apply(string,
intl, [XclvsB])}</Text></Stack>;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun107114() { // fn#107114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14351:353, offset: 0x022f3c35, size: 98 bytes, params: 1, frame: 17
const value = environment.__proto__;
const AccessibilityAnnouncer = (require(3869) /* metro dependency 3869: AccessibilityAnnouncerAndroid */).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zihbmv), 'polite']);
}
@@ -0,0 +1,108 @@
/* Metro module 14151; source: modules/settings/native/search/hooks/useSettingSearchResults.tsx; dependencies: [57, 31, 13172, 13173, 14147, 13177, 14152, 13175, 6949, 2] */
function _fun107077(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14348:6, offset: 0x022f29d7, size: 177 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const userSettingSearchStore = importDefault(13172) /* metro dependency 13172: UserSettingSearchStore */;
const settingBlocklistStore = importDefault(13173) /* metro dependency 13173: SettingBlocklistStore */;
const env0_7 = [];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/search/hooks/useSettingSearchResults.tsx');
exports.useSettingSearchResults = useSettingSearchResults;
}
function useSettingSearchResults() { // fn#107078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14348:267, offset: 0x022f2a88, size: 217 bytes, params: 1, frame: 21
const binding = env0_4;
const value2 = binding.useMemo(_fun107079, []);
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [env0_7]);
const binding2 = env0_3;
let value = binding2(value3, 2);
const property = value[0];
const env0_1 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value[0];
const env0_2 = value[1];
useState = binding.useState;
value = binding2(Reflect.apply(useState, binding, [10]), 2);
const property3 = value[0];
var env0_3 = value[1];
binding.useEffect(function() {
var env0_0 = UserSettingSearchStore.subscribe(_fun107084, _fun107085, {equalityFn: _fun107086});
return _fun107087;
}, [binding.useMemo(_fun107080, [value2])]);
return {settings: property, isLoading: property2, placeholderCount: property3};
}
function _fun107079() { // fn#107079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14348:319, offset: 0x022f2b61, size: 73 bytes, params: 1, frame: 13
let value = environment.__proto__;
const defaultImport = importDefault(14152) /* metro dependency 14152: UserSettingSearchManager */;
value = require(13175) /* metro dependency 13175: SettingRendererUtils */;
value = value.getSettingSearchableTitles();
const value2 = Object.create(defaultImport.prototype, {constructor: {value: defaultImport}});
value = new defaultImport(value);
return value instanceof Object ? value : value2;
}
function _fun107080() { // fn#107080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14348:511, offset: 0x022f2baa, size: 48 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return (importDefault(6949) /* metro dependency 6949 */)(_fun107081, 350);
}
function _fun107083() { // fn#107083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14348:824, offset: 0x022f2cd2, size: 63 bytes, params: 1, frame: 16
const env0_0 = UserSettingSearchStore.subscribe(function({query}) {
return query.trim();
}, _fun107085, {equalityFn: function(a0, a1) {
return a0 === a1;
}});
return _fun107087;
}
function _fun107081(a0) { // fn#107081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14348:524, offset: 0x022f2bda, size: 148 bytes, params: 2, frame: 17
const env0_0 = SettingBlocklistStore.getField('blocklist');
const value3 = env1_0.getScoredSearchResults(a0).filter(_fun107082);
env1_1(value3);
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
env1_3(Reflect.apply(max, Math, [Math2.min(value3.length, 10), 5]));
env1_2(false);
}
function _fun107085(a0) { // fn#107085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14348:868, offset: 0x022f2d26, size: 104 bytes, params: 2, frame: 13
var value;
var binding;
var value2;
if (a0 === '') {
value = environment.__proto__;
if (env1_4.cancel != null) {
env1_4.cancel();
}
binding = env1_1;
value2 = environment.__proto__.__proto__;
binding(env2_7);
env1_2(false);
} else {
value = environment.__proto__;
env1_2(true);
env1_4(a0);
}
}
function _fun107087() { // fn#107087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14348:967, offset: 0x022f2d8e, size: 48 bytes, params: 1, frame: 11
env0_0();
if (env1_4.cancel != null) {
env1_4.cancel();
}
}
function _fun107082({setting}) { // fn#107082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14348:596, offset: 0x022f2c6e, size: 100 bytes, params: 2, frame: 15
const binding = env0_0;
const value = environment.__proto__.__proto__.__proto__;
return !(importDefault(14147) /* metro dependency 14147: SettingTreeManager */).isBlocked(setting,
binding) && !(require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG[setting].unsearchable;
}
@@ -0,0 +1,65 @@
/* Metro module 7005; source: modules/settings/tracking/SettingSearchSessionAnalyticsManager.tsx; dependencies: [6, 7, 491, 7006, 2] */
function _fun55462(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7183:6, offset: 0x013a7dc1, size: 152 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
let value = _fun55463();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/tracking/SettingSearchSessionAnalyticsManager.tsx');
exports.default = value;
}
function _fun55463() { // fn#55463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7183:122, offset: 0x013a7e59, size: 151 bytes, params: 1, frame: 15
return env0_3(SettingSearchSessionAnalyticsManager, [{key: 'getSearchSessionId', value: function() {
return this.searchSessionId;
}}, {key: 'isSessionActive', value: function() {
return this.searchSessionId != null;
}}, {key: 'initialize', value: value_55467}, {key: 'maybeTrackQueryEntered', value: value_55468}, {key: 'terminate',
value: value_55469}]);
}
function SettingSearchSessionAnalyticsManager() { // fn#55464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7183:143, offset: 0x013a7ef0, size: 49 bytes, params: 1, frame: 13
env1_2(this, SettingSearchSessionAnalyticsManager);
this.searchSessionId = null;
this.searchSessionStartTime = null;
this.isQueryEnteredTracked = false;
}
function value_55467() { // fn#55467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7183:501, offset: 0x013a7f3d, size: 77 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(491) /* metro dependency 491 */;
this.searchSessionId = value.v4();
const Date = global.Date;
this.searchSessionStartTime = Date.now();
this.isQueryEnteredTracked = false;
}
function value_55468() { // fn#55468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7183:653, offset: 0x013a7f8a, size: 59 bytes, params: 1, frame: 12
var value;
if (!this.isQueryEnteredTracked) {
value = environment.__proto__;
value = require(7006) /* metro dependency 7006: Tracking */;
value.trackSettingSearchQueryEntered();
this.isQueryEnteredTracked = true;
}
}
function value_55469() { // fn#55469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7183:790, offset: 0x013a7fc5, size: 125 bytes, params: 1, frame: 15
var trackSettingSearchClosed;
var object2;
let value = this.searchSessionId != null;
if (value && this.searchSessionStartTime != null) {
value = environment.__proto__;
value = require(7006) /* metro dependency 7006: Tracking */;
trackSettingSearchClosed = value.trackSettingSearchClosed;
object2 = {};
object2.searchSessionDuration = global.Date.now() - this.searchSessionStartTime;
Reflect.apply(trackSettingSearchClosed, value, [object2]);
this.searchSessionId = null;
this.searchSessionStartTime = null;
this.isQueryEnteredTracked = false;
}
}
@@ -0,0 +1,47 @@
/* Metro module 7006; source: modules/settings/tracking/Tracking.tsx; dependencies: [661, 683, 7005, 2] */
function _fun55470(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7184:6, offset: 0x013a8042, size: 151 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/tracking/Tracking.tsx');
exports.trackSettingSearchInputFocused = function() {
importDefault(dependencyMap[1]).track(AnalyticEvents.USER_SETTINGS_SEARCH_PRESS);
};
exports.trackSettingSearchResultPress = trackSettingSearchResultPress;
exports.trackSettingSearchQueryEntered = trackSettingSearchQueryEntered;
exports.trackSettingSearchClosed = trackSettingSearchClosed;
}
function trackSettingSearchResultPress({setting, title, route, searchResultPosition, numSearchResults}) { // fn#55472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7184:345, offset: 0x013a8108, size: 137 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const USER_SETTINGS_SEARCH_RESULT_PRESS = AnalyticEvents.USER_SETTINGS_SEARCH_RESULT_PRESS;
const object2 = {};
object2.setting = setting;
object2.title = title;
object2.route = route;
object2.search_result_position = searchResultPosition;
object2.num_search_results = numSearchResults;
object2.search_session_id = (importDefault(7005) /* metro dependency 7005: SettingSearchSessionAnalyticsManager */).getSearchSessionId();
Reflect.apply(track, defaultImport, [USER_SETTINGS_SEARCH_RESULT_PRESS, object2]);
}
function trackSettingSearchQueryEntered() { // fn#55473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7184:651, offset: 0x013a8191, size: 77 bytes, params: 1, frame: 17
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const USER_SETTINGS_SEARCH_QUERY_ENTERED = AnalyticEvents.USER_SETTINGS_SEARCH_QUERY_ENTERED;
const object2 = {};
object2.search_session_id = (importDefault(7005) /* metro dependency 7005: SettingSearchSessionAnalyticsManager */).getSearchSessionId();
Reflect.apply(track, defaultImport, [USER_SETTINGS_SEARCH_QUERY_ENTERED, object2]);
}
function trackSettingSearchClosed({searchSessionDuration}) { // fn#55474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7184:822, offset: 0x013a81de, size: 91 bytes, params: 2, frame: 18
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const USER_SETTINGS_SEARCH_CLOSED = AnalyticEvents.USER_SETTINGS_SEARCH_CLOSED;
const object2 = {};
object2.search_session_id = (importDefault(7005) /* metro dependency 7005: SettingSearchSessionAnalyticsManager */).getSearchSessionId();
object2.search_session_duration_ms = searchSessionDuration;
Reflect.apply(track, defaultImport, [USER_SETTINGS_SEARCH_CLOSED, object2]);
}