258 lines
13 KiB
TypeScript
258 lines
13 KiB
TypeScript
/* Metro module 8336; source: components_native/ChangeLogStandardTemplate.tsx; dependencies: [31, 27, 1949, 661, 33, 697, 4501, 1305, 632, 8337, 683, 3853, 3855, 8339, 6622, 6618, 8341, 8343, 1244, 3768, 8345, 8347, 2] */
|
|
function _fun66362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:6, offset: 0x01bf8a61, size: 860 bytes, params: 8, frame: 29
|
|
var object2;
|
|
let env0_0 = require;
|
|
const getLinkComponent = function(a0) {
|
|
var env0_0 = a0;
|
|
return _fun66370;
|
|
};
|
|
const closure = changelogRules;
|
|
const closure2 = function(a0) {
|
|
return importDefault(dependencyMap[14]).reactParserFor(changelogRules(a0.id));
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const value2 = require(27) /* metro dependency 27 */;
|
|
const env0_4 = value2.View;
|
|
const StyleSheet = value2.StyleSheet;
|
|
const env0_5 = value2.ScrollView;
|
|
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
|
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
|
const env0_7 = constantsModule.LocalizedLinks;
|
|
const env0_8 = constantsModule.SOCIAL_LINKS;
|
|
const env0_9 = constantsModule.AnalyticEvents;
|
|
const Fonts = constantsModule.Fonts;
|
|
const value4 = require(33) /* metro dependency 33 */;
|
|
const env0_10 = value4.jsx;
|
|
const env0_11 = value4.jsxs;
|
|
object2 = {};
|
|
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
|
|
object2.added = GREEN_360;
|
|
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
|
object2.fixed = RED_400;
|
|
const YELLOW_300 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
|
|
object2.progress = YELLOW_300;
|
|
const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500;
|
|
object2.improved = BRAND_500;
|
|
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = createStylesModule.createStyles;
|
|
object2 = {};
|
|
object2.flex = {flex: 1};
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object2.container = {padding: 18, backgroundColor: BACKGROUND_BASE_LOW};
|
|
const object3 = {'flexDirection': 'row', 'justifyContent': 'center'};
|
|
object3.borderTopWidth = StyleSheet.hairlineWidth;
|
|
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
|
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
|
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
|
object3.borderTopColor = BORDER_STRONG;
|
|
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object3.gap = PX_12;
|
|
object3.paddingHorizontal = 18;
|
|
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object3.paddingVertical = PX_12;
|
|
object2.footer = object3;
|
|
object2.scrollViewContainer = {flex: 1};
|
|
object2.lheading = {'marginBottom': 14, 'flexDirection': 'row', 'alignItems': 'center'};
|
|
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
|
object2.lheadingText = {fontSize: 16, fontFamily: PRIMARY_SEMIBOLD};
|
|
object2.lheadingLine = {'flexGrow': 1, 'flexShrink': 1, 'flexBasis': 'auto', 'marginLeft': 10, 'height': 2};
|
|
const BACKGROUND_MOD_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_STRONG;
|
|
object2.bulletPoint = {'width': 7, 'height': 7, 'borderRadius': 3.5, 'marginRight': 13, 'marginTop': 7,
|
|
backgroundColor: BACKGROUND_MOD_STRONG};
|
|
object2.listItem = {'flexDirection': 'row', 'marginLeft': 4, 'marginBottom': 8};
|
|
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
|
object2.listText = {'color': null, 'fontSize': 14, 'lineHeight': 18, 'flex': 1, color: TEXT_DEFAULT};
|
|
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
|
const value6 = value.memo(_fun66373);
|
|
value = value.memo(_fun66374);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/ChangeLogStandardTemplate.tsx');
|
|
exports.default = value;
|
|
exports.ListItem = value6;
|
|
exports.changelogRules = closure;
|
|
exports.getRenderChangelog = closure2;
|
|
}
|
|
|
|
function LHeading({className, children}) { // fn#66363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1315, offset: 0x01bf8dbd, size: 186 bytes, params: 2, frame: 22
|
|
const closure = LHeadingGetStyles;
|
|
const styles = useStyles();
|
|
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
|
return (
|
|
<View style={styles.lheading}>
|
|
<LegacyText accessibilityRole="header" style={closure(styles.lheadingText, true)}>
|
|
{children}
|
|
</LegacyText>
|
|
<View style={closure(styles.lheadingLine, false)} />
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function LinkInner({changelogId, target, className, children}) { // fn#66366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1885, offset: 0x01bf8f07, size: 180 bytes, params: 2, frame: 21
|
|
const locale = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([LocaleStore],
|
|
function() {
|
|
return LocaleStore.locale;
|
|
});
|
|
const useCurrentChangelogModule = require(8337) /* metro dependency 8337: useCurrentChangelog */;
|
|
const useChangelog = useCurrentChangelogModule.useChangelog;
|
|
const env0_1 = Reflect.apply(useChangelog, useCurrentChangelogModule, [changelogId, locale]).changelog;
|
|
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
|
|
return (
|
|
<LegacyText
|
|
accessibilityRole="link"
|
|
style={className}
|
|
onPress={onPress_66368}
|
|
>
|
|
{children}
|
|
</LegacyText>
|
|
);
|
|
}
|
|
|
|
function getLinkComponent(a0) { // fn#66369, offset: 0x01bf90d4, size: 18 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return _fun66370;
|
|
}
|
|
|
|
function changelogRules(a0) { // fn#66371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2449, offset: 0x01bf9117, size: 158 bytes, params: 2, frame: 17
|
|
var getDefaultRules;
|
|
var object;
|
|
var getMessageRules;
|
|
var object4;
|
|
const value = a1;
|
|
let r0 = value !== undefined ? value : false;
|
|
const defaultImport = importDefault(8339) /* metro dependency 8339: ChangeLogUtils */;
|
|
if (r0) {
|
|
getMessageRules = defaultImport.getMessageRules;
|
|
object4 = {};
|
|
object4.Link = getLinkComponent(a0);
|
|
object4.ListItem = env0_14;
|
|
object4.LHeading = LHeading;
|
|
object4.Heading = LHeading;
|
|
r0 = Reflect.apply(getMessageRules, defaultImport, [{components: object4}]);
|
|
} else {
|
|
getDefaultRules = defaultImport.getDefaultRules;
|
|
object = {};
|
|
object.Link = getLinkComponent(a0);
|
|
object.ListItem = env0_14;
|
|
object.LHeading = LHeading;
|
|
object.Heading = LHeading;
|
|
r0 = Reflect.apply(getDefaultRules, defaultImport, [{components: object}]);
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun66373({children}) { // fn#66373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1708, offset: 0x01bf91ec, size: 152 bytes, params: 2, frame: 22
|
|
const styles = useStyles();
|
|
return (
|
|
<View style={styles.listItem}>
|
|
<View style={styles.bulletPoint} />
|
|
<View style={styles.listText}>
|
|
{typeof children !== 'function' ? children : children({style: styles.listText})}
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function _fun66374({changeLog, video, onScroll}) { // fn#66374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2812, offset: 0x01bf9284, size: 718 bytes, params: 2, frame: 30
|
|
const styles = useStyles();
|
|
const value2 = env0_3.useCallback(function({nativeEvent}) {
|
|
onScroll(nativeEvent);
|
|
}, [onScroll]);
|
|
const items2 = [video];
|
|
items2[1] = getRenderChangelog(changeLog)(changeLog.body, false);
|
|
const scrollView = <ScrollView contentContainerStyle={styles.container} style={styles.scrollViewContainer} onScroll={value2} scrollEventThrottle={3}>{items2}</ScrollView>;
|
|
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
|
|
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
|
const object = {'size': 'sm', 'variant': 'tertiary', 'accessibilityRole': 'link'};
|
|
const XNeutralIcon = (require(8343) /* metro dependency 8343: XNeutralIcon */).XNeutralIcon;
|
|
object.icon = <XNeutralIcon size="sm" color="interactive-icon-default" />;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/lXfom']);
|
|
object.onPress = function() {
|
|
importDefault(dependencyMap[11]).openURL(importDefault(dependencyMap[19])(LocalizedLinks.TWITTER));
|
|
};
|
|
const items3 = [<IconButton {...object} />];
|
|
const FacebookNeutralIcon = (require(8345) /* metro dependency 8345: FacebookNeutralIcon */).FacebookNeutralIcon;
|
|
items3[1] = <IconButton size="sm" variant="tertiary" accessibilityRole="link" icon={<FacebookNeutralIcon size="sm" color="interactive-icon-default" />} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['h0or/l'])} onPress={function() {
|
|
importDefault(dependencyMap[11]).openURL(SOCIAL_LINKS.FACEBOOK_URL);
|
|
}} />;
|
|
const InstagramNeutralIcon = (require(8347) /* metro dependency 8347: InstagramNeutralIcon */).InstagramNeutralIcon;
|
|
items3[2] = <IconButton size="sm" variant="tertiary" accessibilityRole="link" icon={<InstagramNeutralIcon size="sm" color="interactive-icon-default" />} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5uVPyf'])} onPress={function() {
|
|
importDefault(dependencyMap[11]).openURL(SOCIAL_LINKS.INSTAGRAM_URL);
|
|
}} />;
|
|
return (
|
|
<View style={styles.flex}>
|
|
{scrollView}
|
|
<SafeAreaPaddingView bottom style={styles.footer}>
|
|
{items3}
|
|
</SafeAreaPaddingView>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function LHeadingGetStyles(a0, a1) { // fn#66364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1369, owner: LHeading.getStyles, offset: 0x01bf8e77, size: 78 bytes, params: 3, frame: 12
|
|
const env0_0 = a1;
|
|
var value;
|
|
if (className != null) {
|
|
value = className.split(' ');
|
|
value = value.map(_fun66365);
|
|
return value.concat(a0);
|
|
}
|
|
}
|
|
|
|
function LinkInnerOnPress() { // fn#66368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2114, owner: LinkInner.onPress, offset: 0x01bf8fca, size: 266 bytes, params: 1, frame: 22
|
|
var r11;
|
|
var Date;
|
|
var value4;
|
|
let value = environment.__proto__;
|
|
const value2 = undefined;
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const CHANGE_LOG_CTA_CLICKED = AnalyticEvents.CHANGE_LOG_CTA_CLICKED;
|
|
let date = changelog == null ? value2 : changelog.date;
|
|
if (date != null) {
|
|
r11 = date;
|
|
} else {
|
|
Date = global.Date;
|
|
value4 = Object.create(Date.prototype, {constructor: {value: Date}});
|
|
date = new Date();
|
|
r11 = (date instanceof Object ? date : value4).toString();
|
|
}
|
|
const revision = changelog == null ? value2 : changelog.revision;
|
|
const targetBinding = target;
|
|
Reflect.apply(track, defaultImport, [CHANGE_LOG_CTA_CLICKED, {change_log_id: '' + r11 + ':' + (revision ?? 1),
|
|
cta_type: 'inline_link', target: targetBinding}]);
|
|
const defaultImport2 = importDefault(3853) /* metro dependency 3853: Linking */;
|
|
const openURL = defaultImport2.openURL;
|
|
value = require(3855) /* metro dependency 3855 */;
|
|
Reflect.apply(openURL, defaultImport2, [value.sanitizeUrl(targetBinding)]);
|
|
return value2;
|
|
}
|
|
|
|
function _fun66370(a0) { // fn#66370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:2412, offset: 0x01bf90e6, size: 49 bytes, params: 2, frame: 14
|
|
return <LinkInner {...a0} {...{['changelogId']: env0_0}} />;
|
|
}
|
|
|
|
function _fun66365(a0) { // fn#66365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8521:1429, offset: 0x01bf8ec5, size: 66 bytes, params: 2, frame: 4
|
|
var r0;
|
|
var value;
|
|
var object2;
|
|
var property;
|
|
if (a0 === 'marginTop') {
|
|
r0 = {marginTop: 10};
|
|
} else {
|
|
object2 = {};
|
|
value = environment.__proto__.__proto__;
|
|
property = env2_12[a0];
|
|
if (require) {
|
|
object2.color = property;
|
|
r0 = object2;
|
|
} else {
|
|
object2.backgroundColor = property;
|
|
r0 = object2;
|
|
}
|
|
}
|
|
return r0;
|
|
}
|
|
|