1065 lines
46 KiB
React
1065 lines
46 KiB
React
/* Metro module 5317; source: unknown; dependencies: [65, 29, 6, 7, 15, 17, 18, 31, 27, 33, 5318, 5402, 1485, 5403, 1588, 5429, 5432] */
|
|
function _fun47048(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#47048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:6, offset: 0x011b7774, size: 346 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const env0_3 = ['state', 'descriptors'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = importDefault(65) /* metro dependency 65 */;
|
|
const env0_5 = importDefault(29) /* metro dependency 29 */;
|
|
const env0_6 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_7 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_8 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_9 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_10 = importDefault(18) /* metro dependency 18 */;
|
|
let value = importAll(31) /* metro dependency 31 */;
|
|
const {StyleSheet, View} = require(27) /* metro dependency 27 */;
|
|
const env0_11 = (require(33) /* metro dependency 33 */).jsx;
|
|
const GestureHandlerRootView = (require(5318) /* metro dependency 5318 */).GestureHandlerRootView;
|
|
const env0_12 = GestureHandlerRootView ?? View;
|
|
const Component = value.Component;
|
|
value = _fun47052(Component);
|
|
const env0_13 = StyleSheet.create({container: {flex: 1}});
|
|
exports.default = value;
|
|
}
|
|
|
|
function _isNativeReflectConstruct_47049() { // fn#47049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:261, offset: 0x011b78ce, 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_47049_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun47052(a0) { // fn#47052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:562, offset: 0x011b792c, size: 96 bytes, params: 2, frame: 17
|
|
const closure = StackView;
|
|
env0_10(closure, a0);
|
|
return env0_7(closure, [{key: 'render', value: value_47078}], [{key: 'getDerivedStateFromProps',
|
|
value: value_47082}]);
|
|
}
|
|
|
|
function StackView() { // fn#47053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:574, offset: 0x011b798c, size: 370 bytes, params: 1, frame: 21
|
|
var environment;
|
|
var r2;
|
|
var r6;
|
|
var r0;
|
|
var value7;
|
|
var Reflect;
|
|
var construct;
|
|
let value = environment.__proto__;
|
|
let binding = env1_6;
|
|
binding(this, StackView);
|
|
const length = arguments.length;
|
|
const Array = global.Array;
|
|
const array = new Array(length);
|
|
const value6 = 0;
|
|
if (value6 < length) {
|
|
r2 = value6;
|
|
reducibleLoop1: while (true) {
|
|
array[r2] = arguments[r2];
|
|
value7 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value7 < length) {
|
|
r2 = value7;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
const value8 = [].concat(array);
|
|
const value9 = env1_9(StackView);
|
|
binding = env1_8;
|
|
if (_isNativeReflectConstruct_47049()) {
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
reducibleJoin6: while (true) {
|
|
if (value8) {
|
|
r6 = value8;
|
|
break reducibleJoin6;
|
|
}
|
|
r6 = [];
|
|
break reducibleJoin6;
|
|
}
|
|
r0 = Reflect.apply(construct, Reflect, [value9, r6, env1_9(this).constructor]);
|
|
} else {
|
|
r0 = value9.apply(this, value8);
|
|
}
|
|
value = binding(this, r0);
|
|
value.state = {routes: [], previousRoutes: [], previousDescriptors: {}, openingRouteKeys: [], closingRouteKeys: [],
|
|
replacingRouteKeys: [], descriptors: {}};
|
|
value.getPreviousRoute = getPreviousRoute;
|
|
value.renderScene = renderScene;
|
|
value.renderHeader = renderHeader_47058;
|
|
value.handleOpenRoute = handleOpenRoute;
|
|
value.handleCloseRoute = handleCloseRoute;
|
|
value.handleTransitionStart = handleTransitionStart;
|
|
value.handleTransitionEnd = handleTransitionEnd;
|
|
value.handleGestureStart = handleGestureStart;
|
|
value.handleGestureEnd = handleGestureEnd;
|
|
value.handleGestureCancel = handleGestureCancel;
|
|
return value;
|
|
}
|
|
|
|
function value_47078() { // fn#47078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:3218, offset: 0x011b8051, size: 211 bytes, params: 1, frame: 19
|
|
const props = this.props;
|
|
let state = props.state;
|
|
props.descriptors;
|
|
let binding = env1_5;
|
|
const env0_2 = binding(props, env1_3);
|
|
state = this.state;
|
|
const env0_3 = state.routes;
|
|
const env0_4 = state.descriptors;
|
|
const env0_5 = state.openingRouteKeys;
|
|
const env0_6 = state.closingRouteKeys;
|
|
binding = env1_12;
|
|
const container = env1_13.container;
|
|
const SafeAreaProviderCompat = (require(5403) /* metro dependency 5403 */).SafeAreaProviderCompat;
|
|
const SafeAreaInsetsContext = (require(1588) /* metro dependency 1588 */).SafeAreaInsetsContext;
|
|
const Consumer = SafeAreaInsetsContext.Consumer;
|
|
return ((Component) => <Component style={container}><SafeAreaProviderCompat><Consumer>{children_47079}</Consumer></SafeAreaProviderCompat></Component>)(binding);
|
|
}
|
|
|
|
function value_47082(a0, a1) { // fn#47082, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:4218, offset: 0x011b82a7, size: 1432 bytes, params: 3, frame: 40
|
|
var environment;
|
|
var r19;
|
|
var r1;
|
|
var r13;
|
|
var r14;
|
|
var r15;
|
|
var r20;
|
|
var r9;
|
|
var r10;
|
|
var r12;
|
|
var r2;
|
|
var r3;
|
|
var r4;
|
|
var r7;
|
|
var r8;
|
|
var value;
|
|
var length;
|
|
var index;
|
|
var slice;
|
|
var openingRouteKeys;
|
|
var closingRouteKeys;
|
|
var replacingRouteKeys;
|
|
var property;
|
|
var property2;
|
|
var closure;
|
|
var key;
|
|
var splice;
|
|
var apply;
|
|
var items;
|
|
var concat;
|
|
var value4;
|
|
var binding;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var value9;
|
|
var value10;
|
|
var value12;
|
|
var value13;
|
|
var value14;
|
|
var value16;
|
|
var value17;
|
|
var value18;
|
|
var value20;
|
|
let env0_0 = a0;
|
|
const env0_1 = a1;
|
|
let state = a0.state;
|
|
let routes = state.routes;
|
|
let previousRoutes = a1.previousRoutes;
|
|
if (routes === previousRoutes) {
|
|
routes = a1.routes;
|
|
length = routes.length;
|
|
if (length) {
|
|
routes = a1.routes;
|
|
previousRoutes = a1.previousRoutes;
|
|
if (a0.descriptors === a1.previousDescriptors) {
|
|
r1 = a1.previousDescriptors;
|
|
r2 = a0.descriptors;
|
|
} else {
|
|
value = a1.routes.reduce(_fun47087, {});
|
|
r1 = a0.descriptors;
|
|
r2 = value;
|
|
}
|
|
state = a0.state;
|
|
if (state.routes === a1.previousRoutes) {
|
|
r3 = previousRoutes;
|
|
r4 = routes;
|
|
} else {
|
|
state = a0.state;
|
|
routes = state.routes;
|
|
var env0_2 = routes.reduce(function(a0, a1) {
|
|
a0[a1.key] = a1;
|
|
return a0;
|
|
}, {});
|
|
routes = a1.routes;
|
|
value = routes.map(_fun47089);
|
|
state = a0.state;
|
|
routes = state.routes;
|
|
r3 = routes;
|
|
r4 = value;
|
|
}
|
|
return {routes: r4, previousRoutes: r3, descriptors: r2, previousDescriptors: r1};
|
|
}
|
|
state = a0.state;
|
|
index = state.index;
|
|
state = a0.state;
|
|
routes = state.routes;
|
|
length = routes.length;
|
|
if (index < length - 1) {
|
|
state = a0.state;
|
|
routes = state.routes;
|
|
slice = routes.slice;
|
|
state = a0.state;
|
|
r19 = Reflect.apply(slice, routes, [0, state.index + 1]);
|
|
} else {
|
|
r19 = a0.state.routes;
|
|
}
|
|
openingRouteKeys = a1.openingRouteKeys;
|
|
closingRouteKeys = a1.closingRouteKeys;
|
|
replacingRouteKeys = a1.replacingRouteKeys;
|
|
previousRoutes = a1.previousRoutes;
|
|
length = previousRoutes.length;
|
|
property = previousRoutes[length - 1];
|
|
length = r19.length;
|
|
property2 = r19[length - 1];
|
|
closure = isAnimationEnabled;
|
|
var isAnimationEnabled = closure;
|
|
if (property) {
|
|
key = property.key;
|
|
if (key !== property2.key) {
|
|
if (previousRoutes.some(_fun47091)) {
|
|
if (r19.some(_fun47092)) {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
} else {
|
|
value = closure(property.key);
|
|
if (value && !closingRouteKeys.includes(property.key)) {
|
|
items = [];
|
|
concat = items.concat;
|
|
value = environment.__proto__;
|
|
binding = env1_4;
|
|
value = binding(closingRouteKeys);
|
|
value = Reflect.apply(concat, items, [value, [property.key]]);
|
|
value17 = openingRouteKeys.filter(_fun47093);
|
|
value18 = replacingRouteKeys.filter(_fun47094);
|
|
value20 = [].concat(binding(r19), [property]);
|
|
r1 = value18;
|
|
r2 = value;
|
|
r9 = value17;
|
|
r10 = value20;
|
|
} else {
|
|
r1 = replacingRouteKeys;
|
|
r2 = closingRouteKeys;
|
|
r9 = openingRouteKeys;
|
|
r10 = r19;
|
|
}
|
|
r3 = r1;
|
|
r4 = r2;
|
|
r7 = r9;
|
|
r8 = r10;
|
|
}
|
|
} else {
|
|
key = property2.key;
|
|
value = closure(key);
|
|
r1 = value && !openingRouteKeys.includes(property2.key);
|
|
if (r1) {
|
|
items = [];
|
|
concat = items.concat;
|
|
value = environment.__proto__;
|
|
value6 = env1_4(openingRouteKeys);
|
|
key = property2.key;
|
|
value7 = Reflect.apply(concat, items, [value6, [key]]);
|
|
value8 = closingRouteKeys.filter(_fun47095);
|
|
value9 = replacingRouteKeys.filter(_fun47096);
|
|
if (r19.some(_fun47097)) {
|
|
r1 = value9;
|
|
r9 = value8;
|
|
r10 = value7;
|
|
r12 = r19;
|
|
} else {
|
|
value10 = value7.filter(_fun47098);
|
|
key = property2.key;
|
|
r13 = a0.descriptors[key] || a1.descriptors[key];
|
|
r14 = r13.options.animationTypeForReplace ?? 'push';
|
|
if (r14 === 'pop') {
|
|
items = [];
|
|
concat = items.concat;
|
|
binding = env1_4;
|
|
value = binding(value8);
|
|
value = Reflect.apply(concat, items, [value, [property.key]]);
|
|
value14 = value10.filter(_fun47099);
|
|
value16 = [].concat(binding(r19), [property]);
|
|
r13 = value9;
|
|
r14 = value;
|
|
r15 = value14;
|
|
r20 = value16;
|
|
} else {
|
|
items = [];
|
|
concat = items.concat;
|
|
value = env1_4(value9);
|
|
value = Reflect.apply(concat, items, [value, [property.key]]);
|
|
value12 = value8.filter(_fun47100);
|
|
value13 = r19.slice();
|
|
value13.splice(value13.length - 1, 0, property);
|
|
r13 = value;
|
|
r14 = value12;
|
|
r15 = value10;
|
|
r20 = value13;
|
|
}
|
|
r1 = r13;
|
|
r9 = r14;
|
|
r10 = r15;
|
|
r12 = r20;
|
|
}
|
|
r3 = r1;
|
|
r4 = r9;
|
|
r7 = r10;
|
|
r8 = r12;
|
|
} else {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
}
|
|
}
|
|
} else if (replacingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items,
|
|
[env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else if (closingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items,
|
|
[env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
}
|
|
} else if (replacingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items, [env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else if (closingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items, [env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
}
|
|
length = r8.length;
|
|
if (length) {
|
|
return {routes: r8, previousRoutes: a0.state.routes, previousDescriptors: a0.descriptors,
|
|
openingRouteKeys: r7,
|
|
closingRouteKeys: r4, replacingRouteKeys: r3, descriptors: r8.reduce(_fun47102, {})};
|
|
}
|
|
throw new global.Error('There should always be at least one route in the navigation state.');
|
|
}
|
|
value = a0.state.routes.map(function(a0) {
|
|
return a0.key;
|
|
});
|
|
if (((a0, a1) => {
|
|
var env0_0 = a1;
|
|
return a0.length === a1.length && a0.every(_fun47084);
|
|
})(value, a1.previousRoutes.map(function(a0) {
|
|
return a0.key;
|
|
}))) {
|
|
routes = a1.routes;
|
|
length = routes.length;
|
|
if (length) {
|
|
routes = a1.routes;
|
|
previousRoutes = a1.previousRoutes;
|
|
if (a0.descriptors === a1.previousDescriptors) {
|
|
r1 = a1.previousDescriptors;
|
|
r2 = a0.descriptors;
|
|
} else {
|
|
value = a1.routes.reduce(_fun47087, {});
|
|
r1 = a0.descriptors;
|
|
r2 = value;
|
|
}
|
|
state = a0.state;
|
|
if (state.routes === a1.previousRoutes) {
|
|
r3 = previousRoutes;
|
|
r4 = routes;
|
|
} else {
|
|
state = a0.state;
|
|
routes = state.routes;
|
|
var env0_2 = routes.reduce(function(a0, a1) {
|
|
a0[a1.key] = a1;
|
|
return a0;
|
|
}, {});
|
|
routes = a1.routes;
|
|
value = routes.map(_fun47089);
|
|
state = a0.state;
|
|
routes = state.routes;
|
|
r3 = routes;
|
|
r4 = value;
|
|
}
|
|
return {routes: r4, previousRoutes: r3, descriptors: r2, previousDescriptors: r1};
|
|
}
|
|
state = a0.state;
|
|
index = state.index;
|
|
state = a0.state;
|
|
routes = state.routes;
|
|
length = routes.length;
|
|
if (index < length - 1) {
|
|
state = a0.state;
|
|
routes = state.routes;
|
|
slice = routes.slice;
|
|
state = a0.state;
|
|
r19 = Reflect.apply(slice, routes, [0, state.index + 1]);
|
|
} else {
|
|
r19 = a0.state.routes;
|
|
}
|
|
openingRouteKeys = a1.openingRouteKeys;
|
|
closingRouteKeys = a1.closingRouteKeys;
|
|
replacingRouteKeys = a1.replacingRouteKeys;
|
|
previousRoutes = a1.previousRoutes;
|
|
length = previousRoutes.length;
|
|
property = previousRoutes[length - 1];
|
|
length = r19.length;
|
|
property2 = r19[length - 1];
|
|
closure = isAnimationEnabled;
|
|
var isAnimationEnabled = closure;
|
|
if (property) {
|
|
key = property.key;
|
|
if (key !== property2.key) {
|
|
if (previousRoutes.some(_fun47091)) {
|
|
if (r19.some(_fun47092)) {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
} else {
|
|
value = closure(property.key);
|
|
if (value && !closingRouteKeys.includes(property.key)) {
|
|
items = [];
|
|
concat = items.concat;
|
|
value = environment.__proto__;
|
|
binding = env1_4;
|
|
value = binding(closingRouteKeys);
|
|
value = Reflect.apply(concat, items, [value, [property.key]]);
|
|
value17 = openingRouteKeys.filter(_fun47093);
|
|
value18 = replacingRouteKeys.filter(_fun47094);
|
|
value20 = [].concat(binding(r19), [property]);
|
|
r1 = value18;
|
|
r2 = value;
|
|
r9 = value17;
|
|
r10 = value20;
|
|
} else {
|
|
r1 = replacingRouteKeys;
|
|
r2 = closingRouteKeys;
|
|
r9 = openingRouteKeys;
|
|
r10 = r19;
|
|
}
|
|
r3 = r1;
|
|
r4 = r2;
|
|
r7 = r9;
|
|
r8 = r10;
|
|
}
|
|
} else {
|
|
key = property2.key;
|
|
value = closure(key);
|
|
r1 = value && !openingRouteKeys.includes(property2.key);
|
|
if (r1) {
|
|
items = [];
|
|
concat = items.concat;
|
|
value = environment.__proto__;
|
|
value6 = env1_4(openingRouteKeys);
|
|
key = property2.key;
|
|
value7 = Reflect.apply(concat, items, [value6, [key]]);
|
|
value8 = closingRouteKeys.filter(_fun47095);
|
|
value9 = replacingRouteKeys.filter(_fun47096);
|
|
if (r19.some(_fun47097)) {
|
|
r1 = value9;
|
|
r9 = value8;
|
|
r10 = value7;
|
|
r12 = r19;
|
|
} else {
|
|
value10 = value7.filter(_fun47098);
|
|
key = property2.key;
|
|
r13 = a0.descriptors[key] || a1.descriptors[key];
|
|
r14 = r13.options.animationTypeForReplace ?? 'push';
|
|
if (r14 === 'pop') {
|
|
items = [];
|
|
concat = items.concat;
|
|
binding = env1_4;
|
|
value = binding(value8);
|
|
value = Reflect.apply(concat, items, [value, [property.key]]);
|
|
value14 = value10.filter(_fun47099);
|
|
value16 = [].concat(binding(r19), [property]);
|
|
r13 = value9;
|
|
r14 = value;
|
|
r15 = value14;
|
|
r20 = value16;
|
|
} else {
|
|
items = [];
|
|
concat = items.concat;
|
|
value = env1_4(value9);
|
|
value = Reflect.apply(concat, items, [value, [property.key]]);
|
|
value12 = value8.filter(_fun47100);
|
|
value13 = r19.slice();
|
|
value13.splice(value13.length - 1, 0, property);
|
|
r13 = value;
|
|
r14 = value12;
|
|
r15 = value10;
|
|
r20 = value13;
|
|
}
|
|
r1 = r13;
|
|
r9 = r14;
|
|
r10 = r15;
|
|
r12 = r20;
|
|
}
|
|
r3 = r1;
|
|
r4 = r9;
|
|
r7 = r10;
|
|
r8 = r12;
|
|
} else {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
}
|
|
}
|
|
} else if (replacingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items,
|
|
[env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else if (closingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items,
|
|
[env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
}
|
|
} else if (replacingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items, [env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else if (closingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items, [env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
}
|
|
length = r8.length;
|
|
if (length) {
|
|
return {routes: r8, previousRoutes: a0.state.routes, previousDescriptors: a0.descriptors,
|
|
openingRouteKeys: r7,
|
|
closingRouteKeys: r4, replacingRouteKeys: r3, descriptors: r8.reduce(_fun47102, {})};
|
|
}
|
|
throw new global.Error('There should always be at least one route in the navigation state.');
|
|
}
|
|
if (a0.state.index < a0.state.routes.length - 1) {
|
|
state = a0.state;
|
|
routes = state.routes;
|
|
slice = routes.slice;
|
|
state = a0.state;
|
|
r19 = Reflect.apply(slice, routes, [0, state.index + 1]);
|
|
} else {
|
|
r19 = a0.state.routes;
|
|
}
|
|
openingRouteKeys = a1.openingRouteKeys;
|
|
closingRouteKeys = a1.closingRouteKeys;
|
|
replacingRouteKeys = a1.replacingRouteKeys;
|
|
previousRoutes = a1.previousRoutes;
|
|
property = previousRoutes[previousRoutes.length - 1];
|
|
property2 = r19[r19.length - 1];
|
|
closure = isAnimationEnabled;
|
|
if (property) {
|
|
key = property.key;
|
|
if (key !== property2.key) {
|
|
if (previousRoutes.some(_fun47091)) {
|
|
if (r19.some(_fun47092)) {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
} else {
|
|
value = closure(property.key);
|
|
if (value && !closingRouteKeys.includes(property.key)) {
|
|
items = [];
|
|
concat = items.concat;
|
|
value = environment.__proto__;
|
|
binding = env1_4;
|
|
value = binding(closingRouteKeys);
|
|
value = Reflect.apply(concat, items, [value, [property.key]]);
|
|
value17 = openingRouteKeys.filter(_fun47093);
|
|
value18 = replacingRouteKeys.filter(_fun47094);
|
|
value20 = [].concat(binding(r19), [property]);
|
|
r1 = value18;
|
|
r2 = value;
|
|
r9 = value17;
|
|
r10 = value20;
|
|
} else {
|
|
r1 = replacingRouteKeys;
|
|
r2 = closingRouteKeys;
|
|
r9 = openingRouteKeys;
|
|
r10 = r19;
|
|
}
|
|
r3 = r1;
|
|
r4 = r2;
|
|
r7 = r9;
|
|
r8 = r10;
|
|
}
|
|
} else {
|
|
key = property2.key;
|
|
value = closure(key);
|
|
r1 = value && !openingRouteKeys.includes(property2.key);
|
|
if (r1) {
|
|
items = [];
|
|
concat = items.concat;
|
|
value = environment.__proto__;
|
|
value6 = env1_4(openingRouteKeys);
|
|
key = property2.key;
|
|
value7 = Reflect.apply(concat, items, [value6, [key]]);
|
|
value8 = closingRouteKeys.filter(_fun47095);
|
|
value9 = replacingRouteKeys.filter(_fun47096);
|
|
if (r19.some(_fun47097)) {
|
|
r1 = value9;
|
|
r9 = value8;
|
|
r10 = value7;
|
|
r12 = r19;
|
|
} else {
|
|
value10 = value7.filter(_fun47098);
|
|
key = property2.key;
|
|
r13 = a0.descriptors[key] || a1.descriptors[key];
|
|
r14 = r13.options.animationTypeForReplace ?? 'push';
|
|
if (r14 === 'pop') {
|
|
items = [];
|
|
concat = items.concat;
|
|
binding = env1_4;
|
|
value = binding(value8);
|
|
value = Reflect.apply(concat, items, [value, [property.key]]);
|
|
value14 = value10.filter(_fun47099);
|
|
value16 = [].concat(binding(r19), [property]);
|
|
r13 = value9;
|
|
r14 = value;
|
|
r15 = value14;
|
|
r20 = value16;
|
|
} else {
|
|
items = [];
|
|
concat = items.concat;
|
|
value = env1_4(value9);
|
|
value = Reflect.apply(concat, items, [value, [property.key]]);
|
|
value12 = value8.filter(_fun47100);
|
|
value13 = r19.slice();
|
|
value13.splice(value13.length - 1, 0, property);
|
|
r13 = value;
|
|
r14 = value12;
|
|
r15 = value10;
|
|
r20 = value13;
|
|
}
|
|
r1 = r13;
|
|
r9 = r14;
|
|
r10 = r15;
|
|
r12 = r20;
|
|
}
|
|
r3 = r1;
|
|
r4 = r9;
|
|
r7 = r10;
|
|
r8 = r12;
|
|
} else {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
}
|
|
}
|
|
} else if (replacingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items, [env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else if (closingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items, [env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
}
|
|
} else if (replacingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items, [env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else if (closingRouteKeys.length) {
|
|
value = r19.slice();
|
|
splice = value.splice;
|
|
apply = splice.apply;
|
|
items = [value.length - 1, 0];
|
|
concat = items.concat;
|
|
value4 = environment.__proto__;
|
|
Reflect.apply(apply, splice, [value, Reflect.apply(concat, items, [env1_4(a1.routes.filter(_fun47101))])]);
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = value;
|
|
} else {
|
|
r3 = replacingRouteKeys;
|
|
r4 = closingRouteKeys;
|
|
r7 = openingRouteKeys;
|
|
r8 = r19;
|
|
}
|
|
if (r8.length) {
|
|
return {routes: r8, previousRoutes: a0.state.routes, previousDescriptors: a0.descriptors, openingRouteKeys: r7,
|
|
closingRouteKeys: r4, replacingRouteKeys: r3, descriptors: r8.reduce(_fun47102, {})};
|
|
}
|
|
const Error = global.Error;
|
|
throw new Error('There should always be at least one route in the navigation state.');
|
|
}
|
|
|
|
function getPreviousRoute({route}) { // fn#47054, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:1017, owner: StackView.getPreviousRoute, offset: 0x011b7afe, size: 106 bytes, params: 2, frame: 12
|
|
const state = route.state;
|
|
const env0_1 = state.closingRouteKeys;
|
|
const env0_2 = state.replacingRouteKeys;
|
|
const value = route.state.routes.filter(_fun47055);
|
|
return value[value.findIndex(function({key}) {
|
|
return key === route.key;
|
|
}) - 1];
|
|
}
|
|
|
|
function renderScene({route}) { // fn#47057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:1278, owner: StackView.renderScene, offset: 0x011b7bb7, size: 80 bytes, params: 2, frame: 11
|
|
const r2 = env0_0.state.descriptors[route.key] || env0_0.props.descriptors[route.key];
|
|
return r2 ? r2.render() : null;
|
|
}
|
|
|
|
function StackViewRenderHeader(a0) { // fn#47058, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:1402, owner: StackView.renderHeader, offset: 0x011b7c07, size: 61 bytes, params: 2, frame: 16
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(5402) /* metro dependency 5402 */;
|
|
const Object = global.Object;
|
|
return ((Component) => <Component {...Object.assign({}, a0)} />)(value);
|
|
}
|
|
|
|
function handleOpenRoute({route}) { // fn#47059, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:1472, owner: StackView.handleOpenRoute, offset: 0x011b7c44, size: 183 bytes, params: 2, frame: 17
|
|
var routeNames;
|
|
var routes;
|
|
const env0_0 = route;
|
|
const {state, navigation} = env0_0.props;
|
|
const {closingRouteKeys, replacingRouteKeys} = env0_0.state;
|
|
if (closingRouteKeys.some(function(a0) {
|
|
return a0 === route.key;
|
|
})) {
|
|
if (replacingRouteKeys.every(_fun47061)) {
|
|
routeNames = state.routeNames;
|
|
if (routeNames.includes(route.name)) {
|
|
routes = state.routes;
|
|
if (routes.some(_fun47062)) {
|
|
env0_0.setState(_fun47063);
|
|
} else {
|
|
navigation.navigate(route);
|
|
}
|
|
} else {
|
|
env0_0.setState(_fun47063);
|
|
}
|
|
} else {
|
|
env0_0.setState(_fun47063);
|
|
}
|
|
} else {
|
|
env0_0.setState(_fun47063);
|
|
}
|
|
}
|
|
|
|
function handleCloseRoute({route}) { // fn#47067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:2116, owner: StackView.handleCloseRoute, offset: 0x011b7dd5, size: 183 bytes, params: 2, frame: 19
|
|
var environment;
|
|
var dispatch;
|
|
var Object;
|
|
var assign;
|
|
var object2;
|
|
var key;
|
|
const env0_0 = route;
|
|
var value;
|
|
const {state, navigation} = env0_0.props;
|
|
const routes = state.routes;
|
|
if (routes.some(function({key}) {
|
|
return key === route.key;
|
|
})) {
|
|
dispatch = navigation.dispatch;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
value = environment.__proto__.__proto__;
|
|
value = (require(1485) /* metro dependency 1485 */).StackActions.pop();
|
|
object2 = {};
|
|
key = route.key;
|
|
object2.source = key;
|
|
key = state.key;
|
|
object2.target = key;
|
|
Reflect.apply(dispatch, navigation, [Reflect.apply(assign, Object, [{}, value, object2])]);
|
|
} else {
|
|
env0_0.setState(_fun47069);
|
|
}
|
|
}
|
|
|
|
function handleTransitionStart({route}, a1) { // fn#47073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:2587, owner: StackView.handleTransitionStart, offset: 0x011b7efd, size: 74 bytes, params: 3, frame: 14
|
|
return env0_0.props.navigation.emit({type: 'transitionStart', data: {closing: a1}, target: route.key});
|
|
}
|
|
|
|
function handleTransitionEnd({route}, a1) { // fn#47074, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:2725, owner: StackView.handleTransitionEnd, offset: 0x011b7f47, size: 74 bytes, params: 3, frame: 14
|
|
return env0_0.props.navigation.emit({type: 'transitionEnd', data: {closing: a1}, target: route.key});
|
|
}
|
|
|
|
function handleGestureStart({route}) { // fn#47075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:2860, owner: StackView.handleGestureStart, offset: 0x011b7f91, size: 64 bytes, params: 2, frame: 13
|
|
env0_0.props.navigation.emit({type: 'gestureStart', target: route.key});
|
|
}
|
|
|
|
function handleGestureEnd({route}) { // fn#47076, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:2966, owner: StackView.handleGestureEnd, offset: 0x011b7fd1, size: 64 bytes, params: 2, frame: 13
|
|
env0_0.props.navigation.emit({type: 'gestureEnd', target: route.key});
|
|
}
|
|
|
|
function handleGestureCancel({route}) { // fn#47077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:3073, owner: StackView.handleGestureCancel, offset: 0x011b8011, size: 64 bytes, params: 2, frame: 13
|
|
env0_0.props.navigation.emit({type: 'gestureCancel', target: route.key});
|
|
}
|
|
|
|
function value_47078Children(a0) { // fn#47079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:3514, owner: value_47078.children, offset: 0x011b8124, size: 63 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
const Consumer = (importDefault(5429) /* metro dependency 5429 */).Consumer;
|
|
return (
|
|
<Consumer>
|
|
{children_47080}
|
|
</Consumer>
|
|
);
|
|
}
|
|
|
|
function value_47082IsArrayEqual(a0, a1) { // fn#47083, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:4296, owner: value_47082.isArrayEqual, offset: 0x011b883f, size: 47 bytes, params: 3, frame: 12
|
|
const env0_0 = a1;
|
|
return a0.length === a1.length && a0.every(function(a0, a1) {
|
|
return a0 === require[a1];
|
|
});
|
|
}
|
|
|
|
function _fun47087(a0, a1) { // fn#47087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:4648, offset: 0x011b886e, size: 61 bytes, params: 3, frame: 6
|
|
a0[a1.key] = env0_0.descriptors[a1.key] || require.descriptors[a1.key];
|
|
return a0;
|
|
}
|
|
|
|
function _fun47089(a0) { // fn#47089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:4866, offset: 0x011b88bc, size: 27 bytes, params: 2, frame: 3
|
|
const value = a0;
|
|
return env0_2[value.key] || value;
|
|
}
|
|
|
|
function isAnimationEnabled(a0) { // fn#47090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:5204, owner: value_47082.isAnimationEnabled, offset: 0x011b88d7, size: 62 bytes, params: 2, frame: 4
|
|
const r1 = env0_0.descriptors[a0] || require.descriptors[a0];
|
|
return r1 ? r1.options.animationEnabled !== false : !r1;
|
|
}
|
|
|
|
function _fun47091({key}) { // fn#47091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:5347, offset: 0x011b8915, size: 26 bytes, params: 2, frame: 2
|
|
return key === env0_6.key;
|
|
}
|
|
|
|
function _fun47092({key}) { // fn#47092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:5391, offset: 0x011b892f, size: 26 bytes, params: 2, frame: 2
|
|
return key === env0_5.key;
|
|
}
|
|
|
|
function _fun47093(a0) { // fn#47093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:5497, offset: 0x011b8949, size: 21 bytes, params: 2, frame: 2
|
|
return a0 !== env0_5.key;
|
|
}
|
|
|
|
function _fun47095(a0) { // fn#47095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:5665, offset: 0x011b895e, size: 21 bytes, params: 2, frame: 2
|
|
return a0 !== env0_6.key;
|
|
}
|
|
|
|
function _fun47101({key}) { // fn#47101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:6298, offset: 0x011b8973, size: 67 bytes, params: 2, frame: 13
|
|
const isAnimationEnabled2 = isAnimationEnabled(key);
|
|
return isAnimationEnabled2 ? replacingRouteKeys.includes(key) || closingRouteKeys.includes(key) : !!isAnimationEnabled2;
|
|
}
|
|
|
|
function _fun47055(a0) { // fn#47055, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:1122, offset: 0x011b7b68, size: 79 bytes, params: 2, frame: 14
|
|
return a0.key === route.key || !closingRouteKeys.includes(a0.key) && !replacingRouteKeys.includes(a0.key);
|
|
}
|
|
|
|
function _fun47061(a0) { // fn#47061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:1637, offset: 0x011b7d10, size: 21 bytes, params: 2, frame: 2
|
|
return a0 !== route.key;
|
|
}
|
|
|
|
function _fun47063(a0) { // fn#47063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:1779, offset: 0x011b7d25, size: 119 bytes, params: 2, frame: 15
|
|
const env0_0 = a0;
|
|
const object2 = {};
|
|
const length = a0.replacingRouteKeys.length;
|
|
const routes = a0.routes;
|
|
object2.routes = length ? routes.filter(_fun47064) : routes;
|
|
object2.openingRouteKeys = a0.openingRouteKeys.filter(function(a0) {
|
|
return a0 !== route.key;
|
|
});
|
|
object2.closingRouteKeys = a0.closingRouteKeys.filter(function(a0) {
|
|
return a0 !== route.key;
|
|
});
|
|
object2.replacingRouteKeys = [];
|
|
return object2;
|
|
}
|
|
|
|
function _fun47069({routes, openingRouteKeys, closingRouteKeys}) { // fn#47069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:2327, offset: 0x011b7e8c, size: 87 bytes, params: 2, frame: 14
|
|
const object2 = {};
|
|
object2.routes = routes.filter(function({key}) {
|
|
return key !== route.key;
|
|
});
|
|
object2.openingRouteKeys = openingRouteKeys.filter(function(a0) {
|
|
return a0 !== route.key;
|
|
});
|
|
object2.closingRouteKeys = closingRouteKeys.filter(function(a0) {
|
|
return a0 !== route.key;
|
|
});
|
|
return object2;
|
|
}
|
|
|
|
function children_body(a0) { // fn#47080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:3572, owner: value_47078.children.body, offset: 0x011b8163, size: 69 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
const HeaderShownContext = (require(5403) /* metro dependency 5403 */).HeaderShownContext;
|
|
const Consumer = HeaderShownContext.Consumer;
|
|
return (
|
|
<Consumer>
|
|
{children_47081}
|
|
</Consumer>
|
|
);
|
|
}
|
|
|
|
function _fun47064({key}) { // fn#47064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:1850, offset: 0x011b7d9c, size: 36 bytes, params: 2, frame: 11
|
|
const replacingRouteKeys = env0_0.replacingRouteKeys;
|
|
return !replacingRouteKeys.includes(key);
|
|
}
|
|
|
|
function children_body_47081(a0) { // fn#47081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5495:3650, owner: value_47078.children.body.body, offset: 0x011b81a8, size: 255 bytes, params: 2, frame: 18
|
|
let value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
value = importDefault(5432) /* metro dependency 5432 */;
|
|
const Object = global.Object;
|
|
const assign = Object.assign;
|
|
const binding = env2_0;
|
|
const getPreviousRoute = binding.getPreviousRoute;
|
|
return ((Component) => <Component {...Reflect.apply(assign, Object, [{insets: env1_0, isParentHeaderShown: a0,
|
|
isParentModal: env0_0, getPreviousRoute: getPreviousRoute, routes: routes, openingRouteKeys: openingRouteKeys,
|
|
closingRouteKeys: closingRouteKeys, onOpenRoute: binding.handleOpenRoute,
|
|
onCloseRoute: binding.handleCloseRoute, onTransitionStart: binding.handleTransitionStart,
|
|
onTransitionEnd: binding.handleTransitionEnd, renderHeader: binding.renderHeader,
|
|
renderScene: binding.renderScene, state: state, descriptors: descriptors,
|
|
onGestureStart: binding.handleGestureStart, onGestureEnd: binding.handleGestureEnd,
|
|
onGestureCancel: binding.handleGestureCancel}, env2_2])} />)(value);
|
|
}
|
|
|