211 lines
7.9 KiB
TypeScript
211 lines
7.9 KiB
TypeScript
/* Metro module 16252; source: modules/libdiscore/libDiscoreSmokeTest.tsx; dependencies: [5, 661, 3, 1876, 1873, 1870, 683, 2] */
|
|
function _fun125607(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#125607, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:6, offset: 0x025de493, size: 264 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const closure = function() {
|
|
return _libDiscoreSmokeTest.apply(this, arguments);
|
|
};
|
|
const closure2 = function() {
|
|
require(dependencyMap[5]).ALL_LIBDISCORE_EXPERIMENTS.forEach(_fun125613);
|
|
importDefault(dependencyMap[6]).track(AnalyticEvents.LIBDISCORE_LOADED, {success: true,
|
|
experimental_features: []});
|
|
};
|
|
const closure3 = formatErrorMessage;
|
|
const closure4 = trackLibdiscoreFailure;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_4 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
|
let value = importDefault(3) /* metro dependency 3: Logger */;
|
|
value = new value('libdiscore');
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/libdiscore/libDiscoreSmokeTest.tsx');
|
|
exports.default = closure;
|
|
exports.libDiscoreSmokeTest = closure;
|
|
exports.trackLibdiscoreSuccess = closure2;
|
|
exports.formatErrorMessage = closure3;
|
|
exports.trackLibdiscoreFailure = closure4;
|
|
}
|
|
|
|
function _libDiscoreSmokeTest() { // fn#125609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:246, offset: 0x025de59b, size: 50 bytes, params: 1, frame: 14
|
|
return env0_3(_fun125611).apply(this, arguments);
|
|
}
|
|
|
|
function trackLibdiscoreSuccess() { // fn#125612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:551, offset: 0x025de67d, size: 113 bytes, params: 1, frame: 16
|
|
const ALL_LIBDISCORE_EXPERIMENTS = (require(1870) /* metro dependency 1870: libdiscoreExperiments */).ALL_LIBDISCORE_EXPERIMENTS;
|
|
ALL_LIBDISCORE_EXPERIMENTS.forEach(_fun125613);
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const LIBDISCORE_LOADED = AnalyticEvents.LIBDISCORE_LOADED;
|
|
Reflect.apply(track, defaultImport, [LIBDISCORE_LOADED, {success: true, experimental_features: []}]);
|
|
}
|
|
|
|
function formatErrorMessage(a0) { // fn#125614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:768, offset: 0x025de718, size: 147 bytes, params: 2, frame: 17
|
|
var r6;
|
|
var name;
|
|
var r4;
|
|
var value;
|
|
var message;
|
|
const Error = global.Error;
|
|
if (a0 instanceof Error) {
|
|
message = a0.message;
|
|
name = a0.name;
|
|
r6 = message;
|
|
} else {
|
|
value = null;
|
|
r6 = value != a0 ? global.String(a0) : 'Unknown error';
|
|
name = value;
|
|
}
|
|
if (r6.length > 1000) {
|
|
value = r6.substring(0, 997);
|
|
value += '...';
|
|
r4 = value;
|
|
} else {
|
|
r4 = r6;
|
|
}
|
|
return name == null ? r4 : '' + name + ': ' + r4;
|
|
}
|
|
|
|
function trackLibdiscoreFailure(a0) { // fn#125615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:966, offset: 0x025de7ab, size: 94 bytes, params: 2, frame: 16
|
|
env0_5.error('Failed to execute smoke test:', a0);
|
|
const value2 = formatErrorMessage(a0);
|
|
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
const track = defaultImport.track;
|
|
const LIBDISCORE_LOADED = AnalyticEvents.LIBDISCORE_LOADED;
|
|
Reflect.apply(track, defaultImport, [LIBDISCORE_LOADED, {success: false, error: value2}]);
|
|
}
|
|
|
|
function* _fun125611() { // fn#125611, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:309, offset: 0x025de5d8, size: 165 bytes, params: 1, frame: 17
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value3;
|
|
var initLibdiscore;
|
|
var value4;
|
|
var value5;
|
|
var value6;
|
|
var binding3;
|
|
var value7;
|
|
var rustMultiply;
|
|
var value8;
|
|
var info;
|
|
var error;
|
|
if (true) {
|
|
value = environment.__proto__.__proto__;
|
|
if (!env2_6) {
|
|
reducibleJoin3: while (true) {
|
|
reduciblePort29: while (true) {
|
|
exceptionLanding28: while (true) {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
break reducibleJoin3;
|
|
}
|
|
env2_10(error);
|
|
break reduciblePort29;
|
|
}
|
|
env2_6 = true;
|
|
return undefined;
|
|
}
|
|
try {
|
|
binding2 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
property = binding2[3];
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
value3 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
initLibdiscore = value3.initLibdiscore;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
value4 = Reflect.apply(initLibdiscore, value3, []);
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
yield value4;
|
|
try {
|
|
value5 = undefined;
|
|
value6 = false;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
if (value6) {
|
|
return value5;
|
|
}
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
binding3 = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
property = binding3[4];
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
value7 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
rustMultiply = value7.rustMultiply;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
value8 = Reflect.apply(rustMultiply, value7, [6, 7]);
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
binding = env2_5;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
info = binding.info;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
Reflect.apply(info, binding, ['The answer for life the universe and everything is:', value8]);
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
binding = env2_8;
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
try {
|
|
binding();
|
|
} catch (error) {
|
|
break exceptionLanding28;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun125613(a0) { // fn#125613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16460:638, offset: 0x025de6ee, size: 42 bytes, params: 2, frame: 11
|
|
const enabledFeatureName = a0.getEnabledFeatureName();
|
|
if (enabledFeatureName != null) {
|
|
env0_0.push(enabledFeatureName);
|
|
}
|
|
}
|
|
|