197 lines
12 KiB
React
197 lines
12 KiB
React
/* Metro module 1608; source: unknown; dependencies: [5, 57, 31, 27, 33, 1609, 1610, 1600, 1799, 1801, 1802, 1803] */
|
|
import Module00005 from './module-00005.js'; /* Metro dependency 5 */
|
|
import React from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import Module00057 from './module-00057.js'; /* Metro dependency 57 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as Module01600Module from './module-01600.js'; /* Metro dependency 1600 */
|
|
import * as Module01609Module from './module-01609.js'; /* Metro dependency 1609 */
|
|
import * as Module01610Module from './module-01610.js'; /* Metro dependency 1610 */
|
|
import * as Module01799Module from './module-01799.js'; /* Metro dependency 1799 */
|
|
import * as moduleValue8 from './module-01801.js'; /* Metro dependency 1801 */
|
|
import * as Module01803Module from './module-01803.js'; /* Metro dependency 1803 */
|
|
|
|
function _fun17661(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:6, offset: 0x00e7279f, size: 453 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const env0_4 = value.useCallback;
|
|
const env0_5 = value.useEffect;
|
|
const env0_6 = value.useMemo;
|
|
const env0_7 = value.useRef;
|
|
const env0_8 = value.useState;
|
|
React;
|
|
value = require(27) /* metro dependency 27 */;
|
|
const Animated = value.Animated;
|
|
value.Platform;
|
|
const StyleSheet = value.StyleSheet;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_10 = value.jsx;
|
|
const env0_11 = value.jsxs;
|
|
const env0_12 = (Module01609Module).isEdgeToEdge();
|
|
value = importDefault(1610) /* metro dependency 1610 */;
|
|
const createAnimatedComponent = value.createAnimatedComponent;
|
|
const createAnimatedComponent2 = Animated.createAnimatedComponent;
|
|
const KeyboardControllerView = (Module01600Module).KeyboardControllerView;
|
|
const env0_13 = Reflect.apply(createAnimatedComponent, value, [Reflect.apply(createAnimatedComponent2, Animated,
|
|
[KeyboardControllerView])]);
|
|
const env0_14 = StyleSheet.create({container: {flex: 1}, hidden: {'display': 'none', 'position': 'absolute'}});
|
|
object = {code: 'function pnpm_animatedTsx1(event,platforms){const{OS,progressSV,heightSV}=this.__closure;if(platforms.includes(OS)){progressSV.value=event.progress;heightSV.value=-event.height;}}'};
|
|
object = {code: 'function pnpm_animatedTsx2(event){const{updateSharedValues}=this.__closure;updateSharedValues(event,["ios"]);}'};
|
|
object = {code: 'function pnpm_animatedTsx3(event){const{updateSharedValues}=this.__closure;updateSharedValues(event,["android"]);}'};
|
|
object = {code: 'function pnpm_animatedTsx4(event){const{updateSharedValues}=this.__closure;updateSharedValues(event,["android","ios"]);}'};
|
|
object = {code: 'function pnpm_animatedTsx5(event){const{updateSharedValues}=this.__closure;updateSharedValues(event,["android"]);}'};
|
|
object = {code: 'function pnpm_animatedTsx6(e){const{layout}=this.__closure;if(e.target!==-1){layout.value=e;}else{layout.value=null;}}'};
|
|
exports.KeyboardProvider = KeyboardProvider;
|
|
function KeyboardProvider({children, statusBarTranslucent, navigationBarTranslucent, preserveEdgeToEdge, enabled, preload}) { // fn#17662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:1336, offset: 0x00e72964, size: 987 bytes, params: 2, frame: 33
|
|
const r2 = enabled === undefined || enabled;
|
|
const r18 = preload === undefined || preload;
|
|
const value2 = useRef(null);
|
|
const value4 = env0_3(useState(r2), 2);
|
|
const property = value4[0];
|
|
const property2 = property;
|
|
var env0_3 = value4[1];
|
|
const env0_4 = (Module01799Module).useAnimatedValue(0);
|
|
const env0_5 = (Module01799Module).useAnimatedValue(0);
|
|
const value5 = (Module01610Module).useSharedValue(0);
|
|
const value6 = (Module01610Module).useSharedValue(0);
|
|
const value7 = (Module01610Module).useSharedValue(null);
|
|
const env0_9 = (Module01799Module).useEventHandlerRegistration(value2);
|
|
const env0_10 = (Module01799Module).useEventHandlerRegistration(value2);
|
|
const env0_11 = useCallback(property2(_fun17664), []);
|
|
const value9 = useMemo(_fun17667, [property]);
|
|
let closure = _fun17668;
|
|
const value10 = useMemo(closure, []);
|
|
const value11 = useMemo(_fun17669, []);
|
|
closure = updateSharedValues;
|
|
closure.__closure = {OS: 'android', progressSV: value5, heightSV: value6};
|
|
closure.__workletHash = 2170890222740;
|
|
closure.__initData = env0_15;
|
|
const useAnimatedKeyboardHandler = moduleValue8.useAnimatedKeyboardHandler;
|
|
object = {};
|
|
const closure2 = function(a0) {
|
|
updateSharedValues(a0, ['ios']);
|
|
};
|
|
closure2.__closure = {updateSharedValues: closure};
|
|
closure2.__workletHash = 17024171887285;
|
|
closure2.__initData = env0_16;
|
|
object.onKeyboardMoveStart = closure2;
|
|
const closure3 = function(a0) {
|
|
updateSharedValues(a0, ['android']);
|
|
};
|
|
closure3.__closure = {updateSharedValues: closure};
|
|
closure3.__workletHash = 9343239356186;
|
|
closure3.__initData = env0_17;
|
|
object.onKeyboardMove = closure3;
|
|
const closure4 = function(a0) {
|
|
updateSharedValues(a0, ['android', 'ios']);
|
|
};
|
|
closure4.__closure = {updateSharedValues: closure};
|
|
closure4.__workletHash = 9270729921284;
|
|
closure4.__initData = env0_18;
|
|
object.onKeyboardMoveInteractive = closure4;
|
|
const closure5 = function(a0) {
|
|
updateSharedValues(a0, ['android']);
|
|
};
|
|
closure5.__closure = {updateSharedValues: closure};
|
|
closure5.__workletHash = 10129400155228;
|
|
closure5.__initData = env0_19;
|
|
object.onKeyboardMoveEnd = closure5;
|
|
const value12 = Reflect.apply(useAnimatedKeyboardHandler, moduleValue8, [object, []]);
|
|
const useFocusedInputLayoutHandler = moduleValue8.useFocusedInputLayoutHandler;
|
|
closure = onFocusedInputLayoutChanged;
|
|
closure.__closure = {layout: value7};
|
|
closure.__workletHash = 9857955983587;
|
|
closure.__initData = env0_20;
|
|
const value13 = Reflect.apply(useFocusedInputLayoutHandler, moduleValue8, [{onFocusedInputLayoutChanged: closure},
|
|
[]]);
|
|
useEffect(_fun17676, [r18]);
|
|
const KeyboardContext = (Module01803Module).KeyboardContext;
|
|
const Provider = KeyboardContext.Provider;
|
|
const env0_133 = ((Component) => <Component ref={value2} enabled={property} navigationBarTranslucent={env0_12 || navigationBarTranslucent} statusBarTranslucent={env0_12 || statusBarTranslucent} preserveEdgeToEdge={env0_12 || preserveEdgeToEdge} style={env0_14.container} onKeyboardMoveReanimated={value12} onKeyboardMoveStart={undefined} onKeyboardMove={value11} onKeyboardMoveInteractive={value11} onKeyboardMoveEnd={value11} onFocusedInputLayoutChangedReanimated={value13}>{children}</Component>)(env0_13);
|
|
const View = Animated.View;
|
|
return (
|
|
<Provider value={value9}>
|
|
{env0_133}
|
|
<View style={value10} />
|
|
</Provider>
|
|
);
|
|
function* _fun17664() { // fn#17664, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:1803, offset: 0x00e72d48, size: 115 bytes, params: 1, frame: 13
|
|
var environment;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
var KeyboardControllerViewCommands = env2_0(env2_1[7]).KeyboardControllerViewCommands;
|
|
var synchronizeFocusedInputLayout = KeyboardControllerViewCommands.synchronizeFocusedInputLayout;
|
|
value = environment.__proto__;
|
|
Reflect.apply(synchronizeFocusedInputLayout, KeyboardControllerViewCommands, [dependencyMap.current]);
|
|
var Promise = global.Promise;
|
|
yield new Promise(_fun17665);
|
|
}
|
|
function _fun17665(a0) { // fn#17665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:1914, offset: 0x00e72dbb, size: 69 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
const FocusedInputEvents = env3_0(env3_1[7]).FocusedInputEvents;
|
|
const env0_1 = FocusedInputEvents.addListener('layoutDidSynchronize', _fun17666);
|
|
function _fun17666() { // fn#17666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:1995, offset: 0x00e72e00, size: 32 bytes, params: 1, frame: 11
|
|
env0_1.remove();
|
|
env0_0(null);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun17667() { // fn#17667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:2044, offset: 0x00e72e20, size: 133 bytes, params: 1, frame: 16
|
|
const object = {};
|
|
object.enabled = Module00005;
|
|
const object2 = {progress: env0_4};
|
|
object2.height = Animated.multiply(env0_5, -1);
|
|
object.animated = object2;
|
|
object.reanimated = {progress: env0_6, height: env0_7};
|
|
object.layout = env0_8;
|
|
object.update = env0_11;
|
|
object.setKeyboardHandlers = env0_9;
|
|
object.setInputHandlers = env0_10;
|
|
object.setEnabled = env0_3;
|
|
return object;
|
|
}
|
|
|
|
function _fun17668() { // fn#17668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:2237, offset: 0x00e72ea5, size: 70 bytes, params: 1, frame: 5
|
|
return [env1_14.hidden, {transform: [{translateX: env0_5}, {translateY: env0_4}]}];
|
|
}
|
|
|
|
function _fun17669() { // fn#17669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:2321, offset: 0x00e72eeb, size: 67 bytes, params: 1, frame: 15
|
|
return Animated.event([{nativeEvent: {progress: env0_4, height: env0_5}}], {useNativeDriver: true});
|
|
}
|
|
|
|
function updateSharedValues(a0, a1) { // fn#17670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:2420, owner: KeyboardProvider.updateSharedValues, offset: 0x00e72f2e, size: 64 bytes, params: 3, frame: 12
|
|
var binding;
|
|
if (a1.includes('android')) {
|
|
binding = env0_6;
|
|
binding.value = a0.progress;
|
|
binding = env0_7;
|
|
binding.value = -a0.height;
|
|
}
|
|
}
|
|
|
|
function onFocusedInputLayoutChanged(a0) { // fn#17675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:3338, owner: KeyboardProvider.onFocusedInputLayoutChanged, offset: 0x00e72fc8, size: 53 bytes, params: 2, frame: 3
|
|
if (a0.target !== -1) {
|
|
env0_8.value = a0;
|
|
} else {
|
|
env0_8.value = null;
|
|
}
|
|
}
|
|
|
|
function _fun17676() { // fn#17676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1735:3492, offset: 0x00e72ffd, size: 55 bytes, params: 1, frame: 11
|
|
if (env0_0) {
|
|
value = environment.__proto__;
|
|
(require(1802) /* metro dependency 1802 */).KeyboardController.preload();
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun17661, 1608, [5, 57, 31, 27, 33, 1609, 1610, 1600, 1799, 1801, 1802,
|
|
1803]) /* metro module 1608, dependencies: [5, 57, 31, 27, 33, 1609, 1610, 1600, 1799, 1801, 1802, 1803] */;
|