685 lines
37 KiB
TypeScript
685 lines
37 KiB
TypeScript
/* Metro module 13174; source: modules/settings/native/renderer/SettingRenderer.tsx; dependencies: [57, 29, 31, 27, 1949, 13172, 1867, 9693, 33, 4501, 697, 1305, 6238, 1484, 13175, 566, 1244, 8765, 6819, 14148, 14149, 6808, 3875, 7988, 7987, 6797, 3856, 10272, 4081, 4082, 6239, 4572, 4573, 1856, 477, 12809, 5278, 4578, 3860, 7006, 1848, 2] */
|
|
function _fun100513(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:6, offset: 0x021ea9a7, size: 991 bytes, params: 8, frame: 25
|
|
var object3;
|
|
const env0_0 = require;
|
|
const env0_3 = ['onSlidingComplete', 'step', 'startIcon', 'endIcon', 'minimumValue', 'maximumValue', 'valueLabel',
|
|
'defaultValue', 'onValueChange'];
|
|
const env0_4 = ['settingData'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_5 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_6 = importDefault(29) /* metro dependency 29 */;
|
|
const value = importAll(31) /* metro dependency 31 */;
|
|
const env0_8 = (require(27) /* metro dependency 27 */).View;
|
|
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
|
const userSettingSearchStore = importDefault(13172) /* metro dependency 13172: UserSettingSearchStore */;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const settingRendererConstantsModule = require(9693) /* metro dependency 9693: SettingRendererConstants */;
|
|
const env0_12 = settingRendererConstantsModule.GUILD_SELECT_ALL_SERVERS_OPTION_ID;
|
|
const env0_13 = settingRendererConstantsModule.NodeType;
|
|
const value3 = require(33) /* metro dependency 33 */;
|
|
const env0_14 = value3.jsx;
|
|
const env0_15 = value3.Fragment;
|
|
const env0_16 = value3.jsxs;
|
|
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = createStylesModule.createStyles;
|
|
object3 = {};
|
|
const object4 = {};
|
|
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.marginTop = PX_16;
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object4.marginBottom = PX_8;
|
|
object3.slider = object4;
|
|
object3.sliderTitle = {'flexDirection': 'row', 'justifyContent': 'space-between'};
|
|
object3.radioSettingHighlight = {top: 26};
|
|
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
|
object3.defaultIcon = {'backgroundColor': null, 'justifyContent': 'center', 'alignItems': 'center',
|
|
backgroundColor: BACKGROUND_BRAND};
|
|
const object7 = {};
|
|
const AVATAR_SIZE_MAP = (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP;
|
|
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
|
let REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
|
|
object7.width = AVATAR_SIZE_MAP[REFRESH_MEDIUM_32];
|
|
REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
|
|
object7.height = AVATAR_SIZE_MAP[REFRESH_MEDIUM_32];
|
|
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
|
let BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
|
object7.backgroundColor = BACKGROUND_MOD_MUTED;
|
|
object3.placeholderAvatar = object7;
|
|
const object8 = {height: 20};
|
|
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
|
|
BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
|
|
object8.backgroundColor = BACKGROUND_MOD_MUTED;
|
|
object3.placeholderUsername = object8;
|
|
const env0_17 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
|
const env0_18 = value.memo(_fun100527);
|
|
const closure = GuildSelectDefaultIcon;
|
|
const env0_20 = value.memo(_fun100530);
|
|
const env0_21 = value.memo(_fun100536);
|
|
const env0_22 = value.memo(_fun100537);
|
|
const env0_23 = value.memo(_fun100538);
|
|
const env0_24 = value.memo(_fun100540);
|
|
const env0_25 = value.memo(_fun100542);
|
|
const env0_26 = value.memo(_fun100543);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingRenderer.tsx');
|
|
exports.GuildSelectDefaultIcon = closure;
|
|
exports.renderSettingItem = renderSettingItem;
|
|
exports.renderSettingSearchResultItem = renderSettingSearchResultItem;
|
|
exports.renderSettingSearchResultPlaceholderItem = renderSettingSearchResultPlaceholderItem;
|
|
}
|
|
|
|
function formatSettingsRowTrailing(a0) { // fn#100514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:1087, offset: 0x021ead86, size: 82 bytes, params: 2, frame: 15
|
|
var r0;
|
|
let value = a0;
|
|
if (value != null) {
|
|
if (typeof value !== 'string') {
|
|
r0 = value;
|
|
} else {
|
|
value = ((TrailingText) => <TrailingText text={value} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
}
|
|
|
|
function ForceSwitchIcons({children}) { // fn#100515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:3626, offset: 0x021eadd8, size: 133 bytes, params: 2, frame: 20
|
|
const binding = env0_7;
|
|
const useContext = binding.useContext;
|
|
const AccessibilityPreferencesContext = (require(3875) /* metro dependency 3875: AccessibilityPreferencesContext */).AccessibilityPreferencesContext;
|
|
const value3 = env0_7.useMemo(_fun100516, [Reflect.apply(useContext, binding, [AccessibilityPreferencesContext])]);
|
|
const Provider = AccessibilityPreferencesContext.Provider;
|
|
return (
|
|
<Provider value={value3}>
|
|
{children}
|
|
</Provider>
|
|
);
|
|
}
|
|
|
|
function SettingSearchResultBreadcrumbs({breadcrumbs}) { // fn#100517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:7198, offset: 0x021eae7a, size: 94 bytes, params: 2, frame: 17
|
|
if (breadcrumbs.length === 0) {
|
|
return null;
|
|
} else {
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
return (
|
|
<Text variant="text-xs/medium" color="text-muted">
|
|
{breadcrumbs.join(' → ')}
|
|
</Text>
|
|
);
|
|
}
|
|
}
|
|
|
|
function SettingSearchResultIcon({IconComponent}) { // fn#100518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:7368, offset: 0x021eaed8, size: 161 bytes, params: 2, frame: 17
|
|
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
|
const useToken = useTokenModule.useToken;
|
|
const TABLE_ROW_ICON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.TABLE_ROW_ICON_SIZE;
|
|
return IconComponent == null ? <View style={{width: Reflect.apply(useToken, useTokenModule,
|
|
[TABLE_ROW_ICON_SIZE])}} /> : ((Icon) => <Icon IconComponent={IconComponent} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon);
|
|
}
|
|
|
|
function RouteSettingSearchResult({settingData, IconComponent, title, breadcrumbs, setting, index, total}) { // fn#100519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:7571, offset: 0x021eaf79, size: 322 bytes, params: 2, frame: 24
|
|
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useStackNavigation();
|
|
const screen = settingData.screen;
|
|
const usePreNavigationAction = settingData.usePreNavigationAction;
|
|
const value5 = env0_7.useCallback(_fun100520, [usePreNavigationAction?.(), index, value3, screen, setting, title,
|
|
total]);
|
|
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
|
return (
|
|
<TableRow
|
|
label={title}
|
|
onPress={value5}
|
|
arrow
|
|
icon={<SettingSearchResultIcon IconComponent={IconComponent} />}
|
|
subLabel={<SettingSearchResultBreadcrumbs breadcrumbs={breadcrumbs} />}
|
|
start={index === 0}
|
|
end={index === total - 1}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function PressableSettingSearchResult({settingData, IconComponent, title, breadcrumbs, setting, index, total}) { // fn#100521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:8231, offset: 0x021eb15e, size: 254 bytes, params: 2, frame: 22
|
|
const onPress = settingData.onPress;
|
|
const withArrow = settingData.withArrow;
|
|
const value2 = env0_7.useCallback(_fun100522, [setting, title, index, total, onPress]);
|
|
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
|
return (
|
|
<TableRow
|
|
label={title}
|
|
onPress={value2}
|
|
icon={<SettingSearchResultIcon IconComponent={IconComponent} />}
|
|
subLabel={<SettingSearchResultBreadcrumbs breadcrumbs={breadcrumbs} />}
|
|
start={index === 0}
|
|
end={index === total - 1}
|
|
arrow={withArrow}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function StaticSettingSearchResult({settingData, IconComponent, title, breadcrumbs, setting, index, total}) { // fn#100523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:8745, offset: 0x021eb2c8, size: 334 bytes, params: 2, frame: 24
|
|
const useTrailing = settingData.useTrailing;
|
|
const r10 = useTrailing?.();
|
|
const value5 = env0_7.useCallback(_fun100524, [index, setting, r10, title, total]);
|
|
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
|
return (
|
|
<TableRow
|
|
label={title}
|
|
onPress={r10 != null ? value5 : undefined}
|
|
icon={<SettingSearchResultIcon IconComponent={IconComponent} />}
|
|
subLabel={<SettingSearchResultBreadcrumbs breadcrumbs={breadcrumbs} />}
|
|
trailing={r10 != null ? ((TrailingText) => <TrailingText text={r10} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText) : null}
|
|
start={index === 0}
|
|
end={index === total - 1}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function SettingSearchResultPlaceholder({start, end}) { // fn#100525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:9366, offset: 0x021eb4a4, size: 188 bytes, params: 2, frame: 21
|
|
const styles = useStyles();
|
|
const property = env0_5(env0_7.useState(function() {
|
|
var object = {};
|
|
var Math = global.Math;
|
|
object.width = (10 + 80 * Math.random() | 0) + '%';
|
|
return object;
|
|
}), 1)[0];
|
|
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
|
return (
|
|
<TableRow
|
|
start={start}
|
|
end={end}
|
|
label={<View style={[styles.placeholderUsername, property]} />}
|
|
icon={<View style={styles.placeholderAvatar} />}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function _fun100527({useTitle, useTrailing, usePreNavigationAction, screen, useDescription, useIsDisabled, variant, start, end, IconComponent}) { // fn#100527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:1220, offset: 0x021eb560, size: 364 bytes, params: 2, frame: 27
|
|
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useStackNavigation();
|
|
const value4 = useTitle();
|
|
const r15 = usePreNavigationAction?.();
|
|
const r12 = useDescription?.();
|
|
const r11 = useIsDisabled?.();
|
|
const r9 = useTrailing?.();
|
|
const value10 = env0_7.useCallback(_fun100528, [value3, screen, r15]);
|
|
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
|
return (
|
|
<TableRow
|
|
label={value4}
|
|
subLabel={r12}
|
|
disabled={r11}
|
|
arrow
|
|
variant={variant}
|
|
icon={IconComponent != null ? ((Icon) => <Icon IconComponent={IconComponent} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon) : null}
|
|
trailing={r9 != null ? formatSettingsRowTrailing(r9) : null}
|
|
onPress={value10}
|
|
start={start}
|
|
end={end}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function GuildSelectDefaultIcon({size}) { // fn#100529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:1843, offset: 0x021eb712, size: 168 bytes, params: 2, frame: 18
|
|
size = size === undefined ? 'sm' : size;
|
|
const styles = useStyles();
|
|
const r8 = size !== 'xs' ? 32 : 24;
|
|
const object = {};
|
|
copyDataProperties(object, styles.defaultIcon, r8);
|
|
object['width'] = r8;
|
|
object['height'] = r8;
|
|
object['borderRadius'] = r8 / 3;
|
|
const ClydeIcon = (require(8765) /* metro dependency 8765: ClydeIcon */).ClydeIcon;
|
|
return (
|
|
<View style={object}>
|
|
<ClydeIcon color="white" size={size} />
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun100530(a0) { // fn#100530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:2026, offset: 0x021eb7ba, size: 245 bytes, params: 2, frame: 19
|
|
const useSelectedGuildId = a0.useSelectedGuildId;
|
|
const value = Object.create(null);
|
|
value.useSelectedGuildId = 0;
|
|
const value2 = copyDataProperties({}, a0, value, undefined);
|
|
const value3 = useSelectedGuildId();
|
|
const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun100531);
|
|
const value5 = _fun100532(value3);
|
|
let binding = env0_7;
|
|
const value6 = binding.memo(_fun100534);
|
|
const value7 = env0_7.useCallback(_fun100535, [value5]);
|
|
binding = env0_21;
|
|
const PRESSABLE = NodeType.PRESSABLE;
|
|
return ((Component) => <Component {...value2} {...{['type']: PRESSABLE}} {...{['useTitle']: value7}} {...{['withArrow']: true}} {...{['IconComponent']: value6}} />)(binding);
|
|
}
|
|
|
|
function _fun100536({setting, onPress, useTitle, useDescription, useIsDisabled, useTrailing, variant, withArrow, start, end, IconComponent}) { // fn#100536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:2578, offset: 0x021eba0c, size: 369 bytes, params: 2, frame: 30
|
|
var r5;
|
|
var value;
|
|
const value3 = (require(14148) /* metro dependency 14148: useHighlightSettingItem */).useHighlightSettingItem(setting);
|
|
const value4 = useTitle();
|
|
const r16 = useDescription?.();
|
|
const r11 = useIsDisabled?.();
|
|
const r12 = useTrailing?.();
|
|
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
|
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
|
const tableRow = <TableRow label={value4} subLabel={r16} arrow={withArrow} variant={variant} icon={IconComponent != null ? ((Icon) => <Icon IconComponent={IconComponent} variant={variant} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon) : null} onPress={onPress} disabled={r11} trailing={formatSettingsRowTrailing(r12)} start={start} end={end} />;
|
|
if (value3) {
|
|
value = importDefault(14149) /* metro dependency 14149: SettingListItemHighlight */;
|
|
value = ((Component) => <Component start={start} end={end} />)(value);
|
|
r5 = value;
|
|
} else {
|
|
r5 = value3;
|
|
}
|
|
return (
|
|
<>
|
|
{tableRow}
|
|
{r5}
|
|
</>
|
|
);
|
|
}
|
|
|
|
function _fun100537({setting, onValueChange, useTitle, useDescription, useIsDisabled, useValue, variant, start, end, IconComponent, hasIcon}) { // fn#100537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:3105, offset: 0x021ebb7d, size: 379 bytes, params: 2, frame: 28
|
|
var r5;
|
|
var value;
|
|
const value3 = (require(14148) /* metro dependency 14148: useHighlightSettingItem */).useHighlightSettingItem(setting);
|
|
const value4 = useTitle();
|
|
const value5 = useValue();
|
|
const r14 = useDescription?.();
|
|
let r7 = useIsDisabled?.();
|
|
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
|
|
const tableSwitchRow = <TableSwitchRow label={value4} subLabel={r14} icon={IconComponent != null ? ((Icon) => <Icon IconComponent={IconComponent} variant={variant} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon) : null} value={value5} variant={variant} disabled={r7} onValueChange={onValueChange} start={start} end={end} />;
|
|
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
|
r7 = hasIcon !== true ? tableSwitchRow : <ForceSwitchIcons>{tableSwitchRow}</ForceSwitchIcons>;
|
|
if (value3) {
|
|
value = importDefault(14149) /* metro dependency 14149: SettingListItemHighlight */;
|
|
value = ((Component) => <Component start={start} end={end} />)(value);
|
|
r5 = value;
|
|
} else {
|
|
r5 = value3;
|
|
}
|
|
return (
|
|
<>
|
|
{r7}
|
|
{r5}
|
|
</>
|
|
);
|
|
}
|
|
|
|
function _fun100538({setting, useTitle, useValue, useOptions, onValueChange}) { // fn#100538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:3876, offset: 0x021ebcf8, size: 295 bytes, params: 2, frame: 25
|
|
var r5;
|
|
var value;
|
|
const styles = useStyles();
|
|
const value2 = (require(14148) /* metro dependency 14148: useHighlightSettingItem */).useHighlightSettingItem(setting);
|
|
const value3 = useTitle();
|
|
const value4 = useValue();
|
|
const value5 = useOptions();
|
|
const r10 = typeof value4 !== 'number' ? value4 : '' + value4;
|
|
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
|
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
|
|
const tableRadioGroup = <TableRadioGroup title={value3} defaultValue={r10} onChange={onValueChange} hasIcons={false} key={r10}>{value5.map(_fun100539)}</TableRadioGroup>;
|
|
if (value2) {
|
|
value = importDefault(14149) /* metro dependency 14149: SettingListItemHighlight */;
|
|
value = ((Component) => <Component start end style={styles.radioSettingHighlight} />)(value);
|
|
r5 = value;
|
|
} else {
|
|
r5 = value2;
|
|
}
|
|
return (
|
|
<>
|
|
{tableRadioGroup}
|
|
{r5}
|
|
</>
|
|
);
|
|
}
|
|
|
|
function _fun100540({setting, useTitle, variant, useTrailing, useIsDisabled, useDescription, start, end, IconComponent}) { // fn#100540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:4404, offset: 0x021ebea8, size: 450 bytes, params: 2, frame: 29
|
|
const value3 = (require(14148) /* metro dependency 14148: useHighlightSettingItem */).useHighlightSettingItem(setting);
|
|
const value4 = useTitle();
|
|
const r15 = useTrailing?.();
|
|
const r13 = useDescription?.();
|
|
const r12 = useIsDisabled?.();
|
|
const value9 = env0_7.useCallback(_fun100541, [r15]);
|
|
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
|
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
|
return (
|
|
<>
|
|
<TableRow
|
|
label={value4}
|
|
subLabel={r13}
|
|
onPress={r15 != null ? value9 : null}
|
|
variant={variant}
|
|
disabled={r12}
|
|
icon={IconComponent != null ? ((Icon) => <Icon IconComponent={IconComponent} variant={variant} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon) : null}
|
|
trailing={r15 != null ? ((TrailingText) => <TrailingText text={r15} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.TrailingText) : null}
|
|
start={start}
|
|
end={end}
|
|
/>
|
|
{value3 && ((Component) => <Component start={start} end={end} />)(importDefault(14149) /* metro dependency 14149: SettingListItemHighlight */)}
|
|
</>
|
|
);
|
|
}
|
|
|
|
function _fun100542({setting, useTitle, useValue, onValueChange, maximum, start, end}) { // fn#100542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:5034, offset: 0x021ec0b9, size: 310 bytes, params: 2, frame: 30
|
|
var r5;
|
|
var value;
|
|
const value3 = (require(14148) /* metro dependency 14148: useHighlightSettingItem */).useHighlightSettingItem(setting);
|
|
const styles = useStyles();
|
|
const value4 = useTitle();
|
|
const r19 = useValue?.();
|
|
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
|
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
|
const tableRow = <TableRow label={value4} start={start} end={end} subLabel={<View style={styles.slider}>{((Component) => <Component value={r19} maxVolume={maximum} onValueChange={onValueChange} />)(importDefault(10272) /* metro dependency 10272: VolumeSlider */)}</View>} />;
|
|
if (value3) {
|
|
value = importDefault(14149) /* metro dependency 14149: SettingListItemHighlight */;
|
|
value = ((Component) => <Component start={start} end={end} />)(value);
|
|
r5 = value;
|
|
} else {
|
|
r5 = value3;
|
|
}
|
|
return (
|
|
<>
|
|
{tableRow}
|
|
{r5}
|
|
</>
|
|
);
|
|
}
|
|
|
|
function _fun100543({useTitle, start, end, useProps, useTrailing}) { // fn#100543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:5397, offset: 0x021ec1ef, size: 1383 bytes, params: 2, frame: 48
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const env0_6 = undefined;
|
|
let env0_7 = undefined;
|
|
const value2 = useTitle();
|
|
const value3 = useProps();
|
|
const onSlidingComplete = value3.onSlidingComplete;
|
|
const step = value3.step;
|
|
const r32 = step === undefined ? 0.1 : step;
|
|
const startIcon = value3.startIcon;
|
|
const endIcon = value3.endIcon;
|
|
const minimumValue = value3.minimumValue;
|
|
const r30 = minimumValue === undefined ? 0 : minimumValue;
|
|
const maximumValue = value3.maximumValue;
|
|
const r27 = maximumValue === undefined ? 1 : maximumValue;
|
|
const env0_3 = r27;
|
|
const valueLabel = value3.valueLabel;
|
|
const defaultValue = value3.defaultValue;
|
|
const r15 = defaultValue === undefined ? 1 : defaultValue;
|
|
const onValueChange = value3.onValueChange;
|
|
const env0_5 = onValueChange;
|
|
const value8 = env0_6(value3, env0_3);
|
|
const styles = useStyles();
|
|
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
|
|
return LocaleStore.locale;
|
|
});
|
|
const value10 = env0_5(env0_7.useState(_fun100545), 2);
|
|
const property = value10[0];
|
|
env0_7 = property;
|
|
const env0_8 = value10[1];
|
|
const [property2, env0_9] = env0_5(env0_7.useState(false), 2);
|
|
const value13 = env0_7.useCallback(_fun100546, []);
|
|
const value14 = env0_7.useCallback(_fun100547, [onValueChange]);
|
|
const value15 = env0_7.useCallback(_fun100548, [onSlidingComplete]);
|
|
const value16 = env0_7.useCallback(_fun100549, [value14, onSlidingComplete]);
|
|
const value17 = env0_7.useCallback(_fun100550, [r15, value16]);
|
|
const value18 = env0_7.useCallback(_fun100551, [value16, r27, r32, property]);
|
|
const value19 = env0_7.useCallback(_fun100552, [value16, r30, r32, property]);
|
|
const r18 = useTrailing?.();
|
|
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
|
|
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
|
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
|
const items3 = [<Stack2 direction="horizontal" justify="space-between"><View style={styles.sliderTitle}><Text variant="text-md/semibold">{value2}</Text>{r18}</View>{property != null && <Text variant="text-sm/medium" color="text-muted">{valueLabel ?? (require(1856) /* metro dependency 1856: NumberUtils */).formatPercent(locale,
|
|
property)}</Text>}</Stack2>];
|
|
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
|
const slider = platformUtilsModule.isAndroid() ? styles.slider : undefined;
|
|
const Slider = (require(12809) /* metro dependency 12809: SliderNative */).Slider;
|
|
const sliderProps = {...value8};
|
|
sliderProps['accessibilityLabel'] = value2;
|
|
sliderProps['step'] = r32;
|
|
sliderProps['onValueChange'] = value14;
|
|
sliderProps['value'] = property;
|
|
sliderProps['minimumValue'] = r30;
|
|
sliderProps['maximumValue'] = r27;
|
|
sliderProps['onSlidingStart'] = value13;
|
|
sliderProps['onSlidingComplete'] = value15;
|
|
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
|
sliderProps['startIcon'] = <PressableOpacity accessible={false} onPress={value19}>{startIcon}</PressableOpacity>;
|
|
sliderProps['endIcon'] = <PressableOpacity accessible={false} onPress={value18}>{endIcon}</PressableOpacity>;
|
|
items3[1] = <View style={slider}><Slider {...sliderProps} /></View>;
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
const r13 = !property2 && property === r15;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
items3[2] = <Button disabled={r13} variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3b//lO'])} onPress={value17} />;
|
|
return (
|
|
<Card
|
|
start={start}
|
|
end={end}
|
|
shadow="none"
|
|
border="none"
|
|
>
|
|
<Stack>
|
|
{items3}
|
|
</Stack>
|
|
</Card>
|
|
);
|
|
}
|
|
|
|
function renderSettingItem({setting, settingData, start, end}) { // fn#100553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:9785, offset: 0x021ec8de, size: 596 bytes, params: 2, frame: 18
|
|
const type = settingData.type;
|
|
const GUILD_SELECTOR = NodeType.GUILD_SELECTOR;
|
|
if (GUILD_SELECTOR === type) {
|
|
return ((Component) => <Component {...settingData} {...{['setting']: setting}} {...{['start']: start}} {...{['end']: end}} />)(env0_20);
|
|
}
|
|
const ROUTE = NodeType.ROUTE;
|
|
if (ROUTE === type) {
|
|
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} />)(env0_18);
|
|
}
|
|
const PRESSABLE = NodeType.PRESSABLE;
|
|
if (PRESSABLE === type) {
|
|
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} {...{['setting']: setting}} />)(env0_21);
|
|
}
|
|
const TOGGLE = NodeType.TOGGLE;
|
|
if (TOGGLE === type) {
|
|
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} {...{['setting']: setting}} />)(env0_22);
|
|
}
|
|
const STATIC = NodeType.STATIC;
|
|
if (STATIC === type) {
|
|
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} {...{['setting']: setting}} />)(env0_24);
|
|
}
|
|
const VOLUME_SLIDER = NodeType.VOLUME_SLIDER;
|
|
if (VOLUME_SLIDER === type) {
|
|
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} {...{['setting']: setting}} />)(env0_25);
|
|
}
|
|
const RADIO = NodeType.RADIO;
|
|
if (RADIO === type) {
|
|
return ((Component) => <Component {...settingData} {...{['setting']: setting}} />)(env0_23);
|
|
}
|
|
const SLIDER = NodeType.SLIDER;
|
|
if (SLIDER === type) {
|
|
return ((Component) => <Component {...settingData} {...{['start']: start}} {...{['end']: end}} {...{['setting']: setting}} />)(env0_26);
|
|
}
|
|
}
|
|
|
|
function renderSettingSearchResultItem(a0) { // fn#100554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:10350, offset: 0x021ecb32, size: 235 bytes, params: 2, frame: 17
|
|
const settingData = a0.settingData;
|
|
const value2 = env0_6(a0, env0_4);
|
|
const type = settingData.type;
|
|
const ROUTE = NodeType.ROUTE;
|
|
if (ROUTE === type) {
|
|
return <RouteSettingSearchResult settingData={settingData} {...value2} />;
|
|
}
|
|
const PRESSABLE = NodeType.PRESSABLE;
|
|
if (PRESSABLE === type) {
|
|
return <PressableSettingSearchResult settingData={settingData} {...value2} />;
|
|
}
|
|
const STATIC = NodeType.STATIC;
|
|
if (STATIC === type) {
|
|
return <StaticSettingSearchResult settingData={settingData} {...value2} />;
|
|
}
|
|
const Error = global.Error;
|
|
const value = '[SettingRenderer] Found unsupported renderer type for setting: ' + a0.setting;
|
|
const value3 = Object.create(Error.prototype, {constructor: {value: Error}});
|
|
const error = new Error();
|
|
throw error instanceof Object ? error : value3;
|
|
}
|
|
|
|
function renderSettingSearchResultPlaceholderItem(a0) { // fn#100555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:10801, offset: 0x021ecc1d, size: 44 bytes, params: 2, frame: 14
|
|
return <SettingSearchResultPlaceholder start={a0.start} end={a0.end} />;
|
|
}
|
|
|
|
function _fun100516() { // fn#100516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:3740, offset: 0x021eae5d, size: 29 bytes, params: 1, frame: 12
|
|
const object2 = {};
|
|
copyDataProperties(object2, env0_0, undefined);
|
|
object2['switchIconsEnabled'] = true;
|
|
return object2;
|
|
}
|
|
|
|
function _fun100520() { // fn#100520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:7798, offset: 0x021eb0bb, size: 163 bytes, params: 1, frame: 17
|
|
let value = environment.__proto__;
|
|
const setState = UserSettingSearchStore.setState;
|
|
const settingBinding = setting;
|
|
Reflect.apply(setState, UserSettingSearchStore, [{selected: settingBinding}]);
|
|
value = require(7006) /* metro dependency 7006: Tracking */;
|
|
const trackSettingSearchResultPress = value.trackSettingSearchResultPress;
|
|
const screenBinding = screen;
|
|
Reflect.apply(trackSettingSearchResultPress, value, [{setting: settingBinding, title: title,
|
|
route: screenBinding.route, searchResultPosition: index, numSearchResults: total}]);
|
|
value = require(13175) /* metro dependency 13175: SettingRendererUtils */;
|
|
value.onRouteSettingOnPress({navigation: env0_4, screen: screenBinding, preNavigationAction: env0_6});
|
|
}
|
|
|
|
function _fun100522() { // fn#100522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:8397, offset: 0x021eb25c, size: 108 bytes, params: 1, frame: 16
|
|
const value = environment.__proto__;
|
|
(require(7006) /* metro dependency 7006: Tracking */).trackSettingSearchResultPress({setting: setting, title: title,
|
|
searchResultPosition: index, numSearchResults: total});
|
|
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
|
|
onPress();
|
|
}
|
|
|
|
function _fun100524() { // fn#100524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:8919, offset: 0x021eb416, size: 142 bytes, params: 1, frame: 16
|
|
var value2;
|
|
if (env0_4 != null) {
|
|
value2 = environment.__proto__;
|
|
(require(7006) /* metro dependency 7006: Tracking */).trackSettingSearchResultPress({setting: setting,
|
|
title: title,
|
|
searchResultPosition: index, numSearchResults: total});
|
|
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_4);
|
|
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
|
|
}
|
|
}
|
|
|
|
function _fun100528() { // fn#100528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:1507, offset: 0x021eb6cc, size: 70 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
(require(13175) /* metro dependency 13175: SettingRendererUtils */).onRouteSettingOnPress({navigation: env0_1,
|
|
screen: screen, preNavigationAction: env0_2});
|
|
}
|
|
|
|
function _fun100532(a0) { // fn#100532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:2132, offset: 0x021eb8af, size: 210 bytes, params: 2, frame: 17
|
|
var environment;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
const value2 = undefined;
|
|
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun100533);
|
|
return a0 === GUILD_SELECT_ALL_SERVERS_OPTION_ID ? intl.string(t.OMVg25) : (guild == null ? value2 : guild.name) ?? intl.string(t['XBwns+']);
|
|
}
|
|
|
|
function _fun100534() { // fn#100534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:2342, offset: 0x021eb99c, size: 112 bytes, params: 1, frame: 17
|
|
var r0;
|
|
var value2;
|
|
var value;
|
|
if (guild == null) {
|
|
value = environment.__proto__;
|
|
value = <GuildSelectDefaultIcon />;
|
|
r0 = value;
|
|
} else {
|
|
value2 = environment.__proto__;
|
|
r0 = ((Component) => <Component size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.SMALL_32} guild={guild} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun100539(a0) { // fn#100539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:4157, offset: 0x021ebe1f, size: 137 bytes, params: 2, frame: 16
|
|
var r5;
|
|
let value = a0.value;
|
|
if (typeof value === 'number') {
|
|
value = a0.value;
|
|
value = '' + value;
|
|
r5 = value;
|
|
} else {
|
|
r5 = a0.value;
|
|
}
|
|
value = environment.__proto__;
|
|
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
|
return (
|
|
<TableRadioRow
|
|
value={r5}
|
|
label={a0.label}
|
|
subLabel={a0.subLabel}
|
|
disabled={a0.disabled}
|
|
key={a0.value}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function _fun100541() { // fn#100541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:4652, offset: 0x021ec06a, size: 79 bytes, params: 1, frame: 14
|
|
var value2;
|
|
if (env0_0 != null) {
|
|
value2 = environment.__proto__;
|
|
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_0);
|
|
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
|
|
}
|
|
}
|
|
|
|
function _fun100545() { // fn#100545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:5764, offset: 0x021ec756, size: 24 bytes, params: 1, frame: 3
|
|
return env0_6.value ?? env0_4;
|
|
}
|
|
|
|
function _fun100547(a0) { // fn#100547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:5921, offset: 0x021ec780, size: 38 bytes, params: 2, frame: 13
|
|
env0_8(a0);
|
|
if (onValueChange != null) {
|
|
onValueChange(a0);
|
|
}
|
|
}
|
|
|
|
function _fun100548(a0) { // fn#100548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:5968, offset: 0x021ec7a6, size: 40 bytes, params: 2, frame: 12
|
|
env0_9(false);
|
|
if (onSlidingComplete != null) {
|
|
onSlidingComplete(a0);
|
|
}
|
|
}
|
|
|
|
function _fun100549(a0) { // fn#100549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:6016, offset: 0x021ec7ce, size: 38 bytes, params: 2, frame: 13
|
|
env0_10(a0);
|
|
if (onSlidingComplete != null) {
|
|
onSlidingComplete(a0);
|
|
}
|
|
}
|
|
|
|
function _fun100550() { // fn#100550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:6065, offset: 0x021ec7f4, size: 20 bytes, params: 1, frame: 11
|
|
return env0_11(env0_4);
|
|
}
|
|
|
|
function _fun100551() { // fn#100551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:6099, offset: 0x021ec808, size: 107 bytes, params: 1, frame: 15
|
|
const binding = env0_11;
|
|
const Math = global.Math;
|
|
binding(Math.min(env0_3, env0_7 + env0_1));
|
|
const value = environment.__proto__;
|
|
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
|
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
|
|
const IMPACT_LIGHT = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT;
|
|
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
|
|
}
|
|
|
|
function _fun100552() { // fn#100552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:6207, offset: 0x021ec873, size: 107 bytes, params: 1, frame: 15
|
|
const binding = env0_11;
|
|
const Math = global.Math;
|
|
binding(Math.max(env0_2, env0_7 - env0_1));
|
|
const value = environment.__proto__;
|
|
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
|
|
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
|
|
const IMPACT_LIGHT = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT;
|
|
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
|
|
}
|
|
|
|
function _fun100533() { // fn#100533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13364:2177, offset: 0x021eb981, size: 27 bytes, params: 1, frame: 11
|
|
return GuildStore.getGuild(env0_0);
|
|
}
|
|
|