96 lines
3.1 KiB
JavaScript
96 lines
3.1 KiB
JavaScript
// Module ID: 5315
|
|
// Function ID: 5316
|
|
// Name: _isNativeReflectConstruct
|
|
// Dependencies: [41, 42, 93, 95, 96, 98, 5316]
|
|
|
|
// Module 5315 (_isNativeReflectConstruct)
|
|
import HoverGesture from "_classCallCheck";
|
|
import _possibleConstructorReturn from "_possibleConstructorReturn";
|
|
import _getPrototypeOf from "_getPrototypeOf";
|
|
import _get from "_get";
|
|
import importDefaultResult from "_createClass";
|
|
|
|
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) {
|
|
}
|
|
}
|
|
function changeEventCalculator(arg0, arg1) {
|
|
if (undefined === arg1) {
|
|
let obj = { changeX: null, changeY: null };
|
|
({ x: obj2[0], y: obj2[1] } = arg0);
|
|
} else {
|
|
obj = { changeX: null, changeY: null };
|
|
obj[0] = arg0.x - arg1.x;
|
|
obj[1] = arg0.y - arg1.y;
|
|
}
|
|
obj = {};
|
|
const merged = Object.assign(arg0);
|
|
const merged1 = Object.assign(obj);
|
|
return obj;
|
|
}
|
|
changeEventCalculator.__closure = {};
|
|
changeEventCalculator.__workletHash = 2074844346342;
|
|
changeEventCalculator.__initData = { code: "function changeEventCalculator_Pnpm_hoverGestureTs1(current,previous){let changePayload;if(previous===undefined){changePayload={changeX:current.x,changeY:current.y};}else{changePayload={changeX:current.x-previous.x,changeY:current.y-previous.y};}return{...current,...changePayload};}" };
|
|
class HoverGesture {
|
|
constructor() {
|
|
self = this;
|
|
tmp = HoverGesture(this, HoverGesture);
|
|
tmp2 = _isNativeReflectConstruct;
|
|
obj = _isNativeReflectConstruct(HoverGesture);
|
|
tmp3 = _isNativeReflectConstruct;
|
|
if (_isNativeReflectConstruct()) {
|
|
tmp5 = globalThis;
|
|
_Reflect = Reflect;
|
|
constructResult = Reflect.construct(obj, [], tmp2(self).constructor);
|
|
} else {
|
|
constructResult = obj.apply(self, undefined);
|
|
}
|
|
tmp3Result = tmp3(self, constructResult);
|
|
tmp3Result.config = {};
|
|
tmp3Result.handlerName = "HoverGestureHandler";
|
|
return tmp3Result;
|
|
}
|
|
}
|
|
require("_inherits")(HoverGesture, require("_isNativeReflectConstruct").ContinousBaseGesture);
|
|
let items = [
|
|
{
|
|
key: "effect",
|
|
value: function effect(hoverEffect) {
|
|
this.config.hoverEffect = hoverEffect;
|
|
return this;
|
|
}
|
|
},
|
|
{
|
|
key: "onChange",
|
|
value: function onChange(arg0) {
|
|
this.handlers.changeEventCalculator = changeEventCalculator;
|
|
const self = this;
|
|
let fn;
|
|
fn = callback2(callback(self.prototype), "onChange", this);
|
|
if (typeof fn !== "disabledUntil") {
|
|
fn = (items) => fn.apply(self, items);
|
|
}
|
|
const items = [arg0];
|
|
return fn(items);
|
|
}
|
|
}
|
|
];
|
|
|
|
export const HoverEffect = { NONE: 0, [0]: "NONE", LIFT: 1, [1]: "LIFT", HIGHLIGHT: 2, [2]: "HIGHLIGHT" };
|
|
export const hoverGestureHandlerProps = ["hoverEffect"];
|
|
export const HoverGesture = importDefaultResult(HoverGesture, items);
|