decord/source/6530__isNativeReflectConstruct.js

208 lines
6.1 KiB
JavaScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 6530
// Function ID: 6531
2026-08-06 08:05:19 +00:00
// Name: _isNativeReflectConstruct
2026-08-24 06:08:38 +00:00
// Dependencies: [41, 42, 93, 95, 96, 98, 6429]
2026-08-06 08:05:19 +00:00
2026-08-24 06:08:38 +00:00
// Module 6530 (_isNativeReflectConstruct)
import _inheritsDefault from "_inherits" /* 98 */;
import PanGesture from "_classCallCheck" /* 41 */;
import closure_1 from "_possibleConstructorReturn" /* 93 */;
import closure_2 from "_getPrototypeOf" /* 95 */;
import closure_3 from "_get" /* 96 */;
import importDefaultResult from "_createClass" /* 42 */;
2026-08-06 08:05:19 +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);
}
2026-08-24 06:08:38 +00:00
closure_0 = !callResult;
_isNativeReflectConstruct = function _isNativeReflectConstruct() {
2026-08-06 08:05:19 +00:00
return closure_0;
2026-08-24 06:08:38 +00:00
};
2026-08-06 08:05:19 +00:00
return _isNativeReflectConstruct();
} catch (err) {
}
}
2026-08-13 07:00:46 +00:00
function changeEventCalculator(translationX, translationX2) {
if (undefined === translationX2) {
let obj = { changeX: null, changeY: null };
({ translationX: obj2[0], translationY: obj2[1] } = translationX);
2026-08-07 06:50:47 +00:00
} else {
2026-08-13 07:00:46 +00:00
obj = { changeX: null, changeY: null };
obj[0] = translationX.translationX - translationX2.translationX;
obj[1] = translationX.translationY - translationX2.translationY;
2026-08-07 06:50:47 +00:00
}
obj = {};
2026-08-13 07:00:46 +00:00
const merged = Object.assign(translationX);
2026-08-07 06:50:47 +00:00
const merged1 = Object.assign(obj);
return obj;
}
changeEventCalculator.__closure = {};
2026-08-13 07:00:46 +00:00
changeEventCalculator.__workletHash = 1947784830943;
changeEventCalculator.__initData = { code: "function changeEventCalculator_Pnpm_panGestureTs1(current,previous){let changePayload;if(previous===undefined){changePayload={changeX:current.translationX,changeY:current.translationY};}else{changePayload={changeX:current.translationX-previous.translationX,changeY:current.translationY-previous.translationY};}return{...current,...changePayload};}" };
class PanGesture {
2026-08-07 06:50:47 +00:00
constructor() {
2026-08-06 08:05:19 +00:00
self = this;
2026-08-13 07:00:46 +00:00
tmp = PanGesture(this, PanGesture);
2026-08-24 06:08:38 +00:00
tmp2 = closure_2;
obj = closure_2(PanGesture);
tmp3 = closure_1;
2026-08-06 08:05:19 +00:00
if (_isNativeReflectConstruct()) {
tmp5 = globalThis;
_Reflect = Reflect;
2026-08-07 06:50:47 +00:00
constructResult = Reflect.construct(obj, [], tmp2(self).constructor);
2026-08-06 08:05:19 +00:00
} else {
2026-08-07 06:50:47 +00:00
constructResult = obj.apply(self, undefined);
2026-08-06 08:05:19 +00:00
}
tmp3Result = tmp3(self, constructResult);
2026-08-13 07:00:46 +00:00
tmp3Result.config = {};
tmp3Result.handlerName = "PanGestureHandler";
2026-08-06 08:05:19 +00:00
return tmp3Result;
}
}
2026-08-24 06:08:38 +00:00
_inheritsDefault(PanGesture, require("_isNativeReflectConstruct").ContinousBaseGesture);
2026-08-06 08:05:19 +00:00
let items = [
2026-08-13 07:00:46 +00:00
{
key: "activeOffsetY",
value: function activeOffsetY(items, items2) {
const self = this;
if (Array.isArray(items)) {
[self.config.activeOffsetYStart, self.config.activeOffsetYEnd] = items;
} else if (items < 0) {
self.config.activeOffsetYStart = items;
} else {
self.config.activeOffsetYEnd = items;
}
return self;
}
},
{
key: "activeOffsetX",
value: function activeOffsetX(items, items2) {
const self = this;
if (Array.isArray(items)) {
[self.config.activeOffsetXStart, self.config.activeOffsetXEnd] = items;
} else if (items < 0) {
self.config.activeOffsetXStart = items;
} else {
self.config.activeOffsetXEnd = items;
}
return self;
}
},
{
key: "failOffsetY",
value: function failOffsetY(GestureDetector, arg1, BottomSheetHandleContainer) {
const self = this;
if (Array.isArray(GestureDetector)) {
[self.config.failOffsetYStart, self.config.failOffsetYEnd] = GestureDetector;
} else if (GestureDetector < 0) {
self.config.failOffsetYStart = GestureDetector;
} else {
self.config.failOffsetYEnd = GestureDetector;
}
return self;
}
},
{
key: "failOffsetX",
value: function failOffsetX(items1) {
const self = this;
if (Array.isArray(items1)) {
[self.config.failOffsetXStart, self.config.failOffsetXEnd] = items1;
} else if (items1 < 0) {
self.config.failOffsetXStart = items1;
} else {
self.config.failOffsetXEnd = items1;
}
return self;
}
},
{
key: "minPointers",
value: function minPointers(minPointers) {
this.config.minPointers = minPointers;
return this;
}
},
{
key: "maxPointers",
value: function maxPointers(maxPointers) {
this.config.maxPointers = maxPointers;
return this;
}
},
{
key: "minDistance",
value: function minDistance(minDist) {
this.config.minDist = minDist;
return this;
}
},
{
key: "minVelocity",
value: function minVelocity(minVelocity) {
this.config.minVelocity = minVelocity;
return this;
}
},
{
key: "minVelocityX",
value: function minVelocityX(minVelocityX) {
this.config.minVelocityX = minVelocityX;
return this;
}
},
{
key: "minVelocityY",
value: function minVelocityY(minVelocityY) {
this.config.minVelocityY = minVelocityY;
return this;
}
},
{
key: "averageTouches",
value: function averageTouches(avgTouches) {
this.config.avgTouches = avgTouches;
return this;
}
},
{
key: "enableTrackpadTwoFingerGesture",
value: function enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture) {
this.config.enableTrackpadTwoFingerGesture = enableTrackpadTwoFingerGesture;
return this;
}
},
{
key: "activateAfterLongPress",
value: function activateAfterLongPress(activateAfterLongPress) {
this.config.activateAfterLongPress = activateAfterLongPress;
return this;
}
},
2026-08-06 08:05:19 +00:00
{
2026-08-07 06:50:47 +00:00
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 === "function") {
fn = (items) => fn.apply(self, items);
}
const items = [arg0];
return fn(items);
2026-08-06 08:05:19 +00:00
}
}
];
2026-08-13 07:00:46 +00:00
export const PanGesture = importDefaultResult(PanGesture, items);