153 lines
7.9 KiB
React
153 lines
7.9 KiB
React
/* Metro module 1765; source: unknown; dependencies: [1755, 1757] */
|
|
function _fun19478(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#19478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1892:6, offset: 0x00eab3e7, size: 82 bytes, params: 8, frame: 16
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
object = {code: "function pnpm_useAnimatedScrollHandlerTs1(event){const{scrollHandlers,context}=this.__closure;const{onScroll:onScroll,onBeginDrag:onBeginDrag,onEndDrag:onEndDrag,onMomentumBegin:onMomentumBegin,onMomentumEnd:onMomentumEnd}=scrollHandlers;if(onScroll&&event.eventName.endsWith('onScroll')){onScroll(event,context);}else if(onBeginDrag&&event.eventName.endsWith('onScrollBeginDrag')){onBeginDrag(event,context);}else if(onEndDrag&&event.eventName.endsWith('onScrollEndDrag')){onEndDrag(event,context);}else if(onMomentumBegin&&event.eventName.endsWith('onMomentumScrollBegin')){onMomentumBegin(event,context);}else if(onMomentumEnd&&event.eventName.endsWith('onMomentumScrollEnd')){onMomentumEnd(event,context);}}"};
|
|
exports.useAnimatedScrollHandler = useAnimatedScrollHandler;
|
|
}
|
|
|
|
function useAnimatedScrollHandler(a0, a1) { // fn#19479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1892:846, offset: 0x00eab439, size: 281 bytes, params: 3, frame: 20
|
|
const value = a0;
|
|
const r2 = typeof value !== 'function' ? value : {onScroll: value};
|
|
const {context, doDependenciesDiffer} = (require(1755) /* metro dependency 1755 */).useHandler(r2, a1);
|
|
const items = ['onScroll'];
|
|
if (r2.onBeginDrag !== undefined) {
|
|
items.push('onScrollBeginDrag');
|
|
}
|
|
if (r2.onEndDrag !== undefined) {
|
|
items.push('onScrollEndDrag');
|
|
}
|
|
if (r2.onMomentumBegin !== undefined) {
|
|
items.push('onMomentumScrollBegin');
|
|
}
|
|
if (r2.onMomentumEnd !== undefined) {
|
|
items.push('onMomentumScrollEnd');
|
|
}
|
|
const moduleValue2 = require(1757) /* metro dependency 1757 */;
|
|
const useEvent = moduleValue2.useEvent;
|
|
const closure = pnpm_useAnimatedScrollHandlerTs1;
|
|
closure.__closure = {scrollHandlers: r2, context: context};
|
|
closure.__workletHash = 480432859268;
|
|
closure.__initData = env0_2;
|
|
return Reflect.apply(useEvent, moduleValue2, [closure, items, doDependenciesDiffer]);
|
|
}
|
|
|
|
function pnpm_useAnimatedScrollHandlerTs1(a0) { // fn#19480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1892:1251, owner: useAnimatedScrollHandler.pnpm_useAnimatedScrollHandlerTs1, offset: 0x00eab552, size: 272 bytes, params: 2, frame: 20
|
|
var eventName;
|
|
const onScroll = env0_0.onScroll;
|
|
const onBeginDrag = env0_0.onBeginDrag;
|
|
const onEndDrag = env0_0.onEndDrag;
|
|
const onMomentumBegin = env0_0.onMomentumBegin;
|
|
const onMomentumEnd = env0_0.onMomentumEnd;
|
|
if (onScroll) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onScroll')) {
|
|
onScroll(a0, context);
|
|
} else if (onBeginDrag) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onScrollBeginDrag')) {
|
|
onBeginDrag(a0, context);
|
|
} else if (onEndDrag) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onScrollEndDrag')) {
|
|
onEndDrag(a0, context);
|
|
} else if (onMomentumBegin) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onMomentumScrollBegin')) {
|
|
onMomentumBegin(a0, context);
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumBegin) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onMomentumScrollBegin')) {
|
|
onMomentumBegin(a0, context);
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onEndDrag) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onScrollEndDrag')) {
|
|
onEndDrag(a0, context);
|
|
} else if (onMomentumBegin) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onMomentumScrollBegin')) {
|
|
onMomentumBegin(a0, context);
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumBegin) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onMomentumScrollBegin')) {
|
|
onMomentumBegin(a0, context);
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onBeginDrag) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onScrollBeginDrag')) {
|
|
onBeginDrag(a0, context);
|
|
} else if (onEndDrag) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onScrollEndDrag')) {
|
|
onEndDrag(a0, context);
|
|
} else if (onMomentumBegin) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onMomentumScrollBegin')) {
|
|
onMomentumBegin(a0, context);
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumBegin) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onMomentumScrollBegin')) {
|
|
onMomentumBegin(a0, context);
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onEndDrag) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onScrollEndDrag')) {
|
|
onEndDrag(a0, context);
|
|
} else if (onMomentumBegin) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onMomentumScrollBegin')) {
|
|
onMomentumBegin(a0, context);
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumBegin) {
|
|
eventName = a0.eventName;
|
|
if (eventName.endsWith('onMomentumScrollBegin')) {
|
|
onMomentumBegin(a0, context);
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
} else if (onMomentumEnd && a0.eventName.endsWith('onMomentumScrollEnd')) {
|
|
onMomentumEnd(a0, context);
|
|
}
|
|
}
|
|
|