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

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -1,34 +1,38 @@
/* Metro module 10023; source: modules/collectibles/CollectiblesAnalyticsContext.tsx; dependencies: [31, 33, 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 JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun78291(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10209:6, offset: 0x01e24803, size: 169 bytes, params: 8, frame: 19
const closure = useCollectiblesAnalyticsContext;
const useCollectiblesAnalyticsContext2 = useCollectiblesAnalyticsContext;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.createContext(null);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/CollectiblesAnalyticsContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/CollectiblesAnalyticsContext.tsx');
exports.CollectiblesAnalyticsContext = value;
exports.useCollectiblesAnalyticsContext = closure;
exports.useCollectiblesAnalyticsContext = useCollectiblesAnalyticsContext2;
exports.CollectiblesAnalyticsProvider = CollectiblesAnalyticsProvider;
function useCollectiblesAnalyticsContext() { // fn#78292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10209:144, offset: 0x01e248ac, size: 24 bytes, params: 1, frame: 11
return env0_0.useContext(env0_2);
}
function CollectiblesAnalyticsProvider({newValue, children}) { // fn#78293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10209:428, offset: 0x01e248c4, size: 103 bytes, params: 2, frame: 18
const value3 = newValue.useMemo(_fun78294, [useCollectiblesAnalyticsContext(), newValue]);
const Provider = env0_2.Provider;
return (
<Provider value={value3}>
{children}
</Provider>
);
function _fun78294() { // fn#78294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10209:545, offset: 0x01e2492b, size: 29 bytes, params: 1, frame: 12
const object = {};
copyDataProperties(object, newValue, copyDataProperties(object, JsxRuntimeModule.jsx, undefined));
return object;
}
}
}
function useCollectiblesAnalyticsContext() { // fn#78292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10209:144, offset: 0x01e248ac, size: 24 bytes, params: 1, frame: 11
return env0_0.useContext(env0_2);
}
function CollectiblesAnalyticsProvider({newValue, children}) { // fn#78293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10209:428, offset: 0x01e248c4, size: 103 bytes, params: 2, frame: 18
const value3 = newValue.useMemo(_fun78294, [useCollectiblesAnalyticsContext(), newValue]);
const Provider = env0_2.Provider;
return (
<Provider value={value3}>
{children}
</Provider>
);
}
function _fun78294() { // fn#78294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10209:545, offset: 0x01e2492b, size: 29 bytes, params: 1, frame: 12
const object2 = {};
copyDataProperties(object2, newValue, copyDataProperties(object2, env0_1, undefined));
return object2;
}
global.__d(_fun78291, 10023, [31, 33, 2]) /* metro module 10023, dependencies: [31, 33, 2] */;
@@ -1,4 +1,15 @@
/* Metro module 5121; source: modules/collectibles/CollectiblesCategoryStore.tsx; dependencies: [6, 7, 15, 17, 18, 1949, 5122, 22, 5134, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import LocaleStore from '../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import CollectiblesCategoryRecord from './records/CollectiblesCategoryRecord.tsx'; /* Metro dependency 5122 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CollectiblesUtilsModule from './CollectiblesUtils.tsx'; /* Metro dependency 5134 */
function _fun44956(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:6, offset: 0x0117d4c0, size: 594 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_44962 = function(a0, a1) {
@@ -46,13 +57,6 @@ function _fun44956(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const collectiblesCategoryRecord = importDefault(5122) /* metro dependency 5122: CollectiblesCategoryRecord */;
let Map = global.Map;
let map = new Map();
Map = global.Map;
@@ -64,8 +68,8 @@ function _fun44956(global, require, importDefault, importAll, module, exports, d
const env0_13 = [];
const env0_14 = {};
let env0_21 = {};
const closure = LOGOUT_44968;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const LOGOUT_449682 = LOGOUT_44968;
const Store = (Flux).Store;
_fun44969(Store).displayName = 'CollectiblesCategoryStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
{COLLECTIBLES_CATEGORIES_FETCH: function(a0) {
@@ -81,427 +85,481 @@ function _fun44956(global, require, importDefault, importAll, module, exports, d
COLLECTIBLES_SHOP_HOME_FETCH_SUCCESS: COLLECTIBLES_SHOP_HOME_FETCH_SUCCESS,
COLLECTIBLES_SKIP_NUM_CATEGORIES: function(a0) {
env0_22 = a0.skipNumCategories;
}, LOGOUT: closure});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/CollectiblesCategoryStore.tsx');
}, LOGOUT: LOGOUT_449682});
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/CollectiblesCategoryStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_44957() { // fn#44957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:170, offset: 0x0117d712, 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_44957_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_44960(a0, a1) { // fn#44960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:363, offset: 0x0117d770, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
function _isNativeReflectConstruct_44957() { // fn#44957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:170, offset: 0x0117d712, 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 _fun44961;
return (_isNativeReflectConstruct_44957_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_44962(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
function _createForOfIteratorHelperLoose_44960(a0, a1) { // fn#44960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:363, offset: 0x0117d770, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun44961;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_44962(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_44962(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_44962(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun44961;
}
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 _fun44961() { // fn#44961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:934, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function updateCategoriesAndProducts(a0) { // fn#44963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:1412, offset: 0x0117d8e2, size: 291 bytes, params: 2, frame: 23
env0_15 = a0;
let Map = global.Map;
const value2 = a0.values();
const items2 = [];
arraySpread(items2, value2, 0, undefined);
let map = items2.map;
map = new Map(Reflect.apply(map, items2, [function(a0) {
return [a0.storeListingId, a0];
}]));
Map = global.Map;
map = new Map(CollectiblesUtilsModule.getProductsFromCategories(env0_15, true).map(function(a0) {
return [a0.skuId, a0];
}));
env0_11.forEach(_fun44966);
Map = global.Map;
const value11 = CollectiblesUtilsModule.getProductsFromCategories(env0_15, false).map(function(a0) {
return [a0.storeListingId, a0];
});
const value12 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map(value11);
arraySpread([], (map instanceof Object ? map : value12).values(), 0, CollectiblesUtilsModule);
function _fun44966(a0) { // fn#44966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:1567, offset: 0x0117da32, size: 52 bytes, params: 2, frame: 14
let binding = env0_0;
if (!binding.has(a0.skuId)) {
binding = env0_0;
binding.set(a0.skuId, a0);
}
}
}
function LOGOUT_44968() { // fn#44968, offset: 0x0117da66, size: 59 bytes, params: 1, frame: 3
env0_14 = {};
env0_21 = {};
}
function _fun44969(a0) { // fn#44969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:1781, offset: 0x0117daa1, size: 471 bytes, params: 2, frame: 16
const CollectiblesCategoryStore2 = CollectiblesCategoryStore;
Inherits(CollectiblesCategoryStore2, a0);
return CreateClass(CollectiblesCategoryStore2, [{key: 'initialize', value: function() {
this.syncWith([LocaleStore], LOGOUT_44968);
}}, {key: 'isFetchingCategories', get: get_44972}, {key: 'isFetchingProduct', value: value_44973}, {key: 'error',
get: get_44974}, {key: 'lastErrorTimestamp', get: get_44975}, {key: 'lastSuccessfulFetch', get: get_44976},
{key: 'lastFetchOptions', get: get_44977}, {key: 'categories', get: get_44978}, {key: 'products',
get: get_44979}, {key: 'productsWithVariantsAsGroup', get: get_44980}, {key: 'skipNumCategories',
get: get_44981}, {key: 'getCategory', value: value_44982}, {key: 'getProduct', value: value_44983},
{key: 'getProductsBySkus', value: function(a0) {
return a0.map(_fun44985).filter(_fun44986);
}}, {key: 'getProductFetch', value: value_44987}, {key: 'getProductByStoreListingId', value: value_44988},
{key: 'getCategoryByStoreListingId', value: value_44989}, {key: 'getCategoryForProduct', value: function(a0) {
return this.getCategory(this.getProduct(a0)?.categorySkuId);
}}]);
function CollectiblesCategoryStore() { // fn#44970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:1793, offset: 0x0117dc78, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, CollectiblesCategoryStore);
const value3 = env1_5(CollectiblesCategoryStore);
return env1_4(this, _isNativeReflectConstruct_44957() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function get_44972() { // fn#44972, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1
return env1_17;
}
function value_44973(a0) { // fn#44973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2259, offset: 0x0117dd0f, size: 47 bytes, params: 2, frame: 4
var r0;
var property;
let value = a0 != null;
if (value) {
value = environment.__proto__;
property = env1_14[a0];
value = undefined;
value = (property == null ? value : property.state) === 'fetching';
r0 = value;
} else {
r0 = value;
}
return r0;
}
function get_44974() { // fn#44974, offset: 0x00df0e82, size: 9 bytes, params: 1, frame: 1
return env1_18;
}
function get_44975() { // fn#44975, offset: 0x00e4253a, size: 9 bytes, params: 1, frame: 1
return env1_20;
}
function get_44976() { // fn#44976, offset: 0x00d406a2, size: 9 bytes, params: 1, frame: 1
return env1_19;
}
function get_44977() { // fn#44977, offset: 0x00f854d6, size: 9 bytes, params: 1, frame: 1
return env1_21;
}
function get_44978() { // fn#44978, offset: 0x00df0e8b, size: 9 bytes, params: 1, frame: 1
return env1_15;
}
function get_44979() { // fn#44979, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function get_44980() { // fn#44980, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
function get_44981() { // fn#44981, offset: 0x00e425c8, size: 9 bytes, params: 1, frame: 1
return env1_22;
}
function value_44982(a0) { // fn#44982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2757, offset: 0x0117dd3e, size: 33 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__;
value = env1_15.get(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_44983(a0) { // fn#44983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2826, offset: 0x0117dd5f, size: 33 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__;
value = env1_11.get(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_44984(a0) { // fn#44984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2902, offset: 0x0117dd80, size: 37 bytes, params: 2, frame: 12
return a0.map(_fun44985).filter(function(a0) {
return a0 != null;
});
function _fun44985(a0) { // fn#44985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2928, offset: 0x0117dda5, size: 22 bytes, params: 2, frame: 11
return env2_11.get(a0);
}
}
function value_44987(a0) { // fn#44987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2994, offset: 0x0117ddbb, size: 27 bytes, params: 2, frame: 3
return a0 != null ? env1_14[a0] : undefined;
}
function value_44988(a0) { // fn#44988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:3075, offset: 0x0117ddd6, size: 33 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__;
value = env1_12.get(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_44989(a0) { // fn#44989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:3161, offset: 0x0117ddf7, size: 33 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__;
value = env1_16.get(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
function COLLECTIBLES_CATEGORIES_FETCH_SUCCESS(a0) { // fn#44992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:3526, offset: 0x0117de68, size: 340 bytes, params: 2, frame: 20
var r7;
var map;
var moduleValue;
var isEqual;
var value2;
var items2;
var Map;
var value3;
var prototype;
var value4;
var value5;
var Date;
var value6;
var date;
var value7;
let categories = a0.categories;
let collections = categories.collections;
if (collections.length > 0) {
collections = a0.categories.collections;
r7 = collections.map(CollectiblesCategoryRecord.fromStorefrontCollectionRecord);
} else {
categories = a0.categories;
categories = categories.categories;
r7 = categories;
}
if (r7.length !== 0) {
moduleValue = require(22) /* metro dependency 22 */;
isEqual = moduleValue.isEqual;
value2 = env0_15.values();
items2 = [];
arraySpread(items2, value2, 0, 0);
if (!Reflect.apply(isEqual, moduleValue, [items2, r7])) {
if (!a0.noOp) {
Map = global.Map;
value3 = r7.map(function(a0) {
return [a0.skuId, a0];
});
prototype = Map.prototype;
value4 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
value5 = map instanceof Object ? map : value4;
Date = global.Date;
prototype = Date.prototype;
value6 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value7 = date instanceof Object ? date : value6;
env0_15.forEach(_fun44994);
updateCategoriesAndProducts(value5);
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun44961;
}
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 updateCategoriesAndProducts(a0) { // fn#44963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:1412, offset: 0x0117d8e2, size: 291 bytes, params: 2, frame: 23
env0_15 = a0;
let Map = global.Map;
const value2 = a0.values();
const items2 = [];
arraySpread(items2, value2, 0, undefined);
let map = items2.map;
map = new Map(Reflect.apply(map, items2, [function(a0) {
return [a0.storeListingId, a0];
}]));
Map = global.Map;
const collectiblesUtilsModule = require(5134) /* metro dependency 5134: CollectiblesUtils */;
map = new Map(collectiblesUtilsModule.getProductsFromCategories(env0_15, true).map(function(a0) {
return [a0.skuId, a0];
}));
env0_11.forEach(_fun44966);
Map = global.Map;
const value11 = collectiblesUtilsModule.getProductsFromCategories(env0_15, false).map(function(a0) {
return [a0.storeListingId, a0];
});
const value12 = Object.create(Map.prototype, {constructor: {value: Map}});
map = new Map(value11);
arraySpread([], (map instanceof Object ? map : value12).values(), 0, collectiblesUtilsModule);
}
function LOGOUT_44968() { // fn#44968, offset: 0x0117da66, size: 59 bytes, params: 1, frame: 3
env0_14 = {};
env0_21 = {};
}
function _fun44969(a0) { // fn#44969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:1781, offset: 0x0117daa1, size: 471 bytes, params: 2, frame: 16
const closure = CollectiblesCategoryStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.syncWith([LocaleStore], LOGOUT_44968);
}}, {key: 'isFetchingCategories', get: get_44972}, {key: 'isFetchingProduct', value: value_44973}, {key: 'error',
get: get_44974}, {key: 'lastErrorTimestamp', get: get_44975}, {key: 'lastSuccessfulFetch', get: get_44976},
{key: 'lastFetchOptions', get: get_44977}, {key: 'categories', get: get_44978}, {key: 'products',
get: get_44979}, {key: 'productsWithVariantsAsGroup', get: get_44980}, {key: 'skipNumCategories',
get: get_44981}, {key: 'getCategory', value: value_44982}, {key: 'getProduct', value: value_44983},
{key: 'getProductsBySkus', value: function(a0) {
return a0.map(_fun44985).filter(_fun44986);
}}, {key: 'getProductFetch', value: value_44987}, {key: 'getProductByStoreListingId', value: value_44988},
{key: 'getCategoryByStoreListingId', value: value_44989}, {key: 'getCategoryForProduct', value: function(a0) {
return this.getCategory(this.getProduct(a0)?.categorySkuId);
}}]);
}
function COLLECTIBLES_CATEGORIES_FETCH_SUCCESS(a0) { // fn#44992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:3526, offset: 0x0117de68, size: 340 bytes, params: 2, frame: 20
var r7;
var map;
var moduleValue;
var isEqual;
var value2;
var items2;
var Map;
var value3;
var prototype;
var value4;
var value5;
var Date;
var value6;
var date;
var value7;
let categories = a0.categories;
let collections = categories.collections;
if (collections.length > 0) {
collections = a0.categories.collections;
r7 = collections.map(CollectiblesCategoryRecord.fromStorefrontCollectionRecord);
} else {
categories = a0.categories;
categories = categories.categories;
r7 = categories;
}
if (r7.length !== 0) {
moduleValue = require(22) /* metro dependency 22 */;
isEqual = moduleValue.isEqual;
value2 = env0_15.values();
items2 = [];
arraySpread(items2, value2, 0, 0);
if (!Reflect.apply(isEqual, moduleValue, [items2, r7])) {
if (!a0.noOp) {
Map = global.Map;
value3 = r7.map(function(a0) {
return [a0.skuId, a0];
});
prototype = Map.prototype;
value4 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
value5 = map instanceof Object ? map : value4;
Date = global.Date;
prototype = Date.prototype;
value6 = Object.create(prototype, {constructor: {value: Date}});
date = new Date();
value7 = date instanceof Object ? date : value6;
env0_15.forEach(_fun44994);
updateCategoriesAndProducts(value5);
Date = global.Date;
const value = Date.now();
function _fun44994(a0, a1) { // fn#44994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:3797, offset: 0x0117dfbc, size: 83 bytes, params: 3, frame: 16
if (!env0_0.has(a1) && (a0.unpublishedAt == null || a0.unpublishedAt > env0_1)) {
env0_0.set(a1, a0);
}
}
}
Date = global.Date;
const value = Date.now();
}
function COLLECTIBLES_CATEGORIES_FETCH_FAILURE({error}) { // fn#44995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:3980, offset: 0x0117e00f, size: 68 bytes, params: 2, frame: 10
env0_14 = {};
const Date = global.Date;
env0_20 = Date.now();
}
function COLLECTIBLES_CATEGORIES_FETCH_FAILURE({error}) { // fn#44995, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:3980, offset: 0x0117e00f, size: 68 bytes, params: 2, frame: 10
env0_14 = {};
const Date = global.Date;
env0_20 = Date.now();
}
function COLLECTIBLES_PRODUCT_FETCH({skuId, startedAt}) { // fn#44996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:4057, offset: 0x0117e053, size: 44 bytes, params: 2, frame: 5
env0_14[skuId] = {state: 'fetching', startedAt: startedAt};
}
function COLLECTIBLES_PRODUCT_FETCH({skuId, startedAt}) { // fn#44996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:4057, offset: 0x0117e053, size: 44 bytes, params: 2, frame: 5
env0_14[skuId] = {state: 'fetching', startedAt: startedAt};
}
function COLLECTIBLES_PRODUCT_FETCH_SUCCESS({skuId, product, endedAt}) { // fn#44997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:4155, offset: 0x0117e07f, size: 352 bytes, params: 2, frame: 26
var r2;
var r13;
var Object;
var keys;
var prices;
var length;
var bundledProducts;
var Map;
var map;
var value3;
var _createForOfIteratorHelperLoose_44960Binding;
var value6;
var value7;
var done;
var value8;
var skuId2;
var value9;
var value10;
var value11;
var value12;
const value2 = env0_11.get(skuId);
if (value2 != null) {
Object = global.Object;
keys = Object.keys;
prices = product.prices;
length = Reflect.apply(keys, Object, [prices]).length;
if (length === 0) {
prices = value2.prices;
product.prices = prices;
bundledProducts = value2.bundledProducts;
if (bundledProducts != null) {
bundledProducts = product.bundledProducts;
function COLLECTIBLES_PRODUCT_FETCH_SUCCESS({skuId, product, endedAt}) { // fn#44997, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:4155, offset: 0x0117e07f, size: 352 bytes, params: 2, frame: 26
var r2;
var r13;
var Object;
var keys;
var prices;
var length;
var bundledProducts;
var Map;
var map;
var value3;
var _createForOfIteratorHelperLoose_44960Binding;
var value6;
var value7;
var done;
var value8;
var skuId2;
var value9;
var value10;
var value11;
var value12;
const value2 = env0_11.get(skuId);
if (value2 != null) {
Object = global.Object;
keys = Object.keys;
prices = product.prices;
length = Reflect.apply(keys, Object, [prices]).length;
if (length === 0) {
prices = value2.prices;
product.prices = prices;
bundledProducts = value2.bundledProducts;
if (bundledProducts != null) {
Map = global.Map;
bundledProducts = value2.bundledProducts;
value3 = bundledProducts.map(function(a0) {
return [a0.skuId, a0.prices];
});
map = new Map();
_createForOfIteratorHelperLoose_44960Binding = _createForOfIteratorHelperLoose_44960;
bundledProducts = product.bundledProducts;
value6 = _createForOfIteratorHelperLoose_44960Binding(bundledProducts);
value7 = value6();
done = value7.done;
if (!done) {
r2 = value7;
while (true) {
value8 = r2.value;
get = map.get;
skuId2 = value8.skuId;
value9 = Reflect.apply(get, map, [skuId2]);
value10 = value9 != null;
if (value10) {
Object = global.Object;
keys = Object.keys;
prices = value8.prices;
length = Reflect.apply(keys, Object, [prices]).length;
value11 = length === 0;
r13 = value11;
} else {
r13 = value10;
}
if (!r13) {
if (bundledProducts != null) {
Map = global.Map;
bundledProducts = value2.bundledProducts;
value3 = bundledProducts.map(function(a0) {
return [a0.skuId, a0.prices];
});
map = new Map();
_createForOfIteratorHelperLoose_44960Binding = _createForOfIteratorHelperLoose_44960;
bundledProducts = product.bundledProducts;
value6 = _createForOfIteratorHelperLoose_44960Binding(bundledProducts);
value7 = value6();
done = value7.done;
if (!done) {
r2 = value7;
while (true) {
value8 = r2.value;
get = map.get;
skuId2 = value8.skuId;
value9 = Reflect.apply(get, map, [skuId2]);
value10 = value9 != null;
if (value10) {
Object = global.Object;
keys = Object.keys;
prices = value8.prices;
length = Reflect.apply(keys, Object, [prices]).length;
value11 = length === 0;
r13 = value11;
} else {
r13 = value10;
}
if (!r13) {
continue;
}
value8.prices = value9;
value12 = value6();
done = value12.done;
if (done) {
break;
}
r2 = value12;
continue;
}
value8.prices = value9;
value12 = value6();
done = value12.done;
if (done) {
break;
}
r2 = value12;
continue;
}
}
}
}
}
env0_11.set(skuId, product);
env0_14[skuId] = {state: 'success', startedAt: env0_14[skuId]?.startedAt, endedAt: endedAt};
}
env0_11.set(skuId, product);
env0_14[skuId] = {state: 'success', startedAt: env0_14[skuId]?.startedAt, endedAt: endedAt};
}
function COLLECTIBLES_PRODUCT_FETCH_FAILURE({skuId, error, endedAt}) { // fn#44999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:4669, offset: 0x0117e1fb, size: 83 bytes, params: 2, frame: 9
env0_14[skuId] = {state: 'error', startedAt: env0_14[skuId]?.startedAt, endedAt: endedAt, error: error};
}
function COLLECTIBLES_SHOP_HOME_FETCH_SUCCESS(a0) { // fn#45000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:4828, offset: 0x0117e24e, size: 160 bytes, params: 2, frame: 16
var Map;
var map;
var value;
var prototype;
var value2;
var updateCategoriesAndProductsBinding;
var binding;
var items2;
if (a0.shopHome.categories.length !== 0) {
Map = global.Map;
value = a0.shopHome.categories.map(function(a0) {
return [a0.skuId, a0];
});
prototype = Map.prototype;
value2 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
value = map instanceof Object ? map : value2;
updateCategoriesAndProductsBinding = updateCategoriesAndProducts;
Map = global.Map;
binding = env0_15;
items2 = [];
arraySpread(items2, value, arraySpread(items2, binding, 0, 0), 0);
prototype = Map.prototype;
value = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
value = map instanceof Object ? map : value;
updateCategoriesAndProductsBinding(value);
function COLLECTIBLES_PRODUCT_FETCH_FAILURE({skuId, error, endedAt}) { // fn#44999, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:4669, offset: 0x0117e1fb, size: 83 bytes, params: 2, frame: 9
env0_14[skuId] = {state: 'error', startedAt: env0_14[skuId]?.startedAt, endedAt: endedAt, error: error};
}
}
function _fun44966(a0) { // fn#44966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:1567, offset: 0x0117da32, size: 52 bytes, params: 2, frame: 14
let binding = env0_0;
if (!binding.has(a0.skuId)) {
binding = env0_0;
binding.set(a0.skuId, a0);
function COLLECTIBLES_SHOP_HOME_FETCH_SUCCESS(a0) { // fn#45000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:4828, offset: 0x0117e24e, size: 160 bytes, params: 2, frame: 16
var Map;
var map;
var value;
var prototype;
var value2;
var updateCategoriesAndProductsBinding;
var binding;
var items2;
if (a0.shopHome.categories.length !== 0) {
Map = global.Map;
value = a0.shopHome.categories.map(function(a0) {
return [a0.skuId, a0];
});
prototype = Map.prototype;
value2 = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
value = map instanceof Object ? map : value2;
updateCategoriesAndProductsBinding = updateCategoriesAndProducts;
Map = global.Map;
binding = env0_15;
items2 = [];
arraySpread(items2, value, arraySpread(items2, binding, 0, 0), 0);
prototype = Map.prototype;
value = Object.create(prototype, {constructor: {value: Map}});
map = new Map();
value = map instanceof Object ? map : value;
updateCategoriesAndProductsBinding(value);
}
}
}
function value_44973(a0) { // fn#44973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2259, offset: 0x0117dd0f, size: 47 bytes, params: 2, frame: 4
var r0;
var property;
let value = a0 != null;
if (value) {
value = environment.__proto__;
property = env1_14[a0];
value = undefined;
value = (property == null ? value : property.state) === 'fetching';
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_44982(a0) { // fn#44982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2757, offset: 0x0117dd3e, size: 33 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__;
value = env1_15.get(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_44983(a0) { // fn#44983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2826, offset: 0x0117dd5f, size: 33 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__;
value = env1_11.get(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_44984(a0) { // fn#44984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2902, offset: 0x0117dd80, size: 37 bytes, params: 2, frame: 12
return a0.map(_fun44985).filter(function(a0) {
return a0 != null;
});
}
function value_44987(a0) { // fn#44987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2994, offset: 0x0117ddbb, size: 27 bytes, params: 2, frame: 3
return a0 != null ? env1_14[a0] : undefined;
}
function value_44988(a0) { // fn#44988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:3075, offset: 0x0117ddd6, size: 33 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__;
value = env1_12.get(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_44989(a0) { // fn#44989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:3161, offset: 0x0117ddf7, size: 33 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__;
value = env1_16.get(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun44994(a0, a1) { // fn#44994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:3797, offset: 0x0117dfbc, size: 83 bytes, params: 3, frame: 16
if (!env0_0.has(a1) && (a0.unpublishedAt == null || a0.unpublishedAt > env0_1)) {
env0_0.set(a1, a0);
}
}
function _fun44985(a0) { // fn#44985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2928, offset: 0x0117dda5, size: 22 bytes, params: 2, frame: 11
return env2_11.get(a0);
function _fun44986(a0) { // fn#44986, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5299:2950, offset: 0x00d0b2f0, size: 11 bytes, params: 2, frame: 2
return a0 != null;
}
global.__d(_fun44956, 5121, [6, 7, 15, 17, 18, 1949, 5122, 22, 5134, 566, 694,
2]) /* metro module 5121, dependencies: [6, 7, 15, 17, 18, 1949, 5122, 22, 5134, 566, 694, 2] */;
@@ -1,48 +1,52 @@
/* Metro module 5144; source: modules/collectibles/CollectiblesDebugStore.tsx; dependencies: [629, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00629Module from '../../by-id/module-00629.js'; /* Metro dependency 629 */
function _fun45387(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:6, offset: 0x0118dbc8, size: 122 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(function(a0) {
var env0_0 = a0;
return {logs: [], addLog: _fun45389, clearLogs: _fun45391};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/CollectiblesDebugStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/CollectiblesDebugStore.tsx');
exports.useCollectiblesDebugStore = value;
exports.addDebugLog = addDebugLog;
function _fun45388(a0) { // fn#45388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:114, offset: 0x0118dc42, size: 42 bytes, params: 2, frame: 3
const env0_0 = a0;
return {logs: [], addLog: function(a0) {
return a0(_fun45390);
}, clearLogs: clearLogs};
function addLog_45389(a0) { // fn#45389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:134, offset: 0x0118dc6c, size: 30 bytes, params: 2, frame: 11
return a0(_fun45390);
function _fun45390({logs}) { // fn#45390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:140, offset: 0x0118dc8a, size: 136 bytes, params: 2, frame: 18
const items2 = [];
const value = arraySpread(items2, logs, 0, undefined);
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
const value4 = (date instanceof Object ? date : value2).toISOString();
items2[value] = '[' + value4.split('T')[0] + '] ' + env0_0;
value + 1;
return {logs: items2};
}
}
function clearLogs() { // fn#45391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:227, offset: 0x0118dd12, size: 27 bytes, params: 1, frame: 11
return env0_0({logs: []});
}
}
function addDebugLog(a0) { // fn#45392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:373, offset: 0x0118dd2d, size: 116 bytes, params: 2, frame: 17
const Date = global.Date;
let date = new Date();
date = date.toLocaleTimeString('en-US', {hour12: false});
env0_0.getState().addLog('[' + date + '] ' + a0);
}
}
function _fun45388(a0) { // fn#45388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:114, offset: 0x0118dc42, size: 42 bytes, params: 2, frame: 3
const env0_0 = a0;
return {logs: [], addLog: function(a0) {
return a0(_fun45390);
}, clearLogs: clearLogs};
}
function addDebugLog(a0) { // fn#45392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:373, offset: 0x0118dd2d, size: 116 bytes, params: 2, frame: 17
const Date = global.Date;
let date = new Date();
date = date.toLocaleTimeString('en-US', {hour12: false});
env0_0.getState().addLog('[' + date + '] ' + a0);
}
function addLog_45389(a0) { // fn#45389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:134, offset: 0x0118dc6c, size: 30 bytes, params: 2, frame: 11
return a0(_fun45390);
}
function clearLogs() { // fn#45391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:227, offset: 0x0118dd12, size: 27 bytes, params: 1, frame: 11
return env0_0({logs: []});
}
function _fun45390({logs}) { // fn#45390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5322:140, offset: 0x0118dc8a, size: 136 bytes, params: 2, frame: 18
const items2 = [];
const value = arraySpread(items2, logs, 0, undefined);
const Date = global.Date;
const value2 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
const value4 = (date instanceof Object ? date : value2).toISOString();
items2[value] = '[' + value4.split('T')[0] + '] ' + env0_0;
value + 1;
return {logs: items2};
}
global.__d(_fun45387, 5144, [629, 2]) /* metro module 5144, dependencies: [629, 2] */;
@@ -1,98 +1,104 @@
/* Metro module 13089; source: modules/collectibles/CollectiblesMarketingManager.native.tsx; dependencies: [6, 7, 15, 17, 18, 4649, 5120, 5185, 694, 4561, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import LifecycleManager from '../../lib/LifecycleManager.tsx'; /* Metro dependency 4561 */
import DevSettingsStore from '../devtools/dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun100018(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100018, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:6, offset: 0x021dbe30, size: 246 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
let value = LifecycleManager;
value = _fun100022(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/CollectiblesMarketingManager.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/CollectiblesMarketingManager.native.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_100019() { // fn#100019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:158, offset: 0x021dbf26, 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) {
function _isNativeReflectConstruct_100019() { // fn#100019, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:158, offset: 0x021dbf26, 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_100019_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_100019_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun100022(a0) { // fn#100022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:361, offset: 0x021dbf88, size: 97 bytes, params: 2, frame: 16
const closure = CollectiblesMarketingManager;
env0_7(closure, a0);
return env0_4(closure, [{key: '_initialize', value: value_100025}, {key: '_terminate', value: value_100026}]);
}
function _fun100022(a0) { // fn#100022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:361, offset: 0x021dbf88, size: 97 bytes, params: 2, frame: 16
const CollectiblesMarketingManager2 = CollectiblesMarketingManager;
Inherits(CollectiblesMarketingManager2, a0);
return CreateClass(CollectiblesMarketingManager2, [{key: '_initialize', value: value_100025}, {key: '_terminate',
value: value_100026}]);
function CollectiblesMarketingManager(a0) { // fn#100023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:373, offset: 0x021dbfe9, size: 141 bytes, params: 2, frame: 19
var environment;
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let value2 = environment.__proto__;
let binding = env1_3;
binding(this, CollectiblesMarketingManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(CollectiblesMarketingManager);
binding = env1_5;
if (_isNativeReflectConstruct_100019()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handlePostConnectionOpen = function() {
var value2 = DevSettingsStore.get('shop_include_unpublished');
var moduleValue = require(dependencyMap[6]);
var fetchCollectiblesMarketings = moduleValue.fetchCollectiblesMarketings;
var CollectiblesMarketingReleaseType = require(dependencyMap[7]).CollectiblesMarketingReleaseType;
Reflect.apply(fetchCollectiblesMarketings, moduleValue,
[{release: value2 ? CollectiblesMarketingReleaseType.BETA : CollectiblesMarketingReleaseType.PROD}]);
};
return value;
}
function value_100025() { // fn#100025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:957, offset: 0x021dc0e2, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('POST_CONNECTION_OPEN', this.handlePostConnectionOpen);
}
function value_100026() { // fn#100026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:1066, offset: 0x021dc116, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('POST_CONNECTION_OPEN', this.handlePostConnectionOpen);
}
function CollectiblesMarketingManager(a0) { // fn#100023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:373, offset: 0x021dbfe9, size: 141 bytes, params: 2, frame: 19
var environment;
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let value2 = environment.__proto__;
let binding = env1_3;
binding(this, CollectiblesMarketingManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(CollectiblesMarketingManager);
binding = env1_5;
if (_isNativeReflectConstruct_100019()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.handlePostConnectionOpen = function() {
var value2 = DevSettingsStore.get('shop_include_unpublished');
var moduleValue = require(dependencyMap[6]);
var fetchCollectiblesMarketings = moduleValue.fetchCollectiblesMarketings;
var CollectiblesMarketingReleaseType = require(dependencyMap[7]).CollectiblesMarketingReleaseType;
Reflect.apply(fetchCollectiblesMarketings, moduleValue,
[{release: value2 ? CollectiblesMarketingReleaseType.BETA : CollectiblesMarketingReleaseType.PROD}]);
};
return value;
}
function value_100025() { // fn#100025, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:957, offset: 0x021dc0e2, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('POST_CONNECTION_OPEN', this.handlePostConnectionOpen);
}
function value_100026() { // fn#100026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13279:1066, offset: 0x021dc116, size: 52 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.unsubscribe('POST_CONNECTION_OPEN', this.handlePostConnectionOpen);
}
global.__d(_fun100018, 13089, [6, 7, 15, 17, 18, 4649, 5120, 5185, 694, 4561,
2]) /* metro module 13089, dependencies: [6, 7, 15, 17, 18, 4649, 5120, 5185, 694, 4561, 2] */;
@@ -1,76 +1,93 @@
/* Metro module 5174; source: modules/collectibles/CollectiblesMarketingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun45555(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:6, offset: 0x01192041, size: 341 bytes, params: 8, frame: 19
var object2;
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 */;
object2 = {NOT_FETCHED: 'NOT_FETCHED', FETCHING: 'FETCHING', FETCHED: 'FETCHED'};
object = {NOT_FETCHED: 'NOT_FETCHED', FETCHING: 'FETCHING', FETCHED: 'FETCHED'};
const env0_6 = {};
const env0_7 = object2.NOT_FETCHED;
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const env0_7 = object.NOT_FETCHED;
const Store = (Flux).Store;
let value = _fun45559(Store);
value.displayName = 'CollectiblesMarketingsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{COLLECTIBLES_MARKETING_FETCH: COLLECTIBLES_MARKETING_FETCH,
COLLECTIBLES_MARKETING_FETCH_SUCCESS: COLLECTIBLES_MARKETING_FETCH_SUCCESS, LOGOUT: LOGOUT_45565});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/CollectiblesMarketingsStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/CollectiblesMarketingsStore.tsx');
exports.default = value;
exports.FetchState = object2;
}
function _isNativeReflectConstruct_45556() { // fn#45556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:148, offset: 0x01192196, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
exports.FetchState = object;
function _isNativeReflectConstruct_45556() { // fn#45556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:148, offset: 0x01192196, 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_45556_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_45556_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun45559(a0) { // fn#45559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:466, offset: 0x011921f4, size: 91 bytes, params: 2, frame: 16
const closure = CollectiblesMarketingsStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getMarketingBySurface', value: value_45561}, {key: 'fetchState', get: function() {
return NOT_FETCHED;
}}]);
}
function _fun45559(a0) { // fn#45559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:466, offset: 0x011921f4, size: 91 bytes, params: 2, frame: 16
const CollectiblesMarketingsStore2 = CollectiblesMarketingsStore;
Inherits(CollectiblesMarketingsStore2, a0);
return CreateClass(CollectiblesMarketingsStore2, [{key: 'getMarketingBySurface', value: value_45561}, {key: 'fetchState',
get: function() {
return NOT_FETCHED;
}}]);
function CollectiblesMarketingsStore() { // fn#45560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:478, offset: 0x00e4046a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, CollectiblesMarketingsStore);
const value3 = env1_3(CollectiblesMarketingsStore);
return env1_2(this, _isNativeReflectConstruct_45556() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function COLLECTIBLES_MARKETING_FETCH() { // fn#45563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:1024, offset: 0x0119224f, size: 21 bytes, params: 1, frame: 2
env0_7 = env0_5.FETCHING;
}
function value_45561(a0) { // fn#45561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:842, offset: 0x00fbe09c, size: 16 bytes, params: 2, frame: 2
return env1_6[a0];
}
function COLLECTIBLES_MARKETING_FETCH_SUCCESS({marketings}) { // fn#45564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:1080, offset: 0x01192264, size: 40 bytes, params: 2, frame: 2
const marketingsBySurfaces = marketings.marketingsBySurfaces;
env0_7 = env0_5.FETCHED;
}
}
function COLLECTIBLES_MARKETING_FETCH() { // fn#45563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:1024, offset: 0x0119224f, size: 21 bytes, params: 1, frame: 2
env0_7 = env0_5.FETCHING;
}
function COLLECTIBLES_MARKETING_FETCH_SUCCESS({marketings}) { // fn#45564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:1080, offset: 0x01192264, size: 40 bytes, params: 2, frame: 2
const marketingsBySurfaces = marketings.marketingsBySurfaces;
env0_7 = env0_5.FETCHED;
}
function LOGOUT_45565() { // fn#45565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:1140, offset: 0x0119228c, size: 27 bytes, params: 1, frame: 2
env0_6 = {};
env0_7 = env0_5.NOT_FETCHED;
}
function LOGOUT_45565() { // fn#45565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5352:1140, offset: 0x0119228c, size: 27 bytes, params: 1, frame: 2
env0_6 = {};
env0_7 = env0_5.NOT_FETCHED;
}
global.__d(_fun45555, 5174, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 5174, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
@@ -1,16 +1,19 @@
/* Metro module 5145; source: modules/collectibles/CollectiblesPurchaseStore.tsx; dependencies: [6, 7, 15, 17, 18, 22, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun45393(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:6, offset: 0x0118dda1, size: 393 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const Map = global.Map;
let map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun45397(Store).displayName = 'CollectiblesPurchaseStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */, {COLLECTIBLES_PURCHASES_FETCH: function() {
env0_9 = true;
@@ -24,87 +27,112 @@ function _fun45393(global, require, importDefault, importAll, module, exports, d
env0_10 = a0.skuId;
env0_12 = error;
}, LOGOUT: LOGOUT_45417});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/CollectiblesPurchaseStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/CollectiblesPurchaseStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_45394() { // fn#45394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:148, offset: 0x0118df2a, 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_45394_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun45397(a0) { // fn#45397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:398, offset: 0x0118df88, size: 231 bytes, params: 2, frame: 16
const closure = CollectiblesPurchaseStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'isFetching', get: get_45399}, {key: 'isClaiming', get: get_45400}, {key: 'purchases',
get: get_45401}, {key: 'fetchError', get: get_45402}, {key: 'claimError', get: get_45403},
{key: 'hasPreviouslyFetched', get: get_45404}, {key: 'getPurchase', value: value_45405}, {key: 'getPurchases',
value: function(a0) {
return a0.map(_fun45407).filter(_fun45408);
}}]);
}
function COLLECTIBLES_PURCHASES_FETCH_SUCCESS(a0) { // fn#45410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1328, offset: 0x0118e14d, size: 186 bytes, params: 2, frame: 17
var moduleValue;
var isEqual;
var value2;
var items2;
var Map;
var map;
var value3;
if (a0.purchases.length !== 0) {
moduleValue = require(22) /* metro dependency 22 */;
isEqual = moduleValue.isEqual;
value2 = env0_8.values();
items2 = [];
arraySpread(items2, value2, 0, 0);
if (!Reflect.apply(isEqual, moduleValue, [items2, a0.purchases])) {
Map = global.Map;
value3 = a0.purchases.map(function(a0) {
return [a0.skuId, a0];
});
map = new Map();
function _isNativeReflectConstruct_45394() { // fn#45394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:148, offset: 0x0118df2a, 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_45394_isNativeReflectConstruct = function() {
return !!result;
})();
}
}
function COLLECTIBLES_PURCHASES_FETCH_FAILURE({error}) { // fn#45412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1509, offset: 0x0118e207, size: 39 bytes, params: 2, frame: 3
}
function _fun45397(a0) { // fn#45397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:398, offset: 0x0118df88, size: 231 bytes, params: 2, frame: 16
const CollectiblesPurchaseStore2 = CollectiblesPurchaseStore;
Inherits(CollectiblesPurchaseStore2, a0);
return CreateClass(CollectiblesPurchaseStore2, [{key: 'isFetching', get: get_45399}, {key: 'isClaiming', get: get_45400},
{key: 'purchases', get: get_45401}, {key: 'fetchError', get: get_45402}, {key: 'claimError', get: get_45403},
{key: 'hasPreviouslyFetched', get: get_45404}, {key: 'getPurchase', value: value_45405}, {key: 'getPurchases',
value: function(a0) {
return a0.map(_fun45407).filter(_fun45408);
}}]);
function CollectiblesPurchaseStore() { // fn#45398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:410, offset: 0x0118e06f, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, CollectiblesPurchaseStore);
const value3 = env1_5(CollectiblesPurchaseStore);
return env1_4(this, _isNativeReflectConstruct_45394() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function COLLECTIBLES_CLAIM_SUCCESS(a0) { // fn#45414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1612, offset: 0x0118e245, size: 193 bytes, params: 2, frame: 17
var moduleValue;
var isEqual;
var value2;
var items2;
var Map;
var map;
var value3;
if (a0.purchases != null) {
function get_45399() { // fn#45399, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function get_45400() { // fn#45400, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function get_45401() { // fn#45401, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function get_45402() { // fn#45402, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function get_45403() { // fn#45403, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function get_45404() { // fn#45404, offset: 0x00e2f9d5, size: 9 bytes, params: 1, frame: 1
return env1_13;
}
function value_45405(a0) { // fn#45405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1027, offset: 0x0118e0e0, size: 33 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__;
value = env1_8.get(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_45406(a0) { // fn#45406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1098, offset: 0x0118e101, size: 37 bytes, params: 2, frame: 12
return a0.map(_fun45407).filter(function(a0) {
return a0 != null;
});
function _fun45407(a0) { // fn#45407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1124, offset: 0x0118e126, size: 22 bytes, params: 2, frame: 11
return env2_8.get(a0);
}
}
}
function COLLECTIBLES_PURCHASES_FETCH_SUCCESS(a0) { // fn#45410, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1328, offset: 0x0118e14d, size: 186 bytes, params: 2, frame: 17
var moduleValue;
var isEqual;
var value2;
var items2;
var Map;
var map;
var value3;
if (a0.purchases.length !== 0) {
moduleValue = require(22) /* metro dependency 22 */;
isEqual = moduleValue.isEqual;
@@ -120,31 +148,44 @@ function COLLECTIBLES_CLAIM_SUCCESS(a0) { // fn#45414, source: /ci/build/discord
}
}
}
}
function LOGOUT_45417() { // fn#45417, offset: 0x0118e322, size: 37 bytes, params: 1, frame: 4
}
function value_45405(a0) { // fn#45405, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1027, offset: 0x0118e0e0, size: 33 bytes, params: 2, frame: 12
var r0;
let value = undefined;
if (a0 != null) {
value = environment.__proto__;
value = env1_8.get(a0);
r0 = value;
} else {
r0 = value;
function COLLECTIBLES_PURCHASES_FETCH_FAILURE({error}) { // fn#45412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1509, offset: 0x0118e207, size: 39 bytes, params: 2, frame: 3
}
return r0;
function COLLECTIBLES_CLAIM_SUCCESS(a0) { // fn#45414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1612, offset: 0x0118e245, size: 193 bytes, params: 2, frame: 17
var moduleValue;
var isEqual;
var value2;
var items2;
var Map;
var map;
var value3;
if (a0.purchases != null) {
if (a0.purchases.length !== 0) {
moduleValue = require(22) /* metro dependency 22 */;
isEqual = moduleValue.isEqual;
value2 = env0_8.values();
items2 = [];
arraySpread(items2, value2, 0, 0);
if (!Reflect.apply(isEqual, moduleValue, [items2, a0.purchases])) {
Map = global.Map;
value3 = a0.purchases.map(function(a0) {
return [a0.skuId, a0];
});
map = new Map();
}
}
}
}
function LOGOUT_45417() { // fn#45417, offset: 0x0118e322, size: 37 bytes, params: 1, frame: 4
}
}
function value_45406(a0) { // fn#45406, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1098, offset: 0x0118e101, size: 37 bytes, params: 2, frame: 12
return a0.map(_fun45407).filter(function(a0) {
return a0 != null;
});
}
function _fun45407(a0) { // fn#45407, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1124, offset: 0x0118e126, size: 22 bytes, params: 2, frame: 11
return env2_8.get(a0);
function _fun45408(a0) { // fn#45408, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5323:1146, offset: 0x00d0b2f0, size: 11 bytes, params: 2, frame: 2
return a0 != null;
}
global.__d(_fun45393, 5145, [6, 7, 15, 17, 18, 22, 566, 694,
2]) /* metro module 5145, dependencies: [6, 7, 15, 17, 18, 22, 566, 694, 2] */;
@@ -1,52 +1,57 @@
/* Metro module 663; source: modules/collectibles/CollectiblesShopConstants.tsx; dependencies: [664, 665, 666, 667, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FractionalPremiumSKUsModule from '../../external/discord_common/js/shared/shared-constants/FractionalPremiumSKUs.tsx'; /* Metro dependency 664 */
import * as CollectibleSearchItemTypeModule from '../../external/discord_common/js/shared/shared-constants/CollectibleSearchItemType.tsx'; /* Metro dependency 665 */
import * as CollectibleSearchSortTypeModule from '../../external/discord_common/js/shared/shared-constants/CollectibleSearchSortType.tsx'; /* Metro dependency 666 */
import * as CollectibleSearchSortDirectionModule from '../../external/discord_common/js/shared/shared-constants/CollectibleSearchSortDirection.tsx'; /* Metro dependency 667 */
function _fun8013(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#8013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:713:6, offset: 0x00d317fd, size: 1575 bytes, params: 8, frame: 30
var object2;
const env0_0 = require;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {VISIBLE: 0};
object2[0] = 'VISIBLE';
object2.HIDDEN = 1;
object2[1] = 'HIDDEN';
object2.IN = 2;
object2[2] = 'IN';
object2.OUT = 3;
object2[3] = 'OUT';
const object7 = {HOME: 'home', CATALOG: 'catalog', ORBS: 'orbs', AVATAR_DECORATIONS: 'avatar-decorations',
object = {VISIBLE: 0};
object[0] = 'VISIBLE';
object.HIDDEN = 1;
object[1] = 'HIDDEN';
object.IN = 2;
object[2] = 'IN';
object.OUT = 3;
object[3] = 'OUT';
const object3 = {HOME: 'home', CATALOG: 'catalog', ORBS: 'orbs', AVATAR_DECORATIONS: 'avatar-decorations',
PROFILE_EFFECTS: 'profile-effects', NAMEPLATES: 'nameplates', PROFILE_FRAMES: 'profile-frames',
BUNDLES: 'bundles', LAYOUT: 'layout', COLLECTION_INDEX: 'collection-index', GAME_SHOPS: 'game-shops'};
const AVATAR_DECORATIONS = object7.AVATAR_DECORATIONS;
const AVATAR_DECORATIONS = object3.AVATAR_DECORATIONS;
const items4 = [AVATAR_DECORATIONS];
const PROFILE_EFFECTS = object7.PROFILE_EFFECTS;
const PROFILE_EFFECTS = object3.PROFILE_EFFECTS;
items4[1] = PROFILE_EFFECTS;
const NAMEPLATES = object7.NAMEPLATES;
const NAMEPLATES = object3.NAMEPLATES;
items4[2] = NAMEPLATES;
const PROFILE_FRAMES = object7.PROFILE_FRAMES;
const PROFILE_FRAMES = object3.PROFILE_FRAMES;
items4[3] = PROFILE_FRAMES;
const BUNDLES = object7.BUNDLES;
const BUNDLES = object3.BUNDLES;
items4[4] = BUNDLES;
const object8 = {FIAT: 0};
object8[0] = 'FIAT';
object8.ORB = 1;
object8[1] = 'ORB';
object8.PREMIUM_PURCHASE = 2;
object8[2] = 'PREMIUM_PURCHASE';
object8.PROMOTIONAL = 3;
object8[3] = 'PROMOTIONAL';
object8.TENURE_REWARD = 4;
object8[4] = 'TENURE_REWARD';
object8.GIFT = 5;
object8[5] = 'GIFT';
const object9 = {ORB_PROFILE_BADGE: '1342211853484429445'};
const FractionalPremiumSKUs = (require(664) /* metro dependency 664: FractionalPremiumSKUs */).FractionalPremiumSKUs;
const object4 = {FIAT: 0};
object4[0] = 'FIAT';
object4.ORB = 1;
object4[1] = 'ORB';
object4.PREMIUM_PURCHASE = 2;
object4[2] = 'PREMIUM_PURCHASE';
object4.PROMOTIONAL = 3;
object4[3] = 'PROMOTIONAL';
object4.TENURE_REWARD = 4;
object4[4] = 'TENURE_REWARD';
object4.GIFT = 5;
object4[5] = 'GIFT';
const object5 = {ORB_PROFILE_BADGE: '1342211853484429445'};
const FractionalPremiumSKUs = (FractionalPremiumSKUsModule).FractionalPremiumSKUs;
const PREMIUM_TIER_2_3_DAY = FractionalPremiumSKUs.PREMIUM_TIER_2_3_DAY;
object9.FRACTIONAL_PREMIUM = PREMIUM_TIER_2_3_DAY;
object5.FRACTIONAL_PREMIUM = PREMIUM_TIER_2_3_DAY;
const PREMIUM_TIER_2_1_DAY = FractionalPremiumSKUs.PREMIUM_TIER_2_1_DAY;
object9.FRACTIONAL_PREMIUM_1_DAY = PREMIUM_TIER_2_1_DAY;
object5.FRACTIONAL_PREMIUM_1_DAY = PREMIUM_TIER_2_1_DAY;
const Set = global.Set;
Object = global.Object;
const set = new Set(Object.values(object9));
const CollectibleSearchItemType = (require(665) /* metro dependency 665: CollectibleSearchItemType */).CollectibleSearchItemType;
const set = new Set(Object.values(object5));
const CollectibleSearchItemType = (CollectibleSearchItemTypeModule).CollectibleSearchItemType;
const AVATAR_DECORATION = CollectibleSearchItemType.AVATAR_DECORATION;
const items2 = [AVATAR_DECORATION];
const NAMEPLATE = CollectibleSearchItemType.NAMEPLATE;
@@ -57,14 +62,14 @@ function _fun8013(global, require, importDefault, importAll, module, exports, de
items2[3] = PROFILE_FRAME;
const BUNDLE = CollectibleSearchItemType.BUNDLE;
items2[4] = BUNDLE;
const object10 = {};
const CollectibleSearchSortType = (require(666) /* metro dependency 666: CollectibleSearchSortType */).CollectibleSearchSortType;
const object6 = {};
const CollectibleSearchSortType = (CollectibleSearchSortTypeModule).CollectibleSearchSortType;
const RELEVANCE = CollectibleSearchSortType.RELEVANCE;
object10.sortType = RELEVANCE;
const CollectibleSearchSortDirection = (require(667) /* metro dependency 667: CollectibleSearchSortDirection */).CollectibleSearchSortDirection;
object6.sortType = RELEVANCE;
const CollectibleSearchSortDirection = (CollectibleSearchSortDirectionModule).CollectibleSearchSortDirection;
let DESC = CollectibleSearchSortDirection.DESC;
object10.sortDirection = DESC;
const items3 = [object10];
object6.sortDirection = DESC;
const items3 = [object6];
const RECENCY = CollectibleSearchSortType.RECENCY;
DESC = CollectibleSearchSortDirection.DESC;
items3[1] = {sortType: RECENCY, sortDirection: DESC};
@@ -77,7 +82,7 @@ function _fun8013(global, require, importDefault, importAll, module, exports, de
const POPULARITY = CollectibleSearchSortType.POPULARITY;
DESC = CollectibleSearchSortDirection.DESC;
items3[4] = {sortType: POPULARITY, sortDirection: DESC};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/CollectiblesShopConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/CollectiblesShopConstants.tsx');
exports.POPULAR_PICK_PRODUCTS = ['1212569433839636530', '1232073608168472638', '1232071712695386162',
'1212570343567261736', '1232071157746765906', '1144308439720394944', '1139323093991575696',
'1232070870093008937', '1232073286582538261', '1228234634379132958', '1144307957425778779',
@@ -91,13 +96,13 @@ function _fun8013(global, require, importDefault, importAll, module, exports, de
exports.SHOP_CARD_PER_PRODUCT_NEW_BADGE_EXPIRY_SETTINGS = {};
exports.COLLECTIBLES_SHOP_CACHE_DURATION_MS = 600000;
exports.COLLECTIBLES_SHOP_FETCH_ERROR_RETRY_THRESHOLD_MS = 600000;
exports.ViewState = object2;
exports.ViewState = object;
exports.SEARCH_BAR_ICON_WIDTH_PX = 24;
exports.SEARCH_BAR_WIDTH_PX = 225;
exports.STATE_TRANSITION_THRESHOLD_PX = 20;
exports.CollectiblesSearchBarCTAName = {SEARCH_ICON: 'search icon', SEARCH_BAR: 'search bar',
SEARCH_BAR_CLEAR: 'search bar clear'};
exports.CollectibleShopTab = object7;
exports.CollectibleShopTab = object3;
exports.CollectiblesIndexPageTabs = items4;
exports.isIndexPageTab = isIndexPageTab;
exports.shouldAddTabToUrl = shouldAddTabToUrl;
@@ -190,8 +195,8 @@ function _fun8013(global, require, importDefault, importAll, module, exports, de
exports.LIMITED_TIME_BADGE_DAYS_THRESHOLD = 60;
exports.MAX_FEED_SIZE = 36;
exports.SHOP_ALL_PAGE_SIZE = 5;
exports.ShopPurchaseType = object8;
exports.EXTERNAL_PRODUCT_SKU_IDS = object9;
exports.ShopPurchaseType = object4;
exports.EXTERNAL_PRODUCT_SKU_IDS = object5;
exports.isFractionalPremiumSku = function(a0) {
var ALL = require(dependencyMap[0]).FractionalPremiumSKUsSets.ALL;
return ALL.has(a0);
@@ -211,13 +216,18 @@ function _fun8013(global, require, importDefault, importAll, module, exports, de
FULL_PROFILE_PREVIEW: 'full_profile_preview', FULL_PROFILE_PREVIEW_BUTTON: 'full_profile_preview_button',
VIEW_DETAILS: 'view_details', PAYMENT_OPTIONS: 'payment_options', OPEN_DETAILS: 'open_details',
VARIANT_CLICK: 'variant_click', VARIANT_CLICK_MORE: 'variant_click_more'};
function isIndexPageTab(a0) { // fn#8014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:713:4229, offset: 0x00d31e24, size: 22 bytes, params: 2, frame: 11
return env0_3.includes(a0);
}
function shouldAddTabToUrl(a0) { // fn#8015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:713:4266, offset: 0x00d31e3a, size: 71 bytes, params: 2, frame: 3
return a0 != null && a0 !== env0_2.HOME && a0 !== env0_2.CATALOG && a0 !== env0_2.GAME_SHOPS;
}
function isExternalProduct(a0) { // fn#8017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:713:11960, offset: 0x00d31eb4, size: 22 bytes, params: 2, frame: 11
return env0_4.has(a0);
}
}
function shouldAddTabToUrl(a0) { // fn#8015, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:713:4266, offset: 0x00d31e3a, size: 71 bytes, params: 2, frame: 3
return a0 != null && a0 !== env0_2.HOME && a0 !== env0_2.CATALOG && a0 !== env0_2.GAME_SHOPS;
}
function isExternalProduct(a0) { // fn#8017, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:713:11960, offset: 0x00d31eb4, size: 22 bytes, params: 2, frame: 11
return env0_4.has(a0);
}
global.__d(_fun8013, 663, [664, 665, 666, 667, 2]) /* metro module 663, dependencies: [664, 665, 666, 667, 2] */;
@@ -1,17 +1,17 @@
/* Metro module 5175; source: modules/collectibles/CollectiblesShopHomeStore.tsx; dependencies: [6, 7, 15, 17, 18, 663, 1880, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CollectiblesShopConstantsModule from './CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as PremiumConstantsModule from '../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
function _fun45566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:6, offset: 0x011922a7, size: 617 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectibleShopTab;
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
const env0_6 = premiumConstantsModule.COLLECTIBLES_SUMMER_SALE_2025_30_DISCOUNT_ID;
const env0_7 = premiumConstantsModule.COLLECTIBLES_SUMMER_SALE_2025_50_DISCOUNT_ID;
const env0_8 = premiumConstantsModule.COLLECTIBLES_VALENTINES_2026_DISCOUNT_ID;
const env0_9 = [];
let Map = global.Map;
let map = new Map();
@@ -27,7 +27,7 @@ function _fun45566(global, require, importDefault, importAll, module, exports, d
map = new Map();
Map = global.Map;
map = new Map();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun45570(Store).displayName = 'CollectiblesShopHomesStore';
map = new map(importDefault(694) /* metro dependency 694: Dispatcher */,
{COLLECTIBLES_SHOP_HOME_FETCH: COLLECTIBLES_SHOP_HOME_FETCH,
@@ -38,137 +38,171 @@ function _fun45566(global, require, importDefault, importAll, module, exports, d
}, COLLECTIBLES_SET_SHOP_LAYOUT_URL_OVERRIDE: function(a0) {
env0_18 = a0.shopLayoutUrlOverride;
}, SKU_PURCHASE_SUCCESS: SKU_PURCHASE_SUCCESS_45586, LOGOUT: LOGOUT_45588});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/CollectiblesShopHomeStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/CollectiblesShopHomeStore.tsx');
exports.default = map;
}
function _isNativeReflectConstruct_45567() { // fn#45567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:330, offset: 0x01192510, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_45567() { // fn#45567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:330, offset: 0x01192510, 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_45567_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_45567_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun45570(a0) { // fn#45570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:622, offset: 0x0119256e, size: 268 bytes, params: 2, frame: 16
const closure = CollectiblesShopHomesStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getLastSuccessfulFetch', value: value_45572}, {key: 'getLastErrorTimestamp',
value: value_45573}, {key: 'getLastFetchOptions', value: value_45574}, {key: 'getFetchShopHomeError',
value: value_45575}, {key: 'getIsFetchingShopHome', value: value_45576}, {key: 'getShopBlocks',
value: value_45577}, {key: 'getHasKnownStaleData', value: value_45578}, {key: 'getShopHomeConfigOverride',
value: value_45579}, {key: 'getShopLayoutUrlOverride', value: value_45580}]);
}
function _fun45570(a0) { // fn#45570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:622, offset: 0x0119256e, size: 268 bytes, params: 2, frame: 16
const CollectiblesShopHomesStore2 = CollectiblesShopHomesStore;
Inherits(CollectiblesShopHomesStore2, a0);
return CreateClass(CollectiblesShopHomesStore2, [{key: 'getLastSuccessfulFetch', value: value_45572},
{key: 'getLastErrorTimestamp', value: value_45573}, {key: 'getLastFetchOptions', value: value_45574},
{key: 'getFetchShopHomeError', value: value_45575}, {key: 'getIsFetchingShopHome', value: value_45576},
{key: 'getShopBlocks', value: value_45577}, {key: 'getHasKnownStaleData', value: value_45578},
{key: 'getShopHomeConfigOverride', value: value_45579}, {key: 'getShopLayoutUrlOverride', value: value_45580}]);
function CollectiblesShopHomesStore() { // fn#45571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:634, offset: 0x0119267a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, CollectiblesShopHomesStore);
const value3 = env1_3(CollectiblesShopHomesStore);
return env1_2(this, _isNativeReflectConstruct_45567() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function COLLECTIBLES_SHOP_HOME_FETCH(a0) { // fn#45581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1655, offset: 0x01192737, size: 146 bytes, params: 2, frame: 16
let binding = env0_14;
binding.set(a0.tab, true);
binding = env0_13;
binding.set(a0.tab, undefined);
binding = env0_12;
binding.set(a0.tab, a0.options);
binding.set(a0.tab, a0.options);
binding = env0_11;
binding.set(a0.tab, undefined);
binding = env0_15;
binding.set(a0.tab, false);
}
function value_45572(a0) { // fn#45572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:994, offset: 0x00f7ec3a, size: 22 bytes, params: 2, frame: 11
return env1_10.get(a0);
}
function COLLECTIBLES_SHOP_HOME_FETCH_SUCCESS_45582(a0) { // fn#45582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1815, offset: 0x011927c9, size: 167 bytes, params: 2, frame: 16
let binding = env0_16;
let set = binding.set;
let tab = a0.tab;
Reflect.apply(set, binding, [tab, a0.shopHome.shopBlocks]);
binding = env0_10;
set = binding.set;
tab = a0.tab;
const Date = global.Date;
Reflect.apply(set, binding, [tab, Date.now()]);
binding = env0_14;
binding.set(a0.tab, false);
binding = env0_13;
binding.set(a0.tab, undefined);
binding = env0_11;
binding.set(a0.tab, undefined);
binding = env0_15;
binding.set(a0.tab, false);
}
function value_45573(a0) { // fn#45573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1059, offset: 0x010353f1, size: 22 bytes, params: 2, frame: 11
return env1_11.get(a0);
}
function COLLECTIBLES_SHOP_HOME_FETCH_FAILURE(a0) { // fn#45583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1988, offset: 0x01192870, size: 145 bytes, params: 2, frame: 16
let binding = env0_16;
let set = binding.set;
let tab = a0.tab;
Reflect.apply(set, binding, [tab, env0_9]);
binding = env0_14;
binding.set(a0.tab, false);
binding = env0_13;
binding.set(a0.tab, a0.error);
binding = env0_11;
set = binding.set;
tab = a0.tab;
const Date = global.Date;
Reflect.apply(set, binding, [tab, Date.now()]);
binding = env0_15;
binding.set(a0.tab, true);
}
function value_45574(a0) { // fn#45574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1122, offset: 0x01087f0f, size: 22 bytes, params: 2, frame: 11
return env1_12.get(a0);
}
function SKU_PURCHASE_SUCCESS_45586(a0) { // fn#45586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:2254, offset: 0x01192929, size: 79 bytes, params: 2, frame: 13
var binding;
if (a0.appliedUserDiscounts != null && a0.appliedUserDiscounts.some(_fun45587)) {
function value_45575(a0) { // fn#45575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1187, offset: 0x011926eb, size: 22 bytes, params: 2, frame: 11
return env1_13.get(a0);
}
function value_45576(a0) { // fn#45576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1252, offset: 0x01192701, size: 22 bytes, params: 2, frame: 11
return env1_14.get(a0);
}
function value_45577(a0) { // fn#45577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1309, offset: 0x01192717, size: 32 bytes, params: 2, frame: 12
return env1_16.get(a0) ?? env1_9;
}
function value_45578(a0) { // fn#45578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1393, offset: 0x010e69eb, size: 22 bytes, params: 2, frame: 11
return env1_15.get(a0);
}
function value_45579() { // fn#45579, offset: 0x00e07553, size: 9 bytes, params: 1, frame: 1
return env1_17;
}
function value_45580() { // fn#45580, offset: 0x00df0e82, size: 9 bytes, params: 1, frame: 1
return env1_18;
}
}
function COLLECTIBLES_SHOP_HOME_FETCH(a0) { // fn#45581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1655, offset: 0x01192737, size: 146 bytes, params: 2, frame: 16
let binding = env0_14;
binding.set(a0.tab, true);
binding = env0_13;
binding.set(a0.tab, undefined);
binding = env0_12;
binding.set(a0.tab, a0.options);
binding.set(a0.tab, a0.options);
binding = env0_11;
binding.set(a0.tab, undefined);
binding = env0_15;
binding.set(CollectibleShopTab.HOME, true);
binding.set(a0.tab, false);
}
function COLLECTIBLES_SHOP_HOME_FETCH_SUCCESS_45582(a0) { // fn#45582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1815, offset: 0x011927c9, size: 167 bytes, params: 2, frame: 16
let binding = env0_16;
let set = binding.set;
let tab = a0.tab;
Reflect.apply(set, binding, [tab, a0.shopHome.shopBlocks]);
binding = env0_10;
set = binding.set;
tab = a0.tab;
const Date = global.Date;
Reflect.apply(set, binding, [tab, Date.now()]);
binding = env0_14;
binding.set(a0.tab, false);
binding = env0_13;
binding.set(a0.tab, undefined);
binding = env0_11;
binding.set(a0.tab, undefined);
binding = env0_15;
binding.set(a0.tab, false);
}
function COLLECTIBLES_SHOP_HOME_FETCH_FAILURE(a0) { // fn#45583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1988, offset: 0x01192870, size: 145 bytes, params: 2, frame: 16
let binding = env0_16;
let set = binding.set;
let tab = a0.tab;
Reflect.apply(set, binding, [tab, env0_9]);
binding = env0_14;
binding.set(a0.tab, false);
binding = env0_13;
binding.set(a0.tab, a0.error);
binding = env0_11;
set = binding.set;
tab = a0.tab;
const Date = global.Date;
Reflect.apply(set, binding, [tab, Date.now()]);
binding = env0_15;
binding.set(a0.tab, true);
}
function SKU_PURCHASE_SUCCESS_45586(a0) { // fn#45586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:2254, offset: 0x01192929, size: 79 bytes, params: 2, frame: 13
var binding;
if (a0.appliedUserDiscounts != null && a0.appliedUserDiscounts.some(_fun45587)) {
binding = env0_15;
binding.set(CollectibleShopTab.HOME, true);
}
function _fun45587(a0) { // fn#45587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:2317, offset: 0x01192978, size: 71 bytes, params: 2, frame: 5
const id = a0.discount.id;
const value = environment.__proto__;
let r0 = id === COLLECTIBLES_SUMMER_SALE_2025_30_DISCOUNT_ID || a0.discount.id === COLLECTIBLES_SUMMER_SALE_2025_50_DISCOUNT_ID;
r0 = !r0 ? a0.discount.id === COLLECTIBLES_VALENTINES_2026_DISCOUNT_ID : r0;
return r0;
}
}
function LOGOUT_45588() { // fn#45588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:2404, offset: 0x011929bf, size: 113 bytes, params: 1, frame: 10
env0_16.clear();
env0_12.clear();
env0_13.clear();
env0_14.clear();
env0_10.clear();
env0_11.clear();
env0_15.clear();
}
}
function LOGOUT_45588() { // fn#45588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:2404, offset: 0x011929bf, size: 113 bytes, params: 1, frame: 10
env0_16.clear();
env0_12.clear();
env0_13.clear();
env0_14.clear();
env0_10.clear();
env0_11.clear();
env0_15.clear();
}
function CollectiblesShopHomesStore() { // fn#45571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:634, offset: 0x0119267a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, CollectiblesShopHomesStore);
const value3 = env1_3(CollectiblesShopHomesStore);
return env1_2(this, _isNativeReflectConstruct_45567() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_45577(a0) { // fn#45577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:1309, offset: 0x01192717, size: 32 bytes, params: 2, frame: 12
return env1_16.get(a0) ?? env1_9;
}
function _fun45587(a0) { // fn#45587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5353:2317, offset: 0x01192978, size: 71 bytes, params: 2, frame: 5
const id = a0.discount.id;
const value = environment.__proto__;
let r0 = id === COLLECTIBLES_SUMMER_SALE_2025_30_DISCOUNT_ID || a0.discount.id === COLLECTIBLES_SUMMER_SALE_2025_50_DISCOUNT_ID;
r0 = !r0 ? a0.discount.id === COLLECTIBLES_VALENTINES_2026_DISCOUNT_ID : r0;
return r0;
}
global.__d(_fun45566, 5175, [6, 7, 15, 17, 18, 663, 1880, 566, 694,
2]) /* metro module 5175, dependencies: [6, 7, 15, 17, 18, 663, 1880, 566, 694, 2] */;
@@ -1,18 +1,21 @@
/* Metro module 5146; source: modules/collectibles/CollectiblesShopStore.tsx; dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun45418(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:6, offset: 0x0118e347, size: 389 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 */;
object = [];
const env0_9 = {};
const Set = global.Set;
let set = new Set();
const env0_11 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
_fun45422(Store).displayName = 'CollectiblesShopStore';
set = new set(importDefault(694) /* metro dependency 694: Dispatcher */,
{COLLECTIBLES_SHOP_OPEN: COLLECTIBLES_SHOP_OPEN, COLLECTIBLES_SHOP_CLOSE: COLLECTIBLES_SHOP_CLOSE,
@@ -20,108 +23,130 @@ function _fun45418(global, require, importDefault, importAll, module, exports, d
COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH: COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH,
COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH_SUCCESS: COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH_SUCCESS,
COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH_FAILURE: COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH_FAILURE, LOGOUT: LOGOUT_45437});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/CollectiblesShopStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/CollectiblesShopStore.tsx');
exports.default = set;
}
function _isNativeReflectConstruct_45419() { // fn#45419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:148, offset: 0x0118e4cc, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
function _isNativeReflectConstruct_45419() { // fn#45419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:148, offset: 0x0118e4cc, 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_45419_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_45419_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun45422(a0) { // fn#45422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:385, offset: 0x0118e52a, size: 212 bytes, params: 2, frame: 16
const closure = CollectiblesShopStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'analyticsLocations', get: get_45424}, {key: 'analyticsSource', get: get_45425},
{key: 'initialProductSkuId', get: get_45426}, {key: 'getAnalytics', value: value_45427}, {key: 'getLayout',
value: value_45428}, {key: 'isFetchingLayout', value: value_45429}, {key: 'getLayoutFetchError',
value: value_45430}]);
}
function _fun45422(a0) { // fn#45422, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:385, offset: 0x0118e52a, size: 212 bytes, params: 2, frame: 16
const CollectiblesShopStore2 = CollectiblesShopStore;
Inherits(CollectiblesShopStore2, a0);
return CreateClass(CollectiblesShopStore2, [{key: 'analyticsLocations', get: get_45424}, {key: 'analyticsSource',
get: get_45425}, {key: 'initialProductSkuId', get: get_45426}, {key: 'getAnalytics', value: value_45427},
{key: 'getLayout', value: value_45428}, {key: 'isFetchingLayout', value: value_45429},
{key: 'getLayoutFetchError', value: value_45430}]);
function CollectiblesShopStore() { // fn#45423, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:397, offset: 0x0118e5fe, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, CollectiblesShopStore);
const value3 = env1_3(CollectiblesShopStore);
return env1_2(this, _isNativeReflectConstruct_45419() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function COLLECTIBLES_SHOP_OPEN({analyticsLocations, analyticsSource, initialProductSkuId}) { // fn#45431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1285, offset: 0x0118e6fb, size: 65 bytes, params: 2, frame: 5
env0_7 = analyticsLocations ?? env0_6;
env0_8 = analyticsSource ?? null;
}
function get_45424() { // fn#45424, offset: 0x00fbd9cb, size: 9 bytes, params: 1, frame: 1
return env1_7;
}
function COLLECTIBLES_SHOP_CLOSE() { // fn#45432, offset: 0x0118e73c, size: 25 bytes, params: 1, frame: 2
}
function get_45425() { // fn#45425, offset: 0x00fbd9d4, size: 9 bytes, params: 1, frame: 1
return env1_8;
}
function get_45426() { // fn#45426, offset: 0x00e40571, size: 9 bytes, params: 1, frame: 1
return env1_5;
}
function value_45427() { // fn#45427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:876, offset: 0x0118e66f, size: 25 bytes, params: 1, frame: 3
return {analyticsLocations: env1_7, analyticsSource: env1_8};
}
function value_45428(a0) { // fn#45428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:959, offset: 0x0118e688, size: 42 bytes, params: 2, frame: 4
const value = null;
return value == a0 ? value : value != env1_9[a0] ? env1_9[a0] : value;
}
function value_45429(a0) { // fn#45429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1051, offset: 0x0118e6b2, size: 31 bytes, params: 2, frame: 12
var r0;
let value = a0 != null;
if (value) {
value = environment.__proto__;
value = env1_10.has(a0);
r0 = value;
} else {
r0 = value;
}
return r0;
}
function value_45430(a0) { // fn#45430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1123, offset: 0x0118e6d1, size: 42 bytes, params: 2, frame: 4
const value = null;
return value == a0 ? value : value != env1_11[a0] ? env1_11[a0] : value;
}
function COLLECTIBLES_PRODUCT_DETAILS_OPEN({skuId}) { // fn#45433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1480, offset: 0x0118e755, size: 29 bytes, params: 2, frame: 3
if (skuId !== env0_5) {
}
}
function COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH({tab}) { // fn#45434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1544, offset: 0x0118e772, size: 30 bytes, params: 2, frame: 11
env0_10.add(tab);
}
function COLLECTIBLES_SHOP_OPEN({analyticsLocations, analyticsSource, initialProductSkuId}) { // fn#45431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1285, offset: 0x0118e6fb, size: 65 bytes, params: 2, frame: 5
env0_7 = analyticsLocations ?? env0_6;
env0_8 = analyticsSource ?? null;
}
function COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH_SUCCESS({tab, layoutId}) { // fn#45435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1609, offset: 0x0118e790, size: 52 bytes, params: 2, frame: 12
env0_9[tab] = layoutId;
delete env0_11[tab];
env0_10.delete(tab);
}
function COLLECTIBLES_SHOP_CLOSE() { // fn#45432, offset: 0x0118e73c, size: 25 bytes, params: 1, frame: 2
}
function COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH_FAILURE({tab, apiError}) { // fn#45436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1707, offset: 0x0118e7c4, size: 44 bytes, params: 2, frame: 12
env0_11[tab] = apiError;
env0_10.delete(tab);
}
function COLLECTIBLES_PRODUCT_DETAILS_OPEN({skuId}) { // fn#45433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1480, offset: 0x0118e755, size: 29 bytes, params: 2, frame: 3
if (skuId !== env0_5) {
}
}
function LOGOUT_45437() { // fn#45437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1757, offset: 0x0118e7f0, size: 69 bytes, params: 1, frame: 11
env0_9 = {};
const Set = global.Set;
const set = new Set();
env0_11 = {};
}
function COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH({tab}) { // fn#45434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1544, offset: 0x0118e772, size: 30 bytes, params: 2, frame: 11
env0_10.add(tab);
}
function value_45427() { // fn#45427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:876, offset: 0x0118e66f, size: 25 bytes, params: 1, frame: 3
return {analyticsLocations: env1_7, analyticsSource: env1_8};
}
function COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH_SUCCESS({tab, layoutId}) { // fn#45435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1609, offset: 0x0118e790, size: 52 bytes, params: 2, frame: 12
env0_9[tab] = layoutId;
delete env0_11[tab];
env0_10.delete(tab);
}
function value_45428(a0) { // fn#45428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:959, offset: 0x0118e688, size: 42 bytes, params: 2, frame: 4
const value = null;
return value == a0 ? value : value != env1_9[a0] ? env1_9[a0] : value;
}
function COLLECTIBLES_SHOP_TAB_LAYOUT_FETCH_FAILURE({tab, apiError}) { // fn#45436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1707, offset: 0x0118e7c4, size: 44 bytes, params: 2, frame: 12
env0_11[tab] = apiError;
env0_10.delete(tab);
}
function value_45429(a0) { // fn#45429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1051, offset: 0x0118e6b2, size: 31 bytes, params: 2, frame: 12
var r0;
let value = a0 != null;
if (value) {
value = environment.__proto__;
value = env1_10.has(a0);
r0 = value;
} else {
r0 = value;
function LOGOUT_45437() { // fn#45437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1757, offset: 0x0118e7f0, size: 69 bytes, params: 1, frame: 11
env0_9 = {};
const Set = global.Set;
const set = new Set();
env0_11 = {};
}
return r0;
}
function value_45430(a0) { // fn#45430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5324:1123, offset: 0x0118e6d1, size: 42 bytes, params: 2, frame: 4
const value = null;
return value == a0 ? value : value != env1_11[a0] ? env1_11[a0] : value;
}
global.__d(_fun45418, 5146, [6, 7, 15, 17, 18, 566, 694,
2]) /* metro module 5146, dependencies: [6, 7, 15, 17, 18, 566, 694, 2] */;
@@ -1,67 +1,72 @@
/* Metro module 10052; source: modules/collectibles/CollectiblesShopVariantsUIStore.tsx; dependencies: [685, 3769, 10021, 5133, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00685Module from '../../by-id/module-00685.js'; /* Metro dependency 685 */
import * as UseDefaultVariantIndexModule from './hooks/useDefaultVariantIndex.tsx'; /* Metro dependency 10021 */
function _fun78600(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10238:6, offset: 0x01e2d7b3, size: 163 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = require(685) /* metro dependency 685 */;
const env0_2 = value.createWithEqualityFn(function() {
const env0_2 = Module00685Module.createWithEqualityFn(function() {
var Map = global.Map;
return {selectionStates: new Map()};
}, (require(3769) /* metro dependency 3769 */).shallow);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/CollectiblesShopVariantsUIStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/CollectiblesShopVariantsUIStore.tsx');
exports.useSelectedVariantIndex = useSelectedVariantIndex;
exports.setSelectedVariantIndex = setSelectedVariantIndex;
}
function useSelectedVariantIndex(a0) { // fn#78602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10238:294, offset: 0x01e2d87b, size: 90 bytes, params: 2, frame: 15
var r0;
const env0_0 = a0;
const value2 = (UseDefaultVariantIndexModule).useDefaultVariantIndex(a0);
let value = env0_2(_fun78603);
if (value == null) {
r0 = value2;
} else {
value = global.Math.max(0, value);
r0 = value;
}
return r0;
function _fun78603(a0) { // fn#78603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10238:343, offset: 0x01e2d8d5, size: 112 bytes, params: 2, frame: 15
var r0;
var value3;
var value4;
var moduleValue;
const value2 = null;
if (value2 != env0_0) {
value3 = environment.__proto__;
value4 = undefined;
moduleValue = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
r0 = moduleValue.getIsVariantProduct(env0_0) ? value2 == a0.selectionStates.get(env0_0.storeListingId) ? value4 : a0.selectionStates.get(env0_0.storeListingId).selectedVariantIndex : value2;
} else {
r0 = value2;
}
return r0;
}
function useSelectedVariantIndex(a0) { // fn#78602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10238:294, offset: 0x01e2d87b, size: 90 bytes, params: 2, frame: 15
var r0;
const env0_0 = a0;
const value2 = (require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(a0);
let value = env0_2(_fun78603);
if (value == null) {
r0 = value2;
} else {
value = global.Math.max(0, value);
r0 = value;
}
return r0;
}
function setSelectedVariantIndex(a0, a1) { // fn#78604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10238:546, offset: 0x01e2d945, size: 45 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_2.setState(_fun78605);
}
function setSelectedVariantIndex(a0, a1) { // fn#78604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10238:546, offset: 0x01e2d945, size: 45 bytes, params: 3, frame: 11
const env0_0 = a0;
const env0_1 = a1;
env0_2.setState(_fun78605);
function _fun78605(a0) { // fn#78605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10238:566, offset: 0x01e2d972, size: 138 bytes, params: 2, frame: 16
var r0;
var map;
const value = a0;
const selectionStates = value.selectionStates;
const get = selectionStates.get;
if (Reflect.apply(get, selectionStates, [env0_0.storeListingId])?.selectedVariantIndex === require) {
r0 = value;
} else {
map = new global.Map(value.selectionStates);
r0 = {selectionStates: map.set(env0_0.storeListingId, {selectedVariantIndex: require})};
}
return r0;
}
function _fun78603(a0) { // fn#78603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10238:343, offset: 0x01e2d8d5, size: 112 bytes, params: 2, frame: 15
var r0;
var value3;
var value4;
var moduleValue;
const value2 = null;
if (value2 != env0_0) {
value3 = environment.__proto__;
value4 = undefined;
moduleValue = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
r0 = moduleValue.getIsVariantProduct(env0_0) ? value2 == a0.selectionStates.get(env0_0.storeListingId) ? value4 : a0.selectionStates.get(env0_0.storeListingId).selectedVariantIndex : value2;
} else {
r0 = value2;
}
return r0;
}
function _fun78605(a0) { // fn#78605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10238:566, offset: 0x01e2d972, size: 138 bytes, params: 2, frame: 16
var r0;
var map;
const value = a0;
const selectionStates = value.selectionStates;
const get = selectionStates.get;
if (Reflect.apply(get, selectionStates, [env0_0.storeListingId])?.selectedVariantIndex === require) {
r0 = value;
} else {
map = new global.Map(value.selectionStates);
r0 = {selectionStates: map.set(env0_0.storeListingId, {selectedVariantIndex: require})};
}
return r0;
}
global.__d(_fun78600, 10052, [685, 3769, 10021, 5133,
2]) /* metro module 10052, dependencies: [685, 3769, 10021, 5133, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,19 +1,22 @@
/* Metro module 1424; source: modules/collectibles/avatar_decorations/AvatarDecorationConstants.tsx; dependencies: [1425, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AvatarConstantsModule from '../../../external/discord_common/js/shared/constants/web/AvatarConstants.tsx'; /* Metro dependency 1425 */
function _fun16648(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1551:6, offset: 0x00e56a3a, size: 167 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const AvatarSizes = (require(1425) /* metro dependency 1425: AvatarConstants */).AvatarSizes;
object2 = {};
const AvatarSizes = (AvatarConstantsModule).AvatarSizes;
object = {};
const SIZE_56 = AvatarSizes.SIZE_56;
object2[SIZE_56] = 4;
object[SIZE_56] = 4;
const SIZE_80 = AvatarSizes.SIZE_80;
object2[SIZE_80] = 6;
object[SIZE_80] = 6;
const SIZE_120 = AvatarSizes.SIZE_120;
object2[SIZE_120] = 8;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/avatar_decorations/AvatarDecorationConstants.tsx');
object[SIZE_120] = 8;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/avatar_decorations/AvatarDecorationConstants.tsx');
exports.DECORATION_TO_AVATAR_RATIO = 1.2;
exports.AvatarDecorationBorderSizes = object2;
exports.AvatarDecorationBorderSizes = object;
exports.AVATAR_DECORATION_SIZE = 70;
}
global.__d(_fun16648, 1424, [1425, 2]) /* metro module 1424, dependencies: [1425, 2] */;
@@ -1,9 +1,12 @@
/* Metro module 1857; source: modules/collectibles/avatar_decorations/AvatarDecorationUtils.tsx; dependencies: [1858, 22, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as MappersModule from '../utils/mappers.tsx'; /* Metro dependency 1858 */
function _fun20023(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1984:6, offset: 0x00ebcb28, size: 137 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const closure = parseAvatarDecorationData;
const parseAvatarDecorationData2 = parseAvatarDecorationData;
const closure2 = function(a0) {
var r0;
value = a0?.expiresAt != null;
@@ -16,76 +19,77 @@ function _fun20023(global, require, importDefault, importAll, module, exports, d
}
return r0;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/avatar_decorations/AvatarDecorationUtils.tsx');
exports.parseAvatarDecorationData = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/avatar_decorations/AvatarDecorationUtils.tsx');
exports.parseAvatarDecorationData = parseAvatarDecorationData2;
exports.isAvatarDecorationExpired = closure2;
exports.isEqualAvatarDecoration = isEqualAvatarDecoration;
exports.hasGlobalDefaultAvatarDecoration = hasGlobalDefaultAvatarDecoration;
function parseAvatarDecorationData(a0) { // fn#20024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1984:123, offset: 0x00ebcbb1, size: 211 bytes, params: 2, frame: 14
if (typeof a0 !== 'object') {
return null;
}
if (a0 == null) {
return null;
}
let value = MappersModule;
value = value.parseSkuIdFromServerData(a0);
if (value == null) {
return null;
}
const object = {skuId: value};
if ('asset' in a0 && typeof a0.asset === 'string') {
object.asset = a0.asset;
}
if ('expires_at' in a0 && typeof a0.expires_at === 'number') {
object.expiresAt = a0.expires_at;
}
if ('expiresAt' in a0 && typeof a0.expiresAt === 'number') {
object.expiresAt = a0.expiresAt;
}
return object;
}
function isEqualAvatarDecoration(a0, a1) { // fn#20026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1984:791, offset: 0x00ebccc6, size: 75 bytes, params: 3, frame: 16
var r0;
var value;
var moduleValue;
var isEqual;
var parseAvatarDecorationDataBinding;
if (a0 == null) {
r0 = a0 === a1;
} else if (a1 == null) {
r0 = a0 === a1;
} else {
moduleValue = require(22) /* metro dependency 22 */;
isEqual = moduleValue.isEqual;
parseAvatarDecorationDataBinding = parseAvatarDecorationData;
value = parseAvatarDecorationDataBinding(a0);
value = Reflect.apply(isEqual, moduleValue, [value, parseAvatarDecorationDataBinding(a1)]);
r0 = value;
}
return r0;
}
function hasGlobalDefaultAvatarDecoration(a0, a1) { // fn#20027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1984:931, offset: 0x00ebcd11, size: 86 bytes, params: 3, frame: 15
var r0;
var isAvatarDecorationExpiredBinding;
let value = a1 != null;
if (value) {
isAvatarDecorationExpiredBinding = isAvatarDecorationExpired;
value = undefined;
value = !isAvatarDecorationExpiredBinding(a0 == null ? value : a0.avatarDecoration);
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = undefined;
value = (a0 == null || a0.avatarDecoration == null ? value : a0.avatarDecoration.asset) != null;
r0 = value;
}
return r0;
}
}
function parseAvatarDecorationData(a0) { // fn#20024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1984:123, offset: 0x00ebcbb1, size: 211 bytes, params: 2, frame: 14
if (typeof a0 !== 'object') {
return null;
}
if (a0 == null) {
return null;
}
let value = require(1858) /* metro dependency 1858: mappers */;
value = value.parseSkuIdFromServerData(a0);
if (value == null) {
return null;
}
const object2 = {skuId: value};
if ('asset' in a0 && typeof a0.asset === 'string') {
object2.asset = a0.asset;
}
if ('expires_at' in a0 && typeof a0.expires_at === 'number') {
object2.expiresAt = a0.expires_at;
}
if ('expiresAt' in a0 && typeof a0.expiresAt === 'number') {
object2.expiresAt = a0.expiresAt;
}
return object2;
}
function isEqualAvatarDecoration(a0, a1) { // fn#20026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1984:791, offset: 0x00ebccc6, size: 75 bytes, params: 3, frame: 16
var r0;
var value;
var moduleValue;
var isEqual;
var parseAvatarDecorationDataBinding;
if (a0 == null) {
r0 = a0 === a1;
} else if (a1 == null) {
r0 = a0 === a1;
} else {
moduleValue = require(22) /* metro dependency 22 */;
isEqual = moduleValue.isEqual;
parseAvatarDecorationDataBinding = parseAvatarDecorationData;
value = parseAvatarDecorationDataBinding(a0);
value = Reflect.apply(isEqual, moduleValue, [value, parseAvatarDecorationDataBinding(a1)]);
r0 = value;
}
return r0;
}
function hasGlobalDefaultAvatarDecoration(a0, a1) { // fn#20027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1984:931, offset: 0x00ebcd11, size: 86 bytes, params: 3, frame: 15
var r0;
var isAvatarDecorationExpiredBinding;
let value = a1 != null;
if (value) {
isAvatarDecorationExpiredBinding = isAvatarDecorationExpired;
value = undefined;
value = !isAvatarDecorationExpiredBinding(a0 == null ? value : a0.avatarDecoration);
r0 = value;
} else {
r0 = value;
}
if (r0) {
value = undefined;
value = (a0 == null || a0.avatarDecoration == null ? value : a0.avatarDecoration.asset) != null;
r0 = value;
}
return r0;
}
global.__d(_fun20023, 1857, [1858, 22, 2]) /* metro module 1857, dependencies: [1858, 22, 2] */;
@@ -1,60 +1,64 @@
/* Metro module 8396; source: modules/collectibles/avatar_decorations/native/AvatarDecorationUtils.tsx; dependencies: [1424, 1305, 4080, 8397, 1962, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AvatarDecorationConstantsModule from '../AvatarDecorationConstants.tsx'; /* Metro dependency 1424 */
function _fun66722(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8581:6, offset: 0x01c06dbe, size: 150 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(1424) /* metro dependency 1424: AvatarDecorationConstants */).DECORATION_TO_AVATAR_RATIO;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/avatar_decorations/native/AvatarDecorationUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/avatar_decorations/native/AvatarDecorationUtils.tsx');
exports.getDecorationSizeForAvatarSize = getDecorationSizeForAvatarSize;
exports.getDecorationCutoutForAvatarCutout = getDecorationCutoutForAvatarCutout;
exports.openAvatarDecorationActionSheet = openAvatarDecorationActionSheet;
}
function getDecorationSizeForAvatarSize(a0) { // fn#66723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8581:272, offset: 0x01c06e54, size: 72 bytes, params: 2, frame: 14
return typeof a0 !== 'number' ? (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[a0] * DECORATION_TO_AVATAR_RATIO : a0 * DECORATION_TO_AVATAR_RATIO;
}
function getDecorationSizeForAvatarSize(a0) { // fn#66723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8581:272, offset: 0x01c06e54, size: 72 bytes, params: 2, frame: 14
return typeof a0 !== 'number' ? (require(1305) /* metro dependency 1305: native */).AVATAR_SIZE_MAP[a0] * DECORATION_TO_AVATAR_RATIO : a0 * DECORATION_TO_AVATAR_RATIO;
}
function getDecorationCutoutForAvatarCutout(a0, a1) { // fn#66724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8581:411, offset: 0x01c06e9c, size: 157 bytes, params: 3, frame: 17
var r2;
var r0;
var object;
var value4;
var nativeCutouts;
const value = a0;
const env0_0 = a1;
if (value == null) {
r0 = value;
} else {
object = {};
object.direction = value.direction;
object.radius = value.radius;
r2 = value.inset ?? 0;
object.inset = r2 + a1;
value4 = undefined;
object.imageType = (require(1305) /* metro dependency 1305: native */).CutoutType.RECTANGULAR;
nativeCutouts = value.nativeCutouts;
r2 = nativeCutouts == null ? value4 : nativeCutouts.map(function(a0) {
var r4;
var object = {};
copyDataProperties(object, a0, r4);
object['x'] = a0.x + require;
object['y'] = a0.y + require;
return object;
});
object.nativeCutouts = r2;
r0 = object;
}
return r0;
}
function getDecorationCutoutForAvatarCutout(a0, a1) { // fn#66724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8581:411, offset: 0x01c06e9c, size: 157 bytes, params: 3, frame: 17
var r2;
var r0;
var object2;
var value4;
var nativeCutouts;
const value = a0;
const env0_0 = a1;
if (value == null) {
r0 = value;
} else {
object2 = {};
object2.direction = value.direction;
object2.radius = value.radius;
r2 = value.inset ?? 0;
object2.inset = r2 + a1;
value4 = undefined;
object2.imageType = (require(1305) /* metro dependency 1305: native */).CutoutType.RECTANGULAR;
nativeCutouts = value.nativeCutouts;
r2 = nativeCutouts == null ? value4 : nativeCutouts.map(function(a0) {
var r4;
var object = {};
copyDataProperties(object, a0, r4);
object['x'] = a0.x + require;
object['y'] = a0.y + require;
return object;
});
object2.nativeCutouts = r2;
r0 = object2;
function openAvatarDecorationActionSheet({user, guildId, currentAvatarDecoration, isTryItOut, analyticsLocations}) { // fn#66726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8581:717, offset: 0x01c06f75, size: 155 bytes, params: 2, frame: 22
importDefault(dependencyMap[2]).hideActionSheet();
const defaultImport2 = importDefault(dependencyMap[2]);
const openLazy = defaultImport2.openLazy;
let value = require(dependencyMap[4]);
value = value(dependencyMap[3], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'Edit Avatar Decoration', {user: user, guildId: guildId,
currentAvatarDecoration: currentAvatarDecoration, isTryItOut: isTryItOut,
analyticsLocations: analyticsLocations}]);
}
return r0;
}
function openAvatarDecorationActionSheet({user, guildId, currentAvatarDecoration, isTryItOut, analyticsLocations}) { // fn#66726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8581:717, offset: 0x01c06f75, size: 155 bytes, params: 2, frame: 22
importDefault(dependencyMap[2]).hideActionSheet();
const defaultImport2 = importDefault(dependencyMap[2]);
const openLazy = defaultImport2.openLazy;
let value = require(dependencyMap[4]);
value = value(dependencyMap[3], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'Edit Avatar Decoration', {user: user, guildId: guildId,
currentAvatarDecoration: currentAvatarDecoration, isTryItOut: isTryItOut,
analyticsLocations: analyticsLocations}]);
}
global.__d(_fun66722, 8396, [1424, 1305, 4080, 8397, 1962,
2]) /* metro module 8396, dependencies: [1424, 1305, 4080, 8397, 1962, 2] */;
@@ -1,79 +1,96 @@
/* Metro module 8424; source: modules/collectibles/avatar_decorations/native/AvatarGrid.tsx; dependencies: [31, 27, 4502, 4396, 33, 4501, 697, 566, 1305, 8420, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import PresenceStore from '../../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
function _fun66898(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8609:6, offset: 0x01c0e526, size: 307 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
const env0_7 = Reflect.apply(createStyles, value, [{avatarRow: {'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-around'}, avatarStatusStyle: {backgroundColor: BACKGROUND_SURFACE_HIGH},
gridContainer: {'width': 108, 'height': 108, 'justifyContent': 'space-around', 'marginLeft': 28}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/avatar_decorations/native/AvatarGrid.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/avatar_decorations/native/AvatarGrid.tsx');
exports.default = AvatarGrid;
}
function GridAvatar({user, guildId, size, showStatus, pendingAvatarSrc, pendingAvatarDecoration}) { // fn#66899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8609:430, offset: 0x01c0e659, size: 316 bytes, params: 2, frame: 28
var object6;
var r0;
var object4;
var object5;
const styles = useStyles();
const status = (require(566) /* metro dependency 566: flux */).useStateFromStores([PresenceStore], function() {
return PresenceStore.getStatus(user.id);
});
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
object6 = {avatarDecoration: pendingAvatarDecoration !== undefined ? pendingAvatarDecoration : user.avatarDecoration,
status: showStatus ? status : undefined, statusStyle: styles.avatarStatusStyle, size: size};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
if (pendingAvatarSrc !== undefined) {
object5 = {};
object5.source = (require(8420) /* metro dependency 8420: ProfileCustomizationUtils */).getAvatarSource(user,
guildId, pendingAvatarSrc, useReducedMotion);
copyDataProperties(object5, object6, pendingAvatarSrc);
r0 = object5;
} else {
object4 = {user: user, guildId: guildId};
copyDataProperties(object4, object6, undefined);
r0 = object4;
function GridAvatar({user, guildId, size, showStatus, pendingAvatarSrc, pendingAvatarDecoration}) { // fn#66899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8609:430, offset: 0x01c0e659, size: 316 bytes, params: 2, frame: 28
var object3;
var r0;
var object;
var object2;
const styles = useStyles();
const status = (require(566) /* metro dependency 566: flux */).useStateFromStores([PresenceStore], function() {
return PresenceStore.getStatus(user.id);
});
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
object3 = {avatarDecoration: pendingAvatarDecoration !== undefined ? pendingAvatarDecoration : user.avatarDecoration,
status: showStatus ? status : undefined, statusStyle: styles.avatarStatusStyle, size: size};
const Avatar = (NativeModule).Avatar;
if (pendingAvatarSrc !== undefined) {
object2 = {};
object2.source = (require(8420) /* metro dependency 8420: ProfileCustomizationUtils */).getAvatarSource(user,
guildId, pendingAvatarSrc, useReducedMotion);
copyDataProperties(object2, object3, pendingAvatarSrc);
r0 = object2;
} else {
object = {user: user, guildId: guildId};
copyDataProperties(object, object3, undefined);
r0 = object;
}
return <Avatar {...r0} />;
}
return <Avatar {...r0} />;
}
function AvatarGrid(a0) { // fn#66902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8609:985, offset: 0x01c0e7b5, size: 343 bytes, params: 2, frame: 26
const styles = useStyles();
let avatarRow = styles.avatarRow;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let NORMAL = AvatarSizes.NORMAL;
const gridAvatar = <GridAvatar size={NORMAL} {...a0} />;
NORMAL = AvatarSizes.NORMAL;
const view = <View style={avatarRow}>{gridAvatar}<GridAvatar size={NORMAL} showStatus {...a0} /></View>;
avatarRow = styles.avatarRow;
let REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
const gridAvatar2 = <GridAvatar size={REFRESH_MEDIUM_32} {...a0} />;
REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
return (
<View style={styles.gridContainer}>
{view}
function AvatarGrid(a0) { // fn#66902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8609:985, offset: 0x01c0e7b5, size: 343 bytes, params: 2, frame: 26
const styles = useStyles();
let avatarRow = styles.avatarRow;
const AvatarSizes = (NativeModule).AvatarSizes;
let NORMAL = AvatarSizes.NORMAL;
const gridAvatar = <GridAvatar size={NORMAL} {...a0} />;
NORMAL = AvatarSizes.NORMAL;
const view = (
<View style={avatarRow}>
{gridAvatar2}
{gridAvatar}
<GridAvatar
size={REFRESH_MEDIUM_32}
size={NORMAL}
showStatus
{...a0}
/>
</View>
</View>
);
);
avatarRow = styles.avatarRow;
let REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
const gridAvatar2 = <GridAvatar size={REFRESH_MEDIUM_32} {...a0} />;
REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
return (
<View style={styles.gridContainer}>
{view}
<View style={avatarRow}>
{gridAvatar2}
<GridAvatar
size={REFRESH_MEDIUM_32}
showStatus
{...a0}
/>
</View>
</View>
);
}
}
global.__d(_fun66898, 8424, [31, 27, 4502, 4396, 33, 4501, 697, 566, 1305, 8420,
2]) /* metro module 8424, dependencies: [31, 27, 4502, 4396, 33, 4501, 697, 566, 1305, 8420, 2] */;
@@ -1,112 +1,122 @@
/* Metro module 8408; source: modules/collectibles/avatar_decorations/native/EditAvatarDecorationSection.tsx; dependencies: [31, 27, 5126, 1424, 33, 4501, 8409, 8407, 8410, 6789, 7598, 2] */
import CutoutableAvatarDecoration from '../../native/components/CutoutableAvatarDecoration.tsx'; /* Metro dependency 7598 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as AvatarDecorationConstantsModule from '../AvatarDecorationConstants.tsx'; /* Metro dependency 1424 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as AvatarDecorationRecordModule from '../../records/AvatarDecorationRecord.tsx'; /* Metro dependency 5126 */
import * as UseAvatarDecorationSectionsModule from '../useAvatarDecorationSections.tsx'; /* Metro dependency 8407 */
import * as UseCollectibleListLayoutModule from '../../native/useCollectibleListLayout.tsx'; /* Metro dependency 8409 */
import * as CollectiblesEditUserProfileListItemsModule from '../../native/CollectiblesEditUserProfileListItems.tsx'; /* Metro dependency 8410 */
function _fun66816(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8593:6, offset: 0x01c0acd1, size: 374 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(5126) /* metro dependency 5126: AvatarDecorationRecord */).isAvatarDecorationRecord;
const env0_6 = (require(1424) /* metro dependency 1424: AvatarDecorationConstants */).AVATAR_DECORATION_SIZE;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.Fragment;
const env0_9 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const GUTTER_SIZE = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).GUTTER_SIZE;
const env0_10 = Reflect.apply(createStyles, createStylesModule, [{row: {'flexDirection': 'row',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const GUTTER_SIZE = (UseCollectibleListLayoutModule).GUTTER_SIZE;
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [{row: {'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'space-between', paddingHorizontal: GUTTER_SIZE},
rowSpacer: {height: GUTTER_SIZE}}]);
const value4 = value.memo(_fun66817);
value4.displayName = 'EditAvatarDecorationRow';
value = value.memo(_fun66820);
value.displayName = 'EditAvatarDecorationItem';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/avatar_decorations/native/EditAvatarDecorationSection.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/avatar_decorations/native/EditAvatarDecorationSection.tsx');
exports.EditAvatarDecorationRow = value4;
}
function _fun66817({items, selectedSkuId, setSelectedAvatarDecoration, guildId, isTryItOut, size}) { // fn#66817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8593:419, offset: 0x01c0ae47, size: 289 bytes, params: 2, frame: 25
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
const env0_3 = isTryItOut;
const styles = useStyles();
const env0_5 = env0_3.useCallback(function() {
setSelectedAvatarDecoration(null);
}, [setSelectedAvatarDecoration]);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const items2 = [];
const value2 = arraySpread(items2, items, 0, undefined);
items2[value2] = null;
items2[value2 + 1] = null;
const slice = items2.slice;
const ROW_SIZE = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).ROW_SIZE;
let value = Reflect.apply(slice, items2, [0, ROW_SIZE]);
value = <View style={styles.row}>{value.map(_fun66819)}</View>;
return (
<>
{value}
<View style={styles.rowSpacer} />
</>
);
}
function _fun66820({avatarDecoration, isSelected, setSelectedAvatarDecoration, isTryItOut, size}) { // fn#66820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8593:1201, offset: 0x01c0b0f3, size: 209 bytes, params: 2, frame: 21
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
const value2 = env0_3.useCallback(function() {
setSelectedAvatarDecoration(avatarDecoration);
}, [setSelectedAvatarDecoration, avatarDecoration]);
const EditCollectiblesListItemProduct = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemProduct;
return (
<EditCollectiblesListItemProduct
skuId={avatarDecoration.skuId}
isSelected={isSelected}
onPress={value2}
size={size}
isTryItOut={isTryItOut}
accessibilityLabel={avatarDecoration.label}
>
{((Component) => <Component avatarDecoration={avatarDecoration} size={AVATAR_DECORATION_SIZE} animate={isSelected} />)(importDefault(7598) /* metro dependency 7598: CutoutableAvatarDecoration */)}
</EditCollectiblesListItemProduct>
);
}
function _fun66819(a0, a1) { // fn#66819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8593:655, offset: 0x01c0af7a, size: 377 bytes, params: 3, frame: 20
var selectedSkuIdBinding;
var skuId;
var binding;
const NONE_ITEM = (require(8407) /* metro dependency 8407: useAvatarDecorationSections */).NONE_ITEM;
if (a0 === NONE_ITEM) {
const EditCollectiblesListItemNone = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemNone;
function _fun66817({items, selectedSkuId, setSelectedAvatarDecoration, guildId, isTryItOut, size}) { // fn#66817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8593:419, offset: 0x01c0ae47, size: 289 bytes, params: 2, frame: 25
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
const isTryItOut2 = isTryItOut;
const styles = useStyles();
const env0_5 = isTryItOut2.useCallback(function() {
setSelectedAvatarDecoration(null);
}, [setSelectedAvatarDecoration]);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const items2 = [];
const value2 = arraySpread(items2, items, 0, undefined);
items2[value2] = null;
items2[value2 + 1] = null;
const slice = items2.slice;
const ROW_SIZE = (UseCollectibleListLayoutModule).ROW_SIZE;
let value = Reflect.apply(slice, items2, [0, ROW_SIZE]);
value = (
<View style={styles.row}>
{value.map(_fun66819)}
</View>
);
return (
<EditCollectiblesListItemNone
<>
{value}
<View style={styles.rowSpacer} />
</>
);
function _fun66819(a0, a1) { // fn#66819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8593:655, offset: 0x01c0af7a, size: 377 bytes, params: 3, frame: 20
var selectedSkuIdBinding;
var skuId;
var binding;
const NONE_ITEM = (UseAvatarDecorationSectionsModule).NONE_ITEM;
if (a0 === NONE_ITEM) {
const EditCollectiblesListItemNone = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemNone;
return (
<EditCollectiblesListItemNone
size={size}
onPress={env0_5}
isSelected={selectedSkuId == null}
asDefault={guildId != null}
key="none"
/>
);
}
const SHOP_ITEM = (UseAvatarDecorationSectionsModule).SHOP_ITEM;
if (a0 === SHOP_ITEM) {
const EditCollectiblesListItemShop = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemShop;
return (
<EditCollectiblesListItemShop
size={size}
analyticsSource={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_AVATAR_DECORATION_SHEET}
key="shop"
/>
);
}
if (isAvatarDecorationRecord(a0)) {
selectedSkuIdBinding = selectedSkuId;
skuId = a0.skuId;
binding = env1_11;
var bindingProps = {avatarDecoration: a0, isSelected: selectedSkuIdBinding === skuId,
setSelectedAvatarDecoration: setSelectedAvatarDecoration, isTryItOut: isTryItOut, size: size};
skuId = a0.skuId;
return ((Component) => <Component {...bindingProps} key={skuId} />)(binding);
}
const sizeBinding = size;
return <View style={{height: sizeBinding, width: sizeBinding}} key={a1} />;
}
}
function _fun66820({avatarDecoration, isSelected, setSelectedAvatarDecoration, isTryItOut, size}) { // fn#66820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8593:1201, offset: 0x01c0b0f3, size: 209 bytes, params: 2, frame: 21
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
const value2 = env0_3.useCallback(function() {
setSelectedAvatarDecoration(avatarDecoration);
}, [setSelectedAvatarDecoration, avatarDecoration]);
const EditCollectiblesListItemProduct = (CollectiblesEditUserProfileListItemsModule).EditCollectiblesListItemProduct;
return (
<EditCollectiblesListItemProduct
skuId={avatarDecoration.skuId}
isSelected={isSelected}
onPress={value2}
size={size}
onPress={env0_5}
isSelected={selectedSkuId == null}
asDefault={guildId != null}
key="none"
/>
isTryItOut={isTryItOut}
accessibilityLabel={avatarDecoration.label}
>
{((Component) => <Component avatarDecoration={avatarDecoration} size={AVATAR_DECORATION_SIZE} animate={isSelected} />)(CutoutableAvatarDecoration)}
</EditCollectiblesListItemProduct>
);
}
const SHOP_ITEM = (require(8407) /* metro dependency 8407: useAvatarDecorationSections */).SHOP_ITEM;
if (a0 === SHOP_ITEM) {
const EditCollectiblesListItemShop = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemShop;
return (
<EditCollectiblesListItemShop
size={size}
analyticsSource={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_AVATAR_DECORATION_SHEET}
key="shop"
/>
);
}
if (isAvatarDecorationRecord(a0)) {
selectedSkuIdBinding = selectedSkuId;
skuId = a0.skuId;
binding = env1_11;
var bindingProps = {avatarDecoration: a0, isSelected: selectedSkuIdBinding === skuId,
setSelectedAvatarDecoration: setSelectedAvatarDecoration, isTryItOut: isTryItOut, size: size};
skuId = a0.skuId;
return ((Component) => <Component {...bindingProps} key={skuId} />)(binding);
}
const sizeBinding = size;
return <View style={{height: sizeBinding, width: sizeBinding}} key={a1} />;
}
global.__d(_fun66816, 8408, [31, 27, 5126, 1424, 33, 4501, 8409, 8407, 8410, 6789, 7598,
2]) /* metro module 8408, dependencies: [31, 27, 5126, 1424, 33, 4501, 8409, 8407, 8410, 6789, 7598, 2] */;
@@ -1,39 +1,43 @@
/* Metro module 4618; source: modules/collectibles/avatar_decorations/useAvatarDecoration.tsx; dependencies: [57, 1945, 632, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
function _fun39645(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39645, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4796:6, offset: 0x010e7593, size: 143 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = getAvatarDecoration;
const getAvatarDecoration2 = getAvatarDecoration;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/avatar_decorations/useAvatarDecoration.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/avatar_decorations/useAvatarDecoration.tsx');
exports.useAvatarDecoration = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[2]).useStateFromStores([GuildMemberStore], _fun39648);
};
exports.getAvatarDecoration = closure;
}
exports.getAvatarDecoration = getAvatarDecoration2;
function getAvatarDecoration(a0, a1) { // fn#39646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4796:116, offset: 0x010e7622, size: 131 bytes, params: 3, frame: 17
let value = a2;
const value2 = undefined;
let r4 = value !== value2 ? value : [GuildMemberStore];
const property = Module00057(r4, 1)[0];
value = null;
r4 = value != a1 && value != a0 ? property.getMember(a1, a0.id) : value;
const avatarDecoration = value == r4 ? value2 : r4.avatarDecoration;
return value != avatarDecoration ? avatarDecoration : value == a0 ? value2 : a0.avatarDecoration;
}
function getAvatarDecoration(a0, a1) { // fn#39646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4796:116, offset: 0x010e7622, size: 131 bytes, params: 3, frame: 17
let value = a2;
const value2 = undefined;
let r4 = value !== value2 ? value : [GuildMemberStore];
const property = env0_2(r4, 1)[0];
value = null;
r4 = value != a1 && value != a0 ? property.getMember(a1, a0.id) : value;
const avatarDecoration = value == r4 ? value2 : r4.avatarDecoration;
return value != avatarDecoration ? avatarDecoration : value == a0 ? value2 : a0.avatarDecoration;
}
function useAvatarDecoration(a0, a1) { // fn#39647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4796:424, offset: 0x010e76a5, size: 71 bytes, params: 3, frame: 14
const env0_0 = a0;
const env0_1 = a1;
return (UseStateFromStoresModule).useStateFromStores([GuildMemberStore],
_fun39648);
function _fun39648() { // fn#39648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4796:497, offset: 0x010e76ec, size: 41 bytes, params: 1, frame: 15
return getAvatarDecoration(env0_0, require, [GuildMemberStore]);
}
function useAvatarDecoration(a0, a1) { // fn#39647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4796:424, offset: 0x010e76a5, size: 71 bytes, params: 3, frame: 14
const env0_0 = a0;
const env0_1 = a1;
return (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildMemberStore],
_fun39648);
}
}
function _fun39648() { // fn#39648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4796:497, offset: 0x010e76ec, size: 41 bytes, params: 1, frame: 15
return getAvatarDecoration(env0_0, require, [GuildMemberStore]);
}
global.__d(_fun39645, 4618, [57, 1945, 632, 2]) /* metro module 4618, dependencies: [57, 1945, 632, 2] */;
@@ -1,92 +1,96 @@
/* Metro module 8418; source: modules/collectibles/avatar_decorations/useAvatarDecorationIfNotExpired.tsx; dependencies: [57, 31, 661, 1857, 4041, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 _fun66865(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:6, offset: 0x01c0d53f, size: 155 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).MAX_TIMEOUT_MS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/avatar_decorations/useAvatarDecorationIfNotExpired.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/avatar_decorations/useAvatarDecorationIfNotExpired.tsx');
exports.default = useAvatarDecorationIfNotExpired;
}
function useAvatarDecorationIfNotExpired(a0) { // fn#66866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:260, offset: 0x01c0d5da, size: 140 bytes, params: 2, frame: 17
const value = a0;
const binding = env0_3;
const value3 = binding.useState(false);
const value4 = undefined;
const value5 = env0_2(value3, 2);
const property = value5[0];
var env0_2 = value5[1];
var env0_3 = binding.useRef(null);
binding.useEffect(function() {
var closure = _fun66868;
var env0_0 = closure;
closure();
return _fun66870;
}, [value]);
binding.useEffect(_fun66871, [property]);
return property ? value4 : value;
}
function _fun66867() { // fn#66867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:385, offset: 0x01c0d666, size: 28 bytes, params: 1, frame: 10
maybeScheduleExpirationCheck();
return _fun66870;
}
function _fun66871() { // fn#66871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:794, offset: 0x01c0d7b4, size: 39 bytes, params: 1, frame: 9
var current;
if (env0_1) {
current = env0_3.current;
if (current != null) {
current.stop();
}
}
}
function maybeScheduleExpirationCheck() { // fn#66868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:423, offset: 0x01c0d682, size: 256 bytes, params: 1, frame: 17
var environment;
var value2;
var moduleValue;
var isAvatarDecorationExpired;
var binding;
var isAvatarDecorationExpired2;
var value3;
var Date;
var value4;
var timeout;
if (env1_0 == null) {
env1_2(false);
} else if ('expiresAt' in env1_0) {
if (env1_0.expiresAt != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(1857) /* metro dependency 1857: AvatarDecorationUtils */;
isAvatarDecorationExpired = moduleValue.isAvatarDecorationExpired;
binding = env1_0;
isAvatarDecorationExpired2 = Reflect.apply(isAvatarDecorationExpired, moduleValue, [binding]);
env1_2(isAvatarDecorationExpired2);
value3 = 1000 * binding.expiresAt;
Date = global.Date;
value4 = value3 - Date.now();
if (!isAvatarDecorationExpired2) {
if (value4 > 0) {
timeout = new (require(4041) /* metro dependency 4041: Timers */).Timeout();
timeout.start(global.Math.min(MAX_TIMEOUT_MS, value4), function() {
maybeScheduleExpirationCheck();
});
env1_3.current = timeout;
function useAvatarDecorationIfNotExpired(a0) { // fn#66866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:260, offset: 0x01c0d5da, size: 140 bytes, params: 2, frame: 17
const value = a0;
const binding = env0_3;
const value3 = binding.useState(false);
const value4 = undefined;
const value5 = env0_2(value3, 2);
const property = value5[0];
var env0_2 = value5[1];
var env0_3 = binding.useRef(null);
binding.useEffect(function() {
var closure = _fun66868;
var env0_0 = closure;
closure();
return _fun66870;
}, [value]);
binding.useEffect(_fun66871, [property]);
return property ? value4 : value;
function _fun66867() { // fn#66867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:385, offset: 0x01c0d666, size: 28 bytes, params: 1, frame: 10
maybeScheduleExpirationCheck();
return _fun66870;
function maybeScheduleExpirationCheck() { // fn#66868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:423, offset: 0x01c0d682, size: 256 bytes, params: 1, frame: 17
var environment;
var value2;
var moduleValue;
var isAvatarDecorationExpired;
var binding;
var isAvatarDecorationExpired2;
var value3;
var Date;
var value4;
var timeout;
if (env1_0 == null) {
env1_2(false);
} else if ('expiresAt' in env1_0) {
if (env1_0.expiresAt != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(1857) /* metro dependency 1857: AvatarDecorationUtils */;
isAvatarDecorationExpired = moduleValue.isAvatarDecorationExpired;
binding = env1_0;
isAvatarDecorationExpired2 = Reflect.apply(isAvatarDecorationExpired, moduleValue, [binding]);
env1_2(isAvatarDecorationExpired2);
value3 = 1000 * binding.expiresAt;
Date = global.Date;
value4 = value3 - Date.now();
if (!isAvatarDecorationExpired2) {
if (value4 > 0) {
timeout = new (require(4041) /* metro dependency 4041: Timers */).Timeout();
timeout.start(global.Math.min(MAX_TIMEOUT_MS, value4), function() {
maybeScheduleExpirationCheck();
});
env1_3.current = timeout;
}
}
} else {
env1_2(false);
}
} else {
env1_2(false);
}
}
} else {
env1_2(false);
function _fun66870() { // fn#66870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:719, offset: 0x01c0d791, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_3.current?.stop();
}
}
} else {
env1_2(false);
function _fun66871() { // fn#66871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:794, offset: 0x01c0d7b4, size: 39 bytes, params: 1, frame: 9
var current;
if (env0_1) {
current = env0_3.current;
if (current != null) {
current.stop();
}
}
}
}
}
function _fun66870() { // fn#66870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8603:719, offset: 0x01c0d791, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_3.current?.stop();
}
global.__d(_fun66865, 8418, [57, 31, 661, 1857, 4041,
2]) /* metro module 8418, dependencies: [57, 31, 661, 1857, 4041, 2] */;
@@ -1,65 +1,101 @@
/* Metro module 8407; source: modules/collectibles/avatar_decorations/useAvatarDecorationSections.tsx; dependencies: [57, 31, 5121, 5145, 632, 5134, 1244, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import CollectiblesPurchaseStore from '../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
function _fun66809(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8592:6, offset: 0x01c0a897, size: 251 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 env0_3 = (require(31) /* metro dependency 31 */).useMemo;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/avatar_decorations/useAvatarDecorationSections.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/avatar_decorations/useAvatarDecorationSections.tsx');
exports.default = _default_66810;
exports.Section = {PURCHASE: 'purchase', PREMIUM_PURCHASE: 'premium_purchase', PREVIEW: 'preview'};
exports.NONE_ITEM = {skuId: 'None'};
exports.SHOP_ITEM = {skuId: 'Shop'};
function _default_66810() { // fn#66810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8592:295, offset: 0x01c0a992, size: 170 bytes, params: 1, frame: 19
const purchases = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesPurchaseStore],
function() {
return CollectiblesPurchaseStore.purchases;
});
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value3 = Module00057(Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[CollectiblesCategoryStore],
function() {
var collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
return [collectiblesCategoryStoreBinding.categories, collectiblesCategoryStoreBinding.products];
}]), 2);
return useMemo(_fun66813, [value3[0], value3[1], purchases]);
function _fun66813() { // fn#66813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8592:460, offset: 0x01c0aa6c, size: 403 bytes, params: 1, frame: 23
const value4 = (CollectiblesUtilsModule).getAvatarDecorations(purchases,
env0_1).reduce(_fun66814, {purchase: [], premium_purchase: [], preview: []});
object = {};
const binding = env1_6;
const PURCHASE = binding.PURCHASE;
object.section = PURCHASE;
const items3 = [env1_7, env1_8];
arraySpread(items3, value4.purchase, 2, undefined);
object.items = items3;
object.height = 12;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const VqmVqE = t.VqmVqE;
object.header = Reflect.apply(string, intl, [VqmVqE]);
const items2 = [object];
const PREMIUM_PURCHASE = binding.PREMIUM_PURCHASE;
string = intl.string;
const TiLCgw = t.TiLCgw;
items2[1] = {section: PREMIUM_PURCHASE, items: value4.premium_purchase, height: 12, header: Reflect.apply(string,
intl, [TiLCgw])};
object = {};
const PREVIEW = binding.PREVIEW;
object.section = PREVIEW;
object.items = value4.preview;
object.height = 12;
object.header = intl.string(t['1vbbee']);
items2[2] = object;
return items2.filter(function(a0) {
return a0.items.length > 0;
});
function _fun66814(a0, a1) { // fn#66814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8592:513, offset: 0x01c0abff, size: 188 bytes, params: 3, frame: 17
var r4;
var value3;
var moduleValue;
var isPremiumCollectiblesProduct;
var binding;
let value = environment.__proto__;
const value2 = purchases.get(a1.skuId);
if (value2 != null) {
value = environment.__proto__.__proto__;
value = require(5134) /* metro dependency 5134: CollectiblesUtils */;
value = value.isPremiumCollectiblesPurchase(value2);
r4 = value;
} else {
value3 = environment.__proto__.__proto__;
moduleValue = require(5134) /* metro dependency 5134: CollectiblesUtils */;
isPremiumCollectiblesProduct = moduleValue.isPremiumCollectiblesProduct;
binding = env1_2;
r4 = Reflect.apply(isPremiumCollectiblesProduct, moduleValue, [binding.get(a1.skuId)]);
}
if (r4) {
a0.premium_purchase.push(a1);
} else if (value2 != null) {
a0.purchase.push(a1);
} else {
a0.preview.push(a1);
}
return a0;
}
}
}
}
function _default_66810() { // fn#66810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8592:295, offset: 0x01c0a992, size: 170 bytes, params: 1, frame: 19
const purchases = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesPurchaseStore],
function() {
return CollectiblesPurchaseStore.purchases;
});
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value3 = env0_2(Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[CollectiblesCategoryStore],
function() {
return [CollectiblesCategoryStore.categories, CollectiblesCategoryStore.products];
}]), 2);
return useMemo(_fun66813, [value3[0], value3[1], purchases]);
}
function _fun66813() { // fn#66813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8592:460, offset: 0x01c0aa6c, size: 403 bytes, params: 1, frame: 23
var object2;
const value4 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getAvatarDecorations(purchases,
env0_1).reduce(_fun66814, {purchase: [], premium_purchase: [], preview: []});
object2 = {};
const binding = env1_6;
const PURCHASE = binding.PURCHASE;
object2.section = PURCHASE;
const items3 = [env1_7, env1_8];
arraySpread(items3, value4.purchase, 2, undefined);
object2.items = items3;
object2.height = 12;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const VqmVqE = t.VqmVqE;
object2.header = Reflect.apply(string, intl, [VqmVqE]);
const items2 = [object2];
const PREMIUM_PURCHASE = binding.PREMIUM_PURCHASE;
string = intl.string;
const TiLCgw = t.TiLCgw;
items2[1] = {section: PREMIUM_PURCHASE, items: value4.premium_purchase, height: 12, header: Reflect.apply(string,
intl, [TiLCgw])};
object2 = {};
const PREVIEW = binding.PREVIEW;
object2.section = PREVIEW;
object2.items = value4.preview;
object2.height = 12;
object2.header = intl.string(t['1vbbee']);
items2[2] = object2;
return items2.filter(function(a0) {
return a0.items.length > 0;
});
}
global.__d(_fun66809, 8407, [57, 31, 5121, 5145, 632, 5134, 1244,
2]) /* metro module 8407, dependencies: [57, 31, 5121, 5145, 632, 5134, 1244, 2] */;
@@ -1,162 +1,167 @@
/* Metro module 7592; source: modules/collectibles/createUseCollectiblesShopStyles.tsx; dependencies: [57, 4502, 7593, 5132, 632, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import AccessibilityStore from '../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import Module05132 from '../../by-id/module-05132.js'; /* Metro dependency 5132 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun60889(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:6, offset: 0x01713e8b, size: 168 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/createUseCollectiblesShopStyles.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/createUseCollectiblesShopStyles.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return _fun60895;
};
}
function getMidpointColor(a0, a1) { // fn#60890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:135, offset: 0x01713f33, size: 196 bytes, params: 3, frame: 20
let value = a0.toRgb();
const value2 = a1.toRgb();
value = (require(7593) /* metro dependency 7593: UserProfileGradientUtils */).getValueInColorGradientByPercentage([value.r,
value.g, value.b], [value2.r, value2.g, value2.b], 50);
value = Module00057(value, 3);
return (Module05132)({r: value[0], g: value[1], b: value[2]});
}
function getMidpointColor(a0, a1) { // fn#60890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:135, offset: 0x01713f33, size: 196 bytes, params: 3, frame: 20
let value = a0.toRgb();
const value2 = a1.toRgb();
value = (require(7593) /* metro dependency 7593: UserProfileGradientUtils */).getValueInColorGradientByPercentage([value.r,
value.g, value.b], [value2.r, value2.g, value2.b], 50);
value = env0_3(value, 3);
return (importDefault(5132) /* metro dependency 5132 */)({r: value[0], g: value[1], b: value[2]});
}
function getBackgroundColors(a0, a1) { // fn#60891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:331, offset: 0x01713ff7, size: 268 bytes, params: 3, frame: 19
var r0;
var object2;
var value;
var property;
var getMidpointColorBinding;
let length = a1.length;
if (length !== 0) {
length = a1.length;
if (length === 1) {
object2 = {primary: a1[0], secondary: a1[0]};
property = a1[0];
object2.border = property.setAlpha(0.4);
property = a1[0];
object2.label = property.isLight() ? a0.dark : a0.light;
r0 = object2;
} else {
object2 = {primary: a1[0], secondary: a1[1]};
function getBackgroundColors(a0, a1) { // fn#60891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:331, offset: 0x01713ff7, size: 268 bytes, params: 3, frame: 19
var r0;
var object;
var value;
var property;
var getMidpointColorBinding;
let length = a1.length;
if (length !== 0) {
length = a1.length;
value = undefined;
object2.tertiary = length > 2 ? a1[2] : value;
getMidpointColorBinding = getMidpointColor;
property = a1[0];
object2.border = getMidpointColorBinding(property, a1[1]).setAlpha(0.4);
property = a1[0];
value = getMidpointColorBinding(property, a1[1]);
object2.label = value.isLight() ? a0.dark : a0.light;
r0 = object2;
if (length === 1) {
object = {primary: a1[0], secondary: a1[0]};
property = a1[0];
object.border = property.setAlpha(0.4);
property = a1[0];
object.label = property.isLight() ? a0.dark : a0.light;
r0 = object;
} else {
object = {primary: a1[0], secondary: a1[1]};
length = a1.length;
value = undefined;
object.tertiary = length > 2 ? a1[2] : value;
getMidpointColorBinding = getMidpointColor;
property = a1[0];
object.border = getMidpointColorBinding(property, a1[1]).setAlpha(0.4);
property = a1[0];
value = getMidpointColorBinding(property, a1[1]);
object.label = value.isLight() ? a0.dark : a0.light;
r0 = object;
}
return r0;
}
return r0;
}
}
function getButtonColors(a0, a1) { // fn#60892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:652, offset: 0x01714103, size: 169 bytes, params: 3, frame: 17
var r0;
var object2;
var midpointColor;
var property;
if (a1.length !== 0) {
if (a1.length === 1) {
property = a1[0];
r0 = {primary: a1[0], secondary: a1[0], text: property.isLight() ? a0.dark : a0.light};
} else {
object2 = {primary: a1[0], secondary: a1[1]};
midpointColor = getMidpointColor(a1[0], a1[1]);
object2.text = midpointColor.isLight() ? a0.dark : a0.light;
r0 = object2;
function getButtonColors(a0, a1) { // fn#60892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:652, offset: 0x01714103, size: 169 bytes, params: 3, frame: 17
var r0;
var object;
var midpointColor;
var property;
if (a1.length !== 0) {
if (a1.length === 1) {
property = a1[0];
r0 = {primary: a1[0], secondary: a1[0], text: property.isLight() ? a0.dark : a0.light};
} else {
object = {primary: a1[0], secondary: a1[1]};
midpointColor = getMidpointColor(a1[0], a1[1]);
object.text = midpointColor.isLight() ? a0.dark : a0.light;
r0 = object;
}
return r0;
}
return r0;
}
}
function desaturate_60893(a0, a1) { // fn#60893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:861, offset: 0x017141ac, size: 81 bytes, params: 3, frame: 14
const value = a0.toHsl();
return (importDefault(5132) /* metro dependency 5132 */)({h: value.h, s: value.s * a1, l: value.l});
}
function _default_60894(a0) { // fn#60894, offset: 0x017141fd, size: 16 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun60895;
}
function _fun60895(a0) { // fn#60895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:948, offset: 0x0171420d, size: 464 bytes, params: 2, frame: 21
var object10;
var r3;
var r0;
var object6;
var object7;
var desaturate_60893Binding;
var object8;
var object9;
const value2 = undefined;
const saturation = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.saturation;
});
const env0_0 = saturation;
if (a0 == null) {
return {};
function desaturate_60893(a0, a1) { // fn#60893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:861, offset: 0x017141ac, size: 81 bytes, params: 3, frame: 14
const value = a0.toHsl();
return (Module05132)({h: value.h, s: value.s * a1, l: value.l});
}
object10 = {};
const getBackgroundColorsBinding = getBackgroundColors;
const binding = env0_0;
let backgroundColors = a0.backgroundColors;
object10.backgroundColors = getBackgroundColorsBinding(binding, backgroundColors);
const getButtonColorsBinding = getButtonColors;
let buttonColors = a0.buttonColors;
object10.buttonColors = getButtonColorsBinding(binding, buttonColors);
object10.confettiColors = a0.confettiColors;
if (saturation === 1) {
object9 = {};
copyDataProperties(object9, object10, undefined);
r0 = object9;
} else {
object6 = {};
backgroundColors = object10.backgroundColors;
if (backgroundColors != null) {
object7 = {};
desaturate_60893Binding = desaturate_60893;
backgroundColors = object10.backgroundColors;
object7.primary = desaturate_60893Binding(backgroundColors.primary, saturation);
backgroundColors = object10.backgroundColors;
object7.secondary = desaturate_60893Binding(backgroundColors.secondary, saturation);
backgroundColors = object10.backgroundColors;
object7.tertiary = backgroundColors.tertiary != null ? desaturate_60893(object10.backgroundColors.tertiary,
saturation) : value2;
desaturate_60893Binding = desaturate_60893;
backgroundColors = object10.backgroundColors;
object7.border = desaturate_60893Binding(backgroundColors.border, saturation);
backgroundColors = object10.backgroundColors;
object7.label = desaturate_60893Binding(backgroundColors.label, saturation);
r3 = object7;
} else {
r3 = value2;
function _default_60894(a0) { // fn#60894, offset: 0x017141fd, size: 16 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun60895;
function _fun60895(a0) { // fn#60895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7770:948, offset: 0x0171420d, size: 464 bytes, params: 2, frame: 21
var object5;
var r3;
var r0;
var object;
var object2;
var desaturate_60893Binding;
var object3;
var object4;
const value2 = undefined;
const saturation = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.saturation;
});
const saturation2 = saturation;
if (a0 == null) {
return {};
}
object5 = {};
const getBackgroundColorsBinding = getBackgroundColors;
const binding = saturation2;
let backgroundColors = a0.backgroundColors;
object5.backgroundColors = getBackgroundColorsBinding(binding, backgroundColors);
const getButtonColorsBinding = getButtonColors;
let buttonColors = a0.buttonColors;
object5.buttonColors = getButtonColorsBinding(binding, buttonColors);
object5.confettiColors = a0.confettiColors;
if (saturation === 1) {
object4 = {};
copyDataProperties(object4, object5, undefined);
r0 = object4;
} else {
object = {};
backgroundColors = object5.backgroundColors;
if (backgroundColors != null) {
object2 = {};
desaturate_60893Binding = desaturate_60893;
backgroundColors = object5.backgroundColors;
object2.primary = desaturate_60893Binding(backgroundColors.primary, saturation);
backgroundColors = object5.backgroundColors;
object2.secondary = desaturate_60893Binding(backgroundColors.secondary, saturation);
backgroundColors = object5.backgroundColors;
object2.tertiary = backgroundColors.tertiary != null ? desaturate_60893(object5.backgroundColors.tertiary,
saturation) : value2;
desaturate_60893Binding = desaturate_60893;
backgroundColors = object5.backgroundColors;
object2.border = desaturate_60893Binding(backgroundColors.border, saturation);
backgroundColors = object5.backgroundColors;
object2.label = desaturate_60893Binding(backgroundColors.label, saturation);
r3 = object2;
} else {
r3 = value2;
}
object.backgroundColors = r3;
buttonColors = object5.buttonColors;
if (buttonColors != null) {
object3 = {};
desaturate_60893Binding = desaturate_60893;
buttonColors = object5.buttonColors;
object3.primary = desaturate_60893Binding(buttonColors.primary, saturation);
buttonColors = object5.buttonColors;
object3.secondary = desaturate_60893Binding(buttonColors.secondary, saturation);
buttonColors = object5.buttonColors;
object3.text = desaturate_60893Binding(buttonColors.text, saturation);
r3 = object3;
} else {
r3 = value2;
}
object.buttonColors = r3;
object.confettiColors = object5.confettiColors.map(function(a0) {
return desaturate_60893(a0, saturation);
});
r0 = object;
}
return r0;
}
object6.backgroundColors = r3;
buttonColors = object10.buttonColors;
if (buttonColors != null) {
object8 = {};
desaturate_60893Binding = desaturate_60893;
buttonColors = object10.buttonColors;
object8.primary = desaturate_60893Binding(buttonColors.primary, saturation);
buttonColors = object10.buttonColors;
object8.secondary = desaturate_60893Binding(buttonColors.secondary, saturation);
buttonColors = object10.buttonColors;
object8.text = desaturate_60893Binding(buttonColors.text, saturation);
r3 = object8;
} else {
r3 = value2;
}
object6.buttonColors = r3;
object6.confettiColors = object10.confettiColors.map(function(a0) {
return desaturate_60893(a0, saturation);
});
r0 = object6;
}
return r0;
}
global.__d(_fun60889, 7592, [57, 4502, 7593, 5132, 632,
2]) /* metro module 7592, dependencies: [57, 4502, 7593, 5132, 632, 2] */;
@@ -1,10 +1,18 @@
/* Metro module 8487; source: modules/collectibles/experiments/CollectiblesMobileFlexibleBundlesExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun67339(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8672:6, offset: 0x01c1ec86, size: 168 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = (require(1854) /* metro dependency 1854: apex */).createApexExperiment({'name': '2026-05-mobile-collectibles-flexible-bundles',
const env0_0 = (ApexModule).createApexExperiment({'name': '2026-05-mobile-collectibles-flexible-bundles',
'kind': 'user', defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/experiments/CollectiblesMobileFlexibleBundlesExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/experiments/CollectiblesMobileFlexibleBundlesExperiment.tsx');
exports.useCollectiblesMobileFlexibleBundlesExperiment = useCollectiblesMobileFlexibleBundlesExperiment;
function useCollectiblesMobileFlexibleBundlesExperiment(a0) { // fn#67340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8672:427, offset: 0x01373b1d, size: 29 bytes, params: 2, frame: 12
return env0_0.useConfig({location: a0});
}
}
global.__d(_fun67339, 8487, [1854, 2]) /* metro module 8487, dependencies: [1854, 2] */;
@@ -1,13 +1,29 @@
/* Metro module 7628; source: modules/collectibles/experiments/CollectiblesPostPurchaseGiftingExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun61125(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7806:6, offset: 0x0171b0de, size: 185 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-06-post-purchase-gifting', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/experiments/CollectiblesPostPurchaseGiftingExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/experiments/CollectiblesPostPurchaseGiftingExperiment.tsx');
exports.default = value;
exports.getIsPostPurchaseGiftingEnabled = getIsPostPurchaseGiftingEnabled;
exports.useIsPostPurchaseGiftingEnabled = useIsPostPurchaseGiftingEnabled;
function getIsPostPurchaseGiftingEnabled(a0) { // fn#61126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7806:411, offset: 0x00e3651f, size: 34 bytes, params: 2, frame: 12
const binding = env0_0;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding, [{location: a0}]).enabled;
}
function useIsPostPurchaseGiftingEnabled(a0) { // fn#61127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7806:482, offset: 0x00e364db, size: 34 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: a0}]).enabled;
}
}
global.__d(_fun61125, 7628, [1854, 2]) /* metro module 7628, dependencies: [1854, 2] */;
@@ -1,13 +1,29 @@
/* Metro module 7630; source: modules/collectibles/experiments/CollectiblesProfileFrameGiftingExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun61130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7808:6, offset: 0x0171b385, size: 183 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-04-profile-frame-gifting', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/experiments/CollectiblesProfileFrameGiftingExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/experiments/CollectiblesProfileFrameGiftingExperiment.tsx');
exports.default = value;
exports.getIsProfileFrameGiftingEnabled = getIsProfileFrameGiftingEnabled;
exports.useIsProfileFrameGiftingEnabled = useIsProfileFrameGiftingEnabled;
function getIsProfileFrameGiftingEnabled(a0) { // fn#61131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7808:411, offset: 0x00e3651f, size: 34 bytes, params: 2, frame: 12
const binding = env0_0;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding, [{location: a0}]).enabled;
}
function useIsProfileFrameGiftingEnabled(a0) { // fn#61132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7808:482, offset: 0x00e364db, size: 34 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: a0}]).enabled;
}
}
global.__d(_fun61130, 7630, [1854, 2]) /* metro module 7630, dependencies: [1854, 2] */;
@@ -1,13 +1,29 @@
/* Metro module 15301; source: modules/collectibles/experiments/CollectiblesProfileFramesEAMarketingExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun117001(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117001, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15498:6, offset: 0x0249f923, size: 187 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-04-profile-frames-ea-marketing', 'kind': 'user',
defaultConfig: {enabled: false}, variations: {[0]: {enabled: false}, [1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/experiments/CollectiblesProfileFramesEAMarketingExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/experiments/CollectiblesProfileFramesEAMarketingExperiment.tsx');
exports.default = value;
exports.getIsProfileFramesEAMarketingEnabled = getIsProfileFramesEAMarketingEnabled;
exports.useIsProfileFramesEAMarketingEnabled = useIsProfileFramesEAMarketingEnabled;
function getIsProfileFramesEAMarketingEnabled(a0) { // fn#117002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15498:427, offset: 0x00e3651f, size: 34 bytes, params: 2, frame: 12
const binding = env0_0;
const getConfig = binding.getConfig;
return Reflect.apply(getConfig, binding, [{location: a0}]).enabled;
}
function useIsProfileFramesEAMarketingEnabled(a0) { // fn#117003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15498:503, offset: 0x00e364db, size: 34 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: a0}]).enabled;
}
}
global.__d(_fun117001, 15301, [1854, 2]) /* metro module 15301, dependencies: [1854, 2] */;
@@ -1,19 +1,23 @@
/* Metro module 8499; source: modules/collectibles/experiments/CollectiblesProfileFramesExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun67415(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67415, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8684:6, offset: 0x01c21be6, size: 177 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-03-collectibles-profile-frames', 'kind': 'user',
defaultConfig: {enableProfileFrames: false}, variations: {[0]: {enableProfileFrames: false},
[1]: {enableProfileFrames: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/experiments/CollectiblesProfileFramesExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/experiments/CollectiblesProfileFramesExperiment.tsx');
exports.default = value;
exports.useIsProfileFramesEnabled = useIsProfileFramesEnabled;
function useIsProfileFramesEnabled(a0) { // fn#67416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8684:441, offset: 0x01c21c97, size: 35 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: a0}]).enableProfileFrames;
}
}
function useIsProfileFramesEnabled(a0) { // fn#67416, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8684:441, offset: 0x01c21c97, size: 35 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: a0}]).enableProfileFrames;
}
global.__d(_fun67415, 8499, [1854, 2]) /* metro module 8499, dependencies: [1854, 2] */;
@@ -1,27 +1,30 @@
/* Metro module 10055; source: modules/collectibles/experiments/CollectiblesProfileFramesPurchaseExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun78618(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10241:6, offset: 0x01e2e14a, size: 244 bytes, params: 8, frame: 22
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {CONTROL: 0};
object3[0] = 'CONTROL';
object3.OPEN_PURCHASE = 1;
object3[1] = 'OPEN_PURCHASE';
object3.PAID_PREMIUM_SUBSCRIBERS_ONLY = 2;
object3[2] = 'PAID_PREMIUM_SUBSCRIBERS_ONLY';
let value = require(1854) /* metro dependency 1854: apex */;
object = {CONTROL: 0};
object[0] = 'CONTROL';
object.OPEN_PURCHASE = 1;
object[1] = 'OPEN_PURCHASE';
object.PAID_PREMIUM_SUBSCRIBERS_ONLY = 2;
object[2] = 'PAID_PREMIUM_SUBSCRIBERS_ONLY';
let value = ApexModule;
const createApexExperiment = value.createApexExperiment;
const object4 = {'name': '2026-04-collectibles-profile-frames-purchase', 'kind': 'user'};
let CONTROL = object3.CONTROL;
object4.defaultConfig = {bucket: CONTROL};
CONTROL = object3.CONTROL;
const OPEN_PURCHASE = object3.OPEN_PURCHASE;
const PAID_PREMIUM_SUBSCRIBERS_ONLY = object3.PAID_PREMIUM_SUBSCRIBERS_ONLY;
object4.variations = {[0]: {bucket: CONTROL}, [1]: {bucket: OPEN_PURCHASE},
const object2 = {'name': '2026-04-collectibles-profile-frames-purchase', 'kind': 'user'};
let CONTROL = object.CONTROL;
object2.defaultConfig = {bucket: CONTROL};
CONTROL = object.CONTROL;
const OPEN_PURCHASE = object.OPEN_PURCHASE;
const PAID_PREMIUM_SUBSCRIBERS_ONLY = object.PAID_PREMIUM_SUBSCRIBERS_ONLY;
object2.variations = {[0]: {bucket: CONTROL}, [1]: {bucket: OPEN_PURCHASE},
[2]: {bucket: PAID_PREMIUM_SUBSCRIBERS_ONLY}};
value = Reflect.apply(createApexExperiment, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/experiments/CollectiblesProfileFramesPurchaseExperiment.tsx');
value = Reflect.apply(createApexExperiment, value, [object2]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/experiments/CollectiblesProfileFramesPurchaseExperiment.tsx');
exports.default = value;
exports.ProfileFramesPurchaseBucket = object3;
exports.ProfileFramesPurchaseBucket = object;
}
global.__d(_fun78618, 10055, [1854, 2]) /* metro module 10055, dependencies: [1854, 2] */;
@@ -1,19 +1,23 @@
/* Metro module 10153; source: modules/collectibles/experiments/CollectiblesShopCardImpressionMobileExperiment.tsx; dependencies: [1854, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ApexModule from '../../experiments/apex/index.tsx'; /* Metro dependency 1854 */
function _fun79121(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10339:6, offset: 0x01e45c49, size: 177 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1854) /* metro dependency 1854: apex */;
let value = ApexModule;
value = value.createApexExperiment({'name': '2026-04-shop-card-impression-mobile', 'kind': 'user',
defaultConfig: {enableShopCardImpression: false}, variations: {[0]: {enableShopCardImpression: false},
[1]: {enableShopCardImpression: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/experiments/CollectiblesShopCardImpressionMobileExperiment.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/experiments/CollectiblesShopCardImpressionMobileExperiment.tsx');
exports.default = value;
exports.useIsShopCardImpressionMobileEnabled = useIsShopCardImpressionMobileEnabled;
function useIsShopCardImpressionMobileEnabled(a0) { // fn#79122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10339:478, offset: 0x01e45cfa, size: 35 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: a0}]).enableShopCardImpression;
}
}
function useIsShopCardImpressionMobileEnabled(a0) { // fn#79122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10339:478, offset: 0x01e45cfa, size: 35 bytes, params: 2, frame: 12
const binding = env0_0;
const useConfig = binding.useConfig;
return Reflect.apply(useConfig, binding, [{location: a0}]).enableShopCardImpression;
}
global.__d(_fun79121, 10153, [1854, 2]) /* metro module 10153, dependencies: [1854, 2] */;
@@ -1,12 +1,16 @@
/* Metro module 14050; source: modules/collectibles/hooks/useBadBundleFilter.tsx; dependencies: [31, 1878, 5145, 632, 3802, 10060, 5134, 10030, 5133, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import CollectiblesPurchaseStore from '../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
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 CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as UseProductPurchaseStateModule from './useProductPurchaseState.tsx'; /* Metro dependency 10060 */
function _fun106550(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14247:6, offset: 0x022e01e8, size: 155 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(31) /* metro dependency 31 */).useCallback;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useBadBundleFilter.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useBadBundleFilter.tsx');
exports.useBadBundleFilter = function() {
var canUseShopDiscounts = importDefault(dependencyMap[4]).canUseShopDiscounts(require(dependencyMap[3]).useStateFromStores([UserStore],
@@ -14,104 +18,109 @@ function _fun106550(global, require, importDefault, importAll, module, exports,
var env0_0 = canUseShopDiscounts;
return useCallback(_fun106553, [canUseShopDiscounts]);
};
}
function useBadBundleFilter() { // fn#106551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14247:242, offset: 0x022e0283, size: 115 bytes, params: 1, frame: 17
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
return useCallback(function(a0) {
var r0;
var value = a0;
if (value == null) {
r0 = value;
} else if (value.length === 0) {
r0 = value;
} else {
value = value.filter(_fun106554);
r0 = value;
}
return r0;
}, [(importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(currentUser)]);
}
function _fun106553(a0) { // fn#106553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14247:353, offset: 0x022e02f6, size: 47 bytes, params: 2, frame: 12
var r0;
let value = a0;
if (value == null) {
r0 = value;
} else if (value.length === 0) {
r0 = value;
} else {
value = value.filter(_fun106554);
r0 = value;
}
return r0;
}
function _fun106554(a0) { // fn#106554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14247:390, offset: 0x022e0325, size: 381 bytes, params: 2, frame: 20
var environment;
var r6;
var moduleValue3;
var moduleValue4;
var getDefaultPriceSetAssignmentPurchaseType;
var value2;
var amount;
var value3;
var getProductOrbPrice;
var value5;
let value = environment.__proto__.__proto__;
const useProductPurchaseStateModule = require(10060) /* metro dependency 10060: useProductPurchaseState */;
const getProductPurchaseState = useProductPurchaseStateModule.getProductPurchaseState;
const isPurchased = Reflect.apply(getProductPurchaseState, useProductPurchaseStateModule,
[CollectiblesPurchaseStore, a0]).isPurchased;
const collectiblesUtilsModule = require(5134) /* metro dependency 5134: CollectiblesUtils */;
if (collectiblesUtilsModule.isBundleProduct(a0)) {
moduleValue3 = collectiblesUtilsModule;
if (moduleValue3.isFreeCollectiblesProduct(a0)) {
return true;
}
if (isPurchased) {
return true;
}
moduleValue4 = require(10030) /* metro dependency 10030: bundleUtils */;
if (moduleValue4.isValidCollectiblesBundle(a0)) {
if ((require(5133) /* metro dependency 5133: CollectiblesProductUtils */).isOrbsExclusiveProduct(a0)) {
value = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
getProductOrbPrice = value.getProductOrbPrice;
value5 = environment.__proto__;
value = Reflect.apply(getProductOrbPrice, value, [{product: a0, hasShopDiscount: env1_0}]);
return value != null;
}
value = require(5134) /* metro dependency 5134: CollectiblesUtils */;
getDefaultPriceSetAssignmentPurchaseType = value.getDefaultPriceSetAssignmentPurchaseType;
value2 = environment.__proto__;
value = Reflect.apply(getDefaultPriceSetAssignmentPurchaseType, value, [env1_0]);
value = (require(5134) /* metro dependency 5134: CollectiblesUtils */).extractPriceByPurchaseTypes(a0,
value);
function useBadBundleFilter() { // fn#106551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14247:242, offset: 0x022e0283, size: 115 bytes, params: 1, frame: 17
const currentUser = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
function() {
return UserStore.getCurrentUser();
});
return useCallback(function(a0) {
var r0;
var value = a0;
if (value == null) {
return true;
r0 = value;
} else if (value.length === 0) {
r0 = value;
} else {
value = value.filter(_fun106554);
r0 = value;
}
amount = value.amount;
value3 = 0;
if (value3 === amount) {
return true;
}
r6 = a0.bundledProducts != null ? a0.bundledProducts.reduce(_fun106555, value3) : value3;
amount = value.amount;
return amount < r6;
return r0;
}, [(importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(currentUser)]);
function _fun106552() { // fn#106552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14247:285, offset: 0x016d6188, size: 18 bytes, params: 1, frame: 9
return UserStore.getCurrentUser();
}
return false;
function _fun106553(a0) { // fn#106553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14247:353, offset: 0x022e02f6, size: 47 bytes, params: 2, frame: 12
var r0;
let value = a0;
if (value == null) {
r0 = value;
} else if (value.length === 0) {
r0 = value;
} else {
value = value.filter(_fun106554);
r0 = value;
}
return r0;
function _fun106554(a0) { // fn#106554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14247:390, offset: 0x022e0325, size: 381 bytes, params: 2, frame: 20
var environment;
var r6;
var moduleValue3;
var moduleValue4;
var getDefaultPriceSetAssignmentPurchaseType;
var value2;
var amount;
var value3;
var getProductOrbPrice;
var value5;
let value = environment.__proto__.__proto__;
const getProductPurchaseState = UseProductPurchaseStateModule.getProductPurchaseState;
const isPurchased = Reflect.apply(getProductPurchaseState, UseProductPurchaseStateModule,
[CollectiblesPurchaseStore, a0]).isPurchased;
const collectiblesUtilsModule = require(5134) /* metro dependency 5134: CollectiblesUtils */;
if (collectiblesUtilsModule.isBundleProduct(a0)) {
moduleValue3 = collectiblesUtilsModule;
if (moduleValue3.isFreeCollectiblesProduct(a0)) {
return true;
}
if (isPurchased) {
return true;
}
moduleValue4 = require(10030) /* metro dependency 10030: bundleUtils */;
if (moduleValue4.isValidCollectiblesBundle(a0)) {
if ((require(5133) /* metro dependency 5133: CollectiblesProductUtils */).isOrbsExclusiveProduct(a0)) {
value = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
getProductOrbPrice = value.getProductOrbPrice;
value5 = environment.__proto__;
value = Reflect.apply(getProductOrbPrice, value, [{product: a0, hasShopDiscount: env1_0}]);
return value != null;
}
value = require(5134) /* metro dependency 5134: CollectiblesUtils */;
getDefaultPriceSetAssignmentPurchaseType = value.getDefaultPriceSetAssignmentPurchaseType;
value2 = environment.__proto__;
value = Reflect.apply(getDefaultPriceSetAssignmentPurchaseType, value, [env1_0]);
value = (require(5134) /* metro dependency 5134: CollectiblesUtils */).extractPriceByPurchaseTypes(a0,
value);
if (value == null) {
return true;
}
amount = value.amount;
value3 = 0;
if (value3 === amount) {
return true;
}
r6 = a0.bundledProducts != null ? a0.bundledProducts.reduce(_fun106555, value3) : value3;
amount = value.amount;
return amount < r6;
}
return false;
}
return true;
function _fun106555(a0, a1) { // fn#106555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14247:892, offset: 0x022e04a2, size: 83 bytes, params: 3, frame: 14
let value = environment.__proto__.__proto__.__proto__;
value = undefined;
const value3 = (CollectiblesUtilsModule).extractPriceByPurchaseTypes(a1,
env0_0);
return a0 + ((value3 == null ? value : value3.amount) ?? 0);
}
}
}
}
return true;
}
function _fun106555(a0, a1) { // fn#106555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14247:892, offset: 0x022e04a2, size: 83 bytes, params: 3, frame: 14
let value = environment.__proto__.__proto__.__proto__;
value = undefined;
const value3 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).extractPriceByPurchaseTypes(a1,
env0_0);
return a0 + ((value3 == null ? value : value3.amount) ?? 0);
}
global.__d(_fun106550, 14050, [31, 1878, 5145, 632, 3802, 10060, 5134, 10030, 5133,
2]) /* metro module 14050, dependencies: [31, 1878, 5145, 632, 3802, 10060, 5134, 10030, 5133, 2] */;
@@ -1,40 +1,49 @@
/* Metro module 7629; source: modules/collectibles/hooks/useCanGiftProduct.tsx; dependencies: [7594, 7630, 5134, 5133, 1904, 3802, 3815, 2] */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as UseCurrentUserModule from './useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as CollectiblesProfileFrameGiftingExperimentModule from '../experiments/CollectiblesProfileFrameGiftingExperiment.tsx'; /* Metro dependency 7630 */
function _fun61128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7807:6, offset: 0x0171b197, size: 101 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useCanGiftProduct.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useCanGiftProduct.tsx');
exports.useCanGiftProduct = useCanGiftProduct;
function useCanGiftProduct(a0) { // fn#61129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7807:194, offset: 0x0171b1fc, size: 393 bytes, params: 2, frame: 23
var moduleValue8;
var value;
const value2 = undefined;
const value3 = (UseCurrentUserModule).useCurrentUser();
const value4 = (CollectiblesProfileFrameGiftingExperimentModule).useIsProfileFrameGiftingEnabled('useCanGiftProduct');
const isPremiumCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(a0);
const isFreeCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isFreeCollectiblesProduct(a0);
const isOrbsExclusiveProduct2 = (CollectiblesProductUtilsModule).isOrbsExclusiveProduct(a0);
const type = a0.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
const r4 = type === PROFILE_FRAME && !value4;
const value8 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).extractPriceByPurchaseTypes(a0,
(require(5134) /* metro dependency 5134: CollectiblesUtils */).getDefaultPriceSetAssignmentPurchaseType((PremiumUtils).canUseShopDiscounts(value3)));
let r0 = isPremiumCollectiblesProduct2 || isFreeCollectiblesProduct2;
r0 = !r0 ? isOrbsExclusiveProduct2 : r0;
r0 = !r0 ? r4 : r0;
r0 = !r0 ? a0.type === CollectiblesItemType.EXTERNAL_SKU : r0;
if (!r0) {
moduleValue8 = require(5134) /* metro dependency 5134: CollectiblesUtils */;
r0 = moduleValue8.shouldHideGiftingForCurrency(value8 == null ? value2 : value8.currency);
}
if (!r0) {
value = require(3815) /* metro dependency 3815: BillingPlatformUtils */;
value = !value.isCollectibleGiftingSupported();
r0 = value;
}
return !r0;
}
}
function useCanGiftProduct(a0) { // fn#61129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7807:194, offset: 0x0171b1fc, size: 393 bytes, params: 2, frame: 23
var moduleValue8;
var value;
const value2 = undefined;
const value3 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const value4 = (require(7630) /* metro dependency 7630: CollectiblesProfileFrameGiftingExperiment */).useIsProfileFrameGiftingEnabled('useCanGiftProduct');
const isPremiumCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(a0);
const isFreeCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isFreeCollectiblesProduct(a0);
const isOrbsExclusiveProduct2 = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).isOrbsExclusiveProduct(a0);
const type = a0.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
const r4 = type === PROFILE_FRAME && !value4;
const value8 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).extractPriceByPurchaseTypes(a0,
(require(5134) /* metro dependency 5134: CollectiblesUtils */).getDefaultPriceSetAssignmentPurchaseType((importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(value3)));
let r0 = isPremiumCollectiblesProduct2 || isFreeCollectiblesProduct2;
r0 = !r0 ? isOrbsExclusiveProduct2 : r0;
r0 = !r0 ? r4 : r0;
r0 = !r0 ? a0.type === CollectiblesItemType.EXTERNAL_SKU : r0;
if (!r0) {
moduleValue8 = require(5134) /* metro dependency 5134: CollectiblesUtils */;
r0 = moduleValue8.shouldHideGiftingForCurrency(value8 == null ? value2 : value8.currency);
}
if (!r0) {
value = require(3815) /* metro dependency 3815: BillingPlatformUtils */;
value = !value.isCollectibleGiftingSupported();
r0 = value;
}
return !r0;
}
global.__d(_fun61128, 7629, [7594, 7630, 5134, 5133, 1904, 3802, 3815,
2]) /* metro module 7629, dependencies: [7594, 7630, 5134, 5133, 1904, 3802, 3815, 2] */;
@@ -1,56 +1,64 @@
/* Metro module 10054; source: modules/collectibles/hooks/useCanPurchaseFrames.tsx; dependencies: [1878, 1880, 8499, 10055, 1900, 1895, 566, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import CollectiblesProfileFramesPurchaseExperiment from '../experiments/CollectiblesProfileFramesPurchaseExperiment.tsx'; /* Metro dependency 10055 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as PremiumTypeUtilsModule from '../../../utils/PremiumTypeUtils.tsx'; /* Metro dependency 1900 */
import * as CollectiblesProfileFramesExperimentModule from '../experiments/CollectiblesProfileFramesExperiment.tsx'; /* Metro dependency 8499 */
import * as CollectiblesProfileFramesPurchaseExperimentModule from '../experiments/CollectiblesProfileFramesPurchaseExperiment.tsx'; /* Metro dependency 10055 */
function _fun78612(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:6, offset: 0x01e2de47, size: 183 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = isUserPaidTier2;
const isUserPaidTier22 = isUserPaidTier2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_4 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useCanPurchaseFrames.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useCanPurchaseFrames.tsx');
exports.default = useCanPurchaseFrames;
exports.useCanViewProfileFramesInCollectiblesShop = useCanViewProfileFramesInCollectiblesShop;
exports.useIsProfileFramesEarlyAccessPhase = useIsProfileFramesEarlyAccessPhase;
exports.isUserPaidTier2 = closure;
}
exports.isUserPaidTier2 = isUserPaidTier22;
function isUserPaidTier2(a0) { // fn#78613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:129, offset: 0x01e2defe, size: 127 bytes, params: 2, frame: 16
const value2 = undefined;
const isPremiumExactly = PremiumTypeUtilsModule.isPremiumExactly;
const TIER_2 = PremiumTypes.TIER_2;
return Reflect.apply(isPremiumExactly, PremiumTypeUtilsModule, [a0,
TIER_2]) && (a0 == null ? value2 : a0.premiumState) != null && a0.premiumState.premiumSubscriptionType === (require(1895) /* metro dependency 1895: user */).PremiumSubscriptionType.TIER_2;
}
function isUserPaidTier2(a0) { // fn#78613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:129, offset: 0x01e2defe, size: 127 bytes, params: 2, frame: 16
const value2 = undefined;
const premiumTypeUtilsModule = require(1900) /* metro dependency 1900: PremiumTypeUtils */;
const isPremiumExactly = premiumTypeUtilsModule.isPremiumExactly;
const TIER_2 = PremiumTypes.TIER_2;
return Reflect.apply(isPremiumExactly, premiumTypeUtilsModule, [a0,
TIER_2]) && (a0 == null ? value2 : a0.premiumState) != null && a0.premiumState.premiumSubscriptionType === (require(1895) /* metro dependency 1895: user */).PremiumSubscriptionType.TIER_2;
}
function useCanPurchaseFrames(a0) { // fn#78614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:416, offset: 0x01e2df7d, size: 200 bytes, params: 2, frame: 20
const value2 = (CollectiblesProfileFramesExperimentModule).useIsProfileFramesEnabled(a0);
const defaultImport = CollectiblesProfileFramesPurchaseExperiment;
const useConfig = defaultImport.useConfig;
const bucket = Reflect.apply(useConfig, defaultImport, [{location: a0}]).bucket;
const value3 = (FluxModule).useStateFromStores([UserStore], _fun78615);
const ProfileFramesPurchaseBucket = (CollectiblesProfileFramesPurchaseExperimentModule).ProfileFramesPurchaseBucket;
const OPEN_PURCHASE = ProfileFramesPurchaseBucket.OPEN_PURCHASE;
return value2 && (bucket === OPEN_PURCHASE || bucket === ProfileFramesPurchaseBucket.PAID_PREMIUM_SUBSCRIBERS_ONLY && value3);
function _fun78615() { // fn#78615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:567, offset: 0x01e2e045, size: 29 bytes, params: 1, frame: 11
const value = environment.__proto__;
return isUserPaidTier2(UserStore.getCurrentUser());
}
function useCanPurchaseFrames(a0) { // fn#78614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:416, offset: 0x01e2df7d, size: 200 bytes, params: 2, frame: 20
const value2 = (require(8499) /* metro dependency 8499: CollectiblesProfileFramesExperiment */).useIsProfileFramesEnabled(a0);
const defaultImport = importDefault(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */;
const useConfig = defaultImport.useConfig;
const bucket = Reflect.apply(useConfig, defaultImport, [{location: a0}]).bucket;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun78615);
const ProfileFramesPurchaseBucket = (require(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */).ProfileFramesPurchaseBucket;
const OPEN_PURCHASE = ProfileFramesPurchaseBucket.OPEN_PURCHASE;
return value2 && (bucket === OPEN_PURCHASE || bucket === ProfileFramesPurchaseBucket.PAID_PREMIUM_SUBSCRIBERS_ONLY && value3);
}
}
function useCanViewProfileFramesInCollectiblesShop(a0) { // fn#78616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:796, offset: 0x01e2e062, size: 116 bytes, params: 2, frame: 16
const value2 = (require(8499) /* metro dependency 8499: CollectiblesProfileFramesExperiment */).useIsProfileFramesEnabled(a0);
const defaultImport = importDefault(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */;
const useConfig = defaultImport.useConfig;
return value2 && Reflect.apply(useConfig, defaultImport,
[{location: a0}]).bucket !== (require(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */).ProfileFramesPurchaseBucket.CONTROL;
}
function useCanViewProfileFramesInCollectiblesShop(a0) { // fn#78616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:796, offset: 0x01e2e062, size: 116 bytes, params: 2, frame: 16
const value2 = (CollectiblesProfileFramesExperimentModule).useIsProfileFramesEnabled(a0);
const defaultImport = CollectiblesProfileFramesPurchaseExperiment;
const useConfig = defaultImport.useConfig;
return value2 && Reflect.apply(useConfig, defaultImport,
[{location: a0}]).bucket !== (require(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */).ProfileFramesPurchaseBucket.CONTROL;
}
function useIsProfileFramesEarlyAccessPhase(a0) { // fn#78617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:1030, offset: 0x01e2e0d6, size: 116 bytes, params: 2, frame: 16
const value2 = (require(8499) /* metro dependency 8499: CollectiblesProfileFramesExperiment */).useIsProfileFramesEnabled(a0);
const defaultImport = importDefault(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */;
const useConfig = defaultImport.useConfig;
return value2 && Reflect.apply(useConfig, defaultImport,
[{location: a0}]).bucket === (require(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */).ProfileFramesPurchaseBucket.PAID_PREMIUM_SUBSCRIBERS_ONLY;
}
function useIsProfileFramesEarlyAccessPhase(a0) { // fn#78617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:1030, offset: 0x01e2e0d6, size: 116 bytes, params: 2, frame: 16
const value2 = (CollectiblesProfileFramesExperimentModule).useIsProfileFramesEnabled(a0);
const defaultImport = CollectiblesProfileFramesPurchaseExperiment;
const useConfig = defaultImport.useConfig;
return value2 && Reflect.apply(useConfig, defaultImport,
[{location: a0}]).bucket === (require(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */).ProfileFramesPurchaseBucket.PAID_PREMIUM_SUBSCRIBERS_ONLY;
}
function _fun78615() { // fn#78615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10240:567, offset: 0x01e2e045, size: 29 bytes, params: 1, frame: 11
const value = environment.__proto__;
return isUserPaidTier2(UserStore.getCurrentUser());
}
global.__d(_fun78612, 10054, [1878, 1880, 8499, 10055, 1900, 1895, 566,
2]) /* metro module 10054, dependencies: [1878, 1880, 8499, 10055, 1900, 1895, 566, 2] */;
@@ -1,37 +1,41 @@
/* Metro module 8405; source: modules/collectibles/hooks/useCollectiblesData.tsx; dependencies: [57, 5121, 5145, 632, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import CollectiblesPurchaseStore from '../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
function _fun66803(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8590:6, offset: 0x01c0a678, size: 146 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 collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useCollectiblesData.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useCollectiblesData.tsx');
exports.default = _default_66804;
function _default_66804(a0) { // fn#66804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8590:135, offset: 0x01c0a70a, size: 148 bytes, params: 2, frame: 19
const env0_0 = a0;
const useStateFromStoresArray = UseStateFromStoresModule.useStateFromStoresArray;
const value3 = Module00057(Reflect.apply(useStateFromStoresArray, UseStateFromStoresModule, [[CollectiblesCategoryStore],
_fun66805]), 2);
object = {category: value3[0], product: value3[1]};
object.purchase = UseStateFromStoresModule.useStateFromStores([CollectiblesPurchaseStore], _fun66806);
return object;
function _fun66805() { // fn#66805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8590:182, offset: 0x01c0a79e, size: 50 bytes, params: 1, frame: 12
const value = environment.__proto__;
const collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
const getCategoryForProduct = collectiblesCategoryStoreBinding.getCategoryForProduct;
const binding = env0_0;
const getProduct = collectiblesCategoryStoreBinding.getProduct;
return [Reflect.apply(getCategoryForProduct, collectiblesCategoryStoreBinding, [binding]), Reflect.apply(getProduct,
collectiblesCategoryStoreBinding, [binding])];
}
function _fun66806() { // fn#66806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8590:317, offset: 0x01c0a7d0, size: 27 bytes, params: 1, frame: 11
return CollectiblesPurchaseStore.getPurchase(env0_0);
}
}
}
function _default_66804(a0) { // fn#66804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8590:135, offset: 0x01c0a70a, size: 148 bytes, params: 2, frame: 19
var object2;
const env0_0 = a0;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value3 = env0_2(Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[CollectiblesCategoryStore],
_fun66805]), 2);
object2 = {category: value3[0], product: value3[1]};
object2.purchase = useStateFromStoresModule.useStateFromStores([CollectiblesPurchaseStore], _fun66806);
return object2;
}
function _fun66805() { // fn#66805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8590:182, offset: 0x01c0a79e, size: 50 bytes, params: 1, frame: 12
const value = environment.__proto__;
const getCategoryForProduct = CollectiblesCategoryStore.getCategoryForProduct;
const binding = env0_0;
const getProduct = CollectiblesCategoryStore.getProduct;
return [Reflect.apply(getCategoryForProduct, CollectiblesCategoryStore, [binding]), Reflect.apply(getProduct,
CollectiblesCategoryStore, [binding])];
}
function _fun66806() { // fn#66806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8590:317, offset: 0x01c0a7d0, size: 27 bytes, params: 1, frame: 11
return CollectiblesPurchaseStore.getPurchase(env0_0);
}
global.__d(_fun66803, 8405, [57, 5121, 5145, 632,
2]) /* metro module 8405, dependencies: [57, 5121, 5145, 632, 2] */;
@@ -1,27 +1,35 @@
/* Metro module 7594; source: modules/collectibles/hooks/useCurrentUser.tsx; dependencies: [1878, 566, 44, 2] */
import Module00044 from '../../../by-id/module-00044.js'; /* Metro dependency 44 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun60910(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7772:6, offset: 0x01714b22, size: 127 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useCurrentUser.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useCurrentUser.tsx');
exports.useCurrentUser = useCurrentUser;
exports.useCurrentUserIfAvailable = function() {
return require(dependencyMap[1]).useStateFromStores([UserStore], _fun60914);
};
function useCurrentUser() { // fn#60911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7772:202, offset: 0x01714ba1, size: 91 bytes, params: 1, frame: 16
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
(Module00044)(currentUser != null, 'user has to be signed in before accessing shop');
return currentUser;
}
function useCurrentUserIfAvailable() { // fn#60913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7772:374, offset: 0x01714c0e, size: 57 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
function _fun60914() { // fn#60914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7772:410, offset: 0x01714bfc, size: 18 bytes, params: 1, frame: 9
return UserStore.getCurrentUser();
}
}
}
function useCurrentUser() { // fn#60911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7772:202, offset: 0x01714ba1, size: 91 bytes, params: 1, frame: 16
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
(importDefault(44) /* metro dependency 44 */)(currentUser != null, 'user has to be signed in before accessing shop');
return currentUser;
}
function useCurrentUserIfAvailable() { // fn#60913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7772:374, offset: 0x01714c0e, size: 57 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
}
global.__d(_fun60910, 7594, [1878, 566, 44, 2]) /* metro module 7594, dependencies: [1878, 566, 44, 2] */;
@@ -1,29 +1,32 @@
/* Metro module 10021; source: modules/collectibles/hooks/useDefaultVariantIndex.tsx; dependencies: [5145, 566, 5133, 2] */
import CollectiblesPurchaseStore from '../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun78276(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10207:6, offset: 0x01e23e8f, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useDefaultVariantIndex.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useDefaultVariantIndex.tsx');
exports.useDefaultVariantIndex = useDefaultVariantIndex;
}
function useDefaultVariantIndex(a0) { // fn#78277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10207:218, offset: 0x01e23f01, size: 158 bytes, params: 2, frame: 17
var r0;
var value;
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesPurchaseStore],
function() {
return CollectiblesPurchaseStore.purchases;
});
const value2 = 0;
if (a0 != null) {
value = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
r0 = value.getIsVariantProduct(a0) ? global.Math.max(value2, a0.variants.findIndex(function(a0) {
return !purchases.has(a0.skuId);
})) : value2;
} else {
r0 = value2;
function useDefaultVariantIndex(a0) { // fn#78277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10207:218, offset: 0x01e23f01, size: 158 bytes, params: 2, frame: 17
var r0;
var value;
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesPurchaseStore],
function() {
return CollectiblesPurchaseStore.purchases;
});
const value2 = 0;
if (a0 != null) {
value = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
r0 = value.getIsVariantProduct(a0) ? global.Math.max(value2, a0.variants.findIndex(function(a0) {
return !purchases.has(a0.skuId);
})) : value2;
} else {
r0 = value2;
}
return r0;
}
return r0;
}
global.__d(_fun78276, 10021, [5145, 566, 5133, 2]) /* metro module 10021, dependencies: [5145, 566, 5133, 2] */;
@@ -1,19 +1,22 @@
/* Metro module 7675; source: modules/collectibles/hooks/useFetchCollectiblesCategoriesAndPurchases.tsx; dependencies: [57, 31, 4107, 5145, 632, 5120, 7603, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ExperimentStore from '../../experiments/ExperimentStore.tsx'; /* Metro dependency 4107 */
import CollectiblesPurchaseStore from '../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
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 */
function _fun61324(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:6, offset: 0x01b3b5c3, size: 232 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = useFetchPurchases;
const closure2 = useFetchCollectiblesCategoriesAndPurchases;
const useFetchPurchases2 = useFetchPurchases;
const useFetchCollectiblesCategoriesAndPurchases2 = useFetchCollectiblesCategoriesAndPurchases;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = require(31) /* metro dependency 31 */;
let value = ReactModule;
const env0_4 = value.useEffect;
const env0_5 = value.useRef;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useFetchCollectiblesCategoriesAndPurchases.tsx');
exports.default = closure2;
exports.useFetchPurchases = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useFetchCollectiblesCategoriesAndPurchases.tsx');
exports.default = useFetchCollectiblesCategoriesAndPurchases2;
exports.useFetchPurchases = useFetchPurchases2;
exports.useGetOrFetchPurchases = function() {
return useFetchPurchases(true);
};
@@ -25,87 +28,93 @@ function _fun61324(global, require, importDefault, importAll, module, exports, d
object['stalePurchasesOK'] = true;
return useFetchCollectiblesCategoriesAndPurchases(object);
};
}
function useFetchPurchases() { // fn#61325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:161, offset: 0x01b3b6ab, size: 400 bytes, params: 1, frame: 23
const value = a0;
const r11 = value !== undefined ? value : false;
const env0_3 = undefined;
const hasLoadedExperiments = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ExperimentStore],
function() {
return ExperimentStore.hasLoadedExperiments;
});
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value3 = env0_3(Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[CollectiblesPurchaseStore],
function() {
return [CollectiblesPurchaseStore.isFetching, CollectiblesPurchaseStore.isClaiming,
CollectiblesPurchaseStore.fetchError, CollectiblesPurchaseStore.claimError,
CollectiblesPurchaseStore.purchases,
CollectiblesPurchaseStore.hasPreviouslyFetched];
}]), 6);
const property = value3[0];
const property2 = value3[1];
const property3 = value3[2];
const property4 = value3[3];
const property5 = value3[4];
const property6 = value3[5];
const env0_5 = useRef(CollectiblesPurchaseStore.hasPreviouslyFetched);
useEffect(_fun61328, [property6]);
const env0_6 = useRef(CollectiblesPurchaseStore.fetchError);
useEffect(_fun61329, [property3]);
const env0_7 = useRef(CollectiblesPurchaseStore.isFetching);
useEffect(_fun61330, [property]);
useEffect(_fun61331, [r11, hasLoadedExperiments]);
return {isClaiming: property2, fetchPurchasesError: property3, claimError: property4, isFetching: property,
purchases: property5, hasPreviouslyFetched: property6};
function _fun61328() { // fn#61328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:477, offset: 0x013a92e3, size: 21 bytes, params: 1, frame: 2
env0_5.current = env0_4;
}
function useFetchPurchases() { // fn#61325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:161, offset: 0x01b3b6ab, size: 400 bytes, params: 1, frame: 23
const value = a0;
const r11 = value !== undefined ? value : false;
const env0_3 = undefined;
const hasLoadedExperiments = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([ExperimentStore],
function() {
return ExperimentStore.hasLoadedExperiments;
});
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value3 = env0_3(Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[CollectiblesPurchaseStore],
function() {
return [CollectiblesPurchaseStore.isFetching, CollectiblesPurchaseStore.isClaiming,
CollectiblesPurchaseStore.fetchError, CollectiblesPurchaseStore.claimError,
CollectiblesPurchaseStore.purchases,
CollectiblesPurchaseStore.hasPreviouslyFetched];
}]), 6);
const property = value3[0];
const property2 = value3[1];
const property3 = value3[2];
const property4 = value3[3];
const property5 = value3[4];
const property6 = value3[5];
const env0_5 = useRef(CollectiblesPurchaseStore.hasPreviouslyFetched);
useEffect(_fun61328, [property6]);
const env0_6 = useRef(CollectiblesPurchaseStore.fetchError);
useEffect(_fun61329, [property3]);
const env0_7 = useRef(CollectiblesPurchaseStore.isFetching);
useEffect(_fun61330, [property]);
useEffect(_fun61331, [r11, hasLoadedExperiments]);
return {isClaiming: property2, fetchPurchasesError: property3, claimError: property4, isFetching: property,
purchases: property5, hasPreviouslyFetched: property6};
}
function _fun61329() { // fn#61329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:526, offset: 0x01b3b8a7, size: 21 bytes, params: 1, frame: 2
env0_6.current = env0_3;
}
function useFetchCollectiblesCategoriesAndPurchases(a0, a1) { // fn#61332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:809, offset: 0x01b3b93f, size: 275 bytes, params: 3, frame: 21
let value = undefined;
const {isFetching, categories, fetchCategoriesError,
refreshCategories} = (importDefault(7603) /* metro dependency 7603: useMaybeFetchCollectiblesCategories */)({paymentGateway: a0 == null ? value : a0.paymentGateway,
noOp: a0 == null ? value : a0.noOp, logPerf: a0 == null ? value : a0.logPerf,
countryCode: a0 == null ? value : a0.countryCode}, a1);
value = useFetchPurchases(a0 == null ? value : a0.stalePurchasesOK);
const isClaiming = value.isClaiming;
const fetchPurchasesError = value.fetchPurchasesError;
const claimError = value.claimError;
const isFetching2 = value.isFetching;
return {isFetching: isFetching || isFetching2, isFetchingCategories: isFetching, isFetchingPurchases: isFetching2,
isClaiming: isClaiming, categories: categories, purchases: value.purchases,
fetchCategoriesError: fetchCategoriesError, fetchPurchasesError: fetchPurchasesError, claimError: claimError,
refreshCategories: refreshCategories, hasPreviouslyFetched: value.hasPreviouslyFetched};
}
function _fun61330() { // fn#61330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:582, offset: 0x01b3b8bc, size: 21 bytes, params: 1, frame: 2
env0_7.current = env0_2;
}
function useGetOrFetchPurchase(a0) { // fn#61334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:1750, offset: 0x01b3ba64, size: 55 bytes, params: 2, frame: 12
const value = a1;
const value2 = undefined;
return a0 != null ? useFetchPurchases(!(value !== value2) || value).purchases.get(a0) : value2;
}
function _fun61331() { // fn#61331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:609, offset: 0x01b3b8d1, size: 110 bytes, params: 1, frame: 12
var r1;
var value;
const hasLoadedExperimentsBinding = hasLoadedExperiments;
let r0 = hasLoadedExperimentsBinding ? env0_7.current : !hasLoadedExperimentsBinding;
if (!r0) {
r1 = env0_0 === true && env0_5.current;
r1 = r1 && env0_6.current == null;
r0 = r1;
}
if (!r0) {
value = environment.__proto__;
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
value.fetchCollectiblesPurchases();
}
}
function _fun61329() { // fn#61329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:526, offset: 0x01b3b8a7, size: 21 bytes, params: 1, frame: 2
env0_6.current = env0_3;
}
function _fun61330() { // fn#61330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:582, offset: 0x01b3b8bc, size: 21 bytes, params: 1, frame: 2
env0_7.current = env0_2;
}
function _fun61331() { // fn#61331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:609, offset: 0x01b3b8d1, size: 110 bytes, params: 1, frame: 12
var r1;
var value;
const hasLoadedExperimentsBinding = hasLoadedExperiments;
let r0 = hasLoadedExperimentsBinding ? env0_7.current : !hasLoadedExperimentsBinding;
if (!r0) {
r1 = env0_0 === true && env0_5.current;
r1 = r1 && env0_6.current == null;
r0 = r1;
}
if (!r0) {
value = environment.__proto__;
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
value.fetchCollectiblesPurchases();
function useFetchCollectiblesCategoriesAndPurchases(a0, a1) { // fn#61332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:809, offset: 0x01b3b93f, size: 275 bytes, params: 3, frame: 21
let value = undefined;
const {isFetching, categories, fetchCategoriesError,
refreshCategories} = (importDefault(7603) /* metro dependency 7603: useMaybeFetchCollectiblesCategories */)({paymentGateway: a0 == null ? value : a0.paymentGateway,
noOp: a0 == null ? value : a0.noOp, logPerf: a0 == null ? value : a0.logPerf,
countryCode: a0 == null ? value : a0.countryCode}, a1);
value = useFetchPurchases(a0 == null ? value : a0.stalePurchasesOK);
const isClaiming = value.isClaiming;
const fetchPurchasesError = value.fetchPurchasesError;
const claimError = value.claimError;
const isFetching2 = value.isFetching;
return {isFetching: isFetching || isFetching2, isFetchingCategories: isFetching, isFetchingPurchases: isFetching2,
isClaiming: isClaiming, categories: categories, purchases: value.purchases,
fetchCategoriesError: fetchCategoriesError, fetchPurchasesError: fetchPurchasesError, claimError: claimError,
refreshCategories: refreshCategories, hasPreviouslyFetched: value.hasPreviouslyFetched};
}
function useGetOrFetchPurchase(a0) { // fn#61334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7853:1750, offset: 0x01b3ba64, size: 55 bytes, params: 2, frame: 12
const value = a1;
const value2 = undefined;
return a0 != null ? useFetchPurchases(!(value !== value2) || value).purchases.get(a0) : value2;
}
}
global.__d(_fun61324, 7675, [57, 31, 4107, 5145, 632, 5120, 7603,
2]) /* metro module 7675, dependencies: [57, 31, 4107, 5145, 632, 5120, 7603, 2] */;
@@ -1,66 +1,71 @@
/* Metro module 8461; source: modules/collectibles/hooks/useFetchCollectiblesProduct.tsx; dependencies: [57, 31, 4279, 5121, 661, 632, 1904, 5120, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import SKUStore from '../../../stores/game_store/SKUStore.tsx'; /* Metro dependency 4279 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
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 UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun67198(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8646:6, offset: 0x01c19209, size: 189 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 env0_3 = (require(31) /* metro dependency 31 */).useEffect;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).SKUProductLines;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useFetchCollectiblesProduct.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useFetchCollectiblesProduct.tsx');
exports.useFetchCollectiblesProduct = useFetchCollectiblesProduct;
}
function useFetchCollectiblesProduct(a0, a1) { // fn#67199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8646:294, offset: 0x01c192c6, size: 348 bytes, params: 3, frame: 24
const env0_0 = a0;
const env0_1 = a1;
const value2 = undefined;
const value3 = (UseStateFromStoresModule).useStateFromStores([SKUStore],
_fun67200);
const r9 = value3 != null && value3.productLine !== SKUProductLines.COLLECTIBLES;
const env0_2 = r9;
const useStateFromStoresArray = UseStateFromStoresModule.useStateFromStoresArray;
const value7 = env0_2(Reflect.apply(useStateFromStoresArray, UseStateFromStoresModule, [[CollectiblesCategoryStore],
_fun67201]), 2);
const property = value7[0];
const property2 = value7[1];
useEffect(_fun67202, [a0, property, r9, property2, a1,
a1 === true && (property == null ? value2 : property.type) === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE && property.items.length === 0]);
return {product: property, isFetching: (property2 == null ? value2 : property2.state) === 'fetching'};
function _fun67200() { // fn#67200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8646:374, offset: 0x01c19422, size: 39 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_0 ? SKUStore.get(env0_0) : value2;
}
function useFetchCollectiblesProduct(a0, a1) { // fn#67199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8646:294, offset: 0x01c192c6, size: 348 bytes, params: 3, frame: 24
const env0_0 = a0;
const env0_1 = a1;
const value2 = undefined;
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([SKUStore],
_fun67200);
const r9 = value3 != null && value3.productLine !== SKUProductLines.COLLECTIBLES;
const env0_2 = r9;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value7 = env0_2(Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[CollectiblesCategoryStore],
_fun67201]), 2);
const property = value7[0];
const property2 = value7[1];
useEffect(_fun67202, [a0, property, r9, property2, a1,
a1 === true && (property == null ? value2 : property.type) === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE && property.items.length === 0]);
return {product: property, isFetching: (property2 == null ? value2 : property2.state) === 'fetching'};
}
function _fun67201() { // fn#67201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8646:483, offset: 0x01c19449, size: 50 bytes, params: 1, frame: 12
const value = environment.__proto__;
const collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
const getProduct = collectiblesCategoryStoreBinding.getProduct;
const binding = env0_0;
const getProductFetch = collectiblesCategoryStoreBinding.getProductFetch;
return [Reflect.apply(getProduct, collectiblesCategoryStoreBinding, [binding]), Reflect.apply(getProductFetch,
collectiblesCategoryStoreBinding, [binding])];
}
function _fun67200() { // fn#67200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8646:374, offset: 0x01c19422, size: 39 bytes, params: 1, frame: 12
const value2 = null;
return value2 != env0_0 ? SKUStore.get(env0_0) : value2;
}
function _fun67202() { // fn#67202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8646:653, offset: 0x01c1947b, size: 233 bytes, params: 1, frame: 14
var r1;
var value12;
var moduleValue;
let r0 = env0_0 == null || ReactModule.useEffect != null && !env0_5;
r0 = !r0 ? env0_2 : r0;
r0 = !r0 ? env0_4?.state === 'fetching' : r0;
if (!r0) {
r1 = env0_4?.state === 'error' && env0_4.endedAt != null;
r1 = r1 && global.Date.now() - env0_4.endedAt < 3600000;
r0 = r1;
}
if (!r0) {
value12 = environment.__proto__;
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.fetchCollectiblesProduct(env0_0, {includeBundles: require});
}
}
function _fun67201() { // fn#67201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8646:483, offset: 0x01c19449, size: 50 bytes, params: 1, frame: 12
const value = environment.__proto__;
const getProduct = CollectiblesCategoryStore.getProduct;
const binding = env0_0;
const getProductFetch = CollectiblesCategoryStore.getProductFetch;
return [Reflect.apply(getProduct, CollectiblesCategoryStore, [binding]), Reflect.apply(getProductFetch,
CollectiblesCategoryStore, [binding])];
}
function _fun67202() { // fn#67202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8646:653, offset: 0x01c1947b, size: 233 bytes, params: 1, frame: 14
var r1;
var value12;
var moduleValue;
let r0 = env0_0 == null || env0_3 != null && !env0_5;
r0 = !r0 ? env0_2 : r0;
r0 = !r0 ? env0_4?.state === 'fetching' : r0;
if (!r0) {
r1 = env0_4?.state === 'error' && env0_4.endedAt != null;
r1 = r1 && global.Date.now() - env0_4.endedAt < 3600000;
r0 = r1;
}
if (!r0) {
value12 = environment.__proto__;
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.fetchCollectiblesProduct(env0_0, {includeBundles: require});
}
}
global.__d(_fun67198, 8461, [57, 31, 4279, 5121, 661, 632, 1904, 5120,
2]) /* metro module 8461, dependencies: [57, 31, 4279, 5121, 661, 632, 1904, 5120, 2] */;
@@ -1,27 +1,33 @@
/* Metro module 7602; source: modules/collectibles/hooks/useFetchCollectiblesProductCategory.tsx; dependencies: [57, 5121, 7603, 632, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import UseMaybeFetchCollectiblesCategories from './useMaybeFetchCollectiblesCategories.tsx'; /* Metro dependency 7603 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
function _fun60933(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7780:6, offset: 0x01715670, size: 132 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useFetchCollectiblesProductCategory.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useFetchCollectiblesProductCategory.tsx');
exports.useFetchCollectiblesProductCategory = useFetchCollectiblesProductCategory;
function useFetchCollectiblesProductCategory(a0) { // fn#60934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7780:254, offset: 0x017156f4, size: 119 bytes, params: 2, frame: 17
const env0_0 = a0;
(UseMaybeFetchCollectiblesCategories)();
const useStateFromStoresArray = UseStateFromStoresModule.useStateFromStoresArray;
const value = Module00057(Reflect.apply(useStateFromStoresArray, UseStateFromStoresModule, [[CollectiblesCategoryStore],
_fun60935]), 2);
return {isFetching: value[0], category: value[1]};
function _fun60935() { // fn#60935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7780:355, offset: 0x0171576b, size: 45 bytes, params: 1, frame: 12
const collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
const getCategoryForProduct = collectiblesCategoryStoreBinding.getCategoryForProduct;
return [collectiblesCategoryStoreBinding.isFetchingCategories, Reflect.apply(getCategoryForProduct,
collectiblesCategoryStoreBinding, [env0_0])];
}
}
}
function useFetchCollectiblesProductCategory(a0) { // fn#60934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7780:254, offset: 0x017156f4, size: 119 bytes, params: 2, frame: 17
const env0_0 = a0;
(importDefault(7603) /* metro dependency 7603: useMaybeFetchCollectiblesCategories */)();
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value = env0_3(Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[CollectiblesCategoryStore],
_fun60935]), 2);
return {isFetching: value[0], category: value[1]};
}
function _fun60935() { // fn#60935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7780:355, offset: 0x0171576b, size: 45 bytes, params: 1, frame: 12
const getCategoryForProduct = CollectiblesCategoryStore.getCategoryForProduct;
return [CollectiblesCategoryStore.isFetchingCategories, Reflect.apply(getCategoryForProduct,
CollectiblesCategoryStore, [env0_0])];
}
global.__d(_fun60933, 7602, [57, 5121, 7603, 632,
2]) /* metro module 7602, dependencies: [57, 5121, 7603, 632, 2] */;
@@ -1,4 +1,12 @@
/* Metro module 10157; source: modules/collectibles/hooks/useFetchCollectiblesProducts.tsx; dependencies: [57, 31, 4279, 5121, 661, 632, 1904, 5120, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import SKUStore from '../../../stores/game_store/SKUStore.tsx'; /* Metro dependency 4279 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
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 UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun79142(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:6, offset: 0x01e46648, size: 211 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_79145 = function(a0, a1) {
@@ -46,253 +54,255 @@ function _fun79142(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = (require(31) /* metro dependency 31 */).useEffect;
const skuStore = importDefault(4279) /* metro dependency 4279: SKUStore */;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).SKUProductLines;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useFetchCollectiblesProducts.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useFetchCollectiblesProducts.tsx');
exports.useFetchCollectiblesProducts = useFetchCollectiblesProducts;
}
function _createForOfIteratorHelperLoose_79143(a0, a1) { // fn#79143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:182, offset: 0x01e4671b, 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)) {
function _createForOfIteratorHelperLoose_79143(a0, a1) { // fn#79143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:182, offset: 0x01e4671b, 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 _fun79144;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_79145(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 _fun79144;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_79145(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_79145(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_79145(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun79144;
}
return _fun79144;
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 _fun79144() { // fn#79144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:753, 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]};
}
}
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 useFetchCollectiblesProducts(a0, a1) { // fn#79146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1218, offset: 0x01e4688f, size: 221 bytes, params: 3, frame: 23
const env0_0 = a0;
const env0_1 = a1;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
let useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value2 = Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[SKUStore], _fun79147]);
const value3 = useStateFromStoresModule.useStateFromStoresArray([CollectiblesCategoryStore], _fun79149);
const moduleValue3 = useStateFromStoresModule;
useStateFromStoresArray = moduleValue3.useStateFromStoresArray;
useEffect(_fun79153, [a0, value2, Reflect.apply(useStateFromStoresArray, moduleValue3, [[CollectiblesCategoryStore],
_fun79151]), value3, a1]);
return value3.some(_fun79154);
}
function useFetchCollectiblesProducts(a0, a1) { // fn#79146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1218, offset: 0x01e4688f, size: 221 bytes, params: 3, frame: 23
const env0_0 = a0;
const env0_1 = a1;
let useStateFromStoresArray = UseStateFromStoresModule.useStateFromStoresArray;
const value2 = Reflect.apply(useStateFromStoresArray, UseStateFromStoresModule, [[SKUStore], _fun79147]);
useStateFromStoresArray = UseStateFromStoresModule.useStateFromStoresArray;
const collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
const value3 = Reflect.apply(useStateFromStoresArray, UseStateFromStoresModule, [[collectiblesCategoryStoreBinding], _fun79149]);
useStateFromStoresArray = UseStateFromStoresModule.useStateFromStoresArray;
useEffect(_fun79153, [a0, value2, Reflect.apply(useStateFromStoresArray, UseStateFromStoresModule,
[[collectiblesCategoryStoreBinding], _fun79151]), value3, a1]);
return value3.some(_fun79154);
function _fun79147() { // fn#79147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1305, offset: 0x01e4696c, size: 28 bytes, params: 1, frame: 11
return env0_0.map(function(a0) {
return SKUStore.get(a0);
});
}
function _fun79147() { // fn#79147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1305, offset: 0x01e4696c, size: 28 bytes, params: 1, frame: 11
return env0_0.map(function(a0) {
return SKUStore.get(a0);
});
}
function _fun79149() { // fn#79149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1372, offset: 0x01e4699e, size: 28 bytes, params: 1, frame: 11
return env0_0.map(function(a0) {
return CollectiblesCategoryStore.getProduct(a0);
});
}
function _fun79149() { // fn#79149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1372, offset: 0x01e4699e, size: 28 bytes, params: 1, frame: 11
return env0_0.map(function(a0) {
return CollectiblesCategoryStore.getProduct(a0);
});
}
function _fun79151() { // fn#79151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1446, offset: 0x01e469ba, size: 28 bytes, params: 1, frame: 11
return env0_0.map(function(a0) {
return CollectiblesCategoryStore.getProductFetch(a0);
});
}
function _fun79151() { // fn#79151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1446, offset: 0x01e469ba, size: 28 bytes, params: 1, frame: 11
return env0_0.map(function(a0) {
return CollectiblesCategoryStore.getProductFetch(a0);
});
}
function _fun79153() { // fn#79153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1495, offset: 0x01e469ed, size: 399 bytes, params: 1, frame: 33
var r2;
var type;
var r18;
var state;
var r17;
var r1;
var value8;
var value9;
var property;
var property2;
var property3;
var property4;
var value10;
var CollectiblesItemType;
var BUNDLE;
var value11;
var items2;
var length;
var value12;
var value13;
var endedAt;
var value14;
var value15;
var value16;
var value17;
var value18;
var productLine;
var COLLECTIBLES;
var value19;
var value20;
var moduleValue;
var value21;
const Date = global.Date;
const value = Date.now();
const _createForOfIteratorHelperLoose_79143Binding = _createForOfIteratorHelperLoose_79143;
const value4 = env0_0.entries();
const value5 = undefined;
const value6 = _createForOfIteratorHelperLoose_79143Binding(value4);
const value7 = value6();
let done = value7.done;
if (!done) {
r2 = value7;
while (true) {
value8 = r2.value;
value9 = env1_2(value8, 2);
property = value9[0];
property2 = value9[1];
property3 = env0_2[property];
property4 = env0_3[property];
property = env0_4[property];
value10 = require === true;
if (value10) {
if (property4 == null) {
type = value5;
function _fun79153() { // fn#79153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1495, offset: 0x01e469ed, size: 399 bytes, params: 1, frame: 33
var r2;
var type;
var r18;
var state;
var r17;
var r1;
var value8;
var value9;
var property;
var property2;
var property3;
var property4;
var value10;
var CollectiblesItemType;
var BUNDLE;
var value11;
var items2;
var length;
var value12;
var value13;
var endedAt;
var value14;
var value15;
var value16;
var value17;
var value18;
var productLine;
var COLLECTIBLES;
var value19;
var value20;
var moduleValue;
var value21;
const Date = global.Date;
const value = Date.now();
const _createForOfIteratorHelperLoose_79143Binding = _createForOfIteratorHelperLoose_79143;
const value4 = env0_0.entries();
const value5 = undefined;
const value6 = _createForOfIteratorHelperLoose_79143Binding(value4);
const value7 = value6();
let done = value7.done;
if (!done) {
r2 = value7;
while (true) {
value8 = r2.value;
value9 = env1_2(value8, 2);
property = value9[0];
property2 = value9[1];
property3 = Module00057[property];
property4 = ReactModule.useEffect[property];
property = env0_4[property];
value10 = require === true;
if (value10) {
if (property4 == null) {
type = value5;
continue;
}
type = property4.type;
CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
BUNDLE = CollectiblesItemType.BUNDLE;
value11 = type === BUNDLE;
r18 = value11;
} else {
r18 = value10;
}
if (!r18) {
continue;
}
items2 = property4.items;
length = items2.length;
value12 = length === 0;
r18 = value12;
if (property == null) {
state = value5;
continue;
}
state = property.state;
value13 = state === 'error';
if (!value13) {
r17 = value13;
continue;
}
endedAt = property.endedAt;
value14 = endedAt != null;
r17 = value14;
if (!r17) {
continue;
}
endedAt = property.endedAt;
value15 = value - endedAt < 3600000;
r17 = value15;
value16 = property4 != null;
if (!value16) {
r1 = value16;
continue;
}
value17 = !r18;
r1 = value17;
if (r1) {
continue;
}
value18 = property3 != null;
if (!value18) {
r18 = value18;
continue;
}
productLine = property3.productLine;
COLLECTIBLES = SKUProductLines.COLLECTIBLES;
value19 = productLine !== COLLECTIBLES;
r18 = value19;
r1 = r18;
if (r1) {
continue;
}
if (property == null) {
state = value5;
continue;
}
state = property.state;
value20 = state === 'fetching';
r1 = value20;
if (r1) {
continue;
}
r1 = r17;
continue;
if (r1) {
continue;
}
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.fetchCollectiblesProduct(property2, {includeBundles: require});
value21 = value6();
done = value21.done;
if (done) {
break;
}
r2 = value21;
continue;
}
type = property4.type;
CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
BUNDLE = CollectiblesItemType.BUNDLE;
value11 = type === BUNDLE;
r18 = value11;
} else {
r18 = value10;
}
if (!r18) {
continue;
}
items2 = property4.items;
length = items2.length;
value12 = length === 0;
r18 = value12;
if (property == null) {
state = value5;
continue;
}
state = property.state;
value13 = state === 'error';
if (!value13) {
r17 = value13;
continue;
}
endedAt = property.endedAt;
value14 = endedAt != null;
r17 = value14;
if (!r17) {
continue;
}
endedAt = property.endedAt;
value15 = value - endedAt < 3600000;
r17 = value15;
value16 = property4 != null;
if (!value16) {
r1 = value16;
continue;
}
value17 = !r18;
r1 = value17;
if (r1) {
continue;
}
value18 = property3 != null;
if (!value18) {
r18 = value18;
continue;
}
productLine = property3.productLine;
COLLECTIBLES = SKUProductLines.COLLECTIBLES;
value19 = productLine !== COLLECTIBLES;
r18 = value19;
r1 = r18;
if (r1) {
continue;
}
if (property == null) {
state = value5;
continue;
}
state = property.state;
value20 = state === 'fetching';
r1 = value20;
if (r1) {
continue;
}
r1 = r17;
continue;
if (r1) {
continue;
}
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.fetchCollectiblesProduct(property2, {includeBundles: require});
value21 = value6();
done = value21.done;
if (done) {
break;
}
r2 = value21;
continue;
return value5;
}
function _fun79154(a0, a1) { // fn#79154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1985, offset: 0x01e46b7c, size: 86 bytes, params: 3, frame: 7
const property = env0_4[a1];
const value2 = undefined;
return (property == null ? value2 : property.state) === 'fetching' || a0 == null && (env0_4[a1] == null ? value2 : env0_4[a1].state) !== 'error';
}
}
return value5;
}
function _fun79154(a0, a1) { // fn#79154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10343:1985, offset: 0x01e46b7c, size: 86 bytes, params: 3, frame: 7
const property = env0_4[a1];
const value2 = undefined;
return (property == null ? value2 : property.state) === 'fetching' || a0 == null && (env0_4[a1] == null ? value2 : env0_4[a1].state) !== 'error';
}
global.__d(_fun79142, 10157, [57, 31, 4279, 5121, 661, 632, 1904, 5120,
2]) /* metro module 10157, dependencies: [57, 31, 4279, 5121, 661, 632, 1904, 5120, 2] */;
@@ -1,39 +1,47 @@
/* Metro module 14058; source: modules/collectibles/hooks/useGetProductsFromSkus.tsx; dependencies: [31, 5121, 566, 14059, 2] */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
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 */
function _fun106607(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14255:6, offset: 0x022e2af6, size: 139 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(31) /* metro dependency 31 */).useCallback;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useGetProductsFromSkus.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useGetProductsFromSkus.tsx');
exports.default = function() {
var value2 = require(dependencyMap[2]).useStateFromStores([CollectiblesCategoryStore], _fun106609);
var env0_0 = value2;
return useCallback(_fun106610, [value2]);
};
function useGetProductsFromSkus() { // fn#106608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14255:225, offset: 0x022e2b81, size: 88 bytes, params: 1, frame: 16
const useStateFromStores = FluxModule.useStateFromStores;
let items2 = [CollectiblesCategoryStore];
items2 = [Reflect.apply(useStateFromStores, FluxModule, [items2, function() {
return CollectiblesCategoryStore.products;
}])];
return useCallback(_fun106610, items2);
function _fun106609() { // fn#106609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14255:297, offset: 0x01c07f6c, size: 15 bytes, params: 1, frame: 1
return CollectiblesCategoryStore.products;
}
function _fun106610(a0) { // fn#106610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14255:324, offset: 0x022e2bd9, size: 76 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__;
return (importDefault(14059) /* metro dependency 14059 */)(a0.map(_fun106611).filter(function(a0) {
return a0 != null;
}), 'storeListingId');
function _fun106611(a0) { // fn#106611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14255:342, offset: 0x022e2c25, size: 68 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = products.get(a0);
return value == null || value.variantGroupStoreListingId == null ? value : CollectiblesCategoryStore.getProductByStoreListingId(value.variantGroupStoreListingId);
}
}
}
}
function useGetProductsFromSkus() { // fn#106608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14255:225, offset: 0x022e2b81, size: 88 bytes, params: 1, frame: 16
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let items2 = [CollectiblesCategoryStore];
items2 = [Reflect.apply(useStateFromStores, fluxModule, [items2, function() {
return CollectiblesCategoryStore.products;
}])];
return useCallback(_fun106610, items2);
}
function _fun106610(a0) { // fn#106610, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14255:324, offset: 0x022e2bd9, size: 76 bytes, params: 2, frame: 15
var environment;
const value = environment.__proto__;
return (importDefault(14059) /* metro dependency 14059 */)(a0.map(_fun106611).filter(function(a0) {
return a0 != null;
}), 'storeListingId');
}
function _fun106611(a0) { // fn#106611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14255:342, offset: 0x022e2c25, size: 68 bytes, params: 2, frame: 12
let value = environment.__proto__;
value = products.get(a0);
return value == null || value.variantGroupStoreListingId == null ? value : CollectiblesCategoryStore.getProductByStoreListingId(value.variantGroupStoreListingId);
}
global.__d(_fun106607, 14058, [31, 5121, 566, 14059,
2]) /* metro module 14058, dependencies: [31, 5121, 566, 14059, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,14 +1,16 @@
/* Metro module 14041; source: modules/collectibles/hooks/useHasExpiredShopBlocks.tsx; dependencies: [57, 31, 661, 5161, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 ShopBlockTypeModule from '../../../external/discord_common/js/shared/shared-constants/ShopBlockType.tsx'; /* Metro dependency 5161 */
function _fun106488(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:6, offset: 0x022dde74, size: 177 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const value = require(31) /* metro dependency 31 */;
let env0_3 = value.useEffect;
const env0_4 = value.useState;
const env0_5 = (require(661) /* metro dependency 661: Constants */).MAX_TIMEOUT_MS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useHasExpiredShopBlocks.tsx');
let env0_3 = ReactModule.useEffect;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useHasExpiredShopBlocks.tsx');
exports.useHasExpiredShopBlocks = function(a0, a1, a2) {
var env0_0 = a0;
var env0_1 = a1;
@@ -16,58 +18,67 @@ function _fun106488(global, require, importDefault, importAll, module, exports,
useEffect(_fun106492, [a1, a2, a0]);
return property;
};
function getNextBlockExpiration(a0) { // fn#106489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:191, offset: 0x022ddf25, size: 34 bytes, params: 2, frame: 12
const env0_0 = null;
a0.forEach(_fun106490);
return env0_0;
function _fun106490(a0) { // fn#106490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:224, offset: 0x022ddf47, size: 184 bytes, params: 2, frame: 15
const type = a0.type;
const value = environment.__proto__;
const ShopBlockType = (ShopBlockTypeModule).ShopBlockType;
const IMMERSIVE_BANNER = ShopBlockType.IMMERSIVE_BANNER;
const r2 = type === IMMERSIVE_BANNER ? a0.endTime != null ? a0.endTime.getTime() : null : a0.type !== ShopBlockType.COUNTDOWN_TIMER ? null : a0.endTime.getTime();
if (env0_0 == null || r2 != null && r2 < env0_0) {
}
}
}
function useHasExpiredShopBlocks(a0, a1, a2) { // fn#106491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:570, offset: 0x022ddfff, size: 104 bytes, params: 4, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const [property, env0_3] = a2(useState(false), 2);
useEffect(_fun106492, [a1, a2, a0]);
return property;
function _fun106492() { // fn#106492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:625, offset: 0x022de067, size: 160 bytes, params: 1, frame: 17
var environment;
const value = environment.__proto__;
const nextBlockExpiration = getNextBlockExpiration(env0_0);
if (require) {
env0_3(false);
return undefined;
}
if (importDefault) {
env0_3(false);
return undefined;
}
if (nextBlockExpiration == null) {
env0_3(false);
return undefined;
}
const Date = global.Date;
const value4 = nextBlockExpiration - Date.now();
if (value4 <= 0) {
env0_3(true);
return undefined;
}
env0_3(false);
const setTimeout = global.setTimeout;
const Math = global.Math;
var env0_0 = setTimeout(_fun106493, Math.min(MAX_TIMEOUT_MS, value4));
return _fun106494;
function _fun106493() { // fn#106493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:745, offset: 0x017112ca, size: 18 bytes, params: 1, frame: 11
env1_3(true);
}
function _fun106494() { // fn#106494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:779, offset: 0x016d7e7e, size: 24 bytes, params: 1, frame: 11
return global.clearTimeout(env0_0);
}
}
}
}
function getNextBlockExpiration(a0) { // fn#106489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:191, offset: 0x022ddf25, size: 34 bytes, params: 2, frame: 12
const env0_0 = null;
a0.forEach(_fun106490);
return env0_0;
}
function useHasExpiredShopBlocks(a0, a1, a2) { // fn#106491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:570, offset: 0x022ddfff, size: 104 bytes, params: 4, frame: 18
const env0_0 = a0;
const env0_1 = a1;
const [property, env0_3] = a2(useState(false), 2);
useEffect(_fun106492, [a1, a2, a0]);
return property;
}
function _fun106490(a0) { // fn#106490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:224, offset: 0x022ddf47, size: 184 bytes, params: 2, frame: 15
const type = a0.type;
const value = environment.__proto__;
const ShopBlockType = (require(5161) /* metro dependency 5161: ShopBlockType */).ShopBlockType;
const IMMERSIVE_BANNER = ShopBlockType.IMMERSIVE_BANNER;
const r2 = type === IMMERSIVE_BANNER ? a0.endTime != null ? a0.endTime.getTime() : null : a0.type !== ShopBlockType.COUNTDOWN_TIMER ? null : a0.endTime.getTime();
if (env0_0 == null || r2 != null && r2 < env0_0) {
}
}
function _fun106492() { // fn#106492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14238:625, offset: 0x022de067, size: 160 bytes, params: 1, frame: 17
var environment;
const value = environment.__proto__;
const nextBlockExpiration = getNextBlockExpiration(env0_0);
if (require) {
env0_3(false);
return undefined;
}
if (importDefault) {
env0_3(false);
return undefined;
}
if (nextBlockExpiration == null) {
env0_3(false);
return undefined;
}
const Date = global.Date;
const value4 = nextBlockExpiration - Date.now();
if (value4 <= 0) {
env0_3(true);
return undefined;
}
env0_3(false);
const setTimeout = global.setTimeout;
const Math = global.Math;
var env0_0 = setTimeout(_fun106493, Math.min(MAX_TIMEOUT_MS, value4));
return _fun106494;
}
global.__d(_fun106488, 14041, [57, 31, 661, 5161, 2]) /* metro module 14041, dependencies: [57, 31, 661, 5161, 2] */;
@@ -1,35 +1,38 @@
/* Metro module 10082; source: modules/collectibles/hooks/useIsVariantColorLight.tsx; dependencies: [31, 673, 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 */
function _fun78782(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10268:6, offset: 0x01e3440b, size: 114 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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useIsVariantColorLight.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useIsVariantColorLight.tsx');
exports.default = _default_78783;
}
function _default_78783(a0) { // fn#78783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10268:115, offset: 0x01e3447d, size: 50 bytes, params: 2, frame: 14
const env0_0 = a0;
return ReactModule.useMemo(_fun78784, [a0.variantValue]);
function _fun78784() { // fn#78784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10268:129, offset: 0x01e344af, size: 126 bytes, params: 1, frame: 16
var r0;
var getDarkness;
var moduleValue2;
let value = environment.__proto__;
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const isValidHex2 = colorUtilsModule.isValidHex(env0_0.variantValue);
if (isValidHex2) {
value = colorUtilsModule;
getDarkness = value.getDarkness;
moduleValue2 = require(673) /* metro dependency 673: ColorUtils */;
value = Reflect.apply(getDarkness, value, [moduleValue2.hex2int(env0_0.variantValue)]);
value = value < 0.3;
r0 = value;
} else {
r0 = isValidHex2;
}
return r0;
}
function _default_78783(a0) { // fn#78783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10268:115, offset: 0x01e3447d, size: 50 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_2.useMemo(_fun78784, [a0.variantValue]);
}
function _fun78784() { // fn#78784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10268:129, offset: 0x01e344af, size: 126 bytes, params: 1, frame: 16
var r0;
var getDarkness;
var moduleValue2;
let value = environment.__proto__;
const colorUtilsModule = require(673) /* metro dependency 673: ColorUtils */;
const isValidHex2 = colorUtilsModule.isValidHex(env0_0.variantValue);
if (isValidHex2) {
value = colorUtilsModule;
getDarkness = value.getDarkness;
moduleValue2 = require(673) /* metro dependency 673: ColorUtils */;
value = Reflect.apply(getDarkness, value, [moduleValue2.hex2int(env0_0.variantValue)]);
value = value < 0.3;
r0 = value;
} else {
r0 = isValidHex2;
}
return r0;
}
global.__d(_fun78782, 10082, [31, 673, 2]) /* metro module 10082, dependencies: [31, 673, 2] */;
@@ -1,27 +1,31 @@
/* Metro module 7604; source: modules/collectibles/hooks/useMaybeFetchCollectiblesCategories.mobile.tsx; dependencies: [4649, 566, 7605, 2] */
import DevSettingsStore from '../../devtools/dev_settings/DevSettingsStore.tsx'; /* Metro dependency 4649 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun60937(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60937, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7782:6, offset: 0x017157f5, size: 112 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const devSettingsStore = importDefault(4649) /* metro dependency 4649: DevSettingsStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useMaybeFetchCollectiblesCategories.mobile.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useMaybeFetchCollectiblesCategories.mobile.tsx');
exports.default = useMaybeFetchCollectiblesCategories;
function useMaybeFetchCollectiblesCategories(a0, a1) { // fn#60938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7782:223, offset: 0x01715865, size: 190 bytes, params: 3, frame: 20
const value = undefined;
const paymentGateway = a0 == null ? value : a0.paymentGateway;
const {noCache,
includeUnpublished} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([DevSettingsStore],
function() {
var object = {};
var devSettingsStoreBinding = DevSettingsStore;
object.noCache = devSettingsStoreBinding.get('shop_disable_cache');
object.includeUnpublished = devSettingsStoreBinding.get('shop_include_unpublished');
return object;
});
return (require(7605) /* metro dependency 7605: useMaybeFetchCollectiblesCategoriesShared */).useMaybeFetchCollectiblesCategoriesShared({noCache: noCache,
includeUnpublished: includeUnpublished, paymentGateway: paymentGateway,
countryCode: a0 == null ? value : a0.countryCode, logPerf: a0 == null ? value : a0.logPerf},
a0 == null ? value : a0.noOp, a1);
}
}
function useMaybeFetchCollectiblesCategories(a0, a1) { // fn#60938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7782:223, offset: 0x01715865, size: 190 bytes, params: 3, frame: 20
const value = undefined;
const paymentGateway = a0 == null ? value : a0.paymentGateway;
const {noCache,
includeUnpublished} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([DevSettingsStore],
function() {
var object = {};
object.noCache = DevSettingsStore.get('shop_disable_cache');
object.includeUnpublished = DevSettingsStore.get('shop_include_unpublished');
return object;
});
return (require(7605) /* metro dependency 7605: useMaybeFetchCollectiblesCategoriesShared */).useMaybeFetchCollectiblesCategoriesShared({noCache: noCache,
includeUnpublished: includeUnpublished, paymentGateway: paymentGateway,
countryCode: a0 == null ? value : a0.countryCode, logPerf: a0 == null ? value : a0.logPerf},
a0 == null ? value : a0.noOp, a1);
}
global.__d(_fun60937, 7604, [4649, 566, 7605, 2]) /* metro module 7604, dependencies: [4649, 566, 7605, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 7603; source: modules/collectibles/hooks/useMaybeFetchCollectiblesCategories.tsx; dependencies: [2, 7604] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun60936(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7781:6, offset: 0x01715798, size: 93 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useMaybeFetchCollectiblesCategories.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useMaybeFetchCollectiblesCategories.tsx');
exports.default = importDefault(7604) /* metro dependency 7604: useMaybeFetchCollectiblesCategoriesMobile */;
}
global.__d(_fun60936, 7603, [2, 7604]) /* metro module 7603, dependencies: [2, 7604] */;
@@ -1,112 +1,124 @@
/* Metro module 7605; source: modules/collectibles/hooks/useMaybeFetchCollectiblesCategoriesShared.tsx; dependencies: [57, 31, 4107, 5121, 663, 566, 5179, 5120, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ExperimentStore from '../../experiments/ExperimentStore.tsx'; /* Metro dependency 4107 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
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 CollectiblesActionCreatorsModule from '../CollectiblesActionCreators.tsx'; /* Metro dependency 5120 */
import * as ShopVariantsReturnStyleModule from '../../../external/discord_common/js/shared/shared-constants/ShopVariantsReturnStyle.tsx'; /* Metro dependency 5179 */
function _fun60940(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7783:6, offset: 0x01715958, size: 206 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 */;
let value = require(31) /* metro dependency 31 */;
let value = ReactModule;
const env0_3 = value.useEffect;
const env0_4 = value.useCallback;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
value = require(663) /* metro dependency 663: CollectiblesShopConstants */;
const env0_7 = value.COLLECTIBLES_SHOP_CACHE_DURATION_MS;
const env0_8 = value.COLLECTIBLES_SHOP_FETCH_ERROR_RETRY_THRESHOLD_MS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useMaybeFetchCollectiblesCategoriesShared.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useMaybeFetchCollectiblesCategoriesShared.tsx');
exports.useMaybeFetchCollectiblesCategoriesShared = useMaybeFetchCollectiblesCategoriesShared;
}
function useMaybeFetchCollectiblesCategoriesShared(a0, a1, a2) { // fn#60941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7783:419, offset: 0x01715a26, size: 306 bytes, params: 4, frame: 25
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const hasLoadedExperiments = (require(566) /* metro dependency 566: flux */).useStateFromStores([ExperimentStore],
function() {
return ExperimentStore.hasLoadedExperiments;
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value3 = env0_2(Reflect.apply(useStateFromStoresArray, fluxModule, [[CollectiblesCategoryStore], function() {
var property = CollectiblesCategoryStore.isFetchingCategories;
var items = [property, CollectiblesCategoryStore.lastFetchOptions, CollectiblesCategoryStore.error];
property = CollectiblesCategoryStore.lastErrorTimestamp;
var value2 = 0;
items[3] = property ?? value2;
items[4] = CollectiblesCategoryStore.lastSuccessfulFetch ?? value2;
items[5] = CollectiblesCategoryStore.categories;
items[6] = CollectiblesCategoryStore.skipNumCategories;
return items;
}]), 7);
let property = value3[0];
const property2 = value3[1];
const property3 = value3[2];
const property4 = value3[3];
const property5 = value3[4];
const property6 = value3[5];
const property7 = value3[6];
useEffect(_fun60944, [hasLoadedExperiments, property2, property5, a0, property3, property4, a1, a2, property7]);
return {isFetching: property, categories: property6, fetchCategoriesError: property3,
refreshCategories: useCallback(_fun60945, [a0, a2, property7])};
}
function _fun60944() { // fn#60944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7783:822, offset: 0x01715bdf, size: 287 bytes, params: 1, frame: 19
var value2;
var object2;
const ShopVariantsReturnStyle = (require(5179) /* metro dependency 5179: ShopVariantsReturnStyle */).ShopVariantsReturnStyle;
var value6;
if (hasLoadedExperiments) {
value2 = environment.__proto__;
if (!CollectiblesCategoryStore.isFetchingCategories) {
if (global.Boolean(env0_5)) {
if (!(global.Date.now() - env0_6 < COLLECTIBLES_SHOP_FETCH_ERROR_RETRY_THRESHOLD_MS)) {
object2 = {};
copyDataProperties(object2, env0_0, undefined);
object2['variantsReturnStyle'] = ShopVariantsReturnStyle.VARIANTS_GROUP;
object2['includeBundles'] = true;
object2['skipNumCategories'] = env0_8;
value6 = (require(5120) /* metro dependency 5120: CollectiblesActionCreators */).areRequestOptionsEqual(env0_4,
object2);
if (!(value6 ? global.Date.now() - env0_7 < COLLECTIBLES_SHOP_CACHE_DURATION_MS : !!value6)) {
(require(5120) /* metro dependency 5120: CollectiblesActionCreators */).fetchCollectiblesCategories(object2,
function useMaybeFetchCollectiblesCategoriesShared(a0, a1, a2) { // fn#60941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7783:419, offset: 0x01715a26, size: 306 bytes, params: 4, frame: 25
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const hasLoadedExperiments = (require(566) /* metro dependency 566: flux */).useStateFromStores([ExperimentStore],
function() {
return ExperimentStore.hasLoadedExperiments;
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value3 = env0_2(Reflect.apply(useStateFromStoresArray, fluxModule, [[CollectiblesCategoryStore], function() {
var collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
var property = collectiblesCategoryStoreBinding.isFetchingCategories;
var items = [property, collectiblesCategoryStoreBinding.lastFetchOptions,
collectiblesCategoryStoreBinding.error];
property = collectiblesCategoryStoreBinding.lastErrorTimestamp;
var value2 = 0;
items[3] = property ?? value2;
items[4] = CollectiblesCategoryStore.lastSuccessfulFetch ?? value2;
collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
items[5] = collectiblesCategoryStoreBinding.categories;
items[6] = collectiblesCategoryStoreBinding.skipNumCategories;
return items;
}]), 7);
let property = value3[0];
const property2 = value3[1];
const property3 = value3[2];
const property4 = value3[3];
const property5 = value3[4];
const property6 = value3[5];
const property7 = value3[6];
useEffect(_fun60944, [hasLoadedExperiments, property2, property5, a0, property3, property4, a1, a2, property7]);
return {isFetching: property, categories: property6, fetchCategoriesError: property3,
refreshCategories: useCallback(_fun60945, [a0, a2, property7])};
function _fun60944() { // fn#60944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7783:822, offset: 0x01715bdf, size: 287 bytes, params: 1, frame: 19
var value2;
var object;
const ShopVariantsReturnStyle = (ShopVariantsReturnStyleModule).ShopVariantsReturnStyle;
var value6;
if (hasLoadedExperiments) {
value2 = environment.__proto__;
if (!CollectiblesCategoryStore.isFetchingCategories) {
if (global.Boolean(env0_5)) {
if (!(global.Date.now() - env0_6 < COLLECTIBLES_SHOP_FETCH_ERROR_RETRY_THRESHOLD_MS)) {
object = {};
copyDataProperties(object, env0_0, undefined);
object['variantsReturnStyle'] = ShopVariantsReturnStyle.VARIANTS_GROUP;
object['includeBundles'] = true;
object['skipNumCategories'] = env0_8;
value6 = (require(5120) /* metro dependency 5120: CollectiblesActionCreators */).areRequestOptionsEqual(env0_4,
object);
if (!(value6 ? global.Date.now() - env0_7 < COLLECTIBLES_SHOP_CACHE_DURATION_MS : !!value6)) {
(require(5120) /* metro dependency 5120: CollectiblesActionCreators */).fetchCollectiblesCategories(object,
require,
importDefault);
}
}
} else {
object = {};
copyDataProperties(object, env0_0, undefined);
object['variantsReturnStyle'] = ShopVariantsReturnStyle.VARIANTS_GROUP;
object['includeBundles'] = true;
object['skipNumCategories'] = env0_8;
value6 = (require(5120) /* metro dependency 5120: CollectiblesActionCreators */).areRequestOptionsEqual(env0_4,
require, importDefault);
object);
if (!(value6 ? global.Date.now() - env0_7 < COLLECTIBLES_SHOP_CACHE_DURATION_MS : !!value6)) {
(require(5120) /* metro dependency 5120: CollectiblesActionCreators */).fetchCollectiblesCategories(object,
require,
importDefault);
}
}
}
} else {
object2 = {};
copyDataProperties(object2, env0_0, undefined);
object2['variantsReturnStyle'] = ShopVariantsReturnStyle.VARIANTS_GROUP;
object2['includeBundles'] = true;
object2['skipNumCategories'] = env0_8;
value6 = (require(5120) /* metro dependency 5120: CollectiblesActionCreators */).areRequestOptionsEqual(env0_4,
object2);
if (!(value6 ? global.Date.now() - env0_7 < COLLECTIBLES_SHOP_CACHE_DURATION_MS : !!value6)) {
(require(5120) /* metro dependency 5120: CollectiblesActionCreators */).fetchCollectiblesCategories(object2,
require, importDefault);
}
}
}
function _fun60945() { // fn#60945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7783:1157, offset: 0x01715cfe, size: 119 bytes, params: 1, frame: 17
const object = {};
copyDataProperties(object, env0_0, undefined);
const ShopVariantsReturnStyle = (ShopVariantsReturnStyleModule).ShopVariantsReturnStyle;
const VARIANTS_GROUP = ShopVariantsReturnStyle.VARIANTS_GROUP;
object['variantsReturnStyle'] = VARIANTS_GROUP;
object['includeBundles'] = true;
object['skipNumCategories'] = env0_8;
(CollectiblesActionCreatorsModule).fetchCollectiblesCategories(object,
undefined, importDefault);
}
}
}
function _fun60945() { // fn#60945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7783:1157, offset: 0x01715cfe, size: 119 bytes, params: 1, frame: 17
const object2 = {};
copyDataProperties(object2, env0_0, undefined);
const ShopVariantsReturnStyle = (require(5179) /* metro dependency 5179: ShopVariantsReturnStyle */).ShopVariantsReturnStyle;
const VARIANTS_GROUP = ShopVariantsReturnStyle.VARIANTS_GROUP;
object2['variantsReturnStyle'] = VARIANTS_GROUP;
object2['includeBundles'] = true;
object2['skipNumCategories'] = env0_8;
(require(5120) /* metro dependency 5120: CollectiblesActionCreators */).fetchCollectiblesCategories(object2,
undefined, importDefault);
}
global.__d(_fun60940, 7605, [57, 31, 4107, 5121, 663, 566, 5179, 5120,
2]) /* metro module 7605, dependencies: [57, 31, 4107, 5121, 663, 566, 5179, 5120, 2] */;
@@ -1,141 +1,149 @@
/* Metro module 14040; source: modules/collectibles/hooks/useMaybeFetchShopHome.tsx; dependencies: [57, 31, 4107, 5121, 5175, 663, 566, 5179, 5120, 14041, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ExperimentStore from '../../experiments/ExperimentStore.tsx'; /* Metro dependency 4107 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import CollectiblesShopHomeStore from '../CollectiblesShopHomeStore.tsx'; /* Metro dependency 5175 */
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 ShopVariantsReturnStyleModule from '../../../external/discord_common/js/shared/shared-constants/ShopVariantsReturnStyle.tsx'; /* Metro dependency 5179 */
import * as UseHasExpiredShopBlocksModule from './useHasExpiredShopBlocks.tsx'; /* Metro dependency 14041 */
function _fun106478(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:6, offset: 0x022dd8ce, size: 233 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 */;
let value = require(31) /* metro dependency 31 */;
let value = ReactModule;
const env0_3 = value.useEffect;
const env0_4 = value.useCallback;
const env0_5 = value.useMemo;
const experimentStore = importDefault(4107) /* metro dependency 4107: ExperimentStore */;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const collectiblesShopHomeStore = importDefault(5175) /* metro dependency 5175: CollectiblesShopHomeStore */;
value = require(663) /* metro dependency 663: CollectiblesShopConstants */;
const env0_9 = value.COLLECTIBLES_SHOP_CACHE_DURATION_MS;
const env0_10 = value.COLLECTIBLES_SHOP_FETCH_ERROR_RETRY_THRESHOLD_MS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useMaybeFetchShopHome.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useMaybeFetchShopHome.tsx');
exports.useMaybeFetchCollectiblesShopHome = useMaybeFetchCollectiblesShopHome;
}
function useMaybeFetchCollectiblesShopHome(a0, a1, a2) { // fn#106479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:414, offset: 0x022dd9b7, size: 579 bytes, params: 4, frame: 31
const value = a3;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const r17 = value !== undefined ? value : false;
const hasLoadedExperiments = (require(566) /* metro dependency 566: flux */).useStateFromStores([ExperimentStore],
function() {
return ExperimentStore.hasLoadedExperiments;
});
const skipNumCategories = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.skipNumCategories;
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value3 = env0_2(Reflect.apply(useStateFromStoresArray, fluxModule, [[CollectiblesShopHomeStore], _fun106482]),
8);
const property = value3[0];
const property2 = value3[1];
const property3 = value3[2];
const property4 = value3[3];
const property5 = value3[4];
const property6 = value3[5];
const property7 = value3[6];
const value4 = useMemo(_fun106483, [a1, value3[7], skipNumCategories]);
const value5 = useMemo(_fun106484, [property4, value4]);
const useHasExpiredShopBlocks = UseHasExpiredShopBlocksModule.useHasExpiredShopBlocks;
useEffect(_fun106486, [hasLoadedExperiments, property6, property5, property3, useMemo(_fun106485, [property2,
Reflect.apply(useHasExpiredShopBlocks, UseHasExpiredShopBlocksModule, [property, property6 != null && property6,
r17])]), property7, value5, value4, a0, a2]);
return {isFetchingShopHome: property6, fetchShopHomeError: property5, shopBlocks: property,
refreshShopHome: useCallback(_fun106487, [a0, value4, a2])};
function _fun106482() { // fn#106482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:635, offset: 0x022ddc09, size: 195 bytes, params: 1, frame: 16
let collectiblesShopHomeStoreBinding = CollectiblesShopHomeStore;
const getShopBlocks = collectiblesShopHomeStoreBinding.getShopBlocks;
let binding = env0_0;
const items2 = [Reflect.apply(getShopBlocks, collectiblesShopHomeStoreBinding, [binding])];
const lastSuccessfulFetch = collectiblesShopHomeStoreBinding.getLastSuccessfulFetch(binding);
const value5 = 0;
items2[1] = lastSuccessfulFetch ?? value5;
items2[2] = CollectiblesShopHomeStore.getLastErrorTimestamp(env0_0) ?? value5;
collectiblesShopHomeStoreBinding = CollectiblesShopHomeStore;
const getLastFetchOptions = collectiblesShopHomeStoreBinding.getLastFetchOptions;
binding = env0_0;
items2[3] = Reflect.apply(getLastFetchOptions, collectiblesShopHomeStoreBinding, [binding]);
const getFetchShopHomeError = collectiblesShopHomeStoreBinding.getFetchShopHomeError;
items2[4] = Reflect.apply(getFetchShopHomeError, collectiblesShopHomeStoreBinding, [binding]);
const getIsFetchingShopHome = collectiblesShopHomeStoreBinding.getIsFetchingShopHome;
items2[5] = Reflect.apply(getIsFetchingShopHome, collectiblesShopHomeStoreBinding, [binding]);
const getHasKnownStaleData = collectiblesShopHomeStoreBinding.getHasKnownStaleData;
items2[6] = Reflect.apply(getHasKnownStaleData, collectiblesShopHomeStoreBinding, [binding]);
const getShopHomeConfigOverride = collectiblesShopHomeStoreBinding.getShopHomeConfigOverride;
items2[7] = Reflect.apply(getShopHomeConfigOverride, collectiblesShopHomeStoreBinding, []);
return items2;
}
function useMaybeFetchCollectiblesShopHome(a0, a1, a2) { // fn#106479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:414, offset: 0x022dd9b7, size: 579 bytes, params: 4, frame: 31
const value = a3;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const r17 = value !== undefined ? value : false;
const hasLoadedExperiments = (require(566) /* metro dependency 566: flux */).useStateFromStores([ExperimentStore],
function() {
return ExperimentStore.hasLoadedExperiments;
});
const skipNumCategories = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.skipNumCategories;
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value3 = env0_2(Reflect.apply(useStateFromStoresArray, fluxModule, [[CollectiblesShopHomeStore], _fun106482]),
8);
const property = value3[0];
const property2 = value3[1];
const property3 = value3[2];
const property4 = value3[3];
const property5 = value3[4];
const property6 = value3[5];
const property7 = value3[6];
const value4 = useMemo(_fun106483, [a1, value3[7], skipNumCategories]);
const value5 = useMemo(_fun106484, [property4, value4]);
const useHasExpiredShopBlocksModule = require(14041) /* metro dependency 14041: useHasExpiredShopBlocks */;
const useHasExpiredShopBlocks = useHasExpiredShopBlocksModule.useHasExpiredShopBlocks;
useEffect(_fun106486, [hasLoadedExperiments, property6, property5, property3, useMemo(_fun106485, [property2,
Reflect.apply(useHasExpiredShopBlocks, useHasExpiredShopBlocksModule, [property, property6 != null && property6,
r17])]), property7, value5, value4, a0, a2]);
return {isFetchingShopHome: property6, fetchShopHomeError: property5, shopBlocks: property,
refreshShopHome: useCallback(_fun106487, [a0, value4, a2])};
}
function _fun106483() { // fn#106483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:966, offset: 0x022ddccc, size: 112 bytes, params: 1, frame: 14
const object = {};
copyDataProperties(object, require, undefined);
const ShopVariantsReturnStyle = (ShopVariantsReturnStyleModule).ShopVariantsReturnStyle;
const VARIANTS_GROUP = ShopVariantsReturnStyle.VARIANTS_GROUP;
object['variantsReturnStyle'] = VARIANTS_GROUP;
object['includeBundles'] = true;
object['includeDynamicBlocks'] = true;
object['shopHomeConfig'] = env0_11;
object['skipNumCategories'] = skipNumCategories;
return object;
}
function _fun106482() { // fn#106482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:635, offset: 0x022ddc09, size: 195 bytes, params: 1, frame: 16
const getShopBlocks = CollectiblesShopHomeStore.getShopBlocks;
let binding = env0_0;
const items2 = [Reflect.apply(getShopBlocks, CollectiblesShopHomeStore, [binding])];
const lastSuccessfulFetch = CollectiblesShopHomeStore.getLastSuccessfulFetch(binding);
const value5 = 0;
items2[1] = lastSuccessfulFetch ?? value5;
items2[2] = CollectiblesShopHomeStore.getLastErrorTimestamp(env0_0) ?? value5;
const getLastFetchOptions = CollectiblesShopHomeStore.getLastFetchOptions;
binding = env0_0;
items2[3] = Reflect.apply(getLastFetchOptions, CollectiblesShopHomeStore, [binding]);
const getFetchShopHomeError = CollectiblesShopHomeStore.getFetchShopHomeError;
items2[4] = Reflect.apply(getFetchShopHomeError, CollectiblesShopHomeStore, [binding]);
const getIsFetchingShopHome = CollectiblesShopHomeStore.getIsFetchingShopHome;
items2[5] = Reflect.apply(getIsFetchingShopHome, CollectiblesShopHomeStore, [binding]);
const getHasKnownStaleData = CollectiblesShopHomeStore.getHasKnownStaleData;
items2[6] = Reflect.apply(getHasKnownStaleData, CollectiblesShopHomeStore, [binding]);
const getShopHomeConfigOverride = CollectiblesShopHomeStore.getShopHomeConfigOverride;
items2[7] = Reflect.apply(getShopHomeConfigOverride, CollectiblesShopHomeStore, []);
return items2;
}
function _fun106484() { // fn#106484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:1140, offset: 0x022ddd3c, size: 53 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
return !value.areRequestOptionsEqual(env0_7, env0_12);
}
function _fun106483() { // fn#106483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:966, offset: 0x022ddccc, size: 112 bytes, params: 1, frame: 14
const object2 = {};
copyDataProperties(object2, require, undefined);
const ShopVariantsReturnStyle = (require(5179) /* metro dependency 5179: ShopVariantsReturnStyle */).ShopVariantsReturnStyle;
const VARIANTS_GROUP = ShopVariantsReturnStyle.VARIANTS_GROUP;
object2['variantsReturnStyle'] = VARIANTS_GROUP;
object2['includeBundles'] = true;
object2['includeDynamicBlocks'] = true;
object2['shopHomeConfig'] = env0_11;
object2['skipNumCategories'] = skipNumCategories;
return object2;
}
function _fun106485() { // fn#106485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:1244, offset: 0x022ddd71, size: 51 bytes, params: 1, frame: 11
var r0;
var value4;
var value;
const binding = env0_14;
if (binding) {
r0 = !binding;
} else {
value = global.Date.now() - env0_5;
value4 = environment.__proto__;
value = value < COLLECTIBLES_SHOP_CACHE_DURATION_MS;
r0 = value;
}
return r0;
}
function _fun106484() { // fn#106484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:1140, offset: 0x022ddd3c, size: 53 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
return !value.areRequestOptionsEqual(env0_7, env0_12);
}
function _fun106485() { // fn#106485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:1244, offset: 0x022ddd71, size: 51 bytes, params: 1, frame: 11
var r0;
var value4;
var value;
const binding = env0_14;
if (binding) {
r0 = !binding;
} else {
value = global.Date.now() - env0_5;
value4 = environment.__proto__;
value = value < COLLECTIBLES_SHOP_CACHE_DURATION_MS;
r0 = value;
}
return r0;
}
function _fun106486() { // fn#106486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:1278, offset: 0x022ddda4, size: 153 bytes, params: 1, frame: 15
var r2;
var value3;
var value4;
var moduleValue;
if (hasLoadedExperiments) {
if (!env0_9) {
value3 = global.Date.now() - env0_6;
value4 = environment.__proto__;
r2 = env0_8 != null && value3 < COLLECTIBLES_SHOP_FETCH_ERROR_RETRY_THRESHOLD_MS;
if (!r2) {
r2 = env0_13 || !env0_15;
r2 = !r2 ? env0_10 : r2;
if (r2) {
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.fetchCollectiblesShopHome(env0_0, env0_12, importDefault);
function _fun106486() { // fn#106486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:1278, offset: 0x022ddda4, size: 153 bytes, params: 1, frame: 15
var r2;
var value3;
var value4;
var moduleValue;
if (hasLoadedExperiments) {
if (!env0_9) {
value3 = global.Date.now() - env0_6;
value4 = environment.__proto__;
r2 = env0_8 != null && value3 < COLLECTIBLES_SHOP_FETCH_ERROR_RETRY_THRESHOLD_MS;
if (!r2) {
r2 = env0_13 || !env0_15;
r2 = !r2 ? env0_10 : r2;
if (r2) {
moduleValue = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
moduleValue.fetchCollectiblesShopHome(env0_0, env0_12, importDefault);
}
}
}
}
}
function _fun106487() { // fn#106487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:1414, offset: 0x022dde3d, size: 55 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
value.fetchCollectiblesShopHome(env0_0, env0_12, importDefault);
}
}
}
function _fun106487() { // fn#106487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14237:1414, offset: 0x022dde3d, size: 55 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
value.fetchCollectiblesShopHome(env0_0, env0_12, importDefault);
}
global.__d(_fun106478, 14040, [57, 31, 4107, 5121, 5175, 663, 566, 5179, 5120, 14041,
2]) /* metro module 14040, dependencies: [57, 31, 4107, 5121, 5175, 663, 566, 5179, 5120, 14041, 2] */;
@@ -1,88 +1,94 @@
/* Metro module 10088; source: modules/collectibles/hooks/usePreviewCollectbilesProduct.tsx; dependencies: [57, 31, 5126, 1902, 5127, 5128, 7609, 1904, 8400, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 NameplateRecordModule from '../records/NameplateRecord.tsx'; /* Metro dependency 1902 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as AvatarDecorationRecordModule from '../records/AvatarDecorationRecord.tsx'; /* Metro dependency 5126 */
import * as ProfileEffectRecordModule from '../records/ProfileEffectRecord.tsx'; /* Metro dependency 5127 */
import * as ProfileFrameRecordModule from '../records/ProfileFrameRecord.tsx'; /* Metro dependency 5128 */
import * as UseShopProductItemsModule from './useShopProductItems.tsx'; /* Metro dependency 7609 */
function _fun78810(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10274:6, offset: 0x01e35a91, size: 221 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(5126) /* metro dependency 5126: AvatarDecorationRecord */).isAvatarDecorationRecord;
const env0_5 = (require(1902) /* metro dependency 1902: NameplateRecord */).isNameplateRecord;
const env0_6 = (require(5127) /* metro dependency 5127: ProfileEffectRecord */).isProfileEffectRecord;
const env0_7 = (require(5128) /* metro dependency 5128: ProfileFrameRecord */).isProfileFrameRecord;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/usePreviewCollectbilesProduct.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/usePreviewCollectbilesProduct.tsx');
exports.usePreviewCollectibleProduct = usePreviewCollectibleProduct;
}
function usePreviewCollectibleProduct(a0, a1, a2) { // fn#78811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10274:367, offset: 0x01e35b6e, size: 155 bytes, params: 4, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(a0);
const firstProfileEffect = value2.firstProfileEffect;
firstProfileEffect.useEffect(_fun78812, [a0, a1, firstProfileEffect, value2.firstAvatarDecoration,
value2.firstNameplate, value2.firstProfileFrame, a2]);
}
function _fun78812() { // fn#78812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10274:517, offset: 0x01e35c09, size: 547 bytes, params: 1, frame: 17
var property;
var object2;
var value;
const type = env0_0.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type === BUNDLE) {
object2 = {};
if (firstAvatarDecoration != null) {
object2.avatarDecoration = firstAvatarDecoration;
}
if (firstProfileEffect != null) {
object2.profileEffect = firstProfileEffect;
}
if (firstNameplate != null) {
object2.nameplate = firstNameplate;
}
if (firstProfileFrame != null) {
object2.profileFrame = firstProfileFrame;
}
if (importDefault != null) {
if (isAvatarDecorationRecord(importDefault)) {
object2.avatarDecoration = importDefault;
} else if (isProfileEffectRecord(importDefault)) {
object2.profileEffect = importDefault;
} else if (isNameplateRecord(importDefault)) {
object2.nameplate = importDefault;
} else if (isProfileFrameRecord(importDefault)) {
object2.profileFrame = importDefault;
function usePreviewCollectibleProduct(a0, a1, a2) { // fn#78811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10274:367, offset: 0x01e35b6e, size: 155 bytes, params: 4, frame: 21
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = (UseShopProductItemsModule).useShopProductItems(a0);
const firstProfileEffect = value2.firstProfileEffect;
firstProfileEffect.useEffect(_fun78812, [a0, a1, firstProfileEffect, value2.firstAvatarDecoration,
value2.firstNameplate, value2.firstProfileFrame, a2]);
function _fun78812() { // fn#78812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10274:517, offset: 0x01e35c09, size: 547 bytes, params: 1, frame: 17
var property;
var object;
var value;
const type = env0_0.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type === BUNDLE) {
object = {};
if (firstAvatarDecoration != null) {
object.avatarDecoration = firstAvatarDecoration;
}
if (firstProfileEffect != null) {
object.profileEffect = firstProfileEffect;
}
if (firstNameplate != null) {
object.nameplate = firstNameplate;
}
if (firstProfileFrame != null) {
object.profileFrame = firstProfileFrame;
}
if (importDefault != null) {
if (isAvatarDecorationRecord(importDefault)) {
object.avatarDecoration = importDefault;
} else if (isProfileEffectRecord(importDefault)) {
object.profileEffect = importDefault;
} else if (isNameplateRecord(importDefault)) {
object.nameplate = importDefault;
} else if (isProfileFrameRecord(importDefault)) {
object.profileFrame = importDefault;
}
}
(require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges(object);
} else {
value = env1_2(env0_0.items, 1);
property = value[0];
if (isAvatarDecorationRecord(property)) {
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({avatarDecoration: property});
} else if (isProfileEffectRecord(property)) {
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({profileEffect: property});
} else if (isNameplateRecord(property)) {
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({nameplate: property});
} else if (isProfileFrameRecord(property)) {
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({profileFrame: property});
}
}
return _fun78813;
function _fun78813() { // fn#78813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10274:1059, offset: 0x01e35e2c, size: 72 bytes, params: 1, frame: 13
let value = environment.__proto__;
if (require) {
value = environment.__proto__.__proto__;
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({avatarDecoration: undefined, profileEffect: undefined, nameplate: undefined,
profileFrame: undefined});
}
}
}
(require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */).setPendingChanges(object2);
} else {
value = env1_2(env0_0.items, 1);
property = value[0];
if (isAvatarDecorationRecord(property)) {
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({avatarDecoration: property});
} else if (isProfileEffectRecord(property)) {
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({profileEffect: property});
} else if (isNameplateRecord(property)) {
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({nameplate: property});
} else if (isProfileFrameRecord(property)) {
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({profileFrame: property});
}
}
return _fun78813;
}
function _fun78813() { // fn#78813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10274:1059, offset: 0x01e35e2c, size: 72 bytes, params: 1, frame: 13
let value = environment.__proto__;
if (require) {
value = environment.__proto__.__proto__;
value = require(8400) /* metro dependency 8400: UserProfileSettingsActionCreators */;
value.setPendingChanges({avatarDecoration: undefined, profileEffect: undefined, nameplate: undefined,
profileFrame: undefined});
}
}
global.__d(_fun78810, 10088, [57, 31, 5126, 1902, 5127, 5128, 7609, 1904, 8400,
2]) /* metro module 10088, dependencies: [57, 31, 5126, 1902, 5127, 5128, 7609, 1904, 8400, 2] */;
@@ -1,4 +1,9 @@
/* Metro module 10103; source: modules/collectibles/hooks/useProductDescription.tsx; dependencies: [31, 1244, 1904, 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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
function _fun78880(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10289:6, offset: 0x01e39d6a, size: 149 bytes, params: 8, frame: 18
const env0_0 = require;
const _arrayLikeToArray_78883 = function(a0, a1) {
@@ -46,251 +51,256 @@ function _fun78880(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useMemo;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useProductDescription.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useProductDescription.tsx');
exports.useProductDescription = useProductDescription;
}
function _createForOfIteratorHelperLoose_78881(a0, a1) { // fn#78881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10289:119, offset: 0x01e39dff, 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)) {
function _createForOfIteratorHelperLoose_78881(a0, a1) { // fn#78881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10289:119, offset: 0x01e39dff, 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 _fun78882;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_78883(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 _fun78882;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_78883(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_78883(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_78883(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun78882;
}
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 getBundleDescription(a0) { // fn#78884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10289:1054, offset: 0x01e39f73, size: 743 bytes, params: 2, frame: 28
var r6;
var r7;
var r12;
var bundledProducts;
var value6;
var type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
var AVATAR_DECORATION;
var PROFILE_EFFECT;
var NAMEPLATE;
var push;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var property;
var name;
var value7;
var Ntv9Jt;
var value8;
const value = a1;
const value2 = undefined;
let r1 = value !== value2 ? value : false;
if (r1) {
formatToPlainString = intl.formatToPlainString;
property = t['/0Yndu'];
bundledProducts = a0.bundledProducts;
return Reflect.apply(formatToPlainString, intl, [property,
{num: bundledProducts == null ? value2 : bundledProducts.length}]);
}
const items = [];
const value3 = _createForOfIteratorHelperLoose_78881(a0.bundledProducts ?? []);
const value4 = value3();
let done = value4.done;
const value5 = false;
if (done) {
r1 = value5;
} else {
r6 = value5;
r7 = value4;
while (true) {
value6 = r7.value;
type = value6.type;
AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION !== type) {
PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
items.push(intl.formatToPlainString(t['3Y8q7a'], {itemName: value6.name}));
r12 = r6;
break;
}
NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE !== type) {
r12 = r6;
break;
}
push = items.push;
formatToPlainString = intl.formatToPlainString;
property = t['2keXky'];
Reflect.apply(push, items, [Reflect.apply(formatToPlainString, intl, [property,
{itemName: value6.name}])]);
value7 = true;
r12 = value7;
break;
if (r5) {
}
push = items.push;
return _fun78882;
}
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 _fun78882() { // fn#78882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10289:690, 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 getBundleDescription(a0) { // fn#78884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10289:1054, offset: 0x01e39f73, size: 743 bytes, params: 2, frame: 28
var r6;
var r7;
var r12;
var bundledProducts;
var value6;
var type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
var AVATAR_DECORATION;
var PROFILE_EFFECT;
var NAMEPLATE;
var push;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
const t = (IndexNativeModule).t;
var property;
var name;
var value7;
var Ntv9Jt;
var value8;
const value = a1;
const value2 = undefined;
let r1 = value !== value2 ? value : false;
if (r1) {
formatToPlainString = intl.formatToPlainString;
Ntv9Jt = t.Ntv9Jt;
name = value6.name;
Reflect.apply(push, items, [Reflect.apply(formatToPlainString, intl, [Ntv9Jt, {itemName: name}])]);
r12 = r6;
value8 = value3();
done = value8.done;
if (done) {
r1 = r12;
break;
}
r6 = r12;
r7 = value8;
continue;
property = t['/0Yndu'];
bundledProducts = a0.bundledProducts;
return Reflect.apply(formatToPlainString, intl, [property,
{num: bundledProducts == null ? value2 : bundledProducts.length}]);
}
const items2 = [];
const value3 = _createForOfIteratorHelperLoose_78881(a0.bundledProducts ?? []);
const value4 = value3();
let done = value4.done;
const value5 = false;
if (done) {
r1 = value5;
} else {
r6 = value5;
r7 = value4;
while (true) {
value6 = r7.value;
type = value6.type;
AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION !== type) {
PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
items2.push(intl.formatToPlainString(t['3Y8q7a'], {itemName: value6.name}));
r12 = r6;
break;
}
NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE !== type) {
r12 = r6;
break;
}
push = items2.push;
formatToPlainString = intl.formatToPlainString;
property = t['2keXky'];
Reflect.apply(push, items2, [Reflect.apply(formatToPlainString, intl, [property,
{itemName: value6.name}])]);
value7 = true;
r12 = value7;
break;
}
push = items2.push;
formatToPlainString = intl.formatToPlainString;
Ntv9Jt = t.Ntv9Jt;
name = value6.name;
Reflect.apply(push, items2, [Reflect.apply(formatToPlainString, intl, [Ntv9Jt, {itemName: name}])]);
r12 = r6;
value8 = value3();
done = value8.done;
if (done) {
r1 = r12;
break;
}
r6 = r12;
r7 = value8;
continue;
}
}
const join = items2.join;
if (r1) {
return intl.formatToPlainString(t.Ofrqj6, {joinedItems: Reflect.apply(join, items2,
[', ']).replace(RegExp(', ([^,]*)$', ''), ' & $1')});
}
const value9 = Reflect.apply(join, items2, [' & ']);
formatToPlainString = intl.formatToPlainString;
const Ofrqj6 = t.Ofrqj6;
return Reflect.apply(formatToPlainString, intl, [Ofrqj6, {joinedItems: value9}]);
}
const join = items.join;
if (r1) {
return intl.formatToPlainString(t.Ofrqj6, {joinedItems: Reflect.apply(join, items,
[', ']).replace(RegExp(', ([^,]*)$', ''), ' & $1')});
}
const value9 = Reflect.apply(join, items, [' & ']);
formatToPlainString = intl.formatToPlainString;
const Ofrqj6 = t.Ofrqj6;
return Reflect.apply(formatToPlainString, intl, [Ofrqj6, {joinedItems: value9}]);
}
function useProductDescription(a0) { // fn#78885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10289:2073, offset: 0x01e3a25a, size: 58 bytes, params: 2, frame: 15
const value = a1;
const env0_0 = a0;
return useMemo(_fun78886, [a0, value !== undefined ? value : false]);
}
function _fun78886() { // fn#78886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10289:2086, offset: 0x01e3a294, size: 642 bytes, params: 1, frame: 17
var type;
var value3;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
var getBundleDescriptionBinding;
var binding;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var value4;
if (env0_0 == null) {
type = env0_0?.type;
value3 = environment.__proto__;
if (CollectiblesItemType.AVATAR_DECORATION === type) {
return intl.string(t['3lv7q2']);
}
if (CollectiblesItemType.PROFILE_EFFECT === type) {
return intl.string(t.VhJL72);
}
if (CollectiblesItemType.NAMEPLATE === type) {
return intl.string(t.ik37EZ);
}
if (CollectiblesItemType.PROFILE_FRAME === type) {
return intl.string(t.fWzWPp);
}
if (CollectiblesItemType.BUNDLE === type) {
return getBundleDescription(env0_0, env0_1);
}
} else {
var summary = env0_0.summary;
if (summary == null) {
type = env0_0?.type;
value3 = environment.__proto__;
if (CollectiblesItemType.AVATAR_DECORATION === type) {
return intl.string(t['3lv7q2']);
}
if (CollectiblesItemType.PROFILE_EFFECT === type) {
return intl.string(t.VhJL72);
}
if (CollectiblesItemType.NAMEPLATE === type) {
return intl.string(t.ik37EZ);
}
if (CollectiblesItemType.PROFILE_FRAME === type) {
return intl.string(t.fWzWPp);
}
if (CollectiblesItemType.BUNDLE === type) {
return getBundleDescription(env0_0, env0_1);
function useProductDescription(a0) { // fn#78885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10289:2073, offset: 0x01e3a25a, size: 58 bytes, params: 2, frame: 15
const value = a1;
const env0_0 = a0;
return useMemo(_fun78886, [a0, value !== undefined ? value : false]);
function _fun78886() { // fn#78886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10289:2086, offset: 0x01e3a294, size: 642 bytes, params: 1, frame: 17
var type;
var value3;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
var getBundleDescriptionBinding;
var binding;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value4;
if (env0_0 == null) {
type = env0_0?.type;
value3 = environment.__proto__;
if (CollectiblesItemType.AVATAR_DECORATION === type) {
return intl.string(t['3lv7q2']);
}
if (CollectiblesItemType.PROFILE_EFFECT === type) {
return intl.string(t.VhJL72);
}
if (CollectiblesItemType.NAMEPLATE === type) {
return intl.string(t.ik37EZ);
}
if (CollectiblesItemType.PROFILE_FRAME === type) {
return intl.string(t.fWzWPp);
}
if (CollectiblesItemType.BUNDLE === type) {
return getBundleDescription(env0_0, env0_1);
}
} else {
var summary = env0_0.summary;
if (summary == null) {
type = env0_0?.type;
value3 = environment.__proto__;
if (CollectiblesItemType.AVATAR_DECORATION === type) {
return intl.string(t['3lv7q2']);
}
if (CollectiblesItemType.PROFILE_EFFECT === type) {
return intl.string(t.VhJL72);
}
if (CollectiblesItemType.NAMEPLATE === type) {
return intl.string(t.ik37EZ);
}
if (CollectiblesItemType.PROFILE_FRAME === type) {
return intl.string(t.fWzWPp);
}
if (CollectiblesItemType.BUNDLE === type) {
return getBundleDescription(env0_0, env0_1);
}
return '';
}
summary = env0_0.summary;
if (summary !== '') {
type = env0_0.type;
value4 = environment.__proto__;
if (type !== CollectiblesItemType.BUNDLE) {
return env0_0.summary;
}
summary = env0_0.summary;
if (summary.includes('{joinedItems}')) {
getBundleDescriptionBinding = getBundleDescription;
binding = env0_0;
return binding.summary.replace('{joinedItems}', getBundleDescriptionBinding(binding, env0_1));
}
return env0_0.summary;
}
type = env0_0?.type;
if (CollectiblesItemType.AVATAR_DECORATION === type) {
return intl.string(t['3lv7q2']);
}
if (CollectiblesItemType.PROFILE_EFFECT === type) {
return intl.string(t.VhJL72);
}
if (CollectiblesItemType.NAMEPLATE === type) {
return intl.string(t.ik37EZ);
}
if (CollectiblesItemType.PROFILE_FRAME === type) {
return intl.string(t.fWzWPp);
}
if (CollectiblesItemType.BUNDLE === type) {
return getBundleDescription(env0_0, env0_1);
}
}
return '';
}
summary = env0_0.summary;
if (summary !== '') {
type = env0_0.type;
value4 = environment.__proto__;
if (type !== CollectiblesItemType.BUNDLE) {
return env0_0.summary;
}
summary = env0_0.summary;
if (summary.includes('{joinedItems}')) {
getBundleDescriptionBinding = getBundleDescription;
binding = env0_0;
return binding.summary.replace('{joinedItems}', getBundleDescriptionBinding(binding, env0_1));
}
return env0_0.summary;
}
type = env0_0?.type;
if (CollectiblesItemType.AVATAR_DECORATION === type) {
return intl.string(t['3lv7q2']);
}
if (CollectiblesItemType.PROFILE_EFFECT === type) {
return intl.string(t.VhJL72);
}
if (CollectiblesItemType.NAMEPLATE === type) {
return intl.string(t.ik37EZ);
}
if (CollectiblesItemType.PROFILE_FRAME === type) {
return intl.string(t.fWzWPp);
}
if (CollectiblesItemType.BUNDLE === type) {
return getBundleDescription(env0_0, env0_1);
}
}
return '';
}
global.__d(_fun78880, 10103, [31, 1244, 1904, 2]) /* metro module 10103, dependencies: [31, 1244, 1904, 2] */;
@@ -1,41 +1,46 @@
/* Metro module 10106; source: modules/collectibles/hooks/useProductDisableState.tsx; dependencies: [3808, 566, 664, 1244, 2] */
import SubscriptionStore from '../../../stores/billing/SubscriptionStore.tsx'; /* Metro dependency 3808 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FractionalPremiumSKUsModule from '../../../external/discord_common/js/shared/shared-constants/FractionalPremiumSKUs.tsx'; /* Metro dependency 664 */
function _fun78899(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10292:6, offset: 0x01e3b24f, size: 114 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const subscriptionStore = importDefault(3808) /* metro dependency 3808: SubscriptionStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useProductDisableState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useProductDisableState.tsx');
exports.useProductDisableState = useProductDisableState;
}
function useProductDisableState(a0) { // fn#78900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10292:218, offset: 0x01e3b2c1, size: 192 bytes, params: 2, frame: 18
var r2;
var r0;
var intl;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [SubscriptionStore];
const value2 = Reflect.apply(useStateFromStores, fluxModule, [object, _fun78901]);
const FractionalPremiumSKUsSets = (require(664) /* metro dependency 664: FractionalPremiumSKUs */).FractionalPremiumSKUsSets;
const ALL = FractionalPremiumSKUsSets.ALL;
if (ALL.has(a0)) {
object = {isDisabled: value2};
if (value2) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NbveHD);
function useProductDisableState(a0) { // fn#78900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10292:218, offset: 0x01e3b2c1, size: 192 bytes, params: 2, frame: 18
var r2;
var r0;
var intl;
const useStateFromStores = FluxModule.useStateFromStores;
let object = [SubscriptionStore];
const value2 = Reflect.apply(useStateFromStores, FluxModule, [object, _fun78901]);
const FractionalPremiumSKUsSets = (FractionalPremiumSKUsModule).FractionalPremiumSKUsSets;
const ALL = FractionalPremiumSKUsSets.ALL;
if (ALL.has(a0)) {
object = {isDisabled: value2};
if (value2) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r2 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.NbveHD);
} else {
r2 = null;
}
object.disabledReason = r2;
r0 = object;
} else {
r2 = null;
r0 = {'isDisabled': false, 'disabledReason': null};
}
object.disabledReason = r2;
r0 = object;
} else {
r0 = {'isDisabled': false, 'disabledReason': null};
return r0;
function _fun78901() { // fn#78901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10292:260, offset: 0x01e3b381, size: 42 bytes, params: 1, frame: 10
const value = environment.__proto__;
return SubscriptionStore.getPremiumSubscription()?.isPurchasedExternally === true;
}
}
return r0;
}
function _fun78901() { // fn#78901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10292:260, offset: 0x01e3b381, size: 42 bytes, params: 1, frame: 10
const value = environment.__proto__;
return SubscriptionStore.getPremiumSubscription()?.isPurchasedExternally === true;
}
global.__d(_fun78899, 10106, [3808, 566, 664, 1244,
2]) /* metro module 10106, dependencies: [3808, 566, 664, 1244, 2] */;
@@ -1,77 +1,88 @@
/* Metro module 10060; source: modules/collectibles/hooks/useProductPurchaseState.tsx; dependencies: [5145, 10061, 1904, 566, 2] */
import CollectiblesPurchaseStore from '../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
import Module10061 from '../../../by-id/module-10061.js'; /* Metro dependency 10061 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
function _fun78647(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:6, offset: 0x01e2f9b2, size: 135 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
const closure = getProductPurchaseState;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useProductPurchaseState.tsx');
exports.getProductPurchaseState = closure;
const getProductPurchaseState2 = getProductPurchaseState;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useProductPurchaseState.tsx');
exports.getProductPurchaseState = getProductPurchaseState2;
exports.useProductPurchaseState = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStoresObject([CollectiblesPurchaseStore], _fun78653);
};
}
function getProductPurchaseState(a0, a1) { // fn#78648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:130, offset: 0x01e2fa39, size: 399 bytes, params: 3, frame: 20
var r7;
var r5;
var r1;
var object;
var variants;
const env0_0 = a0;
let value = a0.getPurchase(a1.skuId);
value = value != null;
const r2 = a1.items ?? [];
const value3 = undefined;
const value4 = (Module10061)(r2.map(_fun78649));
const type = a1 == null ? value3 : a1.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === type) {
object = {};
r1 = value || r2.length > 0 && value4.length === r2.length;
object.isPurchased = r1;
value = value4.length > 0;
r1 = value && value4.length < r2.length;
object.isPartiallyOwnedBundle = r1;
object.isPartiallyOwnedVariantsGroup = false;
return object;
}
const VARIANTS_GROUP = CollectiblesItemType.VARIANTS_GROUP;
if (VARIANTS_GROUP === type) {
variants = a1.variants;
r7 = variants == null ? value3 : variants.every(_fun78650);
variants = a1.variants;
r5 = variants == null ? value3 : variants.some(_fun78651);
r5 = r5 && !r7;
object = {};
value = r7 != null;
object.isPurchased = value && r7;
object.isPartiallyOwnedBundle = false;
value = r5 != null;
object.isPartiallyOwnedVariantsGroup = value && r5;
return object;
}
return {'isPurchased': null, 'isPartiallyOwnedBundle': false, 'isPartiallyOwnedVariantsGroup': false,
isPurchased: value};
function _fun78649({skuId}) { // fn#78649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:221, offset: 0x01e2fbc8, size: 28 bytes, params: 2, frame: 11
return env0_0.getPurchase(skuId);
}
function _fun78650({skuId}) { // fn#78650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:554, offset: 0x01e2fbe4, size: 34 bytes, params: 2, frame: 11
return env0_0.getPurchase(skuId) != null;
}
function _fun78651({skuId}) { // fn#78651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:627, offset: 0x01e2fbe4, size: 34 bytes, params: 2, frame: 11
return env0_0.getPurchase(skuId) != null;
}
function getProductPurchaseState(a0, a1) { // fn#78648, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:130, offset: 0x01e2fa39, size: 399 bytes, params: 3, frame: 20
var r7;
var r5;
var r1;
var object2;
var variants;
const env0_0 = a0;
let value = a0.getPurchase(a1.skuId);
value = value != null;
const r2 = a1.items ?? [];
const value3 = undefined;
const value4 = (importDefault(10061) /* metro dependency 10061 */)(r2.map(_fun78649));
const type = a1 == null ? value3 : a1.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === type) {
object2 = {};
r1 = value || r2.length > 0 && value4.length === r2.length;
object2.isPurchased = r1;
value = value4.length > 0;
r1 = value && value4.length < r2.length;
object2.isPartiallyOwnedBundle = r1;
object2.isPartiallyOwnedVariantsGroup = false;
return object2;
}
const VARIANTS_GROUP = CollectiblesItemType.VARIANTS_GROUP;
if (VARIANTS_GROUP === type) {
variants = a1.variants;
r7 = variants == null ? value3 : variants.every(_fun78650);
variants = a1.variants;
r5 = variants == null ? value3 : variants.some(_fun78651);
r5 = r5 && !r7;
object2 = {};
value = r7 != null;
object2.isPurchased = value && r7;
object2.isPartiallyOwnedBundle = false;
value = r5 != null;
object2.isPartiallyOwnedVariantsGroup = value && r5;
return object2;
function useProductPurchaseState(a0) { // fn#78652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:1019, offset: 0x01e2fc06, size: 67 bytes, params: 2, frame: 14
const env0_0 = a0;
return (FluxModule).useStateFromStoresObject([CollectiblesPurchaseStore],
_fun78653);
function _fun78653() { // fn#78653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:1060, offset: 0x01e2fc49, size: 28 bytes, params: 1, frame: 13
return getProductPurchaseState(CollectiblesPurchaseStore, env0_0);
}
}
return {'isPurchased': null, 'isPartiallyOwnedBundle': false, 'isPartiallyOwnedVariantsGroup': false,
isPurchased: value};
}
function useProductPurchaseState(a0) { // fn#78652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:1019, offset: 0x01e2fc06, size: 67 bytes, params: 2, frame: 14
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([CollectiblesPurchaseStore],
_fun78653);
}
function _fun78649({skuId}) { // fn#78649, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:221, offset: 0x01e2fbc8, size: 28 bytes, params: 2, frame: 11
return env0_0.getPurchase(skuId);
}
function _fun78650({skuId}) { // fn#78650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:554, offset: 0x01e2fbe4, size: 34 bytes, params: 2, frame: 11
return env0_0.getPurchase(skuId) != null;
}
function _fun78653() { // fn#78653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10246:1060, offset: 0x01e2fc49, size: 28 bytes, params: 1, frame: 13
return getProductPurchaseState(CollectiblesPurchaseStore, env0_0);
}
global.__d(_fun78647, 10060, [5145, 10061, 1904, 566,
2]) /* metro module 10060, dependencies: [5145, 10061, 1904, 566, 2] */;
@@ -1,4 +1,11 @@
/* Metro module 15300; source: modules/collectibles/hooks/useProfileFramesMarketing.tsx; dependencies: [1878, 10054, 15301, 7630, 566, 8499, 10055, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import CollectiblesProfileFramesExperiment from '../experiments/CollectiblesProfileFramesExperiment.tsx'; /* Metro dependency 8499 */
import CollectiblesProfileFramesPurchaseExperiment from '../experiments/CollectiblesProfileFramesPurchaseExperiment.tsx'; /* Metro dependency 10055 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseCanPurchaseFramesModule from './useCanPurchaseFrames.tsx'; /* Metro dependency 10054 */
import * as CollectiblesProfileFramesPurchaseExperimentModule from '../experiments/CollectiblesProfileFramesPurchaseExperiment.tsx'; /* Metro dependency 10055 */
function _fun116996(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116996, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15497:6, offset: 0x0249f605, size: 152 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function({canViewProfileFramesInCollectiblesShop, isEarlyAccess, isFramesEAMarketingEnabled,
@@ -16,46 +23,46 @@ function _fun116996(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useProfileFramesMarketing.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useProfileFramesMarketing.tsx');
exports.deriveProfileFramesMarketing = closure;
exports.useProfileFramesMarketing = useProfileFramesMarketing;
exports.getProfileFramesMarketing = getProfileFramesMarketing;
function useProfileFramesMarketing(a0) { // fn#116998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15497:609, offset: 0x0249f714, size: 187 bytes, params: 2, frame: 19
const deriveProfileFramesMarketingBinding = deriveProfileFramesMarketing;
const object = {};
object.canViewProfileFramesInCollectiblesShop = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useCanViewProfileFramesInCollectiblesShop(a0);
object.isEarlyAccess = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase(a0);
object.isFramesEAMarketingEnabled = (require(15301) /* metro dependency 15301: CollectiblesProfileFramesEAMarketingExperiment */).useIsProfileFramesEAMarketingEnabled(a0);
object.isFrameGiftingEnabled = (require(7630) /* metro dependency 7630: CollectiblesProfileFrameGiftingExperiment */).useIsProfileFrameGiftingEnabled(a0);
object.hasPaidTier2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return require(dependencyMap[1]).isUserPaidTier2(UserStore.getCurrentUser());
});
return deriveProfileFramesMarketingBinding(object);
}
function getProfileFramesMarketing(a0) { // fn#117000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15497:1102, offset: 0x0249f802, size: 289 bytes, params: 2, frame: 19
const ProfileFramesPurchaseBucket = (CollectiblesProfileFramesPurchaseExperimentModule).ProfileFramesPurchaseBucket;
const defaultImport = CollectiblesProfileFramesExperiment;
let getConfig = defaultImport.getConfig;
const enableProfileFrames = Reflect.apply(getConfig, defaultImport, [{location: a0}]).enableProfileFrames;
const defaultImport2 = CollectiblesProfileFramesPurchaseExperiment;
getConfig = defaultImport2.getConfig;
const bucket = Reflect.apply(getConfig, defaultImport2, [{location: a0}]).bucket;
const deriveProfileFramesMarketingBinding = deriveProfileFramesMarketing;
object = {};
object.canViewProfileFramesInCollectiblesShop = enableProfileFrames && bucket !== ProfileFramesPurchaseBucket.CONTROL;
object.isEarlyAccess = enableProfileFrames && bucket === ProfileFramesPurchaseBucket.PAID_PREMIUM_SUBSCRIBERS_ONLY;
object.isFramesEAMarketingEnabled = (require(15301) /* metro dependency 15301: CollectiblesProfileFramesEAMarketingExperiment */).getIsProfileFramesEAMarketingEnabled(a0);
object.isFrameGiftingEnabled = (require(7630) /* metro dependency 7630: CollectiblesProfileFrameGiftingExperiment */).getIsProfileFrameGiftingEnabled(a0);
const isUserPaidTier2 = UseCanPurchaseFramesModule.isUserPaidTier2;
const userStoreBinding = UserStore;
const getCurrentUser = userStoreBinding.getCurrentUser;
object.hasPaidTier2 = Reflect.apply(isUserPaidTier2, UseCanPurchaseFramesModule, [Reflect.apply(getCurrentUser,
userStoreBinding, [])]);
return deriveProfileFramesMarketingBinding(object);
}
}
function useProfileFramesMarketing(a0) { // fn#116998, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15497:609, offset: 0x0249f714, size: 187 bytes, params: 2, frame: 19
const deriveProfileFramesMarketingBinding = deriveProfileFramesMarketing;
const object2 = {};
object2.canViewProfileFramesInCollectiblesShop = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useCanViewProfileFramesInCollectiblesShop(a0);
object2.isEarlyAccess = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase(a0);
object2.isFramesEAMarketingEnabled = (require(15301) /* metro dependency 15301: CollectiblesProfileFramesEAMarketingExperiment */).useIsProfileFramesEAMarketingEnabled(a0);
object2.isFrameGiftingEnabled = (require(7630) /* metro dependency 7630: CollectiblesProfileFrameGiftingExperiment */).useIsProfileFrameGiftingEnabled(a0);
object2.hasPaidTier2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return require(dependencyMap[1]).isUserPaidTier2(UserStore.getCurrentUser());
});
return deriveProfileFramesMarketingBinding(object2);
}
function getProfileFramesMarketing(a0) { // fn#117000, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15497:1102, offset: 0x0249f802, size: 289 bytes, params: 2, frame: 19
var object2;
const ProfileFramesPurchaseBucket = (require(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */).ProfileFramesPurchaseBucket;
const defaultImport = importDefault(8499) /* metro dependency 8499: CollectiblesProfileFramesExperiment */;
let getConfig = defaultImport.getConfig;
const enableProfileFrames = Reflect.apply(getConfig, defaultImport, [{location: a0}]).enableProfileFrames;
const defaultImport2 = importDefault(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */;
getConfig = defaultImport2.getConfig;
const bucket = Reflect.apply(getConfig, defaultImport2, [{location: a0}]).bucket;
const deriveProfileFramesMarketingBinding = deriveProfileFramesMarketing;
object2 = {};
object2.canViewProfileFramesInCollectiblesShop = enableProfileFrames && bucket !== ProfileFramesPurchaseBucket.CONTROL;
object2.isEarlyAccess = enableProfileFrames && bucket === ProfileFramesPurchaseBucket.PAID_PREMIUM_SUBSCRIBERS_ONLY;
object2.isFramesEAMarketingEnabled = (require(15301) /* metro dependency 15301: CollectiblesProfileFramesEAMarketingExperiment */).getIsProfileFramesEAMarketingEnabled(a0);
object2.isFrameGiftingEnabled = (require(7630) /* metro dependency 7630: CollectiblesProfileFrameGiftingExperiment */).getIsProfileFrameGiftingEnabled(a0);
const useCanPurchaseFramesModule = require(10054) /* metro dependency 10054: useCanPurchaseFrames */;
const isUserPaidTier2 = useCanPurchaseFramesModule.isUserPaidTier2;
const getCurrentUser = UserStore.getCurrentUser;
object2.hasPaidTier2 = Reflect.apply(isUserPaidTier2, useCanPurchaseFramesModule, [Reflect.apply(getCurrentUser,
UserStore, [])]);
return deriveProfileFramesMarketingBinding(object2);
}
global.__d(_fun116996, 15300, [1878, 10054, 15301, 7630, 566, 8499, 10055,
2]) /* metro module 15300, dependencies: [1878, 10054, 15301, 7630, 566, 8499, 10055, 2] */;
@@ -1,115 +1,133 @@
/* Metro module 14052; source: modules/collectibles/hooks/usePurchasedProductsSort.tsx; dependencies: [31, 5145, 1904, 5133, 632, 2] */
import CollectiblesPurchaseStore from '../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
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 UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
function _fun106562(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:6, offset: 0x022e06c0, size: 197 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useMemo;
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
object2 = {NOT_PURCHASED: 0};
object2[0] = 'NOT_PURCHASED';
object2.PARTIAL_OWNED_BUNDLE = 1;
object2[1] = 'PARTIAL_OWNED_BUNDLE';
object2.PURCHASED = 2;
object2[2] = 'PURCHASED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/usePurchasedProductsSort.tsx');
object = {NOT_PURCHASED: 0};
object[0] = 'NOT_PURCHASED';
object.PARTIAL_OWNED_BUNDLE = 1;
object[1] = 'PARTIAL_OWNED_BUNDLE';
object.PURCHASED = 2;
object[2] = 'PURCHASED';
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/usePurchasedProductsSort.tsx');
exports.usePurchasedProductsSort = usePurchasedProductsSort;
}
function productPurchaseStatus(a0, a1) { // fn#106563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:295, offset: 0x022e0785, size: 222 bytes, params: 3, frame: 16
var r1;
var moduleValue;
var value2;
var binding;
var value3;
const env0_0 = a1;
const type = a0.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type !== BUNDLE) {
moduleValue = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
if (moduleValue.getIsVariantProduct(a0)) {
value3 = a0.variants.every(function(a0) {
return require.includes(a0.skuId);
});
binding = env0_4;
r1 = value3 ? binding.PURCHASED : binding.NOT_PURCHASED;
function productPurchaseStatus(a0, a1) { // fn#106563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:295, offset: 0x022e0785, size: 222 bytes, params: 3, frame: 16
var r1;
var moduleValue;
var value2;
var binding;
var value3;
const env0_0 = a1;
const type = a0.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type !== BUNDLE) {
moduleValue = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
if (moduleValue.getIsVariantProduct(a0)) {
value3 = a0.variants.every(function(a0) {
return require.includes(a0.skuId);
});
binding = env0_4;
r1 = value3 ? binding.PURCHASED : binding.NOT_PURCHASED;
} else {
value2 = a1.includes(a0.skuId);
binding = env0_4;
r1 = value2 ? binding.PURCHASED : binding.NOT_PURCHASED;
}
} else {
value2 = a1.includes(a0.skuId);
binding = env0_4;
r1 = value2 ? binding.PURCHASED : binding.NOT_PURCHASED;
}
} else {
var items2 = a0.items;
if (items2.some(function(a0) {
return require.includes(a0.skuId);
})) {
return env0_4.PARTIAL_OWNED_BUNDLE;
}
moduleValue = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
if (moduleValue.getIsVariantProduct(a0)) {
value3 = a0.variants.every(function(a0) {
var items2 = a0.items;
if (items2.some(function(a0) {
return require.includes(a0.skuId);
});
binding = env0_4;
r1 = value3 ? binding.PURCHASED : binding.NOT_PURCHASED;
} else {
value2 = a1.includes(a0.skuId);
binding = env0_4;
r1 = value2 ? binding.PURCHASED : binding.NOT_PURCHASED;
})) {
return env0_4.PARTIAL_OWNED_BUNDLE;
}
moduleValue = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
if (moduleValue.getIsVariantProduct(a0)) {
value3 = a0.variants.every(function(a0) {
return require.includes(a0.skuId);
});
binding = env0_4;
r1 = value3 ? binding.PURCHASED : binding.NOT_PURCHASED;
} else {
value2 = a1.includes(a0.skuId);
binding = env0_4;
r1 = value2 ? binding.PURCHASED : binding.NOT_PURCHASED;
}
}
return r1;
}
return r1;
}
function usePurchasedProductsSort(a0) { // fn#106566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:695, offset: 0x022e087e, size: 124 bytes, params: 2, frame: 17
const env0_0 = a0;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let items2 = [CollectiblesPurchaseStore];
items2 = [Reflect.apply(useStateFromStores, useStateFromStoresModule, [items2, function() {
return CollectiblesPurchaseStore.purchases;
}])];
items2 = [a0, useMemo(function() {
var purchasesBinding = purchases;
var items = [];
arraySpread(items, purchasesBinding, 0, items);
return items.map(_fun106569);
}, items2)];
return useMemo(_fun106570, items2);
}
function _fun106568() { // fn#106568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:760, offset: 0x022e0909, size: 41 bytes, params: 1, frame: 13
const purchasesBinding = purchases;
const items2 = [];
arraySpread(items2, purchasesBinding, 0, items2);
return items2.map(function(a0) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r0 = value2 ? value : item;
if (!value2) {
item2.return();
function usePurchasedProductsSort(a0) { // fn#106566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:695, offset: 0x022e087e, size: 124 bytes, params: 2, frame: 17
const env0_0 = a0;
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
let items2 = [CollectiblesPurchaseStore];
items2 = [Reflect.apply(useStateFromStores, UseStateFromStoresModule, [items2, function() {
return CollectiblesPurchaseStore.purchases;
}])];
items2 = [a0, useMemo(function() {
var purchasesBinding = purchases;
var items = [];
arraySpread(items, purchasesBinding, 0, items);
return items.map(_fun106569);
}, items2)];
return useMemo(_fun106570, items2);
function _fun106568() { // fn#106568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:760, offset: 0x022e0909, size: 41 bytes, params: 1, frame: 13
const purchasesBinding = purchases;
const items2 = [];
arraySpread(items2, purchasesBinding, 0, items2);
return items2.map(function(a0) {
var iterator = a0[Symbol.iterator]();
var item2 = iterator.next();
var item = item2.value;
item2 = item2.done ? undefined : iterator;
var value = undefined;
var value2 = item2 === value;
var r0 = value2 ? value : item;
if (!value2) {
item2.return();
}
return r0;
});
}
return r0;
});
function _fun106570() { // fn#106570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:803, offset: 0x022e0932, size: 42 bytes, params: 1, frame: 13
const binding = env0_0;
const items2 = [];
arraySpread(items2, binding, 0, items2);
return items2.sort(_fun106571);
function _fun106571(a0, a1) { // fn#106571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:820, offset: 0x022e095c, size: 40 bytes, params: 3, frame: 14
let value = environment.__proto__.__proto__;
const productPurchaseStatusBinding = productPurchaseStatus;
value = environment.__proto__;
const binding = env1_2;
return productPurchaseStatusBinding(a0, binding) - productPurchaseStatusBinding(a1, binding);
}
}
}
}
function _fun106570() { // fn#106570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:803, offset: 0x022e0932, size: 42 bytes, params: 1, frame: 13
const binding = env0_0;
const items2 = [];
arraySpread(items2, binding, 0, items2);
return items2.sort(_fun106571);
}
function _fun106571(a0, a1) { // fn#106571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:820, offset: 0x022e095c, size: 40 bytes, params: 3, frame: 14
let value = environment.__proto__.__proto__;
const productPurchaseStatusBinding = productPurchaseStatus;
value = environment.__proto__;
const binding = env1_2;
return productPurchaseStatusBinding(a0, binding) - productPurchaseStatusBinding(a1, binding);
function _fun106569(a0) { // fn#106569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14249:776, offset: 0x00ef6493, size: 33 bytes, params: 2, frame: 5
const iterator = a0[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
const value = undefined;
const value2 = item2 === value;
const r0 = value2 ? value : item;
if (!value2) {
item2.return();
}
return r0;
}
global.__d(_fun106562, 14052, [31, 5145, 1904, 5133, 632,
2]) /* metro module 14052, dependencies: [31, 5145, 1904, 5133, 632, 2] */;
@@ -1,120 +1,135 @@
/* Metro module 7609; source: modules/collectibles/hooks/useShopProductItems.tsx; dependencies: [6, 7, 31, 1904, 1244, 2] */
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import * 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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun60960(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:6, offset: 0x01716842, size: 179 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const value = _fun60961();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useShopProductItems.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useShopProductItems.tsx');
exports.ItemsSortingHat = value;
exports.useShopProductItems = useShopProductItems;
exports.getBundleItemNames = getBundleItemNames;
}
function _fun60961() { // fn#60961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:128, offset: 0x017168f5, size: 172 bytes, params: 1, frame: 15
return CreateClass(ItemsSortingHat, [{key: 'firstAvatarDecoration', get: function() {
return this.getFirstItemByType(require(dependencyMap[3]).CollectiblesItemType.AVATAR_DECORATION);
}}, {key: 'firstProfileEffect', get: function() {
return this.getFirstItemByType(require(dependencyMap[3]).CollectiblesItemType.PROFILE_EFFECT);
}}, {key: 'firstNameplate', get: function() {
return this.getFirstItemByType(require(dependencyMap[3]).CollectiblesItemType.NAMEPLATE);
}}, {key: 'firstProfileFrame', get: function() {
return this.getFirstItemByType(require(dependencyMap[3]).CollectiblesItemType.PROFILE_FRAME);
}}, {key: 'getFirstItemByType', value: function(a0) {
var property = this.itemsByTypes;
property = (property.get(a0) ?? [])[0];
if (property != null) {
return property;
}
}}, {key: 'sortByTypes', value: function(a0) {
var Map = global.Map;
return a0.reduce(_fun60969, new Map());
}}]);
function ItemsSortingHat(a0) { // fn#60962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:149, offset: 0x017169a1, size: 49 bytes, params: 2, frame: 13
env1_2(this, ItemsSortingHat);
this.itemsByTypes = this.sortByTypes(a0);
}
function _fun60961() { // fn#60961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:128, offset: 0x017168f5, size: 172 bytes, params: 1, frame: 15
return env0_3(ItemsSortingHat, [{key: 'firstAvatarDecoration', get: function() {
return this.getFirstItemByType(require(dependencyMap[3]).CollectiblesItemType.AVATAR_DECORATION);
}}, {key: 'firstProfileEffect', get: function() {
return this.getFirstItemByType(require(dependencyMap[3]).CollectiblesItemType.PROFILE_EFFECT);
}}, {key: 'firstNameplate', get: function() {
return this.getFirstItemByType(require(dependencyMap[3]).CollectiblesItemType.NAMEPLATE);
}}, {key: 'firstProfileFrame', get: function() {
return this.getFirstItemByType(require(dependencyMap[3]).CollectiblesItemType.PROFILE_FRAME);
}}, {key: 'getFirstItemByType', value: function(a0) {
var property = this.itemsByTypes;
property = (property.get(a0) ?? [])[0];
if (property != null) {
return property;
function value_60968(a0) { // fn#60968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:857, offset: 0x01716ad6, size: 52 bytes, params: 2, frame: 13
const reduce = a0.reduce;
const Map = global.Map;
return Reflect.apply(reduce, a0, [function(a0, a1) {
var value = a0.get(a1.type);
if (value != null) {
value.push(a1);
} else {
a0.set(a1.type, [a1]);
}
return a0;
}, new Map()]);
}
}}, {key: 'sortByTypes', value: function(a0) {
var Map = global.Map;
return a0.reduce(_fun60969, new Map());
}}]);
}
function useShopProductItems(a0) { // fn#60970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:1103, offset: 0x01716b4b, size: 42 bytes, params: 2, frame: 14
const env0_0 = a0;
return env0_4.useMemo(_fun60971, [a0]);
}
function getBundleItemNames(a0) { // fn#60972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:1335, offset: 0x01716bcd, size: 349 bytes, params: 2, frame: 20
var r5;
var r4;
var r1;
var r2;
var r3;
var length;
var property;
const value = undefined;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value2 = Reflect.apply(string, intl, [t['7v0T9P']]);
const value3 = intl.string(t.wR5wOo);
const value4 = intl.string(t.x5CoXR);
let bundledProducts = a0.bundledProducts;
if (bundledProducts == null) {
r1 = value4;
r2 = value3;
r3 = value2;
} else {
bundledProducts = a0.bundledProducts;
length = bundledProducts.length;
if (length > 0) {
property = a0.bundledProducts[0];
r5 = property == null ? value : property.name;
} else {
r5 = value2;
}
bundledProducts = a0.bundledProducts;
length = bundledProducts.length;
if (length > 1) {
property = a0.bundledProducts[1];
r4 = property == null ? value : property.name;
} else {
r4 = value3;
}
bundledProducts = a0.bundledProducts;
length = bundledProducts.length;
if (length > 2) {
property = a0.bundledProducts[2];
r1 = property == null ? value : property.name;
r2 = r4;
r3 = r5;
} else {
r1 = value4;
r2 = r4;
r3 = r5;
}
}
return {itemOneName: r3, itemTwoName: r2, itemThreeName: r1};
}
function ItemsSortingHat(a0) { // fn#60962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:149, offset: 0x017169a1, size: 49 bytes, params: 2, frame: 13
env1_2(this, ItemsSortingHat);
this.itemsByTypes = this.sortByTypes(a0);
}
function value_60968(a0) { // fn#60968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:857, offset: 0x01716ad6, size: 52 bytes, params: 2, frame: 13
const reduce = a0.reduce;
const Map = global.Map;
return Reflect.apply(reduce, a0, [function(a0, a1) {
var value = a0.get(a1.type);
if (value != null) {
value.push(a1);
} else {
a0.set(a1.type, [a1]);
function useShopProductItems(a0) { // fn#60970, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:1103, offset: 0x01716b4b, size: 42 bytes, params: 2, frame: 14
const env0_0 = a0;
return ReactModule.useMemo(_fun60971, [a0]);
function _fun60971() { // fn#60971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:1117, offset: 0x01716b75, size: 88 bytes, params: 1, frame: 11
const value = environment.__proto__;
const env1_53 = new env1_5(env0_0.items);
return {firstProfileEffect: env1_53.firstProfileEffect, firstAvatarDecoration: env1_53.firstAvatarDecoration,
firstNameplate: env1_53.firstNameplate, firstProfileFrame: env1_53.firstProfileFrame};
}
return a0;
}, new Map()]);
}
function getBundleItemNames(a0) { // fn#60972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:1335, offset: 0x01716bcd, size: 349 bytes, params: 2, frame: 20
var r5;
var r4;
var r1;
var r2;
var r3;
var length;
var property;
const value = undefined;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const value2 = Reflect.apply(string, intl, [t['7v0T9P']]);
const value3 = intl.string(t.wR5wOo);
const value4 = intl.string(t.x5CoXR);
let bundledProducts = a0.bundledProducts;
if (bundledProducts == null) {
r1 = value4;
r2 = value3;
r3 = value2;
} else {
bundledProducts = a0.bundledProducts;
length = bundledProducts.length;
if (length > 0) {
property = a0.bundledProducts[0];
r5 = property == null ? value : property.name;
} else {
r5 = value2;
}
bundledProducts = a0.bundledProducts;
length = bundledProducts.length;
if (length > 1) {
property = a0.bundledProducts[1];
r4 = property == null ? value : property.name;
} else {
r4 = value3;
}
bundledProducts = a0.bundledProducts;
length = bundledProducts.length;
if (length > 2) {
property = a0.bundledProducts[2];
r1 = property == null ? value : property.name;
r2 = r4;
r3 = r5;
} else {
r1 = value4;
r2 = r4;
r3 = r5;
}
}
return {itemOneName: r3, itemTwoName: r2, itemThreeName: r1};
}
}
function _fun60971() { // fn#60971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:1117, offset: 0x01716b75, size: 88 bytes, params: 1, frame: 11
const value = environment.__proto__;
const env1_52 = new env1_5(env0_0.items);
return {firstProfileEffect: env1_52.firstProfileEffect, firstAvatarDecoration: env1_52.firstAvatarDecoration,
firstNameplate: env1_52.firstNameplate, firstProfileFrame: env1_52.firstProfileFrame};
function _fun60969(a0, a1) { // fn#60969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7787:886, offset: 0x01716b0a, size: 65 bytes, params: 3, frame: 16
const value = a0.get(a1.type);
if (value != null) {
value.push(a1);
} else {
a0.set(a1.type, [a1]);
}
return a0;
}
global.__d(_fun60960, 7609, [6, 7, 31, 1904, 1244,
2]) /* metro module 7609, dependencies: [6, 7, 31, 1904, 1244, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 10150; source: modules/collectibles/hooks/useShouldShowPremiumProfileFrameCTA.tsx; dependencies: [10151, 10054, 1904, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun79113(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10336:6, offset: 0x01e457ca, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useShouldShowPremiumProfileFrameCTA.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useShouldShowPremiumProfileFrameCTA.tsx');
exports.default = useShouldShowPremiumProfileFrameCTA;
function useShouldShowPremiumProfileFrameCTA({location, product}) { // fn#79114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10336:202, offset: 0x01e45831, size: 112 bytes, params: 2, frame: 16
return (importDefault(10151) /* metro dependency 10151: useShouldShowPremiumProfileFrameEA */)(location) && !(importDefault(10054) /* metro dependency 10054: useCanPurchaseFrames */)(location) && product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME;
}
}
function useShouldShowPremiumProfileFrameCTA({location, product}) { // fn#79114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10336:202, offset: 0x01e45831, size: 112 bytes, params: 2, frame: 16
return (importDefault(10151) /* metro dependency 10151: useShouldShowPremiumProfileFrameEA */)(location) && !(importDefault(10054) /* metro dependency 10054: useCanPurchaseFrames */)(location) && product.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME;
}
global.__d(_fun79113, 10150, [10151, 10054, 1904,
2]) /* metro module 10150, dependencies: [10151, 10054, 1904, 2] */;
@@ -1,17 +1,22 @@
/* Metro module 10151; source: modules/collectibles/hooks/useShouldShowPremiumProfileFrameEA.tsx; dependencies: [8499, 10055, 2] */
import CollectiblesProfileFramesPurchaseExperiment from '../experiments/CollectiblesProfileFramesPurchaseExperiment.tsx'; /* Metro dependency 10055 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CollectiblesProfileFramesExperimentModule from '../experiments/CollectiblesProfileFramesExperiment.tsx'; /* Metro dependency 8499 */
function _fun79115(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10337:6, offset: 0x01e458a1, size: 103 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useShouldShowPremiumProfileFrameEA.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useShouldShowPremiumProfileFrameEA.tsx');
exports.default = useShouldShowPremiumProfileFrameEA;
function useShouldShowPremiumProfileFrameEA(a0) { // fn#79116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10337:201, offset: 0x01e45908, size: 115 bytes, params: 2, frame: 16
const value2 = (CollectiblesProfileFramesExperimentModule).useIsProfileFramesEnabled(a0);
const defaultImport = CollectiblesProfileFramesPurchaseExperiment;
const useConfig = defaultImport.useConfig;
return value2 && Reflect.apply(useConfig, defaultImport,
[{location: a0}]).bucket === (require(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */).ProfileFramesPurchaseBucket.PAID_PREMIUM_SUBSCRIBERS_ONLY;
}
}
function useShouldShowPremiumProfileFrameEA(a0) { // fn#79116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10337:201, offset: 0x01e45908, size: 115 bytes, params: 2, frame: 16
const value2 = (require(8499) /* metro dependency 8499: CollectiblesProfileFramesExperiment */).useIsProfileFramesEnabled(a0);
const defaultImport = importDefault(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */;
const useConfig = defaultImport.useConfig;
return value2 && Reflect.apply(useConfig, defaultImport,
[{location: a0}]).bucket === (require(10055) /* metro dependency 10055: CollectiblesProfileFramesPurchaseExperiment */).ProfileFramesPurchaseBucket.PAID_PREMIUM_SUBSCRIBERS_ONLY;
}
global.__d(_fun79115, 10151, [8499, 10055, 2]) /* metro module 10151, dependencies: [8499, 10055, 2] */;
@@ -1,64 +1,72 @@
/* Metro module 8399; source: modules/collectibles/hooks/useTrackCollectiblesItemTryOut.tsx; dependencies: [31, 5121, 661, 1880, 1904, 632, 683, 5134, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
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 UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
function _fun66742(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8584:6, offset: 0x01c07d67, size: 418 bytes, params: 8, frame: 20
var object2;
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(31) /* metro dependency 31 */).useCallback;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const premiumConstantsModule = require(1880) /* metro dependency 1880: PremiumConstants */;
const AnalyticsPremiumFeatureNames = premiumConstantsModule.AnalyticsPremiumFeatureNames;
const env0_6 = premiumConstantsModule.AnalyticsPremiumFeatureTiers;
object2 = {};
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const AnalyticsPremiumFeatureNames = PremiumConstantsModule.AnalyticsPremiumFeatureNames;
object = {};
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
const AVATAR_DECORATION2 = AnalyticsPremiumFeatureNames.AVATAR_DECORATION;
object2[AVATAR_DECORATION] = AVATAR_DECORATION2;
object[AVATAR_DECORATION] = AVATAR_DECORATION2;
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
const PROFILE_EFFECT2 = AnalyticsPremiumFeatureNames.PROFILE_EFFECT;
object2[PROFILE_EFFECT] = PROFILE_EFFECT2;
object[PROFILE_EFFECT] = PROFILE_EFFECT2;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
object2[PROFILE_FRAME] = undefined;
object[PROFILE_FRAME] = undefined;
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
object2[NAMEPLATE] = undefined;
object[NAMEPLATE] = undefined;
const NONE = CollectiblesItemType.NONE;
object2[NONE] = undefined;
object[NONE] = undefined;
const BUNDLE = CollectiblesItemType.BUNDLE;
object2[BUNDLE] = undefined;
object[BUNDLE] = undefined;
const VARIANTS_GROUP = CollectiblesItemType.VARIANTS_GROUP;
object2[VARIANTS_GROUP] = undefined;
object[VARIANTS_GROUP] = undefined;
const EXTERNAL_SKU = CollectiblesItemType.EXTERNAL_SKU;
object2[EXTERNAL_SKU] = undefined;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useTrackCollectiblesItemTryOut.tsx');
object[EXTERNAL_SKU] = undefined;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useTrackCollectiblesItemTryOut.tsx');
exports.default = function(a0) {
var env0_0 = a0;
var value2 = require(dependencyMap[5]).useStateFromStores([CollectiblesCategoryStore], _fun66744);
var env0_1 = value2;
return useCallback(_fun66745, [value2, a0]);
};
function _default_66743(a0) { // fn#66743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8584:666, offset: 0x01c07f09, size: 99 bytes, params: 2, frame: 17
const env0_0 = a0;
const useStateFromStores = UseStateFromStoresModule.useStateFromStores;
let items2 = [CollectiblesCategoryStore];
items2 = [Reflect.apply(useStateFromStores, UseStateFromStoresModule, [items2, function() {
return CollectiblesCategoryStore.products;
}]), a0];
return useCallback(_fun66745, items2);
function _fun66744() { // fn#66744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8584:708, offset: 0x01c07f6c, size: 15 bytes, params: 1, frame: 1
return CollectiblesCategoryStore.products;
}
function _fun66745({type, skuId}) { // fn#66745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8584:735, offset: 0x01c07f7b, size: 176 bytes, params: 2, frame: 20
const value2 = products.get(skuId);
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const PREMIUM_FEATURE_TRY_OUT = AnalyticEvents.PREMIUM_FEATURE_TRY_OUT;
const object = {feature_name: env1_7[type]};
object.feature_tier = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(value2) ? AnalyticsPremiumFeatureTiers.FREE : AnalyticsPremiumFeatureTiers.PREMIUM_STANDARD;
object.feature_selection = value2?.name;
object.location_stack = env0_0;
Reflect.apply(track, defaultImport, [PREMIUM_FEATURE_TRY_OUT, object]);
}
}
}
function _default_66743(a0) { // fn#66743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8584:666, offset: 0x01c07f09, size: 99 bytes, params: 2, frame: 17
const env0_0 = a0;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let items2 = [CollectiblesCategoryStore];
items2 = [Reflect.apply(useStateFromStores, useStateFromStoresModule, [items2, function() {
return CollectiblesCategoryStore.products;
}]), a0];
return useCallback(_fun66745, items2);
}
function _fun66745({type, skuId}) { // fn#66745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8584:735, offset: 0x01c07f7b, size: 176 bytes, params: 2, frame: 20
const value2 = products.get(skuId);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PREMIUM_FEATURE_TRY_OUT = AnalyticEvents.PREMIUM_FEATURE_TRY_OUT;
const object2 = {feature_name: env1_7[type]};
object2.feature_tier = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(value2) ? AnalyticsPremiumFeatureTiers.FREE : AnalyticsPremiumFeatureTiers.PREMIUM_STANDARD;
object2.feature_selection = value2?.name;
object2.location_stack = env0_0;
Reflect.apply(track, defaultImport, [PREMIUM_FEATURE_TRY_OUT, object2]);
}
global.__d(_fun66742, 8399, [31, 5121, 661, 1880, 1904, 632, 683, 5134,
2]) /* metro module 8399, dependencies: [31, 5121, 661, 1880, 1904, 632, 683, 5134, 2] */;
@@ -1,34 +1,41 @@
/* Metro module 10087; source: modules/collectibles/hooks/useTrackPdpClick.tsx; dependencies: [31, 661, 10023, 7594, 5134, 683, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
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 CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as UseCurrentUserModule from './useCurrentUser.tsx'; /* Metro dependency 7594 */
function _fun78807(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10273:6, offset: 0x01e3589a, size: 143 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useTrackPdpClick.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useTrackPdpClick.tsx');
exports.useTrackPdpClick = useTrackPdpClick;
function useTrackPdpClick({skuId, productSkuIds, analyticsLocations}) { // fn#78808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10273:231, offset: 0x01e35929, size: 218 bytes, params: 2, frame: 21
const r2 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext() ?? ({});
const cardId = r2.cardId;
return cardId.useCallback(_fun78809, [skuId, analyticsLocations, cardId, productSkuIds, r2.sessionId,
(CollectiblesUtilsModule).getShopDiscountSource((UseCurrentUserModule).useCurrentUserIfAvailable())]);
function _fun78809(a0) { // fn#78809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10273:490, offset: 0x01e35a03, size: 142 bytes, params: 2, frame: 18
const value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const SHOP_PRODUCT_DETAIL_PAGE_CLICKED = AnalyticEvents.SHOP_PRODUCT_DETAIL_PAGE_CLICKED;
const object = {};
object.sku_id = skuId;
object.cta = a0;
object.shop_session_id = sessionId;
object.card_id = cardId;
object.product_sku_ids = productSkuIds;
object.location_stack = analyticsLocations;
object.discount_source = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getAnalyticsShopDiscountSource(env0_5);
Reflect.apply(track, defaultImport, [SHOP_PRODUCT_DETAIL_PAGE_CLICKED, object]);
}
}
}
function useTrackPdpClick({skuId, productSkuIds, analyticsLocations}) { // fn#78808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10273:231, offset: 0x01e35929, size: 218 bytes, params: 2, frame: 21
const r2 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext() ?? ({});
const cardId = r2.cardId;
return cardId.useCallback(_fun78809, [skuId, analyticsLocations, cardId, productSkuIds, r2.sessionId,
(require(5134) /* metro dependency 5134: CollectiblesUtils */).getShopDiscountSource((require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUserIfAvailable())]);
}
function _fun78809(a0) { // fn#78809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10273:490, offset: 0x01e35a03, size: 142 bytes, params: 2, frame: 18
const value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const SHOP_PRODUCT_DETAIL_PAGE_CLICKED = AnalyticEvents.SHOP_PRODUCT_DETAIL_PAGE_CLICKED;
const object2 = {};
object2.sku_id = skuId;
object2.cta = a0;
object2.shop_session_id = sessionId;
object2.card_id = cardId;
object2.product_sku_ids = productSkuIds;
object2.location_stack = analyticsLocations;
object2.discount_source = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getAnalyticsShopDiscountSource(env0_5);
Reflect.apply(track, defaultImport, [SHOP_PRODUCT_DETAIL_PAGE_CLICKED, object2]);
}
global.__d(_fun78807, 10087, [31, 661, 10023, 7594, 5134, 683,
2]) /* metro module 10087, dependencies: [31, 661, 10023, 7594, 5134, 683, 2] */;
@@ -1,109 +1,122 @@
/* Metro module 10154; source: modules/collectibles/hooks/useTrackProductCardImpression.tsx; dependencies: [31, 5121, 661, 10023, 566, 7594, 3802, 5134, 683, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseCurrentUserModule from './useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
function _fun79123(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:6, offset: 0x01e45d1d, size: 159 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 collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useTrackProductCardImpression.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useTrackProductCardImpression.tsx');
exports.useTrackProductCardImpression = useTrackProductCardImpression;
}
function useTrackProductCardImpression(a0, a1) { // fn#79124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:267, offset: 0x01e45dbc, size: 411 bytes, params: 3, frame: 24
let value = a2;
const env0_0 = a0;
const env0_1 = a1;
const value2 = undefined;
const r1 = value !== value2 ? value : 'product';
const value3 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
const env0_3 = value3;
const product = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
_fun79125);
const canUseShopDiscounts2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts((require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser());
let binding = env0_3;
const env0_6 = binding.useRef(null);
const value5 = binding.useCallback(_fun79126, [value3 == null ? value2 : value3.sessionId,
value3 == null ? value2 : value3.categoryPosition, value3 == null ? value2 : value3.pageCategory,
value3 == null ? value2 : value3.pageSection, value3 == null ? value2 : value3.tilePosition,
canUseShopDiscounts2, a1, product, a0, r1]);
binding = env0_3;
value = binding.useCallback(_fun79127, [value5]);
binding.useEffect(function() {
return _fun79130;
}, []);
return {handleCardVisibilityChange: value};
}
function _fun79126() { // fn#79126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:521, offset: 0x01e45f57, size: 394 bytes, params: 1, frame: 21
var r9;
var r5;
var value3;
var moduleValue;
var value6;
var moduleValue2;
let productBinding = product;
const value2 = null;
if (value2 != productBinding) {
value3 = environment.__proto__;
moduleValue = require(5134) /* metro dependency 5134: CollectiblesUtils */;
r9 = moduleValue.getPriceForCollectiblesProduct(product, env0_5, true);
} else {
r9 = value2;
}
productBinding = product;
const value5 = undefined;
if (value2 != productBinding) {
value6 = environment.__proto__;
moduleValue2 = require(5134) /* metro dependency 5134: CollectiblesUtils */;
r5 = moduleValue2.getStrikeThroughPriceAmountForCollectiblesProduct(product, env0_5, true);
} else {
r5 = value5;
}
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const COLLECTIBLES_TILE_IMPRESSION = AnalyticEvents.COLLECTIBLES_TILE_IMPRESSION;
const object2 = {};
object2.collectibles_shop_session_id = value2 == env0_3 ? value5 : env0_3.sessionId;
object2.sku_id = env0_0;
object2.display_price = value2 == r9 ? value5 : r9.amount;
object2.display_price_currency = value2 == r9 ? value5 : r9.currency.toString();
object2.display_price_strikethrough = r5;
object2.position = value2 == env0_3 ? value5 : env0_3.tilePosition;
object2.page_type = require;
object2.page_category = value2 == env0_3 ? value5 : env0_3.pageCategory;
object2.page_section = value2 == env0_3 ? value5 : env0_3.pageSection;
object2.type = env0_2;
object2.category_position = value2 == env0_3 ? value5 : env0_3.categoryPosition;
Reflect.apply(track, defaultImport, [COLLECTIBLES_TILE_IMPRESSION, object2]);
return value5;
}
function _fun79127(a0) { // fn#79127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:1294, offset: 0x01e460e1, size: 109 bytes, params: 2, frame: 15
const current = env0_6.current;
if (a0) {
if (current === null) {
env0_6.current = global.setTimeout(_fun79128, 1000);
function useTrackProductCardImpression(a0, a1) { // fn#79124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:267, offset: 0x01e45dbc, size: 411 bytes, params: 3, frame: 24
let value = a2;
const env0_0 = a0;
const env0_1 = a1;
const value2 = undefined;
const r1 = value !== value2 ? value : 'product';
const value3 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
const env0_3 = value3;
const product = (FluxModule).useStateFromStores([CollectiblesCategoryStore],
_fun79125);
const canUseShopDiscounts2 = (PremiumUtils).canUseShopDiscounts((UseCurrentUserModule).useCurrentUser());
let binding = env0_3;
const env0_6 = binding.useRef(null);
const value5 = binding.useCallback(_fun79126, [value3 == null ? value2 : value3.sessionId,
value3 == null ? value2 : value3.categoryPosition, value3 == null ? value2 : value3.pageCategory,
value3 == null ? value2 : value3.pageSection, value3 == null ? value2 : value3.tilePosition,
canUseShopDiscounts2, a1, product, a0, r1]);
binding = env0_3;
value = binding.useCallback(_fun79127, [value5]);
binding.useEffect(function() {
return _fun79130;
}, []);
return {handleCardVisibilityChange: value};
function _fun79125() { // fn#79125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:405, offset: 0x0171b848, size: 27 bytes, params: 1, frame: 11
return CollectiblesCategoryStore.getProduct(env0_0);
}
} else if (current !== null) {
global.clearTimeout(env0_6.current);
env0_6.current = null;
}
}
function _fun79129() { // fn#79129, offset: 0x01e46169, size: 11 bytes, params: 1, frame: 1
return _fun79130;
}
function _fun79126() { // fn#79126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:521, offset: 0x01e45f57, size: 394 bytes, params: 1, frame: 21
var r9;
var r5;
var value3;
var moduleValue;
var value6;
var moduleValue2;
let productBinding = product;
const value2 = null;
if (value2 != productBinding) {
value3 = environment.__proto__;
moduleValue = require(5134) /* metro dependency 5134: CollectiblesUtils */;
r9 = moduleValue.getPriceForCollectiblesProduct(product, ConstantsModule.AnalyticEvents, true);
} else {
r9 = value2;
}
productBinding = product;
const value5 = undefined;
if (value2 != productBinding) {
value6 = environment.__proto__;
moduleValue2 = require(5134) /* metro dependency 5134: CollectiblesUtils */;
r5 = moduleValue2.getStrikeThroughPriceAmountForCollectiblesProduct(product, ConstantsModule.AnalyticEvents, true);
} else {
r5 = value5;
}
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const COLLECTIBLES_TILE_IMPRESSION = AnalyticEvents.COLLECTIBLES_TILE_IMPRESSION;
const object = {};
object.collectibles_shop_session_id = value2 == env0_3 ? value5 : env0_3.sessionId;
object.sku_id = env0_0;
object.display_price = value2 == r9 ? value5 : r9.amount;
object.display_price_currency = value2 == r9 ? value5 : r9.currency.toString();
object.display_price_strikethrough = r5;
object.position = value2 == env0_3 ? value5 : env0_3.tilePosition;
object.page_type = require;
object.page_category = value2 == env0_3 ? value5 : env0_3.pageCategory;
object.page_section = value2 == env0_3 ? value5 : env0_3.pageSection;
object.type = env0_2;
object.category_position = value2 == env0_3 ? value5 : env0_3.categoryPosition;
Reflect.apply(track, defaultImport, [COLLECTIBLES_TILE_IMPRESSION, object]);
return value5;
}
function _fun79128() { // fn#79128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:1341, offset: 0x01e4614e, size: 27 bytes, params: 1, frame: 10
env1_7();
env1_6.current = null;
}
function _fun79127(a0) { // fn#79127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:1294, offset: 0x01e460e1, size: 109 bytes, params: 2, frame: 15
const current = env0_6.current;
if (a0) {
if (current === null) {
env0_6.current = global.setTimeout(_fun79128, 1000);
}
} else if (current !== null) {
global.clearTimeout(env0_6.current);
env0_6.current = null;
}
function _fun79128() { // fn#79128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:1341, offset: 0x01e4614e, size: 27 bytes, params: 1, frame: 10
env1_7();
env1_6.current = null;
}
}
function _fun79129() { // fn#79129, offset: 0x01e46169, size: 11 bytes, params: 1, frame: 1
return _fun79130;
function _fun79130() { // fn#79130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:1463, offset: 0x01e46174, size: 56 bytes, params: 1, frame: 13
if (env1_6.current !== null) {
global.clearTimeout(env1_6.current);
env1_6.current = null;
}
}
}
function _fun79130() { // fn#79130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10340:1463, offset: 0x01e46174, size: 56 bytes, params: 1, frame: 13
if (env1_6.current !== null) {
global.clearTimeout(env1_6.current);
env1_6.current = null;
}
}
global.__d(_fun79123, 10154, [31, 5121, 661, 10023, 566, 7594, 3802, 5134, 683,
2]) /* metro module 10154, dependencies: [31, 5121, 661, 10023, 566, 7594, 3802, 5134, 683, 2] */;
@@ -1,51 +1,58 @@
/* Metro module 10051; source: modules/collectibles/hooks/useTrackShopCardClick.tsx; dependencies: [31, 10052, 661, 10023, 7594, 5134, 683, 5133, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
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 CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as UseCurrentUserModule from './useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as CollectiblesShopVariantsUIStoreModule from '../CollectiblesShopVariantsUIStore.tsx'; /* Metro dependency 10052 */
function _fun78597(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10237:6, offset: 0x01e2d517, size: 165 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(10052) /* metro dependency 10052: CollectiblesShopVariantsUIStore */).useSelectedVariantIndex;
const env0_5 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useTrackShopCardClick.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useTrackShopCardClick.tsx');
exports.useTrackShopCardClick = useTrackShopCardClick;
}
function useTrackShopCardClick({product, analyticsLocations}) { // fn#78598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10237:275, offset: 0x01e2d5bc, size: 244 bytes, params: 2, frame: 22
const r2 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext() ?? ({});
const cardId = r2.cardId;
const sessionId = r2.sessionId;
return sessionId.useCallback(_fun78599, [product, useSelectedVariantIndex(product), sessionId, cardId,
analyticsLocations, r2.tilePosition,
(CollectiblesUtilsModule).getShopDiscountSource((UseCurrentUserModule).useCurrentUserIfAvailable())]);
function _fun78599(a0, a1) { // fn#78599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10237:549, offset: 0x01e2d6b0, size: 259 bytes, params: 3, frame: 21
var skuId;
var property;
const value = a1;
const value3 = undefined;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const SHOP_CARD_CLICKED = AnalyticEvents.SHOP_CARD_CLICKED;
const object = {};
const getIsVariantProduct = CollectiblesProductUtilsModule.getIsVariantProduct;
if (Reflect.apply(getIsVariantProduct, CollectiblesProductUtilsModule, [product])) {
property = product.variants[value ?? ConstantsModule.AnalyticEvents];
skuId = property == null ? value3 : property.skuId;
skuId = skuId ?? product.skuId;
} else {
skuId = product.skuId;
}
object.sku_id = skuId;
object.cta = a0;
object.shop_session_id = sessionId;
object.card_id = cardId;
object.product_sku_ids = CollectiblesProductUtilsModule.getProductSkuIds(product);
object.location_stack = analyticsLocations;
object.position_in_section = tilePosition;
object.discount_source = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getAnalyticsShopDiscountSource(env0_6);
Reflect.apply(track, defaultImport, [SHOP_CARD_CLICKED, object]);
return value3;
}
function useTrackShopCardClick({product, analyticsLocations}) { // fn#78598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10237:275, offset: 0x01e2d5bc, size: 244 bytes, params: 2, frame: 22
const r2 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext() ?? ({});
const cardId = r2.cardId;
const sessionId = r2.sessionId;
return sessionId.useCallback(_fun78599, [product, useSelectedVariantIndex(product), sessionId, cardId,
analyticsLocations, r2.tilePosition,
(require(5134) /* metro dependency 5134: CollectiblesUtils */).getShopDiscountSource((require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUserIfAvailable())]);
}
function _fun78599(a0, a1) { // fn#78599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10237:549, offset: 0x01e2d6b0, size: 259 bytes, params: 3, frame: 21
var skuId;
var property;
const value = a1;
const value3 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const SHOP_CARD_CLICKED = AnalyticEvents.SHOP_CARD_CLICKED;
const object2 = {};
const collectiblesProductUtilsModule = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
const getIsVariantProduct = collectiblesProductUtilsModule.getIsVariantProduct;
if (Reflect.apply(getIsVariantProduct, collectiblesProductUtilsModule, [product])) {
property = product.variants[value ?? env0_5];
skuId = property == null ? value3 : property.skuId;
skuId = skuId ?? product.skuId;
} else {
skuId = product.skuId;
}
object2.sku_id = skuId;
object2.cta = a0;
object2.shop_session_id = sessionId;
object2.card_id = cardId;
object2.product_sku_ids = collectiblesProductUtilsModule.getProductSkuIds(product);
object2.location_stack = analyticsLocations;
object2.position_in_section = tilePosition;
object2.discount_source = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getAnalyticsShopDiscountSource(env0_6);
Reflect.apply(track, defaultImport, [SHOP_CARD_CLICKED, object2]);
return value3;
}
global.__d(_fun78597, 10051, [31, 10052, 661, 10023, 7594, 5134, 683, 5133,
2]) /* metro module 10051, dependencies: [31, 10052, 661, 10023, 7594, 5134, 683, 5133, 2] */;
@@ -1,542 +1,552 @@
/* Metro module 10053; source: modules/collectibles/hooks/useWishlistButtonState.tsx; dependencies: [5, 57, 31, 5189, 6771, 1861, 566, 10034, 10039, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserProfileStore from '../../user_profile/UserProfileStore.tsx'; /* Metro dependency 5189 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
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 StringUtilsModule from '../../../utils/StringUtils.tsx'; /* Metro dependency 1861 */
import * as UseWishlistHooksModule from '../../wishlists/hooks/useWishlistHooks.tsx'; /* Metro dependency 10034 */
function _fun78606(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10239:6, offset: 0x01e2d9fc, size: 169 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const userProfileStore = importDefault(5189) /* metro dependency 5189: UserProfileStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/hooks/useWishlistButtonState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/hooks/useWishlistButtonState.tsx');
exports.useWishlistButtonState = useWishlistButtonState;
}
function useWishlistButtonState({userId, skuId, location, onAddSuccess, onRemoveSuccess, onError}) { // fn#78607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10239:248, offset: 0x01e2daa5, size: 449 bytes, params: 2, frame: 28
const onRemoveSuccess2 = onRemoveSuccess;
const onError2 = onError;
const defaultImport = UseAnalyticsLocations;
const analyticsLocations = defaultImport(StringUtilsModule.isNullOrEmpty(location) ? [] : [location]).analyticsLocations;
const analyticsLocations2 = analyticsLocations;
const firstWishlistId = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
function() {
return UserProfileStore.getFirstWishlistId(userId);
});
const value2 = (UseWishlistHooksModule).useIsSkuInWishlist(firstWishlistId,
skuId);
let binding = analyticsLocations2;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [null]);
const binding2 = onError2;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_7 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_9 = value5[1];
const r3 = property === null ? value2 : property;
binding = analyticsLocations2;
binding.useEffect(_fun78609, [skuId]);
const useCallback = binding.useCallback;
let value = onRemoveSuccess2(_fun78611);
value = Reflect.apply(useCallback, binding, [value, [property2, r3, firstWishlistId, skuId, analyticsLocations,
onAddSuccess, onRemoveSuccess, onError]]);
return {isWishlisted: r3, isBusy: property2, handleToggle: value};
function _fun78609() { // fn#78609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10239:628, offset: 0x01e2dc81, size: 29 bytes, params: 1, frame: 12
env0_7(null);
env0_9(false);
}
function useWishlistButtonState({userId, skuId, location, onAddSuccess, onRemoveSuccess, onError}) { // fn#78607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10239:248, offset: 0x01e2daa5, size: 449 bytes, params: 2, frame: 28
const env0_3 = onRemoveSuccess;
const env0_4 = onError;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const stringUtilsModule = require(1861) /* metro dependency 1861: StringUtils */;
const analyticsLocations = defaultImport(stringUtilsModule.isNullOrEmpty(location) ? [] : [location]).analyticsLocations;
const env0_5 = analyticsLocations;
const firstWishlistId = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserProfileStore],
function() {
return UserProfileStore.getFirstWishlistId(userId);
});
const value2 = (require(10034) /* metro dependency 10034: useWishlistHooks */).useIsSkuInWishlist(firstWishlistId,
skuId);
let binding = env0_5;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_4;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_7 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_9 = value5[1];
const r3 = property === null ? value2 : property;
binding = env0_5;
binding.useEffect(_fun78609, [skuId]);
const useCallback = binding.useCallback;
let value = env0_3(_fun78611);
value = Reflect.apply(useCallback, binding, [value, [property2, r3, firstWishlistId, skuId, analyticsLocations,
onAddSuccess, onRemoveSuccess, onError]]);
return {isWishlisted: r3, isBusy: property2, handleToggle: value};
}
function _fun78609() { // fn#78609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10239:628, offset: 0x01e2dc81, size: 29 bytes, params: 1, frame: 12
env0_7(null);
env0_9(false);
}
function* _fun78611() { // fn#78611, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10239:677, offset: 0x01e2dca9, size: 414 bytes, params: 1, frame: 21
var value;
var value2;
var value3;
var binding;
var binding2;
var property;
var value4;
var addSkuToWishlist;
var value5;
var value6;
var value7;
var value8;
var error;
var value9;
var value10;
var binding3;
var value11;
var removeSkuFromWishlist;
var value12;
var value13;
var value14;
var value15;
var value16;
exceptionLanding60: while (true) {
exceptionLanding32: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = environment.__proto__;
if (!env1_8) {
env1_9(true);
reducibleJoin61: while (true) {
reducibleJoin17: while (true) {
if (env1_10) {
if (UserProfileStore != null) {
env1_7(false);
value10 = environment.__proto__.__proto__;
reducibleJoin36: while (true) {
reduciblePort59: while (true) {
exceptionLanding54: while (true) {
function* _fun78611() { // fn#78611, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10239:677, offset: 0x01e2dca9, size: 414 bytes, params: 1, frame: 21
var value;
var value2;
var userProfileStoreBinding;
var value3;
var binding;
var binding2;
var property;
var value4;
var addSkuToWishlist;
var value5;
var value6;
var value7;
var value8;
var error;
var value9;
var value10;
var binding3;
var value11;
var removeSkuFromWishlist;
var value12;
var value13;
var value14;
var value15;
var value16;
exceptionLanding60: while (true) {
exceptionLanding32: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = environment.__proto__;
if (!env1_8) {
env1_9(true);
reducibleJoin61: while (true) {
reducibleJoin17: while (true) {
if (env1_10) {
userProfileStoreBinding = UserProfileStore;
if (userProfileStoreBinding != null) {
env1_7(false);
value10 = environment.__proto__.__proto__;
reducibleJoin36: while (true) {
reduciblePort59: while (true) {
exceptionLanding54: while (true) {
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
break reducibleJoin36;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding60;
}
try {
value16 = binding == null;
} catch (error) {
break exceptionLanding60;
}
reducibleJoin59: while (true) {
if (value16) {
break reducibleJoin59;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding60;
}
try {
binding(error);
} catch (error) {
break exceptionLanding60;
}
break reducibleJoin59;
}
break reduciblePort59;
}
env1_7(null);
env1_9(false);
break reducibleJoin61;
}
try {
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
property = binding3[8];
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
value11 = binding(property);
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
removeSkuFromWishlist = value11.removeSkuFromWishlist;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
userProfileStoreBinding = UserProfileStore;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
binding = env1_5;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
value12 = Reflect.apply(removeSkuFromWishlist, value11,
[userProfileStoreBinding,
importDefault,
binding]);
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
yield value12;
try {
try {
value13 = undefined;
value14 = false;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
if (value14) {
env1_7(null);
env1_9(false);
return value13;
}
try {
try {
binding = env1_3;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
value15 = binding == null;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
reducibleJoin52: while (true) {
if (value15) {
break reducibleJoin52;
}
try {
try {
binding = env2_1;
binding = env1_3;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
break reducibleJoin36;
try {
try {
binding();
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
break reducibleJoin52;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding60;
}
try {
value16 = binding == null;
} catch (error) {
break exceptionLanding60;
}
reducibleJoin59: while (true) {
if (value16) {
break reducibleJoin59;
env1_7(null);
env1_9(false);
break reducibleJoin61;
}
env1_7(true);
value3 = environment.__proto__.__proto__;
reducibleJoin7: while (true) {
reduciblePort31: while (true) {
exceptionLanding25: while (true) {
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
break reducibleJoin7;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding60;
break exceptionLanding32;
}
try {
binding(error);
value9 = binding == null;
} catch (error) {
break exceptionLanding60;
break exceptionLanding32;
}
break reducibleJoin59;
reducibleJoin31: while (true) {
if (value9) {
break reducibleJoin31;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding32;
}
try {
binding(error);
} catch (error) {
break exceptionLanding32;
}
break reducibleJoin31;
}
break reduciblePort31;
}
break reduciblePort59;
env1_7(null);
env1_9(false);
break reducibleJoin61;
}
env1_7(null);
env1_9(false);
break reducibleJoin61;
try {
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
property = binding2[8];
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
addSkuToWishlist = value4.addSkuToWishlist;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
binding = env1_5;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
value5 = Reflect.apply(addSkuToWishlist, value4, [importDefault, binding]);
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
yield value5;
try {
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
break reducibleJoin17;
}
env1_7(true);
value3 = environment.__proto__.__proto__;
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
binding3 = env2_2;
binding2 = env2_2;
} catch (error) {
break exceptionLanding54;
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding60;
break exceptionLanding32;
}
try {
try {
property = binding3[8];
property = binding2[8];
} catch (error) {
break exceptionLanding54;
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding60;
break exceptionLanding32;
}
try {
try {
value11 = binding(property);
value4 = binding(property);
} catch (error) {
break exceptionLanding54;
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding60;
break exceptionLanding32;
}
try {
try {
removeSkuFromWishlist = value11.removeSkuFromWishlist;
addSkuToWishlist = value4.addSkuToWishlist;
} catch (error) {
break exceptionLanding54;
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding60;
break exceptionLanding32;
}
try {
try {
} catch (error) {
break exceptionLanding54;
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
break exceptionLanding32;
}
try {
try {
binding = env1_5;
} catch (error) {
break exceptionLanding54;
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding60;
break exceptionLanding32;
}
try {
try {
value12 = Reflect.apply(removeSkuFromWishlist, value11, [UserProfileStore,
importDefault,
binding]);
value5 = Reflect.apply(addSkuToWishlist, value4, [importDefault, binding]);
} catch (error) {
break exceptionLanding54;
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding60;
break exceptionLanding32;
}
yield value12;
yield value5;
try {
try {
value13 = undefined;
value14 = false;
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding54;
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding60;
}
if (value14) {
env1_7(null);
env1_9(false);
return value13;
}
try {
try {
binding = env1_3;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
value15 = binding == null;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
reducibleJoin52: while (true) {
if (value15) {
break reducibleJoin52;
}
try {
try {
binding = env1_3;
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
try {
try {
binding();
} catch (error) {
break exceptionLanding54;
}
} catch (error) {
break exceptionLanding60;
}
break reducibleJoin52;
break exceptionLanding32;
}
break reducibleJoin17;
}
if (value7) {
env1_7(null);
env1_9(false);
break reducibleJoin61;
return value6;
}
env1_7(true);
value3 = environment.__proto__.__proto__;
reducibleJoin7: while (true) {
reduciblePort31: while (true) {
exceptionLanding25: while (true) {
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
break reducibleJoin7;
}
try {
try {
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
value8 = dependencyMap == null;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
reducibleJoin23: while (true) {
if (value8) {
break reducibleJoin23;
}
try {
try {
binding = env1_4;
} catch (error) {
break exceptionLanding32;
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
value9 = binding == null;
dependencyMap();
} catch (error) {
break exceptionLanding32;
break exceptionLanding25;
}
reducibleJoin31: while (true) {
if (value9) {
break reducibleJoin31;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding32;
}
try {
binding(error);
} catch (error) {
break exceptionLanding32;
}
break reducibleJoin31;
}
break reduciblePort31;
}
env1_7(null);
env1_9(false);
break reducibleJoin61;
}
try {
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding25;
break exceptionLanding32;
}
} catch (error) {
break exceptionLanding32;
break reducibleJoin23;
}
try {
try {
property = binding2[8];
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
addSkuToWishlist = value4.addSkuToWishlist;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
binding = env1_5;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
value5 = Reflect.apply(addSkuToWishlist, value4, [importDefault, binding]);
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
yield value5;
try {
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
break reducibleJoin17;
env1_7(null);
env1_9(false);
break reducibleJoin61;
}
env1_7(true);
value3 = environment.__proto__.__proto__;
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
property = binding2[8];
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
addSkuToWishlist = value4.addSkuToWishlist;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
binding = env1_5;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
value5 = Reflect.apply(addSkuToWishlist, value4, [importDefault, binding]);
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
yield value5;
try {
try {
value6 = undefined;
value7 = false;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
break reducibleJoin17;
}
if (value7) {
env1_7(null);
env1_9(false);
return value6;
}
try {
try {
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
value8 = dependencyMap == null;
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
reducibleJoin23: while (true) {
if (value8) {
break reducibleJoin23;
}
try {
try {
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
try {
try {
dependencyMap();
} catch (error) {
break exceptionLanding25;
}
} catch (error) {
break exceptionLanding32;
}
break reducibleJoin23;
}
env1_7(null);
env1_9(false);
break reducibleJoin61;
return undefined;
}
env1_7(null);
env1_9(false);
throw error;
}
return undefined;
env1_7(null);
env1_9(false);
throw error;
}
env1_7(null);
env1_9(false);
throw error;
}
env1_7(null);
env1_9(false);
throw error;
}
global.__d(_fun78606, 10053, [5, 57, 31, 5189, 6771, 1861, 566, 10034, 10039,
2]) /* metro module 10053, dependencies: [5, 57, 31, 5189, 6771, 1861, 566, 10034, 10039, 2] */;
@@ -1,53 +1,56 @@
/* Metro module 1905; source: modules/collectibles/nameplates/constants.tsx; dependencies: [1906, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as TypesModule from './types.tsx'; /* Metro dependency 1906 */
function _fun20881(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2032:6, offset: 0x00ede6c9, size: 931 bytes, params: 8, frame: 20
var object2;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
const PaletteKeys = (require(1906) /* metro dependency 1906: types */).PaletteKeys;
object = {};
const PaletteKeys = (TypesModule).PaletteKeys;
const Crimson = PaletteKeys.Crimson;
const Crimson2 = PaletteKeys.Crimson;
object2[Crimson] = {'darkBackground': '#900007', 'lightBackground': '#E7040F', name: Crimson2};
object[Crimson] = {'darkBackground': '#900007', 'lightBackground': '#E7040F', name: Crimson2};
const Berry = PaletteKeys.Berry;
const Berry2 = PaletteKeys.Berry;
object2[Berry] = {'darkBackground': '#893A99', 'lightBackground': '#B11FCF', name: Berry2};
object[Berry] = {'darkBackground': '#893A99', 'lightBackground': '#B11FCF', name: Berry2};
const Sky = PaletteKeys.Sky;
const Sky2 = PaletteKeys.Sky;
object2[Sky] = {'darkBackground': '#0080B7', 'lightBackground': '#56CCFF', name: Sky2};
object[Sky] = {'darkBackground': '#0080B7', 'lightBackground': '#56CCFF', name: Sky2};
const Teal = PaletteKeys.Teal;
const Teal2 = PaletteKeys.Teal;
object2[Teal] = {'darkBackground': '#086460', 'lightBackground': '#7DEED7', name: Teal2};
object[Teal] = {'darkBackground': '#086460', 'lightBackground': '#7DEED7', name: Teal2};
const Forest = PaletteKeys.Forest;
const Forest2 = PaletteKeys.Forest;
object2[Forest] = {'darkBackground': '#2D5401', 'lightBackground': '#6AA624', name: Forest2};
object[Forest] = {'darkBackground': '#2D5401', 'lightBackground': '#6AA624', name: Forest2};
const BubbleGum = PaletteKeys.BubbleGum;
const BubbleGum2 = PaletteKeys.BubbleGum;
object2[BubbleGum] = {'darkBackground': '#DC3E97', 'lightBackground': '#F957B3', name: BubbleGum2};
object[BubbleGum] = {'darkBackground': '#DC3E97', 'lightBackground': '#F957B3', name: BubbleGum2};
const Violet = PaletteKeys.Violet;
const Violet2 = PaletteKeys.Violet;
object2[Violet] = {'darkBackground': '#730BC8', 'lightBackground': '#972FED', name: Violet2};
object[Violet] = {'darkBackground': '#730BC8', 'lightBackground': '#972FED', name: Violet2};
const Cobalt = PaletteKeys.Cobalt;
const Cobalt2 = PaletteKeys.Cobalt;
object2[Cobalt] = {'darkBackground': '#0131C2', 'lightBackground': '#4278FF', name: Cobalt2};
object[Cobalt] = {'darkBackground': '#0131C2', 'lightBackground': '#4278FF', name: Cobalt2};
const Clover = PaletteKeys.Clover;
const Clover2 = PaletteKeys.Clover;
object2[Clover] = {'darkBackground': '#047B20', 'lightBackground': '#63CD5A', name: Clover2};
object[Clover] = {'darkBackground': '#047B20', 'lightBackground': '#63CD5A', name: Clover2};
const Lemon = PaletteKeys.Lemon;
const Lemon2 = PaletteKeys.Lemon;
object2[Lemon] = {'darkBackground': '#F6CD12', 'lightBackground': '#FED400', name: Lemon2};
object[Lemon] = {'darkBackground': '#F6CD12', 'lightBackground': '#FED400', name: Lemon2};
const White = PaletteKeys.White;
const White2 = PaletteKeys.White;
object2[White] = {'darkBackground': '#FFFFFF', 'lightBackground': '#FFFFFF', name: White2};
object[White] = {'darkBackground': '#FFFFFF', 'lightBackground': '#FFFFFF', name: White2};
const Black = PaletteKeys.Black;
const Black2 = PaletteKeys.Black;
object2[Black] = {'darkBackground': '#000000', 'lightBackground': '#000000', name: Black2};
object[Black] = {'darkBackground': '#000000', 'lightBackground': '#000000', name: Black2};
Object = global.Object;
const value = Object.values(object2);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/constants.tsx');
exports.NAMEPLATE_PALETTES = object2;
const value = Object.values(object);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/constants.tsx');
exports.NAMEPLATE_PALETTES = object;
exports.INVALID_PALETTE_KEY = 'invalid_palette';
exports.CUSTOM_PALETTE_KEY = 'custom_palette';
exports.INVALID_NAMEPLATE_PALETTE = {'name': 'invalid_palette', 'darkBackground': '', 'lightBackground': ''};
exports.PaletteMetadata = value;
}
global.__d(_fun20881, 1905, [1906, 2]) /* metro module 1905, dependencies: [1906, 2] */;
@@ -1,23 +1,28 @@
/* Metro module 13222; source: modules/collectibles/nameplates/hooks/useFetchNameplate.tsx; dependencies: [8461, 1904, 1901, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as CollectiblesItemTypeModule from '../../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as UseFetchCollectiblesProductModule from '../../hooks/useFetchCollectiblesProduct.tsx'; /* Metro dependency 8461 */
function _fun100862(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13412:6, offset: 0x021fd610, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/hooks/useFetchNameplate.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/hooks/useFetchNameplate.tsx');
exports.useFetchNameplate = useFetchNameplate;
function useFetchNameplate(a0) { // fn#100863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13412:205, offset: 0x021fd670, size: 188 bytes, params: 2, frame: 17
const value2 = undefined;
const {product,
isFetching} = (UseFetchCollectiblesProductModule).useFetchCollectiblesProduct(a0);
const type = product == null || product.items[0] == null ? value2 : product.items[0].type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
const r4 = type !== NAMEPLATE ? value2 : product.items[0];
const object = {nameplateProduct: product, nameplateRecord: r4};
object.nameplateData = (require(1901) /* metro dependency 1901: utils */).getNameplateData(r4);
object.isFetching = isFetching;
return object;
}
}
function useFetchNameplate(a0) { // fn#100863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13412:205, offset: 0x021fd670, size: 188 bytes, params: 2, frame: 17
const value2 = undefined;
const {product,
isFetching} = (require(8461) /* metro dependency 8461: useFetchCollectiblesProduct */).useFetchCollectiblesProduct(a0);
const type = product == null || product.items[0] == null ? value2 : product.items[0].type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
const r4 = type !== NAMEPLATE ? value2 : product.items[0];
const object2 = {nameplateProduct: product, nameplateRecord: r4};
object2.nameplateData = (require(1901) /* metro dependency 1901: utils */).getNameplateData(r4);
object2.isFetching = isFetching;
return object2;
}
global.__d(_fun100862, 13222, [8461, 1904, 1901, 2]) /* metro module 13222, dependencies: [8461, 1904, 1901, 2] */;
@@ -1,11 +1,14 @@
/* Metro module 12122; source: modules/collectibles/nameplates/hooks/useNameplate.tsx; dependencies: [31, 1945, 566, 1901, 2] */
import GuildMemberStore from '../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
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 */
function _fun93036(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12308:6, offset: 0x020a3e95, size: 133 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/hooks/useNameplate.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/hooks/useNameplate.tsx');
exports.useNameplate = function(a0) {
var user = a0.user;
var env0_0 = user;
@@ -13,28 +16,30 @@ function _fun93036(global, require, importDefault, importAll, module, exports, d
var value2 = require(dependencyMap[2]).useStateFromStores([GuildMemberStore], _fun93038);
return value2.useMemo(_fun93039, [value2, user]);
};
}
function useNameplate({user, guildId}) { // fn#93037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12308:219, offset: 0x020a3f1a, size: 118 bytes, params: 2, frame: 16
const value2 = (FluxModule).useStateFromStores([GuildMemberStore], _fun93038);
return value2.useMemo(_fun93039, [value2, user]);
function _fun93038() { // fn#93038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12308:299, offset: 0x020a3f90, size: 65 bytes, params: 1, frame: 14
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding && value2 != user ? GuildMemberStore.getMember(guildId, user.id) : value2;
}
function useNameplate({user, guildId}) { // fn#93037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12308:219, offset: 0x020a3f1a, size: 118 bytes, params: 2, frame: 16
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun93038);
return value2.useMemo(_fun93039, [value2, user]);
}
function _fun93039() { // fn#93039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12308:365, offset: 0x020a3fd1, size: 107 bytes, params: 1, frame: 16
var value2;
var value3;
var moduleValue;
if (user != null) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(1901) /* metro dependency 1901: utils */;
return moduleValue.getNameplateData(ReactModule == null || ReactModule.collectibles == null ? value3 : ReactModule.collectibles.nameplate) ?? user.nameplate;
}
}
function _fun93038() { // fn#93038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12308:299, offset: 0x020a3f90, size: 65 bytes, params: 1, frame: 14
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding && value2 != user ? GuildMemberStore.getMember(guildId, user.id) : value2;
}
function _fun93039() { // fn#93039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12308:365, offset: 0x020a3fd1, size: 107 bytes, params: 1, frame: 16
var value2;
var value3;
var moduleValue;
if (user != null) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(1901) /* metro dependency 1901: utils */;
return moduleValue.getNameplateData(env0_2 == null || env0_2.collectibles == null ? value3 : env0_2.collectibles.nameplate) ?? user.nameplate;
}
}
global.__d(_fun93036, 12122, [31, 1945, 566, 1901,
2]) /* metro module 12122, dependencies: [31, 1945, 566, 1901, 2] */;
@@ -1,116 +1,127 @@
/* Metro module 13225; source: modules/collectibles/nameplates/native/EditNameplateSection.tsx; dependencies: [31, 27, 1902, 33, 4501, 8409, 13224, 8410, 6789, 1901, 8483, 2] */
import Nameplate from './Nameplate.tsx'; /* Metro dependency 8483 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as UtilsModule from '../utils.tsx'; /* Metro dependency 1901 */
import * as NameplateRecordModule from '../../records/NameplateRecord.tsx'; /* Metro dependency 1902 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseCollectibleListLayoutModule from '../../native/useCollectibleListLayout.tsx'; /* Metro dependency 8409 */
import * as CollectiblesEditUserProfileListItemsModule from '../../native/CollectiblesEditUserProfileListItems.tsx'; /* Metro dependency 8410 */
import * as UseNameplateSectionsModule from '../useNameplateSections.tsx'; /* Metro dependency 13224 */
function _fun100881(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13415:6, offset: 0x021fe675, size: 368 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(1902) /* metro dependency 1902: NameplateRecord */).isNameplateRecord;
const value2 = require(33) /* metro dependency 33 */;
const env0_6 = value2.jsx;
const env0_7 = value2.Fragment;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const GUTTER_SIZE = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).GUTTER_SIZE;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{row: {'flexDirection': 'row',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const GUTTER_SIZE = (UseCollectibleListLayoutModule).GUTTER_SIZE;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [{row: {'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'space-between', paddingHorizontal: GUTTER_SIZE},
rowSpacer: {height: GUTTER_SIZE}, nameplate: {overflow: 'hidden'}}]);
const value4 = value.memo(_fun100882);
value4.displayName = 'EditNameplateRow';
value = value.memo(_fun100885);
value.displayName = 'EditNameplateItem';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/native/EditNameplateSection.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/native/EditNameplateSection.tsx');
exports.EditNameplateRow = value4;
}
function _fun100882({items, selectedSkuId, setSelectedNameplate, guildId, size}) { // fn#100882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13415:409, offset: 0x021fe7e5, size: 269 bytes, params: 2, frame: 25
const styles = useStyles();
const env0_4 = size.useCallback(function() {
setSelectedNameplate(null);
}, [setSelectedNameplate]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const items2 = [];
const value2 = arraySpread(items2, items, 0, undefined);
items2[value2] = null;
items2[value2 + 1] = null;
const slice = items2.slice;
const ROW_SIZE = (require(8409) /* metro dependency 8409: useCollectibleListLayout */).ROW_SIZE;
let value = Reflect.apply(slice, items2, [0, ROW_SIZE]);
value = <View style={styles.row}>{value.map(_fun100884)}</View>;
return (
<>
{value}
<View style={styles.rowSpacer} />
</>
);
}
function _fun100885({nameplate, isSelected, setSelectedNameplate, size}) { // fn#100885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13415:1126, offset: 0x021fea62, size: 257 bytes, params: 2, frame: 22
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useMemo(_fun100886, [nameplate]);
const value3 = binding.useCallback(function() {
setSelectedNameplate(nameplate);
}, [setSelectedNameplate, nameplate]);
const EditCollectiblesListItemProduct = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemProduct;
return (
<EditCollectiblesListItemProduct
skuId={nameplate.skuId}
isSelected={isSelected}
onPress={value3}
size={size}
accessibilityLabel={nameplate.label}
>
{((Component) => <Component nameplate={value2} fullOpacity isSquarePreview style={[styles.nameplate,
{borderRadius: 6}]} />)(importDefault(8483) /* metro dependency 8483: Nameplate */)}
</EditCollectiblesListItemProduct>
);
}
function _fun100884(a0, a1) { // fn#100884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13415:622, offset: 0x021fe8f2, size: 368 bytes, params: 3, frame: 20
var selectedSkuIdBinding;
var skuId;
var binding;
const NONE_ITEM = (require(13224) /* metro dependency 13224: useNameplateSections */).NONE_ITEM;
if (a0 === NONE_ITEM) {
const EditCollectiblesListItemNone = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemNone;
return (
<EditCollectiblesListItemNone
size={size}
onPress={env0_4}
isSelected={selectedSkuId == null}
asDefault={guildId != null}
key="none"
/>
function _fun100882({items, selectedSkuId, setSelectedNameplate, guildId, size}) { // fn#100882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13415:409, offset: 0x021fe7e5, size: 269 bytes, params: 2, frame: 25
const styles = useStyles();
const env0_4 = size.useCallback(function() {
setSelectedNameplate(null);
}, [setSelectedNameplate]);
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const items2 = [];
const value2 = arraySpread(items2, items, 0, undefined);
items2[value2] = null;
items2[value2 + 1] = null;
const slice = items2.slice;
const ROW_SIZE = (UseCollectibleListLayoutModule).ROW_SIZE;
let value = Reflect.apply(slice, items2, [0, ROW_SIZE]);
value = (
<View style={styles.row}>
{value.map(_fun100884)}
</View>
);
}
const SHOP_ITEM = (require(13224) /* metro dependency 13224: useNameplateSections */).SHOP_ITEM;
if (a0 === SHOP_ITEM) {
const EditCollectiblesListItemShop = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemShop;
return (
<EditCollectiblesListItemShop
size={size}
analyticsSource={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_NAMEPLATE_SHEET}
key="shop"
/>
<>
{value}
<View style={styles.rowSpacer} />
</>
);
function _fun100884(a0, a1) { // fn#100884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13415:622, offset: 0x021fe8f2, size: 368 bytes, params: 3, frame: 20
var selectedSkuIdBinding;
var skuId;
var binding;
const NONE_ITEM = (UseNameplateSectionsModule).NONE_ITEM;
if (a0 === NONE_ITEM) {
const EditCollectiblesListItemNone = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemNone;
return (
<EditCollectiblesListItemNone
size={size}
onPress={env0_4}
isSelected={selectedSkuId == null}
asDefault={guildId != null}
key="none"
/>
);
}
const SHOP_ITEM = (UseNameplateSectionsModule).SHOP_ITEM;
if (a0 === SHOP_ITEM) {
const EditCollectiblesListItemShop = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemShop;
return (
<EditCollectiblesListItemShop
size={size}
analyticsSource={(importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EDIT_NAMEPLATE_SHEET}
key="shop"
/>
);
}
if (isNameplateRecord(a0)) {
selectedSkuIdBinding = selectedSkuId;
skuId = a0.skuId;
binding = env1_10;
var bindingProps = {nameplate: a0, isSelected: selectedSkuIdBinding === skuId,
setSelectedNameplate: setSelectedNameplate, size: size};
skuId = a0.skuId;
return ((Component) => <Component {...bindingProps} key={skuId} />)(binding);
}
const sizeBinding = size;
return <View style={{height: sizeBinding, width: sizeBinding}} key={a1} />;
}
}
if (isNameplateRecord(a0)) {
selectedSkuIdBinding = selectedSkuId;
skuId = a0.skuId;
binding = env1_10;
var bindingProps = {nameplate: a0, isSelected: selectedSkuIdBinding === skuId,
setSelectedNameplate: setSelectedNameplate, size: size};
skuId = a0.skuId;
return ((Component) => <Component {...bindingProps} key={skuId} />)(binding);
function _fun100885({nameplate, isSelected, setSelectedNameplate, size}) { // fn#100885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13415:1126, offset: 0x021fea62, size: 257 bytes, params: 2, frame: 22
const styles = useStyles();
const binding = env0_3;
const value2 = binding.useMemo(_fun100886, [nameplate]);
const value3 = binding.useCallback(function() {
setSelectedNameplate(nameplate);
}, [setSelectedNameplate, nameplate]);
const EditCollectiblesListItemProduct = (CollectiblesEditUserProfileListItemsModule).EditCollectiblesListItemProduct;
return (
<EditCollectiblesListItemProduct
skuId={nameplate.skuId}
isSelected={isSelected}
onPress={value3}
size={size}
accessibilityLabel={nameplate.label}
>
{((Component) => <Component nameplate={value2} fullOpacity isSquarePreview style={[styles.nameplate,
{borderRadius: 6}]} />)(Nameplate)}
</EditCollectiblesListItemProduct>
);
function _fun100886() { // fn#100886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13415:1210, offset: 0x021feb63, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (UtilsModule).getNameplateData(nameplate);
}
}
const sizeBinding = size;
return <View style={{height: sizeBinding, width: sizeBinding}} key={a1} />;
}
function _fun100886() { // fn#100886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13415:1210, offset: 0x021feb63, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(1901) /* metro dependency 1901: utils */).getNameplateData(nameplate);
}
global.__d(_fun100881, 13225, [31, 27, 1902, 33, 4501, 8409, 13224, 8410, 6789, 1901, 8483,
2]) /* metro module 13225, dependencies: [31, 27, 1902, 33, 4501, 8409, 13224, 8410, 6789, 1901, 8483, 2] */;
@@ -1,17 +1,136 @@
/* Metro module 8483; source: modules/collectibles/nameplates/native/Nameplate.tsx; dependencies: [31, 4502, 33, 4501, 566, 4048, 4017, 4504, 1901, 8484, 4589, 477, 7897, 5475, 2] */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseTheme from '../../../../hooks/useTheme.tsx'; /* Metro dependency 4048 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
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 JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as UtilsModule from '../utils.tsx'; /* Metro dependency 1901 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NameplateUtilsModule from './NameplateUtils.tsx'; /* Metro dependency 8484 */
function _fun67328(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:6, offset: 0x01c1e520, size: 227 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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67329);
const env0_7 = (CreateStylesModule).createStyles(_fun67329);
object = {code: 'function NameplateTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/native/Nameplate.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/native/Nameplate.tsx');
exports.default = _default_67334;
function NameplateInner({nameplate, isPressed, isFocused, isMuted, fullOpacity, isSquarePreview, invertPressOpacity, fadeIn, animate, style}) { // fn#67330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:592, offset: 0x01c1e6f2, size: 807 bytes, params: 2, frame: 31
var r5;
var r7;
var defaultImport;
var value12;
isPressed = !(isPressed === undefined) && isPressed;
isFocused = !(isFocused === undefined) && isFocused;
isMuted = !(isMuted === undefined) && isMuted;
fullOpacity = !(fullOpacity === undefined) && fullOpacity;
isSquarePreview = !(isSquarePreview === undefined) && isSquarePreview;
invertPressOpacity = !(invertPressOpacity === undefined) && invertPressOpacity;
fadeIn = !(fadeIn === undefined) && fadeIn;
animate = !(animate === undefined) && animate;
var value;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const styles = useStyles(fullOpacity, isPressed, isFocused, isMuted, invertPressOpacity);
const value2 = (UseTheme)();
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(fadeIn ? 0 : 1);
ReactModule.useEffect(_fun67332, [value5, fadeIn]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const NameplateInnerJ2 = NameplateInnerJ;
NameplateInnerJ2.__closure = {opacity: value5};
NameplateInnerJ2.__workletHash = 15588901070870;
NameplateInnerJ2.__initData = env0_8;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [NameplateInnerJ2]);
const backgroundGradientColors = (UtilsModule).getBackgroundGradientColors(nameplate.palette,
value2);
const {staticImageUrl,
animatedImageUrl} = (NameplateUtilsModule).getNameplateAssets(nameplate);
const r10 = (animate && !useReducedMotion ? animatedImageUrl : staticImageUrl) ?? '';
const View = (ReanimatedRexport).View;
const items2 = [styles.container, style, value6];
if (backgroundGradientColors != null) {
defaultImport = importDefault(4589) /* metro dependency 4589 */;
value12 = 0;
r7 = ((Component) => <Component style={styles.gradient} start={{x: isSquarePreview ? -2 : value12,
y: value12}} end={{'x': 1, 'y': 0}} colors={[backgroundGradientColors.left,
backgroundGradientColors.right]} />)(defaultImport);
} else {
r7 = null;
}
if (PlatformUtilsModule.isAndroid()) {
if (r5) {
const APNGPlayer = (require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer;
r5 = (
<APNGPlayer
url={r10}
style={styles.img}
autoplay
/>
);
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: r10}} style={styles.img} accessibilityRole="image" />)(value);
r5 = value;
}
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: r10}} style={styles.img} accessibilityRole="image" />)(value);
r5 = value;
}
return (
<View style={items2}>
{r7}
{r5}
</View>
);
function _fun67332() { // fn#67332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:885, offset: 0x01c1ea19, size: 131 bytes, params: 1, frame: 20
var binding;
var set;
var withTiming;
var object;
var value;
if (fadeIn) {
binding = env0_1;
set = binding.set;
value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
withTiming = value.withTiming;
object = {duration: 100};
object.easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.in((require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease);
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, object])]);
}
}
function NameplateInnerJ() { // fn#67333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:1029, owner: NameplateInner.j, offset: 0x01c1ea9c, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_1.get();
return object;
}
}
function _default_67334(a0) { // fn#67334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:1610, offset: 0x01c1eab4, size: 89 bytes, params: 2, frame: 16
var r0;
const nameplate = a0.nameplate;
const value = null;
const value2 = Object.create(value);
value2.nameplate = 0;
if (value == nameplate) {
r0 = value;
} else {
var nameplateInnerBindingProps = {nameplate: nameplate, ...copyDataProperties({}, a0, value2, nameplate)};
nameplateInnerBindingProps['aria-hidden'] = true;
r0 = <NameplateInner {...nameplateInnerBindingProps} />;
}
return r0;
}
}
function _fun67329(a0, a1, a2, a3, a4) { // fn#67329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:167, offset: 0x01c1e603, size: 239 bytes, params: 6, frame: 13
@@ -23,105 +142,5 @@ function _fun67329(a0, a1, a2, a3, a4) { // fn#67329, source: /ci/build/discord/
opacity: a0 ? value : a3 ? a2 ? a1 ? a4 ? 0.4 : 0.5 : a2 ? 0.8 : 0.6 : 0.1 : a1 ? a4 ? 0.4 : 0.5 : a2 ? 0.8 : 0.6}};
}
function NameplateInner({nameplate, isPressed, isFocused, isMuted, fullOpacity, isSquarePreview, invertPressOpacity, fadeIn, animate, style}) { // fn#67330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:592, offset: 0x01c1e6f2, size: 807 bytes, params: 2, frame: 31
var r5;
var r7;
var defaultImport;
var value12;
isPressed = !(isPressed === undefined) && isPressed;
isFocused = !(isFocused === undefined) && isFocused;
isMuted = !(isMuted === undefined) && isMuted;
fullOpacity = !(fullOpacity === undefined) && fullOpacity;
isSquarePreview = !(isSquarePreview === undefined) && isSquarePreview;
invertPressOpacity = !(invertPressOpacity === undefined) && invertPressOpacity;
fadeIn = !(fadeIn === undefined) && fadeIn;
animate = !(animate === undefined) && animate;
var value;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const styles = useStyles(fullOpacity, isPressed, isFocused, isMuted, invertPressOpacity);
const value2 = (importDefault(4048) /* metro dependency 4048: useTheme */)();
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(fadeIn ? 0 : 1);
env0_3.useEffect(_fun67332, [value5, fadeIn]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = NameplateInnerJ;
closure.__closure = {opacity: value5};
closure.__workletHash = 15588901070870;
closure.__initData = env0_8;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const backgroundGradientColors = (require(1901) /* metro dependency 1901: utils */).getBackgroundGradientColors(nameplate.palette,
value2);
const {staticImageUrl,
animatedImageUrl} = (require(8484) /* metro dependency 8484: NameplateUtils */).getNameplateAssets(nameplate);
const r10 = (animate && !useReducedMotion ? animatedImageUrl : staticImageUrl) ?? '';
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.container, style, value6];
if (backgroundGradientColors != null) {
defaultImport = importDefault(4589) /* metro dependency 4589 */;
value12 = 0;
r7 = ((Component) => <Component style={styles.gradient} start={{x: isSquarePreview ? -2 : value12,
y: value12}} end={{'x': 1, 'y': 0}} colors={[backgroundGradientColors.left,
backgroundGradientColors.right]} />)(defaultImport);
} else {
r7 = null;
}
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
if (platformUtilsModule.isAndroid()) {
if (r5) {
const APNGPlayer = (require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer;
r5 = <APNGPlayer url={r10} style={styles.img} autoplay />;
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: r10}} style={styles.img} accessibilityRole="image" />)(value);
r5 = value;
}
} else {
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: r10}} style={styles.img} accessibilityRole="image" />)(value);
r5 = value;
}
return (
<View style={items2}>
{r7}
{r5}
</View>
);
}
function _default_67334(a0) { // fn#67334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:1610, offset: 0x01c1eab4, size: 89 bytes, params: 2, frame: 16
var r0;
const nameplate = a0.nameplate;
const value = null;
const value2 = Object.create(value);
value2.nameplate = 0;
if (value == nameplate) {
r0 = value;
} else {
var nameplateInnerBindingProps = {nameplate: nameplate, ...copyDataProperties({}, a0, value2, nameplate)};
nameplateInnerBindingProps['aria-hidden'] = true;
r0 = <NameplateInner {...nameplateInnerBindingProps} />;
}
return r0;
}
function _fun67332() { // fn#67332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8668:885, offset: 0x01c1ea19, size: 131 bytes, params: 1, frame: 20
var binding;
var set;
var withTiming;
var object2;
var value;
if (fadeIn) {
binding = env0_1;
set = binding.set;
value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
withTiming = value.withTiming;
object2 = {duration: 100};
object2.easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.in((require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing.ease);
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, object2])]);
}
}
global.__d(_fun67328, 8483, [31, 4502, 33, 4501, 566, 4048, 4017, 4504, 1901, 8484, 4589, 477, 7897, 5475,
2]) /* metro module 8483, dependencies: [31, 4502, 33, 4501, 566, 4048, 4017, 4504, 1901, 8484, 4589, 477, 7897, 5475, 2] */;
@@ -1,56 +1,103 @@
/* Metro module 10050; source: modules/collectibles/nameplates/native/NameplateCardPreview.tsx; dependencies: [27, 33, 4501, 697, 44, 1904, 1901, 8482, 1305, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UtilsModule from '../utils.tsx'; /* Metro dependency 1901 */
import * as CollectiblesItemTypeModule from '../../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as NameplateDummyUserPreviewModule from './NameplateDummyUserPreview.tsx'; /* Metro dependency 8482 */
function _fun78595(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10236:6, offset: 0x01e2d16a, size: 322 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.nameplatePreviewContainer = {'position': 'absolute', 'justifyContent': 'center', 'alignItems': 'center',
object.nameplatePreviewContainer = {'position': 'absolute', 'justifyContent': 'center', 'alignItems': 'center',
'width': '100%', 'height': '100%', paddingHorizontal: PX_8};
const object4 = {width: '100%'};
const object3 = {width: '100%'};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object4.backgroundColor = BACKGROUND_BASE_LOWER;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.nameplateContainer = object4;
object3.backgroundColor = BACKGROUND_BASE_LOWER;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.nameplateContainer = object3;
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.nameplate = {backgroundColor: BACKGROUND_MOD_MUTED};
const env0_6 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/native/NameplateCardPreview.tsx');
object.nameplate = {backgroundColor: BACKGROUND_MOD_MUTED};
const env0_6 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/native/NameplateCardPreview.tsx');
exports.default = _default_78596;
function _default_78596({item, animate}) { // fn#78596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10236:510, offset: 0x01e2d2ac, size: 619 bytes, params: 2, frame: 27
animate = !(animate === undefined) && animate;
const styles = useStyles();
const defaultImport = Module00044;
const type = item.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
defaultImport(type === NAMEPLATE, 'Item must be Nameplate');
const nameplateData = (UtilsModule).getNameplateData(item);
const NameplateDummyUserPreview = (NameplateDummyUserPreviewModule).NameplateDummyUserPreview;
const AvatarSizes = (NativeModule).AvatarSizes;
let XSMALL = AvatarSizes.XSMALL;
const items2 = [
<NameplateDummyUserPreview
width={34}
avatarSize={XSMALL}
hideAvatar
style={[{opacity: 0.6}]}
/>,
];
XSMALL = AvatarSizes.XSMALL;
items2[1] = (
<NameplateDummyUserPreview
width={44}
avatarSize={XSMALL}
hideAvatar
style={[{opacity: 0.6}]}
/>
);
XSMALL = AvatarSizes.XSMALL;
items2[2] = (
<View style={styles.nameplateContainer}>
<NameplateDummyUserPreview
width={54}
avatarSize={XSMALL}
nameplate={nameplateData}
style={styles.nameplate}
animate={animate}
/>
</View>
);
XSMALL = AvatarSizes.XSMALL;
items2[3] = (
<NameplateDummyUserPreview
width={44}
avatarSize={XSMALL}
hideAvatar
style={[{opacity: 0.6}]}
/>
);
XSMALL = AvatarSizes.XSMALL;
items2[4] = (
<NameplateDummyUserPreview
width={34}
avatarSize={XSMALL}
hideAvatar
style={[{opacity: 0.6}]}
/>
);
return (
<View style={styles.nameplatePreviewContainer}>
{items2}
</View>
);
}
}
function _default_78596({item, animate}) { // fn#78596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10236:510, offset: 0x01e2d2ac, size: 619 bytes, params: 2, frame: 27
animate = !(animate === undefined) && animate;
const styles = useStyles();
const defaultImport = importDefault(44) /* metro dependency 44 */;
const type = item.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
defaultImport(type === NAMEPLATE, 'Item must be Nameplate');
const nameplateData = (require(1901) /* metro dependency 1901: utils */).getNameplateData(item);
const NameplateDummyUserPreview = (require(8482) /* metro dependency 8482: NameplateDummyUserPreview */).NameplateDummyUserPreview;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
let XSMALL = AvatarSizes.XSMALL;
const items2 = [<NameplateDummyUserPreview width={34} avatarSize={XSMALL} hideAvatar style={[{opacity: 0.6}]} />];
XSMALL = AvatarSizes.XSMALL;
items2[1] = <NameplateDummyUserPreview width={44} avatarSize={XSMALL} hideAvatar style={[{opacity: 0.6}]} />;
XSMALL = AvatarSizes.XSMALL;
items2[2] = <View style={styles.nameplateContainer}><NameplateDummyUserPreview width={54} avatarSize={XSMALL} nameplate={nameplateData} style={styles.nameplate} animate={animate} /></View>;
XSMALL = AvatarSizes.XSMALL;
items2[3] = <NameplateDummyUserPreview width={44} avatarSize={XSMALL} hideAvatar style={[{opacity: 0.6}]} />;
XSMALL = AvatarSizes.XSMALL;
items2[4] = <NameplateDummyUserPreview width={34} avatarSize={XSMALL} hideAvatar style={[{opacity: 0.6}]} />;
return (
<View style={styles.nameplatePreviewContainer}>
{items2}
</View>
);
}
global.__d(_fun78595, 10050, [27, 33, 4501, 697, 44, 1904, 1901, 8482, 1305,
2]) /* metro module 10050, dependencies: [27, 33, 4501, 697, 44, 1904, 1901, 8482, 1305, 2] */;
@@ -1,87 +1,98 @@
/* Metro module 8482; source: modules/collectibles/nameplates/native/NameplateDummyUserPreview.tsx; dependencies: [31, 27, 1310, 33, 1305, 697, 4501, 566, 3866, 8483, 8485, 8486, 2] */
import ThemeStore from '../../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun67324(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8667:6, offset: 0x01c1e071, size: 442 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
object4 = {};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
ReactModule;
object = {};
const AvatarSizes = (NativeModule).AvatarSizes;
const XSMALL_20 = AvatarSizes.XSMALL_20;
const object5 = {};
const object2 = {};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.padding = PX_4;
object2.padding = PX_4;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.avatarMarginRight = PX_4;
object5.placeholderBarHeight = 6;
object4[XSMALL_20] = object5;
object2.avatarMarginRight = PX_4;
object2.placeholderBarHeight = 6;
object[XSMALL_20] = object2;
const XSMALL = AvatarSizes.XSMALL;
object4[XSMALL] = {'padding': 6, 'avatarMarginRight': 6, 'placeholderBarHeight': 8};
object[XSMALL] = {'padding': 6, 'avatarMarginRight': 6, 'placeholderBarHeight': 8};
const NORMAL = AvatarSizes.NORMAL;
const object6 = {};
const object3 = {};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.padding = PX_8;
object3.padding = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.avatarMarginRight = PX_8;
object6.placeholderBarHeight = 14;
object4[NORMAL] = object6;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67325);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/native/NameplateDummyUserPreview.tsx');
exports.NAMEPLATE_DUMMY_USER_PREVIEW_CONFIG = object4;
object3.avatarMarginRight = PX_8;
object3.placeholderBarHeight = 14;
object[NORMAL] = object3;
const env0_8 = (CreateStylesModule).createStyles(_fun67325);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/native/NameplateDummyUserPreview.tsx');
exports.NAMEPLATE_DUMMY_USER_PREVIEW_CONFIG = object;
exports.NameplateDummyUserPreview = NameplateDummyUserPreview;
function _fun67325(a0, a1) { // fn#67325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8667:508, offset: 0x01c1e22b, size: 297 bytes, params: 3, frame: 18
const property = env0_7[a0];
const object = {};
const object2 = {'padding': null, 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'flex-start',
'width': '100%', 'position': 'relative'};
object2.padding = property.padding;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.container = object2;
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.marginRight = property.avatarMarginRight;
let BORDER_STRONG = a1 ? (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG : 'transparent';
object3.backgroundColor = BORDER_STRONG;
object.avatarContainer = object3;
object.avatar = {opacity: a1 ? 0 : 0.5};
const object5 = {};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object5.height = property.placeholderBarHeight;
BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object5.backgroundColor = BORDER_STRONG;
object.placeholderBar = object5;
const object6 = {};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.nameplate = object6;
return object;
}
function NameplateDummyUserPreview({width, hideAvatar, avatarSize = require(dependencyMap[4]).AvatarSizes.NORMAL, nameplate, style, animate}) { // fn#67326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8667:1202, offset: 0x01c1e354, size: 412 bytes, params: 2, frame: 27
hideAvatar = !(hideAvatar === undefined) && hideAvatar;
animate = !(animate === undefined) && animate;
const styles = useStyles(avatarSize, hideAvatar);
const value2 = require(dependencyMap[7]).useStateFromStores([ThemeStore], function() {
return require(dependencyMap[8]).isThemeDark(ThemeStore.theme);
});
const items3 = [styles.container, style];
const items2 = [
((Component) => <Component nameplate={nameplate} fullOpacity style={styles.nameplate} animate={animate} />)(importDefault(dependencyMap[9])),
];
const Avatar = require(dependencyMap[4]).Avatar;
const avatarProps = {source: importDefault(value2 ? dependencyMap[10] : dependencyMap[11]), size: avatarSize};
avatarProps['aria-hidden'] = true;
avatarProps.style = styles.avatar;
items2[1] = (
<View style={styles.avatarContainer}>
<Avatar {...avatarProps} />
</View>
);
items2[2] = <View style={[styles.placeholderBar, {width: width}]} />;
return (
<View style={items3}>
{items2}
</View>
);
}
}
function _fun67325(a0, a1) { // fn#67325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8667:508, offset: 0x01c1e22b, size: 297 bytes, params: 3, frame: 18
const property = env0_7[a0];
const object4 = {};
const object7 = {'padding': null, 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'flex-start',
'width': '100%', 'position': 'relative'};
object7.padding = property.padding;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.container = object7;
const object8 = {};
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object8.marginRight = property.avatarMarginRight;
let BORDER_STRONG = a1 ? (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG : 'transparent';
object8.backgroundColor = BORDER_STRONG;
object4.avatarContainer = object8;
object4.avatar = {opacity: a1 ? 0 : 0.5};
const object9 = {};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object9.height = property.placeholderBarHeight;
BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object9.backgroundColor = BORDER_STRONG;
object4.placeholderBar = object9;
const object10 = {};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.nameplate = object10;
return object4;
}
function NameplateDummyUserPreview({width, hideAvatar, avatarSize = require(dependencyMap[4]).AvatarSizes.NORMAL, nameplate, style, animate}) { // fn#67326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8667:1202, offset: 0x01c1e354, size: 412 bytes, params: 2, frame: 27
hideAvatar = !(hideAvatar === undefined) && hideAvatar;
animate = !(animate === undefined) && animate;
const styles = useStyles(avatarSize, hideAvatar);
const value2 = require(dependencyMap[7]).useStateFromStores([ThemeStore], function() {
return require(dependencyMap[8]).isThemeDark(ThemeStore.theme);
});
const items3 = [styles.container, style];
const items2 = [((Component) => <Component nameplate={nameplate} fullOpacity style={styles.nameplate} animate={animate} />)(importDefault(dependencyMap[9]))];
const Avatar = require(dependencyMap[4]).Avatar;
const avatarProps = {source: importDefault(value2 ? dependencyMap[10] : dependencyMap[11]), size: avatarSize};
avatarProps['aria-hidden'] = true;
avatarProps.style = styles.avatar;
items2[1] = <View style={styles.avatarContainer}><Avatar {...avatarProps} /></View>;
items2[2] = <View style={[styles.placeholderBar, {width: width}]} />;
return (
<View style={items3}>
{items2}
</View>
);
}
global.__d(_fun67324, 8482, [31, 27, 1310, 33, 1305, 697, 4501, 566, 3866, 8483, 8485, 8486,
2]) /* metro module 8482, dependencies: [31, 27, 1310, 33, 1305, 697, 4501, 566, 3866, 8483, 8485, 8486, 2] */;
@@ -1,99 +1,119 @@
/* Metro module 10507; source: modules/collectibles/nameplates/native/NameplatePreview.tsx; dependencies: [31, 27, 4502, 1945, 33, 4501, 697, 1901, 4618, 8398, 566, 3995, 4635, 1305, 8483, 8696, 8697, 4573, 2] */
import GuildMemberStore from '../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseDisplayNameStyles from '../../../display_name_styles/hooks/useDisplayNameStyles.tsx'; /* Metro dependency 4635 */
import UsePendingAvatarSettings from '../../../user_profile/hooks/usePendingAvatarSettings.tsx'; /* Metro dependency 8398 */
import Nameplate from './Nameplate.tsx'; /* Metro dependency 8483 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseAvatarDecorationModule from '../../avatar_decorations/useAvatarDecoration.tsx'; /* Metro dependency 4618 */
function _fun81230(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10693:6, offset: 0x01e9f56b, size: 237 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 env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun81231);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/native/NameplatePreview.tsx');
const env0_9 = (CreateStylesModule).createStyles(_fun81231);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/native/NameplatePreview.tsx');
exports.NameplatePreview = NameplatePreview_81232;
function _fun81231(a0) { // fn#81231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10693:192, offset: 0x01e9f658, size: 281 bytes, params: 2, frame: 18
const object = {};
const object2 = {'borderRadius': null, 'padding': null, 'flexDirection': 'row', 'alignItems': 'center',
'width': '100%'};
const value = 0;
object2.borderRadius = a0 ? (importDefault(697) /* metro dependency 697: native */).radii.sm : value;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.padding = PX_8;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
object.container = object2;
object.nameplate = {borderRadius: a0 ? (importDefault(697) /* metro dependency 697: native */).radii.sm : value};
const object4 = {};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.marginRight = PX_8;
object.avatar = object4;
const PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
object.content = {flex: 1, paddingRight: PX_40};
return object;
}
function NameplatePreview_81232(a0) { // fn#81232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10693:663, offset: 0x01e9f771, size: 813 bytes, params: 2, frame: 31
const nameplate = a0.nameplate;
const nameplateData = a0.nameplateData;
const user = a0.user;
let hasRoundedCorners = a0.hasRoundedCorners;
const value = undefined;
hasRoundedCorners = hasRoundedCorners === value || hasRoundedCorners;
let animate = a0.animate;
animate = !(animate === value) && animate;
const guildId = a0.guildId;
const pendingDisplayNameStyles = a0.pendingDisplayNameStyles;
const pendingGlobalName = a0.pendingGlobalName;
const property = a0['aria-hidden'];
const styles = useStyles(hasRoundedCorners);
const r17 = nameplate == null ? nameplateData : (require(1901) /* metro dependency 1901: utils */).getNameplateData(nameplate);
const value6 = (UseAvatarDecorationModule).useAvatarDecoration(user, guildId);
const pendingAvatarDecoration = (UsePendingAvatarSettings)({guildId: guildId}).pendingAvatarDecoration;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const useReducedMotion2 = useReducedMotion;
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun81234);
const r11 = pendingGlobalName ?? (guildId == null || (value7 == null ? value : value7.nick) == null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user) : value7 == null ? value : value7.nick);
const r19 = value === pendingAvatarDecoration ? value6 : pendingAvatarDecoration;
const value9 = (UseDisplayNameStyles)({userId: user.id,
guildId: guildId, pendingDisplayNameStyles: pendingDisplayNameStyles});
const value10 = useReducedMotion2.useMemo(_fun81235, [styles.avatar, user, guildId, r19, useReducedMotion]);
object = {style: styles.container};
object['aria-hidden'] = property;
const items2 = [
((Component) => <Component nameplate={r17} style={styles.nameplate} fullOpacity animate={animate} />)(Nameplate),
];
items2[1] = (
<View style={styles.avatar}>
{value10}
</View>
);
items2[2] = (
<View style={styles.content}>
{value9 != null && ((Component) => <Component userId={user.id} guildId={guildId} userName={r11} variant="text-md/semibold" effectDisplayType={(require(8697) /* metro dependency 8697: types */).EffectDisplayType.STATIC} lineClamp={1} pendingDisplayNameStyles={pendingDisplayNameStyles} />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */)}
{value9 == null && ((Text) => <Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{r11}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
return (
<View {...object}>
{items2}
</View>
);
function _fun81234() { // fn#81234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10693:1041, offset: 0x01e9fa9e, size: 65 bytes, params: 1, frame: 14
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding && value2 != user ? GuildMemberStore.getMember(guildId, user.id) : value2;
}
function _fun81235() { // fn#81235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10693:1279, offset: 0x01e9fadf, size: 136 bytes, params: 1, frame: 18
const Avatar = (NativeModule).Avatar;
const avatarProps = {style: styles.avatar, user: user, guildId: guildId};
const AvatarSizes = (NativeModule).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
avatarProps.size = NORMAL;
avatarProps.avatarDecoration = ReactNativeModule.View;
avatarProps.animate = !useReducedMotion;
avatarProps.autoStatusCutout = true;
avatarProps['aria-hidden'] = true;
return <Avatar {...avatarProps} />;
}
}
}
function _fun81231(a0) { // fn#81231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10693:192, offset: 0x01e9f658, size: 281 bytes, params: 2, frame: 18
const object3 = {};
const object5 = {'borderRadius': null, 'padding': null, 'flexDirection': 'row', 'alignItems': 'center',
'width': '100%'};
const value = 0;
object5.borderRadius = a0 ? (importDefault(697) /* metro dependency 697: native */).radii.sm : value;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.padding = PX_8;
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object5.backgroundColor = BACKGROUND_BASE_LOWEST;
object3.container = object5;
object3.nameplate = {borderRadius: a0 ? (importDefault(697) /* metro dependency 697: native */).radii.sm : value};
const object6 = {};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object6.marginRight = PX_8;
object3.avatar = object6;
const PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
object3.content = {flex: 1, paddingRight: PX_40};
return object3;
}
function NameplatePreview_81232(a0) { // fn#81232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10693:663, offset: 0x01e9f771, size: 813 bytes, params: 2, frame: 31
var object2;
const nameplate = a0.nameplate;
const nameplateData = a0.nameplateData;
const user = a0.user;
let hasRoundedCorners = a0.hasRoundedCorners;
const value = undefined;
hasRoundedCorners = hasRoundedCorners === value || hasRoundedCorners;
let animate = a0.animate;
animate = !(animate === value) && animate;
const guildId = a0.guildId;
const pendingDisplayNameStyles = a0.pendingDisplayNameStyles;
const pendingGlobalName = a0.pendingGlobalName;
const property = a0['aria-hidden'];
const styles = useStyles(hasRoundedCorners);
const r17 = nameplate == null ? nameplateData : (require(1901) /* metro dependency 1901: utils */).getNameplateData(nameplate);
const value6 = (require(4618) /* metro dependency 4618: useAvatarDecoration */).useAvatarDecoration(user, guildId);
const pendingAvatarDecoration = (importDefault(8398) /* metro dependency 8398: usePendingAvatarSettings */)({guildId: guildId}).pendingAvatarDecoration;
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const env0_3 = useReducedMotion;
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore], _fun81234);
const r11 = pendingGlobalName ?? (guildId == null || (value7 == null ? value : value7.nick) == null ? (importDefault(3995) /* metro dependency 3995: UserUtils */).useName(user) : value7 == null ? value : value7.nick);
const r19 = value === pendingAvatarDecoration ? value6 : pendingAvatarDecoration;
const value9 = (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: user.id,
guildId: guildId, pendingDisplayNameStyles: pendingDisplayNameStyles});
const value10 = env0_3.useMemo(_fun81235, [styles.avatar, user, guildId, r19, useReducedMotion]);
object2 = {style: styles.container};
object2['aria-hidden'] = property;
const items2 = [((Component) => <Component nameplate={r17} style={styles.nameplate} fullOpacity animate={animate} />)(importDefault(8483) /* metro dependency 8483: Nameplate */)];
items2[1] = <View style={styles.avatar}>{value10}</View>;
items2[2] = <View style={styles.content}>{value9 != null && ((Component) => <Component userId={user.id} guildId={guildId} userName={r11} variant="text-md/semibold" effectDisplayType={(require(8697) /* metro dependency 8697: types */).EffectDisplayType.STATIC} lineClamp={1} pendingDisplayNameStyles={pendingDisplayNameStyles} />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */)}{value9 == null && ((Text) => <Text lineClamp={1} variant="text-md/semibold" color="mobile-text-heading-primary">{r11}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
return (
<View {...object2}>
{items2}
</View>
);
}
function _fun81234() { // fn#81234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10693:1041, offset: 0x01e9fa9e, size: 65 bytes, params: 1, frame: 14
const guildIdBinding = guildId;
const value2 = null;
return value2 != guildIdBinding && value2 != user ? GuildMemberStore.getMember(guildId, user.id) : value2;
}
function _fun81235() { // fn#81235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10693:1279, offset: 0x01e9fadf, size: 136 bytes, params: 1, frame: 18
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {style: styles.avatar, user: user, guildId: guildId};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
avatarProps.size = NORMAL;
avatarProps.avatarDecoration = env0_4;
avatarProps.animate = !useReducedMotion;
avatarProps.autoStatusCutout = true;
avatarProps['aria-hidden'] = true;
return <Avatar {...avatarProps} />;
}
global.__d(_fun81230, 10507, [31, 27, 4502, 1945, 33, 4501, 697, 1901, 4618, 8398, 566, 3995, 4635, 1305, 8483,
8696, 8697, 4573,
2]) /* metro module 10507, dependencies: [31, 27, 4502, 1945, 33, 4501, 697, 1901, 4618, 8398, 566, 3995, 4635, 1305, 8483, 8696, 8697, 4573, 2] */;
@@ -1,166 +1,215 @@
/* Metro module 10096; source: modules/collectibles/nameplates/native/NameplateProductPreview.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 7609, 1901, 1244, 4573, 4589, 7594, 8418, 8402, 566, 3995, 4635, 8696, 8697, 1305, 10097, 6238, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserUtils from '../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import AccessibilityStore from '../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseDisplayNameStyles from '../../../display_name_styles/hooks/useDisplayNameStyles.tsx'; /* Metro dependency 4635 */
import UseAvatarDecorationIfNotExpired from '../../avatar_decorations/useAvatarDecorationIfNotExpired.tsx'; /* Metro dependency 8418 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UtilsModule from '../utils.tsx'; /* Metro dependency 1901 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as UseCurrentUserModule from '../../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseShopProductItemsModule from '../../hooks/useShopProductItems.tsx'; /* Metro dependency 7609 */
import * as ProfileCustomizationUtilsModule from '../../../profile_customization/ProfileCustomizationUtils.tsx'; /* Metro dependency 8402 */
import * as UserNameplateRowModule from '../../../main_tabs_v2/native/shared_components/user_list/UserNameplateRow.tsx'; /* Metro dependency 10097 */
function _fun78857(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10282:6, offset: 0x01e384ee, size: 363 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {container: {'position': 'relative', 'flex': 1, 'justifyContent': 'center', 'overflow': 'hidden'}};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.memberListContainer = {paddingHorizontal: PX_16};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.memberListTitle = {paddingVertical: PX_8};
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.memberListGradient = {'position': 'absolute', 'right': 0, 'left': 0, 'top': 0, 'bottom': 0,
object = {container: {'position': 'relative', 'flex': 1, 'justifyContent': 'center', 'overflow': 'hidden'}};
const PX_16 = (Native).space.PX_16;
object.memberListContainer = {paddingHorizontal: PX_16};
const PX_8 = (Native).space.PX_8;
object.memberListTitle = {paddingVertical: PX_8};
const MOBILE_ACTIONSHEET_BACKGROUND = (Native).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object.memberListGradient = {'position': 'absolute', 'right': 0, 'left': 0, 'top': 0, 'bottom': 0,
color: MOBILE_ACTIONSHEET_BACKGROUND};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/native/NameplateProductPreview.tsx');
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/native/NameplateProductPreview.tsx');
exports.default = _default_78862;
}
function NameplateUser({previewNameplate, previewAvatarDecoration}) { // fn#78858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10282:514, offset: 0x01e38659, size: 450 bytes, params: 2, frame: 23
const value3 = (UseCurrentUserModule).useCurrentUser();
const defaultImport = UseAvatarDecorationIfNotExpired;
const getProfilePreviewValue = ProfileCustomizationUtilsModule.getProfilePreviewValue;
const object = {pendingValue: previewAvatarDecoration};
object.userValue = value3?.avatarDecoration;
const value4 = defaultImport(Reflect.apply(getProfilePreviewValue, ProfileCustomizationUtilsModule, [object]));
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const name = (UserUtils).getName(value3);
const defaultImport3 = UseDisplayNameStyles;
({}).userId = value3.id;
const r4 = (
defaultImport3(object) == null
? name
: ((Component) => <Component userId={value3.id} userName={name} effectDisplayType={(require(8697) /* metro dependency 8697: types */).EffectDisplayType.STATIC} lineClamp={1} variant="text-md/semibold" />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */)
);
const value7 = ReactModule.useMemo(_fun78860, [value3, value4, useReducedMotion]);
const UserNameplateRow = (UserNameplateRowModule).UserNameplateRow;
return (
<UserNameplateRow
nameplate={previewNameplate}
icon={value7}
label={r4}
isPreviewRow
/>
);
function _fun78860() { // fn#78860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10282:969, offset: 0x01e3881b, size: 118 bytes, params: 1, frame: 18
const Avatar = (NativeModule).Avatar;
const avatarProps = {user: env0_0, guildId: undefined};
const AvatarSizes = (NativeModule).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
avatarProps.size = NORMAL;
avatarProps.avatarDecoration = env0_1;
avatarProps.animate = !useReducedMotion;
avatarProps.autoStatusCutout = true;
avatarProps['aria-hidden'] = true;
return <Avatar {...avatarProps} />;
}
function NameplateUser({previewNameplate, previewAvatarDecoration}) { // fn#78858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10282:514, offset: 0x01e38659, size: 450 bytes, params: 2, frame: 23
const value3 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const defaultImport = importDefault(8418) /* metro dependency 8418: useAvatarDecorationIfNotExpired */;
const profileCustomizationUtilsModule = require(8402) /* metro dependency 8402: ProfileCustomizationUtils */;
const getProfilePreviewValue = profileCustomizationUtilsModule.getProfilePreviewValue;
const object2 = {pendingValue: previewAvatarDecoration};
object2.userValue = value3?.avatarDecoration;
const value4 = defaultImport(Reflect.apply(getProfilePreviewValue, profileCustomizationUtilsModule, [object2]));
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const name = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(value3);
const defaultImport3 = importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */;
({}).userId = value3.id;
const r4 = defaultImport3(object2) == null ? name : ((Component) => <Component userId={value3.id} userName={name} effectDisplayType={(require(8697) /* metro dependency 8697: types */).EffectDisplayType.STATIC} lineClamp={1} variant="text-md/semibold" />)(importDefault(8696) /* metro dependency 8696: UsernameWithEffects */);
const value7 = env0_3.useMemo(_fun78860, [value3, value4, useReducedMotion]);
const UserNameplateRow = (require(10097) /* metro dependency 10097: UserNameplateRow */).UserNameplateRow;
return (
<UserNameplateRow
nameplate={previewNameplate}
icon={value7}
label={r4}
isPreviewRow
/>
);
}
function PlaceholderUser({user, start, end}) { // fn#78861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10282:1224, offset: 0x01e38891, size: 170 bytes, params: 2, frame: 23
start = !(start === undefined) && start;
end = !(end === undefined) && end;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {source: {uri: user.avatarSrc}};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
avatarProps.size = NORMAL;
avatarProps['aria-hidden'] = true;
return (
<TableRow
icon={<Avatar {...avatarProps} />}
label={user.name}
start={start}
end={end}
/>
);
}
function _default_78862({product}) { // fn#78862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10282:1416, offset: 0x01e3893b, size: 901 bytes, params: 2, frame: 33
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var memberListTitle;
var string;
var items4;
var object;
var memberListGradient;
var color;
var items5;
var object2;
var items6;
var value;
const styles = useStyles();
const {firstNameplate,
firstAvatarDecoration} = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
const nameplateData = (require(1901) /* metro dependency 1901: utils */).getNameplateData(firstNameplate);
const nameplateSampleUsers = (require(1901) /* metro dependency 1901: utils */).getNameplateSampleUsers();
if (nameplateData == null) {
r0 = null;
} else {
var viewProps = {'style': null, 'pointerEvents': 'box-none', 'accessibilityLabel': null,
'accessibilityRole': 'image', 'accessible': true, style: styles.container,
accessibilityLabel: intl.formatToPlainString(t.YJig7C, {a11y_text: nameplateData.imgAlt})};
var viewBindingProps2 = {style: styles.memberListContainer};
items2 = [<PlaceholderUser user={nameplateSampleUsers.mallow} end />];
memberListTitle = styles.memberListTitle;
string = intl.string;
items2[1] = <Text maxFontSizeMultiplier={2} variant="text-sm/semibold" accessibilityRole="header" color="interactive-text-default" style={memberListTitle}>{Reflect.apply(string,
intl, [t['yzW/fZ']])}{' — 3'}</Text>;
items2[2] = <PlaceholderUser user={nameplateSampleUsers.phibi} start />;
items2[3] = <NameplateUser previewNameplate={nameplateData} previewAvatarDecoration={firstAvatarDecoration} />;
items2[4] = <PlaceholderUser user={nameplateSampleUsers.locke} end />;
memberListTitle = styles.memberListTitle;
string = intl.string;
items2[5] = <Text maxFontSizeMultiplier={2} variant="text-sm/semibold" accessibilityRole="header" color="interactive-text-default" style={memberListTitle}>{Reflect.apply(string,
intl, [t['NG43/6']])}{' — 12'}</Text>;
items2[6] = <PlaceholderUser user={nameplateSampleUsers.boom} start />;
items4 = [<View {...viewBindingProps2}>{items2}</View>];
value = importDefault(4589) /* metro dependency 4589 */;
object = {};
memberListGradient = styles.memberListGradient;
object.style = memberListGradient;
object.start = {'x': 0, 'y': 0};
object.end = {'x': 0, 'y': 0.4};
memberListGradient = styles.memberListGradient;
color = memberListGradient.color;
items5 = [color];
memberListGradient = styles.memberListGradient;
color = memberListGradient.color;
items5[1] = '' + color + '00';
object.colors = items5;
items4[1] = ((Component) => <Component {...object} />)(value);
value = importDefault(4589) /* metro dependency 4589 */;
object2 = {};
memberListGradient = styles.memberListGradient;
object2.style = memberListGradient;
object2.start = {'x': 0, 'y': 0.6};
object2.end = {'x': 0, 'y': 1};
memberListGradient = styles.memberListGradient;
color = memberListGradient.color;
items6 = ['' + color + '00'];
memberListGradient = styles.memberListGradient;
color = memberListGradient.color;
items6[1] = color;
object2.colors = items6;
items4[2] = ((Component) => <Component {...object2} />)(value);
value = <View {...viewProps}>{items4}</View>;
r0 = value;
}
return r0;
}
function _fun78860() { // fn#78860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10282:969, offset: 0x01e3881b, size: 118 bytes, params: 1, frame: 18
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const avatarProps = {user: env0_0, guildId: undefined};
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
avatarProps.size = NORMAL;
avatarProps.avatarDecoration = env0_1;
avatarProps.animate = !useReducedMotion;
avatarProps.autoStatusCutout = true;
avatarProps['aria-hidden'] = true;
return <Avatar {...avatarProps} />;
function PlaceholderUser({user, start, end}) { // fn#78861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10282:1224, offset: 0x01e38891, size: 170 bytes, params: 2, frame: 23
start = !(start === undefined) && start;
end = !(end === undefined) && end;
const TableRow = (TableRowNativeModule).TableRow;
const Avatar = (NativeModule).Avatar;
const avatarProps = {source: {uri: user.avatarSrc}};
const AvatarSizes = (NativeModule).AvatarSizes;
const NORMAL = AvatarSizes.NORMAL;
avatarProps.size = NORMAL;
avatarProps['aria-hidden'] = true;
return (
<TableRow
icon={<Avatar {...avatarProps} />}
label={user.name}
start={start}
end={end}
/>
);
}
function _default_78862({product}) { // fn#78862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10282:1416, offset: 0x01e3893b, size: 901 bytes, params: 2, frame: 33
var r0;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var items2;
const Text = (TextModule).Text;
var memberListTitle;
var string;
var items4;
var object3;
var memberListGradient;
var color;
var items5;
var object4;
var items6;
var value;
const styles = useStyles();
const {firstNameplate,
firstAvatarDecoration} = (UseShopProductItemsModule).useShopProductItems(product);
const nameplateData = (UtilsModule).getNameplateData(firstNameplate);
const nameplateSampleUsers = (UtilsModule).getNameplateSampleUsers();
if (nameplateData == null) {
r0 = null;
} else {
var viewProps = {'style': null, 'pointerEvents': 'box-none', 'accessibilityLabel': null,
'accessibilityRole': 'image', 'accessible': true, style: styles.container,
accessibilityLabel: intl.formatToPlainString(t.YJig7C, {a11y_text: nameplateData.imgAlt})};
var viewBindingProps2 = {style: styles.memberListContainer};
items2 = [
<PlaceholderUser user={nameplateSampleUsers.mallow} end />,
];
memberListTitle = styles.memberListTitle;
string = intl.string;
items2[1] = (
<Text
maxFontSizeMultiplier={2}
variant="text-sm/semibold"
accessibilityRole="header"
color="interactive-text-default"
style={memberListTitle}
>
{Reflect.apply(string, intl, [t['yzW/fZ']])}
{' — 3'}
</Text>
);
items2[2] = <PlaceholderUser user={nameplateSampleUsers.phibi} start />;
items2[3] = <NameplateUser previewNameplate={nameplateData} previewAvatarDecoration={firstAvatarDecoration} />;
items2[4] = <PlaceholderUser user={nameplateSampleUsers.locke} end />;
memberListTitle = styles.memberListTitle;
string = intl.string;
items2[5] = (
<Text
maxFontSizeMultiplier={2}
variant="text-sm/semibold"
accessibilityRole="header"
color="interactive-text-default"
style={memberListTitle}
>
{Reflect.apply(string, intl, [t['NG43/6']])}
{' — 12'}
</Text>
);
items2[6] = <PlaceholderUser user={nameplateSampleUsers.boom} start />;
items4 = [
<View {...viewBindingProps2}>
{items2}
</View>,
];
value = importDefault(4589) /* metro dependency 4589 */;
object3 = {};
memberListGradient = styles.memberListGradient;
object3.style = memberListGradient;
object3.start = {'x': 0, 'y': 0};
object3.end = {'x': 0, 'y': 0.4};
memberListGradient = styles.memberListGradient;
color = memberListGradient.color;
items5 = [color];
memberListGradient = styles.memberListGradient;
color = memberListGradient.color;
items5[1] = '' + color + '00';
object3.colors = items5;
items4[1] = ((Component) => <Component {...object3} />)(value);
value = importDefault(4589) /* metro dependency 4589 */;
object4 = {};
memberListGradient = styles.memberListGradient;
object4.style = memberListGradient;
object4.start = {'x': 0, 'y': 0.6};
object4.end = {'x': 0, 'y': 1};
memberListGradient = styles.memberListGradient;
color = memberListGradient.color;
items6 = ['' + color + '00'];
memberListGradient = styles.memberListGradient;
color = memberListGradient.color;
items6[1] = color;
object4.colors = items6;
items4[2] = ((Component) => <Component {...object4} />)(value);
value = (
<View {...viewProps}>
{items4}
</View>
);
r0 = value;
}
return r0;
}
}
global.__d(_fun78857, 10096, [31, 27, 4502, 33, 4501, 697, 7609, 1901, 1244, 4573, 4589, 7594, 8418, 8402, 566,
3995, 4635, 8696, 8697, 1305, 10097, 6238,
2]) /* metro module 10096, dependencies: [31, 27, 4502, 33, 4501, 697, 7609, 1901, 1244, 4573, 4589, 7594, 8418, 8402, 566, 3995, 4635, 8696, 8697, 1305, 10097, 6238, 2] */;
@@ -1,26 +1,28 @@
/* Metro module 8484; source: modules/collectibles/nameplates/native/NameplateUtils.tsx; dependencies: [1859, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun67335(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8669:6, offset: 0x01c1eb0d, size: 96 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/native/NameplateUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/native/NameplateUtils.tsx');
exports.getNameplateAssets = getNameplateAssets;
function getNameplateAssets({skuId}) { // fn#67336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8669:204, offset: 0x01c1eb6d, size: 141 bytes, params: 2, frame: 18
const object = {};
let value = require(1859) /* metro dependency 1859: CollectiblesAssetUtils */;
let getCollectiblesItemAssetUrl = value.getCollectiblesItemAssetUrl;
const object2 = {skuId: skuId};
const CollectiblesItemAssetFormat = (require(1859) /* metro dependency 1859: CollectiblesAssetUtils */).CollectiblesItemAssetFormat;
const STATIC = CollectiblesItemAssetFormat.STATIC;
object2.assetFormat = STATIC;
object.staticImageUrl = Reflect.apply(getCollectiblesItemAssetUrl, value, [object2]);
value = require(1859) /* metro dependency 1859: CollectiblesAssetUtils */;
getCollectiblesItemAssetUrl = value.getCollectiblesItemAssetUrl;
const ANIMATED = CollectiblesItemAssetFormat.ANIMATED;
object.animatedImageUrl = Reflect.apply(getCollectiblesItemAssetUrl, value, [{skuId: skuId, assetFormat: ANIMATED}]);
return object;
}
}
function getNameplateAssets({skuId}) { // fn#67336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8669:204, offset: 0x01c1eb6d, size: 141 bytes, params: 2, frame: 18
const object3 = {};
let value = require(1859) /* metro dependency 1859: CollectiblesAssetUtils */;
let getCollectiblesItemAssetUrl = value.getCollectiblesItemAssetUrl;
const object4 = {skuId: skuId};
const CollectiblesItemAssetFormat = (require(1859) /* metro dependency 1859: CollectiblesAssetUtils */).CollectiblesItemAssetFormat;
const STATIC = CollectiblesItemAssetFormat.STATIC;
object4.assetFormat = STATIC;
object3.staticImageUrl = Reflect.apply(getCollectiblesItemAssetUrl, value, [object4]);
value = require(1859) /* metro dependency 1859: CollectiblesAssetUtils */;
getCollectiblesItemAssetUrl = value.getCollectiblesItemAssetUrl;
const ANIMATED = CollectiblesItemAssetFormat.ANIMATED;
object3.animatedImageUrl = Reflect.apply(getCollectiblesItemAssetUrl, value, [{skuId: skuId,
assetFormat: ANIMATED}]);
return object3;
}
global.__d(_fun67335, 8484, [1859, 2]) /* metro module 8484, dependencies: [1859, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 1906; source: modules/collectibles/nameplates/types.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun20882(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2033:6, offset: 0x00edea6c, size: 288 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/types.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/types.tsx');
exports.PaletteKeys = {None: 'none', Crimson: 'crimson', Berry: 'berry', Sky: 'sky', Teal: 'teal', Forest: 'forest',
BubbleGum: 'bubble_gum', Violet: 'violet', Cobalt: 'cobalt', Clover: 'clover', Lemon: 'lemon', White: 'white',
Black: 'black'};
@@ -10,3 +12,4 @@ function _fun20882(global, require, importDefault, importAll, module, exports, d
PREVIEW: 'preview', MINI_PREVIEW: 'mini_preview'};
}
global.__d(_fun20882, 1906, [2]) /* metro module 1906, dependencies: [2] */;
@@ -1,81 +1,87 @@
/* Metro module 13224; source: modules/collectibles/nameplates/useNameplateSections.tsx; dependencies: [57, 31, 5121, 5145, 632, 5134, 1244, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import CollectiblesPurchaseStore from '../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
function _fun100874(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13414:6, offset: 0x021fe265, size: 251 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 env0_3 = (require(31) /* metro dependency 31 */).useMemo;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/useNameplateSections.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/useNameplateSections.tsx');
exports.default = _default_100875;
exports.Section = {PURCHASE: 'purchase', PREMIUM_PURCHASE: 'premium_purchase', PREVIEW: 'preview'};
exports.NONE_ITEM = {skuId: 'None'};
exports.SHOP_ITEM = {skuId: 'Shop'};
}
function _default_100875() { // fn#100875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13414:295, offset: 0x021fe360, size: 170 bytes, params: 1, frame: 19
const purchases = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesPurchaseStore],
function() {
return CollectiblesPurchaseStore.purchases;
});
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value3 = Module00057(Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[CollectiblesCategoryStore],
function() {
var collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
return [collectiblesCategoryStoreBinding.categories, collectiblesCategoryStoreBinding.products];
}]), 2);
return useMemo(_fun100878, [value3[0], purchases, value3[1]]);
function _fun100878() { // fn#100878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13414:460, offset: 0x021fe40a, size: 403 bytes, params: 1, frame: 23
const value4 = (CollectiblesUtilsModule).getNameplates(purchases,
env0_1).reduce(_fun100879, {purchase: [], premium_purchase: [], preview: []});
object = {};
const binding = env1_6;
const PURCHASE = binding.PURCHASE;
object.section = PURCHASE;
const items3 = [env1_7, env1_8];
arraySpread(items3, value4.purchase, 2, undefined);
object.items = items3;
object.height = 12;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const WfGV52 = t.WfGV52;
object.header = Reflect.apply(string, intl, [WfGV52]);
const items2 = [object];
const PREMIUM_PURCHASE = binding.PREMIUM_PURCHASE;
string = intl.string;
const TiLCgw = t.TiLCgw;
items2[1] = {section: PREMIUM_PURCHASE, items: value4.premium_purchase, height: 12, header: Reflect.apply(string,
intl, [TiLCgw])};
object = {};
const PREVIEW = binding.PREVIEW;
object.section = PREVIEW;
object.items = value4.preview;
object.height = 12;
object.header = intl.string(t['1vbbee']);
items2[2] = object;
return items2.filter(function(a0) {
return a0.items.length > 0;
});
function _fun100879(a0, a1) { // fn#100879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13414:506, offset: 0x021fe59d, size: 216 bytes, params: 3, frame: 17
let value = environment.__proto__;
const value2 = purchases.get(a1.skuId);
value = env1_2.get(a1.skuId);
const r5 = value2 != null ? (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(value2) : (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(value);
const isCategoryReward = value?.isCategoryReward;
if (r5) {
a0.premium_purchase.push(a1);
} else if (value2 != null) {
a0.purchase.push(a1);
} else if (!(isCategoryReward != null && isCategoryReward)) {
a0.preview.push(a1);
}
return a0;
}
function _default_100875() { // fn#100875, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13414:295, offset: 0x021fe360, size: 170 bytes, params: 1, frame: 19
const purchases = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesPurchaseStore],
function() {
return CollectiblesPurchaseStore.purchases;
});
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStoresArray = useStateFromStoresModule.useStateFromStoresArray;
const value3 = env0_2(Reflect.apply(useStateFromStoresArray, useStateFromStoresModule, [[CollectiblesCategoryStore],
function() {
return [CollectiblesCategoryStore.categories, CollectiblesCategoryStore.products];
}]), 2);
return useMemo(_fun100878, [value3[0], purchases, value3[1]]);
}
}
function _fun100878() { // fn#100878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13414:460, offset: 0x021fe40a, size: 403 bytes, params: 1, frame: 23
var object2;
const value4 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getNameplates(purchases,
env0_1).reduce(_fun100879, {purchase: [], premium_purchase: [], preview: []});
object2 = {};
const binding = env1_6;
const PURCHASE = binding.PURCHASE;
object2.section = PURCHASE;
const items3 = [env1_7, env1_8];
arraySpread(items3, value4.purchase, 2, undefined);
object2.items = items3;
object2.height = 12;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const WfGV52 = t.WfGV52;
object2.header = Reflect.apply(string, intl, [WfGV52]);
const items2 = [object2];
const PREMIUM_PURCHASE = binding.PREMIUM_PURCHASE;
string = intl.string;
const TiLCgw = t.TiLCgw;
items2[1] = {section: PREMIUM_PURCHASE, items: value4.premium_purchase, height: 12, header: Reflect.apply(string,
intl, [TiLCgw])};
object2 = {};
const PREVIEW = binding.PREVIEW;
object2.section = PREVIEW;
object2.items = value4.preview;
object2.height = 12;
object2.header = intl.string(t['1vbbee']);
items2[2] = object2;
return items2.filter(function(a0) {
return a0.items.length > 0;
});
}
function _fun100879(a0, a1) { // fn#100879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13414:506, offset: 0x021fe59d, size: 216 bytes, params: 3, frame: 17
let value = environment.__proto__;
const value2 = purchases.get(a1.skuId);
value = env1_2.get(a1.skuId);
const r5 = value2 != null ? (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(value2) : (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(value);
const isCategoryReward = value?.isCategoryReward;
if (r5) {
a0.premium_purchase.push(a1);
} else if (value2 != null) {
a0.purchase.push(a1);
} else if (!(isCategoryReward != null && isCategoryReward)) {
a0.preview.push(a1);
}
return a0;
}
global.__d(_fun100874, 13224, [57, 31, 5121, 5145, 632, 5134, 1244,
2]) /* metro module 13224, dependencies: [57, 31, 5121, 5145, 632, 5134, 1244, 2] */;
@@ -1,22 +1,26 @@
/* Metro module 1901; source: modules/collectibles/nameplates/utils.tsx; dependencies: [1902, 482, 1905, 1907, 1244, 2] */
import Module01907 from '../../../by-id/module-01907.js'; /* Metro dependency 1907 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NameplateRecordModule from '../records/NameplateRecord.tsx'; /* Metro dependency 1902 */
function _fun20855(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:6, offset: 0x00eddbcf, size: 237 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getNameplateData;
const closure2 = isValidPalette;
const getNameplateData2 = getNameplateData;
const isValidPalette2 = isValidPalette;
const isValidHex_20858 = function(a0) {
return RegExp('^#([0-9a-fA-F]{6})$', '').test(a0);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(1902) /* metro dependency 1902: NameplateRecord */).isNameplateRecord;
const env0_4 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
const closure3 = function(a0) {
var property = require(dependencyMap[2]).NAMEPLATE_PALETTES;
property = property[a0];
return property ?? require(dependencyMap[2]).INVALID_NAMEPLATE_PALETTE;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/nameplates/utils.tsx');
exports.getNameplateData = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/nameplates/utils.tsx');
exports.getNameplateData = getNameplateData2;
exports.getNameplateDataFromProductRecord = getNameplateDataFromProductRecord;
exports.getBackgroundGradientColors = function(a0, a1) {
var r4;
@@ -25,75 +29,77 @@ function _fun20855(global, require, importDefault, importAll, module, exports, d
return {left: '' + r4 + '00', right: '' + r4 + '4D'};
}
};
exports.isValidPalette = closure2;
exports.isValidPalette = isValidPalette2;
exports.getNameplatePalette = closure3;
exports.parseFirstFrame = parseFirstFrame;
exports.getNameplateSampleUsers = getNameplateSampleUsers;
}
function getNameplateData(a0) { // fn#20856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:145, offset: 0x00eddcbc, size: 74 bytes, params: 2, frame: 13
var r0;
var object2;
const value = null;
if (value == a0) {
r0 = value;
} else {
object2 = {};
object2.skuId = a0.skuId;
object2.src = a0.asset;
object2.imgAlt = a0.label;
object2.palette = getNameplatePalette(a0.palette);
r0 = object2;
function getNameplateData(a0) { // fn#20856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:145, offset: 0x00eddcbc, size: 74 bytes, params: 2, frame: 13
var r0;
var object;
const value = null;
if (value == a0) {
r0 = value;
} else {
object = {};
object.skuId = a0.skuId;
object.src = a0.asset;
object.imgAlt = a0.label;
object.palette = getNameplatePalette(a0.palette);
r0 = object;
}
return r0;
}
return r0;
}
function isValidPalette(a0) { // fn#20857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:276, offset: 0x00eddd06, size: 122 bytes, params: 2, frame: 16
const name = a0.name;
const INVALID_PALETTE_KEY = (require(1905) /* metro dependency 1905: constants */).INVALID_PALETTE_KEY;
return name !== INVALID_PALETTE_KEY && (a0.name !== (require(1905) /* metro dependency 1905: constants */).CUSTOM_PALETTE_KEY || isValidHex_20858(a0.darkBackground) && isValidHex_20858(a0.lightBackground));
}
function getNameplateDataFromProductRecord(a0) { // fn#20860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:771, offset: 0x00eddde2, size: 64 bytes, params: 2, frame: 13
if (a0.items.length === 0) {
return null;
function isValidPalette(a0) { // fn#20857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:276, offset: 0x00eddd06, size: 122 bytes, params: 2, frame: 16
const name = a0.name;
const INVALID_PALETTE_KEY = (require(1905) /* metro dependency 1905: constants */).INVALID_PALETTE_KEY;
return name !== INVALID_PALETTE_KEY && (a0.name !== (require(1905) /* metro dependency 1905: constants */).CUSTOM_PALETTE_KEY || isValidHex_20858(a0.darkBackground) && isValidHex_20858(a0.lightBackground));
}
const property = a0.items[0];
return isNameplateRecord(property) ? getNameplateData(property) : null;
}
function parseFirstFrame(a0) { // fn#20862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:1184, offset: 0x00edde94, size: 226 bytes, params: 2, frame: 18
let value = importDefault(1907) /* metro dependency 1907 */;
value = value.decode(a0);
const property = (importDefault(1907) /* metro dependency 1907 */).toRGBA8(value)[0];
const element = global.document.createElement('canvas');
element.width = value.width;
element.height = value.height;
const context = element.getContext('2d');
const ImageData = global.ImageData;
const Uint8ClampedArray = global.Uint8ClampedArray;
context.putImageData(new ImageData(new Uint8ClampedArray(property), value.width, value.height), 0, 0);
return element.toDataURL('image/png');
}
function getNameplateDataFromProductRecord(a0) { // fn#20860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:771, offset: 0x00eddde2, size: 64 bytes, params: 2, frame: 13
if (a0.items.length === 0) {
return null;
}
const property = a0.items[0];
return isNameplateRecord(property) ? getNameplateData(property) : null;
}
function parseFirstFrame(a0) { // fn#20862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:1184, offset: 0x00edde94, size: 226 bytes, params: 2, frame: 18
let value = Module01907;
value = value.decode(a0);
const property = (Module01907).toRGBA8(value)[0];
const element = global.document.createElement('canvas');
element.width = value.width;
element.height = value.height;
const context = element.getContext('2d');
const ImageData = global.ImageData;
const Uint8ClampedArray = global.Uint8ClampedArray;
context.putImageData(new ImageData(new Uint8ClampedArray(property), value.width, value.height), 0, 0);
return element.toDataURL('image/png');
}
function getNameplateSampleUsers() { // fn#20863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:1494, offset: 0x00eddf76, size: 362 bytes, params: 1, frame: 17
const object = {};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const SbKDHi = t.SbKDHi;
object.mallow = {name: Reflect.apply(string, intl, [SbKDHi]),
avatarSrc: 'https://cdn.discordapp.com/assets/content/6dcafe1231097505560fd098f0e6698990f0082369d34c35d8c3ee9615709f84.png'};
const object3 = {};
object3.name = intl.string(t['LMSo+F']);
object3.avatarSrc = 'https://cdn.discordapp.com/assets/content/17ae2ee3b8476755370ca9fa4d776d0bb811e50962409a7ae2dedd1b96c95eab.png';
object.phibi = object3;
object.locke = {name: intl.string(t.g5Dumi),
avatarSrc: 'https://cdn.discordapp.com/assets/content/a82a9daadc5c7842f183c0f61966b07d3aeeea478b7c8a4b8af48334eb1ce15f.png'};
object.cherry = {name: intl.string(t.p5Z3Ol),
avatarSrc: 'https://cdn.discordapp.com/assets/content/afc2e8306ce540dccac7da1ca0871684d0bf67e77967ff0f679be84a0a6e51b7.png'};
object.boom = {name: intl.string(t.ncslie),
avatarSrc: 'https://cdn.discordapp.com/assets/content/e264a2b0b8d963edd255c223abf1c0554f00a2f3a38640e509a38bc03d73b606.png'};
return object;
}
function getNameplateSampleUsers() { // fn#20863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2028:1494, offset: 0x00eddf76, size: 362 bytes, params: 1, frame: 17
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const SbKDHi = t.SbKDHi;
object2.mallow = {name: Reflect.apply(string, intl, [SbKDHi]),
avatarSrc: 'https://cdn.discordapp.com/assets/content/6dcafe1231097505560fd098f0e6698990f0082369d34c35d8c3ee9615709f84.png'};
const object4 = {};
object4.name = intl.string(t['LMSo+F']);
object4.avatarSrc = 'https://cdn.discordapp.com/assets/content/17ae2ee3b8476755370ca9fa4d776d0bb811e50962409a7ae2dedd1b96c95eab.png';
object2.phibi = object4;
object2.locke = {name: intl.string(t.g5Dumi),
avatarSrc: 'https://cdn.discordapp.com/assets/content/a82a9daadc5c7842f183c0f61966b07d3aeeea478b7c8a4b8af48334eb1ce15f.png'};
object2.cherry = {name: intl.string(t.p5Z3Ol),
avatarSrc: 'https://cdn.discordapp.com/assets/content/afc2e8306ce540dccac7da1ca0871684d0bf67e77967ff0f679be84a0a6e51b7.png'};
object2.boom = {name: intl.string(t.ncslie),
avatarSrc: 'https://cdn.discordapp.com/assets/content/e264a2b0b8d963edd255c223abf1c0554f00a2f3a38640e509a38bc03d73b606.png'};
return object2;
}
global.__d(_fun20855, 1901, [1902, 482, 1905, 1907, 1244,
2]) /* metro module 1901, dependencies: [1902, 482, 1905, 1907, 1244, 2] */;
@@ -1,37 +1,48 @@
/* Metro module 10095; source: modules/collectibles/native/AvatarDecorationProductPreview.tsx; dependencies: [31, 27, 33, 4501, 7594, 7609, 1244, 1305, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseShopProductItemsModule from '../hooks/useShopProductItems.tsx'; /* Metro dependency 7609 */
function _fun78855(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10281:6, offset: 0x01e3830b, size: 199 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_2 = (require(27) /* metro dependency 27 */).View;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({fullSizePreview: {'flex': 1,
ReactModule;
const env0_4 = (CreateStylesModule).createStyles({fullSizePreview: {'flex': 1,
'alignItems': 'center', 'justifyContent': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/AvatarDecorationProductPreview.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/AvatarDecorationProductPreview.tsx');
exports.default = _default_78856;
}
function _default_78856({product}) { // fn#78856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10281:237, offset: 0x01e383d2, size: 284 bytes, params: 2, frame: 23
var r0;
var intl;
const styles = useStyles();
const value2 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const useShopProductItemsModule = require(7609) /* metro dependency 7609: useShopProductItems */;
const useShopProductItems = useShopProductItemsModule.useShopProductItems;
const firstAvatarDecoration = Reflect.apply(useShopProductItems, useShopProductItemsModule,
[product]).firstAvatarDecoration;
if (firstAvatarDecoration == null) {
r0 = null;
} else {
var viewBindingProps = {'style': null, 'pointerEvents': 'box-none', 'accessibilityLabel': null,
'accessibilityRole': 'image', 'accessible': true, style: styles.fullSizePreview};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
viewBindingProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Do2lxE,
{a11y_text: firstAvatarDecoration.label});
r0 = <View {...viewBindingProps}>{((Avatar) => <Avatar user={value2} guildId={undefined} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.GIFT_START} avatarDecoration={firstAvatarDecoration} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)}</View>;
function _default_78856({product}) { // fn#78856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10281:237, offset: 0x01e383d2, size: 284 bytes, params: 2, frame: 23
var r0;
var intl;
const styles = useStyles();
const value2 = (UseCurrentUserModule).useCurrentUser();
const useShopProductItems = UseShopProductItemsModule.useShopProductItems;
const firstAvatarDecoration = Reflect.apply(useShopProductItems, UseShopProductItemsModule,
[product]).firstAvatarDecoration;
if (firstAvatarDecoration == null) {
r0 = null;
} else {
var viewBindingProps = {'style': null, 'pointerEvents': 'box-none', 'accessibilityLabel': null,
'accessibilityRole': 'image', 'accessible': true, style: styles.fullSizePreview};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
viewBindingProps.accessibilityLabel = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Do2lxE,
{a11y_text: firstAvatarDecoration.label});
r0 = (
<View {...viewBindingProps}>
{((Avatar) => <Avatar user={value2} guildId={undefined} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.GIFT_START} avatarDecoration={firstAvatarDecoration} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)}
</View>
);
}
return r0;
}
return r0;
}
global.__d(_fun78855, 10095, [31, 27, 33, 4501, 7594, 7609, 1244, 1305,
2]) /* metro module 10095, dependencies: [31, 27, 33, 4501, 7594, 7609, 1244, 1305, 2] */;
@@ -1,47 +1,57 @@
/* Metro module 7596; source: modules/collectibles/native/AvatarDecorationSampleV2.tsx; dependencies: [31, 27, 33, 4501, 697, 44, 1904, 7597, 7598, 2] */
import Module00044 from '../../../by-id/module-00044.js'; /* Metro dependency 44 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun60917(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#60917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:6, offset: 0x01714d1b, size: 233 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 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Image;
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;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun60918);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/AvatarDecorationSampleV2.tsx');
const env0_8 = (CreateStylesModule).createStyles(_fun60918);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/AvatarDecorationSampleV2.tsx');
exports.default = _default_60919;
exports.avatarPlaceholderSizeRatio = 0.8333333333333334;
function _fun60918(a0) { // fn#60918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:217, offset: 0x01714e04, size: 142 bytes, params: 2, frame: 14
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
return {avatar: {position: 'absolute', height: a0 * 0.8333333333333334, width: a0 * 0.8333333333333334,
borderRadius: a0 * 0.8333333333333334 / 2, opacity: 0.8, backgroundColor: BACKGROUND_BASE_LOWER}, solidAvatar: {opacity: 1}, avatarDecoration: {position: 'absolute'}};
}
function _default_60919({item, size, avatarSource, animate, threeTierBundle}) { // fn#60919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:431, offset: 0x01714e92, size: 333 bytes, params: 2, frame: 27
const styles = useStyles(size);
const defaultImport = Module00044;
const type = item.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
defaultImport(type === AVATAR_DECORATION, 'Item must be Avatar Decoration');
return (
<>
<Image
style={[styles.avatar, (avatarSource != null || threeTierBundle === true) && styles.solidAvatar]}
resizeMode="contain"
source={avatarSource ?? (importDefault(7597) /* metro dependency 7597 */)}
accessible={false}
/>
<View style={styles.avatarDecoration} accessibilityLabel={item.label}>
{((Component) => <Component avatarDecoration={item} size={size} animate={animate} />)(importDefault(7598) /* metro dependency 7598: CutoutableAvatarDecoration */)}
</View>
</>
);
}
}
function _fun60918(a0) { // fn#60918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:217, offset: 0x01714e04, size: 142 bytes, params: 2, frame: 14
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
return {avatar: {position: 'absolute', height: a0 * 0.8333333333333334, width: a0 * 0.8333333333333334,
borderRadius: a0 * 0.8333333333333334 / 2, opacity: 0.8, backgroundColor: BACKGROUND_BASE_LOWER}, solidAvatar: {opacity: 1}, avatarDecoration: {position: 'absolute'}};
}
function _default_60919({item, size, avatarSource, animate, threeTierBundle}) { // fn#60919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7774:431, offset: 0x01714e92, size: 333 bytes, params: 2, frame: 27
const styles = useStyles(size);
const defaultImport = importDefault(44) /* metro dependency 44 */;
const type = item.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
defaultImport(type === AVATAR_DECORATION, 'Item must be Avatar Decoration');
return (
<>
<Image
style={[styles.avatar, (avatarSource != null || threeTierBundle === true) && styles.solidAvatar]}
resizeMode="contain"
source={avatarSource ?? (importDefault(7597) /* metro dependency 7597 */)}
accessible={false}
/>
<View style={styles.avatarDecoration} accessibilityLabel={item.label}>
{((Component) => <Component avatarDecoration={item} size={size} animate={animate} />)(importDefault(7598) /* metro dependency 7598: CutoutableAvatarDecoration */)}
</View>
</>
);
}
global.__d(_fun60917, 7596, [31, 27, 33, 4501, 697, 44, 1904, 7597, 7598,
2]) /* metro module 7596, dependencies: [31, 27, 33, 4501, 697, 44, 1904, 7597, 7598, 2] */;
@@ -1,11 +1,17 @@
/* Metro module 10091; source: modules/collectibles/native/BundleProductDetailsActionSheetPreview.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 10092, 5321, 5134, 10093, 4573, 1244, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as Module05321Module from '../../../by-id/module-05321.js'; /* Metro dependency 5321 */
import * as IndividualProductPreviewModule from './IndividualProductPreview.tsx'; /* Metro dependency 10093 */
function _fun78835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:6, offset: 0x01e36dc3, size: 654 bytes, params: 8, frame: 23
var object7;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = require(31) /* metro dependency 31 */;
let value = ReactModule;
const env0_4 = value.useCallback;
const env0_5 = value.useLayoutEffect;
const env0_6 = value.useMemo;
@@ -19,147 +25,165 @@ function _fun78835(global, require, importDefault, importAll, module, exports, d
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object7 = {};
const object8 = {};
object = {};
const object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingTop = PX_16;
object2.paddingTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.paddingBottom = PX_16;
object2.paddingBottom = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.gap = PX_16;
object7.previewContainer = object8;
const object9 = {'width': 56, 'height': 56, 'borderRadius': null, 'backgroundColor': null, 'overflow': 'hidden'};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.gap = PX_16;
object.previewContainer = object2;
const object3 = {'width': 56, 'height': 56, 'borderRadius': null, 'backgroundColor': null, 'overflow': 'hidden'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object9.backgroundColor = BACKGROUND_MOD_SUBTLE;
object7.bundleThumbnail = object9;
const object10 = {'position': 'absolute', 'top': -2, 'left': -2, 'right': -2, 'bottom': -2, 'borderRadius': null,
object3.backgroundColor = BACKGROUND_MOD_SUBTLE;
object.bundleThumbnail = object3;
const object4 = {'position': 'absolute', 'top': -2, 'left': -2, 'right': -2, 'bottom': -2, 'borderRadius': null,
'borderWidth': 2};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm + 2;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm + 2;
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
object10.borderColor = BORDER_STRONG;
object7.selectedRing = object10;
const object11 = {flexDirection: 'row'};
object4.borderColor = BORDER_STRONG;
object.selectedRing = object4;
const object5 = {flexDirection: 'row'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object11.gap = PX_12;
object5.gap = PX_12;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object11.paddingVertical = PX_4;
object11.paddingHorizontal = 2;
object7.bundleThumbnailRow = object11;
const object12 = {};
object5.paddingVertical = PX_4;
object5.paddingHorizontal = 2;
object.bundleThumbnailRow = object5;
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object12.paddingHorizontal = PX_16;
object6.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object12.gap = PX_16;
object7.bundleContainer = object12;
object6.gap = PX_16;
object.bundleContainer = object6;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.bundleInfoContainer = {gap: PX_8};
const env0_13 = Reflect.apply(createStyles, value, [object7]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/BundleProductDetailsActionSheetPreview.tsx');
object.bundleInfoContainer = {gap: PX_8};
const env0_13 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/BundleProductDetailsActionSheetPreview.tsx');
exports.default = _default_78838;
}
function BundleThumbnail({item, index, isSelected, setSelected, label}) { // fn#78836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:941, offset: 0x01e37051, size: 246 bytes, params: 2, frame: 23
const value2 = useCallback(function() {
return setSelected(index);
}, [setSelected, index]);
const styles = useStyles();
return (
<Pressable
role="radio"
{...{['aria-checked']: isSelected}}
onPress={value2}
{...{['aria-label']: label}}
>
<View style={styles.bundleThumbnail}>
{((Component) => <Component item={item} size={56} />)(importDefault(10092) /* metro dependency 10092: CollectiblesItemMiniPreview */)}
</View>
{isSelected && <View style={styles.selectedRing} pointerEvents="none" />}
</Pressable>
);
}
function _default_78838({product, width, handlePreviewPress, onTrackPress, onActiveItemChange}) { // fn#78838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1239, offset: 0x01e37147, size: 944 bytes, params: 2, frame: 37
var object2;
var r4;
const styles = useStyles();
const value4 = useState(0);
const binding = env0_3;
const value5 = binding(value4, 2);
let property = value5[0];
const property2 = value5[1];
const [property3, property4] = binding(useState(product.skuId), 2);
const value7 = useMemo(_fun78839, []);
const items2 = product.items;
const bundledProducts = product.bundledProducts;
if (product.skuId === property3) {
r4 = property;
} else {
property4(product.skuId);
property2(0);
r4 = 0;
function BundleThumbnail({item, index, isSelected, setSelected, label}) { // fn#78836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:941, offset: 0x01e37051, size: 246 bytes, params: 2, frame: 23
const value2 = useCallback(function() {
return setSelected(index);
}, [setSelected, index]);
const styles = useStyles();
return (
<Pressable
role="radio"
{...{['aria-checked']: isSelected}}
onPress={value2}
{...{['aria-label']: label}}
>
<View style={styles.bundleThumbnail}>
{((Component) => <Component item={item} size={56} />)(importDefault(10092) /* metro dependency 10092: CollectiblesItemMiniPreview */)}
</View>
{isSelected && <View style={styles.selectedRing} pointerEvents="none" />}
</Pressable>
);
}
property = items2[r4];
useLayoutEffect(_fun78840, [property, onActiveItemChange]);
const r14 = bundledProducts?.[r4]?.name ?? property.skuId;
const collectibleTypeLabel = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getCollectibleTypeLabel(property.type);
object2 = {skuId: property.skuId, type: property.type, items: [property]};
const IndividualProductPreview = (require(10093) /* metro dependency 10093: IndividualProductPreview */).IndividualProductPreview;
const individualProductPreview = <IndividualProductPreview product={object2} width={width} handlePreviewPress={handlePreviewPress} onTrackPress={onTrackPress} />;
let bundleInfoContainer = styles.bundleInfoContainer;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="heading-xl/bold">{product.name}</Text>;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = <View style={bundleInfoContainer}>{text}<Text variant="text-sm/medium" color="text-default">{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['/0Yndu'],
{num: items2.length})}</Text></View>;
bundleInfoContainer = styles.bundleInfoContainer;
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
const scrollViewBindingProps = {'horizontal': true, 'showsHorizontalScrollIndicator': false,
'contentContainerStyle': null, 'role': 'radiogroup', contentContainerStyle: styles.bundleThumbnailRow};
scrollViewBindingProps['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cTbdgu);
return (
<View style={styles.previewContainer}>
{individualProductPreview}
<View style={styles.bundleContainer}>
{view}
<View style={bundleInfoContainer}>
<GestureDetector gesture={value7}>
<ScrollView {...scrollViewBindingProps}>
{items2.map(_fun78841)}
</ScrollView>
</GestureDetector>
<Text variant="text-sm/medium" color="text-default">
{r14}
{collectibleTypeLabel != null && <Text variant="text-sm/medium" color="text-muted">{' - ' + collectibleTypeLabel}</Text>}
</Text>
function _default_78838({product, width, handlePreviewPress, onTrackPress, onActiveItemChange}) { // fn#78838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1239, offset: 0x01e37147, size: 944 bytes, params: 2, frame: 37
var r4;
const styles = useStyles();
const value4 = useState(0);
const value5 = Module00057(value4, 2);
let property = value5[0];
const property2 = value5[1];
const [property3, property4] = Module00057(useState(product.skuId), 2);
const value7 = useMemo(_fun78839, []);
const items2 = product.items;
const bundledProducts = product.bundledProducts;
if (product.skuId === property3) {
r4 = property;
} else {
property4(product.skuId);
property2(0);
r4 = 0;
}
property = items2[r4];
useLayoutEffect(_fun78840, [property, onActiveItemChange]);
const r14 = bundledProducts?.[r4]?.name ?? property.skuId;
const collectibleTypeLabel = (CollectiblesUtilsModule).getCollectibleTypeLabel(property.type);
object = {skuId: property.skuId, type: property.type, items: [property]};
const IndividualProductPreview = (IndividualProductPreviewModule).IndividualProductPreview;
const individualProductPreview = (
<IndividualProductPreview
product={object}
width={width}
handlePreviewPress={handlePreviewPress}
onTrackPress={onTrackPress}
/>
);
let bundleInfoContainer = styles.bundleInfoContainer;
const Text = (TextModule).Text;
const text = (
<Text variant="heading-xl/bold">
{product.name}
</Text>
);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = (
<View style={bundleInfoContainer}>
{text}
<Text variant="text-sm/medium" color="text-default">
{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['/0Yndu'],
{num: items2.length})}
</Text>
</View>
);
bundleInfoContainer = styles.bundleInfoContainer;
const GestureDetector = (Module05321Module).GestureDetector;
const scrollViewBindingProps = {'horizontal': true, 'showsHorizontalScrollIndicator': false,
'contentContainerStyle': null, 'role': 'radiogroup', contentContainerStyle: styles.bundleThumbnailRow};
scrollViewBindingProps['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cTbdgu);
return (
<View style={styles.previewContainer}>
{individualProductPreview}
<View style={styles.bundleContainer}>
{view}
<View style={bundleInfoContainer}>
<GestureDetector gesture={value7}>
<ScrollView {...scrollViewBindingProps}>
{items2.map(_fun78841)}
</ScrollView>
</GestureDetector>
<Text variant="text-sm/medium" color="text-default">
{r14}
{collectibleTypeLabel != null && <Text variant="text-sm/medium" color="text-muted">{' - ' + collectibleTypeLabel}</Text>}
</Text>
</View>
</View>
</View>
</View>
);
}
);
function _fun78839() { // fn#78839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1403, offset: 0x01e374f7, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (Module05321Module).Gesture;
return Gesture.Native().disallowInterruption(true);
}
function _fun78839() { // fn#78839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1403, offset: 0x01e374f7, size: 56 bytes, params: 1, frame: 11
const value = environment.__proto__;
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
return Gesture.Native().disallowInterruption(true);
}
function _fun78840() { // fn#78840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1545, offset: 0x01e3752f, size: 32 bytes, params: 1, frame: 11
if (onActiveItemChange != null) {
onActiveItemChange(env0_4);
}
}
function _fun78841(a0, a1) { // fn#78841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:2427, offset: 0x01e3754f, size: 118 bytes, params: 3, frame: 20
return (
<BundleThumbnail
item={a0}
index={a1}
isSelected={a1 === Module00057}
setSelected={env0_1}
label={(bundledProducts == null || bundledProducts[a1] == null ? undefined : bundledProducts[a1].name) ?? a0.skuId}
key={a0.skuId}
/>
);
}
function _fun78840() { // fn#78840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:1545, offset: 0x01e3752f, size: 32 bytes, params: 1, frame: 11
if (onActiveItemChange != null) {
onActiveItemChange(env0_4);
}
}
function _fun78841(a0, a1) { // fn#78841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10277:2427, offset: 0x01e3754f, size: 118 bytes, params: 3, frame: 20
return (
<BundleThumbnail
item={a0}
index={a1}
isSelected={a1 === env0_3}
setSelected={env0_1}
label={(bundledProducts == null || bundledProducts[a1] == null ? undefined : bundledProducts[a1].name) ?? a0.skuId}
key={a0.skuId}
/>
);
}
global.__d(_fun78835, 10091, [57, 31, 27, 33, 4501, 697, 10092, 5321, 5134, 10093, 4573, 1244,
2]) /* metro module 10091, dependencies: [57, 31, 27, 33, 4501, 697, 10092, 5321, 5134, 10093, 4573, 1244, 2] */;
@@ -1,160 +1,221 @@
/* Metro module 8470; source: modules/collectibles/native/BundleSampleV2.tsx; dependencies: [31, 27, 8471, 33, 5475, 4501, 697, 44, 1904, 1901, 8472, 7596, 8482, 1305, 8487, 2] */
import ProfileEffectSampleV2 from './ProfileEffectSampleV2.tsx'; /* Metro dependency 8472 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesPreviewConstantsModule from './CollectiblesPreviewConstants.tsx'; /* Metro dependency 8471 */
import * as CollectiblesMobileFlexibleBundlesExperimentModule from '../experiments/CollectiblesMobileFlexibleBundlesExperiment.tsx'; /* Metro dependency 8487 */
function _fun67262(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:6, offset: 0x01c1bc70, size: 470 bytes, params: 8, frame: 26
var object7;
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 */;
ReactModule;
let value = ReactNativeModule;
const StyleSheet = value.StyleSheet;
const env0_3 = value.View;
const env0_4 = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).BUNDLE_PREVIEW_CONFIG;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const create = StyleSheet.create;
object7 = {};
const object8 = {};
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
object8['overflow'] = 'hidden';
object7.container = object8;
const object9 = {};
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
object9['overflow'] = 'hidden';
object9['justifyContent'] = 'center';
object9['alignItems'] = 'center';
object7.bgBleedClip = object9;
const object10 = {};
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
object10['opacity'] = 0.8;
object7.bgMutedWrap = object10;
object7.bgImage = {'width': '100%', 'height': '100%'};
const object11 = {};
copyDataProperties(object11, StyleSheet.absoluteFillObject, undefined);
object11['overflow'] = 'hidden';
object11['justifyContent'] = 'center';
object11['alignItems'] = 'center';
object7.fgClip = object11;
const object12 = {};
copyDataProperties(object12, StyleSheet.absoluteFillObject, undefined);
object7.fgImage = object12;
const env0_7 = Reflect.apply(create, StyleSheet, [object7]);
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun67266);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/BundleSampleV2.tsx');
exports.default = _default_67267;
}
function BundleStaticPreviewContent({previewAssets, disableBackground, mutedBackground}) { // fn#67263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:197, offset: 0x01c1be46, size: 402 bytes, params: 2, frame: 26
var r4;
const bgStatic = previewAssets.bgStatic;
const fgStatic = previewAssets.fgStatic;
let value = null;
const r9 = value != bgStatic ? ((Component) => <Component source={{uri: bgStatic}} style={env0_7.bgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(importDefault(5475) /* metro dependency 5475: FastImage */) : value;
const container = env0_7.container;
const r5 = !disableBackground && value != r9 && <View style={env0_7.bgBleedClip} pointerEvents="none">{mutedBackground ? <View style={env0_7.bgMutedWrap} pointerEvents="none">{r9}</View> : r9}</View>;
value = value != fgStatic;
if (value) {
var viewBinding4Props = {style: env0_7.fgClip, pointerEvents: 'none'};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = <View {...viewBinding4Props}>{((Component) => <Component source={{uri: fgStatic}} style={env0_7.fgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value)}</View>;
r4 = value;
} else {
r4 = value;
}
return (
<View style={container}>
{r5}
{r4}
</View>
);
}
function BundleSampleV2Composed({deco, pfx, nameplate, size}) { // fn#67264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:2307, offset: 0x01c1bfd8, size: 567 bytes, params: 2, frame: 29
var r12;
size = size === undefined ? 'small' : size;
const styles = useStyles(size);
if (nameplate != null) {
(importDefault(44) /* metro dependency 44 */)(nameplate.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE,
'Item must be Nameplate');
r12 = (require(1901) /* metro dependency 1901: utils */).getNameplateData(nameplate);
} else {
r12 = undefined;
}
const property = BUNDLE_PREVIEW_CONFIG[size];
const r17 = r12 != null ? property.avatarDecorationSizeTriple : property.avatarDecorationSize;
const items2 = [<View style={styles.pfx}>{((Component) => <Component item={pfx} />)(importDefault(8472) /* metro dependency 8472: ProfileEffectSampleV2 */)}</View>];
items2[1] = <View style={[r12 != null ? styles.avatarWithNameplate : styles.avatar]}>{((Component) => <Component item={deco} size={r17} threeTierBundle={r12 != null} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}</View>;
items2[2] = r12 != null ? <View style={styles.nameplate}>{((NameplateDummyUserPreview) => <NameplateDummyUserPreview width={property.nameplatePreviewWidth} avatarSize={size === 'large' ? (require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL : (require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} nameplate={r12} />)((require(8482) /* metro dependency 8482: NameplateDummyUserPreview */).NameplateDummyUserPreview)}</View> : null;
return (
<View style={styles.bundle}>
{items2}
</View>
);
}
function BundleSampleV2StaticPreview({previewAssets, disableStaticBackground, mutedStaticBackground, composedFallbackProps, exposureLocation}) { // fn#67265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3006, offset: 0x01c1c20f, size: 134 bytes, params: 2, frame: 18
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
return Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
collectiblesMobileFlexibleBundlesExperimentModule,
[exposureLocation]).enabled ? <BundleStaticPreviewContent previewAssets={previewAssets} disableBackground={disableStaticBackground} mutedBackground={mutedStaticBackground} /> : <BundleSampleV2Composed {...composedFallbackProps} />;
}
function _fun67266(a0) { // fn#67266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:1267, offset: 0x01c1c295, size: 554 bytes, params: 2, frame: 18
const property = BUNDLE_PREVIEW_CONFIG[a0];
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['overflow'] = 'hidden';
object.container = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['overflow'] = 'hidden';
object3['justifyContent'] = 'center';
object3['alignItems'] = 'center';
object.bgBleedClip = object3;
const object4 = {};
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
object4['opacity'] = 0.8;
object.bgMutedWrap = object4;
object.bgImage = {'width': '100%', 'height': '100%'};
const object5 = {};
object5.width = property.bundleWidth;
object5.height = property.bundleHeight;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.bundle = object5;
const object6 = {position: 'absolute'};
object6.top = property.pfxTop;
object6.left = property.pfxLeft;
object6.width = property.pfxWidth;
object6.height = property.pfxHeight;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object6.backgroundColor = BACKGROUND_BASE_LOW;
object6.transform = [{rotate: '-8deg'}];
object6.zIndex = 0;
object6.overflow = 'hidden';
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.pfx = object6;
object4.avatar = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
'alignItems': 'center', 'justifyContent': 'center', top: property.avatarTop, right: property.avatarRight,
transform: [{rotate: '8deg'}]};
const object8 = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
'alignItems': 'center', 'justifyContent': 'center'};
object8.top = property.avatarWithNameplateTop;
object8.right = property.avatarWithNameplateRight;
object8.transform = [{rotate: '8deg'}];
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object8.shadowColor = BLACK;
object8.shadowOffset = {'width': 0, 'height': 4};
object8.shadowOpacity = 0.5;
object8.shadowRadius = 4;
object4.avatarWithNameplate = object8;
const object10 = {'position': 'absolute', 'bottom': null, 'marginHorizontal': 10, 'width': '90%',
'backgroundColor': null, 'zIndex': 2};
object10.bottom = property.nameplateBottom;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object10.backgroundColor = BACKGROUND_BASE_LOWER;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object10.shadowColor = BLACK;
object10.shadowOffset = {'width': 0, 'height': 4};
object10.shadowOpacity = 0.5;
object10.shadowRadius = 4;
object4.nameplate = object10;
return object4;
}
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['overflow'] = 'hidden';
object5['justifyContent'] = 'center';
object5['alignItems'] = 'center';
object.fgClip = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object.fgImage = object6;
const env0_7 = Reflect.apply(create, StyleSheet, [object]);
const env0_8 = (CreateStylesModule).createStyles(_fun67266);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/BundleSampleV2.tsx');
exports.default = _default_67267;
function BundleStaticPreviewContent({previewAssets, disableBackground, mutedBackground}) { // fn#67263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:197, offset: 0x01c1be46, size: 402 bytes, params: 2, frame: 26
var r4;
const bgStatic = previewAssets.bgStatic;
const fgStatic = previewAssets.fgStatic;
let value = null;
const r9 = (
value != bgStatic
? ((Component) => <Component source={{uri: bgStatic}} style={env0_7.bgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(importDefault(5475) /* metro dependency 5475: FastImage */)
: value
);
const container = env0_7.container;
const r5 = !disableBackground && value != r9 && <View style={env0_7.bgBleedClip} pointerEvents="none">{mutedBackground ? <View style={env0_7.bgMutedWrap} pointerEvents="none">{r9}</View> : r9}</View>;
value = value != fgStatic;
if (value) {
var viewBinding4Props = {style: env0_7.fgClip, pointerEvents: 'none'};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = (
<View {...viewBinding4Props}>
{((Component) => <Component source={{uri: fgStatic}} style={env0_7.fgImage} resizeMode="cover" accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />)(value)}
</View>
);
r4 = value;
} else {
r4 = value;
}
return (
<View style={container}>
{r5}
{r4}
</View>
);
}
function BundleSampleV2Composed({deco, pfx, nameplate, size}) { // fn#67264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:2307, offset: 0x01c1bfd8, size: 567 bytes, params: 2, frame: 29
var r12;
size = size === undefined ? 'small' : size;
const styles = useStyles(size);
if (nameplate != null) {
(importDefault(44) /* metro dependency 44 */)(nameplate.type === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.NAMEPLATE,
'Item must be Nameplate');
r12 = (require(1901) /* metro dependency 1901: utils */).getNameplateData(nameplate);
} else {
r12 = undefined;
}
const property = BUNDLE_PREVIEW_CONFIG[size];
const r17 = r12 != null ? property.avatarDecorationSizeTriple : property.avatarDecorationSize;
const items2 = [
<View style={styles.pfx}>
{((Component) => <Component item={pfx} />)(ProfileEffectSampleV2)}
</View>,
];
items2[1] = (
<View style={[r12 != null ? styles.avatarWithNameplate : styles.avatar]}>
{((Component) => <Component item={deco} size={r17} threeTierBundle={r12 != null} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}
</View>
);
items2[2] = (
r12 != null
? (
<View style={styles.nameplate}>
{((NameplateDummyUserPreview) => <NameplateDummyUserPreview width={property.nameplatePreviewWidth} avatarSize={size === 'large' ? (require(1305) /* metro dependency 1305: native */).AvatarSizes.NORMAL : (require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} nameplate={r12} />)((require(8482) /* metro dependency 8482: NameplateDummyUserPreview */).NameplateDummyUserPreview)}
</View>
)
: null
);
return (
<View style={styles.bundle}>
{items2}
</View>
);
}
function BundleSampleV2StaticPreview({previewAssets, disableStaticBackground, mutedStaticBackground, composedFallbackProps, exposureLocation}) { // fn#67265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3006, offset: 0x01c1c20f, size: 134 bytes, params: 2, frame: 18
const useCollectiblesMobileFlexibleBundlesExperiment = CollectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
return (
Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment, CollectiblesMobileFlexibleBundlesExperimentModule,
[exposureLocation]).enabled
? (
<BundleStaticPreviewContent
previewAssets={previewAssets}
disableBackground={disableStaticBackground}
mutedBackground={mutedStaticBackground}
/>
)
: (
<BundleSampleV2Composed {...composedFallbackProps} />
)
);
}
function _fun67266(a0) { // fn#67266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:1267, offset: 0x01c1c295, size: 554 bytes, params: 2, frame: 18
const property = BUNDLE_PREVIEW_CONFIG[a0];
const object = {};
const object2 = {};
object2.width = property.bundleWidth;
object2.height = property.bundleHeight;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.bundle = object2;
const object3 = {position: 'absolute'};
object3.top = property.pfxTop;
object3.left = property.pfxLeft;
object3.width = property.pfxWidth;
object3.height = property.pfxHeight;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object3.transform = [{rotate: '-8deg'}];
object3.zIndex = 0;
object3.overflow = 'hidden';
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.pfx = object3;
object.avatar = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
'alignItems': 'center', 'justifyContent': 'center', top: property.avatarTop, right: property.avatarRight,
transform: [{rotate: '8deg'}]};
const object7 = {'position': 'absolute', 'top': null, 'right': null, 'transform': null, 'zIndex': 1,
'alignItems': 'center', 'justifyContent': 'center'};
object7.top = property.avatarWithNameplateTop;
object7.right = property.avatarWithNameplateRight;
object7.transform = [{rotate: '8deg'}];
let BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object7.shadowColor = BLACK;
object7.shadowOffset = {'width': 0, 'height': 4};
object7.shadowOpacity = 0.5;
object7.shadowRadius = 4;
object.avatarWithNameplate = object7;
const object9 = {'position': 'absolute', 'bottom': null, 'marginHorizontal': 10, 'width': '90%',
'backgroundColor': null, 'zIndex': 2};
object9.bottom = property.nameplateBottom;
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object9.backgroundColor = BACKGROUND_BASE_LOWER;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object9.shadowColor = BLACK;
object9.shadowOffset = {'width': 0, 'height': 4};
object9.shadowOpacity = 0.5;
object9.shadowRadius = 4;
object.nameplate = object9;
return object;
}
function _default_67267({deco, pfx, nameplate, size, previewAssets, disableStaticBackground, mutedStaticBackground, exposureLocation}) { // fn#67267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3361, offset: 0x01c1c4bf, size: 201 bytes, params: 2, frame: 19
size = size === undefined ? 'small' : size;
disableStaticBackground = !(disableStaticBackground === undefined) && disableStaticBackground;
mutedStaticBackground = !(mutedStaticBackground === undefined) && mutedStaticBackground;
exposureLocation = exposureLocation === undefined ? 'CollectiblesShopCardAssetTileV2' : exposureLocation;
return (
previewAssets?.fgStatic != null
? (
<BundleSampleV2StaticPreview
previewAssets={previewAssets}
disableStaticBackground={disableStaticBackground}
mutedStaticBackground={mutedStaticBackground}
composedFallbackProps={object}
exposureLocation={exposureLocation}
/>
)
: (
<BundleSampleV2Composed
deco={deco}
pfx={pfx}
nameplate={nameplate}
size={size}
/>
)
);
}
function _default_67267({deco, pfx, nameplate, size, previewAssets, disableStaticBackground, mutedStaticBackground, exposureLocation}) { // fn#67267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8655:3361, offset: 0x01c1c4bf, size: 201 bytes, params: 2, frame: 19
size = size === undefined ? 'small' : size;
disableStaticBackground = !(disableStaticBackground === undefined) && disableStaticBackground;
mutedStaticBackground = !(mutedStaticBackground === undefined) && mutedStaticBackground;
exposureLocation = exposureLocation === undefined ? 'CollectiblesShopCardAssetTileV2' : exposureLocation;
return previewAssets?.fgStatic != null ? <BundleSampleV2StaticPreview previewAssets={previewAssets} disableStaticBackground={disableStaticBackground} mutedStaticBackground={mutedStaticBackground} composedFallbackProps={object} exposureLocation={exposureLocation} /> : <BundleSampleV2Composed deco={deco} pfx={pfx} nameplate={nameplate} size={size} />;
}
global.__d(_fun67262, 8470, [31, 27, 8471, 33, 5475, 4501, 697, 44, 1904, 1901, 8472, 7596, 8482, 1305, 8487,
2]) /* metro module 8470, dependencies: [31, 27, 8471, 33, 5475, 4501, 697, 44, 1904, 1901, 8472, 7596, 8482, 1305, 8487, 2] */;
@@ -1,146 +1,175 @@
/* Metro module 8413; source: modules/collectibles/native/CollectiblesBadges.tsx; dependencies: [31, 27, 1880, 33, 4501, 697, 4573, 1244, 7962, 6705, 7954, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun66835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:6, offset: 0x01c0bb4c, size: 597 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumTypes;
let value = require(33) /* metro dependency 33 */;
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object5 = {};
object = {};
const object2 = {};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object5.backgroundColor = BACKGROUND_BRAND;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object5.paddingHorizontal = 6;
object5.paddingVertical = 2;
object3.newIconBadge = object5;
object3.newIconBadgeText = {textTransform: 'uppercase'};
const object8 = {};
object2.backgroundColor = BACKGROUND_BRAND;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object2.paddingHorizontal = 6;
object2.paddingVertical = 2;
object.newIconBadge = object2;
object.newIconBadgeText = {textTransform: 'uppercase'};
const object4 = {};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object8.backgroundColor = WHITE;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
object4.backgroundColor = WHITE;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object8.paddingHorizontal = PX_8;
object4.paddingHorizontal = PX_8;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object8.paddingVertical = PX_4;
object3.limitedTimeBadge = object8;
object3.limitedTimeBadgeText = {textTransform: 'uppercase'};
const object9 = {};
object4.paddingVertical = PX_4;
object.limitedTimeBadge = object4;
object.limitedTimeBadgeText = {textTransform: 'uppercase'};
const object6 = {};
const ICON_OVERLAY_DARK = (importDefault(697) /* metro dependency 697: native */).colors.ICON_OVERLAY_DARK;
object9.backgroundColor = ICON_OVERLAY_DARK;
object9.padding = 5;
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.lockIconBadge = object9;
const object10 = {'backgroundColor': null, 'flexDirection': 'row', 'paddingHorizontal': 5, 'paddingVertical': 3,
object6.backgroundColor = ICON_OVERLAY_DARK;
object6.padding = 5;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.lockIconBadge = object6;
const object7 = {'backgroundColor': null, 'flexDirection': 'row', 'paddingHorizontal': 5, 'paddingVertical': 3,
'borderRadius': null, 'alignItems': 'center', 'gap': 2};
const PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2;
object10.backgroundColor = PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2;
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.newLockIconBadge = object10;
object3.newLockIconBadgeText = {textTransform: 'uppercase'};
const env0_7 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesBadges.tsx');
object7.backgroundColor = PREMIUM_TIER_2_PINK_FOR_GRADIENTS_2;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.newLockIconBadge = object7;
object.newLockIconBadgeText = {textTransform: 'uppercase'};
const env0_7 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesBadges.tsx');
exports.NewBadge = NewBadge;
exports.LockBadge = LockBadge;
exports.PremiumBadge = PremiumBadge;
exports.LimitedTimeBadge = LimitedTimeBadge;
}
function NewBadge({style}) { // fn#66836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1047, offset: 0x01c0bda1, size: 171 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.newIconBadge, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={items2}>
<Text
variant="text-sm/bold"
color="white"
style={styles.newIconBadgeText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}
</Text>
</View>
);
}
function LockBadge({isNew, style}) { // fn#66837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1259, offset: 0x01c0be4c, size: 410 bytes, params: 2, frame: 23
var r0;
var PremiumFeaturesBackground;
var items3;
var Text;
var intl;
isNew = !(isNew === undefined) && isNew;
var value;
const styles = useStyles();
if (isNew) {
PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
var defaultImportProps = {premiumType: PremiumTypes.TIER_2, style: [styles.newLockIconBadge, style]};
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
value = <LockIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
items3 = [value];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/bold', 'color': 'white', style: styles.newLockIconBadgeText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}</Text>;
value = <PremiumFeaturesBackground {...defaultImportProps}>{items3}</PremiumFeaturesBackground>;
r0 = value;
} else {
r0 = <View style={[styles.lockIconBadge,
style]}>{((LockIcon) => <LockIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)}</View>;
function NewBadge({style}) { // fn#66836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1047, offset: 0x01c0bda1, size: 171 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.newIconBadge, style];
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={items2}>
<Text
variant="text-sm/bold"
color="white"
style={styles.newIconBadgeText}
>
{intl.string((IndexNativeModule).t.y2b7CA)}
</Text>
</View>
);
}
return r0;
}
function PremiumBadge({isNew, style}) { // fn#66838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1685, offset: 0x01c0bfe6, size: 410 bytes, params: 2, frame: 23
var r0;
var PremiumFeaturesBackground;
var items3;
var Text;
var intl;
isNew = !(isNew === undefined) && isNew;
var value;
const styles = useStyles();
if (isNew) {
PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
var defaultImportProps = {premiumType: PremiumTypes.TIER_2, style: [styles.newLockIconBadge, style]};
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
value = <NitroWheelIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
items3 = [value];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/bold', 'color': 'white', style: styles.newLockIconBadgeText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = <Text {...textProps}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}</Text>;
value = <PremiumFeaturesBackground {...defaultImportProps}>{items3}</PremiumFeaturesBackground>;
r0 = value;
} else {
r0 = <View style={[styles.lockIconBadge,
style]}>{((NitroWheelIcon) => <NitroWheelIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}</View>;
function LockBadge({isNew, style}) { // fn#66837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1259, offset: 0x01c0be4c, size: 410 bytes, params: 2, frame: 23
var r0;
var PremiumFeaturesBackground;
var items3;
var Text;
var intl;
isNew = !(isNew === undefined) && isNew;
var value;
const styles = useStyles();
if (isNew) {
PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
var defaultImportProps = {premiumType: PremiumTypes.TIER_2, style: [styles.newLockIconBadge, style]};
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
value = <LockIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
items3 = [value];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/bold', 'color': 'white', style: styles.newLockIconBadgeText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = (
<Text {...textProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}
</Text>
);
value = (
<PremiumFeaturesBackground {...defaultImportProps}>
{items3}
</PremiumFeaturesBackground>
);
r0 = value;
} else {
r0 = (
<View style={[styles.lockIconBadge, style]}>
{((LockIcon) => <LockIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(6705) /* metro dependency 6705: LockIcon */).LockIcon)}
</View>
);
}
return r0;
}
function PremiumBadge({isNew, style}) { // fn#66838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:1685, offset: 0x01c0bfe6, size: 410 bytes, params: 2, frame: 23
var r0;
var PremiumFeaturesBackground;
var items3;
var Text;
var intl;
isNew = !(isNew === undefined) && isNew;
var value;
const styles = useStyles();
if (isNew) {
PremiumFeaturesBackground = importDefault(7962) /* metro dependency 7962: PremiumFeaturesBackground */;
var defaultImportProps = {premiumType: PremiumTypes.TIER_2, style: [styles.newLockIconBadge, style]};
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
value = <NitroWheelIcon size="xxs" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />;
items3 = [value];
Text = (require(4573) /* metro dependency 4573: Text */).Text;
var textProps = {'variant': 'text-xs/bold', 'color': 'white', style: styles.newLockIconBadgeText};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items3[1] = (
<Text {...textProps}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.y2b7CA)}
</Text>
);
value = (
<PremiumFeaturesBackground {...defaultImportProps}>
{items3}
</PremiumFeaturesBackground>
);
r0 = value;
} else {
r0 = (
<View style={[styles.lockIconBadge, style]}>
{((NitroWheelIcon) => <NitroWheelIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}
</View>
);
}
return r0;
}
function LimitedTimeBadge({style}) { // fn#66839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:2129, offset: 0x01c0c180, size: 173 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.limitedTimeBadge, style];
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={items2}>
<Text
variant="text-xs/bold"
color="black"
style={styles.limitedTimeBadgeText}
>
{intl.string((IndexNativeModule).t['h/uBCR'])}
</Text>
</View>
);
}
return r0;
}
function LimitedTimeBadge({style}) { // fn#66839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8598:2129, offset: 0x01c0c180, size: 173 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.limitedTimeBadge, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={items2}>
<Text
variant="text-xs/bold"
color="black"
style={styles.limitedTimeBadgeText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['h/uBCR'])}
</Text>
</View>
);
}
global.__d(_fun66835, 8413, [31, 27, 1880, 33, 4501, 697, 4573, 1244, 7962, 6705, 7954,
2]) /* metro module 8413, dependencies: [31, 27, 1880, 33, 4501, 697, 4573, 1244, 7962, 6705, 7954, 2] */;
@@ -1,67 +1,74 @@
/* Metro module 14057; source: modules/collectibles/native/CollectiblesCoachmarkScrollDismissContext.tsx; dependencies: [31, 482, 33, 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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
function _fun106599(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:6, offset: 0x022e2891, size: 196 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = importAll(31) /* metro dependency 31 */;
const env0_1 = (require(482) /* metro dependency 482: Constants */).NOOP;
const env0_2 = (require(33) /* metro dependency 33 */).jsx;
const env0_3 = value.createContext({registerDismiss: function() {
const env0_3 = ReactModule.createContext({registerDismiss: function() {
return NOOP;
}, handleDismissCoachmarkOnScroll: undefined});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesCoachmarkScrollDismissContext.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesCoachmarkScrollDismissContext.tsx');
exports.useCollectiblesCoachmarkScrollDismissContext = useCollectiblesCoachmarkScrollDismissContext;
exports.CollectiblesCoachmarkScrollDismissProvider = CollectiblesCoachmarkScrollDismissProvider;
}
function useCollectiblesCoachmarkScrollDismissContext() { // fn#106601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:374, offset: 0x01010b37, size: 24 bytes, params: 1, frame: 11
return env0_0.useContext(env0_3);
}
function CollectiblesCoachmarkScrollDismissProvider({children}) { // fn#106602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:499, offset: 0x022e2955, size: 163 bytes, params: 2, frame: 17
const binding = env0_0;
var env0_0 = binding.useRef(null);
const env0_1 = binding.useRef(null);
const value2 = binding.useCallback(_fun106603, []);
const value3 = binding.useCallback(_fun106605, []);
const env0_3 = value3;
const value4 = binding.useMemo(_fun106606, [value2, value3]);
const Provider = env0_3.Provider;
return (
<Provider value={value4}>
{children}
</Provider>
);
}
function _fun106603(a0) { // fn#106603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:620, offset: 0x022e29f8, size: 43 bytes, params: 2, frame: 4
a0.current = a0;
env0_1.current = null;
return _fun106604;
}
function _fun106605(a0) { // fn#106605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:727, offset: 0x022e2a54, size: 137 bytes, params: 2, frame: 15
var contentOffset;
var Math;
const current = env0_0.current;
if (current != null) {
contentOffset = a0.nativeEvent.contentOffset;
if (env0_1.current != null) {
Math = global.Math;
if (Math.abs(contentOffset.x - env0_1.current) >= 16) {
env0_0.current = null;
env0_1.current = null;
current();
function CollectiblesCoachmarkScrollDismissProvider({children}) { // fn#106602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:499, offset: 0x022e2955, size: 163 bytes, params: 2, frame: 17
const binding = env0_0;
var env0_0 = binding.useRef(null);
const env0_1 = binding.useRef(null);
const value2 = binding.useCallback(_fun106603, []);
const value3 = binding.useCallback(_fun106605, []);
const env0_3 = value3;
const value4 = binding.useMemo(_fun106606, [value2, value3]);
const Provider = env0_3.Provider;
return (
<Provider value={value4}>
{children}
</Provider>
);
function _fun106603(a0) { // fn#106603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:620, offset: 0x022e29f8, size: 43 bytes, params: 2, frame: 4
a0.current = a0;
env0_1.current = null;
return _fun106604;
function _fun106604() { // fn#106604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:651, offset: 0x022e2a23, size: 49 bytes, params: 1, frame: 3
if (env1_0.current === env0_0) {
env1_0.current = null;
env1_1.current = null;
}
}
} else {
env0_1.current = contentOffset.x;
}
function _fun106605(a0) { // fn#106605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:727, offset: 0x022e2a54, size: 137 bytes, params: 2, frame: 15
var contentOffset;
var Math;
const current = env0_0.current;
if (current != null) {
contentOffset = a0.nativeEvent.contentOffset;
if (env0_1.current != null) {
Math = global.Math;
if (Math.abs(contentOffset.x - env0_1.current) >= 16) {
env0_0.current = null;
env0_1.current = null;
current();
}
} else {
env0_1.current = contentOffset.x;
}
}
}
function _fun106606() { // fn#106606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:916, offset: 0x022e2add, size: 25 bytes, params: 1, frame: 3
return {registerDismiss: JsxRuntimeModule.jsx, handleDismissCoachmarkOnScroll: env0_3};
}
}
}
function _fun106606() { // fn#106606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:916, offset: 0x022e2add, size: 25 bytes, params: 1, frame: 3
return {registerDismiss: env0_2, handleDismissCoachmarkOnScroll: env0_3};
}
function _fun106604() { // fn#106604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14254:651, offset: 0x022e2a23, size: 49 bytes, params: 1, frame: 3
if (env1_0.current === env0_0) {
env1_0.current = null;
env1_1.current = null;
}
}
global.__d(_fun106599, 14057, [31, 482, 33, 2]) /* metro module 14057, dependencies: [31, 482, 33, 2] */;
@@ -1,154 +1,199 @@
/* Metro module 8410; source: modules/collectibles/native/CollectiblesEditUserProfileListItems.tsx; dependencies: [31, 27, 1878, 663, 33, 4501, 697, 5278, 4081, 4082, 1305, 8411, 4573, 1244, 6771, 5120, 4080, 8412, 8413, 566, 3802, 8405, 5134, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UseCollectiblesData from '../hooks/useCollectiblesData.tsx'; /* Metro dependency 8405 */
import Module08411 from '../../../by-id/module-08411.js'; /* Metro dependency 8411 */
import Module08412 from '../../../by-id/module-08412.js'; /* Metro dependency 8412 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CollectiblesActionCreatorsModule from '../CollectiblesActionCreators.tsx'; /* Metro dependency 5120 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as CollectiblesBadgesModule from './CollectiblesBadges.tsx'; /* Metro dependency 8413 */
function _fun66825(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:6, offset: 0x01c0b2e9, size: 478 bytes, params: 8, frame: 23
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {'borderWidth': 2, 'borderColor': null, 'borderRadius': null, 'backgroundColor': null,
object = {};
const object2 = {'borderWidth': 2, 'borderColor': null, 'borderRadius': null, 'backgroundColor': null,
'alignItems': 'center', 'justifyContent': 'center', 'marginTop': 10};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.borderColor = BORDER_SUBTLE;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.borderColor = BORDER_SUBTLE;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.item = object4;
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.item = object2;
const BUTTON_OUTLINE_BRAND_BORDER_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.BUTTON_OUTLINE_BRAND_BORDER_ACTIVE;
object3.selected = {borderColor: BUTTON_OUTLINE_BRAND_BORDER_ACTIVE};
object3.optionCell = {'justifyContent': 'center', 'alignItems': 'center'};
object3.optionCellText = {marginTop: 4};
object3.newIcon = {'position': 'absolute', 'top': -12, 'right': 5};
object3.lockIcon = {'position': 'absolute', 'top': -12, 'right': -10};
const env0_9 = Reflect.apply(createStyles, value, [object3]);
const closure = EditCollectibleListItem;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesEditUserProfileListItems.tsx');
exports.EditCollectibleListItem = closure;
object.selected = {borderColor: BUTTON_OUTLINE_BRAND_BORDER_ACTIVE};
object.optionCell = {'justifyContent': 'center', 'alignItems': 'center'};
object.optionCellText = {marginTop: 4};
object.newIcon = {'position': 'absolute', 'top': -12, 'right': 5};
object.lockIcon = {'position': 'absolute', 'top': -12, 'right': -10};
const env0_9 = Reflect.apply(createStyles, value, [object]);
const EditCollectibleListItem2 = EditCollectibleListItem;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesEditUserProfileListItems.tsx');
exports.EditCollectibleListItem = EditCollectibleListItem2;
exports.EditCollectiblesListItemNone = EditCollectiblesListItemNone;
exports.EditCollectiblesListItemShop = EditCollectiblesListItemShop;
exports.EditCollectiblesListItemProduct = EditCollectiblesListItemProduct;
}
function EditCollectibleListItem({size, isSelected, children, style, onPress, onLongPress, accessibilityLabel, accessibilityRole}) { // fn#66826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:705, offset: 0x01c0b4c7, size: 222 bytes, params: 2, frame: 24
accessibilityRole = accessibilityRole === undefined ? 'button' : accessibilityRole;
const styles = useStyles();
const PressableOpacity = (PressablesModule).PressableOpacity;
return (
<PressableOpacity
disabled={isSelected}
onPress={function() {
require(dependencyMap[8]).triggerHapticFeedback(importDefault(dependencyMap[9]).IMPACT_LIGHT);
onPress();
}}
onLongPress={onLongPress}
accessibilityRole={accessibilityRole}
accessibilityLabel={accessibilityLabel}
accessibilityState={{selected: isSelected}}
>
<View style={[styles.item, isSelected ? styles.selected : null, {width: size, height: size}, style]}>
{children}
</View>
</PressableOpacity>
);
}
function EditCollectibleListItem({size, isSelected, children, style, onPress, onLongPress, accessibilityLabel, accessibilityRole}) { // fn#66826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:705, offset: 0x01c0b4c7, size: 222 bytes, params: 2, frame: 24
accessibilityRole = accessibilityRole === undefined ? 'button' : accessibilityRole;
const styles = useStyles();
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
disabled={isSelected}
onPress={function() {
require(dependencyMap[8]).triggerHapticFeedback(importDefault(dependencyMap[9]).IMPACT_LIGHT);
onPress();
}}
onLongPress={onLongPress}
accessibilityRole={accessibilityRole}
accessibilityLabel={accessibilityLabel}
accessibilityState={{selected: isSelected}}
>
<View style={[styles.item, isSelected ? styles.selected : null, {width: size, height: size}, style]}>
{children}
</View>
</PressableOpacity>
);
}
function EditCollectiblesListItemNone(a0) { // fn#66828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1305, offset: 0x01c0b5ec, size: 287 bytes, params: 2, frame: 24
const styles = useStyles();
const editCollectibleListItemBindingProps = {style: styles.optionCell, ...a0};
const Icon = (NativeModule).Icon;
const iconProps = {source: Module08411};
const IconSizes = (NativeModule).IconSizes;
const LARGE = IconSizes.LARGE;
iconProps.size = LARGE;
const icon = <Icon {...iconProps} />;
const Text = (TextModule).Text;
const asDefault = a0.asDefault;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
return (
<EditCollectibleListItem {...editCollectibleListItemBindingProps}>
{icon}
<Text
variant="text-sm/medium"
color="mobile-text-heading-primary"
style={styles.optionCellText}
>
{asDefault ? Reflect.apply(string, intl, [t.CHf9iJ]) : Reflect.apply(string, intl, [t.PoWNfe])}
</Text>
</EditCollectibleListItem>
);
}
function EditCollectiblesListItemNone(a0) { // fn#66828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1305, offset: 0x01c0b5ec, size: 287 bytes, params: 2, frame: 24
const styles = useStyles();
const editCollectibleListItemBindingProps = {style: styles.optionCell, ...a0};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(8411) /* metro dependency 8411 */};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const LARGE = IconSizes.LARGE;
iconProps.size = LARGE;
const icon = <Icon {...iconProps} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const asDefault = a0.asDefault;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
return (
<EditCollectibleListItem {...editCollectibleListItemBindingProps}>
{icon}
function EditCollectiblesListItemShop(a0) { // fn#66829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1691, offset: 0x01c0b70b, size: 403 bytes, params: 2, frame: 24
const analyticsSource = a0.analyticsSource;
const value = Object.create(null);
value.analyticsSource = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const analyticsLocations = (UseAnalyticsLocations)(analyticsSource).analyticsLocations;
const useCallback = ReactModule.useCallback;
const editCollectibleListItemBindingProps = {style: styles.optionCell, isSelected: false,
onPress: Reflect.apply(useCallback, ReactModule, [_fun66830, [analyticsLocations, analyticsSource]]), ...value2};
const Icon = (NativeModule).Icon;
const object2 = {source: Module08412};
const IconSizes = (NativeModule).IconSizes;
const LARGE = IconSizes.LARGE;
object2.size = LARGE;
const items2 = [
<Icon {...object2} />,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<Text
variant="text-sm/medium"
color="mobile-text-heading-primary"
style={styles.optionCellText}
>
{asDefault ? Reflect.apply(string, intl, [t.CHf9iJ]) : Reflect.apply(string, intl, [t.PoWNfe])}
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
</Text>
</EditCollectibleListItem>
);
}
);
const NewBadge = (CollectiblesBadgesModule).NewBadge;
items2[2] = <NewBadge style={styles.newIcon} />;
return (
<EditCollectibleListItem {...editCollectibleListItemBindingProps}>
{items2}
</EditCollectibleListItem>
);
function _fun66830() { // fn#66830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1780, offset: 0x01c0b89e, size: 102 bytes, params: 1, frame: 16
const value = environment.__proto__;
const openCollectiblesShopMobile = CollectiblesActionCreatorsModule.openCollectiblesShopMobile;
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
Reflect.apply(openCollectiblesShopMobile, CollectiblesActionCreatorsModule,
[{analyticsLocations: analyticsLocations, analyticsSource: analyticsSource, screen: FEATURED_PAGE}]);
(ActionSheetActionCreators).hideActionSheet();
}
function EditCollectiblesListItemShop(a0) { // fn#66829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1691, offset: 0x01c0b70b, size: 403 bytes, params: 2, frame: 24
const analyticsSource = a0.analyticsSource;
const value = Object.create(null);
value.analyticsSource = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)(analyticsSource).analyticsLocations;
const binding = env0_3;
const useCallback = binding.useCallback;
const editCollectibleListItemBindingProps = {style: styles.optionCell, isSelected: false,
onPress: Reflect.apply(useCallback, binding, [_fun66830, [analyticsLocations, analyticsSource]]), ...value2};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const object = {source: importDefault(8412) /* metro dependency 8412 */};
const IconSizes = (require(1305) /* metro dependency 1305: native */).IconSizes;
const LARGE = IconSizes.LARGE;
object.size = LARGE;
const items2 = [<Icon {...object} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text variant="text-sm/medium" color="mobile-text-heading-primary" style={styles.optionCellText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}</Text>;
const NewBadge = (require(8413) /* metro dependency 8413: CollectiblesBadges */).NewBadge;
items2[2] = <NewBadge style={styles.newIcon} />;
return (
<EditCollectibleListItem {...editCollectibleListItemBindingProps}>
{items2}
</EditCollectibleListItem>
);
}
}
function EditCollectiblesListItemProduct(a0) { // fn#66831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:2308, offset: 0x01c0b904, size: 444 bytes, params: 2, frame: 27
const isSelected = a0.isSelected;
const isTryItOut = a0.isTryItOut;
const skuId = a0.skuId;
const children = a0.children;
const object2 = {'isSelected': 0, 'isTryItOut': 0, 'skuId': 0, 'children': 0};
const value = null;
silentSetPrototypeOf(object2, value, undefined);
const value2 = copyDataProperties({}, a0, object2, skuId);
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles(currentUser);
const {product, purchase} = (importDefault(8405) /* metro dependency 8405: useCollectiblesData */)(skuId);
const isProductNew2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isProductNew(skuId);
const r14 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product) || (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(purchase);
return (
<EditCollectibleListItem isSelected={isSelected} {...value2}>
{children}
{value != purchase || r14 ? r14 ? isTryItOut ? value : value == purchase ? ((PremiumBadge) => <PremiumBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).PremiumBadge) : canUseCollectibles2 ? value : ((PremiumBadge) => <PremiumBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).PremiumBadge) : value : ((LockBadge) => <LockBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).LockBadge)}
</EditCollectibleListItem>
);
}
function EditCollectiblesListItemProduct(a0) { // fn#66831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:2308, offset: 0x01c0b904, size: 444 bytes, params: 2, frame: 27
const isSelected = a0.isSelected;
const isTryItOut = a0.isTryItOut;
const skuId = a0.skuId;
const children = a0.children;
const object = {'isSelected': 0, 'isTryItOut': 0, 'skuId': 0, 'children': 0};
const value = null;
silentSetPrototypeOf(object, value, undefined);
const value2 = copyDataProperties({}, a0, object, skuId);
const styles = useStyles();
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const canUseCollectibles2 = (PremiumUtils).canUseCollectibles(currentUser);
const {product, purchase} = (UseCollectiblesData)(skuId);
const isProductNew2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isProductNew(skuId);
const r14 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(product) || (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesPurchase(purchase);
return (
<EditCollectibleListItem isSelected={isSelected} {...value2}>
{children}
{
value != purchase || r14
? (
r14
? (
isTryItOut
? value
: (
value == purchase
? ((PremiumBadge) => <PremiumBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).PremiumBadge)
: (
canUseCollectibles2
? value
: ((PremiumBadge) => <PremiumBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).PremiumBadge)
)
)
)
: value
)
: ((LockBadge) => <LockBadge style={styles.lockIcon} isNew={isProductNew2} />)((require(8413) /* metro dependency 8413: CollectiblesBadges */).LockBadge)
}
</EditCollectibleListItem>
);
}
function _fun66830() { // fn#66830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8595:1780, offset: 0x01c0b89e, size: 102 bytes, params: 1, frame: 16
const value = environment.__proto__;
const collectiblesActionCreatorsModule = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
const openCollectiblesShopMobile = collectiblesActionCreatorsModule.openCollectiblesShopMobile;
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
Reflect.apply(openCollectiblesShopMobile, collectiblesActionCreatorsModule,
[{analyticsLocations: analyticsLocations, analyticsSource: analyticsSource, screen: FEATURED_PAGE}]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun66825, 8410, [31, 27, 1878, 663, 33, 4501, 697, 5278, 4081, 4082, 1305, 8411, 4573, 1244, 6771, 5120,
4080, 8412, 8413, 566, 3802, 8405, 5134,
2]) /* metro module 8410, dependencies: [31, 27, 1878, 663, 33, 4501, 697, 5278, 4081, 4082, 1305, 8411, 4573, 1244, 6771, 5120, 4080, 8412, 8413, 566, 3802, 8405, 5134, 2] */;
@@ -1,90 +1,97 @@
/* Metro module 10092; source: modules/collectibles/native/CollectiblesItemMiniPreview.tsx; dependencies: [31, 27, 5126, 1902, 5127, 5128, 8504, 8471, 33, 697, 4501, 7596, 10031, 5475, 10032, 8474, 1901, 8483, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NameplateRecordModule from '../records/NameplateRecord.tsx'; /* Metro dependency 1902 */
import * as AvatarDecorationRecordModule from '../records/AvatarDecorationRecord.tsx'; /* Metro dependency 5126 */
import * as ProfileEffectRecordModule from '../records/ProfileEffectRecord.tsx'; /* Metro dependency 5127 */
import * as ProfileFrameRecordModule from '../records/ProfileFrameRecord.tsx'; /* Metro dependency 5128 */
import * as CollectiblesPreviewConstantsModule from './CollectiblesPreviewConstants.tsx'; /* Metro dependency 8471 */
import * as ProfileFrameConstantsModule from '../profile_frames/native/ProfileFrameConstants.tsx'; /* Metro dependency 8504 */
function _fun78842(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10278:6, offset: 0x01e375c5, size: 561 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(5126) /* metro dependency 5126: AvatarDecorationRecord */).isAvatarDecorationRecord;
const env0_5 = (require(1902) /* metro dependency 1902: NameplateRecord */).isNameplateRecord;
const env0_6 = (require(5127) /* metro dependency 5127: ProfileEffectRecord */).isProfileEffectRecord;
const env0_7 = (require(5128) /* metro dependency 5128: ProfileFrameRecord */).isProfileFrameRecord;
const env0_8 = (require(8504) /* metro dependency 8504: ProfileFrameConstants */).PROFILE_FRAME_ASPECT_RATIO;
const SAMPLE_PROFILE_ASPECT_RATIO = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).SAMPLE_PROFILE_ASPECT_RATIO;
let value = require(33) /* metro dependency 33 */;
ReactModule;
const SAMPLE_PROFILE_ASPECT_RATIO = (CollectiblesPreviewConstantsModule).SAMPLE_PROFILE_ASPECT_RATIO;
let value = JsxRuntimeModule;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {tile: {'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center'}};
object2.framePreview = {'width': '100%', 'height': '100%', 'paddingVertical': null, 'overflow': 'hidden',
object = {tile: {'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center'}};
object.framePreview = {'width': '100%', 'height': '100%', 'paddingVertical': null, 'overflow': 'hidden',
'alignItems': 'center', 'justifyContent': 'center', paddingVertical: PX_8};
const object4 = {'overflow': 'hidden', 'width': '100%', 'height': '100%'};
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.profileEffect = object4;
object2.sampleProfile = {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO, width: '100%'};
const object6 = {overflow: 'hidden'};
object6.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object6.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.nameplate = object6;
object2.nameplateTile = {alignItems: 'flex-start'};
object2.nameplateStrip = {'width': '90%', 'aspectRatio': 1.6, 'position': 'relative'};
const env0_12 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesItemMiniPreview.tsx');
const object3 = {'overflow': 'hidden', 'width': '100%', 'height': '100%'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.profileEffect = object3;
object.sampleProfile = {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO, width: '100%'};
const object5 = {overflow: 'hidden'};
object5.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object5.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.nameplate = object5;
object.nameplateTile = {alignItems: 'flex-start'};
object.nameplateStrip = {'width': '90%', 'aspectRatio': 1.6, 'position': 'relative'};
const env0_12 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesItemMiniPreview.tsx');
exports.default = CollectiblesItemMiniPreview;
function CollectiblesItemMiniPreview({item, size}) { // fn#78843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10278:940, offset: 0x01e377f6, size: 665 bytes, params: 2, frame: 26
var object;
var items2;
var value;
const styles = useStyles();
const items3 = [styles.tile];
items3[1] = {width: size, height: size};
if (isAvatarDecorationRecord(item)) {
return (
<View style={items3}>
{((Component) => <Component item={item} size={0.75 * size} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}
</View>
);
}
if (isProfileFrameRecord(item)) {
return (
<View style={items3}>
<View style={styles.framePreview}>
{((Component) => <Component profileFrame={item} previewWidth={size * PROFILE_FRAME_ASPECT_RATIO} previewHeight={size - 2 * PX_8} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}
</View>
</View>
);
}
if (isProfileEffectRecord(item)) {
object = {style: items3};
var viewBindingProps = {'style': null, 'accessible': false, 'importantForAccessibility': 'no',
style: styles.profileEffect};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: importDefault(10032) /* metro dependency 10032: sample_profile_small2xPng */}} style={styles.sampleProfile} resizeMode="cover" />)(value);
items2 = [value];
value = importDefault(8474) /* metro dependency 8474: ProfileEffect */;
items2[1] = ((Component) => <Component skuId={item.skuId} bannerAdjustment={0} useThumbnail />)(value);
return (
<View {...object}>
<View {...viewBindingProps}>
{items2}
</View>
</View>
);
}
if (isNameplateRecord(item)) {
return (
<View style={[items3, styles.nameplateTile]}>
<View style={styles.nameplateStrip}>
{((Component) => <Component nameplate={(require(1901) /* metro dependency 1901: utils */).getNameplateData(item)} fullOpacity style={styles.nameplate} />)(importDefault(8483) /* metro dependency 8483: Nameplate */)}
</View>
</View>
);
}
return null;
}
}
function CollectiblesItemMiniPreview({item, size}) { // fn#78843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10278:940, offset: 0x01e377f6, size: 665 bytes, params: 2, frame: 26
var object2;
var items2;
var value;
const styles = useStyles();
const items = [styles.tile];
items[1] = {width: size, height: size};
if (isAvatarDecorationRecord(item)) {
return (
<View style={items}>
{((Component) => <Component item={item} size={0.75 * size} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */)}
</View>
);
}
if (isProfileFrameRecord(item)) {
return (
<View style={items}>
<View style={styles.framePreview}>
{((Component) => <Component profileFrame={item} previewWidth={size * PROFILE_FRAME_ASPECT_RATIO} previewHeight={size - 2 * PX_8} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}
</View>
</View>
);
}
if (isProfileEffectRecord(item)) {
object2 = {style: items};
var viewBindingProps = {'style': null, 'accessible': false, 'importantForAccessibility': 'no',
style: styles.profileEffect};
value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component source={{uri: importDefault(10032) /* metro dependency 10032: sample_profile_small2xPng */}} style={styles.sampleProfile} resizeMode="cover" />)(value);
items2 = [value];
value = importDefault(8474) /* metro dependency 8474: ProfileEffect */;
items2[1] = ((Component) => <Component skuId={item.skuId} bannerAdjustment={0} useThumbnail />)(value);
return (
<View {...object2}>
<View {...viewBindingProps}>
{items2}
</View>
</View>
);
}
if (isNameplateRecord(item)) {
return (
<View style={[items, styles.nameplateTile]}>
<View style={styles.nameplateStrip}>
{((Component) => <Component nameplate={(require(1901) /* metro dependency 1901: utils */).getNameplateData(item)} fullOpacity style={styles.nameplate} />)(importDefault(8483) /* metro dependency 8483: Nameplate */)}
</View>
</View>
);
}
return null;
}
global.__d(_fun78842, 10092, [31, 27, 5126, 1902, 5127, 5128, 8504, 8471, 33, 697, 4501, 7596, 10031, 5475, 10032,
8474, 1901, 8483,
2]) /* metro module 10092, dependencies: [31, 27, 5126, 1902, 5127, 5128, 8504, 8471, 33, 697, 4501, 7596, 10031, 5475, 10032, 8474, 1901, 8483, 2] */;
@@ -1,196 +1,249 @@
/* Metro module 15298; source: modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx; dependencies: [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244, 15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578, 2] */
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import Announcement_sheet_framePng from '../../../external/discord_assets/assets/collectibles/frames/announcement_sheet_frame.png.js'; /* Metro dependency 15299 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as CollectiblesActionCreatorsModule from '../CollectiblesActionCreators.tsx'; /* Metro dependency 5120 */
import * as NativeModule from '../../../design/assets/native.tsx'; /* Metro dependency 5473 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as UseProfileFramesMarketingModule from '../hooks/useProfileFramesMarketing.tsx'; /* Metro dependency 15300 */
function _fun116984(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:6, offset: 0x0249ebb0, size: 609 bytes, params: 8, frame: 24
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Image;
const StyleSheet = value.StyleSheet;
const env0_5 = value.View;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_7 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
const env0_8 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object5 = {};
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['pointerEvents'] = 'none';
object5.mascotContainer = object6;
const object7 = {};
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
object5.mascotLayer = object7;
object5.mascotImage = {'width': '100%', 'aspectRatio': 1.8324022346368716};
object5.framePreviewImage = {'width': '100%', 'aspectRatio': 2.75, 'resizeMode': 'contain'};
object5.eaFramePreviewImage = {'width': '100%', 'aspectRatio': 3.25, 'resizeMode': 'contain'};
const object8 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.padding = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object8.paddingTop = PX_24;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.gap = PX_16;
object5.container = object8;
object5.headerText = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.featureRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_16};
object5.featureText = {flex: 1};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.featureRows = {gap: PX_32};
const env0_11 = Reflect.apply(createStyles, value, [object5]);
object5 = {code: 'function CollectiblesMobileAnnouncementActionSheetTsx1(){const{animatedPosition,safeAreaTop,MASCOT_SAFE_AREA_NUDGE}=this.__closure;return{transform:[{translateY:animatedPosition.get()+safeAreaTop-MASCOT_SAFE_AREA_NUDGE}]};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx');
exports.default = CollectiblesMobileAnnouncementActionSheet;
}
function CatEarsBackdrop() { // fn#116985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1111, offset: 0x0249ee11, size: 443 bytes, params: 1, frame: 24
const styles = useStyles();
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const moduleValue = require(6277) /* metro dependency 6277 */;
const useBottomSheet = moduleValue.useBottomSheet;
const animatedPosition = Reflect.apply(useBottomSheet, moduleValue, []).animatedPosition;
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const Math = global.Math;
const value2 = Math.min(width, ACTION_SHEET_MAX_WIDTH);
const value3 = (width - value2) / 2;
const value4 = value2 / 1200;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object2 = {};
object2.translateY = animatedPosition.get() + top - 60;
return {transform: [object2]};
};
closure.__closure = {animatedPosition: animatedPosition, safeAreaTop: top, MASCOT_SAFE_AREA_NUDGE: 60};
closure.__workletHash = 6274760278164;
closure.__initData = env0_12;
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const value6 = -(56 * value4);
return (
<View2 style={[styles.mascotContainer, {left: value3, right: value3}, value5]}>
<View style={[styles.mascotLayer, {top: -138 * value4, left: value6, right: value6}]}>
<Image
source={{uri: importDefault(15299) /* metro dependency 15299: announcement_sheet_framePng */}}
style={styles.mascotImage}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
/>
</View>
</View2>
);
}
function FeatureRow({icon, text}) { // fn#116987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1746, offset: 0x0249f002, size: 133 bytes, params: 2, frame: 20
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.featureRow}>
{icon}
<Text
variant="text-sm/medium"
color="text-subtle"
style={styles.featureText}
>
{text}
</Text>
</View>
);
}
function CollectiblesMobileAnnouncementActionSheet({markAsDismissed}) { // fn#116988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2052, offset: 0x0249f087, size: 1080 bytes, params: 2, frame: 36
const styles = useStyles();
const value2 = (require(15300) /* metro dependency 15300: useProfileFramesMarketing */).useProfileFramesMarketing('CollectiblesMobileAnnouncementActionSheet');
let showEaPremiumMarketing = value2.showEaPremiumMarketing;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r22 = showEaPremiumMarketing ? Reflect.apply(string, intl, [t['7cmcJI']]) : Reflect.apply(string, intl,
[t.MkVbBY]);
const showGiftingMarketing = value2.showGiftingMarketing;
showEaPremiumMarketing = value2.showEaPremiumMarketing;
const showEaNonPremiumMarketing = value2.showEaNonPremiumMarketing;
string = intl.string;
const r20 = showGiftingMarketing ? Reflect.apply(string, intl,
[t['/4bQuG']]) : showEaPremiumMarketing ? Reflect.apply(string, intl,
[t['5UI+bw']]) : showEaNonPremiumMarketing ? Reflect.apply(string, intl, [t['4a7pVU']]) : Reflect.apply(string,
intl, [t['+9vaAT']]);
const binding = env0_3;
const env0_1 = binding.useRef(false);
const env0_2 = binding.useRef(markAsDismissed);
binding.useEffect(_fun116989, [markAsDismissed]);
binding.useEffect(function() {
return _fun116991;
}, []);
const value9 = binding.useCallback(_fun116992, [markAsDismissed]);
const value10 = binding.useCallback(_fun116993, [markAsDismissed]);
const value11 = binding.useMemo(_fun116994, []);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object = {};
object.uri = value2.isEarlyAccess ? importDefault(15302) /* metro dependency 15302: announcement_key_1Png */ : importDefault(15303) /* metro dependency 15303: mobile_announcementPng */;
const items3 = [<Image source={object} style={value2.isEarlyAccess ? styles.eaFramePreviewImage : styles.framePreviewImage} accessibilityElementsHidden importantForAccessibility="no-hide-descendants" />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items3[1] = <Text variant="heading-xl/bold" color="text-strong" accessibilityRole="header" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vRCvqo)}</Text>;
const PaintIllocon = (require(5473) /* metro dependency 5473: native */).PaintIllocon;
const items2 = [<FeatureRow icon={<PaintIllocon size={32} />} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6ZWB0C'])} />];
const HeartIllocon = (require(5473) /* metro dependency 5473: native */).HeartIllocon;
items2[1] = <FeatureRow icon={<HeartIllocon size={32} />} text={r22} />;
const ShopIllocon = (require(5473) /* metro dependency 5473: native */).ShopIllocon;
items2[2] = <FeatureRow icon={<ShopIllocon size={32} />} text={r20} />;
items3[2] = <View style={styles.featureRows}>{items2}</View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const S9hXPI = (require(1244) /* metro dependency 1244: indexNative */).t.S9hXPI;
items3[3] = <Button size="lg" text={Reflect.apply(string, intl, [S9hXPI])} onPress={value9} />;
return (
<BottomSheet onDismiss={value10} backdropChildren={value11}>
<View style={styles.container}>
{items3}
</View>
</BottomSheet>
);
}
function _fun116990() { // fn#116990, offset: 0x0249f4bf, size: 11 bytes, params: 1, frame: 1
return _fun116991;
}
function _fun116992() { // fn#116992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2816, offset: 0x0249f4f8, size: 125 bytes, params: 1, frame: 15
env0_1.current = true;
const markAsDismissedBinding = markAsDismissed;
const PRIMARY = ContentDismissActionType.PRIMARY;
markAsDismissedBinding(PRIMARY);
const collectiblesActionCreatorsModule = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
const openCollectiblesShopMobile = collectiblesActionCreatorsModule.openCollectiblesShopMobile;
object = {};
const object2 = {};
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
object2.screen = FEATURED_PAGE;
object2.analyticsLocations = [];
const ACTION_SHEET = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).ACTION_SHEET;
object2.analyticsSource = ACTION_SHEET;
Reflect.apply(openCollectiblesShopMobile, collectiblesActionCreatorsModule, [object2]);
}
function _fun116993() { // fn#116993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2993, offset: 0x0249f575, size: 41 bytes, params: 1, frame: 11
env0_1.current = true;
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
}
function _fun116991() { // fn#116991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2747, offset: 0x0249f4ca, size: 46 bytes, params: 1, frame: 11
var binding;
let current = env1_1.current;
if (!current) {
binding = env1_2;
current = binding.current;
value = environment.__proto__.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['pointerEvents'] = 'none';
object.mascotContainer = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object.mascotLayer = object3;
object.mascotImage = {'width': '100%', 'aspectRatio': 1.8324022346368716};
object.framePreviewImage = {'width': '100%', 'aspectRatio': 2.75, 'resizeMode': 'contain'};
object.eaFramePreviewImage = {'width': '100%', 'aspectRatio': 3.25, 'resizeMode': 'contain'};
const object4 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object4.paddingTop = PX_24;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.gap = PX_16;
object.container = object4;
object.headerText = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.featureRow = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_16};
object.featureText = {flex: 1};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object.featureRows = {gap: PX_32};
const env0_11 = Reflect.apply(createStyles, value, [object]);
object = {code: 'function CollectiblesMobileAnnouncementActionSheetTsx1(){const{animatedPosition,safeAreaTop,MASCOT_SAFE_AREA_NUDGE}=this.__closure;return{transform:[{translateY:animatedPosition.get()+safeAreaTop-MASCOT_SAFE_AREA_NUDGE}]};}'};
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesMobileAnnouncementActionSheet.tsx');
exports.default = CollectiblesMobileAnnouncementActionSheet;
function CatEarsBackdrop() { // fn#116985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1111, offset: 0x0249ee11, size: 443 bytes, params: 1, frame: 24
const styles = useStyles();
const width = (UseWindowDimensionsNative)().width;
const useBottomSheet = Module06277Module.useBottomSheet;
const animatedPosition = Reflect.apply(useBottomSheet, Module06277Module, []).animatedPosition;
const top = (UseSafeAreaInsetsNative)().top;
const Math = global.Math;
const value2 = Math.min(width, ACTION_SHEET_MAX_WIDTH);
const value3 = (width - value2) / 2;
const value4 = value2 / 1200;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const closure = function() {
var object2 = {};
object2.translateY = animatedPosition.get() + top - 60;
return {transform: [object2]};
};
closure.__closure = {animatedPosition: animatedPosition, safeAreaTop: top, MASCOT_SAFE_AREA_NUDGE: 60};
closure.__workletHash = 6274760278164;
closure.__initData = env0_12;
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
const View2 = (ReanimatedRexport).View;
const value6 = -(56 * value4);
return (
<View2 style={[styles.mascotContainer, {left: value3, right: value3}, value5]}>
<View style={[styles.mascotLayer, {top: -138 * value4, left: value6, right: value6}]}>
<Image
source={{uri: Announcement_sheet_framePng}}
style={styles.mascotImage}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
/>
</View>
</View2>
);
}
function FeatureRow({icon, text}) { // fn#116987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:1746, offset: 0x0249f002, size: 133 bytes, params: 2, frame: 20
const styles = useStyles();
const Text = (TextModule).Text;
return (
<View style={styles.featureRow}>
{icon}
<Text
variant="text-sm/medium"
color="text-subtle"
style={styles.featureText}
>
{text}
</Text>
</View>
);
}
function CollectiblesMobileAnnouncementActionSheet({markAsDismissed}) { // fn#116988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2052, offset: 0x0249f087, size: 1080 bytes, params: 2, frame: 36
const styles = useStyles();
const value2 = (UseProfileFramesMarketingModule).useProfileFramesMarketing('CollectiblesMobileAnnouncementActionSheet');
let showEaPremiumMarketing = value2.showEaPremiumMarketing;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r22 = showEaPremiumMarketing ? Reflect.apply(string, intl, [t['7cmcJI']]) : Reflect.apply(string, intl,
[t.MkVbBY]);
const showGiftingMarketing = value2.showGiftingMarketing;
showEaPremiumMarketing = value2.showEaPremiumMarketing;
const showEaNonPremiumMarketing = value2.showEaNonPremiumMarketing;
string = intl.string;
const r20 = showGiftingMarketing ? Reflect.apply(string, intl,
[t['/4bQuG']]) : showEaPremiumMarketing ? Reflect.apply(string, intl,
[t['5UI+bw']]) : showEaNonPremiumMarketing ? Reflect.apply(string, intl, [t['4a7pVU']]) : Reflect.apply(string,
intl, [t['+9vaAT']]);
const env0_1 = ReactModule.useRef(false);
const env0_2 = ReactModule.useRef(markAsDismissed);
ReactModule.useEffect(_fun116989, [markAsDismissed]);
ReactModule.useEffect(function() {
return _fun116991;
}, []);
const value9 = ReactModule.useCallback(_fun116992, [markAsDismissed]);
const value10 = ReactModule.useCallback(_fun116993, [markAsDismissed]);
const value11 = ReactModule.useMemo(_fun116994, []);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object2 = {};
object2.uri = value2.isEarlyAccess ? importDefault(15302) /* metro dependency 15302: announcement_key_1Png */ : importDefault(15303) /* metro dependency 15303: mobile_announcementPng */;
const items3 = [
<Image
source={object2}
style={value2.isEarlyAccess ? styles.eaFramePreviewImage : styles.framePreviewImage}
accessibilityElementsHidden
importantForAccessibility="no-hide-descendants"
/>,
];
const Text = (TextModule).Text;
items3[1] = (
<Text
variant="heading-xl/bold"
color="text-strong"
accessibilityRole="header"
style={styles.headerText}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vRCvqo)}
</Text>
);
const PaintIllocon = (NativeModule).PaintIllocon;
const items2 = [
<FeatureRow
icon={<PaintIllocon size={32} />}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6ZWB0C'])}
/>,
];
const HeartIllocon = (NativeModule).HeartIllocon;
items2[1] = <FeatureRow icon={<HeartIllocon size={32} />} text={r22} />;
const ShopIllocon = (NativeModule).ShopIllocon;
items2[2] = <FeatureRow icon={<ShopIllocon size={32} />} text={r20} />;
items3[2] = (
<View style={styles.featureRows}>
{items2}
</View>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const S9hXPI = (require(1244) /* metro dependency 1244: indexNative */).t.S9hXPI;
items3[3] = (
<Button
size="lg"
text={Reflect.apply(string, intl, [S9hXPI])}
onPress={value9}
/>
);
return (
<BottomSheet onDismiss={value10} backdropChildren={value11}>
<View style={styles.container}>
{items3}
</View>
</BottomSheet>
);
function _fun116989() { // fn#116989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2706, offset: 0x010cb3d0, size: 21 bytes, params: 1, frame: 2
env0_2.current = markAsDismissed;
}
function _fun116990() { // fn#116990, offset: 0x0249f4bf, size: 11 bytes, params: 1, frame: 1
return _fun116991;
function _fun116991() { // fn#116991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2747, offset: 0x0249f4ca, size: 46 bytes, params: 1, frame: 11
var binding;
let current = env1_1.current;
if (!current) {
binding = env1_2;
current = binding.current;
value = environment.__proto__.__proto__;
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
}
}
}
function _fun116992() { // fn#116992, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2816, offset: 0x0249f4f8, size: 125 bytes, params: 1, frame: 15
env0_1.current = true;
const markAsDismissedBinding = markAsDismissed;
const PRIMARY = ContentDismissActionType.PRIMARY;
markAsDismissedBinding(PRIMARY);
const openCollectiblesShopMobile = CollectiblesActionCreatorsModule.openCollectiblesShopMobile;
const object = {};
const FEATURED_PAGE = CollectiblesMobileShopScreen.FEATURED_PAGE;
object.screen = FEATURED_PAGE;
object.analyticsLocations = [];
const ACTION_SHEET = (AnalyticsLocation).ACTION_SHEET;
object.analyticsSource = ACTION_SHEET;
Reflect.apply(openCollectiblesShopMobile, CollectiblesActionCreatorsModule, [object]);
}
function _fun116993() { // fn#116993, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:2993, offset: 0x0249f575, size: 41 bytes, params: 1, frame: 11
env0_1.current = true;
const markAsDismissedBinding = markAsDismissed;
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
markAsDismissedBinding(USER_DISMISS);
}
function _fun116994() { // fn#116994, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15495:3049, offset: 0x01d70d8a, size: 23 bytes, params: 1, frame: 13
return <CatEarsBackdrop />;
}
}
}
global.__d(_fun116984, 15298, [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244,
15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578,
2]) /* metro module 15298, dependencies: [31, 27, 663, 6276, 1376, 33, 4501, 697, 1478, 6277, 1585, 4017, 15299, 4573, 1244, 15300, 5120, 6789, 6275, 15302, 15303, 5473, 4578, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 8471; source: modules/collectibles/native/CollectiblesPreviewConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun67268(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8656:6, offset: 0x01c1c588, size: 134 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesPreviewConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesPreviewConstants.tsx');
exports.SAMPLE_PROFILE_ASPECT_RATIO = 0.5113636363636364;
exports.BUNDLE_PREVIEW_CONFIG = {small: {'bundleWidth': 140, 'bundleHeight': 280, 'pfxWidth': 80, 'pfxHeight': 120,
'pfxTop': 70, 'pfxLeft': 16, 'avatarTop': 130, 'avatarRight': 40, 'avatarWithNameplateTop': 110,
@@ -13,3 +15,4 @@ function _fun67268(global, require, importDefault, importAll, module, exports, d
'nameplatePreviewWidth': 130, 'avatarDecorationSize': 140, 'avatarDecorationSizeTriple': 140}};
}
global.__d(_fun67268, 8471, [2]) /* metro module 8471, dependencies: [2] */;
@@ -1,50 +1,55 @@
/* Metro module 14084; source: modules/collectibles/native/CollectiblesProgressiveImage.tsx; dependencies: [31, 27, 33, 4017, 4504, 2] */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
function _fun106716(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:6, offset: 0x022e8012, size: 169 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 value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.StyleSheet;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesProgressiveImage.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesProgressiveImage.tsx');
exports.CollectiblesProgressiveImage = CollectiblesProgressiveImage;
function CollectiblesProgressiveImage(a0) { // fn#106717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:277, offset: 0x022e80bb, size: 204 bytes, params: 2, frame: 22
const source = a0.source;
const style = a0.style;
const value = Object.create(null);
value.source = 0;
value.style = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = (ReanimatedRexportModule).useSharedValue(0);
const Image = (ReanimatedRexport).Image;
const imageProps = {...value2};
imageProps['source'] = source;
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, value);
object2['opacity'] = value4;
imageProps['style'] = object2;
imageProps['onLoad'] = CollectiblesProgressiveImageOnLoad;
return (
<View style={style}>
<Image {...imageProps} />
</View>
);
function CollectiblesProgressiveImageOnLoad() { // fn#106718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:481, owner: CollectiblesProgressiveImage.onLoad, offset: 0x022e8187, size: 125 bytes, params: 1, frame: 20
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const Easing = (ReanimatedRexportModule).Easing;
const inOut = Easing.inOut;
const Easing2 = (ReanimatedRexportModule).Easing;
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, {duration: 500, easing: Reflect.apply(inOut,
Easing, [Easing2.ease])}])]);
}
}
}
function CollectiblesProgressiveImage(a0) { // fn#106717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:277, offset: 0x022e80bb, size: 204 bytes, params: 2, frame: 22
const source = a0.source;
const style = a0.style;
const value = Object.create(null);
value.source = 0;
value.style = 0;
const value2 = copyDataProperties({}, a0, value, undefined);
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const Image = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).Image;
const imageProps = {...value2};
imageProps['source'] = source;
const object = {};
copyDataProperties(object, StyleSheet.absoluteFillObject, value);
object['opacity'] = value4;
imageProps['style'] = object;
imageProps['onLoad'] = CollectiblesProgressiveImageOnLoad;
return (
<View style={style}>
<Image {...imageProps} />
</View>
);
}
function CollectiblesProgressiveImageOnLoad() { // fn#106718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14281:481, owner: CollectiblesProgressiveImage.onLoad, offset: 0x022e8187, size: 125 bytes, params: 1, frame: 20
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
const withTiming = value.withTiming;
const Easing = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
const inOut = Easing.inOut;
const Easing2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Easing;
Reflect.apply(set, binding, [Reflect.apply(withTiming, value, [1, {duration: 500, easing: Reflect.apply(inOut,
Easing, [Easing2.ease])}])]);
}
global.__d(_fun106716, 14084, [31, 27, 33, 4017, 4504,
2]) /* metro module 14084, dependencies: [31, 27, 33, 4017, 4504, 2] */;
@@ -1,179 +1,186 @@
/* Metro module 10062; source: modules/collectibles/native/CollectiblesShopCardAssetTileV2.tsx; dependencies: [57, 31, 27, 663, 33, 10020, 697, 4501, 9294, 6705, 5133, 1904, 7609, 10030, 8470, 5475, 10063, 10064, 7596, 8472, 10031, 10050, 4000, 3860, 10021, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ColorUtilsModule from '../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as LockIconModule from '../../../design/components/Icon/native/redesign/generated/LockIcon.tsx'; /* Metro dependency 6705 */
import * as UseShopProductItemsModule from '../hooks/useShopProductItems.tsx'; /* Metro dependency 7609 */
import * as CheckmarkLargeBoldIconModule from '../../../design/components/Icon/native/redesign/generated/CheckmarkLargeBoldIcon.tsx'; /* Metro dependency 9294 */
import * as CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
function _fun78656(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:6, offset: 0x01e2fc7b, size: 625 bytes, params: 8, frame: 27
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const StyleSheet = value2.StyleSheet;
const env0_4 = value2.View;
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).EXTERNAL_PRODUCT_SKU_IDS;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const COLLECTIBLES_SHOP_CARD_HEIGHT = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_HEIGHT;
let value = ReactModule;
const StyleSheet = ReactNativeModule.StyleSheet;
const COLLECTIBLES_SHOP_CARD_HEIGHT = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_HEIGHT;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const value4 = COLLECTIBLES_SHOP_CARD_HEIGHT - 2 * PX_16;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object4 = {};
const object5 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden',
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden',
'height': '100%', 'width': '100%'};
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.assetContainer = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['justifyContent'] = 'center';
object6['alignItems'] = 'center';
object6['width'] = '100%';
object6['height'] = '75%';
object4.overlayContainer = object6;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.assetContainer = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['justifyContent'] = 'center';
object3['alignItems'] = 'center';
object3['width'] = '100%';
object3['height'] = '75%';
object.overlayContainer = object3;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.profileEffectContainer = {'width': '100%', 'height': '100%', backgroundColor: BACKGROUND_BASE_LOW};
object4.profileFrameContainer = {'width': '100%', 'height': null, 'alignItems': 'center', height: value4};
object4.externalProductImage = {'width': 80, 'height': 80, 'resizeMode': 'contain'};
object4.purchasedOrDisabled = {opacity: 0.4};
object.profileEffectContainer = {'width': '100%', 'height': '100%', backgroundColor: BACKGROUND_BASE_LOW};
object.profileFrameContainer = {'width': '100%', 'height': null, 'alignItems': 'center', height: value4};
object.externalProductImage = {'width': 80, 'height': 80, 'resizeMode': 'contain'};
object.purchasedOrDisabled = {opacity: 0.4};
const ICON_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.ICON_STRONG;
object4.overlayIcon = {'position': 'absolute', 'opacity': 1, 'color': null, 'fontWeight': 'bold',
color: ICON_STRONG};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object4]);
object.overlayIcon = {'position': 'absolute', 'opacity': 1, 'color': null, 'fontWeight': 'bold', color: ICON_STRONG};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun78662);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardAssetTileV2.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardAssetTileV2.tsx');
exports.default = value;
}
function PurchasedAssetOverlay() { // fn#78657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:946, offset: 0x01e2feec, size: 97 bytes, params: 1, frame: 17
const styles = useStyles();
const CheckmarkLargeBoldIcon = (CheckmarkLargeBoldIconModule).CheckmarkLargeBoldIcon;
return (
<View style={styles.overlayContainer}>
<CheckmarkLargeBoldIcon size="lg" style={styles.overlayIcon} />
</View>
);
}
function PurchasedAssetOverlay() { // fn#78657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:946, offset: 0x01e2feec, size: 97 bytes, params: 1, frame: 17
const styles = useStyles();
const CheckmarkLargeBoldIcon = (require(9294) /* metro dependency 9294: CheckmarkLargeBoldIcon */).CheckmarkLargeBoldIcon;
return (
<View style={styles.overlayContainer}>
<CheckmarkLargeBoldIcon size="lg" style={styles.overlayIcon} />
</View>
);
}
function DisabledAssetOverlay() { // fn#78658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1097, offset: 0x01e2ff4d, size: 97 bytes, params: 1, frame: 17
const styles = useStyles();
const LockIcon = (LockIconModule).LockIcon;
return (
<View style={styles.overlayContainer}>
<LockIcon size="lg" style={styles.overlayIcon} />
</View>
);
}
function DisabledAssetOverlay() { // fn#78658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1097, offset: 0x01e2ff4d, size: 97 bytes, params: 1, frame: 17
const styles = useStyles();
const LockIcon = (require(6705) /* metro dependency 6705: LockIcon */).LockIcon;
return (
<View style={styles.overlayContainer}>
<LockIcon size="lg" style={styles.overlayIcon} />
</View>
);
}
function ProductPreview({product, isPurchased, isDisabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1228, offset: 0x01e2ffae, size: 298 bytes, params: 2, frame: 23
const styles = useStyles();
const productType = (CollectiblesProductUtilsModule).getProductType(product);
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
return (
<View
style={[styles.overlayContainer, (isPurchased || isDisabled) && styles.purchasedOrDisabled,
{height: productType === PROFILE_EFFECT || productType === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? '100%' : product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE ? '75%' : '100%'}]}
renderToHardwareTextureAndroid
needsOffscreenAlphaCompositing
>
<ProductPreviewInner
product={product}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
/>
</View>
);
}
function ProductPreview({product, isPurchased, isDisabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1228, offset: 0x01e2ffae, size: 298 bytes, params: 2, frame: 23
const styles = useStyles();
const productType = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product);
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
return (
<View
style={[styles.overlayContainer, (isPurchased || isDisabled) && styles.purchasedOrDisabled,
{height: productType === PROFILE_EFFECT || productType === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? '100%' : product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.BUNDLE ? '75%' : '100%'}]}
renderToHardwareTextureAndroid
needsOffscreenAlphaCompositing
>
<ProductPreviewInner
product={product}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
/>
</View>
);
}
function ProductPreviewInner({product, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1807, offset: 0x01e300d8, size: 895 bytes, params: 2, frame: 29
const styles = useStyles();
const {firstProfileEffect, firstAvatarDecoration,
firstNameplate} = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
let type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type === BUNDLE) {
var moduleValue2 = require(10030) /* metro dependency 10030: bundleUtils */;
if (moduleValue2.isValidCollectiblesBundle(product)) {
return ((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} size="small" previewAssets={product.previewAssets} disableStaticBackground={disableBundleStaticBackground} mutedStaticBackground={muteBundleStaticBackground} />)(importDefault(8470) /* metro dependency 8470: BundleSampleV2 */);
function ProductPreviewInner({product, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:1807, offset: 0x01e300d8, size: 895 bytes, params: 2, frame: 29
const styles = useStyles();
const {firstProfileEffect, firstAvatarDecoration,
firstNameplate} = (UseShopProductItemsModule).useShopProductItems(product);
let type = product.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const BUNDLE = CollectiblesItemType.BUNDLE;
if (type === BUNDLE) {
var moduleValue2 = require(10030) /* metro dependency 10030: bundleUtils */;
if (moduleValue2.isValidCollectiblesBundle(product)) {
return ((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} size="small" previewAssets={product.previewAssets} disableStaticBackground={disableBundleStaticBackground} mutedStaticBackground={muteBundleStaticBackground} />)(importDefault(8470) /* metro dependency 8470: BundleSampleV2 */);
}
}
let skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
skuId = product.skuId;
const FRACTIONAL_PREMIUM = EXTERNAL_PRODUCT_SKU_IDS.FRACTIONAL_PREMIUM;
if (skuId === FRACTIONAL_PREMIUM) {
return ((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const property = Module00057(product.items, 1)[0];
type = property?.type;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return ((Component) => <Component item={property} size={100} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return (
<View style={styles.profileEffectContainer}>
{((Component) => <Component item={property} hideBackground />)(importDefault(8472) /* metro dependency 8472: ProfileEffectSampleV2 */)}
</View>
);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return (
<View style={styles.profileFrameContainer}>
{((Component) => <Component profileFrame={property} previewWidth={(require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH - (importDefault(697) /* metro dependency 697: native */).space.PX_32} previewHeight={env0_8} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}
</View>
);
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return ((Component) => <Component item={property} />)(importDefault(10050) /* metro dependency 10050: NameplateCardPreview */);
}
return null;
}
let skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
skuId = product.skuId;
const FRACTIONAL_PREMIUM = EXTERNAL_PRODUCT_SKU_IDS.FRACTIONAL_PREMIUM;
if (skuId === FRACTIONAL_PREMIUM) {
return ((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const property = env0_3(product.items, 1)[0];
type = property?.type;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return ((Component) => <Component item={property} size={100} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
function AssetTileInternal({children, solidBackground}) { // fn#78661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:3107, offset: 0x01e30457, size: 215 bytes, params: 2, frame: 23
solidBackground = !(solidBackground === undefined) && solidBackground;
const styles = useStyles();
const hexToRgbaString = ColorUtilsModule.hexToRgbaString;
const hexWithOpacity = ColorUtilsModule.hexWithOpacity;
const useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
return (
<View style={styles.profileEffectContainer}>
{((Component) => <Component item={property} hideBackground />)(importDefault(8472) /* metro dependency 8472: ProfileEffectSampleV2 */)}
<View
style={[styles.assetContainer, {backgroundColor: Reflect.apply(hexToRgbaString, ColorUtilsModule,
[Reflect.apply(hexWithOpacity, ColorUtilsModule, [Reflect.apply(useToken, UseTokenModule,
[BACKGROUND_BASE_LOW]), solidBackground ? 1 : 0.8])])}]}
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden
>
{children}
</View>
);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
function _fun78662({product, isPurchased, solidBackground, isDisabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:3429, offset: 0x01e3052e, size: 230 bytes, params: 2, frame: 22
return (
<View style={styles.profileFrameContainer}>
{((Component) => <Component profileFrame={property} previewWidth={(require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_WIDTH - (importDefault(697) /* metro dependency 697: native */).space.PX_32} previewHeight={env0_8} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */)}
</View>
<AssetTileInternal solidBackground={solidBackground}>
<ProductPreview
product={(require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product))}
isPurchased={isPurchased}
isDisabled={isDisabled}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
/>
{isPurchased && <PurchasedAssetOverlay />}
{isDisabled && !isPurchased && <DisabledAssetOverlay />}
</AssetTileInternal>
);
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return ((Component) => <Component item={property} />)(importDefault(10050) /* metro dependency 10050: NameplateCardPreview */);
}
return null;
}
function AssetTileInternal({children, solidBackground}) { // fn#78661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:3107, offset: 0x01e30457, size: 215 bytes, params: 2, frame: 23
solidBackground = !(solidBackground === undefined) && solidBackground;
const styles = useStyles();
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const hexToRgbaString = colorUtilsModule.hexToRgbaString;
const moduleValue2 = colorUtilsModule;
const hexWithOpacity = moduleValue2.hexWithOpacity;
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
return (
<View
style={[styles.assetContainer, {backgroundColor: Reflect.apply(hexToRgbaString, colorUtilsModule,
[Reflect.apply(hexWithOpacity, moduleValue2, [Reflect.apply(useToken, useTokenModule,
[BACKGROUND_BASE_LOW]), solidBackground ? 1 : 0.8])])}]}
importantForAccessibility="no-hide-descendants"
accessibilityElementsHidden
>
{children}
</View>
);
}
function _fun78662({product, isPurchased, solidBackground, isDisabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10248:3429, offset: 0x01e3052e, size: 230 bytes, params: 2, frame: 22
return (
<AssetTileInternal solidBackground={solidBackground}>
<ProductPreview
product={(require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product))}
isPurchased={isPurchased}
isDisabled={isDisabled}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
/>
{isPurchased && <PurchasedAssetOverlay />}
{isDisabled && !isPurchased && <DisabledAssetOverlay />}
</AssetTileInternal>
);
}
global.__d(_fun78656, 10062, [57, 31, 27, 663, 33, 10020, 697, 4501, 9294, 6705, 5133, 1904, 7609, 10030, 8470,
5475, 10063, 10064, 7596, 8472, 10031, 10050, 4000, 3860, 10021,
2]) /* metro module 10062, dependencies: [57, 31, 27, 663, 33, 10020, 697, 4501, 9294, 6705, 5133, 1904, 7609, 10030, 8470, 5475, 10063, 10064, 7596, 8472, 10031, 10050, 4000, 3860, 10021, 2] */;
@@ -1,327 +1,448 @@
/* Metro module 10065; source: modules/collectibles/native/CollectiblesShopCardCardDetailsV2.tsx; dependencies: [31, 27, 5140, 661, 33, 4501, 697, 10021, 5133, 10066, 5134, 10069, 10075, 4573, 1244, 10076, 477, 10078, 7954, 7594, 10054, 1904, 3802, 3860, 4000, 10080, 566, 4589, 10081, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import defaultImport2 from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as UseTokenModule from '../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ColorUtilsModule from '../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseDefaultVariantIndexModule from '../hooks/useDefaultVariantIndex.tsx'; /* Metro dependency 10021 */
import * as CollectiblesUtilsModule2 from './CollectiblesUtils.tsx'; /* Metro dependency 10066 */
import * as HooksModule from '../../virtual_currency/hooks/index.tsx'; /* Metro dependency 10069 */
import * as GetProductNameModule from '../utils/getProductName.tsx'; /* Metro dependency 10080 */
function _fun78665(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:6, offset: 0x01e306e2, size: 482 bytes, params: 8, frame: 27
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {'position': 'absolute', 'height': '45%', 'width': '100%', 'padding': 10, 'flex': 1, 'bottom': 0,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'position': 'absolute', 'height': '45%', 'width': '100%', 'padding': 10, 'flex': 1, 'bottom': 0,
'overflow': 'hidden', 'borderBottomLeftRadius': null, 'borderBottomRightRadius': null, 'display': 'flex',
'flexDirection': 'column', 'justifyContent': 'flex-end'};
object4.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.regularMetadataContainer = object4;
object3.assetName = {marginBottom: 4};
object2.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.regularMetadataContainer = object2;
object.assetName = {marginBottom: 4};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.priceVariantsContainer = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between',
object.priceVariantsContainer = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'center', 'width': '100%', gap: PX_4};
object3.priceDescription = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
object3.text = {flexShrink: 1};
object3.discountPercentage = {paddingLeft: 3};
object3.wheelIcon = {'marginTop': 0, 'marginRight': 3};
object3.androidTextPadding = {paddingBottom: 2};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
object.priceDescription = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flex': 1};
object.text = {flexShrink: 1};
object.discountPercentage = {paddingLeft: 3};
object.wheelIcon = {'marginTop': 0, 'marginRight': 3};
object.androidTextPadding = {paddingBottom: 2};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value.memo(_fun78666).displayName = 'PriceDescription';
value = value.memo(_fun78670);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardCardDetailsV2.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardCardDetailsV2.tsx');
exports.default = value;
}
function _fun78666({product, hasShopDiscount, discountSource, styles, collectibleProductState, isFetchingGoogleSkus, preferVCPrice, isDisabled}) { // fn#78666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:869, offset: 0x01e308c4, size: 1878 bytes, params: 2, frame: 32
var r8;
var r1;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var W4DfeF;
var amount;
var items3;
var items4;
var items5;
var value13;
var items6;
var value;
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product));
const formattedPriceForCollectiblesProduct = (require(10066) /* metro dependency 10066: CollectiblesUtils */).getFormattedPriceForCollectiblesProduct(selectedProduct,
hasShopDiscount, true);
const binding = env0_3;
const useMemo = binding.useMemo;
let object = [selectedProduct, hasShopDiscount];
const value6 = Reflect.apply(useMemo, binding, [_fun78667, object]);
const value7 = binding.useMemo(_fun78668, [selectedProduct, hasShopDiscount]);
const hooksModule = require(10069) /* metro dependency 10069: hooks */;
const useFetchVirtualCurrencyBalance = hooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, hooksModule, []).balance;
const value8 = binding.useMemo(_fun78669, [balance, value6]);
if (isFetchingGoogleSkus) {
if (formattedPriceForCollectiblesProduct == null) {
const CollectiblesShopPricePlaceholder = (require(10075) /* metro dependency 10075: CollectiblesShopPricePlaceholder */).CollectiblesShopPricePlaceholder;
return <CollectiblesShopPricePlaceholder />;
function _fun78666({product, hasShopDiscount, discountSource, styles, collectibleProductState, isFetchingGoogleSkus, preferVCPrice, isDisabled}) { // fn#78666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:869, offset: 0x01e308c4, size: 1878 bytes, params: 2, frame: 32
var r8;
var r1;
var items2;
const Text = (TextModule).Text;
var object3;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
var W4DfeF;
var amount;
var items3;
var items4;
var items5;
var value13;
var items6;
var value;
const selectedProduct = (CollectiblesProductUtilsModule).getSelectedProduct(product,
(UseDefaultVariantIndexModule).useDefaultVariantIndex(product));
const formattedPriceForCollectiblesProduct = (CollectiblesUtilsModule2).getFormattedPriceForCollectiblesProduct(selectedProduct,
hasShopDiscount, true);
const binding = env0_3;
const useMemo = binding.useMemo;
let object = [selectedProduct, hasShopDiscount];
const value6 = Reflect.apply(useMemo, binding, [_fun78667, object]);
const value7 = binding.useMemo(_fun78668, [selectedProduct, hasShopDiscount]);
const useFetchVirtualCurrencyBalance = HooksModule.useFetchVirtualCurrencyBalance;
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, HooksModule, []).balance;
const value8 = binding.useMemo(_fun78669, [balance, value6]);
if (isFetchingGoogleSkus) {
if (formattedPriceForCollectiblesProduct == null) {
const CollectiblesShopPricePlaceholder = (require(10075) /* metro dependency 10075: CollectiblesShopPricePlaceholder */).CollectiblesShopPricePlaceholder;
return <CollectiblesShopPricePlaceholder />;
}
}
}
if (collectibleProductState === 'partiallyOwnedBundle') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BEjTij)}
</Text>
</View>
);
}
if (collectibleProductState === 'purchased') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6cfuDj'])}
</Text>
</View>
);
}
if (collectibleProductState === 'nitroUpsell') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sEAnVH)}
</Text>
</View>
);
}
if (collectibleProductState === 'nitroClaim') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rt69oo)}
</Text>
</View>
);
}
if (isDisabled) {
r1 = <View style={styles.priceDescription}><Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={styles.text}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wu4gyV)}</Text></View>;
} else {
if (value6 == null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = <Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={items5}>{formattedPriceForCollectiblesProduct}</Text>;
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = <Text style={items6} color="text-feedback-positive" variant="text-xs/semibold" lineClamp={1}>{'-' + value7 + '%'}</Text>;
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
} else if (balance == null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = <Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={items5}>{formattedPriceForCollectiblesProduct}</Text>;
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = <Text style={items6} color="text-feedback-positive" variant="text-xs/semibold" lineClamp={1}>{'-' + value7 + '%'}</Text>;
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
} else if (preferVCPrice === true) {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = <OrbsIcon size="xxs" color="mobile-text-heading-primary" style={styles.wheelIcon} />;
items2 = [value];
object2 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object2.style = items3;
amount = value6.amount;
items2[1] = <Text {...object2}>{amount}</Text>;
object.children = items2;
r1 = object;
} else if (value8) {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon2 = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = <OrbsIcon2 size="xxs" color="mobile-text-heading-primary" style={styles.wheelIcon} />;
items2 = [value];
object2 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object2.style = items3;
amount = value6.amount;
items2[1] = <Text {...object2}>{amount}</Text>;
object.children = items2;
r1 = object;
} else if (formattedPriceForCollectiblesProduct != null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = <Text variant="text-xs/semibold" color="mobile-text-heading-primary" lineClamp={1} style={items5}>{formattedPriceForCollectiblesProduct}</Text>;
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = <Text style={items6} color="text-feedback-positive" variant="text-xs/semibold" lineClamp={1}>{'-' + value7 + '%'}</Text>;
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
if (collectibleProductState === 'partiallyOwnedBundle') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.BEjTij)}
</Text>
</View>
);
}
if (collectibleProductState === 'purchased') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6cfuDj'])}
</Text>
</View>
);
}
if (collectibleProductState === 'nitroUpsell') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sEAnVH)}
</Text>
</View>
);
}
if (collectibleProductState === 'nitroClaim') {
return (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rt69oo)}
</Text>
</View>
);
}
if (isDisabled) {
r1 = (
<View style={styles.priceDescription}>
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={styles.text}
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wu4gyV)}
</Text>
</View>
);
} else {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon3 = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = <OrbsIcon3 size="xxs" color="mobile-text-heading-primary" style={styles.wheelIcon} />;
items2 = [value];
object2 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object2.style = items3;
amount = value6.amount;
items2[1] = <Text {...object2}>{amount}</Text>;
object.children = items2;
r1 = object;
if (value6 == null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = (
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={items5}
>
{formattedPriceForCollectiblesProduct}
</Text>
);
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = (
<Text
style={items6}
color="text-feedback-positive"
variant="text-xs/semibold"
lineClamp={1}
>
{'-' + value7 + '%'}
</Text>
);
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
} else if (balance == null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = (
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={items5}
>
{formattedPriceForCollectiblesProduct}
</Text>
);
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = (
<Text
style={items6}
color="text-feedback-positive"
variant="text-xs/semibold"
lineClamp={1}
>
{'-' + value7 + '%'}
</Text>
);
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
} else if (preferVCPrice === true) {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = (
<OrbsIcon
size="xxs"
color="mobile-text-heading-primary"
style={styles.wheelIcon}
/>
);
items2 = [value];
object3 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object3.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object3.style = items3;
amount = value6.amount;
items2[1] = (
<Text {...object3}>
{amount}
</Text>
);
object.children = items2;
r1 = object;
} else if (value8) {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon2 = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = (
<OrbsIcon2
size="xxs"
color="mobile-text-heading-primary"
style={styles.wheelIcon}
/>
);
items2 = [value];
object3 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object3.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object3.style = items3;
amount = value6.amount;
items2[1] = (
<Text {...object3}>
{amount}
</Text>
);
object.children = items2;
r1 = object;
} else if (formattedPriceForCollectiblesProduct != null) {
object = {};
object.style = styles.priceDescription;
r8 = hasShopDiscount && (discountSource === (require(5134) /* metro dependency 5134: CollectiblesUtils */).ShopDiscountSource.THIRDPARTY ? ((TagIcon) => <TagIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(10078) /* metro dependency 10078: TagIcon */).TagIcon) : ((NitroWheelIcon) => <NitroWheelIcon size="xs" color="mobile-text-heading-primary" style={styles.wheelIcon} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon));
items4 = [r8];
items5 = [styles.text];
items5[1] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && styles.androidTextPadding;
items4[1] = (
<Text
variant="text-xs/semibold"
color="mobile-text-heading-primary"
lineClamp={1}
style={items5}
>
{formattedPriceForCollectiblesProduct}
</Text>
);
value13 = value7 > 0;
if (value13) {
items6 = [styles.discountPercentage];
items6[1] = styles.text;
value = require(477) /* metro dependency 477: PlatformUtils */;
items6[2] = value.isAndroid() ? styles.androidTextPadding : undefined;
value = (
<Text
style={items6}
color="text-feedback-positive"
variant="text-xs/semibold"
lineClamp={1}
>
{'-' + value7 + '%'}
</Text>
);
r8 = value;
} else {
r8 = value13;
}
items4[2] = r8;
object.children = items4;
r1 = object;
} else {
object = {};
object.style = [styles.priceDescription, {opacity: value8 !== false ? 1 : 0.5}];
const OrbsIcon3 = (require(10076) /* metro dependency 10076: OrbsIcon */).OrbsIcon;
value = (
<OrbsIcon3
size="xxs"
color="mobile-text-heading-primary"
style={styles.wheelIcon}
/>
);
items2 = [value];
object3 = {'variant': 'text-xs/semibold', 'color': 'mobile-text-heading-primary', 'lineClamp': 1};
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
amount = value6.amount;
object3.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount}]);
items3 = [styles.text];
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items3[1] = value && styles.androidTextPadding;
object3.style = items3;
amount = value6.amount;
items2[1] = (
<Text {...object3}>
{amount}
</Text>
);
object.children = items2;
r1 = object;
}
value = <View {...r1} />;
r1 = value;
}
value = <View {...r1} />;
r1 = value;
return r1;
function _fun78667() { // fn#78667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1152, offset: 0x01e3101a, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (CollectiblesProductUtilsModule).getProductOrbPrice({product: env0_1,
hasShopDiscount: hasShopDiscount});
}
function _fun78668() { // fn#78668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1235, offset: 0x01e31057, size: 56 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(5134) /* metro dependency 5134: CollectiblesUtils */;
const getProductDiscount = value.getProductDiscount;
return Reflect.apply(getProductDiscount, value, [env0_1, hasShopDiscount]).discountPercentage;
}
function _fun78669() { // fn#78669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1364, offset: 0x01e3108f, size: 51 bytes, params: 1, frame: 4
const value2 = null;
return value2 == env0_2 || value2 == balance ? value2 : env0_2.amount <= balance;
}
}
return r1;
}
function _fun78670({product, collectibleProductState, preferVCPrice, isDisabled, hidePrice}) { // fn#78670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:3732, offset: 0x01e310c2, size: 765 bytes, params: 2, frame: 31
var r5;
var items4;
var value;
const styles = useStyles();
const value2 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const r20 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(value2) || (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('CollectiblesShopCardCardDetailsV2') && (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product) === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME;
const shopDiscountSource = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getShopDiscountSource(value2);
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value7 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW]);
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
let hexToRgbaString = colorUtilsModule.hexToRgbaString;
const moduleValue7 = colorUtilsModule;
const value8 = Reflect.apply(hexToRgbaString, colorUtilsModule, [moduleValue7.hexWithOpacity(value7, 0.9)]);
const moduleValue8 = colorUtilsModule;
hexToRgbaString = moduleValue8.hexToRgbaString;
const moduleValue9 = colorUtilsModule;
const value9 = Reflect.apply(hexToRgbaString, moduleValue8, [moduleValue9.hexWithOpacity(value7, 0)]);
const productName = (require(10080) /* metro dependency 10080: getProductName */).getProductName(product);
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], function() {
return IAPStoreAndroid.isFetchingGoogleSkus();
});
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
const items3 = [styles.regularMetadataContainer];
const items2 = [value9, value8, value7];
const {START, END} = VerticalGradient;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text style={styles.assetName} variant="heading-sm/bold" color="mobile-text-heading-primary" lineClamp={1} accessibilityRole="header">{productName}</Text>;
if (hidePrice) {
r5 = !hidePrice;
} else {
var viewBindingProps = {style: styles.priceVariantsContainer};
items4 = [((Component) => <Component product={product} hasShopDiscount={r20} discountSource={shopDiscountSource} styles={styles} collectibleProductState={collectibleProductState} isFetchingGoogleSkus={value11} preferVCPrice={preferVCPrice} isDisabled={isDisabled} />)(env0_10)];
value = importDefault(10081) /* metro dependency 10081: CollectiblesShopCardVariants */;
items4[1] = ((Component) => <Component product={product} />)(value);
value = <View {...viewBindingProps}>{items4}</View>;
r5 = value;
function _fun78670({product, collectibleProductState, preferVCPrice, isDisabled, hidePrice}) { // fn#78670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:3732, offset: 0x01e310c2, size: 765 bytes, params: 2, frame: 31
var r5;
var items4;
var value;
const styles = useStyles();
const value2 = (UseCurrentUserModule).useCurrentUser();
const r20 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts(value2) || (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('CollectiblesShopCardCardDetailsV2') && (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product) === (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME;
const shopDiscountSource = (CollectiblesUtilsModule).getShopDiscountSource(value2);
const useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const value7 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOW]);
let hexToRgbaString = ColorUtilsModule.hexToRgbaString;
const value8 = Reflect.apply(hexToRgbaString, ColorUtilsModule, [ColorUtilsModule.hexWithOpacity(value7, 0.9)]);
hexToRgbaString = ColorUtilsModule.hexToRgbaString;
const value9 = Reflect.apply(hexToRgbaString, ColorUtilsModule, [ColorUtilsModule.hexWithOpacity(value7, 0)]);
const productName = (GetProductNameModule).getProductName(product);
const value11 = (require(566) /* metro dependency 566: flux */).useStateFromStores([IAPStoreAndroid], function() {
return IAPStoreAndroid.isFetchingGoogleSkus();
});
const items3 = [styles.regularMetadataContainer];
const items2 = [value9, value8, value7];
const {START, END} = VerticalGradient;
const Text = (TextModule).Text;
const text = (
<Text
style={styles.assetName}
variant="heading-sm/bold"
color="mobile-text-heading-primary"
lineClamp={1}
accessibilityRole="header"
>
{productName}
</Text>
);
if (hidePrice) {
r5 = !hidePrice;
} else {
var viewBindingProps = {style: styles.priceVariantsContainer};
items4 = [
((Component) => <Component product={product} hasShopDiscount={r20} discountSource={shopDiscountSource} styles={styles} collectibleProductState={collectibleProductState} isFetchingGoogleSkus={value11} preferVCPrice={preferVCPrice} isDisabled={isDisabled} />)(env0_10),
];
value = importDefault(10081) /* metro dependency 10081: CollectiblesShopCardVariants */;
items4[1] = ((Component) => <Component product={product} />)(value);
value = (
<View {...viewBindingProps}>
{items4}
</View>
);
r5 = value;
}
return ((Component) => <Component style={items3} colors={items2} locations={[0, 0.4,
1]} start={START} end={END}>{text}{r5}</Component>)(defaultImport2);
}
return ((Component) => <Component style={items3} colors={items2} locations={[0, 0.4,
1]} start={START} end={END}>{text}{r5}</Component>)(defaultImport2);
}
function _fun78667() { // fn#78667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1152, offset: 0x01e3101a, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: env0_1,
hasShopDiscount: hasShopDiscount});
}
function _fun78668() { // fn#78668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1235, offset: 0x01e31057, size: 56 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(5134) /* metro dependency 5134: CollectiblesUtils */;
const getProductDiscount = value.getProductDiscount;
return Reflect.apply(getProductDiscount, value, [env0_1, hasShopDiscount]).discountPercentage;
}
function _fun78669() { // fn#78669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10251:1364, offset: 0x01e3108f, size: 51 bytes, params: 1, frame: 4
const value2 = null;
return value2 == env0_2 || value2 == balance ? value2 : env0_2.amount <= balance;
}
global.__d(_fun78665, 10065, [31, 27, 5140, 661, 33, 4501, 697, 10021, 5133, 10066, 5134, 10069, 10075, 4573, 1244,
10076, 477, 10078, 7954, 7594, 10054, 1904, 3802, 3860, 4000, 10080, 566, 4589, 10081,
2]) /* metro module 10065, dependencies: [31, 27, 5140, 661, 33, 4501, 697, 10021, 5133, 10066, 5134, 10069, 10075, 4573, 1244, 10076, 477, 10078, 7954, 7594, 10054, 1904, 3802, 3860, 4000, 10080, 566, 4589, 10081, 2] */;
@@ -1,267 +1,342 @@
/* Metro module 10020; source: modules/collectibles/native/CollectiblesShopCardV2.tsx; dependencies: [31, 27, 1310, 663, 33, 4501, 697, 10021, 5133, 10022, 7594, 10024, 10027, 1244, 3857, 6771, 10051, 10053, 10054, 566, 4002, 5278, 5134, 1904, 7954, 4573, 10056, 10057, 10062, 10065, 10023, 4080, 10085, 10153, 10154, 3802, 10060, 10106, 10155, 6518, 491, 2] */
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UseInitialValue from '../../../hooks/useInitialValue.tsx'; /* Metro dependency 6518 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import UseWishlistNUXActionSheet from './useWishlistNUXActionSheet.tsx'; /* Metro dependency 10027 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as CollectiblesUtilsModule from '../CollectiblesUtils.tsx'; /* Metro dependency 5134 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseDefaultVariantIndexModule from '../hooks/useDefaultVariantIndex.tsx'; /* Metro dependency 10021 */
import * as UseTrackShopCardImpressionModule from './hooks/useTrackShopCardImpression.tsx'; /* Metro dependency 10022 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as CollectiblesWishlistUtilsModule from '../../wishlists/CollectiblesWishlistUtils.tsx'; /* Metro dependency 10024 */
import * as UseTrackShopCardClickModule from '../hooks/useTrackShopCardClick.tsx'; /* Metro dependency 10051 */
import * as UseWishlistButtonStateModule from '../hooks/useWishlistButtonState.tsx'; /* Metro dependency 10053 */
import * as UseCanPurchaseFramesModule from '../hooks/useCanPurchaseFrames.tsx'; /* Metro dependency 10054 */
import * as UseProductPurchaseStateModule from '../hooks/useProductPurchaseState.tsx'; /* Metro dependency 10060 */
import * as UseProductDisableStateModule from '../hooks/useProductDisableState.tsx'; /* Metro dependency 10106 */
import * as CollectiblesShopCardImpressionMobileExperimentModule from '../experiments/CollectiblesShopCardImpressionMobileExperiment.tsx'; /* Metro dependency 10153 */
import * as UseTrackProductCardImpressionModule from '../hooks/useTrackProductCardImpression.tsx'; /* Metro dependency 10154 */
function _fun78263(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:6, offset: 0x01e22fb6, size: 627 bytes, params: 8, frame: 26
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const PixelRatio = value2.PixelRatio;
const env0_4 = value2.View;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).ShopCtaEnum;
const value3 = require(33) /* metro dependency 33 */;
const env0_7 = value3.jsx;
const env0_8 = value3.jsxs;
let value = ReactModule;
const PixelRatio = ReactNativeModule.PixelRatio;
const r3 = PixelRatio.getFontScale() >= 1.78 ? 302 : 170;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object5 = {'position': 'relative', 'height': null, 'width': 150, 'display': 'flex', 'borderWidth': 1,
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {'position': 'relative', 'height': null, 'width': 150, 'display': 'flex', 'borderWidth': 1,
'borderColor': null, 'borderRadius': null, 'overflow': 'hidden'};
object5.height = r3;
object2.height = r3;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.borderColor = BORDER_SUBTLE;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object3.card = object5;
object3.topRowOverlay = {'position': 'absolute', 'top': 6, 'left': 6, 'right': 6, 'zIndex': 2, 'display': 'flex',
object2.borderColor = BORDER_SUBTLE;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.card = object2;
object.topRowOverlay = {'position': 'absolute', 'top': 6, 'left': 6, 'right': 6, 'zIndex': 2, 'display': 'flex',
'flexDirection': 'row', 'gap': 4, 'justifyContent': 'space-between', 'alignItems': 'flex-start'};
object3.badge = {flexShrink: 1};
const object6 = {};
object.badge = {flexShrink: 1};
const object4 = {};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object6.paddingHorizontal = PX_4;
object6.paddingVertical = 1.5;
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object6.flexShrink = 1;
object3.badgePill = object6;
object3.badgeOverrideText = {textTransform: 'uppercase'};
object4.paddingHorizontal = PX_4;
object4.paddingVertical = 1.5;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.flexShrink = 1;
object.badgePill = object4;
object.badgeOverrideText = {textTransform: 'uppercase'};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object3.badgePillDarkMode = {backgroundColor: WHITE};
object.badgePillDarkMode = {backgroundColor: WHITE};
const BADGE_BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BADGE_BACKGROUND_BRAND;
object3.badgePillLightMode = {backgroundColor: BADGE_BACKGROUND_BRAND};
object3.wishlistButton = {'marginLeft': 'auto', 'flexShrink': 0};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object3]);
object.badgePillLightMode = {backgroundColor: BADGE_BACKGROUND_BRAND};
object.wishlistButton = {'marginLeft': 'auto', 'flexShrink': 0};
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun78274);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardV2.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardV2.tsx');
exports.default = value;
exports.COLLECTIBLES_SHOP_CARD_HEIGHT = r3;
exports.COLLECTIBLES_SHOP_CARD_WIDTH = 150;
exports.COLLECTIBLES_SHOP_CARD_MAX_WIDTH = 180;
exports.COLLECTIBLES_SHOP_CARD_GAP = 16;
}
function CollectiblesShopCardInternalV2({product, onPress, unpublishedAt, collectibleProductState, solidBackground, preferVCPrice, isDisabled, cardWidth, cardStyle, hideWishlistButton, hidePrice, isShopCardImpressionEnabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:977, offset: 0x01e23229, size: 1734 bytes, params: 2, frame: 46
var r4;
var r20;
var object6;
isDisabled = !(isDisabled === undefined) && isDisabled;
hideWishlistButton = !(hideWishlistButton === undefined) && hideWishlistButton;
hidePrice = !(hidePrice === undefined) && hidePrice;
isShopCardImpressionEnabled = !(isShopCardImpressionEnabled === undefined) && isShopCardImpressionEnabled;
const styles = useStyles();
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
(require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product));
const value4 = (require(10022) /* metro dependency 10022: useTrackShopCardImpression */).useTrackShopCardImpression(product,
selectedProduct, isShopCardImpressionEnabled);
const r34 = cardWidth != null ? {width: cardWidth} : {width: 150};
const value6 = (require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser();
const isWishlistableCollectiblesProduct2 = (require(10024) /* metro dependency 10024: CollectiblesWishlistUtils */).isWishlistableCollectiblesProduct(selectedProduct);
const {shouldShowWishlistNUXActionSheet,
showWishlistNUXActionSheet} = (importDefault(10027) /* metro dependency 10027: useWishlistNUXActionSheet */)();
const env0_3 = showWishlistNUXActionSheet;
let binding = env0_3;
const value8 = binding.useCallback(_fun78265, [shouldShowWishlistNUXActionSheet, showWishlistNUXActionSheet,
selectedProduct]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const F8FvUy = (require(1244) /* metro dependency 1244: indexNative */).t.F8FvUy;
const value10 = binding.useCallback(_fun78266, [Reflect.apply(string, intl, [F8FvUy])]);
const value11 = (require(10051) /* metro dependency 10051: useTrackShopCardClick */).useTrackShopCardClick({product: product,
analyticsLocations: (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations});
const {isWishlisted, isBusy,
handleToggle} = (require(10053) /* metro dependency 10053: useWishlistButtonState */).useWishlistButtonState({userId: value6.id,
skuId: selectedProduct.skuId, onAddSuccess: value8, onError: value10});
const value13 = collectibleProductState === 'purchased';
const r1 = value13 || hideWishlistButton;
const value14 = !r1;
const value15 = !isWishlistableCollectiblesProduct2;
const r0 = (r1 ? value14 : !value15) && !isBusy;
binding = env0_3;
const value18 = binding.useMemo(_fun78267, [r0, isWishlisted]);
const value19 = binding.useCallback(_fun78268, [handleToggle]);
const value20 = (require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('CollectiblesShopCardV2');
const value21 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return require(dependencyMap[20]).isThemeDark(ThemeStore.theme);
});
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {ref: value4, style: [styles.card, r34, cardStyle], onPress: onPress_78270,
activeOpacity: 0.8, accessibilityRole: 'button', accessibilityActions: value18, onAccessibilityAction: value19};
const shouldShowLimitedTimeBadge2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).shouldShowLimitedTimeBadge(unpublishedAt);
const badgeOverride = product.badgeOverride;
const productType = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductType(product);
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (product.hideBadge) {
r20 = null;
} else {
if (productType === PROFILE_FRAME && value20) {
r4 = <View style={[styles.badgePill,
value21 ? styles.badgePillDarkMode : styles.badgePillLightMode]} accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m6qcO'])}>{((NitroWheelIcon) => <NitroWheelIcon size="xs" color={value21 ? 'black' : 'white'} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}</View>;
} else if (badgeOverride != null) {
r4 = <View style={[styles.badgePill,
value21 ? styles.badgePillDarkMode : styles.badgePillLightMode]}>{((Text) => <Text variant="text-xs/bold" color={value21 ? 'black' : 'white'} allowFontScaling={false} style={styles.badgeOverrideText} lineClamp={1}>{badgeOverride}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</View>;
} else if (shouldShowLimitedTimeBadge2) {
r4 = ((Component) => <Component unpublishedAt={unpublishedAt} style={styles.badge} />)(importDefault(10056) /* metro dependency 10056: LimitedTimeBadge */);
} else if (collectibleProductState !== 'nitroClaim') {
r4 = null;
function CollectiblesShopCardInternalV2({product, onPress, unpublishedAt, collectibleProductState, solidBackground, preferVCPrice, isDisabled, cardWidth, cardStyle, hideWishlistButton, hidePrice, isShopCardImpressionEnabled, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:977, offset: 0x01e23229, size: 1734 bytes, params: 2, frame: 46
var r4;
var r20;
var object;
isDisabled = !(isDisabled === undefined) && isDisabled;
hideWishlistButton = !(hideWishlistButton === undefined) && hideWishlistButton;
hidePrice = !(hidePrice === undefined) && hidePrice;
isShopCardImpressionEnabled = !(isShopCardImpressionEnabled === undefined) && isShopCardImpressionEnabled;
const styles = useStyles();
const selectedProduct = (CollectiblesProductUtilsModule).getSelectedProduct(product,
(UseDefaultVariantIndexModule).useDefaultVariantIndex(product));
const value4 = (UseTrackShopCardImpressionModule).useTrackShopCardImpression(product,
selectedProduct, isShopCardImpressionEnabled);
const r34 = cardWidth != null ? {width: cardWidth} : {width: 150};
const value6 = (UseCurrentUserModule).useCurrentUser();
const isWishlistableCollectiblesProduct2 = (CollectiblesWishlistUtilsModule).isWishlistableCollectiblesProduct(selectedProduct);
const {shouldShowWishlistNUXActionSheet,
showWishlistNUXActionSheet} = (UseWishlistNUXActionSheet)();
const showWishlistNUXActionSheet2 = showWishlistNUXActionSheet;
let binding = showWishlistNUXActionSheet2;
const value8 = binding.useCallback(_fun78265, [shouldShowWishlistNUXActionSheet, showWishlistNUXActionSheet,
selectedProduct]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const F8FvUy = (require(1244) /* metro dependency 1244: indexNative */).t.F8FvUy;
const value10 = binding.useCallback(_fun78266, [Reflect.apply(string, intl, [F8FvUy])]);
const value11 = (UseTrackShopCardClickModule).useTrackShopCardClick({product: product,
analyticsLocations: (UseAnalyticsLocations)().analyticsLocations});
const {isWishlisted, isBusy,
handleToggle} = (UseWishlistButtonStateModule).useWishlistButtonState({userId: value6.id,
skuId: selectedProduct.skuId, onAddSuccess: value8, onError: value10});
const value13 = collectibleProductState === 'purchased';
const r1 = value13 || hideWishlistButton;
const value14 = !r1;
const value15 = !isWishlistableCollectiblesProduct2;
const r0 = (r1 ? value14 : !value15) && !isBusy;
binding = showWishlistNUXActionSheet2;
const value18 = binding.useMemo(_fun78267, [r0, isWishlisted]);
const value19 = binding.useCallback(_fun78268, [handleToggle]);
const value20 = (UseCanPurchaseFramesModule).useIsProfileFramesEarlyAccessPhase('CollectiblesShopCardV2');
const value21 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() {
return require(dependencyMap[20]).isThemeDark(ThemeStore.theme);
});
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {ref: value4, style: [styles.card, r34, cardStyle], onPress: onPress_78270,
activeOpacity: 0.8, accessibilityRole: 'button', accessibilityActions: value18, onAccessibilityAction: value19};
const shouldShowLimitedTimeBadge2 = (CollectiblesUtilsModule).shouldShowLimitedTimeBadge(unpublishedAt);
const badgeOverride = product.badgeOverride;
const productType = (CollectiblesProductUtilsModule).getProductType(product);
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (product.hideBadge) {
r20 = null;
} else {
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
r4 = <NitroWheelIcon color="mobile-text-heading-primary" />;
if (productType === PROFILE_FRAME && value20) {
r4 = (
<View
style={[styles.badgePill, value21 ? styles.badgePillDarkMode : styles.badgePillLightMode]}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m6qcO'])}
>
{((NitroWheelIcon) => <NitroWheelIcon size="xs" color={value21 ? 'black' : 'white'} />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}
</View>
);
} else if (badgeOverride != null) {
r4 = (
<View style={[styles.badgePill, value21 ? styles.badgePillDarkMode : styles.badgePillLightMode]}>
{((Text) => <Text variant="text-xs/bold" color={value21 ? 'black' : 'white'} allowFontScaling={false} style={styles.badgeOverrideText} lineClamp={1}>{badgeOverride}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
</View>
);
} else if (shouldShowLimitedTimeBadge2) {
r4 = ((Component) => <Component unpublishedAt={unpublishedAt} style={styles.badge} />)(importDefault(10056) /* metro dependency 10056: LimitedTimeBadge */);
} else if (collectibleProductState !== 'nitroClaim') {
r4 = null;
} else {
const NitroWheelIcon = (require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon;
r4 = <NitroWheelIcon color="mobile-text-heading-primary" />;
}
r20 = r4;
}
r20 = r4;
return (
<PressableOpacity {...pressableOpacityProps}>
{
r20 != null
? (
<View style={styles.topRowOverlay}>
{r20}
{
r1
? value14
: ((WishlistButtonBase) => <WishlistButtonBase style={styles.wishlistButton} isWishlisted={isWishlisted} onPress={handleToggle} busy={isBusy} disabled={value15} accessibilityHidden onTrackPress={value11} />)((require(10057) /* metro dependency 10057: WishlistButton */).WishlistButtonBase)
}
</View>
)
: (
r1
? null
: (
<View style={styles.topRowOverlay}>
{r20}
{
r1
? value14
: ((WishlistButtonBase) => <WishlistButtonBase style={styles.wishlistButton} isWishlisted={isWishlisted} onPress={handleToggle} busy={isBusy} disabled={value15} accessibilityHidden onTrackPress={value11} />)((require(10057) /* metro dependency 10057: WishlistButton */).WishlistButtonBase)
}
</View>
)
)
}
{((Component) => <Component solidBackground={solidBackground} product={product} isPurchased={value13 || collectibleProductState === 'partiallyOwnedBundle'} isDisabled={isDisabled} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />)(importDefault(10062) /* metro dependency 10062: CollectiblesShopCardAssetTileV2 */)}
{((Component) => <Component product={product} collectibleProductState={collectibleProductState} preferVCPrice={preferVCPrice} isDisabled={isDisabled} hidePrice={hidePrice} />)(importDefault(10065) /* metro dependency 10065: CollectiblesShopCardCardDetailsV2 */)}
</PressableOpacity>
);
function _fun78265() { // fn#78265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:1590, offset: 0x01e238ef, size: 29 bytes, params: 1, frame: 11
if (shouldShowWishlistNUXActionSheet) {
showWishlistNUXActionSheet(env0_1);
}
}
function _fun78266() { // fn#78266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:1673, offset: 0x01e2390c, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ToastActionCreators).open({key: 'WISHLIST_ERROR',
content: ReactNativeModule.View});
}
function _fun78267() { // fn#78267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2020, offset: 0x01e23949, size: 125 bytes, params: 1, frame: 17
var r0;
var isWishlistedBinding;
var intl;
var string;
var t;
var value;
if (JsxRuntimeModule.jsxs) {
isWishlistedBinding = isWishlisted;
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
r0 = [{name: 'toggleWishlist', label: isWishlistedBinding ? Reflect.apply(string, intl,
[t.yr9TTf]) : Reflect.apply(string, intl, [t['8DkMEQ']])}];
} else {
r0 = undefined;
}
return r0;
}
function _fun78268({nativeEvent}) { // fn#78268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2176, offset: 0x01e239c6, size: 42 bytes, params: 2, frame: 9
if (nativeEvent.actionName === 'toggleWishlist') {
handleToggle();
}
}
function CollectiblesShopCardInternalV2OnPress() { // fn#78270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2450, owner: CollectiblesShopCardInternalV2.onPress, offset: 0x01e23a20, size: 47 bytes, params: 1, frame: 12
const binding = env0_5;
const OPEN_DETAILS = ShopCtaEnum.OPEN_DETAILS;
binding(OPEN_DETAILS);
if (onPress != null) {
onPress();
}
}
}
return (
<PressableOpacity {...pressableOpacityProps}>
{r20 != null ? <View style={styles.topRowOverlay}>{r20}{r1 ? value14 : ((WishlistButtonBase) => <WishlistButtonBase style={styles.wishlistButton} isWishlisted={isWishlisted} onPress={handleToggle} busy={isBusy} disabled={value15} accessibilityHidden onTrackPress={value11} />)((require(10057) /* metro dependency 10057: WishlistButton */).WishlistButtonBase)}</View> : r1 ? null : <View style={styles.topRowOverlay}>{r20}{r1 ? value14 : ((WishlistButtonBase) => <WishlistButtonBase style={styles.wishlistButton} isWishlisted={isWishlisted} onPress={handleToggle} busy={isBusy} disabled={value15} accessibilityHidden onTrackPress={value11} />)((require(10057) /* metro dependency 10057: WishlistButton */).WishlistButtonBase)}</View>}
{((Component) => <Component solidBackground={solidBackground} product={product} isPurchased={value13 || collectibleProductState === 'partiallyOwnedBundle'} isDisabled={isDisabled} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />)(importDefault(10062) /* metro dependency 10062: CollectiblesShopCardAssetTileV2 */)}
{((Component) => <Component product={product} collectibleProductState={collectibleProductState} preferVCPrice={preferVCPrice} isDisabled={isDisabled} hidePrice={hidePrice} />)(importDefault(10065) /* metro dependency 10065: CollectiblesShopCardCardDetailsV2 */)}
</PressableOpacity>
);
}
function CollectiblesShopCardV2Inner({product, unpublishedAt, solidBackground, preferVCPrice, cardWidth, cardStyle, hideWishlistButton, hidePrice, onPress, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:3806, offset: 0x01e23a4f, size: 715 bytes, params: 2, frame: 35
var r0;
var value;
const value2 = (require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product);
const selectedProduct = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getSelectedProduct(product,
value2);
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const value4 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
const env0_3 = value4;
const binding = env0_3;
const useCallback = binding.useCallback;
const r18 = onPress ?? Reflect.apply(useCallback, binding, [_fun78272, [analyticsLocations, product, value2,
value4]]);
const value6 = (require(10153) /* metro dependency 10153: CollectiblesShopCardImpressionMobileExperiment */).useIsShopCardImpressionMobileEnabled('CollectiblesShopCardV2');
const useTrackProductCardImpressionModule = require(10154) /* metro dependency 10154: useTrackProductCardImpression */;
const useTrackProductCardImpression = useTrackProductCardImpressionModule.useTrackProductCardImpression;
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, useTrackProductCardImpressionModule,
[product.skuId]).handleCardVisibilityChange;
const canUseCollectibles2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCollectibles((require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser());
const {isPurchased,
isPartiallyOwnedBundle} = (require(10060) /* metro dependency 10060: useProductPurchaseState */).useProductPurchaseState(selectedProduct);
const useProductDisableStateModule = require(10106) /* metro dependency 10106: useProductDisableState */;
const useProductDisableState = useProductDisableStateModule.useProductDisableState;
const isDisabled = Reflect.apply(useProductDisableState, useProductDisableStateModule,
[selectedProduct.skuId]).isDisabled;
const isPremiumCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isPremiumCollectiblesProduct(selectedProduct);
const isFreeCollectiblesProduct2 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).isFreeCollectiblesProduct(selectedProduct);
const collectiblesShopCardInternalV2 = <CollectiblesShopCardInternalV2 product={product} onPress={r18} collectibleProductState={env0_3.useMemo(_fun78273,
[isFreeCollectiblesProduct2 || isPremiumCollectiblesProduct2 && canUseCollectibles2, isPartiallyOwnedBundle,
isPurchased,
isPremiumCollectiblesProduct2 && !canUseCollectibles2 && !isFreeCollectiblesProduct2])} unpublishedAt={unpublishedAt} solidBackground={solidBackground} preferVCPrice={preferVCPrice} isDisabled={isDisabled} cardWidth={cardWidth} cardStyle={cardStyle} hideWishlistButton={hideWishlistButton} hidePrice={hidePrice} isShopCardImpressionEnabled={value6} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />;
if (value6) {
r0 = collectiblesShopCardInternalV2;
} else {
value = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
value = ((Component) => <Component onChange={handleCardVisibilityChange}>{collectiblesShopCardInternalV2}</Component>)(value);
r0 = value;
}
return r0;
}
function _fun78274(a0) { // fn#78274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:5342, offset: 0x01e23dd7, size: 140 bytes, params: 2, frame: 19
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
const value = copyDataProperties({}, a0, undefined, undefined);
const value3 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(_fun78275);
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={value3}>
<CollectiblesShopCardV2Inner {...value} />
</CollectiblesAnalyticsProvider>
);
}
function _fun78265() { // fn#78265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:1590, offset: 0x01e238ef, size: 29 bytes, params: 1, frame: 11
if (shouldShowWishlistNUXActionSheet) {
showWishlistNUXActionSheet(env0_1);
}
}
function _fun78266() { // fn#78266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:1673, offset: 0x01e2390c, size: 61 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(3857) /* metro dependency 3857: ToastActionCreators */).open({key: 'WISHLIST_ERROR',
content: env0_4});
}
function CollectiblesShopCardV2Inner({product, unpublishedAt, solidBackground, preferVCPrice, cardWidth, cardStyle, hideWishlistButton, hidePrice, onPress, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#78271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:3806, offset: 0x01e23a4f, size: 715 bytes, params: 2, frame: 35
var r0;
var value;
const value2 = (UseDefaultVariantIndexModule).useDefaultVariantIndex(product);
const selectedProduct = (CollectiblesProductUtilsModule).getSelectedProduct(product,
value2);
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const value4 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
const env0_3 = value4;
const binding = env0_3;
const useCallback = binding.useCallback;
const r18 = onPress ?? Reflect.apply(useCallback, binding, [_fun78272, [analyticsLocations, product, value2,
value4]]);
const value6 = (CollectiblesShopCardImpressionMobileExperimentModule).useIsShopCardImpressionMobileEnabled('CollectiblesShopCardV2');
const useTrackProductCardImpression = UseTrackProductCardImpressionModule.useTrackProductCardImpression;
const handleCardVisibilityChange = Reflect.apply(useTrackProductCardImpression, UseTrackProductCardImpressionModule,
[product.skuId]).handleCardVisibilityChange;
const canUseCollectibles2 = (PremiumUtils).canUseCollectibles((UseCurrentUserModule).useCurrentUser());
const {isPurchased,
isPartiallyOwnedBundle} = (UseProductPurchaseStateModule).useProductPurchaseState(selectedProduct);
const useProductDisableState = UseProductDisableStateModule.useProductDisableState;
const isDisabled = Reflect.apply(useProductDisableState, UseProductDisableStateModule,
[selectedProduct.skuId]).isDisabled;
const isPremiumCollectiblesProduct2 = (CollectiblesUtilsModule).isPremiumCollectiblesProduct(selectedProduct);
const isFreeCollectiblesProduct2 = (CollectiblesUtilsModule).isFreeCollectiblesProduct(selectedProduct);
const collectiblesShopCardInternalV2 = (
<CollectiblesShopCardInternalV2
product={product}
onPress={r18}
collectibleProductState={env0_3.useMemo(_fun78273,
[isFreeCollectiblesProduct2 || isPremiumCollectiblesProduct2 && canUseCollectibles2,
isPartiallyOwnedBundle, isPurchased,
isPremiumCollectiblesProduct2 && !canUseCollectibles2 && !isFreeCollectiblesProduct2])}
unpublishedAt={unpublishedAt}
solidBackground={solidBackground}
preferVCPrice={preferVCPrice}
isDisabled={isDisabled}
cardWidth={cardWidth}
cardStyle={cardStyle}
hideWishlistButton={hideWishlistButton}
hidePrice={hidePrice}
isShopCardImpressionEnabled={value6}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
/>
);
if (value6) {
r0 = collectiblesShopCardInternalV2;
} else {
value = importDefault(10155) /* metro dependency 10155: VisibilitySensor */;
value = ((Component) => <Component onChange={handleCardVisibilityChange}>{collectiblesShopCardInternalV2}</Component>)(value);
r0 = value;
}
return r0;
function _fun78272() { // fn#78272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:4168, offset: 0x01e23d1a, size: 120 bytes, params: 1, frame: 15
const value = environment.__proto__;
const value2 = undefined;
(ActionSheetActionCreators).hideActionSheet();
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: product,
initialVariantIndex: env0_1, analyticsLocations: analyticsLocations, shopAnalyticsContext: env0_3 ?? value2});
return value2;
}
function _fun78267() { // fn#78267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2020, offset: 0x01e23949, size: 125 bytes, params: 1, frame: 17
var r0;
var isWishlistedBinding;
var intl;
var string;
var t;
var value;
if (env0_8) {
isWishlistedBinding = isWishlisted;
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
string = intl.string;
t = (require(1244) /* metro dependency 1244: indexNative */).t;
r0 = [{name: 'toggleWishlist', label: isWishlistedBinding ? Reflect.apply(string, intl,
[t.yr9TTf]) : Reflect.apply(string, intl, [t['8DkMEQ']])}];
} else {
r0 = undefined;
}
return r0;
}
function _fun78268({nativeEvent}) { // fn#78268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2176, offset: 0x01e239c6, size: 42 bytes, params: 2, frame: 9
if (nativeEvent.actionName === 'toggleWishlist') {
handleToggle();
}
}
function _fun78273() { // fn#78273, offset: 0x01e23d92, size: 69 bytes, params: 1, frame: 3
if (isPurchased === true) {
return 'purchased';
}
if (isPartiallyOwnedBundle === true) {
return 'partiallyOwnedBundle';
}
if (CollectiblesShopConstantsModule.ShopCtaEnum === true) {
return 'nitroUpsell';
}
if (JsxRuntimeModule.jsx === true) {
return 'nitroClaim';
}
return null;
}
function CollectiblesShopCardInternalV2OnPress() { // fn#78270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:2450, owner: CollectiblesShopCardInternalV2.onPress, offset: 0x01e23a20, size: 47 bytes, params: 1, frame: 12
const binding = env0_5;
const OPEN_DETAILS = ShopCtaEnum.OPEN_DETAILS;
binding(OPEN_DETAILS);
if (onPress != null) {
onPress();
}
}
function _fun78272() { // fn#78272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:4168, offset: 0x01e23d1a, size: 120 bytes, params: 1, frame: 15
const value = environment.__proto__;
const value2 = undefined;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: product,
initialVariantIndex: env0_1, analyticsLocations: analyticsLocations, shopAnalyticsContext: env0_3 ?? value2});
return value2;
}
function _fun78274(a0) { // fn#78274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:5342, offset: 0x01e23dd7, size: 140 bytes, params: 2, frame: 19
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
const value = copyDataProperties({}, a0, undefined, undefined);
const value3 = (UseInitialValue)(_fun78275);
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={value3}>
<CollectiblesShopCardV2Inner {...value} />
</CollectiblesAnalyticsProvider>
);
function _fun78275() { // fn#78275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:5369, offset: 0x01e23e63, size: 44 bytes, params: 1, frame: 12
const object = {};
const value = environment.__proto__;
object.cardId = (require(491) /* metro dependency 491 */).v4();
return object;
}
function _fun78273() { // fn#78273, offset: 0x01e23d92, size: 69 bytes, params: 1, frame: 3
if (isPurchased === true) {
return 'purchased';
}
if (isPartiallyOwnedBundle === true) {
return 'partiallyOwnedBundle';
}
if (env0_6 === true) {
return 'nitroUpsell';
}
if (env0_7 === true) {
return 'nitroClaim';
}
return null;
}
function _fun78275() { // fn#78275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10206:5369, offset: 0x01e23e63, size: 44 bytes, params: 1, frame: 12
const object2 = {};
const value = environment.__proto__;
object2.cardId = (require(491) /* metro dependency 491 */).v4();
return object2;
}
global.__d(_fun78263, 10020, [31, 27, 1310, 663, 33, 4501, 697, 10021, 5133, 10022, 7594, 10024, 10027, 1244, 3857,
6771, 10051, 10053, 10054, 566, 4002, 5278, 5134, 1904, 7954, 4573, 10056, 10057, 10062, 10065, 10023, 4080,
10085, 10153, 10154, 3802, 10060, 10106, 10155, 6518, 491,
2]) /* metro module 10020, dependencies: [31, 27, 1310, 663, 33, 4501, 697, 10021, 5133, 10022, 7594, 10024, 10027, 1244, 3857, 6771, 10051, 10053, 10054, 566, 4002, 5278, 5134, 1904, 7954, 4573, 10056, 10057, 10062, 10065, 10023, 4080, 10085, 10153, 10154, 3802, 10060, 10106, 10155, 6518, 491, 2] */;
@@ -1,129 +1,137 @@
/* Metro module 10081; source: modules/collectibles/native/CollectiblesShopCardVariants.tsx; dependencies: [31, 27, 33, 4501, 697, 10060, 10082, 6742, 10083, 10021, 5133, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseIsVariantColorLight from '../hooks/useIsVariantColorLight.tsx'; /* Metro dependency 10082 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesProductUtilsModule from '../utils/CollectiblesProductUtils.tsx'; /* Metro dependency 5133 */
import * as CheckmarkSmallIconModule from '../../../design/components/Icon/native/redesign/generated/CheckmarkSmallIcon.tsx'; /* Metro dependency 6742 */
import * as UseDefaultVariantIndexModule from '../hooks/useDefaultVariantIndex.tsx'; /* Metro dependency 10021 */
import * as UseProductPurchaseStateModule from '../hooks/useProductPurchaseState.tsx'; /* Metro dependency 10060 */
import * as PlusSmallIconModule from '../../../design/components/Icon/native/redesign/generated/PlusSmallIcon.tsx'; /* Metro dependency 10083 */
function _fun78775(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:6, offset: 0x01e33e88, size: 316 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
const env0_6 = Reflect.apply(createStyles, createStylesModule, [{variantsContainer: {'display': 'flex',
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const PX_4 = (Native).space.PX_4;
const env0_6 = Reflect.apply(createStyles, CreateStylesModule, [{variantsContainer: {'display': 'flex',
'flexDirection': 'row', 'alignItems': 'center', paddingStart: PX_4}}]);
const env0_7 = createStylesModule.createStyles(_fun78776);
const env0_7 = CreateStylesModule.createStyles(_fun78776);
value = value.memo(_fun78780);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardVariants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardVariants.tsx');
exports.default = value;
}
function _fun78776(a0) { // fn#78776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:305, offset: 0x01e33fc4, size: 244 bytes, params: 2, frame: 17
const object = {};
const object2 = {'marginStart': null, 'width': 14, 'height': 14, 'borderWidth': 1, 'borderColor': null,
'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.marginStart = -PX_4;
const value2 = 1;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.borderColor = BACKGROUND_BASE_LOW;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.variantOption = object2;
const object3 = {'width': '100%', 'height': '100%', 'justifyContent': 'center', 'alignItems': 'center'};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object3.borderWidth = a0 ? value2 : 0;
const BUTTON_OUTLINE_PRIMARY_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.BUTTON_OUTLINE_PRIMARY_TEXT;
object3.borderColor = BUTTON_OUTLINE_PRIMARY_TEXT;
object.variantOptionInner = object3;
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object.variantOverflowInner = {backgroundColor: ICON_MUTED};
return object;
}
function _fun78776(a0) { // fn#78776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:305, offset: 0x01e33fc4, size: 244 bytes, params: 2, frame: 17
const object4 = {};
const object5 = {'marginStart': null, 'width': 14, 'height': 14, 'borderWidth': 1, 'borderColor': null,
'borderRadius': null, 'justifyContent': 'center', 'alignItems': 'center'};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.marginStart = -PX_4;
const value2 = 1;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.borderColor = BACKGROUND_BASE_LOW;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object4.variantOption = object5;
const object6 = {'width': '100%', 'height': '100%', 'justifyContent': 'center', 'alignItems': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object6.borderWidth = a0 ? value2 : 0;
const BUTTON_OUTLINE_PRIMARY_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.BUTTON_OUTLINE_PRIMARY_TEXT;
object6.borderColor = BUTTON_OUTLINE_PRIMARY_TEXT;
object4.variantOptionInner = object6;
const ICON_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.ICON_MUTED;
object4.variantOverflowInner = {backgroundColor: ICON_MUTED};
return object4;
}
function VariantOption({variant, zIndex, isSelected}) { // fn#78777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:796, offset: 0x01e340b8, size: 191 bytes, params: 2, frame: 20
const styles = useStyles(isSelected);
const useProductPurchaseStateModule = require(10060) /* metro dependency 10060: useProductPurchaseState */;
const useProductPurchaseState = useProductPurchaseStateModule.useProductPurchaseState;
return (
<View style={[styles.variantOption, {zIndex: zIndex}]}>
<View style={[styles.variantOptionInner, {backgroundColor: variant.variantValue}]}>
{Reflect.apply(useProductPurchaseState, useProductPurchaseStateModule,
[variant]).isPurchased && <VariantCheckmark variant={variant} />}
</View>
</View>
);
}
function VariantCheckmark({variant}) { // fn#78778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1083, offset: 0x01e34177, size: 128 bytes, params: 2, frame: 17
const value2 = (importDefault(10082) /* metro dependency 10082: useIsVariantColorLight */)(variant);
const CheckmarkSmallIcon = (require(6742) /* metro dependency 6742: CheckmarkSmallIcon */).CheckmarkSmallIcon;
const colors = (importDefault(697) /* metro dependency 697: native */).colors;
return <CheckmarkSmallIcon color={value2 ? colors.BLACK : colors.WHITE} size="xxs" />;
}
function VariantOverflowOption(a0) { // fn#78779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1239, offset: 0x01e341f7, size: 193 bytes, params: 2, frame: 19
const zIndex = a0.zIndex;
const styles = useStyles(a0.isSelected);
const items3 = [styles.variantOption];
items3[1] = {zIndex: zIndex};
const items2 = [styles.variantOptionInner];
items2[1] = styles.variantOverflowInner;
const PlusSmallIcon = (require(10083) /* metro dependency 10083: PlusSmallIcon */).PlusSmallIcon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
return (
<View style={items3}>
<View style={items2}>
<PlusSmallIcon color={WHITE} size="xxs" />
</View>
</View>
);
}
function _fun78780({product}) { // fn#78780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1480, offset: 0x01e342b8, size: 248 bytes, params: 2, frame: 23
var r5;
var variants;
var length;
var value3;
var value4;
var value5;
var items2;
const styles = useStyles();
const value2 = (require(10021) /* metro dependency 10021: useDefaultVariantIndex */).useDefaultVariantIndex(product);
const collectiblesProductUtilsModule = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
const getIsVariantProduct = collectiblesProductUtilsModule.getIsVariantProduct;
if (Reflect.apply(getIsVariantProduct, collectiblesProductUtilsModule, [product])) {
variants = product.variants;
length = variants.length;
value3 = 4;
value4 = 3;
r5 = length > value3 ? value4 : length;
var viewBindingProps = {style: styles.variantsContainer};
variants = product.variants;
value5 = 0;
items2 = [variants.slice(value5, r5).map(_fun78781)];
r5 = r5 !== length && <VariantOverflowOption isSelected={value2 >= value4} zIndex={value2 >= value4 ? value3 : value5} />;
items2[1] = r5;
function VariantOption({variant, zIndex, isSelected}) { // fn#78777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:796, offset: 0x01e340b8, size: 191 bytes, params: 2, frame: 20
const styles = useStyles(isSelected);
const useProductPurchaseState = UseProductPurchaseStateModule.useProductPurchaseState;
return (
<View {...viewBindingProps}>
{items2}
<View style={[styles.variantOption, {zIndex: zIndex}]}>
<View style={[styles.variantOptionInner, {backgroundColor: variant.variantValue}]}>
{Reflect.apply(useProductPurchaseState, UseProductPurchaseStateModule,
[variant]).isPurchased && <VariantCheckmark variant={variant} />}
</View>
</View>
);
}
return null;
}
function _fun78781(a0, a1) { // fn#78781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1699, offset: 0x01e343b0, size: 91 bytes, params: 3, frame: 18
const value = environment.__proto__;
const binding = env0_0;
const Math = global.Math;
return (
<VariantOption
variant={a0}
isSelected={a1 === binding}
zIndex={4 - Math.abs(binding - a1)}
key={a0.variantValue}
/>
);
function VariantCheckmark({variant}) { // fn#78778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1083, offset: 0x01e34177, size: 128 bytes, params: 2, frame: 17
const value2 = (UseIsVariantColorLight)(variant);
const CheckmarkSmallIcon = (CheckmarkSmallIconModule).CheckmarkSmallIcon;
const colors = (Native).colors;
return <CheckmarkSmallIcon color={value2 ? colors.BLACK : colors.WHITE} size="xxs" />;
}
function VariantOverflowOption(a0) { // fn#78779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1239, offset: 0x01e341f7, size: 193 bytes, params: 2, frame: 19
const zIndex = a0.zIndex;
const styles = useStyles(a0.isSelected);
const items3 = [styles.variantOption];
items3[1] = {zIndex: zIndex};
const items2 = [styles.variantOptionInner];
items2[1] = styles.variantOverflowInner;
const PlusSmallIcon = (PlusSmallIconModule).PlusSmallIcon;
const WHITE = (Native).colors.WHITE;
return (
<View style={items3}>
<View style={items2}>
<PlusSmallIcon color={WHITE} size="xxs" />
</View>
</View>
);
}
function _fun78780({product}) { // fn#78780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1480, offset: 0x01e342b8, size: 248 bytes, params: 2, frame: 23
var r5;
var variants;
var length;
var value3;
var value4;
var value5;
var items2;
const styles = useStyles();
const value2 = (UseDefaultVariantIndexModule).useDefaultVariantIndex(product);
const getIsVariantProduct = CollectiblesProductUtilsModule.getIsVariantProduct;
if (Reflect.apply(getIsVariantProduct, CollectiblesProductUtilsModule, [product])) {
variants = product.variants;
length = variants.length;
value3 = 4;
value4 = 3;
r5 = length > value3 ? value4 : length;
var viewBindingProps = {style: styles.variantsContainer};
variants = product.variants;
value5 = 0;
items2 = [variants.slice(value5, r5).map(_fun78781)];
r5 = r5 !== length && <VariantOverflowOption isSelected={value2 >= value4} zIndex={value2 >= value4 ? value3 : value5} />;
items2[1] = r5;
return (
<View {...viewBindingProps}>
{items2}
</View>
);
}
return null;
function _fun78781(a0, a1) { // fn#78781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10267:1699, offset: 0x01e343b0, size: 91 bytes, params: 3, frame: 18
const value = environment.__proto__;
const binding = env0_0;
const Math = global.Math;
return (
<VariantOption
variant={a0}
isSelected={a1 === binding}
zIndex={4 - Math.abs(binding - a1)}
key={a0.variantValue}
/>
);
}
}
}
global.__d(_fun78775, 10081, [31, 27, 33, 4501, 697, 10060, 10082, 6742, 10083, 10021, 5133,
2]) /* metro module 10081, dependencies: [31, 27, 33, 4501, 697, 10060, 10082, 6742, 10083, 10021, 5133, 2] */;
@@ -1,85 +1,97 @@
/* Metro module 14064; source: modules/collectibles/native/CollectiblesShopCardsGrid.tsx; dependencies: [31, 27, 5121, 33, 4501, 10020, 10023, 14063, 22, 2] */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import CollectiblesShopCardV2 from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseCardLayoutModule from './hooks/useCardLayout.tsx'; /* Metro dependency 14063 */
function _fun106626(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:6, offset: 0x022e3411, size: 269 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
const COLLECTIBLES_SHOP_CARD_GAP = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_GAP;
const env0_8 = Reflect.apply(createStyles, value, [{rowContainer: {'justifyContent': 'center',
'flexDirection': 'row', gap: COLLECTIBLES_SHOP_CARD_GAP}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardsGrid.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCardsGrid.tsx');
exports.default = _default_106629;
function ShopCardGridItem({product, index, cardWidth, preferVCPrice, unpublishedAt, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#106627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:305, offset: 0x022e351e, size: 188 bytes, params: 2, frame: 22
const value2 = ReactModule.useMemo(function() {
return {tilePosition: index};
}, [index]);
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={value2}>
{((Component) => <Component unpublishedAt={unpublishedAt} product={product} cardWidth={cardWidth} preferVCPrice={preferVCPrice} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />)(CollectiblesShopCardV2)}
</CollectiblesAnalyticsProvider>
);
}
function _default_106629({products, accessibilityLabel, category, preferVCPrice, scrollEnabled, onScroll, paddingTop, paddingBottom, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#106629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:688, offset: 0x022e35ea, size: 309 bytes, params: 2, frame: 24
scrollEnabled = !(scrollEnabled === undefined) && scrollEnabled;
const env0_5 = useStyles();
const value2 = (UseCardLayoutModule).useCardLayout();
const columns = value2.columns;
const env0_7 = value2.cardWidth;
const value3 = disableBundleStaticBackground.useMemo(_fun106630, [products, columns]);
const COLLECTIBLES_SHOP_CARD_GAP = (CollectiblesShopCardV2Module).COLLECTIBLES_SHOP_CARD_GAP;
return (
<ScrollView
accessibilityLabel={accessibilityLabel}
accessibilityRole="list"
scrollEnabled={scrollEnabled}
showsVerticalScrollIndicator={false}
onScroll={onScroll}
contentContainerStyle={{
gap: COLLECTIBLES_SHOP_CARD_GAP,
paddingTop: paddingTop,
paddingBottom: paddingBottom,
}}
>
{value3.map(_fun106631)}
</ScrollView>
);
function _fun106630() { // fn#106630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:948, offset: 0x022e371f, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.chunk(products, columns);
}
function _fun106631(a0, a1) { // fn#106631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:1204, offset: 0x022e3751, size: 74 bytes, params: 3, frame: 17
const env0_0 = a1;
return (
<View style={styles.rowContainer} key={a1}>
{a0.map(_fun106632)}
</View>
);
function _fun106632(a0, a1) { // fn#106632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:1253, offset: 0x022e379b, size: 161 bytes, params: 3, frame: 19
return (
<ShopCardGridItem
product={a0}
index={require * columns + a1}
cardWidth={cardWidth}
unpublishedAt={(category ?? CollectiblesCategoryStore.getCategoryForProduct(a0.skuId))?.unpublishedAt}
preferVCPrice={preferVCPrice}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
key={a0.skuId}
/>
);
}
}
}
}
function ShopCardGridItem({product, index, cardWidth, preferVCPrice, unpublishedAt, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#106627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:305, offset: 0x022e351e, size: 188 bytes, params: 2, frame: 22
const value2 = env0_3.useMemo(function() {
return {tilePosition: index};
}, [index]);
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
return (
<CollectiblesAnalyticsProvider newValue={value2}>
{((Component) => <Component unpublishedAt={unpublishedAt} product={product} cardWidth={cardWidth} preferVCPrice={preferVCPrice} disableBundleStaticBackground={disableBundleStaticBackground} muteBundleStaticBackground={muteBundleStaticBackground} />)(importDefault(10020) /* metro dependency 10020: CollectiblesShopCardV2 */)}
</CollectiblesAnalyticsProvider>
);
}
function _default_106629({products, accessibilityLabel, category, preferVCPrice, scrollEnabled, onScroll, paddingTop, paddingBottom, disableBundleStaticBackground, muteBundleStaticBackground}) { // fn#106629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:688, offset: 0x022e35ea, size: 309 bytes, params: 2, frame: 24
scrollEnabled = !(scrollEnabled === undefined) && scrollEnabled;
const env0_5 = useStyles();
const value2 = (require(14063) /* metro dependency 14063: useCardLayout */).useCardLayout();
const columns = value2.columns;
const env0_7 = value2.cardWidth;
const value3 = disableBundleStaticBackground.useMemo(_fun106630, [products, columns]);
const COLLECTIBLES_SHOP_CARD_GAP = (require(10020) /* metro dependency 10020: CollectiblesShopCardV2 */).COLLECTIBLES_SHOP_CARD_GAP;
return (
<ScrollView
accessibilityLabel={accessibilityLabel}
accessibilityRole="list"
scrollEnabled={scrollEnabled}
showsVerticalScrollIndicator={false}
onScroll={onScroll}
contentContainerStyle={{gap: COLLECTIBLES_SHOP_CARD_GAP, paddingTop: paddingTop,
paddingBottom: paddingBottom}}
>
{value3.map(_fun106631)}
</ScrollView>
);
}
function _fun106630() { // fn#106630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:948, offset: 0x022e371f, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
return value.chunk(products, columns);
}
function _fun106631(a0, a1) { // fn#106631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:1204, offset: 0x022e3751, size: 74 bytes, params: 3, frame: 17
const env0_0 = a1;
return (
<View style={styles.rowContainer} key={a1}>
{a0.map(_fun106632)}
</View>
);
}
function _fun106632(a0, a1) { // fn#106632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14261:1253, offset: 0x022e379b, size: 161 bytes, params: 3, frame: 19
return (
<ShopCardGridItem
product={a0}
index={require * columns + a1}
cardWidth={cardWidth}
unpublishedAt={(category ?? CollectiblesCategoryStore.getCategoryForProduct(a0.skuId))?.unpublishedAt}
preferVCPrice={preferVCPrice}
disableBundleStaticBackground={disableBundleStaticBackground}
muteBundleStaticBackground={muteBundleStaticBackground}
key={a0.skuId}
/>
);
}
global.__d(_fun106626, 14064, [31, 27, 5121, 33, 4501, 10020, 10023, 14063, 22,
2]) /* metro module 14064, dependencies: [31, 27, 5121, 33, 4501, 10020, 10023, 14063, 22, 2] */;
@@ -1,13 +1,28 @@
/* Metro module 10116; source: modules/collectibles/native/CollectiblesShopCheckoutDetails.tsx; dependencies: [31, 27, 663, 8471, 33, 4501, 697, 8481, 5475, 10117, 8498, 10031, 7609, 8487, 10030, 8470, 1901, 8483, 1904, 664, 10064, 10063, 7596, 1244, 4573, 5133, 10066, 10118, 7594, 3802, 10080, 2] */
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import UseProfileEffect from '../profile_effects/useProfileEffect.tsx'; /* Metro dependency 8481 */
import Nameplate from '../nameplates/native/Nameplate.tsx'; /* Metro dependency 8483 */
import UseMaybeFetchProfileFrame from '../profile_frames/useMaybeFetchProfileFrame.tsx'; /* Metro dependency 8498 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as FractionalPremiumSKUsModule from '../../../external/discord_common/js/shared/shared-constants/FractionalPremiumSKUs.tsx'; /* Metro dependency 664 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UtilsModule from '../nameplates/utils.tsx'; /* Metro dependency 1901 */
import * as CollectiblesItemTypeModule from '../../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as UseCurrentUserModule from '../hooks/useCurrentUser.tsx'; /* Metro dependency 7594 */
import * as UseShopProductItemsModule from '../hooks/useShopProductItems.tsx'; /* Metro dependency 7609 */
import * as CollectiblesPreviewConstantsModule from './CollectiblesPreviewConstants.tsx'; /* Metro dependency 8471 */
import * as CollectiblesMobileFlexibleBundlesExperimentModule from '../experiments/CollectiblesMobileFlexibleBundlesExperiment.tsx'; /* Metro dependency 8487 */
import * as GetProductNameModule from '../utils/getProductName.tsx'; /* Metro dependency 10080 */
function _fun78973(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6, offset: 0x01e3f2b9, size: 939 bytes, params: 8, frame: 24
var object5;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).EXTERNAL_PRODUCT_SKU_IDS;
let value = require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */;
let value = CollectiblesPreviewConstantsModule;
const env0_6 = value.BUNDLE_PREVIEW_CONFIG;
const SAMPLE_PROFILE_ASPECT_RATIO = value.SAMPLE_PROFILE_ASPECT_RATIO;
value = require(33) /* metro dependency 33 */;
@@ -15,37 +30,37 @@ function _fun78973(global, require, importDefault, importAll, module, exports, d
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
object5 = {externalProductImage: {'width': 45, 'height': 45}};
const object6 = {'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object5.bundlePreviewContainer = object6;
object5.bundlePreviewScale = {'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center'};
const object9 = {};
object9.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object9.flexDirection = 'column';
object = {externalProductImage: {'width': 45, 'height': 45}};
let object2 = {'alignItems': 'center', 'justifyContent': 'center', 'overflow': 'hidden'};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.bundlePreviewContainer = object2;
object.bundlePreviewScale = {'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center'};
const object3 = {};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.flexDirection = 'column';
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object9.backgroundColor = BACKGROUND_MOD_SUBTLE;
object5.productContainer = object9;
const object11 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
object3.backgroundColor = BACKGROUND_MOD_SUBTLE;
object.productContainer = object3;
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object11.paddingHorizontal = PX_16;
object4.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object11.paddingVertical = PX_16;
object5.productDetailsContainer = object11;
object5.productPreviewContainer = {'justifyContent': 'center', 'alignItems': 'center'};
object4.paddingVertical = PX_16;
object.productDetailsContainer = object4;
object.productPreviewContainer = {'justifyContent': 'center', 'alignItems': 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.productDetails = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
object.productDetails = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object5.productDetailsTextContainer = {gap: PX_4};
const object12 = {'height': 36, 'backgroundColor': null, 'justifyContent': 'center'};
object.productDetailsTextContainer = {gap: PX_4};
const object7 = {'height': 36, 'backgroundColor': null, 'justifyContent': 'center'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object12.backgroundColor = BACKGROUND_SURFACE_HIGH;
object7.backgroundColor = BACKGROUND_SURFACE_HIGH;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object12.paddingHorizontal = PX_16;
object12.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object12.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object5.errorContainer = object12;
const env0_9 = Reflect.apply(createStyles, value, [object5]);
object7.paddingHorizontal = PX_16;
object7.borderBottomLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object7.borderBottomRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.errorContainer = object7;
const env0_9 = Reflect.apply(createStyles, value, [object]);
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
var object2 = {borderWidth: 2};
var property = importDefault(dependencyMap[6]).colors;
@@ -56,329 +71,395 @@ function _fun78973(global, require, importDefault, importAll, module, exports, d
});
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object13 = {'position': 'relative', 'width': '100%', 'height': '100%', 'borderRadius': null,
const object8 = {'position': 'relative', 'width': '100%', 'height': '100%', 'borderRadius': null,
'overflow': 'hidden'};
object13.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_11 = Reflect.apply(createStyles, value, [{profileEffectContainer: object13,
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_11 = Reflect.apply(createStyles, value, [{profileEffectContainer: object8,
profileEffect: {'position': 'absolute', 'width': '100%', 'aspectRatio': null, 'top': 0,
aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO}}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
const object14 = {};
object14.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_12 = Reflect.apply(createStyles, value, [{nameplate: object14}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCheckoutDetails.tsx');
const object10 = {};
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_12 = Reflect.apply(createStyles, value, [{nameplate: object10}]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopCheckoutDetails.tsx');
exports.default = CollectiblesShopCheckoutDetails;
}
function ProfileEffectAssetPreview({item}) { // fn#78974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:1758, offset: 0x01e3f664, size: 250 bytes, params: 2, frame: 25
var r0;
var FastImage;
var object2;
var accessibilityLabel;
var profileEffect;
var items2;
var value;
const styles = useStyles();
const value2 = (UseProfileEffect)(item.skuId);
if (value2 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.profileEffectContainer};
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
object2 = {uri: importDefault(10117) /* metro dependency 10117: sample_profile_smallPng */};
accessibilityLabel = value2.accessibilityLabel;
profileEffect = styles.profileEffect;
items2 = [
<FastImage
source={object2}
alt={accessibilityLabel}
style={profileEffect}
resizeMode="cover"
/>,
];
value = importDefault(5475) /* metro dependency 5475: FastImage */;
profileEffect = styles.profileEffect;
items2[1] = ((Component) => <Component style={profileEffect} source={{uri: value2.thumbnailPreviewSrc}} alt={value2.title} resizeMode="cover" />)(value);
value = (
<View {...viewBindingProps}>
{items2}
</View>
);
r0 = value;
}
return r0;
}
function ProfileEffectAssetPreview({item}) { // fn#78974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:1758, offset: 0x01e3f664, size: 250 bytes, params: 2, frame: 25
var r0;
var FastImage;
var object;
var accessibilityLabel;
var profileEffect;
var items2;
var value;
const styles = useStyles();
const value2 = (importDefault(8481) /* metro dependency 8481: useProfileEffect */)(item.skuId);
if (value2 == null) {
r0 = null;
} else {
var viewBindingProps = {style: styles.profileEffectContainer};
FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
object = {uri: importDefault(10117) /* metro dependency 10117: sample_profile_smallPng */};
accessibilityLabel = value2.accessibilityLabel;
profileEffect = styles.profileEffect;
items2 = [<FastImage source={object} alt={accessibilityLabel} style={profileEffect} resizeMode="cover" />];
value = importDefault(5475) /* metro dependency 5475: FastImage */;
profileEffect = styles.profileEffect;
items2[1] = ((Component) => <Component style={profileEffect} source={{uri: value2.thumbnailPreviewSrc}} alt={value2.title} resizeMode="cover" />)(value);
value = <View {...viewBindingProps}>{items2}</View>;
r0 = value;
function ProfileFrameAssetPreview({item, width, height}) { // fn#78975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2102, offset: 0x01e3f75e, size: 146 bytes, params: 2, frame: 19
var r0;
var value;
const value2 = (UseMaybeFetchProfileFrame)(item.skuId,
'CollectiblesShopCheckoutDetails');
if (value2 == null) {
r0 = null;
} else {
value = importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */;
value = ((Component) => <Component profileFrame={value2} previewWidth={width} previewHeight={height} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(value);
r0 = value;
}
return r0;
}
return r0;
}
function ProfileFrameAssetPreview({item, width, height}) { // fn#78975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2102, offset: 0x01e3f75e, size: 146 bytes, params: 2, frame: 19
var r0;
var value;
const value2 = (importDefault(8498) /* metro dependency 8498: useMaybeFetchProfileFrame */)(item.skuId,
'CollectiblesShopCheckoutDetails');
if (value2 == null) {
r0 = null;
} else {
value = importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */;
value = ((Component) => <Component profileFrame={value2} previewWidth={width} previewHeight={height} profileBackgroundColor={(importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW} />)(value);
r0 = value;
}
return r0;
}
function BundleAssetPreview({product, width, height}) { // fn#78976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2359, offset: 0x01e3f7f0, size: 466 bytes, params: 2, frame: 27
var r0;
var object2;
var value;
const styles = useStyles();
const {firstProfileEffect, firstAvatarDecoration,
firstNameplate} = (UseShopProductItemsModule).useShopProductItems(product);
const useCollectiblesMobileFlexibleBundlesExperiment = CollectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
const enabled = Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
CollectiblesMobileFlexibleBundlesExperimentModule, ['CollectiblesShopCheckoutDetails']).enabled;
const bundleWidth = BUNDLE_PREVIEW_CONFIG.small.bundleWidth;
const bundleWidth2 = bundleWidth;
const r7 = enabled ? bundleWidth : global.Math.round(1.1494252873563218 * bundleWidth);
const value4 = width / r7;
let binding = bundleWidth2;
let useMemo = binding.useMemo;
let object = [styles.bundlePreviewContainer, width, height];
const value5 = Reflect.apply(useMemo, binding, [function() {
return [styles.bundlePreviewContainer, {width: width, height: height}];
}, object]);
binding = bundleWidth2;
useMemo = binding.useMemo;
if ((require(10030) /* metro dependency 10030: bundleUtils */).isValidCollectiblesBundle(product)) {
object = {style: value5};
object2 = {style: Reflect.apply(useMemo, binding, [_fun78978, [styles.bundlePreviewScale, bundleWidth, r7,
value4]])};
value = importDefault(8470) /* metro dependency 8470: BundleSampleV2 */;
value = (
<View {...object}>
<View {...object2}>
{((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} previewAssets={product.previewAssets} disableStaticBackground size="small" exposureLocation="CollectiblesShopCheckoutDetails" />)(value)}
</View>
</View>
);
r0 = value;
} else {
r0 = null;
}
return r0;
function _fun78978() { // fn#78978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2806, offset: 0x01e3f9ef, size: 68 bytes, params: 1, frame: 4
return [styles.bundlePreviewScale, {width: bundleWidth, height: ReactNativeModule.View, transform: [{scale: CollectiblesShopConstantsModule.EXTERNAL_PRODUCT_SKU_IDS}]}];
}
function BundleAssetPreview({product, width, height}) { // fn#78976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2359, offset: 0x01e3f7f0, size: 466 bytes, params: 2, frame: 27
var r0;
var object3;
var value;
const styles = useStyles();
const {firstProfileEffect, firstAvatarDecoration,
firstNameplate} = (require(7609) /* metro dependency 7609: useShopProductItems */).useShopProductItems(product);
const collectiblesMobileFlexibleBundlesExperimentModule = require(8487) /* metro dependency 8487: CollectiblesMobileFlexibleBundlesExperiment */;
const useCollectiblesMobileFlexibleBundlesExperiment = collectiblesMobileFlexibleBundlesExperimentModule.useCollectiblesMobileFlexibleBundlesExperiment;
const enabled = Reflect.apply(useCollectiblesMobileFlexibleBundlesExperiment,
collectiblesMobileFlexibleBundlesExperimentModule, ['CollectiblesShopCheckoutDetails']).enabled;
const bundleWidth = BUNDLE_PREVIEW_CONFIG.small.bundleWidth;
const env0_3 = bundleWidth;
const r7 = enabled ? bundleWidth : global.Math.round(1.1494252873563218 * bundleWidth);
const value4 = width / r7;
let binding = env0_3;
let useMemo = binding.useMemo;
let object = [styles.bundlePreviewContainer, width, height];
const value5 = Reflect.apply(useMemo, binding, [function() {
return [styles.bundlePreviewContainer, {width: width, height: height}];
}, object]);
binding = env0_3;
useMemo = binding.useMemo;
if ((require(10030) /* metro dependency 10030: bundleUtils */).isValidCollectiblesBundle(product)) {
object = {style: value5};
object3 = {style: Reflect.apply(useMemo, binding, [_fun78978, [styles.bundlePreviewScale, bundleWidth, r7,
value4]])};
value = importDefault(8470) /* metro dependency 8470: BundleSampleV2 */;
value = <View {...object}><View {...object3}>{((Component) => <Component deco={firstAvatarDecoration} pfx={firstProfileEffect} nameplate={firstNameplate} previewAssets={product.previewAssets} disableStaticBackground size="small" exposureLocation="CollectiblesShopCheckoutDetails" />)(value)}</View></View>;
r0 = value;
} else {
r0 = null;
}
return r0;
}
function NameplateAssetPreview({item}) { // fn#78979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3163, offset: 0x01e3fa33, size: 110 bytes, params: 2, frame: 16
const styles = useStyles();
return ((Component) => <Component nameplate={(require(1901) /* metro dependency 1901: utils */).getNameplateData(item)} fullOpacity isSquarePreview style={styles.nameplate} />)(importDefault(8483) /* metro dependency 8483: Nameplate */);
}
function NameplateAssetPreview({item}) { // fn#78979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3163, offset: 0x01e3fa33, size: 110 bytes, params: 2, frame: 16
const styles = useStyles();
return ((Component) => <Component nameplate={(UtilsModule).getNameplateData(item)} fullOpacity isSquarePreview style={styles.nameplate} />)(Nameplate);
}
function CollectibleProductPreview({product, recipientUser}) { // fn#78980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3330, offset: 0x01e3faa1, size: 230 bytes, params: 2, frame: 22
const styles = useStyles();
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
const r9 = type === PROFILE_EFFECT ? 42 : product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? 55 : 42;
return (
<View style={[styles.productPreviewContainer, {height: 55, width: r9}]}>
<CollectibleProductPreviewContent
product={product}
width={r9}
height={55}
userAvatarSource={recipientUser?.getAvatarSource(undefined, false, r9)}
/>
</View>
);
}
function CollectibleProductPreviewContent({product, width, height, userAvatarSource}) { // fn#78981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3730, offset: 0x01e3fb87, size: 638 bytes, params: 2, frame: 21
const styles = useStyles();
const FractionalPremiumSKUsSets = (require(664) /* metro dependency 664: FractionalPremiumSKUs */).FractionalPremiumSKUsSets;
const ALL = FractionalPremiumSKUsSets.ALL;
const has = ALL.has;
let skuId = product.skuId;
if (Reflect.apply(has, ALL, [skuId])) {
return ((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return ((Component) => <Component item={product.items[0]} size={width} avatarSource={userAvatarSource} animate={false} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return <ProfileEffectAssetPreview item={product.items[0]} />;
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return <NameplateAssetPreview item={product.items[0]} />;
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
function CollectibleProductPreview({product, recipientUser}) { // fn#78980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3330, offset: 0x01e3faa1, size: 230 bytes, params: 2, frame: 22
const styles = useStyles();
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
const r9 = type === PROFILE_EFFECT ? 42 : product.type !== (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType.PROFILE_FRAME ? 55 : 42;
return (
<ProfileFrameAssetPreview
item={product.items[0]}
width={width}
height={height}
/>
<View style={[styles.productPreviewContainer, {height: 55, width: r9}]}>
<CollectibleProductPreviewContent
product={product}
width={r9}
height={55}
userAvatarSource={recipientUser?.getAvatarSource(undefined, false, r9)}
/>
</View>
);
}
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === type) {
return (
<BundleAssetPreview
product={product}
width={width}
height={height}
/>
function CollectibleProductPreviewContent({product, width, height, userAvatarSource}) { // fn#78981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:3730, offset: 0x01e3fb87, size: 638 bytes, params: 2, frame: 21
const styles = useStyles();
const FractionalPremiumSKUsSets = (FractionalPremiumSKUsModule).FractionalPremiumSKUsSets;
const ALL = FractionalPremiumSKUsSets.ALL;
const has = ALL.has;
let skuId = product.skuId;
if (Reflect.apply(has, ALL, [skuId])) {
return ((Component) => <Component source={{uri: importDefault(10064) /* metro dependency 10064: mobile_fraction_nitro_2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return ((Component) => <Component source={{uri: importDefault(10063) /* metro dependency 10063: orb_profile_badge_icon2xPng */}} style={styles.externalProductImage} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
const type = product.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return ((Component) => <Component item={product.items[0]} size={width} avatarSource={userAvatarSource} animate={false} />)(importDefault(7596) /* metro dependency 7596: AvatarDecorationSampleV2 */);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return <ProfileEffectAssetPreview item={product.items[0]} />;
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return <NameplateAssetPreview item={product.items[0]} />;
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return (
<ProfileFrameAssetPreview
item={product.items[0]}
width={width}
height={height}
/>
);
}
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === type) {
return (
<BundleAssetPreview
product={product}
width={width}
height={height}
/>
);
}
return null;
}
function ProductDetails({product, recipientUser}) { // fn#78982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:4638, offset: 0x01e3fe05, size: 379 bytes, params: 2, frame: 28
var view;
var items3;
const Text = (TextModule).Text;
var items2;
const styles = useStyles();
const value2 = ReactModule.useMemo(_fun78983, [product.type, product.skuId]);
if (value2 == null) {
view = (
<View style={styles.productDetails}>
<Text variant="text-md/semibold">
{product.name}
</Text>
</View>
);
} else {
var viewBindingProps = {style: styles.productDetails};
items3 = [
<CollectibleProductPreview product={product} recipientUser={recipientUser} />,
];
var viewBinding2Props = {style: styles.productDetailsTextContainer};
items2 = [
<Text variant="text-md/semibold">
{product.name}
</Text>,
];
items2[1] = (
<Text variant="text-sm/medium">
{value2}
</Text>
);
items3[1] = (
<View {...viewBinding2Props}>
{items2}
</View>
);
view = (
<View {...viewBindingProps}>
{items3}
</View>
);
}
return view;
function _fun78983() { // fn#78983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:4714, offset: 0x01e3ff80, size: 684 bytes, params: 1, frame: 15
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const FractionalPremiumSKUsSets = (FractionalPremiumSKUsModule).FractionalPremiumSKUsSets;
const ALL = FractionalPremiumSKUsSets.ALL;
const has = ALL.has;
let skuId = product.skuId;
if (Reflect.apply(has, ALL, [skuId])) {
return intl.string(t.DFMPWS);
}
skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return intl.string(t['0+rBWT']);
}
const type = product.type;
const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return intl.string(t['7v0T9P']);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return intl.string(t.wR5wOo);
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return intl.string(t.x5CoXR);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return intl.string(t.GWrZOd);
}
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === type) {
return intl.string(t.Zr5tjn);
}
return null;
}
}
function ProductPriceAmountTag({product, hasShopDiscount, useOrbPrice}) { // fn#78984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:5822, offset: 0x01e4022c, size: 198 bytes, params: 2, frame: 17
var r0;
var value;
const {orbPrice, priceText} = ReactModule.useMemo(_fun78985, [product, hasShopDiscount, useOrbPrice]);
if (useOrbPrice) {
value = undefined;
value = ((Component) => <Component orbAmount={orbPrice == null ? value : orbPrice.amount} />)(importDefault(10118) /* metro dependency 10118: OrbCheckoutAmountTag */);
r0 = value;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r0 = (
<Text variant="text-md/semibold">
{priceText}
</Text>
);
}
return r0;
function _fun78985() { // fn#78985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:5915, offset: 0x01e402f2, size: 126 bytes, params: 1, frame: 19
var r1;
var r2;
var value3;
var moduleValue;
var value4;
var productOrbPrice;
if (useOrbPrice) {
value4 = undefined;
productOrbPrice = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: product,
hasShopDiscount: hasShopDiscount});
r1 = value4;
r2 = productOrbPrice;
} else {
value3 = undefined;
moduleValue = require(10066) /* metro dependency 10066: CollectiblesUtils */;
r1 = moduleValue.getFormattedPriceForCollectiblesProduct(product, hasShopDiscount, true);
r2 = value3;
}
return {orbPrice: r2, priceText: r1};
}
}
function CollectiblesShopCheckoutDetails({product, recipientUser, isValidRecipient, useOrbPrice, isGift}) { // fn#78987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6342, offset: 0x01e403de, size: 507 bytes, params: 2, frame: 28
var Text;
var intl;
isValidRecipient = !(isValidRecipient === undefined) && isValidRecipient;
useOrbPrice = !(useOrbPrice === undefined) && useOrbPrice;
isGift = !(isGift === undefined) && isGift;
const styles = useStyles();
const styles2 = useStyles(isValidRecipient);
const canUseShopDiscounts2 = (PremiumUtils).canUseShopDiscounts((UseCurrentUserModule).useCurrentUser());
const value3 = ReactModule.useMemo(_fun78988, [product, useOrbPrice, canUseShopDiscounts2]);
const items2 = [styles.productContainer];
items2[1] = isGift && styles2.giftProductContainer;
const view = (
<View
style={styles.productDetailsContainer}
accessibilityLabel={value3}
accessible
>
<ProductDetails product={product} recipientUser={recipientUser} />
<ProductPriceAmountTag
product={product}
hasShopDiscount={canUseShopDiscounts2}
useOrbPrice={useOrbPrice}
/>
</View>
);
let r5 = isGift && !isValidRecipient;
if (r5) {
var viewBinding3Props = {style: styles.errorContainer};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = (
<View {...viewBinding3Props}>
<Text variant="text-xs/semibold" color="text-feedback-critical">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3YfczA'])}
</Text>
</View>
);
}
return (
<View style={items2}>
{view}
{r5}
</View>
);
function _fun78988() { // fn#78988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6555, offset: 0x01e405d9, size: 275 bytes, params: 1, frame: 22
var r3;
var amount;
var intl;
var formatToPlainString;
var W4DfeF;
let value = environment.__proto__;
const value2 = undefined;
const productNameAndTypeLabel = (GetProductNameModule).getProductNameAndTypeLabel(product);
if (useOrbPrice) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
value = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
value = value.getProductOrbPrice({product: product, hasShopDiscount: env0_2});
amount = value == null ? value2 : value.amount;
value = '';
value = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount ?? value}]);
r3 = value;
} else {
value = require(10066) /* metro dependency 10066: CollectiblesUtils */;
value = value.getFormattedPriceForCollectiblesProduct(product, env0_2, true);
r3 = value ?? '';
}
return '' + productNameAndTypeLabel + ', ' + r3;
}
}
return null;
}
function ProductDetails({product, recipientUser}) { // fn#78982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:4638, offset: 0x01e3fe05, size: 379 bytes, params: 2, frame: 28
var view;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
const styles = useStyles();
const value2 = env0_3.useMemo(_fun78983, [product.type, product.skuId]);
if (value2 == null) {
view = <View style={styles.productDetails}><Text variant="text-md/semibold">{product.name}</Text></View>;
} else {
var viewBindingProps = {style: styles.productDetails};
items3 = [<CollectibleProductPreview product={product} recipientUser={recipientUser} />];
var viewBinding2Props = {style: styles.productDetailsTextContainer};
items2 = [<Text variant="text-md/semibold">{product.name}</Text>];
items2[1] = <Text variant="text-sm/medium">{value2}</Text>;
items3[1] = <View {...viewBinding2Props}>{items2}</View>;
view = <View {...viewBindingProps}>{items3}</View>;
}
return view;
}
function ProductPriceAmountTag({product, hasShopDiscount, useOrbPrice}) { // fn#78984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:5822, offset: 0x01e4022c, size: 198 bytes, params: 2, frame: 17
var r0;
var value;
const {orbPrice, priceText} = env0_3.useMemo(_fun78985, [product, hasShopDiscount, useOrbPrice]);
if (useOrbPrice) {
value = undefined;
value = ((Component) => <Component orbAmount={orbPrice == null ? value : orbPrice.amount} />)(importDefault(10118) /* metro dependency 10118: OrbCheckoutAmountTag */);
r0 = value;
} else {
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
r0 = <Text variant="text-md/semibold">{priceText}</Text>;
}
return r0;
}
function CollectiblesShopCheckoutDetails({product, recipientUser, isValidRecipient, useOrbPrice, isGift}) { // fn#78987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6342, offset: 0x01e403de, size: 507 bytes, params: 2, frame: 28
var Text;
var intl;
isValidRecipient = !(isValidRecipient === undefined) && isValidRecipient;
useOrbPrice = !(useOrbPrice === undefined) && useOrbPrice;
isGift = !(isGift === undefined) && isGift;
const styles = useStyles();
const styles2 = useStyles(isValidRecipient);
const canUseShopDiscounts2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseShopDiscounts((require(7594) /* metro dependency 7594: useCurrentUser */).useCurrentUser());
const value3 = env0_3.useMemo(_fun78988, [product, useOrbPrice, canUseShopDiscounts2]);
const items2 = [styles.productContainer];
items2[1] = isGift && styles2.giftProductContainer;
const view = <View style={styles.productDetailsContainer} accessibilityLabel={value3} accessible><ProductDetails product={product} recipientUser={recipientUser} /><ProductPriceAmountTag product={product} hasShopDiscount={canUseShopDiscounts2} useOrbPrice={useOrbPrice} /></View>;
let r5 = isGift && !isValidRecipient;
if (r5) {
var viewBinding3Props = {style: styles.errorContainer};
Text = (require(4573) /* metro dependency 4573: Text */).Text;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = <View {...viewBinding3Props}><Text variant="text-xs/semibold" color="text-feedback-critical">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3YfczA'])}</Text></View>;
}
return (
<View style={items2}>
{view}
{r5}
</View>
);
}
function _fun78978() { // fn#78978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:2806, offset: 0x01e3f9ef, size: 68 bytes, params: 1, frame: 4
return [styles.bundlePreviewScale, {width: bundleWidth, height: env0_4, transform: [{scale: env0_5}]}];
}
function _fun78983() { // fn#78983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:4714, offset: 0x01e3ff80, size: 684 bytes, params: 1, frame: 15
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const FractionalPremiumSKUsSets = (require(664) /* metro dependency 664: FractionalPremiumSKUs */).FractionalPremiumSKUsSets;
const ALL = FractionalPremiumSKUsSets.ALL;
const has = ALL.has;
let skuId = product.skuId;
if (Reflect.apply(has, ALL, [skuId])) {
return intl.string(t.DFMPWS);
}
skuId = product.skuId;
const ORB_PROFILE_BADGE = EXTERNAL_PRODUCT_SKU_IDS.ORB_PROFILE_BADGE;
if (skuId === ORB_PROFILE_BADGE) {
return intl.string(t['0+rBWT']);
}
const type = product.type;
const CollectiblesItemType = (require(1904) /* metro dependency 1904: CollectiblesItemType */).CollectiblesItemType;
const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION;
if (AVATAR_DECORATION === type) {
return intl.string(t['7v0T9P']);
}
const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT;
if (PROFILE_EFFECT === type) {
return intl.string(t.wR5wOo);
}
const NAMEPLATE = CollectiblesItemType.NAMEPLATE;
if (NAMEPLATE === type) {
return intl.string(t.x5CoXR);
}
const PROFILE_FRAME = CollectiblesItemType.PROFILE_FRAME;
if (PROFILE_FRAME === type) {
return intl.string(t.GWrZOd);
}
const BUNDLE = CollectiblesItemType.BUNDLE;
if (BUNDLE === type) {
return intl.string(t.Zr5tjn);
}
return null;
}
function _fun78985() { // fn#78985, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:5915, offset: 0x01e402f2, size: 126 bytes, params: 1, frame: 19
var r1;
var r2;
var value3;
var moduleValue;
var value4;
var productOrbPrice;
if (useOrbPrice) {
value4 = undefined;
productOrbPrice = (require(5133) /* metro dependency 5133: CollectiblesProductUtils */).getProductOrbPrice({product: product,
hasShopDiscount: hasShopDiscount});
r1 = value4;
r2 = productOrbPrice;
} else {
value3 = undefined;
moduleValue = require(10066) /* metro dependency 10066: CollectiblesUtils */;
r1 = moduleValue.getFormattedPriceForCollectiblesProduct(product, hasShopDiscount, true);
r2 = value3;
}
return {orbPrice: r2, priceText: r1};
}
function _fun78988() { // fn#78988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10302:6555, offset: 0x01e405d9, size: 275 bytes, params: 1, frame: 22
var r3;
var amount;
var intl;
var formatToPlainString;
var W4DfeF;
let value = environment.__proto__;
const value2 = undefined;
const productNameAndTypeLabel = (require(10080) /* metro dependency 10080: getProductName */).getProductNameAndTypeLabel(product);
if (useOrbPrice) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
W4DfeF = (require(1244) /* metro dependency 1244: indexNative */).t.W4DfeF;
value = require(5133) /* metro dependency 5133: CollectiblesProductUtils */;
value = value.getProductOrbPrice({product: product, hasShopDiscount: env0_2});
amount = value == null ? value2 : value.amount;
value = '';
value = Reflect.apply(formatToPlainString, intl, [W4DfeF, {orbAmount: amount ?? value}]);
r3 = value;
} else {
value = require(10066) /* metro dependency 10066: CollectiblesUtils */;
value = value.getFormattedPriceForCollectiblesProduct(product, env0_2, true);
r3 = value ?? '';
}
return '' + productNameAndTypeLabel + ', ' + r3;
}
global.__d(_fun78973, 10116, [31, 27, 663, 8471, 33, 4501, 697, 8481, 5475, 10117, 8498, 10031, 7609, 8487, 10030,
8470, 1901, 8483, 1904, 664, 10064, 10063, 7596, 1244, 4573, 5133, 10066, 10118, 7594, 3802, 10080,
2]) /* metro module 10116, dependencies: [31, 27, 663, 8471, 33, 4501, 697, 8481, 5475, 10117, 8498, 10031, 7609, 8487, 10030, 8470, 1901, 8483, 1904, 664, 10064, 10063, 7596, 1244, 4573, 5133, 10066, 10118, 7594, 3802, 10080, 2] */;
@@ -1,119 +1,132 @@
/* Metro module 14912; source: modules/collectibles/native/CollectiblesShopEntryButton.tsx; dependencies: [57, 31, 5174, 1376, 33, 7013, 1365, 14908, 10358, 1244, 14913, 632, 12712, 5154, 10357, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import CollectiblesMarketingsStore from '../CollectiblesMarketingsStore.tsx'; /* Metro dependency 5174 */
import YouScreenNavIcon from '../../main_tabs_v2/native/tabs/you/YouScreenNavIcon.tsx'; /* Metro dependency 14908 */
import MobileShopButtonCoachmark from './MobileShopButtonCoachmark.tsx'; /* Metro dependency 14913 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
import * as UseSelectedDismissibleContentModule from '../../dismissible_content/hooks/useSelectedDismissibleContent.tsx'; /* Metro dependency 7013 */
import * as ShopIconModule from '../../../design/components/Icon/native/redesign/generated/ShopIcon.tsx'; /* Metro dependency 10358 */
function _fun112817(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:6, offset: 0x023dd215, size: 222 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const collectiblesMarketingsStore = importDefault(5174) /* metro dependency 5174: CollectiblesMarketingsStore */;
const env0_5 = (require(1376) /* metro dependency 1376: DismissibleContentConstants */).ContentDismissActionType;
const value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.Fragment;
const env0_8 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopEntryButton.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopEntryButton.tsx');
exports.default = CollectiblesShopEntryButton;
}
function CoachmarkVariant({marketing, navigateToShop, shopButtonRef}) { // fn#112818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:201, offset: 0x023dd2f3, size: 362 bytes, params: 2, frame: 31
const useSelectedDismissibleContentModule = require(7013) /* metro dependency 7013: useSelectedDismissibleContent */;
const useSelectedVersionedDismissibleContent = useSelectedDismissibleContentModule.useSelectedVersionedDismissibleContent;
const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent;
let COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const value3 = env0_3(Reflect.apply(useSelectedVersionedDismissibleContent, useSelectedDismissibleContentModule,
[COLLECTIBLES_SHOP_ENTRY_MARKETING, marketing.version, undefined, true]), 2);
const property = value3[0];
const property2 = value3[1];
COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const value4 = property === COLLECTIBLES_SHOP_ENTRY_MARKETING;
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const YouScreenNavIcon = importDefault(14908) /* metro dependency 14908: YouScreenNavIcon */;
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<>
<YouScreenNavIcon
ref={shopButtonRef}
IconComponent={ShopIcon}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
onPress={onPress_112819}
showRedDot={value4}
/>
{((Component) => <Component marketing={marketing} shopButtonRef={shopButtonRef} navigateToShop={navigateToShop} visible={value4} onDismiss={property2} />)(importDefault(14913) /* metro dependency 14913: MobileShopButtonCoachmark */)}
</>
);
}
function CollectiblesShopEntryButton({navigateToShop, shopButtonRef}) { // fn#112820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:868, offset: 0x023dd48b, size: 534 bytes, params: 2, frame: 24
var COLLECTIBLES_SHOP_ENTRY_MARKETING;
var version;
var SelectedVersionedDismissibleContent;
var value;
const marketingBySurface = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesMarketingsStore],
function() {
return CollectiblesMarketingsStore.getMarketingBySurface(require(dependencyMap[12]).CollectiblesMarketingSurface.MOBILE_SHOP_BUTTON);
});
let r1 = marketingBySurface != null && 'dismissibleContent' in marketingBySurface && marketingBySurface.dismissibleContent === (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const type = marketingBySurface?.type;
const CollectiblesMarketingType = (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType;
const COACHMARK = CollectiblesMarketingType.COACHMARK;
if (type === COACHMARK) {
function CoachmarkVariant({marketing, navigateToShop, shopButtonRef}) { // fn#112818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:201, offset: 0x023dd2f3, size: 362 bytes, params: 2, frame: 31
const useSelectedVersionedDismissibleContent = UseSelectedDismissibleContentModule.useSelectedVersionedDismissibleContent;
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
let COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const value3 = Module00057(Reflect.apply(useSelectedVersionedDismissibleContent, UseSelectedDismissibleContentModule,
[COLLECTIBLES_SHOP_ENTRY_MARKETING, marketing.version, undefined, true]), 2);
const property = value3[0];
const property2 = value3[1];
COLLECTIBLES_SHOP_ENTRY_MARKETING = DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const value4 = property === COLLECTIBLES_SHOP_ENTRY_MARKETING;
const jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
const ShopIcon = (ShopIconModule).ShopIcon;
const intl = (IndexNativeModule).intl;
return (
<CoachmarkVariant
marketing={marketingBySurface}
navigateToShop={navigateToShop}
shopButtonRef={shopButtonRef}
/>
<>
<YouScreenNavIcon
ref={shopButtonRef}
IconComponent={ShopIcon}
accessibilityLabel={intl.string((IndexNativeModule).t.pWG4ze)}
onPress={onPress_112819}
showRedDot={value4}
/>
{((Component) => <Component marketing={marketing} shopButtonRef={shopButtonRef} navigateToShop={navigateToShop} visible={value4} onDismiss={property2} />)(MobileShopButtonCoachmark)}
</>
);
function CoachmarkVariantOnPress() { // fn#112819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:635, owner: CoachmarkVariant.onPress, offset: 0x023dd45d, size: 46 bytes, params: 1, frame: 12
var binding;
var value2;
if (result) {
binding = env0_1;
value2 = environment.__proto__;
binding(ContentDismissActionType.TAKE_ACTION);
}
navigateToShop();
}
}
const closure = children_112822;
if (r1) {
SelectedVersionedDismissibleContent = (require(10357) /* metro dependency 10357: SelectedDismissibleContent */).SelectedVersionedDismissibleContent;
COLLECTIBLES_SHOP_ENTRY_MARKETING = marketingBySurface?.type !== (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType.BADGE ? null : (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
version = marketingBySurface?.version;
value = 0;
value = <SelectedVersionedDismissibleContent contentType={COLLECTIBLES_SHOP_ENTRY_MARKETING} latestVersion={version ?? value}>{closure}</SelectedVersionedDismissibleContent>;
r1 = value;
} else {
r1 = ((Component) => <Component contentTypes={marketingBySurface?.type !== (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType.BADGE ? [] : marketingBySurface?.dismissibleContent != null ? [marketingBySurface.dismissibleContent] : []}>{closure}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
}
return r1;
}
function CoachmarkVariantOnPress() { // fn#112819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:635, owner: CoachmarkVariant.onPress, offset: 0x023dd45d, size: 46 bytes, params: 1, frame: 12
var binding;
var value2;
if (result) {
binding = env0_1;
value2 = environment.__proto__;
binding(ContentDismissActionType.TAKE_ACTION);
}
navigateToShop();
}
function CollectiblesShopEntryButton({navigateToShop, shopButtonRef}) { // fn#112820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:868, offset: 0x023dd48b, size: 534 bytes, params: 2, frame: 24
var COLLECTIBLES_SHOP_ENTRY_MARKETING;
var version;
var SelectedVersionedDismissibleContent;
var value;
const marketingBySurface = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesMarketingsStore],
function() {
return CollectiblesMarketingsStore.getMarketingBySurface(require(dependencyMap[12]).CollectiblesMarketingSurface.MOBILE_SHOP_BUTTON);
});
let r1 = marketingBySurface != null && 'dismissibleContent' in marketingBySurface && marketingBySurface.dismissibleContent === (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
const type = marketingBySurface?.type;
const CollectiblesMarketingType = (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType;
const COACHMARK = CollectiblesMarketingType.COACHMARK;
if (type === COACHMARK) {
return (
<CoachmarkVariant
marketing={marketingBySurface}
navigateToShop={navigateToShop}
shopButtonRef={shopButtonRef}
/>
);
}
const children_1128222 = children_112822;
if (r1) {
SelectedVersionedDismissibleContent = (require(10357) /* metro dependency 10357: SelectedDismissibleContent */).SelectedVersionedDismissibleContent;
COLLECTIBLES_SHOP_ENTRY_MARKETING = marketingBySurface?.type !== (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType.BADGE ? null : (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent.COLLECTIBLES_SHOP_ENTRY_MARKETING;
version = marketingBySurface?.version;
value = 0;
value = (
<SelectedVersionedDismissibleContent
contentType={COLLECTIBLES_SHOP_ENTRY_MARKETING}
latestVersion={version ?? value}
>
{children_1128222}
</SelectedVersionedDismissibleContent>
);
r1 = value;
} else {
r1 = ((Component) => <Component contentTypes={marketingBySurface?.type !== (require(5154) /* metro dependency 5154: CollectiblesMarketingType */).CollectiblesMarketingType.BADGE ? [] : marketingBySurface?.dismissibleContent != null ? [marketingBySurface.dismissibleContent] : []}>{children_1128222}</Component>)(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */);
}
return r1;
function CollectiblesShopEntryButtonChildren({visibleContent, markAsDismissed}) { // fn#112822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:1351, owner: CollectiblesShopEntryButton.children, offset: 0x023dd6d7, size: 174 bytes, params: 2, frame: 20
const shopButtonRefBinding = shopButtonRef;
const ShopIcon = (ShopIconModule).ShopIcon;
const intl = (IndexNativeModule).intl;
return (
<YouScreenNavIcon
ref={shopButtonRefBinding}
IconComponent={ShopIcon}
accessibilityLabel={intl.string((IndexNativeModule).t.pWG4ze)}
onPress={onPress_112823}
showRedDot={visibleContent != null}
/>
);
function childrenOnPress_112823() { // fn#112823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:1504, owner: CollectiblesShopEntryButton.children.onPress, offset: 0x023dd785, size: 50 bytes, params: 1, frame: 12
var markAsDismissedBinding;
navigateToShop();
if (visibleContent != null) {
markAsDismissedBinding = markAsDismissed;
value = environment.__proto__.__proto__;
markAsDismissedBinding(ContentDismissActionType.PRIMARY);
}
}
function CollectiblesShopEntryButtonChildren({visibleContent, markAsDismissed}) { // fn#112822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:1351, owner: CollectiblesShopEntryButton.children, offset: 0x023dd6d7, size: 174 bytes, params: 2, frame: 20
const YouScreenNavIcon = importDefault(14908) /* metro dependency 14908: YouScreenNavIcon */;
const shopButtonRefBinding = shopButtonRef;
const ShopIcon = (require(10358) /* metro dependency 10358: ShopIcon */).ShopIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<YouScreenNavIcon
ref={shopButtonRefBinding}
IconComponent={ShopIcon}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pWG4ze)}
onPress={onPress_112823}
showRedDot={visibleContent != null}
/>
);
}
}
function childrenOnPress_112823() { // fn#112823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15109:1504, owner: CollectiblesShopEntryButton.children.onPress, offset: 0x023dd785, size: 50 bytes, params: 1, frame: 12
var markAsDismissedBinding;
navigateToShop();
if (visibleContent != null) {
markAsDismissedBinding = markAsDismissed;
value = environment.__proto__.__proto__;
markAsDismissedBinding(ContentDismissActionType.PRIMARY);
}
}
global.__d(_fun112817, 14912, [57, 31, 5174, 1376, 33, 7013, 1365, 14908, 10358, 1244, 14913, 632, 12712, 5154,
10357,
2]) /* metro module 14912, dependencies: [57, 31, 5174, 1376, 33, 7013, 1365, 14908, 10358, 1244, 14913, 632, 12712, 5154, 10357, 2] */;
@@ -1,30 +1,53 @@
/* Metro module 14079; source: modules/collectibles/native/CollectiblesShopFeaturedPage.tsx; dependencies: [31, 27, 663, 33, 4501, 1305, 8754, 1244, 14054, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun106695(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14276:6, offset: 0x022e71b0, size: 227 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'flex': 1,
ReactModule;
const env0_6 = (CreateStylesModule).createStyles({container: {'flex': 1,
'justifyContent': 'center', 'alignItems': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopFeaturedPage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopFeaturedPage.tsx');
exports.default = _default_106696;
}
function _default_106696({shopBlock, fetchShopHomeError, framesBannerBlock}) { // fn#106696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14276:270, offset: 0x022e7293, size: 258 bytes, params: 2, frame: 21
var r0;
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
if (fetchShopHomeError !== null) {
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
} else if (shopBlock === undefined) {
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
} else {
r0 = ((Component) => <Component block={shopBlock} screen={CollectiblesMobileShopScreen.FEATURED_PAGE} framesBannerBlock={framesBannerBlock} />)(importDefault(14054) /* metro dependency 14054: ShopBlockItem */);
function _default_106696({shopBlock, fetchShopHomeError, framesBannerBlock}) { // fn#106696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14276:270, offset: 0x022e7293, size: 258 bytes, params: 2, frame: 21
var r0;
const EmptyState = (NativeModule).EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
if (fetchShopHomeError !== null) {
r0 = (
<View style={styles.container}>
<EmptyState
style={{marginTop: 42}}
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
/>
</View>
);
} else if (shopBlock === undefined) {
r0 = (
<View style={styles.container}>
<EmptyState
style={{marginTop: 42}}
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
/>
</View>
);
} else {
r0 = ((Component) => <Component block={shopBlock} screen={CollectiblesMobileShopScreen.FEATURED_PAGE} framesBannerBlock={framesBannerBlock} />)(importDefault(14054) /* metro dependency 14054: ShopBlockItem */);
}
return r0;
}
return r0;
}
global.__d(_fun106695, 14079, [31, 27, 663, 33, 4501, 1305, 8754, 1244, 14054,
2]) /* metro module 14079, dependencies: [31, 27, 663, 33, 4501, 1305, 8754, 1244, 14054, 2] */;
@@ -1,59 +1,98 @@
/* Metro module 12168; source: modules/collectibles/native/CollectiblesShopGiftBadgePostPurchaseModal.tsx; dependencies: [31, 27, 33, 4501, 697, 1585, 5080, 5120, 6789, 6258, 1244, 5312, 4573, 2320, 10468, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import GiftBadgePostPurchase from '../../premium/native/gifting/GiftBadgePostPurchase.tsx'; /* Metro dependency 10468 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as XSmallIconModule from '../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as ModalScreenNativeModule from '../../../design/components/Modal/native/ModalScreen.native.tsx'; /* Metro dependency 6258 */
function _fun93261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:6, offset: 0x020acca6, size: 215 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.Pressable;
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(_fun93262);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftBadgePostPurchaseModal.tsx');
const env0_8 = (CreateStylesModule).createStyles(_fun93262);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftBadgePostPurchaseModal.tsx');
exports.default = CollectiblesShopGiftBadgePostPurchaseModal;
function _fun93262(a0) { // fn#93262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:190, offset: 0x020acd7d, size: 142 bytes, params: 2, frame: 15
const object = {};
object.header = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': null, 'paddingTop': null,
'zIndex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', height: a0 + 56,
paddingTop: a0};
const PX_16 = (Native).space.PX_16;
object.closeButton = {'position': 'absolute', 'left': 0, 'top': null, 'bottom': 0, 'paddingHorizontal': null,
'justifyContent': 'center', top: a0, paddingHorizontal: PX_16};
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
object.closeIcon = {tintColor: MOBILE_TEXT_HEADING_PRIMARY};
return object;
}
function CollectiblesShopGiftBadgePostPurchaseModal({giftBadgeProgress}) { // fn#93263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:649, offset: 0x020ace0b, size: 441 bytes, params: 2, frame: 28
const styles = useStyles((UseSafeAreaInsetsNative)().top);
const value2 = ReactModule.useCallback(_fun93264, []);
const value3 = ReactModule.useCallback(function() {
var moduleValue = require(dependencyMap[7]);
var object = {};
var GIFTING_BADGE_POST_PURCHASE = importDefault(dependencyMap[8]).GIFTING_BADGE_POST_PURCHASE;
object.analyticsLocations = [GIFTING_BADGE_POST_PURCHASE];
object.analyticsSource = importDefault(dependencyMap[8]).GIFTING_BADGE_POST_PURCHASE;
moduleValue.openCollectiblesShopMobile(object);
}, []);
const ModalScreen = (ModalScreenNativeModule).ModalScreen;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const cpT0Cq = (IndexNativeModule).t.cpT0Cq;
const XSmallIcon = (XSmallIconModule).XSmallIcon;
let value = (
<Pressable
onPress={value2}
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
style={styles.closeButton}
>
<XSmallIcon size="md" style={styles.closeIcon} />
</Pressable>
);
const Text = (TextModule).Text;
value = (
<View style={styles.header}>
{value}
<Text
accessibilityRole="header"
{...{'aria-level': '1'}}
lineClamp={1}
variant="redesign/heading-18/bold"
color="mobile-text-heading-primary"
>
{intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).roVAey)}
</Text>
</View>
);
return (
<ModalScreen>
{value}
{((Component) => <Component currentProgress={giftBadgeProgress} onSendGift={value3} />)(GiftBadgePostPurchase)}
</ModalScreen>
);
function _fun93264() { // fn#93264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:768, offset: 0x020acfc4, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(ModalActionCreators).pop();
}
}
}
function _fun93262(a0) { // fn#93262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:190, offset: 0x020acd7d, size: 142 bytes, params: 2, frame: 15
const object2 = {};
object2.header = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': null, 'paddingTop': null,
'zIndex': 1, 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', height: a0 + 56,
paddingTop: a0};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.closeButton = {'position': 'absolute', 'left': 0, 'top': null, 'bottom': 0, 'paddingHorizontal': null,
'justifyContent': 'center', top: a0, paddingHorizontal: PX_16};
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.closeIcon = {tintColor: MOBILE_TEXT_HEADING_PRIMARY};
return object2;
}
function CollectiblesShopGiftBadgePostPurchaseModal({giftBadgeProgress}) { // fn#93263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12354:649, offset: 0x020ace0b, size: 441 bytes, params: 2, frame: 28
const styles = useStyles((importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top);
const binding = env0_3;
const value2 = binding.useCallback(_fun93264, []);
const value3 = binding.useCallback(function() {
var moduleValue = require(dependencyMap[7]);
var object = {};
var GIFTING_BADGE_POST_PURCHASE = importDefault(dependencyMap[8]).GIFTING_BADGE_POST_PURCHASE;
object.analyticsLocations = [GIFTING_BADGE_POST_PURCHASE];
object.analyticsSource = importDefault(dependencyMap[8]).GIFTING_BADGE_POST_PURCHASE;
moduleValue.openCollectiblesShopMobile(object);
}, []);
const ModalScreen = (require(6258) /* metro dependency 6258: ModalScreenNative */).ModalScreen;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
let value = <Pressable onPress={value2} accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
[cpT0Cq])} style={styles.closeButton}><XSmallIcon size="md" style={styles.closeIcon} /></Pressable>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <View style={styles.header}>{value}<Text accessibilityRole="header" {...{'aria-level': '1'}} lineClamp={1} variant="redesign/heading-18/bold" color="mobile-text-heading-primary">{intl.string((importDefault(2320) /* metro dependency 2320: GiftingBadgeMessages */).roVAey)}</Text></View>;
return (
<ModalScreen>
{value}
{((Component) => <Component currentProgress={giftBadgeProgress} onSendGift={value3} />)(importDefault(10468) /* metro dependency 10468: GiftBadgePostPurchase */)}
</ModalScreen>
);
}
global.__d(_fun93261, 12168, [31, 27, 33, 4501, 697, 1585, 5080, 5120, 6789, 6258, 1244, 5312, 4573, 2320, 10468,
2]) /* metro module 12168, dependencies: [31, 27, 33, 4501, 697, 1585, 5080, 5120, 6789, 6258, 1244, 5312, 4573, 2320, 10468, 2] */;
@@ -1,92 +1,102 @@
/* Metro module 7632; source: modules/collectibles/native/CollectiblesShopGiftModal.tsx; dependencies: [31, 5121, 661, 33, 7633, 7634, 7635, 566, 6771, 6789, 1861, 5120, 3815, 7636, 1244, 7637, 10116, 12156, 2] */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import CollectiblesShopCheckoutDetails from './CollectiblesShopCheckoutDetails.tsx'; /* Metro dependency 10116 */
import CollectiblesShopGiftPurchaseSection from './CollectiblesShopGiftPurchaseSection.tsx'; /* Metro dependency 12156 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as StringUtilsModule from '../../../utils/StringUtils.tsx'; /* Metro dependency 1861 */
import * as GiftingBadgeExperimentModule from '../../premium/gifting/experiments/GiftingBadgeExperiment.tsx'; /* Metro dependency 7633 */
function _fun61135(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:6, offset: 0x0171b533, size: 178 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 collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).COLLECTIBLES_APPLICATION_ID;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftModal.tsx');
exports.default = CollectiblesShopGiftModal;
}
function CollectiblesShopGiftModal({skuId, analyticsLocations, lockedRecipientUser, onGiftModalDismiss, giftingOrigin}) { // fn#61136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:270, offset: 0x0171b5e5, size: 537 bytes, params: 2, frame: 29
var r1;
var r0;
var UnsupportedFeatureModal;
var intl;
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
const useConfig = GiftingBadgeExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment, [{location: 'CollectiblesShopGiftModal'}]).enabled;
let binding = env0_3;
binding.useEffect(_fun61137, [enabled]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getProduct(skuId);
}, [skuId]);
var env0_3 = value3;
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
object = [];
const value4 = arraySpread(object, analyticsLocations, 0, undefined);
const COLLECTIBLES_MOBILE_GIFT_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_MOBILE_GIFT_MODAL;
object[value4] = COLLECTIBLES_MOBILE_GIFT_MODAL;
value4 + 1;
analyticsLocations = defaultImport(object).analyticsLocations;
skuId = value3?.skuId;
binding = env0_3;
const useCallback = binding.useCallback;
if (value3 == null) {
r0 = null;
} else {
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isCollectibleGiftingSupported()) {
r1 = ((Component) => <Component skuId={value3.skuId} applicationId={COLLECTIBLES_APPLICATION_ID} analyticsLocations={analyticsLocations} lockedRecipientUser={lockedRecipientUser} onGiftModalDismiss={onGiftModalDismiss} giftingOrigin={giftingOrigin} validateRecipient={Reflect.apply(useCallback,
binding, [_fun61139,
[skuId]])} renderProductDetails={renderProductDetails} renderPurchaseSection={renderPurchaseSection} />)(importDefault(7637) /* metro dependency 7637: UnifiedGiftModal */);
function CollectiblesShopGiftModal({skuId, analyticsLocations, lockedRecipientUser, onGiftModalDismiss, giftingOrigin}) { // fn#61136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:270, offset: 0x0171b5e5, size: 537 bytes, params: 2, frame: 29
var r1;
var r0;
var UnsupportedFeatureModal;
var intl;
const GiftingBadgeExperiment = (GiftingBadgeExperimentModule).GiftingBadgeExperiment;
const useConfig = GiftingBadgeExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment, [{location: 'CollectiblesShopGiftModal'}]).enabled;
let binding = env0_3;
binding.useEffect(_fun61137, [enabled]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getProduct(skuId);
}, [skuId]);
var env0_3 = value3;
const defaultImport = UseAnalyticsLocations;
object = [];
const value4 = arraySpread(object, analyticsLocations, 0, undefined);
const COLLECTIBLES_MOBILE_GIFT_MODAL = (AnalyticsLocation).COLLECTIBLES_MOBILE_GIFT_MODAL;
object[value4] = COLLECTIBLES_MOBILE_GIFT_MODAL;
value4 + 1;
analyticsLocations = defaultImport(object).analyticsLocations;
skuId = value3?.skuId;
binding = env0_3;
const useCallback = binding.useCallback;
if (value3 == null) {
r0 = null;
} else {
UnsupportedFeatureModal = importDefault(7636) /* metro dependency 7636: UnsupportedFeatureModal */;
object = {onDismiss: onGiftModalDismiss};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JCFN/y']);
r1 = <UnsupportedFeatureModal {...object} />;
if ((require(3815) /* metro dependency 3815: BillingPlatformUtils */).isCollectibleGiftingSupported()) {
r1 = ((Component) => <Component skuId={value3.skuId} applicationId={COLLECTIBLES_APPLICATION_ID} analyticsLocations={analyticsLocations} lockedRecipientUser={lockedRecipientUser} onGiftModalDismiss={onGiftModalDismiss} giftingOrigin={giftingOrigin} validateRecipient={Reflect.apply(useCallback,
binding, [_fun61139,
[skuId]])} renderProductDetails={renderProductDetails} renderPurchaseSection={renderPurchaseSection} />)(importDefault(7637) /* metro dependency 7637: UnifiedGiftModal */);
} else {
UnsupportedFeatureModal = importDefault(7636) /* metro dependency 7636: UnsupportedFeatureModal */;
object = {onDismiss: onGiftModalDismiss};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['JCFN/y']);
r1 = <UnsupportedFeatureModal {...object} />;
}
r0 = r1;
}
r0 = r1;
return r0;
function _fun61137() { // fn#61137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:504, offset: 0x0171b7fe, size: 74 bytes, params: 1, frame: 14
var value;
if (enabled) {
value = environment.__proto__;
value = require(7634) /* metro dependency 7634: BadgeDirectoryActionCreators */;
value.fetchBadge((require(7635) /* metro dependency 7635: BadgeId */).BadgeId.GIFTING);
}
}
function _fun61139(a0) { // fn#61139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:745, offset: 0x0171b863, size: 109 bytes, params: 2, frame: 15
var r0;
let value = environment.__proto__;
if (StringUtilsModule.isNullOrEmpty(skuId)) {
r0 = global.Promise.resolve(false);
} else {
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
value = value.validateCollectiblesRecipient(a0, skuId);
r0 = value;
}
return r0;
}
function renderProductDetails({recipientUser, isValidRecipient}) { // fn#61140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:1068, owner: CollectiblesShopGiftModal.renderProductDetails, offset: 0x0171b8d0, size: 83 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component product={env0_3} recipientUser={recipientUser} isValidRecipient={isValidRecipient} isGift />)(CollectiblesShopCheckoutDetails);
}
function renderPurchaseSection({isPurchaseDisabled, giftOptions, baseAnalyticsFields}) { // fn#61141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:1199, owner: CollectiblesShopGiftModal.renderPurchaseSection, offset: 0x0171b923, size: 96 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component product={env0_3} isPurchaseDisabled={isPurchaseDisabled} giftOptions={giftOptions} baseAnalyticsFields={baseAnalyticsFields} giftingOrigin={giftingOrigin} />)(CollectiblesShopGiftPurchaseSection);
}
}
return r0;
}
function _fun61137() { // fn#61137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:504, offset: 0x0171b7fe, size: 74 bytes, params: 1, frame: 14
var value;
if (enabled) {
value = environment.__proto__;
value = require(7634) /* metro dependency 7634: BadgeDirectoryActionCreators */;
value.fetchBadge((require(7635) /* metro dependency 7635: BadgeId */).BadgeId.GIFTING);
}
}
function _fun61139(a0) { // fn#61139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:745, offset: 0x0171b863, size: 109 bytes, params: 2, frame: 15
var r0;
let value = environment.__proto__;
const stringUtilsModule = require(1861) /* metro dependency 1861: StringUtils */;
if (stringUtilsModule.isNullOrEmpty(skuId)) {
r0 = global.Promise.resolve(false);
} else {
value = require(5120) /* metro dependency 5120: CollectiblesActionCreators */;
value = value.validateCollectiblesRecipient(a0, skuId);
r0 = value;
}
return r0;
}
function CollectiblesShopGiftModalRenderProductDetails({recipientUser, isValidRecipient}) { // fn#61140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:1068, owner: CollectiblesShopGiftModal.renderProductDetails, offset: 0x0171b8d0, size: 83 bytes, params: 2, frame: 16
const value = environment.__proto__;
return ((Component) => <Component product={env0_3} recipientUser={recipientUser} isValidRecipient={isValidRecipient} isGift />)(importDefault(10116) /* metro dependency 10116: CollectiblesShopCheckoutDetails */);
}
function CollectiblesShopGiftModalRenderPurchaseSection({isPurchaseDisabled, giftOptions, baseAnalyticsFields}) { // fn#61141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7810:1199, owner: CollectiblesShopGiftModal.renderPurchaseSection, offset: 0x0171b923, size: 96 bytes, params: 2, frame: 18
const value = environment.__proto__;
return ((Component) => <Component product={env0_3} isPurchaseDisabled={isPurchaseDisabled} giftOptions={giftOptions} baseAnalyticsFields={baseAnalyticsFields} giftingOrigin={giftingOrigin} />)(importDefault(12156) /* metro dependency 12156: CollectiblesShopGiftPurchaseSection */);
}
global.__d(_fun61135, 7632, [31, 5121, 661, 33, 7633, 7634, 7635, 566, 6771, 6789, 1861, 5120, 3815, 7636, 1244,
7637, 10116, 12156,
2]) /* metro module 7632, dependencies: [31, 5121, 661, 33, 7633, 7634, 7635, 566, 6771, 6789, 1861, 5120, 3815, 7636, 1244, 7637, 10116, 12156, 2] */;
@@ -1,13 +1,28 @@
/* Metro module 12156; source: modules/collectibles/native/CollectiblesShopGiftPurchaseSection.tsx; dependencies: [57, 31, 27, 7670, 661, 1880, 33, 4501, 697, 5463, 7633, 566, 7635, 6771, 10147, 694, 5080, 4496, 12157, 1962, 683, 10396, 6766, 1244, 4578, 10109, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import AlertActionCreators from '../../../actions/native/AlertActionCreators.tsx'; /* Metro dependency 4496 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import BadgeDirectoryStore from '../../badges/BadgeDirectoryStore.tsx'; /* Metro dependency 7670 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as GiftingBadgeExperimentModule from '../../premium/gifting/experiments/GiftingBadgeExperiment.tsx'; /* Metro dependency 7633 */
import * as BadgeIdModule from '../../../external/discord_common/js/shared/shared-constants/BadgeId.tsx'; /* Metro dependency 7635 */
import * as NativePaymentContextModule from '../../payments/native/NativePaymentContext.tsx'; /* Metro dependency 10109 */
function _fun93231(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:6, offset: 0x020ab65b, size: 364 bytes, params: 8, frame: 19
const env0_0 = require;
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(27) /* metro dependency 27 */).View;
const badgeDirectoryStore = importDefault(7670) /* metro dependency 7670: BadgeDirectoryStore */;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_7 = value.AnalyticEvents;
const env0_8 = value.MarketingURLs;
value = require(1880) /* metro dependency 1880: PremiumConstants */;
@@ -16,176 +31,198 @@ function _fun93231(global, require, importDefault, importAll, module, exports, d
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun93243);
const env0_13 = (CreateStylesModule).createStyles(_fun93243);
object = {NOT_STARTED: 'not_started', PURCHASING: 'purchasing', SUCCEEDED: 'succeeded', FAILED: 'failed'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftPurchaseSection.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopGiftPurchaseSection.tsx');
exports.default = WrappedCollectiblesShopGiftPurchaseSection;
}
function CollectiblesShopGiftPurchaseSection({product, isPurchaseDisabled, giftOptions, baseAnalyticsFields, giftingOrigin}) { // fn#93232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:686, offset: 0x020ab7c7, size: 855 bytes, params: 2, frame: 31
const styles = useStyles((importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets.bottom);
const GiftingBadgeExperiment = (require(7633) /* metro dependency 7633: GiftingBadgeExperiment */).GiftingBadgeExperiment;
const useConfig = GiftingBadgeExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment,
[{location: 'CollectiblesShopGiftPurchaseSection'}]).enabled;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([BadgeDirectoryStore],
_fun93233);
const nextTier = value2.nextTier;
const giftsToNextTier = value2.giftsToNextTier;
const env0_4 = value2.badgeProgress;
const binding = env0_4;
const useState = binding.useState;
const NOT_STARTED = env0_14.NOT_STARTED;
const value4 = giftingOrigin(Reflect.apply(useState, binding, [NOT_STARTED]), 2);
const property = value4[0];
const env0_6 = value4[1];
const env0_7 = (importDefault(10147) /* metro dependency 10147: useMobileCollectiblesPurchaseSKUAndroid */)({product: product,
analyticsLocations: (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations,
onPurchaseComplete: onPurchaseComplete, onPurchaseError: onPurchaseError, onPurchasePending: function() {
}, giftParams: {isGift: true, options: giftOptions}});
env0_4.useEffect(function() {
return _fun93241;
}, []);
const items2 = [enabled && nextTier != null ? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */) : null];
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const rsEdd2 = (require(1244) /* metro dependency 1244: indexNative */).t.rsEdd2;
const object = {};
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.buyButtonLabel = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK);
const PAID_TERMS = MarketingURLs.PAID_TERMS;
object.paidServiceTermURL = PAID_TERMS;
const PAID_TERMS_VIRTUAL_GOODS = MarketingURLs.PAID_TERMS_VIRTUAL_GOODS;
object.virtualGoodsURL = PAID_TERMS_VIRTUAL_GOODS;
items2[1] = <TextWithIOSLinkWorkaround variant="text-xs/normal" style={styles.disclaimer}>{Reflect.apply(format,
intl, [rsEdd2, object])}</TextWithIOSLinkWorkaround>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const PURCHASING = env0_14.PURCHASING;
items2[2] = <Button disabled={isPurchaseDisabled} loading={property === PURCHASING} variant="active" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK)} onPress={onPress_93242} />;
return (
<View style={styles.container}>
{items2}
</View>
);
}
function _fun93243(a0) { // fn#93243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:289, offset: 0x020abe3b, size: 195 bytes, params: 2, frame: 17
const object = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingBottom = PX_12 + a0;
const PX_122 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingTop = PX_122;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingHorizontal = PX_16;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.gap = PX_8;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const SHADOW_TOP_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_TOP_HIGH;
copyDataProperties(object, SHADOW_TOP_HIGH, PX_12);
return {container: object, disclaimer: {includeFontPadding: true}};
}
function WrappedCollectiblesShopGiftPurchaseSection({product, isPurchaseDisabled, giftOptions, baseAnalyticsFields, giftingOrigin}) { // fn#93244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2765, offset: 0x020abefe, size: 139 bytes, params: 2, frame: 21
const NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
return (
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
<CollectiblesShopGiftPurchaseSection
product={product}
isPurchaseDisabled={isPurchaseDisabled}
giftOptions={giftOptions}
baseAnalyticsFields={baseAnalyticsFields}
giftingOrigin={giftingOrigin}
function CollectiblesShopGiftPurchaseSection({product, isPurchaseDisabled, giftOptions, baseAnalyticsFields, giftingOrigin}) { // fn#93232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:686, offset: 0x020ab7c7, size: 855 bytes, params: 2, frame: 31
const styles = useStyles((UseSafeAreaInsetsKeyboardAwareNative)().insets.bottom);
const GiftingBadgeExperiment = (GiftingBadgeExperimentModule).GiftingBadgeExperiment;
const useConfig = GiftingBadgeExperiment.useConfig;
const enabled = Reflect.apply(useConfig, GiftingBadgeExperiment,
[{location: 'CollectiblesShopGiftPurchaseSection'}]).enabled;
const value2 = (FluxModule).useStateFromStoresObject([BadgeDirectoryStore],
_fun93233);
const nextTier = value2.nextTier;
const giftsToNextTier = value2.giftsToNextTier;
const badgeProgress = value2.badgeProgress;
const binding = badgeProgress;
const useState = binding.useState;
const NOT_STARTED = env0_14.NOT_STARTED;
const value4 = giftingOrigin(Reflect.apply(useState, binding, [NOT_STARTED]), 2);
const property = value4[0];
const env0_6 = value4[1];
const env0_7 = (importDefault(10147) /* metro dependency 10147: useMobileCollectiblesPurchaseSKUAndroid */)({product: product,
analyticsLocations: (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations,
onPurchaseComplete: onPurchaseComplete_93234, onPurchaseError: onPurchaseError_93238,
onPurchasePending: function() {
}, giftParams: {isGift: true, options: giftOptions}});
badgeProgress.useEffect(function() {
return _fun93241;
}, []);
const items2 = [
enabled && nextTier != null
? ((Component) => <Component giftsToNextTier={giftsToNextTier} nextTierName={nextTier.name ?? ''} nextTierIcon={nextTier.simple_icon_url} />)(importDefault(10396) /* metro dependency 10396: GiftingBadgeProgressBanner */)
: null,
];
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const rsEdd2 = (require(1244) /* metro dependency 1244: indexNative */).t.rsEdd2;
const object2 = {};
const intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.buyButtonLabel = intl2.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK);
const PAID_TERMS = MarketingURLs.PAID_TERMS;
object2.paidServiceTermURL = PAID_TERMS;
const PAID_TERMS_VIRTUAL_GOODS = MarketingURLs.PAID_TERMS_VIRTUAL_GOODS;
object2.virtualGoodsURL = PAID_TERMS_VIRTUAL_GOODS;
items2[1] = (
<TextWithIOSLinkWorkaround variant="text-xs/normal" style={styles.disclaimer}>
{Reflect.apply(format, intl, [rsEdd2, object2])}
</TextWithIOSLinkWorkaround>
);
const Button = (ButtonNativeModule).Button;
const PURCHASING = env0_14.PURCHASING;
items2[2] = (
<Button
disabled={isPurchaseDisabled}
loading={property === PURCHASING}
variant="active"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ouo4FK)}
onPress={onPress_93242}
/>
</NativePaymentContextProvider>
);
}
);
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun93233() { // fn#93233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:999, offset: 0x020abb1e, size: 157 bytes, params: 1, frame: 17
const object = {};
let value = environment.__proto__;
let badgeDirectoryStoreBinding = BadgeDirectoryStore;
const getNextTier = badgeDirectoryStoreBinding.getNextTier;
const value2 = undefined;
const BadgeId = (BadgeIdModule).BadgeId;
let GIFTING = BadgeId.GIFTING;
object.nextTier = Reflect.apply(getNextTier, badgeDirectoryStoreBinding, [GIFTING]);
badgeDirectoryStoreBinding = BadgeDirectoryStore;
const getRemainingToNextTier = badgeDirectoryStoreBinding.getRemainingToNextTier;
GIFTING = BadgeId.GIFTING;
object.giftsToNextTier = Reflect.apply(getRemainingToNextTier, badgeDirectoryStoreBinding, [GIFTING]);
badgeDirectoryStoreBinding = BadgeDirectoryStore;
const getSingleRequirementProgress = badgeDirectoryStoreBinding.getSingleRequirementProgress;
GIFTING = BadgeId.GIFTING;
value = Reflect.apply(getSingleRequirementProgress, badgeDirectoryStoreBinding, [GIFTING]);
object.badgeProgress = value == null ? value2 : value.current;
return object;
}
function _fun93233() { // fn#93233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:999, offset: 0x020abb1e, size: 157 bytes, params: 1, frame: 17
const object2 = {};
let value = environment.__proto__;
const getNextTier = BadgeDirectoryStore.getNextTier;
const value2 = undefined;
const BadgeId = (require(7635) /* metro dependency 7635: BadgeId */).BadgeId;
let GIFTING = BadgeId.GIFTING;
object2.nextTier = Reflect.apply(getNextTier, BadgeDirectoryStore, [GIFTING]);
const getRemainingToNextTier = BadgeDirectoryStore.getRemainingToNextTier;
GIFTING = BadgeId.GIFTING;
object2.giftsToNextTier = Reflect.apply(getRemainingToNextTier, BadgeDirectoryStore, [GIFTING]);
const getSingleRequirementProgress = BadgeDirectoryStore.getSingleRequirementProgress;
GIFTING = BadgeId.GIFTING;
value = Reflect.apply(getSingleRequirementProgress, BadgeDirectoryStore, [GIFTING]);
object2.badgeProgress = value == null ? value2 : value.current;
return object2;
}
function CollectiblesShopGiftPurchaseSectionOnPurchaseComplete() { // fn#93234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1431, owner: CollectiblesShopGiftPurchaseSection.onPurchaseComplete, offset: 0x020abbbb, size: 277 bytes, params: 1, frame: 18
var environment;
var value6;
if (!(giftOptions.recipient_id == null || giftingOrigin !== GiftingOrigin.USER_PROFILE_WISHLIST && giftingOrigin !== GiftingOrigin.DM_CHANNEL_WISHLIST)) {
value6 = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WISHLIST_GIFT_SENT',
skuId: product.skuId, recipientId: giftOptions.recipient_id});
}
const binding = env0_6;
const SUCCEEDED = env1_14.SUCCEEDED;
binding(SUCCEEDED);
(ModalActionCreators).pop();
const defaultImport3 = AlertActionCreators;
defaultImport3.openLazy({importer: importer_93235});
const defaultImport4 = AnalyticsUtils;
const track = defaultImport4.track;
const PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
Reflect.apply(track, defaultImport4, [PAYMENT_FLOW_SUCCEEDED, baseAnalyticsFields]);
function onPurchaseCompleteImporter() { // fn#93235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1660, owner: CollectiblesShopGiftPurchaseSection.onPurchaseComplete.importer, offset: 0x020abcd0, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[19]);
value = value(dependencyMap[18], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun93237;
});
function _fun93236({default: env0_0}) { // fn#93236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1694, offset: 0x020abd10, size: 23 bytes, params: 2, frame: 2
return _fun93237;
function _fun93237(a0) { // fn#93237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1709, offset: 0x020abd27, size: 79 bytes, params: 2, frame: 16
return ((Component) => <Component giftStyle={giftOptions.gift_style ?? PremiumGiftStyles.STANDARD_BOX} giftBadgeProgress={badgeProgress} {...a0} />)(env0_0);
}
}
}
}
function CollectiblesShopGiftPurchaseSectionOnPurchaseError() { // fn#93238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1873, owner: CollectiblesShopGiftPurchaseSection.onPurchaseError, offset: 0x020abd76, size: 74 bytes, params: 1, frame: 15
const binding = env0_6;
const FAILED = env1_14.FAILED;
binding(FAILED);
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const PAYMENT_FLOW_FAILED = AnalyticEvents.PAYMENT_FLOW_FAILED;
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_FAILED, baseAnalyticsFields]);
}
function _fun93240() { // fn#93240, offset: 0x020abdc0, size: 11 bytes, params: 1, frame: 1
return _fun93241;
function _fun93241() { // fn#93241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2015, offset: 0x020abdcb, size: 75 bytes, params: 1, frame: 14
var defaultImport;
const binding = env1_5;
const SUCCEEDED = env2_14.SUCCEEDED;
if (binding !== SUCCEEDED) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.PAYMENT_FLOW_CANCELED, baseAnalyticsFields);
}
}
}
function CollectiblesShopGiftPurchaseSectionOnPress() { // fn#93242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2622, owner: CollectiblesShopGiftPurchaseSection.onPress, offset: 0x020abe16, size: 37 bytes, params: 1, frame: 12
const binding = env0_6;
const PURCHASING = env1_14.PURCHASING;
binding(PURCHASING);
env0_7();
}
function CollectiblesShopGiftPurchaseSectionOnPurchaseComplete() { // fn#93234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1431, owner: CollectiblesShopGiftPurchaseSection.onPurchaseComplete, offset: 0x020abbbb, size: 277 bytes, params: 1, frame: 18
var environment;
var value6;
if (!(giftOptions.recipient_id == null || giftingOrigin !== GiftingOrigin.USER_PROFILE_WISHLIST && giftingOrigin !== GiftingOrigin.DM_CHANNEL_WISHLIST)) {
value6 = environment.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'WISHLIST_GIFT_SENT',
skuId: product.skuId, recipientId: giftOptions.recipient_id});
}
const binding = env0_6;
const SUCCEEDED = env1_14.SUCCEEDED;
binding(SUCCEEDED);
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
const defaultImport3 = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
defaultImport3.openLazy({importer: importer_93235});
const defaultImport4 = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport4.track;
const PAYMENT_FLOW_SUCCEEDED = AnalyticEvents.PAYMENT_FLOW_SUCCEEDED;
Reflect.apply(track, defaultImport4, [PAYMENT_FLOW_SUCCEEDED, baseAnalyticsFields]);
}
function CollectiblesShopGiftPurchaseSectionOnPurchaseError() { // fn#93238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1873, owner: CollectiblesShopGiftPurchaseSection.onPurchaseError, offset: 0x020abd76, size: 74 bytes, params: 1, frame: 15
const binding = env0_6;
const FAILED = env1_14.FAILED;
binding(FAILED);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const PAYMENT_FLOW_FAILED = AnalyticEvents.PAYMENT_FLOW_FAILED;
Reflect.apply(track, defaultImport, [PAYMENT_FLOW_FAILED, baseAnalyticsFields]);
}
function _fun93240() { // fn#93240, offset: 0x020abdc0, size: 11 bytes, params: 1, frame: 1
return _fun93241;
}
function CollectiblesShopGiftPurchaseSectionOnPress() { // fn#93242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2622, owner: CollectiblesShopGiftPurchaseSection.onPress, offset: 0x020abe16, size: 37 bytes, params: 1, frame: 12
const binding = env0_6;
const PURCHASING = env1_14.PURCHASING;
binding(PURCHASING);
env0_7();
}
function onPurchaseCompleteImporter() { // fn#93235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1660, owner: CollectiblesShopGiftPurchaseSection.onPurchaseComplete.importer, offset: 0x020abcd0, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[19]);
value = value(dependencyMap[18], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun93237;
});
}
function _fun93241() { // fn#93241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2015, offset: 0x020abdcb, size: 75 bytes, params: 1, frame: 14
var defaultImport;
const binding = env1_5;
const SUCCEEDED = env2_14.SUCCEEDED;
if (binding !== SUCCEEDED) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
defaultImport.track(AnalyticEvents.PAYMENT_FLOW_CANCELED, baseAnalyticsFields);
function _fun93243(a0) { // fn#93243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:289, offset: 0x020abe3b, size: 195 bytes, params: 2, frame: 17
const object2 = {};
const PX_12 = (Native).space.PX_12;
object2.paddingBottom = PX_12 + a0;
const PX_122 = (Native).space.PX_12;
object2.paddingTop = PX_122;
const PX_16 = (Native).space.PX_16;
object2.paddingHorizontal = PX_16;
const PX_8 = (Native).space.PX_8;
object2.gap = PX_8;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const SHADOW_TOP_HIGH = (Native).shadows.SHADOW_TOP_HIGH;
copyDataProperties(object2, SHADOW_TOP_HIGH, PX_12);
return {container: object2, disclaimer: {includeFontPadding: true}};
}
function WrappedCollectiblesShopGiftPurchaseSection({product, isPurchaseDisabled, giftOptions, baseAnalyticsFields, giftingOrigin}) { // fn#93244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:2765, offset: 0x020abefe, size: 139 bytes, params: 2, frame: 21
const NativePaymentContextProvider = (NativePaymentContextModule).NativePaymentContextProvider;
return (
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
<CollectiblesShopGiftPurchaseSection
product={product}
isPurchaseDisabled={isPurchaseDisabled}
giftOptions={giftOptions}
baseAnalyticsFields={baseAnalyticsFields}
giftingOrigin={giftingOrigin}
/>
</NativePaymentContextProvider>
);
}
}
function _fun93236({default: env0_0}) { // fn#93236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1694, offset: 0x020abd10, size: 23 bytes, params: 2, frame: 2
return _fun93237;
}
function _fun93237(a0) { // fn#93237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12342:1709, offset: 0x020abd27, size: 79 bytes, params: 2, frame: 16
return ((Component) => <Component giftStyle={giftOptions.gift_style ?? PremiumGiftStyles.STANDARD_BOX} giftBadgeProgress={badgeProgress} {...a0} />)(env0_0);
}
global.__d(_fun93231, 12156, [57, 31, 27, 7670, 661, 1880, 33, 4501, 697, 5463, 7633, 566, 7635, 6771, 10147, 694,
5080, 4496, 12157, 1962, 683, 10396, 6766, 1244, 4578, 10109,
2]) /* metro module 12156, dependencies: [57, 31, 27, 7670, 661, 1880, 33, 4501, 697, 5463, 7633, 566, 7635, 6771, 10147, 694, 5080, 4496, 12157, 1962, 683, 10396, 6766, 1244, 4578, 10109, 2] */;
@@ -1,83 +1,111 @@
/* Metro module 14053; source: modules/collectibles/native/CollectiblesShopOrbsPage.tsx; dependencies: [31, 27, 5121, 663, 33, 4501, 6771, 10023, 14042, 4080, 10085, 1305, 8754, 1244, 14046, 14054, 2] */
import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import ShopBlockItem from './ShopBlockItem.tsx'; /* Metro dependency 14054 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as UseCollectiblesShopDeepLinkPropsModule from './useCollectiblesShopDeepLinkProps.tsx'; /* Metro dependency 14042 */
function _fun106572(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:6, offset: 0x022e0984, size: 247 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 env0_4 = (require(27) /* metro dependency 27 */).View;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {'display': 'flex',
const env0_8 = (CreateStylesModule).createStyles({container: {'display': 'flex',
'flex': 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopOrbsPage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopOrbsPage.tsx');
exports.default = _default_106573;
}
function _default_106573({shopBlocks, fetchShopHomeError, onRenderFirstOrbsItem}) { // fn#106573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:253, offset: 0x022e0a7b, size: 427 bytes, params: 2, frame: 23
var r0;
const EmptyState = (require(1305) /* metro dependency 1305: native */).EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const styles = useStyles();
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const value2 = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).useCollectiblesAnalyticsContext();
const value3 = (require(14042) /* metro dependency 14042: useCollectiblesShopDeepLinkProps */).useCollectiblesShopDeepLinkProps({});
const initialProductSkuId = value3.initialProductSkuId;
initialProductSkuId.useEffect(_fun106574, [initialProductSkuId, value3.initialVariantIndex,
value3.initialCategorySkuId, analyticsLocations, value2]);
if (fetchShopHomeError !== null) {
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
} else if (shopBlocks.length === 0) {
r0 = <View style={styles.container}><EmptyState style={{marginTop: 42}} Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults} body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)} /></View>;
} else {
value = importDefault(14046) /* metro dependency 14046: ShopFlashList */;
value = ((Component) => <Component data={shopBlocks} renderItem={renderItem_106576} />)(value);
r0 = value;
}
return r0;
}
function _fun106574() { // fn#106574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:542, offset: 0x022e0c26, size: 198 bytes, params: 1, frame: 16
var environment;
var r5;
var value2;
var value3;
var value4;
if (initialProductSkuId != null) {
if (initialCategorySkuId != null) {
value2 = environment.__proto__;
value3 = CollectiblesCategoryStore.getCategory(initialCategorySkuId);
value4 = undefined;
r5 = value3 == null ? value4 : value3.products.find(function({skuId}) {
return skuId === initialProductSkuId;
});
if (r5 != null) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: r5,
initialVariantIndex: initialVariantIndex, analyticsLocations: analyticsLocations,
shopAnalyticsContext: env0_2 ?? value4});
function _default_106573({shopBlocks, fetchShopHomeError, onRenderFirstOrbsItem}) { // fn#106573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:253, offset: 0x022e0a7b, size: 427 bytes, params: 2, frame: 23
var r0;
const EmptyState = (NativeModule).EmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var value;
const styles = useStyles();
const analyticsLocations = (UseAnalyticsLocations)().analyticsLocations;
const value2 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext();
const value3 = (UseCollectiblesShopDeepLinkPropsModule).useCollectiblesShopDeepLinkProps({});
const initialProductSkuId = value3.initialProductSkuId;
initialProductSkuId.useEffect(_fun106574, [initialProductSkuId, value3.initialVariantIndex,
value3.initialCategorySkuId, analyticsLocations, value2]);
if (fetchShopHomeError !== null) {
r0 = (
<View style={styles.container}>
<EmptyState
style={{marginTop: 42}}
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
/>
</View>
);
} else if (shopBlocks.length === 0) {
r0 = (
<View style={styles.container}>
<EmptyState
style={{marginTop: 42}}
Illustration={(require(8754) /* metro dependency 8754: NoResults */).NoResults}
body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eAn6z2)}
/>
</View>
);
} else {
value = importDefault(14046) /* metro dependency 14046: ShopFlashList */;
value = ((Component) => <Component data={shopBlocks} renderItem={renderItem_106576} />)(value);
r0 = value;
}
return r0;
function _fun106574() { // fn#106574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:542, offset: 0x022e0c26, size: 198 bytes, params: 1, frame: 16
var environment;
var r5;
var value2;
var collectiblesCategoryStoreBinding;
var value3;
var value4;
if (initialProductSkuId != null) {
if (initialCategorySkuId != null) {
value2 = environment.__proto__;
collectiblesCategoryStoreBinding = CollectiblesCategoryStore;
value3 = collectiblesCategoryStoreBinding.getCategory(initialCategorySkuId);
value4 = undefined;
r5 = value3 == null ? value4 : value3.products.find(function({skuId}) {
return skuId === initialProductSkuId;
});
if (r5 != null) {
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(10085) /* metro dependency 10085: openProductDetailsActionSheet */).openProductDetailsActionSheet({product: r5,
initialVariantIndex: initialVariantIndex, analyticsLocations: analyticsLocations,
shopAnalyticsContext: env0_2 ?? value4});
}
}
}
}
function _default_106573RenderItem(a0) { // fn#106576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:1038, owner: _default_106573.renderItem, offset: 0x022e0cec, size: 98 bytes, params: 2, frame: 15
const item = a0.item;
if (a0.index === 0) {
onRenderFirstOrbsItem();
}
const ORBS = CollectiblesMobileShopScreen.ORBS;
return (
<ShopBlockItem
block={item}
screen={ORBS}
preferVCPrice
/>
);
}
}
}
function _default_106573RenderItem(a0) { // fn#106576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14250:1038, owner: _default_106573.renderItem, offset: 0x022e0cec, size: 98 bytes, params: 2, frame: 15
const item = a0.item;
if (a0.index === 0) {
onRenderFirstOrbsItem();
}
const ShopBlockItem = importDefault(14054) /* metro dependency 14054: ShopBlockItem */;
const ORBS = CollectiblesMobileShopScreen.ORBS;
return (
<ShopBlockItem
block={item}
screen={ORBS}
preferVCPrice
/>
);
}
global.__d(_fun106572, 14053, [31, 27, 5121, 663, 33, 4501, 6771, 10023, 14042, 4080, 10085, 1305, 8754, 1244,
14046, 14054,
2]) /* metro module 14053, dependencies: [31, 27, 5121, 663, 33, 4501, 6771, 10023, 14042, 4080, 10085, 1305, 8754, 1244, 14046, 14054, 2] */;
@@ -1,43 +1,55 @@
/* Metro module 10075; source: modules/collectibles/native/CollectiblesShopPricePlaceholder.tsx; dependencies: [31, 33, 4501, 697, 4017, 4504, 2] */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
function _fun78761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:6, offset: 0x01e336f2, size: 256 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object3 = {'height': 16, 'flex': 1};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'height': 16, 'flex': 1};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
object3.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
const env0_5 = Reflect.apply(createStyles, createStylesModule, [{skeletonContainer: object3}]);
object2.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{skeletonContainer: object2}]);
object = {code: 'function CollectiblesShopPricePlaceholderTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopPricePlaceholder.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopPricePlaceholder.tsx');
exports.CollectiblesShopPricePlaceholder = CollectiblesShopPricePlaceholder;
function CollectiblesShopPricePlaceholder({style}) { // fn#78762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:534, offset: 0x01e337f2, size: 221 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (ReanimatedRexportModule).useSharedValue(0.3);
ReactModule.useEffect(_fun78763, [value2]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const CollectiblesShopPricePlaceholder_2 = CollectiblesShopPricePlaceholder_;
CollectiblesShopPricePlaceholder_2.__closure = {opacity: value2};
CollectiblesShopPricePlaceholder_2.__workletHash = 10107093534072;
CollectiblesShopPricePlaceholder_2.__initData = env0_6;
const value3 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [CollectiblesShopPricePlaceholder_2]);
const View = (ReanimatedRexport).View;
return <View style={[styles.skeletonContainer, style, value3]} />;
function _fun78763() { // fn#78763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:600, offset: 0x01e338cf, size: 103 bytes, params: 1, frame: 19
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
Reflect.apply(set, binding, [value.withRepeat((TimingModule).withTiming(1,
{duration: 650}), -1, true)]);
}
function CollectiblesShopPricePlaceholder_() { // fn#78764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:719, owner: CollectiblesShopPricePlaceholder._, offset: 0x01d2f35e, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_0.get();
return object;
}
}
}
function CollectiblesShopPricePlaceholder({style}) { // fn#78762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:534, offset: 0x01e337f2, size: 221 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0.3);
env0_3.useEffect(_fun78763, [value2]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = CollectiblesShopPricePlaceholder_;
closure.__closure = {opacity: value2};
closure.__workletHash = 10107093534072;
closure.__initData = env0_6;
const value3 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return <View style={[styles.skeletonContainer, style, value3]} />;
}
function _fun78763() { // fn#78763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10261:600, offset: 0x01e338cf, size: 103 bytes, params: 1, frame: 19
const binding = env0_0;
const set = binding.set;
let value = environment.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
Reflect.apply(set, binding, [value.withRepeat((require(4504) /* metro dependency 4504: timing */).withTiming(1,
{duration: 650}), -1, true)]);
}
global.__d(_fun78761, 10075, [31, 33, 4501, 697, 4017, 4504,
2]) /* metro module 10075, dependencies: [31, 33, 4501, 697, 4017, 4504, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,122 +1,144 @@
/* Metro module 14083; source: modules/collectibles/native/CollectiblesShopViewAllCategoryItems.tsx; dependencies: [31, 27, 663, 661, 33, 4501, 697, 7591, 6771, 6789, 1585, 14049, 4017, 4577, 683, 5183, 10023, 10109, 14084, 14085, 14064, 1244, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseCollectiblesShopStylesNative from '../useCollectiblesShopStyles.native.tsx'; /* Metro dependency 7591 */
import CollectiblesShopCardsGrid from './CollectiblesShopCardsGrid.tsx'; /* Metro dependency 14064 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CollectiblesPerfLoggingModule from '../utils/CollectiblesPerfLogging.tsx'; /* Metro dependency 5183 */
import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */
import * as NativePaymentContextModule from '../../payments/native/NativePaymentContext.tsx'; /* Metro dependency 10109 */
import * as UseFilteredAndSortedProductsModule from './hooks/useFilteredAndSortedProducts.tsx'; /* Metro dependency 14049 */
import * as CollectiblesProgressiveImageModule from './CollectiblesProgressiveImage.tsx'; /* Metro dependency 14084 */
function _fun106711(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:6, offset: 0x022e79b7, size: 353 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.StyleSheet;
const env0_6 = (require(663) /* metro dependency 663: CollectiblesShopConstants */).CollectiblesMobileShopScreen;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const value3 = require(33) /* metro dependency 33 */;
const env0_8 = value3.jsx;
const env0_9 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.rootContainer = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.border = {height: 1, backgroundColor: BORDER_SUBTLE};
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object2]);
object2 = {code: 'function CollectiblesShopViewAllCategoryItemsTsx1(){const{borderOpacity}=this.__closure;return{opacity:borderOpacity.get()};}'};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.rootContainer = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE;
object.border = {height: 1, backgroundColor: BORDER_SUBTLE};
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [object]);
object = {code: 'function CollectiblesShopViewAllCategoryItemsTsx1(){const{borderOpacity}=this.__closure;return{opacity:borderOpacity.get()};}'};
value = value.memo(_fun106712);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopViewAllCategoryItems.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopViewAllCategoryItems.tsx');
exports.default = value;
function _fun106712({category, analyticsContext}) { // fn#106712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:541, offset: 0x022e7b18, size: 923 bytes, params: 2, frame: 36
const styles = useStyles();
const mobileBgUrl = category.mobileBgUrl;
const logoUrl = category.logoUrl;
const backgroundColors = (UseCollectiblesShopStylesNative)(category.styles).backgroundColors;
const defaultImport2 = UseAnalyticsLocations;
const COLLECTIBLES_SHOP_INDEX_PAGE = (AnalyticsLocation).COLLECTIBLES_SHOP_INDEX_PAGE;
const analyticsLocations = defaultImport2([COLLECTIBLES_SHOP_INDEX_PAGE]).analyticsLocations;
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value3 = (UseFilteredAndSortedProductsModule).useFilteredAndSortedProducts({products: category.products});
const value4 = (ReanimatedRexportModule).useSharedValue(0);
const binding = value4;
const value5 = binding.useCallback(_fun106713, [value4]);
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const __1067142 = __106714;
__1067142.__closure = {borderOpacity: value4};
__1067142.__workletHash = 2446209469388;
__1067142.__initData = env0_11;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [__1067142]);
binding.useEffect(_fun106715, [analyticsContext?.sessionId, analyticsLocations, category.name]);
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const CollectiblesAnalyticsProvider = (CollectiblesAnalyticsContextModule).CollectiblesAnalyticsProvider;
const object3 = {};
copyDataProperties(object3, analyticsContext, mobileBgUrl);
object3['pageCategory'] = category.name;
const NativePaymentContextProvider = (NativePaymentContextModule).NativePaymentContextProvider;
const CollectiblesProgressiveImage = (CollectiblesProgressiveImageModule).CollectiblesProgressiveImage;
const items2 = [
<CollectiblesProgressiveImage source={{uri: mobileBgUrl}} style={StyleSheet.absoluteFill} />,
];
items2[1] = ((Component) => <Component logoUrl={logoUrl} buttonColor={backgroundColors == null ? undefined : backgroundColors.label.toHexString()} categoryName={category.name} />)(importDefault(14085) /* metro dependency 14085: CollectiblesShopViewAllCategoryItemsHeader */);
const View2 = (ReanimatedRexport).View;
items2[2] = <View2 style={[styles.border, value6]} />;
const object4 = {category: category, products: value3, scrollEnabled: true, onScroll: value5};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingBottom = bottom + PX_16;
object4.muteBundleStaticBackground = true;
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const FNtLb3 = (IndexNativeModule).t.FNtLb3;
object4.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: category.name}]);
items2[3] = <CollectiblesShopCardsGrid {...object4} />;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<CollectiblesAnalyticsProvider newValue={object3}>
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
<View style={styles.rootContainer}>
{items2}
</View>
</NativePaymentContextProvider>
</CollectiblesAnalyticsProvider>
</AnalyticsLocationProvider>
);
function _fun106713({nativeEvent}) { // fn#106713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:858, offset: 0x022e7eb3, size: 89 bytes, params: 2, frame: 15
const binding = env0_3;
const set = binding.set;
let value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, binding, [value.withSpring(nativeEvent.contentOffset.y > 5 ? 1 : 0)]);
}
function __106714() { // fn#106714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:965, offset: 0x01de68e5, size: 24 bytes, params: 1, frame: 10
const object = {};
object.opacity = env0_3.get();
return object;
}
function _fun106715() { // fn#106715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:1099, offset: 0x022e7f0c, size: 262 bytes, params: 1, frame: 20
const value2 = undefined;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const COLLECTIBLES_SHOP_VIEWED = AnalyticEvents.COLLECTIBLES_SHOP_VIEWED;
let object = {};
object.location_stack = analyticsLocations;
object.page_session_id = analyticsContext == null ? value2 : analyticsContext.sessionId;
const COLLECTIBLES_SHOP = (AnalyticsLocation).COLLECTIBLES_SHOP;
object.source = COLLECTIBLES_SHOP;
object.page_type = 'index';
object.category = category.name;
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_VIEWED, object]);
const trackShopPerf = CollectiblesPerfLoggingModule.trackShopPerf;
object = {};
object.sessionId = analyticsContext == null ? value2 : analyticsContext.sessionId;
const CollectiblesShopPerfCheckpoint = CollectiblesPerfLoggingModule.CollectiblesShopPerfCheckpoint;
const SHOP_MOUNTED = CollectiblesShopPerfCheckpoint.SHOP_MOUNTED;
object.checkpoint = SHOP_MOUNTED;
const SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
object.tab = SHOP_ALL;
object.unpublishedCategoriesShown = false;
object.cacheDisabled = false;
Reflect.apply(trackShopPerf, CollectiblesPerfLoggingModule, [object]);
return value2;
}
}
}
function _fun106712({category, analyticsContext}) { // fn#106712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:541, offset: 0x022e7b18, size: 923 bytes, params: 2, frame: 36
const styles = useStyles();
const mobileBgUrl = category.mobileBgUrl;
const logoUrl = category.logoUrl;
const backgroundColors = (importDefault(7591) /* metro dependency 7591: useCollectiblesShopStylesNative */)(category.styles).backgroundColors;
const defaultImport2 = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const COLLECTIBLES_SHOP_INDEX_PAGE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP_INDEX_PAGE;
const analyticsLocations = defaultImport2([COLLECTIBLES_SHOP_INDEX_PAGE]).analyticsLocations;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value3 = (require(14049) /* metro dependency 14049: useFilteredAndSortedProducts */).useFilteredAndSortedProducts({products: category.products});
const value4 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const binding = value4;
const value5 = binding.useCallback(_fun106713, [value4]);
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = __106714;
closure.__closure = {borderOpacity: value4};
closure.__workletHash = 2446209469388;
closure.__initData = env0_11;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
binding.useEffect(_fun106715, [analyticsContext?.sessionId, analyticsLocations, category.name]);
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const CollectiblesAnalyticsProvider = (require(10023) /* metro dependency 10023: CollectiblesAnalyticsContext */).CollectiblesAnalyticsProvider;
const object = {};
copyDataProperties(object, analyticsContext, mobileBgUrl);
object['pageCategory'] = category.name;
const NativePaymentContextProvider = (require(10109) /* metro dependency 10109: NativePaymentContext */).NativePaymentContextProvider;
const CollectiblesProgressiveImage = (require(14084) /* metro dependency 14084: CollectiblesProgressiveImage */).CollectiblesProgressiveImage;
const items2 = [<CollectiblesProgressiveImage source={{uri: mobileBgUrl}} style={StyleSheet.absoluteFill} />];
items2[1] = ((Component) => <Component logoUrl={logoUrl} buttonColor={backgroundColors == null ? undefined : backgroundColors.label.toHexString()} categoryName={category.name} />)(importDefault(14085) /* metro dependency 14085: CollectiblesShopViewAllCategoryItemsHeader */);
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
items2[2] = <View2 style={[styles.border, value6]} />;
const CollectiblesShopCardsGrid = importDefault(14064) /* metro dependency 14064: CollectiblesShopCardsGrid */;
const object2 = {category: category, products: value3, scrollEnabled: true, onScroll: value5};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingTop = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.paddingBottom = bottom + PX_16;
object2.muteBundleStaticBackground = true;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
object2.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: category.name}]);
items2[3] = <CollectiblesShopCardsGrid {...object2} />;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<CollectiblesAnalyticsProvider newValue={object}>
<NativePaymentContextProvider skuIDs={[]} activeSubscription={null}>
<View style={styles.rootContainer}>
{items2}
</View>
</NativePaymentContextProvider>
</CollectiblesAnalyticsProvider>
</AnalyticsLocationProvider>
);
}
function _fun106713({nativeEvent}) { // fn#106713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:858, offset: 0x022e7eb3, size: 89 bytes, params: 2, frame: 15
const binding = env0_3;
const set = binding.set;
let value = environment.__proto__;
value = require(4577) /* metro dependency 4577: spring */;
Reflect.apply(set, binding, [value.withSpring(nativeEvent.contentOffset.y > 5 ? 1 : 0)]);
}
function _fun106715() { // fn#106715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14280:1099, offset: 0x022e7f0c, size: 262 bytes, params: 1, frame: 20
const value2 = undefined;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const COLLECTIBLES_SHOP_VIEWED = AnalyticEvents.COLLECTIBLES_SHOP_VIEWED;
let object2 = {};
object2.location_stack = analyticsLocations;
object2.page_session_id = analyticsContext == null ? value2 : analyticsContext.sessionId;
const COLLECTIBLES_SHOP = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).COLLECTIBLES_SHOP;
object2.source = COLLECTIBLES_SHOP;
object2.page_type = 'index';
object2.category = category.name;
Reflect.apply(track, defaultImport, [COLLECTIBLES_SHOP_VIEWED, object2]);
const collectiblesPerfLoggingModule = require(5183) /* metro dependency 5183: CollectiblesPerfLogging */;
const trackShopPerf = collectiblesPerfLoggingModule.trackShopPerf;
object2 = {};
object2.sessionId = analyticsContext == null ? value2 : analyticsContext.sessionId;
const CollectiblesShopPerfCheckpoint = collectiblesPerfLoggingModule.CollectiblesShopPerfCheckpoint;
const SHOP_MOUNTED = CollectiblesShopPerfCheckpoint.SHOP_MOUNTED;
object2.checkpoint = SHOP_MOUNTED;
const SHOP_ALL = CollectiblesMobileShopScreen.SHOP_ALL;
object2.tab = SHOP_ALL;
object2.unpublishedCategoriesShown = false;
object2.cacheDisabled = false;
Reflect.apply(trackShopPerf, collectiblesPerfLoggingModule, [object2]);
return value2;
}
global.__d(_fun106711, 14083, [31, 27, 663, 661, 33, 4501, 697, 7591, 6771, 6789, 1585, 14049, 4017, 4577, 683,
5183, 10023, 10109, 14084, 14085, 14064, 1244,
2]) /* metro module 14083, dependencies: [31, 27, 663, 661, 33, 4501, 697, 7591, 6771, 6789, 1585, 14049, 4017, 4577, 683, 5183, 10023, 10109, 14084, 14085, 14064, 1244, 2] */;
@@ -1,46 +1,71 @@
/* Metro module 14085; source: modules/collectibles/native/CollectiblesShopViewAllCategoryItemsHeader.tsx; dependencies: [31, 27, 7553, 33, 4501, 1484, 9603, 9607, 1244, 2] */
import Module09607 from '../../../by-id/module-09607.js'; /* Metro dependency 9607 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as YouBarConstantsModule from '../../main_tabs_v2/native/YouBarConstants.tsx'; /* Metro dependency 7553 */
import * as HeaderSharedModule from '../../main_tabs_v2/native/shared_components/HeaderShared.tsx'; /* Metro dependency 9603 */
function _fun106719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14282:6, offset: 0x022e8204, size: 288 bytes, params: 8, frame: 21
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 */;
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.Image;
const env0_4 = value.View;
const env0_5 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarSettingsCustomHeaderPaddingTop;
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({headerContainer: {'flexDirection': 'row',
const env0_8 = (CreateStylesModule).createStyles({headerContainer: {'flexDirection': 'row',
'justifyContent': 'space-between', 'alignItems': 'center', 'paddingBottom': 12, 'paddingLeft': 8},
backButton: {flex: 1}, logo: {'flex': 2, 'height': 36}, dummyRightButton: {flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/native/CollectiblesShopViewAllCategoryItemsHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/CollectiblesShopViewAllCategoryItemsHeader.tsx');
exports.default = CollectiblesShopViewAllCategoryItemsHeader;
function CollectiblesShopViewAllCategoryItemsHeader({logoUrl, buttonColor, categoryName}) { // fn#106720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14282:544, offset: 0x022e8324, size: 410 bytes, params: 2, frame: 28
const env0_0 = (UseNavigationNativeModule).useStackNavigation();
const styles = useStyles();
const value2 = useYouBarSettingsCustomHeaderPaddingTop('CollectiblesShopViewAllCategoryItemsHeader');
const object2 = {};
copyDataProperties(object2, styles.headerContainer, undefined);
object2['paddingTop'] = value2;
const HeaderIconButton = (HeaderSharedModule).HeaderIconButton;
const headerIconButtonProps = {source: Module09607, color: buttonColor};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerIconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
headerIconButtonProps.onPress = onPress_106721;
const items2 = [
<View style={styles.backButton}>
<HeaderIconButton {...headerIconButtonProps} />
</View>,
];
const object4 = {uri: logoUrl};
const formatToPlainString = intl.formatToPlainString;
const FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
items2[1] = (
<Image
resizeMode="contain"
style={styles.logo}
source={object4}
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [FNtLb3, {category: categoryName}])}
accessibilityRole="header"
/>
);
items2[2] = <View style={styles.dummyRightButton} />;
return (
<View style={object2}>
{items2}
</View>
);
function CollectiblesShopViewAllCategoryItemsHeaderOnPress() { // fn#106721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14282:945, owner: CollectiblesShopViewAllCategoryItemsHeader.onPress, offset: 0x022e84be, size: 21 bytes, params: 1, frame: 9
env0_0.goBack();
}
}
}
function CollectiblesShopViewAllCategoryItemsHeader({logoUrl, buttonColor, categoryName}) { // fn#106720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14282:544, offset: 0x022e8324, size: 410 bytes, params: 2, frame: 28
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useStackNavigation();
const styles = useStyles();
const value2 = useYouBarSettingsCustomHeaderPaddingTop('CollectiblesShopViewAllCategoryItemsHeader');
const object = {};
copyDataProperties(object, styles.headerContainer, undefined);
object['paddingTop'] = value2;
const HeaderIconButton = (require(9603) /* metro dependency 9603: HeaderShared */).HeaderIconButton;
const headerIconButtonProps = {source: importDefault(9607) /* metro dependency 9607 */, color: buttonColor};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
headerIconButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
headerIconButtonProps.onPress = onPress_106721;
const items2 = [<View style={styles.backButton}><HeaderIconButton {...headerIconButtonProps} /></View>];
const object3 = {uri: logoUrl};
const formatToPlainString = intl.formatToPlainString;
const FNtLb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FNtLb3;
items2[1] = <Image resizeMode="contain" style={styles.logo} source={object3} accessibilityLabel={Reflect.apply(formatToPlainString,
intl, [FNtLb3, {category: categoryName}])} accessibilityRole="header" />;
items2[2] = <View style={styles.dummyRightButton} />;
return (
<View style={object}>
{items2}
</View>
);
}
global.__d(_fun106719, 14085, [31, 27, 7553, 33, 4501, 1484, 9603, 9607, 1244,
2]) /* metro module 14085, dependencies: [31, 27, 7553, 33, 4501, 1484, 9603, 9607, 1244, 2] */;
Loaded 100 of 22448 files, more files were not shown because too many files have changed in this diff. Show more