420 lines
17 KiB
TypeScript
420 lines
17 KiB
TypeScript
/* Metro module 11467; source: modules/media_channel/MediaChannelActionCreators.tsx; dependencies: [5, 661, 694, 507, 4131, 2] */
|
|
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
|
|
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});
|
|
(FileImportTrackerModule).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 Module00005(_fun87790).apply(this, arguments);
|
|
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 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 {
|
|
object = {};
|
|
} 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 {
|
|
object.url = value5;
|
|
} catch (error) {
|
|
break exceptionLanding35;
|
|
}
|
|
try {
|
|
object.rejectWithError = true;
|
|
} catch (error) {
|
|
break exceptionLanding35;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(get, HTTP, [object]);
|
|
} 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 {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding35;
|
|
}
|
|
try {
|
|
object.type = 'MEDIA_POST_EMBED_FETCH_SUCCESS';
|
|
} catch (error) {
|
|
break exceptionLanding35;
|
|
}
|
|
try {
|
|
object.threadId = a0;
|
|
} catch (error) {
|
|
break exceptionLanding35;
|
|
}
|
|
try {
|
|
object.mediaPostEmbed = body;
|
|
} catch (error) {
|
|
break exceptionLanding35;
|
|
}
|
|
try {
|
|
Reflect.apply(dispatch, value9, [object]);
|
|
} catch (error) {
|
|
break exceptionLanding35;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
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 Module00005(_fun87793).apply(this, arguments);
|
|
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 object;
|
|
var UNFURL_EMBED_URLS;
|
|
var object2;
|
|
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 {
|
|
object = {};
|
|
} 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 {
|
|
object.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 {
|
|
object2 = {};
|
|
} 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 {
|
|
object2.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 {
|
|
object.body = object2;
|
|
} 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 {
|
|
object.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, [object]);
|
|
} 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;
|
|
}
|
|
|
|
}
|
|
|
|
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
|
|
(Dispatcher).dispatch({type: 'DISMISS_MEDIA_POST_SHARE_PROMPT',
|
|
threadId: a0});
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun87787, 11467, [5, 661, 694, 507, 4131,
|
|
2]) /* metro module 11467, dependencies: [5, 661, 694, 507, 4131, 2] */;
|