decord/source/1736_getComponentOrScrollable.js

149 lines
4.5 KiB
JavaScript
Raw Normal View History

2026-07-20 16:05:17 +00:00
// Module ID: 1736
2026-07-25 08:10:48 +00:00
// Function ID: 19465
2026-07-20 16:05:17 +00:00
// Name: getComponentOrScrollable
2026-07-23 10:11:24 +00:00
// Dependencies: [57, 31, 1585, 1690, 1619, 1610, 1613, 1612]
2026-07-20 16:05:17 +00:00
// Module 1736 (getComponentOrScrollable)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import result from "result";
import isJest from "isJest";
import isJest from "isJest";
let closure_3;
let closure_4;
const require = arg1;
2026-07-20 16:05:17 +00:00
function getComponentOrScrollable(getScrollableNode) {
if (getScrollableNode.getScrollableNode) {
let scrollableNode = getScrollableNode.getScrollableNode();
} else {
scrollableNode = getScrollableNode;
if (getScrollableNode.getNativeScrollRef) {
scrollableNode = getScrollableNode.getNativeScrollRef();
}
}
return scrollableNode;
}
function useAnimatedRefBase(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
let current = fun(new Map()).current;
let _slicedToArray = fun(-1);
2026-07-20 16:05:17 +00:00
const tmp2 = fun(null);
if (!tmp2.current) {
2026-07-23 10:11:24 +00:00
fun = function fun(map) {
const callback = map;
2026-07-20 16:05:17 +00:00
if (map) {
2026-07-23 10:11:24 +00:00
ref.current = callback(map);
fun.getTag = () => map(current[3]).findNodeHandle(map);
2026-07-20 16:05:17 +00:00
fun.current = map;
if (current.size) {
let tag;
if (null != fun) {
if (null != fun.getTag) {
tag = fun.getTag();
}
}
let tmp11 = null;
if (null != tag) {
tmp11 = tag;
}
2026-07-23 10:11:24 +00:00
current = tmp11;
2026-07-20 16:05:17 +00:00
const item = current.forEach((arg0, arg1) => {
if (null != arg0) {
arg0();
}
const result = tmp11.set(arg1, arg1(tmp11));
});
}
}
return ref.current;
2026-07-23 10:11:24 +00:00
};
2026-07-20 16:05:17 +00:00
fun.observe = (arg0) => {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
let tag;
if (null != fun) {
if (null != fun.getTag) {
tag = fun.getTag();
}
}
let tmp4 = null;
if (null != tag) {
tmp4 = tag;
}
const result = current.set(arg0, arg0(tmp4));
return () => {
2026-07-23 10:11:24 +00:00
const value = outer1_1.get(closure_0);
2026-07-20 16:05:17 +00:00
if (null != value) {
value();
}
2026-07-23 10:11:24 +00:00
outer1_1.delete(closure_0);
2026-07-20 16:05:17 +00:00
};
};
fun.current = null;
tmp2.current = fun;
}
return tmp2.current;
}
2026-07-23 10:11:24 +00:00
({ useRef: closure_3, useState: closure_4 } = result);
isJest = isJest.shouldBeUseWeb();
isJest = isJest.isIOS();
if (!isJest) {
isJest = require("isJest").isMacOS();
const obj3 = require("isJest");
2026-07-20 16:05:17 +00:00
}
let closure_6 = { code: "function pnpm_useAnimatedRefTs1(){const{tagOrWrapper,viewName}=this.__closure;const f=function(){return tagOrWrapper.value;};if(viewName){f.viewName=viewName;}return f;}" };
2026-07-23 10:11:24 +00:00
export const useAnimatedRef = isJest ? (function useAnimatedRefWeb() {
return useAnimatedRefBase((arg0) => outer1_7(arg0));
}) : (function useAnimatedRefNative() {
2026-07-20 16:05:17 +00:00
const first = callback(callback2(() => {
let mutable = null;
if (!obj.isFabric()) {
mutable = null;
2026-07-23 10:11:24 +00:00
if (outer1_5) {
2026-07-20 16:05:17 +00:00
mutable = first(first1[4]).makeMutable(null);
const obj2 = first(first1[4]);
}
}
return mutable;
}), 1)[0];
const first1 = callback(callback2(() => first(first1[4]).makeMutable(null)), 1)[0];
2026-07-23 10:11:24 +00:00
let tmp3 = useAnimatedRefBase((viewConfig) => {
2026-07-20 16:05:17 +00:00
if (obj.isFabric()) {
let fn = first(first1[5]).getShadowNodeWrapperFromRef;
} else {
2026-07-23 10:11:24 +00:00
fn = (viewConfig) => first(first1[3]).findNodeHandle(outer2_7(viewConfig));
2026-07-20 16:05:17 +00:00
}
first1.value = fn(viewConfig);
if (first) {
let str;
if (null != viewConfig) {
viewConfig = viewConfig.viewConfig;
if (null != viewConfig) {
str = viewConfig.uiViewClassName;
}
}
if (!str) {
str = "RCTView";
}
first.value = str;
const tmp3 = first;
}
return first1.value;
});
2026-07-23 10:11:24 +00:00
const shareableMappingCache = first(first1[6]).shareableMappingCache;
2026-07-20 16:05:17 +00:00
if (!shareableMappingCache.get(tmp3)) {
2026-07-23 10:11:24 +00:00
let obj = first(first1[7]);
2026-07-20 16:05:17 +00:00
obj = {};
/* worklet (recovered source) */ function pnpm_useAnimatedRefTs1(){const{tagOrWrapper,viewName}=this.__closure;const f=function(){return tagOrWrapper.value;};if(viewName){f.viewName=viewName;}return f;}
obj = { tagOrWrapper: first1, viewName: first };
pnpm_useAnimatedRefTs1.__closure = obj;
pnpm_useAnimatedRefTs1.__workletHash = 5138727370224;
pnpm_useAnimatedRefTs1.__initData = closure_6;
obj.__init = pnpm_useAnimatedRefTs1;
const shareableCloneRecursive = obj.makeShareableCloneRecursive(obj);
2026-07-23 10:11:24 +00:00
const shareableMappingCache2 = first(first1[6]).shareableMappingCache;
2026-07-20 16:05:17 +00:00
const result = shareableMappingCache2.set(tmp3, shareableCloneRecursive);
}
return tmp3;
2026-07-23 10:11:24 +00:00
});