Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,11 @@
/* Metro module 8476; source: modules/collectibles/profile_effects/constants.tsx; dependencies: [2] */
function _fun67301(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8661:6, offset: 0x01c1d53f, size: 123 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_effects/constants.tsx');
exports.PROFILE_EFFECT_INTRO_MINIMUM_DELAY = 0.1;
exports.PROFILE_EFFECT_INTRO_DELAY = 500;
exports.RESET = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';
exports.PFX_MOBILE_ACTION_SHEET_BANNER_HEIGHT = 100;
}
@@ -0,0 +1,129 @@
/* Metro module 13216; source: modules/collectibles/profile_effects/native/EditProfileEffectSection.tsx; dependencies: [31, 27, 5127, 8471, 33, 4501, 8409, 13215, 8410, 6789, 8481, 5475, 10032, 8474, 2] */
function _fun100824(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13406:6, offset: 0x021fae58, size: 411 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(5127) /* metro dependency 5127: ProfileEffectRecord */).isProfileEffectRecord;
const SAMPLE_PROFILE_ASPECT_RATIO = (require(8471) /* metro dependency 8471: CollectiblesPreviewConstants */).SAMPLE_PROFILE_ASPECT_RATIO;
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',
'alignItems': 'center', 'justifyContent': 'space-between', paddingHorizontal: GUTTER_SIZE},
rowSpacer: {height: GUTTER_SIZE}, profileEffect: {'overflow': 'hidden', 'width': '100%', 'height': '100%'},
sampleProfile: {aspectRatio: SAMPLE_PROFILE_ASPECT_RATIO, width: '100%'}}]);
const value4 = value.memo(_fun100825);
value4.displayName = 'EditProfileEffectRow';
value = value.memo(_fun100828);
value.displayName = 'EditProfileEffectItem';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_effects/native/EditProfileEffectSection.tsx');
exports.EditProfileEffectRow = value4;
}
function _fun100825({items, selectedSkuId, setSelectedProfileEffect, guildId, isTryItOut, size}) { // fn#100825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13406:525, offset: 0x021faff3, 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() {
setSelectedProfileEffect(null);
}, [setSelectedProfileEffect]);
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(_fun100827)}</View>;
return (
<>
{value}
<View style={styles.rowSpacer} />
</>
);
}
function _fun100828({item, isSelected, setSelectedProfileEffect, isTryItOut, size}) { // fn#100828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13406:1283, offset: 0x021fb28c, size: 461 bytes, params: 2, frame: 26
isTryItOut = !(isTryItOut === undefined) && isTryItOut;
const styles = useStyles();
const value4 = (importDefault(8481) /* metro dependency 8481: useProfileEffect */)(item.skuId);
const binding = env0_3;
const value5 = binding.useCallback(function() {
setSelectedProfileEffect(item);
}, [setSelectedProfileEffect, item]);
const value6 = binding.useMemo(_fun100830, [value4?.thumbnailPreviewSrc]);
const EditCollectiblesListItemProduct = (require(8410) /* metro dependency 8410: CollectiblesEditUserProfileListItems */).EditCollectiblesListItemProduct;
return (
<EditCollectiblesListItemProduct
skuId={item.skuId}
isSelected={isSelected}
onPress={value5}
isTryItOut={isTryItOut}
size={size}
accessibilityLabel={value4?.accessibilityLabel}
>
<View
style={[styles.profileEffect, {borderRadius: 6}]}
accessible={false}
importantForAccessibility="no"
>
{((Component) => <Component source={{uri: importDefault(10032) /* metro dependency 10032: sample_profile_small2xPng */}} style={styles.sampleProfile} resizeMode="cover" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
{((Component) => <Component skuId={item.skuId} bannerAdjustment={0} useThumbnail thumbnailUrlOverride={value6} />)(importDefault(8474) /* metro dependency 8474: ProfileEffect */)}
</View>
</EditCollectiblesListItemProduct>
);
}
function _fun100827(a0, a1) { // fn#100827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13406:758, offset: 0x021fb114, size: 376 bytes, params: 3, frame: 20
var selectedSkuIdBinding;
var skuId;
var binding;
const NONE_ITEM = (require(13215) /* metro dependency 13215: useProfileEffectSections */).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 = (require(13215) /* metro dependency 13215: useProfileEffectSections */).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_EFFECT_SHEET}
key="shop"
/>
);
}
if (isProfileEffectRecord(a0)) {
selectedSkuIdBinding = selectedSkuId;
skuId = a0.skuId;
binding = env1_10;
var bindingProps = {item: a0, isSelected: selectedSkuIdBinding === skuId,
setSelectedProfileEffect: setSelectedProfileEffect, 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 _fun100830() { // fn#100830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13406:1438, offset: 0x021fb459, size: 101 bytes, params: 1, frame: 16
const value2 = undefined;
return (env0_2 == null ? value2 : env0_2.thumbnailPreviewSrc) == null ? env0_2 == null ? value2 : env0_2.thumbnailPreviewSrc : '' + env0_2.thumbnailPreviewSrc + '?width=100&height=195';
}
@@ -0,0 +1,219 @@
/* Metro module 8474; source: modules/collectibles/profile_effects/native/ProfileEffect.tsx; dependencies: [57, 31, 27, 4502, 7030, 33, 4501, 1478, 8475, 8476, 8477, 566, 676, 8478, 8480, 8479, 5475, 8481, 2] */
function _fun67272(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:6, offset: 0x01c1c8bb, size: 335 bytes, params: 8, frame: 20
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 value = require(27) /* metro dependency 27 */;
const env0_5 = value.View;
const env0_6 = value.Image;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({profileEffects: {'position': 'absolute',
'width': '100%', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0, 'flex': 1, 'justifyContent': 'flex-start'},
effect: {position: 'absolute'}});
const closure = usePreloadProfileEffect;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_effects/native/ProfileEffect.tsx');
exports.default = _default_67292;
exports.usePreloadProfileEffect = closure;
}
function usePreloadProfileEffect(a0) { // fn#67273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:379, offset: 0x01c1ca0a, size: 138 bytes, params: 2, frame: 15
const env0_0 = a0;
const binding = env0_4;
const value = binding.useMemo(_fun67274, [a0]);
const env0_2 = binding.useRef(value);
const value2 = binding.useRef(false);
binding.useEffect(_fun67276, [value]);
return {loaded: value2, onLayerLoaded: binding.useCallback(_fun67277, [])};
}
function useProfileDimensions() { // fn#67278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:678, offset: 0x01c1cb46, size: 119 bytes, params: 1, frame: 17
const binding = env0_4;
const [property, env0_0] = env0_3(binding.useState(0), 2);
return {height: (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height,
width: property, onLayout: binding.useCallback(_fun67279, [])};
}
function ProfileEffect(a0) { // fn#67280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:866, offset: 0x01c1cbe1, size: 491 bytes, params: 2, frame: 24
const profileEffect = a0.profileEffect;
a0.replayOnNavigationFocus;
const style = a0.style;
const paused = a0.paused;
const styles = useStyles();
const value2 = useProfileDimensions();
const env0_2 = value2.width;
const onLayout = value2.onLayout;
const env0_3 = profileEffect.accessibilityLabel;
const binding = env0_4;
const value3 = binding.useMemo(_fun67281, [profileEffect.effects]);
const value4 = usePreloadProfileEffect(value3);
const loaded = value4.loaded;
const env0_5 = value4.onLayerLoaded;
const useState = binding.useState;
const PROFILE_EFFECT_INTRO_DELAY = (require(8476) /* metro dependency 8476: constants */).PROFILE_EFFECT_INTRO_DELAY;
const value6 = env0_3(Reflect.apply(useState, binding, [-PROFILE_EFFECT_INTRO_DELAY]), 2);
const env0_6 = value6[0];
const env0_7 = value6[1];
const defaultImport = importDefault(8477) /* metro dependency 8477: useClock */;
const useCallback = binding.useCallback;
const {stop, reset} = defaultImport(Reflect.apply(useCallback, binding, [_fun67282, [loaded]]));
const state = (require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore], function() {
return AppStateStore.getState();
});
const env0_11 = binding.useRef(null);
binding.useEffect(_fun67285, [state, stop, reset]);
binding.useEffect(function() {
if (paused) {
stop();
} else {
reset();
}
}, [paused, stop, reset]);
return (
<View
style={[styles.profileEffects, style]}
pointerEvents="none"
onLayout={onLayout}
>
{value3.map(_fun67287)}
</View>
);
}
function StaticEffect({profileEffect, bannerAdjustment, useThumbnail, thumbnailUrlOverride}) { // fn#67288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:1799, offset: 0x01c1cf7d, size: 408 bytes, params: 2, frame: 27
var r0;
bannerAdjustment = bannerAdjustment === undefined ? 0 : bannerAdjustment;
var env0_3Binding = undefined;
const styles = useStyles();
const reducedMotionSrc = profileEffect.reducedMotionSrc;
const thumbnailPreviewSrc = profileEffect.thumbnailPreviewSrc;
const accessibilityLabel = profileEffect.accessibilityLabel;
const {width, onLayout} = useProfileDimensions();
let binding = undefined;
var [property, env0_3] = env0_3Binding(binding.useState(0), 2);
const r16 = thumbnailUrlOverride ?? thumbnailPreviewSrc;
binding = r16;
const useEffect = binding.useEffect;
let object = [reducedMotionSrc, r16, width, useThumbnail];
Reflect.apply(useEffect, binding, [_fun67289, object]);
if (property === 0) {
r0 = {style: styles.profileEffects, pointerEvents: 'none', onLayout: onLayout};
} else {
object = {};
object.style = styles.profileEffects;
object.pointerEvents = 'none';
object.onLayout = onLayout;
object.children = ((Component) => <Component resizeMode="cover" resizeMethod="resize" enableAnimation source={{uri: useThumbnail ? r16 : reducedMotionSrc}} alt={accessibilityLabel} height={property} width={width} style={[styles.effect,
{width: width, height: property,
top: 0 - bannerAdjustment}]} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
r0 = object;
}
return <View {...r0} />;
}
function _default_67292(a0) { // fn#67292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:2502, offset: 0x01c1d1b2, size: 222 bytes, params: 2, frame: 19
const value2 = (importDefault(8481) /* metro dependency 8481: useProfileEffect */)(a0.skuId);
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.useReducedMotion;
});
const value3 = (require(8475) /* metro dependency 8475: utils */).usePotentiallyRandomizedProfileEffect(value2);
const value4 = null;
return value4 == value3 ? value4 : useReducedMotion || a0.useThumbnail ? <StaticEffect profileEffect={value3} bannerAdjustment={a0.bannerAdjustment} useThumbnail={a0.useThumbnail} thumbnailUrlOverride={a0.thumbnailUrlOverride} /> : <ProfileEffect profileEffect={value3} {...a0} />;
}
function _fun67274() { // fn#67274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:400, offset: 0x01c1ca94, size: 56 bytes, params: 1, frame: 12
const Set = global.Set;
const value = env0_0.map(function(a0) {
return a0.src;
});
const value2 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
return set instanceof Object ? set : value2;
}
function _fun67276() { // fn#67276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:479, offset: 0x01c1cad7, size: 42 bytes, params: 1, frame: 3
const binding = env0_2;
const binding2 = env0_1;
binding.current = binding2;
env0_3.current = binding2.size === 0;
}
function _fun67277(a0) { // fn#67277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:545, offset: 0x01c1cb01, size: 69 bytes, params: 2, frame: 13
var binding;
let current = env0_3.current;
if (!current) {
binding = env0_2;
current = binding.current;
current.delete(a0);
current = binding.current;
if (current.size === 0) {
env0_3.current = true;
}
}
}
function _fun67281() { // fn#67281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:1028, offset: 0x01c1cdcc, size: 51 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(8475) /* metro dependency 8475: utils */;
return value.sortEffectLayers(profileEffect.effects);
}
function _fun67282(a0) { // fn#67282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:1240, offset: 0x01c1cdff, size: 46 bytes, params: 2, frame: 11
const env0_0 = a0;
if (loaded.current) {
env0_7(_fun67283);
}
}
function _fun67285() { // fn#67285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:1385, offset: 0x01c1ce40, size: 132 bytes, params: 1, frame: 13
var stateBinding;
var value2;
let current = env0_11.current;
if (current !== null) {
current = env0_11.current;
stateBinding = state;
if (current !== stateBinding) {
stateBinding = state;
value2 = environment.__proto__;
if (stateBinding === (require(676) /* metro dependency 676: ConstantsIOS */).AppStates.ACTIVE) {
reset();
} else {
stop();
}
env0_11.current = state;
}
} else {
env0_11.current = state;
}
}
function _fun67287(a0, a1) { // fn#67287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:1616, offset: 0x01c1cee8, size: 149 bytes, params: 3, frame: 19
return ((Component) => <Component layerConfig={a0} animate={(require(8478) /* metro dependency 8478: ProfileEffectUtils */).shouldAnimate(a0,
env0_6)} paused={paused} width={width} accessibilityLabel={accessibilityLabel} onLoad={onLayerLoaded} loaded={loaded.current} key={a0.src + a1} />)(importDefault(8480) /* metro dependency 8480: ProfileEffectLayerAndroid */);
}
function _fun67289() { // fn#67289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:2079, offset: 0x01c1d115, size: 70 bytes, params: 1, frame: 16
var environment;
var value2;
if (width !== 0) {
value2 = environment.__proto__;
Image.getSize(useThumbnail ? env0_4 : reducedMotionSrc, _fun67290, _fun67291);
}
}
function _fun67290(a0, a1) { // fn#67290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:2108, offset: 0x01c1d15b, size: 34 bytes, params: 3, frame: 11
env1_3(a1 * (width / a0));
}
function _fun67291() { // fn#67291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8659:2130, offset: 0x01c1d17d, size: 53 bytes, params: 1, frame: 13
const binding = env1_3;
const widthBinding = width;
const DEFAULT_PROFILE_EFFECT_WH_RATIO = (require(8479) /* metro dependency 8479: getAssetWHRatio */).DEFAULT_PROFILE_EFFECT_WH_RATIO;
binding(widthBinding / DEFAULT_PROFILE_EFFECT_WH_RATIO);
}
@@ -0,0 +1,50 @@
/* Metro module 8480; source: modules/collectibles/profile_effects/native/ProfileEffectLayer.android.tsx; dependencies: [31, 27, 33, 7897, 8478, 2] */
function _fun67317(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8665:6, offset: 0x01c1dc88, size: 167 bytes, params: 8, frame: 18
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 */).StyleSheet;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
value = value.memo(_fun67318);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_effects/native/ProfileEffectLayer.android.tsx');
exports.default = value;
}
function _fun67318({layerConfig, animate, paused, width, accessibilityLabel, onLoad}) { // fn#67318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8665:151, offset: 0x01c1dd2f, size: 277 bytes, params: 2, frame: 27
const binding = env0_2;
const value2 = binding.useRef(null);
binding.useEffect(_fun67319, [animate, paused,
(require(7897) /* metro dependency 7897: APNGPlayerAndroid */).useAPNGPlayerControls(value2)]);
const APNGPlayer = (require(7897) /* metro dependency 7897: APNGPlayerAndroid */).APNGPlayer;
const src = layerConfig.src;
const items2 = [StyleSheet.absoluteFill];
const object = {position: 'absolute', width: width};
object.height = (require(8478) /* metro dependency 8478: ProfileEffectUtils */).calculateProfileEffectHeight(layerConfig,
width);
object.opacity = animate ? 1 : 0;
items2[1] = object;
return (
<APNGPlayer
ref={value2}
url={src}
autoplay={false}
style={items2}
ariaLabel={accessibilityLabel}
onLoad={onLoad}
/>
);
}
function _fun67319() { // fn#67319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8665:310, offset: 0x01c1de44, size: 51 bytes, params: 1, frame: 10
if (animate) {
if (paused) {
env0_2.pause();
} else {
env0_2.play();
}
} else {
env0_2.pause();
}
}
@@ -0,0 +1,74 @@
/* Metro module 8478; source: modules/collectibles/profile_effects/native/ProfileEffectUtils.tsx; dependencies: [8479, 2] */
function _fun67311(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8663:6, offset: 0x01c1daa4, size: 109 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/profile_effects/native/ProfileEffectUtils.tsx');
exports.shouldAnimate = shouldAnimate;
exports.calculateProfileEffectHeight = calculateProfileEffectHeight;
}
function shouldAnimate(a0, a1) { // fn#67312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8663:208, offset: 0x01c1db11, size: 139 bytes, params: 3, frame: 5
var loopDelay;
var loop;
var duration;
var value;
if (a1 >= a0.start) {
loop = a0.loop;
if (loop) {
if (a0.loop) {
loopDelay = a0.loopDelay;
value = undefined;
if (value === loopDelay) {
return true;
}
loopDelay = a0.loopDelay;
if (loopDelay > 0) {
duration = a0.duration;
value = duration + (a0 == null ? value : a0.loopDelay);
value = (a1 - a0.start) % value;
duration = a0.duration;
if (value > duration) {
return false;
}
return true;
}
return true;
}
return true;
}
duration = a0.duration;
if (a1 > duration + a0.start) {
return false;
}
loop = a0.loop;
if (loop) {
loopDelay = a0.loopDelay;
value = undefined;
if (value === loopDelay) {
return true;
}
loopDelay = a0.loopDelay;
if (loopDelay > 0) {
duration = a0.duration;
value = duration + (a0 == null ? value : a0.loopDelay);
value = (a1 - a0.start) % value;
duration = a0.duration;
if (value > duration) {
return false;
}
return true;
}
return true;
}
return true;
}
return false;
}
function calculateProfileEffectHeight(a0, a1) { // fn#67313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8663:456, offset: 0x01c1db9c, size: 47 bytes, params: 3, frame: 11
let value = require(8479) /* metro dependency 8479: getAssetWHRatio */;
value = value.getAssetWHRatio(a0);
return a1 / value;
}
@@ -0,0 +1,18 @@
/* Metro module 8479; source: modules/collectibles/profile_effects/native/getAssetWHRatio.tsx; dependencies: [2] */
function _fun67314(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67314, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8664:6, offset: 0x01c1dbcb, size: 114 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const getPositiveValue = function(a0, a1) {
var value = a0;
return value == null || value <= 0 ? a1 : value;
};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_effects/native/getAssetWHRatio.tsx');
exports.DEFAULT_PROFILE_EFFECT_WH_RATIO = 0.5113636363636364;
exports.getAssetWHRatio = getAssetWHRatio;
}
function getAssetWHRatio({width, height}) { // fn#67316, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8664:305, offset: 0x01c1dc54, size: 52 bytes, params: 2, frame: 14
const getPositiveValueBinding = getPositiveValue;
return getPositiveValueBinding(width, 450) / getPositiveValueBinding(height, 880);
}
@@ -0,0 +1,21 @@
/* Metro module 8488; source: modules/collectibles/profile_effects/native/previews/ProfileEffectUserPreview.tsx; dependencies: [31, 33, 8489, 1244, 2] */
function _fun67341(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8673:6, offset: 0x01c1ed2e, 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_effects/native/previews/ProfileEffectUserPreview.tsx');
exports.default = _default_67342;
}
function _default_67342(a0) { // fn#67342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8673:127, offset: 0x01c1edb8, size: 224 bytes, params: 2, frame: 22
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const profileEffect = a0.profileEffect;
const value = Object.create(null);
value.profileEffect = 0;
return ((Component) => <Component profileEffectOverride={profileEffect} accessibilityLabel={profileEffect != null ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.mbHmX2,
{a11y_text: profileEffect.accessibilityLabel}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XYdHeC)} {...copyDataProperties({},
a0, value, undefined)} />)(importDefault(8489) /* metro dependency 8489: UserProfilePreview */);
}
@@ -0,0 +1,133 @@
/* Metro module 8477; source: modules/collectibles/profile_effects/useClock.tsx; dependencies: [31, 44, 4594, 2] */
function _fun67302(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8662:6, offset: 0x01c1d5ba, size: 117 bytes, params: 8, frame: 17
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/profile_effects/useClock.tsx');
exports.default = _default_67303;
}
function _default_67303(a0) { // fn#67303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8662:115, offset: 0x01c1d62f, size: 460 bytes, params: 2, frame: 24
const value = a1;
const env0_0 = a0;
const r1 = value !== undefined ? value : {};
let minInterval = r1.minInterval;
minInterval = minInterval === undefined ? 41.666666666666664 : minInterval;
const allowableMinInterval = r1.allowableMinInterval;
const env0_2 = allowableMinInterval;
const droppedFramesCallbackThreshold = r1.droppedFramesCallbackThreshold;
const droppedFramesCallback = r1.droppedFramesCallback;
let droppedFramesResetTime = r1.droppedFramesResetTime;
droppedFramesResetTime = droppedFramesResetTime === undefined ? 3000 : droppedFramesResetTime;
const binding = env0_2;
const env0_6 = binding.useRef(minInterval);
const env0_7 = binding.useRef(0);
const env0_8 = binding.useRef(undefined);
const env0_9 = binding.useRef(undefined);
const value2 = binding.useRef(true);
const env0_11 = binding.useRef(0);
const env0_12 = binding.useRef(undefined);
const value3 = binding.useCallback(_fun67304, []);
const value4 = binding.useCallback(_fun67305, []);
const value6 = binding.useCallback(_fun67307, [binding.useCallback(_fun67306, [allowableMinInterval, value3,
droppedFramesResetTime, droppedFramesCallbackThreshold, droppedFramesCallback, a0])]);
binding.useEffect(_fun67308, [minInterval]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun67309);
return {stop: value4, reset: value6, ticking: value2};
}
function _fun67304() { // fn#67304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8662:403, offset: 0x01c1d7fb, size: 68 bytes, params: 1, frame: 12
env0_11.current = 0;
if (env0_12.current != null) {
global.clearTimeout(env0_12.current);
env0_12.current = undefined;
}
}
function _fun67305() { // fn#67305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8662:503, offset: 0x01c1d83f, size: 61 bytes, params: 1, frame: 13
env0_10.current = false;
global.cancelAnimationFrame(env0_7.current);
global.clearTimeout(env0_12.current);
}
function _fun67306(a0) { // fn#67306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8662:600, offset: 0x01c1d87c, size: 417 bytes, params: 2, frame: 20
var allowableMinInterval2;
var value2;
var value3;
var Math;
var min;
var binding;
var value6;
var defaultImport;
var droppedFramesCallbackBinding;
let current = env0_10.current;
if (current) {
current = env0_8.current;
if (current == null) {
env0_8.current = a0;
}
current = env0_9.current;
if (current == null) {
env0_9.current = a0;
}
current = env0_9.current;
value2 = a0 - current;
current = env0_8.current;
value3 = a0 - current;
Math = global.Math;
min = Math.min;
allowableMinInterval2 = allowableMinInterval ?? 120;
current = env0_6.current;
if (value3 > 1.5 * Reflect.apply(min, Math, [allowableMinInterval2, current])) {
binding = env0_11;
current = binding.current;
binding.current = current + 1;
current = env0_12.current;
if (current != null) {
global.clearTimeout(env0_12.current);
}
binding = env0_12;
binding.current = global.setTimeout(env0_13, droppedFramesResetTime);
if (droppedFramesCallbackThreshold != null) {
if (env0_11.current > droppedFramesCallbackThreshold) {
value6 = environment.__proto__;
defaultImport = importDefault(44) /* metro dependency 44 */;
droppedFramesCallbackBinding = droppedFramesCallback;
defaultImport(droppedFramesCallbackBinding != null,
'useClock - If you set a dropped frames threshold, you must provide a droppedFramesCallback to do something when that threshold is hit');
if (droppedFramesCallbackBinding()) {
env0_11.current = 0;
}
}
}
}
env0_8.current = a0;
current = env0_6.current;
if (value2 >= current - 3) {
env0_9.current = a0;
env0_0(value2);
}
binding = env0_7;
binding.current = global.requestAnimationFrame(env0_15);
}
}
function _fun67307() { // fn#67307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8662:1144, offset: 0x01c1da1d, size: 56 bytes, params: 1, frame: 12
env0_10.current = true;
env0_9.current = undefined;
env0_7.current = global.requestAnimationFrame(env0_15);
}
function _fun67308() { // fn#67308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8662:1241, offset: 0x01c1da55, size: 21 bytes, params: 1, frame: 2
env0_6.current = minInterval;
}
function _fun67309() { // fn#67309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8662:1274, offset: 0x01c1da6a, size: 43 bytes, params: 1, frame: 12
env0_7.current = global.requestAnimationFrame(env0_15);
return _fun67310;
}
function _fun67310() { // fn#67310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8662:1314, offset: 0x01c1da95, size: 15 bytes, params: 1, frame: 9
return env1_14();
}
@@ -0,0 +1,48 @@
/* Metro module 8481; source: modules/collectibles/profile_effects/useProfileEffect.tsx; dependencies: [31, 5121, 5145, 5127, 566, 5120, 2] */
function _fun67320(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8666:6, offset: 0x01c1de77, size: 171 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const collectiblesCategoryStore = importDefault(5121) /* metro dependency 5121: CollectiblesCategoryStore */;
const collectiblesPurchaseStore = importDefault(5145) /* metro dependency 5145: CollectiblesPurchaseStore */;
const env0_5 = (require(5127) /* metro dependency 5127: ProfileEffectRecord */).isProfileEffectRecord;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_effects/useProfileEffect.tsx');
exports.default = useProfileEffect;
}
function useProfileEffect(a0) { // fn#67321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8666:259, offset: 0x01c1df22, size: 125 bytes, params: 2, frame: 16
const env0_0 = a0;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([CollectiblesCategoryStore,
CollectiblesPurchaseStore], _fun67322);
env0_2.useEffect(_fun67323, [a0 != null && value2 == null, a0]);
return value2;
}
function _fun67322() { // fn#67322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8666:328, offset: 0x01c1df9f, size: 156 bytes, params: 1, frame: 17
var value2;
var product;
var isProfileEffectRecordBinding;
var value4;
var purchase;
if (env0_0 != null) {
value2 = environment.__proto__;
product = CollectiblesCategoryStore.getProduct(env0_0);
isProfileEffectRecordBinding = isProfileEffectRecord;
value4 = undefined;
if (isProfileEffectRecordBinding(product == null ? value4 : product.items[0])) {
return product.items[0];
}
purchase = CollectiblesPurchaseStore.getPurchase(env0_0);
return isProfileEffectRecord(purchase == null ? value4 : purchase.items[0]) ? purchase.items[0] : value4;
}
}
function _fun67323() { // fn#67323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8666:537, offset: 0x01c1e03b, size: 54 bytes, params: 1, frame: 12
var value2;
if (env0_1) {
value2 = environment.__proto__;
(require(5120) /* metro dependency 5120: CollectiblesActionCreators */).maybeFetchCollectiblesProduct(env0_0);
}
}
@@ -0,0 +1,64 @@
/* Metro module 13215; source: modules/collectibles/profile_effects/useProfileEffectSections.tsx; dependencies: [57, 31, 5121, 5145, 632, 5134, 1244, 2] */
function _fun100817(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13405:6, offset: 0x021fab20, 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_effects/useProfileEffectSections.tsx');
exports.default = _default_100818;
exports.Section = {PURCHASE: 'purchase', PREMIUM_PURCHASE: 'premium_purchase', PREVIEW: 'preview'};
exports.NONE_ITEM = {skuId: 'None'};
exports.SHOP_ITEM = {skuId: 'Shop'};
}
function _default_100818() { // fn#100818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13405:295, offset: 0x021fac1b, 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(_fun100821, [value3[0], value3[1], purchases]);
}
function _fun100821() { // fn#100821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13405:460, offset: 0x021facc5, size: 403 bytes, params: 1, frame: 23
var object2;
const value4 = (require(5134) /* metro dependency 5134: CollectiblesUtils */).getProfileEffects(purchases,
env0_1).reduce(_fun100822, {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;
object2.header = Reflect.apply(string, intl, [t['9x1v/p']]);
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;
});
}
@@ -0,0 +1,83 @@
/* Metro module 8475; source: modules/collectibles/profile_effects/utils.tsx; dependencies: [57, 31, 22, 2] */
function _fun67294(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8660:6, offset: 0x01c1d290, size: 157 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 */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/collectibles/profile_effects/utils.tsx');
exports.sortEffectLayers = function(a0) {
return a0.sort(_fun67299);
};
exports.usePotentiallyRandomizedProfileEffect = usePotentiallyRandomizedProfileEffect;
}
function randomizeProfileEffect(a0) { // fn#67295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8660:143, offset: 0x01c1d32d, size: 172 bytes, params: 2, frame: 19
if (a0 == null) {
return a0;
}
let value = require(22) /* metro dependency 22 */;
value = value.cloneDeep(a0);
let value3 = value.effects.reduce(function(a0, a1) {
var r0;
var r1;
var value = a0;
r0 = a1.randomizedSources?.length;
var value3 = 0;
var r4 = r0 ?? value3;
if (r4 > value3) {
if (value3 === value) {
r1 = r4;
} else {
value = global.Math.min(value, r4);
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}, 0) - 1;
const Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
const env0_0 = Reflect.apply(floor, Math, [Math2.random() * (value3 - 0 + 1) + 0]);
value.effects = value.effects.map(_fun67297);
return value;
}
function sortEffectLayers(a0) { // fn#67298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8660:627, offset: 0x01c1d46e, size: 25 bytes, params: 2, frame: 11
return a0.sort(function(a0, a1) {
var zIndex = a0.zIndex;
var value = 0;
return (zIndex ?? value) - (a1.zIndex ?? value);
});
}
function usePotentiallyRandomizedProfileEffect(a0) { // fn#67300, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8660:754, offset: 0x01c1d4b9, size: 134 bytes, params: 2, frame: 21
const binding = env0_3;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [a0]);
const binding2 = env0_2;
const value3 = binding2(value2, 2);
const property = value3[0];
const property2 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, [randomizeProfileEffect(a0)]), 2);
const property3 = value4[0];
const property4 = value4[1];
const moduleValue = require(22) /* metro dependency 22 */;
if (!moduleValue.isEqual(property, a0)) {
property2(a0);
property4(randomizeProfileEffect(a0));
}
return property3;
}
function _fun67297(a0) { // fn#67297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8660:423, offset: 0x01c1d429, size: 69 bytes, params: 2, frame: 4
if (a0.randomizedSources != null && a0.randomizedSources.length > 0) {
a0.src = a0.randomizedSources[env0_0].src;
}
return a0;
}