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,419 +1,484 @@
/* Metro module 12287; source: components_native/premium/EntitlementGiftGroupCard.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 4234, 1226, 8450, 3807, 4279, 661, 1880, 33, 4501, 697, 8451, 4573, 1244, 4578, 6829, 8467, 1305, 6780, 8708, 6818, 12288, 12289, 10519, 10521, 10522, 10520, 10523, 10524, 10525, 10526, 10527, 10530, 10533, 10534, 12290, 3868, 566, 8457, 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 Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import SubscriptionPlanStore from '../../stores/billing/SubscriptionPlanStore.tsx'; /* Metro dependency 3807 */
import ApplicationStore from '../../modules/applications/ApplicationStore.tsx'; /* Metro dependency 4234 */
import SKUStore from '../../stores/game_store/SKUStore.tsx'; /* Metro dependency 4279 */
import GiftCodeStore from '../../stores/GiftCodeStore.tsx'; /* Metro dependency 8450 */
import GiftCodeActionCreators from '../../actions/GiftCodeActionCreators.tsx'; /* Metro dependency 8451 */
import GiftCodeRow from './GiftCodeRow.tsx'; /* Metro dependency 12290 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun93864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6, offset: 0x020c76a7, size: 1064 bytes, params: 8, frame: 33
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_9 = value2.View;
const env0_10 = value2.ActivityIndicator;
const env0_11 = value2.TouchableWithoutFeedback;
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const giftCodeStore = importDefault(8450) /* metro dependency 8450: GiftCodeStore */;
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_16 = premiumConstantsModule.SubscriptionIntervalTypes;
const env0_17 = premiumConstantsModule.PremiumSubscriptionSKUs;
const env0_18 = premiumConstantsModule.PremiumGiftStyles;
const value9 = require(33) /* metro dependency 33 */;
const env0_19 = value9.jsx;
const env0_20 = value9.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object4 = {giftGroupCard: {'overflow': 'hidden', 'marginTop': 8}};
const object5 = {borderWidth: 1};
let value = ReactModule;
const Fonts = (ConstantsModule).Fonts;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {giftGroupCard: {'overflow': 'hidden', 'marginTop': 8}};
const object2 = {borderWidth: 1};
const CARD_BORDER_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BORDER_DEFAULT;
object5.borderColor = CARD_BORDER_DEFAULT;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object2.borderColor = CARD_BORDER_DEFAULT;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const TABLEROW_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TABLEROW_BACKGROUND_DEFAULT;
object5.backgroundColor = TABLEROW_BACKGROUND_DEFAULT;
object4.giftGroupCardRefresh = object5;
const object7 = {'fontSize': 16, 'lineHeight': 20};
object2.backgroundColor = TABLEROW_BACKGROUND_DEFAULT;
object.giftGroupCardRefresh = object2;
const object3 = {'fontSize': 16, 'lineHeight': 20};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object7.fontFamily = PRIMARY_SEMIBOLD;
object3.fontFamily = PRIMARY_SEMIBOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object7.color = MOBILE_TEXT_HEADING_PRIMARY;
object4.title = object7;
object3.color = MOBILE_TEXT_HEADING_PRIMARY;
object.title = object3;
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
object4.arrow = {color: ICON_SUBTLE};
object4.subtitle = {'fontSize': 14, 'lineHeight': 18};
object4.titleContainer = {'marginLeft': 8, 'flex': 1};
object4.groupCardHeader = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
object.arrow = {color: ICON_SUBTLE};
object.subtitle = {'fontSize': 14, 'lineHeight': 18};
object.titleContainer = {'marginLeft': 8, 'flex': 1};
object.groupCardHeader = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'padding': 16};
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.groupCardHeaderLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object4.rowArrow = {'height': 8, 'width': 12, 'marginRight': 8};
const object8 = {};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.giftIcon = object8;
object4.generateGiftRow = {'padding': 8, 'flexDirection': 'row', 'alignItems': 'center',
object.groupCardHeaderLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object.rowArrow = {'height': 8, 'width': 12, 'marginRight': 8};
const object6 = {};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.giftIcon = object6;
object.generateGiftRow = {'padding': 8, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between'};
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.generateGiftRowLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object4.generateGiftRowText = {flexShrink: 1};
object4.generateGiftButton = {marginLeft: 12};
object4.loading = {marginTop: 8};
object4.generateButtonContainer = {'flexGrow': 1, 'flexShrink': 0};
object.generateGiftRowLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
object.generateGiftRowText = {flexShrink: 1};
object.generateGiftButton = {marginLeft: 12};
object.loading = {marginTop: 8};
object.generateButtonContainer = {'flexGrow': 1, 'flexShrink': 0};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.groupCardHeaderOpen = {backgroundColor: BACKGROUND_BASE_LOWEST};
object.groupCardHeaderOpen = {backgroundColor: BACKGROUND_BASE_LOWEST};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object4.groupCardHeaderOpenRefresh = {backgroundColor: BACKGROUND_MOD_MUTED};
object4.subtitleContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
object4.socialLayerSubtitleContainer = {marginTop: 2};
const env0_21 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object4]);
object.groupCardHeaderOpenRefresh = {backgroundColor: BACKGROUND_MOD_MUTED};
object.subtitleContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
object.socialLayerSubtitleContainer = {marginTop: 2};
const env0_21 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const Component = value.Component;
value = _fun93868(Component);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
const flux = importDefault(566) /* metro dependency 566: flux */;
value = flux.connectStores([authenticationStore, skuStore, applicationStore, giftCodeStore, subscriptionPlanStore],
value = Flux.connectStores([AuthenticationStore, SKUStore, ApplicationStore, GiftCodeStore, SubscriptionPlanStore],
_fun93879)(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/EntitlementGiftGroupCard.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/EntitlementGiftGroupCard.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_93865() { // fn#93865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:416, offset: 0x020c7acf, 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_93865() { // fn#93865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:416, offset: 0x020c7acf, 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_93865_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_93865_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun93868(a0) { // fn#93868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:1968, offset: 0x020c7b31, size: 203 bytes, params: 2, frame: 16
const closure = EntitlementGiftGroupCard;
env0_7(closure, a0);
return env0_4(closure, [{key: 'componentDidMount', value: function() {
var Date = global.Date;
this._mountedAt = Date.now();
}}, {key: 'renderGenerateGiftCodeRow', value: value_93873}, {key: 'renderHeader', value: value_93874},
{key: 'getCardHeaderThumbnail', value: value_93875}, {key: 'renderCardHeader', value: value_93876},
{key: 'render', value: value_93877}]);
}
function _fun93868(a0) { // fn#93868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:1968, offset: 0x020c7b31, size: 203 bytes, params: 2, frame: 16
const EntitlementGiftGroupCard2 = EntitlementGiftGroupCard;
Inherits(EntitlementGiftGroupCard2, a0);
return CreateClass(EntitlementGiftGroupCard2, [{key: 'componentDidMount', value: function() {
var Date = global.Date;
this._mountedAt = Date.now();
}}, {key: 'renderGenerateGiftCodeRow', value: value_93873}, {key: 'renderHeader', value: value_93874},
{key: 'getCardHeaderThumbnail', value: value_93875}, {key: 'renderCardHeader', value: value_93876},
{key: 'render', value: value_93877}]);
function EntitlementGiftGroupCard(a0) { // fn#93869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:1980, offset: 0x020c7bfc, size: 181 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, EntitlementGiftGroupCard);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(EntitlementGiftGroupCard);
binding = env1_5;
if (_isNativeReflectConstruct_93865()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value._mountedAt = null;
value.state = {isOpen: false};
value.handleToggleOpen = handleToggleOpen;
value.handleGenerateGiftCode = handleGenerateGiftCode;
return value;
function handleToggleOpen() { // fn#93870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2295, owner: EntitlementGiftGroupCard.handleToggleOpen, offset: 0x020c7cb1, size: 138 bytes, params: 1, frame: 16
var value6;
let binding = env0_0;
const {skuId, subscriptionPlanId, loadedAt} = binding.props;
const value2 = !binding.state.isOpen;
let r1 = loadedAt != null && env0_0._mountedAt != null;
r1 = !r1 ? !value2 : r1;
if (!r1) {
value6 = environment.__proto__.__proto__;
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).fetchUserGiftCodesForSKU(skuId,
subscriptionPlanId);
}
binding = env0_0;
binding.setState({isOpen: value2});
}
function _fun93879({skuId, subscriptionPlanId, giftStyle}) { // fn#93879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6222, offset: 0x020c87cb, size: 282 bytes, params: 2, frame: 19
const value2 = SKUStore.get(skuId);
if (value2 == null) {
throw new global.Error('SKU was unavailable while rendering gift.');
}
const object2 = {sku: value2};
object2.isFetching = GiftCodeStore.getUserGiftCodesFetchingForSKUAndPlan(skuId, subscriptionPlanId);
object2.loadedAt = GiftCodeStore.getUserGiftCodesLoadedAtForSKUAndPlan(skuId, subscriptionPlanId);
object2.application = ApplicationStore.getApplication(value2.applicationId);
object2.subscriptionPlan = subscriptionPlanId != null ? (require(8457) /* metro dependency 8457: SubscriptionUtils */).getOrFetchSubscriptionPlan(subscriptionPlanId) : null;
const getForGifterSKUAndPlan = GiftCodeStore.getForGifterSKUAndPlan;
const getId = AuthenticationStore.getId;
let value = Reflect.apply(getForGifterSKUAndPlan, GiftCodeStore, [Reflect.apply(getId, AuthenticationStore, []),
skuId, subscriptionPlanId]);
value = value.filter(function(a0) {
return !a0.isClaimed;
});
object2.giftCodes = value.filter(function({giftStyle}) {
return giftStyle === giftStyle;
});
return object2;
}
function handleGenerateGiftCode() { // fn#93871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2499, owner: EntitlementGiftGroupCard.handleGenerateGiftCode, offset: 0x020c7d3b, size: 69 bytes, params: 1, frame: 16
const {skuId, subscriptionPlanId, giftStyle} = env0_0.props;
const value = environment.__proto__.__proto__;
(GiftCodeActionCreators).createGiftCode(skuId, subscriptionPlanId,
giftStyle);
}
function EntitlementGiftGroupCard(a0) { // fn#93869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:1980, offset: 0x020c7bfc, size: 181 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, EntitlementGiftGroupCard);
const items = [];
arraySpread(items, value, 0, items);
value = env1_6(EntitlementGiftGroupCard);
binding = env1_5;
if (_isNativeReflectConstruct_93865()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value._mountedAt = null;
value.state = {isOpen: false};
value.handleToggleOpen = handleToggleOpen;
value.handleGenerateGiftCode = handleGenerateGiftCode;
return value;
}
}
function value_93873() { // fn#93873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2774, offset: 0x020c7d9e, size: 349 bytes, params: 1, frame: 26
const value2 = env1_21(this.context);
const isRefreshEnabled = this.props.isRefreshEnabled;
const items2 = [value2.generateGiftRow];
items2[1] = isRefreshEnabled ? null : value2.generateGiftRowLegacy;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const generateGiftRowText = value2.generateGiftRowText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const text = <Text variant="text-xs/medium" color="text-subtle" style={generateGiftRowText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lELyPj)}</Text>;
const generateButtonContainer = value2.generateButtonContainer;
const generateGiftButton = value2.generateGiftButton;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<View style={items2}>
{text}
<View style={generateButtonContainer}>
<View style={generateGiftButton}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['w4+/BA'])}
size="sm"
onPress={this.handleGenerateGiftCode}
/>
function value_93873() { // fn#93873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2774, offset: 0x020c7d9e, size: 349 bytes, params: 1, frame: 26
const value2 = env1_21(this.context);
const isRefreshEnabled = this.props.isRefreshEnabled;
const items2 = [value2.generateGiftRow];
items2[1] = isRefreshEnabled ? null : value2.generateGiftRowLegacy;
const Text = (TextModule).Text;
const generateGiftRowText = value2.generateGiftRowText;
const intl = (IndexNativeModule).intl;
const text = (
<Text
variant="text-xs/medium"
color="text-subtle"
style={generateGiftRowText}
>
{intl.string((IndexNativeModule).t.lELyPj)}
</Text>
);
const generateButtonContainer = value2.generateButtonContainer;
const generateGiftButton = value2.generateGiftButton;
const Button = (ButtonNativeModule).Button;
return (
<View style={items2}>
{text}
<View style={generateButtonContainer}>
<View style={generateGiftButton}>
<Button
text={intl.string((IndexNativeModule).t['w4+/BA'])}
size="sm"
onPress={this.handleGenerateGiftCode}
/>
</View>
</View>
</View>
</View>
</View>
);
}
function value_93874(a0, a1) { // fn#93874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:3294, offset: 0x020c7efb, size: 1044 bytes, params: 3, frame: 39
var r10;
var r8;
const Icon = require(dependencyMap[23]).Icon;
var defaultImport;
var object;
var moduleValue2;
const value = environment.__proto__;
const value2 = env1_21(this.context);
const state = this.state;
const props = this.props;
const isOpen = state.isOpen;
const entitlements = props.entitlements;
const application = props.application;
const sku = props.sku;
const isRefreshEnabled = props.isRefreshEnabled;
let r21 = require(dependencyMap[21]).isGameItemSKU(sku) && application != null;
const r12 = isRefreshEnabled ? value2.groupCardHeaderOpenRefresh : value2.groupCardHeaderOpen;
const handleToggleOpen = this.handleToggleOpen;
const items3 = [value2.groupCardHeader];
const value4 = null;
items3[1] = isRefreshEnabled ? value4 : value2.groupCardHeaderLegacy;
items3[2] = isOpen ? r12 : value4;
if (r21) {
defaultImport = importDefault(dependencyMap[22]);
object = {sku: sku};
moduleValue2 = require(dependencyMap[23]);
object.size = moduleValue2.getIconSize(require(dependencyMap[23]).Icon.Sizes.LARGE);
object.containerStyle = value2.giftIcon;
r10 = ((Component) => <Component {...object} />)(defaultImport);
} else {
r10 = value4 != a0 ? <Icon resizeMode="contain" source={a0} disableColor size={require(dependencyMap[23]).Icon.Sizes.LARGE} style={value2.giftIcon} /> : value4;
}
const items2 = [r10];
const titleContainer = value2.titleContainer;
const Text = require(dependencyMap[18]).Text;
const text = <Text variant="heading-sm/semibold" color="mobile-text-heading-primary" accessibilityRole="header">{a1}</Text>;
const items4 = [r21 && value2.socialLayerSubtitleContainer];
items4[1] = value2.subtitleContainer;
const r18 = r21 && ((Component) => <Component game={application} size={importDefault(dependencyMap[24]).Sizes.SIZE_24} skuId={sku.id} />)(importDefault(dependencyMap[24]));
const subtitle = value2.subtitle;
const intl = require(dependencyMap[19]).intl;
const format = intl.format;
const t = require(dependencyMap[19]).t;
r21 = r21 ? Reflect.apply(format, intl, [t['6plpZi'], {applicationName: application.name,
copies: entitlements.length}]) : Reflect.apply(format, intl, [t.zMcvcA, {copies: entitlements.length}]);
items2[1] = <View style={titleContainer}>{text}<View style={items4}>{r18}<Text variant="text-md/normal" color="text-subtle" style={subtitle}>{r21}</Text></View></View>;
if (isRefreshEnabled) {
r8 = ((Component) => <Component />)(isOpen ? require(dependencyMap[25]).ChevronSmallDownIcon : require(dependencyMap[26]).ChevronSmallRightIcon);
} else {
r8 = <Icon style={value2.rowArrow} size={require(dependencyMap[23]).Icon.Sizes.LARGE} source={importDefault(isOpen ? dependencyMap[27] : dependencyMap[28])} color={value2.arrow.color} />;
}
items2[2] = r8;
return (
<TouchableWithoutFeedback accessibilityRole="button" onPress={handleToggleOpen}>
<View style={items3}>
{items2}
</View>
</TouchableWithoutFeedback>
);
}
function value_93875(a0, a1) { // fn#93875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:4673, offset: 0x020c830f, size: 516 bytes, params: 3, frame: 13
var object2;
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
if (STANDARD_BOX === a1) {
return importDefault(10519) /* metro dependency 10519 */;
}
const CAKE = PremiumGiftStyles.CAKE;
if (CAKE === a1) {
return importDefault(10521) /* metro dependency 10521 */;
}
const CHEST = PremiumGiftStyles.CHEST;
if (CHEST === a1) {
return importDefault(10522) /* metro dependency 10522 */;
}
const COFFEE = PremiumGiftStyles.COFFEE;
if (COFFEE === a1) {
return importDefault(10520) /* metro dependency 10520 */;
}
const SEASONAL_STANDARD_BOX = PremiumGiftStyles.SEASONAL_STANDARD_BOX;
if (SEASONAL_STANDARD_BOX === a1) {
return importDefault(10523) /* metro dependency 10523 */;
}
const SEASONAL_CAKE = PremiumGiftStyles.SEASONAL_CAKE;
if (SEASONAL_CAKE === a1) {
return importDefault(10524) /* metro dependency 10524 */;
}
const SEASONAL_CHEST = PremiumGiftStyles.SEASONAL_CHEST;
if (SEASONAL_CHEST === a1) {
return importDefault(10525) /* metro dependency 10525 */;
}
const SEASONAL_COFFEE = PremiumGiftStyles.SEASONAL_COFFEE;
if (SEASONAL_COFFEE === a1) {
return importDefault(10526) /* metro dependency 10526 */;
}
const NITROWEEN_STANDARD = PremiumGiftStyles.NITROWEEN_STANDARD;
if (NITROWEEN_STANDARD === a1) {
object2 = {};
object2.uri = importDefault(10527) /* metro dependency 10527: halloweenCardSmallPng */;
return object2;
}
const TIER_0 = PremiumSubscriptionSKUs.TIER_0;
if (TIER_0 === a0) {
return importDefault(10530) /* metro dependency 10530 */;
}
const TIER_1 = PremiumSubscriptionSKUs.TIER_1;
if (TIER_1 === a0) {
return importDefault(10533) /* metro dependency 10533 */;
}
const TIER_2 = PremiumSubscriptionSKUs.TIER_2;
if (TIER_2 === a0) {
return importDefault(10534) /* metro dependency 10534 */;
}
const LEGACY = PremiumSubscriptionSKUs.LEGACY;
if (LEGACY === a0) {
return importDefault(10534) /* metro dependency 10534 */;
}
return null;
}
function value_93876(a0) { // fn#93876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:5202, offset: 0x020c8513, size: 305 bytes, params: 2, frame: 21
var r2;
var renderHeader;
var iconSource;
var intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const {application, subscriptionPlan, giftStyle} = this.props;
const id = a0.id;
const name = a0.name;
let value = this.getCardHeaderThumbnail(id, giftStyle);
const Object = global.Object;
const value4 = Object.values(PremiumSubscriptionSKUs).includes(id);
const value5 = null;
if (value4) {
if (value5 == subscriptionPlan) {
return value5;
);
}
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return this.renderHeader(value,
intl.formatToPlainString(subscriptionPlan.interval === SubscriptionIntervalTypes.MONTH ? t.rCJvqo : t.Vd3Iu8,
{skuName: a0.name, intervalCount: subscriptionPlan.intervalCount}));
}
if (value5 == application) {
r2 = value5;
} else {
renderHeader = this.renderHeader;
iconSource = application.getIconSource(32);
value = Reflect.apply(renderHeader, this, [value5 == iconSource ? value : iconSource, name]);
r2 = value;
}
return r2;
}
function value_93877() { // fn#93877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:5663, offset: 0x020c8644, size: 303 bytes, params: 1, frame: 29
var environment;
var r9;
var r5;
var Fragment;
var items3;
const value = environment.__proto__;
const value2 = env1_21(this.context);
const {entitlements, giftCodes, sku, isFetching, isRefreshEnabled} = this.props;
const isOpen = this.state.isOpen;
const items2 = [value2.giftGroupCard];
const value3 = null;
items2[1] = isRefreshEnabled ? value2.giftGroupCardRefresh : value3;
const value4 = this.renderCardHeader(sku);
if (isOpen) {
if (isFetching) {
r9 = <ActivityIndicator style={value2.loading} />;
} else {
Fragment = env1_8.Fragment;
items3 = [giftCodes.length < entitlements.length ? this.renderGenerateGiftCodeRow() : value3];
items3[1] = giftCodes.map(_fun93878);
r9 = <Fragment>{items3}</Fragment>;
function value_93874(a0, a1) { // fn#93874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:3294, offset: 0x020c7efb, size: 1044 bytes, params: 3, frame: 39
var r10;
var r8;
const Icon = require(dependencyMap[23]).Icon;
var defaultImport;
var object2;
var moduleValue2;
const value = environment.__proto__;
const value2 = env1_21(this.context);
const state = this.state;
const props = this.props;
const isOpen = state.isOpen;
const entitlements = props.entitlements;
const application = props.application;
const sku = props.sku;
const isRefreshEnabled = props.isRefreshEnabled;
let r21 = require(dependencyMap[21]).isGameItemSKU(sku) && application != null;
const r12 = isRefreshEnabled ? value2.groupCardHeaderOpenRefresh : value2.groupCardHeaderOpen;
const handleToggleOpen = this.handleToggleOpen;
const items3 = [value2.groupCardHeader];
const value4 = null;
items3[1] = isRefreshEnabled ? value4 : value2.groupCardHeaderLegacy;
items3[2] = isOpen ? r12 : value4;
if (r21) {
defaultImport = importDefault(dependencyMap[22]);
object2 = {sku: sku};
moduleValue2 = require(dependencyMap[23]);
object2.size = moduleValue2.getIconSize(require(dependencyMap[23]).Icon.Sizes.LARGE);
object2.containerStyle = value2.giftIcon;
r10 = ((Component) => <Component {...object2} />)(defaultImport);
} else {
r10 = (
value4 != a0
? (
<Icon
resizeMode="contain"
source={a0}
disableColor
size={require(dependencyMap[23]).Icon.Sizes.LARGE}
style={value2.giftIcon}
/>
)
: value4
);
}
const items2 = [r10];
const titleContainer = value2.titleContainer;
const Text = require(dependencyMap[18]).Text;
const text = (
<Text
variant="heading-sm/semibold"
color="mobile-text-heading-primary"
accessibilityRole="header"
>
{a1}
</Text>
);
const items4 = [r21 && value2.socialLayerSubtitleContainer];
items4[1] = value2.subtitleContainer;
const r18 = r21 && ((Component) => <Component game={application} size={importDefault(dependencyMap[24]).Sizes.SIZE_24} skuId={sku.id} />)(importDefault(dependencyMap[24]));
const subtitle = value2.subtitle;
const intl = require(dependencyMap[19]).intl;
const format = intl.format;
const t = require(dependencyMap[19]).t;
r21 = r21 ? Reflect.apply(format, intl, [t['6plpZi'], {applicationName: application.name,
copies: entitlements.length}]) : Reflect.apply(format, intl, [t.zMcvcA, {copies: entitlements.length}]);
items2[1] = (
<View style={titleContainer}>
{text}
<View style={items4}>
{r18}
<Text
variant="text-md/normal"
color="text-subtle"
style={subtitle}
>
{r21}
</Text>
</View>
</View>
);
if (isRefreshEnabled) {
r8 = ((Component) => <Component />)(isOpen ? require(dependencyMap[25]).ChevronSmallDownIcon : require(dependencyMap[26]).ChevronSmallRightIcon);
} else {
r8 = (
<Icon
style={value2.rowArrow}
size={require(dependencyMap[23]).Icon.Sizes.LARGE}
source={importDefault(isOpen ? dependencyMap[27] : dependencyMap[28])}
color={value2.arrow.color}
/>
);
}
items2[2] = r8;
return (
<TouchableWithoutFeedback accessibilityRole="button" onPress={handleToggleOpen}>
<View style={items3}>
{items2}
</View>
</TouchableWithoutFeedback>
);
}
r5 = <View>{r9}</View>;
} else {
r5 = value3;
function value_93875(a0, a1) { // fn#93875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:4673, offset: 0x020c830f, size: 516 bytes, params: 3, frame: 13
var object;
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
if (STANDARD_BOX === a1) {
return importDefault(10519) /* metro dependency 10519 */;
}
const CAKE = PremiumGiftStyles.CAKE;
if (CAKE === a1) {
return importDefault(10521) /* metro dependency 10521 */;
}
const CHEST = PremiumGiftStyles.CHEST;
if (CHEST === a1) {
return importDefault(10522) /* metro dependency 10522 */;
}
const COFFEE = PremiumGiftStyles.COFFEE;
if (COFFEE === a1) {
return importDefault(10520) /* metro dependency 10520 */;
}
const SEASONAL_STANDARD_BOX = PremiumGiftStyles.SEASONAL_STANDARD_BOX;
if (SEASONAL_STANDARD_BOX === a1) {
return importDefault(10523) /* metro dependency 10523 */;
}
const SEASONAL_CAKE = PremiumGiftStyles.SEASONAL_CAKE;
if (SEASONAL_CAKE === a1) {
return importDefault(10524) /* metro dependency 10524 */;
}
const SEASONAL_CHEST = PremiumGiftStyles.SEASONAL_CHEST;
if (SEASONAL_CHEST === a1) {
return importDefault(10525) /* metro dependency 10525 */;
}
const SEASONAL_COFFEE = PremiumGiftStyles.SEASONAL_COFFEE;
if (SEASONAL_COFFEE === a1) {
return importDefault(10526) /* metro dependency 10526 */;
}
const NITROWEEN_STANDARD = PremiumGiftStyles.NITROWEEN_STANDARD;
if (NITROWEEN_STANDARD === a1) {
object = {};
object.uri = importDefault(10527) /* metro dependency 10527: halloweenCardSmallPng */;
return object;
}
const TIER_0 = PremiumSubscriptionSKUs.TIER_0;
if (TIER_0 === a0) {
return importDefault(10530) /* metro dependency 10530 */;
}
const TIER_1 = PremiumSubscriptionSKUs.TIER_1;
if (TIER_1 === a0) {
return importDefault(10533) /* metro dependency 10533 */;
}
const TIER_2 = PremiumSubscriptionSKUs.TIER_2;
if (TIER_2 === a0) {
return importDefault(10534) /* metro dependency 10534 */;
}
const LEGACY = PremiumSubscriptionSKUs.LEGACY;
if (LEGACY === a0) {
return importDefault(10534) /* metro dependency 10534 */;
}
return null;
}
function value_93876(a0) { // fn#93876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:5202, offset: 0x020c8513, size: 305 bytes, params: 2, frame: 21
var r2;
var renderHeader;
var iconSource;
var intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const {application, subscriptionPlan, giftStyle} = this.props;
const id = a0.id;
const name = a0.name;
let value = this.getCardHeaderThumbnail(id, giftStyle);
const Object = global.Object;
const value4 = Object.values(PremiumSubscriptionSKUs).includes(id);
const value5 = null;
if (value4) {
if (value5 == subscriptionPlan) {
return value5;
}
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return this.renderHeader(value,
intl.formatToPlainString(subscriptionPlan.interval === SubscriptionIntervalTypes.MONTH ? t.rCJvqo : t.Vd3Iu8,
{skuName: a0.name, intervalCount: subscriptionPlan.intervalCount}));
}
if (value5 == application) {
r2 = value5;
} else {
renderHeader = this.renderHeader;
iconSource = application.getIconSource(32);
value = Reflect.apply(renderHeader, this, [value5 == iconSource ? value : iconSource, name]);
r2 = value;
}
return r2;
}
function value_93877() { // fn#93877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:5663, offset: 0x020c8644, size: 303 bytes, params: 1, frame: 29
var environment;
var r9;
var r5;
var Fragment;
var items3;
const value = environment.__proto__;
const value2 = env1_21(this.context);
const {entitlements, giftCodes, sku, isFetching, isRefreshEnabled} = this.props;
const isOpen = this.state.isOpen;
const items2 = [value2.giftGroupCard];
const value3 = null;
items2[1] = isRefreshEnabled ? value2.giftGroupCardRefresh : value3;
const value4 = this.renderCardHeader(sku);
if (isOpen) {
if (isFetching) {
r9 = <ActivityIndicator style={value2.loading} />;
} else {
Fragment = env1_8.Fragment;
items3 = [giftCodes.length < entitlements.length ? this.renderGenerateGiftCodeRow() : value3];
items3[1] = giftCodes.map(_fun93878);
r9 = (
<Fragment>
{items3}
</Fragment>
);
}
r5 = (
<View>
{r9}
</View>
);
} else {
r5 = value3;
}
return (
<View style={items2}>
{value4}
{r5}
</View>
);
function _fun93878(a0, a1) { // fn#93878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6033, offset: 0x020c8773, size: 88 bytes, params: 3, frame: 18
const value = environment.__proto__.__proto__;
return ((Component) => <Component giftCode={a0} sku={sku} isFirst={a1 === 0} isRefreshEnabled={isRefreshEnabled} key={a0.code} />)(GiftCodeRow);
}
}
}
return (
<View style={items2}>
{value4}
{r5}
</View>
);
}
function handleToggleOpen() { // fn#93870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2295, owner: EntitlementGiftGroupCard.handleToggleOpen, offset: 0x020c7cb1, size: 138 bytes, params: 1, frame: 16
var value6;
let binding = env0_0;
const {skuId, subscriptionPlanId, loadedAt} = binding.props;
const value2 = !binding.state.isOpen;
let r1 = loadedAt != null && env0_0._mountedAt != null;
r1 = !r1 ? !value2 : r1;
if (!r1) {
value6 = environment.__proto__.__proto__;
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).fetchUserGiftCodesForSKU(skuId,
subscriptionPlanId);
function _fun93879({skuId, subscriptionPlanId, giftStyle}) { // fn#93879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6222, offset: 0x020c87cb, size: 282 bytes, params: 2, frame: 19
const value2 = SKUStore.get(skuId);
if (value2 == null) {
throw new global.Error('SKU was unavailable while rendering gift.');
}
const object = {sku: value2};
let giftCodeStoreBinding = GiftCodeStore;
object.isFetching = giftCodeStoreBinding.getUserGiftCodesFetchingForSKUAndPlan(skuId, subscriptionPlanId);
object.loadedAt = giftCodeStoreBinding.getUserGiftCodesLoadedAtForSKUAndPlan(skuId, subscriptionPlanId);
object.application = ApplicationStore.getApplication(value2.applicationId);
object.subscriptionPlan = subscriptionPlanId != null ? (require(8457) /* metro dependency 8457: SubscriptionUtils */).getOrFetchSubscriptionPlan(subscriptionPlanId) : null;
giftCodeStoreBinding = GiftCodeStore;
const getForGifterSKUAndPlan = giftCodeStoreBinding.getForGifterSKUAndPlan;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
let value = Reflect.apply(getForGifterSKUAndPlan, giftCodeStoreBinding, [Reflect.apply(getId,
authenticationStoreBinding, []), skuId, subscriptionPlanId]);
value = value.filter(function(a0) {
return !a0.isClaimed;
});
object.giftCodes = value.filter(function({giftStyle}) {
return giftStyle === giftStyle;
});
return object;
}
binding = env0_0;
binding.setState({isOpen: value2});
}
function handleGenerateGiftCode() { // fn#93871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:2499, owner: EntitlementGiftGroupCard.handleGenerateGiftCode, offset: 0x020c7d3b, size: 69 bytes, params: 1, frame: 16
const {skuId, subscriptionPlanId, giftStyle} = env0_0.props;
const value = environment.__proto__.__proto__;
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).createGiftCode(skuId, subscriptionPlanId,
giftStyle);
}
function _fun93878(a0, a1) { // fn#93878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12473:6033, offset: 0x020c8773, size: 88 bytes, params: 3, frame: 18
const value = environment.__proto__.__proto__;
return ((Component) => <Component giftCode={a0} sku={sku} isFirst={a1 === 0} isRefreshEnabled={isRefreshEnabled} key={a0.code} />)(importDefault(12290) /* metro dependency 12290: GiftCodeRow */);
}
global.__d(_fun93864, 12287, [6, 7, 15, 17, 18, 31, 27, 4234, 1226, 8450, 3807, 4279, 661, 1880, 33, 4501, 697,
8451, 4573, 1244, 4578, 6829, 8467, 1305, 6780, 8708, 6818, 12288, 12289, 10519, 10521, 10522, 10520, 10523,
10524, 10525, 10526, 10527, 10530, 10533, 10534, 12290, 3868, 566, 8457,
2]) /* metro module 12287, dependencies: [6, 7, 15, 17, 18, 31, 27, 4234, 1226, 8450, 3807, 4279, 661, 1880, 33, 4501, 697, 8451, 4573, 1244, 4578, 6829, 8467, 1305, 6780, 8708, 6818, 12288, 12289, 10519, 10521, 10522, 10520, 10523, 10524, 10525, 10526, 10527, 10530, 10533, 10534, 12290, 3868, 566, 8457, 2] */;
+243 -199
View File
@@ -1,223 +1,267 @@
/* Metro module 12290; source: components_native/premium/GiftCodeRow.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 4129, 9212, 8451, 6992, 4573, 4578, 1244, 3738, 1305, 3868, 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 GiftCodeActionCreators from '../../actions/GiftCodeActionCreators.tsx'; /* Metro dependency 8451 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as NativeModule2 from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun93884(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:6, offset: 0x020c8995, size: 710 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_8 = value2.View;
const StyleSheet = value2.StyleSheet;
const env0_9 = value2.TouchableWithoutFeedback;
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticsSections;
const value3 = require(33) /* metro dependency 33 */;
const env0_11 = value3.jsx;
const env0_12 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object2 = {};
object2.giftCodeRow = {paddingHorizontal: 16};
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
object = {};
object.giftCodeRow = {paddingHorizontal: 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.giftCodeRowLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
object.giftCodeRowLegacy = {backgroundColor: BACKGROUND_SURFACE_HIGH};
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
'marginVertical': 8, 'padding': 8};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.borderWidth = StyleSheet.hairlineWidth;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.borderWidth = StyleSheet.hairlineWidth;
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
object3.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object2.giftCodeShare = object3;
const object6 = {};
object4.backgroundColor = INPUT_BACKGROUND_DEFAULT;
object.giftCodeShare = object4;
const object5 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.marginTop = PX_16;
object5.marginTop = PX_16;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.marginBottom = PX_4;
object2.giftCodeInput = object6;
object5.marginBottom = PX_4;
object.giftCodeInput = object5;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.giftCodeInputContent = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
object.giftCodeInputContent = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
padding: PX_8};
object2.giftCodeShareButton = {marginLeft: 12};
object2.codeText = {flexShrink: 1};
object2.subTextRow = {'marginBottom': 8, 'flexDirection': 'row', 'alignItems': 'center'};
object2.expiryText = {'fontSize': 12, 'lineHeight': 16};
object.giftCodeShareButton = {marginLeft: 12};
object.codeText = {flexShrink: 1};
object.subTextRow = {'marginBottom': 8, 'flexDirection': 'row', 'alignItems': 'center'};
object.expiryText = {'fontSize': 12, 'lineHeight': 16};
const BLUE_345 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLUE_345;
object2.revokeHint = {color: BLUE_345};
object2.firstRow = {borderWidth: 0};
object2.buttonContainer = {'flexShrink': 0, 'flexGrow': 1};
const env0_13 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]);
object.revokeHint = {color: BLUE_345};
object.firstRow = {borderWidth: 0};
object.buttonContainer = {'flexShrink': 0, 'flexGrow': 1};
const env0_13 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object]);
const PureComponent = value.PureComponent;
value = _fun93888(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule2).ThemeContext;
value.contextType = ThemeContext;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/GiftCodeRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/GiftCodeRow.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_93885() { // fn#93885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:276, offset: 0x020c8c5b, 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_93885() { // fn#93885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:276, offset: 0x020c8c5b, 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_93885_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_93885_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun93888(a0) { // fn#93888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1352, offset: 0x020c8cbd, size: 99 bytes, params: 2, frame: 16
const closure = GiftCodeRow;
env0_7(closure, a0);
return env0_4(closure, [{key: 'handleRevoke', value: value_93891}, {key: 'render', value: value_93892}]);
}
function _fun93888(a0) { // fn#93888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1352, offset: 0x020c8cbd, size: 99 bytes, params: 2, frame: 16
const GiftCodeRow2 = GiftCodeRow;
Inherits(GiftCodeRow2, a0);
return CreateClass(GiftCodeRow2, [{key: 'handleRevoke', value: value_93891}, {key: 'render', value: value_93892}]);
function GiftCodeRow(a0) { // fn#93889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1364, offset: 0x020c8d20, size: 145 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, GiftCodeRow);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(GiftCodeRow);
binding = env1_5;
if (_isNativeReflectConstruct_93885()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleShare = handleShare;
return value;
function handleShare() { // fn#93890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1597, owner: GiftCodeRow.handleShare, offset: 0x020c8db1, size: 146 bytes, params: 1, frame: 18
var moduleValue2;
var showShareActionSheet;
var moduleValue3;
const {giftCode, sku} = env0_0.props;
let value = giftCode != null;
if (value && sku != null) {
value = environment.__proto__.__proto__;
(require(4129) /* metro dependency 4129: GiftCodeUtils */).trackGiftCodeCopy(giftCode, sku);
moduleValue2 = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue2.showShareActionSheet;
moduleValue3 = require(4129) /* metro dependency 4129: GiftCodeUtils */;
Reflect.apply(showShareActionSheet, moduleValue2, [{url: moduleValue3.getGiftCodeURL(giftCode.code)},
AnalyticsSections.GIFT_CODE_ROW]);
}
}
}
function value_93891(a0) { // fn#93891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1842, offset: 0x020c8e43, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__;
(GiftCodeActionCreators).revokeGiftCode(a0);
}
function value_93892() { // fn#93892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1903, offset: 0x020c8e6c, size: 958 bytes, params: 1, frame: 36
var environment;
var view;
var r8;
const Text = (TextModule).Text;
var moduleValue;
var items2;
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var InputFieldContainer;
var moduleValue2;
var items4;
var format;
var b1BfWD;
var diff;
let value = environment.__proto__;
const value2 = env1_13(this.context);
const {giftCode, isFirst, isRefreshEnabled} = this.props;
const items3 = [value2.giftCodeRow];
const value3 = null;
items3[1] = isRefreshEnabled ? value3 : value2.giftCodeRowLegacy;
items3[2] = isFirst ? value2.firstRow : value3;
if (isRefreshEnabled) {
var viewBinding3Props = {style: value2.giftCodeInput};
InputFieldContainer = (require(6992) /* metro dependency 6992: InputFieldContainerNative */).InputFieldContainer;
var viewBinding3Props2 = {style: value2.giftCodeInputContent};
var textProps = {'variant': 'text-sm/normal', 'style': null, 'lineClamp': 1, style: value2.codeText};
moduleValue2 = require(4129) /* metro dependency 4129: GiftCodeUtils */;
items4 = [
<Text {...textProps}>
{moduleValue2.getGiftCodeURL(giftCode.code)}
</Text>,
];
items4[1] = (
<View style={[value2.buttonContainer, value2.giftCodeShareButton]}>
<Button
size="sm"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h5EvZM)}
onPress={this.handleShare}
/>
</View>
);
view = (
<View {...viewBinding3Props}>
<InputFieldContainer>
<View {...viewBinding3Props2}>
{items4}
</View>
</InputFieldContainer>
</View>
);
} else {
var viewBinding2Props = {style: value2.giftCodeShare};
var textProps = {'variant': 'text-sm/normal', 'style': null, 'lineClamp': 1, style: value2.codeText};
moduleValue = require(4129) /* metro dependency 4129: GiftCodeUtils */;
items2 = [
<Text {...textProps}>
{moduleValue.getGiftCodeURL(giftCode.code)}
</Text>,
];
items2[1] = (
<View style={[value2.buttonContainer, value2.giftCodeShareButton]}>
<Button
size="sm"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h5EvZM)}
onPress={this.handleShare}
/>
</View>
);
view = (
<View {...viewBinding2Props}>
{items2}
</View>
);
}
const subTextRow = value2.subTextRow;
let expiresAt = giftCode.expiresAt;
if (value3 != expiresAt) {
format = intl.format;
b1BfWD = (require(1244) /* metro dependency 1244: indexNative */).t.b1BfWD;
expiresAt = giftCode.expiresAt;
diff = expiresAt.diff;
value = (importDefault(3738) /* metro dependency 3738 */)();
value = (
<Text variant="text-xs/normal" color="text-subtle">
{Reflect.apply(format, intl, [b1BfWD, {hours: Reflect.apply(diff, expiresAt, [value, 'h']),
revokeHook: revokeHook}])}
</Text>
);
r8 = value;
} else {
r8 = value3;
}
return (
<View style={items3}>
{view}
<View style={subTextRow}>
{r8}
</View>
</View>
);
function revokeHook(a0, a1) { // fn#93893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:3024, owner: value_93892.revokeHook, offset: 0x020c922a, size: 128 bytes, params: 3, frame: 19
const object = {accessibilityRole: 'button', onPress: onPress_93894};
const LegacyText = (NativeModule).LegacyText;
const binding = env0_1;
return (
<TouchableWithoutFeedback {...object} key={a1}>
<LegacyText style={[binding.expiryText, binding.revokeHint]}>
{a0}
</LegacyText>
</TouchableWithoutFeedback>
);
function revokeHookOnPress() { // fn#93894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:3071, owner: value_93892.revokeHook.onPress, offset: 0x020c92aa, size: 31 bytes, params: 1, frame: 11
const binding = env1_0;
return binding.handleRevoke(giftCode.code);
}
}
}
function GiftCodeRow(a0) { // fn#93889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1364, offset: 0x020c8d20, size: 145 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, GiftCodeRow);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(GiftCodeRow);
binding = env1_5;
if (_isNativeReflectConstruct_93885()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handleShare = handleShare_93890;
return value;
}
function value_93891(a0) { // fn#93891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1842, offset: 0x020c8e43, size: 41 bytes, params: 2, frame: 12
const value = environment.__proto__;
(importDefault(8451) /* metro dependency 8451: GiftCodeActionCreators */).revokeGiftCode(a0);
}
function value_93892() { // fn#93892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1903, offset: 0x020c8e6c, size: 958 bytes, params: 1, frame: 36
var environment;
var view;
var r8;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var moduleValue;
var items2;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var InputFieldContainer;
var moduleValue2;
var items4;
var format;
var b1BfWD;
var diff;
let value = environment.__proto__;
const value2 = env1_13(this.context);
const {giftCode, isFirst, isRefreshEnabled} = this.props;
const items3 = [value2.giftCodeRow];
const value3 = null;
items3[1] = isRefreshEnabled ? value3 : value2.giftCodeRowLegacy;
items3[2] = isFirst ? value2.firstRow : value3;
if (isRefreshEnabled) {
var viewBinding3Props = {style: value2.giftCodeInput};
InputFieldContainer = (require(6992) /* metro dependency 6992: InputFieldContainerNative */).InputFieldContainer;
var viewBinding3Props2 = {style: value2.giftCodeInputContent};
var textProps = {'variant': 'text-sm/normal', 'style': null, 'lineClamp': 1, style: value2.codeText};
moduleValue2 = require(4129) /* metro dependency 4129: GiftCodeUtils */;
items4 = [<Text {...textProps}>{moduleValue2.getGiftCodeURL(giftCode.code)}</Text>];
items4[1] = <View style={[value2.buttonContainer,
value2.giftCodeShareButton]}><Button size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h5EvZM)} onPress={this.handleShare} /></View>;
view = <View {...viewBinding3Props}><InputFieldContainer><View {...viewBinding3Props2}>{items4}</View></InputFieldContainer></View>;
} else {
var viewBinding2Props = {style: value2.giftCodeShare};
var textProps = {'variant': 'text-sm/normal', 'style': null, 'lineClamp': 1, style: value2.codeText};
moduleValue = require(4129) /* metro dependency 4129: GiftCodeUtils */;
items2 = [<Text {...textProps}>{moduleValue.getGiftCodeURL(giftCode.code)}</Text>];
items2[1] = <View style={[value2.buttonContainer,
value2.giftCodeShareButton]}><Button size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.h5EvZM)} onPress={this.handleShare} /></View>;
view = <View {...viewBinding2Props}>{items2}</View>;
}
const subTextRow = value2.subTextRow;
let expiresAt = giftCode.expiresAt;
if (value3 != expiresAt) {
format = intl.format;
b1BfWD = (require(1244) /* metro dependency 1244: indexNative */).t.b1BfWD;
expiresAt = giftCode.expiresAt;
diff = expiresAt.diff;
value = (importDefault(3738) /* metro dependency 3738 */)();
value = <Text variant="text-xs/normal" color="text-subtle">{Reflect.apply(format, intl, [b1BfWD,
{hours: Reflect.apply(diff, expiresAt, [value, 'h']), revokeHook: revokeHook}])}</Text>;
r8 = value;
} else {
r8 = value3;
}
return (
<View style={items3}>
{view}
<View style={subTextRow}>
{r8}
</View>
</View>
);
}
function GiftCodeRowHandleShare() { // fn#93890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:1597, owner: GiftCodeRow.handleShare, offset: 0x020c8db1, size: 146 bytes, params: 1, frame: 18
var moduleValue2;
var showShareActionSheet;
var moduleValue3;
const {giftCode, sku} = env0_0.props;
let value = giftCode != null;
if (value && sku != null) {
value = environment.__proto__.__proto__;
(require(4129) /* metro dependency 4129: GiftCodeUtils */).trackGiftCodeCopy(giftCode, sku);
moduleValue2 = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
showShareActionSheet = moduleValue2.showShareActionSheet;
moduleValue3 = require(4129) /* metro dependency 4129: GiftCodeUtils */;
Reflect.apply(showShareActionSheet, moduleValue2, [{url: moduleValue3.getGiftCodeURL(giftCode.code)},
AnalyticsSections.GIFT_CODE_ROW]);
}
}
function revokeHook(a0, a1) { // fn#93893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:3024, owner: value_93892.revokeHook, offset: 0x020c922a, size: 128 bytes, params: 3, frame: 19
const object2 = {accessibilityRole: 'button', onPress: onPress_93894};
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const binding = env0_1;
return (
<TouchableWithoutFeedback {...object2} key={a1}>
<LegacyText style={[binding.expiryText, binding.revokeHint]}>
{a0}
</LegacyText>
</TouchableWithoutFeedback>
);
}
function revokeHookOnPress() { // fn#93894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12476:3071, owner: value_93892.revokeHook.onPress, offset: 0x020c92aa, size: 31 bytes, params: 1, frame: 11
const binding = env1_0;
return binding.handleRevoke(giftCode.code);
}
global.__d(_fun93884, 12290, [6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 4129, 9212, 8451, 6992, 4573, 4578,
1244, 3738, 1305, 3868,
2]) /* metro module 12290, dependencies: [6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 4129, 9212, 8451, 6992, 4573, 4578, 1244, 3738, 1305, 3868, 2] */;
@@ -1,272 +1,288 @@
/* Metro module 12294; source: components_native/premium/GiftPurchaseButton.tsx; dependencies: [5, 31, 27, 3808, 5140, 33, 4583, 4573, 566, 5143, 7355, 6771, 10385, 4496, 1244, 3802, 10381, 4579, 12295, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import SubscriptionStore from '../../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */
import IAPStoreAndroid from '../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import UseAnalyticsLocations from '../../modules/app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import RenderPremiumButtonText from '../../modules/premium/native/renderPremiumButtonText.tsx'; /* Metro dependency 12295 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as BaseTextButtonNativeModule from '../../design/components/Button/native/BaseTextButton.native.tsx'; /* Metro dependency 4579 */
import * as ButtonHooksNativeModule from '../../design/components/Button/native/ButtonHooks.native.tsx'; /* Metro dependency 4583 */
import * as ProductIdsAndroidModule from '../../modules/premium/native/ProductIds.android.tsx'; /* Metro dependency 5143 */
import * as IAPUtilsModule from '../../utils/native/IAPUtils.tsx'; /* Metro dependency 7355 */
import * as CreateOrReuseGiftOrderModule from '../../modules/payments/native/utils/createOrReuseGiftOrder.tsx'; /* Metro dependency 10385 */
function _fun93899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:6, offset: 0x020c9868, size: 211 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/GiftPurchaseButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/GiftPurchaseButton.tsx');
exports.default = GiftPurchaseButton;
}
function GiftPurchaseButton({style, variant, planId, analyticsLocation = {}, recipientUserId}) { // fn#93900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:171, offset: 0x020c993b, size: 598 bytes, params: 2, frame: 31
variant = variant === undefined ? 'primary' : variant;
const value2 = (ButtonHooksNativeModule).useButtonTextColorStyles(variant);
const object = {};
const TextStyleSheet = (TextModule).TextStyleSheet;
copyDataProperties(object, TextStyleSheet['text-sm/semibold'], undefined);
copyDataProperties(object, value2, undefined);
let useStateFromStores = FluxModule.useStateFromStores;
const premiumSubscription = Reflect.apply(useStateFromStores, FluxModule, [[SubscriptionStore], function() {
return SubscriptionStore.getPremiumSubscription();
}]);
const productIdForGift = (ProductIdsAndroidModule).getProductIdForGift(planId);
const productIdForGift2 = productIdForGift;
const value4 = (IAPUtilsModule).useCanPurchaseIAP(productIdForGift);
useStateFromStores = FluxModule.useStateFromStores;
const iapStoreAndroidBinding = IAPStoreAndroid;
const value5 = Reflect.apply(useStateFromStores, FluxModule, [[iapStoreAndroidBinding], _fun93902]);
const product = FluxModule.useStateFromStores([iapStoreAndroidBinding], _fun93903);
const r6 = premiumSubscription != null && premiumSubscription.planId === planId;
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const value10 = analyticsLocations.useCallback(productIdForGift2(_fun93905), [planId, recipientUserId,
analyticsLocation, analyticsLocations,
(CreateOrReuseGiftOrderModule).useCreateOrReuseGiftOrder('GiftPurchaseButton')]);
const BaseTextButton = (BaseTextButtonNativeModule).BaseTextButton;
return (
<View style={style}>
<BaseTextButton
textElement={(RenderPremiumButtonText)({style: object,
basePlanId: planId, isCurrentPlan: r6, isGift: true, product: product})}
variant={variant}
size="sm"
onPress={value10}
loading={value5}
disabled={!value4}
grow
/>
</View>
);
function _fun93902() { // fn#93902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:543, offset: 0x020c9ba4, size: 27 bytes, params: 1, frame: 11
return IAPStoreAndroid.isPurchasingProduct(Module00005);
}
function GiftPurchaseButton({style, variant, planId, analyticsLocation = {}, recipientUserId}) { // fn#93900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:171, offset: 0x020c993b, size: 598 bytes, params: 2, frame: 31
variant = variant === undefined ? 'primary' : variant;
const value2 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonTextColorStyles(variant);
const object2 = {};
const TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet;
copyDataProperties(object2, TextStyleSheet['text-sm/semibold'], undefined);
copyDataProperties(object2, value2, undefined);
const premiumSubscription = (require(566) /* metro dependency 566: flux */).useStateFromStores([SubscriptionStore],
function() {
return SubscriptionStore.getPremiumSubscription();
});
const productIdForGift = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).getProductIdForGift(planId);
const env0_3 = productIdForGift;
const value4 = (require(7355) /* metro dependency 7355: IAPUtils */).useCanPurchaseIAP(productIdForGift);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], _fun93902);
const product = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], _fun93903);
const r6 = premiumSubscription != null && premiumSubscription.planId === planId;
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const value10 = analyticsLocations.useCallback(env0_3(_fun93905), [planId, recipientUserId, analyticsLocation,
analyticsLocations,
(require(10385) /* metro dependency 10385: createOrReuseGiftOrder */).useCreateOrReuseGiftOrder('GiftPurchaseButton')]);
const BaseTextButton = (require(4579) /* metro dependency 4579: BaseTextButtonNative */).BaseTextButton;
return (
<View style={style}>
<BaseTextButton
textElement={(importDefault(12295) /* metro dependency 12295: renderPremiumButtonText */)({style: object2,
basePlanId: planId, isCurrentPlan: r6, isGift: true, product: product})}
variant={variant}
size="sm"
onPress={value10}
loading={value5}
disabled={!value4}
grow
/>
</View>
);
}
function _fun93903() { // fn#93903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:608, offset: 0x020c9bbf, size: 27 bytes, params: 1, frame: 11
return IAPStoreAndroid.getProduct(Module00005);
}
function _fun93902() { // fn#93902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:543, offset: 0x020c9ba4, size: 27 bytes, params: 1, frame: 11
return IAPStoreAndroid.isPurchasingProduct(env0_3);
}
function* _fun93905() { // fn#93905, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:764, offset: 0x020c9be5, size: 334 bytes, params: 1, frame: 19
var object;
var value3;
var value4;
var value5;
var binding;
var error;
var binding3;
var value10;
var show;
var intl;
var string;
var t;
var R0RpRX;
var CKsXk3;
if (true) {
value = environment.__proto__;
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
object = {};
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
object.planId = require;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
object.recipientUserId = dependencyMap;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
try {
value3 = View(object);
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object]);
return undefined;
}
if (value5) {
return value4;
}
binding = env2_0;
var binding2 = env2_2;
var {premiumType, planInterval} = binding(binding2[15]).getPremiumTypeFromPlanId(require);
binding(binding2[16]).openGiftModal({recipientUserId: dependencyMap, premiumType: premiumType,
planInterval: planInterval, analyticsLocation: importDefault, analyticsLocations: env1_4, order: value4});
}
}
function _fun93903() { // fn#93903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:608, offset: 0x020c9bbf, size: 27 bytes, params: 1, frame: 11
return IAPStoreAndroid.getProduct(env0_3);
}
function* _fun93905() { // fn#93905, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12480:764, offset: 0x020c9be5, size: 334 bytes, params: 1, frame: 19
var object2;
var value3;
var value4;
var value5;
var binding;
var error;
var binding3;
var value10;
var show;
var intl;
var string;
var t;
var R0RpRX;
var CKsXk3;
if (true) {
value = environment.__proto__;
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
object2 = {};
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
object2.planId = require;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
object2.recipientUserId = dependencyMap;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
try {
value3 = View(object2);
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
yield value3;
try {
value4 = undefined;
value5 = false;
} catch (error) {
value = environment.__proto__.__proto__;
binding = env2_1;
binding3 = env2_2;
value10 = binding(binding3[13]);
show = value10.show;
object2 = {};
binding = env2_0;
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding3[14]).intl;
string = intl.string;
t = binding(binding3[14]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value10, [object2]);
return undefined;
}
if (value5) {
return value4;
}
binding = env2_0;
var binding2 = env2_2;
var {premiumType, planInterval} = binding(binding2[15]).getPremiumTypeFromPlanId(require);
binding(binding2[16]).openGiftModal({recipientUserId: dependencyMap, premiumType: premiumType,
planInterval: planInterval, analyticsLocation: importDefault, analyticsLocations: env1_4, order: value4});
}
}
global.__d(_fun93899, 12294, [5, 31, 27, 3808, 5140, 33, 4583, 4573, 566, 5143, 7355, 6771, 10385, 4496, 1244, 3802,
10381, 4579, 12295,
2]) /* metro module 12294, dependencies: [5, 31, 27, 3808, 5140, 33, 4583, 4573, 566, 5143, 7355, 6771, 10385, 4496, 1244, 3802, 10381, 4579, 12295, 2] */;
@@ -1,88 +1,128 @@
/* Metro module 12265; source: components_native/premium/GuildBoostingGuildList.tsx; dependencies: [31, 27, 1867, 4896, 661, 33, 4501, 697, 4048, 566, 8254, 8792, 6947, 7508, 6819, 4573, 11072, 1244, 12234, 2] */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UseTheme from '../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import SortedGuildStore from '../../stores/SortedGuildStore.tsx'; /* Metro dependency 4896 */
import UserSettingsModalActionCreators from '../../actions/UserSettingsModalActionCreators.tsx'; /* Metro dependency 7508 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TransitionToGuildNativeModule from '../../modules/routing/transitionToGuild.native.tsx'; /* Metro dependency 6947 */
function _fun93733(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:6, offset: 0x020c11dd, size: 407 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).NUMBER_OF_GUILDS_TO_RECOMMEND_BOOSTING;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'padding': 12, 'paddingLeft': 16, 'borderRadius': null, 'marginBottom': 8, 'minHeight': 96,
const object2 = {'padding': 12, 'paddingLeft': 16, 'borderRadius': null, 'marginBottom': 8, 'minHeight': 96,
'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center'};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
const env0_10 = Reflect.apply(createStyles, value, [{guildCard: object, guildIcon: {marginRight: 16},
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
const env0_10 = Reflect.apply(createStyles, value, [{guildCard: object2, guildIcon: {marginRight: 16},
guildCardDescription: {flex: 1}, subscriptionInfo: {'flexDirection': 'row', 'alignItems': 'center'},
premiumGuildImage: {'width': 18, 'height': 12, 'marginLeft': -5}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/GuildBoostingGuildList.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/GuildBoostingGuildList.tsx');
exports.default = GuildBoostingGuildList;
}
function GuildBoostingGuildListItem({guildId}) { // fn#93734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:638, offset: 0x020c1374, size: 635 bytes, params: 2, frame: 36
var r0;
var TouchableHitBox;
var items4;
const Text = (TextModule).Text;
var items2;
var items3;
var intl;
var value;
const styles = useStyles();
const value3 = (UseTheme)();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
if (guild == null) {
r0 = null;
} else {
TouchableHitBox = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var defaultImport2Props = {style: styles.guildCard, activeOpacity: 0.5, onPress: onPress_93736};
items4 = [
((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} style={styles.guildIcon} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */),
];
var viewBindingProps = {style: styles.guildCardDescription};
items2 = [
<Text variant="text-md/bold">
{guild.name}
</Text>,
];
var viewBinding2Props = {style: styles.subscriptionInfo};
items3 = [
<Image
source={importDefault(11072) /* metro dependency 11072 */}
style={styles.premiumGuildImage}
resizeMode="contain"
resizeMethod="resize"
/>,
];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = (
<Text variant="text-xs/medium">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.If4iTS,
{subscriberCount: (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(guild?.id).total})}
</Text>
);
items2[1] = (
<View {...viewBinding2Props}>
{items3}
</View>
);
items4[1] = (
<View {...viewBindingProps}>
{items2}
</View>
);
value = importDefault(12234) /* metro dependency 12234: BoostedGuildTierProgressCircle */;
items4[2] = ((Component) => <Component guild={guild} theme={value3} />)(value);
value = (
<TouchableHitBox {...defaultImport2Props}>
{items4}
</TouchableHitBox>
);
r0 = value;
}
return r0;
function GuildBoostingGuildListItemOnPress() { // fn#93736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:876, owner: GuildBoostingGuildListItem.onPress, offset: 0x020c15ef, size: 89 bytes, params: 1, frame: 18
const value = environment.__proto__;
TransitionToGuildNativeModule.transitionToGuild(guildId, {state: {shouldShowSubscribeTooltip: true}});
(UserSettingsModalActionCreators).close();
}
function GuildBoostingGuildListItem({guildId}) { // fn#93734, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:638, offset: 0x020c1374, size: 635 bytes, params: 2, frame: 36
var r0;
var TouchableHitBox;
var items4;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
var items3;
var intl;
var value;
const styles = useStyles();
const value3 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
if (guild == null) {
r0 = null;
} else {
TouchableHitBox = importDefault(8792) /* metro dependency 8792: TouchableHitBox */;
var defaultImport2Props = {style: styles.guildCard, activeOpacity: 0.5, onPress: onPress_93736};
items4 = [((Component) => <Component guild={guild} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.LARGE} style={styles.guildIcon} selected={false} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)];
var viewBindingProps = {style: styles.guildCardDescription};
items2 = [<Text variant="text-md/bold">{guild.name}</Text>];
var viewBinding2Props = {style: styles.subscriptionInfo};
items3 = [<Image source={importDefault(11072) /* metro dependency 11072 */} style={styles.premiumGuildImage} resizeMode="contain" resizeMethod="resize" />];
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Text variant="text-xs/medium">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.If4iTS,
{subscriberCount: (importDefault(8254) /* metro dependency 8254: useGuildPowerupsBoostCount */)(guild?.id).total})}</Text>;
items2[1] = <View {...viewBinding2Props}>{items3}</View>;
items4[1] = <View {...viewBindingProps}>{items2}</View>;
value = importDefault(12234) /* metro dependency 12234: BoostedGuildTierProgressCircle */;
items4[2] = ((Component) => <Component guild={guild} theme={value3} />)(value);
value = <TouchableHitBox {...defaultImport2Props}>{items4}</TouchableHitBox>;
r0 = value;
}
return r0;
}
function GuildBoostingGuildList({guildCount = NUMBER_OF_GUILDS_TO_RECOMMEND_BOOSTING, style}) { // fn#93737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:1464, offset: 0x020c1648, size: 138 bytes, params: 2, frame: 18
return (
<View style={style}>
{(require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], function() {
return SortedGuildStore.getFlattenedGuildIds();
}).slice(0, guildCount).map(_fun93739)}
</View>
);
}
function GuildBoostingGuildList({guildCount = NUMBER_OF_GUILDS_TO_RECOMMEND_BOOSTING, style}) { // fn#93737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:1464, offset: 0x020c1648, size: 138 bytes, params: 2, frame: 18
return (
<View style={style}>
{(require(566) /* metro dependency 566: flux */).useStateFromStores([SortedGuildStore], function() {
return SortedGuildStore.getFlattenedGuildIds();
}).slice(0, guildCount).map(_fun93739)}
</View>
);
function _fun93739(a0) { // fn#93739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:1638, offset: 0x020c16d2, size: 31 bytes, params: 2, frame: 15
return <GuildBoostingGuildListItem guildId={a0} key={a0} />;
}
function GuildBoostingGuildListItemOnPress() { // fn#93736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:876, owner: GuildBoostingGuildListItem.onPress, offset: 0x020c15ef, size: 89 bytes, params: 1, frame: 18
const value = environment.__proto__;
const transitionToGuildNativeModule = require(6947) /* metro dependency 6947: transitionToGuildNative */;
transitionToGuildNativeModule.transitionToGuild(guildId, {state: {shouldShowSubscribeTooltip: true}});
(importDefault(7508) /* metro dependency 7508: UserSettingsModalActionCreators */).close();
}
}
function _fun93739(a0) { // fn#93739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12451:1638, offset: 0x020c16d2, size: 31 bytes, params: 2, frame: 15
return <GuildBoostingGuildListItem guildId={a0} key={a0} />;
}
global.__d(_fun93733, 12265, [31, 27, 1867, 4896, 661, 33, 4501, 697, 4048, 566, 8254, 8792, 6947, 7508, 6819, 4573,
11072, 1244, 12234,
2]) /* metro module 12265, dependencies: [31, 27, 1867, 4896, 661, 33, 4501, 697, 4048, 566, 8254, 8792, 6947, 7508, 6819, 4573, 11072, 1244, 12234, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,158 +1,218 @@
/* Metro module 12281; source: components_native/premium/OutboundPromotionCard.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 6235, 6275, 6758, 1244, 4573, 6622, 4048, 7286, 12282, 4496, 12283, 1962, 7289, 4578, 6766, 4080, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseTheme from '../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import AlertActionCreators from '../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import MarkupUtils from '../../modules/markup/MarkupUtils.tsx'; /* Metro dependency 6622 */
import UseOutboundPromotionRedemptionEndDate from '../../modules/premium/hooks/useOutboundPromotionRedemptionEndDate.tsx'; /* Metro dependency 12282 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as LegacyTokensModule from '../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
import * as BottomSheetNativeModule from '../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as TextWithIOSLinkWorkaroundModule from '../../modules/a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as PromotionUtilsModule from '../../modules/premium/promotions/PromotionUtils.tsx'; /* Metro dependency 7286 */
function _fun93833(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:6, offset: 0x020c603e, size: 529 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Image;
const USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING = (require(661) /* metro dependency 661: Constants */).USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
const USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING = (ConstantsModule).USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {'flex': 1, 'flexDirection': 'column', 'paddingHorizontal': null, 'paddingVertical': 12,
object = {};
const object2 = {'flex': 1, 'flexDirection': 'column', 'paddingHorizontal': null, 'paddingVertical': 12,
'backgroundColor': null, 'marginTop': 8};
object5.paddingHorizontal = USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
object2.paddingHorizontal = USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
object4.card = object5;
object4.mainContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center',
object2.backgroundColor = BACKGROUND_BASE_LOW;
object.card = object2;
object.mainContainer = {'flex': 1, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between'};
object4.textContainer = {'flexDirection': 'row', 'flexShrink': 1, 'alignItems': 'center'};
const object6 = {'width': 32, 'height': 32, 'marginRight': 8, 'borderRadius': null, 'alignItems': 'center',
object.textContainer = {'flexDirection': 'row', 'flexShrink': 1, 'alignItems': 'center'};
const object3 = {'width': 32, 'height': 32, 'marginRight': 8, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const DARK_BLACK_500_LIGHT_PRIMARY_100 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_BLACK_500_LIGHT_PRIMARY_100;
object6.backgroundColor = DARK_BLACK_500_LIGHT_PRIMARY_100;
object4.imageContainer = object6;
object4.image = {'width': 28, 'height': 28, 'resizeMode': 'contain'};
object4.title = {lineHeight: 20};
object4.subText = {lineHeight: 18};
object4.claimButton = {paddingHorizontal: 12};
object4.moreDetails = {marginLeft: 40};
object4.termsAndConditionsText = {'paddingHorizontal': 16, 'paddingTop': 16};
object4.buttonContainer = {'flexGrow': 1, 'flexDirection': 'row', 'marginLeft': 4, 'justifyContent': 'flex-end'};
const env0_9 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/OutboundPromotionCard.tsx');
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const DARK_BLACK_500_LIGHT_PRIMARY_100 = (LegacyTokensModule).DARK_BLACK_500_LIGHT_PRIMARY_100;
object3.backgroundColor = DARK_BLACK_500_LIGHT_PRIMARY_100;
object.imageContainer = object3;
object.image = {'width': 28, 'height': 28, 'resizeMode': 'contain'};
object.title = {lineHeight: 20};
object.subText = {lineHeight: 18};
object.claimButton = {paddingHorizontal: 12};
object.moreDetails = {marginLeft: 40};
object.termsAndConditionsText = {'paddingHorizontal': 16, 'paddingTop': 16};
object.buttonContainer = {'flexGrow': 1, 'flexDirection': 'row', 'marginLeft': 4, 'justifyContent': 'flex-end'};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/OutboundPromotionCard.tsx');
exports.default = OutboundPromotionCard;
}
function TermsAndConditionsActionSheet({termsAndConditions}) { // fn#93834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1039, offset: 0x020c624f, size: 246 bytes, params: 2, frame: 25
const styles = useStyles();
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const PdKWVT = (require(1244) /* metro dependency 1244: indexNative */).t.PdKWVT;
object2.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [PdKWVT])} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<BottomSheet {...object2}>
<Text style={styles.termsAndConditionsText} variant="text-sm/medium">
{(importDefault(6622) /* metro dependency 6622: MarkupUtils */).parse(termsAndConditions, false,
{allowLinks: true})}
</Text>
</BottomSheet>
);
}
function OutboundPromotionCard({outboundPromotion, code}) { // fn#93835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1369, offset: 0x020c6345, size: 927 bytes, params: 2, frame: 32
var env0_3Binding = undefined;
const styles = useStyles();
const promotionImageURL = (require(7286) /* metro dependency 7286: PromotionUtils */).getPromotionImageURL(outboundPromotion.id,
(importDefault(4048) /* metro dependency 4048: useTheme */)());
const value4 = code != null;
const value5 = (importDefault(12282) /* metro dependency 12282: useOutboundPromotionRedemptionEndDate */)(outboundPromotion,
value4);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r21 = value4 ? Reflect.apply(formatToPlainString, intl, [t.VaD05h,
{endDate: value5}]) : Reflect.apply(formatToPlainString, intl, [t['/XWgfG'], {endDate: value5}]);
const string = intl.string;
const r20 = value4 ? Reflect.apply(string, intl, [t['2cHUti']]) : Reflect.apply(string, intl, [t.O13yhz]);
const binding = env0_4;
var [property, env0_3] = env0_3Binding(binding.useState(false), 2);
binding.useLayoutEffect(_fun93836, [property, code, outboundPromotion]);
const items2 = [<View style={styles.imageContainer}><Image style={styles.image} source={{uri: promotionImageURL}} /></View>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <View style={styles.textContainer}><View><Text style={styles.title} accessibilityRole="header" variant="text-md/semibold" color="mobile-text-heading-primary">{outboundPromotion.outboundTitle}</Text><Text style={styles.subText} variant="text-sm/medium" color="text-default">{r21}</Text></View></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[2] = <View style={styles.buttonContainer}><View style={styles.claimButton}><Button size="sm" shrink text={r20} onPress={onPress_93841} /></View></View>;
const view = <View style={styles.mainContainer}>{items2}</View>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
<View style={styles.card}>
{view}
<View>
<TextWithIOSLinkWorkaround style={styles.moreDetails} variant="text-sm/medium">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.sCm3Zb,
{onClick: onClick_93842})}
</TextWithIOSLinkWorkaround>
</View>
</View>
);
}
function _fun93836() { // fn#93836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1809, offset: 0x020c66e4, size: 66 bytes, params: 1, frame: 12
var environment;
var value;
if (env0_2) {
value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_93837});
function TermsAndConditionsActionSheet({termsAndConditions}) { // fn#93834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1039, offset: 0x020c624f, size: 246 bytes, params: 2, frame: 25
const styles = useStyles();
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const PdKWVT = (IndexNativeModule).t.PdKWVT;
object.header = <BottomSheetTitleHeader title={Reflect.apply(string, intl, [PdKWVT])} />;
const Text = (TextModule).Text;
return (
<BottomSheet {...object}>
<Text style={styles.termsAndConditionsText} variant="text-sm/medium">
{(MarkupUtils).parse(termsAndConditions, false,
{allowLinks: true})}
</Text>
</BottomSheet>
);
}
function OutboundPromotionCard({outboundPromotion, code}) { // fn#93835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1369, offset: 0x020c6345, size: 927 bytes, params: 2, frame: 32
var env0_3Binding = undefined;
const styles = useStyles();
const promotionImageURL = (PromotionUtilsModule).getPromotionImageURL(outboundPromotion.id,
(UseTheme)());
const value4 = code != null;
const value5 = (UseOutboundPromotionRedemptionEndDate)(outboundPromotion,
value4);
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const t = (IndexNativeModule).t;
const r21 = value4 ? Reflect.apply(formatToPlainString, intl, [t.VaD05h,
{endDate: value5}]) : Reflect.apply(formatToPlainString, intl, [t['/XWgfG'], {endDate: value5}]);
const string = intl.string;
const r20 = value4 ? Reflect.apply(string, intl, [t['2cHUti']]) : Reflect.apply(string, intl, [t.O13yhz]);
var [property, env0_3] = env0_3Binding(ReactModule.useState(false), 2);
ReactModule.useLayoutEffect(_fun93836, [property, code, outboundPromotion]);
const items2 = [
<View style={styles.imageContainer}>
<Image style={styles.image} source={{uri: promotionImageURL}} />
</View>,
];
const Text = (TextModule).Text;
items2[1] = (
<View style={styles.textContainer}>
<View>
<Text
style={styles.title}
accessibilityRole="header"
variant="text-md/semibold"
color="mobile-text-heading-primary"
>
{outboundPromotion.outboundTitle}
</Text>
<Text
style={styles.subText}
variant="text-sm/medium"
color="text-default"
>
{r21}
</Text>
</View>
</View>
);
const Button = (ButtonNativeModule).Button;
items2[2] = (
<View style={styles.buttonContainer}>
<View style={styles.claimButton}>
<Button
size="sm"
shrink
text={r20}
onPress={onPress_93841}
/>
</View>
</View>
);
const view = (
<View style={styles.mainContainer}>
{items2}
</View>
);
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
return (
<View style={styles.card}>
{view}
<View>
<TextWithIOSLinkWorkaround style={styles.moreDetails} variant="text-sm/medium">
{intl.format((IndexNativeModule).t.sCm3Zb,
{onClick: onClick_93842})}
</TextWithIOSLinkWorkaround>
</View>
</View>
);
function _fun93836() { // fn#93836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1809, offset: 0x020c66e4, size: 66 bytes, params: 1, frame: 12
var environment;
var value;
if (env0_2) {
value = environment.__proto__;
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_93837});
}
function importer_93837() { // fn#93837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1845, offset: 0x020c6726, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[18]);
value = value(dependencyMap[17], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun93839;
});
function _fun93838({default: env0_0}) { // fn#93838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1879, offset: 0x020c6766, size: 23 bytes, params: 2, frame: 2
return _fun93839;
function _fun93839(a0) { // fn#93839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1894, offset: 0x020c677d, size: 120 bytes, params: 2, frame: 16
const binding = env0_0;
const bindingProps = {...a0};
bindingProps['onCancel'] = onCancel_93840;
bindingProps['onClaim'] = (importDefault(7289) /* metro dependency 7289: PromotionsActionCreators */).addClaimedOutboundPromotionCode;
bindingProps['code'] = code;
bindingProps['outboundPromotion'] = outboundPromotion;
return ((Component) => <Component {...bindingProps} />)(binding);
function onCancel_93840() { // fn#93840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1916, offset: 0x020c67f5, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
(AlertActionCreators).close();
value = environment.__proto__.__proto__.__proto__.__proto__;
env4_3(false);
}
}
}
}
}
function OutboundPromotionCardOnPress() { // fn#93841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:2600, owner: OutboundPromotionCard.onPress, offset: 0x020c6828, size: 18 bytes, params: 1, frame: 11
return env0_3(true);
}
function OutboundPromotionCardOnClick() { // fn#93842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:2773, owner: OutboundPromotionCard.onClick, offset: 0x020c683a, size: 117 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = value.openLazy;
const outboundPromotionBinding = outboundPromotion;
Reflect.apply(openLazy, value, [function() {
var Promise = global.Promise;
return Promise.resolve(TermsAndConditionsActionSheet);
}, 'OutboundPromotionTermsAndConditions-' + outboundPromotionBinding.id,
{termsAndConditions: outboundPromotionBinding.outboundTermsAndConditions}]);
}
}
}
function OutboundPromotionCardOnClick() { // fn#93842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:2773, owner: OutboundPromotionCard.onClick, offset: 0x020c683a, size: 117 bytes, params: 1, frame: 17
var environment;
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
const openLazy = value.openLazy;
const outboundPromotionBinding = outboundPromotion;
Reflect.apply(openLazy, value, [function() {
var Promise = global.Promise;
return Promise.resolve(TermsAndConditionsActionSheet);
}, 'OutboundPromotionTermsAndConditions-' + outboundPromotionBinding.id,
{termsAndConditions: outboundPromotionBinding.outboundTermsAndConditions}]);
}
function importer_93837() { // fn#93837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1845, offset: 0x020c6726, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[18]);
value = value(dependencyMap[17], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun93839;
});
}
function _fun93838({default: env0_0}) { // fn#93838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1879, offset: 0x020c6766, size: 23 bytes, params: 2, frame: 2
return _fun93839;
}
function _fun93839(a0) { // fn#93839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1894, offset: 0x020c677d, size: 120 bytes, params: 2, frame: 16
const binding = env0_0;
const bindingProps = {...a0};
bindingProps['onCancel'] = onCancel_93840;
bindingProps['onClaim'] = (importDefault(7289) /* metro dependency 7289: PromotionsActionCreators */).addClaimedOutboundPromotionCode;
bindingProps['code'] = code;
bindingProps['outboundPromotion'] = outboundPromotion;
return ((Component) => <Component {...bindingProps} />)(binding);
}
function onCancel_93840() { // fn#93840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12467:1916, offset: 0x020c67f5, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__.__proto__.__proto__.__proto__;
(importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close();
value = environment.__proto__.__proto__.__proto__.__proto__;
env4_3(false);
}
global.__d(_fun93833, 12281, [57, 31, 27, 661, 33, 4501, 697, 6235, 6275, 6758, 1244, 4573, 6622, 4048, 7286, 12282,
4496, 12283, 1962, 7289, 4578, 6766, 4080,
2]) /* metro module 12281, dependencies: [57, 31, 27, 661, 33, 4501, 697, 6235, 6275, 6758, 1244, 4573, 6622, 4048, 7286, 12282, 4496, 12283, 1962, 7289, 4578, 6766, 4080, 2] */;
@@ -1,183 +1,270 @@
/* Metro module 12283; source: components_native/premium/OutboundPromotionClaimAlert.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 12284, 6771, 6789, 7286, 12285, 1305, 1244, 4573, 4578, 6797, 12286, 4596, 3853, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Alert from '../common/Alert.tsx'; /* Metro dependency 4596 */
import UseAnalyticsLocations from '../../modules/app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../modules/app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseResettingValue from '../../hooks/useResettingValue.tsx'; /* Metro dependency 12284 */
import Module12286 from '../../by-id/module-12286.js'; /* Metro dependency 12286 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun93847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:6, offset: 0x020c6a5f, size: 638 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.ActivityIndicator;
const env0_6 = value.View;
const env0_7 = value.Image;
const env0_8 = value.ScrollView;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.loading = {marginVertical: 80};
object2.body = {alignItems: 'center'};
object = {};
object.loading = {marginVertical: 80};
object.body = {alignItems: 'center'};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object2.title = {'fontSize': 24, 'lineHeight': 30, 'color': null, 'fontFamily': null, 'marginBottom': 8,
object.title = {'fontSize': 24, 'lineHeight': 30, 'color': null, 'fontFamily': null, 'marginBottom': 8,
color: MOBILE_TEXT_HEADING_PRIMARY, fontFamily: PRIMARY_BOLD};
object2.errorTitle = {'lineHeight': 24, 'marginBottom': 8};
object2.bodyText = {'textAlign': 'center', 'lineHeight': 20};
const object3 = {'backgroundColor': null, 'marginTop': 16, 'padding': 12};
object.errorTitle = {'lineHeight': 24, 'marginBottom': 8};
object.bodyText = {'textAlign': 'center', 'lineHeight': 20};
const object5 = {'backgroundColor': null, 'marginTop': 16, 'padding': 12};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.copyInputContainer = object3;
object2.copyInputLabel = {'lineHeight': 20, 'marginBottom': 8};
const object4 = {'borderWidth': 1, 'borderColor': null, 'borderRadius': null, 'padding': 8, 'marginBottom': 8,
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.copyInputContainer = object5;
object.copyInputLabel = {'lineHeight': 20, 'marginBottom': 8};
const object6 = {'borderWidth': 1, 'borderColor': null, 'borderRadius': null, 'padding': 8, 'marginBottom': 8,
'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.borderColor = BACKGROUND_BASE_LOWEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.copyInput = object4;
object6.borderColor = BACKGROUND_BASE_LOWEST;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.copyInput = object6;
const ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
object2.copyInputCopied = {borderColor: ICON_FEEDBACK_POSITIVE};
object2.copyButton = {'paddingHorizontal': 8, 'marginLeft': 8};
object2.promotionArt = {'width': 200, 'height': 100, 'marginBottom': 20};
object2.errorArt = {'width': 141, 'height': 99, 'marginBottom': 20};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/OutboundPromotionClaimAlert.tsx');
object.copyInputCopied = {borderColor: ICON_FEEDBACK_POSITIVE};
object.copyButton = {'paddingHorizontal': 8, 'marginLeft': 8};
object.promotionArt = {'width': 200, 'height': 100, 'marginBottom': 20};
object.errorArt = {'width': 141, 'height': 99, 'marginBottom': 20};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/OutboundPromotionClaimAlert.tsx');
exports.default = OutboundPromotionClaimAlert;
}
function OutboundPromotionClaimAlert({onCancel, onClaim, code, outboundPromotion}) { // fn#93848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1113, offset: 0x020c6cdd, size: 1599 bytes, params: 2, frame: 38
var r15;
var r4;
var items5;
var LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
var object;
var copyInput;
var object2;
var items3;
var Button;
const env0_3 = outboundPromotion;
const styles = useStyles();
const binding = env0_4;
const value3 = binding.useState(null);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_4 = value4[1];
const value5 = binding2((importDefault(12284) /* metro dependency 12284: useResettingValue */)(false, 2000), 2);
const property2 = value5[0];
const env0_5 = value5[1];
const value6 = code != null;
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const USER_SETTINGS_GIFT_INVENTORY = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).USER_SETTINGS_GIFT_INVENTORY;
binding.useEffect(_fun93849, [value6, outboundPromotion.id, outboundPromotion.outboundTitle,
outboundPromotion.partnerId, onClaim, defaultImport2(USER_SETTINGS_GIFT_INVENTORY).analyticsLocations]);
if (code != null) {
var viewBindingProps = {style: styles.body};
items5 = [<Image source={importDefault(12285) /* metro dependency 12285 */} style={styles.promotionArt} />];
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
string = intl.string;
items5[1] = <LegacyText style={styles.title} accessibilityRole="header">{Reflect.apply(string, intl,
[t['23BfZh']])}</LegacyText>;
items5[2] = <Text style={styles.bodyText} variant="text-md/medium">{outboundPromotion.outboundRedemptionModalBody}</Text>;
var viewBindingProps2 = {style: styles.copyInputContainer};
string = intl.string;
items2 = [<Text style={styles.copyInputLabel} variant="text-md/semibold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t.s9LFQh])}</Text>];
object = {};
copyInput = styles.copyInput;
if (property2) {
object2 = {};
copyDataProperties(object2, copyInput, 13);
copyDataProperties(object2, styles.copyInputCopied, 13);
r15 = object2;
function OutboundPromotionClaimAlert({onCancel, onClaim, code, outboundPromotion}) { // fn#93848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1113, offset: 0x020c6cdd, size: 1599 bytes, params: 2, frame: 38
var r15;
var r4;
var items5;
var LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Text = (TextModule).Text;
var items2;
var object3;
var copyInput;
var object4;
var items3;
var Button;
const outboundPromotion2 = outboundPromotion;
const styles = useStyles();
const binding = env0_4;
const value3 = binding.useState(null);
const binding2 = outboundPromotion2;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_4 = value4[1];
const value5 = binding2((UseResettingValue)(false, 2000), 2);
const property2 = value5[0];
const env0_5 = value5[1];
const value6 = code != null;
const defaultImport2 = UseAnalyticsLocations;
const USER_SETTINGS_GIFT_INVENTORY = (AnalyticsLocation).USER_SETTINGS_GIFT_INVENTORY;
binding.useEffect(_fun93849, [value6, outboundPromotion.id, outboundPromotion.outboundTitle,
outboundPromotion.partnerId, onClaim, defaultImport2(USER_SETTINGS_GIFT_INVENTORY).analyticsLocations]);
if (code != null) {
var viewBindingProps = {style: styles.body};
items5 = [
<Image source={importDefault(12285) /* metro dependency 12285 */} style={styles.promotionArt} />,
];
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
string = intl.string;
items5[1] = (
<LegacyText style={styles.title} accessibilityRole="header">
{Reflect.apply(string, intl, [t['23BfZh']])}
</LegacyText>
);
items5[2] = (
<Text style={styles.bodyText} variant="text-md/medium">
{outboundPromotion.outboundRedemptionModalBody}
</Text>
);
var viewBindingProps2 = {style: styles.copyInputContainer};
string = intl.string;
items2 = [
<Text
style={styles.copyInputLabel}
variant="text-md/semibold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [t.s9LFQh])}
</Text>,
];
object3 = {};
copyInput = styles.copyInput;
if (property2) {
object4 = {};
copyDataProperties(object4, copyInput, 13);
copyDataProperties(object4, styles.copyInputCopied, 13);
r15 = object4;
} else {
r15 = copyInput;
}
object3.style = r15;
items3 = [
<ScrollView
style={{flex: 1}}
horizontal
showsHorizontalScrollIndicator={false}
>
<View onStartShouldSetResponderCapture={function() {
return true;
}}>
<Text
lineClamp={1}
variant="text-sm/medium"
color="interactive-text-active"
>
{code}
</Text>
</View>
</ScrollView>,
];
var viewBinding2Props = {style: styles.copyButton};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items3[1] = (
<View {...viewBinding2Props}>
<Button
text={property2 ? Reflect.apply(string, intl, [t.t5VZ88]) : Reflect.apply(string, intl, [t.OpuAlK])}
size="sm"
onPress={onPress_93853}
/>
</View>
);
items2[1] = (
<View {...object3}>
{items3}
</View>
);
items2[2] = (
<Text variant="text-sm/medium" color="text-muted">
{'This code is included in your confirmation email'}
</Text>
);
items5[3] = (
<View {...viewBindingProps2}>
{items2}
</View>
);
r4 = (
<View {...viewBindingProps}>
{items5}
</View>
);
} else {
r15 = copyInput;
r4 = <ActivityIndicator style={styles.loading} />;
}
object.style = r15;
items3 = [<ScrollView style={{flex: 1}} horizontal showsHorizontalScrollIndicator={false}><View onStartShouldSetResponderCapture={function() {
return true;
}}><Text lineClamp={1} variant="text-sm/medium" color="interactive-text-active">{code}</Text></View></ScrollView>];
var viewBinding2Props = {style: styles.copyButton};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items3[1] = <View {...viewBinding2Props}><Button text={property2 ? Reflect.apply(string, intl,
[t.t5VZ88]) : Reflect.apply(string, intl, [t.OpuAlK])} size="sm" onPress={onPress_93853} /></View>;
items2[1] = <View {...object}>{items3}</View>;
items2[2] = <Text variant="text-sm/medium" color="text-muted">{'This code is included in your confirmation email'}</Text>;
items5[3] = <View {...viewBindingProps2}>{items2}</View>;
r4 = <View {...viewBindingProps}>{items5}</View>;
} else {
r4 = <ActivityIndicator style={styles.loading} />;
const items4 = [
<Image source={Module12286} style={styles.errorArt} />,
];
items4[1] = (
<Text
style={styles.errorTitle}
variant="text-lg/bold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iufib1)}
</Text>
);
items4[2] = (
<Text style={styles.bodyText} variant="text-md/medium">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
</Text>
);
const view = (
<View style={styles.body}>
{items4}
</View>
);
const r11 = property != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zx47d']);
const r8 = property != null ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TulDPl);
r4 = property != null ? view : r4;
return (
<Alert
onCancel={onCancel}
confirmText={r11}
onConfirm={onConfirm_93854}
cancelText={r8}
noDefaultButtons={!value6 && property == null}
>
{r4}
</Alert>
);
function _fun93849() { // fn#93849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1384, offset: 0x020c731c, size: 134 bytes, params: 1, frame: 15
var environment;
var value2;
var moduleValue;
var claimOutboundPromotion;
var outboundPromotionBinding;
var value;
if (!result) {
value2 = environment.__proto__;
moduleValue = require(7286) /* metro dependency 7286: PromotionUtils */;
claimOutboundPromotion = moduleValue.claimOutboundPromotion;
outboundPromotionBinding = outboundPromotion;
value = Reflect.apply(claimOutboundPromotion, moduleValue, [{promotionId: outboundPromotionBinding.id,
promotionTitle: outboundPromotionBinding.outboundTitle, partnerId: outboundPromotionBinding.partnerId,
analyticsLocations: analyticsLocations}]);
value = value.then(function(a0) {
return onClaim(a0);
});
value.catch(_fun93851);
}
function _fun93851(a0) { // fn#93851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1541, offset: 0x01e1b407, size: 19 bytes, params: 2, frame: 11
return env1_4(a0);
}
}
function OutboundPromotionClaimAlertOnPress() { // fn#93853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:2559, owner: OutboundPromotionClaimAlert.onPress, offset: 0x020c73a2, size: 56 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(code);
env0_5(true);
}
function OutboundPromotionClaimAlertOnConfirm() { // fn#93854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:3219, owner: OutboundPromotionClaimAlert.onConfirm, offset: 0x020c73da, size: 97 bytes, params: 1, frame: 17
var value2;
var moduleValue;
if (code != null) {
value2 = environment.__proto__;
moduleValue = require(7286) /* metro dependency 7286: PromotionUtils */;
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(moduleValue.getOutboundPromotionRedemptionUrl(code,
outboundPromotion));
}
onCancel();
}
}
const items4 = [<Image source={importDefault(12286) /* metro dependency 12286 */} style={styles.errorArt} />];
items4[1] = <Text style={styles.errorTitle} variant="text-lg/bold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iufib1)}</Text>;
items4[2] = <Text style={styles.bodyText} variant="text-md/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}</Text>;
const view = <View style={styles.body}>{items4}</View>;
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const r11 = property != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+zx47d']);
const r8 = property != null ? undefined : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.TulDPl);
r4 = property != null ? view : r4;
return (
<Alert
onCancel={onCancel}
confirmText={r11}
onConfirm={onConfirm}
cancelText={r8}
noDefaultButtons={!value6 && property == null}
>
{r4}
</Alert>
);
}
function _fun93849() { // fn#93849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:1384, offset: 0x020c731c, size: 134 bytes, params: 1, frame: 15
var environment;
var value2;
var moduleValue;
var claimOutboundPromotion;
var outboundPromotionBinding;
var value;
if (!result) {
value2 = environment.__proto__;
moduleValue = require(7286) /* metro dependency 7286: PromotionUtils */;
claimOutboundPromotion = moduleValue.claimOutboundPromotion;
outboundPromotionBinding = outboundPromotion;
value = Reflect.apply(claimOutboundPromotion, moduleValue, [{promotionId: outboundPromotionBinding.id,
promotionTitle: outboundPromotionBinding.outboundTitle, partnerId: outboundPromotionBinding.partnerId,
analyticsLocations: analyticsLocations}]);
value = value.then(function(a0) {
return onClaim(a0);
});
value.catch(_fun93851);
}
}
function OutboundPromotionClaimAlertOnPress() { // fn#93853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:2559, owner: OutboundPromotionClaimAlert.onPress, offset: 0x020c73a2, size: 56 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(code);
env0_5(true);
}
function OutboundPromotionClaimAlertOnConfirm() { // fn#93854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12469:3219, owner: OutboundPromotionClaimAlert.onConfirm, offset: 0x020c73da, size: 97 bytes, params: 1, frame: 17
var value2;
var moduleValue;
if (code != null) {
value2 = environment.__proto__;
moduleValue = require(7286) /* metro dependency 7286: PromotionUtils */;
(importDefault(3853) /* metro dependency 3853: Linking */).openURL(moduleValue.getOutboundPromotionRedemptionUrl(code,
outboundPromotion));
}
onCancel();
}
global.__d(_fun93847, 12283, [57, 31, 27, 661, 33, 4501, 697, 12284, 6771, 6789, 7286, 12285, 1305, 1244, 4573,
4578, 6797, 12286, 4596, 3853,
2]) /* metro module 12283, dependencies: [57, 31, 27, 661, 33, 4501, 697, 12284, 6771, 6789, 7286, 12285, 1305, 1244, 4573, 4578, 6797, 12286, 4596, 3853, 2] */;
@@ -1,20 +1,31 @@
/* Metro module 7301; source: components_native/premium/PremiumActivatedAlert.tsx; dependencies: [31, 27, 661, 33, 4501, 6235, 3802, 7302, 7303, 7304, 7305, 7306, 7250, 7251, 7307, 7308, 7309, 7310, 7311, 7312, 7313, 4002, 7314, 7315, 7316, 7317, 7318, 7319, 7320, 7321, 7322, 1244, 4048, 4596, 7323, 7324, 1305, 2] */
import UseTheme from '../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import Alert from '../common/Alert.tsx'; /* Metro dependency 4596 */
import ShineAnimation from './ShineAnimation.tsx'; /* Metro dependency 7324 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as PremiumUtilsModule from '../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import * as LegacyTokensModule from '../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
function _fun58978(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:6, offset: 0x016dca3e, size: 470 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Image;
const env0_4 = value.ImageBackground;
const env0_5 = value.View;
const env0_6 = (require(661) /* metro dependency 661: Constants */).SubscriptionStatusTypes;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const DARK_PRIMARY_300_LIGHT_PRIMARY_400 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_300_LIGHT_PRIMARY_400;
const DARK_PRIMARY_300_LIGHT_PRIMARY_400 = (LegacyTokensModule).DARK_PRIMARY_300_LIGHT_PRIMARY_400;
const env0_9 = Reflect.apply(createStyles, value, [{alert: {'overflow': 'hidden', 'paddingBottom': 24},
header: {'alignSelf': 'stretch', 'margin': -16, 'padding': 16, 'height': 100, 'position': 'relative'},
headerImage: {'position': 'absolute', 'left': '50%'}, body: {'paddingHorizontal': 16, 'marginTop': 40,
@@ -23,232 +34,246 @@ function _fun58978(global, require, importDefault, importAll, module, exports, d
'marginTop': 20, color: DARK_PRIMARY_300_LIGHT_PRIMARY_400}}]);
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun58984);
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun58985);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumActivatedAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumActivatedAlert.tsx');
exports.default = PremiumActivatedAlert;
function getHeaderBackground(a0) { // fn#58979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1455, offset: 0x016dcc14, size: 294 bytes, params: 2, frame: 14
const Branding = (PremiumUtilsModule).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7302) /* metro dependency 7302 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7303) /* metro dependency 7303 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7304) /* metro dependency 7304 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7305) /* metro dependency 7305 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7306) /* metro dependency 7306 */;
}
}
function getHeaderImage(a0) { // fn#58980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1727, offset: 0x016dcd3a, size: 294 bytes, params: 2, frame: 14
const Branding = (PremiumUtilsModule).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7250) /* metro dependency 7250 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7251) /* metro dependency 7251 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7307) /* metro dependency 7307 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7308) /* metro dependency 7308 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7309) /* metro dependency 7309 */;
}
}
function getLogo(a0) { // fn#58981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1997, offset: 0x016dce60, size: 272 bytes, params: 2, frame: 14
const Branding = (PremiumUtilsModule).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7310) /* metro dependency 7310 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7311) /* metro dependency 7311 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7312) /* metro dependency 7312 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7312) /* metro dependency 7312 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7313) /* metro dependency 7313 */;
}
}
function getActivatedImage(a0, a1) { // fn#58982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:2244, offset: 0x016dcf70, size: 492 bytes, params: 3, frame: 15
const Branding = (PremiumUtilsModule).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7314) /* metro dependency 7314 */ : importDefault(7315) /* metro dependency 7315 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7316) /* metro dependency 7316 */ : importDefault(7317) /* metro dependency 7317 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7318) /* metro dependency 7318 */ : importDefault(7319) /* metro dependency 7319 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7320) /* metro dependency 7320 */ : importDefault(7321) /* metro dependency 7321 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7322) /* metro dependency 7322 */;
}
}
function getDescription_58983(a0, a1) { // fn#58983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:2651, offset: 0x016dd15c, size: 419 bytes, params: 3, frame: 20
const intl = (IndexNativeModule).intl;
var format;
const t = (IndexNativeModule).t;
var YJUUH3;
var value;
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return intl.string(t.knvOVz);
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return intl.string(t.knvOVz);
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return intl.string(t.aTUr3Z);
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
format = intl.format;
YJUUH3 = t.YJUUH3;
value = require(3802) /* metro dependency 3802: PremiumUtils */;
return Reflect.apply(format, intl, [YJUUH3, {planName: value.getExternalPlanDisplayName({planId: a1.planId,
additionalPlans: a1.additionalPlans})}]);
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
format = intl.format;
YJUUH3 = t.YJUUH3;
value = require(3802) /* metro dependency 3802: PremiumUtils */;
return Reflect.apply(format, intl, [YJUUH3, {planName: value.getExternalPlanDisplayName({planId: a1.planId,
additionalPlans: a1.additionalPlans})}]);
}
}
function _fun58984(a0) { // fn#58984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:707, offset: 0x016dd2ff, size: 299 bytes, params: 2, frame: 14
const Branding = (PremiumUtilsModule).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return {headerImage: {'marginLeft': -27, 'width': 88, 'top': 18}};
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return {headerImage: {'marginLeft': -27, 'width': 87, 'top': 18}};
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return {headerImage: {'marginLeft': -29.5, 'width': 91, 'top': 18}};
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return {headerImage: {'marginLeft': -58, 'width': 122, 'height': 90, 'top': 18}};
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return {headerImage: {'marginLeft': -54, 'width': 140, 'top': 18}};
}
}
function _fun58985(a0) { // fn#58985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1180, offset: 0x016dd42a, size: 232 bytes, params: 2, frame: 14
const Branding = (PremiumUtilsModule).Branding;
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return {animation: {borderRadius: 6}};
}
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return {animation: {borderRadius: 5}};
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return {animation: {borderRadius: 5}};
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return {animation: {borderRadius: 5}};
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return {animation: {borderRadius: 9}};
}
}
function PremiumActivatedAlert({subscription, onClose}) { // fn#58986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:3179, offset: 0x016dd512, size: 955 bytes, params: 2, frame: 31
const styles = useStyles();
const r2 = subscription.renewalMutations == null || global.Object.keys(subscription.renewalMutations).length === 0 || (subscription.renewalMutations.paymentGatewayPlanId === subscription.paymentGatewayPlanId || subscription.status === SubscriptionStatusTypes.CANCELED) ? subscription : subscription.renewalMutations;
const value4 = (UseTheme)();
const premiumBranding = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumBranding(r2);
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
const r20 = TIER_0 === premiumBranding ? {logo: {'width': 82,
'height': 44}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.TIER_1 === premiumBranding ? {logo: {'width': 82,
'height': 32}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.BUNDLE === premiumBranding || (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.TIER_2 === premiumBranding ? {logo: {'width': 79,
'height': 32}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.PREMIUM_GUILD !== premiumBranding ? undefined : {logo: {'width': 82,
'height': 18}};
const styles2 = useStyles(premiumBranding);
const styles3 = useStyles(premiumBranding);
const intl = (IndexNativeModule).intl;
const string = intl.string;
const TkTvBz = (IndexNativeModule).t.TkTvBz;
const imageBackgroundBindingProps = {style: styles.header, source: getHeaderBackground(premiumBranding)};
const image = <Image source={getLogo(premiumBranding)} style={r20.logo} />;
const BUNDLE = Branding.BUNDLE;
const r7 = (
premiumBranding !== BUNDLE
? null
: (
<Image source={importDefault(7323) /* metro dependency 7323 */} style={styles.logoPlusPremiumGuild} />
)
);
const imageBackground = (
<ImageBackground {...imageBackgroundBindingProps}>
{image}
{r7}
<Image source={getHeaderImage(premiumBranding)} style={[styles2.headerImage, styles.headerImage]} />
</ImageBackground>
);
const value9 = ((Component) => <Component source={getActivatedImage(premiumBranding,
value4)} style={styles3.animation} />)(ShineAnimation);
const LegacyText = (NativeModule).LegacyText;
return (
<Alert
onClose={onClose}
confirmText={Reflect.apply(string, intl, [TkTvBz])}
style={styles.alert}
>
{imageBackground}
<View style={styles.body}>
{value9}
<LegacyText style={styles.description}>
{getDescription_58983(premiumBranding, r2)}
</LegacyText>
</View>
</Alert>
);
}
}
function getHeaderBackground(a0) { // fn#58979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1455, offset: 0x016dcc14, size: 294 bytes, params: 2, frame: 14
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7302) /* metro dependency 7302 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7303) /* metro dependency 7303 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7304) /* metro dependency 7304 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7305) /* metro dependency 7305 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7306) /* metro dependency 7306 */;
}
}
function getHeaderImage(a0) { // fn#58980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1727, offset: 0x016dcd3a, size: 294 bytes, params: 2, frame: 14
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7250) /* metro dependency 7250 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7251) /* metro dependency 7251 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7307) /* metro dependency 7307 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7308) /* metro dependency 7308 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7309) /* metro dependency 7309 */;
}
}
function getLogo(a0) { // fn#58981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1997, offset: 0x016dce60, size: 272 bytes, params: 2, frame: 14
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return importDefault(7310) /* metro dependency 7310 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return importDefault(7311) /* metro dependency 7311 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return importDefault(7312) /* metro dependency 7312 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return importDefault(7312) /* metro dependency 7312 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7313) /* metro dependency 7313 */;
}
}
function getActivatedImage(a0, a1) { // fn#58982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:2244, offset: 0x016dcf70, size: 492 bytes, params: 3, frame: 15
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7314) /* metro dependency 7314 */ : importDefault(7315) /* metro dependency 7315 */;
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7316) /* metro dependency 7316 */ : importDefault(7317) /* metro dependency 7317 */;
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7318) /* metro dependency 7318 */ : importDefault(7319) /* metro dependency 7319 */;
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return (require(4002) /* metro dependency 4002: shared */).isThemeDark(a1) ? importDefault(7320) /* metro dependency 7320 */ : importDefault(7321) /* metro dependency 7321 */;
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return importDefault(7322) /* metro dependency 7322 */;
}
}
function getDescription_58983(a0, a1) { // fn#58983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:2651, offset: 0x016dd15c, size: 419 bytes, params: 3, frame: 20
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var YJUUH3;
var value;
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return intl.string(t.knvOVz);
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return intl.string(t.knvOVz);
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return intl.string(t.aTUr3Z);
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
format = intl.format;
YJUUH3 = t.YJUUH3;
value = require(3802) /* metro dependency 3802: PremiumUtils */;
return Reflect.apply(format, intl, [YJUUH3, {planName: value.getExternalPlanDisplayName({planId: a1.planId,
additionalPlans: a1.additionalPlans})}]);
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
format = intl.format;
YJUUH3 = t.YJUUH3;
value = require(3802) /* metro dependency 3802: PremiumUtils */;
return Reflect.apply(format, intl, [YJUUH3, {planName: value.getExternalPlanDisplayName({planId: a1.planId,
additionalPlans: a1.additionalPlans})}]);
}
}
function _fun58984(a0) { // fn#58984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:707, offset: 0x016dd2ff, size: 299 bytes, params: 2, frame: 14
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return {headerImage: {'marginLeft': -27, 'width': 88, 'top': 18}};
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return {headerImage: {'marginLeft': -27, 'width': 87, 'top': 18}};
}
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return {headerImage: {'marginLeft': -29.5, 'width': 91, 'top': 18}};
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return {headerImage: {'marginLeft': -58, 'width': 122, 'height': 90, 'top': 18}};
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return {headerImage: {'marginLeft': -54, 'width': 140, 'top': 18}};
}
}
function _fun58985(a0) { // fn#58985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:1180, offset: 0x016dd42a, size: 232 bytes, params: 2, frame: 14
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const BUNDLE = Branding.BUNDLE;
if (BUNDLE === a0) {
return {animation: {borderRadius: 6}};
}
const TIER_0 = Branding.TIER_0;
if (TIER_0 === a0) {
return {animation: {borderRadius: 5}};
}
const TIER_1 = Branding.TIER_1;
if (TIER_1 === a0) {
return {animation: {borderRadius: 5}};
}
const TIER_2 = Branding.TIER_2;
if (TIER_2 === a0) {
return {animation: {borderRadius: 5}};
}
const PREMIUM_GUILD = Branding.PREMIUM_GUILD;
if (PREMIUM_GUILD === a0) {
return {animation: {borderRadius: 9}};
}
}
function PremiumActivatedAlert({subscription, onClose}) { // fn#58986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7479:3179, offset: 0x016dd512, size: 955 bytes, params: 2, frame: 31
const styles = useStyles();
const r2 = subscription.renewalMutations == null || global.Object.keys(subscription.renewalMutations).length === 0 || (subscription.renewalMutations.paymentGatewayPlanId === subscription.paymentGatewayPlanId || subscription.status === SubscriptionStatusTypes.CANCELED) ? subscription : subscription.renewalMutations;
const value4 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const premiumBranding = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumBranding(r2);
const Branding = (require(3802) /* metro dependency 3802: PremiumUtils */).Branding;
const TIER_0 = Branding.TIER_0;
const r20 = TIER_0 === premiumBranding ? {logo: {'width': 82,
'height': 44}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.TIER_1 === premiumBranding ? {logo: {'width': 82,
'height': 32}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.BUNDLE === premiumBranding || (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.TIER_2 === premiumBranding ? {logo: {'width': 79,
'height': 32}} : (require(3802) /* metro dependency 3802: PremiumUtils */).Branding.PREMIUM_GUILD !== premiumBranding ? undefined : {logo: {'width': 82,
'height': 18}};
const styles2 = useStyles(premiumBranding);
const styles3 = useStyles(premiumBranding);
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const TkTvBz = (require(1244) /* metro dependency 1244: indexNative */).t.TkTvBz;
const imageBackgroundBindingProps = {style: styles.header, source: getHeaderBackground(premiumBranding)};
const image = <Image source={getLogo(premiumBranding)} style={r20.logo} />;
const BUNDLE = Branding.BUNDLE;
const r7 = premiumBranding !== BUNDLE ? null : <Image source={importDefault(7323) /* metro dependency 7323 */} style={styles.logoPlusPremiumGuild} />;
const imageBackground = <ImageBackground {...imageBackgroundBindingProps}>{image}{r7}<Image source={getHeaderImage(premiumBranding)} style={[styles2.headerImage,
styles.headerImage]} /></ImageBackground>;
const value9 = ((Component) => <Component source={getActivatedImage(premiumBranding,
value4)} style={styles3.animation} />)(importDefault(7324) /* metro dependency 7324: ShineAnimation */);
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<Alert
onClose={onClose}
confirmText={Reflect.apply(string, intl, [TkTvBz])}
style={styles.alert}
>
{imageBackground}
<View style={styles.body}>
{value9}
<LegacyText style={styles.description}>
{getDescription_58983(premiumBranding, r2)}
</LegacyText>
</View>
</Alert>
);
}
global.__d(_fun58978, 7301, [31, 27, 661, 33, 4501, 6235, 3802, 7302, 7303, 7304, 7305, 7306, 7250, 7251, 7307,
7308, 7309, 7310, 7311, 7312, 7313, 4002, 7314, 7315, 7316, 7317, 7318, 7319, 7320, 7321, 7322, 1244, 4048,
4596, 7323, 7324, 1305,
2]) /* metro module 7301, dependencies: [31, 27, 661, 33, 4501, 6235, 3802, 7302, 7303, 7304, 7305, 7306, 7250, 7251, 7307, 7308, 7309, 7310, 7311, 7312, 7313, 4002, 7314, 7315, 7316, 7317, 7318, 7319, 7320, 7321, 7322, 1244, 4048, 4596, 7323, 7324, 1305, 2] */;
@@ -1,14 +1,23 @@
/* Metro module 7549; source: components_native/premium/PremiumBillingInfo.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 3815, 6766, 1244, 3802, 7545, 6771, 6789, 7022, 4573, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AnalyticsLocation from '../../modules/app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PremiumManagementUtilsModule from '../../modules/premium/native/utils/PremiumManagementUtils.tsx'; /* Metro dependency 7022 */
import * as PremiumSubscriptionInvoiceModule from '../../modules/premium/PremiumSubscriptionInvoice.tsx'; /* Metro dependency 7545 */
function _fun60690(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:6, offset: 0x0170a5ad, size: 351 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const closure = GoogleManagementLink;
const GoogleManagementLink2 = GoogleManagementLink;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_5 = value.SubscriptionStatusTypes;
const USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING = value.USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING;
value = require(33) /* metro dependency 33 */;
@@ -16,91 +25,121 @@ function _fun60690(global, require, importDefault, importAll, module, exports, d
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.title = {paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
object2.externalSubtext = {marginTop: 8, paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.billingContainer = {'backgroundColor': null, 'padding': 16, 'marginTop': 8,
object = {};
object.title = {paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
object.externalSubtext = {marginTop: 8, paddingHorizontal: USER_SETTINGS_CONTAINER_HORIZONTAL_PADDING};
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.billingContainer = {'backgroundColor': null, 'padding': 16, 'marginTop': 8,
backgroundColor: BACKGROUND_SURFACE_HIGH};
object2.billingRenewalInfo = {marginTop: 4};
object2.billingManageGoogle = {marginTop: 8};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumBillingInfo.tsx');
object.billingRenewalInfo = {marginTop: 4};
object.billingManageGoogle = {marginTop: 8};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumBillingInfo.tsx');
exports.default = PremiumBillingInfo;
exports.GoogleManagementLink = closure;
}
function GoogleManagementLink({style, subscription}) { // fn#60691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:511, offset: 0x0170a70c, size: 232 bytes, params: 2, frame: 22
var r0;
var TextWithIOSLinkWorkaround;
var intl;
var format;
var property;
var value;
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isGooglePlayBillingSupported()) {
if (subscription.isPurchasedViaGoogle) {
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
var textWithIOSLinkWorkaroundProps = {'style': null, 'variant': 'text-sm/medium', 'color': 'text-link',
style: [style]};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['9NPc+O'];
value = require(3802) /* metro dependency 3802: PremiumUtils */;
value = <TextWithIOSLinkWorkaround {...textWithIOSLinkWorkaroundProps}>{Reflect.apply(format, intl,
[property,
{onClick: value.getExternalSubscriptionMethodUrl(subscription.paymentGateway,
'SUBSCRIPTION_MANAGEMENT')}])}</TextWithIOSLinkWorkaround>;
r0 = value;
exports.GoogleManagementLink = GoogleManagementLink2;
function GoogleManagementLink({style, subscription}) { // fn#60691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:511, offset: 0x0170a70c, size: 232 bytes, params: 2, frame: 22
var r0;
var TextWithIOSLinkWorkaround;
var intl;
var format;
var property;
var value;
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isGooglePlayBillingSupported()) {
if (subscription.isPurchasedViaGoogle) {
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
var textWithIOSLinkWorkaroundProps = {'style': null, 'variant': 'text-sm/medium', 'color': 'text-link',
style: [style]};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['9NPc+O'];
value = require(3802) /* metro dependency 3802: PremiumUtils */;
value = (
<TextWithIOSLinkWorkaround {...textWithIOSLinkWorkaroundProps}>
{Reflect.apply(format, intl, [property,
{onClick: value.getExternalSubscriptionMethodUrl(subscription.paymentGateway,
'SUBSCRIPTION_MANAGEMENT')}])}
</TextWithIOSLinkWorkaround>
);
r0 = value;
} else {
r0 = null;
}
} else {
r0 = null;
}
} else {
r0 = null;
return r0;
}
return r0;
}
function PremiumBillingInfo({style, subscription}) { // fn#60692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:886, offset: 0x0170a7f4, size: 700 bytes, params: 2, frame: 32
const styles = useStyles();
const premiumSubscriptionInvoiceModule = require(7545) /* metro dependency 7545: PremiumSubscriptionInvoice */;
const useFetchSubscriptionInvoicePreview = premiumSubscriptionInvoiceModule.useFetchSubscriptionInvoicePreview;
const object2 = {'subscriptionId': null, 'renewal': true, 'applyEntitlements': true};
object2.subscriptionId = subscription.id;
object2.analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)();
const PREMIUM_BILLING_INFO = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).PREMIUM_BILLING_INFO;
object2.analyticsLocation = PREMIUM_BILLING_INFO;
const value2 = Reflect.apply(useFetchSubscriptionInvoicePreview, premiumSubscriptionInvoiceModule, [object2]);
const binding = env0_3;
const property = binding(value2, 1)[0];
const moduleValue2 = premiumSubscriptionInvoiceModule;
const useGetSubscriptionInvoice = moduleValue2.useGetSubscriptionInvoice;
const status = subscription.status;
const PAST_DUE = SubscriptionStatusTypes.PAST_DUE;
const property2 = binding(Reflect.apply(useGetSubscriptionInvoice, moduleValue2, [{subscriptionId: subscription.id,
preventFetch: status !== PAST_DUE}]), 1)[0];
if (property == null) {
return null;
function PremiumBillingInfo({style, subscription}) { // fn#60692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7727:886, offset: 0x0170a7f4, size: 700 bytes, params: 2, frame: 32
const styles = useStyles();
const useFetchSubscriptionInvoicePreview = PremiumSubscriptionInvoiceModule.useFetchSubscriptionInvoicePreview;
const object = {'subscriptionId': null, 'renewal': true, 'applyEntitlements': true};
object.subscriptionId = subscription.id;
object.analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)();
const PREMIUM_BILLING_INFO = (AnalyticsLocation).PREMIUM_BILLING_INFO;
object.analyticsLocation = PREMIUM_BILLING_INFO;
const value2 = Reflect.apply(useFetchSubscriptionInvoicePreview, PremiumSubscriptionInvoiceModule, [object]);
const property = Module00057(value2, 1)[0];
const useGetSubscriptionInvoice = PremiumSubscriptionInvoiceModule.useGetSubscriptionInvoice;
const status = subscription.status;
const PAST_DUE = SubscriptionStatusTypes.PAST_DUE;
const property2 = Module00057(Reflect.apply(useGetSubscriptionInvoice, PremiumSubscriptionInvoiceModule, [{subscriptionId: subscription.id,
preventFetch: status !== PAST_DUE}]), 1)[0];
if (property == null) {
return null;
}
const externalManagementMessage = (PremiumManagementUtilsModule).getExternalManagementMessage(subscription,
{shouldAllowExternalManagement: true});
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const Sb6wI1 = (IndexNativeModule).t.Sb6wI1;
const items3 = [
<Text
style={styles.title}
accessibilityRole="header"
variant="eyebrow"
color="text-default"
>
{Reflect.apply(string, intl, [Sb6wI1])}
</Text>,
];
string = intl.string;
const KXQjfc = (IndexNativeModule).t.KXQjfc;
const items2 = [
<Text variant="text-md/semibold">
{Reflect.apply(string, intl, [KXQjfc])}
</Text>,
];
items2[1] = (
<Text style={styles.billingRenewalInfo} variant="text-sm/medium">
{(require(3802) /* metro dependency 3802: PremiumUtils */).getBillingInformationString(subscription,
property, property2)}
</Text>
);
items2[2] = <GoogleManagementLink style={styles.billingManageGoogle} subscription={subscription} />;
items3[1] = (
<View style={styles.billingContainer}>
{items2}
</View>
);
items3[2] = (
externalManagementMessage != null
? (
<Text style={styles.externalSubtext} variant="text-sm/medium">
{externalManagementMessage}
</Text>
)
: null
);
return (
<View style={style}>
{items3}
</View>
);
}
const externalManagementMessage = (require(7022) /* metro dependency 7022: PremiumManagementUtils */).getExternalManagementMessage(subscription,
{shouldAllowExternalManagement: true});
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Sb6wI1 = (require(1244) /* metro dependency 1244: indexNative */).t.Sb6wI1;
const items3 = [<Text style={styles.title} accessibilityRole="header" variant="eyebrow" color="text-default">{Reflect.apply(string,
intl, [Sb6wI1])}</Text>];
string = intl.string;
const KXQjfc = (require(1244) /* metro dependency 1244: indexNative */).t.KXQjfc;
const items2 = [<Text variant="text-md/semibold">{Reflect.apply(string, intl, [KXQjfc])}</Text>];
items2[1] = <Text style={styles.billingRenewalInfo} variant="text-sm/medium">{(require(3802) /* metro dependency 3802: PremiumUtils */).getBillingInformationString(subscription,
property, property2)}</Text>;
items2[2] = <GoogleManagementLink style={styles.billingManageGoogle} subscription={subscription} />;
items3[1] = <View style={styles.billingContainer}>{items2}</View>;
items3[2] = externalManagementMessage != null ? <Text style={styles.externalSubtext} variant="text-sm/medium">{externalManagementMessage}</Text> : null;
return (
<View style={style}>
{items3}
</View>
);
}
global.__d(_fun60690, 7549, [57, 31, 27, 661, 33, 4501, 697, 3815, 6766, 1244, 3802, 7545, 6771, 6789, 7022, 4573,
2]) /* metro module 7549, dependencies: [57, 31, 27, 661, 33, 4501, 697, 3815, 6766, 1244, 3802, 7545, 6771, 6789, 7022, 4573, 2] */;
@@ -1,62 +1,83 @@
/* Metro module 7971; source: components_native/premium/PremiumFeatureList.tsx; dependencies: [31, 27, 661, 33, 4501, 6597, 697, 7972, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import TextStyles from '../../modules/rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
function _fun63452(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:6, offset: 0x01b7ff3f, size: 325 bytes, params: 8, frame: 26
var object3;
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 Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {item: {'backgroundColor': 'transparent', 'paddingHorizontal': 0, 'paddingVertical': 8,
object = {item: {'backgroundColor': 'transparent', 'paddingHorizontal': 0, 'paddingVertical': 8,
'flexDirection': 'row', 'alignItems': 'center'}};
const object4 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const object2 = {};
const PRIMARY_NORMAL = Fonts.PRIMARY_NORMAL;
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
copyDataProperties(object4, textStyles(PRIMARY_NORMAL, TEXT_DEFAULT, 14), undefined);
object3.label = object4;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.iconMargin = {marginEnd: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumFeatureList.tsx');
const TEXT_DEFAULT = (Native).colors.TEXT_DEFAULT;
copyDataProperties(object2, TextStyles(PRIMARY_NORMAL, TEXT_DEFAULT, 14), undefined);
object.label = object2;
const PX_16 = (Native).space.PX_16;
object.iconMargin = {marginEnd: PX_16};
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumFeatureList.tsx');
exports.default = PremiumFeatureList;
function PremiumFeatureList({features, style, separator, iconStyle, labelStyle, rowStyle}) { // fn#63453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:426, offset: 0x01b80084, size: 129 bytes, params: 2, frame: 16
const env0_4 = useStyles();
return (
<View style={style}>
{features.filter(function(a0) {
return !a0.hidden;
}).map(_fun63455)}
</View>
);
function _fun63455(a0, a1) { // fn#63455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:597, offset: 0x01b80113, size: 301 bytes, params: 3, frame: 25
const IconComponent = a0.IconComponent;
let value = environment.__proto__;
const Fragment = env1_2.Fragment;
const stylesBinding = styles;
const items2 = [stylesBinding.item];
items2[1] = rowStyle;
const iconComponent = (
<IconComponent
size="md"
color={a0.color}
style={[stylesBinding.iconMargin, iconStyle]}
/>
);
const FormRow = (NativeModule).FormRow;
const Label = FormRow.Label;
const items5 = [
<View style={items2} key={a1}>
{iconComponent}
<Label
numberOfLines={2}
style={[stylesBinding.label, labelStyle]}
text={a0.label}
/>
</View>,
];
const separatorBinding = separator;
value = null;
items5[1] = value != separatorBinding ? separator === '' ? value : a0.renderSeparatorBelow ? separator : value : value;
return (
<Fragment key={a1}>
{items5}
</Fragment>
);
}
}
}
function PremiumFeatureList({features, style, separator, iconStyle, labelStyle, rowStyle}) { // fn#63453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:426, offset: 0x01b80084, size: 129 bytes, params: 2, frame: 16
const env0_4 = useStyles();
return (
<View style={style}>
{features.filter(function(a0) {
return !a0.hidden;
}).map(_fun63455)}
</View>
);
}
function _fun63455(a0, a1) { // fn#63455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8149:597, offset: 0x01b80113, size: 301 bytes, params: 3, frame: 25
const IconComponent = a0.IconComponent;
let value = environment.__proto__;
const Fragment = env1_2.Fragment;
const stylesBinding = styles;
const items2 = [stylesBinding.item];
items2[1] = rowStyle;
const iconComponent = <IconComponent size="md" color={a0.color} style={[stylesBinding.iconMargin, iconStyle]} />;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const Label = FormRow.Label;
const items5 = [<View style={items2} key={a1}>{iconComponent}<Label numberOfLines={2} style={[stylesBinding.label,
labelStyle]} text={a0.label} /></View>];
const separatorBinding = separator;
value = null;
items5[1] = value != separatorBinding ? separator === '' ? value : a0.renderSeparatorBelow ? separator : value : value;
return (
<Fragment key={a1}>
{items5}
</Fragment>
);
}
global.__d(_fun63452, 7971, [31, 27, 661, 33, 4501, 6597, 697, 7972,
2]) /* metro module 7971, dependencies: [31, 27, 661, 33, 4501, 6597, 697, 7972, 2] */;
@@ -1,108 +1,121 @@
/* Metro module 7028; source: components_native/premium/PremiumModal.tsx; dependencies: [31, 661, 33, 1244, 5282, 7029, 12224, 12227, 12269, 12279, 6771, 5280, 2] */
import UserSettingsPremium from '../../modules/user_settings/premium/native/UserSettingsPremium.tsx'; /* Metro dependency 7029 */
import PremiumManagePlan from '../../modules/user_settings/premium/native/PremiumManagePlan.tsx'; /* Metro dependency 12224 */
import UserSettingsPremiumGuildSubscriptions from '../../modules/user_settings/premium/native/UserSettingsPremiumGuildSubscriptions.tsx'; /* Metro dependency 12227 */
import PremiumPlanSelect from '../../modules/premium/native/PremiumPlanSelect.tsx'; /* Metro dependency 12269 */
import UserSettingsPremiumGifting from '../../modules/user_settings/premium/native/UserSettingsPremiumGifting.tsx'; /* Metro dependency 12279 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NavigatorNativeModule from '../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as UseAnalyticsLocationsModule from '../../modules/app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
function _fun55694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:6, offset: 0x013ae5e2, size: 177 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumModal.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumModal.tsx');
exports.default = PremiumModal;
exports.PREMIUM_KEY = 'PREMIUM_KEY';
}
function getScreens_55695({analyticsLocation, onClose, onBack, predicate, giftRecipientId, showCurrentPlan, planId, applicationId, activitySessionId, channelId, guildId, premiumFeatureCardOrder, onPaymentSuccess, onPaymentDismiss}) { // fn#55695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:149, offset: 0x013ae693, size: 636 bytes, params: 2, frame: 24
const object = {};
const PREMIUM = UserSettingsSections.PREMIUM;
const object2 = {};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
object2.title = Reflect.apply(string, intl, [t.lpNrPu]);
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object2.render = render_55696;
object[PREMIUM] = object2;
const PREMIUM_MANAGE_PLAN = UserSettingsSections.PREMIUM_MANAGE_PLAN;
const object3 = {};
object3.title = intl.string(t['8jmdON']);
object3.render = render_55697;
object[PREMIUM_MANAGE_PLAN] = object3;
const GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
const object4 = {};
object4.title = intl.string(t['+CbP2v']);
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object4.render = render_55698;
object[GUILD_BOOSTING] = object4;
const PREMIUM_PLAN_SELECT = UserSettingsSections.PREMIUM_PLAN_SELECT;
object[PREMIUM_PLAN_SELECT] = {title: intl.string(t.u95Dt4), headerLeft: headerLeft_55699,
initialParams: {predicate: predicate, showCurrentPlan: showCurrentPlan}, render: render_55700};
const PREMIUM_GIFTING = UserSettingsSections.PREMIUM_GIFTING;
const object7 = {};
string = intl.string;
const Oba8Sh = t.Oba8Sh;
object7.title = Reflect.apply(string, intl, [Oba8Sh]);
object7.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object7.render = render_55701;
object[PREMIUM_GIFTING] = object7;
return object;
function getScreens_55695Render() { // fn#55696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:504, owner: getScreens_55695.render, offset: 0x013ae90f, size: 111 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component applicationId={applicationId} onClose={onClose} activitySessionId={activitySessionId} channelId={channelId} guildId={guildId} premiumFeatureCardOrder={premiumFeatureCardOrder} onPaymentSuccess={onPaymentSuccess} onPaymentDismiss={onPaymentDismiss} />)(UserSettingsPremium);
}
function getScreens_55695({analyticsLocation, onClose, onBack, predicate, giftRecipientId, showCurrentPlan, planId, applicationId, activitySessionId, channelId, guildId, premiumFeatureCardOrder, onPaymentSuccess, onPaymentDismiss}) { // fn#55695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:149, offset: 0x013ae693, size: 636 bytes, params: 2, frame: 24
const object5 = {};
const PREMIUM = UserSettingsSections.PREMIUM;
const object6 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object6.title = Reflect.apply(string, intl, [t.lpNrPu]);
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object6.render = render_55696;
object5[PREMIUM] = object6;
const PREMIUM_MANAGE_PLAN = UserSettingsSections.PREMIUM_MANAGE_PLAN;
const object8 = {};
object8.title = intl.string(t['8jmdON']);
object8.render = render_55697;
object5[PREMIUM_MANAGE_PLAN] = object8;
const GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
const object9 = {};
object9.title = intl.string(t['+CbP2v']);
object9.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object9.render = render_55698;
object5[GUILD_BOOSTING] = object9;
const PREMIUM_PLAN_SELECT = UserSettingsSections.PREMIUM_PLAN_SELECT;
object5[PREMIUM_PLAN_SELECT] = {title: intl.string(t.u95Dt4), headerLeft: headerLeft_55699,
initialParams: {predicate: predicate, showCurrentPlan: showCurrentPlan}, render: render_55700};
const PREMIUM_GIFTING = UserSettingsSections.PREMIUM_GIFTING;
const object10 = {};
string = intl.string;
const Oba8Sh = t.Oba8Sh;
object10.title = Reflect.apply(string, intl, [Oba8Sh]);
object10.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose);
object10.render = render_55701;
object5[PREMIUM_GIFTING] = object10;
return object5;
}
function getScreens_55695Render_55697() { // fn#55697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:733, owner: getScreens_55695.render, offset: 0x013ae97e, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(PremiumManagePlan);
}
function PremiumModal({applicationId, analyticsLocation, analyticsLocations, initialRoute, onClose, onBack, giftRecipientId, predicate, showCurrentPlan, planId, activitySessionId, channelId, guildId, premiumFeatureCardOrder, onPaymentSuccess, onPaymentDismiss}) { // fn#55702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1488, offset: 0x013aeabc, size: 311 bytes, params: 2, frame: 33
analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsLocations).analyticsLocations;
const r7 = initialRoute ?? UserSettingsSections.PREMIUM;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<Navigator
screens={getScreens_55695({analyticsLocation: analyticsLocation, onClose: onClose, onBack: onBack,
predicate: predicate, giftRecipientId: giftRecipientId, showCurrentPlan: showCurrentPlan,
planId: planId, applicationId: applicationId, activitySessionId: activitySessionId,
channelId: channelId, guildId: guildId, premiumFeatureCardOrder: premiumFeatureCardOrder,
onPaymentSuccess: onPaymentSuccess, onPaymentDismiss: onPaymentDismiss})}
initialRouteName={r7}
/>
</AnalyticsLocationProvider>
);
}
function getScreens_55695Render_55698() { // fn#55698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:869, owner: getScreens_55695.render, offset: 0x013ae9a5, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(UserSettingsPremiumGuildSubscriptions);
}
function getScreens_55695Render() { // fn#55696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:504, owner: getScreens_55695.render, offset: 0x013ae90f, size: 111 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component applicationId={applicationId} onClose={onClose} activitySessionId={activitySessionId} channelId={channelId} guildId={guildId} premiumFeatureCardOrder={premiumFeatureCardOrder} onPaymentSuccess={onPaymentSuccess} onPaymentDismiss={onPaymentDismiss} />)(importDefault(7029) /* metro dependency 7029: UserSettingsPremium */);
}
function getScreens_55695HeaderLeft(a0) { // fn#55699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:968, owner: getScreens_55695.headerLeft, offset: 0x013ae9cc, size: 87 bytes, params: 2, frame: 14
var r0;
const canGoBack = a0.canGoBack;
let value = environment.__proto__;
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
if (canGoBack) {
value = value.getHeaderBackButton(onBack)(a0);
r0 = value;
} else {
value = value.getHeaderCloseButton(onClose)(a0);
r0 = value;
}
return r0;
}
function getScreens_55695Render_55697() { // fn#55697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:733, owner: getScreens_55695.render, offset: 0x013ae97e, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(12224) /* metro dependency 12224: PremiumManagePlan */);
}
function getScreens_55695Render_55700({predicate, showCurrentPlan}) { // fn#55700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1105, owner: getScreens_55695.render, offset: 0x013aea23, size: 93 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component analyticsLocation={analyticsLocation} predicate={predicate} showCurrentPlan={showCurrentPlan} planId={planId} applicationId={applicationId} />)(PremiumPlanSelect);
}
function getScreens_55695Render_55698() { // fn#55698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:869, owner: getScreens_55695.render, offset: 0x013ae9a5, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__;
return ((Component) => <Component />)(importDefault(12227) /* metro dependency 12227: UserSettingsPremiumGuildSubscriptions */);
}
function getScreens_55695Render_55701() { // fn#55701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1344, owner: getScreens_55695.render, offset: 0x013aea80, size: 60 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component recipientUserId={giftRecipientId} analyticsLocation={analyticsLocation} />)(UserSettingsPremiumGifting);
}
function getScreens_55695HeaderLeft(a0) { // fn#55699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:968, owner: getScreens_55695.headerLeft, offset: 0x013ae9cc, size: 87 bytes, params: 2, frame: 14
var r0;
const canGoBack = a0.canGoBack;
let value = environment.__proto__;
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
if (canGoBack) {
value = value.getHeaderBackButton(onBack)(a0);
r0 = value;
} else {
value = value.getHeaderCloseButton(onClose)(a0);
r0 = value;
}
return r0;
}
function getScreens_55695Render_55700({predicate, showCurrentPlan}) { // fn#55700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1105, owner: getScreens_55695.render, offset: 0x013aea23, size: 93 bytes, params: 2, frame: 17
const value = environment.__proto__;
return ((Component) => <Component analyticsLocation={analyticsLocation} predicate={predicate} showCurrentPlan={showCurrentPlan} planId={planId} applicationId={applicationId} />)(importDefault(12269) /* metro dependency 12269: PremiumPlanSelect */);
}
function PremiumModal({applicationId, analyticsLocation, analyticsLocations, initialRoute, onClose, onBack, giftRecipientId, predicate, showCurrentPlan, planId, activitySessionId, channelId, guildId, premiumFeatureCardOrder, onPaymentSuccess, onPaymentDismiss}) { // fn#55702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1488, offset: 0x013aeabc, size: 311 bytes, params: 2, frame: 33
analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsLocations).analyticsLocations;
const r7 = initialRoute ?? UserSettingsSections.PREMIUM;
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const Navigator = (NavigatorNativeModule).Navigator;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<Navigator
screens={getScreens_55695({analyticsLocation: analyticsLocation, onClose: onClose, onBack: onBack,
predicate: predicate, giftRecipientId: giftRecipientId, showCurrentPlan: showCurrentPlan,
planId: planId, applicationId: applicationId, activitySessionId: activitySessionId,
channelId: channelId, guildId: guildId, premiumFeatureCardOrder: premiumFeatureCardOrder,
onPaymentSuccess: onPaymentSuccess, onPaymentDismiss: onPaymentDismiss})}
initialRouteName={r7}
/>
</AnalyticsLocationProvider>
);
}
function getScreens_55695Render_55701() { // fn#55701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7206:1344, owner: getScreens_55695.render, offset: 0x013aea80, size: 60 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component recipientUserId={giftRecipientId} analyticsLocation={analyticsLocation} />)(importDefault(12279) /* metro dependency 12279: UserSettingsPremiumGifting */);
}
global.__d(_fun55694, 7028, [31, 661, 33, 1244, 5282, 7029, 12224, 12227, 12269, 12279, 6771, 5280,
2]) /* metro module 7028, dependencies: [31, 661, 33, 1244, 5282, 7029, 12224, 12227, 12269, 12279, 6771, 5280, 2] */;
@@ -1,57 +1,68 @@
/* Metro module 14233; source: components_native/premium/PremiumPerksList.tsx; dependencies: [31, 27, 33, 4501, 697, 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 TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun107646(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:6, offset: 0x02303e3a, size: 322 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'backgroundColor': null, 'borderRadius': null, 'width': 40, 'height': 40,
const object2 = {'backgroundColor': null, 'borderRadius': null, 'width': 40, 'height': 40,
'justifyContent': 'center', 'alignItems': 'center'};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const env0_5 = Reflect.apply(createStyles, value, [{perkInfoContainer: {'flexDirection': 'row',
'alignItems': 'center', 'gap': 16}, perkInfoTextContainer: {'flexDirection': 'column', 'gap': 4,
'maxWidth': 279}, perkListContainer: {'width': '100%', 'paddingVertical': 24, 'flexDirection': 'column',
'gap': 24}, perkIconContainer: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumPerksList.tsx');
'gap': 24}, perkIconContainer: object2}]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumPerksList.tsx');
exports.default = PremiumPerksList;
}
function PremiumPerksList({perks}) { // fn#107647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:566, offset: 0x02303f7c, size: 77 bytes, params: 2, frame: 16
const styles = useStyles();
return (
<View style={styles.perkListContainer}>
{perks.map(_fun107648)}
</View>
);
}
function _fun107648(a0, a1) { // fn#107648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:667, offset: 0x02303fc9, size: 241 bytes, params: 3, frame: 24
const IconComponent = a0.IconComponent;
const value = environment.__proto__;
const stylesBinding = styles;
const perkInfoContainer = stylesBinding.perkInfoContainer;
const view = <View style={stylesBinding.perkIconContainer}><IconComponent size="md" /></View>;
const perkInfoTextContainer = stylesBinding.perkInfoTextContainer;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={perkInfoContainer} key={a1}>
{view}
<View style={perkInfoTextContainer}>
<Text variant="text-md/bold" color="text-strong">
{a0.label}
</Text>
<Text variant="text-md/medium" color="text-default">
{a0.description}
</Text>
function PremiumPerksList({perks}) { // fn#107647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:566, offset: 0x02303f7c, size: 77 bytes, params: 2, frame: 16
const styles = useStyles();
return (
<View style={styles.perkListContainer}>
{perks.map(_fun107648)}
</View>
</View>
);
);
function _fun107648(a0, a1) { // fn#107648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14430:667, offset: 0x02303fc9, size: 241 bytes, params: 3, frame: 24
const IconComponent = a0.IconComponent;
const value = environment.__proto__;
const stylesBinding = styles;
const perkInfoContainer = stylesBinding.perkInfoContainer;
const view = (
<View style={stylesBinding.perkIconContainer}>
<IconComponent size="md" />
</View>
);
const perkInfoTextContainer = stylesBinding.perkInfoTextContainer;
const Text = (TextModule).Text;
return (
<View style={perkInfoContainer} key={a1}>
{view}
<View style={perkInfoTextContainer}>
<Text variant="text-md/bold" color="text-strong">
{a0.label}
</Text>
<Text variant="text-md/medium" color="text-default">
{a0.description}
</Text>
</View>
</View>
);
}
}
}
global.__d(_fun107646, 14233, [31, 27, 33, 4501, 697, 4573,
2]) /* metro module 14233, dependencies: [31, 27, 33, 4501, 697, 4573, 2] */;
@@ -1,66 +1,80 @@
/* Metro module 13707; source: components_native/premium/PremiumRestorationAlert.tsx; dependencies: [6, 7, 15, 17, 18, 31, 5140, 33, 13708, 566, 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 Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import IAPStoreAndroid from '../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import UntouchableAlert from '../common/UntouchableAlert.tsx'; /* Metro dependency 13708 */
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 */
function _fun104749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:6, offset: 0x0229fb75, size: 296 bytes, params: 8, frame: 20
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 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
const PureComponent = value.PureComponent;
value = _fun104753(PureComponent);
const flux = importDefault(566) /* metro dependency 566: flux */;
value = flux.connectStores([iapStoreAndroid], function() {
value = Flux.connectStores([IAPStoreAndroid], function() {
var object = {};
object.isBusy = IAPStoreAndroid.isBusy();
return object;
})(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumRestorationAlert.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumRestorationAlert.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_104750() { // fn#104750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:182, offset: 0x0229fc9d, 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_104750() { // fn#104750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:182, offset: 0x0229fc9d, 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_104750_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_104750_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun104753(a0) { // fn#104753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:381, offset: 0x0229fcff, size: 72 bytes, params: 2, frame: 15
const closure = PremiumRestorationAlert;
env0_6(closure, a0);
return env0_3(closure, [{key: 'render', value: value_104755}]);
}
function value_104755() { // fn#104755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:722, offset: 0x0229fd47, size: 69 bytes, params: 1, frame: 15
const {isBusy, onClose} = this.props;
const value = environment.__proto__;
return ((Component) => <Component loading={isBusy} onClose={onClose} />)(importDefault(13708) /* metro dependency 13708: UntouchableAlert */);
function _fun104753(a0) { // fn#104753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:381, offset: 0x0229fcff, size: 72 bytes, params: 2, frame: 15
const PremiumRestorationAlert2 = PremiumRestorationAlert;
Inherits(PremiumRestorationAlert2, a0);
return CreateClass(PremiumRestorationAlert2, [{key: 'render', value: value_104755}]);
function PremiumRestorationAlert() { // fn#104754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:393, offset: 0x01081bdc, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, PremiumRestorationAlert);
const value3 = env1_5(PremiumRestorationAlert);
return env1_4(this, _isNativeReflectConstruct_104750() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_104755() { // fn#104755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13904:722, offset: 0x0229fd47, size: 69 bytes, params: 1, frame: 15
const {isBusy, onClose} = this.props;
const value = environment.__proto__;
return ((Component) => <Component loading={isBusy} onClose={onClose} />)(UntouchableAlert);
}
}
}
global.__d(_fun104749, 13707, [6, 7, 15, 17, 18, 31, 5140, 33, 13708, 566,
2]) /* metro module 13707, dependencies: [6, 7, 15, 17, 18, 31, 5140, 33, 13708, 566, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,18 +1,27 @@
/* Metro module 12264; source: components_native/premium/PremiumSubscriptionPricingUpsell.tsx; dependencies: [57, 31, 27, 1949, 1878, 3807, 3808, 5140, 661, 1880, 33, 4501, 566, 3802, 7563, 694, 7037, 5143, 4573, 477, 5138, 5137, 1244, 1856, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import LocaleStore from '../../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import SubscriptionPlanStore from '../../stores/billing/SubscriptionPlanStore.tsx'; /* Metro dependency 3807 */
import SubscriptionStore from '../../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */
import IAPStoreAndroid from '../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import BillingActionCreators from '../../actions/native/BillingActionCreators.tsx'; /* Metro dependency 7037 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as PremiumConstantsModule from '../../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ProductIdsAndroidModule from '../../modules/premium/native/ProductIds.android.tsx'; /* Metro dependency 5143 */
import * as UseSubscriptionPlansLoadedModule from '../../modules/billing/hooks/useSubscriptionPlansLoaded.tsx'; /* Metro dependency 7563 */
function _fun93722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:6, offset: 0x020c0645, size: 476 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_11 = (require(661) /* metro dependency 661: Constants */).CurrencyCodes;
let value = require(1880) /* metro dependency 1880: PremiumConstants */;
let value = PremiumConstantsModule;
const env0_12 = value.SubscriptionPlans;
const env0_13 = value.SubscriptionPlanInfo;
const env0_14 = value.PremiumTypes;
@@ -23,175 +32,209 @@ function _fun93722(global, require, importDefault, importAll, module, exports, d
const env0_18 = value.jsx;
const env0_19 = value.Fragment;
const env0_20 = value.jsxs;
const env0_21 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({title: {marginTop: 16},
const env0_21 = (CreateStylesModule).createStyles({title: {marginTop: 16},
pricingSection: {alignItems: 'center'}, originalPrice: {textDecorationLine: 'line-through'},
cardText: {'lineHeight': 20, 'marginTop': 8, 'textAlign': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumSubscriptionPricingUpsell.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumSubscriptionPricingUpsell.tsx');
exports.default = PremiumSubscriptionPricingUpsell;
}
function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:635, offset: 0x020c0821, size: 1807 bytes, params: 1, frame: 33
var r19;
var price;
var price2;
var r10;
var price3;
var r1;
var r14;
var r16;
var r17;
var value10;
var moduleValue8;
var moduleValue10;
var value16;
var moduleValue11;
var formatRate;
var moduleValue12;
var moduleValue13;
var moduleValue14;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var text;
var defaultImport2;
var defaultImport3;
var defaultImport4;
var jsxRuntimeEnv0_19Binding;
var XVMAKU;
var moduleValue15;
var object2;
var moduleValue16;
var value;
const value2 = undefined;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
const hasBoostDiscount2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).hasBoostDiscount(currentUser);
const locale = fluxModule.useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const value3 = (require(7563) /* metro dependency 7563: useSubscriptionPlansLoaded */).useSubscriptionPlansLoaded();
const env0_1 = fluxModule.useStateFromStores([SubscriptionStore], function() {
return SubscriptionStore.getPremiumTypeSubscription();
});
const value4 = fluxModule.useStateFromStores([SubscriptionPlanStore], _fun93727);
env0_4.useEffect(_fun93728, []);
const moduleValue6 = fluxModule;
const useStateFromStoresArray = moduleValue6.useStateFromStoresArray;
const value6 = env0_3(Reflect.apply(useStateFromStoresArray, moduleValue6, [[IAPStoreAndroid], _fun93730]), 5);
const value7 = 0;
let property = value6[value7];
const property2 = value6[1];
const property3 = value6[2];
const property4 = value6[3];
const property5 = value6[4];
const value8 = null;
const {interval,
intervalCount} = value8 != value4 ? value4 : SubscriptionPlanInfo[SubscriptionPlans.PREMIUM_MONTH_GUILD];
if (value3) {
if (IAPStoreAndroid.isReady()) {
if (value8 == property) {
return (
<Text style={styles.cardText} variant="text-md/medium">
{'...'}
</Text>
);
}
r19 = value8 == property ? value2 : property.currencyCode.toLowerCase();
price = value8 == property ? value2 : property.price;
if (interval === SubscriptionIntervalTypes.YEAR) {
r1 = value8 != property5 && value8 != property4 ? property5.price - property4.price : value8;
r14 = r1;
r16 = r1;
} else if (hasBoostDiscount2) {
if (value8 == price) {
function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:635, offset: 0x020c0821, size: 1807 bytes, params: 1, frame: 33
var r19;
var price;
var price2;
var r10;
var price3;
var r1;
var r14;
var r16;
var r17;
var value10;
var moduleValue8;
var moduleValue10;
var value16;
var moduleValue11;
var formatRate;
var moduleValue12;
var moduleValue13;
var moduleValue14;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var format;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var text;
var defaultImport2;
var defaultImport3;
var defaultImport4;
var jsxRuntimeEnv0_19Binding;
var XVMAKU;
var moduleValue15;
var object3;
var moduleValue16;
var value;
const value2 = undefined;
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
let object = [UserStore];
const currentUser = Reflect.apply(useStateFromStores, FluxModule, [object, function() {
return UserStore.getCurrentUser();
}]);
const hasBoostDiscount2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).hasBoostDiscount(currentUser);
const locale = FluxModule.useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const value3 = (UseSubscriptionPlansLoadedModule).useSubscriptionPlansLoaded();
const env0_1 = FluxModule.useStateFromStores([SubscriptionStore], function() {
return SubscriptionStore.getPremiumTypeSubscription();
});
const value4 = FluxModule.useStateFromStores([SubscriptionPlanStore], _fun93727);
ReactModule.useEffect(_fun93728, []);
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const value6 = Module00057(Reflect.apply(useStateFromStoresArray, FluxModule, [[IAPStoreAndroid], _fun93730]), 5);
const value7 = 0;
let property = value6[value7];
const property2 = value6[1];
const property3 = value6[2];
const property4 = value6[3];
const property5 = value6[4];
const value8 = null;
const {interval,
intervalCount} = value8 != value4 ? value4 : SubscriptionPlanInfo[SubscriptionPlans.PREMIUM_MONTH_GUILD];
if (value3) {
iapStoreAndroidBinding = IAPStoreAndroid;
if (iapStoreAndroidBinding.isReady()) {
if (value8 == property) {
return (
<Text style={styles.cardText} variant="text-md/medium">
{'...'}
</Text>
);
}
r19 = value8 == property ? value2 : property.currencyCode.toLowerCase();
price = value8 == property ? value2 : property.price;
if (interval === SubscriptionIntervalTypes.YEAR) {
r1 = value8 != property5 && value8 != property4 ? property5.price - property4.price : value8;
r14 = r1;
r16 = r1;
} else if (hasBoostDiscount2) {
if (value8 == price) {
r14 = price;
r16 = price;
} else {
price2 = value8 == property3 ? value2 : property3.price;
r10 = value8 != price2 ? price2 : value7;
price3 = value8 == property2 ? value2 : property2.price;
value10 = r10 - (value8 != price3 ? price3 : value7);
r14 = price;
r16 = value10;
}
} else {
r14 = price;
r16 = price;
} else {
price2 = value8 == property3 ? value2 : property3.price;
r10 = value8 != price2 ? price2 : value7;
price3 = value8 == property2 ? value2 : property2.price;
value10 = r10 - (value8 != price3 ? price3 : value7);
r14 = price;
r16 = value10;
}
} else {
r14 = price;
r16 = price;
}
r1 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && value8 != r16;
if (r1) {
moduleValue8 = require(5138) /* metro dependency 5138: PriceUtils */;
r10 = moduleValue8.convertToMajorCurrencyUnits(r16, CurrencyCodes.USD);
} else {
r10 = r16;
}
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && value8 != r14) {
moduleValue10 = require(5138) /* metro dependency 5138: PriceUtils */;
r1 = moduleValue10.convertToMajorCurrencyUnits(r14, CurrencyCodes.USD);
} else {
r1 = r14;
}
value16 = '...';
if (value8 != r10) {
moduleValue11 = require(5137) /* metro dependency 5137: PriceUtils */;
formatRate = moduleValue11.formatRate;
moduleValue12 = require(5137) /* metro dependency 5137: PriceUtils */;
r17 = Reflect.apply(formatRate, moduleValue11, [moduleValue12.formatPrice(r10, r19,
{convertToMajorUnits: false}),
interval, intervalCount]);
} else {
r17 = value16;
}
if (value8 != r1) {
moduleValue13 = require(5137) /* metro dependency 5137: PriceUtils */;
formatRate = moduleValue13.formatRate;
moduleValue14 = require(5137) /* metro dependency 5137: PriceUtils */;
r16 = Reflect.apply(formatRate, moduleValue13, [moduleValue14.formatPrice(r1, r19,
{convertToMajorUnits: false}),
interval, intervalCount]);
} else {
r16 = value16;
}
if (r10 !== r1) {
object = {};
object.style = styles.cardText;
object.accessibilityLabel = intl.formatToPlainString(t.lEIwDw, {price: r17, originalPrice: r16});
object.variant = 'text-md/medium';
object.children = intl.format(t.eRSsbf, {price: r17, originalPrice: r16,
originalPriceHook: originalPriceHook});
r1 = object;
} else {
object = {};
object.style = styles.cardText;
object.variant = 'text-md/medium';
object.children = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Mmf63F,
{price: r17});
r1 = object;
}
text = <Text {...r1} />;
defaultImport2 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport2.hasFreeBoosts(currentUser)) {
if (hasBoostDiscount2) {
defaultImport3 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport3.isPremium(currentUser, PremiumTypes.TIER_2)) {
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['ZikTt+'];
object2 = {};
object2.freeSubscriptionCount = NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM;
moduleValue16 = require(1856) /* metro dependency 1856: NumberUtils */;
object2.discountPercent = moduleValue16.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100);
value = <Text {...textProps}>{Reflect.apply(format, intl, [property, object2])}</Text>;
value = <>{value}{text}</>;
r1 = value;
r1 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && value8 != r16;
if (r1) {
moduleValue8 = require(5138) /* metro dependency 5138: PriceUtils */;
r10 = moduleValue8.convertToMajorCurrencyUnits(r16, CurrencyCodes.USD);
} else {
r10 = r16;
}
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && value8 != r14) {
moduleValue10 = require(5138) /* metro dependency 5138: PriceUtils */;
r1 = moduleValue10.convertToMajorCurrencyUnits(r14, CurrencyCodes.USD);
} else {
r1 = r14;
}
value16 = '...';
if (value8 != r10) {
moduleValue11 = require(5137) /* metro dependency 5137: PriceUtils */;
formatRate = moduleValue11.formatRate;
moduleValue12 = require(5137) /* metro dependency 5137: PriceUtils */;
r17 = Reflect.apply(formatRate, moduleValue11, [moduleValue12.formatPrice(r10, r19,
{convertToMajorUnits: false}),
interval, intervalCount]);
} else {
r17 = value16;
}
if (value8 != r1) {
moduleValue13 = require(5137) /* metro dependency 5137: PriceUtils */;
formatRate = moduleValue13.formatRate;
moduleValue14 = require(5137) /* metro dependency 5137: PriceUtils */;
r16 = Reflect.apply(formatRate, moduleValue13, [moduleValue14.formatPrice(r1, r19,
{convertToMajorUnits: false}),
interval, intervalCount]);
} else {
r16 = value16;
}
if (r10 !== r1) {
object = {};
object.style = styles.cardText;
object.accessibilityLabel = intl.formatToPlainString(t.lEIwDw, {price: r17, originalPrice: r16});
object.variant = 'text-md/medium';
object.children = intl.format(t.eRSsbf, {price: r17, originalPrice: r16,
originalPriceHook: originalPriceHook});
r1 = object;
} else {
object = {};
object.style = styles.cardText;
object.variant = 'text-md/medium';
object.children = intl.format((require(1244) /* metro dependency 1244: indexNative */).t.Mmf63F,
{price: r17});
r1 = object;
}
text = <Text {...r1} />;
defaultImport2 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport2.hasFreeBoosts(currentUser)) {
if (hasBoostDiscount2) {
defaultImport3 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport3.isPremium(currentUser, PremiumTypes.TIER_2)) {
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
format = intl.format;
property = (require(1244) /* metro dependency 1244: indexNative */).t['ZikTt+'];
object3 = {};
object3.freeSubscriptionCount = NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM;
moduleValue16 = require(1856) /* metro dependency 1856: NumberUtils */;
object3.discountPercent = moduleValue16.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100);
value = (
<Text {...textProps}>
{Reflect.apply(format, intl, [property, object3])}
</Text>
);
value = (
<>
{value}
{text}
</>
);
r1 = value;
} else if (hasBoostDiscount2) {
defaultImport4 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport4.isPremium(currentUser, PremiumTypes.TIER_1)) {
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
format = intl.format;
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
value = (
<Text {...textProps}>
{Reflect.apply(format, intl, [XVMAKU,
{discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}
</Text>
);
value = (
<>
{value}
{text}
</>
);
r1 = value;
} else {
r1 = text;
}
} else {
r1 = text;
}
} else if (hasBoostDiscount2) {
defaultImport4 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport4.isPremium(currentUser, PremiumTypes.TIER_1)) {
@@ -200,10 +243,19 @@ function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discor
format = intl.format;
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
value = <Text {...textProps}>{Reflect.apply(format, intl, [XVMAKU,
{discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}</Text>;
value = <>{value}{text}</>;
value = (
<Text {...textProps}>
{Reflect.apply(format, intl, [XVMAKU,
{discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}
</Text>
);
value = (
<>
{value}
{text}
</>
);
r1 = value;
} else {
r1 = text;
@@ -219,10 +271,18 @@ function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discor
format = intl.format;
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
value = <Text {...textProps}>{Reflect.apply(format, intl, [XVMAKU,
{discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}</Text>;
value = <>{value}{text}</>;
value = (
<Text {...textProps}>
{Reflect.apply(format, intl, [XVMAKU, {discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}
</Text>
);
value = (
<>
{value}
{text}
</>
);
r1 = value;
} else {
r1 = text;
@@ -230,107 +290,105 @@ function PricingSubheadingCopy() { // fn#93723, source: /ci/build/discord/discor
} else {
r1 = text;
}
} else if (hasBoostDiscount2) {
defaultImport4 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport4.isPremium(currentUser, PremiumTypes.TIER_1)) {
jsxRuntimeEnv0_19Binding = jsxRuntimeEnv0_19;
var textProps = {style: styles.cardText, variant: 'text-md/medium'};
format = intl.format;
XVMAKU = (require(1244) /* metro dependency 1244: indexNative */).t.XVMAKU;
moduleValue15 = require(1856) /* metro dependency 1856: NumberUtils */;
value = <Text {...textProps}>{Reflect.apply(format, intl, [XVMAKU,
{discountPercent: moduleValue15.formatPercent(locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}])}</Text>;
value = <>{value}{text}</>;
r1 = value;
} else {
r1 = text;
}
} else {
r1 = text;
return r1;
}
return r1;
}
}
return (
<Text style={styles.cardText} variant="text-md/medium">
{'...'}
</Text>
);
}
function PremiumSubscriptionPricingUpsell() { // fn#93732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:3246, offset: 0x020c1108, size: 213 bytes, params: 1, frame: 23
const styles = useStyles();
const value2 = (require(7563) /* metro dependency 7563: useSubscriptionPlansLoaded */).useSubscriptionPlansLoaded();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.pricingSection}>
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-lg/semibold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3x1PFE'])}
</Text>
{value2 ? <PricingSubheadingCopy /> : null}
</View>
);
}
function _fun93727() { // fn#93727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:966, offset: 0x020c0f30, size: 47 bytes, params: 1, frame: 12
return premiumTypeSubscription != null ? SubscriptionPlanStore.get(premiumTypeSubscription.planId) : undefined;
}
function _fun93728() { // fn#93728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1016, offset: 0x020c0f5f, size: 66 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
if (!IAPStoreAndroid.isReady()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun93729);
}
}
function _fun93730() { // fn#93730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1129, offset: 0x020c0fc6, size: 222 bytes, params: 1, frame: 17
let getProduct = IAPStoreAndroid.getProduct;
const ProductIds = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).ProductIds;
const PREMIUM_GUILD_1_MONTHLY = ProductIds.PREMIUM_GUILD_1_MONTHLY;
const items2 = [Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_GUILD_1_MONTHLY])];
getProduct = IAPStoreAndroid.getProduct;
const PREMIUM_TIER_2_MONTHLY = ProductIds.PREMIUM_TIER_2_MONTHLY;
items2[1] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_MONTHLY]);
getProduct = IAPStoreAndroid.getProduct;
const PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY = ProductIds.PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY;
items2[2] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY]);
getProduct = IAPStoreAndroid.getProduct;
const PREMIUM_TIER_2_YEARLY = ProductIds.PREMIUM_TIER_2_YEARLY;
items2[3] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_YEARLY]);
getProduct = IAPStoreAndroid.getProduct;
const PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY = ProductIds.PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY;
items2[4] = Reflect.apply(getProduct, IAPStoreAndroid, [PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY]);
return items2;
}
function originalPriceHook(a0, a1) { // fn#93731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:2526, owner: PricingSubheadingCopy.originalPriceHook, offset: 0x020c10a4, size: 100 bytes, params: 3, frame: 16
if (env0_2 === env0_3) {
return null;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.originalPrice}
variant="text-sm/medium"
color="text-muted"
key={a1}
>
{a0}
<Text style={styles.cardText} variant="text-md/medium">
{'...'}
</Text>
);
function _fun93727() { // fn#93727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:966, offset: 0x020c0f30, size: 47 bytes, params: 1, frame: 12
return premiumTypeSubscription != null ? SubscriptionPlanStore.get(premiumTypeSubscription.planId) : undefined;
}
function _fun93728() { // fn#93728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1016, offset: 0x020c0f5f, size: 66 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const iapStoreAndroidBinding = IAPStoreAndroid;
if (!iapStoreAndroidBinding.isReady()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun93729);
}
function _fun93729() { // fn#93729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1049, offset: 0x020c0fa1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (BillingActionCreators).loadProducts();
}
}
function _fun93730() { // fn#93730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1129, offset: 0x020c0fc6, size: 222 bytes, params: 1, frame: 17
let iapStoreAndroidBinding = IAPStoreAndroid;
let getProduct = iapStoreAndroidBinding.getProduct;
const ProductIds = (ProductIdsAndroidModule).ProductIds;
const PREMIUM_GUILD_1_MONTHLY = ProductIds.PREMIUM_GUILD_1_MONTHLY;
const items2 = [Reflect.apply(getProduct, iapStoreAndroidBinding, [PREMIUM_GUILD_1_MONTHLY])];
iapStoreAndroidBinding = IAPStoreAndroid;
getProduct = iapStoreAndroidBinding.getProduct;
const PREMIUM_TIER_2_MONTHLY = ProductIds.PREMIUM_TIER_2_MONTHLY;
items2[1] = Reflect.apply(getProduct, iapStoreAndroidBinding, [PREMIUM_TIER_2_MONTHLY]);
iapStoreAndroidBinding = IAPStoreAndroid;
getProduct = iapStoreAndroidBinding.getProduct;
const PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY = ProductIds.PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY;
items2[2] = Reflect.apply(getProduct, iapStoreAndroidBinding, [PREMIUM_TIER_2_PREMIUM_GUILD_1_MONTHLY]);
iapStoreAndroidBinding = IAPStoreAndroid;
getProduct = iapStoreAndroidBinding.getProduct;
const PREMIUM_TIER_2_YEARLY = ProductIds.PREMIUM_TIER_2_YEARLY;
items2[3] = Reflect.apply(getProduct, iapStoreAndroidBinding, [PREMIUM_TIER_2_YEARLY]);
iapStoreAndroidBinding = IAPStoreAndroid;
getProduct = iapStoreAndroidBinding.getProduct;
const PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY = ProductIds.PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY;
items2[4] = Reflect.apply(getProduct, iapStoreAndroidBinding, [PREMIUM_TIER_2_PREMIUM_GUILD_1_YEARLY]);
return items2;
}
function originalPriceHook(a0, a1) { // fn#93731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:2526, owner: PricingSubheadingCopy.originalPriceHook, offset: 0x020c10a4, size: 100 bytes, params: 3, frame: 16
if (env0_2 === Module00057) {
return null;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
style={styles.originalPrice}
variant="text-sm/medium"
color="text-muted"
key={a1}
>
{a0}
</Text>
);
}
}
}
function PremiumSubscriptionPricingUpsell() { // fn#93732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:3246, offset: 0x020c1108, size: 213 bytes, params: 1, frame: 23
const styles = useStyles();
const value2 = (UseSubscriptionPlansLoadedModule).useSubscriptionPlansLoaded();
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.pricingSection}>
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-lg/semibold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3x1PFE'])}
</Text>
{
value2
? (
<PricingSubheadingCopy />
)
: null
}
</View>
);
}
}
function _fun93729() { // fn#93729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12450:1049, offset: 0x020c0fa1, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(7037) /* metro dependency 7037: BillingActionCreators */).loadProducts();
}
global.__d(_fun93722, 12264, [57, 31, 27, 1949, 1878, 3807, 3808, 5140, 661, 1880, 33, 4501, 566, 3802, 7563, 694,
7037, 5143, 4573, 477, 5138, 5137, 1244, 1856,
2]) /* metro module 12264, dependencies: [57, 31, 27, 1949, 1878, 3807, 3808, 5140, 661, 1880, 33, 4501, 566, 3802, 7563, 694, 7037, 5143, 4573, 477, 5138, 5137, 1244, 1856, 2] */;
@@ -1,18 +1,25 @@
/* Metro module 12266; source: components_native/premium/PremiumSubscriptionUpsell.tsx; dependencies: [31, 27, 1949, 1878, 661, 7047, 1880, 33, 4501, 697, 4064, 1244, 1856, 566, 3802, 4589, 676, 4573, 12267, 12268, 7971, 4578, 2] */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import LocaleStore from '../../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ConstantsIOSModule from '../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as CheckmarkLargeIconModule from '../../design/components/Icon/native/redesign/generated/CheckmarkLargeIcon.tsx'; /* Metro dependency 4064 */
import * as TextModule from '../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ColorConstantsModule from '../../modules/colors/native/ColorConstants.tsx'; /* Metro dependency 7047 */
function _fun93740(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12452:6, offset: 0x020c16f1, size: 692 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
const StyleSheet = value.StyleSheet;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const env0_7 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
const Fonts = (ConstantsModule).Fonts;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_8 = value.NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM;
const env0_9 = value.GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT;
@@ -22,116 +29,161 @@ function _fun93740(global, require, importDefault, importAll, module, exports, d
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.title = {textAlign: 'center'};
object2.subtitle = {'lineHeight': 20, 'marginTop': 8, 'textAlign': 'center'};
const object6 = {paddingTop: 32};
object6.borderTopWidth = 2 * StyleSheet.hairlineWidth;
object = {};
object.title = {textAlign: 'center'};
object.subtitle = {'lineHeight': 20, 'marginTop': 8, 'textAlign': 'center'};
const object3 = {paddingTop: 32};
object3.borderTopWidth = 2 * StyleSheet.hairlineWidth;
let BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.borderTopColor = BORDER_SUBTLE;
object2.upsell = object6;
const object7 = {'borderRadius': null, 'padding': 16, 'alignItems': 'center'};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.upsellCard = object7;
const object8 = {'borderRadius': null, 'padding': 16, 'marginTop': 12, 'alignSelf': 'stretch'};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.borderTopColor = BORDER_SUBTLE;
object.upsell = object3;
const object4 = {'borderRadius': null, 'padding': 16, 'alignItems': 'center'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.upsellCard = object4;
const object5 = {'borderRadius': null, 'padding': 16, 'marginTop': 12, 'alignSelf': 'stretch'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object8.backgroundColor = BORDER_SUBTLE;
object2.upsellFeatures = object8;
object2.upsellFeatureSubLogo = {'alignSelf': 'center', 'height': 10, 'width': 54};
object2.upsellFeatureList = {marginTop: 8};
object2.upsellButton = {marginTop: 16};
object2.upsellFeatureLogoTier2 = {'alignSelf': 'center', 'height': 20, 'marginTop': 6, 'width': 84};
object5.backgroundColor = BORDER_SUBTLE;
object.upsellFeatures = object5;
object.upsellFeatureSubLogo = {'alignSelf': 'center', 'height': 10, 'width': 54};
object.upsellFeatureList = {marginTop: 8};
object.upsellButton = {marginTop: 16};
object.upsellFeatureLogoTier2 = {'alignSelf': 'center', 'height': 20, 'marginTop': 6, 'width': 84};
let WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object2.upsellLabel = {color: WHITE, fontFamily: PRIMARY_SEMIBOLD, fontSize: 16, lineHeight: 20};
object.upsellLabel = {color: WHITE, fontFamily: PRIMARY_SEMIBOLD, fontSize: 16, lineHeight: 20};
WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
object2.upsellRow = {'paddingVertical': 0, 'marginTop': 8, color: WHITE};
const env0_13 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumSubscriptionUpsell.tsx');
object.upsellRow = {'paddingVertical': 0, 'marginTop': 8, color: WHITE};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumSubscriptionUpsell.tsx');
exports.default = PremiumSubscriptionUpsell;
}
function PremiumSubscriptionUpsell({onLearnMorePremium, style}) { // fn#93741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12452:1155, offset: 0x020c19a5, size: 1263 bytes, params: 2, frame: 43
var r9;
var r0;
var defaultImport2;
const HorizontalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
var defaultImport3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var jsxRuntimeEnv0_11Binding;
var items2;
var items3;
var items4;
var PremiumFeatureList;
var object;
const CheckmarkLargeIcon = (require(4064) /* metro dependency 4064: CheckmarkLargeIcon */).CheckmarkLargeIcon;
var formatToPlainString;
var P3aEj6;
var moduleValue2;
var unsafe_rawColors;
var WHITE;
var items5;
var object2;
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
if ((importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUsePremiumGuildMemberProfile(currentUser)) {
r0 = null;
} else {
var viewBindingProps = {style: [styles.upsell, style]};
defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
var defaultImport2Props2 = {style: styles.upsellCard, start: HorizontalGradient.START,
end: HorizontalGradient.END,
colors: Gradients.PREMIUM_GUILD};
defaultImport3 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport3.isPremium(currentUser)) {
jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
items2 = [<Text style={styles.title} accessibilityRole="header" variant="heading-lg/semibold" color="always-white">{intl.string(t.YYfHlx)}</Text>];
items2[1] = <Text style={styles.subtitle} variant="text-md/semibold" color="always-white">{intl.format(t.Af0zEZ,
{numFreeGuildSubscriptions: NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM})}</Text>;
r9 = <>{items2}</>;
function PremiumSubscriptionUpsell({onLearnMorePremium, style}) { // fn#93741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12452:1155, offset: 0x020c19a5, size: 1263 bytes, params: 2, frame: 43
var r9;
var r0;
var defaultImport2;
const HorizontalGradient = (ConstantsIOSModule).HorizontalGradient;
var defaultImport3;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var jsxRuntimeEnv0_11Binding;
var items2;
var items3;
var items4;
var PremiumFeatureList;
var object3;
const CheckmarkLargeIcon = (CheckmarkLargeIconModule).CheckmarkLargeIcon;
var formatToPlainString;
var P3aEj6;
var moduleValue2;
var unsafe_rawColors;
var WHITE;
var items5;
var object4;
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
if ((importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUsePremiumGuildMemberProfile(currentUser)) {
r0 = null;
} else {
r9 = <Text style={styles.title} accessibilityRole="header" variant="heading-lg/semibold" color="always-white">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['qUl+K4'])}</Text>;
var viewBindingProps = {style: [styles.upsell, style]};
defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
var defaultImport2Props2 = {style: styles.upsellCard, start: HorizontalGradient.START,
end: HorizontalGradient.END,
colors: Gradients.PREMIUM_GUILD};
defaultImport3 = importDefault(3802) /* metro dependency 3802: PremiumUtils */;
if (defaultImport3.isPremium(currentUser)) {
jsxRuntimeEnv0_11Binding = jsxRuntimeEnv0_11;
items2 = [
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-lg/semibold"
color="always-white"
>
{intl.string(t.YYfHlx)}
</Text>,
];
items2[1] = (
<Text
style={styles.subtitle}
variant="text-md/semibold"
color="always-white"
>
{intl.format(t.Af0zEZ, {numFreeGuildSubscriptions: NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM})}
</Text>
);
r9 = (
<>
{items2}
</>
);
} else {
r9 = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-lg/semibold"
color="always-white"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['qUl+K4'])}
</Text>
);
}
items3 = [r9];
var viewBinding2Props = {style: styles.upsellFeatures};
items4 = [
<Image style={styles.upsellFeatureSubLogo} source={importDefault(12267) /* metro dependency 12267 */} />,
];
items4[1] = <Image style={styles.upsellFeatureLogoTier2} source={importDefault(12268) /* metro dependency 12268 */} />;
PremiumFeatureList = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
var defaultImport4Props = {style: styles.upsellFeatureList};
object3 = {};
object3.IconComponent = CheckmarkLargeIcon;
formatToPlainString = intl.formatToPlainString;
P3aEj6 = t.P3aEj6;
moduleValue2 = require(1856) /* metro dependency 1856: NumberUtils */;
object3.label = Reflect.apply(formatToPlainString, intl, [P3aEj6,
{discountPercentage: moduleValue2.formatPercent(LocaleStore.locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}]);
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
WHITE = unsafe_rawColors.WHITE;
object3.color = WHITE;
items5 = [object3];
object4 = {};
object4.IconComponent = CheckmarkLargeIcon;
object4.label = intl.formatToPlainString(t.Ntlzbd,
{numFreeGuildSubscriptions: NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM});
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
WHITE = unsafe_rawColors.WHITE;
object4.color = WHITE;
items5[1] = object4;
defaultImport4Props.features = items5;
defaultImport4Props.labelStyle = styles.upsellLabel;
defaultImport4Props.rowStyle = styles.upsellRow;
items4[2] = <PremiumFeatureList {...defaultImport4Props} />;
items3[1] = (
<View {...viewBinding2Props}>
{items4}
</View>
);
items3[2] = (
<View style={styles.upsellButton}>
{((Button) => <Button variant="experimental_premium-secondary" text={intl.string(t.fJOECn)} onPress={onLearnMorePremium} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}
</View>
);
r0 = (
<View {...viewBindingProps}>
{((Component) => <Component {...defaultImport2Props2}>{items3}</Component>)(defaultImport2)}
</View>
);
}
items3 = [r9];
var viewBinding2Props = {style: styles.upsellFeatures};
items4 = [<Image style={styles.upsellFeatureSubLogo} source={importDefault(12267) /* metro dependency 12267 */} />];
items4[1] = <Image style={styles.upsellFeatureLogoTier2} source={importDefault(12268) /* metro dependency 12268 */} />;
PremiumFeatureList = importDefault(7971) /* metro dependency 7971: PremiumFeatureList */;
var defaultImport4Props = {style: styles.upsellFeatureList};
object = {};
object.IconComponent = CheckmarkLargeIcon;
formatToPlainString = intl.formatToPlainString;
P3aEj6 = t.P3aEj6;
moduleValue2 = require(1856) /* metro dependency 1856: NumberUtils */;
object.label = Reflect.apply(formatToPlainString, intl, [P3aEj6,
{discountPercentage: moduleValue2.formatPercent(LocaleStore.locale,
GUILD_BOOST_COST_FOR_PREMIUM_USER_DISCOUNT_PERCENT / 100)}]);
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
WHITE = unsafe_rawColors.WHITE;
object.color = WHITE;
items5 = [object];
object2 = {};
object2.IconComponent = CheckmarkLargeIcon;
object2.label = intl.formatToPlainString(t.Ntlzbd,
{numFreeGuildSubscriptions: NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM});
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
WHITE = unsafe_rawColors.WHITE;
object2.color = WHITE;
items5[1] = object2;
defaultImport4Props.features = items5;
defaultImport4Props.labelStyle = styles.upsellLabel;
defaultImport4Props.rowStyle = styles.upsellRow;
items4[2] = <PremiumFeatureList {...defaultImport4Props} />;
items3[1] = <View {...viewBinding2Props}>{items4}</View>;
items3[2] = <View style={styles.upsellButton}>{((Button) => <Button variant="experimental_premium-secondary" text={intl.string(t.fJOECn)} onPress={onLearnMorePremium} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>;
r0 = <View {...viewBindingProps}>{((Component) => <Component {...defaultImport2Props2}>{items3}</Component>)(defaultImport2)}</View>;
return r0;
}
return r0;
}
global.__d(_fun93740, 12266, [31, 27, 1949, 1878, 661, 7047, 1880, 33, 4501, 697, 4064, 1244, 1856, 566, 3802, 4589,
676, 4573, 12267, 12268, 7971, 4578,
2]) /* metro module 12266, dependencies: [31, 27, 1949, 1878, 661, 7047, 1880, 33, 4501, 697, 4064, 1244, 1856, 566, 3802, 4589, 676, 4573, 12267, 12268, 7971, 4578, 2] */;
@@ -1,75 +1,103 @@
/* Metro module 12291; source: components_native/premium/PremiumTierCard.tsx; dependencies: [31, 27, 7047, 1880, 33, 4501, 697, 6235, 1357, 4589, 676, 3802, 12292, 12293, 7312, 7250, 7251, 7307, 6239, 2] */
import MobileVisualRefreshExperiment from '../../modules/themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import defaultImport2 from '../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
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 ConstantsIOSModule from '../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as PremiumConstantsModule from '../../modules/premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as PremiumUtilsModule from '../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import * as LegacyTokensModule from '../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
import * as ColorConstantsModule from '../../modules/colors/native/ColorConstants.tsx'; /* Metro dependency 7047 */
function _fun93895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12477:6, offset: 0x020c92c9, size: 506 bytes, params: 8, frame: 22
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
const env0_5 = (require(7047) /* metro dependency 7047: ColorConstants */).getPremiumGradientColor;
const env0_6 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.Fragment;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {header: {'marginTop': 24, 'padding': 16}, textLogoTier0: {'width': 158, 'height': 32},
object = {header: {'marginTop': 24, 'padding': 16}, textLogoTier0: {'width': 158, 'height': 32},
textLogoTier1: {'width': 185, 'height': 32}, textLogoTier2: {'width': 80, 'height': 32},
wumpusLogo: {'position': 'absolute', 'top': 0, 'right': 24, 'zIndex': 1}, wumpusLogoTier0: {'width': 83,
'height': 100}, wumpusLogoTier1: {'width': 86, 'height': 100}, wumpusLogoTier2: {'width': 133, 'height': 100}};
const object4 = {padding: 16};
object4.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.body = object4;
const DARK_PRIMARY_630_LIGHT_PRIMARY_100 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_630_LIGHT_PRIMARY_100;
object3.bodyLegacy = {backgroundColor: DARK_PRIMARY_630_LIGHT_PRIMARY_100};
const env0_10 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumTierCard.tsx');
const object2 = {padding: 16};
object2.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.body = object2;
const DARK_PRIMARY_630_LIGHT_PRIMARY_100 = (LegacyTokensModule).DARK_PRIMARY_630_LIGHT_PRIMARY_100;
object.bodyLegacy = {backgroundColor: DARK_PRIMARY_630_LIGHT_PRIMARY_100};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumTierCard.tsx');
exports.default = _default_93896;
}
function _default_93896({premiumType, children, style}) { // fn#93896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12477:748, offset: 0x020c94c3, size: 793 bytes, params: 2, frame: 28
const styles = useStyles();
const value3 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('PremiumTierCard');
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
const defaultImport2Props = {style: styles.header};
const HorizontalGradient = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
const START = HorizontalGradient.START;
defaultImport2Props.start = START;
const END = HorizontalGradient.END;
defaultImport2Props.end = END;
defaultImport2Props.colors = getPremiumGradientColor(premiumType);
const imageBindingProps = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'header',
accessibilityLabel: (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumTypeDisplayName(premiumType)};
let TIER_0 = PremiumTypes.TIER_0;
imageBindingProps.style = TIER_0 === premiumType ? styles.textLogoTier0 : PremiumTypes.TIER_1 === premiumType ? styles.textLogoTier1 : PremiumTypes.TIER_2 !== premiumType ? undefined : styles.textLogoTier2;
TIER_0 = PremiumTypes.TIER_0;
imageBindingProps.source = TIER_0 === premiumType ? importDefault(12292) /* metro dependency 12292 */ : PremiumTypes.TIER_1 === premiumType ? importDefault(12293) /* metro dependency 12293 */ : PremiumTypes.TIER_2 !== premiumType ? undefined : importDefault(7312) /* metro dependency 7312 */;
const items3 = [((Component) => <Component {...defaultImport2Props}><Image {...imageBindingProps} /></Component>)(defaultImport2)];
const items2 = [styles.wumpusLogo];
TIER_0 = PremiumTypes.TIER_0;
items2[1] = TIER_0 === premiumType ? styles.wumpusLogoTier0 : PremiumTypes.TIER_1 === premiumType ? styles.wumpusLogoTier1 : PremiumTypes.TIER_2 !== premiumType ? undefined : styles.wumpusLogoTier2;
TIER_0 = PremiumTypes.TIER_0;
items3[1] = <Image accessible={false} importantForAccessibility="no" style={items2} source={TIER_0 === premiumType ? importDefault(7250) /* metro dependency 7250 */ : PremiumTypes.TIER_1 === premiumType ? importDefault(7251) /* metro dependency 7251 */ : PremiumTypes.TIER_2 !== premiumType ? undefined : importDefault(7307) /* metro dependency 7307 */} />;
items3[2] = <View style={[styles.body, !value3 && styles.bodyLegacy]}>{children}</View>;
const fragment = <>{items3}</>;
if (value3) {
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
return (
<Card variant="surface-high" style={style}>
{fragment}
</Card>
function _default_93896({premiumType, children, style}) { // fn#93896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12477:748, offset: 0x020c94c3, size: 793 bytes, params: 2, frame: 28
const styles = useStyles();
const value3 = (MobileVisualRefreshExperiment)('PremiumTierCard');
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const defaultImport2Props = {style: styles.header};
const HorizontalGradient = (ConstantsIOSModule).HorizontalGradient;
const START = HorizontalGradient.START;
defaultImport2Props.start = START;
const END = HorizontalGradient.END;
defaultImport2Props.end = END;
defaultImport2Props.colors = getPremiumGradientColor(premiumType);
const imageBindingProps = {'accessible': true, 'accessibilityLabel': null, 'accessibilityRole': 'header',
accessibilityLabel: (PremiumUtilsModule).getPremiumTypeDisplayName(premiumType)};
let TIER_0 = PremiumTypes.TIER_0;
imageBindingProps.style = TIER_0 === premiumType ? styles.textLogoTier0 : PremiumTypes.TIER_1 === premiumType ? styles.textLogoTier1 : PremiumTypes.TIER_2 !== premiumType ? undefined : styles.textLogoTier2;
TIER_0 = PremiumTypes.TIER_0;
imageBindingProps.source = TIER_0 === premiumType ? importDefault(12292) /* metro dependency 12292 */ : PremiumTypes.TIER_1 === premiumType ? importDefault(12293) /* metro dependency 12293 */ : PremiumTypes.TIER_2 !== premiumType ? undefined : importDefault(7312) /* metro dependency 7312 */;
const items3 = [
((Component) => <Component {...defaultImport2Props}><Image {...imageBindingProps} /></Component>)(defaultImport2),
];
const items2 = [styles.wumpusLogo];
TIER_0 = PremiumTypes.TIER_0;
items2[1] = TIER_0 === premiumType ? styles.wumpusLogoTier0 : PremiumTypes.TIER_1 === premiumType ? styles.wumpusLogoTier1 : PremiumTypes.TIER_2 !== premiumType ? undefined : styles.wumpusLogoTier2;
TIER_0 = PremiumTypes.TIER_0;
items3[1] = (
<Image
accessible={false}
importantForAccessibility="no"
style={items2}
source={TIER_0 === premiumType ? importDefault(7250) /* metro dependency 7250 */ : PremiumTypes.TIER_1 === premiumType ? importDefault(7251) /* metro dependency 7251 */ : PremiumTypes.TIER_2 !== premiumType ? undefined : importDefault(7307) /* metro dependency 7307 */}
/>
);
} else {
return (
<View style={style}>
{fragment}
items3[2] = (
<View style={[styles.body, !value3 && styles.bodyLegacy]}>
{children}
</View>
);
const fragment = (
<>
{items3}
</>
);
if (value3) {
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
return (
<Card variant="surface-high" style={style}>
{fragment}
</Card>
);
} else {
return (
<View style={style}>
{fragment}
</View>
);
}
}
}
global.__d(_fun93895, 12291, [31, 27, 7047, 1880, 33, 4501, 697, 6235, 1357, 4589, 676, 3802, 12292, 12293, 7312,
7250, 7251, 7307, 6239,
2]) /* metro module 12291, dependencies: [31, 27, 7047, 1880, 33, 4501, 697, 6235, 1357, 4589, 676, 3802, 12292, 12293, 7312, 7250, 7251, 7307, 6239, 2] */;
@@ -1,87 +1,106 @@
/* Metro module 12296; source: components_native/premium/PremiumUnverifiedWarning.tsx; dependencies: [6, 7, 15, 17, 18, 31, 1878, 33, 4501, 697, 1305, 1244, 3868, 566, 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 Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
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 NativeModule from '../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun93909(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:6, offset: 0x020ca152, size: 397 bytes, params: 8, frame: 23
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 */;
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 = importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
const env0_9 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [{warning: {'color': null,
let value = ReactModule;
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
const RED_400 = (Native).unsafe_rawColors.RED_400;
const env0_9 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [{warning: {'color': null,
'fontSize': 12, 'marginTop': 10, color: RED_400}}]);
const PureComponent = value.PureComponent;
value = _fun93913(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
const ThemeContext = (NativeModule).ThemeContext;
value.contextType = ThemeContext;
const flux = importDefault(566) /* metro dependency 566: flux */;
value = flux.connectStores([userStore], _fun93916)(value);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/PremiumUnverifiedWarning.tsx');
value = Flux.connectStores([UserStore], _fun93916)(value);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/PremiumUnverifiedWarning.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_93910() { // fn#93910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:182, offset: 0x020ca2df, 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_93910() { // fn#93910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:182, offset: 0x020ca2df, 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_93910_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_93910_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun93913(a0) { // fn#93913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:501, offset: 0x020ca341, size: 72 bytes, params: 2, frame: 15
const closure = PremiumUnverifiedWarning;
env0_6(closure, a0);
return env0_3(closure, [{key: 'render', value: value_93915}]);
}
function _fun93913(a0) { // fn#93913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:501, offset: 0x020ca341, size: 72 bytes, params: 2, frame: 15
const PremiumUnverifiedWarning2 = PremiumUnverifiedWarning;
Inherits(PremiumUnverifiedWarning2, a0);
return CreateClass(PremiumUnverifiedWarning2, [{key: 'render', value: value_93915}]);
function PremiumUnverifiedWarning() { // fn#93914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:513, offset: 0x00ec62ac, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, PremiumUnverifiedWarning);
const value3 = env1_5(PremiumUnverifiedWarning);
return env1_4(this, _isNativeReflectConstruct_93910() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function _fun93916() { // fn#93916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:1119, offset: 0x020ca427, size: 52 bytes, params: 1, frame: 12
const verified = UserStore.getCurrentUser()?.verified;
return {verified: verified != null && verified};
}
function value_93915() { // fn#93915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:847, offset: 0x020ca389, size: 158 bytes, params: 1, frame: 19
var r0;
var LegacyText;
var intl;
const value = environment.__proto__;
const value2 = env1_9(this.context);
const props = this.props;
if (props.verified) {
r0 = null;
} else {
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var legacyTextProps = {style: [value2.warning, props.style]};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<LegacyText {...legacyTextProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0LgOKH'])}
</LegacyText>
);
}
return r0;
}
function value_93915() { // fn#93915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:847, offset: 0x020ca389, size: 158 bytes, params: 1, frame: 19
var r0;
var LegacyText;
var intl;
const value = environment.__proto__;
const value2 = env1_9(this.context);
const props = this.props;
if (props.verified) {
r0 = null;
} else {
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var legacyTextProps = {style: [value2.warning, props.style]};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <LegacyText {...legacyTextProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0LgOKH'])}</LegacyText>;
}
return r0;
function _fun93916() { // fn#93916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12482:1119, offset: 0x020ca427, size: 52 bytes, params: 1, frame: 12
const verified = UserStore.getCurrentUser()?.verified;
return {verified: verified != null && verified};
}
}
global.__d(_fun93909, 12296, [6, 7, 15, 17, 18, 31, 1878, 33, 4501, 697, 1305, 1244, 3868, 566,
2]) /* metro module 12296, dependencies: [6, 7, 15, 17, 18, 31, 1878, 33, 4501, 697, 1305, 1244, 3868, 566, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,114 +1,116 @@
/* Metro module 7324; source: components_native/premium/ShineAnimation.tsx; dependencies: [31, 27, 33, 4501, 697, 4017, 4504, 674, 2] */
import Module00674 from '../../by-id/module-00674.js'; /* Metro dependency 674 */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ReanimatedRexport from '../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 '../../modules/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 _fun59009(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:6, offset: 0x016dded1, size: 410 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
let 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.Image;
const StyleSheet = value2.StyleSheet;
const env0_5 = value2.View;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
Object = global.Object;
const env0_8 = Object.freeze({'FLASH_TIME_PERCENT': 0.72, 'FLASH_DURATION_PERCENT': 0.08});
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.container = {overflow: 'hidden'};
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object2.shineContainer = object4;
object2.shine = {'transform': null, 'width': 56, 'flex': 0, 'height': '300%', 'top': '-10%',
const createStyles = CreateStylesModule.createStyles;
object = {};
object.container = {overflow: 'hidden'};
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object.shineContainer = object3;
object.shine = {'transform': null, 'width': 56, 'flex': 0, 'height': '300%', 'top': '-10%',
transform: [{rotate: '30deg'}]};
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object2.shineInner = {backgroundColor: BACKGROUND_MOD_NORMAL, flex: 1};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function ShineAnimationTsx1(){const{interpolate,progress}=this.__closure;const widthPercent=interpolate(progress.get(),[0,1],[20,160]);return{width:widthPercent+"%"};}'};
object2 = {code: 'function ShineAnimationTsx2(){const{ShineAnimationConfig,interpolateColor,progress,flashStartColor,flashEndColor}=this.__closure;const startTime=ShineAnimationConfig.FLASH_TIME_PERCENT;const duration=ShineAnimationConfig.FLASH_DURATION_PERCENT;return{backgroundColor:interpolateColor(progress.get(),[0,startTime,startTime,startTime+duration,1],[flashStartColor,flashStartColor,flashEndColor,flashEndColor,flashStartColor])};}'};
const BACKGROUND_MOD_NORMAL = (Native).colors.BACKGROUND_MOD_NORMAL;
object.shineInner = {backgroundColor: BACKGROUND_MOD_NORMAL, flex: 1};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function ShineAnimationTsx1(){const{interpolate,progress}=this.__closure;const widthPercent=interpolate(progress.get(),[0,1],[20,160]);return{width:widthPercent+"%"};}'};
object = {code: 'function ShineAnimationTsx2(){const{ShineAnimationConfig,interpolateColor,progress,flashStartColor,flashEndColor}=this.__closure;const startTime=ShineAnimationConfig.FLASH_TIME_PERCENT;const duration=ShineAnimationConfig.FLASH_DURATION_PERCENT;return{backgroundColor:interpolateColor(progress.get(),[0,startTime,startTime,startTime+duration,1],[flashStartColor,flashStartColor,flashEndColor,flashEndColor,flashStartColor])};}'};
value = value.memo(ShineAnimation);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/ShineAnimation.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/ShineAnimation.tsx');
exports.default = value;
}
function ShineAnimation({source, style}) { // fn#59010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1124, offset: 0x016de06b, size: 620 bytes, params: 2, frame: 27
var object2;
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
env0_3.useEffect(_fun59011, [value2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = ShineAnimationA;
closure.__closure = {interpolate: reanimatedRexportModule.interpolate, progress: value2};
closure.__workletHash = 4072719467417;
closure.__initData = env0_10;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const defaultImport = importDefault(674) /* metro dependency 674 */;
let BRAND_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_360;
const value6 = defaultImport(BRAND_360).alpha(0.2).hex();
const defaultImport2 = defaultImport;
BRAND_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_360;
const value9 = defaultImport2(BRAND_360).alpha(1).hex();
const moduleValue3 = reanimatedRexportModule;
useAnimatedStyle = moduleValue3.useAnimatedStyle;
closure = ShineAnimationE;
object2 = {ShineAnimationConfig: env0_8};
object2.interpolateColor = reanimatedRexportModule.interpolateColor;
object2.progress = value2;
object2.flashStartColor = value6;
object2.flashEndColor = value9;
closure.__closure = object2;
closure.__workletHash = 9845866779228;
closure.__initData = env0_11;
const value10 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.container, style, value10];
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View2 style={items2}>
<View style={styles.shineContainer}>
<View3 style={value3} />
<View style={styles.shine}>
<View style={styles.shineInner} />
function ShineAnimation({source, style}) { // fn#59010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1124, offset: 0x016de06b, size: 620 bytes, params: 2, frame: 27
const styles = useStyles();
const value2 = (ReanimatedRexportModule).useSharedValue(0);
env0_3.useEffect(_fun59011, [value2]);
let useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = ShineAnimationA;
closure.__closure = {interpolate: ReanimatedRexportModule.interpolate, progress: value2};
closure.__workletHash = 4072719467417;
closure.__initData = env0_10;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const defaultImport = Module00674;
let BRAND_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_360;
const value6 = defaultImport(BRAND_360).alpha(0.2).hex();
const defaultImport2 = defaultImport;
BRAND_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_360;
const value9 = defaultImport2(BRAND_360).alpha(1).hex();
useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
closure = ShineAnimationE;
object = {ShineAnimationConfig: env0_8};
object.interpolateColor = ReanimatedRexportModule.interpolateColor;
object.progress = value2;
object.flashStartColor = value6;
object.flashEndColor = value9;
closure.__closure = object;
closure.__workletHash = 9845866779228;
closure.__initData = env0_11;
const value10 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const View2 = (ReanimatedRexport).View;
const items2 = [styles.container, style, value10];
const View3 = (ReanimatedRexport).View;
return (
<View2 style={items2}>
<View style={styles.shineContainer}>
<View3 style={value3} />
<View style={styles.shine}>
<View style={styles.shineInner} />
</View>
</View>
</View>
<Image source={source} />
</View2>
);
}
<Image source={source} />
</View2>
);
function _fun59011() { // fn#59011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1219, offset: 0x016de2d7, size: 130 bytes, params: 1, frame: 21
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withDelay = value.withDelay;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [400,
reanimatedRexportModule.withRepeat((TimingModule).withTiming(1,
{duration: 1000}), -1, false)])]);
}
function _fun59011() { // fn#59011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1219, offset: 0x016de2d7, size: 130 bytes, params: 1, frame: 21
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const withDelay = value.withDelay;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
Reflect.apply(set, binding, [Reflect.apply(withDelay, value, [400,
reanimatedRexportModule.withRepeat((require(4504) /* metro dependency 4504: timing */).withTiming(1,
{duration: 1000}), -1, false)])]);
}
function ShineAnimationA() { // fn#59012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1363, owner: ShineAnimation.A, offset: 0x016de359, size: 109 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate, value,
[env0_0.get(), [0, 1], [20, 160]]);
return {width: '' + value + '%'};
}
function ShineAnimationA() { // fn#59012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1363, owner: ShineAnimation.A, offset: 0x016de359, size: 109 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = Reflect.apply((require(4017) /* metro dependency 4017: ReanimatedRexport */).interpolate, value,
[env0_0.get(), [0, 1], [20, 160]]);
return {width: '' + value + '%'};
}
function ShineAnimationE() { // fn#59013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1698, owner: ShineAnimation.E, offset: 0x016de3c6, size: 143 bytes, params: 1, frame: 19
let value = environment.__proto__;
let binding = env1_8;
const FLASH_TIME_PERCENT = binding.FLASH_TIME_PERCENT;
const FLASH_DURATION_PERCENT = binding.FLASH_DURATION_PERCENT;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolateColor = value.interpolateColor;
const value3 = env0_0.get();
binding = env0_1;
const binding2 = env0_2;
return {backgroundColor: Reflect.apply(interpolateColor, value, [value3, [0, FLASH_TIME_PERCENT, FLASH_TIME_PERCENT,
FLASH_TIME_PERCENT + FLASH_DURATION_PERCENT, 1], [binding, binding, binding2, binding2, binding]])};
}
}
function ShineAnimationE() { // fn#59013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7502:1698, owner: ShineAnimation.E, offset: 0x016de3c6, size: 143 bytes, params: 1, frame: 19
let value = environment.__proto__;
let binding = env1_8;
const FLASH_TIME_PERCENT = binding.FLASH_TIME_PERCENT;
const FLASH_DURATION_PERCENT = binding.FLASH_DURATION_PERCENT;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const interpolateColor = value.interpolateColor;
const value3 = env0_0.get();
binding = env0_1;
const binding2 = env0_2;
return {backgroundColor: Reflect.apply(interpolateColor, value, [value3, [0, FLASH_TIME_PERCENT, FLASH_TIME_PERCENT,
FLASH_TIME_PERCENT + FLASH_DURATION_PERCENT, 1], [binding, binding, binding2, binding2, binding]])};
}
global.__d(_fun59009, 7324, [31, 27, 33, 4501, 697, 4017, 4504, 674,
2]) /* metro module 7324, dependencies: [31, 27, 33, 4501, 697, 4017, 4504, 674, 2] */;
@@ -1,101 +1,117 @@
/* Metro module 12348; source: components_native/premium/premium_guild_subscribe_modal/PremiumGuildPreview.tsx; dependencies: [31, 27, 1310, 661, 33, 4501, 697, 6235, 4002, 12349, 12350, 12351, 12352, 12353, 12354, 12355, 12356, 1305, 8249, 566, 6819, 2] */
import ThemeStore from '../../../modules/user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import GuildIcon from '../../../modules/guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as LegacyTokensModule from '../../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
import * as GuildIconModule from '../../../modules/guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
import * as GuildBoostingUtilsModule from '../../../utils/GuildBoostingUtils.tsx'; /* Metro dependency 8249 */
function _fun94223(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:6, offset: 0x020f17d9, size: 504 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const getThemedImageSource = function(a0, a1, a2) {
return require(dependencyMap[8]).isThemeDark(a0) ? a1 : a2;
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.Image;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).BoostedGuildTiers;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'padding': 16, 'borderRadius': null, 'flexDirection': 'row'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object = {};
const object2 = {'padding': 16, 'borderRadius': null, 'flexDirection': 'row'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.guild = object4;
object3.guildInfo = {marginLeft: 16};
const DARK_WHITE_500_LIGHT_BLACK_500 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_WHITE_500_LIGHT_BLACK_500;
object3.guildName = {'fontSize': 16, 'lineHeight': 20, color: DARK_WHITE_500_LIGHT_BLACK_500};
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.guild = object2;
object.guildInfo = {marginLeft: 16};
const DARK_WHITE_500_LIGHT_BLACK_500 = (LegacyTokensModule).DARK_WHITE_500_LIGHT_BLACK_500;
object.guildName = {'fontSize': 16, 'lineHeight': 20, color: DARK_WHITE_500_LIGHT_BLACK_500};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.tierPill = {'marginTop': 8, 'padding': 4, 'paddingRight': 8, 'alignSelf': 'flex-start',
object.tierPill = {'marginTop': 8, 'padding': 4, 'paddingRight': 8, 'alignSelf': 'flex-start',
'flexDirection': 'row', 'borderRadius': 11, backgroundColor: BACKGROUND_BASE_LOW};
object3.tierPillImage = {'width': 16, 'height': 16};
const DARK_WHITE_500_LIGHT_PRIMARY_660 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_WHITE_500_LIGHT_PRIMARY_660;
object3.tierPillText = {'fontSize': 12, 'lineHeight': 16, 'marginLeft': 4, color: DARK_WHITE_500_LIGHT_PRIMARY_660};
const env0_9 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/PremiumGuildPreview.tsx');
object.tierPillImage = {'width': 16, 'height': 16};
const DARK_WHITE_500_LIGHT_PRIMARY_660 = (LegacyTokensModule).DARK_WHITE_500_LIGHT_PRIMARY_660;
object.tierPillText = {'fontSize': 12, 'lineHeight': 16, 'marginLeft': 4, color: DARK_WHITE_500_LIGHT_PRIMARY_660};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/PremiumGuildPreview.tsx');
exports.default = PremiumGuildPreview;
}
function getTierIcon_94225(a0, a1) { // fn#94225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:822, offset: 0x020f1a06, size: 263 bytes, params: 3, frame: 18
const NONE = BoostedGuildTiers.NONE;
if (NONE === a1) {
return getThemedImageSource(a0, importDefault(12349) /* metro dependency 12349 */,
importDefault(12350) /* metro dependency 12350 */);
}
const TIER_1 = BoostedGuildTiers.TIER_1;
if (TIER_1 === a1) {
return getThemedImageSource(a0, importDefault(12351) /* metro dependency 12351 */,
importDefault(12352) /* metro dependency 12352 */);
}
const TIER_2 = BoostedGuildTiers.TIER_2;
if (TIER_2 === a1) {
return getThemedImageSource(a0, importDefault(12353) /* metro dependency 12353 */,
importDefault(12354) /* metro dependency 12354 */);
}
const TIER_3 = BoostedGuildTiers.TIER_3;
if (TIER_3 === a1) {
return getThemedImageSource(a0, importDefault(12355) /* metro dependency 12355 */,
importDefault(12356) /* metro dependency 12356 */);
}
}
function getTierIcon_94225(a0, a1) { // fn#94225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:822, offset: 0x020f1a06, size: 263 bytes, params: 3, frame: 18
const NONE = BoostedGuildTiers.NONE;
if (NONE === a1) {
return getThemedImageSource(a0, importDefault(12349) /* metro dependency 12349 */,
importDefault(12350) /* metro dependency 12350 */);
}
const TIER_1 = BoostedGuildTiers.TIER_1;
if (TIER_1 === a1) {
return getThemedImageSource(a0, importDefault(12351) /* metro dependency 12351 */,
importDefault(12352) /* metro dependency 12352 */);
}
const TIER_2 = BoostedGuildTiers.TIER_2;
if (TIER_2 === a1) {
return getThemedImageSource(a0, importDefault(12353) /* metro dependency 12353 */,
importDefault(12354) /* metro dependency 12354 */);
}
const TIER_3 = BoostedGuildTiers.TIER_3;
if (TIER_3 === a1) {
return getThemedImageSource(a0, importDefault(12355) /* metro dependency 12355 */,
importDefault(12356) /* metro dependency 12356 */);
}
}
function PremiumGuildTierPill({tier, theme}) { // fn#94226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:1108, offset: 0x020f1b0d, size: 187 bytes, params: 2, frame: 21
const styles = useStyles();
const image = <Image style={styles.tierPillImage} source={getTierIcon_94225(theme, tier)} />;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<View style={styles.tierPill}>
{image}
<LegacyText style={styles.tierPillText}>
{(require(8249) /* metro dependency 8249: GuildBoostingUtils */).getTierName(tier)}
</LegacyText>
</View>
);
}
function PremiumGuildPreview({guild, style}) { // fn#94227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:1346, offset: 0x020f1bc8, size: 320 bytes, params: 2, frame: 25
const styles = useStyles();
const theme = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return ThemeStore.theme;
});
const items2 = [styles.guild, style];
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const LARGE = GuildIconSizes.LARGE;
const guildIcon = <GuildIcon guild={guild} size={LARGE} selected={false} />;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<View style={items2}>
{guildIcon}
<View style={styles.guildInfo}>
<LegacyText style={styles.guildName}>
{guild.name}
function PremiumGuildTierPill({tier, theme}) { // fn#94226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:1108, offset: 0x020f1b0d, size: 187 bytes, params: 2, frame: 21
const styles = useStyles();
const image = <Image style={styles.tierPillImage} source={getTierIcon_94225(theme, tier)} />;
const LegacyText = (NativeModule).LegacyText;
return (
<View style={styles.tierPill}>
{image}
<LegacyText style={styles.tierPillText}>
{(GuildBoostingUtilsModule).getTierName(tier)}
</LegacyText>
<PremiumGuildTierPill tier={guild.premiumTier} theme={theme} />
</View>
</View>
);
);
}
function PremiumGuildPreview({guild, style}) { // fn#94227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12534:1346, offset: 0x020f1bc8, size: 320 bytes, params: 2, frame: 25
const styles = useStyles();
const theme = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return ThemeStore.theme;
});
const items2 = [styles.guild, style];
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
const LARGE = GuildIconSizes.LARGE;
const guildIcon = (
<GuildIcon
guild={guild}
size={LARGE}
selected={false}
/>
);
const LegacyText = (NativeModule).LegacyText;
return (
<View style={items2}>
{guildIcon}
<View style={styles.guildInfo}>
<LegacyText style={styles.guildName}>
{guild.name}
</LegacyText>
<PremiumGuildTierPill tier={guild.premiumTier} theme={theme} />
</View>
</View>
);
}
}
global.__d(_fun94223, 12348, [31, 27, 1310, 661, 33, 4501, 697, 6235, 4002, 12349, 12350, 12351, 12352, 12353,
12354, 12355, 12356, 1305, 8249, 566, 6819,
2]) /* metro module 12348, dependencies: [31, 27, 1310, 661, 33, 4501, 697, 6235, 4002, 12349, 12350, 12351, 12352, 12353, 12354, 12355, 12356, 1305, 8249, 566, 6819, 2] */;
@@ -1,9 +1,12 @@
/* Metro module 6524; source: components_native/premium/premium_guild_subscribe_modal/PremiumGuildSubscribeConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun51283(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6702:6, offset: 0x0122de93, size: 114 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/PremiumGuildSubscribeConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/PremiumGuildSubscribeConstants.tsx');
exports.PremiumGuildSubscribeModalScenes = {GUILD_SELECT: 'guild_select', OVERVIEW: 'overview',
CONFIRMATION: 'confirmation'};
}
global.__d(_fun51283, 6524, [2]) /* metro module 6524, dependencies: [2] */;
@@ -1,193 +1,209 @@
/* Metro module 6523; source: components_native/premium/premium_guild_subscribe_modal/PremiumGuildSubscribeModal.tsx; dependencies: [57, 31, 1310, 6524, 661, 33, 6525, 5282, 6522, 5277, 4002, 7000, 7001, 7002, 1244, 7004, 7007, 1305, 7009, 12345, 6518, 4571, 5280, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ThemeStore from '../../../modules/user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import UseBackPressHandler from '../../../modules/routing/native/useBackPressHandler.tsx'; /* Metro dependency 4571 */
import UseInitialValue from '../../../hooks/useInitialValue.tsx'; /* Metro dependency 6518 */
import SubscribeModalGuildSelect from './SubscribeModalGuildSelect.tsx'; /* Metro dependency 6525 */
import GuildBoostingMarketingOverview from '../../../modules/guild_boosting/native/marketing_redesign/GuildBoostingMarketingOverview.tsx'; /* Metro dependency 7009 */
import SubscribeModalConfirmation from './SubscribeModalConfirmation.tsx'; /* Metro dependency 12345 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as SharedModule from '../../../design/shared.tsx'; /* Metro dependency 4002 */
import * as HeaderActionButtonNativeModule from '../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorHeaderNativeModule from '../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
import * as BoostingActionCreatorsModule from '../../../actions/native/BoostingActionCreators.tsx'; /* Metro dependency 6522 */
import * as PremiumGuildSubscribeConstantsModule from './PremiumGuildSubscribeConstants.tsx'; /* Metro dependency 6524 */
import * as SettingsIconModule from '../../../design/components/Icon/native/redesign/generated/SettingsIcon.tsx'; /* Metro dependency 7002 */
import * as UserSettingsUtilsModule from '../../../utils/UserSettingsUtils.tsx'; /* Metro dependency 7004 */
function _fun51271(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:6, offset: 0x0122d74b, size: 216 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 themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const env0_6 = (require(6524) /* metro dependency 6524: PremiumGuildSubscribeConstants */).PremiumGuildSubscribeModalScenes;
const env0_7 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/PremiumGuildSubscribeModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/PremiumGuildSubscribeModal.tsx');
exports.default = PremiumGuildSubscribeModal;
}
function PremiumGuildSubscribeModal({guildId, guildBoostSlots, intent, onResult}) { // fn#51272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:345, offset: 0x0122d823, size: 297 bytes, params: 2, frame: 21
const {initialStack, screens} = (UseInitialValue)(_fun51273);
const useState = ReactModule.useState;
const value4 = onResult(Reflect.apply(useState, ReactModule, [initialStack[0].name]), 2);
const property = value4[0];
const env0_5 = value4[1];
const defaultImport2 = UseBackPressHandler;
const useCallback = ReactModule.useCallback;
defaultImport2(Reflect.apply(useCallback, ReactModule, [_fun51281, [property]]));
const Navigator = (NavigatorNativeModule).Navigator;
const intl = (IndexNativeModule).intl;
return (
<Navigator
screens={screens}
initialRouteStack={initialStack}
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
onStateChange={onStateChange}
/>
);
function _fun51273() { // fn#51273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:448, offset: 0x0122d94c, size: 290 bytes, params: 1, frame: 14
var environment;
var push;
var value2;
var value3;
var value4;
const items2 = [];
if (guildId == null) {
if (guildId != null) {
push = items2.push;
value3 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.OVERVIEW, params: {guildId: guildId,
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
} else {
push = items2.push;
value2 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.GUILD_SELECT,
params: {guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
}
} else if (guildBoostSlots == null) {
if (guildId != null) {
push = items2.push;
value3 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.OVERVIEW, params: {guildId: guildId,
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
} else {
push = items2.push;
value2 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.GUILD_SELECT,
params: {guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
}
} else if (guildBoostSlots.length > 0) {
push = items2.push;
value4 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.CONFIRMATION, params: {guildId: guildId,
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
} else if (guildId != null) {
push = items2.push;
value3 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.OVERVIEW, params: {guildId: guildId,
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
} else {
push = items2.push;
value2 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.GUILD_SELECT,
params: {guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
}
return {initialStack: items2, screens: getScreens_51274()};
function getScreens_51274() { // fn#51274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:777, offset: 0x0122da6e, size: 257 bytes, params: 1, frame: 21
var environment;
const object = {};
let value = environment.__proto__.__proto__;
const GUILD_SELECT = PremiumGuildSubscribeModalScenes.GUILD_SELECT;
object[GUILD_SELECT] = {headerShown: false, render: render_51275};
const OVERVIEW = PremiumGuildSubscribeModalScenes.OVERVIEW;
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
const getHeaderCloseButton = value.getHeaderCloseButton;
const closeApplyBoostModal = (BoostingActionCreatorsModule).closeApplyBoostModal;
object[OVERVIEW] = {headerLeft: Reflect.apply(getHeaderCloseButton, value, [closeApplyBoostModal]),
headerRight: headerRight, headerTitle: headerTitle_51278, render: render_51279};
const CONFIRMATION = PremiumGuildSubscribeModalScenes.CONFIRMATION;
const object4 = {};
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(closeApplyBoostModal);
const intl = (IndexNativeModule).intl;
const string = intl.string;
const VJEVbu = (IndexNativeModule).t.VJEVbu;
object4.headerTitle = Reflect.apply(string, intl, [VJEVbu]);
object4.render = render_51280;
object[CONFIRMATION] = object4;
return object;
function getScreens_51274Render(a0) { // fn#51275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:846, owner: getScreens_51274.render, offset: 0x0122db6f, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} />)(SubscribeModalGuildSelect);
}
function PremiumGuildSubscribeModal({guildId, guildBoostSlots, intent, onResult}) { // fn#51272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:345, offset: 0x0122d823, size: 297 bytes, params: 2, frame: 21
const {initialStack, screens} = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun51273);
const binding = env0_4;
const useState = binding.useState;
const value4 = onResult(Reflect.apply(useState, binding, [initialStack[0].name]), 2);
const property = value4[0];
const env0_5 = value4[1];
const defaultImport2 = importDefault(4571) /* metro dependency 4571: useBackPressHandler */;
const useCallback = binding.useCallback;
defaultImport2(Reflect.apply(useCallback, binding, [_fun51281, [property]]));
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
screens={screens}
initialRouteStack={initialStack}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
onStateChange={onStateChange}
/>
);
}
function headerRight() { // fn#51276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:964, owner: getScreens_51274.headerRight, offset: 0x0122dba0, size: 260 bytes, params: 1, frame: 19
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
const object = {};
object.source = SharedModule.isThemeDark(ThemeStore.theme) ? importDefault(7000) /* metro dependency 7000 */ : importDefault(7001) /* metro dependency 7001 */;
const SettingsIcon = (SettingsIconModule).SettingsIcon;
object.IconComponent = SettingsIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/']);
object.accessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+CbP2v']);
object.onPress = onPress_51277;
return <HeaderActionButton {...object} />;
function headerRightOnPress() { // fn#51277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1234, owner: getScreens_51274.headerRight.onPress, offset: 0x0122dca4, size: 113 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__.__proto__.__proto__;
const trackUserSettingsPaneViewed = UserSettingsUtilsModule.trackUserSettingsPaneViewed;
let GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
Reflect.apply(trackUserSettingsPaneViewed, UserSettingsUtilsModule, [{destinationPane: GUILD_BOOSTING}]);
(BoostingActionCreatorsModule).closeApplyBoostModal();
value = require(7007) /* metro dependency 7007: openUserSettings */;
const openUserSettings = value.openUserSettings;
GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
Reflect.apply(openUserSettings, value, [{screen: GUILD_BOOSTING}]);
}
}
function getScreens_51274HeaderTitle({children}) { // fn#51278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1412, owner: getScreens_51274.headerTitle, offset: 0x0122dd15, size: 167 bytes, params: 2, frame: 20
const value = environment.__proto__.__proto__.__proto__;
const NavigatorHeader = (NavigatorHeaderNativeModule).NavigatorHeader;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const VJEVbu = (IndexNativeModule).t.VJEVbu;
return (
<NavigatorHeader
title={Reflect.apply(string, intl, [VJEVbu])}
subtitle={children.length > 0
? ((LegacyText) => <LegacyText>{children}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)
: null}
/>
);
}
function getScreens_51274Render_51279(a0) { // fn#51279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1571, owner: getScreens_51274.render, offset: 0x0122ddbc, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} />)(GuildBoostingMarketingOverview);
}
function getScreens_51274Render_51280(a0) { // fn#51280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1741, owner: getScreens_51274.render, offset: 0x0122dded, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} />)(SubscribeModalConfirmation);
}
}
function _fun51273() { // fn#51273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:448, offset: 0x0122d94c, size: 290 bytes, params: 1, frame: 14
var environment;
var push;
var value2;
var value3;
var value4;
const items2 = [];
if (guildId == null) {
if (guildId != null) {
push = items2.push;
value3 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.OVERVIEW, params: {guildId: guildId,
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
} else {
push = items2.push;
value2 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.GUILD_SELECT,
params: {guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
}
} else if (guildBoostSlots == null) {
if (guildId != null) {
push = items2.push;
value3 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.OVERVIEW, params: {guildId: guildId,
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
} else {
push = items2.push;
value2 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.GUILD_SELECT,
params: {guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
function _fun51281() { // fn#51281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1879, offset: 0x0122de1e, size: 63 bytes, params: 1, frame: 12
var r0;
let value = environment.__proto__;
const GUILD_SELECT = PremiumGuildSubscribeModalScenes.GUILD_SELECT;
const value2 = ReactModule === GUILD_SELECT;
if (value2) {
value = require(6522) /* metro dependency 6522: BoostingActionCreators */;
value.closeApplyBoostModal();
value = true;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
} else if (guildBoostSlots.length > 0) {
push = items2.push;
value4 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.CONFIRMATION, params: {guildId: guildId,
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
} else if (guildId != null) {
push = items2.push;
value3 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.OVERVIEW, params: {guildId: guildId,
guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
} else {
push = items2.push;
value2 = environment.__proto__;
Reflect.apply(push, items2, [{name: PremiumGuildSubscribeModalScenes.GUILD_SELECT,
params: {guildBoostSlots: guildBoostSlots, intent: intent, onResult: onResult}}]);
function onStateChange(a0) { // fn#51282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:2071, owner: PremiumGuildSubscribeModal.onStateChange, offset: 0x0122de5d, size: 54 bytes, params: 2, frame: 13
const value = undefined;
const r1 = a0 == null ? value : a0.routes[a0.index];
if (r1 != null) {
env0_5(r1.name);
}
return value;
}
}
return {initialStack: items2, screens: getScreens_51274()};
}
function _fun51281() { // fn#51281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1879, offset: 0x0122de1e, size: 63 bytes, params: 1, frame: 12
var r0;
const binding = env0_4;
let value = environment.__proto__;
const GUILD_SELECT = PremiumGuildSubscribeModalScenes.GUILD_SELECT;
const value2 = binding === GUILD_SELECT;
if (value2) {
value = require(6522) /* metro dependency 6522: BoostingActionCreators */;
value.closeApplyBoostModal();
value = true;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function PremiumGuildSubscribeModalOnStateChange(a0) { // fn#51282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:2071, owner: PremiumGuildSubscribeModal.onStateChange, offset: 0x0122de5d, size: 54 bytes, params: 2, frame: 13
const value = undefined;
const r1 = a0 == null ? value : a0.routes[a0.index];
if (r1 != null) {
env0_5(r1.name);
}
return value;
}
function getScreens_51274() { // fn#51274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:777, offset: 0x0122da6e, size: 257 bytes, params: 1, frame: 21
var environment;
const object2 = {};
let value = environment.__proto__.__proto__;
const GUILD_SELECT = PremiumGuildSubscribeModalScenes.GUILD_SELECT;
object2[GUILD_SELECT] = {headerShown: false, render: render_51275};
const OVERVIEW = PremiumGuildSubscribeModalScenes.OVERVIEW;
value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
const getHeaderCloseButton = value.getHeaderCloseButton;
const closeApplyBoostModal = (require(6522) /* metro dependency 6522: BoostingActionCreators */).closeApplyBoostModal;
object2[OVERVIEW] = {headerLeft: Reflect.apply(getHeaderCloseButton, value, [closeApplyBoostModal]),
headerRight: headerRight_51276, headerTitle: headerTitle_51278, render: render_51279};
const CONFIRMATION = PremiumGuildSubscribeModalScenes.CONFIRMATION;
const object3 = {};
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(closeApplyBoostModal);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const VJEVbu = (require(1244) /* metro dependency 1244: indexNative */).t.VJEVbu;
object3.headerTitle = Reflect.apply(string, intl, [VJEVbu]);
object3.render = render_51280;
object2[CONFIRMATION] = object3;
return object2;
}
function getScreens_51274Render(a0) { // fn#51275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:846, owner: getScreens_51274.render, offset: 0x0122db6f, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(6525) /* metro dependency 6525: SubscribeModalGuildSelect */);
}
function getScreens_51274HeaderRight() { // fn#51276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:964, owner: getScreens_51274.headerRight, offset: 0x0122dba0, size: 260 bytes, params: 1, frame: 19
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
const object2 = {};
const sharedModule = require(4002) /* metro dependency 4002: shared */;
object2.source = sharedModule.isThemeDark(ThemeStore.theme) ? importDefault(7000) /* metro dependency 7000 */ : importDefault(7001) /* metro dependency 7001 */;
const SettingsIcon = (require(7002) /* metro dependency 7002: SettingsIcon */).SettingsIcon;
object2.IconComponent = SettingsIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3D5yo/']);
object2.accessibilityHint = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+CbP2v']);
object2.onPress = onPress_51277;
return <HeaderActionButton {...object2} />;
}
function getScreens_51274HeaderTitle({children}) { // fn#51278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1412, owner: getScreens_51274.headerTitle, offset: 0x0122dd15, size: 167 bytes, params: 2, frame: 20
const value = environment.__proto__.__proto__.__proto__;
const NavigatorHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).NavigatorHeader;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const VJEVbu = (require(1244) /* metro dependency 1244: indexNative */).t.VJEVbu;
return (
<NavigatorHeader
title={Reflect.apply(string, intl, [VJEVbu])}
subtitle={children.length > 0 ? ((LegacyText) => <LegacyText>{children}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText) : null}
/>
);
}
function getScreens_51274Render_51279(a0) { // fn#51279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1571, owner: getScreens_51274.render, offset: 0x0122ddbc, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(7009) /* metro dependency 7009: GuildBoostingMarketingOverview */);
}
function getScreens_51274Render_51280(a0) { // fn#51280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1741, owner: getScreens_51274.render, offset: 0x0122dded, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} />)(importDefault(12345) /* metro dependency 12345: SubscribeModalConfirmation */);
}
function headerRightOnPress_51277() { // fn#51277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6701:1234, owner: getScreens_51274.headerRight.onPress, offset: 0x0122dca4, size: 113 bytes, params: 1, frame: 16
let value = environment.__proto__.__proto__.__proto__.__proto__;
const userSettingsUtilsModule = require(7004) /* metro dependency 7004: UserSettingsUtils */;
const trackUserSettingsPaneViewed = userSettingsUtilsModule.trackUserSettingsPaneViewed;
let GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
Reflect.apply(trackUserSettingsPaneViewed, userSettingsUtilsModule, [{destinationPane: GUILD_BOOSTING}]);
(require(6522) /* metro dependency 6522: BoostingActionCreators */).closeApplyBoostModal();
value = require(7007) /* metro dependency 7007: openUserSettings */;
const openUserSettings = value.openUserSettings;
GUILD_BOOSTING = UserSettingsSections.GUILD_BOOSTING;
Reflect.apply(openUserSettings, value, [{screen: GUILD_BOOSTING}]);
}
global.__d(_fun51271, 6523, [57, 31, 1310, 6524, 661, 33, 6525, 5282, 6522, 5277, 4002, 7000, 7001, 7002, 1244,
7004, 7007, 1305, 7009, 12345, 6518, 4571, 5280,
2]) /* metro module 6523, dependencies: [57, 31, 1310, 6524, 661, 33, 6525, 5282, 6522, 5277, 4002, 7000, 7001, 7002, 1244, 7004, 7007, 1305, 7009, 12345, 6518, 4571, 5280, 2] */;
@@ -1,158 +1,178 @@
/* Metro module 6525; source: components_native/premium/premium_guild_subscribe_modal/SubscribeModalGuildSelect.tsx; dependencies: [57, 31, 27, 1867, 4896, 6524, 33, 4501, 697, 6235, 1484, 566, 6526, 6618, 6983, 1244, 6522, 5278, 6819, 1305, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import SortedGuildStore from '../../../stores/SortedGuildStore.tsx'; /* Metro dependency 4896 */
import SearchBarNav from '../../../modules/main_tabs_v2/native/shared_components/SearchBarNav.tsx'; /* Metro dependency 6983 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as LegacyTokensModule from '../../../design/migrations/native/LegacyTokens.tsx'; /* Metro dependency 6235 */
import * as BoostingActionCreatorsModule from '../../../actions/native/BoostingActionCreators.tsx'; /* Metro dependency 6522 */
import * as PremiumGuildSubscribeConstantsModule from './PremiumGuildSubscribeConstants.tsx'; /* Metro dependency 6524 */
import * as SafeAreaViewModule from '../../common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as GuildIconModule from '../../../modules/guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */
function _fun51284(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:6, offset: 0x0122df05, size: 391 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).ScrollView;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
const env0_9 = (require(6524) /* metro dependency 6524: PremiumGuildSubscribeConstants */).PremiumGuildSubscribeModalScenes;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_10 = value.jsx;
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.safeArea = {'backgroundColor': null, 'flexGrow': 1, 'flexShrink': 1, backgroundColor: BACKGROUND_BASE_LOW};
object2.guildList = {padding: 16};
object2.guildOption = {'flexDirection': 'row', 'alignItems': 'center', 'paddingVertical': 10};
const DARK_WHITE_500_LIGHT_PRIMARY_660 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_WHITE_500_LIGHT_PRIMARY_660;
object2.guildName = {'marginLeft': 32, 'fontSize': 16, 'lineHeight': 20, color: DARK_WHITE_500_LIGHT_PRIMARY_660};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/SubscribeModalGuildSelect.tsx');
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.safeArea = {'backgroundColor': null, 'flexGrow': 1, 'flexShrink': 1, backgroundColor: BACKGROUND_BASE_LOW};
object.guildList = {padding: 16};
object.guildOption = {'flexDirection': 'row', 'alignItems': 'center', 'paddingVertical': 10};
const DARK_WHITE_500_LIGHT_PRIMARY_660 = (LegacyTokensModule).DARK_WHITE_500_LIGHT_PRIMARY_660;
object.guildName = {'marginLeft': 32, 'fontSize': 16, 'lineHeight': 20, color: DARK_WHITE_500_LIGHT_PRIMARY_660};
const env0_12 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/SubscribeModalGuildSelect.tsx');
exports.default = SubscribeModalGuildSelect;
}
function SubscribeModalGuildSelect({guildBoostSlots, intent, onResult}) { // fn#51285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:664, offset: 0x0122e08c, size: 483 bytes, params: 2, frame: 29
const styles = useStyles();
const env0_4 = (UseNavigationNativeModule).useNavigation();
const [property, property2] = env0_4(ReactModule.useState(''), 2);
const value5 = (FluxModule).useStateFromStoresArray([GuildStore,
SortedGuildStore], _fun51289, [property, ReactModule.useMemo(_fun51286, [guildBoostSlots])]);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const intl = (IndexNativeModule).intl;
const searchBarNav = (
<SearchBarNav
placeholder={intl.string((IndexNativeModule).t.vf3ZTa)}
onChange={property2}
onClose={(BoostingActionCreatorsModule).closeApplyBoostModal}
/>
);
const SafeAreaPaddingView2 = (SafeAreaViewModule).SafeAreaPaddingView;
return (
<SafeAreaPaddingView top style={styles.safeArea}>
{searchBarNav}
<ScrollView style={styles.guildList} keyboardShouldPersistTaps="always">
<SafeAreaPaddingView2 bottom>
{value5.map(_fun51292)}
</SafeAreaPaddingView2>
</ScrollView>
</SafeAreaPaddingView>
);
function _fun51286() { // fn#51286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:830, offset: 0x0122e26f, size: 109 bytes, params: 1, frame: 13
var set;
var Set;
var value;
if (guildBoostSlots == null) {
set = new global.Set();
} else {
Set = global.Set;
value = guildBoostSlots.filter(function({premiumGuildSubscription}) {
return premiumGuildSubscription?.guildId != null;
});
value = value.map(_fun51288);
set = new Set();
}
return set;
}
function SubscribeModalGuildSelect({guildBoostSlots, intent, onResult}) { // fn#51285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:664, offset: 0x0122e08c, size: 483 bytes, params: 2, frame: 29
const styles = useStyles();
const env0_4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const binding = env0_5;
const [property, property2] = env0_4(binding.useState(''), 2);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildStore,
SortedGuildStore], _fun51289, [property, binding.useMemo(_fun51286, [guildBoostSlots])]);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const SearchBarNav = importDefault(6983) /* metro dependency 6983: SearchBarNav */;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const searchBarNav = <SearchBarNav placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vf3ZTa)} onChange={property2} onClose={(importAll(6522) /* metro dependency 6522: BoostingActionCreators */).closeApplyBoostModal} />;
const SafeAreaPaddingView2 = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
return (
<SafeAreaPaddingView top style={styles.safeArea}>
{searchBarNav}
<ScrollView style={styles.guildList} keyboardShouldPersistTaps="always">
<SafeAreaPaddingView2 bottom>
{value5.map(_fun51292)}
</SafeAreaPaddingView2>
</ScrollView>
</SafeAreaPaddingView>
);
}
function _fun51289() { // fn#51289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1078, offset: 0x0122e316, size: 178 bytes, params: 1, frame: 15
var environment;
var r0;
var value2;
var defaultImport;
var reduce;
var Array;
var value3;
var array;
var value5;
var value;
if (ReactModule.length === 0) {
value = environment.__proto__;
value = SortedGuildStore.getFlattenedGuildIds();
reduce = value.reduce;
Array = global.Array;
value5 = Object.create(Array.prototype, {constructor: {value: Array}});
array = new Array();
value = Reflect.apply(reduce, value, [_fun51290, array instanceof Object ? array : value5]);
r0 = value;
} else {
value2 = environment.__proto__;
defaultImport = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = defaultImport.queryGuilds({query: ReactModule});
reduce = value.reduce;
Array = global.Array;
value3 = Object.create(Array.prototype, {constructor: {value: Array}});
array = new Array();
value = Reflect.apply(reduce, value, [_fun51291, array instanceof Object ? array : value3]);
r0 = value;
}
return r0;
function _fun51290(a0, a1) { // fn#51290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1128, offset: 0x0122e3c8, size: 70 bytes, params: 3, frame: 14
let value = environment.__proto__.__proto__;
value = GuildStore.getGuild(a1);
if (!(value == null || env1_6.has(value.id))) {
a0.push(value);
}
return a0;
}
function _fun51291(a0, {record}) { // fn#51291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1250, offset: 0x0122e40e, size: 49 bytes, params: 3, frame: 13
const binding = env1_6;
if (!binding.has(record.id)) {
a0.push(record);
}
return a0;
}
}
function _fun51292(a0) { // fn#51292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1626, offset: 0x0122e43f, size: 219 bytes, params: 2, frame: 23
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const PressableOpacity = (PressablesModule).PressableOpacity;
const object = {accessibilityRole: 'button'};
const stylesBinding = styles;
object.style = stylesBinding.guildOption;
object.onPress = onPress_51293;
value = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (GuildIconModule).GuildIconSizes;
const SMALL = GuildIconSizes.SMALL;
value = ((Component) => <Component guild={a0} size={SMALL} selected={false} />)(value);
const LegacyText = (NativeModule).LegacyText;
return (
<PressableOpacity {...object} key={a0.id}>
{value}
<LegacyText style={stylesBinding.guildName}>
{a0.name}
</LegacyText>
</PressableOpacity>
);
function onPress_51293() { // fn#51293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1713, offset: 0x0122e51a, size: 80 bytes, params: 1, frame: 15
const binding = env0_0;
const binding2 = env1_4;
const replace = binding2.replace;
const CONFIRMATION = PremiumGuildSubscribeModalScenes.CONFIRMATION;
Reflect.apply(replace, binding2, [CONFIRMATION, {guildId: binding.id, guildBoostSlots: guildBoostSlots,
intent: intent, onResult: onResult}]);
}
}
function _fun51286() { // fn#51286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:830, offset: 0x0122e26f, size: 109 bytes, params: 1, frame: 13
var set;
var Set;
var value;
if (guildBoostSlots == null) {
set = new global.Set();
} else {
Set = global.Set;
value = guildBoostSlots.filter(function({premiumGuildSubscription}) {
return premiumGuildSubscription?.guildId != null;
});
value = value.map(_fun51288);
set = new Set();
}
return set;
}
function _fun51289() { // fn#51289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1078, offset: 0x0122e316, size: 178 bytes, params: 1, frame: 15
var environment;
var r0;
var value2;
var defaultImport;
var reduce;
var Array;
var value3;
var array;
var value5;
var value;
if (env0_5.length === 0) {
value = environment.__proto__;
value = SortedGuildStore.getFlattenedGuildIds();
reduce = value.reduce;
Array = global.Array;
value5 = Object.create(Array.prototype, {constructor: {value: Array}});
array = new Array();
value = Reflect.apply(reduce, value, [_fun51290, array instanceof Object ? array : value5]);
r0 = value;
} else {
value2 = environment.__proto__;
defaultImport = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = defaultImport.queryGuilds({query: env0_5});
reduce = value.reduce;
Array = global.Array;
value3 = Object.create(Array.prototype, {constructor: {value: Array}});
array = new Array();
value = Reflect.apply(reduce, value, [_fun51291, array instanceof Object ? array : value3]);
r0 = value;
}
return r0;
}
function _fun51292(a0) { // fn#51292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1626, offset: 0x0122e43f, size: 219 bytes, params: 2, frame: 23
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object2 = {accessibilityRole: 'button'};
const stylesBinding = styles;
object2.style = stylesBinding.guildOption;
object2.onPress = onPress_51293;
value = importDefault(6819) /* metro dependency 6819: GuildIcon */;
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
const SMALL = GuildIconSizes.SMALL;
value = ((Component) => <Component guild={a0} size={SMALL} selected={false} />)(value);
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
return (
<PressableOpacity {...object2} key={a0.id}>
{value}
<LegacyText style={stylesBinding.guildName}>
{a0.name}
</LegacyText>
</PressableOpacity>
);
}
function _fun51288({premiumGuildSubscription}) { // fn#51288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:955, offset: 0x0122e2fb, size: 27 bytes, params: 2, frame: 3
return premiumGuildSubscription?.guildId;
}
function _fun51290(a0, a1) { // fn#51290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1128, offset: 0x0122e3c8, size: 70 bytes, params: 3, frame: 14
let value = environment.__proto__.__proto__;
value = GuildStore.getGuild(a1);
if (!(value == null || env1_6.has(value.id))) {
a0.push(value);
}
return a0;
}
function _fun51291(a0, {record}) { // fn#51291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1250, offset: 0x0122e40e, size: 49 bytes, params: 3, frame: 13
const binding = env1_6;
if (!binding.has(record.id)) {
a0.push(record);
}
return a0;
}
function onPress_51293() { // fn#51293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6703:1713, offset: 0x0122e51a, size: 80 bytes, params: 1, frame: 15
const binding = env0_0;
const binding2 = env1_4;
const replace = binding2.replace;
const CONFIRMATION = PremiumGuildSubscribeModalScenes.CONFIRMATION;
Reflect.apply(replace, binding2, [CONFIRMATION, {guildId: binding.id, guildBoostSlots: guildBoostSlots,
intent: intent, onResult: onResult}]);
}
global.__d(_fun51284, 6525, [57, 31, 27, 1867, 4896, 6524, 33, 4501, 697, 6235, 1484, 566, 6526, 6618, 6983, 1244,
6522, 5278, 6819, 1305,
2]) /* metro module 6525, dependencies: [57, 31, 27, 1867, 4896, 6524, 33, 4501, 697, 6235, 1484, 566, 6526, 6618, 6983, 1244, 6522, 5278, 6819, 1305, 2] */;
@@ -1,125 +1,141 @@
/* Metro module 12361; source: components_native/premium/premium_guild_subscribe_modal/SubscribeModalSuccessAlert.tsx; dependencies: [57, 31, 27, 1867, 7047, 33, 4501, 697, 12362, 12363, 566, 4048, 4596, 1244, 4496, 6522, 4589, 676, 4002, 12364, 12365, 4573, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UseTheme from '../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import AlertActionCreators from '../../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import defaultImport2 from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import Alert from '../../common/Alert.tsx'; /* Metro dependency 4596 */
import SequencedLottieAnimationView from '../../common/SequencedLottieAnimationView.tsx'; /* Metro dependency 12362 */
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 ConstantsIOSModule from '../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as BoostingActionCreatorsModule from '../../../actions/native/BoostingActionCreators.tsx'; /* Metro dependency 6522 */
import * as ColorConstantsModule from '../../../modules/colors/native/ColorConstants.tsx'; /* Metro dependency 7047 */
import * as Module12363Module from '../../../by-id/module-12363.js'; /* Metro dependency 12363 */
function _fun94247(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:6, offset: 0x020f212a, size: 536 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const closure = PremiumPaymentGuildAnimation;
const PremiumPaymentGuildAnimation2 = PremiumPaymentGuildAnimation;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Image;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const env0_8 = (require(7047) /* metro dependency 7047: ColorConstants */).Gradients;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {wrapper: {'paddingHorizontal': 24, 'paddingBottom': 16, 'paddingTop': 4, 'alignItems': 'stretch'},
object = {wrapper: {'paddingHorizontal': 24, 'paddingBottom': 16, 'paddingTop': 4, 'alignItems': 'stretch'},
animation: {'width': 'auto', 'height': 112, 'alignSelf': 'center'}, text: {'lineHeight': 18,
'textAlign': 'center'}};
const object4 = {'padding': 2, 'borderRadius': null, 'marginTop': 8};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.activated = object4;
const object2 = {'padding': 2, 'borderRadius': null, 'marginTop': 8};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.activated = object2;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.activatedBackground = {'backgroundColor': null, 'paddingVertical': 12, 'paddingHorizontal': 20,
object.activatedBackground = {'backgroundColor': null, 'paddingVertical': 12, 'paddingHorizontal': 20,
'alignItems': 'center', backgroundColor: BACKGROUND_BASE_LOW};
object3.activatedImage = {width: 220};
object3.successInfo = {marginTop: 24};
const env0_11 = Reflect.apply(createStyles, value, [object3]);
object3 = {ENTRY: 'entry', IDLE: 'idle'};
const object5 = {};
const ENTRY = object3.ENTRY;
object5[ENTRY] = {'BEG': 0, 'END': 180};
const IDLE = object3.IDLE;
object5[IDLE] = {'BEG': 180, 'END': 360};
closure.Scenes = object3;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/SubscribeModalSuccessAlert.tsx');
object.activatedImage = {width: 220};
object.successInfo = {marginTop: 24};
const env0_11 = Reflect.apply(createStyles, value, [object]);
object = {ENTRY: 'entry', IDLE: 'idle'};
const object6 = {};
const ENTRY = object.ENTRY;
object6[ENTRY] = {'BEG': 0, 'END': 180};
const IDLE = object.IDLE;
object6[IDLE] = {'BEG': 180, 'END': 360};
PremiumPaymentGuildAnimation2.Scenes = object;
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/SubscribeModalSuccessAlert.tsx');
exports.default = SubscribeModalSuccessAlert;
}
function PremiumPaymentGuildAnimation({nextScene, onSceneComplete, loop}) { // fn#94248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:774, offset: 0x020f2342, size: 122 bytes, params: 2, frame: 19
const styles = useStyles();
return ((Component) => <Component nextScene={nextScene} onSceneComplete={onSceneComplete} loop={loop} sceneSegments={env0_12} style={styles.animation} source={Module12363Module} />)(SequencedLottieAnimationView);
}
function PremiumPaymentGuildAnimation({nextScene, onSceneComplete, loop}) { // fn#94248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:774, offset: 0x020f2342, size: 122 bytes, params: 2, frame: 19
const styles = useStyles();
return ((Component) => <Component nextScene={nextScene} onSceneComplete={onSceneComplete} loop={loop} sceneSegments={env0_12} style={styles.animation} source={require(12363) /* metro dependency 12363 */} />)(importDefault(12362) /* metro dependency 12362: SequencedLottieAnimationView */);
}
function SubscribeModalSuccessAlert({guildId, guildBoostSlots}) { // fn#94249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:1137, offset: 0x020f23bc, size: 955 bytes, params: 2, frame: 35
var object2;
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
let r16 = guildBoostSlots != null && guildBoostSlots.some(function(a0) {
return a0.premiumGuildSubscription != null;
});
const r19 = guildBoostSlots?.length ?? 1;
const binding = env0_4;
let useState = binding.useState;
const Scenes = PremiumPaymentGuildAnimation.Scenes;
const ENTRY = Scenes.ENTRY;
const value6 = Reflect.apply(useState, binding, [ENTRY]);
const binding2 = env0_3;
const value7 = binding2(value6, 2);
const property = value7[0];
const env0_1 = value7[1];
useState = binding.useState;
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value8[0];
const env0_2 = value8[1];
const value9 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
object2 = {style: styles.wrapper};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const YKxJCI = t.YKxJCI;
object2.confirmText = Reflect.apply(string, intl, [YKxJCI]);
object2.onConfirm = onConfirm;
const premiumPaymentGuildAnimation = <PremiumPaymentGuildAnimation nextScene={property} loop={property2} onSceneComplete={onSceneComplete} />;
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).HorizontalGradient;
const PREMIUM_GUILD = Gradients.PREMIUM_GUILD;
const defaultImport22 = ((Component) => <Component style={styles.activated} start={START} end={END} colors={PREMIUM_GUILD}><View style={styles.activatedBackground}><Image style={styles.activatedImage} source={(require(4002) /* metro dependency 4002: shared */).isThemeLight(value9) ? importDefault(12364) /* metro dependency 12364 */ : importDefault(12365) /* metro dependency 12365 */} /></View></Component>)(defaultImport2);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
r16 = r16 ? Reflect.apply(string, intl, [t.RMmWY3]) : Reflect.apply(string, intl, [t.d81BkZ]);
return (
<Alert {...object2}>
{premiumPaymentGuildAnimation}
<View>
{defaultImport22}
<View style={styles.successInfo}>
<Text style={styles.text} variant="text-sm/medium">
{r16}
</Text>
<Text style={styles.text} variant="text-sm/medium">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.r0IGsP,
{guildName: guild.name, guildSubscriptionQuantity: r19})}
</Text>
function SubscribeModalSuccessAlert({guildId, guildBoostSlots}) { // fn#94249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:1137, offset: 0x020f23bc, size: 955 bytes, params: 2, frame: 35
const styles = useStyles();
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
let r16 = guildBoostSlots != null && guildBoostSlots.some(function(a0) {
return a0.premiumGuildSubscription != null;
});
const r19 = guildBoostSlots?.length ?? 1;
let useState = ReactModule.useState;
const Scenes = PremiumPaymentGuildAnimation.Scenes;
const ENTRY = Scenes.ENTRY;
const value6 = Reflect.apply(useState, ReactModule, [ENTRY]);
const value7 = Module00057(value6, 2);
const property = value7[0];
const env0_1 = value7[1];
useState = ReactModule.useState;
const value8 = Module00057(Reflect.apply(useState, ReactModule, [false]), 2);
const property2 = value8[0];
const env0_2 = value8[1];
const value9 = (UseTheme)();
object = {style: styles.wrapper};
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const YKxJCI = t.YKxJCI;
object.confirmText = Reflect.apply(string, intl, [YKxJCI]);
object.onConfirm = onConfirm_94252;
const premiumPaymentGuildAnimation = (
<PremiumPaymentGuildAnimation
nextScene={property}
loop={property2}
onSceneComplete={onSceneComplete}
/>
);
const {START, END} = (ConstantsIOSModule).HorizontalGradient;
const PREMIUM_GUILD = Gradients.PREMIUM_GUILD;
const defaultImport22 = ((Component) => <Component style={styles.activated} start={START} end={END} colors={PREMIUM_GUILD}><View style={styles.activatedBackground}><Image style={styles.activatedImage} source={(require(4002) /* metro dependency 4002: shared */).isThemeLight(value9) ? importDefault(12364) /* metro dependency 12364 */ : importDefault(12365) /* metro dependency 12365 */} /></View></Component>)(defaultImport2);
const Text = (TextModule).Text;
string = intl.string;
r16 = r16 ? Reflect.apply(string, intl, [t.RMmWY3]) : Reflect.apply(string, intl, [t.d81BkZ]);
return (
<Alert {...object}>
{premiumPaymentGuildAnimation}
<View>
{defaultImport22}
<View style={styles.successInfo}>
<Text style={styles.text} variant="text-sm/medium">
{r16}
</Text>
<Text style={styles.text} variant="text-sm/medium">
{intl.format((IndexNativeModule).t.r0IGsP,
{guildName: guild.name, guildSubscriptionQuantity: r19})}
</Text>
</View>
</View>
</View>
</Alert>
);
}
</Alert>
);
function SubscribeModalSuccessAlertOnConfirm() { // fn#94252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:1597, owner: SubscribeModalSuccessAlert.onConfirm, offset: 0x020f2777, size: 63 bytes, params: 1, frame: 13
const value = environment.__proto__;
(AlertActionCreators).close();
(BoostingActionCreatorsModule).closeApplyBoostModal();
}
function SubscribeModalSuccessAlertOnConfirm() { // fn#94252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:1597, owner: SubscribeModalSuccessAlert.onConfirm, offset: 0x020f2777, size: 63 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(4496) /* metro dependency 4496: AlertActionCreators */).close();
(require(6522) /* metro dependency 6522: BoostingActionCreators */).closeApplyBoostModal();
}
function onSceneComplete(a0) { // fn#94253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:1729, owner: SubscribeModalSuccessAlert.onSceneComplete, offset: 0x020f27b6, size: 100 bytes, params: 2, frame: 12
let Scenes = PremiumPaymentGuildAnimation.Scenes;
const ENTRY = Scenes.ENTRY;
if (ENTRY === a0) {
return env0_1(PremiumPaymentGuildAnimation.Scenes.IDLE);
}
Scenes = PremiumPaymentGuildAnimation.Scenes;
const IDLE = Scenes.IDLE;
if (IDLE === a0) {
return env0_2(true);
}
}
function onSceneComplete(a0) { // fn#94253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12547:1729, owner: SubscribeModalSuccessAlert.onSceneComplete, offset: 0x020f27b6, size: 100 bytes, params: 2, frame: 12
let Scenes = PremiumPaymentGuildAnimation.Scenes;
const ENTRY = Scenes.ENTRY;
if (ENTRY === a0) {
return env0_1(PremiumPaymentGuildAnimation.Scenes.IDLE);
}
Scenes = PremiumPaymentGuildAnimation.Scenes;
const IDLE = Scenes.IDLE;
if (IDLE === a0) {
return env0_2(true);
}
}
global.__d(_fun94247, 12361, [57, 31, 27, 1867, 7047, 33, 4501, 697, 12362, 12363, 566, 4048, 4596, 1244, 4496,
6522, 4589, 676, 4002, 12364, 12365, 4573,
2]) /* metro module 12361, dependencies: [57, 31, 27, 1867, 7047, 33, 4501, 697, 12362, 12363, 566, 4048, 4596, 1244, 4496, 6522, 4589, 676, 4002, 12364, 12365, 4573, 2] */;
@@ -1,76 +1,79 @@
/* Metro module 12299; source: components_native/premium/premium_guild_subscribe_modal/useFetchGuildBoostSlots.tsx; dependencies: [5, 57, 31, 7020, 7030, 566, 676, 7037, 8251, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildBoostSlotStore from '../../../stores/billing/GuildBoostSlotStore.tsx'; /* Metro dependency 7020 */
import AppStateStore from '../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
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 _fun93931(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:6, offset: 0x020cb851, size: 185 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const guildBoostSlotStore = importDefault(7020) /* metro dependency 7020: GuildBoostSlotStore */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/useFetchGuildBoostSlots.tsx');
(FileImportTrackerModule).fileFinishedImporting('components_native/premium/premium_guild_subscribe_modal/useFetchGuildBoostSlots.tsx');
exports.default = useFetchGuildBoostSlots;
}
function useFetchGuildBoostSlots() { // fn#93932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:273, offset: 0x020cb90a, size: 204 bytes, params: 1, frame: 21
const binding = env0_5;
const [property, env0_1] = env0_4(binding.useState(true), 2);
const hasFetched = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildBoostSlotStore],
function() {
return GuildBoostSlotStore.hasFetched;
});
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
});
var env0_4 = binding.useRef(state);
binding.useEffect(_fun93935, [state, hasFetched, property]);
return property;
}
function _fun93935() { // fn#93935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:492, offset: 0x020cb9f8, size: 116 bytes, params: 1, frame: 14
var environment;
var stateBinding;
var value2;
if (env0_0) {
env0_4.current = state;
(function() {
return _fetch_93937.apply(this, arguments);
})();
} else {
stateBinding = state;
if (stateBinding !== env0_4.current) {
stateBinding = state;
value2 = environment.__proto__;
if (stateBinding === (require(676) /* metro dependency 676: ConstantsIOS */).AppStates.ACTIVE) {
function useFetchGuildBoostSlots() { // fn#93932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:273, offset: 0x020cb90a, size: 204 bytes, params: 1, frame: 21
const [property, env0_1] = env0_4(ReactModule.useState(true), 2);
const hasFetched = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildBoostSlotStore],
function() {
return GuildBoostSlotStore.hasFetched;
});
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
});
var env0_4 = ReactModule.useRef(state);
ReactModule.useEffect(_fun93935, [state, hasFetched, property]);
return property;
function _fun93935() { // fn#93935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:492, offset: 0x020cb9f8, size: 116 bytes, params: 1, frame: 14
var environment;
var stateBinding;
var value2;
if (env0_0) {
env0_4.current = state;
(function() {
return _fetch_93937.apply(this, arguments);
})();
} else {
stateBinding = state;
if (stateBinding !== env0_4.current) {
stateBinding = state;
value2 = environment.__proto__;
if (stateBinding === (require(676) /* metro dependency 676: ConstantsIOS */).AppStates.ACTIVE) {
env0_4.current = state;
(function() {
return _fetch_93937.apply(this, arguments);
})();
}
}
}
function _fetch_93937() { // fn#93937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:601, offset: 0x020cba6c, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun93939).apply(this, arguments);
function* _fun93939() { // fn#93939, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:636, offset: 0x020cbaac, size: 197 bytes, params: 1, frame: 19
if (true) {
var Promise = global.Promise;
var all = Promise.all;
value = environment.__proto__.__proto__.__proto__.__proto__;
var items2 = [env4_1(env4_2[7]).init()];
items2[1] = dependencyMap ? global.Promise.resolve() : env4_0(env4_2[8]).fetchGuildBoostSlots();
value = env4_0(env4_2[8]);
items2[2] = value.fetchAppliedGuildBoostsForUser();
yield Reflect.apply(all, Promise, [items2]);
if (false) {
return undefined;
}
importDefault(false);
}
}
}
}
}
}
function _fetch_93937() { // fn#93937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:601, offset: 0x020cba6c, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__.__proto__;
return env2_3(_fun93939).apply(this, arguments);
}
function* _fun93939() { // fn#93939, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12485:636, offset: 0x020cbaac, size: 197 bytes, params: 1, frame: 19
if (true) {
var Promise = global.Promise;
var all = Promise.all;
value = environment.__proto__.__proto__.__proto__.__proto__;
var items2 = [env4_1(env4_2[7]).init()];
items2[1] = dependencyMap ? global.Promise.resolve() : env4_0(env4_2[8]).fetchGuildBoostSlots();
value = env4_0(env4_2[8]);
items2[2] = value.fetchAppliedGuildBoostsForUser();
yield Reflect.apply(all, Promise, [items2]);
if (false) {
return undefined;
}
importDefault(false);
}
}
global.__d(_fun93931, 12299, [5, 57, 31, 7020, 7030, 566, 676, 7037, 8251,
2]) /* metro module 12299, dependencies: [5, 57, 31, 7020, 7030, 566, 676, 7037, 8251, 2] */;