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

No files matched your search

@@ -1,9 +1,11 @@
/* Metro module 9692; source: modules/settings/native/renderer/SettingBuilders.tsx; dependencies: [9693, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SettingRendererConstantsModule from './SettingRendererConstants.tsx'; /* Metro dependency 9693 */
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');
(FileImportTrackerModule).fileFinishedImporting('modules/settings/native/renderer/SettingBuilders.tsx');
exports.createToggle = function(a0) {
var object = {};
var TOGGLE = NodeType.TOGGLE;
@@ -76,3 +78,4 @@ function _fun76200(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun76200, 9692, [9693, 2]) /* metro module 9692, dependencies: [9693, 2] */;
@@ -1,191 +1,208 @@
/* Metro module 13176; source: modules/settings/native/renderer/SettingHookHarness.tsx; dependencies: [57, 31, 13173, 9693, 13177, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import SettingBlocklistStore from './stores/SettingBlocklistStore.tsx'; /* Metro dependency 13173 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as SettingRendererConstantsModule from './SettingRendererConstants.tsx'; /* Metro dependency 9693 */
import * as SettingsRendererConfigModule from '../../../user_settings/core/native/SettingsRendererConfig.tsx'; /* Metro dependency 13177 */
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;
let value = ReactModule;
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');
(FileImportTrackerModule).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;
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 = (SettingsRendererConfigModule).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 = Module00057(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;
}
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;
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;
}
r3 = field.has(property);
push = items3.push;
Reflect.apply(push, items3, [property]);
break reducibleJoin10;
}
value9 = !value8;
if (value8) {
r3 = value9;
break reducibleJoin8;
}
push = items3.push;
Reflect.apply(push, items3, [property]);
break reducibleJoin10;
}
value9 = !value8;
if (value8) {
r3 = value9;
has = field.has;
value10 = Reflect.apply(has, field, [property]);
r3 = value10;
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]);
if (r3) {
push = items2.push;
Reflect.apply(push, items2, [property]);
break reducibleJoin10;
}
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;
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;
}
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;
binding = env0_8;
set = binding.set;
reducibleJoin15: while (true) {
if (r3 != null) {
r15 = r3;
break reducibleJoin15;
}
binding2 = env0_6;
r15 = binding2;
break reducibleJoin15;
}
binding2 = env0_6;
r15 = binding2;
break reducibleJoin15;
Reflect.apply(set, binding, [property, r15]);
break reducibleJoin16;
}
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;
}
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 _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 settingBlocklistStoreBinding;
var value3;
var set;
var binding;
if (set2.length > 0) {
value2 = environment.__proto__;
settingBlocklistStoreBinding = SettingBlocklistStore;
value3 = settingBlocklistStoreBinding.getField('blocklist');
set = new global.Set();
var set2 = set;
binding = set2;
binding.forEach(_fun100588);
binding = env0_1;
binding.forEach(_fun100589);
settingBlocklistStoreBinding.setState({blocklist: set});
} else if (env0_1.length > 0) {
value2 = environment.__proto__;
settingBlocklistStoreBinding = SettingBlocklistStore;
value3 = settingBlocklistStoreBinding.getField('blocklist');
set = new global.Set();
var set2 = set;
binding = set2;
binding.forEach(_fun100588);
binding = env0_1;
binding.forEach(_fun100589);
settingBlocklistStoreBinding.setState({blocklist: set});
}
function _fun100588(a0) { // fn#100588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13366:700, offset: 0x00c37e1f, size: 22 bytes, params: 2, frame: 11
return env0_0.add(a0);
}
function _fun100589(a0) { // fn#100589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13366:725, offset: 0x00ef2891, size: 22 bytes, params: 2, frame: 11
return env0_0.delete(a0);
}
}
}
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});
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;
}
}
global.__d(_fun100585, 13176, [57, 31, 13173, 9693, 13177,
2]) /* metro module 13176, dependencies: [57, 31, 13173, 9693, 13177, 2] */;
@@ -1,26 +1,31 @@
/* Metro module 13170; source: modules/settings/native/renderer/SettingLayout.tsx; dependencies: [31, 9693, 33, 13171, 14156, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as SettingRendererConstantsModule from './SettingRendererConstants.tsx'; /* Metro dependency 9693 */
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;
let value = ReactModule;
value = value.memo(SettingLayout);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingLayout.tsx');
(FileImportTrackerModule).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 */);
}
}
}
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 */);
}
}
global.__d(_fun100492, 13170, [31, 9693, 33, 13171, 14156,
2]) /* metro module 13170, dependencies: [31, 9693, 33, 13171, 14156, 2] */;
@@ -1,99 +1,101 @@
/* Metro module 14149; source: modules/settings/native/renderer/SettingListItemHighlight.tsx; dependencies: [31, 27, 13172, 33, 4501, 697, 4017, 4504, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UserSettingSearchStore from '../../../user_settings/UserSettingSearchStore.tsx'; /* Metro dependency 13172 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
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,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const INTERACTIVE_TEXT_HOVER = (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');
(FileImportTrackerModule).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
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 useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = __107070;
object = {withSequence: ReanimatedRexportModule.withSequence, withDelay: ReanimatedRexportModule.withDelay,
withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming};
const Easing = ReanimatedRexportModule.Easing;
object.Easing = Easing;
object.runOnJS = ReanimatedRexportModule.runOnJS;
object.clearSelectedSearchResult = value3;
closure.__closure = object;
closure.__workletHash = 13630242918990;
closure.__initData = env0_8;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const View = (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 object = {};
const startBinding = start;
const value2 = undefined;
object.borderTopStartRadius = startBinding ? (importDefault(697) /* metro dependency 697: native */).radii.lg : value2;
object.borderTopEndRadius = start ? (importDefault(697) /* metro dependency 697: native */).radii.lg : value2;
object.borderBottomStartRadius = end ? (importDefault(697) /* metro dependency 697: native */).radii.lg : value2;
object.borderBottomEndRadius = end ? (importDefault(697) /* metro dependency 697: native */).radii.lg : value2;
return object;
}
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 __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 withSequence = ReanimatedRexportModule.withSequence;
const withDelay = ReanimatedRexportModule.withDelay;
let withTiming = TimingModule.withTiming;
const value3 = Reflect.apply(withDelay, ReanimatedRexportModule, [500, Reflect.apply(withTiming, TimingModule, [0,
{duration: 0}])]);
withTiming = TimingModule.withTiming;
const Easing = ReanimatedRexportModule.Easing;
const value4 = Reflect.apply(withTiming, TimingModule, [0.2, {duration: 300, easing: Easing.ease}]);
withTiming = TimingModule.withTiming;
const object3 = {duration: 300};
object3.easing = Easing.ease;
const __107070T2 = __107070T;
const object4 = {};
object4.runOnJS = ReanimatedRexportModule.runOnJS;
object4.clearSelectedSearchResult = env0_2;
__107070T2.__closure = object4;
__107070T2.__workletHash = 13391094209244;
__107070T2.__initData = env1_9;
return {opacity: Reflect.apply(withSequence, ReanimatedRexportModule, [value3, value4, Reflect.apply(withTiming,
TimingModule, [0, object3, 'respect-motion-settings', __107070T2])])};
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]);
}
}
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]);
}
}
global.__d(_fun107066, 14149, [31, 27, 13172, 33, 4501, 697, 4017, 4504,
2]) /* metro module 14149, dependencies: [31, 27, 13172, 33, 4501, 697, 4017, 4504, 2] */;
@@ -1,237 +1,258 @@
/* 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] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import MobileVisualRefreshExperiment from '../../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserSettingSearchStore from '../../../user_settings/UserSettingSearchStore.tsx'; /* Metro dependency 13172 */
import SettingBlocklistStore from './stores/SettingBlocklistStore.tsx'; /* Metro dependency 13173 */
import SettingSearchBar from '../search/SettingSearchBar.tsx'; /* Metro dependency 14155 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as KeyboardManagerUtilsModule from '../../../../utils/native/KeyboardManagerUtils.tsx'; /* Metro dependency 1848 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as FlashListModule from '../../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as SettingRendererConstantsModule from './SettingRendererConstants.tsx'; /* Metro dependency 9693 */
import * as SettingRendererUtilsModule from './SettingRendererUtils.tsx'; /* Metro dependency 13175 */
import * as UseAutoScrollToSettingModule from './hooks/useAutoScrollToSetting.tsx'; /* Metro dependency 14150 */
import * as UseSettingSearchResultsModule from '../search/hooks/useSettingSearchResults.tsx'; /* Metro dependency 14151 */
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,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const MOBILE_ACTIONSHEET_BACKGROUND = (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');
(FileImportTrackerModule).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 = (UseSafeAreaInsetsNative)().bottom;
const value2 = (MobileVisualRefreshExperiment)('SettingsList');
const value3 = SettingBlocklistStore.useField('blocklist');
const binding = env0_3;
const value4 = binding.useMemo(_fun100501, [value3, node]);
const value5 = binding.useRef(null);
(UseAutoScrollToSettingModule).useAutoScrollToSearchResultSetting(value5,
value4, node.scrollTarget);
const FlashList = (FlashListModule).FlashList;
const object2 = {ref: value5};
const ListHeaderComponent = node.ListHeaderComponent;
object2.ListHeaderComponent = ListHeaderComponent;
object2.estimatedItemSize = getSettingsListItemEstimatedSize(value2);
const object3 = {};
copyDataProperties(object3, styles.contentContainer, undefined);
const PX_16 = (Native).space.PX_16;
object3['paddingBottom'] = bottom + PX_16;
object2.contentContainerStyle = object3;
object2.scrollIndicatorInsets = {right: 0.01};
object2.keyExtractor = keyExtractor_100499;
object2.renderItem = renderItem_100498;
object2.data = value4;
object2.getItemType = getItemType;
return (
<View style={styles.container}>
<FlashList {...object2} />
</View>
);
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 _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 = (UseSafeAreaInsetsNative)().bottom;
const value2 = (MobileVisualRefreshExperiment)('SearchableSettingsList');
const value3 = (UseSettingSearchResultsModule).useSettingSearchResults();
const settings = value3.settings;
const isLoading = value3.isLoading;
const isLoading2 = isLoading;
const placeholderCount = value3.placeholderCount;
const value4 = UserSettingSearchStore.useState(function({query}) {
return query.trim() === '';
});
const value5 = SettingBlocklistStore.useField('blocklist');
const binding = isLoading2;
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 = (FlashListModule).FlashList;
const object2 = {};
copyDataProperties(object2, styles.contentContainer, value5);
const PX_16 = (Native).space.PX_16;
object2['paddingBottom'] = bottom + PX_16;
return (
<FlashList
keyboardShouldPersistTaps="always"
contentContainerStyle={object2}
ListHeaderComponentStyle={value9}
estimatedItemSize={getSettingsListItemEstimatedSize(value2)}
ListHeaderComponent={SettingSearchBar}
ListEmptyComponent={value10}
onScroll={(KeyboardManagerUtilsModule).dismissGlobalKeyboard}
scrollIndicatorInsets={{right: 0.01}}
keyExtractor={keyExtractor_100499}
renderItem={renderItem_100498}
data={value8}
getItemType={getItemType}
/>
);
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 (SettingRendererUtilsModule).getScoredSettingListSearchResultItems(settings,
isLoading, placeholderCount);
}
function _fun100506() { // fn#100506, offset: 0x021ea819, size: 22 bytes, params: 1, frame: 3
return env0_5 ? SettingRendererConstantsModule.ListItemType : SettingRendererConstantsModule.getSettingsListItemEstimatedSize;
}
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 (JsxRuntimeModule.jsx.length !== 0) {
r0 = value2;
} else {
value = environment.__proto__;
value = importDefault(14154) /* metro dependency 14154: SettingsSearchEmptyState */;
value = ((Component) => <Component />)(value);
r0 = value;
}
return r0;
}
}
}
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;
}
global.__d(_fun100494, 13171, [31, 27, 13172, 13173, 9693, 33, 4501, 697, 6231, 6766, 13174, 1585, 1357, 13175,
14150, 8416, 14151, 14154, 14155, 1848,
2]) /* metro module 13171, dependencies: [31, 27, 13172, 13173, 9693, 33, 4501, 697, 6231, 6766, 13174, 1585, 1357, 13175, 14150, 8416, 14151, 14154, 14155, 1848, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,20 +1,21 @@
/* Metro module 9693; source: modules/settings/native/renderer/SettingRendererConstants.tsx; dependencies: [1357, 697, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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',
object = {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 ROUTE = object.ROUTE;
const PRESSABLE = object.PRESSABLE;
const STATIC = object.STATIC;
const set = new Set([ROUTE, PRESSABLE, STATIC]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingRendererConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/settings/native/renderer/SettingRendererConstants.tsx');
exports.GUILD_SELECT_ALL_SERVERS_OPTION_ID = '0';
exports.NodeType = object2;
exports.NodeType = object;
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'};
@@ -26,3 +27,4 @@ function _fun76211(global, require, importDefault, importAll, module, exports, d
exports.SUPPORTED_SEARCH_RESULT_NO_PARENT_RENDERER_TYPES = set;
}
global.__d(_fun76211, 9693, [1357, 697, 2]) /* metro module 9693, dependencies: [1357, 697, 2] */;
@@ -1,7 +1,19 @@
/* Metro module 13175; source: modules/settings/native/renderer/SettingRendererUtils.tsx; dependencies: [9693, 661, 7508, 7004, 6996, 477, 1848, 13176, 44, 13177, 14147, 22, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import UserSettingsModalActionCreators from '../../../../actions/UserSettingsModalActionCreators.tsx'; /* Metro dependency 7508 */
import SettingTreeManager from './SettingTreeManager.tsx'; /* Metro dependency 14147 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseKeyboardIsOpenModule from '../../../keyboard/native/useKeyboardIsOpen.tsx'; /* Metro dependency 6996 */
import * as UserSettingsUtilsModule from '../../../../utils/UserSettingsUtils.tsx'; /* Metro dependency 7004 */
import * as SettingRendererConstantsModule from './SettingRendererConstants.tsx'; /* Metro dependency 9693 */
import * as SettingHookHarnessModule from './SettingHookHarness.tsx'; /* Metro dependency 13176 */
import * as SettingsRendererConfigModule from '../../../user_settings/core/native/SettingsRendererConfig.tsx'; /* Metro dependency 13177 */
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 getSettingTitle2 = getSettingTitle;
const getSearchResultIconComponent = function(a0) {
var property = require(dependencyMap[9]).SETTING_RENDERER_CONFIG;
property = property[a0];
@@ -22,12 +34,8 @@ function _fun100556(global, require, importDefault, importAll, module, exports,
};
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');
const env0_3 = SettingRendererConstantsModule.ListItemType;
(FileImportTrackerModule).fileFinishedImporting('modules/settings/native/renderer/SettingRendererUtils.tsx');
exports.onRouteSettingOnPress = function({navigation, screen, preNavigationAction}) {
var closure = _fun100561;
var value = undefined;
@@ -36,7 +44,7 @@ function _fun100556(global, require, importDefault, importAll, module, exports,
}
return value;
};
exports.getSettingTitle = closure;
exports.getSettingTitle = getSettingTitle2;
exports.getSettingSearchableTitles = getSettingSearchableTitles;
exports.getSettingScreens = getSettingScreens;
exports.toSettingListItems = function(a0, a1) {
@@ -53,444 +61,444 @@ function _fun100556(global, require, importDefault, importAll, module, exports,
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 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 = (SettingHookHarnessModule).getCachedSettingTitle(a0);
(Module00044)(cachedSettingTitle != null, 'Setting ' + a0 + ' is missing a title.');
return cachedSettingTitle;
}
}
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;
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 goToScreen2 = goToScreen;
if (preNavigationAction?.(goToScreen2) !== false) {
goToScreen2();
}
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 goToScreenOnPress2 = goToScreenOnPress;
const value = environment.__proto__;
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 {
goToScreenOnPress2();
}
break reducibleLoop3;
} else {
goToScreenOnPress2();
}
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 = UserSettingsModalActionCreators;
const setSection = defaultImport.setSection;
const screenBinding = screen;
Reflect.apply(setSection, defaultImport, [screenBinding.route]);
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);
}
}
} 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;
}
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 = (SettingsRendererConfigModule).SETTING_RENDERER_CONFIG;
Reflect.apply(entries, Object, [SETTING_RENDERER_CONFIG]).forEach(_fun100565);
return [];
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;
var value = undefined;
var value2 = item2 === value;
var r0 = value2 ? value : item;
if (!value2) {
item2.return();
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;
}
}
return r0;
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 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 = (SettingsRendererConfigModule).SETTING_RENDERER_CONFIG;
Reflect.apply(entries, Object, [SETTING_RENDERER_CONFIG]).forEach(_fun100567);
return [];
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 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 _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 _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 object = {};
const SECTION_ROW = ListItemType.SECTION_ROW;
object.type = SECTION_ROW;
object.setting = a0;
const SETTING_RENDERER_CONFIG = (SettingsRendererConfigModule).SETTING_RENDERER_CONFIG;
object.settingData = SETTING_RENDERER_CONFIG[a0];
object.start = a1 === 0;
object.end = a1 === env0_0.length - 1;
Reflect.apply(push, binding, [object]);
}
}
}
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 = Module00022Module;
value = value.sortBy([], function(a0) {
return a0.category;
});
map.forEach(_fun100580);
}
return items2;
}
const Set = global.Set;
const set = new Set();
value.forEach(_fun100575);
return [];
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 = (SettingsRendererConfigModule).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 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 _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 = (SettingTreeManager).getBreadcrumbs(setting);
let binding = env0_3;
const value6 = binding.has(category);
binding.add(category);
binding = env0_2;
const push = binding.push;
const object = {};
const SETTING_SEARCH_RESULT = ListItemType.SETTING_SEARCH_RESULT;
object.type = SETTING_SEARCH_RESULT;
object.settingData = data;
object.title = settingTitle;
object.IconComponent = value6 ? undefined : getSearchResultIconComponent(category);
object.breadcrumbs = breadcrumbs;
object.setting = setting;
object.index = a1;
object.total = env0_1.length;
Reflect.apply(push, binding, [object]);
}
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);
}
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 {
closure();
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);
}
} 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;
return items2;
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 = (SettingsRendererConfigModule).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);
}
}
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]);
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 _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 object;
var binding;
let value = environment.__proto__.__proto__;
const SETTING_RENDERER_CONFIG = (SettingsRendererConfigModule).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;
object = {};
object.type = ListItemType.SETTING_SEARCH_RESULT;
object.settingData = r4;
object.title = getSettingTitle(setting);
r4 = a1 !== 0 ? undefined : getSearchResultIconComponent(r6);
object.IconComponent = r4;
value = importDefault(14147) /* metro dependency 14147: SettingTreeManager */;
object.breadcrumbs = value.getBreadcrumbs(setting);
object.setting = setting;
value = environment.__proto__;
object.index = env1_4;
object.total = env1_3;
binding = env1_4;
env1_4 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
binding = env1_0;
binding.push(object);
} else if (isSupportedSearchResultSettingData(property)) {
r4 = property;
r6 = setting;
object = {};
object.type = ListItemType.SETTING_SEARCH_RESULT;
object.settingData = r4;
object.title = getSettingTitle(setting);
r4 = a1 !== 0 ? undefined : getSearchResultIconComponent(r6);
object.IconComponent = r4;
value = importDefault(14147) /* metro dependency 14147: SettingTreeManager */;
object.breadcrumbs = value.getBreadcrumbs(setting);
object.setting = setting;
value = environment.__proto__;
object.index = env1_4;
object.total = env1_3;
binding = env1_4;
env1_4 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
binding = env1_0;
binding.push(object);
return undefined;
}
}
}
}
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;
}
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);
}
}
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]);
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;
}
}
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;
}
}
global.__d(_fun100556, 13175, [9693, 661, 7508, 7004, 6996, 477, 1848, 13176, 44, 13177, 14147, 22,
2]) /* metro module 13175, dependencies: [9693, 661, 7508, 7004, 6996, 477, 1848, 13176, 44, 13177, 14147, 22, 2] */;
@@ -1,4 +1,17 @@
/* 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] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserSettingSearchStore from '../../../user_settings/UserSettingSearchStore.tsx'; /* Metro dependency 13172 */
import SettingTreeManager from './SettingTreeManager.tsx'; /* Metro dependency 14147 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as SegmentedControlPagesNativeModule from '../../../../design/components/SegmentedControl/native/SegmentedControlPages.native.tsx'; /* Metro dependency 8861 */
import * as SegmentedControlNativeModule from '../../../../design/components/SegmentedControl/native/SegmentedControl.native.tsx'; /* Metro dependency 9221 */
import * as SettingRendererConstantsModule from './SettingRendererConstants.tsx'; /* Metro dependency 9693 */
import * as SettingsRendererConfigModule from '../../../user_settings/core/native/SettingsRendererConfig.tsx'; /* Metro dependency 13177 */
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) {
@@ -46,185 +59,193 @@ function _fun107121(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).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 */;
let value = JsxRuntimeModule;
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 = {};
const object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
object2.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');
object2.paddingTop = PX_16;
const env0_11 = Reflect.apply(createStyles, value, [{controlContainer: object2, pageContainer: {flex: 1}}]);
(FileImportTrackerModule).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)) {
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);
}
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') {
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);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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 {
r6 = value;
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;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
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 _fun107123() { // fn#107123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:779, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
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} />
}
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();
let useState = ReactModule.useState;
const value2 = Reflect.apply(useState, ReactModule, [0]);
const value3 = Module00057(value2, 2);
const property = value3[0];
const env0_2 = value3[1];
useState = ReactModule.useState;
const value4 = Module00057(Reflect.apply(useState, ReactModule, [_fun107126]), 2);
const property2 = value4[0];
value4[1];
const value5 = ReactModule.useCallback(_fun107127, []);
const value7 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({items: ReactModule.useMemo(function() {
settings.forEach(_fun107129);
return [];
}, [settings]), pageWidth: property, defaultIndex: property2});
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const SegmentedControl = (SegmentedControlNativeModule).SegmentedControl;
const view = (
<View style={styles.controlContainer} onLayout={value5}>
<SegmentedControl 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;
);
const SegmentedControlPages = (SegmentedControlPagesNativeModule).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 = (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;
}
value8 = value();
done = value8.done;
if (done) {
value = environment;
return defaultIndex;
function _fun107127({nativeEvent}) { // fn#107127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:1780, offset: 0x0170cbca, size: 36 bytes, params: 2, frame: 11
env0_2(nativeEvent.layout.width);
}
r3 = value8;
continue;
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 = (SettingsRendererConfigModule).SETTING_RENDERER_CONFIG;
const property = SETTING_RENDERER_CONFIG[a0];
const defaultImport = Module00044;
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 object = {};
object.label = (require(13175) /* metro dependency 13175: SettingRendererUtils */).getSettingTitle(a0);
object.id = a0;
object.page = ((Component) => <Component />)(component);
Reflect.apply(push, binding, [object]);
}
}
}
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]);
}
global.__d(_fun107121, 14156, [57, 31, 27, 13172, 9693, 33, 4501, 697, 14147, 13177, 44, 13175, 8853, 9221, 8861,
2]) /* metro module 14156, dependencies: [57, 31, 27, 13172, 9693, 33, 4501, 697, 14147, 13177, 44, 13175, 8853, 9221, 8861, 2] */;
@@ -1,81 +1,91 @@
/* Metro module 15825; source: modules/settings/native/renderer/SettingTreeCacheLifecycleManager.tsx; dependencies: [7, 6, 15, 17, 18, 14147, 4860, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import AutomaticLifecycleManager from '../../../../lib/AutomaticLifecycleManager.tsx'; /* Metro dependency 4860 */
import SettingTreeManager from './SettingTreeManager.tsx'; /* Metro dependency 14147 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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 */;
let value = AutomaticLifecycleManager;
value = _fun121631(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingTreeCacheLifecycleManager.tsx');
(FileImportTrackerModule).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) {
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;
})();
}
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 _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 SettingTreeManagerLifecycleManager2 = SettingTreeManagerLifecycleManager;
Inherits(SettingTreeManagerLifecycleManager2, a0);
return CreateClass(SettingTreeManagerLifecycleManager2);
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 items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(SettingTreeManagerLifecycleManager);
binding = env1_4;
if (_isNativeReflectConstruct_121628()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_121633};
value.handleConnectionOpen = handleConnectionOpen_121634;
return value;
function SettingTreeManagerLifecycleManagerPOST_CONNECTION_OPEN() { // fn#121633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16033:683, owner: SettingTreeManagerLifecycleManager.POST_CONNECTION_OPEN, offset: 0x00eed68e, size: 19 bytes, params: 1, frame: 9
return env0_0.handleConnectionOpen();
}
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__;
(SettingTreeManager).clearCaches();
}
}
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();
}
global.__d(_fun121627, 15825, [7, 6, 15, 17, 18, 14147, 4860,
2]) /* metro module 15825, dependencies: [7, 6, 15, 17, 18, 14147, 4860, 2] */;
@@ -1,4 +1,10 @@
/* Metro module 14147; source: modules/settings/native/renderer/SettingTreeManager.tsx; dependencies: [6, 7, 9693, 13177, 13176, 2] */
import ClassCallCheck from '../../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as SettingRendererConstantsModule from './SettingRendererConstants.tsx'; /* Metro dependency 9693 */
import * as SettingsRendererConfigModule from '../../../user_settings/core/native/SettingsRendererConfig.tsx'; /* Metro dependency 13177 */
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) {
@@ -46,244 +52,252 @@ function _fun107043(global, require, importDefault, importAll, module, exports,
};
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');
(FileImportTrackerModule).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)) {
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);
}
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') {
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);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
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 {
r6 = value;
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;
}
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;
r5 = value;
}
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;
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 _fun107045() { // fn#107045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:711, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
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 CreateClass(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 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 _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 CreateClass(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;
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;
}
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;
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 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 _fun107058(a0) { // fn#107058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14344:1887, offset: 0x00e4010b, size: 22 bytes, params: 2, frame: 11
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 = (SettingsRendererConfigModule).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;
}
}
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;
}
global.__d(_fun107043, 14147, [6, 7, 9693, 13177, 13176,
2]) /* metro module 14147, dependencies: [6, 7, 9693, 13177, 13176, 2] */;
@@ -1,79 +1,84 @@
/* Metro module 14150; source: modules/settings/native/renderer/hooks/useAutoScrollToSetting.tsx; dependencies: [31, 13172, 9693, 13177, 13175, 1484, 2] */
import UserSettingSearchStore from '../../../../user_settings/UserSettingSearchStore.tsx'; /* Metro dependency 13172 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseNavigationNativeModule from '../../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as SettingRendererConstantsModule from '../SettingRendererConstants.tsx'; /* Metro dependency 9693 */
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');
(FileImportTrackerModule).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;
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 = (UseNavigationNativeModule).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 {
current = env1_0.current;
r2 = current == null;
r4 = current;
initialScrollIndex = (require(13175) /* metro dependency 13175: SettingRendererUtils */).getInitialScrollIndex(r5,
a1);
r8 = initialScrollIndex !== 0 && initialScrollIndex !== 1;
}
if (!r2) {
r4.scrollToIndex({'index': null, 'animated': false, 'viewOffset': 300, index: value4});
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;
}
}
}
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;
}
global.__d(_fun107072, 14150, [31, 13172, 9693, 13177, 13175, 1484,
2]) /* metro module 14150, dependencies: [31, 13172, 9693, 13177, 13175, 1484, 2] */;
@@ -1,21 +1,24 @@
/* Metro module 14148; source: modules/settings/native/renderer/hooks/useHighlightSettingItem.tsx; dependencies: [13172, 2] */
import UserSettingSearchStore from '../../../../user_settings/UserSettingSearchStore.tsx'; /* Metro dependency 13172 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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;
}
}
}
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;
}
global.__d(_fun107063, 14148, [13172, 2]) /* metro module 14148, dependencies: [13172, 2] */;
@@ -1,4 +1,6 @@
/* Metro module 13173; source: modules/settings/native/renderer/stores/SettingBlocklistStore.tsx; dependencies: [4024, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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});
@@ -6,7 +8,8 @@ function _fun100511(global, require, importDefault, importAll, module, exports,
var Set = global.Set;
return {blocklist: new Set()};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/stores/SettingBlocklistStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/settings/native/renderer/stores/SettingBlocklistStore.tsx');
exports.default = zustandStore;
}
global.__d(_fun100511, 13173, [4024, 2]) /* metro module 13173, dependencies: [4024, 2] */;
@@ -1,54 +1,60 @@
/* Metro module 14155; source: modules/settings/native/search/SettingSearchBar.tsx; dependencies: [31, 27, 13172, 33, 4501, 697, 1848, 7006, 6984, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserSettingSearchStore from '../../../user_settings/UserSettingSearchStore.tsx'; /* Metro dependency 13172 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as KeyboardManagerUtilsModule from '../../../../utils/native/KeyboardManagerUtils.tsx'; /* Metro dependency 1848 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as SearchFieldNativeModule from '../../../../design/components/TextField/native/SearchField.native.tsx'; /* Metro dependency 6984 */
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');
const createStyles = CreateStylesModule.createStyles;
const SETTINGS_PADDING_TOP = (Native).modules.mobile.SETTINGS_PADDING_TOP;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{container: {marginTop: SETTINGS_PADDING_TOP}}]);
(FileImportTrackerModule).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 value2 = ReactModule.useRef(null);
const value3 = ReactModule.useCallback(_fun107117, []);
const value4 = ReactModule.useCallback(function() {
require(dependencyMap[7]).trackSettingSearchInputFocused();
UserSettingSearchStore.setState({'isActive': true, 'isFocused': true});
}, []);
const value5 = ReactModule.useCallback(function() {
UserSettingSearchStore.setState({isFocused: false});
}, []);
const value6 = ReactModule.useCallback(function(a0) {
UserSettingSearchStore.setState({query: a0});
}, []);
const SearchField = (SearchFieldNativeModule).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});
(KeyboardManagerUtilsModule).dismissGlobalKeyboard();
}
}
}
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();
}
global.__d(_fun107115, 14155, [31, 27, 13172, 33, 4501, 697, 1848, 7006, 6984,
2]) /* metro module 14155, dependencies: [31, 27, 13172, 33, 4501, 697, 1848, 7006, 6984, 2] */;
@@ -1,48 +1,72 @@
/* Metro module 14154; source: modules/settings/native/search/components/SettingsSearchEmptyState.tsx; dependencies: [31, 27, 33, 4501, 3869, 1244, 9105, 4572, 4573, 2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as AccessibilityAnnouncerAndroidModule from '../../../../../external/discord_common/js/packages/design/components/AccessibilityAnnouncer/AccessibilityAnnouncer.android.tsx'; /* Metro dependency 3869 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NoResultsAltModule from '../../../../../design/components/Illustration/native/redesign/generated/NoResultsAlt.tsx'; /* Metro dependency 9105 */
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,
let value = ReactModule;
const env0_6 = (CreateStylesModule).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');
(FileImportTrackerModule).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 = (NoResultsAltModule).NoResultsAlt;
const items2 = [
<NoResultsAlt resizeMode="contain" />,
];
const Stack = (StackNativeModule).Stack;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const text = (
<Text variant="text-md/semibold" color="mobile-text-heading-primary">
{Reflect.apply(string, intl, [(IndexNativeModule).t.zihbmv])}
</Text>
);
string = intl.string;
const XclvsB = (IndexNativeModule).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 = (AccessibilityAnnouncerAndroidModule).AccessibilityAnnouncer;
const announce = AccessibilityAnnouncer.announce;
const intl = (IndexNativeModule).intl;
Reflect.apply(announce, AccessibilityAnnouncer,
[intl.string((IndexNativeModule).t.zihbmv), 'polite']);
}
}
}
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']);
}
global.__d(_fun107112, 14154, [31, 27, 33, 4501, 3869, 1244, 9105, 4572, 4573,
2]) /* metro module 14154, dependencies: [31, 27, 33, 4501, 3869, 1244, 9105, 4572, 4573, 2] */;
@@ -1,108 +1,121 @@
/* Metro module 14151; source: modules/settings/native/search/hooks/useSettingSearchResults.tsx; dependencies: [57, 31, 13172, 13173, 14147, 13177, 14152, 13175, 6949, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Module06949 from '../../../../../by-id/module-06949.js'; /* Metro dependency 6949 */
import UserSettingSearchStore from '../../../../user_settings/UserSettingSearchStore.tsx'; /* Metro dependency 13172 */
import SettingBlocklistStore from '../../renderer/stores/SettingBlocklistStore.tsx'; /* Metro dependency 13173 */
import UserSettingSearchManager from '../../../../user_settings/UserSettingSearchManager.tsx'; /* Metro dependency 14152 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _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');
(FileImportTrackerModule).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();
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 value2 = ReactModule.useMemo(_fun107079, []);
let useState = ReactModule.useState;
const value3 = Reflect.apply(useState, ReactModule, [env0_7]);
const binding2 = env0_3;
let value = binding2(value3, 2);
const property = value[0];
const env0_1 = value[1];
useState = ReactModule.useState;
value = binding2(Reflect.apply(useState, ReactModule, [false]), 2);
const property2 = value[0];
const env0_2 = value[1];
useState = ReactModule.useState;
value = binding2(Reflect.apply(useState, ReactModule, [10]), 2);
const property3 = value[0];
var env0_3 = value[1];
ReactModule.useEffect(function() {
var env0_0 = UserSettingSearchStore.subscribe(_fun107084, _fun107085, {equalityFn: _fun107086});
return _fun107087;
}, [ReactModule.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 = 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;
}
binding = env1_1;
value2 = environment.__proto__.__proto__;
binding(env2_7);
env1_2(false);
} else {
value = environment.__proto__;
env1_2(true);
env1_4(a0);
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 (Module06949)(_fun107081, 350);
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 _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;
}
}
}
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 _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 _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 _fun107084({query}) { // fn#107084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14348:848, offset: 0x022f2d11, size: 21 bytes, params: 2, frame: 9
return query.trim();
}
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;
function equalityFn(a0, a1) { // fn#107086, offset: 0x00cf443c, size: 12 bytes, params: 3, frame: 2
return a0 === a1;
}
global.__d(_fun107077, 14151, [57, 31, 13172, 13173, 14147, 13177, 14152, 13175, 6949,
2]) /* metro module 14151, dependencies: [57, 31, 13172, 13173, 14147, 13177, 14152, 13175, 6949, 2] */;
@@ -1,65 +1,68 @@
/* Metro module 7005; source: modules/settings/tracking/SettingSearchSessionAnalyticsManager.tsx; dependencies: [6, 7, 491, 7006, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 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');
(FileImportTrackerModule).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 CreateClass(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 _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 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 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_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_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_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 object;
let value = this.searchSessionId != null;
if (value && this.searchSessionStartTime != null) {
value = environment.__proto__;
value = require(7006) /* metro dependency 7006: Tracking */;
trackSettingSearchClosed = value.trackSettingSearchClosed;
object = {};
object.searchSessionDuration = global.Date.now() - this.searchSessionStartTime;
Reflect.apply(trackSettingSearchClosed, value, [object]);
this.searchSessionId = null;
this.searchSessionStartTime = null;
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;
}
}
global.__d(_fun55462, 7005, [6, 7, 491, 7006, 2]) /* metro module 7005, dependencies: [6, 7, 491, 7006, 2] */;
+39 -35
View File
@@ -1,47 +1,51 @@
/* Metro module 7006; source: modules/settings/tracking/Tracking.tsx; dependencies: [661, 683, 7005, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).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 = AnalyticsUtils;
const track = defaultImport.track;
const USER_SETTINGS_SEARCH_RESULT_PRESS = AnalyticEvents.USER_SETTINGS_SEARCH_RESULT_PRESS;
const object = {};
object.setting = setting;
object.title = title;
object.route = route;
object.search_result_position = searchResultPosition;
object.num_search_results = numSearchResults;
object.search_session_id = (importDefault(7005) /* metro dependency 7005: SettingSearchSessionAnalyticsManager */).getSearchSessionId();
Reflect.apply(track, defaultImport, [USER_SETTINGS_SEARCH_RESULT_PRESS, object]);
}
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 = AnalyticsUtils;
const track = defaultImport.track;
const USER_SETTINGS_SEARCH_QUERY_ENTERED = AnalyticEvents.USER_SETTINGS_SEARCH_QUERY_ENTERED;
const object = {};
object.search_session_id = (importDefault(7005) /* metro dependency 7005: SettingSearchSessionAnalyticsManager */).getSearchSessionId();
Reflect.apply(track, defaultImport, [USER_SETTINGS_SEARCH_QUERY_ENTERED, object]);
}
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 = AnalyticsUtils;
const track = defaultImport.track;
const USER_SETTINGS_SEARCH_CLOSED = AnalyticEvents.USER_SETTINGS_SEARCH_CLOSED;
const object = {};
object.search_session_id = (importDefault(7005) /* metro dependency 7005: SettingSearchSessionAnalyticsManager */).getSearchSessionId();
object.search_session_duration_ms = searchSessionDuration;
Reflect.apply(track, defaultImport, [USER_SETTINGS_SEARCH_CLOSED, object]);
}
}
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]);
}
global.__d(_fun55470, 7006, [661, 683, 7005, 2]) /* metro module 7006, dependencies: [661, 683, 7005, 2] */;