This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,16 +1,19 @@
/* Metro module 10434; source: modules/wishlists/hooks/useWishlistApplicationIds.native.tsx; dependencies: [31, 661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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');
(FileImportTrackerModule).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 ReactModule.useMemo(function() {
return [COLLECTIBLES_APPLICATION_ID];
}, []);
}
}
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];
}, []);
}
global.__d(_fun80767, 10434, [31, 661, 2]) /* metro module 10434, dependencies: [31, 661, 2] */;
@@ -1,34 +1,38 @@
/* Metro module 10049; source: modules/wishlists/hooks/useWishlistGiftableItems.native.tsx; dependencies: [31, 661, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
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 SKUProductLines = (ConstantsModule).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');
(FileImportTrackerModule).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 = ReactModule == null ? undefined : ReactModule.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;
}
}
}
}
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;
}
global.__d(_fun78591, 10049, [31, 661, 2]) /* metro module 10049, dependencies: [31, 661, 2] */;
@@ -1,4 +1,15 @@
/* 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] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UserProfileStore from '../../user_profile/UserProfileStore.tsx'; /* Metro dependency 5189 */
import WishlistStore from '../WishlistStore.tsx'; /* Metro dependency 10035 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as WishlistRecordModule from '../records/WishlistRecord.tsx'; /* Metro dependency 10036 */
import * as UseGetOrFetchStorefrontPricesModule from '../../storefront/hooks/useGetOrFetchStorefrontPrices.tsx'; /* Metro dependency 10040 */
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) {
@@ -47,26 +58,18 @@ function _fun78356(global, require, importDefault, importAll, module, exports, d
const getUserWishlistKey = function(a0, a1) {
return a1 != null ? '' + a0 + ':' + a1 : '' + a0 + ':default';
};
const closure = useFetchWishlist;
const closure2 = useFetchWishlistAndProfileInfoForUser;
const useFetchWishlist2 = useFetchWishlist;
const useFetchWishlistAndProfileInfoForUser2 = 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');
(FileImportTrackerModule).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.useFetchWishlist = useFetchWishlist2;
exports.useIsSkuInWishlist = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
@@ -77,384 +80,419 @@ function _fun78356(global, require, importDefault, importAll, module, exports, d
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)) {
exports.useFetchWishlistAndProfileInfoForUser = useFetchWishlistAndProfileInfoForUser2;
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);
}
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') {
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);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_78359(a0, value);
r6 = value;
} else {
r6 = value;
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;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun78358;
}
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;
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 _fun78358() { // fn#78358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:782, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
}
function _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 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 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 property32 = property3;
const property4 = value3[3];
(UseGetOrFetchStorefrontPricesModule).useGetOrFetchStorefrontPricesForSkuIds({skuIds: property32.useMemo(_fun78363,
[property])});
const useStateFromStores = FluxModule.useStateFromStores;
useEffect(_fun78365, [wishlistId, source, property, Reflect.apply(useStateFromStores, FluxModule,
[[UserProfileStore], _fun78364]), property4, property3]);
return {wishlist: property, isFetching: property2 === 'fetching',
wasFetched: property2 === 'success' || property2 === 'error', error: property3};
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
var r0;
var value2;
var wishlistStoreBinding;
var getWishlist;
var items2;
let wishlistIdBinding = wishlistId;
if (wishlistIdBinding == null) {
r0 = [null, 'success', undefined, undefined];
} else {
value2 = environment.__proto__;
wishlistStoreBinding = WishlistStore;
getWishlist = wishlistStoreBinding.getWishlist;
wishlistIdBinding = wishlistId;
items2 = [Reflect.apply(getWishlist, wishlistStoreBinding, [wishlistIdBinding])];
wishlistStoreBinding = WishlistStore;
items2[1] = wishlistStoreBinding.getStatus(wishlistIdBinding);
wishlistStoreBinding = WishlistStore;
items2[2] = wishlistStoreBinding.getError(wishlistIdBinding);
wishlistStoreBinding = WishlistStore;
items2[3] = wishlistStoreBinding.getUpdatedAt(wishlistIdBinding);
r0 = items2;
}
return r0;
}
}
}
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 _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 (Module00057 == null) {
r0 = [];
} else {
value2 = environment.__proto__;
moduleValue = require(22) /* metro dependency 22 */;
r0 = moduleValue.uniq(getWishlistSkuIds(Module00057));
}
return r0;
}
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;
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;
var userProfileStoreBinding;
if (wishlistId != null) {
isFetching = WishlistStore.isFetching;
if (Reflect.apply(isFetching, WishlistStore, [wishlistId])) {
break;
if (userId != null) {
value2 = environment.__proto__;
userProfileStoreBinding = UserProfileStore;
return userProfileStoreBinding.getWishlistSettings(userId, wishlistId)?.updated_at;
}
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 _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 ? ReactModule != null : r1;
if (!r1) {
if (Module00057 == null || env0_6 != null && ReactModule.useEffect !== env0_6) {
value8 = environment.__proto__;
defaultImport = importDefault(10039) /* metro dependency 10039: WishlistActionCreators */;
defaultImport.fetchWishlist(wishlistId, env0_6, env0_2);
}
}
}
}
}
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 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
const env0_0 = a0;
const user = (FluxModule).useStateFromStores([UserStore], _fun78367);
const {userProfile,
wishlistId} = (FluxModule).useStateFromStoresObject([UserProfileStore],
_fun78368, [a0]);
ReactModule.useEffect(_fun78369, [user, a0, userProfile]);
object = {};
copyDataProperties(object, useFetchWishlist({wishlistId: wishlistId, userId: a0}), undefined);
object['wishlistId'] = wishlistId;
object['userProfile'] = userProfile;
return object;
function _fun78367() { // fn#78367, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:2144, offset: 0x01c503a4, size: 27 bytes, params: 1, frame: 11
return UserStore.getUser(env0_0);
}
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 object = {};
const value2 = null;
object.userProfile = value2 != env0_0 ? UserProfileStore.getUserProfile(env0_0) : value2;
object.wishlistId = value2 != env0_0 ? UserProfileStore.getFirstWishlistId(env0_0) : value2;
return object;
}
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 _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 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 useMemo = ReactModule.useMemo;
useEffect(_fun78381, [wishlistIdsAndUsers, source, Reflect.apply(useMemo, ReactModule, [function() {
wishlistIdsAndUsers.forEach(_fun78380);
return {};
}, [wishlistIdsAndUsers, value5]])]);
return {wishlists: value2, isFetching: value3, errors: value4};
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 _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 _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 _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 _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 _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 _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 _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 _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 _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 _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];
}
}
}
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 wishlistStoreBinding;
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, wishlistStoreBinding, [wishlistId])) {
break;
}
wishlistStoreBinding = WishlistStore;
getError = wishlistStoreBinding.getError;
if (Reflect.apply(getError, wishlistStoreBinding, [wishlistId]) != null) {
break;
}
wishlist = WishlistStore.getWishlist(wishlistId);
updatedAt = WishlistStore.getUpdatedAt(wishlistId);
binding = Module00057;
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 _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;
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 (FluxModule).useStateFromStores([WishlistStore], _fun78383);
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);
}
}
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;
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 = (FluxModule).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 _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 && (ReactModule.length > 0 || isSocialLayerStorefrontEnabled && Module00057.length > 0);
}
}
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 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 useStateFromStores = FluxModule.useStateFromStores;
return useFetchWishlistAndProfileInfoForUser(Reflect.apply(useStateFromStores, FluxModule, [[AuthenticationStore],
function() {
return AuthenticationStore.getId();
}]));
function _fun78389() { // fn#78389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10220:4709, offset: 0x01e283d6, size: 19 bytes, params: 1, frame: 9
return AuthenticationStore.getId();
}
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];
}
}
global.__d(_fun78356, 10034, [57, 31, 5189, 1226, 1878, 10035, 10036, 566, 10039, 22, 10040, 8491, 10044, 10049,
2]) /* metro module 10034, dependencies: [57, 31, 5189, 1226, 1878, 10035, 10036, 566, 10039, 22, 10040, 8491, 10044, 10049, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,90 +1,95 @@
/* Metro module 10435; source: modules/wishlists/hooks/useWishlistSkuFilter.native.tsx; dependencies: [31, 6830, 661, 8354, 10049, 6833, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as WishlistRecommendationRecordModule from '../records/WishlistRecommendationRecord.tsx'; /* Metro dependency 6830 */
import * as SocialLayerStorefrontMobilePurchasingExperimentModule from '../../slayer_storefront/experiments/SocialLayerStorefrontMobilePurchasingExperiment.tsx'; /* Metro dependency 8354 */
import * as UseWishlistGiftableItemsNativeModule from './useWishlistGiftableItems.native.tsx'; /* Metro dependency 10049 */
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');
(FileImportTrackerModule).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;
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
const userId2 = userId;
const value2 = (SocialLayerStorefrontMobilePurchasingExperimentModule).useIsEligibleForSocialLayerStorefrontMobilePurchasing({location: 'use_wishlist_sku_filter'});
const binding = userId2;
const value = binding.useMemo(function() {
return wishlistAndRecommendations.filter(_fun80773);
}, [wishlistAndRecommendations, value2]);
object = {};
object.totalUnownedWishlistItemCount = binding.useMemo(_fun80774, [value, userId, skusToUserAndReason]);
object.slicedWishlistAndRecommendations = binding.useMemo(_fun80776, [value, numItems]);
return object;
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 _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 = (UseWishlistGiftableItemsNativeModule).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;
}
r1 = r2;
}
r0 = r1;
} else {
r0 = !!value2;
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 _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;
}
}
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);
}
}
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;
}
global.__d(_fun80770, 10435, [31, 6830, 661, 8354, 10049, 6833,
2]) /* metro module 10435, dependencies: [31, 6830, 661, 8354, 10049, 6833, 2] */;