decord/source/7155_memo.js
2026-08-24 06:08:38 +00:00

199 lines
7.3 KiB
JavaScript

// Module ID: 7155
// Function ID: 7156
// Name: memo
// Dependencies: [32, 19, 21, 7156, 1654, 6995, 6408, 7157]
// Module 7155 (memo)
import noopDefault from "noop" /* 19 */;
import closure_3 from "_slicedToArray" /* 32 */;
import noop from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
const require = arg1;
({ useCallback: c4, useEffect: c5, useMemo: closure_6, useRef: error, useState: closure_8, memo } = noop);
noopDefault;
let closure_10 = { code: "function pnpm_BottomSheetBackdropTsx1(){const{runOnJS,handleOnPress}=this.__closure;runOnJS(handleOnPress)();}" };
let closure_11 = { code: "function pnpm_BottomSheetBackdropTsx2(){const{interpolate,animatedIndex,disappearsOnIndex,appearsOnIndex,opacity,Extrapolation}=this.__closure;return{opacity:interpolate(animatedIndex.value,[-1,disappearsOnIndex,appearsOnIndex],[0,0,opacity],Extrapolation.CLAMP)};}" };
let closure_12 = { code: "function pnpm_BottomSheetBackdropTsx3(){const{animatedIndex,disappearsOnIndex}=this.__closure;return animatedIndex.value<=disappearsOnIndex;}" };
let closure_13 = { code: "function pnpm_BottomSheetBackdropTsx4(shouldDisableTouchability,previous){const{runOnJS,handleContainerTouchability}=this.__closure;if(shouldDisableTouchability===previous){return;}runOnJS(handleContainerTouchability)(shouldDisableTouchability);}" };
const memoResult = memo((animatedIndex) => {
animatedIndex = animatedIndex.animatedIndex;
({ opacity, appearsOnIndex, disappearsOnIndex, enableTouchThrough, pressBehavior } = animatedIndex);
if (pressBehavior === undefined) {
pressBehavior = animatedIndex(onPress[3]).DEFAULT_PRESS_BEHAVIOR;
}
onPress = animatedIndex.onPress;
const style = animatedIndex.style;
({ ViewComponent, children } = animatedIndex);
if (ViewComponent === undefined) {
ViewComponent = pressBehavior(onPress[4]).View;
}
let DEFAULT_ACCESSIBLE = animatedIndex.accessible;
if (DEFAULT_ACCESSIBLE === undefined) {
DEFAULT_ACCESSIBLE = animatedIndex(onPress[3]).DEFAULT_ACCESSIBLE;
}
let DEFAULT_ACCESSIBILITY_ROLE = animatedIndex.accessibilityRole;
if (DEFAULT_ACCESSIBILITY_ROLE === undefined) {
DEFAULT_ACCESSIBILITY_ROLE = animatedIndex(onPress[3]).DEFAULT_ACCESSIBILITY_ROLE;
}
let DEFAULT_ACCESSIBILITY_LABEL = animatedIndex.accessibilityLabel;
if (DEFAULT_ACCESSIBILITY_LABEL === undefined) {
DEFAULT_ACCESSIBILITY_LABEL = animatedIndex(onPress[3]).DEFAULT_ACCESSIBILITY_LABEL;
}
let DEFAULT_ACCESSIBILITY_HINT = animatedIndex.accessibilityHint;
if (DEFAULT_ACCESSIBILITY_HINT === undefined) {
DEFAULT_ACCESSIBILITY_HINT = animatedIndex(onPress[3]).DEFAULT_ACCESSIBILITY_HINT;
}
let snapToIndex;
let close;
let callback;
opacity = undefined;
appearsOnIndex = undefined;
disappearsOnIndex = undefined;
closure_10 = undefined;
closure_11 = undefined;
closure_12 = undefined;
let animatedStyle;
let obj = animatedIndex(onPress[5]);
const bottomSheet = obj.useBottomSheet();
snapToIndex = bottomSheet.snapToIndex;
close = bottomSheet.close;
callback = opacity(false);
if (opacity == null) {
opacity = tmp13(tmp14[3]).DEFAULT_OPACITY;
}
if (appearsOnIndex == null) {
appearsOnIndex = tmp13(tmp14[3]).DEFAULT_APPEARS_ON_INDEX;
}
if (disappearsOnIndex == null) {
disappearsOnIndex = tmp13(tmp14[3]).DEFAULT_DISAPPEARS_ON_INDEX;
}
if (enableTouchThrough == null) {
enableTouchThrough = tmp13(tmp14[3]).DEFAULT_ENABLE_TOUCH_THROUGH;
}
let str = "auto";
if (enableTouchThrough) {
str = "none";
}
const tmp17 = style(appearsOnIndex(str), 2);
closure_10 = tmp17[1];
let items = [snapToIndex, close, disappearsOnIndex, pressBehavior, onPress];
const tmp18 = snapToIndex(() => {
if (onPress != null) {
tmp();
}
if ("close" === pressBehavior) {
close();
} else if ("collapse" === tmp3) {
snapToIndex(disappearsOnIndex);
} else if (typeof tmp3 === "number") {
snapToIndex(tmp3);
}
}, items);
closure_11 = tmp18;
const tmp19 = snapToIndex((arg0) => {
if (ref.current) {
let str = "auto";
if (arg0) {
str = "none";
}
closure_10(str);
const tmp2 = closure_10;
}
}, []);
closure_12 = tmp19;
let items1 = [tmp18];
let tmp13Result = tmp13(tmp14[4]);
class P {
constructor() {
obj = { opacity: null };
obj2 = animatedIndex(onPress[4]);
items = [-1];
items[1] = closure_9;
items[2] = DEFAULT_APPEARS_ON_INDEX;
items1 = [0, 0];
items1[2] = DEFAULT_OPACITY;
obj[0] = obj2.interpolate(animatedIndex.value, items, items1, animatedIndex(onPress[4]).Extrapolation.CLAMP);
return obj;
}
}
obj = { interpolate: tmp13(tmp14[4]).interpolate, animatedIndex, disappearsOnIndex, appearsOnIndex, opacity, Extrapolation: tmp13(tmp14[4]).Extrapolation };
P.__closure = obj;
P.__workletHash = 7085425846204;
P.__initData = closure_11;
const items2 = [animatedIndex, appearsOnIndex, disappearsOnIndex, opacity];
animatedStyle = tmp13Result.useAnimatedStyle(P, items2);
const items3 = [style, animatedStyle];
const tmp16 = appearsOnIndex;
const tmp20 = callback(() => {
const Gesture = animatedIndex(onPress[6]).Gesture;
const fn = function n() {
closure_1_0(closure_1_2[4]).runOnJS(closure_11)();
};
const TapResult = Gesture.Tap();
fn.__closure = { runOnJS: animatedIndex(onPress[4]).runOnJS, handleOnPress: closure_11 };
fn.__workletHash = 10704059633145;
fn.__initData = closure_10;
return TapResult.onEnd(fn);
}, items1);
tmp13Result = tmp13(tmp14[4]);
class H {
constructor() {
return animatedIndex.value <= closure_9;
}
}
H.__closure = { animatedIndex, disappearsOnIndex };
H.__workletHash = 8948110613973;
H.__initData = closure_12;
let fn = function k(arg0, arg1) {
if (arg0 !== arg1) {
animatedIndex(onPress[4]).runOnJS(closure_12)(arg0);
const obj = animatedIndex(onPress[4]);
}
};
obj = { runOnJS: tmp13(tmp14[4]).runOnJS, handleContainerTouchability: tmp19 };
fn.__closure = obj;
fn.__workletHash = 17426135168622;
fn.__initData = animatedStyle;
const items4 = [disappearsOnIndex];
const animatedReaction = tmp13Result.useAnimatedReaction(H, fn, items4);
close(() => {
closure_6.current = true;
return () => {
closure_6.current = false;
};
}, []);
obj1 = {
style: callback(() => {
const items = [animatedIndex(onPress[7]).styles.backdrop, style, animatedStyle];
return items;
}, items3),
pointerEvents: tmp17[0],
accessible: DEFAULT_ACCESSIBLE,
accessibilityRole: DEFAULT_ACCESSIBILITY_ROLE,
accessibilityLabel: DEFAULT_ACCESSIBILITY_LABEL,
accessibilityHint: null,
children: null
};
if (!DEFAULT_ACCESSIBILITY_HINT) {
let str2 = "move";
if (typeof pressBehavior === "string") {
str2 = pressBehavior;
}
const _HermesInternal = HermesInternal;
DEFAULT_ACCESSIBILITY_HINT = "Tap to " + str2 + " the Bottom Sheet";
}
obj1[5] = DEFAULT_ACCESSIBILITY_HINT;
obj1[6] = children;
let tmp25Result = tmp25(ViewComponent, obj1);
if ("none" !== pressBehavior) {
const obj2 = { gesture: null, children: null };
obj2[0] = tmp20;
obj2[1] = tmp25Result;
tmp25Result = tmp25(tmp13(tmp14[6]).GestureDetector, obj2);
}
return tmp25Result;
});
memoResult.displayName = "BottomSheetBackdrop";
export const BottomSheetBackdrop = memoResult;