154 lines
5.0 KiB
JavaScript
154 lines
5.0 KiB
JavaScript
// Metro module 1735 (f1736).
|
|
import _classCallCheck from "./_classCallCheck";
|
|
import _createClass from "./_createClass";
|
|
import _possibleConstructorReturn from "./_possibleConstructorReturn";
|
|
import _getPrototypeOf from "./_getPrototypeOf";
|
|
import _inherits from "./_inherits";
|
|
import { Easing } from "./Module1658";
|
|
import * as _Module1678 from "./Module1678";
|
|
import { BaseAnimationBuilder } from "./Module1676";
|
|
let c1453_6;
|
|
let CurvedTransition;
|
|
let env1453 = {};
|
|
env1453[5] = function _isNativeReflectConstruct() {
|
|
let c13190_0;
|
|
try {
|
|
c13190_0 = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
} catch ($e) {}
|
|
const _isNativeReflectConstruct2 = function _isNativeReflectConstruct() {
|
|
return !!c13190_0;
|
|
};
|
|
env1453[5] = _isNativeReflectConstruct2;
|
|
return _isNativeReflectConstruct2();
|
|
};
|
|
c1453_6 = {
|
|
code: "function pnpm_CurvedTransitionTs1(values){const{delayFunction,delay,withTiming,duration,easing,callback}=this.__closure;return{initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight},animations:{originX:delayFunction(delay,withTiming(values.targetOriginX,{duration:duration,easing:easing.easingX})),originY:delayFunction(delay,withTiming(values.targetOriginY,{duration:duration,easing:easing.easingY})),width:delayFunction(delay,withTiming(values.targetWidth,{duration:duration,easing:easing.easingWidth})),height:delayFunction(delay,withTiming(values.targetHeight,{duration:duration,easing:easing.easingHeight}))},callback:callback};}"
|
|
};
|
|
CurvedTransition = function CurvedTransition(...args) {
|
|
_classCallCheck(this, CurvedTransition);
|
|
const r11 = [...args];
|
|
const r10 = _getPrototypeOf(CurvedTransition);
|
|
const _this = _possibleConstructorReturn(this, (0, env1453[5])() ? Reflect.construct(r10, r11, _getPrototypeOf(this).constructor) : r10.apply(this, r11));
|
|
_this.easingXV = Easing.in(Easing.ease);
|
|
_this.easingYV = Easing.out(Easing.ease);
|
|
_this.easingWidthV = Easing.in(Easing.exp);
|
|
_this.easingHeightV = Easing.out(Easing.exp);
|
|
_this.build = () => {
|
|
const delayFunction = _this.getDelayFunction();
|
|
const callbackV = _this.callbackV;
|
|
const delay = _this.getDelay();
|
|
let durationV = _this.durationV;
|
|
if (durationV == null) {
|
|
durationV = 300;
|
|
}
|
|
const duration = durationV;
|
|
const easing = {
|
|
easingX: _this.easingXV,
|
|
easingY: _this.easingYV,
|
|
easingWidth: _this.easingWidthV,
|
|
easingHeight: _this.easingHeightV
|
|
};
|
|
let c29023_4 = easing;
|
|
const n = function n(a0) {
|
|
const initialValues = {
|
|
originX: a0.currentOriginX,
|
|
originY: a0.currentOriginY,
|
|
width: a0.currentWidth,
|
|
height: a0.currentHeight
|
|
};
|
|
const targetOriginX = a0.targetOriginX;
|
|
return {
|
|
initialValues,
|
|
animations: {
|
|
originX: delayFunction(delay, _Module1678.withTiming(targetOriginX, {
|
|
duration,
|
|
easing: c29023_4.easingX
|
|
})),
|
|
originY: delayFunction(delay, _Module1678.withTiming(a0.targetOriginY, {
|
|
duration,
|
|
easing: c29023_4.easingY
|
|
})),
|
|
width: delayFunction(delay, _Module1678.withTiming(a0.targetWidth, {
|
|
duration,
|
|
easing: c29023_4.easingWidth
|
|
})),
|
|
height: delayFunction(delay, _Module1678.withTiming(a0.targetHeight, {
|
|
duration,
|
|
easing: c29023_4.easingHeight
|
|
}))
|
|
},
|
|
callback: callbackV
|
|
};
|
|
};
|
|
n.__closure = {
|
|
delayFunction,
|
|
delay,
|
|
withTiming: _Module1678.withTiming,
|
|
duration,
|
|
easing,
|
|
callback: callbackV
|
|
};
|
|
n.__workletHash = 8113645568730;
|
|
n.__initData = c1453_6;
|
|
return n;
|
|
};
|
|
return _this;
|
|
};
|
|
_inherits(CurvedTransition, BaseAnimationBuilder);
|
|
const r50 = _createClass(CurvedTransition, [{
|
|
key: "easingX",
|
|
value: function easingX(a0) {
|
|
this.easingXV = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "easingY",
|
|
value: function easingY(a0) {
|
|
this.easingYV = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "easingWidth",
|
|
value: function easingWidth(a0) {
|
|
this.easingWidthV = a0;
|
|
return this;
|
|
}
|
|
}, {
|
|
key: "easingHeight",
|
|
value: function easingHeight(a0) {
|
|
this.easingHeightV = a0;
|
|
return this;
|
|
}
|
|
}], [{
|
|
key: "createInstance",
|
|
value: function createInstance() {
|
|
const r3 = {
|
|
__proto__: CurvedTransition.prototype
|
|
};
|
|
const r4 = CurvedTransition.call(r3);
|
|
return r4 instanceof Object ? r4 : r3;
|
|
}
|
|
}, {
|
|
key: "easingX",
|
|
value: function easingX(a0) {
|
|
return this.createInstance().easingX(a0);
|
|
}
|
|
}, {
|
|
key: "easingY",
|
|
value: function easingY(a0) {
|
|
return this.createInstance().easingY(a0);
|
|
}
|
|
}, {
|
|
key: "easingWidth",
|
|
value: function easingWidth(a0) {
|
|
return this.createInstance().easingWidth(a0);
|
|
}
|
|
}, {
|
|
key: "easingHeight",
|
|
value: function easingHeight(a0) {
|
|
return this.createInstance().easingHeight(a0);
|
|
}
|
|
}]);
|
|
r50.presetName = "CurvedTransition";
|
|
export { r50 as CurvedTransition };
|