61 lines
4.5 KiB
React
61 lines
4.5 KiB
React
/* Metro module 6334; source: unknown; dependencies: [31, 6282, 1610, 6281, 6278] */
|
|
function _fun49807(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6512:6, offset: 0x01209473, size: 113 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const memo = (require(31) /* metro dependency 31 */).memo;
|
|
object = {code: 'function pnpm_BottomSheetFooterContainerTsx1(){const{animatedHandleHeight,INITIAL_HANDLE_HEIGHT,animatedKeyboardHeightInContainer,animatedContainerHeight,animatedPosition,animatedKeyboardState,animatedFooterHeight,KEYBOARD_STATE}=this.__closure;const handleHeight=animatedHandleHeight.get();if(handleHeight===INITIAL_HANDLE_HEIGHT){return 0;}const keyboardHeight=animatedKeyboardHeightInContainer.get();const containerHeight=animatedContainerHeight.get();const position=animatedPosition.get();const keyboardState=animatedKeyboardState.get();const footerHeight=animatedFooterHeight.get();let footerTranslateY=Math.max(0,containerHeight-position);if(keyboardState===KEYBOARD_STATE.SHOWN){footerTranslateY=footerTranslateY-keyboardHeight;}footerTranslateY=footerTranslateY-footerHeight-handleHeight;return footerTranslateY;}'};
|
|
const value = memo(BottomSheetFooterContainerComponent);
|
|
value.displayName = 'BottomSheetFooterContainer';
|
|
exports.BottomSheetFooterContainer = value;
|
|
}
|
|
|
|
function BottomSheetFooterContainerComponent({renderFooter}) { // fn#49808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6512:949, offset: 0x012094e4, size: 287 bytes, params: 2, frame: 26
|
|
const value2 = (require(6282) /* metro dependency 6282 */).useBottomSheetInternal();
|
|
const animatedContainerHeight = value2.animatedContainerHeight;
|
|
const animatedHandleHeight = value2.animatedHandleHeight;
|
|
const animatedFooterHeight = value2.animatedFooterHeight;
|
|
const env0_2 = animatedFooterHeight;
|
|
const animatedPosition = value2.animatedPosition;
|
|
const animatedKeyboardState = value2.animatedKeyboardState;
|
|
const animatedKeyboardHeightInContainer = value2.animatedKeyboardHeightInContainer;
|
|
const moduleValue2 = require(1610) /* metro dependency 1610 */;
|
|
const useDerivedValue = moduleValue2.useDerivedValue;
|
|
const closure = pnpm_BottomSheetFooterContainerTsx1;
|
|
const object = {animatedHandleHeight: animatedHandleHeight};
|
|
const INITIAL_HANDLE_HEIGHT = (require(6281) /* metro dependency 6281 */).INITIAL_HANDLE_HEIGHT;
|
|
object.INITIAL_HANDLE_HEIGHT = INITIAL_HANDLE_HEIGHT;
|
|
object.animatedKeyboardHeightInContainer = animatedKeyboardHeightInContainer;
|
|
object.animatedContainerHeight = animatedContainerHeight;
|
|
object.animatedPosition = animatedPosition;
|
|
object.animatedKeyboardState = animatedKeyboardState;
|
|
object.animatedFooterHeight = animatedFooterHeight;
|
|
const KEYBOARD_STATE = (require(6278) /* metro dependency 6278 */).KEYBOARD_STATE;
|
|
object.KEYBOARD_STATE = KEYBOARD_STATE;
|
|
closure.__closure = object;
|
|
closure.__workletHash = 8297656659240;
|
|
closure.__initData = env0_2;
|
|
return renderFooter({animatedFooterPosition: Reflect.apply(useDerivedValue, moduleValue2, [closure,
|
|
[animatedKeyboardHeightInContainer, animatedContainerHeight, animatedPosition, animatedKeyboardState,
|
|
animatedFooterHeight, animatedHandleHeight]])});
|
|
}
|
|
|
|
function pnpm_BottomSheetFooterContainerTsx1() { // fn#49809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6512:1279, owner: BottomSheetFooterContainerComponent.pnpm_BottomSheetFooterContainerTsx1, offset: 0x01209603, size: 201 bytes, params: 1, frame: 19
|
|
const value2 = animatedHandleHeight.get();
|
|
const INITIAL_HANDLE_HEIGHT = (require(6281) /* metro dependency 6281 */).INITIAL_HANDLE_HEIGHT;
|
|
if (value2 === INITIAL_HANDLE_HEIGHT) {
|
|
return 0;
|
|
}
|
|
const value4 = animatedKeyboardHeightInContainer.get();
|
|
const value5 = animatedContainerHeight.get();
|
|
const value6 = animatedPosition.get();
|
|
const value7 = animatedKeyboardState.get();
|
|
const value = animatedFooterHeight.get();
|
|
const Math = global.Math;
|
|
const value8 = Math.max(0, value5 - value6);
|
|
const KEYBOARD_STATE = (require(6278) /* metro dependency 6278 */).KEYBOARD_STATE;
|
|
const SHOWN = KEYBOARD_STATE.SHOWN;
|
|
return (value7 !== SHOWN ? value8 : value8 - value4) - value - value2;
|
|
}
|
|
|