Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,73 @@
|
||||
/* Metro module 10024; source: modules/wishlists/CollectiblesWishlistUtils.tsx; dependencies: [10025, 1904, 1244, 5134, 7630, 2] */
|
||||
function _fun78295(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10210:6, offset: 0x01e24948, size: 156 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(10025) /* metro dependency 10025: CollectiblesWishlistItemRecord */).isCollectiblesWishlistItemRecord;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/CollectiblesWishlistUtils.tsx');
|
||||
exports.getProductNameAndTypeFromSku = getProductNameAndTypeFromSku;
|
||||
exports.getProductNameAndTypeFromItem = function(a0) {
|
||||
var isCollectiblesWishlistItemRecordBinding = isCollectiblesWishlistItemRecord;
|
||||
var value2 = undefined;
|
||||
return formatProductNameAndType(a0.skuName,
|
||||
isCollectiblesWishlistItemRecordBinding(a0) ? a0.collectiblesItem == null ? value2 : a0.collectiblesItem.type : value2);
|
||||
};
|
||||
exports.isWishlistableCollectiblesProduct = isWishlistableCollectiblesProduct;
|
||||
}
|
||||
|
||||
function formatProductNameAndType(a0, a1) { // fn#78296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10210:139, offset: 0x01e249e4, size: 313 bytes, params: 3, frame: 17
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
|
||||
if (AVATAR_DECORATION === a1) {
|
||||
return intl.formatToPlainString(t.lvBzLi, {product: a0});
|
||||
}
|
||||
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
|
||||
if (PROFILE_EFFECT === a1) {
|
||||
return intl.formatToPlainString(t.eR7moP, {product: a0});
|
||||
}
|
||||
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
|
||||
if (NAMEPLATE === a1) {
|
||||
return intl.formatToPlainString(t.YFOwHj, {product: a0});
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
function getProductNameAndTypeFromSku({name, tenantMetadata}) { // fn#78297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10210:673, offset: 0x01e24b1d, size: 62 bytes, params: 2, frame: 16
|
||||
return formatProductNameAndType(name,
|
||||
tenantMetadata == null || tenantMetadata.collectibles == null ? undefined : tenantMetadata.collectibles.type);
|
||||
}
|
||||
|
||||
function isWishlistableCollectiblesProduct(a0) { // fn#78299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10210:1047, offset: 0x01e24b9c, size: 179 bytes, params: 2, frame: 16
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
var value3;
|
||||
var value4;
|
||||
var value;
|
||||
const isPremiumCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(a0);
|
||||
if (isPremiumCollectiblesProduct2) {
|
||||
r0 = !isPremiumCollectiblesProduct2;
|
||||
} else {
|
||||
value3 = a0.type !== CollectiblesItemType.EXTERNAL_SKU;
|
||||
if (value3) {
|
||||
value4 = a0.type === CollectiblesItemType.PROFILE_FRAME;
|
||||
if (value4) {
|
||||
value = require(7630) /* metro dependency 7630: CollectiblesProfileFrameGiftingExperiment */;
|
||||
value = !value.getIsProfileFrameGiftingEnabled('isWishlistableCollectiblesProduct');
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = value4;
|
||||
}
|
||||
value = !r2;
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
/* Metro module 10374; source: modules/wishlists/SentGiftsStore.tsx; dependencies: [57, 6, 7, 15, 17, 18, 566, 694, 2] */
|
||||
function _fun80382(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10560:6, offset: 0x01e78d55, size: 313 bytes, params: 8, frame: 18
|
||||
const getSentGiftKey = function(a0, a1) {
|
||||
return '' + a0 + ':' + a1;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_1 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_2 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_3 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_4 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_5 = importDefault(18) /* metro dependency 18 */;
|
||||
object = {sentGifts: {}};
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
let value = _fun80387(PersistedStore);
|
||||
value.displayName = 'SentGiftsStore';
|
||||
value.persistKey = 'SentGiftsStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{WISHLIST_GIFT_SENT: WISHLIST_GIFT_SENT});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/SentGiftsStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_80383() { // fn#80383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10560:158, offset: 0x01e78e8e, 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_80383_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun80387(a0) { // fn#80387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10560:425, offset: 0x01e78ef0, size: 176 bytes, params: 2, frame: 16
|
||||
const closure = SentGiftsStore;
|
||||
env0_5(closure, a0);
|
||||
return env0_2(closure, [{key: 'initialize', value: value_80389}, {key: 'getState', value: value_80390},
|
||||
{key: 'hasSentGift', value: value_80391}, {key: 'getSentGift', value: value_80392}, {key: 'cleanupExpiredGifts',
|
||||
value: value_80393}]);
|
||||
}
|
||||
|
||||
function WISHLIST_GIFT_SENT(a0) { // fn#80394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10560:1422, offset: 0x01e79154, size: 171 bytes, params: 2, frame: 17
|
||||
const sentGiftKey = getSentGiftKey(a0.skuId, a0.recipientId);
|
||||
let Date = global.Date;
|
||||
let date = new Date();
|
||||
Date = global.Date;
|
||||
date = new Date(date.getTime() + 172800000);
|
||||
const sentGifts = env0_6.sentGifts;
|
||||
const object2 = {};
|
||||
object2.skuId = a0.skuId;
|
||||
object2.recipientId = a0.recipientId;
|
||||
object2.sentAt = date.toISOString();
|
||||
object2.expiresAt = date.toISOString();
|
||||
sentGifts[sentGiftKey] = object2;
|
||||
}
|
||||
|
||||
function value_80389(a0) { // fn#80389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10560:725, offset: 0x01e78fa0, size: 35 bytes, params: 2, frame: 10
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
value = environment.__proto__;
|
||||
env1_6 = a0;
|
||||
this.cleanupExpiredGifts();
|
||||
}
|
||||
}
|
||||
|
||||
function value_80391(a0, a1) { // fn#80391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10560:850, offset: 0x01e78fc3, size: 113 bytes, params: 3, frame: 14
|
||||
var r0;
|
||||
var Date;
|
||||
var expiresAt;
|
||||
var prototype;
|
||||
var date;
|
||||
var value3;
|
||||
let value = environment.__proto__;
|
||||
const property = env1_6.sentGifts[getSentGiftKey(a0, a1)];
|
||||
value = property != null;
|
||||
if (value) {
|
||||
Date = global.Date;
|
||||
expiresAt = property.expiresAt;
|
||||
prototype = Date.prototype;
|
||||
value = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value = date instanceof Object ? date : value;
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value3 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value = !(value < (date instanceof Object ? date : value3));
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_80392(a0, a1) { // fn#80392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10560:984, offset: 0x01e79034, size: 120 bytes, params: 3, frame: 16
|
||||
var r0;
|
||||
var Date;
|
||||
var expiresAt;
|
||||
var prototype;
|
||||
var value3;
|
||||
var date;
|
||||
var value4;
|
||||
var value5;
|
||||
let value = environment.__proto__;
|
||||
const property = env1_6.sentGifts[getSentGiftKey(a0, a1)];
|
||||
value = null;
|
||||
if (value == property) {
|
||||
r0 = value;
|
||||
} else {
|
||||
Date = global.Date;
|
||||
expiresAt = property.expiresAt;
|
||||
prototype = Date.prototype;
|
||||
value3 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value4 = date instanceof Object ? date : value3;
|
||||
Date = global.Date;
|
||||
prototype = Date.prototype;
|
||||
value5 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
r0 = value4 < (date instanceof Object ? date : value5) ? value : property;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_80393() { // fn#80393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10560:1130, offset: 0x01e790ac, size: 168 bytes, params: 1, frame: 22
|
||||
var r2;
|
||||
var property;
|
||||
var value5;
|
||||
var property2;
|
||||
var expiresAt;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
let Date = global.Date;
|
||||
let prototype = Date.prototype;
|
||||
let value = Object.create(prototype, {constructor: {value: Date}});
|
||||
let date = new Date();
|
||||
value = date instanceof Object ? date : value;
|
||||
const Object = global.Object;
|
||||
const entries = Object.entries;
|
||||
let sentGifts = env1_6.sentGifts;
|
||||
const value3 = Reflect.apply(entries, Object, [sentGifts]);
|
||||
let length = value3.length;
|
||||
const value4 = 0;
|
||||
if (value4 < length) {
|
||||
r2 = value4;
|
||||
while (true) {
|
||||
property = value3[r2];
|
||||
value5 = env1_0(property, 2);
|
||||
property = value5[value4];
|
||||
property2 = value5[1];
|
||||
Date = global.Date;
|
||||
expiresAt = property2.expiresAt;
|
||||
prototype = Date.prototype;
|
||||
value6 = Object.create(prototype, {constructor: {value: Date}});
|
||||
date = new Date();
|
||||
value7 = date instanceof Object ? date : value6;
|
||||
if (value7 < value) {
|
||||
sentGifts = env1_6.sentGifts;
|
||||
delete sentGifts[property];
|
||||
}
|
||||
value8 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
length = value3.length;
|
||||
if (value8 < length) {
|
||||
r2 = value8;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,138 @@
|
||||
/* Metro module 10433; source: modules/wishlists/WishlistRecommendationsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1949, 566, 694, 2] */
|
||||
function _fun80753(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10619:6, offset: 0x01e8860a, size: 337 bytes, params: 8, frame: 18
|
||||
const getKey_80757 = function(a0, a1) {
|
||||
if (a0.length === 0) {
|
||||
throw new global.Error('No user IDs provided');
|
||||
}
|
||||
var items = [];
|
||||
arraySpread(items, a1, arraySpread(items, a0, 0, items), items);
|
||||
return items.join(',');
|
||||
};
|
||||
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 localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
|
||||
let env0_7 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun80759(Store);
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() {
|
||||
env0_7 = {};
|
||||
}, WISHLIST_RECOMMENDATIONS_FETCH_START: WISHLIST_RECOMMENDATIONS_FETCH_START,
|
||||
WISHLIST_RECOMMENDATIONS_FETCH_SUCCESS: WISHLIST_RECOMMENDATIONS_FETCH_SUCCESS_80765,
|
||||
WISHLIST_RECOMMENDATIONS_FETCH_FAILURE: WISHLIST_RECOMMENDATIONS_FETCH_FAILURE});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/WishlistRecommendationsStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_80754() { // fn#80754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10619:158, offset: 0x01e8875b, 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_80754_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function handleUserSettingsStoreUpdate_80758() { // fn#80758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10619:467, offset: 0x01e88819, size: 49 bytes, params: 1, frame: 3
|
||||
const binding = env0_6;
|
||||
let locale = LocaleStore.locale;
|
||||
if (binding === locale) {
|
||||
return false;
|
||||
}
|
||||
env0_7 = {};
|
||||
locale = LocaleStore.locale;
|
||||
}
|
||||
|
||||
function _fun80759(a0) { // fn#80759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10619:555, offset: 0x01e8884a, size: 97 bytes, params: 2, frame: 16
|
||||
const closure = WishlistRecommendationsStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'initialize', value: function() {
|
||||
this.waitFor(LocaleStore);
|
||||
this.syncWith([LocaleStore], handleUserSettingsStoreUpdate_80758);
|
||||
env1_6 = LocaleStore.locale;
|
||||
}}, {key: 'getRecommendations', value: value_80762}]);
|
||||
}
|
||||
|
||||
function WISHLIST_RECOMMENDATIONS_FETCH_START({userIds, applicationIds}) { // fn#80764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10619:1223, offset: 0x01e88925, size: 88 bytes, params: 2, frame: 15
|
||||
if (userIds.length === 0) {
|
||||
return false;
|
||||
}
|
||||
if (applicationIds.length === 0) {
|
||||
return false;
|
||||
}
|
||||
const key_80757 = getKey_80757(userIds, applicationIds);
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_7, undefined);
|
||||
object2[key_80757] = {state: 'loading'};
|
||||
}
|
||||
|
||||
function WISHLIST_RECOMMENDATIONS_FETCH_SUCCESS_80765({userIds, applicationIds, data}) { // fn#80765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10619:1407, offset: 0x01e8897d, size: 119 bytes, params: 2, frame: 16
|
||||
if (userIds.length === 0) {
|
||||
return false;
|
||||
}
|
||||
if (applicationIds.length === 0) {
|
||||
return false;
|
||||
}
|
||||
const key_80757 = getKey_80757(userIds, applicationIds);
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, env0_7, undefined);
|
||||
const object4 = {state: 'success', data: data};
|
||||
const Date = global.Date;
|
||||
object4.fetchedAt = Date.now();
|
||||
object3[key_80757] = object4;
|
||||
}
|
||||
|
||||
function WISHLIST_RECOMMENDATIONS_FETCH_FAILURE({userIds, applicationIds}) { // fn#80766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10619:1628, offset: 0x01e889f4, size: 146 bytes, params: 2, frame: 16
|
||||
if (userIds.length === 0) {
|
||||
return false;
|
||||
}
|
||||
if (applicationIds.length === 0) {
|
||||
return false;
|
||||
}
|
||||
const key_80757 = getKey_80757(userIds, applicationIds);
|
||||
if (env0_7[key_80757]?.state === 'success') {
|
||||
return false;
|
||||
}
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, env0_7, undefined);
|
||||
const object4 = {state: 'error'};
|
||||
const Date = global.Date;
|
||||
object4.fetchedAt = Date.now();
|
||||
object3[key_80757] = object4;
|
||||
}
|
||||
|
||||
function value_80762(a0, a1) { // fn#80762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10619:1046, offset: 0x01e888ee, size: 55 bytes, params: 3, frame: 14
|
||||
var value;
|
||||
if (a0.length !== 0) {
|
||||
if (a1.length !== 0) {
|
||||
value = environment.__proto__;
|
||||
return env1_7[getKey_80757(a0, a1)];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
/* Metro module 10035; source: modules/wishlists/WishlistStore.tsx; dependencies: [6, 7, 15, 17, 18, 10036, 1216, 5189, 566, 694, 2] */
|
||||
function _fun78390(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:6, offset: 0x01e283e9, size: 503 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 */;
|
||||
let value = require(10036) /* metro dependency 10036: WishlistRecord */;
|
||||
const env0_8 = value.getWishlistSkuIds;
|
||||
const env0_9 = value.wishlistHasSkuId;
|
||||
const wishlistRecord = importDefault(10036) /* metro dependency 10036: WishlistRecord */;
|
||||
const env0_11 = {};
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
value = _fun78395(Store);
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{WISHLIST_FETCH_START: WISHLIST_FETCH_START, WISHLIST_FETCH_SUCCESS: WISHLIST_FETCH_SUCCESS,
|
||||
WISHLIST_FETCH_FAILURE: WISHLIST_FETCH_FAILURE, WISHLIST_ADD_SKU_SUCCESS: WISHLIST_ADD_SKU_SUCCESS_78410,
|
||||
WISHLIST_ADD_SKU_FAILURE: WISHLIST_ADD_SKU_FAILURE, WISHLIST_REMOVE_SKU_START: WISHLIST_REMOVE_SKU_START,
|
||||
WISHLIST_REMOVE_SKU_SUCCESS: WISHLIST_REMOVE_SKU_SUCCESS,
|
||||
WISHLIST_REMOVE_SKU_FAILURE: WISHLIST_REMOVE_SKU_FAILURE,
|
||||
WISHLIST_UPDATE_VISIBILITY_SUCCESS: WISHLIST_UPDATE_VISIBILITY_SUCCESS,
|
||||
WISHLIST_UPDATE_VISIBILITY_FAILURE: WISHLIST_UPDATE_VISIBILITY_FAILURE,
|
||||
WISHLIST_REORDER_START: function({wishlistId, newWishlistData}) {
|
||||
getOrCreateEntry(wishlistId).data = newWishlistData;
|
||||
}, WISHLIST_REORDER_SUCCESS: WISHLIST_REORDER_SUCCESS, WISHLIST_REORDER_FAILURE: WISHLIST_REORDER_FAILURE,
|
||||
WISHLIST_ITEM_PURCHASED: WISHLIST_ITEM_PURCHASED});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/WishlistStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_78391() { // fn#78391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:211, offset: 0x01e285e0, 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_78391_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function getOrCreateEntry(a0) { // fn#78394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:413, offset: 0x01e28642, size: 43 bytes, params: 2, frame: 4
|
||||
var r0;
|
||||
var object2;
|
||||
const binding = env0_11;
|
||||
const property = binding[a0];
|
||||
if (property != null) {
|
||||
r0 = property;
|
||||
} else {
|
||||
object2 = {'data': null, 'status': 'not_loaded'};
|
||||
binding[a0] = object2;
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun78395(a0) { // fn#78395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:494, offset: 0x01e2866d, size: 301 bytes, params: 2, frame: 16
|
||||
const closure = WishlistStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'get', value: value_78397}, {key: 'getWishlist', value: function(a0) {
|
||||
return this.get(a0).data;
|
||||
}}, {key: 'getWishlistItems', value: value_78399}, {key: 'hasSkuId', value: value_78400}, {key: 'getStatus',
|
||||
value: function(a0) {
|
||||
return this.get(a0).status;
|
||||
}}, {key: 'isFetching', value: function(a0) {
|
||||
return this.getStatus(a0) === 'fetching';
|
||||
}}, {key: 'hasError', value: function(a0) {
|
||||
return this.getStatus(a0) === 'error';
|
||||
}}, {key: 'getError', value: function(a0) {
|
||||
return this.get(a0).error;
|
||||
}}, {key: 'getUpdatedAt', value: function(a0) {
|
||||
return this.get(a0).updatedAt;
|
||||
}}, {key: 'getLastFetchedAt', value: function(a0) {
|
||||
return this.get(a0).lastFetchedAt;
|
||||
}}]);
|
||||
}
|
||||
|
||||
function WISHLIST_FETCH_START({wishlistId}) { // fn#78407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:1566, offset: 0x01e288cc, size: 41 bytes, params: 2, frame: 11
|
||||
const orCreateEntry = getOrCreateEntry(wishlistId);
|
||||
orCreateEntry.status = 'fetching';
|
||||
orCreateEntry.error = undefined;
|
||||
}
|
||||
|
||||
function WISHLIST_FETCH_SUCCESS({wishlistId, wishlistData, updatedAt}) { // fn#78408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:1693, offset: 0x01e288f5, size: 88 bytes, params: 2, frame: 13
|
||||
const orCreateEntry = getOrCreateEntry(wishlistId);
|
||||
orCreateEntry.data = wishlistData;
|
||||
orCreateEntry.status = 'success';
|
||||
orCreateEntry.error = undefined;
|
||||
orCreateEntry.updatedAt = updatedAt;
|
||||
const Date = global.Date;
|
||||
orCreateEntry.lastFetchedAt = Date.now();
|
||||
}
|
||||
|
||||
function WISHLIST_FETCH_FAILURE({wishlistId, error}) { // fn#78409, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:1898, offset: 0x01e2894d, size: 46 bytes, params: 2, frame: 12
|
||||
const orCreateEntry = getOrCreateEntry(wishlistId);
|
||||
orCreateEntry.status = 'error';
|
||||
orCreateEntry.error = error;
|
||||
}
|
||||
|
||||
function WISHLIST_ADD_SKU_SUCCESS_78410({wishlistId, wishlistData}) { // fn#78410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:2029, offset: 0x01e2897b, size: 76 bytes, params: 2, frame: 12
|
||||
const orCreateEntry = getOrCreateEntry(wishlistId);
|
||||
orCreateEntry.data = wishlistData;
|
||||
orCreateEntry.status = 'success';
|
||||
orCreateEntry.error = undefined;
|
||||
const Date = global.Date;
|
||||
orCreateEntry.lastFetchedAt = Date.now();
|
||||
}
|
||||
|
||||
function WISHLIST_ADD_SKU_FAILURE({error}) { // fn#78411, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:2211, offset: 0x01e289c7, size: 46 bytes, params: 2, frame: 12
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(error);
|
||||
}
|
||||
|
||||
function WISHLIST_REMOVE_SKU_START({wishlistId, skuId}) { // fn#78412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:2306, offset: 0x01e289f5, size: 159 bytes, params: 2, frame: 15
|
||||
var object2;
|
||||
const orCreateEntry = getOrCreateEntry(wishlistId);
|
||||
let data = orCreateEntry.data;
|
||||
if (data != null) {
|
||||
object2 = {};
|
||||
data = orCreateEntry.data;
|
||||
object2.id = data.id;
|
||||
data = orCreateEntry.data;
|
||||
object2.userId = data.userId;
|
||||
data = orCreateEntry.data;
|
||||
object2.items = data.items.filter(function({skuId}) {
|
||||
return skuId !== skuId;
|
||||
});
|
||||
data = orCreateEntry.data;
|
||||
object2.applications = data.applications;
|
||||
orCreateEntry.data = new WishlistRecord();
|
||||
}
|
||||
}
|
||||
|
||||
function WISHLIST_REMOVE_SKU_FAILURE({wishlistId, error}) { // fn#78415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:2746, offset: 0x01e28aa9, size: 67 bytes, params: 2, frame: 13
|
||||
getOrCreateEntry(wishlistId).updatedAt = undefined;
|
||||
(importDefault(1216) /* metro dependency 1216: SentryUtilsNative */).captureException(error);
|
||||
}
|
||||
|
||||
function WISHLIST_UPDATE_VISIBILITY_SUCCESS({wishlistId}) { // fn#78416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:2903, offset: 0x01e28aec, size: 64 bytes, params: 2, frame: 12
|
||||
const orCreateEntry = getOrCreateEntry(wishlistId);
|
||||
orCreateEntry.status = 'success';
|
||||
orCreateEntry.error = undefined;
|
||||
const Date = global.Date;
|
||||
orCreateEntry.lastFetchedAt = Date.now();
|
||||
}
|
||||
|
||||
function WISHLIST_ITEM_PURCHASED({recipientId, skuId}) { // fn#78421, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:3625, offset: 0x01e28b51, size: 141 bytes, params: 2, frame: 16
|
||||
const firstWishlistId = (require(5189) /* metro dependency 5189: UserProfileStore */).default.getFirstWishlistId(recipientId);
|
||||
if (firstWishlistId != null && env0_11[firstWishlistId] != null && env0_11[firstWishlistId].data != null && wishlistHasSkuId(env0_11[firstWishlistId].data,
|
||||
skuId)) {
|
||||
env0_11[firstWishlistId].updatedAt = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
function value_78397(a0) { // fn#78397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:782, offset: 0x01e2879a, size: 36 bytes, params: 2, frame: 2
|
||||
return env1_11[a0] ?? ({'data': null, 'status': 'not_loaded'});
|
||||
}
|
||||
|
||||
function value_78399(a0) { // fn#78399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:951, offset: 0x01e287d5, size: 49 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var value;
|
||||
const get = this.get;
|
||||
const data = Reflect.apply(get, this, [a0]).data;
|
||||
if (data != null) {
|
||||
value = environment.__proto__;
|
||||
value = getWishlistSkuIds(data);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = [];
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function value_78400(a0, a1) { // fn#78400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10221:1033, offset: 0x01e28806, size: 50 bytes, params: 3, frame: 14
|
||||
var r0;
|
||||
const get = this.get;
|
||||
const data = Reflect.apply(get, this, [a0]).data;
|
||||
let value = data != null;
|
||||
if (value) {
|
||||
value = environment.__proto__;
|
||||
value = wishlistHasSkuId(data, a1);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/* Metro module 10344; source: modules/wishlists/WishlistUtils.tsx; dependencies: [57, 10025, 10037, 10038, 661, 6833, 2] */
|
||||
function _fun80188(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10530:6, offset: 0x01e707a0, size: 269 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
const collectiblesWishlistItemRecord = importDefault(10025) /* metro dependency 10025: CollectiblesWishlistItemRecord */;
|
||||
const env0_4 = (require(10025) /* metro dependency 10025: CollectiblesWishlistItemRecord */).isCollectiblesWishlistItemRecord;
|
||||
const premiumWishlistItemRecord = importDefault(10037) /* metro dependency 10037: PremiumWishlistItemRecord */;
|
||||
const env0_6 = (require(10037) /* metro dependency 10037: PremiumWishlistItemRecord */).isPremiumWishlistItemRecord;
|
||||
const skuWishlistItemRecord = importDefault(10038) /* metro dependency 10038: SKUWishlistItemRecord */;
|
||||
const env0_8 = (require(10038) /* metro dependency 10038: SKUWishlistItemRecord */).isSKUWishlistItemRecord;
|
||||
const env0_9 = (require(661) /* metro dependency 661: Constants */).SKUProductLines;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/WishlistUtils.tsx');
|
||||
exports.wishlistItemFromSKU = wishlistItemFromSKU;
|
||||
exports.isEligibleWishlistItemOnMobile = isEligibleWishlistItemOnMobile;
|
||||
exports.buildReorderedWishlistData = buildReorderedWishlistData;
|
||||
}
|
||||
|
||||
function wishlistItemFromSKU(a0) { // fn#80189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10530:368, offset: 0x01e708ad, size: 119 bytes, params: 2, frame: 13
|
||||
const productLine = a0.productLine;
|
||||
const PREMIUM = SKUProductLines.PREMIUM;
|
||||
return productLine === PREMIUM ? PremiumWishlistItemRecord.fromSKU(a0) : a0.productLine === SKUProductLines.COLLECTIBLES ? CollectiblesWishlistItemRecord.fromSKU(a0) : a0.productLine !== SKUProductLines.SOCIAL_LAYER_GAME_ITEM ? null : SKUWishlistItemRecord.fromSKU(a0);
|
||||
}
|
||||
|
||||
function isEligibleWishlistItemOnMobile(a0, {isWishlistOwner, isSocialLayerStorefrontMobilePurchasingEnabled}) { // fn#80190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10530:583, offset: 0x01e70924, size: 141 bytes, params: 3, frame: 16
|
||||
var r0;
|
||||
var r2;
|
||||
var r1;
|
||||
var value;
|
||||
if (isSKUWishlistItemRecord(a0)) {
|
||||
if (a0.sku.productLine === SKUProductLines.SOCIAL_LAYER_GAME_ITEM) {
|
||||
if (isSocialLayerStorefrontMobilePurchasingEnabled) {
|
||||
if (isWishlistOwner) {
|
||||
r2 = isWishlistOwner;
|
||||
} else {
|
||||
value = require(6833) /* metro dependency 6833: StorefrontUtils */;
|
||||
value = value.isSlayerSkuAvailableOnThisPlatform(a0.sku);
|
||||
r2 = value;
|
||||
}
|
||||
r1 = r2;
|
||||
} else {
|
||||
r1 = !!isSocialLayerStorefrontMobilePurchasingEnabled;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = isCollectiblesWishlistItemRecord(a0) || isPremiumWishlistItemRecord(a0);
|
||||
}
|
||||
} else {
|
||||
r0 = isCollectiblesWishlistItemRecord(a0) || isPremiumWishlistItemRecord(a0);
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function buildReorderedWishlistData(a0, a1, a2, a3) { // fn#80191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10530:854, offset: 0x01e709b1, size: 261 bytes, params: 5, frame: 21
|
||||
var r10;
|
||||
var skuId;
|
||||
var r2;
|
||||
var r1;
|
||||
var r5;
|
||||
var property;
|
||||
var value;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
if (a2 < a3) {
|
||||
property = a1[a3];
|
||||
value = null;
|
||||
value3 = undefined;
|
||||
skuId = value == property ? value3 : property.skuId;
|
||||
r5 = value != skuId ? skuId : value;
|
||||
property = a1[a3 + 1];
|
||||
value4 = value == property;
|
||||
skuId = value4 ? value3 : property.skuId;
|
||||
r1 = value != skuId ? skuId : value;
|
||||
r2 = r5;
|
||||
r10 = value4;
|
||||
} else {
|
||||
property = a1[a3 - 1];
|
||||
value = null;
|
||||
value2 = undefined;
|
||||
skuId = value == property ? value2 : property.skuId;
|
||||
r2 = value != skuId ? skuId : value;
|
||||
property = a1[a3];
|
||||
skuId = value == property ? value2 : property.skuId;
|
||||
r1 = value != skuId ? skuId : value;
|
||||
}
|
||||
const items2 = [];
|
||||
arraySpread(items2, a1, 0, r10);
|
||||
items2.splice(a3, 0, env0_2(items2.splice(a2, 1), 1)[0]);
|
||||
const object2 = {};
|
||||
object2.newWishlistData = a0.set('items', items2);
|
||||
object2.previousSkuId = r2;
|
||||
object2.nextSkuId = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/* Metro module 10434; source: modules/wishlists/hooks/useWishlistApplicationIds.native.tsx; dependencies: [31, 661, 2] */
|
||||
function _fun80767(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10620:6, offset: 0x01e88a86, size: 128 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_1 = (require(661) /* metro dependency 661: Constants */).COLLECTIBLES_APPLICATION_ID;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/hooks/useWishlistApplicationIds.native.tsx');
|
||||
exports.useWishlistApplicationIds = useWishlistApplicationIds;
|
||||
}
|
||||
|
||||
function useWishlistApplicationIds() { // fn#80768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10620:266, offset: 0x01e88b06, size: 33 bytes, params: 1, frame: 13
|
||||
return env0_0.useMemo(function() {
|
||||
return [COLLECTIBLES_APPLICATION_ID];
|
||||
}, []);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/* Metro module 10049; source: modules/wishlists/hooks/useWishlistGiftableItems.native.tsx; dependencies: [31, 661, 2] */
|
||||
function _fun78591(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10235:6, offset: 0x01e2d018, size: 197 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_0 = importAll(31) /* metro dependency 31 */;
|
||||
const SKUProductLines = (require(661) /* metro dependency 661: Constants */).SKUProductLines;
|
||||
const Set = global.Set;
|
||||
const COLLECTIBLES = SKUProductLines.COLLECTIBLES;
|
||||
const PREMIUM = SKUProductLines.PREMIUM;
|
||||
const SOCIAL_LAYER_GAME_ITEM = SKUProductLines.SOCIAL_LAYER_GAME_ITEM;
|
||||
const set = new Set([COLLECTIBLES, PREMIUM, SOCIAL_LAYER_GAME_ITEM]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/hooks/useWishlistGiftableItems.native.tsx');
|
||||
exports.GIFTABLE_PRODUCT_LINES = set;
|
||||
exports.useWishlistGiftableItems = function(a0) {
|
||||
return a0.useMemo(_fun78593, [a0]);
|
||||
};
|
||||
}
|
||||
|
||||
function useWishlistGiftableItems(a0) { // fn#78592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10235:342, offset: 0x01e2d0dd, size: 44 bytes, params: 2, frame: 14
|
||||
return a0.useMemo(_fun78593, [a0]);
|
||||
}
|
||||
|
||||
function _fun78593() { // fn#78593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10235:397, offset: 0x01e2d109, size: 57 bytes, params: 1, frame: 13
|
||||
let r0 = env0_0 == null ? undefined : env0_0.items.filter(_fun78594);
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun78594(a0) { // fn#78594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10235:455, offset: 0x01e2d142, size: 40 bytes, params: 2, frame: 12
|
||||
const value = environment.__proto__.__proto__;
|
||||
const binding = env2_1;
|
||||
return binding.has(a0.skuProductLine) && !a0.isOwned;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,460 @@
|
||||
/* Metro module 10034; source: modules/wishlists/hooks/useWishlistHooks.tsx; dependencies: [57, 31, 5189, 1226, 1878, 10035, 10036, 566, 10039, 22, 10040, 8491, 10044, 10049, 2] */
|
||||
function _fun78356(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:6, offset: 0x01e274d7, size: 427 bytes, params: 8, frame: 22
|
||||
let env0_0 = require;
|
||||
const _arrayLikeToArray_78359 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const getUserWishlistKey = function(a0, a1) {
|
||||
return a1 != null ? '' + a0 + ':' + a1 : '' + a0 + ':default';
|
||||
};
|
||||
const closure = useFetchWishlist;
|
||||
const closure2 = useFetchWishlistAndProfileInfoForUser;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(31) /* metro dependency 31 */).useEffect;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const wishlistStore = importDefault(10035) /* metro dependency 10035: WishlistStore */;
|
||||
const env0_10 = (require(10036) /* metro dependency 10036: WishlistRecord */).getWishlistSkuIds;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/hooks/useWishlistHooks.tsx');
|
||||
exports.WISHLIST_IN_DM_LENGTH = 5;
|
||||
exports.WISHLIST_IN_DM_LENGTH_MOBILE = 6;
|
||||
exports.WISHLIST_TOOLTIP_DELAY_MS = 350;
|
||||
exports.WishlistItemSource = {WISHLIST: 'wishlist', POPULAR: 'popular'};
|
||||
exports.WishlistFetchSource = {USER_PROFILE: 'user_profile'};
|
||||
exports.useFetchWishlists = useFetchWishlists;
|
||||
exports.useFetchWishlist = closure;
|
||||
exports.useIsSkuInWishlist = function(a0, a1) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a1;
|
||||
return require(dependencyMap[7]).useStateFromStores([WishlistStore], _fun78383);
|
||||
};
|
||||
exports.useShouldShowWishlistInDMGifting = useShouldShowWishlistInDMGifting;
|
||||
exports.useCurrentUserWishlist = function() {
|
||||
return useFetchWishlistAndProfileInfoForUser(require(dependencyMap[7]).useStateFromStores([AuthenticationStore],
|
||||
_fun78389));
|
||||
};
|
||||
exports.useFetchWishlistAndProfileInfoForUser = closure2;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_78357(a0, a1) { // fn#78357, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:211, offset: 0x01e27682, 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 _fun78358;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_78359(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') {
|
||||
value = _arrayLikeToArray_78359(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_78359(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun78358;
|
||||
}
|
||||
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 useFetchWishlist({wishlistId, userId, source = env0_11.USER_PROFILE}) { // fn#78361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:1328, offset: 0x01e2783f, size: 374 bytes, params: 2, frame: 25
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const value3 = undefined(Reflect.apply(useStateFromStoresArray, fluxModule, [[WishlistStore], _fun78362]), 4);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
const property3 = value3[2];
|
||||
const env0_4 = property3;
|
||||
const property4 = value3[3];
|
||||
(require(10040) /* metro dependency 10040: useGetOrFetchStorefrontPrices */).useGetOrFetchStorefrontPricesForSkuIds({skuIds: env0_4.useMemo(_fun78363,
|
||||
[property])});
|
||||
const moduleValue3 = fluxModule;
|
||||
const useStateFromStores = moduleValue3.useStateFromStores;
|
||||
useEffect(_fun78365, [wishlistId, source, property, Reflect.apply(useStateFromStores, moduleValue3,
|
||||
[[UserProfileStore], _fun78364]), property4, property3]);
|
||||
return {wishlist: property, isFetching: property2 === 'fetching',
|
||||
wasFetched: property2 === 'success' || property2 === 'error', error: property3};
|
||||
}
|
||||
|
||||
function useFetchWishlistAndProfileInfoForUser(a0) { // fn#78366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:2055, offset: 0x01e27b51, size: 220 bytes, params: 2, frame: 21
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun78367);
|
||||
const {userProfile,
|
||||
wishlistId} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserProfileStore],
|
||||
_fun78368, [a0]);
|
||||
env0_4.useEffect(_fun78369, [user, a0, userProfile]);
|
||||
object2 = {};
|
||||
copyDataProperties(object2, useFetchWishlist({wishlistId: wishlistId, userId: a0}), undefined);
|
||||
object2['wishlistId'] = wishlistId;
|
||||
object2['userProfile'] = userProfile;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useFetchWishlists({wishlistIdsAndUsers, source = env0_11.USER_PROFILE}) { // fn#78370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:2771, offset: 0x01e27cf2, size: 345 bytes, params: 2, frame: 25
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([WishlistStore], function() {
|
||||
return wishlistIdsAndUsers.map(_fun78372);
|
||||
}, [wishlistIdsAndUsers]);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], function() {
|
||||
return wishlistIdsAndUsers.some(_fun78374);
|
||||
}, [wishlistIdsAndUsers]);
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([WishlistStore], function() {
|
||||
return wishlistIdsAndUsers.map(_fun78376);
|
||||
}, [wishlistIdsAndUsers]);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserProfileStore],
|
||||
function() {
|
||||
return wishlistIdsAndUsers.map(_fun78378);
|
||||
});
|
||||
const binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
useEffect(_fun78381, [wishlistIdsAndUsers, source, Reflect.apply(useMemo, binding, [function() {
|
||||
wishlistIdsAndUsers.forEach(_fun78380);
|
||||
return {};
|
||||
}, [wishlistIdsAndUsers, value5]])]);
|
||||
return {wishlists: value2, isFetching: value3, errors: value4};
|
||||
}
|
||||
|
||||
function useIsSkuInWishlist(a0, a1) { // fn#78382, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:3873, offset: 0x01e280ea, size: 73 bytes, params: 3, frame: 14
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistStore], _fun78383);
|
||||
}
|
||||
|
||||
function useShouldShowWishlistInDMGifting({isGift, giftRecipient, isSocialLayerStorefrontEnabled}) { // fn#78384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:4014, offset: 0x01e28162, size: 348 bytes, params: 2, frame: 22
|
||||
let value = undefined;
|
||||
isSocialLayerStorefrontEnabled = isSocialLayerStorefrontEnabled === value || isSocialLayerStorefrontEnabled;
|
||||
value.useEffect(_fun78385, [giftRecipient == null ? value : giftRecipient.id]);
|
||||
const value5 = (importDefault(10044) /* metro dependency 10044: useDisplayProfileSocialLayerStorefrontApplicationIds */)({userId: giftRecipient == null ? value : giftRecipient.id});
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore], _fun78386);
|
||||
const wishlist = useFetchWishlist({wishlistId: value6 != null && isGift && giftRecipient != null ? value6 : null,
|
||||
userId: giftRecipient == null ? value : giftRecipient.id}).wishlist;
|
||||
value = require(10049) /* metro dependency 10049: useWishlistGiftableItemsNative */;
|
||||
value = value.useWishlistGiftableItems(wishlist);
|
||||
return value.useMemo(_fun78387, [isGift, giftRecipient, value, value5, isSocialLayerStorefrontEnabled]);
|
||||
}
|
||||
|
||||
function useCurrentUserWishlist() { // fn#78388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:4597, offset: 0x01e28392, size: 68 bytes, params: 1, frame: 15
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
return useFetchWishlistAndProfileInfoForUser(Reflect.apply(useStateFromStores, fluxModule, [[AuthenticationStore],
|
||||
function() {
|
||||
return AuthenticationStore.getId();
|
||||
}]));
|
||||
}
|
||||
|
||||
function _fun78362() { // fn#78362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:1447, offset: 0x01e279b5, size: 127 bytes, params: 1, frame: 13
|
||||
return wishlistId == null ? [null, 'success', undefined, undefined] : [WishlistStore.getWishlist(wishlistId),
|
||||
WishlistStore.getStatus(wishlistId), WishlistStore.getError(wishlistId), WishlistStore.getUpdatedAt(wishlistId)];
|
||||
}
|
||||
|
||||
function _fun78363() { // fn#78363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:1608, offset: 0x01e27a34, size: 70 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (env0_3 == null) {
|
||||
r0 = [];
|
||||
} else {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(22) /* metro dependency 22 */;
|
||||
r0 = moduleValue.uniq(getWishlistSkuIds(env0_3));
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun78364() { // fn#78364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:1749, offset: 0x01e27a7a, size: 69 bytes, params: 1, frame: 14
|
||||
var value2;
|
||||
if (wishlistId != null) {
|
||||
if (userId != null) {
|
||||
value2 = environment.__proto__;
|
||||
return UserProfileStore.getWishlistSettings(userId, wishlistId)?.updated_at;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78365() { // fn#78365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:1857, offset: 0x01e27abf, size: 146 bytes, params: 1, frame: 16
|
||||
var value8;
|
||||
var defaultImport;
|
||||
let r1 = wishlistId == null || WishlistStore.isFetching(wishlistId);
|
||||
r1 = !r1 ? env0_4 != null : r1;
|
||||
if (!r1) {
|
||||
if (env0_3 == null || env0_6 != null && env0_5 !== env0_6) {
|
||||
value8 = environment.__proto__;
|
||||
defaultImport = importDefault(10039) /* metro dependency 10039: WishlistActionCreators */;
|
||||
defaultImport.fetchWishlist(wishlistId, env0_6, env0_2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78368() { // fn#78368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:2204, offset: 0x01e27c2d, size: 89 bytes, params: 1, frame: 15
|
||||
const object2 = {};
|
||||
const value2 = null;
|
||||
object2.userProfile = value2 != env0_0 ? UserProfileStore.getUserProfile(env0_0) : value2;
|
||||
object2.wishlistId = value2 != env0_0 ? UserProfileStore.getFirstWishlistId(env0_0) : value2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun78369() { // fn#78369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:2362, offset: 0x01e27c86, size: 108 bytes, params: 1, frame: 16
|
||||
var userBinding;
|
||||
var value6;
|
||||
var defaultImport;
|
||||
if (env0_0 != null && userProfile == null && user != null && userProfile == null) {
|
||||
value6 = environment.__proto__;
|
||||
defaultImport = importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */;
|
||||
userBinding = user;
|
||||
defaultImport(userBinding.id, userBinding.getAvatarURL(null, 80));
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78371() { // fn#78371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:2891, offset: 0x01e27e4b, size: 28 bytes, params: 1, frame: 11
|
||||
return wishlistIdsAndUsers.map(_fun78372);
|
||||
}
|
||||
|
||||
function _fun78373() { // fn#78373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:2993, offset: 0x01e27e8d, size: 29 bytes, params: 1, frame: 11
|
||||
return wishlistIdsAndUsers.some(_fun78374);
|
||||
}
|
||||
|
||||
function _fun78375() { // fn#78375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:3096, offset: 0x01e27ed0, size: 28 bytes, params: 1, frame: 11
|
||||
return wishlistIdsAndUsers.map(_fun78376);
|
||||
}
|
||||
|
||||
function _fun78377() { // fn#78377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:3202, offset: 0x01e27f14, size: 28 bytes, params: 1, frame: 11
|
||||
return wishlistIdsAndUsers.map(_fun78378);
|
||||
}
|
||||
|
||||
function _fun78379() { // fn#78379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:3344, offset: 0x01e27f70, size: 34 bytes, params: 1, frame: 12
|
||||
wishlistIdsAndUsers.forEach(_fun78380);
|
||||
return {};
|
||||
}
|
||||
|
||||
function _fun78381() { // fn#78381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:3477, offset: 0x01e27fd9, size: 273 bytes, params: 1, frame: 27
|
||||
var r4;
|
||||
var r14;
|
||||
var r13;
|
||||
var value5;
|
||||
var wishlistId;
|
||||
var userId;
|
||||
var isFetching;
|
||||
var getError;
|
||||
var wishlist;
|
||||
var updatedAt;
|
||||
var binding;
|
||||
var property;
|
||||
var value8;
|
||||
var value9;
|
||||
var value10;
|
||||
var defaultImport;
|
||||
var value11;
|
||||
const value3 = _createForOfIteratorHelperLoose_78357(wishlistIdsAndUsers);
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r4 = value4;
|
||||
while (true) {
|
||||
value5 = r4.value;
|
||||
wishlistId = value5.wishlistId;
|
||||
userId = value5.userId;
|
||||
if (wishlistId != null) {
|
||||
isFetching = WishlistStore.isFetching;
|
||||
if (Reflect.apply(isFetching, WishlistStore, [wishlistId])) {
|
||||
break;
|
||||
}
|
||||
getError = WishlistStore.getError;
|
||||
if (Reflect.apply(getError, WishlistStore, [wishlistId]) != null) {
|
||||
break;
|
||||
}
|
||||
wishlist = WishlistStore.getWishlist(wishlistId);
|
||||
updatedAt = WishlistStore.getUpdatedAt(wishlistId);
|
||||
binding = env0_3;
|
||||
property = binding[getUserWishlistKey(userId, wishlistId)];
|
||||
value8 = wishlist == null;
|
||||
if (value8) {
|
||||
r13 = value8;
|
||||
continue;
|
||||
}
|
||||
value9 = property != null;
|
||||
if (!value9) {
|
||||
r14 = value9;
|
||||
continue;
|
||||
}
|
||||
value10 = updatedAt !== property;
|
||||
r14 = value10;
|
||||
r13 = r14;
|
||||
if (r13) {
|
||||
defaultImport = importDefault(10039) /* metro dependency 10039: WishlistActionCreators */;
|
||||
defaultImport.fetchWishlist(wishlistId, property, env0_1);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
value11 = value3();
|
||||
done = value11.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r4 = value11;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun78383() { // fn#78383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:3946, offset: 0x01e28133, size: 47 bytes, params: 1, frame: 14
|
||||
return env0_0 != null && WishlistStore.hasSkuId(env0_0, require);
|
||||
}
|
||||
|
||||
function _fun78385() { // fn#78385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:4133, offset: 0x01e282be, size: 72 bytes, params: 1, frame: 13
|
||||
var value3;
|
||||
const giftRecipientBinding = giftRecipient;
|
||||
const value2 = undefined;
|
||||
if ((giftRecipientBinding == null ? value2 : giftRecipient.id) != null) {
|
||||
value3 = environment.__proto__;
|
||||
(importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */)(giftRecipient.id);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun78386() { // fn#78386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:4287, offset: 0x01e28306, size: 65 bytes, params: 1, frame: 12
|
||||
const giftRecipientBinding = giftRecipient;
|
||||
const value2 = null;
|
||||
return value2 == (value2 == giftRecipientBinding ? undefined : giftRecipient.id) ? value2 : UserProfileStore.getFirstWishlistId(giftRecipient.id);
|
||||
}
|
||||
|
||||
function _fun78387() { // fn#78387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:4507, offset: 0x01e28347, size: 75 bytes, params: 1, frame: 6
|
||||
return isGift === true && giftRecipient != null && (env0_4.length > 0 || isSocialLayerStorefrontEnabled && env0_3.length > 0);
|
||||
}
|
||||
|
||||
function _fun78372({wishlistId}) { // fn#78372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:2902, offset: 0x01e27e67, size: 38 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = null;
|
||||
if (value != wishlistId) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = WishlistStore.getWishlist(wishlistId);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun78374({wishlistId}) { // fn#78374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:3005, offset: 0x01e27eaa, size: 38 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = wishlistId != null;
|
||||
if (value) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = WishlistStore.isFetching(wishlistId);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun78376({wishlistId}) { // fn#78376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:3107, offset: 0x01e27eec, size: 40 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
let value = undefined;
|
||||
if (wishlistId != null) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = WishlistStore.getError(wishlistId);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun78378({wishlistId, userId}) { // fn#78378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:3213, offset: 0x01e27f30, size: 64 bytes, params: 2, frame: 16
|
||||
return wishlistId != null ? UserProfileStore.getWishlistSettings(userId, wishlistId)?.updated_at : undefined;
|
||||
}
|
||||
|
||||
function _fun78380({userId, wishlistId}, a1) { // fn#78380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:3376, offset: 0x01e27f92, size: 71 bytes, params: 3, frame: 16
|
||||
var binding;
|
||||
var value3;
|
||||
if (!(a1 >= env1_2.length)) {
|
||||
binding = env0_0;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
binding[getUserWishlistKey(userId, wishlistId)] = env1_2[a1];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,587 @@
|
||||
/* Metro module 10432; source: modules/wishlists/hooks/useWishlistRecommendations.tsx; dependencies: [57, 31, 5189, 1226, 10433, 6830, 672, 566, 10034, 1360, 10039, 22, 10040, 8491, 10434, 10435, 2] */
|
||||
function _fun80709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:6, offset: 0x01e87389, size: 399 bytes, params: 8, frame: 19
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_80712 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const wishlistRecommendationsStore = importDefault(10433) /* metro dependency 10433: WishlistRecommendationsStore */;
|
||||
let value = importDefault(6830) /* metro dependency 6830: WishlistRecommendationRecord */;
|
||||
const env0_8 = (require(6830) /* metro dependency 6830: WishlistRecommendationRecord */).WishlistRecommendationReason;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const MINUTE = Millis.MINUTE;
|
||||
const env0_9 = 30 * MINUTE;
|
||||
object2 = {'state': 'success', 'data': null, 'fetchedAt': 0};
|
||||
value = new value({skus: [], skus_to_user_and_reason: {}, applications: []});
|
||||
object2.data = value;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/hooks/useWishlistRecommendations.tsx');
|
||||
exports.useWishlistRecommendationsForSingleUser = useWishlistRecommendationsForSingleUser;
|
||||
exports.useRecommendationsForApplicationIds = useRecommendationsForApplicationIds;
|
||||
exports.useRecommendationsForSingleUser = useRecommendationsForSingleUser;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_80710(a0, a1) { // fn#80710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:201, offset: 0x01e87518, 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 _fun80711;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_80712(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') {
|
||||
value = _arrayLikeToArray_80712(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_80712(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun80711;
|
||||
}
|
||||
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 useWishlistRecommendationsWithWishlists({userIdsAndWishlistIds, numItems, applicationIds, source, filterByApplicationIds}) { // fn#80713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:1239, offset: 0x01e8768c, size: 518 bytes, params: 2, frame: 22
|
||||
const value = undefined;
|
||||
const r1 = source !== value ? source : (require(10034) /* metro dependency 10034: useWishlistHooks */).WishlistFetchSource.USER_PROFILE;
|
||||
filterByApplicationIds = !(filterByApplicationIds === value) && filterByApplicationIds;
|
||||
let env0_4 = value;
|
||||
const binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
const value5 = useFetchWishlistRecommendations({userIds: Reflect.apply(useMemo, binding, [function() {
|
||||
return userIdsAndWishlistIds.map(_fun80718);
|
||||
}, [userIdsAndWishlistIds]]), numItems: numItems, applicationIds: applicationIds});
|
||||
const value6 = useSortedWishlistUnownedSkus({userIdsAndWishlistIds: userIdsAndWishlistIds, source: r1,
|
||||
applicationIdsFilter: filterByApplicationIds ? applicationIds : value});
|
||||
const sortedWishlistSkus = value6.sortedWishlistSkus;
|
||||
const wishlistSkuIdToSku = value6.wishlistSkuIdToSku;
|
||||
const wishlistSkusToUserAndReasonMap = value6.wishlistSkusToUserAndReasonMap;
|
||||
env0_4 = wishlistSkusToUserAndReasonMap;
|
||||
const wishlistsAreFetching = value6.wishlistsAreFetching;
|
||||
const wishlistErrors = value6.wishlistErrors;
|
||||
const {filteredRecommendations, skusToUserAndReasonRecommendations} = env0_4.useMemo(_fun80729, [value5,
|
||||
wishlistSkuIdToSku]);
|
||||
const {combinedSkus, combinedSkusToUserAndReason} = env0_4.useMemo(_fun80731, [sortedWishlistSkus,
|
||||
filteredRecommendations, wishlistSkusToUserAndReasonMap, skusToUserAndReasonRecommendations]);
|
||||
const value9 = env0_4.useMemo(_fun80732, [wishlistsAreFetching, value5, wishlistErrors]);
|
||||
(require(10040) /* metro dependency 10040: useGetOrFetchStorefrontPrices */).useGetOrFetchStorefrontPricesForSkuIds({skuIds: env0_4.useMemo(_fun80733,
|
||||
[filteredRecommendations, combinedSkus])});
|
||||
return {recommendations: filteredRecommendations, wishlistAndRecommendations: combinedSkus,
|
||||
skusToUserAndReason: combinedSkusToUserAndReason, status: value9};
|
||||
}
|
||||
|
||||
function useMemoizedUserIdAndWishlistId(a0) { // fn#80736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:4334, offset: 0x01e880ab, size: 153 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
let binding = env0_4;
|
||||
binding.useEffect(_fun80737, [a0]);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
|
||||
const defaultWishlistId = Reflect.apply(useStateFromStoresObject, fluxModule, [[UserProfileStore],
|
||||
_fun80738]).defaultWishlistId;
|
||||
binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
return {userIdsAndWishlistIds: Reflect.apply(useMemo, binding, [_fun80739, [a0, defaultWishlistId]]),
|
||||
defaultWishlistId: defaultWishlistId};
|
||||
}
|
||||
|
||||
function useWishlistRecommendationsForSingleUser({userId, numItems, source}) { // fn#80740, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:4761, offset: 0x01e881ad, size: 246 bytes, params: 2, frame: 19
|
||||
const r4 = source !== undefined ? source : (require(10034) /* metro dependency 10034: useWishlistHooks */).WishlistFetchSource.USER_PROFILE;
|
||||
const {userIdsAndWishlistIds, defaultWishlistId} = useMemoizedUserIdAndWishlistId(userId);
|
||||
const object2 = {userIdsAndWishlistIds: userIdsAndWishlistIds};
|
||||
object2.applicationIds = (require(10434) /* metro dependency 10434: useWishlistApplicationIdsNative */).useWishlistApplicationIds(userId);
|
||||
object2.numItems = numItems;
|
||||
object2.source = r4;
|
||||
value = useWishlistRecommendationsWithWishlists(object2);
|
||||
const wishlistAndRecommendations = value.wishlistAndRecommendations;
|
||||
const skusToUserAndReason = value.skusToUserAndReason;
|
||||
const status = value.status;
|
||||
const useWishlistSkuFilter = (require(10435) /* metro dependency 10435: useWishlistSkuFilterNative */).useWishlistSkuFilter;
|
||||
value = Reflect.apply(useWishlistSkuFilter, value, [{wishlistAndRecommendations: wishlistAndRecommendations,
|
||||
skusToUserAndReason: skusToUserAndReason, userId: userId, numItems: numItems}]);
|
||||
return {wishlistAndRecommendations: value.slicedWishlistAndRecommendations,
|
||||
skusToUserAndReason: skusToUserAndReason, status: status, defaultWishlistId: defaultWishlistId,
|
||||
totalUnownedWishlistItemCount: value.totalUnownedWishlistItemCount};
|
||||
}
|
||||
|
||||
function useRecommendationsForApplicationIds({applicationIds, userIds, numItems, source}) { // fn#80741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:5515, offset: 0x01e882a3, size: 236 bytes, params: 2, frame: 21
|
||||
const r5 = source !== undefined ? source : (require(10034) /* metro dependency 10034: useWishlistHooks */).WishlistFetchSource.USER_PROFILE;
|
||||
const object2 = {};
|
||||
let binding = env0_4;
|
||||
let useMemo = binding.useMemo;
|
||||
object2.userIdsAndWishlistIds = useMemoizedUserIdsAndWishlistIds(Reflect.apply(useMemo, binding, [_fun80749,
|
||||
[userIds]]));
|
||||
object2.applicationIds = applicationIds;
|
||||
object2.numItems = numItems;
|
||||
object2.source = r5;
|
||||
object2.filterByApplicationIds = true;
|
||||
const {wishlistAndRecommendations, skusToUserAndReason, status} = useWishlistRecommendationsWithWishlists(object2);
|
||||
binding = env0_4;
|
||||
useMemo = binding.useMemo;
|
||||
return {recommendations: Reflect.apply(useMemo, binding, [function() {
|
||||
return wishlistAndRecommendations.slice(0, numItems);
|
||||
}, [wishlistAndRecommendations, numItems]]), skusToUserAndReason: skusToUserAndReason, status: status};
|
||||
}
|
||||
|
||||
function useRecommendationsForSingleUser({userId, numItems, source}) { // fn#80751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:6323, offset: 0x01e88512, size: 222 bytes, params: 2, frame: 20
|
||||
const r5 = source !== undefined ? source : (require(10034) /* metro dependency 10034: useWishlistHooks */).WishlistFetchSource.USER_PROFILE;
|
||||
const object2 = {};
|
||||
const userIdsAndWishlistIds = useMemoizedUserIdAndWishlistId(userId).userIdsAndWishlistIds;
|
||||
object2.userIdsAndWishlistIds = userIdsAndWishlistIds;
|
||||
object2.applicationIds = (require(10434) /* metro dependency 10434: useWishlistApplicationIdsNative */).useWishlistApplicationIds(userId);
|
||||
object2.numItems = numItems;
|
||||
object2.source = r5;
|
||||
const {recommendations, skusToUserAndReason, status} = useWishlistRecommendationsWithWishlists(object2);
|
||||
const binding = env0_4;
|
||||
const useMemo = binding.useMemo;
|
||||
return {recommendations: Reflect.apply(useMemo, binding, [function() {
|
||||
return recommendations.slice(0, numItems);
|
||||
}, [recommendations, numItems]]), skusToUserAndReason: skusToUserAndReason, status: status};
|
||||
}
|
||||
|
||||
function useFetchWishlistRecommendations({userIds, numItems, applicationIds}) { // fn#80714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:1428, owner: useWishlistRecommendationsWithWishlists.useFetchWishlistRecommendations, offset: 0x01e87892, size: 154 bytes, params: 2, frame: 19
|
||||
const recommendations = (require(566) /* metro dependency 566: flux */).useStateFromStores([WishlistRecommendationsStore],
|
||||
function() {
|
||||
return WishlistRecommendationsStore.getRecommendations(userIds, applicationIds);
|
||||
});
|
||||
env1_4.useEffect(_fun80716, [userIds, applicationIds, numItems]);
|
||||
return userIds.length === 0 ? env1_10 : applicationIds.length !== 0 ? recommendations : env1_10;
|
||||
}
|
||||
|
||||
function _fun80717() { // fn#80717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:1912, offset: 0x01e87a2e, size: 28 bytes, params: 1, frame: 11
|
||||
return userIdsAndWishlistIds.map(function(a0) {
|
||||
return a0.userId;
|
||||
});
|
||||
}
|
||||
|
||||
function useSortedWishlistUnownedSkus({userIdsAndWishlistIds, source, applicationIdsFilter}) { // fn#80719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:1979, owner: useWishlistRecommendationsWithWishlists.useSortedWishlistUnownedSkus, offset: 0x01e87a4a, size: 284 bytes, params: 2, frame: 21
|
||||
const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
|
||||
return AuthenticationStore.getId();
|
||||
});
|
||||
const {wishlists, isFetching,
|
||||
errors} = (require(10034) /* metro dependency 10034: useWishlistHooks */).useFetchWishlists({wishlistIdsAndUsers: userIdsAndWishlistIds,
|
||||
source: source});
|
||||
let binding = env1_4;
|
||||
let useMemo = binding.useMemo;
|
||||
const value3 = Reflect.apply(useMemo, binding, [_fun80721, [wishlists, applicationIdsFilter]]);
|
||||
const value4 = env1_4.useMemo(_fun80722, [wishlists, applicationIdsFilter]);
|
||||
binding = env1_4;
|
||||
useMemo = binding.useMemo;
|
||||
return {sortedWishlistSkus: Reflect.apply(useMemo, binding, [_fun80726, [id, value4, value3]]),
|
||||
wishlistSkuIdToSku: value4, wishlistSkusToUserAndReasonMap: value3, wishlistsAreFetching: isFetching,
|
||||
wishlistErrors: errors};
|
||||
}
|
||||
|
||||
function _fun80729() { // fn#80729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:3392, offset: 0x01e87e7b, size: 116 bytes, params: 1, frame: 13
|
||||
var r0;
|
||||
var object2;
|
||||
var data;
|
||||
if (env0_1 == null) {
|
||||
r0 = {filteredRecommendations: [], skusToUserAndReasonRecommendations: {}};
|
||||
} else if (env0_1.state !== 'success') {
|
||||
r0 = {filteredRecommendations: [], skusToUserAndReasonRecommendations: {}};
|
||||
} else {
|
||||
object2 = {};
|
||||
data = env0_1.data;
|
||||
object2.filteredRecommendations = data.skus.filter(function({id}) {
|
||||
return !(id in wishlistSkuIdToSku);
|
||||
});
|
||||
data = env0_1.data;
|
||||
object2.skusToUserAndReasonRecommendations = data.skusToUserAndReason;
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80731() { // fn#80731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:3706, offset: 0x01e87f07, size: 169 bytes, params: 1, frame: 23
|
||||
var r12;
|
||||
var r2;
|
||||
var property;
|
||||
var value5;
|
||||
var property2;
|
||||
var object3;
|
||||
var value6;
|
||||
var value7;
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, skusToUserAndReasonRecommendations, undefined);
|
||||
const Object = global.Object;
|
||||
const value2 = Object.entries(wishlistSkusToUserAndReasonMap);
|
||||
let length = value2.length;
|
||||
const value3 = 0;
|
||||
if (value3 < length) {
|
||||
for (r2 = value3; true; r2 = value7) {
|
||||
property = value2[r2];
|
||||
value5 = env1_3(property, 2);
|
||||
property = value5[value3];
|
||||
property2 = value5[1];
|
||||
object3 = {};
|
||||
value6 = copyDataProperties(object3, object4[property], undefined);
|
||||
copyDataProperties(object3, property2, undefined);
|
||||
object4[property] = object3;
|
||||
value7 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
length = value2.length;
|
||||
if (!(value7 < length)) {
|
||||
r12 = value6;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
const sortedWishlistSkusBinding = sortedWishlistSkus;
|
||||
const items2 = [];
|
||||
arraySpread(items2, filteredRecommendations, arraySpread(items2, sortedWishlistSkusBinding, value3, r12), r12);
|
||||
return {combinedSkus: items2, combinedSkusToUserAndReason: object4};
|
||||
}
|
||||
|
||||
function _fun80732() { // fn#80732, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:3960, offset: 0x01e87fb0, size: 146 bytes, params: 1, frame: 15
|
||||
const isNotNullish = (require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish;
|
||||
const wishlistsAreFetchingBinding = wishlistsAreFetching;
|
||||
const value2 = 'loading';
|
||||
return wishlistsAreFetchingBinding || env0_1 == null ? value2 : env0_1 == null ? wishlistErrors.filter(isNotNullish).length > 0 ? 'error' : env0_1.state !== 'error' ? 'success' : 'error' : value2 === env0_1.state ? value2 : wishlistErrors.filter(isNotNullish).length > 0 ? 'error' : env0_1.state !== 'error' ? 'success' : 'error';
|
||||
}
|
||||
|
||||
function _fun80733() { // fn#80733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:4116, offset: 0x01e88042, size: 105 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = require(22) /* metro dependency 22 */;
|
||||
const uniq = value.uniq;
|
||||
const filteredRecommendationsBinding = filteredRecommendations;
|
||||
const value3 = filteredRecommendationsBinding.map(function(a0) {
|
||||
return a0.id;
|
||||
});
|
||||
const items2 = [];
|
||||
const value4 = arraySpread(items2, value3, 0, filteredRecommendationsBinding);
|
||||
const combinedSkusBinding = combinedSkus;
|
||||
arraySpread(items2, combinedSkusBinding.map(function(a0) {
|
||||
return a0.id;
|
||||
}), value4, combinedSkusBinding);
|
||||
return Reflect.apply(uniq, value, [items2]);
|
||||
}
|
||||
|
||||
function _fun80738() { // fn#80738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:4459, offset: 0x01e8816b, size: 34 bytes, params: 1, frame: 12
|
||||
const object2 = {};
|
||||
object2.defaultWishlistId = UserProfileStore.getFirstWishlistId(env0_0);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun80739() { // fn#80739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:4569, offset: 0x01e8818d, size: 32 bytes, params: 1, frame: 3
|
||||
return [{userId: env0_0, wishlistId: defaultWishlistId}];
|
||||
}
|
||||
|
||||
function useMemoizedUserIdsAndWishlistIds(a0) { // fn#80742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:5721, owner: useRecommendationsForApplicationIds.useMemoizedUserIdsAndWishlistIds, offset: 0x01e8838f, size: 135 bytes, params: 2, frame: 16
|
||||
const env0_0 = a0;
|
||||
env1_4.useEffect(_fun80743, [a0]);
|
||||
return env1_4.useMemo(_fun80747, [a0,
|
||||
(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([UserProfileStore], _fun80745)]);
|
||||
}
|
||||
|
||||
function _fun80749() { // fn#80749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:6026, offset: 0x01e884d0, size: 40 bytes, params: 1, frame: 14
|
||||
return userIds?.slice(0, 5);
|
||||
}
|
||||
|
||||
function _fun80716() { // fn#80716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:1601, offset: 0x01e8794c, size: 226 bytes, params: 1, frame: 16
|
||||
var r2;
|
||||
var defaultImport;
|
||||
if (userIds.length !== 0) {
|
||||
if (applicationIds.length === 0) {
|
||||
return undefined;
|
||||
}
|
||||
var recommendations = WishlistRecommendationsStore.getRecommendations(userIds, applicationIds);
|
||||
if (recommendations == null) {
|
||||
defaultImport = importDefault(10039) /* metro dependency 10039: WishlistActionCreators */;
|
||||
defaultImport.fetchWishlistRecommendations(applicationIds, userIds, numItems);
|
||||
return undefined;
|
||||
}
|
||||
var state = recommendations.state;
|
||||
if (state === 'loading') {
|
||||
return undefined;
|
||||
}
|
||||
var fetchedAt = recommendations.fetchedAt;
|
||||
var Date = global.Date;
|
||||
var value5 = fetchedAt < Date.now() - env2_9;
|
||||
state = recommendations.state;
|
||||
r2 = state === 'success' && recommendations.data.skus.length >= numItems;
|
||||
if (value5) {
|
||||
defaultImport = importDefault(10039) /* metro dependency 10039: WishlistActionCreators */;
|
||||
defaultImport.fetchWishlistRecommendations(applicationIds, userIds, numItems);
|
||||
return undefined;
|
||||
}
|
||||
if (r2) {
|
||||
return undefined;
|
||||
}
|
||||
defaultImport = importDefault(10039) /* metro dependency 10039: WishlistActionCreators */;
|
||||
defaultImport.fetchWishlistRecommendations(applicationIds, userIds, numItems);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun80721() { // fn#80721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:2247, offset: 0x01e87b79, size: 296 bytes, params: 1, frame: 26
|
||||
var r16;
|
||||
var r3;
|
||||
var r9;
|
||||
var r1;
|
||||
var r13;
|
||||
var r14;
|
||||
var value5;
|
||||
var items2;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var sku;
|
||||
var value9;
|
||||
var isOwned;
|
||||
var applicationIdsFilterBinding;
|
||||
var value10;
|
||||
var includes;
|
||||
var applicationId;
|
||||
var value11;
|
||||
var skuId;
|
||||
var object3;
|
||||
var skuId2;
|
||||
var skuId3;
|
||||
var property;
|
||||
var userId;
|
||||
var WISHLIST;
|
||||
var value12;
|
||||
var value13;
|
||||
const object4 = {};
|
||||
let _createForOfIteratorHelperLoose_80710Binding = _createForOfIteratorHelperLoose_80710;
|
||||
const wishlistsBinding = wishlists;
|
||||
const value3 = _createForOfIteratorHelperLoose_80710Binding(wishlistsBinding.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish));
|
||||
const value4 = value3();
|
||||
let done = value4.done;
|
||||
if (!done) {
|
||||
r3 = value4;
|
||||
while (true) {
|
||||
value5 = r3.value;
|
||||
_createForOfIteratorHelperLoose_80710Binding = _createForOfIteratorHelperLoose_80710;
|
||||
items2 = value5.items;
|
||||
value6 = _createForOfIteratorHelperLoose_80710Binding(items2);
|
||||
value7 = value6();
|
||||
done = value7.done;
|
||||
if (!done) {
|
||||
r9 = value7;
|
||||
while (true) {
|
||||
value8 = r9.value;
|
||||
sku = value8.sku;
|
||||
value9 = sku == null;
|
||||
if (value9) {
|
||||
r1 = value9;
|
||||
} else {
|
||||
isOwned = value8.isOwned;
|
||||
r1 = isOwned;
|
||||
}
|
||||
if (r1) {
|
||||
continue;
|
||||
}
|
||||
value10 = applicationIdsFilter != null;
|
||||
if (!value10) {
|
||||
r13 = value10;
|
||||
continue;
|
||||
}
|
||||
applicationIdsFilterBinding = applicationIdsFilter;
|
||||
includes = applicationIdsFilterBinding.includes;
|
||||
sku = value8.sku;
|
||||
applicationId = sku.applicationId;
|
||||
value11 = !Reflect.apply(includes, applicationIdsFilterBinding, [applicationId]);
|
||||
r13 = value11;
|
||||
r16 = applicationIdsFilterBinding;
|
||||
r1 = r13;
|
||||
if (r1) {
|
||||
continue;
|
||||
}
|
||||
skuId = value8.skuId;
|
||||
object3 = {};
|
||||
skuId2 = value8.skuId;
|
||||
if (object4[skuId2] != null) {
|
||||
skuId3 = value8.skuId;
|
||||
property = object4[skuId3];
|
||||
r14 = property;
|
||||
} else {
|
||||
r14 = {};
|
||||
}
|
||||
copyDataProperties(object3, r14, r16);
|
||||
userId = value5.userId;
|
||||
WISHLIST = WishlistRecommendationReason.WISHLIST;
|
||||
object3[userId] = WISHLIST;
|
||||
object4[skuId] = object3;
|
||||
value12 = value6();
|
||||
done = value12.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r9 = value12;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
value13 = value3();
|
||||
done = value13.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r3 = value13;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun80722() { // fn#80722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:2611, offset: 0x01e87ca1, size: 123 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
const Object = global.Object;
|
||||
const fromEntries = Object.fromEntries;
|
||||
const wishlistsBinding = wishlists;
|
||||
const filter = wishlistsBinding.filter;
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = Reflect.apply(filter, wishlistsBinding,
|
||||
[(require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish]);
|
||||
value = value.flatMap(function(a0) {
|
||||
return a0.items;
|
||||
});
|
||||
value = value.filter(function(a0) {
|
||||
return a0 != null && a0.sku != null && !a0.isOwned && (applicationIdsFilter == null || applicationIdsFilter.includes(a0.sku.applicationId));
|
||||
});
|
||||
return Reflect.apply(fromEntries, Object, [value.map(function(a0) {
|
||||
return [a0.skuId, a0.sku];
|
||||
})]);
|
||||
}
|
||||
|
||||
function _fun80726() { // fn#80726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:2850, offset: 0x01e87d89, size: 64 bytes, params: 1, frame: 12
|
||||
const Object = global.Object;
|
||||
let value = Object.keys(env0_4);
|
||||
value = value.sort(_fun80727);
|
||||
return value.map(_fun80728);
|
||||
}
|
||||
|
||||
function _fun80743() { // fn#80743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:5779, offset: 0x01e88416, size: 30 bytes, params: 1, frame: 11
|
||||
env0_0.forEach(_fun80744);
|
||||
}
|
||||
|
||||
function _fun80745() { // fn#80745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:5865, offset: 0x01e88457, size: 28 bytes, params: 1, frame: 11
|
||||
return env0_0.map(_fun80746);
|
||||
}
|
||||
|
||||
function _fun80747() { // fn#80747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:5957, offset: 0x01e88496, size: 28 bytes, params: 1, frame: 11
|
||||
return env0_0.map(_fun80748);
|
||||
}
|
||||
|
||||
function _fun80727(a0, a1) { // fn#80727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:2875, offset: 0x01e87dc9, size: 162 bytes, params: 3, frame: 15
|
||||
let value = environment.__proto__;
|
||||
const r3 = env1_3[a1] ?? ({});
|
||||
const r5 = env1_3[a0] ?? ({});
|
||||
let Object = global.Object;
|
||||
const length = Object.keys(r3).length;
|
||||
Object = global.Object;
|
||||
const value2 = length - Object.keys(r5).length;
|
||||
if (value2 !== 0) {
|
||||
return value2;
|
||||
}
|
||||
let Boolean = global.Boolean;
|
||||
const idBinding = id;
|
||||
value = Boolean(r3[idBinding]);
|
||||
Boolean = global.Boolean;
|
||||
const value3 = Boolean(r5[idBinding]);
|
||||
let Number = global.Number;
|
||||
const value4 = Number(value3);
|
||||
Number = global.Number;
|
||||
return value4 - Number(value);
|
||||
}
|
||||
|
||||
function _fun80744(a0) { // fn#80744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:5795, offset: 0x01e88434, size: 35 bytes, params: 2, frame: 11
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
(importDefault(8491) /* metro dependency 8491: maybeFetchUserProfile */)(a0);
|
||||
}
|
||||
|
||||
function _fun80746(a0) { // fn#80746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:5876, offset: 0x01e88473, size: 35 bytes, params: 2, frame: 11
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = UserProfileStore.getFirstWishlistId(a0);
|
||||
const value2 = null;
|
||||
return value2 != value ? value : value2;
|
||||
}
|
||||
|
||||
function _fun80748(a0, a1) { // fn#80748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10618:5968, offset: 0x01e884b2, size: 30 bytes, params: 3, frame: 3
|
||||
return {userId: a0, wishlistId: env1_1[a1]};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* Metro module 10435; source: modules/wishlists/hooks/useWishlistSkuFilter.native.tsx; dependencies: [31, 6830, 661, 8354, 10049, 6833, 2] */
|
||||
function _fun80770(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10621:6, offset: 0x01e88b38, size: 158 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(6830) /* metro dependency 6830: WishlistRecommendationRecord */).WishlistRecommendationReason;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).SKUProductLines;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/hooks/useWishlistSkuFilter.native.tsx');
|
||||
exports.useWishlistSkuFilter = useWishlistSkuFilter;
|
||||
}
|
||||
|
||||
function useWishlistSkuFilter({wishlistAndRecommendations, skusToUserAndReason, userId, numItems}) { // fn#80771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10621:283, offset: 0x01e88bd6, size: 212 bytes, params: 2, frame: 19
|
||||
var object2;
|
||||
const env0_2 = userId;
|
||||
const value2 = (require(8354) /* metro dependency 8354: SocialLayerStorefrontMobilePurchasingExperiment */).useIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'use_wishlist_sku_filter'});
|
||||
const binding = env0_2;
|
||||
const value = binding.useMemo(function() {
|
||||
return wishlistAndRecommendations.filter(_fun80773);
|
||||
}, [wishlistAndRecommendations, value2]);
|
||||
object2 = {};
|
||||
object2.totalUnownedWishlistItemCount = binding.useMemo(_fun80774, [value, userId, skusToUserAndReason]);
|
||||
object2.slicedWishlistAndRecommendations = binding.useMemo(_fun80776, [value, numItems]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun80772() { // fn#80772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10621:506, offset: 0x01e88caa, size: 28 bytes, params: 1, frame: 11
|
||||
return wishlistAndRecommendations.filter(_fun80773);
|
||||
}
|
||||
|
||||
function _fun80774() { // fn#80774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10621:727, offset: 0x01e88d49, size: 33 bytes, params: 1, frame: 11
|
||||
const binding = env0_5;
|
||||
return binding.filter(_fun80775).length;
|
||||
}
|
||||
|
||||
function _fun80776() { // fn#80776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10621:846, offset: 0x01e88dae, size: 26 bytes, params: 1, frame: 13
|
||||
const binding = env0_5;
|
||||
return binding.slice(0, numItems);
|
||||
}
|
||||
|
||||
function _fun80773(a0) { // fn#80773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10621:520, offset: 0x01e88cc6, size: 131 bytes, params: 2, frame: 16
|
||||
var r2;
|
||||
var r1;
|
||||
var r0;
|
||||
var value4;
|
||||
var value5;
|
||||
var binding;
|
||||
let value = environment.__proto__.__proto__;
|
||||
const GIFTABLE_PRODUCT_LINES = (require(10049) /* metro dependency 10049: useWishlistGiftableItemsNative */).GIFTABLE_PRODUCT_LINES;
|
||||
const value2 = GIFTABLE_PRODUCT_LINES.has(a0.productLine);
|
||||
if (value2) {
|
||||
value4 = a0.productLine !== SKUProductLines.SOCIAL_LAYER_GAME_ITEM;
|
||||
if (value4) {
|
||||
r1 = value4;
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
binding = env1_4;
|
||||
if (binding) {
|
||||
value = require(6833) /* metro dependency 6833: StorefrontUtils */;
|
||||
value = value.isSlayerSkuAvailableOnThisPlatform(a0);
|
||||
r2 = value;
|
||||
} else {
|
||||
r2 = binding;
|
||||
}
|
||||
r1 = r2;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = !!value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80775(a0) { // fn#80775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10621:741, offset: 0x01e88d6a, size: 68 bytes, params: 2, frame: 4
|
||||
var r0;
|
||||
var property;
|
||||
let value = environment.__proto__;
|
||||
const value2 = skusToUserAndReason[a0.id] != null;
|
||||
if (value2) {
|
||||
property = skusToUserAndReason[a0.id];
|
||||
property = property[userId];
|
||||
value = environment.__proto__.__proto__;
|
||||
value = property === WishlistRecommendationReason.WISHLIST;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 10451; source: modules/wishlists/native/CollectiblesWishlistItemCard.tsx; dependencies: [31, 10374, 33, 7630, 566, 10024, 10029, 1904, 10033, 2] */
|
||||
function _fun80916(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10637:6, offset: 0x01e8f821, size: 158 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const sentGiftsStore = importDefault(10374) /* metro dependency 10374: SentGiftsStore */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/native/CollectiblesWishlistItemCard.tsx');
|
||||
exports.default = CollectiblesWishlistItemCard;
|
||||
}
|
||||
|
||||
function CollectiblesWishlistItemCard(a0) { // fn#80917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10637:231, offset: 0x01e8f8bf, size: 390 bytes, params: 2, frame: 24
|
||||
var r0;
|
||||
const item = a0.item;
|
||||
const source = a0.source;
|
||||
const wishlistOwnerId = a0.wishlistOwnerId;
|
||||
const object2 = {'item': 0, 'source': 0, 'wishlistOwnerId': 0};
|
||||
let value = null;
|
||||
silentSetPrototypeOf(object2, value, undefined);
|
||||
const value2 = copyDataProperties({}, a0, object2, undefined);
|
||||
const value4 = undefined;
|
||||
const value5 = (require(7630) /* metro dependency 7630: CollectiblesProfileFrameGiftingExperiment */).useIsProfileFrameGiftingEnabled('CollectiblesWishlistItemCard');
|
||||
const r6 = item.isOwned || (require(566) /* metro dependency 566: flux */).useStateFromStores([SentGiftsStore],
|
||||
_fun80918, [item.skuId, wishlistOwnerId]);
|
||||
const productNameAndTypeFromItem = (require(10024) /* metro dependency 10024: CollectiblesWishlistUtils */).getProductNameAndTypeFromItem(item);
|
||||
const binding = env0_3;
|
||||
const useCallback = binding.useCallback;
|
||||
let collectiblesItem = item.collectiblesItem;
|
||||
const value8 = Reflect.apply(useCallback, binding, [_fun80919, [item.bundleItems, collectiblesItem, item.sku]]);
|
||||
collectiblesItem = item.collectiblesItem;
|
||||
const type = value == collectiblesItem ? value4 : collectiblesItem.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
if (type !== PROFILE_FRAME) {
|
||||
value = importDefault(10033) /* metro dependency 10033: WishlistItemCardBase */;
|
||||
value = ((Component) => <Component accessibilityLabel={productNameAndTypeFromItem} renderPreview={value8} source={source} isOwned={r6} {...value2} />)(value);
|
||||
r0 = value;
|
||||
} else if (value5) {
|
||||
value = importDefault(10033) /* metro dependency 10033: WishlistItemCardBase */;
|
||||
value = ((Component) => <Component accessibilityLabel={productNameAndTypeFromItem} renderPreview={value8} source={source} isOwned={r6} {...value2} />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun80918() { // fn#80918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10637:425, offset: 0x01e8fa45, size: 50 bytes, params: 1, frame: 14
|
||||
return wishlistOwnerId != null && SentGiftsStore.hasSentGift(item.skuId, wishlistOwnerId);
|
||||
}
|
||||
|
||||
function _fun80919() { // fn#80919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10637:552, offset: 0x01e8fa77, size: 296 bytes, params: 1, frame: 19
|
||||
const CollectiblesPreview = (require(10029) /* metro dependency 10029: SKUPreview */).CollectiblesPreview;
|
||||
const bundleItems = item.bundleItems;
|
||||
const value2 = null;
|
||||
return value2 != bundleItems ? <CollectiblesPreview collectiblesItemData={{type: 'bundle', items: item.bundleItems,
|
||||
previewAssets: value2 != (value2 == item.sku ? undefined : item.sku.previewAssetPaths) ? value2 == item.sku ? undefined : item.sku.previewAssetPaths : undefined}} /> : value2 != item.collectiblesItem ? <CollectiblesPreview collectiblesItemData={{type: 'single',
|
||||
item: item.collectiblesItem}} /> : value2 != item.sku ? ((Component) => <Component sku={item.sku} />)(importDefault(10029) /* metro dependency 10029: SKUPreview */) : value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/* Metro module 10452; source: modules/wishlists/native/PremiumWishlistItemCard.tsx; dependencies: [31, 1878, 1880, 33, 566, 1900, 10029, 10033, 2] */
|
||||
function _fun80920(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10638:6, offset: 0x01e8fb9f, size: 180 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const env0_5 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumSubscriptionSKUToPremiumType;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/native/PremiumWishlistItemCard.tsx');
|
||||
exports.default = PremiumWishlistItemCard;
|
||||
}
|
||||
|
||||
function PremiumWishlistItemCard(a0) { // fn#80921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10638:272, offset: 0x01e8fc53, size: 278 bytes, params: 2, frame: 22
|
||||
var r5;
|
||||
var moduleValue2;
|
||||
const item = a0.item;
|
||||
const source = a0.source;
|
||||
const wishlistOwnerId = a0.wishlistOwnerId;
|
||||
const object2 = {'item': 0, 'source': 0, 'wishlistOwnerId': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object2, undefined);
|
||||
const value3 = undefined;
|
||||
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
||||
return UserStore.getCurrentUser();
|
||||
});
|
||||
const value4 = (currentUser == null ? value3 : currentUser.id) === wishlistOwnerId;
|
||||
if (value4) {
|
||||
moduleValue2 = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
|
||||
r5 = moduleValue2.isPremium(currentUser, PremiumSubscriptionSKUToPremiumType[item.skuId]);
|
||||
} else {
|
||||
r5 = value4;
|
||||
}
|
||||
return ((Component) => <Component accessibilityLabel={item.sku.name} renderPreview={env0_3.useCallback(_fun80923,
|
||||
[])} source={source} isOwned={r5} {...value} />)(importDefault(10033) /* metro dependency 10033: WishlistItemCardBase */);
|
||||
}
|
||||
|
||||
function _fun80923() { // fn#80923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10638:488, offset: 0x01e8fd69, size: 45 bytes, params: 1, frame: 13
|
||||
const PremiumSKUPreview = (require(10029) /* metro dependency 10029: SKUPreview */).PremiumSKUPreview;
|
||||
return <PremiumSKUPreview />;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/* Metro module 10453; source: modules/wishlists/native/SocialLayerStorefrontWishlistItemCard.tsx; dependencies: [31, 4234, 10374, 33, 4501, 697, 566, 8467, 5475, 10033, 2] */
|
||||
function _fun80924(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10639:6, offset: 0x01e8fd96, size: 384 bytes, params: 8, frame: 22
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const sentGiftsStore = importDefault(10374) /* metro dependency 10374: SentGiftsStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.Fragment;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {'position': 'absolute', 'top': null, 'left': null, 'width': 24, 'height': 24, 'borderRadius': null,
|
||||
'zIndex': 1};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.top = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.left = PX_8;
|
||||
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
||||
object4.applicationIcon = object5;
|
||||
const object6 = {'shadowColor': null, 'shadowOffset': null, 'shadowOpacity': 0, 'shadowRadius': 0, 'elevation': 0,
|
||||
'overflow': 'visible'};
|
||||
object6.shadowColor = undefined;
|
||||
object6.shadowOffset = {'width': 0, 'height': 0};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.none;
|
||||
object4.nestedCard = object6;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/native/SocialLayerStorefrontWishlistItemCard.tsx');
|
||||
exports.default = SocialLayerStorefrontWishlistItemCard;
|
||||
}
|
||||
|
||||
function SocialLayerStorefrontWishlistItemCard(a0) { // fn#80925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10639:604, offset: 0x01e8ff16, size: 434 bytes, params: 2, frame: 25
|
||||
const item = a0.item;
|
||||
const source = a0.source;
|
||||
const wishlistOwnerId = a0.wishlistOwnerId;
|
||||
const size = a0.size;
|
||||
const object2 = {'item': 0, 'source': 0, 'wishlistOwnerId': 0, 'size': 0};
|
||||
silentSetPrototypeOf(object2, null, undefined);
|
||||
const value = copyDataProperties({}, a0, object2, undefined);
|
||||
const value2 = undefined;
|
||||
const r6 = item.isOwned || (require(566) /* metro dependency 566: flux */).useStateFromStores([SentGiftsStore],
|
||||
_fun80926, [item.skuId, wishlistOwnerId]);
|
||||
const sku = item.sku;
|
||||
const applicationId = sku == null ? value2 : sku.applicationId;
|
||||
const env0_3 = applicationId;
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStore], _fun80927,
|
||||
[applicationId]);
|
||||
const binding = env0_3;
|
||||
const value6 = binding.useMemo(_fun80928, [value5]);
|
||||
const styles = useStyles();
|
||||
const useCallback = binding.useCallback;
|
||||
return ((Component) => <Component accessibilityLabel={item.skuName} renderPreview={Reflect.apply(useCallback,
|
||||
binding, [_fun80929, [item.sku, size, value6, styles.applicationIcon,
|
||||
styles.nestedCard]])} source={source} isOwned={r6} size={size} {...value} />)(importDefault(10033) /* metro dependency 10033: WishlistItemCardBase */);
|
||||
}
|
||||
|
||||
function _fun80926() { // fn#80926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10639:740, offset: 0x01e900c8, size: 50 bytes, params: 1, frame: 14
|
||||
return wishlistOwnerId != null && SentGiftsStore.hasSentGift(item.skuId, wishlistOwnerId);
|
||||
}
|
||||
|
||||
function _fun80927() { // fn#80927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10639:882, offset: 0x01e900fa, size: 40 bytes, params: 1, frame: 12
|
||||
const applicationIdBinding = applicationId;
|
||||
const value2 = null;
|
||||
return value2 != applicationIdBinding ? ApplicationStore.getApplication(applicationId) : value2;
|
||||
}
|
||||
|
||||
function _fun80928() { // fn#80928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10639:938, offset: 0x01e90122, size: 38 bytes, params: 1, frame: 12
|
||||
return env0_4?.getIconSource(24);
|
||||
}
|
||||
|
||||
function _fun80929() { // fn#80929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10639:1006, offset: 0x01e90148, size: 179 bytes, params: 1, frame: 20
|
||||
var r5;
|
||||
let value = environment.__proto__;
|
||||
const jsxRuntimeEnv1_7Binding = jsxRuntimeEnv1_7;
|
||||
const value3 = ((Component) => <Component sku={item.sku} size={size} containerStyle={styles.nestedCard} />)(importDefault(8467) /* metro dependency 8467: SlayerStorefrontItemCard */);
|
||||
const value4 = env0_5 != null;
|
||||
if (value4) {
|
||||
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
value = ((Component) => <Component source={env0_5} style={styles.applicationIcon} />)(value);
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = value4;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{value3}
|
||||
{r5}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* Metro module 10450; source: modules/wishlists/native/WishlistItemCard.tsx; dependencies: [31, 661, 33, 8354, 10451, 10452, 10453, 2] */
|
||||
function _fun80914(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10636:6, offset: 0x01e8f634, size: 160 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(661) /* metro dependency 661: Constants */).SKUProductLines;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/native/WishlistItemCard.tsx');
|
||||
exports.default = WishlistItemCard;
|
||||
}
|
||||
|
||||
function WishlistItemCard(a0) { // fn#80915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10636:233, offset: 0x01e8f6d4, size: 333 bytes, params: 2, frame: 21
|
||||
var r1;
|
||||
const item = a0.item;
|
||||
const source = a0.source;
|
||||
const wishlistOwnerId = a0.wishlistOwnerId;
|
||||
const object2 = {'item': 0, 'source': 0, 'wishlistOwnerId': 0};
|
||||
let value = null;
|
||||
silentSetPrototypeOf(object2, value, undefined);
|
||||
const value2 = copyDataProperties({}, a0, object2, undefined);
|
||||
const value4 = (require(8354) /* metro dependency 8354: SocialLayerStorefrontMobilePurchasingExperiment */).useIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'wishlist_item_card'});
|
||||
const skuProductLine = item.skuProductLine;
|
||||
const COLLECTIBLES = SKUProductLines.COLLECTIBLES;
|
||||
if (COLLECTIBLES === skuProductLine) {
|
||||
return ((Component) => <Component item={item} source={source} wishlistOwnerId={wishlistOwnerId} {...value2} />)(importDefault(10451) /* metro dependency 10451: CollectiblesWishlistItemCard */);
|
||||
}
|
||||
const PREMIUM = SKUProductLines.PREMIUM;
|
||||
if (PREMIUM === skuProductLine) {
|
||||
return ((Component) => <Component item={item} source={source} wishlistOwnerId={wishlistOwnerId} {...value2} />)(importDefault(10452) /* metro dependency 10452: PremiumWishlistItemCard */);
|
||||
}
|
||||
const SOCIAL_LAYER_GAME_ITEM = SKUProductLines.SOCIAL_LAYER_GAME_ITEM;
|
||||
if (SOCIAL_LAYER_GAME_ITEM === skuProductLine) {
|
||||
if (value4) {
|
||||
value = importDefault(10453) /* metro dependency 10453: SocialLayerStorefrontWishlistItemCard */;
|
||||
value = ((Component) => <Component item={item} source={source} wishlistOwnerId={wishlistOwnerId} {...value2} />)(value);
|
||||
r1 = value;
|
||||
} else {
|
||||
r1 = value;
|
||||
}
|
||||
return r1;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/* Metro module 10033; source: modules/wishlists/native/WishlistItemCardBase.tsx; dependencies: [31, 27, 33, 4501, 697, 3857, 8663, 3868, 8497, 3860, 10034, 1244, 1360, 9294, 2] */
|
||||
function _fun78352(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10219:6, offset: 0x01e26e78, size: 503 bytes, params: 8, frame: 25
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Pressable;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.Fragment;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object6 = {'borderWidth': 1, 'borderRadius': null, 'borderColor': null, 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'overflow': 'hidden'};
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object6.borderColor = BORDER_MUTED;
|
||||
object4.card = object6;
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['justifyContent'] = 'center';
|
||||
object7['alignItems'] = 'center';
|
||||
object7['zIndex'] = 2;
|
||||
object7['shadowOpacity'] = 0.5;
|
||||
object7['shadowRadius'] = 6;
|
||||
object7['elevation'] = 6;
|
||||
object4.ownedOverlay = object7;
|
||||
object4.previewWrap = {'width': '100%', 'height': '100%', 'justifyContent': 'center', 'alignItems': 'center'};
|
||||
object4.ownedCard = {opacity: 0.5};
|
||||
const object8 = {position: 'absolute'};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object8.top = PX_8;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object8.right = PX_8;
|
||||
object8.zIndex = 1;
|
||||
object4.sourceIcon = object8;
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/native/WishlistItemCardBase.tsx');
|
||||
exports.default = WishlistItemCardBase;
|
||||
exports.DEFAULT_ITEM_SIZE = 170;
|
||||
}
|
||||
|
||||
function SourceIcon({toastText}) { // fn#78353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10219:705, offset: 0x01e2706f, size: 164 bytes, params: 2, frame: 19
|
||||
const styles = useStyles();
|
||||
const pressableBindingProps = {'style': null, 'onPress': null, 'accessible': false,
|
||||
'accessibilityElementsHidden': true, 'importantForAccessibility': 'no-hide-descendants',
|
||||
style: styles.sourceIcon, onPress: onPress_78354};
|
||||
const HeartIcon = (require(8663) /* metro dependency 8663: HeartIcon */).HeartIcon;
|
||||
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
|
||||
return (
|
||||
<Pressable {...pressableBindingProps}>
|
||||
<HeartIcon color={INTERACTIVE_ICON_DEFAULT} size="md" />
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
function WishlistItemCardBase({onPress, accessibilityLabel, renderPreview, source, size, isOwned, accessibilityHidden, recipientName}) { // fn#78355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10219:1125, offset: 0x01e27150, size: 903 bytes, params: 2, frame: 33
|
||||
var r0;
|
||||
size = size === undefined ? 170 : size;
|
||||
isOwned = !(isOwned === undefined) && isOwned;
|
||||
var value;
|
||||
const styles = useStyles();
|
||||
const {theme, primaryColor, secondaryColor} = (require(3868) /* metro dependency 3868: native */).useThemeContext();
|
||||
const useUserProfileColorsModule = require(8497) /* metro dependency 8497: useUserProfileColors */;
|
||||
const useUserProfileColors = useUserProfileColorsModule.useUserProfileColors;
|
||||
const containerBackground = Reflect.apply(useUserProfileColors, useUserProfileColorsModule, [{theme: theme,
|
||||
primaryColor: primaryColor, secondaryColor: secondaryColor}]).containerBackground;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BG_SURFACE_RAISED = (importDefault(697) /* metro dependency 697: native */).colors.BG_SURFACE_RAISED;
|
||||
const r5 = primaryColor == null ? Reflect.apply(useToken, useTokenModule, [BG_SURFACE_RAISED]) : containerBackground;
|
||||
items3 = [styles.card];
|
||||
items3[1] = {backgroundColor: r5};
|
||||
items3[2] = typeof size === 'object' ? {width: size.width, height: size.height} : {width: size, aspectRatio: 1};
|
||||
const WishlistItemSource = (require(10034) /* metro dependency 10034: useWishlistHooks */).WishlistItemSource;
|
||||
const WISHLIST = WishlistItemSource.WISHLIST;
|
||||
const value5 = source === WISHLIST;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const value6 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.p3RmJF,
|
||||
{username: recipientName});
|
||||
const items2 = [accessibilityLabel];
|
||||
items2[1] = isOwned ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6cfuDj']) : null;
|
||||
items2[2] = value5 ? value6 : null;
|
||||
const value9 = items2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish).join(', ');
|
||||
const value10 = 'no-hide-descendants';
|
||||
const CheckmarkLargeBoldIcon = (require(9294) /* metro dependency 9294: CheckmarkLargeBoldIcon */).CheckmarkLargeBoldIcon;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
||||
const fragment = <><View style={[styles.previewWrap,
|
||||
isOwned && styles.ownedCard]} {...{['aria-hidden']: true}}>{renderPreview()}</View>{isOwned && <View style={styles.ownedOverlay} pointerEvents="none" accessibilityElementsHidden importantForAccessibility="no-hide-descendants"><CheckmarkLargeBoldIcon color={WHITE} size="custom" style={{'width': 40,
|
||||
'height': 40}} /></View>}{value5 && <SourceIcon toastText={value6} />}</>;
|
||||
if (onPress == null) {
|
||||
value = 'auto';
|
||||
value = <View style={items3} accessibilityElementsHidden={accessibilityHidden} importantForAccessibility={accessibilityHidden ? value10 : value}>{fragment}</View>;
|
||||
r0 = value;
|
||||
} else {
|
||||
value = 'auto';
|
||||
value = <Pressable accessibilityRole="button" accessibilityLabel={value9} style={items3} onPress={onPress} accessibilityElementsHidden={accessibilityHidden} importantForAccessibility={accessibilityHidden ? value10 : value}>{fragment}</Pressable>;
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function SourceIconOnPress() { // fn#78354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10219:789, owner: SourceIcon.onPress, offset: 0x01e27113, size: 61 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'WISHLIST_SOURCE_ICON',
|
||||
content: toastText});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 10454; source: modules/wishlists/native/WishlistViewMoreCard.tsx; dependencies: [31, 27, 33, 4501, 697, 1244, 10450, 4573, 2] */
|
||||
function _fun80930(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10640:6, offset: 0x01e901fb, size: 221 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.Pressable;
|
||||
const env0_4 = value.StyleSheet;
|
||||
const env0_5 = value.View;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() {
|
||||
var r7;
|
||||
var object2 = {};
|
||||
copyDataProperties(object2, StyleSheet.absoluteFillObject, r7);
|
||||
object2['borderRadius'] = importDefault(dependencyMap[4]).radii.lg;
|
||||
object2['backgroundColor'] = importDefault(dependencyMap[4]).colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT;
|
||||
object2['justifyContent'] = 'center';
|
||||
object2['alignItems'] = 'center';
|
||||
return {moreOverlay: object2};
|
||||
});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/native/WishlistViewMoreCard.tsx');
|
||||
exports.default = WishlistViewMoreCard;
|
||||
}
|
||||
|
||||
function WishlistViewMoreCard({item, size, recipientName, overflowCount, onPress}) { // fn#80932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10640:494, offset: 0x01e90354, size: 316 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
const object2 = {onPress: onPress};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['8uYD+I'],
|
||||
{username: recipientName});
|
||||
const value2 = ((Component) => <Component accessibilityHidden item={item} size={size} recipientName={recipientName} />)(importDefault(10450) /* metro dependency 10450: WishlistItemCard */);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const format = intl.format;
|
||||
const F6iMs4 = (require(1244) /* metro dependency 1244: indexNative */).t.F6iMs4;
|
||||
return (
|
||||
<Pressable {...object2}>
|
||||
{value2}
|
||||
<View style={styles.moreOverlay}>
|
||||
<Text variant="text-md/semibold" color="always-white">
|
||||
{Reflect.apply(format, intl, [F6iMs4, {count: overflowCount}])}
|
||||
</Text>
|
||||
</View>
|
||||
</Pressable>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
/* Metro module 10026; source: modules/wishlists/records/BaseWishlistItemRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 4273, 2] */
|
||||
function _fun78313(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10212:6, offset: 0x01e25384, size: 214 bytes, params: 8, frame: 18
|
||||
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 */;
|
||||
let value = importDefault(1886) /* metro dependency 1886: Record */;
|
||||
const skuRecord = importDefault(4273) /* metro dependency 4273: SKURecord */;
|
||||
value = _fun78317(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/records/BaseWishlistItemRecord.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_78314() { // fn#78314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10212:168, offset: 0x01e2545a, 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_78314_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun78317(a0) { // fn#78317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10212:367, offset: 0x01e254bc, size: 75 bytes, params: 2, frame: 16
|
||||
const closure = BaseWishlistItemRecord;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, null, [{key: 'fromServer', value: value_78319}]);
|
||||
}
|
||||
|
||||
function BaseWishlistItemRecord({sku_id, sku_product_line, sku_name, is_owned, gifter_user_id, sku}) { // fn#78318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10212:379, offset: 0x01e25507, size: 183 bytes, params: 2, frame: 20
|
||||
let value = environment.__proto__;
|
||||
env1_0(this, BaseWishlistItemRecord);
|
||||
const value3 = env1_3(BaseWishlistItemRecord);
|
||||
value = env1_2(this, _isNativeReflectConstruct_78314() ? global.Reflect.construct(value3, [],
|
||||
env1_3(this).constructor) : value3.apply(this, undefined));
|
||||
value.skuId = sku_id;
|
||||
value.skuProductLine = sku_product_line;
|
||||
value.skuName = sku_name;
|
||||
value.isOwned = is_owned;
|
||||
value.gifterUserId = gifter_user_id;
|
||||
value.sku = sku;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_78319(a0) { // fn#78319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10212:852, offset: 0x01e255be, size: 198 bytes, params: 2, frame: 20
|
||||
var r3;
|
||||
const sku_id = a0.sku_id;
|
||||
const sku_product_line = a0.sku_product_line;
|
||||
const sku_name = a0.sku_name;
|
||||
const is_owned = a0.is_owned;
|
||||
const gifter_user_id = a0.gifter_user_id;
|
||||
const sku = a0.sku;
|
||||
const object3 = {'sku_id': 0, 'sku_product_line': 0, 'sku_name': 0, 'is_owned': 0, 'gifter_user_id': 0, 'sku': 0};
|
||||
silentSetPrototypeOf(object3, null, undefined);
|
||||
let value = copyDataProperties({}, a0, object3, sku_id);
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, value, object3);
|
||||
object4['sku_id'] = sku_id;
|
||||
object4['sku_product_line'] = sku_product_line;
|
||||
object4['sku_name'] = sku_name;
|
||||
object4['is_owned'] = is_owned;
|
||||
object4['gifter_user_id'] = gifter_user_id;
|
||||
value = undefined;
|
||||
if (sku != null) {
|
||||
value = environment.__proto__;
|
||||
value = SKURecord.createFromServer(sku);
|
||||
r3 = value;
|
||||
} else {
|
||||
r3 = value;
|
||||
}
|
||||
object4['sku'] = r3;
|
||||
value = Object.create(BaseWishlistItemRecord.prototype, {constructor: {value: BaseWishlistItemRecord}});
|
||||
const baseWishlistItemRecord = new BaseWishlistItemRecord(object4);
|
||||
return baseWishlistItemRecord instanceof Object ? baseWishlistItemRecord : value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,284 @@
|
||||
/* Metro module 10025; source: modules/wishlists/records/CollectiblesWishlistItemRecord.tsx; dependencies: [6, 7, 15, 17, 18, 5126, 5125, 1902, 5127, 5128, 4273, 10026, 661, 1904, 2] */
|
||||
function _fun78300(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10211:6, offset: 0x01e24c4f, size: 380 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_78303 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
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 avatarDecorationRecord = importDefault(5126) /* metro dependency 5126: AvatarDecorationRecord */;
|
||||
const env0_8 = (require(5125) /* metro dependency 5125: CollectiblesItemRecord */).transformSKUToCollectiblesItem;
|
||||
const nameplateRecord = importDefault(1902) /* metro dependency 1902: NameplateRecord */;
|
||||
const profileEffectRecord = importDefault(5127) /* metro dependency 5127: ProfileEffectRecord */;
|
||||
const profileFrameRecord = importDefault(5128) /* metro dependency 5128: ProfileFrameRecord */;
|
||||
const skuRecord = importDefault(4273) /* metro dependency 4273: SKURecord */;
|
||||
let value = importDefault(10026) /* metro dependency 10026: BaseWishlistItemRecord */;
|
||||
const env0_13 = (require(661) /* metro dependency 661: Constants */).SKUProductLines;
|
||||
value = _fun78308(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/records/CollectiblesWishlistItemRecord.tsx');
|
||||
exports.default = value;
|
||||
exports.isCollectiblesWishlistItemRecord = isCollectiblesWishlistItemRecord;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_78301(a0, a1) { // fn#78301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10211:282, offset: 0x01e24dcb, 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 _fun78302;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_78303(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') {
|
||||
value = _arrayLikeToArray_78303(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_78303(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun78302;
|
||||
}
|
||||
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 _isNativeReflectConstruct_78304() { // fn#78304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10211:1192, offset: 0x01e24f3f, 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_78304_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function createCollectiblesItemFromServerResponse(a0) { // fn#78307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10211:1430, offset: 0x01e24fa1, size: 223 bytes, params: 2, frame: 15
|
||||
const type = a0.type;
|
||||
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
|
||||
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
|
||||
if (AVATAR_DECORATION === type) {
|
||||
return AvatarDecorationRecord.fromServer(a0);
|
||||
}
|
||||
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
|
||||
if (PROFILE_EFFECT === type) {
|
||||
return ProfileEffectRecord.fromServer(a0);
|
||||
}
|
||||
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
|
||||
if (NAMEPLATE === type) {
|
||||
return NameplateRecord.fromServer(a0);
|
||||
}
|
||||
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
|
||||
if (PROFILE_FRAME === type) {
|
||||
return ProfileFrameRecord.fromServer(a0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function _fun78308(a0) { // fn#78308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10211:1766, offset: 0x01e25080, size: 100 bytes, params: 2, frame: 17
|
||||
const closure = CollectiblesWishlistItemRecord;
|
||||
env0_6(closure, a0);
|
||||
return env0_3(closure, null, [{key: 'fromServer', value: value_78310}, {key: 'fromSKU', value: value_78311}]);
|
||||
}
|
||||
|
||||
function isCollectiblesWishlistItemRecord(a0) { // fn#78312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10211:3320, offset: 0x01e25374, size: 16 bytes, params: 2, frame: 2
|
||||
return a0 instanceof env0_15;
|
||||
}
|
||||
|
||||
function CollectiblesWishlistItemRecord(a0) { // fn#78309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10211:1778, offset: 0x01e250e4, size: 397 bytes, params: 2, frame: 21
|
||||
var r3;
|
||||
var value7;
|
||||
var value8;
|
||||
var done;
|
||||
var value9;
|
||||
var collectiblesItemFromServerResponse;
|
||||
var value10;
|
||||
let value = environment.__proto__;
|
||||
env1_2(this, CollectiblesWishlistItemRecord);
|
||||
let items2 = [a0];
|
||||
const value3 = env1_5(CollectiblesWishlistItemRecord);
|
||||
const value6 = env1_4(this, _isNativeReflectConstruct_78304() ? global.Reflect.construct(value3, items2,
|
||||
env1_5(this).constructor) : value3.apply(this, items2));
|
||||
const COLLECTIBLES = SKUProductLines.COLLECTIBLES;
|
||||
value6.skuProductLine = COLLECTIBLES;
|
||||
if (a0.bundle_items != null) {
|
||||
items2 = [];
|
||||
value7 = _createForOfIteratorHelperLoose_78301(a0.bundle_items);
|
||||
value8 = value7();
|
||||
done = value8.done;
|
||||
if (!done) {
|
||||
r3 = value8;
|
||||
while (true) {
|
||||
value9 = r3.value;
|
||||
collectiblesItemFromServerResponse = createCollectiblesItemFromServerResponse(value9);
|
||||
if (collectiblesItemFromServerResponse != null) {
|
||||
items2.push(collectiblesItemFromServerResponse);
|
||||
}
|
||||
value10 = value7();
|
||||
done = value10.done;
|
||||
if (done) {
|
||||
break;
|
||||
}
|
||||
r3 = value10;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (items2.length === 0) {
|
||||
throw new global.Error('Bundle has no valid items');
|
||||
}
|
||||
value6.bundleItems = items2;
|
||||
return value6;
|
||||
}
|
||||
if (a0.collectibles_item != null) {
|
||||
value = createCollectiblesItemFromServerResponse(a0.collectibles_item);
|
||||
if (value == null) {
|
||||
throw new global.Error('Collectibles item not found');
|
||||
}
|
||||
value6.collectiblesItem = value;
|
||||
return value6;
|
||||
}
|
||||
if (a0.skipValidation) {
|
||||
return value6;
|
||||
}
|
||||
const Error = global.Error;
|
||||
throw new Error('Collectibles wishlist item missing both collectibles_item and bundle_items');
|
||||
}
|
||||
|
||||
function value_78310(a0) { // fn#78310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10211:2752, offset: 0x01e25271, size: 97 bytes, params: 2, frame: 15
|
||||
var r3;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, a0, undefined);
|
||||
const sku = a0.sku;
|
||||
let value = undefined;
|
||||
if (sku != null) {
|
||||
value = environment.__proto__;
|
||||
value = SKURecord.createFromServer(a0.sku);
|
||||
r3 = value;
|
||||
} else {
|
||||
r3 = value;
|
||||
}
|
||||
object2['sku'] = r3;
|
||||
value = Object.create(CollectiblesWishlistItemRecord.prototype,
|
||||
{constructor: {value: CollectiblesWishlistItemRecord}});
|
||||
const collectiblesWishlistItemRecord = new CollectiblesWishlistItemRecord(object2);
|
||||
return collectiblesWishlistItemRecord instanceof Object ? collectiblesWishlistItemRecord : value;
|
||||
}
|
||||
|
||||
function value_78311(a0) { // fn#78311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10211:2886, offset: 0x01e252d2, size: 162 bytes, params: 2, frame: 16
|
||||
const value = environment.__proto__;
|
||||
const transformSKUToCollectiblesItemBinding = transformSKUToCollectiblesItem;
|
||||
const value2 = undefined;
|
||||
const value3 = transformSKUToCollectiblesItemBinding(a0);
|
||||
if (value3 == null) {
|
||||
return null;
|
||||
}
|
||||
const COLLECTIBLES = SKUProductLines.COLLECTIBLES;
|
||||
const collectiblesWishlistItemRecord = new CollectiblesWishlistItemRecord({sku_id: a0.id,
|
||||
sku_product_line: COLLECTIBLES, sku_name: a0.name, sku: a0, skipValidation: true});
|
||||
collectiblesWishlistItemRecord.collectiblesItem = value3.type !== 'single' ? value2 : value3.item;
|
||||
collectiblesWishlistItemRecord.bundleItems = value3.type !== 'bundle' ? value2 : value3.items;
|
||||
return collectiblesWishlistItemRecord;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* Metro module 10037; source: modules/wishlists/records/PremiumWishlistItemRecord.tsx; dependencies: [6, 7, 15, 17, 18, 4273, 10026, 661, 2] */
|
||||
function _fun78437(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10223:6, offset: 0x01e2903e, size: 253 bytes, params: 8, frame: 19
|
||||
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 */;
|
||||
let value = importDefault(10026) /* metro dependency 10026: BaseWishlistItemRecord */;
|
||||
const env0_6 = (require(661) /* metro dependency 661: Constants */).SKUProductLines;
|
||||
value = _fun78441(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/records/PremiumWishlistItemRecord.tsx');
|
||||
exports.default = value;
|
||||
exports.isPremiumWishlistItemRecord = isPremiumWishlistItemRecord;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_78438() { // fn#78438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10223:194, offset: 0x01e2913b, 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_78438_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun78441(a0) { // fn#78441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10223:393, offset: 0x01e2919d, size: 100 bytes, params: 2, frame: 17
|
||||
const closure = PremiumWishlistItemRecord;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, null, [{key: 'fromServer', value: value_78443}, {key: 'fromSKU', value: value_78444}]);
|
||||
}
|
||||
|
||||
function isPremiumWishlistItemRecord(a0) { // fn#78445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10223:1226, offset: 0x01e29363, size: 16 bytes, params: 2, frame: 2
|
||||
return a0 instanceof env0_7;
|
||||
}
|
||||
|
||||
function PremiumWishlistItemRecord(a0) { // fn#78442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10223:405, offset: 0x01e29201, size: 143 bytes, params: 2, frame: 21
|
||||
env1_0(this, PremiumWishlistItemRecord);
|
||||
const items2 = [a0];
|
||||
const value3 = env1_3(PremiumWishlistItemRecord);
|
||||
const value6 = env1_2(this, _isNativeReflectConstruct_78438() ? global.Reflect.construct(value3, items2,
|
||||
env1_3(this).constructor) : value3.apply(this, items2));
|
||||
const PREMIUM = SKUProductLines.PREMIUM;
|
||||
value6.skuProductLine = PREMIUM;
|
||||
value6.sku = a0.sku;
|
||||
return value6;
|
||||
}
|
||||
|
||||
function value_78444(a0) { // fn#78444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10223:959, offset: 0x01e2930a, size: 89 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
var object2;
|
||||
let value = null;
|
||||
if (value == a0) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.sku_id = a0.id;
|
||||
value = environment.__proto__;
|
||||
object2.sku_product_line = SKUProductLines.PREMIUM;
|
||||
object2.sku_name = a0.name;
|
||||
object2.sku = a0;
|
||||
r0 = new PremiumWishlistItemRecord();
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* Metro module 10038; source: modules/wishlists/records/SKUWishlistItemRecord.tsx; dependencies: [6, 7, 15, 17, 18, 4273, 10026, 2] */
|
||||
function _fun78446(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10224:6, offset: 0x01e29373, size: 231 bytes, params: 8, frame: 18
|
||||
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 */;
|
||||
let value = importDefault(10026) /* metro dependency 10026: BaseWishlistItemRecord */;
|
||||
value = _fun78450(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/records/SKUWishlistItemRecord.tsx');
|
||||
exports.default = value;
|
||||
exports.isSKUWishlistItemRecord = isSKUWishlistItemRecord;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_78447() { // fn#78447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10224:158, offset: 0x01e2945a, 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_78447_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun78450(a0) { // fn#78450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10224:357, offset: 0x01e294bc, size: 100 bytes, params: 2, frame: 17
|
||||
const closure = SKUWishlistItemRecord;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, null, [{key: 'fromServer', value: value_78452}, {key: 'fromSKU', value: function(a0) {
|
||||
var value = null;
|
||||
return value == a0 ? value : new SKUWishlistItemRecord();
|
||||
}}]);
|
||||
}
|
||||
|
||||
function isSKUWishlistItemRecord(a0) { // fn#78454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10224:1172, offset: 0x01e29603, size: 16 bytes, params: 2, frame: 2
|
||||
return a0 instanceof env0_6;
|
||||
}
|
||||
|
||||
function SKUWishlistItemRecord(a0) { // fn#78451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10224:369, offset: 0x01e29520, size: 145 bytes, params: 2, frame: 20
|
||||
let value = environment.__proto__;
|
||||
env1_0(this, SKUWishlistItemRecord);
|
||||
const items2 = [a0];
|
||||
const value3 = env1_3(SKUWishlistItemRecord);
|
||||
value = env1_2(this, _isNativeReflectConstruct_78447() ? global.Reflect.construct(value3, items2,
|
||||
env1_3(this).constructor) : value3.apply(this, items2));
|
||||
value.skuProductLine = a0.sku.productLine;
|
||||
value.sku = a0.sku;
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/* Metro module 6830; source: modules/wishlists/records/WishlistRecommendationRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 4273, 4235, 2] */
|
||||
function _fun53709(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7008:6, offset: 0x013541cb, size: 254 bytes, params: 8, frame: 18
|
||||
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 */;
|
||||
let value = importDefault(1886) /* metro dependency 1886: Record */;
|
||||
const skuRecord = importDefault(4273) /* metro dependency 4273: SKURecord */;
|
||||
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
|
||||
value = _fun53713(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/records/WishlistRecommendationRecord.tsx');
|
||||
exports.default = value;
|
||||
exports.WishlistRecommendationReason = {WISHLIST: 'WISHLIST', RECOMMENDATION: 'RECOMMENDATION'};
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_53710() { // fn#53710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7008:178, offset: 0x013542c9, 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_53710_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun53713(a0) { // fn#53713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7008:461, offset: 0x01354327, size: 71 bytes, params: 2, frame: 16
|
||||
const closure = WishlistRecommendationRecord;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, null, [{key: 'fromServer', value: value_53718}]);
|
||||
}
|
||||
|
||||
function WishlistRecommendationRecord({skus, skus_to_user_and_reason, applications}) { // fn#53714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7008:473, offset: 0x0135436e, size: 230 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
env1_0(this, WishlistRecommendationRecord);
|
||||
let value3 = env1_3(WishlistRecommendationRecord);
|
||||
value = env1_2(this, _isNativeReflectConstruct_53710() ? global.Reflect.construct(value3, [],
|
||||
env1_3(this).constructor) : value3.apply(this, undefined));
|
||||
value.skus = skus.map(function(a0) {
|
||||
return SKURecord.createFromServer(a0);
|
||||
});
|
||||
const Object = global.Object;
|
||||
const fromEntries = Object.fromEntries;
|
||||
const Object2 = global.Object;
|
||||
const value4 = Object2.entries(skus_to_user_and_reason);
|
||||
value.skusToUserAndReason = Reflect.apply(fromEntries, Object, [value4.map(function(a0) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r3;
|
||||
var item3;
|
||||
var value3;
|
||||
var iterator = a0[Symbol.iterator]();
|
||||
var iterator2 = iterator.next;
|
||||
var item2 = Reflect.apply(iterator2, iterator, []);
|
||||
var item = item2.value;
|
||||
item2 = item2.done ? undefined : iterator;
|
||||
var value = undefined;
|
||||
var value2 = item2 === value;
|
||||
var r2 = value2 ? value : item;
|
||||
if (value2) {
|
||||
r0 = item2;
|
||||
r1 = value;
|
||||
r3 = value2;
|
||||
} else {
|
||||
item3 = Reflect.apply(iterator2, item2, []);
|
||||
item = item3.value;
|
||||
item3 = item3.done ? undefined : item2;
|
||||
value3 = item3 === value;
|
||||
if (value3) {
|
||||
r0 = item3;
|
||||
r1 = value;
|
||||
r3 = value3;
|
||||
} else {
|
||||
r0 = item3;
|
||||
r1 = item;
|
||||
r3 = value3;
|
||||
}
|
||||
}
|
||||
if (!r3) {
|
||||
r0.return();
|
||||
}
|
||||
return [r2, r1];
|
||||
})]);
|
||||
value.applications = applications.map(function(a0) {
|
||||
return ApplicationRecord.createFromServer(a0);
|
||||
});
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
/* Metro module 10036; source: modules/wishlists/records/WishlistRecord.tsx; dependencies: [6, 7, 15, 17, 18, 1886, 4235, 10026, 10025, 10037, 10038, 661, 2] */
|
||||
function _fun78422(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10222:6, offset: 0x01e28bde, size: 339 bytes, params: 8, frame: 19
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let 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 */;
|
||||
let value = importDefault(1886) /* metro dependency 1886: Record */;
|
||||
const applicationRecord = importDefault(4235) /* metro dependency 4235: ApplicationRecord */;
|
||||
const baseWishlistItemRecord = importDefault(10026) /* metro dependency 10026: BaseWishlistItemRecord */;
|
||||
const collectiblesWishlistItemRecord = importDefault(10025) /* metro dependency 10025: CollectiblesWishlistItemRecord */;
|
||||
const premiumWishlistItemRecord = importDefault(10037) /* metro dependency 10037: PremiumWishlistItemRecord */;
|
||||
const skuWishlistItemRecord = importDefault(10038) /* metro dependency 10038: SKUWishlistItemRecord */;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).SKUProductLines;
|
||||
value = _fun78426(value);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/wishlists/records/WishlistRecord.tsx');
|
||||
exports.default = value;
|
||||
exports.getWishlistSkuIds = function({items}) {
|
||||
return items.map(_fun78432);
|
||||
};
|
||||
exports.wishlistHasSkuId = function(a0, a1) {
|
||||
var env0_0 = a1;
|
||||
return a0.items.some(_fun78434);
|
||||
};
|
||||
exports.getWishlistProductLines = function(a0) {
|
||||
var Set = global.Set;
|
||||
var value = a0.items.map(_fun78436);
|
||||
var value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
value = new Set(value);
|
||||
return value instanceof Object ? value : value2;
|
||||
};
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_78423() { // fn#78423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10222:236, offset: 0x01e28d31, 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_78423_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun78426(a0) { // fn#78426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10222:435, offset: 0x01e28d93, size: 75 bytes, params: 2, frame: 16
|
||||
const closure = WishlistRecord;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, null, [{key: 'fromServer', value: value_78428}]);
|
||||
}
|
||||
|
||||
function getWishlistSkuIds({items}) { // fn#78431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10222:1367, offset: 0x01e28fb5, size: 30 bytes, params: 2, frame: 11
|
||||
return items.map(function(a0) {
|
||||
return a0.skuId;
|
||||
});
|
||||
}
|
||||
|
||||
function wishlistHasSkuId({items}, a1) { // fn#78433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10222:1451, offset: 0x01e28fd3, size: 38 bytes, params: 3, frame: 11
|
||||
const env0_0 = a1;
|
||||
return items.some(function({skuId}) {
|
||||
return skuId === require;
|
||||
});
|
||||
}
|
||||
|
||||
function getWishlistProductLines({items}) { // fn#78435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10222:1548, offset: 0x01e28ff9, size: 58 bytes, params: 2, frame: 12
|
||||
const Set = global.Set;
|
||||
const value = items.map(function(a0) {
|
||||
return a0.skuProductLine;
|
||||
});
|
||||
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set(value);
|
||||
return set instanceof Object ? set : value2;
|
||||
}
|
||||
|
||||
function WishlistRecord({id, userId, items, applications}) { // fn#78427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10222:447, offset: 0x01e28dde, size: 171 bytes, params: 2, frame: 20
|
||||
let value = environment.__proto__;
|
||||
env1_0(this, WishlistRecord);
|
||||
const value4 = env1_3(WishlistRecord);
|
||||
value = env1_2(this, _isNativeReflectConstruct_78423() ? global.Reflect.construct(value4, [],
|
||||
env1_3(this).constructor) : value4.apply(this, undefined));
|
||||
value.id = id;
|
||||
value.userId = userId;
|
||||
value.items = items;
|
||||
value.applications = applications ?? undefined;
|
||||
return value;
|
||||
}
|
||||
|
||||
function value_78428(a0) { // fn#78428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10222:836, offset: 0x01e28e89, size: 178 bytes, params: 2, frame: 18
|
||||
const user_id = a0.user_id;
|
||||
const wishlist_items = a0.wishlist_items;
|
||||
let value = Object.create(null);
|
||||
value.user_id = 0;
|
||||
value.wishlist_items = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, user_id);
|
||||
const value3 = wishlist_items.map(function(a0) {
|
||||
var sku_product_line = a0.sku_product_line;
|
||||
if (SKUProductLines.COLLECTIBLES === sku_product_line) {
|
||||
return CollectiblesWishlistItemRecord.fromServer(a0);
|
||||
}
|
||||
if (SKUProductLines.SOCIAL_LAYER_GAME_ITEM === sku_product_line) {
|
||||
return SKUWishlistItemRecord.fromServer(a0);
|
||||
}
|
||||
if (SKUProductLines.PREMIUM === sku_product_line) {
|
||||
return PremiumWishlistItemRecord.fromServer(a0);
|
||||
}
|
||||
return BaseWishlistItemRecord.fromServer(a0);
|
||||
});
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, value2, value);
|
||||
object2['userId'] = user_id;
|
||||
object2['items'] = value3;
|
||||
const applications = value2.applications;
|
||||
value = undefined;
|
||||
object2['applications'] = (applications == null ? value : applications.map(function(a0) {
|
||||
return ApplicationRecord.createFromServer(a0);
|
||||
})) ?? value;
|
||||
value = Object.create(WishlistRecord.prototype, {constructor: {value: WishlistRecord}});
|
||||
const wishlistRecord = new WishlistRecord(object2);
|
||||
return wishlistRecord instanceof Object ? wishlistRecord : value;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user