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

File diff suppressed because it is too large. Load diff
+339 -292
View File
@@ -1,4 +1,15 @@
/* Metro module 4279; source: stores/game_store/SKUStore.tsx; dependencies: [6, 7, 15, 17, 18, 4273, 1949, 4267, 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 LocaleStore from '../../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import DetectableGameStore from '../DetectableGameStore.tsx'; /* Metro dependency 4267 */
import SKURecord from '../../modules/skus/SKURecord.tsx'; /* Metro dependency 4273 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun36274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:6, offset: 0x010875bf, size: 666 bytes, params: 8, frame: 21
const _arrayLikeToArray_36280 = function(a0, a1) {
var r0;
@@ -76,17 +87,9 @@ function _fun36274(global, require, importDefault, importAll, module, exports, d
}
}
};
const closure2 = APPLICATION_STORE_CLEAR_DATA;
const APPLICATION_STORE_CLEAR_DATA2 = APPLICATION_STORE_CLEAR_DATA;
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 skuRecord = importDefault(4273) /* metro dependency 4273: SKURecord */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const detectableGameStore = importDefault(4267) /* metro dependency 4267: DetectableGameStore */;
let Map = global.Map;
const map = new Map();
let Set = global.Set;
@@ -99,7 +102,7 @@ function _fun36274(global, require, importDefault, importAll, module, exports, d
set = new Map();
Map = global.Map;
set = new Map();
const Store = (importAll(566) /* metro dependency 566: flux */).Store;
const Store = (FluxModule).Store;
_fun36290(Store).displayName = 'SKUStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{STORE_LISTINGS_FETCH_START: STORE_LISTINGS_FETCH_START, STORE_LISTINGS_FETCH_FAIL: STORE_LISTINGS_FETCH_FAIL,
@@ -127,312 +130,356 @@ function _fun36274(global, require, importDefault, importAll, module, exports, d
}, SKU_FETCH_START: SKU_FETCH_START, SKU_FETCH_SUCCESS: function({sku}) {
skuFetchSuccess(sku);
}, SKU_FETCH_FAIL: SKU_FETCH_FAIL, SKUS_FETCH_SUCCESS: SKUS_FETCH_SUCCESS,
ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS: closure, APPLICATION_STORE_CLEAR_DATA: closure2,
ENTITLEMENTS_GIFTABLE_FETCH_SUCCESS: closure, APPLICATION_STORE_CLEAR_DATA: APPLICATION_STORE_CLEAR_DATA2,
APPLICATION_SUBSCRIPTIONS_FETCH_ENTITLEMENTS_SUCCESS: closure, ENTITLEMENTS_FETCH_FOR_USER_SUCCESS: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/game_store/SKUStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/game_store/SKUStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_36275() { // fn#36275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:180, offset: 0x01087859, 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_36275_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_36278(a0, a1) { // fn#36278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:373, offset: 0x010878b7, 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_36275() { // fn#36275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:180, offset: 0x01087859, 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 _fun36279;
return (_isNativeReflectConstruct_36275_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_36280(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_36278(a0, a1) { // fn#36278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:373, offset: 0x010878b7, 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 _fun36279;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_36280(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_36280(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_36280(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun36279;
}
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 _fun36279() { // fn#36279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:944, 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]};
}
return _fun36279;
}
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 addSku(a0) { // fn#36281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:1349, offset: 0x01087a29, size: 457 bytes, params: 2, frame: 20
var r5;
var Object;
var length;
var Set;
var value11;
var set2;
const env0_0 = a0;
let binding = env0_12;
const value2 = binding.get(a0.id);
const fromServer = SKURecord.createFromServer(a0);
if (value2 != null) {
r5 = fromServer.price == null && value2.price != null;
if (r5) {
fromServer.price = value2.price;
}
Object = global.Object;
length = Object.keys(fromServer.prices).length;
r5 = length === 0 && global.Object.keys(value2.prices).length > 0;
if (r5) {
fromServer.prices = value2.prices;
}
r5 = fromServer.orbsReward == null && value2.orbsReward != null;
if (r5) {
fromServer.orbsReward = value2.orbsReward;
}
length = fromServer.eligibleOffers.length;
r5 = length === 0 && value2.eligibleOffers.length > 0;
if (r5) {
fromServer.eligibleOffers = value2.eligibleOffers;
}
}
binding = env0_12;
let set = binding.set;
Reflect.apply(set, binding, [a0.id, fromServer]);
env0_10.delete(a0.id);
env0_11.delete(a0.id);
const bundled_sku_ids = a0.bundled_sku_ids;
if (bundled_sku_ids != null) {
bundled_sku_ids.forEach(_fun36282);
function addSku(a0) { // fn#36281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:1349, offset: 0x01087a29, size: 457 bytes, params: 2, frame: 20
var r5;
var Object;
var length;
var Set;
var value11;
var set2;
const env0_0 = a0;
let binding = env0_12;
const value2 = binding.get(a0.id);
const fromServer = SKURecord.createFromServer(a0);
if (value2 != null) {
r5 = fromServer.price == null && value2.price != null;
if (r5) {
fromServer.price = value2.price;
}
Object = global.Object;
length = Object.keys(fromServer.prices).length;
r5 = length === 0 && global.Object.keys(value2.prices).length > 0;
if (r5) {
fromServer.prices = value2.prices;
}
r5 = fromServer.orbsReward == null && value2.orbsReward != null;
if (r5) {
fromServer.orbsReward = value2.orbsReward;
}
length = fromServer.eligibleOffers.length;
r5 = length === 0 && value2.eligibleOffers.length > 0;
if (r5) {
fromServer.eligibleOffers = value2.eligibleOffers;
}
}
binding = env0_12;
let set = binding.set;
Reflect.apply(set, binding, [a0.id, fromServer]);
env0_10.delete(a0.id);
env0_11.delete(a0.id);
const bundled_sku_ids = a0.bundled_sku_ids;
if (bundled_sku_ids != null) {
bundled_sku_ids.forEach(_fun36282);
}
const has = env0_13.has;
let application_id = a0.application_id;
if (!Reflect.apply(has, binding, [application_id])) {
binding = env0_13;
set = binding.set;
application_id = a0.application_id;
Set = global.Set;
value11 = Object.create(Set.prototype, {constructor: {value: Set}});
set2 = new Set();
Reflect.apply(set, binding, [application_id, set2 instanceof Object ? set2 : value11]);
}
const value = env0_13.get(a0.application_id);
value.add(a0.id);
function _fun36282(a0) { // fn#36282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:1857, offset: 0x01087bf2, size: 37 bytes, params: 2, frame: 13
const binding = env1_9;
binding.set(a0, env0_0.id);
}
}
const has = env0_13.has;
let application_id = a0.application_id;
if (!Reflect.apply(has, binding, [application_id])) {
binding = env0_13;
set = binding.set;
application_id = a0.application_id;
function handleStoreListing(a0) { // fn#36284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2007, offset: 0x01087c2a, size: 91 bytes, params: 2, frame: 15
addSku(a0.sku);
if (a0.child_skus != null) {
a0.child_skus.forEach(function(a0) {
addSku(a0);
});
}
if (a0.alternative_skus != null) {
a0.alternative_skus.forEach(function(a0) {
addSku(a0);
});
}
function _fun36285(a0) { // fn#36285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2094, offset: 0x01087c85, size: 19 bytes, params: 2, frame: 11
addSku(a0);
}
function _fun36286(a0) { // fn#36286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2163, offset: 0x01087c85, size: 19 bytes, params: 2, frame: 11
addSku(a0);
}
}
function APPLICATION_STORE_CLEAR_DATA() { // fn#36288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2334, offset: 0x01087cec, size: 189 bytes, params: 1, frame: 11
let Map = global.Map;
const map = new Map();
let Set = global.Set;
let set = new Set();
Set = global.Set;
value11 = Object.create(Set.prototype, {constructor: {value: Set}});
set2 = new Set();
Reflect.apply(set, binding, [application_id, set2 instanceof Object ? set2 : value11]);
set = new Set();
Map = global.Map;
set = new Map();
Map = global.Map;
set = new Map();
Map = global.Map;
set = new Map();
}
const value = env0_13.get(a0.application_id);
value.add(a0.id);
}
function handleStoreListing(a0) { // fn#36284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2007, offset: 0x01087c2a, size: 91 bytes, params: 2, frame: 15
addSku(a0.sku);
if (a0.child_skus != null) {
a0.child_skus.forEach(function(a0) {
addSku(a0);
});
}
if (a0.alternative_skus != null) {
a0.alternative_skus.forEach(function(a0) {
addSku(a0);
});
}
}
function APPLICATION_STORE_CLEAR_DATA() { // fn#36288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2334, offset: 0x01087cec, size: 189 bytes, params: 1, frame: 11
let Map = global.Map;
const map = new Map();
let Set = global.Set;
let set = new Set();
Set = global.Set;
set = new Set();
Map = global.Map;
set = new Map();
Map = global.Map;
set = new Map();
Map = global.Map;
set = new Map();
}
function handleUserSettingsStoreUpdate() { // fn#36289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2421, offset: 0x01087da9, size: 51 bytes, params: 1, frame: 10
const binding = env0_8;
let locale = LocaleStore.locale;
if (binding === locale) {
return false;
}
locale = LocaleStore.locale;
APPLICATION_STORE_CLEAR_DATA();
}
function _fun36290(a0) { // fn#36290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2522, offset: 0x01087ddc, size: 235 bytes, params: 2, frame: 16
const closure = SKUStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: function() {
this.waitFor(LocaleStore, DetectableGameStore);
this.syncWith([LocaleStore], handleUserSettingsStoreUpdate);
env1_8 = LocaleStore.locale;
}}, {key: 'get', value: value_36293}, {key: 'getForApplication', value: value_36294}, {key: 'isFetching',
value: value_36296}, {key: 'getFetchingSkuIds', value: value_36297}, {key: 'getSKUs', value: value_36298},
{key: 'getParentSKU', value: value_36299}, {key: 'didFetchingSkuFail', value: value_36300}]);
}
function STORE_LISTINGS_FETCH_START({skuId}) { // fn#36301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3461, offset: 0x01087ffe, size: 29 bytes, params: 2, frame: 11
env0_10.add(skuId);
}
function STORE_LISTINGS_FETCH_FAIL({skuId}) { // fn#36302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3547, offset: 0x0108801b, size: 43 bytes, params: 2, frame: 12
env0_10.delete(skuId);
env0_11.add(skuId);
}
function SKUS_FETCH_SUCCESS({guildId, skus}) { // fn#36309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:4289, offset: 0x010880ef, size: 137 bytes, params: 2, frame: 17
var environment;
var r3;
var skuFetchSuccessBinding;
var value4;
var value5;
var binding;
var set;
var Set;
var map;
var prototype;
var value6;
var set2;
let value = environment;
const value2 = _createForOfIteratorHelperLoose_36278(skus);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop1: while (true) {
skuFetchSuccessBinding = skuFetchSuccess;
value4 = r3.value;
skuFetchSuccessBinding(value4);
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop1;
}
r3 = value5;
continue reducibleLoop1;
function handleUserSettingsStoreUpdate() { // fn#36289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2421, offset: 0x01087da9, size: 51 bytes, params: 1, frame: 10
const binding = env0_8;
let locale = LocaleStore.locale;
if (binding === locale) {
return false;
}
locale = LocaleStore.locale;
APPLICATION_STORE_CLEAR_DATA();
}
reducibleJoin4: while (true) {
if (guildId == null) {
function _fun36290(a0) { // fn#36290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2522, offset: 0x01087ddc, size: 235 bytes, params: 2, frame: 16
const SKUStore2 = SKUStore;
Inherits(SKUStore2, a0);
return CreateClass(SKUStore2, [{key: 'initialize', value: function() {
this.waitFor(LocaleStore, DetectableGameStore);
this.syncWith([LocaleStore], handleUserSettingsStoreUpdate);
env1_8 = LocaleStore.locale;
}}, {key: 'get', value: value_36293}, {key: 'getForApplication', value: value_36294}, {key: 'isFetching',
value: value_36296}, {key: 'getFetchingSkuIds', value: value_36297}, {key: 'getSKUs', value: value_36298},
{key: 'getParentSKU', value: value_36299}, {key: 'didFetchingSkuFail', value: value_36300}]);
function SKUStore() { // fn#36291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2534, offset: 0x00f81779, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, SKUStore);
const value3 = env1_3(SKUStore);
return env1_2(this, _isNativeReflectConstruct_36275() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_36293(a0) { // fn#36293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2900, offset: 0x01087f0f, size: 22 bytes, params: 2, frame: 11
return env1_12.get(a0);
}
function value_36294(a0) { // fn#36294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2961, offset: 0x01087f25, size: 69 bytes, params: 2, frame: 11
var environment;
var r0;
let value = environment.__proto__;
value = env1_13.get(a0);
if (value == null) {
r0 = [];
} else {
value = global.Array.from(value);
value = value.map(_fun36295);
r0 = value;
}
return r0;
function _fun36295(a0) { // fn#36295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3025, offset: 0x01087f6a, size: 22 bytes, params: 2, frame: 11
return env2_12.get(a0);
}
}
function value_36296(a0) { // fn#36296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3065, offset: 0x01087f80, size: 22 bytes, params: 2, frame: 11
return env1_10.has(a0);
}
function value_36297() { // fn#36297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3126, offset: 0x01087f96, size: 31 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = env1_10.keys();
const items2 = [];
arraySpread(items2, value, 0, undefined);
return items2;
}
function value_36298() { // fn#36298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3180, offset: 0x01087fb5, size: 28 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.fromEntries(env1_12);
}
function value_36299(a0) { // fn#36299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3248, offset: 0x01087fd1, size: 45 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = env1_9.get(a0);
if (value != null) {
return this.get(value);
}
}
function value_36300(a0) { // fn#36300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3339, offset: 0x00f82460, size: 22 bytes, params: 2, frame: 11
return env1_11.has(a0);
}
}
function STORE_LISTINGS_FETCH_START({skuId}) { // fn#36301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3461, offset: 0x01087ffe, size: 29 bytes, params: 2, frame: 11
env0_10.add(skuId);
}
function STORE_LISTINGS_FETCH_FAIL({skuId}) { // fn#36302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3547, offset: 0x0108801b, size: 43 bytes, params: 2, frame: 12
env0_10.delete(skuId);
env0_11.add(skuId);
}
function SKU_FETCH_START({skuId}) { // fn#36306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:4066, offset: 0x01087ffe, size: 29 bytes, params: 2, frame: 11
env0_10.add(skuId);
}
function SKU_FETCH_FAIL({skuId}) { // fn#36308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:4209, offset: 0x0108801b, size: 43 bytes, params: 2, frame: 12
env0_10.delete(skuId);
env0_11.add(skuId);
}
function SKUS_FETCH_SUCCESS({guildId, skus}) { // fn#36309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:4289, offset: 0x010880ef, size: 137 bytes, params: 2, frame: 17
var environment;
var r3;
var skuFetchSuccessBinding;
var value4;
var value5;
var binding;
var set;
var Set;
var map;
var prototype;
var value6;
var set2;
let value = environment;
const value2 = _createForOfIteratorHelperLoose_36278(skus);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop1: while (true) {
skuFetchSuccessBinding = skuFetchSuccess;
value4 = r3.value;
skuFetchSuccessBinding(value4);
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop1;
}
r3 = value5;
continue reducibleLoop1;
}
}
reducibleJoin4: while (true) {
if (guildId == null) {
break reducibleJoin4;
}
binding = env0_14;
set = binding.set;
Set = global.Set;
map = skus.map;
value = Reflect.apply(map, skus, [function(a0) {
return a0.id;
}]);
prototype = Set.prototype;
value6 = Object.create(prototype, {constructor: {value: Set}});
set2 = new Set(value);
value = set2 instanceof Object ? set2 : value6;
Reflect.apply(set, binding, [guildId, value]);
break reducibleJoin4;
}
binding = env0_14;
set = binding.set;
Set = global.Set;
map = skus.map;
value = Reflect.apply(map, skus, [function(a0) {
return a0.id;
}]);
prototype = Set.prototype;
value6 = Object.create(prototype, {constructor: {value: Set}});
set2 = new Set(value);
value = set2 instanceof Object ? set2 : value6;
Reflect.apply(set, binding, [guildId, value]);
break reducibleJoin4;
}
}
function _fun36282(a0) { // fn#36282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:1857, offset: 0x01087bf2, size: 37 bytes, params: 2, frame: 13
const binding = env1_9;
binding.set(a0, env0_0.id);
}
function value_36294(a0) { // fn#36294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:2961, offset: 0x01087f25, size: 69 bytes, params: 2, frame: 11
var environment;
var r0;
let value = environment.__proto__;
value = env1_13.get(a0);
if (value == null) {
r0 = [];
} else {
value = global.Array.from(value);
value = value.map(_fun36295);
r0 = value;
}
return r0;
}
function value_36297() { // fn#36297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3126, offset: 0x01087f96, size: 31 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = env1_10.keys();
const items2 = [];
arraySpread(items2, value, 0, undefined);
return items2;
}
function value_36298() { // fn#36298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3180, offset: 0x01087fb5, size: 28 bytes, params: 1, frame: 11
const Object = global.Object;
return Object.fromEntries(env1_12);
}
function value_36299(a0) { // fn#36299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3248, offset: 0x01087fd1, size: 45 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = env1_9.get(a0);
if (value != null) {
return this.get(value);
}
}
function _fun36295(a0) { // fn#36295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4451:3025, offset: 0x01087f6a, size: 22 bytes, params: 2, frame: 11
return env2_12.get(a0);
}
global.__d(_fun36274, 4279, [6, 7, 15, 17, 18, 4273, 1949, 4267, 566, 694,
2]) /* metro module 4279, dependencies: [6, 7, 15, 17, 18, 4273, 1949, 4267, 566, 694, 2] */;
+216 -185
View File
@@ -1,4 +1,14 @@
/* Metro module 13046; source: stores/game_store/StoreListingStore.tsx; dependencies: [6, 7, 15, 17, 18, 1949, 13047, 1360, 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 LocaleStore from '../../modules/user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import StoreListingRecord from '../../records/StoreListingRecord.tsx'; /* Metro dependency 13047 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun99618(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:6, offset: 0x021cf457, size: 483 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_99624 = function(a0, a1) {
@@ -55,23 +65,16 @@ function _fun99618(global, require, importDefault, importAll, module, exports, d
var Set = global.Set;
var value3 = new Set();
};
const closure2 = USER_SETTINGS_PROTO_UPDATE_99628;
const USER_SETTINGS_PROTO_UPDATE_996282 = USER_SETTINGS_PROTO_UPDATE_99628;
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 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const storeListingRecord = importDefault(13047) /* metro dependency 13047: StoreListingRecord */;
let env0_10 = {};
let env0_11 = {};
let env0_12 = {};
let env0_13 = {};
let Set = global.Set;
let set = new Set();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun99629(Store).displayName = 'StoreListingStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{STORE_LISTINGS_FETCH_START: STORE_LISTINGS_FETCH_START_99639,
@@ -90,208 +93,234 @@ function _fun99618(global, require, importDefault, importAll, module, exports, d
}
}
}
}, STORE_LISTING_FETCH_SUCCESS: STORE_LISTING_FETCH_SUCCESS_99642, USER_SETTINGS_PROTO_UPDATE: closure2,
APPLICATION_STORE_CLEAR_DATA: closure, GIFT_CODE_RESOLVE_SUCCESS: function({giftCode}) {
}, STORE_LISTING_FETCH_SUCCESS: STORE_LISTING_FETCH_SUCCESS_99642,
USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_996282, APPLICATION_STORE_CLEAR_DATA: closure,
GIFT_CODE_RESOLVE_SUCCESS: function({giftCode}) {
if (giftCode.store_listing == null) {
return false;
}
addRegularStoreListing(giftCode.store_listing);
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/game_store/StoreListingStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('stores/game_store/StoreListingStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_99619() { // fn#99619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:170, offset: 0x021cf63a, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_99619_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_99622(a0, a1) { // fn#99622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:363, offset: 0x021cf69c, size: 372 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_99619() { // fn#99619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:170, offset: 0x021cf63a, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return _fun99623;
return (_isNativeReflectConstruct_99619_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_99624(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_99622(a0, a1) { // fn#99622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:363, offset: 0x021cf69c, size: 372 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 _fun99623;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_99624(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_99624(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_99624(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun99623;
}
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 addRegularStoreListing(a0) { // fn#99625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:1309, offset: 0x021cf810, size: 208 bytes, params: 2, frame: 17
var binding;
var Set;
var value4;
var set;
let id = a0.id;
const id2 = a0.sku.id;
const property = env0_10[id];
const fromServer = StoreListingRecord.createFromServer(a0);
if (!(property != null && !property.isSlimDirectoryVersion() && fromServer.isSlimDirectoryVersion())) {
if (a0.published === false) {
if (env0_12[id2] == null) {
binding = env0_12;
Set = global.Set;
value4 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
binding[id2] = set instanceof Object ? set : value4;
}
env0_12[id2].add(id);
} else {
env0_13[id2] = id;
r5 = value;
}
env0_10[id] = fromServer;
binding = env0_14;
id = a0.sku.id;
binding.delete(id);
if (r5) {
if (r5) {
}
return _fun99623;
}
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 _fun99623() { // fn#99623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:934, 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]};
}
}
}
function USER_SETTINGS_PROTO_UPDATE_99628() { // fn#99628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:1666, offset: 0x021cf91f, size: 51 bytes, params: 1, frame: 10
const binding = env0_9;
let locale = LocaleStore.locale;
if (binding === locale) {
return false;
function addRegularStoreListing(a0) { // fn#99625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:1309, offset: 0x021cf810, size: 208 bytes, params: 2, frame: 17
var binding;
var Set;
var value4;
var set;
let id = a0.id;
const id2 = a0.sku.id;
const property = env0_10[id];
const fromServer = StoreListingRecord.createFromServer(a0);
if (!(property != null && !property.isSlimDirectoryVersion() && fromServer.isSlimDirectoryVersion())) {
if (a0.published === false) {
if (env0_12[id2] == null) {
binding = env0_12;
Set = global.Set;
value4 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
binding[id2] = set instanceof Object ? set : value4;
}
env0_12[id2].add(id);
} else {
env0_13[id2] = id;
}
env0_10[id] = fromServer;
binding = env0_14;
id = a0.sku.id;
binding.delete(id);
}
}
APPLICATION_STORE_CLEAR_DATA_99627();
locale = LocaleStore.locale;
}
function _fun99629(a0) { // fn#99629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:1767, offset: 0x021cf952, size: 228 bytes, params: 2, frame: 16
const closure = StoreListingStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(LocaleStore);
this.syncWith([LocaleStore], USER_SETTINGS_PROTO_UPDATE_99628);
env1_9 = LocaleStore.locale;
}}, {key: 'get', value: value_99632}, {key: 'getForSKU', value: value_99633}, {key: 'getUnpublishedForSKU',
value: value_99634}, {key: 'getForChannel', value: value_99636}, {key: 'isFetchingForSKU', value: value_99637},
{key: 'getStoreListing', value: value_99638}]);
}
function STORE_LISTINGS_FETCH_START_99639({skuId}) { // fn#99639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:3065, offset: 0x021cfbea, size: 29 bytes, params: 2, frame: 11
env0_14.add(skuId);
}
function STORE_LISTINGS_FETCH_FAIL_99640({skuId}) { // fn#99640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:3151, offset: 0x021cfc07, size: 29 bytes, params: 2, frame: 11
env0_14.delete(skuId);
}
function STORE_LISTING_FETCH_SUCCESS_99642({storeListing, channelId}) { // fn#99642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:3420, offset: 0x021cfc66, size: 101 bytes, params: 2, frame: 16
var fromServer;
var binding;
var getChannelSkuComboIdBinding;
var skuId;
if (channelId != null) {
fromServer = StoreListingRecord.createFromServer(storeListing);
binding = env0_11;
getChannelSkuComboIdBinding = getChannelSkuComboId;
skuId = fromServer.skuId;
binding[getChannelSkuComboIdBinding(channelId, skuId)] = fromServer;
binding = env0_13;
skuId = fromServer.skuId;
binding[skuId] = fromServer.id;
} else {
addRegularStoreListing(storeListing);
function USER_SETTINGS_PROTO_UPDATE_99628() { // fn#99628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:1666, offset: 0x021cf91f, size: 51 bytes, params: 1, frame: 10
const binding = env0_9;
let locale = LocaleStore.locale;
if (binding === locale) {
return false;
}
APPLICATION_STORE_CLEAR_DATA_99627();
locale = LocaleStore.locale;
}
}
function value_99633(a0, a1) { // fn#99633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2237, offset: 0x021cfa79, size: 64 bytes, params: 3, frame: 15
const property = env1_13[a0];
const value2 = null;
return value2 != a1 ? env1_11[getChannelSkuComboId(a1, a0)] : value2 != property ? env1_10[property] : value2;
}
function _fun99629(a0) { // fn#99629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:1767, offset: 0x021cf952, size: 228 bytes, params: 2, frame: 16
const StoreListingStore2 = StoreListingStore;
Inherits(StoreListingStore2, a0);
return CreateClass(StoreListingStore2, [{key: 'initialize', value: function() {
this.waitFor(LocaleStore);
this.syncWith([LocaleStore], USER_SETTINGS_PROTO_UPDATE_99628);
env1_9 = LocaleStore.locale;
}}, {key: 'get', value: value_99632}, {key: 'getForSKU', value: value_99633}, {key: 'getUnpublishedForSKU',
value: value_99634}, {key: 'getForChannel', value: value_99636}, {key: 'isFetchingForSKU', value: value_99637},
{key: 'getStoreListing', value: value_99638}]);
function StoreListingStore() { // fn#99630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:1779, offset: 0x00e474d4, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, StoreListingStore);
const value3 = env1_5(StoreListingStore);
return env1_4(this, _isNativeReflectConstruct_99619() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_99632(a0) { // fn#99632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2188, offset: 0x010353e1, size: 16 bytes, params: 2, frame: 2
return env1_10[a0];
}
function value_99633(a0, a1) { // fn#99633, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2237, offset: 0x021cfa79, size: 64 bytes, params: 3, frame: 15
const property = env1_13[a0];
const value2 = null;
return value2 != a1 ? env1_11[getChannelSkuComboId(a1, a0)] : value2 != property ? env1_10[property] : value2;
}
function value_99634(a0) { // fn#99634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2360, offset: 0x021cfab9, size: 103 bytes, params: 2, frame: 13
var environment;
var r0;
var value3;
const value = environment.__proto__;
const property = env1_12[a0];
if (property == null) {
r0 = [];
} else {
value3 = global.Array.from(property).map(_fun99635);
r0 = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
return r0;
function _fun99635(a0) { // fn#99635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2420, offset: 0x01356b1e, size: 16 bytes, params: 2, frame: 2
return env2_10[a0];
}
}
function value_99636(a0, a1) { // fn#99636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2489, offset: 0x021cfb20, size: 31 bytes, params: 3, frame: 14
return env1_11[getChannelSkuComboId(a0, a1)];
}
function value_99637(a0) { // fn#99637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2571, offset: 0x011578f1, size: 22 bytes, params: 2, frame: 11
return env1_14.has(a0);
}
function value_99634(a0) { // fn#99634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2360, offset: 0x021cfab9, size: 103 bytes, params: 2, frame: 13
var environment;
var r0;
var value3;
const value = environment.__proto__;
const property = env1_12[a0];
if (property == null) {
r0 = [];
} else {
value3 = global.Array.from(property).map(_fun99635);
r0 = value3.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
}
return r0;
}
function value_99636(a0, a1) { // fn#99636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2489, offset: 0x021cfb20, size: 31 bytes, params: 3, frame: 14
return env1_11[getChannelSkuComboId(a0, a1)];
function STORE_LISTINGS_FETCH_START_99639({skuId}) { // fn#99639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:3065, offset: 0x021cfbea, size: 29 bytes, params: 2, frame: 11
env0_14.add(skuId);
}
function STORE_LISTINGS_FETCH_FAIL_99640({skuId}) { // fn#99640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:3151, offset: 0x021cfc07, size: 29 bytes, params: 2, frame: 11
env0_14.delete(skuId);
}
function STORE_LISTING_FETCH_SUCCESS_99642({storeListing, channelId}) { // fn#99642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:3420, offset: 0x021cfc66, size: 101 bytes, params: 2, frame: 16
var fromServer;
var binding;
var getChannelSkuComboIdBinding;
var skuId;
if (channelId != null) {
fromServer = StoreListingRecord.createFromServer(storeListing);
binding = env0_11;
getChannelSkuComboIdBinding = getChannelSkuComboId;
skuId = fromServer.skuId;
binding[getChannelSkuComboIdBinding(channelId, skuId)] = fromServer;
binding = env0_13;
skuId = fromServer.skuId;
binding[skuId] = fromServer.id;
} else {
addRegularStoreListing(storeListing);
}
}
}
function value_99638(a0) { // fn#99638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13236:2630, offset: 0x021cfb3f, size: 171 bytes, params: 2, frame: 18
@@ -346,3 +375,5 @@ function value_99638(a0) { // fn#99638, source: /ci/build/discord/discord/discor
return value != skuId ? this.getForSKU(skuId) : value;
}
global.__d(_fun99618, 13046, [6, 7, 15, 17, 18, 1949, 13047, 1360, 566, 694,
2]) /* metro module 13046, dependencies: [6, 7, 15, 17, 18, 1949, 13047, 1360, 566, 694, 2] */;
+174 -130
View File
@@ -1,24 +1,28 @@
/* Metro module 7505; source: stores/game_store/TestModeStore.tsx; dependencies: [6, 7, 15, 17, 18, 1311, 1348, 4270, 3829, 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 SelectivelySyncedUserSettingsStore from '../../modules/user_settings/SelectivelySyncedUserSettingsStore.tsx'; /* Metro dependency 1311 */
import UserSettingsProtoStore from '../../modules/user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import LibraryApplicationStore from '../LibraryApplicationStore.tsx'; /* Metro dependency 4270 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UserSettingsModule from '../../modules/user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
function _fun60513(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:6, offset: 0x01704e23, size: 446 bytes, params: 8, frame: 22
const env0_0 = require;
const closure = function() {
env0_12 = null;
};
const closure2 = LOGOUT_60518;
const LOGOUT_605182 = LOGOUT_60518;
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 */;
const selectivelySyncedUserSettingsStore = importDefault(1311) /* metro dependency 1311: SelectivelySyncedUserSettingsStore */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const libraryApplicationStore = importDefault(4270) /* metro dependency 4270: LibraryApplicationStore */;
object = {'applicationId': null, 'originURL': null};
const Set = global.Set;
let set = new Set();
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
set = _fun60519(PersistedStore);
set.displayName = 'TestModeStore';
set.persistKey = 'TestModeStore';
@@ -28,129 +32,169 @@ function _fun60513(global, require, importDefault, importAll, module, exports, d
DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL: DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL,
OVERLAY_INITIALIZE: function(a0) {
env0_10 = a0.testModeApplicationId;
}, DEVELOPER_TEST_MODE_RESET_ERROR: closure, LOGOUT: closure2, DEVELOPER_TEST_MODE_RESET: closure2});
(require(2) /* metro dependency 2 */).fileFinishedImporting('stores/game_store/TestModeStore.tsx');
}, DEVELOPER_TEST_MODE_RESET_ERROR: closure, LOGOUT: LOGOUT_605182, DEVELOPER_TEST_MODE_RESET: LOGOUT_605182});
(FileImportTrackerModule).fileFinishedImporting('stores/game_store/TestModeStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_60514() { // fn#60514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:178, offset: 0x01704fe1, 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_60514() { // fn#60514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:178, offset: 0x01704fe1, 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_60514_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_60514_isNativeReflectConstruct = function() {
return !!result;
})();
}
function DEVELOPER_TEST_MODE_RESET_60518() { // fn#60518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:467, offset: 0x0170504c, size: 77 bytes, params: 1, frame: 11
const Set = global.Set;
const set = new Set();
env0_14.applicationId = null;
env0_14.originURL = null;
DEVELOPER_TEST_MODE_RESET_ERROR();
}
function _fun60519(a0) { // fn#60519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:565, offset: 0x01705099, size: 360 bytes, params: 2, frame: 16
const closure = TestModeStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: value_60521}, {key: 'getTestModeApplicationId',
value: value_60524}, {key: 'inTestModeForApplication', value: value_60525},
{key: 'inTestModeForEmbeddedApplication', value: value_60526}, {key: 'shouldDisplayTestMode',
value: value_60527}, {key: 'getState', value: value_60528}, {key: 'isTestMode', get: get_60529},
{key: 'isFetchingAuthorization', get: get_60530}, {key: 'testModeEmbeddedApplicationId', get: get_60531},
{key: 'testModeApplicationId', get: get_60532}, {key: 'testModeOriginURL', get: get_60533}, {key: 'error',
get: get_60534}, {key: 'whenInitialized', value: function(a0) {
var env0_0 = a0;
this.addConditionalChangeListener(_fun60536);
}}]);
}
function DEVELOPER_TEST_MODE_AUTHORIZATION_START({applicationId}) { // fn#60537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1983, offset: 0x01705375, size: 35 bytes, params: 2, frame: 12
env0_15.add(applicationId);
}
function DEVELOPER_TEST_MODE_AUTHORIZATION_SUCCESS({applicationId, originURL}) { // fn#60538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:2112, offset: 0x01705398, size: 69 bytes, params: 2, frame: 13
env0_15.delete(applicationId);
env0_14.applicationId = applicationId;
env0_14.originURL = originURL;
}
function DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL({applicationId, error}) { // fn#60539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:2295, offset: 0x017053dd, size: 38 bytes, params: 2, frame: 13
env0_15.delete(applicationId);
}
function value_60521(a0) { // fn#60521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:860, offset: 0x01705201, size: 139 bytes, params: 2, frame: 17
var environment;
let value = a0;
const object2 = {};
copyDataProperties(object2, value ?? env1_13, undefined);
value = environment.__proto__;
env1_14 = object2;
env1_10 = object2.applicationId;
env1_11 = env1_14.originURL;
this.waitFor(LibraryApplicationStore, SelectivelySyncedUserSettingsStore, UserSettingsProtoStore);
this.syncWith([UserSettingsProtoStore, SelectivelySyncedUserSettingsStore], function() {
return true;
});
LibraryApplicationStore.whenInitialized(function() {
env2_16 = true;
});
}
function value_60525(a0) { // fn#60525, offset: 0x01705299, size: 16 bytes, params: 2, frame: 2
return env1_10 === a0;
}
function value_60526(a0) { // fn#60526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1178, offset: 0x017052a9, size: 29 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_10 === a0 && env1_11 != null;
}
function value_60527(a0) { // fn#60527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1249, offset: 0x017052c6, size: 63 bytes, params: 2, frame: 12
const value = environment.__proto__;
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
return DeveloperMode.getSetting() && this.inTestModeForApplication(a0);
}
function get_60530() { // fn#60530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1468, offset: 0x01705305, size: 20 bytes, params: 1, frame: 2
return env1_15.size > 0;
}
function get_60531() { // fn#60531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1538, offset: 0x01705319, size: 22 bytes, params: 1, frame: 3
const value2 = null;
return value2 != env1_11 ? env1_10 : value2;
}
function value_60535(a0) { // fn#60535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1747, offset: 0x0170532f, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
this.addConditionalChangeListener(_fun60536);
}
function _fun60536() { // fn#60536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1794, offset: 0x0170534f, size: 38 bytes, params: 1, frame: 11
if (env2_16) {
global.setImmediate(env0_0);
return false;
function DEVELOPER_TEST_MODE_RESET_60518() { // fn#60518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:467, offset: 0x0170504c, size: 77 bytes, params: 1, frame: 11
const Set = global.Set;
const set = new Set();
env0_14.applicationId = null;
env0_14.originURL = null;
DEVELOPER_TEST_MODE_RESET_ERROR();
}
function _fun60519(a0) { // fn#60519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:565, offset: 0x01705099, size: 360 bytes, params: 2, frame: 16
const TestModeStore2 = TestModeStore;
Inherits(TestModeStore2, a0);
return CreateClass(TestModeStore2, [{key: 'initialize', value: value_60521}, {key: 'getTestModeApplicationId',
value: value_60524}, {key: 'inTestModeForApplication', value: value_60525},
{key: 'inTestModeForEmbeddedApplication', value: value_60526}, {key: 'shouldDisplayTestMode',
value: value_60527}, {key: 'getState', value: value_60528}, {key: 'isTestMode', get: get_60529},
{key: 'isFetchingAuthorization', get: get_60530}, {key: 'testModeEmbeddedApplicationId', get: get_60531},
{key: 'testModeApplicationId', get: get_60532}, {key: 'testModeOriginURL', get: get_60533}, {key: 'error',
get: get_60534}, {key: 'whenInitialized', value: function(a0) {
var env0_0 = a0;
this.addConditionalChangeListener(_fun60536);
}}]);
function TestModeStore() { // fn#60520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:577, offset: 0x010992b7, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, TestModeStore);
const value3 = env1_5(TestModeStore);
return env1_4(this, _isNativeReflectConstruct_60514() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_60521(a0) { // fn#60521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:860, offset: 0x01705201, size: 139 bytes, params: 2, frame: 17
var object3;
var environment;
let value = a0;
const object = {};
copyDataProperties(object, value ?? env1_13, undefined);
value = environment.__proto__;
object3 = object;
env1_10 = object.applicationId;
env1_11 = object3.originURL;
const waitFor = this.waitFor;
const libraryApplicationStoreBinding = LibraryApplicationStore;
const selectivelySyncedUserSettingsStoreBinding = SelectivelySyncedUserSettingsStore;
const userSettingsProtoStoreBinding = UserSettingsProtoStore;
Reflect.apply(waitFor, this, [libraryApplicationStoreBinding, selectivelySyncedUserSettingsStoreBinding,
userSettingsProtoStoreBinding]);
this.syncWith([userSettingsProtoStoreBinding, selectivelySyncedUserSettingsStoreBinding], function() {
return true;
});
libraryApplicationStoreBinding.whenInitialized(function() {
env2_16 = true;
});
}
function value_60524() { // fn#60524, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function value_60525(a0) { // fn#60525, offset: 0x01705299, size: 16 bytes, params: 2, frame: 2
return env1_10 === a0;
}
function value_60526(a0) { // fn#60526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1178, offset: 0x017052a9, size: 29 bytes, params: 2, frame: 3
const value = environment.__proto__;
return env1_10 === a0 && env1_11 != null;
}
function value_60527(a0) { // fn#60527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1249, offset: 0x017052c6, size: 63 bytes, params: 2, frame: 12
const value = environment.__proto__;
const DeveloperMode = (UserSettingsModule).DeveloperMode;
return DeveloperMode.getSetting() && this.inTestModeForApplication(a0);
}
function value_60528() { // fn#60528, offset: 0x00df0f5a, size: 9 bytes, params: 1, frame: 1
return env1_14;
}
function get_60529() { // fn#60529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1405, offset: 0x00fc13f7, size: 15 bytes, params: 1, frame: 2
return env1_10 != null;
}
function get_60530() { // fn#60530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1468, offset: 0x01705305, size: 20 bytes, params: 1, frame: 2
return env1_15.size > 0;
}
function get_60531() { // fn#60531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1538, offset: 0x01705319, size: 22 bytes, params: 1, frame: 3
const value2 = null;
return value2 != env1_11 ? env1_10 : value2;
}
function get_60532() { // fn#60532, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function get_60533() { // fn#60533, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function get_60534() { // fn#60534, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_60535(a0) { // fn#60535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1747, offset: 0x0170532f, size: 32 bytes, params: 2, frame: 11
const env0_0 = a0;
this.addConditionalChangeListener(_fun60536);
function _fun60536() { // fn#60536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1794, offset: 0x0170534f, size: 38 bytes, params: 1, frame: 11
if (env2_16) {
global.setImmediate(env0_0);
return false;
}
}
}
}
function DEVELOPER_TEST_MODE_AUTHORIZATION_START({applicationId}) { // fn#60537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:1983, offset: 0x01705375, size: 35 bytes, params: 2, frame: 12
env0_15.add(applicationId);
}
function DEVELOPER_TEST_MODE_AUTHORIZATION_SUCCESS({applicationId, originURL}) { // fn#60538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:2112, offset: 0x01705398, size: 69 bytes, params: 2, frame: 13
env0_15.delete(applicationId);
env0_14.applicationId = applicationId;
env0_14.originURL = originURL;
}
function DEVELOPER_TEST_MODE_AUTHORIZATION_FAIL({applicationId, error}) { // fn#60539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7683:2295, offset: 0x017053dd, size: 38 bytes, params: 2, frame: 13
env0_15.delete(applicationId);
}
}
global.__d(_fun60513, 7505, [6, 7, 15, 17, 18, 1311, 1348, 4270, 3829, 566, 694,
2]) /* metro module 7505, dependencies: [6, 7, 15, 17, 18, 1311, 1348, 4270, 3829, 566, 694, 2] */;