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

No files matched your search

@@ -1,84 +1,86 @@
/* Metro module 8751; source: modules/collectibles/profile_frames/hooks/useMaybeTrackProfileFrameViewed.tsx; dependencies: [31, 5121, 632, 8515, 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 */
function _fun68524(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8936:6, offset: 0x01c526ab, size: 144 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = require(31) /* metro dependency 31 */;
const env0_2 = value.useEffect;
const env0_3 = value.useRef;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_frames/hooks/useMaybeTrackProfileFrameViewed.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/hooks/useMaybeTrackProfileFrameViewed.tsx');
exports.default = useMaybeTrackProfileFrameViewed;
}
function useMaybeTrackProfileFrameViewed({skuId, openedAt, context, analyticsLocations}) { // fn#68525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8936:262, offset: 0x01c5273b, size: 146 bytes, params: 2, frame: 17
const productFetch = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getProductFetch(skuId);
});
const env0_5 = useRef(undefined);
useEffect(_fun68527, [skuId, productFetch]);
}
function _fun68527() { // fn#68527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8936:436, offset: 0x01c527e8, size: 348 bytes, params: 1, frame: 18
var r5;
var startedAt;
var endedAt;
var r8;
var value2;
var productFetchBinding;
var value5;
var value6;
var moduleValue;
var maybeTrackUserProfileUiViewed;
var object2;
var value8;
if (skuId != null) {
value2 = global.Date.now();
if (env0_5.current == null && openedAt != null) {
env0_5.current = value2 - openedAt;
}
productFetchBinding = productFetch;
value5 = undefined;
if ((productFetchBinding == null ? value5 : productFetch.state) === 'success') {
value6 = environment.__proto__;
moduleValue = require(8515) /* metro dependency 8515: UserProfileAnalyticsUtils */;
maybeTrackUserProfileUiViewed = moduleValue.maybeTrackUserProfileUiViewed;
object2 = {profileUi: 'PROFILE_FRAME'};
object2.timeToInteractiveMs = env0_5.current;
r5 = openedAt != null ? value2 - openedAt : value5;
object2.timeToLoadMs = r5;
startedAt = productFetch == null ? value5 : productFetch.startedAt;
if (startedAt != null) {
value8 = productFetch == null;
if (value8) {
endedAt = value5;
r8 = value8;
} else {
productFetchBinding = productFetch;
endedAt = productFetchBinding.endedAt;
r8 = productFetchBinding;
function useMaybeTrackProfileFrameViewed({skuId, openedAt, context, analyticsLocations}) { // fn#68525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8936:262, offset: 0x01c5273b, size: 146 bytes, params: 2, frame: 17
const productFetch = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([CollectiblesCategoryStore],
function() {
return CollectiblesCategoryStore.getProductFetch(skuId);
});
const env0_5 = useRef(undefined);
useEffect(_fun68527, [skuId, productFetch]);
function _fun68527() { // fn#68527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8936:436, offset: 0x01c527e8, size: 348 bytes, params: 1, frame: 18
var r5;
var startedAt;
var endedAt;
var r8;
var value2;
var productFetchBinding;
var value5;
var value6;
var moduleValue;
var maybeTrackUserProfileUiViewed;
var object;
var value8;
if (skuId != null) {
value2 = global.Date.now();
if (env0_5.current == null && openedAt != null) {
env0_5.current = value2 - openedAt;
}
if (endedAt != null) {
productFetchBinding = productFetch;
endedAt = productFetchBinding.endedAt;
r5 = endedAt - productFetchBinding.startedAt;
r8 = endedAt;
} else {
r5 = value5;
productFetchBinding = productFetch;
value5 = undefined;
if ((productFetchBinding == null ? value5 : productFetch.state) === 'success') {
value6 = environment.__proto__;
moduleValue = require(8515) /* metro dependency 8515: UserProfileAnalyticsUtils */;
maybeTrackUserProfileUiViewed = moduleValue.maybeTrackUserProfileUiViewed;
object = {profileUi: 'PROFILE_FRAME'};
object.timeToInteractiveMs = env0_5.current;
r5 = openedAt != null ? value2 - openedAt : value5;
object.timeToLoadMs = r5;
startedAt = productFetch == null ? value5 : productFetch.startedAt;
if (startedAt != null) {
value8 = productFetch == null;
if (value8) {
endedAt = value5;
r8 = value8;
} else {
productFetchBinding = productFetch;
endedAt = productFetchBinding.endedAt;
r8 = productFetchBinding;
}
if (endedAt != null) {
productFetchBinding = productFetch;
endedAt = productFetchBinding.endedAt;
r5 = endedAt - productFetchBinding.startedAt;
r8 = endedAt;
} else {
r5 = value5;
}
} else {
r5 = value5;
r8 = value2;
}
object.timeToFetchMs = r5;
object.viewStartedAt = openedAt;
startedAt = productFetch == null ? value5 : productFetch.startedAt;
object.fetchStartedAt = startedAt;
object.analyticsLocations = analyticsLocations;
copyDataProperties(object, context, r8);
Reflect.apply(maybeTrackUserProfileUiViewed, moduleValue, [object]);
}
} else {
r5 = value5;
r8 = value2;
}
object2.timeToFetchMs = r5;
object2.viewStartedAt = openedAt;
startedAt = productFetch == null ? value5 : productFetch.startedAt;
object2.fetchStartedAt = startedAt;
object2.analyticsLocations = analyticsLocations;
copyDataProperties(object2, context, r8);
Reflect.apply(maybeTrackUserProfileUiViewed, moduleValue, [object2]);
}
}
}
global.__d(_fun68524, 8751, [31, 5121, 632, 8515,
2]) /* metro module 8751, dependencies: [31, 5121, 632, 8515, 2] */;
@@ -1,41 +1,46 @@
/* Metro module 8500; source: modules/collectibles/profile_frames/hooks/useProfileFrame.tsx; dependencies: [5121, 5145, 5128, 566, 2] */
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 FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ProfileFrameRecordModule from '../../records/ProfileFrameRecord.tsx'; /* Metro dependency 5128 */
function _fun67417(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67417, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8685:6, offset: 0x01c21cba, size: 152 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
const env0_4 = (require(5128) /* metro dependency 5128: ProfileFrameRecord */).isProfileFrameRecord;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_frames/hooks/useProfileFrame.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/hooks/useProfileFrame.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStores([CollectiblesCategoryStore, CollectiblesPurchaseStore],
_fun67419);
};
}
function useProfileFrame(a0) { // fn#67418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8685:252, offset: 0x01c21d52, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore,
CollectiblesPurchaseStore], _fun67419);
}
function _fun67419() { // fn#67419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8685:321, offset: 0x01c21d9c, size: 156 bytes, params: 1, frame: 17
var value2;
var product;
var isProfileFrameRecordBinding;
var value4;
var purchase;
if (env0_0 != null) {
value2 = environment.__proto__;
product = CollectiblesCategoryStore.getProduct(env0_0);
isProfileFrameRecordBinding = isProfileFrameRecord;
value4 = undefined;
if (isProfileFrameRecordBinding(product == null ? value4 : product.items[0])) {
return product.items[0];
function useProfileFrame(a0) { // fn#67418, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8685:252, offset: 0x01c21d52, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (FluxModule).useStateFromStores([CollectiblesCategoryStore,
CollectiblesPurchaseStore], _fun67419);
function _fun67419() { // fn#67419, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8685:321, offset: 0x01c21d9c, size: 156 bytes, params: 1, frame: 17
var value2;
var product;
var isProfileFrameRecordBinding;
var value4;
var purchase;
if (env0_0 != null) {
value2 = environment.__proto__;
product = CollectiblesCategoryStore.getProduct(env0_0);
isProfileFrameRecordBinding = isProfileFrameRecord;
value4 = undefined;
if (isProfileFrameRecordBinding(product == null ? value4 : product.items[0])) {
return product.items[0];
}
purchase = CollectiblesPurchaseStore.getPurchase(env0_0);
return isProfileFrameRecord(purchase == null ? value4 : purchase.items[0]) ? purchase.items[0] : value4;
}
}
purchase = CollectiblesPurchaseStore.getPurchase(env0_0);
return isProfileFrameRecord(purchase == null ? value4 : purchase.items[0]) ? purchase.items[0] : value4;
}
}
global.__d(_fun67417, 8500, [5121, 5145, 5128, 566,
2]) /* metro module 8500, dependencies: [5121, 5145, 5128, 566, 2] */;
@@ -1,21 +1,26 @@
/* Metro module 13220; source: modules/collectibles/profile_frames/native/EditProfileFrameSection.tsx; dependencies: [31, 27, 5128, 8504, 33, 697, 4501, 8409, 13219, 8410, 6789, 10031, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ProfileFrameSamplePreview from './previews/ProfileFrameSamplePreview.tsx'; /* Metro dependency 10031 */
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 ProfileFrameRecordModule from '../../records/ProfileFrameRecord.tsx'; /* Metro dependency 5128 */
import * as UseCollectibleListLayoutModule from '../../native/useCollectibleListLayout.tsx'; /* Metro dependency 8409 */
import * as CollectiblesEditUserProfileListItemsModule from '../../native/CollectiblesEditUserProfileListItems.tsx'; /* Metro dependency 8410 */
import * as ProfileFrameConstantsModule from './ProfileFrameConstants.tsx'; /* Metro dependency 8504 */
import * as UseProfileFrameSectionsModule from '../useProfileFrameSections.tsx'; /* Metro dependency 13219 */
function _fun100852(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13410:6, offset: 0x021fcada, size: 425 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_4 = (require(27) /* metro dependency 27 */).View;
const env0_5 = (require(5128) /* metro dependency 5128: ProfileFrameRecord */).isProfileFrameRecord;
const env0_6 = (require(8504) /* metro dependency 8504: ProfileFrameConstants */).PROFILE_FRAME_ASPECT_RATIO;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.Fragment;
const env0_9 = value2.jsxs;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
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_11 = Reflect.apply(createStyles, createStylesModule, [{row: {'flexDirection': 'row',
let value = ReactModule;
const PX_8 = (Native).space.PX_8;
const createStyles = CreateStylesModule.createStyles;
const GUTTER_SIZE = (UseCollectibleListLayoutModule).GUTTER_SIZE;
const env0_11 = Reflect.apply(createStyles, CreateStylesModule, [{row: {'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'space-between', paddingHorizontal: GUTTER_SIZE},
rowSpacer: {height: GUTTER_SIZE}, previewContainer: {'width': '100%', 'height': '100%', 'paddingVertical': null,
'overflow': 'hidden', 'alignItems': 'center', 'justifyContent': 'center', paddingVertical: PX_8}}]);
@@ -23,102 +28,107 @@ function _fun100852(global, require, importDefault, importAll, module, exports,
value4.displayName = 'EditProfileFrameRow';
value = value.memo(_fun100856);
value.displayName = 'EditProfileFrameItem';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_frames/native/EditProfileFrameSection.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/native/EditProfileFrameSection.tsx');
exports.EditProfileFrameRow = value4;
}
function _fun100853({items, selectedSkuId, setSelectedProfileFrame, guildId, size}) { // fn#100853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13410:566, offset: 0x021fcc83, size: 269 bytes, params: 2, frame: 25
const styles = useStyles();
const env0_4 = size.useCallback(function() {
setSelectedProfileFrame(null);
}, [setSelectedProfileFrame]);
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(_fun100855)}</View>;
return (
<>
{value}
<View style={styles.rowSpacer} />
</>
);
}
function _fun100856({profileFrame, isSelected, setSelectedProfileFrame, size}) { // fn#100856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13410:1300, offset: 0x021fcf00, size: 274 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = env0_3.useCallback(function() {
var setSelectedProfileFrameBinding = setSelectedProfileFrame;
var profileFrameBinding = profileFrame;
setSelectedProfileFrameBinding({skuId: profileFrameBinding.skuId, type: profileFrameBinding.type});
}, [setSelectedProfileFrame, profileFrame]);
const EditCollectiblesListItemProduct = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemProduct;
const skuId = profileFrame.skuId;
const label = profileFrame.label;
const ProfileFrameSamplePreview = importDefault(10031) /* metro dependency 10031: ProfileFrameSamplePreview */;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
return (
<EditCollectiblesListItemProduct
skuId={skuId}
isSelected={isSelected}
onPress={value2}
size={size}
accessibilityLabel={label}
>
<View style={styles.previewContainer}>
<ProfileFrameSamplePreview
profileFrame={profileFrame}
previewWidth={size * PROFILE_FRAME_ASPECT_RATIO}
previewHeight={size - 2 * PX_8}
profileBackgroundColor={BACKGROUND_BASE_LOW}
/>
function _fun100853({items, selectedSkuId, setSelectedProfileFrame, guildId, size}) { // fn#100853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13410:566, offset: 0x021fcc83, size: 269 bytes, params: 2, frame: 25
const styles = useStyles();
const env0_4 = size.useCallback(function() {
setSelectedProfileFrame(null);
}, [setSelectedProfileFrame]);
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(_fun100855)}
</View>
</EditCollectiblesListItemProduct>
);
}
function _fun100855(a0, a1) { // fn#100855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13410:782, offset: 0x021fcd90, size: 368 bytes, params: 3, frame: 20
var selectedSkuIdBinding;
var skuId;
var binding;
const NONE_ITEM = (require(13219) /* metro dependency 13219: useProfileFrameSections */).NONE_ITEM;
if (a0 === NONE_ITEM) {
const EditCollectiblesListItemNone = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemNone;
);
return (
<EditCollectiblesListItemNone
<>
{value}
<View style={styles.rowSpacer} />
</>
);
function _fun100855(a0, a1) { // fn#100855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13410:782, offset: 0x021fcd90, size: 368 bytes, params: 3, frame: 20
var selectedSkuIdBinding;
var skuId;
var binding;
const NONE_ITEM = (UseProfileFrameSectionsModule).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 = (UseProfileFrameSectionsModule).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_PROFILE_FRAME_SHEET}
key="shop"
/>
);
}
if (isProfileFrameRecord(a0)) {
selectedSkuIdBinding = selectedSkuId;
skuId = a0.skuId;
binding = env1_12;
var bindingProps = {profileFrame: a0, isSelected: selectedSkuIdBinding === skuId,
setSelectedProfileFrame: setSelectedProfileFrame, 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 _fun100856({profileFrame, isSelected, setSelectedProfileFrame, size}) { // fn#100856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13410:1300, offset: 0x021fcf00, size: 274 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = env0_3.useCallback(function() {
var setSelectedProfileFrameBinding = setSelectedProfileFrame;
var profileFrameBinding = profileFrame;
setSelectedProfileFrameBinding({skuId: profileFrameBinding.skuId, type: profileFrameBinding.type});
}, [setSelectedProfileFrame, profileFrame]);
const EditCollectiblesListItemProduct = (CollectiblesEditUserProfileListItemsModule).EditCollectiblesListItemProduct;
const skuId = profileFrame.skuId;
const label = profileFrame.label;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
return (
<EditCollectiblesListItemProduct
skuId={skuId}
isSelected={isSelected}
onPress={value2}
size={size}
onPress={env0_4}
isSelected={selectedSkuId == null}
asDefault={guildId != null}
key="none"
/>
accessibilityLabel={label}
>
<View style={styles.previewContainer}>
<ProfileFrameSamplePreview
profileFrame={profileFrame}
previewWidth={size * PROFILE_FRAME_ASPECT_RATIO}
previewHeight={size - 2 * PX_8}
profileBackgroundColor={BACKGROUND_BASE_LOW}
/>
</View>
</EditCollectiblesListItemProduct>
);
}
const SHOP_ITEM = (require(13219) /* metro dependency 13219: useProfileFrameSections */).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_PROFILE_FRAME_SHEET}
key="shop"
/>
);
}
if (isProfileFrameRecord(a0)) {
selectedSkuIdBinding = selectedSkuId;
skuId = a0.skuId;
binding = env1_12;
var bindingProps = {profileFrame: a0, isSelected: selectedSkuIdBinding === skuId,
setSelectedProfileFrame: setSelectedProfileFrame, 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(_fun100852, 13220, [31, 27, 5128, 8504, 33, 697, 4501, 8409, 13219, 8410, 6789, 10031,
2]) /* metro module 13220, dependencies: [31, 27, 5128, 8504, 33, 697, 4501, 8409, 13219, 8410, 6789, 10031, 2] */;
@@ -1,180 +1,187 @@
/* Metro module 8503; source: modules/collectibles/profile_frames/native/ProfileFrame.tsx; dependencies: [31, 27, 8504, 6816, 33, 4501, 8506, 5475, 8502, 2] */
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
import ScaleProfileFrame from '../scaleProfileFrame.tsx'; /* Metro dependency 8502 */
import UseProfileFrameLayerAsset from './useProfileFrameLayerAsset.tsx'; /* Metro dependency 8506 */
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 '../../../user_profile/native/Constants.tsx'; /* Metro dependency 6816 */
function _fun67428(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:6, offset: 0x01c220e4, size: 336 bytes, params: 8, frame: 22
var object4;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_3 = value.View;
const StyleSheet = value.StyleSheet;
value = require(8504) /* metro dependency 8504: ProfileFrameConstants */;
const env0_4 = value.PROFILE_FRAME_RESPONSIVE_RAIL_MIN_PROFILE_HEIGHT;
const env0_5 = value.PROFILE_FRAME_Z_INDEX;
const env0_6 = (require(6816) /* metro dependency 6816: Constants */).UserProfileThemeTypes;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {};
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
object5['pointerEvents'] = 'none';
object4.container = object5;
const object6 = {};
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
object6['alignItems'] = 'center';
object6['overflow'] = 'hidden';
object4.layer = object6;
const env0_8 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_frames/native/ProfileFrame.tsx');
object = {};
const object2 = {};
copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined);
object2['pointerEvents'] = 'none';
object.container = object2;
const object3 = {};
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
object3['alignItems'] = 'center';
object3['overflow'] = 'hidden';
object.layer = object3;
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/native/ProfileFrame.tsx');
exports.default = ProfileFrame;
}
function ProfileFrameLayer({skuId, layer, scale, overflowTop, overflowBottom, overflowHorizontal, containerWidth, containerHeight}) { // fn#67429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:429, offset: 0x01c22234, size: 527 bytes, params: 2, frame: 27
var value9;
var Array;
const env0_2 = overflowBottom;
const styles = useStyles();
const value2 = containerWidth + 2 * overflowHorizontal;
const {assetUrl,
imageHeight} = (importDefault(8506) /* metro dependency 8506: useProfileFrameLayerAsset */)({skuId: skuId,
layer: layer, width: value2});
const value4 = env0_2.useMemo(_fun67430, [layer.anchor, layer.type, layer.order, overflowTop, overflowBottom,
overflowHorizontal]);
const r9 = layer.responsive === true && layer.type === 'rail' && containerHeight != null && containerHeight < PROFILE_FRAME_RESPONSIVE_RAIL_MIN_PROFILE_HEIGHT * scale;
if (imageHeight === 0) {
return null;
}
if (assetUrl == null) {
return null;
}
if (r9) {
return null;
}
if (layer.type === 'border') {
if (containerHeight == null) {
function ProfileFrameLayer({skuId, layer, scale, overflowTop, overflowBottom, overflowHorizontal, containerWidth, containerHeight}) { // fn#67429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:429, offset: 0x01c22234, size: 527 bytes, params: 2, frame: 27
var value9;
var Array;
const overflowBottom2 = overflowBottom;
const styles = useStyles();
const value2 = containerWidth + 2 * overflowHorizontal;
const {assetUrl,
imageHeight} = (UseProfileFrameLayerAsset)({skuId: skuId,
layer: layer, width: value2});
const value4 = overflowBottom2.useMemo(_fun67430, [layer.anchor, layer.type, layer.order, overflowTop,
overflowBottom, overflowHorizontal]);
const r9 = layer.responsive === true && layer.type === 'rail' && containerHeight != null && containerHeight < PROFILE_FRAME_RESPONSIVE_RAIL_MIN_PROFILE_HEIGHT * scale;
if (imageHeight === 0) {
return null;
}
if (containerHeight === 0) {
if (assetUrl == null) {
return null;
}
value9 = global.Math.ceil(containerHeight / imageHeight);
Array = global.Array;
if (r9) {
return null;
}
if (layer.type === 'border') {
if (containerHeight == null) {
return null;
}
if (containerHeight === 0) {
return null;
}
value9 = global.Math.ceil(containerHeight / imageHeight);
Array = global.Array;
return (
<View style={[styles.layer, value4]}>
{Array.from({length: value9}, _fun67431)}
</View>
);
}
return (
<View style={[styles.layer, value4]}>
{Array.from({length: value9}, _fun67431)}
{((Component) => <Component source={{uri: assetUrl}} resizeMode="cover" width={value2} height={imageHeight} />)(FastImage)}
</View>
);
}
return (
<View style={[styles.layer, value4]}>
{((Component) => <Component source={{uri: assetUrl}} resizeMode="cover" width={value2} height={imageHeight} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</View>
);
}
function ProfileFrame({frame, containerWidth, containerHeight, profileThemeType, frameOrder, filterLayer}) { // fn#67432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:1507, offset: 0x01c22597, size: 275 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = containerHeight.useMemo(function() {
return frame.layers.filter(_fun67434);
}, [frame.layers, frameOrder, profileThemeType, filterLayer]);
if (value2.length === 0) {
return null;
}
if (containerWidth === 0) {
return null;
}
const value3 = (importDefault(8502) /* metro dependency 8502: scaleProfileFrame */)(frame, containerWidth);
const env0_6 = value3.scale;
const env0_7 = value3.overflowTop;
const env0_8 = value3.overflowBottom;
const env0_9 = value3.overflowHorizontal;
return (
<View style={styles.container}>
{value2.map(_fun67435)}
</View>
);
}
function _fun67430() { // fn#67430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:668, offset: 0x01c22443, size: 256 bytes, params: 1, frame: 16
var object5;
var anchor;
var value3;
var object6;
var value4;
const object7 = {};
const overflowHorizontalBinding = overflowHorizontal;
object7.left = -overflowHorizontalBinding;
object7.right = -overflowHorizontalBinding;
const layerBinding = layer;
object7.zIndex = PROFILE_FRAME_Z_INDEX[layerBinding.order];
const type = layerBinding.type;
if (type === 'staple') {
object6 = {};
copyDataProperties(object6, object7, undefined);
anchor = layer.anchor;
value4 = undefined;
object6['top'] = anchor !== 'top' ? value4 : -overflowTop;
anchor = layer.anchor;
object6['bottom'] = anchor !== 'bottom' ? value4 : -overflowBottom;
return object6;
}
if (type === 'rail') {
object5 = {};
copyDataProperties(object5, object7, undefined);
anchor = layer.anchor;
value3 = 'center';
object5['justifyContent'] = value3 === anchor ? value3 : layer.anchor !== 'top' ? 'flex-end' : 'flex-start';
return object5;
}
const object8 = {};
copyDataProperties(object8, object7, undefined);
object8['left'] = -overflowHorizontal;
return object8;
}
function _fun67431(a0, a1) { // fn#67431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:1220, offset: 0x01c22543, size: 84 bytes, params: 3, frame: 17
const value = environment.__proto__;
return ((Component) => <Component source={{uri: assetUrl}} resizeMode="cover" width={env0_4} height={imageHeight} key={a1} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
}
function _fun67433() { // fn#67433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:1644, offset: 0x01c226aa, size: 34 bytes, params: 1, frame: 11
return frame.layers.filter(_fun67434);
}
function _fun67435(a0) { // fn#67435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:1956, offset: 0x01c22752, size: 107 bytes, params: 2, frame: 16
return (
<ProfileFrameLayer
skuId={frame.skuId}
layer={a0}
scale={scale}
overflowTop={overflowTop}
overflowBottom={overflowBottom}
overflowHorizontal={overflowHorizontal}
containerWidth={containerWidth}
containerHeight={containerHeight}
key={a0.id}
/>
);
}
function _fun67434(a0) { // fn#67434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:1665, offset: 0x01c226cc, size: 134 bytes, params: 2, frame: 14
var r3;
var r1;
var profileThemeTypeBinding;
let value = environment.__proto__;
let r0 = frameOrder == null || frameOrder === a0.order;
if (r0) {
r3 = filterLayer != null && !filterLayer(a0);
if (r3) {
r1 = !r3;
} else {
profileThemeTypeBinding = profileThemeType;
value = environment.__proto__.__proto__;
value = profileThemeTypeBinding === UserProfileThemeTypes.PREVIEW;
r1 = value || a0.anchor === 'top' && a0.type === 'staple';
function _fun67430() { // fn#67430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:668, offset: 0x01c22443, size: 256 bytes, params: 1, frame: 16
var object;
var anchor;
var value3;
var object2;
var value4;
const object3 = {};
const overflowHorizontalBinding = overflowHorizontal;
object3.left = -overflowHorizontalBinding;
object3.right = -overflowHorizontalBinding;
const layerBinding = layer;
object3.zIndex = PROFILE_FRAME_Z_INDEX[layerBinding.order];
const type = layerBinding.type;
if (type === 'staple') {
object2 = {};
copyDataProperties(object2, object3, undefined);
anchor = layer.anchor;
value4 = undefined;
object2['top'] = anchor !== 'top' ? value4 : -overflowTop;
anchor = layer.anchor;
object2['bottom'] = anchor !== 'bottom' ? value4 : -overflowBottom;
return object2;
}
if (type === 'rail') {
object = {};
copyDataProperties(object, object3, undefined);
anchor = layer.anchor;
value3 = 'center';
object['justifyContent'] = value3 === anchor ? value3 : layer.anchor !== 'top' ? 'flex-end' : 'flex-start';
return object;
}
const object4 = {};
copyDataProperties(object4, object3, undefined);
object4['left'] = -overflowHorizontal;
return object4;
}
r0 = r1;
function _fun67431(a0, a1) { // fn#67431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:1220, offset: 0x01c22543, size: 84 bytes, params: 3, frame: 17
const value = environment.__proto__;
return ((Component) => <Component source={{uri: assetUrl}} resizeMode="cover" width={env0_4} height={imageHeight} key={a1} />)(FastImage);
}
}
return r0;
function ProfileFrame({frame, containerWidth, containerHeight, profileThemeType, frameOrder, filterLayer}) { // fn#67432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:1507, offset: 0x01c22597, size: 275 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = containerHeight.useMemo(function() {
return frame.layers.filter(_fun67434);
}, [frame.layers, frameOrder, profileThemeType, filterLayer]);
if (value2.length === 0) {
return null;
}
if (containerWidth === 0) {
return null;
}
const value3 = (ScaleProfileFrame)(frame, containerWidth);
const env0_6 = value3.scale;
const env0_7 = value3.overflowTop;
const env0_8 = value3.overflowBottom;
const env0_9 = value3.overflowHorizontal;
return (
<View style={styles.container}>
{value2.map(_fun67435)}
</View>
);
function _fun67433() { // fn#67433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:1644, offset: 0x01c226aa, size: 34 bytes, params: 1, frame: 11
return frame.layers.filter(_fun67434);
function _fun67434(a0) { // fn#67434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:1665, offset: 0x01c226cc, size: 134 bytes, params: 2, frame: 14
var r3;
var r1;
var profileThemeTypeBinding;
let value = environment.__proto__;
let r0 = frameOrder == null || frameOrder === a0.order;
if (r0) {
r3 = filterLayer != null && !filterLayer(a0);
if (r3) {
r1 = !r3;
} else {
profileThemeTypeBinding = profileThemeType;
value = environment.__proto__.__proto__;
value = profileThemeTypeBinding === UserProfileThemeTypes.PREVIEW;
r1 = value || a0.anchor === 'top' && a0.type === 'staple';
}
r0 = r1;
}
return r0;
}
}
function _fun67435(a0) { // fn#67435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8688:1956, offset: 0x01c22752, size: 107 bytes, params: 2, frame: 16
return (
<ProfileFrameLayer
skuId={frame.skuId}
layer={a0}
scale={scale}
overflowTop={overflowTop}
overflowBottom={overflowBottom}
overflowHorizontal={overflowHorizontal}
containerWidth={containerWidth}
containerHeight={containerHeight}
key={a0.id}
/>
);
}
}
}
global.__d(_fun67428, 8503, [31, 27, 8504, 6816, 33, 4501, 8506, 5475, 8502,
2]) /* metro module 8503, dependencies: [31, 27, 8504, 6816, 33, 4501, 8506, 5475, 8502, 2] */;
@@ -1,17 +1,20 @@
/* Metro module 8504; source: modules/collectibles/profile_frames/native/ProfileFrameConstants.tsx; dependencies: [8505, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ProfileFrameLayerOrderModule from '../../../../external/discord_common/js/shared/shared-constants/ProfileFrameLayerOrder.tsx'; /* Metro dependency 8505 */
function _fun67436(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8689:6, offset: 0x01c227bd, size: 169 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {};
const ProfileFrameLayerOrder = (require(8505) /* metro dependency 8505: ProfileFrameLayerOrder */).ProfileFrameLayerOrder;
object = {};
const ProfileFrameLayerOrder = (ProfileFrameLayerOrderModule).ProfileFrameLayerOrder;
const FRONT = ProfileFrameLayerOrder.FRONT;
object2[FRONT] = 3;
object[FRONT] = 3;
const BACK = ProfileFrameLayerOrder.BACK;
object2[BACK] = 2;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_frames/native/ProfileFrameConstants.tsx');
object[BACK] = 2;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/native/ProfileFrameConstants.tsx');
exports.PROFILE_FRAME_RESPONSIVE_RAIL_MIN_PROFILE_HEIGHT = 480;
exports.PROFILE_FRAME_ASPECT_RATIO = 0.66;
exports.PROFILE_FRAME_Z_INDEX = object2;
exports.PROFILE_FRAME_Z_INDEX = object;
}
global.__d(_fun67436, 8504, [8505, 2]) /* metro module 8504, dependencies: [8505, 2] */;
@@ -1,14 +1,25 @@
/* Metro module 10031; source: modules/collectibles/profile_frames/native/previews/ProfileFrameSamplePreview.tsx; dependencies: [31, 27, 8471, 6816, 33, 4501, 697, 8502, 3860, 8503, 8505, 5302, 5475, 10032, 2] */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import defaultImport2 from '../../../../../by-id/module-05302.js'; /* Metro dependency 5302 */
import ScaleProfileFrame from '../../scaleProfileFrame.tsx'; /* Metro dependency 8502 */
import ProfileFrame from '../ProfileFrame.tsx'; /* Metro dependency 8503 */
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 UseTokenModule from '../../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as ConstantsModule from '../../../../user_profile/native/Constants.tsx'; /* Metro dependency 6816 */
import * as CollectiblesPreviewConstantsModule from '../../../native/CollectiblesPreviewConstants.tsx'; /* Metro dependency 8471 */
import * as ProfileFrameLayerOrderModule from '../../../../../external/discord_common/js/shared/shared-constants/ProfileFrameLayerOrder.tsx'; /* Metro dependency 8505 */
function _fun78348(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10217:6, offset: 0x01e26840, size: 361 bytes, params: 8, frame: 23
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.StyleSheet;
const env0_4 = value.View;
const SAMPLE_PROFILE_ASPECT_RATIO = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).SAMPLE_PROFILE_ASPECT_RATIO;
const env0_5 = (require(6816) /* metro dependency 6816: Constants */).UserProfileThemeTypes;
const SAMPLE_PROFILE_ASPECT_RATIO = (CollectiblesPreviewConstantsModule).SAMPLE_PROFILE_ASPECT_RATIO;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
@@ -17,70 +28,174 @@ function _fun78348(global, require, importDefault, importAll, module, exports, d
};
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'flex': 1, 'overflow': 'hidden', 'borderWidth': 1};
const object2 = {'flex': 1, 'overflow': 'hidden', 'borderWidth': 1};
const BORDER_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_NORMAL;
object.borderColor = BORDER_NORMAL;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_9 = Reflect.apply(createStyles, value, [{profileFrameContainer: {flex: 1}, profileContainer: object,
object2.borderColor = BORDER_NORMAL;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const env0_9 = Reflect.apply(createStyles, value, [{profileFrameContainer: {flex: 1}, profileContainer: object2,
sampleProfile: {width: '100%', aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_frames/native/previews/ProfileFrameSamplePreview.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/native/previews/ProfileFrameSamplePreview.tsx');
exports.default = _default_78350;
function _default_78350({profileFrame, previewWidth, previewHeight, profileBackgroundColor}) { // fn#78350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10217:510, offset: 0x01e269a9, size: 1128 bytes, params: 2, frame: 37
const styles = useStyles();
const innerWidth = profileFrame.innerWidth;
const value2 = previewWidth * innerWidth;
var overflowHorizontal = profileFrame.overflowHorizontal;
const value3 = value2 / (innerWidth + 2 * overflowHorizontal);
var {overflowTop, overflowBottom,
overflowHorizontal} = (ScaleProfileFrame)(profileFrame, value3);
const value5 = (UseTokenModule).useToken(profileBackgroundColor);
let filterLayer_78349Binding = filterLayer_78349;
let PREVIEW = UserProfileThemeTypes.PREVIEW;
const ProfileFrameLayerOrder = (ProfileFrameLayerOrderModule).ProfileFrameLayerOrder;
const BACK = ProfileFrameLayerOrder.BACK;
const profileFrame2 = (
<ProfileFrame
frame={profileFrame}
filterLayer={filterLayer_78349Binding}
profileThemeType={PREVIEW}
frameOrder={BACK}
containerWidth={value3}
containerHeight={previewHeight}
/>
);
const xs = (Native).radii.xs;
const absoluteFill = StyleSheet.absoluteFill;
const items4 = [
<View
style={{
'position': 'absolute',
'top': 0,
'left': 0,
'right': 0,
'height': null,
'backgroundColor': 'black',
height: overflowTop,
}}
/>,
];
items4[1] = (
<View
style={{
'position': 'absolute',
'bottom': 0,
'left': 0,
'right': 0,
'height': null,
'backgroundColor': 'black',
height: overflowBottom,
}}
/>
);
items4[2] = (
<View
style={{
'position': 'absolute',
'top': null,
'bottom': null,
'left': 0,
'width': null,
'backgroundColor': 'black',
top: overflowTop,
bottom: overflowBottom,
width: overflowHorizontal,
}}
/>
);
items4[3] = (
<View
style={{
'position': 'absolute',
'top': null,
'bottom': null,
'right': 0,
'width': null,
'backgroundColor': 'black',
top: overflowTop,
bottom: overflowBottom,
width: overflowHorizontal,
}}
/>
);
items4[4] = (
<View
style={{
position: 'absolute',
top: overflowTop - xs,
left: overflowHorizontal - xs,
width: 2 * xs,
height: 2 * xs,
borderRadius: xs,
backgroundColor: 'black',
}}
/>
);
items4[5] = (
<View
style={{
position: 'absolute',
top: overflowTop - xs,
right: overflowHorizontal - xs,
width: 2 * xs,
height: 2 * xs,
borderRadius: xs,
backgroundColor: 'black',
}}
/>
);
items4[6] = (
<View
style={{
position: 'absolute',
bottom: overflowBottom - xs,
left: overflowHorizontal - xs,
width: 2 * xs,
height: 2 * xs,
borderRadius: xs,
backgroundColor: 'black',
}}
/>
);
items4[7] = (
<View
style={{
position: 'absolute',
bottom: overflowBottom - xs,
right: overflowHorizontal - xs,
width: 2 * xs,
height: 2 * xs,
borderRadius: xs,
backgroundColor: 'black',
}}
/>
);
const defaultImport22 = ((Component) => <Component style={{position: 'absolute', top: -overflowTop,
bottom: -overflowBottom, left: -overflowHorizontal,
right: -overflowHorizontal}} maskElement={<View style={absoluteFill}>{items4}</View>}><View style={{marginTop: overflowTop,
marginBottom: overflowBottom, marginHorizontal: overflowHorizontal,
flex: 1}}>{profileFrame2}</View></Component>)(defaultImport2);
const items2 = [styles.profileFrameContainer];
items2[1] = {width: value3, marginTop: overflowTop, marginBottom: overflowBottom,
marginHorizontal: overflowHorizontal};
const items3 = [profileBackgroundColor != null ? profileFrame2 : defaultImport22];
items3[1] = (
<View style={[styles.profileContainer, value5 != null && ({backgroundColor: value5})]}>
{((Component) => <Component source={{uri: importDefault(10032) /* metro dependency 10032: sample_profile_small2xPng */}} style={styles.sampleProfile} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</View>
);
const defaultImport4 = ProfileFrame;
filterLayer_78349Binding = filterLayer_78349;
PREVIEW = UserProfileThemeTypes.PREVIEW;
const FRONT = ProfileFrameLayerOrder.FRONT;
items3[2] = ((Component) => <Component frame={profileFrame} filterLayer={filterLayer_78349Binding} profileThemeType={PREVIEW} frameOrder={FRONT} containerWidth={value3} containerHeight={previewHeight - overflowTop - overflowBottom} />)(defaultImport4);
return (
<View style={items2}>
{items3}
</View>
);
}
}
function _default_78350({profileFrame, previewWidth, previewHeight, profileBackgroundColor}) { // fn#78350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10217:510, offset: 0x01e269a9, size: 1128 bytes, params: 2, frame: 37
const styles = useStyles();
const innerWidth = profileFrame.innerWidth;
const value2 = previewWidth * innerWidth;
var overflowHorizontal = profileFrame.overflowHorizontal;
const value3 = value2 / (innerWidth + 2 * overflowHorizontal);
var {overflowTop, overflowBottom,
overflowHorizontal} = (importDefault(8502) /* metro dependency 8502: scaleProfileFrame */)(profileFrame, value3);
const value5 = (require(3860) /* metro dependency 3860: useToken */).useToken(profileBackgroundColor);
const ProfileFrame = importDefault(8503) /* metro dependency 8503: ProfileFrame */;
let filterLayer_78349Binding = filterLayer_78349;
let PREVIEW = UserProfileThemeTypes.PREVIEW;
const ProfileFrameLayerOrder = (require(8505) /* metro dependency 8505: ProfileFrameLayerOrder */).ProfileFrameLayerOrder;
const BACK = ProfileFrameLayerOrder.BACK;
const profileFrame2 = <ProfileFrame frame={profileFrame} filterLayer={filterLayer_78349Binding} profileThemeType={PREVIEW} frameOrder={BACK} containerWidth={value3} containerHeight={previewHeight} />;
const xs = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const defaultImport2 = importDefault(5302) /* metro dependency 5302 */;
const absoluteFill = StyleSheet.absoluteFill;
const items4 = [<View style={{'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'height': null,
'backgroundColor': 'black', height: overflowTop}} />];
items4[1] = <View style={{'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'height': null,
'backgroundColor': 'black', height: overflowBottom}} />;
items4[2] = <View style={{'position': 'absolute', 'top': null, 'bottom': null, 'left': 0, 'width': null,
'backgroundColor': 'black', top: overflowTop, bottom: overflowBottom, width: overflowHorizontal}} />;
items4[3] = <View style={{'position': 'absolute', 'top': null, 'bottom': null, 'right': 0, 'width': null,
'backgroundColor': 'black', top: overflowTop, bottom: overflowBottom, width: overflowHorizontal}} />;
items4[4] = <View style={{position: 'absolute', top: overflowTop - xs, left: overflowHorizontal - xs, width: 2 * xs,
height: 2 * xs, borderRadius: xs, backgroundColor: 'black'}} />;
items4[5] = <View style={{position: 'absolute', top: overflowTop - xs, right: overflowHorizontal - xs,
width: 2 * xs, height: 2 * xs, borderRadius: xs, backgroundColor: 'black'}} />;
items4[6] = <View style={{position: 'absolute', bottom: overflowBottom - xs, left: overflowHorizontal - xs,
width: 2 * xs, height: 2 * xs, borderRadius: xs, backgroundColor: 'black'}} />;
items4[7] = <View style={{position: 'absolute', bottom: overflowBottom - xs, right: overflowHorizontal - xs,
width: 2 * xs, height: 2 * xs, borderRadius: xs, backgroundColor: 'black'}} />;
const defaultImport22 = ((Component) => <Component style={{position: 'absolute', top: -overflowTop,
bottom: -overflowBottom, left: -overflowHorizontal,
right: -overflowHorizontal}} maskElement={<View style={absoluteFill}>{items4}</View>}><View style={{marginTop: overflowTop,
marginBottom: overflowBottom, marginHorizontal: overflowHorizontal,
flex: 1}}>{profileFrame2}</View></Component>)(defaultImport2);
const items2 = [styles.profileFrameContainer];
items2[1] = {width: value3, marginTop: overflowTop, marginBottom: overflowBottom,
marginHorizontal: overflowHorizontal};
const items3 = [profileBackgroundColor != null ? profileFrame2 : defaultImport22];
items3[1] = <View style={[styles.profileContainer,
value5 != null && ({backgroundColor: value5})]}>{((Component) => <Component source={{uri: importDefault(10032) /* metro dependency 10032: sample_profile_small2xPng */}} style={styles.sampleProfile} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>;
const defaultImport4 = ProfileFrame;
filterLayer_78349Binding = filterLayer_78349;
PREVIEW = UserProfileThemeTypes.PREVIEW;
const FRONT = ProfileFrameLayerOrder.FRONT;
items3[2] = ((Component) => <Component frame={profileFrame} filterLayer={filterLayer_78349Binding} profileThemeType={PREVIEW} frameOrder={FRONT} containerWidth={value3} containerHeight={previewHeight - overflowTop - overflowBottom} />)(defaultImport4);
return (
<View style={items2}>
{items3}
</View>
);
}
global.__d(_fun78348, 10031, [31, 27, 8471, 6816, 33, 4501, 697, 8502, 3860, 8503, 8505, 5302, 5475, 10032,
2]) /* metro module 10031, dependencies: [31, 27, 8471, 6816, 33, 4501, 697, 8502, 3860, 8503, 8505, 5302, 5475, 10032, 2] */;
@@ -1,21 +1,26 @@
/* Metro module 10094; source: modules/collectibles/profile_frames/native/previews/ProfileFrameUserPreview.tsx; dependencies: [31, 33, 8489, 1244, 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 _fun78853(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10280:6, offset: 0x01e381a1, size: 138 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_frames/native/previews/ProfileFrameUserPreview.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/native/previews/ProfileFrameUserPreview.tsx');
exports.default = _default_78854;
function _default_78854(a0) { // fn#78854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10280:127, offset: 0x01e3822b, size: 224 bytes, params: 2, frame: 22
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const profileFrame = a0.profileFrame;
const value = Object.create(null);
value.profileFrame = 0;
return ((Component) => <Component profileFrameOverride={profileFrame} accessibilityLabel={profileFrame != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['DT/PwH'],
{a11y_text: profileFrame.label}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vQx51z)} {...copyDataProperties({},
a0, value, undefined)} />)(importDefault(8489) /* metro dependency 8489: UserProfilePreview */);
}
}
function _default_78854(a0) { // fn#78854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10280:127, offset: 0x01e3822b, size: 224 bytes, params: 2, frame: 22
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const profileFrame = a0.profileFrame;
const value = Object.create(null);
value.profileFrame = 0;
return ((Component) => <Component profileFrameOverride={profileFrame} accessibilityLabel={profileFrame != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['DT/PwH'],
{a11y_text: profileFrame.label}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.vQx51z)} {...copyDataProperties({},
a0, value, undefined)} />)(importDefault(8489) /* metro dependency 8489: UserProfilePreview */);
}
global.__d(_fun78853, 10094, [31, 33, 8489, 1244,
2]) /* metro module 10094, dependencies: [31, 33, 8489, 1244, 2] */;
@@ -1,77 +1,77 @@
/* Metro module 8506; source: modules/collectibles/profile_frames/native/useProfileFrameLayerAsset.tsx; dependencies: [57, 31, 27, 1859, 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 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 CollectiblesAssetUtilsModule from '../../utils/CollectiblesAssetUtils.tsx'; /* Metro dependency 1859 */
function _fun67438(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8691:6, offset: 0x01c228cc, size: 195 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 = importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_4 = value.Image;
const env0_5 = value.PixelRatio;
const Map = global.Map;
const map = new Map();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_frames/native/useProfileFrameLayerAsset.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/native/useProfileFrameLayerAsset.tsx');
exports.default = useProfileFrameLayerAsset;
}
function useProfileFrameLayerAsset({skuId, layer, width}) { // fn#67439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8691:277, offset: 0x01c2298f, size: 340 bytes, params: 2, frame: 24
var r2;
var Math;
var value;
const collectiblesAssetUtilsModule = require(1859) /* metro dependency 1859: CollectiblesAssetUtils */;
const getCollectiblesItemAssetUrl = collectiblesAssetUtilsModule.getCollectiblesItemAssetUrl;
const object2 = {skuId: skuId};
const CollectiblesItemAssetFormat = collectiblesAssetUtilsModule.CollectiblesItemAssetFormat;
const STATIC = CollectiblesItemAssetFormat.STATIC;
object2.assetFormat = STATIC;
object2.assetId = layer.id;
const value3 = Reflect.apply(getCollectiblesItemAssetUrl, collectiblesAssetUtilsModule, [object2]);
const binding = env0_3;
const env0_1 = env0_2(binding.useReducer(function(a0) {
return a0 + 1;
}, 0), 2)[1];
binding.useEffect(_fun67441, [value3]);
const r3 = value3 != null ? env0_6.get(value3) : undefined;
const r1 = r3 != null ? r3 * width : 0;
if (value3 != null) {
if (r3 != null) {
Math = global.Math;
value = Math.round(width * PixelRatio.get());
Math = global.Math;
value = '' + value3 + '?width=' + value + '&height=' + Math.round(value * r3);
r2 = value;
function useProfileFrameLayerAsset({skuId, layer, width}) { // fn#67439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8691:277, offset: 0x01c2298f, size: 340 bytes, params: 2, frame: 24
var r2;
var Math;
var value;
const getCollectiblesItemAssetUrl = CollectiblesAssetUtilsModule.getCollectiblesItemAssetUrl;
const object = {skuId: skuId};
const CollectiblesItemAssetFormat = CollectiblesAssetUtilsModule.CollectiblesItemAssetFormat;
const STATIC = CollectiblesItemAssetFormat.STATIC;
object.assetFormat = STATIC;
object.assetId = layer.id;
const value3 = Reflect.apply(getCollectiblesItemAssetUrl, CollectiblesAssetUtilsModule, [object]);
const env0_1 = Module00057(ReactModule.useReducer(function(a0) {
return a0 + 1;
}, 0), 2)[1];
ReactModule.useEffect(_fun67441, [value3]);
const r3 = value3 != null ? env0_6.get(value3) : undefined;
const r1 = r3 != null ? r3 * width : 0;
if (value3 != null) {
if (r3 != null) {
Math = global.Math;
value = Math.round(width * PixelRatio.get());
Math = global.Math;
value = '' + value3 + '?width=' + value + '&height=' + Math.round(value * r3);
r2 = value;
} else {
r2 = null;
}
} else {
r2 = null;
}
} else {
r2 = null;
}
return {assetUrl: r2, imageHeight: r1};
}
return {assetUrl: r2, imageHeight: r1};
function _fun67441() { // fn#67441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8691:512, offset: 0x01c22ae3, size: 99 bytes, params: 1, frame: 16
var environment;
var value6;
let r2 = env0_0 == null || env0_0 === '';
r2 = !r2 ? env1_6.has(env0_0) : r2;
if (!r2) {
value6 = environment.__proto__;
Image.getSize(env0_0, _fun67442, function() {
});
}
function _fun67442(a0, a1) { // fn#67442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8691:557, offset: 0x01c22b46, size: 55 bytes, params: 3, frame: 15
var value;
var binding;
var set;
if (a0 > 0) {
value = environment.__proto__.__proto__;
binding = env2_6;
set = binding.set;
value = environment.__proto__;
Reflect.apply(set, binding, [env1_0, a1 / a0]);
env1_1();
}
}
function _fun67441() { // fn#67441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8691:512, offset: 0x01c22ae3, size: 99 bytes, params: 1, frame: 16
var environment;
var value6;
let r2 = env0_0 == null || env0_0 === '';
r2 = !r2 ? env1_6.has(env0_0) : r2;
if (!r2) {
value6 = environment.__proto__;
Image.getSize(env0_0, _fun67442, function() {
});
}
}
}
function _fun67442(a0, a1) { // fn#67442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8691:557, offset: 0x01c22b46, size: 55 bytes, params: 3, frame: 15
var value;
var binding;
var set;
if (a0 > 0) {
value = environment.__proto__.__proto__;
binding = env2_6;
set = binding.set;
value = environment.__proto__;
Reflect.apply(set, binding, [env1_0, a1 / a0]);
env1_1();
}
}
global.__d(_fun67438, 8506, [57, 31, 27, 1859, 2]) /* metro module 8506, dependencies: [57, 31, 27, 1859, 2] */;
@@ -1,8 +1,10 @@
/* Metro module 8502; source: modules/collectibles/profile_frames/scaleProfileFrame.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun67426(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8687:6, offset: 0x01c22047, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_frames/scaleProfileFrame.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/scaleProfileFrame.tsx');
exports.default = function(a0, a1) {
var value = a1 / a0.innerWidth;
return {scale: value, overflowTop: a0.overflowTop * value, overflowBottom: a0.overflowBottom * value,
@@ -10,3 +12,4 @@ function _fun67426(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun67426, 8502, [2]) /* metro module 8502, dependencies: [2] */;
@@ -1,27 +1,33 @@
/* Metro module 8498; source: modules/collectibles/profile_frames/useMaybeFetchProfileFrame.tsx; dependencies: [31, 8499, 8500, 5120, 2] */
import UseProfileFrame from './hooks/useProfileFrame.tsx'; /* Metro dependency 8500 */
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 CollectiblesProfileFramesExperimentModule from '../experiments/CollectiblesProfileFramesExperiment.tsx'; /* Metro dependency 8499 */
function _fun67412(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67412, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8683:6, offset: 0x01c21aad, size: 121 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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_frames/useMaybeFetchProfileFrame.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/useMaybeFetchProfileFrame.tsx');
exports.default = useMaybeFetchProfileFrame;
}
function useMaybeFetchProfileFrame(a0, a1) { // fn#67413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8683:215, offset: 0x01c21b26, size: 138 bytes, params: 3, frame: 18
const env0_0 = a0;
const value2 = undefined;
const value3 = (CollectiblesProfileFramesExperimentModule).useIsProfileFramesEnabled(a1);
const value4 = (UseProfileFrame)(a0);
ReactModule.useEffect(_fun67414, [value3 && a0 != null && value4 == null, a0]);
return value3 ? value4 : value2;
function _fun67414() { // fn#67414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8683:353, offset: 0x01c21bb0, size: 54 bytes, params: 1, frame: 12
var value2;
if (env0_1) {
value2 = environment.__proto__;
(require(5120) /* metro dependency 5120: CollectiblesActionCreators */).maybeFetchCollectiblesProduct(env0_0);
}
}
function useMaybeFetchProfileFrame(a0, a1) { // fn#67413, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8683:215, offset: 0x01c21b26, size: 138 bytes, params: 3, frame: 18
const env0_0 = a0;
const value2 = undefined;
const value3 = (require(8499) /* metro dependency 8499: CollectiblesProfileFramesExperiment */).useIsProfileFramesEnabled(a1);
const value4 = (importDefault(8500) /* metro dependency 8500: useProfileFrame */)(a0);
env0_3.useEffect(_fun67414, [value3 && a0 != null && value4 == null, a0]);
return value3 ? value4 : value2;
}
function _fun67414() { // fn#67414, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8683:353, offset: 0x01c21bb0, size: 54 bytes, params: 1, frame: 12
var value2;
if (env0_1) {
value2 = environment.__proto__;
(require(5120) /* metro dependency 5120: CollectiblesActionCreators */).maybeFetchCollectiblesProduct(env0_0);
}
}
global.__d(_fun67412, 8498, [31, 8499, 8500, 5120,
2]) /* metro module 8498, dependencies: [31, 8499, 8500, 5120, 2] */;
@@ -1,96 +1,103 @@
/* Metro module 13219; source: modules/collectibles/profile_frames/useProfileFrameSections.tsx; dependencies: [57, 31, 5121, 5145, 632, 10054, 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 */
import * as UseCanPurchaseFramesModule from '../hooks/useCanPurchaseFrames.tsx'; /* Metro dependency 10054 */
function _fun100845(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13409:6, offset: 0x021fc6b2, 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/profile_frames/useProfileFrameSections.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/profile_frames/useProfileFrameSections.tsx');
exports.default = _default_100846;
exports.Section = {PURCHASE: 'purchase', PREMIUM_PURCHASE: 'premium_purchase', PREVIEW: 'preview'};
exports.NONE_ITEM = {skuId: 'None'};
exports.SHOP_ITEM = {skuId: 'Shop'};
}
function _default_100846() { // fn#100846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13409:295, offset: 0x021fc7ad, size: 207 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(_fun100849, [value3[0], value3[1], purchases,
(UseCanPurchaseFramesModule).useIsProfileFramesEarlyAccessPhase('useProfileFrameSections')]);
function _fun100849() { // fn#100849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13409:532, offset: 0x021fc87c, size: 418 bytes, params: 1, frame: 24
var environment;
const value = environment.__proto__;
const value4 = (CollectiblesUtilsModule).getProfileFrames(purchases,
env0_1).reduce(_fun100850, {purchase: [], premium_purchase: [], preview: []});
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const TiLCgw = t.TiLCgw;
const value5 = Reflect.apply(string, intl, [TiLCgw]);
object = {};
const binding = env1_6;
const PURCHASE = binding.PURCHASE;
object.section = PURCHASE;
const items3 = [env1_7, env1_8];
arraySpread(items3, value4.purchase, 2, require);
object.items = items3;
object.height = 12;
object.header = intl.string(t['9eZ4aO']);
const items2 = [object];
const PREMIUM_PURCHASE = binding.PREMIUM_PURCHASE;
items2[1] = {section: PREMIUM_PURCHASE, items: value4.premium_purchase, height: 12, header: value5};
object = {};
const PREVIEW = binding.PREVIEW;
object.section = PREVIEW;
object.items = value4.preview;
object.height = 12;
object.header = ReactModule.useMemo ? value5 : intl.string(t['1vbbee']);
items2[2] = object;
return items2.filter(function(a0) {
return a0.items.length > 0;
});
function _fun100850(a0, a1) { // fn#100850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13409:581, offset: 0x021fca1e, 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_100846() { // fn#100846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13409:295, offset: 0x021fc7ad, size: 207 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(_fun100849, [value3[0], value3[1], purchases,
(require(10054) /* metro dependency 10054: useCanPurchaseFrames */).useIsProfileFramesEarlyAccessPhase('useProfileFrameSections')]);
}
}
function _fun100849() { // fn#100849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13409:532, offset: 0x021fc87c, size: 418 bytes, params: 1, frame: 24
var object2;
var environment;
const value = environment.__proto__;
const value4 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getProfileFrames(purchases,
env0_1).reduce(_fun100850, {purchase: [], premium_purchase: [], preview: []});
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const TiLCgw = t.TiLCgw;
const value5 = Reflect.apply(string, intl, [TiLCgw]);
object2 = {};
const binding = env1_6;
const PURCHASE = binding.PURCHASE;
object2.section = PURCHASE;
const items3 = [env1_7, env1_8];
arraySpread(items3, value4.purchase, 2, require);
object2.items = items3;
object2.height = 12;
object2.header = intl.string(t['9eZ4aO']);
const items2 = [object2];
const PREMIUM_PURCHASE = binding.PREMIUM_PURCHASE;
items2[1] = {section: PREMIUM_PURCHASE, items: value4.premium_purchase, height: 12, header: value5};
object2 = {};
const PREVIEW = binding.PREVIEW;
object2.section = PREVIEW;
object2.items = value4.preview;
object2.height = 12;
object2.header = env0_3 ? value5 : intl.string(t['1vbbee']);
items2[2] = object2;
return items2.filter(function(a0) {
return a0.items.length > 0;
});
}
function _fun100850(a0, a1) { // fn#100850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13409:581, offset: 0x021fca1e, 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;
}
global.__d(_fun100845, 13219, [57, 31, 5121, 5145, 632, 10054, 5134, 1244,
2]) /* metro module 13219, dependencies: [57, 31, 5121, 5145, 632, 10054, 5134, 1244, 2] */;