Files
discord-decomp/sources/modules/media_channel/MediaChannelActionCreators.tsx
T
2026-07-27 16:20:00 +03:00

416 lines
14 KiB
TypeScript

/* Metro module 11467; source: modules/media_channel/MediaChannelActionCreators.tsx; dependencies: [5, 661, 694, 507, 4131, 2] */
function _fun87787(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:6, offset: 0x01fcb43c, size: 188 bytes, params: 8, frame: 19
const env0_0 = require;
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 */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/media_channel/MediaChannelActionCreators.tsx');
exports.dismissMediaPostSharePrompt = dismissMediaPostSharePrompt;
exports.fetchMediaPostEmbed = function() {
return _fetchMediaPostEmbed.apply(this, arguments);
};
exports.unfurlEmbedUrl = function() {
return _unfurlEmbedUrl.apply(this, arguments);
};
}
function _fetchMediaPostEmbed() { // fn#87788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:128, offset: 0x01fcb4f8, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun87790).apply(this, arguments);
}
function _unfurlEmbedUrl() { // fn#87791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:558, offset: 0x01fcb636, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun87793).apply(this, arguments);
}
function dismissMediaPostSharePrompt(a0) { // fn#87794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:909, offset: 0x01fcb71c, size: 57 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'DISMISS_MEDIA_POST_SHARE_PROMPT',
threadId: a0});
}
function* _fun87790(a0) { // fn#87790, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:191, offset: 0x01fcb535, size: 257 bytes, params: 2, frame: 19
var object2;
var binding2;
var property;
var value4;
var HTTP;
var get;
var MEDIA_POST_RESHARE_GET_PREVIEW;
var value5;
var value6;
var value7;
var value8;
var body;
var binding3;
var value9;
var error;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_1;
var value3 = binding(env2_2[2]);
var dispatch = value3.dispatch;
Reflect.apply(dispatch, value3, [{type: 'MEDIA_POST_EMBED_FETCH', threadId: a0}]);
reducibleJoin3: while (true) {
reduciblePort36: while (true) {
exceptionLanding35: while (true) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding35;
}
break reducibleJoin3;
}
binding = env2_1;
value = binding(env2_2[2]);
dispatch = value.dispatch;
Reflect.apply(dispatch, value, [{type: 'MEDIA_POST_EMBED_FETCH_FAILURE', threadId: a0}]);
break reduciblePort36;
}
return undefined;
}
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding2[3];
} catch (error) {
break exceptionLanding35;
}
try {
value4 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
HTTP = value4.HTTP;
} catch (error) {
break exceptionLanding35;
}
try {
get = HTTP.get;
} catch (error) {
break exceptionLanding35;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding35;
}
try {
binding = env2_4;
} catch (error) {
break exceptionLanding35;
}
try {
MEDIA_POST_RESHARE_GET_PREVIEW = binding.MEDIA_POST_RESHARE_GET_PREVIEW;
} catch (error) {
break exceptionLanding35;
}
try {
value5 = Reflect.apply(MEDIA_POST_RESHARE_GET_PREVIEW, binding, [a0]);
} catch (error) {
break exceptionLanding35;
}
try {
object2.url = value5;
} catch (error) {
break exceptionLanding35;
}
try {
object2.rejectWithError = true;
} catch (error) {
break exceptionLanding35;
}
try {
value6 = Reflect.apply(get, HTTP, [object2]);
} catch (error) {
break exceptionLanding35;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding35;
}
if (value8) {
return value7;
}
try {
body = value7.body;
} catch (error) {
break exceptionLanding35;
}
try {
binding = env2_1;
} catch (error) {
break exceptionLanding35;
}
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding35;
}
try {
property = binding3[2];
} catch (error) {
break exceptionLanding35;
}
try {
value9 = binding(property);
} catch (error) {
break exceptionLanding35;
}
try {
dispatch = value9.dispatch;
} catch (error) {
break exceptionLanding35;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding35;
}
try {
object2.type = 'MEDIA_POST_EMBED_FETCH_SUCCESS';
} catch (error) {
break exceptionLanding35;
}
try {
object2.threadId = a0;
} catch (error) {
break exceptionLanding35;
}
try {
object2.mediaPostEmbed = body;
} catch (error) {
break exceptionLanding35;
}
try {
Reflect.apply(dispatch, value9, [object2]);
} catch (error) {
break exceptionLanding35;
}
}
}
function* _fun87793(a0) { // fn#87793, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11653:611, offset: 0x01fcb673, size: 169 bytes, params: 2, frame: 14
var binding;
var binding2;
var property;
var value3;
var HTTP;
var post;
var object3;
var UNFURL_EMBED_URLS;
var object4;
var value4;
var value5;
var value6;
var body;
var error;
var APIError;
var prototype;
var aPIError;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
property = binding2[3];
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
HTTP = value3.HTTP;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
post = HTTP.post;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object3 = {};
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
binding = env2_4;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
UNFURL_EMBED_URLS = binding.UNFURL_EMBED_URLS;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object3.url = UNFURL_EMBED_URLS;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object4 = {};
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object4.urls = a0;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object3.body = object4;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
object3.rejectWithError = false;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
try {
value4 = Reflect.apply(post, HTTP, [object3]);
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
if (value6) {
return value5;
}
try {
body = value5.body;
} catch (error) {
binding = env2_0;
APIError = binding(env2_2[4]).APIError;
prototype = APIError.prototype;
value = Object.create(prototype, {constructor: {value: APIError}});
aPIError = new APIError();
value = aPIError instanceof Object ? aPIError : value;
throw value;
}
return body;
}