401 lines
20 KiB
JavaScript
401 lines
20 KiB
JavaScript
/* Metro module 1202; source: unknown; dependencies: [65, 6, 7, 15, 17, 18, 31, 27, 826, 1200, 1173, 1163, 1166] */
|
|
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 Module00065 from './module-00065.js'; /* Metro dependency 65 */
|
|
import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as Module00826Module from './module-00826.js'; /* Metro dependency 826 */
|
|
|
|
function _fun13327(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#13327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:6, offset: 0x00de808f, size: 395 bytes, params: 8, frame: 19
|
|
let env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const StyleSheet = ReactNativeModule.StyleSheet;
|
|
const env0_10 = StyleSheet.create({wrapperView: {flex: 1}});
|
|
const Component = value.Component;
|
|
value = _fun13336(Component);
|
|
value.displayName = '__Sentry.TouchEventBoundary';
|
|
value.defaultProps = {'breadcrumbCategory': 'touch', 'breadcrumbType': 'user', 'ignoreNames': null,
|
|
'maxComponentTreeSize': 20, ignoreNames: []};
|
|
exports.TouchEventBoundary = value;
|
|
exports.withTouchEventBoundary = function(a0, a1) {
|
|
var env0_0 = a0;
|
|
var env0_1 = a1;
|
|
var closure = _fun13347;
|
|
closure.displayName = 'WithTouchEventBoundary';
|
|
return closure;
|
|
};
|
|
function _isNativeReflectConstruct_13328() { // fn#13328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:202, offset: 0x00de821a, 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_13328_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function getTouchedComponentInfo({elementType, memoizedProps}, a1) { // fn#13331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:2891, offset: 0x00de8278, size: 157 bytes, params: 3, frame: 19
|
|
var r0;
|
|
var object;
|
|
var moduleValue;
|
|
var dropUndefinedKeys;
|
|
const value = undefined;
|
|
const displayName = elementType === null || value === elementType ? value : elementType.displayName;
|
|
if (memoizedProps) {
|
|
moduleValue = require(826) /* metro dependency 826 */;
|
|
dropUndefinedKeys = moduleValue.dropUndefinedKeys;
|
|
object = {};
|
|
object.name = getComponentName_13332(memoizedProps) || displayName;
|
|
object.element = getElementName(memoizedProps);
|
|
object.file = getFileName(memoizedProps);
|
|
object.label = getLabelValue(memoizedProps, a1);
|
|
r0 = Reflect.apply(dropUndefinedKeys, moduleValue, [object]);
|
|
} else {
|
|
r0 = displayName ? {name: displayName} : value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getComponentName_13332(a0) { // fn#13332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:3168, offset: 0x00de8315, size: 84 bytes, params: 2, frame: 5
|
|
let r0 = typeof a0[env0_12] === 'string' && a0[env0_12].length > 0 && a0[env0_12] !== 'unknown' && a0[env0_12];
|
|
r0 = !r0 ? undefined : r0;
|
|
return r0;
|
|
}
|
|
|
|
function getElementName(a0) { // fn#13333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:3272, offset: 0x00de8369, size: 84 bytes, params: 2, frame: 5
|
|
let r0 = typeof a0[env0_13] === 'string' && a0[env0_13].length > 0 && a0[env0_13] !== 'unknown' && a0[env0_13];
|
|
r0 = !r0 ? undefined : r0;
|
|
return r0;
|
|
}
|
|
|
|
function getFileName(a0) { // fn#13334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:3374, offset: 0x00de83bd, size: 84 bytes, params: 2, frame: 5
|
|
let r0 = typeof a0[env0_14] === 'string' && a0[env0_14].length > 0 && a0[env0_14] !== 'unknown' && a0[env0_14];
|
|
r0 = !r0 ? undefined : r0;
|
|
return r0;
|
|
}
|
|
|
|
function getLabelValue(a0, a1) { // fn#13335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:3473, offset: 0x00de8411, size: 105 bytes, params: 3, frame: 7
|
|
return typeof a0[env0_11] !== 'string' ? typeof a1 !== 'string' || typeof a0[a1] !== 'string' ? undefined : a0[a1].length > 0 ? a0[a1] : undefined : a0[env0_11].length > 0 ? a0[env0_11] : typeof a1 !== 'string' || typeof a0[a1] !== 'string' ? undefined : a0[a1].length > 0 ? a0[a1] : undefined;
|
|
}
|
|
|
|
function _fun13336(a0) { // fn#13336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:557, offset: 0x00de847a, size: 187 bytes, params: 2, frame: 16
|
|
const TouchEventBoundary2 = TouchEventBoundary;
|
|
Inherits(TouchEventBoundary2, a0);
|
|
return CreateClass(TouchEventBoundary2, [{key: 'componentDidMount', value: value_13338}, {key: 'render',
|
|
value: value_13339}, {key: '_logTouchEvent', value: value_13340}, {key: '_isNameIgnored', value: value_13341},
|
|
{key: '_onTouchStart', value: value_13343}, {key: '_pushIfNotIgnored', value: value_13345}]);
|
|
function TouchEventBoundary() { // fn#13337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:569, offset: 0x00de8535, size: 123 bytes, params: 1, frame: 20
|
|
let value = environment.__proto__;
|
|
env1_3(this, TouchEventBoundary);
|
|
const value3 = env1_6(TouchEventBoundary);
|
|
value = env1_5(this, _isNativeReflectConstruct_13328() ? global.Reflect.construct(value3, arguments,
|
|
env1_6(this).constructor) : value3.apply(this, arguments));
|
|
value.name = 'TouchEventBoundary';
|
|
return value;
|
|
}
|
|
|
|
function value_13338() { // fn#13338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:922, offset: 0x00de85b0, size: 118 bytes, params: 1, frame: 16
|
|
var call;
|
|
let value = environment.__proto__;
|
|
const value2 = undefined;
|
|
const client = (Module00826Module).getClient();
|
|
const addIntegration = client == null ? value2 : client.addIntegration;
|
|
if (!(addIntegration === null || value2 === addIntegration)) {
|
|
call = addIntegration.call;
|
|
value = require(1200) /* metro dependency 1200 */;
|
|
Reflect.apply(call, addIntegration, [client, value.createIntegration(this.name)]);
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
function value_13339() { // fn#13339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:1104, offset: 0x00de8626, size: 76 bytes, params: 1, frame: 17
|
|
const binding = env1_8;
|
|
const createElement = binding.createElement;
|
|
const object = {};
|
|
object.style = env1_10.wrapperView;
|
|
object.onTouchStart = this._onTouchStart.bind(this);
|
|
return Reflect.apply(createElement, binding, [View, object, this.props.children]);
|
|
}
|
|
|
|
function value_13340(a0, a1) { // fn#13340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:1263, offset: 0x00de8672, size: 323 bytes, params: 3, frame: 19
|
|
var r5;
|
|
const debug = (require(826) /* metro dependency 826 */).debug;
|
|
var name;
|
|
var file;
|
|
var object;
|
|
var props;
|
|
let value = a1;
|
|
const property = a0[0];
|
|
if (property) {
|
|
if (value) {
|
|
r5 = value;
|
|
} else {
|
|
name = property.name;
|
|
file = property.file;
|
|
value = '';
|
|
value = value + name + (file ? ' (' + property.file + ')' : value);
|
|
r5 = value;
|
|
}
|
|
object = {};
|
|
props = this.props;
|
|
object.category = props.breadcrumbCategory;
|
|
object.data = {path: a0};
|
|
object.level = 'info';
|
|
object.message = 'Touch event within element: ' + r5;
|
|
props = this.props;
|
|
object.type = props.breadcrumbType;
|
|
value = environment.__proto__;
|
|
value = require(826) /* metro dependency 826 */;
|
|
value.addBreadcrumb(object);
|
|
debug.log('[TouchEvents] ' + object.message);
|
|
} else {
|
|
value = environment.__proto__;
|
|
debug.warn('[TouchEvents] No root component found in touch path.');
|
|
}
|
|
}
|
|
|
|
function value_13341(a0) { // fn#13341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:1684, offset: 0x00de87b5, size: 110 bytes, params: 2, frame: 17
|
|
var environment;
|
|
var r2;
|
|
var items2;
|
|
var concat;
|
|
var value;
|
|
var binding;
|
|
const env0_0 = a0;
|
|
const r3 = this.props.ignoreNames || [];
|
|
if (this.props.ignoredDisplayNames) {
|
|
items2 = [];
|
|
concat = items2.concat;
|
|
value = environment.__proto__;
|
|
binding = env1_2;
|
|
value = binding(r3);
|
|
value = Reflect.apply(concat, items2, [value, binding(this.props.ignoredDisplayNames)]);
|
|
r2 = value;
|
|
} else {
|
|
r2 = r3;
|
|
}
|
|
return r2.some(_fun13342);
|
|
function _fun13342(a0) { // fn#13342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:1845, offset: 0x00de8823, size: 69 bytes, params: 2, frame: 13
|
|
let r0 = typeof a0 === 'string' && env0_0 === a0;
|
|
r0 = !r0 ? a0 instanceof global.RegExp && env0_0.match(a0) : r0;
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
function value_13343(a0) { // fn#13343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:1954, offset: 0x00de8868, size: 426 bytes, params: 2, frame: 19
|
|
var environment;
|
|
var displayName;
|
|
var r8;
|
|
var label;
|
|
var object;
|
|
var props;
|
|
var maxComponentTreeSize;
|
|
var length;
|
|
var elementType;
|
|
var value;
|
|
var displayName2;
|
|
var value3;
|
|
var getTouchedComponentInfoBinding;
|
|
var labelName;
|
|
var touchedComponentInfoBinding;
|
|
var property;
|
|
var displayName3;
|
|
var value5;
|
|
var moduleValue;
|
|
var startUserInteractionSpan;
|
|
var value6;
|
|
let _targetInst = a0._targetInst;
|
|
if (_targetInst) {
|
|
_targetInst = a0._targetInst;
|
|
object = [];
|
|
if (_targetInst) {
|
|
props = this.props;
|
|
maxComponentTreeSize = props.maxComponentTreeSize;
|
|
if (maxComponentTreeSize) {
|
|
length = object.length;
|
|
props = this.props;
|
|
maxComponentTreeSize = props.maxComponentTreeSize;
|
|
if (length < maxComponentTreeSize) {
|
|
elementType = _targetInst.elementType;
|
|
value = undefined;
|
|
displayName = elementType === null || value === elementType ? value : elementType.displayName;
|
|
displayName2 = TouchEventBoundary.displayName;
|
|
value3 = environment.__proto__;
|
|
if (displayName !== displayName2) {
|
|
r8 = _targetInst;
|
|
while (true) {
|
|
getTouchedComponentInfoBinding = getTouchedComponentInfo;
|
|
props = this.props;
|
|
labelName = props.labelName;
|
|
touchedComponentInfoBinding = getTouchedComponentInfoBinding(r8, labelName);
|
|
this._pushIfNotIgnored(object, touchedComponentInfoBinding);
|
|
property = r8.return;
|
|
if (!property) {
|
|
break;
|
|
}
|
|
props = this.props;
|
|
maxComponentTreeSize = props.maxComponentTreeSize;
|
|
if (maxComponentTreeSize) {
|
|
length = object.length;
|
|
props = this.props;
|
|
maxComponentTreeSize = props.maxComponentTreeSize;
|
|
if (length < maxComponentTreeSize) {
|
|
elementType = property.elementType;
|
|
if (elementType === null) {
|
|
displayName = value;
|
|
continue;
|
|
}
|
|
if (value === elementType) {
|
|
displayName = value;
|
|
continue;
|
|
}
|
|
displayName = elementType.displayName;
|
|
displayName3 = TouchEventBoundary.displayName;
|
|
if (displayName !== displayName3) {
|
|
r8 = property;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
value = object.find(function(a0) {
|
|
return a0.label;
|
|
});
|
|
value5 = undefined;
|
|
label = value === null || value5 === value ? value5 : value.label;
|
|
length = object.length;
|
|
if (length > 0) {
|
|
this._logTouchEvent(object, label);
|
|
}
|
|
value = environment.__proto__;
|
|
moduleValue = require(1173) /* metro dependency 1173 */;
|
|
startUserInteractionSpan = moduleValue.startUserInteractionSpan;
|
|
object = {elementId: label};
|
|
object.op = (require(1163) /* metro dependency 1163 */).UI_ACTION_TOUCH;
|
|
value6 = Reflect.apply(startUserInteractionSpan, moduleValue, [object]);
|
|
if (value6) {
|
|
value6.setAttribute((require(826) /* metro dependency 826 */).SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
|
|
(require(1166) /* metro dependency 1166 */).SPAN_ORIGIN_AUTO_INTERACTION);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function withTouchEventBoundary(a0, a1) { // fn#13346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:3817, offset: 0x00de8af8, size: 35 bytes, params: 3, frame: 2
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const WrappedComponent2 = WrappedComponent;
|
|
WrappedComponent2.displayName = 'WithTouchEventBoundary';
|
|
return WrappedComponent2;
|
|
function WrappedComponent(a0) { // fn#13347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:3860, owner: withTouchEventBoundary.WrappedComponent, offset: 0x00de8b1b, size: 110 bytes, params: 2, frame: 21
|
|
const binding = env1_8;
|
|
const createElement = binding.createElement;
|
|
const binding2 = env1_15;
|
|
let Object = global.Object;
|
|
const value3 = Object.assign({}, require ?? ({}));
|
|
const binding3 = env1_8;
|
|
const createElement2 = binding3.createElement;
|
|
const binding4 = env0_0;
|
|
Object = global.Object;
|
|
return Reflect.apply(createElement, binding, [binding2, value3, Reflect.apply(createElement2, binding3, [binding4,
|
|
Object.assign({}, a0)])]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function value_13345(a0, a1) { // fn#13345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1329:2635, offset: 0x00de8a1c, size: 220 bytes, params: 3, frame: 20
|
|
var r2;
|
|
var r3;
|
|
var r5;
|
|
var r4;
|
|
var r1;
|
|
var r0;
|
|
var name;
|
|
var label;
|
|
var JSON;
|
|
let value = !!a1;
|
|
if (a1) {
|
|
name = a1.name;
|
|
value = !name;
|
|
r2 = name ? value : !a1.label;
|
|
value = !r2;
|
|
if (r2) {
|
|
r1 = value;
|
|
} else {
|
|
name = a1.name;
|
|
value = !name;
|
|
r2 = name ? !this._isNameIgnored(a1.name) : value;
|
|
if (r2) {
|
|
label = a1.label;
|
|
value = !label;
|
|
r3 = label ? !this._isNameIgnored(a1.label) : value;
|
|
if (r3) {
|
|
value = a0.length > 0;
|
|
if (value) {
|
|
JSON = global.JSON;
|
|
value = JSON.stringify(a0[a0.length - 1]);
|
|
JSON = global.JSON;
|
|
value = value === JSON.stringify(a1);
|
|
r5 = value;
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
value = !r5;
|
|
if (r5) {
|
|
r4 = value;
|
|
} else {
|
|
a0.push(a1);
|
|
r4 = true;
|
|
}
|
|
r3 = r4;
|
|
}
|
|
r2 = r3;
|
|
}
|
|
r1 = r2;
|
|
}
|
|
r0 = r1;
|
|
} else {
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
global.__d(_fun13327, 1202, [65, 6, 7, 15, 17, 18, 31, 27, 826, 1200, 1173, 1163,
|
|
1166]) /* metro module 1202, dependencies: [65, 6, 7, 15, 17, 18, 31, 27, 826, 1200, 1173, 1163, 1166] */;
|