decord/source/modules/keyboard/native/useAndroidOrientationSheetResync.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

75 lines
2.5 KiB
TypeScript

// Module ID: 12085
// Function ID: 12086
// Name: useAndroidOrientationSheetResync
// Dependencies: [19, 1115, 2]
// Exports: default
// Module 12085 (useAndroidOrientationSheetResync)
import closure_2 from "noop" /* 19 */;
const require = arg1;
let result = require("set").fileFinishedImporting("modules/keyboard/native/useAndroidOrientationSheetResync.tsx");
export default function useAndroidOrientationSheetResync(animatedIndex) {
animatedIndex = animatedIndex.animatedIndex;
let bottomSheetRef = animatedIndex.bottomSheetRef;
const containerHeight = animatedIndex.containerHeight;
const isYeeted = animatedIndex.isYeeted;
const snapPoints = animatedIndex.snapPoints;
closure_4 = undefined;
let num;
c6 = undefined;
closure_4 = containerHeight.useRef(false);
num = 0;
if (animatedIndex.forceMaxHeight) {
num = 1;
}
let _Number = Number;
if (Array.isArray(snapPoints)) {
let first = snapPoints[num];
if (first == null) {
first = snapPoints[0];
}
let _NumberResult = _Number(first);
} else {
_NumberResult = _Number(snapPoints);
}
c6 = _NumberResult;
const items = [animatedIndex, bottomSheetRef, containerHeight, isYeeted, num, _NumberResult];
const layoutEffect = containerHeight.useLayoutEffect(() => {
if (!isYeeted) {
if (obj.isAndroid()) {
if (ref.current) {
const _Number = Number;
const NumberResult = Number(containerHeight);
const _Number2 = Number;
if (Number.isFinite(NumberResult)) {
const _Number3 = Number;
if (Number.isFinite(c6)) {
const _Math = Math;
const bound = Math.max(0, NumberResult - tmp7);
let result = bound.set(num);
let current = bottomSheetRef.current;
if (current != null) {
current.setToIndex(tmp10, bound);
}
const _requestAnimationFrame = requestAnimationFrame;
bottomSheetRef = requestAnimationFrame(function apply() {
const result = bound.set(closure_1_5);
const current = ref.current;
if (current != null) {
current.setToIndex(closure_1_5, bound);
}
});
return () => cancelAnimationFrame(closure_1);
}
tmp7 = c6;
}
} else {
tmp3.current = true;
}
}
obj = animatedIndex(bottomSheetRef[1]);
}
}, items);
};