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

953 lines
45 KiB
React

/* Metro module 5340; source: unknown; dependencies: [65, 6, 7, 15, 17, 18, 77, 31, 27, 33, 5341, 5325, 5330, 5326, 5342, 5324, 5343, 5344, 5345, 5346, 5347, 5336] */
function _fun47160(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#47160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:6, offset: 0x011ba85d, size: 772 bytes, params: 8, frame: 26
const env0_0 = require;
const hasUnresolvedRefs = function(a0) {
var closure = _fun47165;
return closure(a0.simultaneousHandlers) || closure(a0.waitFor);
};
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = undefined;
const env0_3 = importDefault(65) /* metro dependency 65 */;
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
const value2 = importDefault(77) /* metro dependency 77 */;
const env0_9 = importAll(31) /* metro dependency 31 */;
const value3 = require(27) /* metro dependency 27 */;
value3.Platform;
const UIManager = value3.UIManager;
value3.DeviceEventEmitter;
(require(33) /* metro dependency 33 */).jsx;
(require(5341) /* metro dependency 5341 */).customDirectEventTypes.topGestureHandlerEvent = {registrationName: 'onGestureHandlerEvent'};
Object = global.Object;
const value5 = Object.assign({onGestureHandlerEvent: {registrationName: 'onGestureHandlerEvent'},
onGestureHandlerStateChange: {registrationName: 'onGestureHandlerStateChange'}},
(require(5325) /* metro dependency 5325 */).isFabric() && ({topOnGestureHandlerEvent: {registrationName: 'onGestureHandlerEvent'},
topOnGestureHandlerStateChange: {registrationName: 'onGestureHandlerStateChange'}}));
Object = global.Object;
UIManager.genericDirectEventTypes = Object.assign({}, UIManager.genericDirectEventTypes, value5);
const getViewManagerConfig = UIManager.getViewManagerConfig;
const r8 = getViewManagerConfig == null ? value : UIManager.getViewManagerConfig('getConstants');
if (r8) {
Object = global.Object;
r8.genericDirectEventTypes = Object.assign({}, r8.genericDirectEventTypes, value5);
}
const setJSResponder = UIManager.setJSResponder;
let r3 = value !== setJSResponder ? setJSResponder : function() {
};
const clearJSResponder = UIManager.clearJSResponder;
r3 = value !== clearJSResponder ? clearJSResponder : function() {
};
UIManager.setJSResponder = setJSResponder_47169;
UIManager.clearJSResponder = clearJSResponder_47170;
const State = (require(5326) /* metro dependency 5326 */).State;
const UNDETERMINED = State.UNDETERMINED;
const value7 = value2({}, UNDETERMINED, value);
const BEGAN = State.BEGAN;
const value8 = value2(value7, BEGAN, 'onBegan');
const FAILED = State.FAILED;
const value9 = value2(value8, FAILED, 'onFailed');
const CANCELLED = State.CANCELLED;
const value10 = value2(value9, CANCELLED, 'onCancelled');
const ACTIVE = State.ACTIVE;
const value11 = value2(value10, ACTIVE, 'onActivated');
const END = State.END;
const env0_12 = value2(value11, END, 'onEnded');
exports.default = createHandler;
return value;
}
function _isNativeReflectConstruct_47161() { // fn#47161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:251, offset: 0x011bab61, 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_47161_isNativeReflectConstruct = function() {
return !!result;
})();
}
function hasUnresolvedRefs(a0) { // fn#47164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:1387, offset: 0x011babbf, size: 39 bytes, params: 2, frame: 13
const closure = function(a0) {
var r0;
var value = a0;
var Array = global.Array;
if (Array.isArray(value)) {
value = value.some(_fun47166);
r0 = value;
} else {
r0 = value && value.current === null;
}
return r0;
};
return closure(a0.simultaneousHandlers) || closure(a0.waitFor);
}
function setJSResponder_47169(a0, a1) { // fn#47169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:1261, offset: 0x011bac3b, size: 57 bytes, params: 3, frame: 15
(importDefault(5330) /* metro dependency 5330 */).handleSetJSResponder(a0, a1);
env0_10(a0, a1);
}
function clearJSResponder_47170() { // fn#47170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:1337, offset: 0x011bac74, size: 47 bytes, params: 1, frame: 12
(importDefault(5330) /* metro dependency 5330 */).handleClearJSResponder();
env0_11();
}
function createHandler({name, allowedProps, config, transformProps, customNativeProps}) { // fn#47171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:1832, offset: 0x011baca3, size: 135 bytes, params: 2, frame: 14
let r4 = allowedProps !== undefined ? allowedProps : [];
r4 = config !== undefined ? config : {};
const env0_4 = customNativeProps !== undefined ? customNativeProps : [];
const Component = env0_9.Component;
const value2 = _fun47172(Component);
value2.displayName = name;
value2.contextType = importDefault(5336) /* metro dependency 5336 */;
return value2;
}
function hasUnresolvedRefsExtract(a0) { // fn#47165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:1423, owner: hasUnresolvedRefs.extract, offset: 0x011babe6, size: 63 bytes, params: 2, frame: 12
var r0;
let value = a0;
const Array = global.Array;
if (Array.isArray(value)) {
value = value.some(function(a0) {
var value = a0;
return value && value.current === null;
});
r0 = value;
} else {
r0 = value && value.current === null;
}
return r0;
}
function _fun47172(a0) { // fn#47172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:1996, offset: 0x011bad2a, size: 183 bytes, params: 2, frame: 16
const closure = Handler_47173;
env1_8(closure, a0);
return env1_5(closure, [{key: 'componentDidMount', value: value_47181}, {key: 'componentDidUpdate',
value: value_47183}, {key: 'componentWillUnmount', value: value_47184}, {key: 'update', value: value_47185},
{key: 'setNativeProps', value: value_47187}, {key: 'render', value: value_47188}]);
}
function Handler_47173(a0) { // fn#47173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:2008, offset: 0x011bade1, size: 407 bytes, params: 2, frame: 22
var environment;
const handlerIDToTag = (require(5324) /* metro dependency 5324 */).handlerIDToTag;
const value = environment.__proto__.__proto__;
let binding = env2_4;
binding(this, Handler_47173);
const items = [a0];
const value3 = env2_7(Handler_47173);
const value6 = env2_6(this, _isNativeReflectConstruct_47161() ? global.Reflect.construct(value3, items,
env2_7(this).constructor) : value3.apply(this, items));
value6.handlerTag = -1;
value6.onGestureHandlerEvent = onGestureHandlerEvent_47174;
value6.onGestureHandlerStateChange = onGestureHandlerStateChange;
value6.refHandler = refHandler;
value6.createGestureHandler = createGestureHandler;
value6.attachGestureHandler = attachGestureHandler;
value6.updateGestureHandler = updateGestureHandler;
value6.config = {};
binding = env2_9;
value6.propsRef = binding.createRef();
value6.isMountedRef = binding.createRef();
value6.state = {allowTouches: true};
let id = a0.id;
if (id) {
id = a0.id;
if (handlerIDToTag[id] !== undefined) {
throw new global.Error('Handler with ID "' + a0.id + '" already registered');
}
id = a0.id;
handlerIDToTag[id] = value6.handlerTag;
}
return value6;
}
function value_47181() { // fn#47181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:4354, offset: 0x011bb3fd, size: 321 bytes, params: 1, frame: 23
var environment;
const props = this.props;
this.isMountedRef.current = true;
let value = environment.__proto__.__proto__;
if (hasUnresolvedRefs(props)) {
(require(5345) /* metro dependency 5345 */).ghQueueMicrotask(_fun47182);
}
const createGestureHandler = this.createGestureHandler;
const moduleValue2 = require(5344) /* metro dependency 5344 */;
const filterConfig = moduleValue2.filterConfig;
const r6 = transformProps ? transformProps(this.props) : this.props;
const items2 = [];
let concat = items2.concat;
const binding = env2_3;
Reflect.apply(createGestureHandler, this, [Reflect.apply(filterConfig, moduleValue2, [r6, Reflect.apply(concat,
items2, [binding(env1_1), binding(env1_4)]), env1_2])]);
if (this.viewNode) {
this.attachGestureHandler((importDefault(5347) /* metro dependency 5347 */)(this.viewNode));
return undefined;
}
const Error = global.Error;
const displayName = Handler_47173.displayName;
const HermesInternal = global.HermesInternal;
concat = HermesInternal.concat;
value = '[Gesture Handler] Failed to obtain view for ' + displayName + ". Note that old API doesn't support functional components.";
const value6 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error(value);
throw error instanceof Object ? error : value6;
}
function value_47183() { // fn#47183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:4860, offset: 0x011bb557, size: 76 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = importDefault(5347) /* metro dependency 5347 */;
value = value(this.viewNode);
if (this.viewTag !== value) {
this.attachGestureHandler(value);
}
this.update(1);
}
function value_47184() { // fn#47184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:5018, offset: 0x011bb5a3, size: 219 bytes, params: 1, frame: 17
const inspectorToggleListener = this.inspectorToggleListener;
if (inspectorToggleListener != null) {
inspectorToggleListener.remove();
}
this.isMountedRef.current = false;
const moduleValue = require(5324) /* metro dependency 5324 */;
moduleValue.unregisterOldGestureHandler(this.handlerTag);
const defaultImport = importDefault(5330) /* metro dependency 5330 */;
defaultImport.dropGestureHandler(this.handlerTag);
(require(5344) /* metro dependency 5344 */).scheduleFlushOperations();
const id = this.props.id;
if (id) {
delete moduleValue.handlerIDToTag[id];
}
const MountRegistry = (require(5346) /* metro dependency 5346 */).MountRegistry;
MountRegistry.gestureHandlerWillUnmount(this);
}
function value_47185(a0) { // fn#47185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:5408, offset: 0x011bb67e, size: 263 bytes, params: 2, frame: 23
var environment;
var r6;
var value;
var moduleValue;
var filterConfig;
var value2;
var items2;
var concat;
var binding;
var value6;
const env0_0 = a0;
if (this.isMountedRef.current) {
value = environment.__proto__.__proto__;
if (hasUnresolvedRefs(this.props)) {
if (a0 > 0) {
(require(5345) /* metro dependency 5345 */).ghQueueMicrotask(_fun47186);
} else {
moduleValue = require(5344) /* metro dependency 5344 */;
filterConfig = moduleValue.filterConfig;
value2 = environment.__proto__;
r6 = transformProps ? transformProps(this.props) : this.props;
items2 = [];
concat = items2.concat;
binding = env2_3;
value6 = Reflect.apply(filterConfig, moduleValue, [r6, Reflect.apply(concat, items2, [binding(env1_1),
binding(env1_4)]), env1_2]);
value = require(5325) /* metro dependency 5325 */;
if (!value.deepEqual(this.config, value6)) {
this.updateGestureHandler(value6);
}
}
} else {
moduleValue = require(5344) /* metro dependency 5344 */;
filterConfig = moduleValue.filterConfig;
value2 = environment.__proto__;
r6 = transformProps ? transformProps(this.props) : this.props;
items2 = [];
concat = items2.concat;
binding = env2_3;
value6 = Reflect.apply(filterConfig, moduleValue, [r6, Reflect.apply(concat, items2, [binding(env1_1),
binding(env1_4)]), env1_2]);
value = require(5325) /* metro dependency 5325 */;
if (!value.deepEqual(this.config, value6)) {
this.updateGestureHandler(value6);
}
}
}
}
function value_47187(a0) { // fn#47187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:5742, offset: 0x011bb7a6, size: 147 bytes, params: 2, frame: 21
var r4;
const Object = global.Object;
let value = Object.assign({}, this.props, a0);
const moduleValue = require(5344) /* metro dependency 5344 */;
const filterConfig = moduleValue.filterConfig;
if (transformProps) {
value = transformProps(value);
r4 = value;
} else {
r4 = value;
}
const items2 = [];
const concat = items2.concat;
const binding = env2_3;
value = binding(env1_1);
value = Reflect.apply(concat, items2, [value, binding(env1_4)]);
value = Reflect.apply(filterConfig, moduleValue, [r4, value, env1_2]);
this.updateGestureHandler(value);
}
function value_47188() { // fn#47188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:5915, offset: 0x011bb839, size: 697 bytes, params: 1, frame: 27
var r6;
var r5;
var r2;
var Error;
var prototype;
var error;
var onGestureHandlerStateChange;
var onHandlerStateChange;
var onGestureHandlerStateChange2;
var object2;
var state;
var allowTouches;
var binding;
var Children;
var only;
var children;
var value3;
var tagMessage;
var value4;
var value5;
let value = undefined;
const onGestureHandlerEvent = this.onGestureHandlerEvent;
let props = this.props;
const onGestureEvent = props.onGestureEvent;
const onGestureHandlerEvent2 = props.onGestureHandlerEvent;
if (onGestureEvent) {
if (typeof onGestureEvent !== 'function') {
if (onGestureHandlerEvent2) {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r6 = onGestureEvent;
onGestureHandlerStateChange = this.onGestureHandlerStateChange;
props = this.props;
onHandlerStateChange = props.onHandlerStateChange;
onGestureHandlerStateChange2 = props.onGestureHandlerStateChange;
if (onHandlerStateChange) {
if (typeof onHandlerStateChange !== 'function') {
if (onGestureHandlerStateChange2) {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else if (onGestureHandlerStateChange2) {
if (typeof onGestureHandlerStateChange2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else {
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
}
} else if (onGestureHandlerStateChange2) {
if (typeof onGestureHandlerStateChange2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else {
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
}
} else if (onGestureHandlerEvent2) {
if (typeof onGestureHandlerEvent2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r6 = onGestureHandlerEvent;
onGestureHandlerStateChange = this.onGestureHandlerStateChange;
props = this.props;
onHandlerStateChange = props.onHandlerStateChange;
onGestureHandlerStateChange2 = props.onGestureHandlerStateChange;
if (onHandlerStateChange) {
if (typeof onHandlerStateChange !== 'function') {
if (onGestureHandlerStateChange2) {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else if (onGestureHandlerStateChange2) {
if (typeof onGestureHandlerStateChange2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else {
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
}
} else if (onGestureHandlerStateChange2) {
if (typeof onGestureHandlerStateChange2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else {
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
}
} else {
r6 = onGestureHandlerEvent;
onGestureHandlerStateChange = this.onGestureHandlerStateChange;
props = this.props;
onHandlerStateChange = props.onHandlerStateChange;
onGestureHandlerStateChange2 = props.onGestureHandlerStateChange;
if (onHandlerStateChange) {
if (typeof onHandlerStateChange !== 'function') {
if (onGestureHandlerStateChange2) {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else if (onGestureHandlerStateChange2) {
if (typeof onGestureHandlerStateChange2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else {
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
}
} else if (onGestureHandlerStateChange2) {
if (typeof onGestureHandlerStateChange2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else {
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
}
}
} else if (onGestureHandlerEvent2) {
if (typeof onGestureHandlerEvent2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r6 = onGestureHandlerEvent;
onGestureHandlerStateChange = this.onGestureHandlerStateChange;
props = this.props;
onHandlerStateChange = props.onHandlerStateChange;
onGestureHandlerStateChange2 = props.onGestureHandlerStateChange;
if (onHandlerStateChange) {
if (typeof onHandlerStateChange !== 'function') {
if (onGestureHandlerStateChange2) {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else if (onGestureHandlerStateChange2) {
if (typeof onGestureHandlerStateChange2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else {
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
}
} else if (onGestureHandlerStateChange2) {
if (typeof onGestureHandlerStateChange2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else {
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
}
} else {
r6 = onGestureHandlerEvent;
onGestureHandlerStateChange = this.onGestureHandlerStateChange;
props = this.props;
onHandlerStateChange = props.onHandlerStateChange;
onGestureHandlerStateChange2 = props.onGestureHandlerStateChange;
if (onHandlerStateChange) {
if (typeof onHandlerStateChange !== 'function') {
if (onGestureHandlerStateChange2) {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else if (onGestureHandlerStateChange2) {
if (typeof onGestureHandlerStateChange2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else {
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
}
} else if (onGestureHandlerStateChange2) {
if (typeof onGestureHandlerStateChange2 !== 'function') {
throw new global.Error('Nesting touch handlers with native animated driver is not supported yet');
}
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
} else {
r5 = onGestureHandlerStateChange;
object2 = {};
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r6 : value;
object2.onGestureHandlerEvent = r2;
state = this.state;
allowTouches = state.allowTouches;
r2 = allowTouches ? r5 : value;
object2.onGestureHandlerStateChange = r2;
this.propsRef.current = object2;
}
}
try {
binding = env2_9;
} catch (error) {
Error = global.Error;
value = require(5325) /* metro dependency 5325 */;
tagMessage = value.tagMessage;
value4 = environment.__proto__;
value = Reflect.apply(tagMessage, value,
['' + name + ' got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.']);
prototype = Error.prototype;
value5 = Object.create(prototype, {constructor: {value: Error}});
error = new Error(value);
value = error instanceof Object ? error : value5;
throw value;
}
try {
Children = binding.Children;
} catch (error) {
Error = global.Error;
value = require(5325) /* metro dependency 5325 */;
tagMessage = value.tagMessage;
value4 = environment.__proto__;
value = Reflect.apply(tagMessage, value,
['' + name + ' got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.']);
prototype = Error.prototype;
value5 = Object.create(prototype, {constructor: {value: Error}});
error = new Error(value);
value = error instanceof Object ? error : value5;
throw value;
}
try {
only = Children.only;
} catch (error) {
Error = global.Error;
value = require(5325) /* metro dependency 5325 */;
tagMessage = value.tagMessage;
value4 = environment.__proto__;
value = Reflect.apply(tagMessage, value,
['' + name + ' got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.']);
prototype = Error.prototype;
value5 = Object.create(prototype, {constructor: {value: Error}});
error = new Error(value);
value = error instanceof Object ? error : value5;
throw value;
}
try {
props = this.props;
} catch (error) {
Error = global.Error;
value = require(5325) /* metro dependency 5325 */;
tagMessage = value.tagMessage;
value4 = environment.__proto__;
value = Reflect.apply(tagMessage, value,
['' + name + ' got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.']);
prototype = Error.prototype;
value5 = Object.create(prototype, {constructor: {value: Error}});
error = new Error(value);
value = error instanceof Object ? error : value5;
throw value;
}
try {
children = props.children;
} catch (error) {
Error = global.Error;
value = require(5325) /* metro dependency 5325 */;
tagMessage = value.tagMessage;
value4 = environment.__proto__;
value = Reflect.apply(tagMessage, value,
['' + name + ' got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.']);
prototype = Error.prototype;
value5 = Object.create(prototype, {constructor: {value: Error}});
error = new Error(value);
value = error instanceof Object ? error : value5;
throw value;
}
try {
value3 = Reflect.apply(only, Children, [children]);
} catch (error) {
Error = global.Error;
value = require(5325) /* metro dependency 5325 */;
tagMessage = value.tagMessage;
value4 = environment.__proto__;
value = Reflect.apply(tagMessage, value,
['' + name + ' got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.']);
prototype = Error.prototype;
value5 = Object.create(prototype, {constructor: {value: Error}});
error = new Error(value);
value = error instanceof Object ? error : value5;
throw value;
}
children = value3.props.children;
binding = env2_9;
const cloneElement = binding.cloneElement;
const Object = global.Object;
return Reflect.apply(cloneElement, binding, [value3, Object.assign({ref: this.refHandler, collapsable: false},
Reflect.apply((require(5325) /* metro dependency 5325 */).isTestEnv, value, []) ? {handlerType: name,
handlerTag: this.handlerTag, enabled: this.props.enabled} : {},
{testID: this.props.testID ?? value3.props.testID}, object2), children]);
}
function Handler_47173OnGestureHandlerEvent(a0) { // fn#47174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:2245, owner: Handler_47173.onGestureHandlerEvent, offset: 0x011baf78, size: 146 bytes, params: 2, frame: 12
if (a0.nativeEvent.handlerTag === env0_0.handlerTag) {
if (typeof env0_0.props.onGestureEvent === 'function') {
if (env0_0.props.onGestureEvent != null) {
env0_0.props.onGestureEvent(a0);
}
}
} else if (env0_0.props.onGestureHandlerEvent != null) {
env0_0.props.onGestureHandlerEvent(a0);
}
}
function onGestureHandlerStateChange(a0) { // fn#47175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:2499, owner: Handler_47173.onGestureHandlerStateChange, offset: 0x011bb00a, size: 216 bytes, params: 2, frame: 14
var r1;
var state;
var value2;
var property;
if (a0.nativeEvent.handlerTag === env0_0.handlerTag) {
if (typeof env0_0.props.onHandlerStateChange === 'function') {
if (env0_0.props.onHandlerStateChange != null) {
env0_0.props.onHandlerStateChange(a0);
}
}
state = a0.nativeEvent.state;
value2 = environment.__proto__.__proto__.__proto__;
property = env3_12[state];
r1 = property && env0_0.props[property];
if (r1 && typeof r1 === 'function') {
r1(a0);
}
} else if (env0_0.props.onGestureHandlerStateChange != null) {
env0_0.props.onGestureHandlerStateChange(a0);
}
}
function refHandler(a0) { // fn#47176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:2854, owner: Handler_47173.refHandler, offset: 0x011bb0e2, size: 154 bytes, params: 2, frame: 14
const binding = env0_0;
binding.viewNode = a0;
let value = environment.__proto__.__proto__.__proto__;
const Children = env3_9.Children;
const value2 = Children.only(binding.props.children);
value = undefined;
const moduleValue = require(5325) /* metro dependency 5325 */;
const r1 = moduleValue.isReact19() ? value2.props == null ? value : value2.props.ref : value2 == null ? value : value2.ref;
if (r1) {
if (typeof r1 === 'function') {
r1(a0);
} else {
r1.current = a0;
}
}
return value;
}
function createGestureHandler(a0) { // fn#47177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:3068, owner: Handler_47173.createGestureHandler, offset: 0x011bb17c, size: 101 bytes, params: 2, frame: 17
const binding = env0_0;
let value = environment.__proto__.__proto__.__proto__;
binding.handlerTag = (require(5342) /* metro dependency 5342 */).getNextHandlerTag();
binding.config = a0;
value = importDefault(5330) /* metro dependency 5330 */;
value.createGestureHandler(name, binding.handlerTag, a0);
}
function attachGestureHandler(a0) { // fn#47178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:3206, owner: Handler_47173.attachGestureHandler, offset: 0x011bb1e1, size: 400 bytes, params: 2, frame: 20
const ActionType = (require(5343) /* metro dependency 5343 */).ActionType;
const binding = env0_0;
binding.viewTag = a0;
const value3 = undefined;
const moduleValue = require(5324) /* metro dependency 5324 */;
moduleValue.registerOldGestureHandler(binding.handlerTag, {onGestureEvent: binding.onGestureHandlerEvent,
onGestureStateChange: binding.onGestureHandlerStateChange});
let props = binding.props;
const onGestureEvent = props == null ? value3 : props.onGestureEvent;
const r3 = onGestureEvent && ('current' in onGestureEvent || 'workletEventHandler' in onGestureEvent);
props = env0_0.props;
const onHandlerStateChange = props == null ? value3 : props.onHandlerStateChange;
const r6 = r3 || onHandlerStateChange && ('current' in onHandlerStateChange || 'workletEventHandler' in onHandlerStateChange) ? ActionType.REANIMATED_WORKLET : onGestureEvent && '__isNative' in onGestureEvent ? ActionType.NATIVE_ANIMATED_EVENT : ActionType.JS_FUNCTION_OLD_API;
const defaultImport = importDefault(5330) /* metro dependency 5330 */;
defaultImport.attachGestureHandler(env0_0.handlerTag, a0, r6);
(require(5344) /* metro dependency 5344 */).scheduleFlushOperations();
(require(5345) /* metro dependency 5345 */).ghQueueMicrotask(_fun47179);
return value3;
}
function updateGestureHandler(a0) { // fn#47180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:3926, owner: Handler_47173.updateGestureHandler, offset: 0x011bb3a6, size: 87 bytes, params: 2, frame: 16
const binding = env0_0;
binding.config = a0;
const value = environment.__proto__.__proto__.__proto__;
const defaultImport = importDefault(5330) /* metro dependency 5330 */;
defaultImport.updateGestureHandler(binding.handlerTag, a0);
(require(5344) /* metro dependency 5344 */).scheduleFlushOperations();
}
function _fun47182() { // fn#47182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:4489, offset: 0x011bb53e, size: 25 bytes, params: 1, frame: 11
env0_0.update(1);
}
function _fun47186() { // fn#47186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:5533, offset: 0x011bb785, size: 33 bytes, params: 1, frame: 12
env0_1.update(env0_0 - 1);
}
function _fun47179() { // fn#47179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5518:3837, offset: 0x011bb371, size: 53 bytes, params: 1, frame: 12
const MountRegistry = (require(5346) /* metro dependency 5346 */).MountRegistry;
MountRegistry.gestureHandlerWillMount(env1_0);
}