129 lines
7.2 KiB
TypeScript
129 lines
7.2 KiB
TypeScript
/* Metro module 10128; source: design/components/LottieIcon/native/LottieIcon.tsx; dependencies: [31, 27, 33, 697, 6817, 3875, 3860, 6761, 2] */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as UseTokenModule from '../../../tokens/native/useToken.tsx'; /* Metro dependency 3860 */
|
|
import * as AccessibilityPreferencesContextModule from '../../../../external/discord_common/js/packages/design/components/AccessibilityPreferencesContext/AccessibilityPreferencesContext.tsx'; /* Metro dependency 3875 */
|
|
import * as IconSizeModule from '../../Icon/IconSize.tsx'; /* Metro dependency 6817 */
|
|
|
|
function _fun79035(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:6, offset: 0x01e420a3, size: 174 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
value = value.forwardRef(_fun79036);
|
|
(FileImportTrackerModule).fileFinishedImporting('design/components/LottieIcon/native/LottieIcon.tsx');
|
|
exports.LottieIcon = value;
|
|
function _fun79036({animation, dotLottie, size, color = importDefault(dependencyMap[3]).colors.INTERACTIVE_TEXT_DEFAULT, opacity, markers, layers, width, height, autoPlay, useLottieDefaultColors}, a1) { // fn#79036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:151, offset: 0x01e42151, size: 730 bytes, params: 3, frame: 33
|
|
size = size === undefined ? 'md' : size;
|
|
opacity = opacity === undefined ? 1 : opacity;
|
|
const ICON_SIZE = (IconSizeModule).ICON_SIZE;
|
|
const property = ICON_SIZE[size];
|
|
const value6 = markers.find(function({name}) {
|
|
return name === animation;
|
|
});
|
|
const start2 = value6.start;
|
|
const start22 = start2;
|
|
const value7 = start2 + value6.duration;
|
|
const value8 = markers.find(function(a0) {
|
|
return a0.name === 'easteregg';
|
|
});
|
|
const r16 = value8?.start ?? -1;
|
|
const value10 = r16 + (value8?.duration ?? -1);
|
|
let binding = start22;
|
|
const value11 = binding.useRef(null);
|
|
const useContext = binding.useContext;
|
|
const AccessibilityPreferencesContext = (AccessibilityPreferencesContextModule).AccessibilityPreferencesContext;
|
|
const enabled = Reflect.apply(useContext, binding, [AccessibilityPreferencesContext]).reducedMotion.enabled;
|
|
const value12 = size === 'custom';
|
|
const object = {};
|
|
object.width = value12 ? width : property;
|
|
object.height = value12 ? height : property;
|
|
const value13 = (UseTokenModule).useToken(color);
|
|
binding = start22;
|
|
const value14 = binding.useMemo(_fun79039, [value13, layers]);
|
|
const value15 = binding.useCallback(_fun79041, [enabled, start2, value7, r16, value10]);
|
|
binding.useImperativeHandle(a1, function() {
|
|
return {play: _fun79043};
|
|
}, [value15]);
|
|
return (
|
|
<View style={object}>
|
|
{((Component) => <Component ref={value11} source={dotLottie} colorFilters={useLottieDefaultColors ? undefined : value14} hardwareAccelerationAndroid loop={false} onAnimationLoaded={binding.useCallback(_fun79044,
|
|
[start2, autoPlay, value15])} resizeMode="cover" style={[object,
|
|
{opacity: opacity}]} />)(importDefault(6761) /* metro dependency 6761 */)}
|
|
</View>
|
|
);
|
|
function _fun79039() { // fn#79039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:712, offset: 0x01e4243f, size: 43 bytes, params: 1, frame: 12
|
|
return env0_9 != null ? layers.map(_fun79040) : undefined;
|
|
function _fun79040(a0) { // fn#79040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:731, offset: 0x01e4246a, size: 25 bytes, params: 2, frame: 2
|
|
return {keypath: a0, color: env1_9};
|
|
}
|
|
|
|
}
|
|
|
|
function _fun79041() { // fn#79041, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:790, offset: 0x01e42483, size: 164 bytes, params: 1, frame: 14
|
|
var current;
|
|
var play;
|
|
var binding;
|
|
const Math = global.Math;
|
|
let value = Math.random();
|
|
value = value < 0.05;
|
|
if (enabled) {
|
|
current = env0_7.current;
|
|
if (current != null) {
|
|
play = current.play;
|
|
binding = ReactNativeModule.View;
|
|
Reflect.apply(play, current, [binding, binding]);
|
|
}
|
|
} else if (value) {
|
|
if (JsxRuntimeModule.jsx >= 0) {
|
|
current = env0_7.current;
|
|
if (current != null) {
|
|
current.play(JsxRuntimeModule.jsx, env0_6);
|
|
}
|
|
} else {
|
|
current = env0_7.current;
|
|
if (current != null) {
|
|
current.play(start, ReactNativeModule.View);
|
|
}
|
|
}
|
|
} else {
|
|
current = env0_7.current;
|
|
if (current != null) {
|
|
current.play(start, ReactNativeModule.View);
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun79042() { // fn#79042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:1000, offset: 0x01e42527, size: 18 bytes, params: 1, frame: 2
|
|
return {play: play_79043};
|
|
function play_79043() { // fn#79043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:1011, offset: 0x01e42539, size: 15 bytes, params: 1, frame: 9
|
|
return env1_10();
|
|
}
|
|
|
|
}
|
|
|
|
function _fun79044() { // fn#79044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10314:1048, offset: 0x01e42548, size: 57 bytes, params: 1, frame: 13
|
|
var current;
|
|
var play;
|
|
var startBinding;
|
|
if (autoPlay) {
|
|
env0_10();
|
|
} else {
|
|
current = env0_7.current;
|
|
if (current != null) {
|
|
play = current.play;
|
|
startBinding = start;
|
|
Reflect.apply(play, current, [startBinding, startBinding]);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun79035, 10128, [31, 27, 33, 697, 6817, 3875, 3860, 6761,
|
|
2]) /* metro module 10128, dependencies: [31, 27, 33, 697, 6817, 3875, 3860, 6761, 2] */;
|