Files
discord-decomp/sources/modules/billing/native/GenericIAPStore.tsx
T
2026-07-27 16:20:00 +03:00

86 lines
3.9 KiB
TypeScript

/* Metro module 5142; source: modules/billing/native/GenericIAPStore.tsx; dependencies: [6, 7, 15, 17, 18, 22, 5143, 566, 694, 2] */
function _fun45368(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:6, offset: 0x0118cbbf, size: 337 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun45372(Store);
value.displayName = 'GenericIAPStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{IAP_LOAD_GENERIC_PRODUCTS: function({products, storeFront}) {
env0_8 = products;
env0_10 = storeFront;
}, GENERIC_IAP_INIT_CONNECTION: function(a0) {
env0_9 = a0.connected;
}, GENERIC_IAP_INIT_CONNECTION_FAILED: function() {
env0_9 = false;
}, GENERIC_IAP_END_CONNECTION: function() {
env0_9 = false;
}, GENERIC_IAP_SET_STORE_FRONT: function(a0) {
env0_10 = a0.storeFront;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/billing/native/GenericIAPStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_45369() { // fn#45369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:148, offset: 0x0118cd10, 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_45369_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun45372(a0) { // fn#45372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:370, offset: 0x0118cd6e, size: 143 bytes, params: 2, frame: 16
const closure = GenericIAPStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'isGenericIapConnected', value: value_45374}, {key: 'genericProductsLoaded',
value: value_45375}, {key: 'getProducts', value: value_45377}, {key: 'getStoreFront', value: value_45378}]);
}
function value_45375() { // fn#45375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5320:743, offset: 0x0118cdfd, size: 98 bytes, params: 1, frame: 17
var environment;
var r0;
var defaultImport;
const value = environment.__proto__;
const value2 = env1_8 != null;
if (value2) {
defaultImport = importDefault(22) /* metro dependency 22 */;
r0 = defaultImport.filter(env1_8, function(a0) {
var GenericProductIds = require(dependencyMap[6]).GenericProductIds;
return GenericProductIds.includes(a0.identifier);
}).length === (require(5143) /* metro dependency 5143: ProductIdsAndroid */).GenericProductIds.length;
} else {
r0 = value2;
}
return r0;
}