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

175 lines
8.1 KiB
React

/* Metro module 337; source: unknown; dependencies: [29, 77, 6, 7, 15, 17, 18, 31, 33, 338, 303, 340, 112, 252, 404, 253] */
function _fun4971(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#4971, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:6, offset: 0x00cd1e87, size: 464 bytes, params: 8, frame: 25
var object2;
const env0_0 = require;
const closure = Wrapper;
const env0_3 = ['ref'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const value = importDefault(77) /* metro dependency 77 */;
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 value2 = importAll(31) /* metro dependency 31 */;
const env0_10 = (require(33) /* metro dependency 33 */).jsx;
const Component = value2.Component;
const value3 = _fun4976(Component);
value3.defaultProps = {'visible': true, 'hardwareAccelerated': false};
const RootTagContext = (require(252) /* metro dependency 252 */).RootTagContext;
value3.contextType = RootTagContext;
let property = (require(404) /* metro dependency 404 */).default;
const getConstants = property.getConstants;
const r10 = Reflect.apply(getConstants, property, []).isRTL ? 'right' : 'left';
property = (require(253) /* metro dependency 253 */).default;
const create = property.create;
object2 = {};
object2.modal = {position: 'absolute'};
object2.container = value(value(value({}, r10, 0), 'top', 0), 'flex', 1);
const env0_13 = Reflect.apply(create, property, [object2]);
closure.displayName = 'Modal';
const VirtualizedListContextResetter = (importDefault(303) /* metro dependency 303 */).VirtualizedListContextResetter;
closure.Context = VirtualizedListContextResetter;
exports.default = closure;
}
function _isNativeReflectConstruct_4972() { // fn#4972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:206, offset: 0x00cd2057, 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_4972_isNativeReflectConstruct = function() {
return !!result;
})();
}
function Wrapper(a0) { // fn#4975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:2712, offset: 0x00cd20b5, size: 72 bytes, params: 2, frame: 18
const ref = a0.ref;
let binding = env0_4;
const value2 = binding(a0, env0_3);
binding = env0_12;
const Object = global.Object;
return ((Component) => <Component {...Object.assign({}, value2, {modalRef: ref})} />)(binding);
}
function _fun4976(a0) { // fn#4976, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:435, offset: 0x00cd20fd, size: 183 bytes, params: 2, frame: 16
const closure = Modal_4977;
env0_9(closure, a0);
return env0_6(closure, [{key: 'componentDidMount', value: function() {
}}, {key: 'componentWillUnmount', value: function() {
if (this._eventSubscription) {
this._eventSubscription.remove();
}
}}, {key: 'componentDidUpdate', value: function(a0) {
if (a0.visible === false && this.props.visible === true) {
this.setState({isRendered: true});
}
}}, {key: '_shouldShowModal', value: function() {
return this.props.visible === true;
}}, {key: 'render', value: value_4982}, {key: '_shouldSetResponder', value: function() {
return true;
}}]);
}
function Modal_4977(a0) { // fn#4977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:447, offset: 0x00cd21b4, size: 160 bytes, params: 2, frame: 21
let binding = env1_5;
binding(this, Modal_4977);
const items = [a0];
const value3 = env1_8(Modal_4977);
const value6 = env1_7(this, _isNativeReflectConstruct_4972() ? global.Reflect.construct(value3, items,
env1_8(this).constructor) : value3.apply(this, items));
binding = env1_11;
const value7 = typeof binding === 'bigint' ? binding : +binding;
env1_11 = typeof value7 === 'bigint' ? value7 + 1n : +value7 + 1;
value6._identifier = value7;
value6.state = {isRendered: a0.visible === true};
return value6;
}
function value_4982() { // fn#4982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:378:1161, offset: 0x00cd22cb, size: 593 bytes, params: 1, frame: 26
var environment;
var animationType;
var r6;
var object3;
var props;
var transparent;
var value;
var children;
var defaultImport;
var object4;
if (this._shouldShowModal()) {
object3 = {};
props = this.props;
transparent = props.transparent;
value = 'transparent';
object3.backgroundColor = transparent === true ? value : this.props.backdropColor ?? 'white';
props = this.props;
animationType = props.animationType;
animationType = !animationType ? 'none' : animationType;
props = this.props;
r6 = props.presentationStyle || (this.props.transparent !== true ? 'fullScreen' : 'overFullScreen');
props = this.props;
children = props.children;
value = environment.__proto__;
defaultImport = importDefault(338) /* metro dependency 338 */;
object4 = {animationType: animationType, presentationStyle: r6};
props = this.props;
transparent = props.transparent;
object4.transparent = transparent;
props = this.props;
object4.hardwareAccelerated = props.hardwareAccelerated;
props = this.props;
object4.onRequestClose = props.onRequestClose;
props = this.props;
object4.onShow = props.onShow;
object4.onDismiss = function() {
};
props = this.props;
object4.ref = props.modalRef;
props = this.props;
object4.visible = props.visible;
props = this.props;
object4.statusBarTranslucent = props.statusBarTranslucent;
props = this.props;
object4.navigationBarTranslucent = props.navigationBarTranslucent;
object4.identifier = this._identifier;
object4.style = env1_13.modal;
object4.onStartShouldSetResponder = this._shouldSetResponder;
props = this.props;
object4.supportedOrientations = props.supportedOrientations;
props = this.props;
object4.onOrientationChange = props.onOrientationChange;
props = this.props;
object4.allowSwipeDismissal = props.allowSwipeDismissal;
props = this.props;
object4.testID = props.testID;
return ((Component) => <Component {...object4}>{((VirtualizedListContextResetter) => <VirtualizedListContextResetter>{((Provider) => <Provider value={null}>{((Component) => <Component style={[env1_13.container,
object3]} collapsable={false}>{children}</Component>)((require(112) /* metro dependency 112 */).default)}</Provider>)((require(340) /* metro dependency 340 */).default.Context.Provider)}</VirtualizedListContextResetter>)((importDefault(303) /* metro dependency 303 */).VirtualizedListContextResetter)}</Component>)(defaultImport);
}
return null;
}