Files
2026-07-28 01:06:53 +03:00

328 lines
17 KiB
React

/* Metro module 332; source: unknown; dependencies: [29, 5, 6, 7, 15, 17, 18, 31, 33, 333, 334, 112, 253] */
import Module00005 from './module-00005.js'; /* Metro dependency 5 */
import ClassCallCheck from './module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from './module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from './module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from './module-00017.js'; /* Metro dependency 17 */
import Inherits from './module-00018-Inherits.js'; /* Metro dependency 18 */
import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module00334 from './module-00334.js'; /* Metro dependency 334 */
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun4923(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#4923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:6, offset: 0x00cd0cc8, size: 269 bytes, params: 8, frame: 19
const env0_2 = ['behavior', 'children', 'contentContainerStyle', 'enabled', 'keyboardVerticalOffset', 'style',
'onLayout'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = ReactModule;
const Component = value.Component;
exports.default = _fun4927(Component);
function _isNativeReflectConstruct_4924() { // fn#4924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:320, offset: 0x00cd0dd5, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_4924_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun4927(a0) { // fn#4927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:545, offset: 0x00cd0e33, size: 178 bytes, params: 2, frame: 16
const KeyboardAvoidingView2 = KeyboardAvoidingView;
Inherits(KeyboardAvoidingView2, a0);
const env0_0 = Module00005(_fun4939);
return CreateClass(KeyboardAvoidingView2, [{key: '_relativeKeyboardHeight', value: value_4940},
{key: 'componentDidUpdate', value: function(a0, a1) {
var property = this.props.enabled;
if ((property == null || property) && this._bottom !== a1.bottom) {
this.setState({bottom: this._bottom});
}
}}, {key: 'componentDidMount', value: value_4942}, {key: 'componentWillUnmount', value: function() {
this._subscriptions.forEach(_fun4944);
}}, {key: 'render', value: value_4945}]);
function KeyboardAvoidingView(a0) { // fn#4928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:557, offset: 0x00cd0ee5, size: 253 bytes, params: 2, frame: 21
env1_5(this, KeyboardAvoidingView);
const items2 = [a0];
const value3 = env1_8(KeyboardAvoidingView);
const value6 = env1_7(this, _isNativeReflectConstruct_4924() ? global.Reflect.construct(value3, items2,
env1_8(this).constructor) : value3.apply(this, items2));
value6._frame = null;
value6._keyboardEvent = null;
value6._subscriptions = [];
value6._initialFrameHeight = 0;
value6._bottom = 0;
value6._onKeyboardChange = _onKeyboardChange;
value6._onKeyboardHide = _onKeyboardHide;
value6._onLayout = _fun4931();
value6._setBottom = _setBottom;
value6._updateBottomIfNecessary = env1_4(_fun4937);
value6.state = {bottom: 0};
value6.viewRef = createRef();
return value6;
function _onKeyboardChange(a0) { // fn#4929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:909, owner: KeyboardAvoidingView._onKeyboardChange, offset: 0x00cd0fe2, size: 30 bytes, params: 2, frame: 9
const binding = env0_0;
binding._keyboardEvent = a0;
binding._updateBottomIfNecessary();
}
function _onKeyboardHide(a0) { // fn#4930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:988, owner: KeyboardAvoidingView._onKeyboardHide, offset: 0x00cd1000, size: 29 bytes, params: 2, frame: 9
const binding = env0_0;
binding._keyboardEvent = null;
binding._updateBottomIfNecessary();
}
function _fun4931() { // fn#4931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:1064, offset: 0x00cd101d, size: 32 bytes, params: 1, frame: 12
const env0_0 = env2_4(_fun4933);
return _fun4934;
function* _fun4933(a0) { // fn#4933, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:1084, offset: 0x00cd1046, size: 190 bytes, params: 2, frame: 14
if (true) {
a0.persist();
value = environment.__proto__.__proto__;
var binding = env2_0;
var _frame = binding._frame;
binding._frame = a0.nativeEvent.layout;
if (!binding._initialFrameHeight) {
binding = env2_0;
binding._initialFrameHeight = binding._frame.height;
}
if (!(_frame && _frame.height === env2_0._frame.height)) {
binding = env2_0;
yield binding._updateBottomIfNecessary();
if (false) {
return undefined;
}
}
if (env2_0.props.onLayout) {
env2_0.props.onLayout(a0);
}
}
}
function _fun4934(a0) { // fn#4934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:1333, offset: 0x00c3945f, size: 30 bytes, params: 2, frame: 13
return env0_0.apply(this, arguments);
}
}
function _setBottom(a0) { // fn#4935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:1393, owner: KeyboardAvoidingView._setBottom, offset: 0x00cd1104, size: 70 bytes, params: 2, frame: 13
const enabled = env0_0.props.enabled;
const r1 = enabled == null || enabled;
env0_0._bottom = a0;
if (r1) {
env0_0.setState({bottom: a0});
}
}
function* _fun4937() { // fn#4937, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:1511, offset: 0x00cd1153, size: 297 bytes, params: 1, frame: 21
var r2;
var binding;
var duration;
var easing;
var value3;
var enabled;
var value5;
var configureNext;
var object;
var value6;
var object2;
if (true) {
value = environment.__proto__;
var _keyboardEvent = env1_0._keyboardEvent;
if (_keyboardEvent != null) {
binding = env1_0;
_keyboardEvent = binding._keyboardEvent;
duration = _keyboardEvent.duration;
easing = _keyboardEvent.easing;
yield binding._relativeKeyboardHeight(_keyboardEvent.endCoordinates);
value3 = undefined;
if (false) {
return value3;
}
if (env1_0._bottom !== value3) {
binding = env1_0;
binding._setBottom(value3);
enabled = binding.props.enabled;
value = enabled == null;
r2 = value || enabled;
r2 = r2 && duration;
r2 = r2 && easing;
if (r2) {
value = environment.__proto__.__proto__.__proto__;
binding = env3_0;
value5 = binding(env3_1[9]);
configureNext = value5.configureNext;
object = {};
value6 = 10;
object.duration = duration > value6 ? duration : value6;
object2 = {};
object2.duration = duration > value6 ? duration : value6;
binding = env3_0;
object2.type = binding(env3_1[9]).Types[easing] || 'keyboard';
object.update = object2;
Reflect.apply(configureNext, value5, [object]);
}
}
} else {
env1_0._setBottom(0);
}
}
}
}
function value_4940(a0) { // fn#4940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:2225, offset: 0x00c3945f, size: 30 bytes, params: 2, frame: 13
return env0_0.apply(this, arguments);
}
function value_4942() { // fn#4942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:2496, offset: 0x00cd138a, size: 156 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = Module00334;
if (!defaultImport.isVisible()) {
this._keyboardEvent = null;
this._setBottom(0);
}
value = Reflect.apply(defaultImport.addListener, value, ['keyboardDidHide', this._onKeyboardChange]);
const items2 = [value];
value = defaultImport;
items2[1] = value.addListener('keyboardDidShow', this._onKeyboardChange);
this._subscriptions = items2;
}
function value_4943() { // fn#4943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:2777, offset: 0x00cd1426, size: 30 bytes, params: 1, frame: 11
this._subscriptions.forEach(function(a0) {
a0.remove();
});
}
function value_4945() { // fn#4945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:2886, offset: 0x00cd1455, size: 633 bytes, params: 1, frame: 31
var r11;
var Object;
var assign;
var object;
var defaultImport2;
var defaultImport3;
var defaultImport4;
var object4;
var defaultImport5;
var defaultImport6;
var defaultImport7;
const props = this.props;
const behavior = props.behavior;
const children = props.children;
const contentContainerStyle = props.contentContainerStyle;
const enabled = props.enabled;
const value = undefined;
const r9 = value === enabled || enabled;
props.keyboardVerticalOffset;
const style = props.style;
props.onLayout;
const value4 = env1_3(props, env1_2);
const value5 = 0;
const bottom = r9 !== true ? value5 : this.state.bottom;
if (behavior === 'height') {
r11 = this._frame != null && this.state.bottom > value5 ? {height: this._initialFrameHeight - bottom,
flex: value5} : value;
defaultImport7 = importDefault(112) /* metro dependency 112 */;
Object = global.Object;
assign = Object.assign;
object = {};
object.ref = this.viewRef;
object.style = (importDefault(253) /* metro dependency 253 */).compose(style, r11);
object.onLayout = this._onLayout;
return ((Component) => <Component {...Reflect.apply(assign, Object, [object, value4,
{children: children}])} />)(defaultImport7);
}
if (behavior === 'position') {
defaultImport4 = importDefault(112) /* metro dependency 112 */;
Object = global.Object;
assign = Object.assign;
object = {};
object.ref = this.viewRef;
object.style = style;
object.onLayout = this._onLayout;
object4 = {};
defaultImport5 = importDefault(112) /* metro dependency 112 */;
defaultImport6 = importDefault(253) /* metro dependency 253 */;
object4.children = ((Component) => <Component style={defaultImport6.compose(contentContainerStyle,
{bottom: bottom})}>{children}</Component>)(defaultImport5);
return ((Component) => <Component {...Reflect.apply(assign, Object, [object, value4,
object4])} />)(defaultImport4);
}
if (behavior === 'padding') {
defaultImport2 = importDefault(112) /* metro dependency 112 */;
Object = global.Object;
assign = Object.assign;
object = {};
object.ref = this.viewRef;
defaultImport3 = importDefault(253) /* metro dependency 253 */;
object.style = defaultImport3.compose(style, {paddingBottom: bottom});
object.onLayout = this._onLayout;
return ((Component) => <Component {...Reflect.apply(assign, Object, [object, value4,
{children: children}])} />)(defaultImport2);
}
const defaultImport = importDefault(112) /* metro dependency 112 */;
Object = global.Object;
return ((Component) => <Component {...Object.assign({ref: this.viewRef, onLayout: this._onLayout, style: style},
value4, {children: children})} />)(defaultImport);
}
}
}
function* _fun4939(a0) { // fn#4939, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:1995, offset: 0x00cd1285, size: 185 bytes, params: 2, frame: 18
var r1;
var screenY;
var props;
var keyboardVerticalOffset;
var value3;
let value = undefined;
if (false) {
return value;
}
const _frame = this._frame;
if (_frame) {
if (a0) {
screenY = a0.screenY;
props = this.props;
keyboardVerticalOffset = props.keyboardVerticalOffset;
value = 0;
r1 = keyboardVerticalOffset ?? value;
value3 = screenY - r1;
props = this.props;
r1 = props.behavior === 'height' ? global.Math.max(this.state.bottom + _frame.y + _frame.height - value3,
value) : global.Math.max(_frame.y + _frame.height - value3, value);
return r1;
}
}
return 0;
}
function _fun4944(a0) { // fn#4944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:373:2838, offset: 0x00cd1444, size: 17 bytes, params: 2, frame: 9
a0.remove();
}
global.__d(_fun4923, 332, [29, 5, 6, 7, 15, 17, 18, 31, 33, 333, 334, 112,
253]) /* metro module 332, dependencies: [29, 5, 6, 7, 15, 17, 18, 31, 33, 333, 334, 112, 253] */;