313 lines
13 KiB
React
313 lines
13 KiB
React
/* Metro module 332; source: unknown; dependencies: [29, 5, 6, 7, 15, 17, 18, 31, 33, 333, 334, 112, 253] */
|
|
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 env0_3 = importDefault(29) /* metro dependency 29 */;
|
|
const env0_4 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_5 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_6 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_7 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_8 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_9 = importDefault(18) /* metro dependency 18 */;
|
|
const value = importAll(31) /* metro dependency 31 */;
|
|
const env0_10 = (require(31) /* metro dependency 31 */).createRef;
|
|
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
|
|
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 closure = KeyboardAvoidingView;
|
|
env0_9(closure, a0);
|
|
const binding = env0_6;
|
|
const env0_0 = env0_4(_fun4939);
|
|
return binding(closure, [{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 items = [a0];
|
|
const value3 = env1_8(KeyboardAvoidingView);
|
|
const value6 = env1_7(this, _isNativeReflectConstruct_4924() ? global.Reflect.construct(value3, items,
|
|
env1_8(this).constructor) : value3.apply(this, items));
|
|
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* _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 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 = importDefault(334) /* metro dependency 334 */;
|
|
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 object2;
|
|
var defaultImport2;
|
|
var defaultImport3;
|
|
var defaultImport4;
|
|
var object3;
|
|
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;
|
|
object2 = {};
|
|
object2.ref = this.viewRef;
|
|
object2.style = (importDefault(253) /* metro dependency 253 */).compose(style, r11);
|
|
object2.onLayout = this._onLayout;
|
|
return ((Component) => <Component {...Reflect.apply(assign, Object, [object2, value4,
|
|
{children: children}])} />)(defaultImport7);
|
|
}
|
|
if (behavior === 'position') {
|
|
defaultImport4 = importDefault(112) /* metro dependency 112 */;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
object2 = {};
|
|
object2.ref = this.viewRef;
|
|
object2.style = style;
|
|
object2.onLayout = this._onLayout;
|
|
object3 = {};
|
|
defaultImport5 = importDefault(112) /* metro dependency 112 */;
|
|
defaultImport6 = importDefault(253) /* metro dependency 253 */;
|
|
object3.children = ((Component) => <Component style={defaultImport6.compose(contentContainerStyle,
|
|
{bottom: bottom})}>{children}</Component>)(defaultImport5);
|
|
return ((Component) => <Component {...Reflect.apply(assign, Object, [object2, value4,
|
|
object3])} />)(defaultImport4);
|
|
}
|
|
if (behavior === 'padding') {
|
|
defaultImport2 = importDefault(112) /* metro dependency 112 */;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
object2 = {};
|
|
object2.ref = this.viewRef;
|
|
defaultImport3 = importDefault(253) /* metro dependency 253 */;
|
|
object2.style = defaultImport3.compose(style, {paddingBottom: bottom});
|
|
object2.onLayout = this._onLayout;
|
|
return ((Component) => <Component {...Reflect.apply(assign, Object, [object2, 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 _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 _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 object3;
|
|
var value6;
|
|
var object4;
|
|
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;
|
|
object3 = {};
|
|
value6 = 10;
|
|
object3.duration = duration > value6 ? duration : value6;
|
|
object4 = {};
|
|
object4.duration = duration > value6 ? duration : value6;
|
|
binding = env3_0;
|
|
object4.type = binding(env3_1[9]).Types[easing] || 'keyboard';
|
|
object3.update = object4;
|
|
Reflect.apply(configureNext, value5, [object3]);
|
|
}
|
|
}
|
|
} else {
|
|
env1_0._setBottom(0);
|
|
}
|
|
}
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
|