Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,524 @@
|
||||
/* Metro module 1783; source: unknown; dependencies: [57, 1613, 1621] */
|
||||
function _fun19620(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#19620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:6, offset: 0x00eafa69, size: 264 bytes, params: 8, frame: 19
|
||||
let value = require;
|
||||
let Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(dependencyMap[0]);
|
||||
const getStylesFromObject = function(a0) {
|
||||
var r0;
|
||||
var Object;
|
||||
var value;
|
||||
if (a0 === undefined) {
|
||||
r0 = {};
|
||||
} else {
|
||||
Object = global.Object;
|
||||
value = global.Object.entries(a0);
|
||||
value = Object.fromEntries(value.map(_fun19622));
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
};
|
||||
const Math = global.Math;
|
||||
const env0_10 = Math.round(1000 / ({fps: 60}).fps);
|
||||
const value2 = value(dependencyMap[1]);
|
||||
const env0_11 = value2.isJest() ? value : _fun19632;
|
||||
exports.withReanimatedTimer = function(a0) {
|
||||
global.console.warn('This method is deprecated, you should define your own before and after test hooks to enable jest.useFakeTimers(). Check out the documentation for details on testing');
|
||||
global.jest.useFakeTimers();
|
||||
a0();
|
||||
global.jest.runOnlyPendingTimers();
|
||||
global.jest.useRealTimers();
|
||||
};
|
||||
exports.advanceAnimationByTime = advanceAnimationByTime;
|
||||
exports.advanceAnimationByFrame = advanceAnimationByFrame;
|
||||
exports.setUpTests = setUpTests;
|
||||
exports.getAnimatedStyle = function(a0) {
|
||||
return getCurrentStyle(a0);
|
||||
};
|
||||
}
|
||||
|
||||
function getStylesFromObject(a0) { // fn#19621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:121, offset: 0x00eafb71, size: 68 bytes, params: 2, frame: 13
|
||||
var r0;
|
||||
var Object;
|
||||
var fromEntries;
|
||||
var value;
|
||||
if (a0 === undefined) {
|
||||
r0 = {};
|
||||
} else {
|
||||
Object = global.Object;
|
||||
fromEntries = Object.fromEntries;
|
||||
value = global.Object.entries(a0);
|
||||
value = Reflect.apply(fromEntries, Object, [value.map(_fun19622)]);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getCurrentStyle(a0) { // fn#19623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:309, offset: 0x00eafbf6, size: 312 bytes, params: 2, frame: 24
|
||||
var r5;
|
||||
var r3;
|
||||
var forEach;
|
||||
var value2;
|
||||
var getStylesFromObjectBinding;
|
||||
var Object;
|
||||
var keys;
|
||||
var length;
|
||||
var value5;
|
||||
var assign;
|
||||
var object2;
|
||||
var value7;
|
||||
var stylesFromObjectBinding;
|
||||
var binding;
|
||||
var value9;
|
||||
var error;
|
||||
let value = undefined;
|
||||
const style = a0.props.style;
|
||||
let env0_0 = {};
|
||||
let Array = global.Array;
|
||||
reducibleJoin2: while (true) {
|
||||
if (Array.isArray(style)) {
|
||||
forEach = style.forEach;
|
||||
Reflect.apply(forEach, style, [_fun19624]);
|
||||
break reducibleJoin2;
|
||||
}
|
||||
break reducibleJoin2;
|
||||
}
|
||||
const jestInlineStyle = a0.props.jestInlineStyle;
|
||||
const jestAnimatedStyle = a0.props.jestAnimatedStyle;
|
||||
reducibleJoin4: while (true) {
|
||||
if (jestAnimatedStyle == null) {
|
||||
r5 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value2 = jestAnimatedStyle.value;
|
||||
r5 = value2;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
Array = global.Array;
|
||||
if (!Array.isArray(jestInlineStyle)) {
|
||||
value = getStylesFromObject(jestInlineStyle);
|
||||
reducibleJoin7: while (true) {
|
||||
if (r5) {
|
||||
Object = global.Object;
|
||||
keys = Object.keys;
|
||||
length = Reflect.apply(keys, Object, [r5]).length;
|
||||
value5 = length === 0;
|
||||
r3 = value5;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
r3 = !r5;
|
||||
break reducibleJoin7;
|
||||
}
|
||||
Object = global.Object;
|
||||
assign = Object.assign;
|
||||
object2 = {};
|
||||
if (r3) {
|
||||
value = Reflect.apply(assign, Object, [object2, value]);
|
||||
r3 = value;
|
||||
} else {
|
||||
value = Reflect.apply(assign, Object, [object2, r5]);
|
||||
r3 = value;
|
||||
}
|
||||
env0_0 = r3;
|
||||
return r3;
|
||||
}
|
||||
const iterator = jestInlineStyle[Symbol.iterator]();
|
||||
const iterator2 = iterator.next;
|
||||
r3 = iterator;
|
||||
let item2 = Reflect.apply(iterator2, r3, []);
|
||||
let item = item2.value;
|
||||
item2 = item2.done ? undefined : r3;
|
||||
reducibleJoin13: while (true) {
|
||||
if (item2 === value) {
|
||||
Object = global.Object;
|
||||
value = Object.assign({}, env0_0, r5);
|
||||
env0_0 = value;
|
||||
return value;
|
||||
}
|
||||
break reducibleJoin13;
|
||||
}
|
||||
reducibleLoop13: while (true) {
|
||||
try {
|
||||
value7 = 'jestAnimatedValues' in item;
|
||||
} catch (error) {
|
||||
try {
|
||||
item2.return();
|
||||
} catch {
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
reducibleJoin12: while (true) {
|
||||
if (value7) {
|
||||
r3 = item2;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
try {
|
||||
getStylesFromObjectBinding = getStylesFromObject;
|
||||
} catch (error) {
|
||||
try {
|
||||
item2.return();
|
||||
} catch {
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
stylesFromObjectBinding = getStylesFromObjectBinding(item);
|
||||
} catch (error) {
|
||||
try {
|
||||
item2.return();
|
||||
} catch {
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
Object = global.Object;
|
||||
} catch (error) {
|
||||
try {
|
||||
item2.return();
|
||||
} catch {
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
assign = Object.assign;
|
||||
} catch (error) {
|
||||
try {
|
||||
item2.return();
|
||||
} catch {
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
binding = env0_0;
|
||||
} catch (error) {
|
||||
try {
|
||||
item2.return();
|
||||
} catch {
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
object2 = {};
|
||||
} catch (error) {
|
||||
try {
|
||||
item2.return();
|
||||
} catch {
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
value9 = Reflect.apply(assign, Object, [object2, binding, stylesFromObjectBinding]);
|
||||
} catch (error) {
|
||||
try {
|
||||
item2.return();
|
||||
} catch {
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
try {
|
||||
env0_0 = value9;
|
||||
} catch (error) {
|
||||
try {
|
||||
item2.return();
|
||||
} catch {
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
r3 = item2;
|
||||
break reducibleJoin12;
|
||||
}
|
||||
item2 = Reflect.apply(iterator2, r3, []);
|
||||
item = item2.value;
|
||||
item2 = item2.done ? undefined : r3;
|
||||
if (item2 === value) {
|
||||
break reducibleLoop13;
|
||||
}
|
||||
continue reducibleLoop13;
|
||||
}
|
||||
Object = global.Object;
|
||||
return Object.assign({}, env0_0, r5);
|
||||
}
|
||||
|
||||
function checkEqual(a0, a1) { // fn#19625, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:774, offset: 0x00eafd56, size: 217 bytes, params: 3, frame: 22
|
||||
var r8;
|
||||
var r3;
|
||||
var value;
|
||||
var properties;
|
||||
var properties2;
|
||||
var properties3;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var checkEqualBinding;
|
||||
var property;
|
||||
var length;
|
||||
let Array = global.Array;
|
||||
if (Array.isArray(a1)) {
|
||||
Array = global.Array;
|
||||
if (Array.isArray(a0)) {
|
||||
length = a1.length;
|
||||
if (length !== a0.length) {
|
||||
return false;
|
||||
}
|
||||
length = a0.length;
|
||||
value = 0;
|
||||
if (value < length) {
|
||||
r3 = value;
|
||||
loopExit14: while (true) {
|
||||
checkEqualBinding = checkEqual;
|
||||
property = a0[r3];
|
||||
if (checkEqualBinding(property, a1[r3])) {
|
||||
value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
||||
length = a0.length;
|
||||
if (!(value < length)) {
|
||||
return true;
|
||||
}
|
||||
r3 = value;
|
||||
continue;
|
||||
}
|
||||
break loopExit14;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (typeof a0 === 'object') {
|
||||
if (a0) {
|
||||
if (typeof a1 !== 'object') {
|
||||
return false;
|
||||
}
|
||||
if (a1) {
|
||||
properties = Object.keys(a1);
|
||||
properties2 = 0;
|
||||
properties3 = properties.length;
|
||||
if (properties === undefined) {
|
||||
return true;
|
||||
}
|
||||
r8 = properties2;
|
||||
loopExit6: while (true) {
|
||||
propertyName = properties[r8];
|
||||
propertyName2 = r8 + 1;
|
||||
if (propertyName === undefined) {
|
||||
return true;
|
||||
}
|
||||
checkEqualBinding = checkEqual;
|
||||
property = a0[propertyName];
|
||||
if (checkEqualBinding(property, a1[propertyName])) {
|
||||
r8 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
break loopExit6;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return a0 === a1;
|
||||
}
|
||||
|
||||
function compareAndFormatDifferences(a0, a1) { // fn#19626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:1056, offset: 0x00eafe2f, size: 411 bytes, params: 3, frame: 29
|
||||
var r5;
|
||||
var r13;
|
||||
var r9;
|
||||
var propertyName;
|
||||
var propertyName2;
|
||||
var checkEqualBinding;
|
||||
var property;
|
||||
var Object;
|
||||
var keys;
|
||||
var length;
|
||||
var properties4;
|
||||
var properties5;
|
||||
var propertyName3;
|
||||
const r4 = arguments.length > 2 && arguments[2] !== undefined && arguments[2];
|
||||
const items = [];
|
||||
value = true;
|
||||
const value2 = false;
|
||||
let properties = Object.keys(a1);
|
||||
const properties2 = 0;
|
||||
const properties3 = properties.length;
|
||||
if (properties === undefined) {
|
||||
r9 = value;
|
||||
} else {
|
||||
r5 = value;
|
||||
r13 = properties2;
|
||||
while (true) {
|
||||
propertyName = properties[r13];
|
||||
propertyName2 = r13 + 1;
|
||||
if (propertyName === undefined) {
|
||||
r9 = r5;
|
||||
break;
|
||||
}
|
||||
checkEqualBinding = checkEqual;
|
||||
property = a0[propertyName];
|
||||
if (checkEqualBinding(property, a1[propertyName])) {
|
||||
r13 = propertyName2;
|
||||
continue;
|
||||
}
|
||||
items.push({property: propertyName, current: a0[propertyName], expect: a1[propertyName]});
|
||||
r5 = value2;
|
||||
r13 = propertyName2;
|
||||
}
|
||||
}
|
||||
if (r4) {
|
||||
Object = global.Object;
|
||||
keys = Object.keys;
|
||||
length = Reflect.apply(keys, Object, [a0]).length;
|
||||
Object = global.Object;
|
||||
keys = Object.keys;
|
||||
if (length === Reflect.apply(keys, Object, [a1]).length) {
|
||||
r5 = r9;
|
||||
} else {
|
||||
properties = Object.keys(a0);
|
||||
properties4 = 0;
|
||||
properties5 = properties.length;
|
||||
if (properties === undefined) {
|
||||
r5 = value2;
|
||||
} else {
|
||||
r9 = properties4;
|
||||
while (true) {
|
||||
propertyName = properties[r9];
|
||||
propertyName3 = r9 + 1;
|
||||
if (propertyName === undefined) {
|
||||
r5 = value2;
|
||||
break;
|
||||
}
|
||||
if (a1[propertyName] !== undefined) {
|
||||
r9 = propertyName3;
|
||||
continue;
|
||||
}
|
||||
items.push({property: propertyName, current: a0[propertyName], expect: a1[propertyName]});
|
||||
r9 = propertyName3;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
r5 = r9;
|
||||
}
|
||||
const {isEqual, diffs} = {isEqual: r5, diffs: items};
|
||||
if (isEqual) {
|
||||
return {message: function() {
|
||||
return 'ok';
|
||||
}, pass: value};
|
||||
}
|
||||
let JSON = global.JSON;
|
||||
const env0_0 = JSON.stringify(a0);
|
||||
JSON = global.JSON;
|
||||
const env0_1 = JSON.stringify(a1);
|
||||
const env0_2 = diffs.map(function(a0) {
|
||||
var property = a0.property;
|
||||
var JSON = global.JSON;
|
||||
var value = JSON.stringify(a0.expect);
|
||||
var JSON2 = global.JSON;
|
||||
return "- '" + property + "' should be " + value + ', but is ' + JSON2.stringify(a0.current);
|
||||
}).join('\n');
|
||||
return {message: message, pass: value2};
|
||||
}
|
||||
|
||||
function compareProps(a0, a1) { // fn#19630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:1817, offset: 0x00eb0062, size: 160 bytes, params: 3, frame: 15
|
||||
var r5;
|
||||
var Object;
|
||||
var keys;
|
||||
var value;
|
||||
let props = a0.props;
|
||||
let jestAnimatedProps = props.jestAnimatedProps;
|
||||
if (jestAnimatedProps) {
|
||||
Object = global.Object;
|
||||
keys = Object.keys;
|
||||
props = a0.props;
|
||||
jestAnimatedProps = props.jestAnimatedProps;
|
||||
value = jestAnimatedProps.value;
|
||||
if (Reflect.apply(keys, Object, [value]).length === 0) {
|
||||
return {message: function() {
|
||||
return "Component doesn't have props.";
|
||||
}, pass: false};
|
||||
}
|
||||
props = a0.props;
|
||||
jestAnimatedProps = props.jestAnimatedProps;
|
||||
value = undefined;
|
||||
r5 = jestAnimatedProps == null ? value : jestAnimatedProps.value;
|
||||
} else {
|
||||
r5 = a0.props.jestAnimatedProps?.value;
|
||||
}
|
||||
const object2 = {};
|
||||
return compareAndFormatDifferences(r5 ? global.Object.assign(object2, r5) : object2, a1);
|
||||
}
|
||||
|
||||
function _fun19632() { // fn#19632, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:2201, offset: 0x00eb010a, size: 59 bytes, params: 1, frame: 11
|
||||
const ReanimatedError = (require(1621) /* metro dependency 1621 */).ReanimatedError;
|
||||
throw new ReanimatedError('`setUpTests` is available only in Jest environment.');
|
||||
}
|
||||
|
||||
function advanceAnimationByTime() { // fn#19634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:2687, offset: 0x00eb019c, size: 93 bytes, params: 1, frame: 14
|
||||
const r4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : env0_10;
|
||||
global.console.warn('This method is deprecated, use jest.advanceTimersByTime directly');
|
||||
global.jest.advanceTimersByTime(r4);
|
||||
global.jest.runOnlyPendingTimers();
|
||||
}
|
||||
|
||||
function advanceAnimationByFrame(a0) { // fn#19635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:2948, offset: 0x00eb01f9, size: 75 bytes, params: 2, frame: 13
|
||||
global.console.warn('This method is deprecated, use jest.advanceTimersByTime directly');
|
||||
global.jest.advanceTimersByTime(a0 * env0_10);
|
||||
global.jest.runOnlyPendingTimers();
|
||||
}
|
||||
|
||||
function setUpTests() { // fn#19636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:3137, offset: 0x00eb0244, size: 203 bytes, params: 1, frame: 20
|
||||
var r3;
|
||||
var value2;
|
||||
const r9 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
||||
const expect = env0_0.expect;
|
||||
if (expect !== undefined) {
|
||||
r3 = expect;
|
||||
} else {
|
||||
value2 = env0_11('expect');
|
||||
r3 = value2 !== undefined && value2.extend !== undefined ? value2 : value2.default;
|
||||
}
|
||||
const Object = global.Object;
|
||||
const value5 = Object.assign({}, env0_4, r9);
|
||||
const Math = global.Math;
|
||||
env0_10 = Math.round(1000 / value5.fps);
|
||||
r3.extend({toHaveAnimatedProps: function(a0, a1) {
|
||||
return compareProps(a0, a1);
|
||||
}});
|
||||
r3.extend({toHaveAnimatedStyle: function(a0, a1) {
|
||||
return _fun19639(a0, a1, arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {});
|
||||
}});
|
||||
}
|
||||
|
||||
function _fun19622(a0) { // fn#19622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:216, offset: 0x00eafbb5, size: 65 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__;
|
||||
value = env1_3(a0, 2);
|
||||
const property = value[0];
|
||||
const property2 = value[1];
|
||||
return [property, property2._isReanimatedSharedValue ? property2.value : property2];
|
||||
}
|
||||
|
||||
function _fun19624(a0) { // fn#19624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:393, offset: 0x00eafd2e, size: 40 bytes, params: 2, frame: 16
|
||||
const Object = global.Object;
|
||||
env0_0 = Object.assign({}, env0_0, a0);
|
||||
}
|
||||
|
||||
function compareAndFormatDifferencesMessage_19629() { // fn#19629, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:1724, owner: compareAndFormatDifferences.message, offset: 0x00eb002e, size: 52 bytes, params: 1, frame: 19
|
||||
return 'Expected: ' + env0_1 + '\nReceived: ' + env0_0 + '\n\nDifferences:\n' + env0_2;
|
||||
}
|
||||
|
||||
function toHaveAnimatedStyle(a0, a1) { // fn#19638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:3479, owner: setUpTests.toHaveAnimatedStyle, offset: 0x00eb0326, size: 52 bytes, params: 3, frame: 15
|
||||
return compareStyle(a0, a1, arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {});
|
||||
}
|
||||
|
||||
function compareStyle(a0, a1, a2) { // fn#19639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1910:3520, owner: setUpTests.toHaveAnimatedStyle.compareStyle, offset: 0x00eb035a, size: 79 bytes, params: 4, frame: 15
|
||||
var environment;
|
||||
var shouldMatchAllProps;
|
||||
var value;
|
||||
if (a0.props.style) {
|
||||
shouldMatchAllProps = a2.shouldMatchAllProps;
|
||||
value = environment.__proto__.__proto__;
|
||||
return compareAndFormatDifferences(getCurrentStyle(a0), a1, shouldMatchAllProps);
|
||||
}
|
||||
return {message: function() {
|
||||
return "Component doesn't have a style.";
|
||||
}, pass: false};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user