Files
discord-decomp/sources/by-id/module-01804.jsx
T
2026-07-27 16:20:00 +03:00

167 lines
10 KiB
React

/* Metro module 1804; source: unknown; dependencies: [31, 1802, 1805, 1803, 1610, 1806, 1807] */
function _fun19771(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#19771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:6, offset: 0x00eb35b1, size: 321 bytes, params: 8, frame: 25
var propertyName;
const env0_0 = require;
const closure = useGenericKeyboardHandler;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = require(31) /* metro dependency 31 */;
const env0_2 = value.useEffect;
const env0_3 = value.useLayoutEffect;
const closure2 = function() {
useEffect(_fun19777, []);
};
object = {code: 'function pnpm_indexTs1(event){const{handler}=this.__closure;if(event.eventName.endsWith("onKeyboardMoveStart")){var _handler$onStart,_handler;(_handler$onStart=(_handler=handler).onStart)===null||_handler$onStart===void 0||_handler$onStart.call(_handler,event);}if(event.eventName.endsWith("onKeyboardMove")){var _handler$onMove,_handler2;(_handler$onMove=(_handler2=handler).onMove)===null||_handler$onMove===void 0||_handler$onMove.call(_handler2,event);}if(event.eventName.endsWith("onKeyboardMoveEnd")){var _handler$onEnd,_handler3;(_handler$onEnd=(_handler3=handler).onEnd)===null||_handler$onEnd===void 0||_handler$onEnd.call(_handler3,event);}if(event.eventName.endsWith("onKeyboardMoveInteractive")){var _handler$onInteractiv,_handler4;(_handler$onInteractiv=(_handler4=handler).onInteractive)===null||_handler$onInteractiv===void 0||_handler$onInteractiv.call(_handler4,event);}}'};
object = {code: 'function pnpm_indexTs2(event){const{handler}=this.__closure;if(event.eventName.endsWith("onFocusedInputTextChanged")){var _handler$onChangeText,_handler;(_handler$onChangeText=(_handler=handler).onChangeText)===null||_handler$onChangeText===void 0||_handler$onChangeText.call(_handler,event);}if(event.eventName.endsWith("onFocusedInputSelectionChanged")){var _handler$onSelectionC,_handler2;(_handler$onSelectionC=(_handler2=handler).onSelectionChange)===null||_handler$onSelectionC===void 0||_handler$onSelectionC.call(_handler2,event);}}'};
for (propertyName in require(1806) /* metro dependency 1806 */) {
exports[propertyName] = (require(1806) /* metro dependency 1806 */)[propertyName];
}
for (propertyName in require(1807) /* metro dependency 1807 */) {
exports[propertyName] = (require(1807) /* metro dependency 1807 */)[propertyName];
}
exports.useResizeMode = closure2;
exports.useKeyboardAnimation = useKeyboardAnimation;
exports.useReanimatedKeyboardAnimation = useReanimatedKeyboardAnimation;
exports.useGenericKeyboardHandler = closure;
exports.useKeyboardHandler = function(a0, a1) {
useResizeMode();
useGenericKeyboardHandler(a0, a1);
};
exports.useKeyboardController = useKeyboardController;
exports.useReanimatedFocusedInput = useReanimatedFocusedInput;
exports.useFocusedInputHandler = useFocusedInputHandler;
}
function useGenericKeyboardHandler(a0, a1) { // fn#19772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:1254, offset: 0x00eb36f2, size: 178 bytes, params: 3, frame: 20
const env0_0 = a0;
const env0_1 = (require(1803) /* metro dependency 1803 */).useKeyboardContext();
const moduleValue2 = require(1610) /* metro dependency 1610 */;
const useHandler = moduleValue2.useHandler;
const doDependenciesDiffer = Reflect.apply(useHandler, moduleValue2, [a0, a1]).doDependenciesDiffer;
const moduleValue3 = moduleValue2;
const useEvent = moduleValue3.useEvent;
const closure = useGenericKeyboardHandlerPnpm_indexTs1;
closure.__closure = {handler: a0};
closure.__workletHash = 7080794218426;
closure.__initData = env0_5;
const env0_2 = Reflect.apply(useEvent, moduleValue3, [closure, ['onKeyboardMoveStart', 'onKeyboardMove',
'onKeyboardMoveEnd', 'onKeyboardMoveInteractive'], doDependenciesDiffer]);
useLayoutEffect(_fun19774, a1);
}
function useResizeMode() { // fn#19776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:142, offset: 0x00eb38b6, size: 28 bytes, params: 1, frame: 13
useEffect(function() {
var KeyboardController = require(dependencyMap[1]).KeyboardController;
KeyboardController.setInputMode(require(dependencyMap[2]).AndroidSoftInputModes.SOFT_INPUT_ADJUST_RESIZE);
return _fun19778;
}, []);
}
function useKeyboardAnimation() { // fn#19779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:2655, offset: 0x00eb3948, size: 51 bytes, params: 1, frame: 12
useResizeMode();
const value = require(1803) /* metro dependency 1803 */;
const useKeyboardContext = value.useKeyboardContext;
return Reflect.apply(useKeyboardContext, value, []).animated;
}
function useReanimatedKeyboardAnimation() { // fn#19780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:2770, offset: 0x00eb397b, size: 51 bytes, params: 1, frame: 12
useResizeMode();
const value = require(1803) /* metro dependency 1803 */;
const useKeyboardContext = value.useKeyboardContext;
return Reflect.apply(useKeyboardContext, value, []).reanimated;
}
function useKeyboardController() { // fn#19782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:3032, offset: 0x00eb39cd, size: 59 bytes, params: 1, frame: 11
let value = require(1803) /* metro dependency 1803 */;
value = value.useKeyboardContext();
return {setEnabled: value.setEnabled, enabled: value.enabled};
}
function useReanimatedFocusedInput() { // fn#19783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:3179, offset: 0x00eb3a08, size: 61 bytes, params: 1, frame: 11
let value = require(1803) /* metro dependency 1803 */;
value = value.useKeyboardContext();
return {input: value.layout, update: value.update};
}
function useFocusedInputHandler(a0, a1) { // fn#19784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:3316, offset: 0x00eb3a45, size: 178 bytes, params: 3, frame: 20
const env0_0 = a0;
const env0_1 = (require(1803) /* metro dependency 1803 */).useKeyboardContext();
const moduleValue2 = require(1610) /* metro dependency 1610 */;
const useHandler = moduleValue2.useHandler;
const doDependenciesDiffer = Reflect.apply(useHandler, moduleValue2, [a0, a1]).doDependenciesDiffer;
const moduleValue3 = moduleValue2;
const useEvent = moduleValue3.useEvent;
const closure = useFocusedInputHandlerPnpm_indexTs2;
closure.__closure = {handler: a0};
closure.__workletHash = 16071593392303;
closure.__initData = env0_6;
const env0_2 = Reflect.apply(useEvent, moduleValue3, [closure, ['onFocusedInputTextChanged',
'onFocusedInputSelectionChanged'], doDependenciesDiffer]);
useLayoutEffect(_fun19786, a1);
}
function useGenericKeyboardHandlerPnpm_indexTs1(a0) { // fn#19773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:1401, owner: useGenericKeyboardHandler.pnpm_indexTs1, offset: 0x00eb37a4, size: 239 bytes, params: 2, frame: 12
let eventName = a0.eventName;
if (eventName.endsWith('onKeyboardMoveStart')) {
if (env0_0.onStart != null) {
env0_0.onStart(a0);
}
}
eventName = a0.eventName;
if (eventName.endsWith('onKeyboardMove')) {
if (env0_0.onMove != null) {
env0_0.onMove(a0);
}
}
eventName = a0.eventName;
if (eventName.endsWith('onKeyboardMoveEnd')) {
if (env0_0.onEnd != null) {
env0_0.onEnd(a0);
}
}
eventName = a0.eventName;
if (eventName.endsWith('onKeyboardMoveInteractive')) {
if (env0_0.onInteractive != null) {
env0_0.onInteractive(a0);
}
}
}
function _fun19774() { // fn#19774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:1907, offset: 0x00eb3893, size: 35 bytes, params: 1, frame: 12
const env0_0 = env0_1.setKeyboardHandlers(env0_2);
return _fun19775;
}
function _fun19777() { // fn#19777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:170, offset: 0x00eb38d2, size: 75 bytes, params: 1, frame: 14
let KeyboardController = (require(1802) /* metro dependency 1802 */).KeyboardController;
const setInputMode = KeyboardController.setInputMode;
const AndroidSoftInputModes = (require(1805) /* metro dependency 1805 */).AndroidSoftInputModes;
const SOFT_INPUT_ADJUST_RESIZE = AndroidSoftInputModes.SOFT_INPUT_ADJUST_RESIZE;
Reflect.apply(setInputMode, KeyboardController, [SOFT_INPUT_ADJUST_RESIZE]);
return function() {
var KeyboardController = require(dependencyMap[1]).KeyboardController;
return KeyboardController.setDefaultMode();
};
}
function useFocusedInputHandlerPnpm_indexTs2(a0) { // fn#19785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:3460, owner: useFocusedInputHandler.pnpm_indexTs2, offset: 0x00eb3af7, size: 127 bytes, params: 2, frame: 12
let eventName = a0.eventName;
if (eventName.endsWith('onFocusedInputTextChanged')) {
if (env0_0.onChangeText != null) {
env0_0.onChangeText(a0);
}
}
eventName = a0.eventName;
if (eventName.endsWith('onFocusedInputSelectionChanged')) {
if (env0_0.onSelectionChange != null) {
env0_0.onSelectionChange(a0);
}
}
}
function _fun19786() { // fn#19786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1931:3828, offset: 0x00eb3b76, size: 35 bytes, params: 1, frame: 12
const env0_0 = env0_1.setInputHandlers(env0_2);
return _fun19787;
}