166 lines
11 KiB
TypeScript
166 lines
11 KiB
TypeScript
/* Metro module 11279; source: modules/chat/native/ChatViewWrapperAnimatedKeyboard.tsx; dependencies: [31, 27, 33, 4017, 4507, 11280, 4504, 5466, 11284, 11286, 6517, 11287, 2] */
|
|
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import UseCustomKeyboardHeight from '../../keyboard/native/useCustomKeyboardHeight.tsx'; /* Metro dependency 5466 */
|
|
import UseChannelSafeAreaHeightSharedValueAndroid from '../../main_tabs_v2/native/channel/useChannelSafeAreaHeightSharedValue.android.tsx'; /* Metro dependency 11280 */
|
|
import UseChannelSafeAreaBottomStyles from '../../main_tabs_v2/native/channel/useChannelSafeAreaBottomStyles.tsx'; /* Metro dependency 11284 */
|
|
import UseChatViewPointerEventsAndroid from './useChatViewPointerEvents.android.tsx'; /* Metro dependency 11286 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
|
|
import * as LayerScopeNativeModule from '../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */
|
|
import * as StickyWrapperNativeModule from '../../../design/components/Sticky/native/StickyWrapper.native.tsx'; /* Metro dependency 11287 */
|
|
|
|
function _fun86120(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11465:6, offset: 0x01f88780, size: 338 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Easing = (ReanimatedRexportModule).Easing;
|
|
const value3 = Easing.bezier(0.2, 0, 0, 1);
|
|
object = {};
|
|
object.duration = (require(4507) /* metro dependency 4507: timingPresets */).timingStandardDuration;
|
|
object.easing = value3;
|
|
object = {code: 'function ChatViewWrapperAnimatedKeyboardTsx1(){const{animatedHeight}=this.__closure;return animatedHeight.get();}'};
|
|
object = {code: 'function ChatViewWrapperAnimatedKeyboardTsx2(height,heightPrev){const{animatedAdjustedMargin,animatedAdjustedMarginPending}=this.__closure;if(heightPrev==null){return;}if(height<heightPrev){animatedAdjustedMargin.set(height);animatedAdjustedMarginPending.set(-1);}else{animatedAdjustedMarginPending.set(height);}}'};
|
|
object = {code: "function ChatViewWrapperAnimatedKeyboardTsx3(){const{animatedAdjustedMargin,withTiming,animatedHeight,INSET_ANIMATION_CONFIG2,animatedAdjustedMarginPending}=this.__closure;return{flex:1,marginTop:animatedAdjustedMargin.get(),transform:[{translateY:withTiming(-animatedHeight.get(),INSET_ANIMATION_CONFIG2,'respect-motion-settings',function(finished){if(!finished){return;}if(animatedAdjustedMarginPending.get()!==-1){animatedAdjustedMargin.set(animatedAdjustedMarginPending.get());animatedAdjustedMarginPending.set(-1);}})}]};}"};
|
|
object = {code: 'function ChatViewWrapperAnimatedKeyboardTsx4(finished){const{animatedAdjustedMarginPending,animatedAdjustedMargin}=this.__closure;if(!finished){return;}if(animatedAdjustedMarginPending.get()!==-1){animatedAdjustedMargin.set(animatedAdjustedMarginPending.get());animatedAdjustedMarginPending.set(-1);}}'};
|
|
const env0_12 = ReactModule.memo(_fun86121);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/chat/native/ChatViewWrapperAnimatedKeyboard.tsx');
|
|
exports.default = ChatViewWrapperAnimatedKeyboard;
|
|
function _fun86121({channelId}) { // fn#86121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11465:1551, offset: 0x01f888d2, size: 124 bytes, params: 2, frame: 17
|
|
return (
|
|
<View
|
|
style={[(UseChannelSafeAreaBottomStyles)(channelId),
|
|
env0_3.useMemo(_fun86122,
|
|
[(UseCustomKeyboardHeight)()])]}
|
|
/>
|
|
);
|
|
function _fun86122() { // fn#86122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11465:1617, offset: 0x01f8894e, size: 38 bytes, params: 1, frame: 3
|
|
const binding = env0_0;
|
|
return {'position': 'absolute', 'bottom': null, 'height': null, 'right': 0, 'left': 0, bottom: -binding,
|
|
height: binding};
|
|
}
|
|
|
|
}
|
|
|
|
function ChatViewWrapperAnimatedKeyboard({channelId, children, stickyHeader, style}) { // fn#86123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11465:1814, offset: 0x01f88974, size: 235 bytes, params: 2, frame: 24
|
|
const value2 = (UseChatViewPointerEventsAndroid)(channelId);
|
|
const value3 = useSafeAreaInsetAnimatedStyle();
|
|
const LayerScope = (LayerScopeNativeModule).LayerScope;
|
|
const StickyWrapper = (StickyWrapperNativeModule).StickyWrapper;
|
|
const View2 = (ReanimatedRexport).View;
|
|
return (
|
|
<LayerScope>
|
|
<StickyWrapper
|
|
header={stickyHeader}
|
|
style={style}
|
|
pointerEvents={value2}
|
|
>
|
|
<View2 style={value3}>
|
|
<View style={style}>
|
|
{children}
|
|
</View>
|
|
{((Component) => <Component channelId={channelId} />)(env0_12)}
|
|
</View2>
|
|
</StickyWrapper>
|
|
</LayerScope>
|
|
);
|
|
function useSafeAreaInsetAnimatedStyle() { // fn#86124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11465:1923, owner: ChatViewWrapperAnimatedKeyboard.useSafeAreaInsetAnimatedStyle, offset: 0x01f88a5f, size: 333 bytes, params: 1, frame: 24
|
|
const value2 = (UseChannelSafeAreaHeightSharedValueAndroid)();
|
|
const useSharedValue = ReanimatedRexportModule.useSharedValue;
|
|
const get = value2.get;
|
|
const value3 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [Reflect.apply(get, value2, [])]);
|
|
const value4 = ReanimatedRexportModule.useSharedValue(-1);
|
|
const useAnimatedReaction = ReanimatedRexportModule.useAnimatedReaction;
|
|
let closure = useSafeAreaInsetAnimatedStyleN;
|
|
closure.__closure = {animatedHeight: value2};
|
|
closure.__workletHash = 9219066704490;
|
|
closure.__initData = env1_8;
|
|
const useSafeAreaInsetAnimatedStyleT2 = useSafeAreaInsetAnimatedStyleT;
|
|
useSafeAreaInsetAnimatedStyleT2.__closure = {animatedAdjustedMargin: value3, animatedAdjustedMarginPending: value4};
|
|
useSafeAreaInsetAnimatedStyleT2.__workletHash = 15141457454312;
|
|
useSafeAreaInsetAnimatedStyleT2.__initData = env1_9;
|
|
Reflect.apply(useAnimatedReaction, ReanimatedRexportModule, [closure, useSafeAreaInsetAnimatedStyleT2]);
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
closure = useSafeAreaInsetAnimatedStyleS;
|
|
object = {animatedAdjustedMargin: value3};
|
|
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
|
object.animatedHeight = value2;
|
|
object.INSET_ANIMATION_CONFIG2 = env1_7;
|
|
object.animatedAdjustedMarginPending = value4;
|
|
closure.__closure = object;
|
|
closure.__workletHash = 7205645695043;
|
|
closure.__initData = env1_10;
|
|
return Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
|
|
function useSafeAreaInsetAnimatedStyleN() { // fn#86125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11465:2088, owner: ChatViewWrapperAnimatedKeyboard.useSafeAreaInsetAnimatedStyle.n, offset: 0x01c3cd06, size: 18 bytes, params: 1, frame: 9
|
|
return env0_0.get();
|
|
}
|
|
|
|
function useSafeAreaInsetAnimatedStyleT(a0, a1) { // fn#86126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11465:2182, owner: ChatViewWrapperAnimatedKeyboard.useSafeAreaInsetAnimatedStyle.t, offset: 0x01f88bac, size: 76 bytes, params: 3, frame: 12
|
|
var binding;
|
|
if (a1 != null) {
|
|
if (a0 < a1) {
|
|
binding = env0_1;
|
|
binding.set(a0);
|
|
binding = env0_2;
|
|
binding.set(-1);
|
|
} else {
|
|
env0_2.set(a0);
|
|
}
|
|
}
|
|
}
|
|
|
|
function useSafeAreaInsetAnimatedStyleS() { // fn#86127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11465:2390, owner: ChatViewWrapperAnimatedKeyboard.useSafeAreaInsetAnimatedStyle.s, offset: 0x01f88bf8, size: 173 bytes, params: 1, frame: 22
|
|
const object = {flex: 1};
|
|
const binding = env0_1;
|
|
let get = binding.get;
|
|
object.marginTop = Reflect.apply(get, binding, []);
|
|
const withTiming = TimingModule.withTiming;
|
|
const binding2 = env0_0;
|
|
get = binding2.get;
|
|
const value3 = -Reflect.apply(get, binding2, []);
|
|
const binding3 = env2_7;
|
|
const sT2 = sT;
|
|
sT2.__closure = {animatedAdjustedMarginPending: env0_2, animatedAdjustedMargin: binding};
|
|
sT2.__workletHash = 16224255032954;
|
|
sT2.__initData = env2_11;
|
|
object.transform = [{translateY: Reflect.apply(withTiming, TimingModule, [value3, binding3,
|
|
'respect-motion-settings', sT2])}];
|
|
return object;
|
|
function sT(a0) { // fn#86128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11465:2509, owner: ChatViewWrapperAnimatedKeyboard.useSafeAreaInsetAnimatedStyle.s.t, offset: 0x01f88ca5, size: 85 bytes, params: 2, frame: 12
|
|
var r0;
|
|
var binding;
|
|
var set;
|
|
var binding2;
|
|
let value = a0;
|
|
if (value) {
|
|
value = environment.__proto__;
|
|
value = env1_2.get();
|
|
value = value !== -1;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
if (r0) {
|
|
value = environment.__proto__;
|
|
binding = env1_1;
|
|
set = binding.set;
|
|
binding2 = env1_2;
|
|
Reflect.apply(set, binding, [binding2.get()]);
|
|
binding2.set(-1);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun86120, 11279, [31, 27, 33, 4017, 4507, 11280, 4504, 5466, 11284, 11286, 6517, 11287,
|
|
2]) /* metro module 11279, dependencies: [31, 27, 33, 4017, 4507, 11280, 4504, 5466, 11284, 11286, 6517, 11287, 2] */;
|