120 lines
5.2 KiB
TypeScript
120 lines
5.2 KiB
TypeScript
/* Metro module 6760; source: components_native/common/LottieAnimationView.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 33, 6761, 2] */
|
|
function _fun53258(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:6, offset: 0x013439ef, size: 303 bytes, params: 8, frame: 19
|
|
const env0_2 = ['source', 'style', 'collapsable'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(29) /* metro dependency 29 */;
|
|
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const env0_9 = (require(27) /* metro dependency 27 */).View;
|
|
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
|
|
const PureComponent = value.PureComponent;
|
|
value = _fun53262(PureComponent);
|
|
value.defaultProps = {'autoPlay': true, 'loop': true, 'collapsable': false};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/common/LottieAnimationView.tsx');
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_53259() { // fn#53259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:236, offset: 0x01343b1e, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_53259_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun53262(a0) { // fn#53262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:435, offset: 0x01343b7c, size: 160 bytes, params: 2, frame: 16
|
|
const closure = LottieAnimationView;
|
|
env0_8(closure, a0);
|
|
return env0_5(closure, [{key: 'play', value: function() {
|
|
if (this.animation != null) {
|
|
this.animation.play();
|
|
}
|
|
}}, {key: 'reset', value: function() {
|
|
if (this.animation != null) {
|
|
this.animation.reset();
|
|
}
|
|
}}, {key: 'pause', value: function() {
|
|
if (this.animation != null) {
|
|
this.animation.pause();
|
|
}
|
|
}}, {key: 'resume', value: function() {
|
|
if (this.animation != null) {
|
|
this.animation.resume();
|
|
}
|
|
}}, {key: 'render', value: value_53269}]);
|
|
}
|
|
|
|
function LottieAnimationView(a0) { // fn#53263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:447, offset: 0x01343c1c, size: 151 bytes, params: 2, frame: 20
|
|
var r0;
|
|
var Reflect;
|
|
let value = copyRestArgs(0, undefined);
|
|
let binding = env1_4;
|
|
binding(this, LottieAnimationView);
|
|
const items2 = [];
|
|
arraySpread(items2, value, 0, items2);
|
|
value = env1_7(LottieAnimationView);
|
|
binding = env1_6;
|
|
if (_isNativeReflectConstruct_53259()) {
|
|
Reflect = global.Reflect;
|
|
value = Reflect.construct(value, items2, env1_7(this).constructor);
|
|
r0 = value;
|
|
} else {
|
|
value = value.apply(this, items2);
|
|
r0 = value;
|
|
}
|
|
value = binding(this, r0);
|
|
value.animation = null;
|
|
value.setRef = setRef;
|
|
return value;
|
|
}
|
|
|
|
function value_53269() { // fn#53269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:1120, offset: 0x01343d53, size: 226 bytes, params: 1, frame: 22
|
|
const props = this.props;
|
|
const source = props.source;
|
|
const style = props.style;
|
|
const collapsable = props.collapsable;
|
|
const value = environment.__proto__;
|
|
const binding = env1_3;
|
|
const value2 = undefined;
|
|
const value3 = binding(props, env1_2);
|
|
const r9 = value2 === (typeof source !== 'object' || source.uri ? value2 : global.JSON.stringify(source)) ? value2 : {aspectRatio: source.w / source.h};
|
|
return (
|
|
<View style={[r9, style]} collapsable={collapsable}>
|
|
{((Component) => <Component ref={this.setRef} source={source} style={[r9,
|
|
style]} {...value3} />)(importDefault(6761) /* metro dependency 6761 */)}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function LottieAnimationViewSetRef(a0) { // fn#53264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6938:716, owner: LottieAnimationView.setRef, offset: 0x01343cb3, size: 20 bytes, params: 2, frame: 2
|
|
env0_0.animation = a0;
|
|
}
|
|
|