409 lines
19 KiB
TypeScript
409 lines
19 KiB
TypeScript
/* Metro module 12675; source: modules/share/useFetchShareEmbed.tsx; dependencies: [5, 57, 31, 1471, 11467, 690, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import URLUtils from '../../utils/URLUtils.tsx'; /* Metro dependency 1471 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
|
|
function _fun97116(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:6, offset: 0x0217373b, size: 153 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/share/useFetchShareEmbed.tsx');
|
|
exports.default = useFetchShareEmbed;
|
|
function useFetchShareEmbed(a0) { // fn#97117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:206, offset: 0x021737d4, size: 193 bytes, params: 2, frame: 21
|
|
const env0_0 = a0;
|
|
const binding = env0_5;
|
|
let useState = binding.useState;
|
|
const value2 = Reflect.apply(useState, binding, [undefined]);
|
|
const binding2 = env0_4;
|
|
let value = binding2(value2, 2);
|
|
const property = value[0];
|
|
const env0_1 = value[1];
|
|
useState = binding.useState;
|
|
value = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const property2 = value[0];
|
|
const env0_2 = value[1];
|
|
useState = binding.useState;
|
|
value = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const property3 = value[0];
|
|
const env0_3 = value[1];
|
|
var env0_4 = binding.useRef(true);
|
|
var env0_5 = binding.useRef(undefined);
|
|
binding.useEffect(_fun97118, [a0]);
|
|
return {embed: property, isLoading: property2, hasTriedResolving: property3};
|
|
function _fun97118() { // fn#97118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:419, offset: 0x02173895, size: 256 bytes, params: 1, frame: 17
|
|
var value6;
|
|
if (env0_0 == null) {
|
|
env0_4.current = false;
|
|
env0_1(undefined);
|
|
return undefined;
|
|
}
|
|
if (env0_0 === '') {
|
|
env0_4.current = false;
|
|
env0_1(undefined);
|
|
return undefined;
|
|
}
|
|
const binding = env0_0;
|
|
const match = binding.match;
|
|
const value3 = undefined;
|
|
const URL_REGEX = (URLUtils).URL_REGEX;
|
|
const value4 = Reflect.apply(match, binding, [URL_REGEX]);
|
|
const r3 = value4 == null ? value3 : value4.at(0);
|
|
if (r3 !== env0_5.current) {
|
|
env0_5.current = r3;
|
|
if (r3 == null) {
|
|
env0_1(value3);
|
|
env0_4.current = false;
|
|
return value3;
|
|
}
|
|
value6 = _fun97119();
|
|
if (env0_4.current) {
|
|
env0_4.current = false;
|
|
value6();
|
|
}
|
|
var env0_1 = global.setTimeout(value6, 1000);
|
|
return _fun97127;
|
|
}
|
|
return value3;
|
|
function _fun97119() { // fn#97119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:625, offset: 0x02173995, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env2_3(_fun97121);
|
|
return _fun97126;
|
|
function* _fun97121() { // fn#97121, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:645, offset: 0x021739c4, size: 344 bytes, params: 1, frame: 19
|
|
var environment;
|
|
var value;
|
|
var value2;
|
|
var value3;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value4;
|
|
var unfurlEmbedUrl;
|
|
var value5;
|
|
var object;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var embeds;
|
|
var length;
|
|
var value9;
|
|
var batchUpdates;
|
|
var error;
|
|
exceptionLanding44: while (true) {
|
|
value = undefined;
|
|
value2 = false;
|
|
if (value2) {
|
|
return value;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__;
|
|
reducibleJoin4: while (true) {
|
|
reduciblePort43: while (true) {
|
|
exceptionLanding39: while (true) {
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
importDefault(undefined);
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
break reduciblePort43;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
binding = env4_0;
|
|
value = binding(env4_2[5]);
|
|
batchUpdates = value.batchUpdates;
|
|
Reflect.apply(batchUpdates, value, [_fun97124]);
|
|
return undefined;
|
|
}
|
|
try {
|
|
try {
|
|
dependencyMap(true);
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
value3 = environment.__proto__.__proto__.__proto__.__proto__;
|
|
try {
|
|
try {
|
|
binding = env4_0;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
binding2 = env4_2;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
property = binding2[4];
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
value4 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
unfurlEmbedUrl = value4.unfurlEmbedUrl;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
value5 = environment.__proto__.__proto__;
|
|
try {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
object = [];
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
object[0] = binding;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
value6 = Reflect.apply(unfurlEmbedUrl, value4, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
yield value6;
|
|
try {
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
if (value8) {
|
|
value = env4_0(env4_2[5]);
|
|
value.batchUpdates(_fun97122);
|
|
return value7;
|
|
}
|
|
try {
|
|
try {
|
|
embeds = value7.embeds;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
length = embeds.length;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
value9 = length === 0;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
if (value9) {
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
importDefault(undefined);
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
binding = env4_0;
|
|
value = binding(env4_2[5]);
|
|
value.batchUpdates(_fun97123);
|
|
return undefined;
|
|
}
|
|
try {
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
embeds = value7.embeds;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
property = embeds[0];
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
object.embed = property;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
binding = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
object.url = binding;
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
try {
|
|
try {
|
|
importDefault(object);
|
|
} catch (error) {
|
|
break exceptionLanding39;
|
|
}
|
|
} catch (error) {
|
|
break exceptionLanding44;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
binding = env4_0;
|
|
value = binding(env4_2[5]);
|
|
batchUpdates = value.batchUpdates;
|
|
Reflect.apply(batchUpdates, value, [_fun97124]);
|
|
return undefined;
|
|
}
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
env4_0(env4_2[5]).batchUpdates(_fun97125);
|
|
throw error;
|
|
function _fun97122() { // fn#97122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:830, offset: 0x02173b1c, size: 29 bytes, params: 1, frame: 12
|
|
env4_3(true);
|
|
dependencyMap(false);
|
|
}
|
|
|
|
function _fun97123() { // fn#97123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:830, offset: 0x02173b1c, size: 29 bytes, params: 1, frame: 12
|
|
env4_3(true);
|
|
dependencyMap(false);
|
|
}
|
|
|
|
function _fun97124() { // fn#97124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:830, offset: 0x02173b1c, size: 29 bytes, params: 1, frame: 12
|
|
env4_3(true);
|
|
dependencyMap(false);
|
|
}
|
|
|
|
function _fun97125() { // fn#97125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:830, offset: 0x02173b1c, size: 29 bytes, params: 1, frame: 12
|
|
env4_3(true);
|
|
dependencyMap(false);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun97126() { // fn#97126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:861, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun97127() { // fn#97127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12865:967, offset: 0x02173b39, size: 24 bytes, params: 1, frame: 11
|
|
global.clearTimeout(env0_1);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun97116, 12675, [5, 57, 31, 1471, 11467, 690,
|
|
2]) /* metro module 12675, dependencies: [5, 57, 31, 1471, 11467, 690, 2] */;
|