decord/source/__polyfill/01xxx/module_1791.js
github-actions ecf26fc058 chore: update source for alpha 347.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
2026-09-16 07:03:15 +00:00

219 lines
6.1 KiB
JavaScript

// Module ID: 1791
// Function ID: 1792
// Dependencies: [32, 19, 1640, 1745, 1674, 1665, 1668, 1667]
// Module 1791
import findHostInstance from "findHostInstance" /* 1665 */;
import findNodeHandle from "findNodeHandle" /* 1745 */;
import _slicedToArray from "module_32" /* 32 */;
require = fn;
const noop = fn(19);
({ useRef: c3, useState: closure_4 } = noop);
let module_1640 = fn(1640);
module_1640.shouldBeUseWeb();
module_1640 = fn(1640);
module_1640 = module_1640.isIOS();
if (!module_1640) {
module_1640 = fn(1640).isMacOS();
const obj3 = fn(1640);
}
const __initData = { code: "function pnpm_useAnimatedRefTs1(){const{tagOrWrapper,viewName}=this.__closure;const f=function(){return tagOrWrapper.value;};if(viewName){f.viewName=viewName;}return f;}" };
export const useAnimatedRef = module_1640 ? (function useAnimatedRefWeb() {
const f74927 = (getScrollableNode) => {
if (getScrollableNode.getScrollableNode) {
let scrollableNode = getScrollableNode.getScrollableNode();
} else {
scrollableNode = getScrollableNode;
if (getScrollableNode.getNativeScrollRef) {
scrollableNode = getScrollableNode.getNativeScrollRef();
}
}
return scrollableNode;
};
const current = fun(new Map()).current;
closure_2 = fun(-1);
const tmp2 = fun(null);
if (!tmp2.current) {
fun = function fun(map) {
viewName = map;
if (map) {
ref.current = viewName(map);
closure_3.getTag = () => findNodeHandle.findNodeHandle(closure_0);
closure_3.current = map;
if (tag.size) {
tag = undefined;
if (tmp3 != null) {
getTag = tmp3.getTag;
if (getTag != null) {
tag = getTag();
}
}
if (tag == null) {
tag = null;
}
const item = arr.forEach((fn, fn2) => {
if (fn != null) {
fn();
}
const result = first1.set(fn2, fn2(tag));
});
}
arr = tag;
}
return ref.current;
};
fun.observe = (fn) => {
closure_0 = fn;
let tag;
if (getTag != null) {
getTag = getTag.getTag;
if (getTag != null) {
tag = getTag();
}
}
if (tag == null) {
tag = null;
}
const result = first1.set(fn, fn(tag));
return () => {
value = first1.get(closure_0);
if (value != null) {
value();
}
first1.delete(closure_0);
};
};
fun.current = null;
tmp2.current = fun;
}
return tmp2.current;
}) : (function useAnimatedRefNative() {
let viewName = _slicedToArray(closure_4(() => {
let mutable = null;
if (!obj.isFabric()) {
mutable = null;
if (module_1640) {
mutable = first(first1[4]).makeMutable(null);
const tmpResult = first(first1[4]);
}
}
return mutable;
}), 1)[0];
const first1 = _slicedToArray(closure_4(() => first(first1[4]).makeMutable(null)), 1)[0];
closure_129_0 = (viewConfig) => {
if (obj.isFabric()) {
let fn = findHostInstance.getShadowNodeWrapperFromRef;
} else {
fn = (getScrollableNode) => {
if (getScrollableNode.getScrollableNode) {
let scrollableNode = getScrollableNode.getScrollableNode();
} else {
scrollableNode = getScrollableNode;
if (getScrollableNode.getNativeScrollRef) {
scrollableNode = getScrollableNode.getNativeScrollRef();
}
}
return viewName(first1[3]).findNodeHandle(scrollableNode);
};
}
first1.value = fn(viewConfig);
if (first) {
let str;
if (viewConfig != null) {
viewConfig = viewConfig.viewConfig;
if (viewConfig != null) {
str = viewConfig.uiViewClassName;
}
}
if (!str) {
str = "RCTView";
}
tmp3.value = str;
}
return first1.value;
};
closure_129_3 = undefined;
const current2 = getTag(new Map()).current;
closure_129_2 = getTag(-1);
const tmp4 = getTag(null);
if (!tmp4.current) {
function fun(map) {
viewName = map;
if (map) {
ref.current = viewName(map);
closure_3.getTag = () => findNodeHandle.findNodeHandle(closure_0);
closure_3.current = map;
if (tag.size) {
tag = undefined;
if (tmp3 != null) {
getTag = tmp3.getTag;
if (getTag != null) {
tag = getTag();
}
}
if (tag == null) {
tag = null;
}
const item = arr.forEach((fn, fn2) => {
if (fn != null) {
fn();
}
const result = first1.set(fn2, fn2(tag));
});
}
arr = tag;
}
return ref.current;
}
closure_129_3 = fun;
fun.observe = (fn) => {
closure_0 = fn;
let tag;
if (getTag != null) {
getTag = getTag.getTag;
if (getTag != null) {
tag = getTag();
}
}
if (tag == null) {
tag = null;
}
const result = first1.set(fn, fn(tag));
return () => {
value = first1.get(closure_0);
if (value != null) {
value();
}
first1.delete(closure_0);
};
};
fun.current = null;
tmp4.current = fun;
}
const current = tmp4.current;
const shareableMappingCache = viewName(first1[6]).shareableMappingCache;
if (!shareableMappingCache.get(current)) {
const obj = { __init: null };
let fn = function n() {
const fn = function f() {
return value.value;
};
if (viewName) {
fn.viewName = viewName;
}
return fn;
};
const obj2 = { tagOrWrapper: first1, viewName };
fn.__closure = obj2;
fn.__workletHash = 5138727370224;
fn.__initData = __initData;
obj.__init = fn;
const shareableCloneRecursive = tmp5(tmp6[7]).makeShareableCloneRecursive(obj);
const shareableMappingCache2 = tmp5(tmp6[6]).shareableMappingCache;
let result = shareableMappingCache2.set(current, shareableCloneRecursive);
const tmp5Result = tmp5(tmp6[7]);
}
return current;
});