Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,72 @@
/* Metro module 8909; source: modules/video_backgrounds/LastUsedVideoBackgroundOption.tsx; dependencies: [31, 1348, 1878, 8906, 3802, 566, 2] */
function _fun69512(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9094:6, offset: 0x01c756fd, size: 179 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_backgrounds/LastUsedVideoBackgroundOption.tsx');
exports.getLastUsedVideoBackgroundOption = getLastUsedVideoBackgroundOption;
exports.useLastUsedVideoBackgroundOption = useLastUsedVideoBackgroundOption;
}
function getOptionFromSettingsFiltered(a0, a1) { // fn#69513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9094:126, offset: 0x01c757b0, size: 159 bytes, params: 3, frame: 19
var r1;
var r0;
var value;
const videoBackgroundOptionFromProto = (require(8906) /* metro dependency 8906: VideoBackgroundUtils */).getVideoBackgroundOptionFromProto(a0,
a1.id);
const videoBackgroundUtilsModule = require(8906) /* metro dependency 8906: VideoBackgroundUtils */;
if (videoBackgroundUtilsModule.isCustomBackgroundOption(videoBackgroundOptionFromProto)) {
if ((importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCustomBackgrounds(a1)) {
if (typeof videoBackgroundOptionFromProto !== 'number') {
r1 = videoBackgroundOptionFromProto;
} else {
value = videoBackgroundUtilsModule;
value = value.isDefaultBackgroundOption(videoBackgroundOptionFromProto);
r1 = value ? videoBackgroundOptionFromProto : null;
}
r0 = r1;
} else {
r0 = null;
}
} else {
if (typeof videoBackgroundOptionFromProto !== 'number') {
r1 = videoBackgroundOptionFromProto;
} else {
value = require(8906) /* metro dependency 8906: VideoBackgroundUtils */;
value = value.isDefaultBackgroundOption(videoBackgroundOptionFromProto);
r1 = value ? videoBackgroundOptionFromProto : null;
}
r0 = r1;
}
return r0;
}
function getLastUsedVideoBackgroundOption(a0) { // fn#69514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9094:503, offset: 0x01c7584f, size: 53 bytes, params: 2, frame: 14
return getOptionFromSettingsFiltered(UserSettingsProtoStore.settings.voiceAndVideo?.videoBackgroundFilterDesktop,
a0);
}
function useLastUsedVideoBackgroundOption() { // fn#69515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9094:703, offset: 0x01c75884, size: 161 bytes, params: 1, frame: 19
const value2 = undefined;
const settings = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserSettingsProtoStore],
function() {
return UserSettingsProtoStore.settings;
});
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const voiceAndVideo = settings.voiceAndVideo;
return env0_3.useMemo(_fun69518, [voiceAndVideo == null ? value2 : voiceAndVideo.videoBackgroundFilterDesktop,
currentUser]);
}
function _fun69518() { // fn#69518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9094:947, offset: 0x01c75934, size: 41 bytes, params: 1, frame: 14
const currentUserBinding = currentUser;
const value2 = null;
return value2 == currentUserBinding ? value2 : getOptionFromSettingsFiltered(videoBackgroundFilterDesktop,
currentUser);
}
@@ -0,0 +1,923 @@
/* Metro module 8907; source: modules/video_backgrounds/VideoBackgroundActionCreators.tsx; dependencies: [5, 4259, 1878, 661, 507, 694, 8908, 8909, 8906, 1362, 2] */
function _fun69485(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:6, offset: 0x01c74d16, size: 306 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = function() {
return _saveLastUsedBackgroundOption.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_backgrounds/VideoBackgroundActionCreators.tsx');
exports.fetchVideoFilterAssets = function() {
return _fetchVideoFilterAssets.apply(this, arguments);
};
exports.uploadVideoFilterAsset = function() {
return _uploadVideoFilterAsset.apply(this, arguments);
};
exports.deleteVideoFilterAsset = function() {
return _deleteVideoFilterAsset.apply(this, arguments);
};
exports.saveLastUsedBackgroundOption = closure;
exports.applyMediaFilterSettings = applyMediaFilterSettings;
exports.startApplyMediaFilterSettings = startApplyMediaFilterSettings;
exports.errorApplyingMediaFilterSettings = errorApplyingMediaFilterSettings;
}
function _fetchVideoFilterAssets() { // fn#69486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:146, offset: 0x01c74e48, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun69488).apply(this, arguments);
}
function _uploadVideoFilterAsset() { // fn#69489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:505, offset: 0x01c74f4b, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun69491).apply(this, arguments);
}
function _deleteVideoFilterAsset() { // fn#69492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:893, offset: 0x01c75089, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun69494).apply(this, arguments);
}
function _saveLastUsedBackgroundOption() { // fn#69496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:1408, offset: 0x01c751c3, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun69498).apply(this, arguments);
}
function applyMediaFilterSettings(a0) { // fn#69503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:2570, offset: 0x01c75386, size: 74 bytes, params: 2, frame: 12
if (MediaEngineStore.isSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_APPLY_MEDIA_FILTER_SETTINGS',
settings: a0});
}
}
function startApplyMediaFilterSettings() { // fn#69504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:2736, offset: 0x01c753d0, size: 68 bytes, params: 1, frame: 12
if (MediaEngineStore.isSupported()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_APPLY_MEDIA_FILTER_SETTINGS_START'});
}
}
function errorApplyingMediaFilterSettings() { // fn#69505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:2904, offset: 0x01c75414, size: 49 bytes, params: 1, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'MEDIA_ENGINE_APPLY_MEDIA_FILTER_SETTINGS_ERROR'});
}
function* _fun69488() { // fn#69488, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:215, offset: 0x01c74e85, size: 198 bytes, params: 1, frame: 15
var binding;
var binding2;
var property;
var value3;
var HTTP;
var get;
var object2;
var VIDEO_FILTER_ASSETS;
var value4;
var value5;
var value6;
var binding3;
var value7;
var dispatch;
var body;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
property = binding2[4];
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
value3 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
HTTP = value3.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
get = HTTP.get;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
binding = env2_6;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
VIDEO_FILTER_ASSETS = binding.VIDEO_FILTER_ASSETS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
object2.url = VIDEO_FILTER_ASSETS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
object2.rejectWithError = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
value4 = Reflect.apply(get, HTTP, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
yield value4;
try {
value5 = undefined;
value6 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
if (!value6) {
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
property = binding3[5];
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
value7 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
dispatch = value7.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
object2 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
object2.type = 'VIDEO_FILTER_ASSETS_FETCH_SUCCESS';
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
body = value5.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
object2.assets = body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
try {
Reflect.apply(dispatch, value7, [object2]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[5]);
value.dispatch({type: 'VIDEO_FILTER_ASSETS_FETCH_FAILURE', error: error});
throw error;
}
}
return value5;
}
function* _fun69491(a0, a1, a2) { // fn#69491, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:574, offset: 0x01c74f88, size: 257 bytes, params: 4, frame: 18
var r7;
var binding;
var binding2;
var property;
var value4;
var HTTP;
var post;
var object3;
var VIDEO_FILTER_ASSETS;
var object4;
var value5;
var toISOString;
var value6;
var value7;
var value8;
var value9;
var binding3;
var value10;
var dispatch;
var body;
var error;
var prototype;
var value11;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
try {
binding = env2_0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
binding2 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
property = binding2[4];
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
const value3 = undefined;
try {
value4 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
HTTP = value4.HTTP;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
post = HTTP.post;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
binding = env2_6;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
VIDEO_FILTER_ASSETS = binding.VIDEO_FILTER_ASSETS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3.url = VIDEO_FILTER_ASSETS;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object4 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object4.type = a1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object4.asset = a0;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
value5 = a2 == null;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
if (value5) {
try {
object4.last_used = value3;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3.body = object4;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3.rejectWithError = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
value7 = Reflect.apply(post, HTTP, [object3]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
yield value7;
try {
value8 = undefined;
value9 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
if (value9) {
return value8;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
property = binding3[5];
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
value10 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
dispatch = value10.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3.type = 'VIDEO_FILTER_ASSET_UPLOAD_SUCCESS';
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
body = value8.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3.videoFilterAsset = body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
Reflect.apply(dispatch, value10, [object3]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
body = value8.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
} else {
try {
toISOString = a2.toISOString;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
value6 = Reflect.apply(toISOString, a2, []);
r7 = value6;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object4.last_used = r7;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3.body = object4;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3.rejectWithError = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
value7 = Reflect.apply(post, HTTP, [object3]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
yield value7;
try {
value8 = undefined;
value9 = false;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
if (value9) {
return value8;
}
try {
binding = env2_1;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
property = binding3[5];
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
value10 = binding(property);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
dispatch = value10.dispatch;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3 = {};
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3.type = 'VIDEO_FILTER_ASSET_UPLOAD_SUCCESS';
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
body = value8.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
object3.videoFilterAsset = body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
Reflect.apply(dispatch, value10, [object3]);
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
try {
body = value8.body;
} catch (error) {
binding = env2_1;
value = binding(env2_2[6]);
prototype = value.prototype;
value11 = Object.create(prototype, {constructor: {value: value}});
value = new value();
value = value instanceof Object ? value : value11;
throw value;
}
}
return body;
}
function* _fun69494(a0) { // fn#69494, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:962, offset: 0x01c750c6, size: 253 bytes, params: 2, frame: 19
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var HTTP = binding(env2_2[4]).HTTP;
var del = HTTP.del;
binding = env2_6;
var VIDEO_FILTER_ASSET = binding.VIDEO_FILTER_ASSET;
yield Reflect.apply(del, HTTP, [{url: Reflect.apply(VIDEO_FILTER_ASSET, binding, [a0.id]),
rejectWithError: false}]);
if (false) {
return undefined;
}
binding = env2_0;
var binding2 = env2_2;
var value5 = binding(binding2[7]);
var getLastUsedVideoBackgroundOption = value5.getLastUsedVideoBackgroundOption;
var binding3 = env2_5;
var getCurrentUser = binding3.getCurrentUser;
var value6 = Reflect.apply(getLastUsedVideoBackgroundOption, value5, [Reflect.apply(getCurrentUser, binding3,
[])]);
if (binding(binding2[8]).isCustomBackgroundOption(value6) && value6.id === a0.id) {
env2_10(null);
}
env2_1(env2_2[5]).dispatch({type: 'VIDEO_FILTER_ASSET_DELETE_SUCCESS', videoFilterAsset: a0});
}
}
function* _fun69498(a0) { // fn#69498, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:1489, offset: 0x01c75200, size: 336 bytes, params: 2, frame: 20
var environment;
var HTTP;
var post;
var value6;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
var PreloadedUserSettingsActionCreators = binding(binding2[9]).PreloadedUserSettingsActionCreators;
var updateAsync = PreloadedUserSettingsActionCreators.updateAsync;
var UserSettingsDelay = binding(binding2[9]).UserSettingsDelay;
var FREQUENT_USER_ACTION = UserSettingsDelay.FREQUENT_USER_ACTION;
yield Reflect.apply(updateAsync, PreloadedUserSettingsActionCreators, ['voiceAndVideo', _fun69499,
FREQUENT_USER_ACTION]);
if (false) {
return undefined;
}
var value5 = env2_0(env2_2[8]);
if (value5.isCustomBackgroundOption(a0)) {
binding = env2_0;
HTTP = binding(env2_2[4]).HTTP;
post = HTTP.post;
binding = env2_6;
yield Reflect.apply(post, HTTP, [{url: binding.VIDEO_FILTER_ASSET_LAST_USED(a0.id),
rejectWithError: false}]);
value6 = undefined;
if (false) {
return value6;
}
binding = env2_1;
binding(env2_2[5]).dispatch({type: 'VIDEO_SAVE_LAST_USED_BACKGROUND_OPTION',
backgroundOption: value6.body});
} else {
env2_1(env2_2[5]).dispatch({type: 'VIDEO_SAVE_LAST_USED_BACKGROUND_OPTION', backgroundOption: a0});
}
}
}
function _fun69499(a0) { // fn#69499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9092:1584, offset: 0x01c75350, size: 54 bytes, params: 2, frame: 12
let value = environment.__proto__.__proto__.__proto__;
value = env3_0(env3_2[8]);
value = value.getVideoBackgroundProtoFromOption(env0_0);
a0.videoBackgroundFilterDesktop = value;
}
@@ -0,0 +1,57 @@
/* Metro module 7617; source: modules/video_backgrounds/VideoBackgroundConstants.tsx; dependencies: [2] */
function _fun61014(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7795:6, offset: 0x01718205, size: 442 bytes, params: 8, frame: 19
var object3;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object3 = {BACKGROUND: 0};
object3[0] = 'BACKGROUND';
const object4 = {OPTION_1: 0};
object4[0] = 'OPTION_1';
object4.OPTION_2 = 1;
object4[1] = 'OPTION_2';
object4.OPTION_3 = 2;
object4[2] = 'OPTION_3';
object4.OPTION_4 = 3;
object4[3] = 'OPTION_4';
object4.OPTION_7 = 7;
object4[7] = 'OPTION_7';
object4.OPTION_8 = 8;
object4[8] = 'OPTION_8';
object4.OPTION_9 = 9;
object4[9] = 'OPTION_9';
object4.OPTION_10 = 10;
object4[10] = 'OPTION_10';
let OPTION_7 = object4.OPTION_7;
const items2 = [OPTION_7];
let OPTION_8 = object4.OPTION_8;
items2[1] = OPTION_8;
let OPTION_9 = object4.OPTION_9;
items2[2] = OPTION_9;
let OPTION_10 = object4.OPTION_10;
items2[3] = OPTION_10;
OPTION_7 = object4.OPTION_7;
OPTION_8 = object4.OPTION_8;
OPTION_9 = object4.OPTION_9;
OPTION_10 = object4.OPTION_10;
const OPTION_1 = object4.OPTION_1;
const OPTION_2 = object4.OPTION_2;
const OPTION_3 = object4.OPTION_3;
const OPTION_4 = object4.OPTION_4;
const value = [OPTION_7, OPTION_8, OPTION_9, OPTION_10, OPTION_1, OPTION_2, OPTION_3, OPTION_4].reduce(function(a0,
a1, a2) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object[a1] = a2;
return object;
}, {});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_backgrounds/VideoBackgroundConstants.tsx');
exports.VideoFilterType = object3;
exports.DefaultVideoBackground = object4;
exports.ANIMATED_DEFAULT_VIDEO_BACKGROUNDS = items2;
exports.DEFAULT_VIDEO_BACKGROUND_SORT = value;
exports.BLUR_BACKGROUND_OPTION = 'blur';
exports.BACKGROUND_REPLACEMENT_SIZE = {'width': 1280, 'height': 720};
exports.MAX_BACKGROUND_IMAGE_UPLOAD_FILESIZE_BYTES = 10485760;
}
@@ -0,0 +1,152 @@
/* Metro module 8905; source: modules/video_backgrounds/VideoBackgroundStore.tsx; dependencies: [6, 7, 15, 17, 18, 1348, 4259, 1934, 1878, 8906, 4406, 566, 694, 2] */
function _fun69452(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9090:6, offset: 0x01c7415a, size: 469 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let env0_14 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
let value = _fun69458(Store);
value.displayName = 'VideoBackgroundStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{VIDEO_FILTER_ASSETS_FETCH_SUCCESS: function({assets}) {
assets.forEach(_fun69467);
env0_14 = {};
}, VIDEO_FILTER_ASSET_UPLOAD_SUCCESS: VIDEO_FILTER_ASSET_UPLOAD_SUCCESS,
VIDEO_FILTER_ASSET_DELETE_SUCCESS: VIDEO_FILTER_ASSET_DELETE_SUCCESS,
VIDEO_SAVE_LAST_USED_BACKGROUND_OPTION: function({backgroundOption}) {
if (hasVideoBackgroundLive(backgroundOption)) {
env0_13 = true;
}
}, MEDIA_ENGINE_APPLY_MEDIA_FILTER_SETTINGS: function({settings}) {
if (require(dependencyMap[10]).FilterSettingsKey.CAMERA_BACKGROUND_LIVE in settings) {
env0_11 = true;
env0_15 = false;
}
if (require(dependencyMap[10]).FilterSettingsKey.CAMERA_BACKGROUND_PREVIEW in settings) {
env0_16 = false;
}
}, MEDIA_ENGINE_VIDEO_FILTER_ERROR: MEDIA_ENGINE_VIDEO_FILTER_ERROR, LOGOUT: function() {
env0_11 = false;
env0_13 = false;
env0_12 = null;
env0_14 = {};
env0_15 = false;
env0_16 = false;
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_backgrounds/VideoBackgroundStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_69453() { // fn#69453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9090:188, offset: 0x01c7432f, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_69453_isNativeReflectConstruct = function() {
return !!result;
})();
}
function hasVideoBackgroundLive(a0) { // fn#69456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9090:417, offset: 0x01c74391, size: 145 bytes, params: 2, frame: 18
var r2;
var moduleValue;
var getVideoBackgroundOptionFromProto;
var voiceAndVideo;
let value = a0;
const currentUser = UserStore.getCurrentUser();
if (currentUser == null) {
return false;
}
if (value != null) {
r2 = value;
} else {
value = undefined;
moduleValue = require(8906) /* metro dependency 8906: VideoBackgroundUtils */;
getVideoBackgroundOptionFromProto = moduleValue.getVideoBackgroundOptionFromProto;
voiceAndVideo = UserSettingsProtoStore.settings.voiceAndVideo;
value = Reflect.apply(getVideoBackgroundOptionFromProto, moduleValue,
[voiceAndVideo == null ? value : voiceAndVideo.videoBackgroundFilterDesktop, currentUser.id]);
r2 = value;
}
const getVoiceChannelId = SelectedChannelStore.getVoiceChannelId;
return Reflect.apply(getVoiceChannelId, SelectedChannelStore,
[]) != null && MediaEngineStore.isVideoEnabled() && r2 != null;
}
function handleSyncedStoresUpdate() { // fn#69457, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9090:700, offset: 0x01c74422, size: 78 bytes, params: 1, frame: 11
const binding = env0_12;
const getVoiceChannelId = SelectedChannelStore.getVoiceChannelId;
if (binding === Reflect.apply(getVoiceChannelId, SelectedChannelStore, [])) {
}
if (hasVideoBackgroundLive()) {
}
env0_12 = SelectedChannelStore.getVoiceChannelId();
}
function _fun69458(a0) { // fn#69458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9090:843, offset: 0x01c74470, size: 207 bytes, params: 2, frame: 16
const closure = VideoBackgroundStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function() {
this.waitFor(MediaEngineStore, SelectedChannelStore, UserSettingsProtoStore, UserStore);
this.syncWith([SelectedChannelStore, MediaEngineStore], handleSyncedStoresUpdate);
}}, {key: 'videoFilterAssets', get: get_69461}, {key: 'hasBeenApplied', get: get_69462},
{key: 'hasUsedBackgroundInCall', get: get_69463}, {key: 'videoBackgroundUnavailable', get: get_69464},
{key: 'videoBackgroundPreviewUnavailable', get: get_69465}]);
}
function VIDEO_FILTER_ASSETS_FETCH_SUCCESS({assets}) { // fn#69466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9090:1649, offset: 0x01c7458a, size: 45 bytes, params: 2, frame: 12
const object = {};
assets.forEach(_fun69467);
}
function VIDEO_FILTER_ASSET_UPLOAD_SUCCESS({videoFilterAsset}) { // fn#69468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9090:1779, offset: 0x01c745cc, size: 43 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, env0_14, videoFilterAsset);
object2[videoFilterAsset.id] = videoFilterAsset;
}
function VIDEO_FILTER_ASSET_DELETE_SUCCESS({videoFilterAsset}) { // fn#69469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9090:1883, offset: 0x01c745f7, size: 42 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, env0_14, undefined);
delete object2[videoFilterAsset.id];
}
function MEDIA_ENGINE_VIDEO_FILTER_ERROR({target}) { // fn#69472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9090:2363, offset: 0x01c746b0, size: 41 bytes, params: 2, frame: 2
if (target === 'live') {
}
}
function _fun69467(a0) { // fn#69467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9090:1725, offset: 0x01c745b7, size: 21 bytes, params: 2, frame: 3
env0_0[a0.id] = a0;
return a0;
}
@@ -0,0 +1,151 @@
/* Metro module 8906; source: modules/video_backgrounds/VideoBackgroundUtils.tsx; dependencies: [1379, 4294, 7617, 661, 1423, 4863, 683, 2] */
function _fun69474(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9091:6, offset: 0x01c746fe, size: 341 bytes, params: 8, frame: 24
const env0_0 = require;
const closure = isCustomBackgroundOption;
const closure2 = isDefaultBackgroundOption;
const closure3 = isAnimatedBackgroundOption;
const closure4 = function(a0) {
return a0 != null ? 'Video Background' : 'None';
};
const closure5 = getEffectDetailAnalyticsName;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const videoBackgroundConstantsModule = require(7617) /* metro dependency 7617: VideoBackgroundConstants */;
const env0_5 = videoBackgroundConstantsModule.DefaultVideoBackground;
const env0_6 = videoBackgroundConstantsModule.VideoFilterType;
const env0_7 = videoBackgroundConstantsModule.ANIMATED_DEFAULT_VIDEO_BACKGROUNDS;
const env0_8 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_backgrounds/VideoBackgroundUtils.tsx');
exports.isCustomBackgroundOption = closure;
exports.isDefaultBackgroundOption = closure2;
exports.isAnimatedBackgroundOption = closure3;
exports.getEffectAnalyticsType = closure4;
exports.getEffectDetailAnalyticsName = closure5;
exports.trackBackgroundOptionUpdated = trackBackgroundOptionUpdated;
exports.trackBackgroundOptionAdded = function(a0, a1, a2) {
var defaultImport = importDefault(dependencyMap[6]);
var VIDEO_BACKGROUND_ADDED = AnalyticEvents.VIDEO_BACKGROUND_ADDED;
var object = {};
object.is_animated = isAnimatedBackgroundOption(a0);
object.is_video = a1;
object.is_from_tenor = a2;
defaultImport.track(VIDEO_BACKGROUND_ADDED, object);
};
exports.trackBackgroundOptionDeleted = function(a0) {
var defaultImport = importDefault(dependencyMap[6]);
var VIDEO_BACKGROUND_DELETED = AnalyticEvents.VIDEO_BACKGROUND_DELETED;
var object = {};
object.is_animated = isAnimatedBackgroundOption(a0);
defaultImport.track(VIDEO_BACKGROUND_DELETED, object);
};
exports.getVideoBackgroundProtoFromOption = getVideoBackgroundProtoFromOption;
exports.getVideoBackgroundOptionFromProto = getVideoBackgroundOptionFromProto;
}
function isCustomBackgroundOption(a0) { // fn#69475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9091:237, offset: 0x01c74853, size: 61 bytes, params: 2, frame: 4
return a0 != null && typeof a0 === 'object' && 'id' in a0 && a0.type === VideoFilterType.BACKGROUND;
}
function isDefaultBackgroundOption(a0) { // fn#69476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9091:342, offset: 0x01c74890, size: 30 bytes, params: 2, frame: 3
return typeof a0 === 'number' && a0 in DefaultVideoBackground;
}
function isAnimatedBackgroundOption(a0) { // fn#69477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9091:413, offset: 0x01c748ae, size: 133 bytes, params: 2, frame: 16
var r2;
var r0;
var isCustomBackgroundOption2;
var moduleValue;
var isAnimatedIconHash2;
var value;
if (isDefaultBackgroundOption(a0)) {
r0 = ANIMATED_DEFAULT_VIDEO_BACKGROUNDS.includes(a0);
} else {
isCustomBackgroundOption2 = isCustomBackgroundOption(a0);
if (isCustomBackgroundOption2) {
moduleValue = require(1423) /* metro dependency 1423: AvatarUtils */;
isAnimatedIconHash2 = moduleValue.isAnimatedIconHash(a0.asset);
if (isAnimatedIconHash2) {
r2 = isAnimatedIconHash2;
} else {
value = require(1423) /* metro dependency 1423: AvatarUtils */;
value = value.isVideoAssetHash(a0.asset);
r2 = value;
}
r0 = r2;
} else {
r0 = !!isCustomBackgroundOption2;
}
}
return r0;
}
function getEffectDetailAnalyticsName(a0) { // fn#69479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9091:682, offset: 0x01c7494b, size: 260 bytes, params: 2, frame: 17
return a0 == null ? 'None' : isCustomBackgroundOption(a0) ? 'Custom' : a0 === 'blur' ? 'Blur' : 'Preset - ' + (DefaultVideoBackground.OPTION_1 === a0 ? 'Cybercity' : DefaultVideoBackground.OPTION_2 === a0 ? 'Discord the Movie' : DefaultVideoBackground.OPTION_3 === a0 ? 'Wumpus Vacation' : DefaultVideoBackground.OPTION_4 === a0 ? 'Vaporwave' : DefaultVideoBackground.OPTION_7 === a0 ? 'Capernite Day' : DefaultVideoBackground.OPTION_8 === a0 ? 'Capernite Night' : DefaultVideoBackground.OPTION_9 === a0 ? 'Hacker Den' : DefaultVideoBackground.OPTION_10 !== a0 ? undefined : 'Wumpice');
}
function trackBackgroundOptionUpdated(a0, a1, a2) { // fn#69480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9091:1556, offset: 0x01c74a4f, size: 270 bytes, params: 4, frame: 22
const guildId = RTCConnectionStore.getGuildId();
const channelId = RTCConnectionStore.getChannelId();
const channel = ChannelStore.getChannel(channelId);
const value5 = undefined;
const voiceStateMetadata = (require(4863) /* metro dependency 4863: AppAnalyticsUtils */).getVoiceStateMetadata(guildId,
channelId, true);
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const VIDEO_EFFECT_UPDATED = AnalyticEvents.VIDEO_EFFECT_UPDATED;
const object2 = {location: a1};
object2.effect_type = getEffectAnalyticsType(a0);
object2.effect_detail = getEffectDetailAnalyticsName(a0);
object2.effect_state = a2;
object2.channel_id = channelId;
object2.channel_type = channel == null ? value5 : channel.type;
object2.guild_id = guildId;
object2.voice_state_count = voiceStateMetadata.voice_state_count;
object2.video_stream_count = voiceStateMetadata.video_stream_count;
object2.media_session_id = RTCConnectionStore.getMediaSessionId();
object2.rtc_connection_id = RTCConnectionStore.getRTCConnectionId();
object2.is_animated = isAnimatedBackgroundOption(a0);
Reflect.apply(track, defaultImport, [VIDEO_EFFECT_UPDATED, object2]);
return value5;
}
function getVideoBackgroundProtoFromOption(a0) { // fn#69483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9091:2488, offset: 0x01c74bf7, size: 135 bytes, params: 2, frame: 13
return a0 == null ? {oneofKind: undefined} : isCustomBackgroundOption(a0) ? {oneofKind: 'customAsset',
customAsset: {id: a0.id, assetHash: a0.asset}} : a0 === 'blur' ? {oneofKind: 'blur',
blur: {useBlur: true}} : {oneofKind: 'presetOption', presetOption: a0};
}
function getVideoBackgroundOptionFromProto(a0, a1) { // fn#69484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9091:2789, offset: 0x01c74c7e, size: 152 bytes, params: 3, frame: 6
var object2;
var customAsset;
let value = null;
if (value == a0) {
return value;
}
let oneofKind = a0.oneofKind;
if (oneofKind === undefined) {
return value;
}
oneofKind = a0.oneofKind;
if (oneofKind === 'customAsset') {
object2 = {};
value = environment;
object2.type = VideoFilterType.BACKGROUND;
customAsset = a0.customAsset;
object2.id = customAsset.id;
object2.user_id = a1;
customAsset = a0.customAsset;
object2.asset = customAsset.assetHash;
return object2;
}
const value2 = 'blur';
if (value2 === oneofKind) {
return a0.blur.useBlur ? value2 : value;
}
if (oneofKind === 'presetOption') {
return a0.presetOption;
}
}
@@ -0,0 +1,76 @@
/* Metro module 8908; source: modules/video_backgrounds/VideoFilterImageError.tsx; dependencies: [7, 6, 15, 17, 18, 1244, 507, 2] */
function _fun69506(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9093:6, offset: 0x01c75445, size: 246 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
object = {ASSET_SIZE: 'BINARY_TYPE_MAX_SIZE'};
object = {ASSET: 'asset'};
const V8APIError = (require(507) /* metro dependency 507: HTTPUtils */).V8APIError;
const value = _fun69510(V8APIError);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_backgrounds/VideoFilterImageError.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_69507() { // fn#69507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9093:148, offset: 0x01c7553b, size: 98 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_69507_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun69510(a0) { // fn#69510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9093:461, offset: 0x01c7559d, size: 42 bytes, params: 2, frame: 14
const closure = VideoFilterImageError;
env0_6(closure, a0);
return env0_2(closure);
}
function VideoFilterImageError(a0, a1) { // fn#69511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9093:473, offset: 0x01c755c7, size: 310 bytes, params: 3, frame: 21
const binding = env1_3;
const value3 = undefined;
binding(this, VideoFilterImageError);
const items2 = [a0, a1];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const Mt8yDB = t.Mt8yDB;
items2[2] = Reflect.apply(string, intl, [Mt8yDB]);
const value4 = env1_5(VideoFilterImageError);
const value7 = env1_4(this, _isNativeReflectConstruct_69507() ? global.Reflect.construct(value4, items2,
env1_5(this).constructor) : value4.apply(this, items2));
const getFieldErrors = value7.getFieldErrors;
const ASSET = env1_8.ASSET;
const value8 = Reflect.apply(getFieldErrors, value7, [ASSET]);
if (value8 != null && (value8[0] == null ? value3 : value8[0].code) === env1_7.ASSET_SIZE) {
value7.message = intl.string(t.mrlScX);
}
return value7;
}
@@ -0,0 +1,603 @@
/* Metro module 8904; source: modules/video_backgrounds/applyBackgroundOption.tsx; dependencies: [5, 1878, 8905, 7617, 661, 44, 8907, 4406, 8910, 1423, 8906, 8909, 8911, 2] */
function _fun69429(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:6, offset: 0x01c73868, size: 304 bytes, params: 8, frame: 20
const env0_0 = require;
const applyBackgroundOption = function() {
return _applyBackgroundOption.apply(this, arguments);
};
const closure = function() {
return _applyBackgroundOptionLive.apply(this, arguments);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const videoBackgroundStore = importDefault(8905) /* metro dependency 8905: VideoBackgroundStore */;
const videoBackgroundConstantsModule = require(7617) /* metro dependency 7617: VideoBackgroundConstants */;
const env0_6 = videoBackgroundConstantsModule.BACKGROUND_REPLACEMENT_SIZE;
const env0_7 = videoBackgroundConstantsModule.BLUR_BACKGROUND_OPTION;
const env0_8 = (require(661) /* metro dependency 661: Constants */).NOOP;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_backgrounds/applyBackgroundOption.tsx');
exports.applyBackgroundOptionLive = closure;
exports.applyBackgroundOptionPreview = function() {
return _applyBackgroundOptionPreview.apply(this, arguments);
};
exports.applyInitialVideoBackgroundOption = applyInitialVideoBackgroundOption;
}
function _getFilterBlob() { // fn#69430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:212, offset: 0x01c73998, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun69432).apply(this, arguments);
}
function applyBackgroundMediaFilterSettings(a0, a1, a2, a3, a4) { // fn#69433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:392, offset: 0x01c73a4c, size: 84 bytes, params: 6, frame: 14
(require(8907) /* metro dependency 8907: VideoBackgroundActionCreators */).applyMediaFilterSettings({[a0]: {graph: a2,
target: a1, image: a3, blob: a4}});
}
function _applyBackgroundOption() { // fn#69435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:606, offset: 0x01c73aa0, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun69437).apply(this, arguments);
}
function _applyBackgroundOptionLive() { // fn#69444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:2078, offset: 0x01c73eb8, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun69446).apply(this, arguments);
}
function _applyBackgroundOptionPreview() { // fn#69447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:2397, offset: 0x01c73fb4, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun69449).apply(this, arguments);
}
function applyInitialVideoBackgroundOption() { // fn#69451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:3082, offset: 0x01c740ce, size: 140 bytes, params: 1, frame: 16
var r1;
var lastUsedVideoBackgroundOption;
const currentUser = UserStore.getCurrentUser();
if (currentUser != null) {
lastUsedVideoBackgroundOption = (require(8909) /* metro dependency 8909: LastUsedVideoBackgroundOption */).getLastUsedVideoBackgroundOption(currentUser);
r1 = (importDefault(8911) /* metro dependency 8911: isVideoBackgroundSupported */)() && !VideoBackgroundStore.hasBeenApplied;
r1 = r1 && lastUsedVideoBackgroundOption != null;
if (r1) {
applyBackgroundOptionLive(lastUsedVideoBackgroundOption, {track: false}).catch(NOOP);
}
}
}
function* _fun69432(a0) { // fn#69432, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:263, offset: 0x01c739d5, size: 119 bytes, params: 2, frame: 14
if (false) {
return undefined;
}
yield global.fetch(a0);
value = undefined;
if (false) {
return value;
}
yield value.blob();
value = undefined;
if (false) {
return value;
}
const Uint8ClampedArray = global.Uint8ClampedArray;
yield value.arrayBuffer();
value = undefined;
if (false) {
return value;
}
const value6 = Object.create(Uint8ClampedArray.prototype, {constructor: {value: Uint8ClampedArray}});
const uint8ClampedArray = new Uint8ClampedArray(value);
return uint8ClampedArray instanceof Object ? uint8ClampedArray : value6;
}
function* _fun69437(a0, a1, a2) { // fn#69437, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:673, offset: 0x01c73add, size: 553 bytes, params: 4, frame: 28
var environment;
var r9;
var r11;
var r7;
var r8;
var asset;
var binding;
var property;
var isVideo;
var closure;
var value10;
var value11;
var value12;
var value13;
var value14;
var value15;
var binding2;
var binding3;
var value16;
var FilterSettingsGraph;
var BACKGROUND_REPLACEMENT;
var error;
var value17;
var value18;
if (false) {
return undefined;
}
value = undefined;
if (a2 == null) {
value18 = environment.__proto__.__proto__;
env2_10(a0, a1, env2_0(env2_2[7]).FilterSettingsGraph.NONE);
} else {
if (a2 === env2_7) {
env2_10(a0, a1, env2_0(env2_2[7]).FilterSettingsGraph.BACKGROUND_BLUR);
return value;
}
var value4 = typeof a2;
if (value4 === 'string') {
binding = env2_1;
property = binding(env2_2[8])()[a2];
isVideo = property.isVideo;
r11 = isVideo != null && isVideo;
r7 = property.source;
r8 = r11;
} else if (value4 === 'number') {
binding = env2_1;
property = binding(env2_2[8])()[a2];
isVideo = property.isVideo;
r11 = isVideo != null && isVideo;
r7 = property.source;
r8 = r11;
} else {
asset = a2.asset;
binding = env2_0;
r9 = binding(env2_2[9]).isAnimatedIconHash(asset) || env2_0(env2_2[9]).isVideoAssetHash(asset);
binding = env2_0;
r7 = binding(env2_2[9]).getVideoFilterAssetURL({userId: a2.user_id, assetId: a2.id, assetHash: asset,
size: env2_6.width});
r8 = r9;
}
if (r7 == null) {
return value;
}
if (r8) {
r9 = value;
if (r8) {
try {
closure = getFilterBlob;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
value13 = closure(r7);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
yield value13;
try {
value14 = undefined;
value15 = false;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
if (value15) {
return value14;
}
r11 = value14;
try {
binding = env2_10;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding2 = env2_0;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
property = binding3[7];
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
value16 = binding2(property);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
FilterSettingsGraph = value16.FilterSettingsGraph;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
BACKGROUND_REPLACEMENT = FilterSettingsGraph.BACKGROUND_REPLACEMENT;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding(a0, a1, BACKGROUND_REPLACEMENT, r9, r11);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
}
return value;
}
r11 = value;
try {
binding = env2_10;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding2 = env2_0;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
property = binding3[7];
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
value16 = binding2(property);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
FilterSettingsGraph = value16.FilterSettingsGraph;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
BACKGROUND_REPLACEMENT = FilterSettingsGraph.BACKGROUND_REPLACEMENT;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding(a0, a1, BACKGROUND_REPLACEMENT, r9, r11);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
}
return value;
}
try {
closure = function(a0) {
var env0_0 = a0;
var Promise = global.Promise;
var value = Object.create(Promise.prototype, {constructor: {value: Promise}});
var value2 = new Promise(_fun69439);
return value2 instanceof Object ? value2 : value;
};
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
value10 = closure(r7);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
yield value10;
try {
value11 = undefined;
value12 = false;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
if (value12) {
return value11;
}
r9 = value11;
if (r8) {
try {
closure = getFilterBlob;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
value13 = closure(r7);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
yield value13;
try {
value14 = undefined;
value15 = false;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
if (value15) {
return value14;
}
r11 = value14;
try {
binding = env2_10;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding2 = env2_0;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
property = binding3[7];
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
value16 = binding2(property);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
FilterSettingsGraph = value16.FilterSettingsGraph;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
BACKGROUND_REPLACEMENT = FilterSettingsGraph.BACKGROUND_REPLACEMENT;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding(a0, a1, BACKGROUND_REPLACEMENT, r9, r11);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
}
return value;
}
r11 = value;
try {
binding = env2_10;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding2 = env2_0;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding3 = env2_2;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
property = binding3[7];
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
value16 = binding2(property);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
FilterSettingsGraph = value16.FilterSettingsGraph;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
BACKGROUND_REPLACEMENT = FilterSettingsGraph.BACKGROUND_REPLACEMENT;
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
return value;
}
try {
binding(a0, a1, BACKGROUND_REPLACEMENT, r9, r11);
} catch (error) {
binding = env2_0;
value17 = binding(env2_2[6]);
value17.errorApplyingMediaFilterSettings();
}
}
return value;
}
async function _fun69446(a0, {track, location}) { // fn#69446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:2153, offset: 0x01c73efe, size: 182 bytes, params: 3, frame: 23
if (true) {
track = track === undefined || track;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var binding = env2_11;
var binding2 = env2_0;
var binding3 = env2_2;
var FilterSettingsKey = binding2(binding3[7]).FilterSettingsKey;
var CAMERA_BACKGROUND_LIVE = FilterSettingsKey.CAMERA_BACKGROUND_LIVE;
var FilterTargetType = binding2(binding3[7]).FilterTargetType;
var INPUT_DEVICE = FilterTargetType.INPUT_DEVICE;
await binding(CAMERA_BACKGROUND_LIVE, {type: INPUT_DEVICE}, a0);
if (false) {
return undefined;
}
if (track) {
env2_0(env2_2[10]).trackBackgroundOptionUpdated(a0, location, 'Enabled');
}
}
}
async function _fun69449(a0, a1, {track, location}) { // fn#69449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:2478, offset: 0x01c73ffa, size: 212 bytes, params: 4, frame: 23
if (true) {
track = track === undefined || track;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var binding = env2_0;
var binding2 = env2_2;
binding(binding2[6]).startApplyMediaFilterSettings();
var binding3 = env2_11;
var FilterSettingsKey = binding(binding2[7]).FilterSettingsKey;
var CAMERA_BACKGROUND_PREVIEW = FilterSettingsKey.CAMERA_BACKGROUND_PREVIEW;
var FilterTargetType = binding(binding2[7]).FilterTargetType;
var STREAM = FilterTargetType.STREAM;
await binding3(CAMERA_BACKGROUND_PREVIEW, {type: STREAM, streamId: a1}, a0);
if (false) {
return undefined;
}
if (track) {
env2_0(env2_2[10]).trackBackgroundOptionUpdated(a0, location, 'Preview');
}
}
}
function getFilterImage(a0) { // fn#69438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:1199, offset: 0x01c73d06, size: 46 bytes, params: 2, frame: 11
const env0_0 = a0;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun69439);
return promise instanceof Object ? promise : value;
}
function _fun69439(a0, a1) { // fn#69439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:1246, offset: 0x01c73d34, size: 103 bytes, params: 3, frame: 10
const env0_0 = a0;
const env0_1 = a1;
const Image = global.Image;
const image = new Image();
image.crossOrigin = 'anonymous';
image.onload = onload_69440;
image.onerror = function(a0) {
return require(a0);
};
image.src = env0_0;
}
function onload_69440() { // fn#69440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9089:1305, offset: 0x01c73d9b, size: 285 bytes, params: 1, frame: 22
let value = global.document.createElement('canvas');
value.width = env5_6.width;
let height = env5_6.height;
value.height = height;
const context = value.getContext('2d');
let binding = env5_1;
binding(env5_2[5])(context != null, 'Canvas context is missing');
binding = env0_2;
const value6 = binding.height / binding.width;
height = env5_6.height;
const value7 = env5_6.height / value6;
context.drawImage(binding, (value.width - value7) / 2, (value.height - height) / 2, value7, height);
value = context.getImageData(0, 0, value.width, value.height);
env0_0({data: value.data, width: value.width, height: value.height, pixelFormat: 'rgba'});
}
@@ -0,0 +1,27 @@
/* Metro module 8910; source: modules/video_backgrounds/getDefaultBackgroundData.native.tsx; dependencies: [7617, 2] */
function _fun69519(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9095:6, offset: 0x01c7595d, size: 139 bytes, params: 8, frame: 18
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const DefaultVideoBackground = (require(7617) /* metro dependency 7617: VideoBackgroundConstants */).DefaultVideoBackground;
object2 = {'id': null, 'source': '', 'name': ''};
const OPTION_1 = DefaultVideoBackground.OPTION_1;
object2.id = OPTION_1;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_backgrounds/getDefaultBackgroundData.native.tsx');
exports.default = _default_69520;
}
function _default_69520() { // fn#69520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9095:174, offset: 0x01c759e8, size: 103 bytes, params: 1, frame: 4
const OPTION_1 = DefaultVideoBackground.OPTION_1;
const binding = env0_1;
const OPTION_2 = DefaultVideoBackground.OPTION_2;
const OPTION_3 = DefaultVideoBackground.OPTION_3;
const OPTION_4 = DefaultVideoBackground.OPTION_4;
const OPTION_7 = DefaultVideoBackground.OPTION_7;
const OPTION_8 = DefaultVideoBackground.OPTION_8;
const OPTION_9 = DefaultVideoBackground.OPTION_9;
const OPTION_10 = DefaultVideoBackground.OPTION_10;
return {[OPTION_1]: binding, [OPTION_2]: binding, [OPTION_3]: binding, [OPTION_4]: binding, [OPTION_7]: binding,
[OPTION_8]: binding, [OPTION_9]: binding, [OPTION_10]: binding};
}
@@ -0,0 +1,18 @@
/* Metro module 8911; source: modules/video_backgrounds/isVideoBackgroundSupported.tsx; dependencies: [4259, 4291, 2] */
function _fun69521(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9096:6, offset: 0x01c75a4f, size: 128 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const env0_1 = (require(4291) /* metro dependency 4291: Constants */).Features;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/video_backgrounds/isVideoBackgroundSupported.tsx');
exports.default = isVideoBackgroundSupported;
}
function isVideoBackgroundSupported() { // fn#69522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9096:225, offset: 0x01c75acf, size: 87 bytes, params: 1, frame: 13
const value = a0;
const r1 = value !== undefined ? value : MediaEngineStore;
const supports = r1.supports;
const MEDIAPIPE = Features.MEDIAPIPE;
return Reflect.apply(supports, r1, [MEDIAPIPE]) && global.Object.values(r1.getVideoDevices()).length > 0;
}