181 lines
7.7 KiB
JavaScript
181 lines
7.7 KiB
JavaScript
/* Metro module 90; source: unknown; dependencies: [91, 93, 94, 95] */
|
|
function _fun1517(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#1517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:115:6, offset: 0x00c60ca2, size: 136 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const resolveAssetSource2 = resolveAssetSource;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let env0_6 = [];
|
|
resolveAssetSource2.pickScale = (require(95) /* metro dependency 95 */).pickScale;
|
|
resolveAssetSource2.setCustomSourceTransformer = function(a0) {
|
|
env0_6 = [a0];
|
|
};
|
|
resolveAssetSource2.addCustomSourceTransformer = addCustomSourceTransformer;
|
|
exports.default = resolveAssetSource2;
|
|
function getSourceCodeScriptURL() { // fn#1518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:115:107, offset: 0x00c60d2a, size: 62 bytes, params: 1, frame: 12
|
|
var r0;
|
|
var defaultImport;
|
|
if (env0_5 != null) {
|
|
r0 = env0_5;
|
|
} else {
|
|
defaultImport = importDefault(91) /* metro dependency 91 */;
|
|
r0 = defaultImport.getConstants().scriptURL;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function resolveAssetSource(a0) { // fn#1519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:115:193, offset: 0x00c60d68, size: 273 bytes, params: 2, frame: 22
|
|
var environment;
|
|
var r8;
|
|
var r4;
|
|
var r3;
|
|
var value3;
|
|
var moduleValue;
|
|
var getAssetByID;
|
|
var value4;
|
|
var property;
|
|
var sourceCodeScriptURL;
|
|
var match;
|
|
var value6;
|
|
var property2;
|
|
var binding;
|
|
var value7;
|
|
var prototype;
|
|
var value8;
|
|
var property3;
|
|
var value10;
|
|
var iterator;
|
|
var iterator2;
|
|
var item;
|
|
var item2;
|
|
var value11;
|
|
var value12;
|
|
var error;
|
|
var defaultAsset;
|
|
const value = undefined;
|
|
const value2 = null;
|
|
reducibleJoin13: while (true) {
|
|
reducibleJoin20: while (true) {
|
|
if (value2 == a0) {
|
|
break reducibleJoin20;
|
|
}
|
|
if (typeof a0 !== 'object') {
|
|
value3 = environment;
|
|
moduleValue = require(93) /* metro dependency 93 */;
|
|
getAssetByID = moduleValue.getAssetByID;
|
|
value4 = Reflect.apply(getAssetByID, moduleValue, [a0]);
|
|
if (value4) {
|
|
property = (require(94) /* metro dependency 94 */).default;
|
|
reducibleJoin10: while (true) {
|
|
if (value !== env0_3) {
|
|
break reducibleJoin10;
|
|
}
|
|
sourceCodeScriptURL = getSourceCodeScriptURL();
|
|
reducibleJoin7: while (true) {
|
|
if (value2 == sourceCodeScriptURL) {
|
|
r8 = value;
|
|
break reducibleJoin7;
|
|
}
|
|
match = sourceCodeScriptURL.match;
|
|
value6 = Reflect.apply(match, sourceCodeScriptURL, [RegExp('^https?:\\/\\/.*?\\/', '')]);
|
|
r8 = value6;
|
|
break reducibleJoin7;
|
|
}
|
|
reducibleJoin9: while (true) {
|
|
if (r8) {
|
|
property2 = r8[0];
|
|
r4 = property2;
|
|
break reducibleJoin9;
|
|
}
|
|
r4 = value2;
|
|
break reducibleJoin9;
|
|
}
|
|
env0_3 = r4;
|
|
break reducibleJoin10;
|
|
}
|
|
binding = env0_3;
|
|
value7 = getScriptURL();
|
|
prototype = property.prototype;
|
|
value8 = Object.create(prototype, {constructor: {value: property}});
|
|
property3 = new property();
|
|
value10 = property3 instanceof Object ? property3 : value8;
|
|
reducibleJoin19: while (true) {
|
|
if (env0_6) {
|
|
iterator = env0_6[Symbol.iterator]();
|
|
iterator2 = iterator.next;
|
|
r3 = iterator;
|
|
item2 = Reflect.apply(iterator2, r3, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r3;
|
|
if (item2 === value) {
|
|
break reducibleJoin19;
|
|
}
|
|
break reducibleJoin13;
|
|
}
|
|
break reducibleJoin19;
|
|
}
|
|
defaultAsset = value10.defaultAsset;
|
|
return Reflect.apply(defaultAsset, value10, []);
|
|
}
|
|
return value2;
|
|
}
|
|
break reducibleJoin20;
|
|
}
|
|
return a0;
|
|
}
|
|
reducibleLoop13: while (true) {
|
|
try {
|
|
value11 = item(value10);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value12 = value2 != value11;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
if (value12) {
|
|
item2.return();
|
|
return value11;
|
|
}
|
|
r3 = item2;
|
|
item2 = Reflect.apply(iterator2, r3, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r3;
|
|
if (item2 === value) {
|
|
return value10.defaultAsset();
|
|
}
|
|
continue reducibleLoop13;
|
|
}
|
|
function getScriptURL() { // fn#1520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:115:484, owner: resolveAssetSource.getScriptURL, offset: 0x00c60e79, size: 133 bytes, params: 1, frame: 16
|
|
var sourceCodeScriptURL;
|
|
var value3;
|
|
if (env1_4 === undefined) {
|
|
sourceCodeScriptURL = getSourceCodeScriptURL();
|
|
value3 = null;
|
|
env1_4 = value3 == sourceCodeScriptURL ? sourceCodeScriptURL : sourceCodeScriptURL.startsWith('assets://') ? value3 : sourceCodeScriptURL.substring(0,
|
|
|
|
sourceCodeScriptURL.lastIndexOf('/') + 1).includes('://') ? sourceCodeScriptURL.substring(0,
|
|
sourceCodeScriptURL.lastIndexOf('/') + 1) : 'file://' + sourceCodeScriptURL.substring(0,
|
|
sourceCodeScriptURL.lastIndexOf('/') + 1);
|
|
}
|
|
return env1_4;
|
|
}
|
|
|
|
}
|
|
|
|
function addCustomSourceTransformer(a0) { // fn#1522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:115:1004, offset: 0x00c60f14, size: 24 bytes, params: 2, frame: 11
|
|
env0_6.push(a0);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun1517, 90, [91, 93, 94, 95]) /* metro module 90, dependencies: [91, 93, 94, 95] */;
|