Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,35 @@
/* Metro module 7253; source: modules/premium/native/hooks/useCheckoutPlanPriceString.tsx; dependencies: [7042, 477, 7027, 2] */
function _fun58275(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7431:6, offset: 0x016c3793, size: 115 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(7042) /* metro dependency 7042: NativeCheckoutStore */).useNativeCheckoutStore;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/hooks/useCheckoutPlanPriceString.tsx');
exports.useCheckoutPlanPriceString = useCheckoutPlanPriceString;
}
function useCheckoutPlanPriceString(a0, a1) { // fn#58276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7431:251, offset: 0x016c3806, size: 168 bytes, params: 3, frame: 16
var r2;
var getAvailablePlanForItems;
var moduleValue2;
var value5;
const value = null;
const priceString = value == a1 ? undefined : a1.priceString;
const r0 = value != priceString ? priceString : value;
const value4 = useNativeCheckoutStore(function(a0) {
return a0.getCheckoutContextRecord();
});
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isIOS()) {
if (value == value4) {
return r0;
}
getAvailablePlanForItems = value4.getAvailablePlanForItems;
moduleValue2 = require(7027) /* metro dependency 7027: PremiumBundledPlansUtils */;
value5 = Reflect.apply(getAvailablePlanForItems, value4, [moduleValue2.getSubscriptionItemsForProduct(a0)]);
r2 = value != value5 ? value5.getPriceString() : value;
return value == r2 ? r0 : r2;
}
return r0;
}
@@ -0,0 +1,83 @@
/* Metro module 7325; source: modules/premium/native/hooks/useDiscountedPremiumProductInfo.tsx; dependencies: [31, 5140, 482, 566, 5143, 5137, 2] */
function _fun59014(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#59014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:6, offset: 0x016de455, size: 153 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_4 = (require(482) /* metro dependency 482: Constants */).CurrencyCodes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/hooks/useDiscountedPremiumProductInfo.tsx');
exports.useDiscountedPremiumProductInfo = useDiscountedPremiumProductInfo;
}
function useDiscountedPremiumProductInfo(a0, a1) { // fn#59015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:272, offset: 0x016de4ee, size: 160 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const binding = env0_2;
let useMemo = binding.useMemo;
const value = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], _fun59018,
[Reflect.apply(useMemo, binding, [_fun59016, [a0, a1]])]);
useMemo = binding.useMemo;
return {discountedProduct: value, discountedPriceString: Reflect.apply(useMemo, binding, [_fun59019, [a0, value]])};
}
function _fun59016() { // fn#59016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:335, offset: 0x016de58e, size: 76 bytes, params: 1, frame: 14
if (env0_0Binding == null) {
return null;
}
var env0_0Binding = env0_0.discount?.planIds ?? [];
return require.find(_fun59017);
}
function _fun59018() { // fn#59018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:518, offset: 0x016de5f6, size: 46 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_2 ? IAPStoreAndroid.getProduct(env0_2.productId) : value2;
}
function _fun59019() { // fn#59019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:580, offset: 0x016de624, size: 311 bytes, params: 1, frame: 18
var r5;
var value;
if (env0_0 != null) {
if (env0_3 == null) {
return null;
}
var value3 = undefined;
var DiscountIdToProductOfferId = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).DiscountIdToProductOfferId;
var property = DiscountIdToProductOfferId[env0_0.discountId];
r5 = property == null ? value3 : property[env0_3.identifier];
if (r5 == null) {
return null;
}
r5 = env0_3.currencyCode.toUpperCase() in CurrencyCodes ? env0_3.currencyCode.toLowerCase() : CurrencyCodes.USD;
var binding = env0_3;
var subscriptionOffers = binding.subscriptionOffers;
if (subscriptionOffers == null) {
return null;
}
subscriptionOffers = binding.subscriptionOffers;
value = subscriptionOffers.find(_fun59020);
if (value == null) {
return null;
}
var pricingPhases = value.pricingPhases;
if (pricingPhases == null) {
return null;
}
pricingPhases = value.pricingPhases;
if (pricingPhases.length > 0) {
value = value.pricingPhases[0].price / 100;
return (require(5137) /* metro dependency 5137: PriceUtils */).formatPrice(value, r5,
{convertToMajorUnits: false});
}
}
return null;
}
function _fun59017({basePlanId}) { // fn#59017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:445, offset: 0x016de5da, size: 28 bytes, params: 2, frame: 11
return env0_0.includes(basePlanId);
}
function _fun59020({offerId}) { // fn#59020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7503:876, offset: 0x016de75b, size: 22 bytes, params: 2, frame: 2
return offerId === env0_0;
}
@@ -0,0 +1,122 @@
/* Metro module 7942; source: modules/premium/native/hooks/usePremiumPlanPrice.tsx; dependencies: [3807, 3808, 5140, 566, 7334, 7943, 7944, 5143, 477, 5137, 2] */
function _fun63377(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#63377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8120:6, offset: 0x01b7d848, size: 148 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const subscriptionPlanStore = importDefault(3807) /* metro dependency 3807: SubscriptionPlanStore */;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/hooks/usePremiumPlanPrice.tsx');
exports.default = usePremiumPlanPrice;
}
function usePremiumPlanPrice(a0) { // fn#63378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8120:223, offset: 0x01b7d8dc, size: 632 bytes, params: 2, frame: 26
var r1;
var r2;
var r0;
var moduleValue4;
const PriceStates = (require(7944) /* metro dependency 7944: useStoreFrontPrice */).PriceStates;
var amount;
var currency;
var formatPrice;
const env0_0 = a0;
var value;
const value2 = undefined;
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStores = fluxModule.useStateFromStores;
let object = [SubscriptionStore];
const premiumSubscription = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
return SubscriptionStore.getPremiumSubscription();
}]);
const NitroACOMSubscriptionExperiment = (require(7334) /* metro dependency 7334: ACOMExperiments */).NitroACOMSubscriptionExperiment;
const useConfig = NitroACOMSubscriptionExperiment.useConfig;
const enabled = Reflect.apply(useConfig, NitroACOMSubscriptionExperiment,
[{location: 'usePremiumPlanPrice'}]).enabled;
const defaultImport = importDefault(7943) /* metro dependency 7943: NativePaymentHooksAndroid */;
const useNativeIAPPayments = defaultImport.useNativeIAPPayments;
const storeFront = Reflect.apply(useNativeIAPPayments, defaultImport, []).storeFront;
const moduleValue2 = fluxModule;
useStateFromStores = moduleValue2.useStateFromStores;
const {price,
priceState} = (importDefault(7944) /* metro dependency 7944: useStoreFrontPrice */)(Reflect.apply(useStateFromStores,
moduleValue2, [[SubscriptionPlanStore], _fun63380, [a0]]), storeFront);
const value5 = null;
const value6 = fluxModule.useStateFromStores([IAPStoreAndroid], _fun63381,
[value5 != a0 ? (require(5143) /* metro dependency 5143: ProductIdsAndroid */).BasePlanIdToProductId[a0] : value5]);
if (value5 == a0) {
r0 = value5;
} else {
moduleValue4 = require(477) /* metro dependency 477: PlatformUtils */;
if (moduleValue4.isIOS()) {
if (enabled) {
if (priceState !== PriceStates.PRICE_AVAILABLE) {
r2 = value5;
} else if (value5 != price) {
object = {};
amount = price.amount;
object.price = amount;
currency = price.currency;
object.currency = currency;
object.countryCode = value5 == storeFront ? value2 : storeFront.country;
value = require(5137) /* metro dependency 5137: PriceUtils */;
formatPrice = value.formatPrice;
amount = price.amount;
currency = price.currency;
object.priceString = Reflect.apply(formatPrice, value, [amount, currency]);
object.source = 'API';
r2 = object;
} else {
r2 = value5;
}
r1 = r2;
} else if ((value5 == premiumSubscription ? value2 : premiumSubscription.isACOM) === true) {
if (priceState !== PriceStates.PRICE_AVAILABLE) {
r2 = value5;
} else if (value5 != price) {
object = {};
amount = price.amount;
object.price = amount;
currency = price.currency;
object.currency = currency;
object.countryCode = value5 == storeFront ? value2 : storeFront.country;
value = require(5137) /* metro dependency 5137: PriceUtils */;
formatPrice = value.formatPrice;
amount = price.amount;
currency = price.currency;
object.priceString = Reflect.apply(formatPrice, value, [amount, currency]);
object.source = 'API';
r2 = object;
} else {
r2 = value5;
}
r1 = r2;
} else {
r1 = value5 != value6 ? {price: value6.price, currency: value6.currencyCode,
countryCode: value5 != (value5 == storeFront ? value2 : storeFront.country) ? value5 == storeFront ? value2 : storeFront.country : value6.countryCode,
priceString: value6.priceString, source: 'IAP'} : value5;
}
} else {
r1 = value5 != value6 ? {price: value6.price, currency: value6.currencyCode,
countryCode: value5 != (value5 == storeFront ? value2 : storeFront.country) ? value5 == storeFront ? value2 : storeFront.country : value6.countryCode,
priceString: value6.priceString, source: 'IAP'} : value5;
}
r0 = r1;
}
return r0;
}
function _fun63380() { // fn#63380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8120:500, offset: 0x01b7db67, size: 39 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_0 ? SubscriptionPlanStore.get(env0_0) : value2;
}
function _fun63381() { // fn#63381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8120:654, offset: 0x01b7db8e, size: 40 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_1 ? IAPStoreAndroid.getProduct(env0_1) : value2;
}
@@ -0,0 +1,22 @@
/* Metro module 10391; source: modules/premium/native/hooks/usePremiumProductPricingString.tsx; dependencies: [5140, 3802, 5143, 566, 2] */
function _fun80484(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10577:6, offset: 0x01e7d7ec, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/hooks/usePremiumProductPricingString.tsx');
exports.default = usePremiumProductPricingString;
}
function usePremiumProductPricingString(a0, a1) { // fn#80485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10577:213, offset: 0x01e7d85e, size: 147 bytes, params: 3, frame: 18
const value2 = undefined;
const env0_0 = (require(5143) /* metro dependency 5143: ProductIdsAndroid */).getProductIdForGift((require(3802) /* metro dependency 3802: PremiumUtils */).getPlanIdForPremiumType(a0,
a1));
const product = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], _fun80486);
return (product == null ? value2 : product.priceString) ?? '$...';
}
function _fun80486() { // fn#80486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10577:370, offset: 0x01e7d8f1, size: 27 bytes, params: 1, frame: 11
return IAPStoreAndroid.getProduct(env0_0);
}
@@ -0,0 +1,210 @@
/* Metro module 10384; source: modules/premium/native/hooks/useSelectPremiumGift.tsx; dependencies: [5, 31, 1484, 7669, 10385, 3802, 4496, 1244, 10382, 2] */
function _fun80454(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10570:6, offset: 0x01e7bbf3, size: 137 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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/hooks/useSelectPremiumGift.tsx');
exports.useSelectPremiumGift = useSelectPremiumGift;
}
function useSelectPremiumGift(a0) { // fn#80455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10570:226, offset: 0x01e7bc7c, size: 189 bytes, params: 2, frame: 20
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const {setPremiumType, recipientUserId, planInterval,
setOrder} = (require(7669) /* metro dependency 7669: NativeGiftContext */).useNativeGiftContext();
return setOrder.useCallback(_fun80456(), [setPremiumType, planInterval,
(require(10385) /* metro dependency 10385: createOrReuseGiftOrder */).useCreateOrReuseGiftOrder(a0),
recipientUserId, setOrder, value2]);
}
function _fun80456() { // fn#80456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10570:451, offset: 0x01e7bd39, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun80458);
return _fun80459;
}
function* _fun80458(a0) { // fn#80458, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10570:471, offset: 0x01e7bd68, size: 325 bytes, params: 2, frame: 20
var object2;
var value6;
var value7;
var value8;
var error;
var binding2;
var show;
var intl;
var string;
var t;
var R0RpRX;
var CKsXk3;
if (true) {
value = environment.__proto__.__proto__;
env2_4(undefined);
importDefault(a0);
var binding = env3_0;
var planIdForPremiumType = binding(env3_2[5]).getPlanIdForPremiumType(a0, env2_3);
try {
binding = env2_5;
} catch (error) {
binding = env3_1;
binding2 = env3_2;
value = binding(binding2[6]);
show = value.show;
object2 = {};
binding = env3_0;
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value, [object2]);
return undefined;
}
try {
object2 = {};
} catch (error) {
binding = env3_1;
binding2 = env3_2;
value = binding(binding2[6]);
show = value.show;
object2 = {};
binding = env3_0;
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value, [object2]);
return undefined;
}
try {
object2.planId = planIdForPremiumType;
} catch (error) {
binding = env3_1;
binding2 = env3_2;
value = binding(binding2[6]);
show = value.show;
object2 = {};
binding = env3_0;
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value, [object2]);
return undefined;
}
try {
} catch (error) {
binding = env3_1;
binding2 = env3_2;
value = binding(binding2[6]);
show = value.show;
object2 = {};
binding = env3_0;
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value, [object2]);
return undefined;
}
try {
object2.recipientUserId = dependencyMap;
} catch (error) {
binding = env3_1;
binding2 = env3_2;
value = binding(binding2[6]);
show = value.show;
object2 = {};
binding = env3_0;
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value, [object2]);
return undefined;
}
try {
value6 = binding(object2);
} catch (error) {
binding = env3_1;
binding2 = env3_2;
value = binding(binding2[6]);
show = value.show;
object2 = {};
binding = env3_0;
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value, [object2]);
return undefined;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
binding = env3_1;
binding2 = env3_2;
value = binding(binding2[6]);
show = value.show;
object2 = {};
binding = env3_0;
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
R0RpRX = t.R0RpRX;
object2.title = Reflect.apply(string, intl, [R0RpRX]);
intl = binding(binding2[7]).intl;
string = intl.string;
t = binding(binding2[7]).t;
CKsXk3 = t.CKsXk3;
object2.body = Reflect.apply(string, intl, [CKsXk3]);
Reflect.apply(show, value, [object2]);
return undefined;
}
if (value8) {
return value7;
}
env2_4(value7);
var navigate = require.navigate;
var PremiumGiftScreens = env3_0(env3_2[8]).PremiumGiftScreens;
var CUSTOMIZATION = PremiumGiftScreens.CUSTOMIZATION;
Reflect.apply(navigate, require, [CUSTOMIZATION]);
}
}