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,97 +1,150 @@
/* Metro module 12277; source: modules/premium/native/PremiumPlanSelectYearlyUpsellModal.tsx; dependencies: [57, 31, 27, 1949, 5140, 12270, 1880, 482, 33, 4501, 6597, 6235, 7027, 566, 1856, 4596, 12278, 1305, 1244, 3802, 4578, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import Alert from '../../../components_native/common/Alert.tsx'; /* Metro dependency 4596 */
import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import TextStyles from '../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import Module12278 from '../../../by-id/module-12278.js'; /* Metro dependency 12278 */
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 '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as NumberUtilsModule from '../../../utils/NumberUtils.tsx'; /* Metro dependency 1856 */
import * as PremiumConstantsModule from '../PremiumConstants.tsx'; /* Metro dependency 1880 */
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 PremiumBundledPlansUtilsModule from './PremiumBundledPlansUtils.tsx'; /* Metro dependency 7027 */
import * as PremiumPlanSelectStoreModule from './PremiumPlanSelectStore.tsx'; /* Metro dependency 12270 */
function _fun93809(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12463:6, offset: 0x020c468e, size: 533 bytes, params: 8, frame: 25
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.Image;
const env0_6 = value.View;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_9 = (require(12270) /* metro dependency 12270: PremiumPlanSelectStore */).usePremiumPlanSelectStore;
const env0_10 = (require(1880) /* metro dependency 1880: PremiumConstants */).PREMIUM_YEARLY_DISCOUNT_PERCENT;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const object2 = {};
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
copyDataProperties(object, textStyles(DISPLAY_EXTRABOLD, undefined, 24), undefined);
object['alignSelf'] = 'center';
object['textAlign'] = 'center';
object['paddingBottom'] = 8;
const DARK_WHITE_500_LIGHT_BLACK_500 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_WHITE_500_LIGHT_BLACK_500;
object['color'] = DARK_WHITE_500_LIGHT_BLACK_500;
copyDataProperties(object2, TextStyles(DISPLAY_EXTRABOLD, undefined, 24), undefined);
object2['alignSelf'] = 'center';
object2['textAlign'] = 'center';
object2['paddingBottom'] = 8;
const DARK_WHITE_500_LIGHT_BLACK_500 = (LegacyTokensModule).DARK_WHITE_500_LIGHT_BLACK_500;
object2['color'] = DARK_WHITE_500_LIGHT_BLACK_500;
const env0_13 = Reflect.apply(createStyles, value, [{container: {marginHorizontal: 26},
image: {'alignSelf': 'center', 'marginVertical': 32}, header: object, description: {'alignSelf': 'center',
image: {'alignSelf': 'center', 'marginVertical': 32}, header: object2, description: {'alignSelf': 'center',
'textAlign': 'center', 'paddingBottom': 32, color: DARK_WHITE_500_LIGHT_BLACK_500},
upsellButton: {marginBottom: 16}, continueButton: {marginBottom: 4}, cancelButton: {'marginTop': 8,
'marginBottom': 4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/PremiumPlanSelectYearlyUpsellModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/premium/native/PremiumPlanSelectYearlyUpsellModal.tsx');
exports.default = PremiumPlanSelectYearlyUpsellModal;
}
function PremiumPlanSelectYearlyUpsellModal({onClose, productId, orderPriceString, continueWithUpsell, continueWithDefault}) { // fn#93810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12463:867, offset: 0x020c48a3, size: 1034 bytes, params: 2, frame: 38
const styles = useStyles();
const value3 = usePremiumPlanSelectStore(function(a0) {
return a0.isPurchasing;
});
const premiumBundledItemsFromProductId = (require(7027) /* metro dependency 7027: PremiumBundledPlansUtils */).getPremiumBundledItemsFromProductId(productId);
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value6 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[IAPStoreAndroid], _fun93813]), 2);
const property = value6[0];
const r18 = value3 || value6[1];
const premiumTier = premiumBundledItemsFromProductId.premiumTier;
const r25 = orderPriceString ?? property?.priceString;
const r1 = premiumTier == null || r25 == null;
env0_4.useEffect(_fun93814);
if (r1) {
return null;
}
const numberUtilsModule = require(1856) /* metro dependency 1856: NumberUtils */;
const value9 = numberUtilsModule.formatPercent(locale, PREMIUM_YEARLY_DISCOUNT_PERCENT / 100);
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const items2 = [<Image style={styles.image} source={importDefault(12278) /* metro dependency 12278 */} />];
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const LQCVfK = (require(1244) /* metro dependency 1244: indexNative */).t.LQCVfK;
const object = {discountPercentage: value9};
object.planName = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumTypeDisplayName(premiumTier);
items2[1] = <LegacyText style={styles.header}>{Reflect.apply(format, intl, [LQCVfK, object])}</LegacyText>;
items2[2] = <LegacyText style={styles.description}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['7chOVL'],
{discountPercentage: value9})}</LegacyText>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const formatToPlainString = intl.formatToPlainString;
const Qvq6GE = (require(1244) /* metro dependency 1244: indexNative */).t.Qvq6GE;
items2[3] = <View style={styles.upsellButton}><Button variant="active" text={Reflect.apply(formatToPlainString,
intl, [Qvq6GE, {price: r25}])} onPress={continueWithUpsell} disabled={r18} /></View>;
const string = intl.string;
const YwEyQM = (require(1244) /* metro dependency 1244: indexNative */).t.YwEyQM;
items2[4] = <View style={styles.continueButton}><Button variant="secondary" text={Reflect.apply(string, intl,
[YwEyQM])} onPress={continueWithDefault} disabled={r18} /></View>;
items2[5] = <View style={styles.cancelButton}><Button variant="tertiary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={onClose} /></View>;
return (
<Alert onClose={onClose} noDefaultButtons>
<View style={styles.container}>
{items2}
function PremiumPlanSelectYearlyUpsellModal({onClose, productId, orderPriceString, continueWithUpsell, continueWithDefault}) { // fn#93810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12463:867, offset: 0x020c48a3, size: 1034 bytes, params: 2, frame: 38
const styles = useStyles();
const value3 = usePremiumPlanSelectStore(function(a0) {
return a0.isPurchasing;
});
const premiumBundledItemsFromProductId = (PremiumBundledPlansUtilsModule).getPremiumBundledItemsFromProductId(productId);
const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() {
return LocaleStore.locale;
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value6 = Module00057(Reflect.apply(useStateFromStoresArray, fluxModule, [[IAPStoreAndroid], _fun93813]), 2);
const property = value6[0];
const r18 = value3 || value6[1];
const premiumTier = premiumBundledItemsFromProductId.premiumTier;
const r25 = orderPriceString ?? property?.priceString;
const r1 = premiumTier == null || r25 == null;
ReactModule.useEffect(_fun93814);
if (r1) {
return null;
}
const value9 = NumberUtilsModule.formatPercent(locale, PREMIUM_YEARLY_DISCOUNT_PERCENT / 100);
const items2 = [
<Image style={styles.image} source={Module12278} />,
];
const LegacyText = (NativeModule).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const LQCVfK = (require(1244) /* metro dependency 1244: indexNative */).t.LQCVfK;
const object2 = {discountPercentage: value9};
object2.planName = (require(3802) /* metro dependency 3802: PremiumUtils */).getPremiumTypeDisplayName(premiumTier);
items2[1] = (
<LegacyText style={styles.header}>
{Reflect.apply(format, intl, [LQCVfK, object2])}
</LegacyText>
);
items2[2] = (
<LegacyText style={styles.description}>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['7chOVL'],
{discountPercentage: value9})}
</LegacyText>
);
const Button = (ButtonNativeModule).Button;
const formatToPlainString = intl.formatToPlainString;
const Qvq6GE = (require(1244) /* metro dependency 1244: indexNative */).t.Qvq6GE;
items2[3] = (
<View style={styles.upsellButton}>
<Button
variant="active"
text={Reflect.apply(formatToPlainString, intl, [Qvq6GE, {price: r25}])}
onPress={continueWithUpsell}
disabled={r18}
/>
</View>
</Alert>
);
}
);
const string = intl.string;
const YwEyQM = (require(1244) /* metro dependency 1244: indexNative */).t.YwEyQM;
items2[4] = (
<View style={styles.continueButton}>
<Button
variant="secondary"
text={Reflect.apply(string, intl, [YwEyQM])}
onPress={continueWithDefault}
disabled={r18}
/>
</View>
);
items2[5] = (
<View style={styles.cancelButton}>
<Button
variant="tertiary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={onClose}
/>
</View>
);
return (
<Alert onClose={onClose} noDefaultButtons>
<View style={styles.container}>
{items2}
</View>
</Alert>
);
function _fun93813() { // fn#93813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12463:1173, offset: 0x020c4cad, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
const iapStoreAndroidBinding = IAPStoreAndroid;
const getProduct = iapStoreAndroidBinding.getProduct;
return [Reflect.apply(getProduct, iapStoreAndroidBinding, [productId]), iapStoreAndroidBinding.isBusy()];
}
function _fun93814() { // fn#93814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12463:1330, offset: 0x020c4cde, size: 24 bytes, params: 1, frame: 9
if (env0_2) {
continueWithDefault();
}
}
}
function _fun93813() { // fn#93813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12463:1173, offset: 0x020c4cad, size: 49 bytes, params: 1, frame: 11
const value = environment.__proto__;
const getProduct = IAPStoreAndroid.getProduct;
return [Reflect.apply(getProduct, IAPStoreAndroid, [productId]), IAPStoreAndroid.isBusy()];
}
global.__d(_fun93809, 12277, [57, 31, 27, 1949, 5140, 12270, 1880, 482, 33, 4501, 6597, 6235, 7027, 566, 1856, 4596,
12278, 1305, 1244, 3802, 4578,
2]) /* metro module 12277, dependencies: [57, 31, 27, 1949, 5140, 12270, 1880, 482, 33, 4501, 6597, 6235, 7027, 566, 1856, 4596, 12278, 1305, 1244, 3802, 4578, 2] */;