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

+138 -81
View File
@@ -1,4 +1,13 @@
/* Metro module 3804; source: stores/billing/BillingInfoStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 566, 694, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun29212(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:6, offset: 0x00fbd40f, size: 639 bytes, params: 8, frame: 24
const closure = function() {
env0_11 = false;
@@ -17,13 +26,7 @@ function _fun29212(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).FallbackCurrencyCountry;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun29221(Store);
value.displayName = 'BillingInfoStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -82,84 +85,138 @@ function _fun29212(global, require, importDefault, importAll, module, exports, d
env0_17 = null;
env0_16 = null;
}, CONNECTION_OPEN: CONNECTION_OPEN_29259});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/BillingInfoStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/billing/BillingInfoStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_29213() { // fn#29213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:182, offset: 0x00fbd68e, size: 94 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_29213() { // fn#29213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:182, offset: 0x00fbd68e, size: 94 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_29213_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_29213_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun29221(a0) { // fn#29221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:671, offset: 0x00fbd72b, size: 479 bytes, params: 2, frame: 16
const closure = BillingInfoStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'isBusy', get: get_29223}, {key: 'isUpdatingPaymentSource', get: get_29224},
{key: 'isRemovingPaymentSource', get: get_29225}, {key: 'isSyncing', get: function() {
return this.isPaymentSourceFetching || this.isSubscriptionFetching;
}}, {key: 'isSubscriptionFetching', get: get_29227}, {key: 'isPaymentSourceFetching', get: get_29228},
{key: 'editSourceError', get: get_29229}, {key: 'removeSourceError', get: get_29230},
{key: 'ipCountryCodeLoaded', get: get_29231}, {key: 'ipCountryCode', get: get_29232},
{key: 'ipCountryCodeRequest', get: get_29233}, {key: 'ipLocationLoaded', get: get_29234}, {key: 'ipLocation',
get: get_29235}, {key: 'ipLocationRequest', get: get_29236}, {key: 'ipLocationHasError', get: get_29237},
{key: 'ipCountryCodeWithFallback', get: get_29238}, {key: 'ipCountryCodeHasError', get: get_29239},
{key: 'paymentSourcesFetchRequest', get: get_29240}]);
}
function _fun29221(a0) { // fn#29221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:671, offset: 0x00fbd72b, size: 479 bytes, params: 2, frame: 16
const BillingInfoStore2 = BillingInfoStore;
Inherits(BillingInfoStore2, a0);
return CreateClass(BillingInfoStore2, [{key: 'isBusy', get: get_29223}, {key: 'isUpdatingPaymentSource', get: get_29224},
{key: 'isRemovingPaymentSource', get: get_29225}, {key: 'isSyncing', get: function() {
return this.isPaymentSourceFetching || this.isSubscriptionFetching;
}}, {key: 'isSubscriptionFetching', get: get_29227}, {key: 'isPaymentSourceFetching', get: get_29228},
{key: 'editSourceError', get: get_29229}, {key: 'removeSourceError', get: get_29230},
{key: 'ipCountryCodeLoaded', get: get_29231}, {key: 'ipCountryCode', get: get_29232},
{key: 'ipCountryCodeRequest', get: get_29233}, {key: 'ipLocationLoaded', get: get_29234}, {key: 'ipLocation',
get: get_29235}, {key: 'ipLocationRequest', get: get_29236}, {key: 'ipLocationHasError', get: get_29237},
{key: 'ipCountryCodeWithFallback', get: get_29238}, {key: 'ipCountryCodeHasError', get: get_29239},
{key: 'paymentSourcesFetchRequest', get: get_29240}]);
function BillingInfoStore() { // fn#29222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:683, offset: 0x00fbd90a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, BillingInfoStore);
const value3 = env1_3(BillingInfoStore);
return env1_2(this, _isNativeReflectConstruct_29213() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function get_29223() { // fn#29223, offset: 0x00fbd97b, size: 30 bytes, params: 1, frame: 3
let r0 = env1_11 || env1_12;
r0 = !r0 ? env1_15 : r0;
r0 = !r0 ? env1_13 : r0;
return r0;
}
function get_29224() { // fn#29224, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function get_29225() { // fn#29225, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
function get_29227() { // fn#29227, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function get_29228() { // fn#29228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:1310, offset: 0x00fbd9ad, size: 15 bytes, params: 1, frame: 2
return env1_6 != null;
}
function get_29229() { // fn#29229, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1
return env1_16;
}
function get_29230() { // fn#29230, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1
return env1_17;
}
function get_29231() { // fn#29231, offset: 0x00fbd9bc, size: 15 bytes, params: 1, frame: 2
return env1_7 !== undefined;
}
function get_29232() { // fn#29232, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function get_29233() { // fn#29233, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function get_29234() { // fn#29234, offset: 0x00fbd9dd, size: 15 bytes, params: 1, frame: 2
return env1_9 !== undefined;
}
function get_29235() { // fn#29235, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function get_29236() { // fn#29236, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function get_29237() { // fn#29237, offset: 0x00d406a2, size: 9 bytes, params: 1, frame: 1
return env1_19;
}
function get_29238() { // fn#29238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:1844, offset: 0x00fbd9f5, size: 25 bytes, params: 1, frame: 3
return env1_7 ?? FallbackCurrencyCountry;
}
function get_29239() { // fn#29239, offset: 0x00df0e82, size: 9 bytes, params: 1, frame: 1
return env1_18;
}
function get_29240() { // fn#29240, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
function CONNECTION_OPEN_29259({countryCode}) { // fn#29259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:4442, offset: 0x00fbdb53, size: 26 bytes, params: 2, frame: 2
if (countryCode == null) {
}
function CONNECTION_OPEN_29259({countryCode}) { // fn#29259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:4442, offset: 0x00fbdb53, size: 26 bytes, params: 2, frame: 2
if (countryCode == null) {
}
}
}
function BillingInfoStore() { // fn#29222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:683, offset: 0x00fbd90a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, BillingInfoStore);
const value3 = env1_3(BillingInfoStore);
return env1_2(this, _isNativeReflectConstruct_29213() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function get_29223() { // fn#29223, offset: 0x00fbd97b, size: 30 bytes, params: 1, frame: 3
let r0 = env1_11 || env1_12;
r0 = !r0 ? env1_15 : r0;
r0 = !r0 ? env1_13 : r0;
return r0;
}
function get_29231() { // fn#29231, offset: 0x00fbd9bc, size: 15 bytes, params: 1, frame: 2
return env1_7 !== undefined;
}
function get_29234() { // fn#29234, offset: 0x00fbd9dd, size: 15 bytes, params: 1, frame: 2
return env1_9 !== undefined;
}
function get_29238() { // fn#29238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3931:1844, offset: 0x00fbd9f5, size: 25 bytes, params: 1, frame: 3
return env1_7 ?? FallbackCurrencyCountry;
}
global.__d(_fun29212, 3804, [6, 7, 15, 17, 18, 661, 566, 694,
2]) /* metro module 3804, dependencies: [6, 7, 15, 17, 18, 661, 566, 694, 2] */;
+97 -66
View File
@@ -1,22 +1,27 @@
/* Metro module 3819; source: stores/billing/BraintreeStore.tsx; dependencies: [6, 7, 15, 17, 18, 661, 477, 507, 566, 694, 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 * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as HTTPUtilsModule from '../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun29541(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:6, offset: 0x00fc4873, size: 458 bytes, params: 8, frame: 20
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 = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_7 = value.Endpoints;
const env0_8 = value.PaymentGateways;
const env0_9 = value.PaymentSourceTypes;
value = require(477) /* metro dependency 477: PlatformUtils */;
if (value.isDesktop()) {
global.window.popupBridge = {getReturnUrlPrefix: getReturnUrlPrefix, open: open};
global.window.popupBridge = {getReturnUrlPrefix: getReturnUrlPrefix, open: open_29546};
}
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun29547(Store).displayName = 'BraintreeStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{BRAINTREE_CREATE_CLIENT_SUCCESS: function(a0) {
@@ -35,73 +40,99 @@ function _fun29541(global, require, importDefault, importAll, module, exports, d
}, BRAINTREE_TEARDOWN_VENMO_CLIENT: function() {
env0_14 = null;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/BraintreeStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/billing/BraintreeStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_29542() { // fn#29542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:215, offset: 0x00fc4a3d, size: 94 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_29542() { // fn#29542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:215, offset: 0x00fc4a3d, size: 94 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_29542_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_29542_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getReturnUrlPrefix() { // fn#29545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:498, offset: 0x00fc4a9b, size: 117 bytes, params: 1, frame: 14
if (env0_10 == null) {
throw new global.Error('popupBridgeState is unset');
function getReturnUrlPrefix() { // fn#29545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:498, offset: 0x00fc4a9b, size: 117 bytes, params: 1, frame: 14
if (env0_10 == null) {
throw new global.Error('popupBridgeState is unset');
}
const aPIBaseURL = (HTTPUtilsModule).getAPIBaseURL();
const BILLING_POPUP_BRIDGE_CALLBACK_REDIRECT_PREFIX = Endpoints.BILLING_POPUP_BRIDGE_CALLBACK_REDIRECT_PREFIX;
const BRAINTREE = PaymentGateways.BRAINTREE;
return aPIBaseURL + Reflect.apply(BILLING_POPUP_BRIDGE_CALLBACK_REDIRECT_PREFIX, Endpoints, [BRAINTREE, env0_10]);
}
const aPIBaseURL = (require(507) /* metro dependency 507: HTTPUtils */).getAPIBaseURL();
const BILLING_POPUP_BRIDGE_CALLBACK_REDIRECT_PREFIX = Endpoints.BILLING_POPUP_BRIDGE_CALLBACK_REDIRECT_PREFIX;
const BRAINTREE = PaymentGateways.BRAINTREE;
return aPIBaseURL + Reflect.apply(BILLING_POPUP_BRIDGE_CALLBACK_REDIRECT_PREFIX, Endpoints, [BRAINTREE, env0_10]);
}
function open(a0) { // fn#29546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:659, offset: 0x00fc4b10, size: 47 bytes, params: 2, frame: 12
env0_11 = a0;
global.window.open(a0);
env0_15.emitChange();
}
function open_29546(a0) { // fn#29546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:659, offset: 0x00fc4b10, size: 47 bytes, params: 2, frame: 12
env0_11 = a0;
global.window.open(a0);
env0_15.emitChange();
}
function _fun29547(a0) { // fn#29547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:706, offset: 0x00fc4b3f, size: 143 bytes, params: 2, frame: 16
const closure = BraintreeStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'getClient', value: value_29549}, {key: 'getPayPalClient', value: value_29550},
{key: 'getVenmoClient', value: value_29551}, {key: 'getLastURL', value: value_29552}]);
}
function _fun29547(a0) { // fn#29547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:706, offset: 0x00fc4b3f, size: 143 bytes, params: 2, frame: 16
const BraintreeStore2 = BraintreeStore;
Inherits(BraintreeStore2, a0);
return CreateClass(BraintreeStore2, [{key: 'getClient', value: value_29549}, {key: 'getPayPalClient',
value: value_29550}, {key: 'getVenmoClient', value: value_29551}, {key: 'getLastURL', value: value_29552}]);
function BraintreeStore() { // fn#29548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:718, offset: 0x00fc4bce, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, BraintreeStore);
const value3 = env1_5(BraintreeStore);
return env1_4(this, _isNativeReflectConstruct_29542() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function BILLING_POPUP_BRIDGE_CALLBACK_29555({paymentSourceType, state, path, query}) { // fn#29555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:1479, offset: 0x00fc4c69, size: 108 bytes, params: 2, frame: 15
var onComplete;
const PAYPAL = PaymentSourceTypes.PAYPAL;
if (paymentSourceType === PAYPAL) {
if (state === env0_10) {
onComplete = global.window.popupBridge.onComplete;
if (typeof onComplete === 'function') {
onComplete(null, {path: path, queryItems: query});
function value_29549() { // fn#29549, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_29550() { // fn#29550, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
function value_29551() { // fn#29551, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function value_29552() { // fn#29552, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
}
function BILLING_POPUP_BRIDGE_CALLBACK_29555({paymentSourceType, state, path, query}) { // fn#29555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3946:1479, offset: 0x00fc4c69, size: 108 bytes, params: 2, frame: 15
var onComplete;
const PAYPAL = PaymentSourceTypes.PAYPAL;
if (paymentSourceType === PAYPAL) {
if (state === env0_10) {
onComplete = global.window.popupBridge.onComplete;
if (typeof onComplete === 'function') {
onComplete(null, {path: path, queryItems: query});
}
}
}
}
}
global.__d(_fun29541, 3819, [6, 7, 15, 17, 18, 661, 477, 507, 566, 694,
2]) /* metro module 3819, dependencies: [6, 7, 15, 17, 18, 661, 477, 507, 566, 694, 2] */;
+120 -88
View File
@@ -1,16 +1,19 @@
/* Metro module 7020; source: stores/billing/GuildBoostSlotStore.tsx; dependencies: [6, 7, 15, 17, 18, 3808, 566, 694, 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 SubscriptionStore from './SubscriptionStore.tsx'; /* Metro dependency 3808 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun55622(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:6, offset: 0x013ac4a0, size: 350 bytes, params: 8, frame: 19
const closure = GUILD_BOOST_SLOT_UPDATE_SUCCESS;
const GUILD_BOOST_SLOT_UPDATE_SUCCESS2 = GUILD_BOOST_SLOT_UPDATE_SUCCESS;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
let env0_8 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun55628(Store);
value.displayName = 'GuildBoostSlotStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {GUILD_BOOST_SLOTS_FETCH: function() {
@@ -20,96 +23,125 @@ function _fun55622(global, require, importDefault, importAll, module, exports, d
guildBoostSlots.forEach(_fun55637);
env0_7 = false;
env0_6 = true;
}, GUILD_BOOST_SLOT_UPDATE_SUCCESS: closure, GUILD_BOOST_SLOT_CREATE: closure, GUILD_BOOST_SLOT_UPDATE: closure,
LOGOUT: function() {
}, GUILD_BOOST_SLOT_UPDATE_SUCCESS: GUILD_BOOST_SLOT_UPDATE_SUCCESS2,
GUILD_BOOST_SLOT_CREATE: GUILD_BOOST_SLOT_UPDATE_SUCCESS2,
GUILD_BOOST_SLOT_UPDATE: GUILD_BOOST_SLOT_UPDATE_SUCCESS2, LOGOUT: function() {
env0_8 = {};
env0_6 = false;
env0_7 = false;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/GuildBoostSlotStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/billing/GuildBoostSlotStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_55623() { // fn#55623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:158, offset: 0x013ac5fe, size: 94 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_55623() { // fn#55623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:158, offset: 0x013ac5fe, size: 94 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_55623_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_55623_isNativeReflectConstruct = function() {
return !!result;
})();
}
function GUILD_BOOST_SLOT_CREATE({guildBoostSlot}) { // fn#55626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:370, offset: 0x013ac65c, size: 43 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, env0_8, guildBoostSlot);
object2[guildBoostSlot.id] = guildBoostSlot;
}
function GUILD_BOOST_SLOT_CREATE({guildBoostSlot}) { // fn#55626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:370, offset: 0x013ac65c, size: 43 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, env0_8, guildBoostSlot);
object[guildBoostSlot.id] = guildBoostSlot;
}
function handleSubscriptionStoreUpdate() { // fn#55627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:441, offset: 0x013ac687, size: 101 bytes, params: 1, frame: 16
var r3;
var property;
var id;
var getSubscriptionById;
var subscriptionId;
var value4;
const object2 = {};
const Object = global.Object;
const value2 = Object.values(env0_8);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
for (r3 = value3; true; r3 = value4) {
property = value2[r3];
id = property.id;
object2[id] = property;
getSubscriptionById = SubscriptionStore.getSubscriptionById;
subscriptionId = property.subscriptionId;
property.subscription = Reflect.apply(getSubscriptionById, SubscriptionStore, [subscriptionId]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = value2.length;
if (!(value4 < length)) {
break;
function handleSubscriptionStoreUpdate() { // fn#55627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:441, offset: 0x013ac687, size: 101 bytes, params: 1, frame: 16
var r3;
var property;
var id;
var subscriptionStoreBinding;
var getSubscriptionById;
var subscriptionId;
var value4;
const object = {};
const Object = global.Object;
const value2 = Object.values(env0_8);
let length = value2.length;
const value3 = 0;
if (value3 < length) {
for (r3 = value3; true; r3 = value4) {
property = value2[r3];
id = property.id;
object[id] = property;
subscriptionStoreBinding = SubscriptionStore;
getSubscriptionById = subscriptionStoreBinding.getSubscriptionById;
subscriptionId = property.subscriptionId;
property.subscription = Reflect.apply(getSubscriptionById, subscriptionStoreBinding, [subscriptionId]);
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
length = value2.length;
if (!(value4 < length)) {
break;
}
}
}
}
function _fun55628(a0) { // fn#55628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:620, offset: 0x013ac6ec, size: 162 bytes, params: 2, frame: 16
const GuildBoostSlotStore2 = GuildBoostSlotStore;
Inherits(GuildBoostSlotStore2, a0);
return CreateClass(GuildBoostSlotStore2, [{key: 'initialize', value: function() {
this.syncWith([SubscriptionStore], handleSubscriptionStoreUpdate);
}}, {key: 'hasFetched', get: get_55631}, {key: 'isFetching', get: get_55632}, {key: 'boostSlots', get: get_55633},
{key: 'getGuildBoostSlot', value: value_55634}]);
function GuildBoostSlotStore() { // fn#55629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:632, offset: 0x00fbdfd6, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, GuildBoostSlotStore);
const value3 = env1_3(GuildBoostSlotStore);
return env1_2(this, _isNativeReflectConstruct_55623() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function get_55631() { // fn#55631, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
function get_55632() { // fn#55632, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function get_55633() { // fn#55633, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function value_55634(a0) { // fn#55634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:1170, offset: 0x00ff623a, size: 16 bytes, params: 2, frame: 2
return env1_8[a0];
}
}
function GUILD_BOOST_SLOTS_FETCH_SUCCESS({guildBoostSlots}) { // fn#55636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:1367, offset: 0x013ac7b4, size: 51 bytes, params: 2, frame: 12
env0_8 = {};
guildBoostSlots.forEach(_fun55637);
function _fun55637(a0) { // fn#55637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:1443, offset: 0x013ac7e7, size: 23 bytes, params: 2, frame: 3
env1_8[a0.id] = a0;
}
}
}
function _fun55628(a0) { // fn#55628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:620, offset: 0x013ac6ec, size: 162 bytes, params: 2, frame: 16
const closure = GuildBoostSlotStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
this.syncWith([SubscriptionStore], handleSubscriptionStoreUpdate);
}}, {key: 'hasFetched', get: get_55631}, {key: 'isFetching', get: get_55632}, {key: 'boostSlots', get: get_55633},
{key: 'getGuildBoostSlot', value: value_55634}]);
}
function GUILD_BOOST_SLOTS_FETCH_SUCCESS({guildBoostSlots}) { // fn#55636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:1367, offset: 0x013ac7b4, size: 51 bytes, params: 2, frame: 12
env0_8 = {};
guildBoostSlots.forEach(_fun55637);
}
function _fun55637(a0) { // fn#55637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7198:1443, offset: 0x013ac7e7, size: 23 bytes, params: 2, frame: 3
env1_8[a0.id] = a0;
}
global.__d(_fun55622, 7020, [6, 7, 15, 17, 18, 3808, 566, 694,
2]) /* metro module 7020, dependencies: [6, 7, 15, 17, 18, 3808, 566, 694, 2] */;
+201 -162
View File
@@ -1,4 +1,13 @@
/* Metro module 3805; source: stores/billing/PaymentSourceStore.tsx; dependencies: [6, 7, 15, 17, 18, 3806, 566, 694, 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 PaymentSourceRecord from '../../records/PaymentSourceRecord.tsx'; /* Metro dependency 3806 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun29260(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:6, offset: 0x00fbdb6d, size: 353 bytes, params: 8, frame: 19
const _arrayLikeToArray_29266 = function(a0, a1) {
var r0;
@@ -43,202 +52,232 @@ function _fun29260(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = BILLING_PAYMENT_SOURCE_CREATE_SUCCESS;
const BILLING_PAYMENT_SOURCE_CREATE_SUCCESS2 = BILLING_PAYMENT_SOURCE_CREATE_SUCCESS;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const paymentSourceRecord = importDefault(3806) /* metro dependency 3806: PaymentSourceRecord */;
let env0_6 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun29268(Store);
value.displayName = 'PaymentSourceStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{BILLING_PAYMENT_SOURCE_CREATE_SUCCESS: closure, BILLING_PAYMENT_SOURCE_UPDATE_SUCCESS: closure,
BILLING_PAYMENT_SOURCE_FETCH_SUCCESS: closure,
{BILLING_PAYMENT_SOURCE_CREATE_SUCCESS: BILLING_PAYMENT_SOURCE_CREATE_SUCCESS2,
BILLING_PAYMENT_SOURCE_UPDATE_SUCCESS: BILLING_PAYMENT_SOURCE_CREATE_SUCCESS2,
BILLING_PAYMENT_SOURCE_FETCH_SUCCESS: BILLING_PAYMENT_SOURCE_CREATE_SUCCESS2,
BILLING_PAYMENT_SOURCES_FETCH_SUCCESS: BILLING_PAYMENT_SOURCES_FETCH_SUCCESS,
BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS: BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS_29278, LOGOUT: function() {
env0_6 = {};
env0_7 = null;
env0_8 = false;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/PaymentSourceStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/billing/PaymentSourceStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_29261() { // fn#29261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:160, offset: 0x00fbdcce, size: 94 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_29261_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_29264(a0, a1) { // fn#29264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:353, offset: 0x00fbdd2c, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
function _isNativeReflectConstruct_29261() { // fn#29261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:160, offset: 0x00fbdcce, size: 94 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 _fun29265;
return (_isNativeReflectConstruct_29261_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_29266(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
function _createForOfIteratorHelperLoose_29264(a0, a1) { // fn#29264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:353, offset: 0x00fbdd2c, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun29265;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_29266(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_29266(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_29266(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun29265;
}
return _fun29265;
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun29265() { // fn#29265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:924, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return CreateClass >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof CreateClass === 'bigint' ? CreateClass : +CreateClass]};
}
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function BILLING_PAYMENT_SOURCE_CREATE_SUCCESS({paymentSource}) { // fn#29267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1284, offset: 0x00fbde9e, size: 98 bytes, params: 2, frame: 15
const object2 = {};
copyDataProperties(object2, env0_6, undefined);
let id = paymentSource.id;
object2[id] = paymentSource;
if (paymentSource.isDefault || global.Object.keys(object2).length === 1) {
id = paymentSource.id;
function BILLING_PAYMENT_SOURCE_CREATE_SUCCESS({paymentSource}) { // fn#29267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1284, offset: 0x00fbde9e, size: 98 bytes, params: 2, frame: 15
const object = {};
copyDataProperties(object, env0_6, undefined);
let id = paymentSource.id;
object[id] = paymentSource;
if (paymentSource.isDefault || global.Object.keys(object).length === 1) {
id = paymentSource.id;
}
}
}
function _fun29268(a0) { // fn#29268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1413, offset: 0x00fbdf00, size: 214 bytes, params: 2, frame: 16
const closure = PaymentSourceStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'paymentSources', get: get_29270}, {key: 'paymentSourceIds', get: get_29271},
{key: 'defaultPaymentSourceId', get: get_29272}, {key: 'defaultPaymentSource', get: get_29273},
{key: 'hasFetchedPaymentSources', get: get_29274}, {key: 'getDefaultBillingCountryCode', value: function() {
var property = this.defaultPaymentSource;
var value = null;
return value == property ? value : property.paymentMethodCountry;
}}, {key: 'getPaymentSource', value: value_29276}]);
}
function _fun29268(a0) { // fn#29268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1413, offset: 0x00fbdf00, size: 214 bytes, params: 2, frame: 16
const PaymentSourceStore2 = PaymentSourceStore;
Inherits(PaymentSourceStore2, a0);
return CreateClass(PaymentSourceStore2, [{key: 'paymentSources', get: get_29270}, {key: 'paymentSourceIds',
get: get_29271}, {key: 'defaultPaymentSourceId', get: get_29272}, {key: 'defaultPaymentSource', get: get_29273},
{key: 'hasFetchedPaymentSources', get: get_29274}, {key: 'getDefaultBillingCountryCode', value: function() {
var property = this.defaultPaymentSource;
var value = null;
return value == property ? value : property.paymentMethodCountry;
}}, {key: 'getPaymentSource', value: value_29276}]);
function PaymentSourceStore() { // fn#29269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1425, offset: 0x00fbdfd6, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, PaymentSourceStore);
const value3 = env1_3(PaymentSourceStore);
return env1_2(this, _isNativeReflectConstruct_29261() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function BILLING_PAYMENT_SOURCES_FETCH_SUCCESS({paymentSources}) { // fn#29277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:2493, offset: 0x00fbe0ac, size: 160 bytes, params: 2, frame: 19
var r5;
var value4;
var binding;
var id;
var createFromServer;
var value5;
env0_6 = {};
env0_7 = null;
const value2 = _createForOfIteratorHelperLoose_29264(paymentSources);
const value3 = value2();
let done = value3.done;
if (!done) {
r5 = value3;
while (true) {
value4 = r5.value;
binding = env0_6;
id = value4.id;
createFromServer = PaymentSourceRecord.createFromServer;
binding[id] = Reflect.apply(createFromServer, PaymentSourceRecord, [value4]);
if (value4.default) {
function get_29270() { // fn#29270, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
function get_29271() { // fn#29271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1785, offset: 0x00fbe047, size: 27 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.keys(env1_6);
}
function get_29272() { // fn#29272, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function get_29273() { // fn#29273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1908, offset: 0x00fbe062, size: 30 bytes, params: 1, frame: 3
const value2 = null;
return value2 != env1_7 ? env1_6[env1_7] : value2;
}
function get_29274() { // fn#29274, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function value_29276(a0) { // fn#29276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:2164, offset: 0x00fbe09c, size: 16 bytes, params: 2, frame: 2
return env1_6[a0];
}
}
function BILLING_PAYMENT_SOURCES_FETCH_SUCCESS({paymentSources}) { // fn#29277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:2493, offset: 0x00fbe0ac, size: 160 bytes, params: 2, frame: 19
var object2;
var r5;
var value4;
var binding;
var id;
var paymentSourceRecordBinding;
var createFromServer;
var value5;
object2 = {};
env0_7 = null;
const value2 = _createForOfIteratorHelperLoose_29264(paymentSources);
const value3 = value2();
let done = value3.done;
if (!done) {
r5 = value3;
while (true) {
value4 = r5.value;
binding = object2;
id = value4.id;
env0_7 = id;
paymentSourceRecordBinding = PaymentSourceRecord;
createFromServer = paymentSourceRecordBinding.createFromServer;
binding[id] = Reflect.apply(createFromServer, paymentSourceRecordBinding, [value4]);
if (value4.default) {
id = value4.id;
env0_7 = id;
}
value5 = value2();
done = value5.done;
if (done) {
break;
}
r5 = value5;
continue;
}
value5 = value2();
done = value5.done;
if (done) {
break;
}
r5 = value5;
continue;
}
if (env0_7 == null && paymentSources.length > 0) {
id = paymentSources[0].id;
}
}
if (env0_7 == null && paymentSources.length > 0) {
id = paymentSources[0].id;
function BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS_29278({id}) { // fn#29278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:2763, offset: 0x00fbe14c, size: 87 bytes, params: 2, frame: 14
var object3;
var r0;
var value2;
const object = {};
copyDataProperties(object, object3, undefined);
object3 = object;
delete object[id];
if (env0_7 === id) {
value2 = global.Object.keys(object3);
r0 = value2.length === 0 ? null : value2[0];
}
}
}
function BILLING_PAYMENT_SOURCE_REMOVE_SUCCESS_29278({id}) { // fn#29278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:2763, offset: 0x00fbe14c, size: 87 bytes, params: 2, frame: 14
var r0;
var value2;
const object2 = {};
copyDataProperties(object2, env0_6, undefined);
env0_6 = object2;
delete object2[id];
if (env0_7 === id) {
value2 = global.Object.keys(env0_6);
r0 = value2.length === 0 ? null : value2[0];
}
}
function get_29271() { // fn#29271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1785, offset: 0x00fbe047, size: 27 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.keys(env1_6);
}
function get_29273() { // fn#29273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3932:1908, offset: 0x00fbe062, size: 30 bytes, params: 1, frame: 3
const value2 = null;
return value2 != env1_7 ? env1_6[env1_7] : value2;
}
global.__d(_fun29260, 3805, [6, 7, 15, 17, 18, 3806, 566, 694,
2]) /* metro module 3805, dependencies: [6, 7, 15, 17, 18, 3806, 566, 694, 2] */;
+450 -408
View File
@@ -1,4 +1,16 @@
/* Metro module 3807; source: stores/billing/SubscriptionPlanStore.tsx; dependencies: [6, 7, 15, 17, 18, 3803, 661, 1880, 1944, 21, 566, 694, 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 SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import SubscriptionPlanRecord from '../../records/SubscriptionPlanRecord.tsx'; /* Metro dependency 3803 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as FunctionUtilsModule from '../../utils/FunctionUtils.tsx'; /* Metro dependency 1944 */
function _fun29330(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:6, offset: 0x00fbff5a, size: 619 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_29336 = function(a0, a1) {
@@ -49,16 +61,10 @@ function _fun29330(global, require, importDefault, importAll, module, exports, d
SubscriptionPlanInfo[SubscriptionPlans.NONE_3_MONTH],
SubscriptionPlanInfo[SubscriptionPlans.NONE_6_MONTH]].forEach(_fun29339);
};
const closure2 = SUBSCRIPTION_PLANS_RESET;
const SUBSCRIPTION_PLANS_RESET2 = SUBSCRIPTION_PLANS_RESET;
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 */;
const subscriptionPlanRecord = importDefault(3803) /* metro dependency 3803: SubscriptionPlanRecord */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_9 = value.CurrencyCodes;
const env0_10 = value.PriceSetAssignmentPurchaseTypes;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
@@ -77,19 +83,19 @@ function _fun29330(global, require, importDefault, importAll, module, exports, d
const env0_20 = {};
closure();
const DAY = SubscriptionIntervalTypes.DAY;
items = [DAY];
items2 = [DAY];
const MONTH = SubscriptionIntervalTypes.MONTH;
items[1] = MONTH;
items2[1] = MONTH;
const YEAR = SubscriptionIntervalTypes.YEAR;
items[2] = YEAR;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
items2[2] = YEAR;
const Store = (Flux).Store;
let value4 = _fun29342(Store);
value4.displayName = 'SubscriptionPlanStore';
const value7 = new value4(importDefault(694) /* metro dependency 694: Dispatcher */,
{SUBSCRIPTION_PLANS_FETCH: SUBSCRIPTION_PLANS_FETCH,
SUBSCRIPTION_PLANS_FETCH_SUCCESS: SUBSCRIPTION_PLANS_FETCH_SUCCESS,
SUBSCRIPTION_PLANS_FETCH_FAILURE: SUBSCRIPTION_PLANS_FETCH_FAILURE, SUBSCRIPTION_PLANS_RESET: closure2,
GIFT_CODE_RESOLVE_SUCCESS: GIFT_CODE_RESOLVE_SUCCESS,
SUBSCRIPTION_PLANS_FETCH_FAILURE: SUBSCRIPTION_PLANS_FETCH_FAILURE,
SUBSCRIPTION_PLANS_RESET: SUBSCRIPTION_PLANS_RESET2, GIFT_CODE_RESOLVE_SUCCESS: GIFT_CODE_RESOLVE_SUCCESS,
ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS: function({entitlements}) {
var r2;
var value4;
@@ -110,422 +116,458 @@ function _fun29330(global, require, importDefault, importAll, module, exports, d
continue;
}
}
}, LOGOUT: closure2});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/SubscriptionPlanStore.tsx');
}, LOGOUT: SUBSCRIPTION_PLANS_RESET2});
(FileImportTrackerModule).fileFinishedImporting('stores/billing/SubscriptionPlanStore.tsx');
exports.default = value7;
exports.subscriptionPlansFetchingForSKU = set;
}
function _isNativeReflectConstruct_29331() { // fn#29331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:365, offset: 0x00fc01c5, size: 94 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_29331_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_29334(a0, a1) { // fn#29334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:558, offset: 0x00fc0223, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
function _isNativeReflectConstruct_29331() { // fn#29331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:365, offset: 0x00fc01c5, size: 94 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 _fun29335;
return (_isNativeReflectConstruct_29331_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_29336(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
function _createForOfIteratorHelperLoose_29334(a0, a1) { // fn#29334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:558, offset: 0x00fc0223, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun29335;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_29336(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_29336(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_29336(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun29335;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function addSubscriptionPlan(a0) { // fn#29337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:1512, offset: 0x00fc0395, size: 338 bytes, params: 2, frame: 22
var r2;
var Set;
var Object;
var value2;
var prototype;
var value3;
var set;
var value4;
var Array;
var from;
var value7;
var skuId3;
var items2;
var value8;
var value9;
const skuId = a0.skuId;
let binding = env0_15;
binding[a0.id] = a0;
const prices = a0.prices;
const DEFAULT = PriceSetAssignmentPurchaseTypes.DEFAULT;
let property = prices[DEFAULT];
if (property != null) {
Set = global.Set;
Object = global.Object;
value2 = Object.keys(property.paymentSourcePrices);
prototype = Set.prototype;
value3 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value4 = set instanceof Object ? set : value3;
binding = env0_19;
binding[a0.id] = value4;
Array = global.Array;
from = Array.from;
binding = env0_20;
property = binding[a0.skuId];
if (property != null) {
r2 = property;
} else {
set = new global.Set();
r5 = value;
}
value7 = Reflect.apply(from, Array, [r2]);
binding = env0_20;
skuId3 = a0.skuId;
Set = global.Set;
items2 = [];
value8 = arraySpread(items2, value7, 0, value4);
Array = global.Array;
from = Array.from;
arraySpread(items2, Reflect.apply(from, Array, [value4]), value8, value4);
prototype = Set.prototype;
value9 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
binding[skuId3] = set instanceof Object ? set : value9;
if (r5) {
if (r5) {
}
return _fun29335;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun29335() { // fn#29335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:1129, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
property = env0_16[skuId];
if (property != null) {
property.add(a0.id);
} else {
binding = env0_16;
Set = global.Set;
items2 = [a0.id];
binding[skuId] = new Set();
}
}
function initializeNonePlans() { // fn#29338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:1813, offset: 0x00fc04e7, size: 116 bytes, params: 1, frame: 12
const NONE_MONTH = SubscriptionPlans.NONE_MONTH;
const NONE_YEAR = SubscriptionPlans.NONE_YEAR;
const NONE_3_MONTH = SubscriptionPlans.NONE_3_MONTH;
const NONE_6_MONTH = SubscriptionPlans.NONE_6_MONTH;
[SubscriptionPlanInfo[NONE_MONTH], SubscriptionPlanInfo[NONE_YEAR], SubscriptionPlanInfo[NONE_3_MONTH],
SubscriptionPlanInfo[NONE_6_MONTH]].forEach(_fun29339);
}
function addSubscriptionPlanFromServer(a0) { // fn#29340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2109, offset: 0x00fc05d3, size: 34 bytes, params: 2, frame: 12
addSubscriptionPlan(SubscriptionPlanRecord.createFromServer(a0));
}
function LOGOUT_29341() { // fn#29341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2194, offset: 0x00fc05f5, size: 150 bytes, params: 1, frame: 16
(require(1944) /* metro dependency 1944: FunctionUtils */).clearObject(env0_15);
(require(1944) /* metro dependency 1944: FunctionUtils */).clearObject(env0_16);
env0_17.clear();
env0_18.clear();
(require(1944) /* metro dependency 1944: FunctionUtils */).clearObject(env0_19);
(require(1944) /* metro dependency 1944: FunctionUtils */).clearObject(env0_20);
initializeNonePlans();
}
function _fun29342(a0) { // fn#29342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2402, offset: 0x00fc068b, size: 427 bytes, params: 2, frame: 16
const closure = SubscriptionPlanStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'getPlanIdsForSkus', value: value_29344}, {key: 'getFetchedSKUIDs',
value: value_29346}, {key: 'getForSKU', value: value_29347}, {key: 'getForSkuAndInterval', value: function(a0,
a1) {
var value = a2;
var env0_0 = a1;
var env0_1 = value !== undefined ? value : 1;
return this.getForSKU(a0).find(_fun29350);
}}, {key: 'get', value: value_29351}, {key: 'isFetchingForSKU', value: value_29352}, {key: 'isFetchingForSKUs',
value: function(a0) {
var env0_0 = this;
return a0.some(_fun29354);
}}, {key: 'isLoadedForSKU', value: value_29355}, {key: 'isLoadedForSKUs', value: function(a0) {
var env0_0 = this;
return a0.every(_fun29357);
}}, {key: 'isFetchingForPremiumSKUs', value: function() {
var env0_0 = this;
return ACTIVE_PREMIUM_SKUS.some(_fun29359);
}}, {key: 'isLoadedForPremiumSKUs', value: function() {
var env0_0 = this;
return ACTIVE_PREMIUM_SKUS.every(_fun29361);
}}, {key: 'ignoreSKUFetch', value: value_29362}, {key: 'getPaymentSourcesForPlanId', value: value_29363},
{key: 'getPaymentSourceIds', value: value_29364}, {key: 'hasPaymentSourceForSKUId', value: value_29367},
{key: 'hasPaymentSourceForSKUIds', value: function(a0, a1) {
var env0_0 = this;
var env0_1 = a0;
return a1.every(_fun29369);
}}]);
}
function SUBSCRIPTION_PLANS_FETCH({skuId}) { // fn#29370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4443, offset: 0x00fc0c4e, size: 29 bytes, params: 2, frame: 11
env0_17.add(skuId);
}
function SUBSCRIPTION_PLANS_FETCH_SUCCESS({skuId, subscriptionPlans}) { // fn#29371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4535, offset: 0x00fc0c6b, size: 133 bytes, params: 2, frame: 15
let binding = env0_16;
let Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
let set = new Set();
binding[skuId] = set instanceof Object ? set : value2;
binding = env0_20;
Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
binding[skuId] = set instanceof Object ? set : value4;
subscriptionPlans.forEach(addSubscriptionPlanFromServer);
env0_17.delete(skuId);
env0_18.delete(skuId);
}
function SUBSCRIPTION_PLANS_FETCH_FAILURE({skuId}) { // fn#29372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4736, offset: 0x00fc0cf0, size: 43 bytes, params: 2, frame: 12
env0_17.delete(skuId);
env0_18.delete(skuId);
}
function GIFT_CODE_RESOLVE_SUCCESS({giftCode}) { // fn#29373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4874, offset: 0x00fc0d1b, size: 45 bytes, params: 2, frame: 11
if (giftCode.subscription_plan != null) {
addSubscriptionPlanFromServer(giftCode.subscription_plan);
}
}
function _fun29339({id, name, interval, intervalCount, skuId}) { // fn#29339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:1922, offset: 0x00fc055b, size: 120 bytes, params: 2, frame: 15
const value = environment.__proto__;
const addSubscriptionPlanBinding = addSubscriptionPlan;
const createFromServer = SubscriptionPlanRecord.createFromServer;
const USD = CurrencyCodes.USD;
addSubscriptionPlanBinding(Reflect.apply(createFromServer, SubscriptionPlanRecord, [{id: id, name: name,
interval: interval, interval_count: intervalCount, tax_inclusive: true, sku_id: skuId, currency: USD, price: 0,
price_tier: 0}]));
}
function value_29344(a0) { // fn#29344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2744, offset: 0x00fc0836, size: 168 bytes, params: 2, frame: 24
var r13;
var r2;
var r1;
var value4;
var Array;
var from;
var property;
var Set;
var prototype;
var value5;
var set;
var value6;
var value7;
var push;
var items2;
var value8;
const items3 = [];
const value2 = _createForOfIteratorHelperLoose_29334(a0);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
function addSubscriptionPlan(a0) { // fn#29337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:1512, offset: 0x00fc0395, size: 338 bytes, params: 2, frame: 22
var r2;
var Set;
var Object;
var value2;
var prototype;
var value3;
var set;
var value4;
var Array;
var from;
var value7;
var skuId3;
var items2;
var value8;
var value9;
const skuId = a0.skuId;
let binding = env0_15;
binding[a0.id] = a0;
const prices = a0.prices;
const DEFAULT = PriceSetAssignmentPurchaseTypes.DEFAULT;
let property = prices[DEFAULT];
if (property != null) {
Set = global.Set;
Object = global.Object;
value2 = Object.keys(property.paymentSourcePrices);
prototype = Set.prototype;
value3 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value4 = set instanceof Object ? set : value3;
binding = env0_19;
binding[a0.id] = value4;
Array = global.Array;
from = Array.from;
property = env1_16[value4];
binding = env0_20;
property = binding[a0.skuId];
if (property != null) {
r1 = property;
r2 = property;
} else {
Set = global.Set;
prototype = Set.prototype;
value5 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value6 = set instanceof Object ? set : value5;
r1 = value6;
r13 = value5;
set = new global.Set();
}
value7 = Reflect.apply(from, Array, [r1]);
value7.sort(_fun29345);
push = items3.push;
value7 = Reflect.apply(from, Array, [r2]);
binding = env0_20;
skuId3 = a0.skuId;
Set = global.Set;
items2 = [];
arraySpread(items2, value7, 0, r13);
apply(push, items2, items3, r13);
value8 = value2();
done = value8.done;
if (done) {
break;
}
r2 = value8;
continue;
value8 = arraySpread(items2, value7, 0, value4);
Array = global.Array;
from = Array.from;
arraySpread(items2, Reflect.apply(from, Array, [value4]), value8, value4);
prototype = Set.prototype;
value9 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
binding[skuId3] = set instanceof Object ? set : value9;
}
property = env0_16[skuId];
if (property != null) {
property.add(a0.id);
} else {
binding = env0_16;
Set = global.Set;
items2 = [a0.id];
binding[skuId] = new Set();
}
}
return items3;
}
function value_29346() { // fn#29346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3054, offset: 0x00fc0936, size: 41 bytes, params: 1, frame: 12
return (importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(env1_16);
}
function value_29347(a0) { // fn#29347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3113, offset: 0x00fc095f, size: 61 bytes, params: 2, frame: 12
var environment;
const Array = global.Array;
const from = Array.from;
const value = environment.__proto__;
return Reflect.apply(from, Array, [env1_16[a0] ?? []]).map(_fun29348);
}
function value_29349(a0, a1) { // fn#29349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3221, offset: 0x00fc09ac, size: 60 bytes, params: 3, frame: 12
const value = a2;
const env0_0 = a1;
const env0_1 = value !== undefined ? value : 1;
return this.getForSKU(a0).find(_fun29350);
}
function value_29353(a0) { // fn#29353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3447, offset: 0x00fc0a25, size: 30 bytes, params: 2, frame: 11
return a0.some(_fun29354);
}
function value_29355(a0) { // fn#29355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3534, offset: 0x00fc0a5a, size: 68 bytes, params: 2, frame: 13
const value = environment.__proto__;
const value2 = env1_18.has(a0);
return value2 ? !!value2 : !env1_17.has(a0) && env1_16[a0] != null;
}
function value_29356(a0) { // fn#29356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3617, offset: 0x00fc0a9e, size: 30 bytes, params: 2, frame: 11
return a0.every(_fun29357);
}
function value_29358() { // fn#29358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3713, offset: 0x00fc0ad3, size: 34 bytes, params: 1, frame: 11
return ACTIVE_PREMIUM_SKUS.some(_fun29359);
}
function value_29360() { // fn#29360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3807, offset: 0x00fc0af5, size: 34 bytes, params: 1, frame: 11
return ACTIVE_PREMIUM_SKUS.every(_fun29361);
}
function value_29363(a0) { // fn#29363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3955, offset: 0x00fc0b2f, size: 36 bytes, params: 2, frame: 12
return env1_19.hasOwnProperty(a0) ? env1_19[a0] : null;
}
function value_29364() { // fn#29364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4039, offset: 0x00fc0b53, size: 74 bytes, params: 1, frame: 13
const Set = global.Set;
const set = new Set();
const Object = global.Object;
Object.values(env1_19).forEach(function(a0) {
return a0.forEach(_fun29366);
});
return set;
}
function value_29367(a0, a1) { // fn#29367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4169, offset: 0x00fc0bc9, size: 66 bytes, params: 3, frame: 13
const value = environment.__proto__;
const NONE = PremiumSubscriptionSKUs.NONE;
return NONE === a1 || env1_20[a1] != null && env1_20[a1].has(a0);
}
function value_29368(a0, a1) { // fn#29368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4267, offset: 0x00fc0c0b, size: 37 bytes, params: 3, frame: 11
const env0_1 = a0;
return a1.every(_fun29369);
}
function _fun29345(a0, a1) { // fn#29345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2887, offset: 0x00fc08de, size: 88 bytes, params: 3, frame: 14
let value = environment.__proto__.__proto__;
const property = env2_15[a0];
const property2 = env2_15[a1];
const binding = env2_21;
value = binding.indexOf(property.interval);
value -= binding.indexOf(property2.interval);
return value || property.intervalCount - property2.intervalCount;
}
function _fun29348(a0) { // fn#29348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3175, offset: 0x00fc099c, size: 16 bytes, params: 2, frame: 2
return env2_15[a0];
}
function _fun29350(a0) { // fn#29350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3270, offset: 0x00fc09e8, size: 39 bytes, params: 2, frame: 4
return a0.interval === require && a0.intervalCount === env0_1;
}
function _fun29354(a0) { // fn#29354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3474, offset: 0x00fc0a43, size: 23 bytes, params: 2, frame: 11
return env0_0.isFetchingForSKU(a0);
}
function _fun29357(a0) { // fn#29357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3645, offset: 0x00fc0abc, size: 23 bytes, params: 2, frame: 11
return env0_0.isLoadedForSKU(a0);
}
function _fun29365(a0) { // fn#29365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4097, offset: 0x00fc0b9d, size: 22 bytes, params: 2, frame: 11
return a0.forEach(_fun29366);
}
function _fun29369(a0) { // fn#29369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4297, offset: 0x00fc0c30, size: 30 bytes, params: 2, frame: 13
return env0_0.hasPaymentSourceForSKUId(env0_1, a0);
}
function _fun29366(a0) { // fn#29366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4111, offset: 0x00fc0bb3, size: 22 bytes, params: 2, frame: 11
return env1_0.add(a0);
function initializeNonePlans() { // fn#29338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:1813, offset: 0x00fc04e7, size: 116 bytes, params: 1, frame: 12
const NONE_MONTH = SubscriptionPlans.NONE_MONTH;
const NONE_YEAR = SubscriptionPlans.NONE_YEAR;
const NONE_3_MONTH = SubscriptionPlans.NONE_3_MONTH;
const NONE_6_MONTH = SubscriptionPlans.NONE_6_MONTH;
[SubscriptionPlanInfo[NONE_MONTH], SubscriptionPlanInfo[NONE_YEAR], SubscriptionPlanInfo[NONE_3_MONTH],
SubscriptionPlanInfo[NONE_6_MONTH]].forEach(_fun29339);
function _fun29339({id, name, interval, intervalCount, skuId}) { // fn#29339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:1922, offset: 0x00fc055b, size: 120 bytes, params: 2, frame: 15
const value = environment.__proto__;
const addSubscriptionPlanBinding = addSubscriptionPlan;
const subscriptionPlanRecordBinding = SubscriptionPlanRecord;
const createFromServer = subscriptionPlanRecordBinding.createFromServer;
const USD = CurrencyCodes.USD;
addSubscriptionPlanBinding(Reflect.apply(createFromServer, subscriptionPlanRecordBinding, [{id: id, name: name,
interval: interval, interval_count: intervalCount, tax_inclusive: true, sku_id: skuId, currency: USD, price: 0,
price_tier: 0}]));
}
}
function addSubscriptionPlanFromServer(a0) { // fn#29340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2109, offset: 0x00fc05d3, size: 34 bytes, params: 2, frame: 12
addSubscriptionPlan(SubscriptionPlanRecord.createFromServer(a0));
}
function LOGOUT_29341() { // fn#29341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2194, offset: 0x00fc05f5, size: 150 bytes, params: 1, frame: 16
(FunctionUtilsModule).clearObject(env0_15);
(FunctionUtilsModule).clearObject(env0_16);
env0_17.clear();
env0_18.clear();
(FunctionUtilsModule).clearObject(env0_19);
(FunctionUtilsModule).clearObject(env0_20);
initializeNonePlans();
}
function _fun29342(a0) { // fn#29342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2402, offset: 0x00fc068b, size: 427 bytes, params: 2, frame: 16
const SubscriptionPlanStore2 = SubscriptionPlanStore;
Inherits(SubscriptionPlanStore2, a0);
return CreateClass(SubscriptionPlanStore2, [{key: 'getPlanIdsForSkus', value: value_29344}, {key: 'getFetchedSKUIDs',
value: value_29346}, {key: 'getForSKU', value: value_29347}, {key: 'getForSkuAndInterval', value: function(a0,
a1) {
var value = a2;
var env0_0 = a1;
var env0_1 = value !== undefined ? value : 1;
return this.getForSKU(a0).find(_fun29350);
}}, {key: 'get', value: value_29351}, {key: 'isFetchingForSKU', value: value_29352}, {key: 'isFetchingForSKUs',
value: function(a0) {
var env0_0 = this;
return a0.some(_fun29354);
}}, {key: 'isLoadedForSKU', value: value_29355}, {key: 'isLoadedForSKUs', value: function(a0) {
var env0_0 = this;
return a0.every(_fun29357);
}}, {key: 'isFetchingForPremiumSKUs', value: function() {
var env0_0 = this;
return ACTIVE_PREMIUM_SKUS.some(_fun29359);
}}, {key: 'isLoadedForPremiumSKUs', value: function() {
var env0_0 = this;
return ACTIVE_PREMIUM_SKUS.every(_fun29361);
}}, {key: 'ignoreSKUFetch', value: value_29362}, {key: 'getPaymentSourcesForPlanId', value: value_29363},
{key: 'getPaymentSourceIds', value: value_29364}, {key: 'hasPaymentSourceForSKUId', value: value_29367},
{key: 'hasPaymentSourceForSKUIds', value: function(a0, a1) {
var env0_0 = this;
var env0_1 = a0;
return a1.every(_fun29369);
}}]);
function SubscriptionPlanStore() { // fn#29343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2414, offset: 0x00e3fd08, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, SubscriptionPlanStore);
const value3 = env1_6(SubscriptionPlanStore);
return env1_5(this, _isNativeReflectConstruct_29331() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_29344(a0) { // fn#29344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2744, offset: 0x00fc0836, size: 168 bytes, params: 2, frame: 24
var r13;
var r2;
var r1;
var value4;
var Array;
var from;
var property;
var Set;
var prototype;
var value5;
var set;
var value6;
var value7;
var push;
var items2;
var value8;
const items3 = [];
const value2 = _createForOfIteratorHelperLoose_29334(a0);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
while (true) {
value4 = r2.value;
Array = global.Array;
from = Array.from;
property = env1_16[value4];
if (property != null) {
r1 = property;
} else {
Set = global.Set;
prototype = Set.prototype;
value5 = Object.create(prototype, {constructor: {value: Set}});
set = new Set();
value6 = set instanceof Object ? set : value5;
r1 = value6;
r13 = value5;
}
value7 = Reflect.apply(from, Array, [r1]);
value7.sort(_fun29345);
push = items3.push;
items2 = [];
arraySpread(items2, value7, 0, r13);
apply(push, items2, items3, r13);
value8 = value2();
done = value8.done;
if (done) {
break;
}
r2 = value8;
continue;
}
}
return items3;
function _fun29345(a0, a1) { // fn#29345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:2887, offset: 0x00fc08de, size: 88 bytes, params: 3, frame: 14
let value = environment.__proto__.__proto__;
const property = env2_15[a0];
const property2 = env2_15[a1];
const binding = env2_21;
value = binding.indexOf(property.interval);
value -= binding.indexOf(property2.interval);
return value || property.intervalCount - property2.intervalCount;
}
}
function value_29346() { // fn#29346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3054, offset: 0x00fc0936, size: 41 bytes, params: 1, frame: 12
return (SnowflakeUtils).keys(env1_16);
}
function value_29347(a0) { // fn#29347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3113, offset: 0x00fc095f, size: 61 bytes, params: 2, frame: 12
var environment;
const Array = global.Array;
const from = Array.from;
const value = environment.__proto__;
return Reflect.apply(from, Array, [env1_16[a0] ?? []]).map(_fun29348);
function _fun29348(a0) { // fn#29348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3175, offset: 0x00fc099c, size: 16 bytes, params: 2, frame: 2
return env2_15[a0];
}
}
function value_29349(a0, a1) { // fn#29349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3221, offset: 0x00fc09ac, size: 60 bytes, params: 3, frame: 12
const value = a2;
const env0_0 = a1;
const env0_1 = value !== undefined ? value : 1;
return this.getForSKU(a0).find(_fun29350);
function _fun29350(a0) { // fn#29350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3270, offset: 0x00fc09e8, size: 39 bytes, params: 2, frame: 4
return a0.interval === require && a0.intervalCount === env0_1;
}
}
function value_29351(a0) { // fn#29351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3330, offset: 0x00df0e9d, size: 16 bytes, params: 2, frame: 2
return env1_15[a0];
}
function value_29352(a0) { // fn#29352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3386, offset: 0x00fc0a0f, size: 22 bytes, params: 2, frame: 11
return env1_17.has(a0);
}
function value_29353(a0) { // fn#29353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3447, offset: 0x00fc0a25, size: 30 bytes, params: 2, frame: 11
return a0.some(_fun29354);
function _fun29354(a0) { // fn#29354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3474, offset: 0x00fc0a43, size: 23 bytes, params: 2, frame: 11
return env0_0.isFetchingForSKU(a0);
}
}
function value_29355(a0) { // fn#29355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3534, offset: 0x00fc0a5a, size: 68 bytes, params: 2, frame: 13
const value = environment.__proto__;
const value2 = env1_18.has(a0);
return value2 ? !!value2 : !env1_17.has(a0) && env1_16[a0] != null;
}
function value_29356(a0) { // fn#29356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3617, offset: 0x00fc0a9e, size: 30 bytes, params: 2, frame: 11
return a0.every(_fun29357);
function _fun29357(a0) { // fn#29357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3645, offset: 0x00fc0abc, size: 23 bytes, params: 2, frame: 11
return env0_0.isLoadedForSKU(a0);
}
}
function value_29358() { // fn#29358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3713, offset: 0x00fc0ad3, size: 34 bytes, params: 1, frame: 11
return ACTIVE_PREMIUM_SKUS.some(_fun29359);
function _fun29359(a0) { // fn#29359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3739, offset: 0x00fc0a43, size: 23 bytes, params: 2, frame: 11
return env0_0.isFetchingForSKU(a0);
}
}
function value_29360() { // fn#29360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3807, offset: 0x00fc0af5, size: 34 bytes, params: 1, frame: 11
return ACTIVE_PREMIUM_SKUS.every(_fun29361);
function _fun29361(a0) { // fn#29361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3834, offset: 0x00fc0abc, size: 23 bytes, params: 2, frame: 11
return env0_0.isLoadedForSKU(a0);
}
}
function value_29362(a0) { // fn#29362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3892, offset: 0x00fc0b17, size: 24 bytes, params: 2, frame: 11
env1_18.add(a0);
}
function value_29363(a0) { // fn#29363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:3955, offset: 0x00fc0b2f, size: 36 bytes, params: 2, frame: 12
return env1_19.hasOwnProperty(a0) ? env1_19[a0] : null;
}
function value_29364() { // fn#29364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4039, offset: 0x00fc0b53, size: 74 bytes, params: 1, frame: 13
const Set = global.Set;
const set = new Set();
const Object = global.Object;
Object.values(env1_19).forEach(function(a0) {
return a0.forEach(_fun29366);
});
return set;
function _fun29365(a0) { // fn#29365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4097, offset: 0x00fc0b9d, size: 22 bytes, params: 2, frame: 11
return a0.forEach(_fun29366);
function _fun29366(a0) { // fn#29366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4111, offset: 0x00fc0bb3, size: 22 bytes, params: 2, frame: 11
return env1_0.add(a0);
}
}
}
function value_29367(a0, a1) { // fn#29367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4169, offset: 0x00fc0bc9, size: 66 bytes, params: 3, frame: 13
const value = environment.__proto__;
const NONE = PremiumSubscriptionSKUs.NONE;
return NONE === a1 || env1_20[a1] != null && env1_20[a1].has(a0);
}
function value_29368(a0, a1) { // fn#29368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4267, offset: 0x00fc0c0b, size: 37 bytes, params: 3, frame: 11
const env0_1 = a0;
return a1.every(_fun29369);
function _fun29369(a0) { // fn#29369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4297, offset: 0x00fc0c30, size: 30 bytes, params: 2, frame: 13
return env0_0.hasPaymentSourceForSKUId(env0_1, a0);
}
}
}
function SUBSCRIPTION_PLANS_FETCH({skuId}) { // fn#29370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4443, offset: 0x00fc0c4e, size: 29 bytes, params: 2, frame: 11
env0_17.add(skuId);
}
function SUBSCRIPTION_PLANS_FETCH_SUCCESS({skuId, subscriptionPlans}) { // fn#29371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4535, offset: 0x00fc0c6b, size: 133 bytes, params: 2, frame: 15
let binding = env0_16;
let Set = global.Set;
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
let set = new Set();
binding[skuId] = set instanceof Object ? set : value2;
binding = env0_20;
Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
binding[skuId] = set instanceof Object ? set : value4;
subscriptionPlans.forEach(addSubscriptionPlanFromServer);
env0_17.delete(skuId);
env0_18.delete(skuId);
}
function SUBSCRIPTION_PLANS_FETCH_FAILURE({skuId}) { // fn#29372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4736, offset: 0x00fc0cf0, size: 43 bytes, params: 2, frame: 12
env0_17.delete(skuId);
env0_18.delete(skuId);
}
function GIFT_CODE_RESOLVE_SUCCESS({giftCode}) { // fn#29373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3934:4874, offset: 0x00fc0d1b, size: 45 bytes, params: 2, frame: 11
if (giftCode.subscription_plan != null) {
addSubscriptionPlanFromServer(giftCode.subscription_plan);
}
}
}
global.__d(_fun29330, 3807, [6, 7, 15, 17, 18, 3803, 661, 1880, 1944, 21, 566, 694,
2]) /* metro module 3807, dependencies: [6, 7, 15, 17, 18, 3803, 661, 1880, 1944, 21, 566, 694, 2] */;
+306 -246
View File
@@ -1,4 +1,16 @@
/* Metro module 3808; source: stores/billing/SubscriptionStore.tsx; dependencies: [6, 7, 15, 17, 18, 3803, 3809, 1226, 661, 566, 694, 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 '../AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as SubscriptionPlanRecordModule from '../../records/SubscriptionPlanRecord.tsx'; /* Metro dependency 3803 */
import * as SubscriptionRecordModule from '../../records/SubscriptionRecord.tsx'; /* Metro dependency 3809 */
function _fun29375(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#29375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:6, offset: 0x00fc0d9c, size: 547 bytes, params: 8, frame: 21
const closure = function() {
env0_10 = null;
@@ -16,21 +28,14 @@ function _fun29375(global, require, importDefault, importAll, module, exports, d
const isPaid = function({status}) {
return status !== SubscriptionStatusTypes.UNPAID;
};
const closure2 = getSubscriptionOfType;
const getSubscriptionOfType2 = getSubscriptionOfType;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
let env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = (require(3803) /* metro dependency 3803: SubscriptionPlanRecord */).isNoneSubscription;
const env0_6 = (require(3809) /* metro dependency 3809: SubscriptionRecord */).SubscriptionRecord;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
let value = require(661) /* metro dependency 661: Constants */;
let env0_4 = Inherits;
let value = ConstantsModule;
const env0_8 = value.SubscriptionStatusTypes;
const env0_9 = value.SubscriptionTypes;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun29384(Store).displayName = 'SubscriptionStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{BILLING_SUBSCRIPTION_FETCH_SUCCESS: function({subscriptions, lastLazyPerkSync}) {
@@ -81,275 +86,330 @@ function _fun29375(global, require, importDefault, importAll, module, exports, d
env0_19 = false;
env0_18 = false;
}, LOGOUT: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/billing/SubscriptionStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/billing/SubscriptionStore.tsx');
exports.default = value;
exports.getSubscriptionOfType = closure2;
}
function _isNativeReflectConstruct_29376() { // fn#29376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:276, offset: 0x00fc0fbf, size: 94 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) {
exports.getSubscriptionOfType = getSubscriptionOfType2;
function _isNativeReflectConstruct_29376() { // fn#29376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:276, offset: 0x00fc0fbf, size: 94 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_29376_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_29376_isNativeReflectConstruct = function() {
return !!result;
})();
}
function getUpdatedActiveSubscriptions({activeSubscriptions, record}) { // fn#29379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:549, offset: 0x00fc101d, size: 145 bytes, params: 2, frame: 17
var items2;
const index = activeSubscriptions.findIndex(function({id}) {
return id === record.id;
});
if (index === -1) {
arraySpread([record], activeSubscriptions, 1, undefined);
} else {
items2 = [];
arraySpread(items2, activeSubscriptions, 0, undefined);
if (isPaid(record)) {
if (record.status !== SubscriptionStatusTypes.ENDED) {
items2[index] = record;
function getUpdatedActiveSubscriptions({activeSubscriptions, record}) { // fn#29379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:549, offset: 0x00fc101d, size: 145 bytes, params: 2, frame: 17
var items2;
const index = activeSubscriptions.findIndex(function({id}) {
return id === record.id;
});
if (index === -1) {
arraySpread([record], activeSubscriptions, 1, undefined);
} else {
items2 = [];
arraySpread(items2, activeSubscriptions, 0, undefined);
if (isPaid(record)) {
if (record.status !== SubscriptionStatusTypes.ENDED) {
items2[index] = record;
} else {
items2.splice(index, 1);
}
} else {
items2.splice(index, 1);
}
} else {
items2.splice(index, 1);
}
return items2;
}
return items2;
}
function getSubscriptionOfType(a0, a1) { // fn#29383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:888, offset: 0x00fc111a, size: 118 bytes, params: 3, frame: 23
var propertyName;
var propertyName2;
var property;
var userId;
var getId;
var type;
const value = a2;
const r8 = !(value !== undefined) || value ? env0_11 : env0_10;
if (r8 == null) {
return null;
}
const properties = Object.keys(r8);
const properties2 = 0;
const properties3 = properties.length;
if (properties === undefined) {
return null;
}
let r5 = properties2;
loopExit7: while (true) {
propertyName = properties[r5];
propertyName2 = r5 + 1;
if (propertyName === undefined) {
function getSubscriptionOfType(a0, a1) { // fn#29383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:888, offset: 0x00fc111a, size: 118 bytes, params: 3, frame: 23
var propertyName;
var propertyName2;
var property;
var userId;
var authenticationStoreBinding;
var getId;
var type;
const value = a2;
const r8 = !(value !== undefined) || value ? env0_11 : env0_10;
if (r8 == null) {
return null;
}
property = r8[propertyName];
userId = property.userId;
getId = AuthenticationStore.getId;
if (userId !== Reflect.apply(getId, AuthenticationStore, [])) {
const properties = Object.keys(r8);
const properties2 = 0;
const properties3 = properties.length;
if (properties === undefined) {
return null;
}
type = property.type;
if (type !== a0) {
let r5 = properties2;
loopExit7: while (true) {
propertyName = properties[r5];
propertyName2 = r5 + 1;
if (propertyName === undefined) {
return null;
}
property = r8[propertyName];
userId = property.userId;
authenticationStoreBinding = AuthenticationStore;
getId = authenticationStoreBinding.getId;
if (userId !== Reflect.apply(getId, authenticationStoreBinding, [])) {
return null;
}
type = property.type;
if (type !== a0) {
r5 = propertyName2;
continue;
}
if (a1 == null) {
break loopExit7;
}
if (a1(property)) {
break loopExit7;
}
r5 = propertyName2;
continue;
}
if (a1 == null) {
break loopExit7;
}
if (a1(property)) {
break loopExit7;
}
r5 = propertyName2;
continue;
return property;
}
return property;
}
function _fun29384(a0) { // fn#29384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1085, offset: 0x00fc1190, size: 477 bytes, params: 2, frame: 16
const closure = SubscriptionStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore);
}}, {key: 'hasFetchedSubscriptions', value: value_29387}, {key: 'hasFetchedMostRecentPremiumTypeSubscription',
value: value_29388}, {key: 'hasFetchedPreviousPremiumTypeSubscription', value: value_29389},
{key: 'getPremiumSubscription', value: value_29390}, {key: 'getPremiumTypeSubscription', value: value_29392},
{key: 'getSubscriptions', value: value_29393}, {key: 'getSubscriptionById', value: value_29394},
{key: 'getActiveGuildSubscriptions', value: value_29395}, {key: 'getActiveApplicationSubscriptions',
value: value_29396}, {key: 'getSubscriptionForPlanIds', value: value_29397},
{key: 'getMostRecentPremiumTypeSubscription', value: value_29400}, {key: 'getPreviousPremiumTypeSubscription',
value: value_29401}, {key: 'getIsSubscriptionEligibleForReward', value: value_29402},
{key: 'getIsFetchingSubscriptionRewardEligibility', value: value_29403},
{key: 'getIsFetchingMostRecentSubscription', value: value_29404}, {key: 'getLastLazyPerkSync',
value: value_29405}, {key: 'getPremiumGroupSubscription', value: function() {
var getSubscriptionOfTypeBinding = getSubscriptionOfType;
var PREMIUM = SubscriptionTypes.PREMIUM;
return getSubscriptionOfTypeBinding(PREMIUM, _fun29407, true);
}}]);
}
function BILLING_SUBSCRIPTION_FETCH_SUCCESS({subscriptions, lastLazyPerkSync}) { // fn#29408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:3020, offset: 0x00fc15ab, size: 105 bytes, params: 2, frame: 18
const object = {};
const object2 = {};
const items = [];
const items2 = [];
const env0_4 = AuthenticationStore.getId();
subscriptions.forEach(_fun29409);
}
function BILLING_SUBSCRIPTION_UPDATE_SUCCESS({subscription}) { // fn#29410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:3385, offset: 0x00fc16e0, size: 252 bytes, params: 2, frame: 16
var r0;
var fromServer;
var object2;
const user_id = subscription.user_id;
const getId = AuthenticationStore.getId;
if (user_id === Reflect.apply(getId, AuthenticationStore, [])) {
fromServer = SubscriptionRecord.createFromServer(subscription);
object2 = {};
copyDataProperties(object2, env0_10, undefined);
object2[fromServer.id] = fromServer;
if (isPaid(fromServer)) {
object2 = {};
copyDataProperties(object2, env0_11, undefined);
object2[fromServer.id] = fromServer;
function _fun29384(a0) { // fn#29384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1085, offset: 0x00fc1190, size: 477 bytes, params: 2, frame: 16
const SubscriptionStore2 = SubscriptionStore;
env0_4(SubscriptionStore2, a0);
return CreateClass(SubscriptionStore2, [{key: 'initialize', value: function() {
this.waitFor(AuthenticationStore);
}}, {key: 'hasFetchedSubscriptions', value: value_29387}, {key: 'hasFetchedMostRecentPremiumTypeSubscription',
value: value_29388}, {key: 'hasFetchedPreviousPremiumTypeSubscription', value: value_29389},
{key: 'getPremiumSubscription', value: value_29390}, {key: 'getPremiumTypeSubscription', value: value_29392},
{key: 'getSubscriptions', value: value_29393}, {key: 'getSubscriptionById', value: value_29394},
{key: 'getActiveGuildSubscriptions', value: value_29395}, {key: 'getActiveApplicationSubscriptions',
value: value_29396}, {key: 'getSubscriptionForPlanIds', value: value_29397},
{key: 'getMostRecentPremiumTypeSubscription', value: value_29400}, {key: 'getPreviousPremiumTypeSubscription',
value: value_29401}, {key: 'getIsSubscriptionEligibleForReward', value: value_29402},
{key: 'getIsFetchingSubscriptionRewardEligibility', value: value_29403},
{key: 'getIsFetchingMostRecentSubscription', value: value_29404}, {key: 'getLastLazyPerkSync',
value: value_29405}, {key: 'getPremiumGroupSubscription', value: function() {
var getSubscriptionOfTypeBinding = getSubscriptionOfType;
var PREMIUM = SubscriptionTypes.PREMIUM;
return getSubscriptionOfTypeBinding(PREMIUM, _fun29407, true);
}}]);
function SubscriptionStore() { // fn#29385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1097, offset: 0x00fc136d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, SubscriptionStore);
const value3 = env1_3(SubscriptionStore);
return env1_2(this, _isNativeReflectConstruct_29376() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
r0 = env0_13 != null && fromServer.type === SubscriptionTypes.GUILD;
if (r0) {
env0_13 = getUpdatedActiveSubscriptions({activeSubscriptions: env0_13, record: fromServer});
function value_29387() { // fn#29387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1466, offset: 0x00fc13f7, size: 15 bytes, params: 1, frame: 2
return env1_10 != null;
}
r0 = env0_14 != null && fromServer.type === SubscriptionTypes.APPLICATION;
if (r0) {
env0_13 = getUpdatedActiveSubscriptions({activeSubscriptions: env0_14, record: fromServer});
function value_29388() { // fn#29388, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
}
}
function SubscriptionStore() { // fn#29385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1097, offset: 0x00fc136d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, SubscriptionStore);
const value3 = env1_3(SubscriptionStore);
return env1_2(this, _isNativeReflectConstruct_29376() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_29389() { // fn#29389, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1
return env1_17;
}
function value_29390() { // fn#29390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1686, offset: 0x00fc1406, size: 44 bytes, params: 1, frame: 15
var environment;
let value = a0;
const r4 = !(value !== undefined) || value;
value = environment.__proto__;
const getSubscriptionOfTypeBinding = getSubscriptionOfType;
const PREMIUM = SubscriptionTypes.PREMIUM;
return getSubscriptionOfTypeBinding(PREMIUM, function(a0) {
return !isNoneSubscription(a0.planId);
}, r4);
}
function value_29390() { // fn#29390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1686, offset: 0x00fc1406, size: 44 bytes, params: 1, frame: 15
var environment;
let value = a0;
const r4 = !(value !== undefined) || value;
value = environment.__proto__;
const getSubscriptionOfTypeBinding = getSubscriptionOfType;
const PREMIUM = SubscriptionTypes.PREMIUM;
return getSubscriptionOfTypeBinding(PREMIUM, function(a0) {
return !isNoneSubscription(a0.planId);
}, r4);
}
function value_29392() { // fn#29392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1803, offset: 0x00fc144e, size: 37 bytes, params: 1, frame: 14
let value = a0;
const r3 = !(value !== undefined) || value;
value = environment.__proto__;
const getSubscriptionOfTypeBinding = getSubscriptionOfType;
const PREMIUM = SubscriptionTypes.PREMIUM;
return getSubscriptionOfTypeBinding(PREMIUM, undefined, r3);
}
function value_29392() { // fn#29392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1803, offset: 0x00fc144e, size: 37 bytes, params: 1, frame: 14
let value = a0;
const r3 = !(value !== undefined) || value;
value = environment.__proto__;
const getSubscriptionOfTypeBinding = getSubscriptionOfType;
const PREMIUM = SubscriptionTypes.PREMIUM;
return getSubscriptionOfTypeBinding(PREMIUM, undefined, r3);
}
function value_29393() { // fn#29393, offset: 0x00fc1473, size: 29 bytes, params: 1, frame: 3
let value = a0;
let r0 = !(value !== undefined) || value;
value = environment.__proto__;
r0 = r0 ? env1_11 : env1_10;
return r0;
}
function value_29393() { // fn#29393, offset: 0x00fc1473, size: 29 bytes, params: 1, frame: 3
let value = a0;
let r0 = !(value !== undefined) || value;
value = environment.__proto__;
r0 = r0 ? env1_11 : env1_10;
return r0;
}
function value_29394(a0) { // fn#29394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1962, offset: 0x00fc1490, size: 39 bytes, params: 2, frame: 5
let value = environment.__proto__;
const binding = env1_10;
value = undefined;
return (binding == null ? value : binding[a0]) ?? value;
}
function value_29394(a0) { // fn#29394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:1962, offset: 0x00fc1490, size: 39 bytes, params: 2, frame: 5
let value = environment.__proto__;
const binding = env1_10;
value = undefined;
return (binding == null ? value : binding[a0]) ?? value;
}
function value_29397(a0) { // fn#29397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2205, offset: 0x00fc14b7, size: 128 bytes, params: 2, frame: 14
var environment;
var r0;
var value3;
const value = a1;
const r1 = !(value !== undefined) || value;
const Set = global.Set;
let set = new Set(a0);
set = environment.__proto__;
const r5 = r1 ? env1_11 : env1_10;
set = null;
if (set == r5) {
r0 = set;
} else {
value3 = global.Object.values(r5).find(function({items}) {
return items.some(_fun29399);
});
r0 = set != value3 ? value3 : set;
}
return r0;
}
function value_29395() { // fn#29395, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
function value_29406() { // fn#29406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2808, offset: 0x00fc1570, size: 37 bytes, params: 1, frame: 15
const getSubscriptionOfTypeBinding = getSubscriptionOfType;
const PREMIUM = SubscriptionTypes.PREMIUM;
return getSubscriptionOfTypeBinding(PREMIUM, function(a0) {
return a0.hasAnyPremiumGroup && a0.statusAllowsPerks;
}, true);
}
function value_29396() { // fn#29396, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function _fun29409(a0) { // fn#29409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:3139, offset: 0x00fc1614, size: 204 bytes, params: 2, frame: 14
var r1;
var value2;
var fromServer;
var type;
const user_id = a0.user_id;
if (user_id === env0_4) {
value2 = environment.__proto__;
fromServer = SubscriptionRecord.createFromServer(a0);
env0_0[fromServer.id] = fromServer;
if (isPaid(fromServer)) {
env0_1[fromServer.id] = fromServer;
type = fromServer.type;
r1 = type === SubscriptionTypes.GUILD && fromServer.status !== SubscriptionStatusTypes.ENDED;
if (r1) {
env0_2.push(fromServer);
function value_29397(a0) { // fn#29397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2205, offset: 0x00fc14b7, size: 128 bytes, params: 2, frame: 14
var environment;
var r0;
var value3;
const value = a1;
const r1 = !(value !== undefined) || value;
const Set = global.Set;
let set = new Set(a0);
set = environment.__proto__;
const r5 = r1 ? env1_11 : env1_10;
set = null;
if (set == r5) {
r0 = set;
} else {
value3 = global.Object.values(r5).find(function({items}) {
return items.some(_fun29399);
});
r0 = set != value3 ? value3 : set;
}
type = fromServer.type;
r1 = type === SubscriptionTypes.APPLICATION && fromServer.status !== SubscriptionStatusTypes.ENDED;
if (r1) {
env0_3.push(fromServer);
return r0;
function _fun29398({items}) { // fn#29398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2301, offset: 0x00fc1537, size: 29 bytes, params: 2, frame: 11
return items.some(_fun29399);
function _fun29399({planId}) { // fn#29399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2318, offset: 0x00fc1554, size: 28 bytes, params: 2, frame: 11
return env1_0.has(planId);
}
}
}
function value_29400() { // fn#29400, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_29401() { // fn#29401, offset: 0x00df0e94, size: 9 bytes, params: 1, frame: 1
return env1_16;
}
function value_29402() { // fn#29402, offset: 0x00d406a2, size: 9 bytes, params: 1, frame: 1
return env1_19;
}
function value_29403() { // fn#29403, offset: 0x00df0e82, size: 9 bytes, params: 1, frame: 1
return env1_18;
}
function value_29404() { // fn#29404, offset: 0x00e4253a, size: 9 bytes, params: 1, frame: 1
return env1_20;
}
function value_29405() { // fn#29405, offset: 0x00f854d6, size: 9 bytes, params: 1, frame: 1
return env1_21;
}
function value_29406() { // fn#29406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2808, offset: 0x00fc1570, size: 37 bytes, params: 1, frame: 15
const getSubscriptionOfTypeBinding = getSubscriptionOfType;
const PREMIUM = SubscriptionTypes.PREMIUM;
return getSubscriptionOfTypeBinding(PREMIUM, function(a0) {
return a0.hasAnyPremiumGroup && a0.statusAllowsPerks;
}, true);
}
}
function BILLING_SUBSCRIPTION_FETCH_SUCCESS({subscriptions, lastLazyPerkSync}) { // fn#29408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:3020, offset: 0x00fc15ab, size: 105 bytes, params: 2, frame: 18
const object = {};
const object2 = {};
const items = [];
const items2 = [];
const env0_4 = AuthenticationStore.getId();
subscriptions.forEach(_fun29409);
function _fun29409(a0) { // fn#29409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:3139, offset: 0x00fc1614, size: 204 bytes, params: 2, frame: 14
var r1;
var value2;
var fromServer;
var type;
const user_id = a0.user_id;
if (user_id === env0_4) {
value2 = environment.__proto__;
fromServer = SubscriptionRecord.createFromServer(a0);
ClassCallCheck[fromServer.id] = fromServer;
if (isPaid(fromServer)) {
CreateClass[fromServer.id] = fromServer;
type = fromServer.type;
r1 = type === SubscriptionTypes.GUILD && fromServer.status !== SubscriptionStatusTypes.ENDED;
if (r1) {
PossibleConstructorReturn.push(fromServer);
}
type = fromServer.type;
r1 = type === SubscriptionTypes.APPLICATION && fromServer.status !== SubscriptionStatusTypes.ENDED;
if (r1) {
Module00017.push(fromServer);
}
}
}
}
}
function BILLING_SUBSCRIPTION_UPDATE_SUCCESS({subscription}) { // fn#29410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:3385, offset: 0x00fc16e0, size: 252 bytes, params: 2, frame: 16
var r0;
var fromServer;
var object;
const user_id = subscription.user_id;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
if (user_id === Reflect.apply(getId, authenticationStoreBinding, [])) {
fromServer = SubscriptionRecord.createFromServer(subscription);
object = {};
copyDataProperties(object, env0_10, undefined);
object[fromServer.id] = fromServer;
if (isPaid(fromServer)) {
object = {};
copyDataProperties(object, env0_11, undefined);
object[fromServer.id] = fromServer;
}
r0 = updatedActiveSubscriptions != null && fromServer.type === SubscriptionTypes.GUILD;
if (r0) {
updatedActiveSubscriptions = getUpdatedActiveSubscriptions({activeSubscriptions: updatedActiveSubscriptions,
record: fromServer});
}
r0 = env0_14 != null && fromServer.type === SubscriptionTypes.APPLICATION;
if (r0) {
updatedActiveSubscriptions = getUpdatedActiveSubscriptions({activeSubscriptions: env0_14,
record: fromServer});
}
}
}
}
function _fun29398({items}) { // fn#29398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2301, offset: 0x00fc1537, size: 29 bytes, params: 2, frame: 11
return items.some(_fun29399);
}
function _fun29399({planId}) { // fn#29399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2318, offset: 0x00fc1554, size: 28 bytes, params: 2, frame: 11
return env1_0.has(planId);
function _fun29407(a0) { // fn#29407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3935:2859, offset: 0x00fc1595, size: 22 bytes, params: 2, frame: 3
return a0.hasAnyPremiumGroup && a0.statusAllowsPerks;
}
global.__d(_fun29375, 3808, [6, 7, 15, 17, 18, 3803, 3809, 1226, 661, 566, 694,
2]) /* metro module 3808, dependencies: [6, 7, 15, 17, 18, 3803, 3809, 1226, 661, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff