decord/source/13438__isNativeReflectConstruct.js

226 lines
7.3 KiB
JavaScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 13438
// Function ID: 13439
2026-07-29 08:29:29 +00:00
// Name: _isNativeReflectConstruct
2026-08-08 06:10:11 +00:00
// Dependencies: [41, 42, 93, 95, 98, 19, 17, 21, 13439, 4132, 8876]
2026-07-29 08:29:29 +00:00
2026-08-08 06:10:11 +00:00
// Module 13438 (_isNativeReflectConstruct)
2026-07-29 08:29:29 +00:00
import _classCallCheck from "_classCallCheck";
import _possibleConstructorReturn from "_possibleConstructorReturn";
import _getPrototypeOf from "_getPrototypeOf";
import importDefaultResult from "_createClass";
2026-08-04 21:03:28 +00:00
import "noop";
2026-07-29 08:29:29 +00:00
import get_ActivityIndicator from "get ActivityIndicator";
import { jsx } from "jsxProd";
2026-08-04 21:03:28 +00:00
let c5;
2026-07-29 08:29:29 +00:00
let closure_6;
2026-08-04 21:03:28 +00:00
let error;
const PaginationDot = importDefault;
2026-07-29 08:29:29 +00:00
function _isNativeReflectConstruct() {
try {
const _Boolean = Boolean;
const call = valueOf.call;
const _Reflect = Reflect;
const _Boolean2 = Boolean;
if (typeof call === "unknown") {
let callResult = valueOf();
} else {
callResult = call(constructResult);
}
let closure_0 = !callResult;
function _isNativeReflectConstruct() {
return closure_0;
}
return _isNativeReflectConstruct();
} catch (err) {
}
}
2026-08-04 21:03:28 +00:00
({ Animated: c5, Easing: closure_6, TouchableOpacity: error } = get_ActivityIndicator);
class PaginationDot {
2026-07-29 08:29:29 +00:00
constructor(arg0) {
self = this;
2026-08-04 21:03:28 +00:00
tmp = _isNativeReflectConstruct(this, PaginationDot);
2026-07-29 08:29:29 +00:00
items = [];
items[0] = global;
tmp2 = _isNativeReflectConstruct;
2026-08-04 21:03:28 +00:00
obj = _isNativeReflectConstruct(PaginationDot);
2026-07-29 08:29:29 +00:00
tmp3 = _isNativeReflectConstruct;
if (_isNativeReflectConstruct()) {
tmp5 = globalThis;
_Reflect = Reflect;
constructResult = Reflect.construct(obj, items, tmp2(self).constructor);
} else {
constructResult = obj.apply(self, items);
}
tmp3Result = tmp3(self, constructResult);
2026-08-04 21:03:28 +00:00
obj = { animColor: null, animOpacity: null, animTransform: null };
value = new Animated.Value(0);
obj[0] = value;
value1 = new Animated.Value(0);
obj[1] = value1;
value2 = new Animated.Value(0);
obj[2] = value2;
tmp3Result.state = obj;
2026-07-29 08:29:29 +00:00
return tmp3Result;
}
}
2026-08-04 21:03:28 +00:00
require("_inherits")(PaginationDot, require("noop").PureComponent);
2026-07-29 08:29:29 +00:00
let obj = {
2026-08-04 21:03:28 +00:00
key: "componentDidMount",
value: function componentDidMount() {
const self = this;
if (this.props.active) {
self._animate(1);
2026-07-29 08:29:29 +00:00
}
}
};
let items = [
obj,
{
2026-08-04 21:03:28 +00:00
key: "componentDidUpdate",
value: function componentDidUpdate(active) {
const self = this;
if (active.active !== this.props.active) {
let num = 0;
if (self.props.active) {
num = 1;
}
self._animate(num);
2026-07-29 08:29:29 +00:00
}
}
},
{
2026-08-04 21:03:28 +00:00
key: "_animate",
value: function _animate(arg0) {
let animColor;
let animOpacity;
let animTransform;
let animatedFriction;
let animatedTension;
let props;
let state;
let num = arg0;
if (arg0 === undefined) {
num = 0;
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
({ state, props } = this);
let obj = { toValue: num, duration: props.animatedDuration, isInteraction: false, useNativeDriver: !this._shouldAnimateColor };
let obj1 = RN;
obj = { easing: linear.linear };
({ animColor, animOpacity, animTransform } = state);
({ animatedFriction, animatedTension } = props);
const merged = Object.assign(obj);
const items = [RN.timing(animOpacity, obj), ];
obj = { friction: animatedFriction, tension: animatedTension };
const merged1 = Object.assign(obj);
items[1] = RN.spring(animTransform, obj);
if (this._shouldAnimateColor) {
obj1 = { easing: null };
obj1[0] = linear.linear;
const merged2 = Object.assign(obj);
items.push(obj1.timing(animColor, obj1));
}
obj1.parallel(items).start();
}
},
{
key: "_shouldAnimateColor",
get() {
const props = this.props;
return props.color && props.inactiveColor;
2026-07-29 08:29:29 +00:00
}
},
{
key: "render",
value: function render() {
2026-08-04 21:03:28 +00:00
let PaginationDot;
let active;
let activeOpacity;
let animColor;
let animOpacity;
let animTransform;
let color;
2026-07-29 08:29:29 +00:00
let containerStyle;
2026-08-04 21:03:28 +00:00
let delayPressInDot;
let dependencyMap;
let inactiveColor;
let inactiveScale;
let inactiveStyle;
let style;
let tappable;
({ animColor, animOpacity, animTransform } = this.state);
const props = this.props;
({ active, carouselRef: PaginationDot, containerStyle, index: dependencyMap, style, tappable } = props);
let obj = { opacity: animOpacity.interpolate({ inputRange: [0, 1], outputRange: items }), transform: null };
items = [props.inactiveOpacity, ];
let num = 1;
items[1] = 1;
({ activeOpacity, color, inactiveColor, inactiveStyle, inactiveScale, delayPressInDot } = props);
obj = { scale: animTransform.interpolate({ inputRange: [0, 1], outputRange: items1 }) };
items1 = [inactiveScale, 1];
const items2 = [obj];
obj[1] = items2;
if (this._shouldAnimateColor) {
obj = { backgroundColor: null };
const obj1 = { inputRange: null, outputRange: null };
obj1[0] = [0, 1];
const items3 = [inactiveColor, color];
obj1[1] = items3;
obj[0] = animColor.interpolate(obj1);
let obj2 = obj;
} else {
obj2 = {};
}
2026-08-08 06:10:11 +00:00
const items4 = [PaginationDot(13439).sliderPaginationDotContainer, ];
2026-08-04 21:03:28 +00:00
if (!containerStyle) {
containerStyle = {};
}
items4[1] = containerStyle;
2026-08-08 06:10:11 +00:00
const items5 = [PaginationDot(13439).sliderPaginationDot, , , , ];
2026-08-04 21:03:28 +00:00
if (!style) {
style = {};
}
items5[1] = style;
let obj3 = !active;
if (!active) {
obj3 = inactiveStyle;
}
if (!obj3) {
obj3 = {};
}
items5[2] = obj3;
items5[3] = obj;
items5[4] = obj2;
const obj4 = { accessible: false, style: items4, activeOpacity: null, onPress: null, delayPressIn: null, children: null };
if (tappable) {
num = activeOpacity;
}
obj4[2] = num;
let fn;
if (tappable) {
fn = () => {
try {
let current = ref.current;
if (!current) {
current = ref;
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
current._snapToItem(current._getPositionIndex(closure_1));
} catch (tmp3) {
const _console = console;
console.warn("react-native-snap-carousel | Pagination: `carouselRef` has to be a Carousel ref.\n" + tmp3);
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
};
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
obj4[3] = fn;
obj4[4] = delayPressInDot;
obj4[5] = <RN.View style={items5} />;
return <closure_7 accessible={false} style={items4} activeOpacity={null} onPress={null} delayPressIn={null}>{null}</closure_7>;
2026-07-29 08:29:29 +00:00
}
}
];
2026-08-04 21:03:28 +00:00
const importDefaultResultResult = importDefaultResult(PaginationDot, items);
obj = { inactiveOpacity: require("emptyFunction").number.isRequired, inactiveScale: require("emptyFunction").number.isRequired, active: require("emptyFunction").bool, activeOpacity: require("emptyFunction").number, carouselRef: require("emptyFunction").object, color: require("emptyFunction").string, containerStyle: require("get ColorPropType").ViewPropTypes.style, inactiveColor: require("emptyFunction").string, inactiveStyle: require("get ColorPropType").ViewPropTypes.style, index: require("emptyFunction").number, style: require("get ColorPropType").ViewPropTypes.style, tappable: require("emptyFunction").bool };
2026-07-29 08:29:29 +00:00
importDefaultResultResult.propTypes = obj;
export default importDefaultResultResult;