This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -1,16 +1,19 @@
/* Metro module 4784; source: modules/stickers/StickerMessagePreviewStore.tsx; dependencies: [6, 7, 15, 17, 18, 4645, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DraftStoreModule from '../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
function _fun41337(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:6, offset: 0x0111c59b, size: 317 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
let env0_6 = {};
let env0_7 = {};
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun41341(Store);
value.displayName = 'StickerMessagePreviewStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
@@ -18,61 +21,71 @@ function _fun41337(global, require, importDefault, importAll, module, exports, d
env0_6 = {};
env0_7 = {};
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickerMessagePreviewStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickerMessagePreviewStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_41338() { // fn#41338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:168, offset: 0x0111c6d8, size: 94 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) {
function _isNativeReflectConstruct_41338() { // fn#41338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:168, offset: 0x0111c6d8, size: 94 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_41338_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_41338_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun41341(a0) { // fn#41341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:381, offset: 0x0111c736, size: 70 bytes, params: 2, frame: 15
const closure = StickerMessagePreviewStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'getStickerPreview', value: value_41343}]);
}
function _fun41341(a0) { // fn#41341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:381, offset: 0x0111c736, size: 70 bytes, params: 2, frame: 15
const StickerMessagePreviewStore2 = StickerMessagePreviewStore;
Inherits(StickerMessagePreviewStore2, a0);
return CreateClass(StickerMessagePreviewStore2, [{key: 'getStickerPreview', value: value_41343}]);
function StickerMessagePreviewStore() { // fn#41342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:393, offset: 0x00e4046a, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, StickerMessagePreviewStore);
const value3 = env1_3(StickerMessagePreviewStore);
return env1_2(this, _isNativeReflectConstruct_41338() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function ADD_STICKER_PREVIEW({channelId, sticker, draftType}) { // fn#41344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:906, offset: 0x0111c7a3, size: 63 bytes, params: 2, frame: 5
const FirstThreadMessage = DraftType.FirstThreadMessage;
(draftType === FirstThreadMessage ? env0_7 : env0_6)[channelId] = [sticker];
}
function value_41343(a0, a1) { // fn#41343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:748, offset: 0x0111c77c, size: 39 bytes, params: 3, frame: 3
const FirstThreadMessage = DraftType.FirstThreadMessage;
return (a1 === FirstThreadMessage ? env1_7 : env1_6)[a0];
}
function CLEAR_STICKER_PREVIEW({channelId, draftType}) { // fn#41345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:1037, offset: 0x0111c7e2, size: 59 bytes, params: 2, frame: 4
const FirstThreadMessage = DraftType.FirstThreadMessage;
const r0 = draftType === FirstThreadMessage ? env0_7 : env0_6;
if (r0[channelId] != null) {
delete r0[channelId];
}
function ADD_STICKER_PREVIEW({channelId, sticker, draftType}) { // fn#41344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:906, offset: 0x0111c7a3, size: 63 bytes, params: 2, frame: 5
const FirstThreadMessage = DraftType.FirstThreadMessage;
(draftType === FirstThreadMessage ? env0_7 : env0_6)[channelId] = [sticker];
}
function CLEAR_STICKER_PREVIEW({channelId, draftType}) { // fn#41345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:1037, offset: 0x0111c7e2, size: 59 bytes, params: 2, frame: 4
const FirstThreadMessage = DraftType.FirstThreadMessage;
const r0 = draftType === FirstThreadMessage ? env0_7 : env0_6;
if (r0[channelId] != null) {
delete r0[channelId];
}
}
}
function value_41343(a0, a1) { // fn#41343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4962:748, offset: 0x0111c77c, size: 39 bytes, params: 3, frame: 3
const FirstThreadMessage = DraftType.FirstThreadMessage;
return (a1 === FirstThreadMessage ? env1_7 : env1_6)[a0];
}
global.__d(_fun41337, 4784, [6, 7, 15, 17, 18, 4645, 566, 694,
2]) /* metro module 4784, dependencies: [6, 7, 15, 17, 18, 4645, 566, 694, 2] */;
+76 -68
View File
@@ -1,50 +1,73 @@
/* Metro module 6943; source: modules/stickers/StickerSendability.tsx; dependencies: [1945, 6585, 661, 3802, 4643, 3789, 2] */
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import PremiumUtils from '../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
import StickersPackStore from './StickersPackStore.tsx'; /* Metro dependency 6585 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as StickersUtilsModule from './StickersUtils.tsx'; /* Metro dependency 4643 */
function _fun55185(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7121:6, offset: 0x01378437, size: 247 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const stickersPackStore = importDefault(6585) /* metro dependency 6585: StickersPackStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).Permissions;
object2 = {SENDABLE: 0};
object2[0] = 'SENDABLE';
object2.SENDABLE_WITH_PREMIUM = 1;
object2[1] = 'SENDABLE_WITH_PREMIUM';
object2.NONSENDABLE = 2;
object2[2] = 'NONSENDABLE';
object2.SENDABLE_WITH_BOOSTED_GUILD = 3;
object2[3] = 'SENDABLE_WITH_BOOSTED_GUILD';
const closure = getStickerSendability;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickerSendability.tsx');
exports.StickerSendability = object2;
exports.getStickerSendability = closure;
object = {SENDABLE: 0};
object[0] = 'SENDABLE';
object.SENDABLE_WITH_PREMIUM = 1;
object[1] = 'SENDABLE_WITH_PREMIUM';
object.NONSENDABLE = 2;
object[2] = 'NONSENDABLE';
object.SENDABLE_WITH_BOOSTED_GUILD = 3;
object[3] = 'SENDABLE_WITH_BOOSTED_GUILD';
const getStickerSendability2 = getStickerSendability;
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickerSendability.tsx');
exports.StickerSendability = object;
exports.getStickerSendability = getStickerSendability2;
exports.isSendableSticker = isSendableSticker;
}
function getStickerSendability(a0, a1, a2) { // fn#55186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7121:366, offset: 0x0137852e, size: 427 bytes, params: 4, frame: 20
var r5;
var r4;
var r0;
var moduleValue2;
var moduleValue3;
var binding;
if (a1 == null) {
return env0_7.NONSENDABLE;
}
const canUseCustomStickersEverywhere2 = (importDefault(3802) /* metro dependency 3802: PremiumUtils */).canUseCustomStickersEverywhere(a1);
const stickersUtilsModule = require(4643) /* metro dependency 4643: StickersUtils */;
if (stickersUtilsModule.isStandardSticker(a0)) {
r0 = StickersPackStore.getStickerPack(a0.pack_id) == null ? env0_7.NONSENDABLE : env0_7.SENDABLE;
} else {
moduleValue2 = stickersUtilsModule;
if (moduleValue2.isGuildSticker(a0)) {
if (a2 != null) {
if (GuildMemberStore.getSelfMember(a0.guild_id) == null) {
r4 = env0_7.NONSENDABLE;
} else if (a0.available) {
if (a2.guild_id == null) {
function getStickerSendability(a0, a1, a2) { // fn#55186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7121:366, offset: 0x0137852e, size: 427 bytes, params: 4, frame: 20
var r5;
var r4;
var r0;
var moduleValue2;
var guildMemberStoreBinding;
var moduleValue3;
var binding;
var stickersPackStoreBinding;
if (a1 == null) {
return env0_7.NONSENDABLE;
}
const canUseCustomStickersEverywhere2 = (PremiumUtils).canUseCustomStickersEverywhere(a1);
if (StickersUtilsModule.isStandardSticker(a0)) {
stickersPackStoreBinding = StickersPackStore;
r0 = stickersPackStoreBinding.getStickerPack(a0.pack_id) == null ? env0_7.NONSENDABLE : env0_7.SENDABLE;
} else {
moduleValue2 = StickersUtilsModule;
if (moduleValue2.isGuildSticker(a0)) {
if (a2 != null) {
guildMemberStoreBinding = GuildMemberStore;
if (guildMemberStoreBinding.getSelfMember(a0.guild_id) == null) {
r4 = env0_7.NONSENDABLE;
} else if (a0.available) {
if (a2.guild_id == null) {
if (a2.guild_id == null) {
binding = env0_7;
r5 = canUseCustomStickersEverywhere2 ? binding.SENDABLE : binding.SENDABLE_WITH_PREMIUM;
} else {
moduleValue3 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r5 = moduleValue3.can({permission: Permissions.USE_EXTERNAL_STICKERS, user: a1,
context: a2}) ? canUseCustomStickersEverywhere2 ? env0_7.SENDABLE : env0_7.SENDABLE_WITH_PREMIUM : env0_7.NONSENDABLE;
}
} else if (a2.guild_id === '') {
if (a2.guild_id == null) {
binding = env0_7;
r5 = canUseCustomStickersEverywhere2 ? binding.SENDABLE : binding.SENDABLE_WITH_PREMIUM;
} else {
moduleValue3 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r5 = moduleValue3.can({permission: Permissions.USE_EXTERNAL_STICKERS, user: a1,
context: a2}) ? canUseCustomStickersEverywhere2 ? env0_7.SENDABLE : env0_7.SENDABLE_WITH_PREMIUM : env0_7.NONSENDABLE;
}
} else if (a2.guild_id === a0.guild_id) {
r5 = env0_7.SENDABLE;
} else if (a2.guild_id == null) {
binding = env0_7;
r5 = canUseCustomStickersEverywhere2 ? binding.SENDABLE : binding.SENDABLE_WITH_PREMIUM;
} else {
@@ -52,43 +75,28 @@ function getStickerSendability(a0, a1, a2) { // fn#55186, source: /ci/build/disc
r5 = moduleValue3.can({permission: Permissions.USE_EXTERNAL_STICKERS, user: a1,
context: a2}) ? canUseCustomStickersEverywhere2 ? env0_7.SENDABLE : env0_7.SENDABLE_WITH_PREMIUM : env0_7.NONSENDABLE;
}
} else if (a2.guild_id === '') {
if (a2.guild_id == null) {
binding = env0_7;
r5 = canUseCustomStickersEverywhere2 ? binding.SENDABLE : binding.SENDABLE_WITH_PREMIUM;
} else {
moduleValue3 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r5 = moduleValue3.can({permission: Permissions.USE_EXTERNAL_STICKERS, user: a1,
context: a2}) ? canUseCustomStickersEverywhere2 ? env0_7.SENDABLE : env0_7.SENDABLE_WITH_PREMIUM : env0_7.NONSENDABLE;
}
} else if (a2.guild_id === a0.guild_id) {
r5 = env0_7.SENDABLE;
} else if (a2.guild_id == null) {
binding = env0_7;
r5 = canUseCustomStickersEverywhere2 ? binding.SENDABLE : binding.SENDABLE_WITH_PREMIUM;
r4 = r5;
} else {
moduleValue3 = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r5 = moduleValue3.can({permission: Permissions.USE_EXTERNAL_STICKERS, user: a1,
context: a2}) ? canUseCustomStickersEverywhere2 ? env0_7.SENDABLE : env0_7.SENDABLE_WITH_PREMIUM : env0_7.NONSENDABLE;
r4 = env0_7.SENDABLE_WITH_BOOSTED_GUILD;
}
r4 = r5;
r0 = r4;
} else {
r4 = env0_7.SENDABLE_WITH_BOOSTED_GUILD;
r0 = env0_7.NONSENDABLE;
}
r0 = r4;
} else {
r0 = env0_7.NONSENDABLE;
}
} else {
r0 = env0_7.NONSENDABLE;
}
return r0;
}
function isSendableSticker(a0, a1, a2) { // fn#55187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7121:1059, offset: 0x013786d9, size: 41 bytes, params: 4, frame: 16
const stickerSendability = getStickerSendability(a0, a1, a2);
const SENDABLE = env0_7.SENDABLE;
return stickerSendability === SENDABLE;
}
return r0;
}
function isSendableSticker(a0, a1, a2) { // fn#55187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7121:1059, offset: 0x013786d9, size: 41 bytes, params: 4, frame: 16
const stickerSendability = getStickerSendability(a0, a1, a2);
const SENDABLE = env0_7.SENDABLE;
return stickerSendability === SENDABLE;
}
global.__d(_fun55185, 6943, [1945, 6585, 661, 3802, 4643, 3789,
2]) /* metro module 6943, dependencies: [1945, 6585, 661, 3802, 4643, 3789, 2] */;
@@ -1,4 +1,18 @@
/* Metro module 11050; source: modules/stickers/StickersActionCreators.tsx; dependencies: [5, 4257, 1949, 4646, 1878, 6583, 661, 670, 4141, 694, 507, 4643, 7618, 1362, 22, 4647, 1244, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import LocaleStore from '../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */
import GatewayConnectionStore from '../gateway/GatewayConnectionStore.tsx'; /* Metro dependency 4257 */
import GuildAvailabilityStore from '../../stores/GuildAvailabilityStore.tsx'; /* Metro dependency 4646 */
import StickersStore from './StickersStore.tsx'; /* Metro dependency 6583 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as UserSettingsConstantsModule from '../user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UserSettingsProtoActionCreatorsModule from '../user_settings/UserSettingsProtoActionCreators.tsx'; /* Metro dependency 1362 */
function _fun84602(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:6, offset: 0x01f51053, size: 425 bytes, params: 8, frame: 23
let env0_0 = require;
const cleanFavoriteStickers = function(a0) {
@@ -20,14 +34,7 @@ function _fun84602(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */;
const guildAvailabilityStore = importDefault(4646) /* metro dependency 4646: GuildAvailabilityStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
const env0_9 = (require(661) /* metro dependency 661: Constants */).Endpoints;
let value = require(670) /* metro dependency 670: UserSettingsConstants */;
let value = UserSettingsConstantsModule;
const env0_10 = value.MAX_FAVORITES;
const env0_11 = value.UserSettingsDelay;
value = _fun84605();
@@ -37,7 +44,7 @@ function _fun84602(global, require, importDefault, importAll, module, exports, d
const value5 = _fun84623();
const value6 = _fun84627();
const value7 = _fun84631();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickersActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickersActionCreators.tsx');
exports.fetchStickerPack = value;
exports.fetchStickerPacks = value2;
exports.fetchSticker = value3;
@@ -59,342 +66,379 @@ function _fun84602(global, require, importDefault, importAll, module, exports, d
var INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
FrecencyUserSettingsActionCreators.updateAsync('favoriteStickers', _fun84640, INFREQUENT_USER_ACTION);
};
}
function cleanFavoriteStickers(a0) { // fn#84603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:2689, offset: 0x01f511fc, size: 69 bytes, params: 2, frame: 13
var r1;
var r0;
let value = a0;
if (GuildAvailabilityStore.totalUnavailableGuilds > 0) {
r0 = value;
} else {
if (GatewayConnectionStore.isConnected()) {
value = value.filter(_fun84604);
r1 = value;
function cleanFavoriteStickers(a0) { // fn#84603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:2689, offset: 0x01f511fc, size: 69 bytes, params: 2, frame: 13
var r1;
var r0;
var gatewayConnectionStoreBinding;
let value = a0;
if (GuildAvailabilityStore.totalUnavailableGuilds > 0) {
r0 = value;
} else {
r1 = value;
gatewayConnectionStoreBinding = GatewayConnectionStore;
if (gatewayConnectionStoreBinding.isConnected()) {
value = value.filter(_fun84604);
r1 = value;
} else {
r1 = value;
}
r0 = r1;
}
r0 = r1;
}
return r0;
}
function _fun84605() { // fn#84605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:228, offset: 0x01f5125e, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun84607);
return _fun84608;
}
function _fun84609() { // fn#84609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:516, offset: 0x01f5132f, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun84611);
return _fun84613;
}
function _fun84614() { // fn#84614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:933, offset: 0x01f514ae, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun84616);
return _fun84617;
}
function _fun84618() { // fn#84618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1339, offset: 0x01f5160d, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun84620);
return _fun84622;
}
function _fun84623() { // fn#84623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1668, offset: 0x01f51733, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun84625);
return _fun84626;
}
function _fun84627() { // fn#84627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1842, offset: 0x01f517ce, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun84629);
return _fun84630;
}
function _fun84631() { // fn#84631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:2503, offset: 0x01f519c0, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun84633);
return _fun84634;
}
function addStickerPreview(a0, a1, a2) { // fn#84635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3079, offset: 0x01f51a60, size: 72 bytes, params: 4, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'ADD_STICKER_PREVIEW', channelId: a0,
sticker: a1, draftType: a2});
}
function clearStickerPreview(a0, a1) { // fn#84636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3217, offset: 0x01f51aa8, size: 64 bytes, params: 3, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CLEAR_STICKER_PREVIEW', channelId: a0,
draftType: a1});
}
function favoriteSticker(a0) { // fn#84637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3343, offset: 0x01f51ae8, size: 76 bytes, params: 2, frame: 16
const env0_0 = a0;
const FrecencyUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators;
const updateAsync = FrecencyUserSettingsActionCreators.updateAsync;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
Reflect.apply(updateAsync, FrecencyUserSettingsActionCreators, ['favoriteStickers', _fun84638,
INFREQUENT_USER_ACTION]);
}
function unfavoriteSticker(a0) { // fn#84639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3772, offset: 0x01f51c4c, size: 76 bytes, params: 2, frame: 16
const env0_0 = a0;
const FrecencyUserSettingsActionCreators = (require(1362) /* metro dependency 1362: UserSettingsProtoActionCreators */).FrecencyUserSettingsActionCreators;
const updateAsync = FrecencyUserSettingsActionCreators.updateAsync;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
Reflect.apply(updateAsync, FrecencyUserSettingsActionCreators, ['favoriteStickers', function(a0) {
a0.stickerIds = a0.stickerIds.filter(_fun84641);
a0.stickerIds = cleanFavoriteStickers(a0.stickerIds);
}, INFREQUENT_USER_ACTION]);
}
function _fun84604(a0) { // fn#84604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:2785, offset: 0x01f51241, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__;
return StickersStore.getStickerById(a0) != null;
}
function* _fun84607(a0, a1) { // fn#84607, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:248, offset: 0x01f5128d, size: 162 bytes, params: 3, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = env2_0(env2_2[8]);
const httpGetWithCountryCodeQuery = value3.httpGetWithCountryCodeQuery;
const object2 = {};
object2.url = env2_9.STICKER_PACK(a0);
object2.rejectWithError = false;
yield Reflect.apply(httpGetWithCountryCodeQuery, value3, [object2]);
const value4 = undefined;
if (false) {
return value4;
}
const body = value4.body;
value = env2_1(env2_2[9]);
value.dispatch({type: 'STICKER_PACK_FETCH_SUCCESS', packId: a0, pack: body, ingestStickers: a1});
return body;
}
async function _fun84611() { // fn#84611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:536, offset: 0x01f51367, size: 278 bytes, params: 1, frame: 18
var environment;
let value = a0;
if (true) {
var locale = (value !== undefined ? value : {}).locale;
locale = locale === undefined ? env2_5.locale : locale;
await undefined;
if (false) {
return undefined;
return r0;
function _fun84604(a0) { // fn#84604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:2785, offset: 0x01f51241, size: 29 bytes, params: 2, frame: 11
const value = environment.__proto__;
return StickersStore.getStickerById(a0) != null;
}
value = environment.__proto__.__proto__;
if (!env2_8.isFetchingStickerPacks) {
if (env2_8.hasLoadedStickerPacks) {
}
function _fun84605() { // fn#84605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:228, offset: 0x01f5125e, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun84607);
return _fun84608;
function* _fun84607(a0, a1) { // fn#84607, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:248, offset: 0x01f5128d, size: 162 bytes, params: 3, frame: 17
if (false) {
return undefined;
}
var binding = env2_1;
var binding2 = env2_2;
binding(binding2[9]).wait(_fun84612);
binding = env2_0;
var HTTP = binding(binding2[10]).HTTP;
var get = HTTP.get;
var STICKER_PACKS = env2_9.STICKER_PACKS;
await Reflect.apply(get, HTTP, [{url: STICKER_PACKS, query: {locale: locale}, rejectWithError: false}]);
var value6 = undefined;
value = environment.__proto__.__proto__;
const value3 = env2_0(env2_2[8]);
const httpGetWithCountryCodeQuery = value3.httpGetWithCountryCodeQuery;
const object = {};
object.url = env2_9.STICKER_PACK(a0);
object.rejectWithError = false;
yield Reflect.apply(httpGetWithCountryCodeQuery, value3, [object]);
const value4 = undefined;
if (false) {
return value6;
return value4;
}
var sticker_packs = value6.body.sticker_packs;
binding = env2_1;
binding(env2_2[9]).dispatch({type: 'STICKER_PACKS_FETCH_SUCCESS', packs: sticker_packs});
const body = value4.body;
value = env2_1(env2_2[9]);
value.dispatch({type: 'STICKER_PACK_FETCH_SUCCESS', packId: a0, pack: body, ingestStickers: a1});
return body;
}
}
}
function* _fun84616(a0) { // fn#84616, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:953, offset: 0x01f514dd, size: 304 bytes, params: 2, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[10]).HTTP;
const get = HTTP.get;
const object2 = {};
object2.url = env2_9.STICKER(a0);
object2.rejectWithError = false;
yield Reflect.apply(get, HTTP, [object2]);
const value3 = undefined;
if (false) {
return value3;
}
const body = value3.body;
const value5 = env2_0(env2_2[11]);
if (value5.isGuildSticker(body)) {
value = env2_1(env2_2[9]);
value.dispatch({type: 'GUILD_STICKER_FETCH_SUCCESS', sticker: body});
return undefined;
}
const value6 = env2_0(env2_2[11]);
if (value6.isStandardSticker(body)) {
value = env2_1(env2_2[9]);
value.dispatch({type: 'PACK_STICKER_FETCH_SUCCESS', sticker: body});
return undefined;
}
const Error = global.Error;
throw new Error('Invalid sticker type');
}
function* _fun84620(a0, a1) { // fn#84620, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1359, offset: 0x01f5163c, size: 180 bytes, params: 3, frame: 17
var environment;
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[10]).HTTP;
var get = HTTP.get;
var object2 = {};
object2.url = env2_9.GUILD_STICKER_PACKS(a0);
object2.rejectWithError = false;
object2.signal = a1;
yield Reflect.apply(get, HTTP, [object2]);
var value3 = undefined;
if (false) {
return value3;
function _fun84608() { // fn#84608, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:468, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
var body = value3.body;
value = env2_1(env2_2[9]);
var dispatch = value.dispatch;
object2 = {type: 'GUILD_STICKERS_FETCH_SUCCESS', guildId: a0};
object2.stickers = body.map(function(a0) {
var r4;
var r0;
var object;
var value = a0;
if (value.user == null) {
r0 = value;
}
function _fun84609() { // fn#84609, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:516, offset: 0x01f5132f, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun84611);
return _fun84613;
async function _fun84611() { // fn#84611, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:536, offset: 0x01f51367, size: 278 bytes, params: 1, frame: 18
var environment;
let value = a0;
if (true) {
var locale = (value !== undefined ? value : {}).locale;
locale = locale === undefined ? env2_5.locale : locale;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
if (!env2_8.isFetchingStickerPacks) {
if (env2_8.hasLoadedStickerPacks) {
return undefined;
}
var binding = env2_1;
var binding2 = env2_2;
binding(binding2[9]).wait(_fun84612);
binding = env2_0;
var HTTP = binding(binding2[10]).HTTP;
var get = HTTP.get;
var STICKER_PACKS = env2_9.STICKER_PACKS;
await Reflect.apply(get, HTTP, [{url: STICKER_PACKS, query: {locale: locale}, rejectWithError: false}]);
var value6 = undefined;
if (false) {
return value6;
}
var sticker_packs = value6.body.sticker_packs;
binding = env2_1;
binding(env2_2[9]).dispatch({type: 'STICKER_PACKS_FETCH_SUCCESS', packs: sticker_packs});
}
}
function _fun84612() { // fn#84612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:640, offset: 0x01f5147d, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[9]).dispatch({type: 'STICKER_PACKS_FETCH_START'});
}
}
function _fun84613() { // fn#84613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:885, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun84614() { // fn#84614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:933, offset: 0x01f514ae, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun84616);
return _fun84617;
function* _fun84616(a0) { // fn#84616, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:953, offset: 0x01f514dd, size: 304 bytes, params: 2, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[10]).HTTP;
const get = HTTP.get;
const object = {};
object.url = env2_9.STICKER(a0);
object.rejectWithError = false;
yield Reflect.apply(get, HTTP, [object]);
const value3 = undefined;
if (false) {
return value3;
}
const body = value3.body;
const value5 = env2_0(env2_2[11]);
if (value5.isGuildSticker(body)) {
value = env2_1(env2_2[9]);
value.dispatch({type: 'GUILD_STICKER_FETCH_SUCCESS', sticker: body});
return undefined;
}
const value6 = env2_0(env2_2[11]);
if (value6.isStandardSticker(body)) {
value = env2_1(env2_2[9]);
value.dispatch({type: 'PACK_STICKER_FETCH_SUCCESS', sticker: body});
return undefined;
}
const Error = global.Error;
throw new Error('Invalid sticker type');
}
function _fun84617() { // fn#84617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1291, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun84618() { // fn#84618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1339, offset: 0x01f5160d, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun84620);
return _fun84622;
function* _fun84620(a0, a1) { // fn#84620, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1359, offset: 0x01f5163c, size: 180 bytes, params: 3, frame: 17
var environment;
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[10]).HTTP;
var get = HTTP.get;
var object = {};
object.url = env2_9.GUILD_STICKER_PACKS(a0);
object.rejectWithError = false;
object.signal = a1;
yield Reflect.apply(get, HTTP, [object]);
var value3 = undefined;
if (false) {
return value3;
}
var body = value3.body;
value = env2_1(env2_2[9]);
var dispatch = value.dispatch;
object = {type: 'GUILD_STICKERS_FETCH_SUCCESS', guildId: a0};
object.stickers = body.map(function(a0) {
var r4;
var r0;
var object;
var value = a0;
if (value.user == null) {
r0 = value;
} else {
object = {};
copyDataProperties(object, value, r4);
object['user_id'] = value.user.id;
object['user'] = value.user;
r0 = object;
}
return r0;
});
Reflect.apply(dispatch, value, [object]);
}
}
function _fun84622() { // fn#84622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1620, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun84623() { // fn#84623, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1668, offset: 0x01f51733, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun84625);
return _fun84626;
function* _fun84625({guild_id, id}) { // fn#84625, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1688, offset: 0x01f51762, size: 108 bytes, params: 2, frame: 18
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[10]).HTTP;
var del = HTTP.del;
var object = {};
object.url = env2_9.GUILD_STICKER(guild_id, id);
object.rejectWithError = false;
yield Reflect.apply(del, HTTP, [object]);
}
}
function _fun84626() { // fn#84626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1794, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun84627() { // fn#84627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1842, offset: 0x01f517ce, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun84629);
return _fun84630;
function* _fun84629(a0) { // fn#84629, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1862, offset: 0x01f517fd, size: 451 bytes, params: 2, frame: 22
var r12;
var r8;
var description;
if (false) {
return undefined;
}
const guildId = a0.guildId;
value = environment.__proto__.__proto__;
const binding = env2_0;
const value3 = undefined;
const HTTP = binding(env2_2[10]).HTTP;
const post = HTTP.post;
let object = {};
object.url = env2_9.GUILD_STICKER_PACKS(guildId);
object.body = a0.platform !== 'web' ? value3 : a0.body;
if (a0.platform !== 'mobile') {
r8 = value3;
} else {
description = a0.description;
r8 = [{name: 'name', value: a0.name}, {name: 'tags', value: a0.tags}, {name: 'description',
value: description}];
r12 = description;
}
object.fields = r8;
object.attachments = a0.platform !== 'mobile' ? value3 : [{name: 'file', file: {uri: a0.uri, name: a0.name,
type: a0.mimeType}}];
const value4 = env2_1(env2_2[12]);
object.headers = value4.buildHeadersForMd5(a0.originalMd5);
object.rejectWithError = false;
yield Reflect.apply(post, HTTP, [object]);
const value5 = undefined;
if (false) {
return value5;
}
const value7 = env2_1(env2_2[9]);
const dispatch = value7.dispatch;
object = {type: 'GUILD_STICKERS_CREATE_SUCCESS', guildId: guildId};
const object4 = {};
copyDataProperties(object4, value5.body, r12);
value = env2_7.getCurrentUser();
object4['user_id'] = value == null ? value3 : value.id;
object.sticker = object4;
Reflect.apply(dispatch, value7, [object]);
return value5.body;
}
function _fun84630() { // fn#84630, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:2455, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun84631() { // fn#84631, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:2503, offset: 0x01f519c0, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun84633);
return _fun84634;
function* _fun84633(a0, a1, a2) { // fn#84633, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:2523, offset: 0x01f519ef, size: 113 bytes, params: 4, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[10]).HTTP;
const patch = HTTP.patch;
const object = {};
object.url = env2_9.GUILD_STICKER(a0, a1);
object.body = a2;
object.rejectWithError = false;
yield Reflect.apply(patch, HTTP, [object]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
function _fun84634() { // fn#84634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:2643, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function addStickerPreview(a0, a1, a2) { // fn#84635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3079, offset: 0x01f51a60, size: 72 bytes, params: 4, frame: 13
(Dispatcher).dispatch({type: 'ADD_STICKER_PREVIEW', channelId: a0,
sticker: a1, draftType: a2});
}
function clearStickerPreview(a0, a1) { // fn#84636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3217, offset: 0x01f51aa8, size: 64 bytes, params: 3, frame: 13
(Dispatcher).dispatch({type: 'CLEAR_STICKER_PREVIEW', channelId: a0,
draftType: a1});
}
function favoriteSticker(a0) { // fn#84637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3343, offset: 0x01f51ae8, size: 76 bytes, params: 2, frame: 16
const env0_0 = a0;
const FrecencyUserSettingsActionCreators = (UserSettingsProtoActionCreatorsModule).FrecencyUserSettingsActionCreators;
const updateAsync = FrecencyUserSettingsActionCreators.updateAsync;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
Reflect.apply(updateAsync, FrecencyUserSettingsActionCreators, ['favoriteStickers', _fun84638,
INFREQUENT_USER_ACTION]);
function _fun84638(a0) { // fn#84638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3447, offset: 0x01f51b34, size: 280 bytes, params: 2, frame: 21
var r0;
var value4;
var defaultImport2;
var show;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const value = environment.__proto__;
const cleanFavoriteStickersBinding = cleanFavoriteStickers;
const stickerIds = a0.stickerIds;
const value2 = undefined;
a0.stickerIds = cleanFavoriteStickersBinding(stickerIds);
const defaultImport = Module00022;
if (defaultImport.size(a0.stickerIds) >= MAX_FAVORITES) {
defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport2.show;
object = {};
copyDataProperties(object, value, r4);
object['user_id'] = value.user.id;
object['user'] = value.user;
r0 = object;
object.title = intl.string(t['+XYXtZ']);
object.body = intl.formatToPlainString(t.JaIyFi, {count: MAX_FAVORITES});
Reflect.apply(show, defaultImport2, [object]);
r0 = false;
} else {
value4 = a0.stickerIds.includes(env0_0);
if (value4) {
r0 = !value4;
} else {
a0.stickerIds.push(env0_0);
r0 = value2;
}
}
return r0;
});
Reflect.apply(dispatch, value, [object2]);
}
}
function* _fun84625({guild_id, id}) { // fn#84625, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1688, offset: 0x01f51762, size: 108 bytes, params: 2, frame: 18
if (true) {
value = environment.__proto__.__proto__;
var HTTP = env2_0(env2_2[10]).HTTP;
var del = HTTP.del;
var object2 = {};
object2.url = env2_9.GUILD_STICKER(guild_id, id);
object2.rejectWithError = false;
yield Reflect.apply(del, HTTP, [object2]);
}
}
function* _fun84629(a0) { // fn#84629, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:1862, offset: 0x01f517fd, size: 451 bytes, params: 2, frame: 22
var r12;
var r8;
var description;
if (false) {
return undefined;
}
const guildId = a0.guildId;
value = environment.__proto__.__proto__;
const binding = env2_0;
const value3 = undefined;
const HTTP = binding(env2_2[10]).HTTP;
const post = HTTP.post;
let object2 = {};
object2.url = env2_9.GUILD_STICKER_PACKS(guildId);
object2.body = a0.platform !== 'web' ? value3 : a0.body;
if (a0.platform !== 'mobile') {
r8 = value3;
} else {
description = a0.description;
r8 = [{name: 'name', value: a0.name}, {name: 'tags', value: a0.tags}, {name: 'description',
value: description}];
r12 = description;
}
object2.fields = r8;
object2.attachments = a0.platform !== 'mobile' ? value3 : [{name: 'file', file: {uri: a0.uri, name: a0.name,
type: a0.mimeType}}];
const value4 = env2_1(env2_2[12]);
object2.headers = value4.buildHeadersForMd5(a0.originalMd5);
object2.rejectWithError = false;
yield Reflect.apply(post, HTTP, [object2]);
const value5 = undefined;
if (false) {
return value5;
}
const value7 = env2_1(env2_2[9]);
const dispatch = value7.dispatch;
object2 = {type: 'GUILD_STICKERS_CREATE_SUCCESS', guildId: guildId};
const object3 = {};
copyDataProperties(object3, value5.body, r12);
value = env2_7.getCurrentUser();
object3['user_id'] = value == null ? value3 : value.id;
object2.sticker = object3;
Reflect.apply(dispatch, value7, [object2]);
return value5.body;
}
function* _fun84633(a0, a1, a2) { // fn#84633, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:2523, offset: 0x01f519ef, size: 113 bytes, params: 4, frame: 17
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const HTTP = env2_0(env2_2[10]).HTTP;
const patch = HTTP.patch;
const object2 = {};
object2.url = env2_9.GUILD_STICKER(a0, a1);
object2.body = a2;
object2.rejectWithError = false;
yield Reflect.apply(patch, HTTP, [object2]);
value = undefined;
if (false) {
return value;
}
return value.body;
}
function _fun84638(a0) { // fn#84638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3447, offset: 0x01f51b34, size: 280 bytes, params: 2, frame: 21
var r0;
var value4;
var defaultImport2;
var show;
var object2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const value = environment.__proto__;
const cleanFavoriteStickersBinding = cleanFavoriteStickers;
const stickerIds = a0.stickerIds;
const value2 = undefined;
a0.stickerIds = cleanFavoriteStickersBinding(stickerIds);
const defaultImport = importDefault(22) /* metro dependency 22 */;
if (defaultImport.size(a0.stickerIds) >= MAX_FAVORITES) {
defaultImport2 = importDefault(4647) /* metro dependency 4647: AlertActionCreators */;
show = defaultImport2.show;
object2 = {};
object2.title = intl.string(t['+XYXtZ']);
object2.body = intl.formatToPlainString(t.JaIyFi, {count: MAX_FAVORITES});
Reflect.apply(show, defaultImport2, [object2]);
r0 = false;
} else {
value4 = a0.stickerIds.includes(env0_0);
if (value4) {
r0 = !value4;
} else {
a0.stickerIds.push(env0_0);
r0 = value2;
}
}
return r0;
}
function _fun84640(a0) { // fn#84640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3878, offset: 0x01f51c98, size: 62 bytes, params: 2, frame: 12
const stickerIds = a0.stickerIds;
a0.stickerIds = stickerIds.filter(_fun84641);
a0.stickerIds = cleanFavoriteStickers(a0.stickerIds);
}
function _fun84612() { // fn#84612, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:640, offset: 0x01f5147d, size: 49 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
env3_1(env3_2[9]).dispatch({type: 'STICKER_PACKS_FETCH_START'});
function unfavoriteSticker(a0) { // fn#84639, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3772, offset: 0x01f51c4c, size: 76 bytes, params: 2, frame: 16
const env0_0 = a0;
const FrecencyUserSettingsActionCreators = (UserSettingsProtoActionCreatorsModule).FrecencyUserSettingsActionCreators;
const updateAsync = FrecencyUserSettingsActionCreators.updateAsync;
const INFREQUENT_USER_ACTION = UserSettingsDelay.INFREQUENT_USER_ACTION;
Reflect.apply(updateAsync, FrecencyUserSettingsActionCreators, ['favoriteStickers', function(a0) {
a0.stickerIds = a0.stickerIds.filter(_fun84641);
a0.stickerIds = cleanFavoriteStickers(a0.stickerIds);
}, INFREQUENT_USER_ACTION]);
function _fun84640(a0) { // fn#84640, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11236:3878, offset: 0x01f51c98, size: 62 bytes, params: 2, frame: 12
const stickerIds = a0.stickerIds;
a0.stickerIds = stickerIds.filter(_fun84641);
a0.stickerIds = cleanFavoriteStickers(a0.stickerIds);
function _fun84641(a0) { // fn#84641, offset: 0x01379260, size: 16 bytes, params: 2, frame: 2
return a0 !== env1_0;
}
}
}
}
global.__d(_fun84602, 11050, [5, 4257, 1949, 4646, 1878, 6583, 661, 670, 4141, 694, 507, 4643, 7618, 1362, 22, 4647,
1244,
2]) /* metro module 11050, dependencies: [5, 4257, 1949, 4646, 1878, 6583, 661, 670, 4141, 694, 507, 4643, 7618, 1362, 22, 4647, 1244, 2] */;
+11 -9
View File
@@ -1,15 +1,16 @@
/* Metro module 3832; source: modules/stickers/StickersConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun31359(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#31359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:3971:6, offset: 0x00ff64ed, size: 252 bytes, params: 8, frame: 16
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {ALWAYS_ANIMATE: 0};
object2[0] = 'ALWAYS_ANIMATE';
object2.ANIMATE_ON_INTERACTION = 1;
object2[1] = 'ANIMATE_ON_INTERACTION';
object2.NEVER_ANIMATE = 2;
object2[2] = 'NEVER_ANIMATE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickersConstants.tsx');
object = {ALWAYS_ANIMATE: 0};
object[0] = 'ALWAYS_ANIMATE';
object.ANIMATE_ON_INTERACTION = 1;
object[1] = 'ANIMATE_ON_INTERACTION';
object.NEVER_ANIMATE = 2;
object[2] = 'NEVER_ANIMATE';
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickersConstants.tsx');
exports.STICKER_PICKER_TAB_PANEL_ID = 'sticker-picker-tab-panel';
exports.STICKER_PICKER_TAB_ID = 'sticker-picker-tab';
exports.GRID_NAVIGATOR_ID = 'sticker-picker-grid';
@@ -21,6 +22,7 @@ function _fun31359(global, require, importDefault, importAll, module, exports, d
'819129296374595614'];
exports.MAX_STICKER_FILE_SIZE = 524288;
exports.STAFF_MAX_STICKER_FILE_SIZE = 1572864;
exports.StickerAnimationSettings = object2;
exports.StickerAnimationSettings = object;
}
global.__d(_fun31359, 3832, [2]) /* metro module 3832, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
+329 -313
View File
@@ -1,4 +1,16 @@
/* Metro module 6585; source: modules/stickers/StickersPackStore.tsx; dependencies: [57, 6, 7, 15, 17, 18, 1420, 1868, 672, 4785, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlainRecordModule from '../../external/discord_common/js/packages/libdiscore/js_shim/js/PlainRecord.tsx'; /* Metro dependency 1420 */
import * as LibdiscoreStoreModule from '../libdiscore/stores/LibdiscoreStore.tsx'; /* Metro dependency 1868 */
import * as StickersTypesModule from './StickersTypes.tsx'; /* Metro dependency 4785 */
function _fun51800(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:6, offset: 0x012e4f84, size: 426 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_51806 = function(a0, a1) {
@@ -50,15 +62,8 @@ function _fun51800(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = (require(1420) /* metro dependency 1420: PlainRecord */).TypeTag;
const LibdiscoreStore = (require(1868) /* metro dependency 1868: LibdiscoreStore */).LibdiscoreStore;
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const LibdiscoreStore = (LibdiscoreStoreModule).LibdiscoreStore;
const Millis = (Durations).Millis;
const env0_11 = Millis.HOUR;
let value = _fun51810(LibdiscoreStore);
value.displayName = 'StickersPackStore';
@@ -73,333 +78,344 @@ function _fun51800(global, require, importDefault, importAll, module, exports, d
{packStickersDatabase}) {
packStickersDatabase.setRecord(sticker.pack_id, sticker.id, parseServerPackSticker(sticker));
}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickersPackStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickersPackStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_51801() { // fn#51801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:206, offset: 0x012e512e, size: 94 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_51801_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_51804(a0, a1) { // fn#51804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:399, offset: 0x012e518c, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
function _isNativeReflectConstruct_51801() { // fn#51801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:206, offset: 0x012e512e, size: 94 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 _fun51805;
return (_isNativeReflectConstruct_51801_isNativeReflectConstruct = function() {
return !!result;
})();
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_51806(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
function _createForOfIteratorHelperLoose_51804(a0, a1) { // fn#51804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:399, offset: 0x012e518c, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun51805;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_51806(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_51806(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_51806(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun51805;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun51805() { // fn#51805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:970, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun51805;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function deriveStickerMetadata_51808({name}, a1) { // fn#51808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:1522, offset: 0x012e535c, size: 154 bytes, params: 3, frame: 16
const items2 = [];
const object2 = {};
const StickerMetadataTypes = (require(4785) /* metro dependency 4785: StickersTypes */).StickerMetadataTypes;
const STICKER_NAME = StickerMetadataTypes.STICKER_NAME;
object2.type = STICKER_NAME;
object2.value = name.trim().toLocaleLowerCase();
items2.push(object2);
if (a1 != null) {
items2.push({type: StickerMetadataTypes.PACK_NAME, value: a1.name});
}
return items2;
}
function ingestStickerPack(a0, a1, a2, a3, a4) { // fn#51809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:3393, offset: 0x012e53f6, size: 141 bytes, params: 6, frame: 20
var r6;
var value4;
var id2;
var value5;
let set = a2.set;
let id = a0.id;
Reflect.apply(set, a2, [id, a0]);
reducibleJoin2: while (true) {
if (a4) {
set = a3.set;
id = a0.id;
Reflect.apply(set, a3, [id, a0]);
function deriveStickerMetadata_51808({name}, a1) { // fn#51808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:1522, offset: 0x012e535c, size: 154 bytes, params: 3, frame: 16
const items2 = [];
const object = {};
const StickerMetadataTypes = (StickersTypesModule).StickerMetadataTypes;
const STICKER_NAME = StickerMetadataTypes.STICKER_NAME;
object.type = STICKER_NAME;
object.value = name.trim().toLocaleLowerCase();
items2.push(object);
if (a1 != null) {
items2.push({type: StickerMetadataTypes.PACK_NAME, value: a1.name});
}
return items2;
}
function ingestStickerPack(a0, a1, a2, a3, a4) { // fn#51809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:3393, offset: 0x012e53f6, size: 141 bytes, params: 6, frame: 20
var r6;
var value4;
var id2;
var value5;
let set = a2.set;
let id = a0.id;
Reflect.apply(set, a2, [id, a0]);
reducibleJoin2: while (true) {
if (a4) {
set = a3.set;
id = a0.id;
Reflect.apply(set, a3, [id, a0]);
break reducibleJoin2;
}
break reducibleJoin2;
}
break reducibleJoin2;
}
const setPartition = a1.setPartition;
id = a0.id;
const stickers = a0.stickers;
const object2 = {};
const value2 = _createForOfIteratorHelperLoose_51804(stickers);
const value3 = value2();
let done = value3.done;
if (!done) {
r6 = value3;
reducibleLoop3: while (true) {
value4 = r6.value;
id2 = value4.id;
object2[id2] = parseServerPackSticker(value4);
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop3;
}
r6 = value5;
continue reducibleLoop3;
}
}
Reflect.apply(setPartition, a1, [id, object2]);
}
function _fun51810(a0) { // fn#51810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:1761, offset: 0x012e5483, size: 185 bytes, params: 2, frame: 16
const closure = StickersPackStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'stateWrapper', value: function() {
var env0_0 = this;
return {packsDatabase: this.packsDatabase, packStickersDatabase: this.packStickersDatabase,
premiumPacksDatabase: this.premiumPacksDatabase, markDirty: _fun51816, clearAllDBs: _fun51817};
}}, {key: 'isFetchingStickerPacks', get: get_51818}, {key: 'hasLoadedStickerPacks', get: get_51819},
{key: 'getStickerById', value: function(a0) {
return this.packStickerByIdIndex.get(a0);
}}, {key: 'isPremiumPack', value: function(a0) {
return this.premiumPacksDatabase.get(a0) != null;
}}, {key: 'getStickerPack', value: function(a0) {
return this.packsDatabase.get(a0);
}}]);
}
function STICKER_PACKS_FETCH_SUCCESS({packs}, {packStickersDatabase, packsDatabase, premiumPacksDatabase, markDirty}) { // fn#51826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:3951, offset: 0x012e5882, size: 136 bytes, params: 3, frame: 22
var r2;
var ingestStickerPackBinding;
var value4;
var value5;
markDirty();
env0_10 = global.performance.now();
const value2 = _createForOfIteratorHelperLoose_51804(packs);
const value3 = value2();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
ingestStickerPackBinding = ingestStickerPack;
value4 = r2.value;
ingestStickerPackBinding(value4, packStickersDatabase, packsDatabase, premiumPacksDatabase, true);
value5 = value2();
done = value5.done;
if (done) {
break;
}
}
}
}
function StickersPackStore(a0) { // fn#51811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:1773, offset: 0x012e553c, size: 312 bytes, params: 2, frame: 20
var environment;
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let value2 = environment.__proto__;
let binding = env1_3;
binding(this, StickersPackStore);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(StickersPackStore);
binding = env1_5;
if (_isNativeReflectConstruct_51801()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.packsDatabase = value.addKVDatabase('stickerPacks');
value.packStickersDatabase = value.addKKVDatabase('packStickers');
value.packStickerByIdIndex = value.packStickersDatabase.addSecondaryKVIndex('id');
value.premiumPacksDatabase = value.addKVDatabase('premiumPacks');
value.getAllPackStickers = value.packStickersDatabase.memoized(function(a0) {
var propertyName;
var property = global.Map;
var value2 = new property();
for (propertyName in a0) {
property = global.Object;
value2.set(propertyName, property.values(a0[propertyName].root));
}
return value2;
});
value.getStickerMetadataMap = value.packStickersDatabase.memoized(_fun51813);
value.getPremiumPacks = value.premiumPacksDatabase.memoized(function(a0) {
var Object = global.Object;
return Object.values(a0);
});
return value;
}
function value_51815() { // fn#51815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:2783, offset: 0x012e573b, size: 66 bytes, params: 1, frame: 4
return {packsDatabase: this.packsDatabase, packStickersDatabase: this.packStickersDatabase,
premiumPacksDatabase: this.premiumPacksDatabase, markDirty: markDirty, clearAllDBs: clearAllDBs};
}
function get_51819() { // fn#51819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:3092, offset: 0x012e57a5, size: 51 bytes, params: 1, frame: 11
var r0;
var performance;
let value = environment.__proto__;
const value2 = env1_10 != null;
if (value2) {
value = env1_10 + HOUR;
performance = global.performance;
value = value > performance.now();
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun51813(a0) { // fn#51813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:2431, offset: 0x012e5674, size: 199 bytes, params: 2, frame: 31
var r13;
var r2;
var propertyName;
var propertyName2;
var Object;
var entries;
var root;
var value5;
var length;
var property;
var value6;
var property2;
var packsDatabase;
var get;
var value7;
var set;
var value8;
const Map = global.Map;
const map = new Map();
const value2 = 0;
const properties = Object.keys(a0);
const properties2 = 0;
const properties3 = properties.length;
if (properties !== undefined) {
r13 = properties2;
reducibleLoop1: while (true) {
propertyName = properties[r13];
propertyName2 = r13 + 1;
if (propertyName === undefined) {
break reducibleLoop1;
}
Object = global.Object;
entries = Object.entries;
root = a0[propertyName].root;
value5 = Reflect.apply(entries, Object, [root]);
length = value5.length;
if (!(value2 < length)) {
r13 = propertyName2;
continue reducibleLoop1;
}
r2 = value2;
const setPartition = a1.setPartition;
id = a0.id;
const stickers = a0.stickers;
const object = {};
const value2 = _createForOfIteratorHelperLoose_51804(stickers);
const value3 = value2();
let done = value3.done;
if (!done) {
r6 = value3;
reducibleLoop3: while (true) {
property = value5[r2];
value6 = env2_2(property, 2);
property = value6[value2];
property2 = value6[1];
packsDatabase = env0_0.packsDatabase;
get = packsDatabase.get;
value7 = Reflect.apply(get, packsDatabase, [propertyName]);
set = map.set;
Reflect.apply(set, map, [property, deriveStickerMetadata_51808(property2, value7)]);
value8 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value5.length;
if (value8 < length) {
r2 = value8;
continue reducibleLoop3;
value4 = r6.value;
id2 = value4.id;
object[id2] = parseServerPackSticker(value4);
value5 = value2();
done = value5.done;
if (done) {
break reducibleLoop3;
}
r6 = value5;
continue reducibleLoop3;
}
}
Reflect.apply(setPartition, a1, [id, object]);
}
function _fun51810(a0) { // fn#51810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:1761, offset: 0x012e5483, size: 185 bytes, params: 2, frame: 16
const StickersPackStore2 = StickersPackStore;
Inherits(StickersPackStore2, a0);
return CreateClass(StickersPackStore2, [{key: 'stateWrapper', value: function() {
var env0_0 = this;
return {packsDatabase: this.packsDatabase, packStickersDatabase: this.packStickersDatabase,
premiumPacksDatabase: this.premiumPacksDatabase, markDirty: _fun51816, clearAllDBs: _fun51817};
}}, {key: 'isFetchingStickerPacks', get: get_51818}, {key: 'hasLoadedStickerPacks', get: get_51819},
{key: 'getStickerById', value: function(a0) {
return this.packStickerByIdIndex.get(a0);
}}, {key: 'isPremiumPack', value: function(a0) {
return this.premiumPacksDatabase.get(a0) != null;
}}, {key: 'getStickerPack', value: function(a0) {
return this.packsDatabase.get(a0);
}}]);
function StickersPackStore(a0) { // fn#51811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:1773, offset: 0x012e553c, size: 312 bytes, params: 2, frame: 20
var environment;
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let value2 = environment.__proto__;
let binding = env1_3;
binding(this, StickersPackStore);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_6(StickersPackStore);
binding = env1_5;
if (_isNativeReflectConstruct_51801()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_6(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
value.packsDatabase = value.addKVDatabase('stickerPacks');
value.packStickersDatabase = value.addKKVDatabase('packStickers');
value.packStickerByIdIndex = value.packStickersDatabase.addSecondaryKVIndex('id');
value.premiumPacksDatabase = value.addKVDatabase('premiumPacks');
value.getAllPackStickers = value.packStickersDatabase.memoized(function(a0) {
var propertyName;
var property = global.Map;
var value2 = new property();
for (propertyName in a0) {
property = global.Object;
value2.set(propertyName, property.values(a0[propertyName].root));
}
return value2;
});
value.getStickerMetadataMap = value.packStickersDatabase.memoized(_fun51813);
value.getPremiumPacks = value.premiumPacksDatabase.memoized(function(a0) {
var Object = global.Object;
return Object.values(a0);
});
return value;
function _fun51813(a0) { // fn#51813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:2431, offset: 0x012e5674, size: 199 bytes, params: 2, frame: 31
var r13;
var r2;
var propertyName;
var propertyName2;
var Object;
var entries;
var root;
var value5;
var length;
var property;
var value6;
var property2;
var packsDatabase;
var get;
var value7;
var set;
var value8;
const Map = global.Map;
const map = new Map();
const value2 = 0;
const properties = Object.keys(a0);
const properties2 = 0;
const properties3 = properties.length;
if (properties !== undefined) {
r13 = properties2;
reducibleLoop1: while (true) {
propertyName = properties[r13];
propertyName2 = r13 + 1;
if (propertyName === undefined) {
break reducibleLoop1;
}
Object = global.Object;
entries = Object.entries;
root = a0[propertyName].root;
value5 = Reflect.apply(entries, Object, [root]);
length = value5.length;
if (!(value2 < length)) {
r13 = propertyName2;
continue reducibleLoop1;
}
r2 = value2;
reducibleLoop3: while (true) {
property = value5[r2];
value6 = env2_2(property, 2);
property = value6[value2];
property2 = value6[1];
packsDatabase = env0_0.packsDatabase;
get = packsDatabase.get;
value7 = Reflect.apply(get, packsDatabase, [propertyName]);
set = map.set;
Reflect.apply(set, map, [property, deriveStickerMetadata_51808(property2, value7)]);
value8 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
length = value5.length;
if (value8 < length) {
r2 = value8;
continue reducibleLoop3;
}
r13 = propertyName2;
continue reducibleLoop1;
}
continue reducibleLoop1;
}
}
return map;
}
}
function value_51815() { // fn#51815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:2783, offset: 0x012e573b, size: 66 bytes, params: 1, frame: 4
return {packsDatabase: this.packsDatabase, packStickersDatabase: this.packStickersDatabase,
premiumPacksDatabase: this.premiumPacksDatabase, markDirty: markDirty, clearAllDBs: clearAllDBs};
function markDirty() { // fn#51816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:2938, owner: value_51815.markDirty, offset: 0x012e577d, size: 19 bytes, params: 1, frame: 9
return env0_0.markDirty();
}
function clearAllDBs() { // fn#51817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:2971, owner: value_51815.clearAllDBs, offset: 0x012e5790, size: 21 bytes, params: 1, frame: 9
return env0_0.clearAllDatabases();
}
}
function get_51818() { // fn#51818, offset: 0x00e07a77, size: 9 bytes, params: 1, frame: 1
return env1_9;
}
function get_51819() { // fn#51819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:3092, offset: 0x012e57a5, size: 51 bytes, params: 1, frame: 11
var r0;
var performance;
let value = environment.__proto__;
const value2 = env1_10 != null;
if (value2) {
value = env1_10 + HOUR;
performance = global.performance;
value = value > performance.now();
r0 = value;
} else {
r0 = value2;
}
return r0;
}
}
function STICKER_PACKS_FETCH_SUCCESS({packs}, {packStickersDatabase, packsDatabase, premiumPacksDatabase, markDirty}) { // fn#51826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:3951, offset: 0x012e5882, size: 136 bytes, params: 3, frame: 22
var r2;
var ingestStickerPackBinding;
var value4;
var value5;
markDirty();
env0_10 = global.performance.now();
const value2 = _createForOfIteratorHelperLoose_51804(packs);
const value3 = value2();
let done = value3.done;
if (!done) {
for (r2 = value3; true; r2 = value5) {
ingestStickerPackBinding = ingestStickerPack;
value4 = r2.value;
ingestStickerPackBinding(value4, packStickersDatabase, packsDatabase, premiumPacksDatabase, true);
value5 = value2();
done = value5.done;
if (done) {
break;
}
r13 = propertyName2;
continue reducibleLoop1;
}
continue reducibleLoop1;
}
}
return map;
}
function markDirty() { // fn#51816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:2938, owner: value_51815.markDirty, offset: 0x012e577d, size: 19 bytes, params: 1, frame: 9
return env0_0.markDirty();
}
function clearAllDBs() { // fn#51817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6763:2971, owner: value_51815.clearAllDBs, offset: 0x012e5790, size: 21 bytes, params: 1, frame: 9
return env0_0.clearAllDatabases();
}
global.__d(_fun51800, 6585, [57, 6, 7, 15, 17, 18, 1420, 1868, 672, 4785,
2]) /* metro module 6585, dependencies: [57, 6, 7, 15, 17, 18, 1420, 1868, 672, 4785, 2] */;
@@ -1,19 +1,24 @@
/* Metro module 6582; source: modules/stickers/StickersPersistedStore.tsx; dependencies: [6, 7, 15, 17, 18, 1348, 6583, 670, 672, 4393, 22, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import UserSettingsProtoStore from '../user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import Frecency from '../../lib/Frecency.tsx'; /* Metro dependency 4393 */
import StickersStore from './StickersStore.tsx'; /* Metro dependency 6583 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UserSettingsConstantsModule from '../user_settings/UserSettingsConstants.tsx'; /* Metro dependency 670 */
function _fun51717(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:6, offset: 0x012e35e8, size: 498 bytes, params: 8, frame: 20
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 stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
const env0_9 = (require(670) /* metro dependency 670: UserSettingsConstants */).UserSettingsTypes;
object = {pendingUsages: []};
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const DAY = Millis.DAY;
let value = importDefault(4393) /* metro dependency 4393: Frecency */;
let value = Frecency;
value = new value({computeBonus: function() {
return 100;
}, lookupKey: function(a0) {
@@ -23,7 +28,7 @@ function _fun51717(global, require, importDefault, importAll, module, exports, d
const handleStickersStoreUpdate = function() {
recomputeStickerFrecency();
};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
value = _fun51729(PersistedStore);
value.displayName = 'StickersPersistedStore';
value.persistKey = 'StickersPersistedStoreV2';
@@ -34,125 +39,147 @@ function _fun51717(global, require, importDefault, importAll, module, exports, d
}
recomputeStickerFrecency();
}, USER_SETTINGS_PROTO_UPDATE: USER_SETTINGS_PROTO_UPDATE_51737});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickersPersistedStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickersPersistedStore.tsx');
exports.default = value;
exports.STICKER_PACK_NEW_TIMESTAMP_THRESHOLD = DAY;
}
function _isNativeReflectConstruct_51718() { // fn#51718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:196, offset: 0x012e37da, size: 94 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) {
function _isNativeReflectConstruct_51718() { // fn#51718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:196, offset: 0x012e37da, size: 94 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_51718_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_51718_isNativeReflectConstruct = function() {
return !!result;
})();
}
function handleUserSettingsProtoStoreChange_51721() { // fn#51721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:663, offset: 0x012e3838, size: 113 bytes, params: 1, frame: 17
const stickerFrecency = UserSettingsProtoStore.frecencyWithoutFetchingLatest.stickerFrecency;
const value2 = undefined;
const stickers = stickerFrecency == null ? value2 : stickerFrecency.stickers;
if (stickers == null) {
function handleUserSettingsProtoStoreChange_51721() { // fn#51721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:663, offset: 0x012e3838, size: 113 bytes, params: 1, frame: 17
const stickerFrecency = UserSettingsProtoStore.frecencyWithoutFetchingLatest.stickerFrecency;
const value2 = undefined;
const stickers = stickerFrecency == null ? value2 : stickerFrecency.stickers;
if (stickers == null) {
return false;
}
const binding = env0_11;
binding.overwriteHistory((importDefault(22) /* metro dependency 22 */).mapValues(stickers, function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
var value = a0.recentUses.map(global.Number);
value = value.filter(_fun51723);
object['recentUses'] = value;
return object;
}), env0_10.pendingUsages);
return value2;
function _fun51722(a0) { // fn#51722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:854, offset: 0x012e38a9, size: 67 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, a0, undefined);
const recentUses = a0.recentUses;
const map = recentUses.map;
const Number = global.Number;
let value = Reflect.apply(map, recentUses, [Number]);
value = value.filter(function(a0) {
return a0 > 0;
});
object['recentUses'] = value;
return object;
}
}
function recomputeStickerFrecency() { // fn#51727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:574, offset: 0x012e3903, size: 34 bytes, params: 1, frame: 9
if (StickersStore.isLoaded) {
env0_11.compute();
}
}
function _fun51729(a0) { // fn#51729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:944, offset: 0x012e3934, size: 137 bytes, params: 2, frame: 16
const StickersPersistedStore2 = StickersPersistedStore;
Inherits(StickersPersistedStore2, a0);
return CreateClass(StickersPersistedStore2, [{key: 'initialize', value: function(a0) {
this.waitFor(StickersStore, UserSettingsProtoStore);
if (a0 != null) {
env1_10 = a0;
}
this.syncWith([StickersStore], handleStickersStoreUpdate);
this.syncWith([UserSettingsProtoStore], handleUserSettingsProtoStoreChange_51721);
}}, {key: 'getState', value: value_51732}, {key: 'hasPendingUsage', value: value_51733},
{key: 'stickerFrecencyWithoutFetchingLatest', get: get_51734}]);
function StickersPersistedStore() { // fn#51730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:956, offset: 0x0118e06f, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, StickersPersistedStore);
const value3 = env1_5(StickersPersistedStore);
return env1_4(this, _isNativeReflectConstruct_51718() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_51732() { // fn#51732, offset: 0x00fbd9ec, size: 9 bytes, params: 1, frame: 1
return env1_10;
}
function value_51733() { // fn#51733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:1503, offset: 0x012e3a20, size: 26 bytes, params: 1, frame: 2
return env1_10.pendingUsages.length > 0;
}
function get_51734() { // fn#51734, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
}
function STICKER_TRACK_USAGE({stickerIds}) { // fn#51735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:1767, offset: 0x012e3a3a, size: 47 bytes, params: 2, frame: 11
if (stickerIds != null) {
stickerIds.forEach(_fun51736);
}
recomputeStickerFrecency();
function _fun51736(a0) { // fn#51736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:1806, offset: 0x012e3a69, size: 72 bytes, params: 2, frame: 13
env1_11.track(a0);
const pendingUsages = env1_10.pendingUsages;
const push = pendingUsages.push;
const object = {key: a0};
const Date = global.Date;
object.timestamp = Date.now();
Reflect.apply(push, pendingUsages, [object]);
}
}
function USER_SETTINGS_PROTO_UPDATE_51737({settings, wasSaved}) { // fn#51737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:1930, offset: 0x012e3ab1, size: 62 bytes, params: 2, frame: 4
const type = settings.type;
const FRECENCY_AND_FAVORITES_SETTINGS = UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS;
if (type === FRECENCY_AND_FAVORITES_SETTINGS) {
if (wasSaved) {
env0_10.pendingUsages = [];
return undefined;
}
}
return false;
}
const binding = env0_11;
binding.overwriteHistory((importDefault(22) /* metro dependency 22 */).mapValues(stickers, function(a0) {
var r3;
var object = {};
copyDataProperties(object, a0, r3);
var value = a0.recentUses.map(global.Number);
value = value.filter(_fun51723);
object['recentUses'] = value;
return object;
}), env0_10.pendingUsages);
return value2;
}
function recomputeStickerFrecency() { // fn#51727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:574, offset: 0x012e3903, size: 34 bytes, params: 1, frame: 9
if (StickersStore.isLoaded) {
env0_11.compute();
}
}
function _fun51729(a0) { // fn#51729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:944, offset: 0x012e3934, size: 137 bytes, params: 2, frame: 16
const closure = StickersPersistedStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function(a0) {
this.waitFor(StickersStore, UserSettingsProtoStore);
if (a0 != null) {
env1_10 = a0;
}
this.syncWith([StickersStore], handleStickersStoreUpdate);
this.syncWith([UserSettingsProtoStore], handleUserSettingsProtoStoreChange_51721);
}}, {key: 'getState', value: value_51732}, {key: 'hasPendingUsage', value: value_51733},
{key: 'stickerFrecencyWithoutFetchingLatest', get: get_51734}]);
}
function STICKER_TRACK_USAGE({stickerIds}) { // fn#51735, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:1767, offset: 0x012e3a3a, size: 47 bytes, params: 2, frame: 11
if (stickerIds != null) {
stickerIds.forEach(_fun51736);
}
recomputeStickerFrecency();
}
function USER_SETTINGS_PROTO_UPDATE_51737({settings, wasSaved}) { // fn#51737, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:1930, offset: 0x012e3ab1, size: 62 bytes, params: 2, frame: 4
const type = settings.type;
const FRECENCY_AND_FAVORITES_SETTINGS = UserSettingsTypes.FRECENCY_AND_FAVORITES_SETTINGS;
if (type === FRECENCY_AND_FAVORITES_SETTINGS) {
if (wasSaved) {
env0_10.pendingUsages = [];
return undefined;
}
}
return false;
}
function _fun51722(a0) { // fn#51722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:854, offset: 0x012e38a9, size: 67 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, a0, undefined);
const recentUses = a0.recentUses;
const map = recentUses.map;
const Number = global.Number;
let value = Reflect.apply(map, recentUses, [Number]);
value = value.filter(function(a0) {
return a0 > 0;
});
object2['recentUses'] = value;
return object2;
}
function value_51733() { // fn#51733, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:1503, offset: 0x012e3a20, size: 26 bytes, params: 1, frame: 2
return env1_10.pendingUsages.length > 0;
}
function _fun51736(a0) { // fn#51736, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:1806, offset: 0x012e3a69, size: 72 bytes, params: 2, frame: 13
env1_11.track(a0);
const pendingUsages = env1_10.pendingUsages;
const push = pendingUsages.push;
const object2 = {key: a0};
const Date = global.Date;
object2.timestamp = Date.now();
Reflect.apply(push, pendingUsages, [object2]);
function _fun51723(a0) { // fn#51723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6760:908, offset: 0x011bbce4, size: 11 bytes, params: 2, frame: 2
return a0 > 0;
}
global.__d(_fun51717, 6582, [6, 7, 15, 17, 18, 1348, 6583, 670, 672, 4393, 22, 566, 694,
2]) /* metro module 6582, dependencies: [6, 7, 15, 17, 18, 1348, 6583, 670, 672, 4393, 22, 566, 694, 2] */;
@@ -1,41 +1,45 @@
/* Metro module 11055; source: modules/stickers/StickersSearchUtils.tsx; dependencies: [6526, 6943, 2] */
import AutocompleteUtils from '../../utils/AutocompleteUtils.tsx'; /* Metro dependency 6526 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun84659(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11241:6, offset: 0x01f522b2, size: 133 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickersSearchUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickersSearchUtils.tsx');
exports.searchAllStickers = searchAllStickers;
exports.searchSendableStickers = searchSendableStickers;
exports.searchUnsendableStickers = searchUnsendableStickers;
function searchAllStickers(a0) { // fn#84660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11241:186, offset: 0x01f52337, size: 70 bytes, params: 2, frame: 13
let value = AutocompleteUtils;
value = value.queryStickers([a0], true);
return value.map(function(a0) {
return a0.sticker;
});
}
function searchSendableStickers(a0, a1) { // fn#84662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11241:268, offset: 0x01f52388, size: 93 bytes, params: 3, frame: 16
let value = AutocompleteUtils;
value = value.queryStickers([a0], true, [a1, function(a0, a1) {
var SENDABLE = require(dependencyMap[1]).StickerSendability.SENDABLE;
return a1 === SENDABLE;
}]);
return value.map(function(a0) {
return a0.sticker;
});
}
function searchUnsendableStickers(a0, a1) { // fn#84665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11241:407, offset: 0x01f52413, size: 93 bytes, params: 3, frame: 16
let value = AutocompleteUtils;
value = value.queryStickers([a0], true, [a1, function(a0, a1) {
var SENDABLE = require(dependencyMap[1]).StickerSendability.SENDABLE;
return a1 !== SENDABLE;
}]);
return value.map(function(a0) {
return a0.sticker;
});
}
}
function searchAllStickers(a0) { // fn#84660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11241:186, offset: 0x01f52337, size: 70 bytes, params: 2, frame: 13
let value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = value.queryStickers([a0], true);
return value.map(function(a0) {
return a0.sticker;
});
}
function searchSendableStickers(a0, a1) { // fn#84662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11241:268, offset: 0x01f52388, size: 93 bytes, params: 3, frame: 16
let value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = value.queryStickers([a0], true, [a1, function(a0, a1) {
var SENDABLE = require(dependencyMap[1]).StickerSendability.SENDABLE;
return a1 === SENDABLE;
}]);
return value.map(function(a0) {
return a0.sticker;
});
}
function searchUnsendableStickers(a0, a1) { // fn#84665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11241:407, offset: 0x01f52413, size: 93 bytes, params: 3, frame: 16
let value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
value = value.queryStickers([a0], true, [a1, function(a0, a1) {
var SENDABLE = require(dependencyMap[1]).StickerSendability.SENDABLE;
return a1 !== SENDABLE;
}]);
return value.map(function(a0) {
return a0.sticker;
});
}
global.__d(_fun84659, 11055, [6526, 6943, 2]) /* metro module 11055, dependencies: [6526, 6943, 2] */;
+191 -153
View File
@@ -1,171 +1,209 @@
/* Metro module 6583; source: modules/stickers/StickersStore.tsx; dependencies: [6, 7, 15, 17, 18, 5, 1381, 1867, 6584, 6585, 1910, 1929, 20, 5236, 694, 566, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import GuildMembershipStore from '../../stores/GuildMembershipStore.tsx'; /* Metro dependency 1381 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildStickersStore from './GuildStickersStore.tsx'; /* Metro dependency 6584 */
import StickersPackStore from './StickersPackStore.tsx'; /* Metro dependency 6585 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun51738(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51738, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:6, offset: 0x012e3aef, size: 428 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(6) /* metro dependency 6 */;
const env0_4 = importDefault(7) /* metro dependency 7 */;
const env0_5 = importDefault(15) /* metro dependency 15 */;
const env0_6 = importDefault(17) /* metro dependency 17 */;
const env0_7 = importDefault(18) /* metro dependency 18 */;
const env0_8 = importDefault(5) /* metro dependency 5 */;
const guildMembershipStore = importDefault(1381) /* metro dependency 1381: GuildMembershipStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildStickersStore = importDefault(6584) /* metro dependency 6584: GuildStickersStore */;
const stickersPackStore = importDefault(6585) /* metro dependency 6585: StickersPackStore */;
const env0_14 = ({Unloaded: 0, [0]: 'Unloaded', Loaded: 1, [1]: 'Loaded'}).Unloaded;
const env0_15 = _fun51742();
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
const Store = (Flux).Store;
let value = _fun51748(Store);
value.displayName = 'StickersStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{BACKGROUND_SYNC: BACKGROUND_SYNC_51765, CONNECTION_OPEN: CONNECTION_OPEN_51766, LOGOUT: LOGOUT_51768});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickersStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickersStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_51739() { // fn#51739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:198, offset: 0x012e3c9b, size: 94 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_51739_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun51742() { // fn#51742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:491, offset: 0x012e3cf9, size: 32 bytes, params: 1, frame: 12
const env0_0 = env0_8(_fun51744);
return _fun51747;
}
function _fun51748(a0) { // fn#51748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:899, offset: 0x012e3e59, size: 371 bytes, params: 2, frame: 16
const closure = StickersStore;
env0_7(closure, a0);
return env0_4(closure, [{key: 'initialize', value: function() {
this.waitFor(GuildMembershipStore, GuildStickersStore, GuildStore, StickersPackStore);
this.syncWith([GuildStickersStore, StickersPackStore], _fun51751);
}}, {key: 'isLoaded', get: get_51752}, {key: 'loadState', get: function() {
return Unloaded;
}}, {key: 'getStickerMetadataArrays', value: value_51754}, {key: 'hasLoadedStickerPacks', get: function() {
return StickersPackStore.hasLoadedStickerPacks;
}}, {key: 'isFetchingStickerPacks', get: function() {
return StickersPackStore.isFetchingStickerPacks;
}}, {key: 'getStickerById', value: value_51757}, {key: 'getStickerPack', value: function(a0) {
return StickersPackStore.getStickerPack(a0);
}}, {key: 'getPremiumPacks', value: function() {
return StickersPackStore.getPremiumPacks();
}}, {key: 'isPremiumPack', value: function(a0) {
return StickersPackStore.isPremiumPack(a0);
}}, {key: 'getRawStickersByGuild', value: function() {
return GuildStickersStore.getAllGuildStickers();
}}, {key: 'getAllGuildStickers', value: value_51762}, {key: 'getAllPackStickers', value: function() {
return StickersPackStore.getAllPackStickers();
}}, {key: 'getStickersByGuildId', value: value_51764}]);
}
function BACKGROUND_SYNC_51765() { // fn#51765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:2352, offset: 0x012e41d0, size: 21 bytes, params: 1, frame: 2
env0_14 = env0_13.Unloaded;
}
function CONNECTION_OPEN_51766({guilds, unavailableGuilds}) { // fn#51766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:2387, offset: 0x012e41e5, size: 86 bytes, params: 2, frame: 11
env0_14 = unavailableGuilds.length !== 0 ? env0_13.Unloaded : guilds.every(function(a0) {
return a0.stickers.op === 'full_sync';
}) ? env0_13.Loaded : env0_13.Unloaded;
}
function* _fun51744() { // fn#51744, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:511, offset: 0x012e3d22, size: 209 bytes, params: 1, frame: 17
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_14;
var Unloaded = env2_13.Unloaded;
if (binding === Unloaded) {
binding = env2_1;
if (binding(env2_2[10]).database() == null) {
return undefined;
}
env2_14 = env2_13.Loaded;
binding = env2_0;
var value5 = binding(env2_2[11]);
yield value5.tryLoadOrResetCacheGatewayAsync('StickerStore.loadSavedGuildStickers', _fun51745);
var value6 = undefined;
if (false) {
return value6;
}
if (value6 != null) {
value = env2_1(env2_2[14]);
value.dispatch({type: 'CACHED_STICKERS_LOADED', stickers: value6});
}
function _isNativeReflectConstruct_51739() { // fn#51739, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:198, offset: 0x012e3c9b, size: 94 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_51739_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun51742() { // fn#51742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:491, offset: 0x012e3cf9, size: 32 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun51744);
return _fun51747;
function* _fun51744() { // fn#51744, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:511, offset: 0x012e3d22, size: 209 bytes, params: 1, frame: 17
var environment;
if (true) {
value = environment.__proto__.__proto__;
var binding = Loaded;
var Unloaded = env2_13.Unloaded;
if (binding === Unloaded) {
binding = env2_1;
if (binding(env2_2[10]).database() == null) {
return undefined;
}
Loaded = env2_13.Loaded;
binding = env2_0;
var value5 = binding(env2_2[11]);
yield value5.tryLoadOrResetCacheGatewayAsync('StickerStore.loadSavedGuildStickers', _fun51745);
var value6 = undefined;
if (false) {
return value6;
}
if (value6 != null) {
value = env2_1(env2_2[14]);
value.dispatch({type: 'CACHED_STICKERS_LOADED', stickers: value6});
}
}
}
function _fun51745() { // fn#51745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:683, offset: 0x012e3df3, size: 57 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__.__proto__.__proto__;
return env3_1(env3_2[12]).timeAsync('💾', 'loadSavedGuildStickers', _fun51746);
function _fun51746() { // fn#51746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:739, offset: 0x012e3e2c, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__.__proto__;
return env4_1(env4_2[13]).getAsync(env1_0);
}
}
}
function _fun51747() { // fn#51747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:851, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun51748(a0) { // fn#51748, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:899, offset: 0x012e3e59, size: 371 bytes, params: 2, frame: 16
const StickersStore2 = StickersStore;
Inherits(StickersStore2, a0);
return CreateClass(StickersStore2, [{key: 'initialize', value: function() {
var guildMembershipStoreBinding = GuildMembershipStore;
var guildStickersStoreBinding = GuildStickersStore;
var guildStoreBinding = GuildStore;
var stickersPackStoreBinding = StickersPackStore;
this.waitFor(guildMembershipStoreBinding, guildStickersStoreBinding, guildStoreBinding,
stickersPackStoreBinding);
this.syncWith([guildStickersStoreBinding, stickersPackStoreBinding], _fun51751);
}}, {key: 'isLoaded', get: get_51752}, {key: 'loadState', get: function() {
return Unloaded;
}}, {key: 'getStickerMetadataArrays', value: value_51754}, {key: 'hasLoadedStickerPacks', get: function() {
return StickersPackStore.hasLoadedStickerPacks;
}}, {key: 'isFetchingStickerPacks', get: function() {
return StickersPackStore.isFetchingStickerPacks;
}}, {key: 'getStickerById', value: value_51757}, {key: 'getStickerPack', value: function(a0) {
return StickersPackStore.getStickerPack(a0);
}}, {key: 'getPremiumPacks', value: function() {
return StickersPackStore.getPremiumPacks();
}}, {key: 'isPremiumPack', value: function(a0) {
return StickersPackStore.isPremiumPack(a0);
}}, {key: 'getRawStickersByGuild', value: function() {
return GuildStickersStore.getAllGuildStickers();
}}, {key: 'getAllGuildStickers', value: value_51762}, {key: 'getAllPackStickers', value: function() {
return StickersPackStore.getAllPackStickers();
}}, {key: 'getStickersByGuildId', value: value_51764}]);
function StickersStore() { // fn#51749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:911, offset: 0x012e3fcc, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_3(this, StickersStore);
const value3 = env1_6(StickersStore);
return env1_5(this, _isNativeReflectConstruct_51739() ? global.Reflect.construct(value3, arguments,
env1_6(this).constructor) : value3.apply(this, arguments));
}
function value_51750() { // fn#51750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:1194, offset: 0x012e403d, size: 76 bytes, params: 1, frame: 17
const waitFor = this.waitFor;
const guildMembershipStoreBinding = GuildMembershipStore;
const guildStickersStoreBinding = GuildStickersStore;
const guildStoreBinding = GuildStore;
const stickersPackStoreBinding = StickersPackStore;
Reflect.apply(waitFor, this, [guildMembershipStoreBinding, guildStickersStoreBinding, guildStoreBinding,
stickersPackStoreBinding]);
this.syncWith([guildStickersStoreBinding, stickersPackStoreBinding], function() {
return true;
});
}
function get_51752() { // fn#51752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:1279, offset: 0x012e4089, size: 23 bytes, params: 1, frame: 2
const Unloaded2 = env1_13.Unloaded;
return Unloaded !== Unloaded2;
}
function value_51754() { // fn#51754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:1395, offset: 0x012e40a0, size: 55 bytes, params: 1, frame: 10
env1_15();
const guildStickersStoreBinding = GuildStickersStore;
let getStickerMetadataMap = guildStickersStoreBinding.getStickerMetadataMap;
const items2 = [Reflect.apply(getStickerMetadataMap, guildStickersStoreBinding, [])];
const stickersPackStoreBinding = StickersPackStore;
getStickerMetadataMap = stickersPackStoreBinding.getStickerMetadataMap;
items2[1] = Reflect.apply(getStickerMetadataMap, stickersPackStoreBinding, []);
return items2;
}
function value_51757(a0) { // fn#51757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:1657, offset: 0x012e40f5, size: 54 bytes, params: 2, frame: 12
const value = environment.__proto__;
env1_15();
return GuildStickersStore.getStickerById(a0) ?? StickersPackStore.getStickerById(a0);
}
function value_51762() { // fn#51762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:2057, offset: 0x012e417f, size: 29 bytes, params: 1, frame: 10
env1_15();
return GuildStickersStore.getAllGuildStickers();
}
function value_51764(a0) { // fn#51764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:2214, offset: 0x012e41af, size: 33 bytes, params: 2, frame: 11
env1_15();
return GuildStickersStore.getStickersByGuildId(a0);
}
}
function BACKGROUND_SYNC_51765() { // fn#51765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:2352, offset: 0x012e41d0, size: 21 bytes, params: 1, frame: 2
env0_14 = env0_13.Unloaded;
}
function CONNECTION_OPEN_51766({guilds, unavailableGuilds}) { // fn#51766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:2387, offset: 0x012e41e5, size: 86 bytes, params: 2, frame: 11
env0_14 = unavailableGuilds.length !== 0 ? env0_13.Unloaded : guilds.every(function(a0) {
return a0.stickers.op === 'full_sync';
}) ? env0_13.Loaded : env0_13.Unloaded;
}
function LOGOUT_51768() { // fn#51768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:2508, offset: 0x012e41d0, size: 21 bytes, params: 1, frame: 2
env0_14 = env0_13.Unloaded;
}
}
function value_51750() { // fn#51750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:1194, offset: 0x012e403d, size: 76 bytes, params: 1, frame: 17
this.waitFor(GuildMembershipStore, GuildStickersStore, GuildStore, StickersPackStore);
this.syncWith([GuildStickersStore, StickersPackStore], function() {
return true;
});
}
function get_51752() { // fn#51752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:1279, offset: 0x012e4089, size: 23 bytes, params: 1, frame: 2
const Unloaded2 = env1_13.Unloaded;
return Unloaded !== Unloaded2;
}
function value_51754() { // fn#51754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:1395, offset: 0x012e40a0, size: 55 bytes, params: 1, frame: 10
env1_15();
let getStickerMetadataMap = GuildStickersStore.getStickerMetadataMap;
const items2 = [Reflect.apply(getStickerMetadataMap, GuildStickersStore, [])];
getStickerMetadataMap = StickersPackStore.getStickerMetadataMap;
items2[1] = Reflect.apply(getStickerMetadataMap, StickersPackStore, []);
return items2;
}
function value_51757(a0) { // fn#51757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:1657, offset: 0x012e40f5, size: 54 bytes, params: 2, frame: 12
const value = environment.__proto__;
env1_15();
return GuildStickersStore.getStickerById(a0) ?? StickersPackStore.getStickerById(a0);
}
function value_51762() { // fn#51762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:2057, offset: 0x012e417f, size: 29 bytes, params: 1, frame: 10
env1_15();
return GuildStickersStore.getAllGuildStickers();
}
function value_51764(a0) { // fn#51764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:2214, offset: 0x012e41af, size: 33 bytes, params: 2, frame: 11
env1_15();
return GuildStickersStore.getStickersByGuildId(a0);
}
function _fun51745() { // fn#51745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:683, offset: 0x012e3df3, size: 57 bytes, params: 1, frame: 15
var environment;
const value = environment.__proto__.__proto__.__proto__;
return env3_1(env3_2[12]).timeAsync('💾', 'loadSavedGuildStickers', _fun51746);
}
function _fun51746() { // fn#51746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6761:739, offset: 0x012e3e2c, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__.__proto__;
return env4_1(env4_2[13]).getAsync(env1_0);
function _fun51751() { // fn#51751, offset: 0x00c4c231, size: 4 bytes, params: 1, frame: 1
return true;
}
global.__d(_fun51738, 6583, [6, 7, 15, 17, 18, 5, 1381, 1867, 6584, 6585, 1910, 1929, 20, 5236, 694, 566,
2]) /* metro module 6583, dependencies: [6, 7, 15, 17, 18, 5, 1381, 1867, 6584, 6585, 1910, 1929, 20, 5236, 694, 566, 2] */;
@@ -1,30 +1,33 @@
/* Metro module 4787; source: modules/stickers/StickersSuggestionUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun41351(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4965:6, offset: 0x0111cb29, size: 138 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = RegExp('(!|\\.|;|,|-|—|–|\\?|"|\')', 'g');
const env0_1 = RegExp('(\\n|\\t|\\s)', 'g');
const closure = removePunctuation;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickersSuggestionUtils.tsx');
exports.removePunctuation = closure;
const removePunctuation2 = removePunctuation;
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickersSuggestionUtils.tsx');
exports.removePunctuation = removePunctuation2;
exports.getQueriesFromUserInput = getQueriesFromUserInput;
}
function removePunctuation(a0) { // fn#41352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4965:163, offset: 0x0111cbb3, size: 48 bytes, params: 2, frame: 14
return a0.replace(env0_0, '').replace(env0_1, ' ');
}
function getQueriesFromUserInput(a0) { // fn#41353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4965:339, offset: 0x0111cbe3, size: 57 bytes, params: 2, frame: 11
var r0;
var value;
if (a0 == null) {
r0 = [];
} else {
value = removePunctuation(a0);
value = value.trim();
value = value.split(' ');
r0 = value;
function removePunctuation(a0) { // fn#41352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4965:163, offset: 0x0111cbb3, size: 48 bytes, params: 2, frame: 14
return a0.replace(env0_0, '').replace(env0_1, ' ');
}
return r0;
function getQueriesFromUserInput(a0) { // fn#41353, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4965:339, offset: 0x0111cbe3, size: 57 bytes, params: 2, frame: 11
var r0;
var value;
if (a0 == null) {
r0 = [];
} else {
value = removePunctuation(a0);
value = value.trim();
value = value.split(' ');
r0 = value;
}
return r0;
}
}
global.__d(_fun41351, 4787, [2]) /* metro module 4787, dependencies: [2] */;
+32 -27
View File
@@ -1,33 +1,37 @@
/* Metro module 4785; source: modules/stickers/StickersTypes.tsx; dependencies: [1420, 4786, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as PlainRecordModule from '../../external/discord_common/js/packages/libdiscore/js_shim/js/PlainRecord.tsx'; /* Metro dependency 1420 */
import * as StickerTypesModule from '../../external/discord_common/js/packages/design/components/Stickers/StickerTypes.tsx'; /* Metro dependency 4786 */
function _fun41347(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#41347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4963:6, offset: 0x0111c830, size: 485 bytes, params: 8, frame: 24
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(1420) /* metro dependency 1420: PlainRecord */).TypeTag;
const object = {STICKER: 0};
object[0] = 'STICKER';
object.CREATE_STICKER = 1;
object[1] = 'CREATE_STICKER';
const object3 = {STICKER_NAME: 0};
object3[0] = 'STICKER_NAME';
object3.TAG = 1;
object3[1] = 'TAG';
object3.CORRELATED_EMOJI = 2;
object3[2] = 'CORRELATED_EMOJI';
object3.GUILD_NAME = 3;
object3[3] = 'GUILD_NAME';
object3.PACK_NAME = 4;
object3[4] = 'PACK_NAME';
const object6 = {STICKER_PICKER: 0};
object6[0] = 'STICKER_PICKER';
object6.AUTOCOMPLETE = 1;
object6[1] = 'AUTOCOMPLETE';
object6.BUILT_IN_INTEGRATION = 2;
object6[2] = 'BUILT_IN_INTEGRATION';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickersTypes.tsx');
const StickerFormat = (require(4786) /* metro dependency 4786: StickerTypes */).StickerFormat;
(PlainRecordModule).TypeTag;
const object2 = {STICKER: 0};
object2[0] = 'STICKER';
object2.CREATE_STICKER = 1;
object2[1] = 'CREATE_STICKER';
const object4 = {STICKER_NAME: 0};
object4[0] = 'STICKER_NAME';
object4.TAG = 1;
object4[1] = 'TAG';
object4.CORRELATED_EMOJI = 2;
object4[2] = 'CORRELATED_EMOJI';
object4.GUILD_NAME = 3;
object4[3] = 'GUILD_NAME';
object4.PACK_NAME = 4;
object4[4] = 'PACK_NAME';
const object5 = {STICKER_PICKER: 0};
object5[0] = 'STICKER_PICKER';
object5.AUTOCOMPLETE = 1;
object5[1] = 'AUTOCOMPLETE';
object5.BUILT_IN_INTEGRATION = 2;
object5[2] = 'BUILT_IN_INTEGRATION';
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickersTypes.tsx');
const StickerFormat = (StickerTypesModule).StickerFormat;
exports.StickerFormat = StickerFormat;
const MetaStickerType = (require(4786) /* metro dependency 4786: StickerTypes */).MetaStickerType;
const MetaStickerType = (StickerTypesModule).MetaStickerType;
exports.MetaStickerType = MetaStickerType;
exports.StickerExtensions = {PNG: 'png', APNG: 'png', LOTTIE: 'json', WEBP: 'webp', GIF: 'gif'};
exports.isAnimatedSticker = function(a0) {
@@ -38,11 +42,12 @@ function _fun41347(global, require, importDefault, importAll, module, exports, d
var STANDARD = require(dependencyMap[1]).MetaStickerType.STANDARD;
return a0 !== STANDARD;
};
exports.StickerGridItemTypes = object;
exports.StickerGridItemTypes = object2;
exports.StickerCategoryTypes = {PACK: 'PACK', FAVORITE: 'FAVORITE', RECENT: 'RECENT',
SEARCH_RESULTS: 'SEARCH_RESULTS', SEARCH_SUGGESTIONS: 'SEARCH_SUGGESTIONS', GUILD: 'GUILD',
EMPTY_GUILD_UPSELL: 'EMPTY_GUILD_UPSELL', CREATE_STICKER: 'CREATE_STICKER'};
exports.StickerMetadataTypes = object3;
exports.StickerSelectLocation = object6;
exports.StickerMetadataTypes = object4;
exports.StickerSelectLocation = object5;
}
global.__d(_fun41347, 4785, [1420, 4786, 2]) /* metro module 4785, dependencies: [1420, 4786, 2] */;
+235 -227
View File
@@ -1,18 +1,24 @@
/* Metro module 4643; source: modules/stickers/StickersUtils.tsx; dependencies: [1348, 1867, 4644, 4784, 3832, 661, 4785, 1423, 1853, 477, 1457, 4787, 2] */
import UserSettingsProtoStore from '../user_settings/UserSettingsProtoStore.tsx'; /* Metro dependency 1348 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UploadAttachmentStore from '../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
import StickerMessagePreviewStore from './StickerMessagePreviewStore.tsx'; /* Metro dependency 4784 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as AvatarUtilsModule from '../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
import * as StickersConstantsModule from './StickersConstants.tsx'; /* Metro dependency 3832 */
import * as StickersTypesModule from './StickersTypes.tsx'; /* Metro dependency 4785 */
function _fun39922(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:6, offset: 0x010f00f8, size: 776 bytes, params: 8, frame: 34
let env0_0 = require;
const closure = getFavoriteStickerIds;
const getFavoriteStickerIds2 = getFavoriteStickerIds;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userSettingsProtoStore = importDefault(1348) /* metro dependency 1348: UserSettingsProtoStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
const stickerMessagePreviewStore = importDefault(4784) /* metro dependency 4784: StickerMessagePreviewStore */;
let value = require(3832) /* metro dependency 3832: StickersConstants */;
let value = StickersConstantsModule;
const env0_6 = value.DEFAULT_STICKER_DIMENSIONS;
const env0_7 = value.STICKER_APPLICATION_ID;
const env0_8 = value.StickerAnimationSettings;
const Endpoints = (require(661) /* metro dependency 661: Constants */).Endpoints;
const Endpoints = (ConstantsModule).Endpoints;
const GLOBAL_ENV = global.window.GLOBAL_ENV;
const API_ENDPOINT = GLOBAL_ENV.API_ENDPOINT;
const MEDIA_PROXY_ENDPOINT = GLOBAL_ENV.MEDIA_PROXY_ENDPOINT;
@@ -21,7 +27,7 @@ function _fun39922(global, require, importDefault, importAll, module, exports, d
const env0_14 = GLOBAL_ENV.CDN_HOST;
Object = global.Object;
const values = Object.values;
const StickerExtensions = (require(4785) /* metro dependency 4785: StickersTypes */).StickerExtensions;
const StickerExtensions = (StickersTypesModule).StickerExtensions;
value = Reflect.apply(values, Object, [StickerExtensions]);
const decodeURIComponent = global.decodeURIComponent;
const STICKER_ASSET = Endpoints.STICKER_ASSET;
@@ -44,11 +50,11 @@ function _fun39922(global, require, importDefault, importAll, module, exports, d
}
return a0.stickers[0];
};
const closure3 = getStickerExtensionFromFormatType;
const getStickerExtensionFromFormatType2 = getStickerExtensionFromFormatType;
const env0_19 = [];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/StickersUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/StickersUtils.tsx');
exports.getStickerPackPreviewSticker = closure2;
exports.getStickerExtensionFromFormatType = closure3;
exports.getStickerExtensionFromFormatType = getStickerExtensionFromFormatType2;
exports.getStickerFormatTypeFromFileType = getStickerFormatTypeFromFileType;
exports.getFilenameForSticker = getFilenameForSticker;
exports.getStickerAssetUrl = getStickerAssetUrl;
@@ -80,239 +86,241 @@ function _fun39922(global, require, importDefault, importAll, module, exports, d
return a0.stickerItems.length > 0 ? a0.stickerItems : a0.stickers.length > 0 ? a0.stickers : [];
};
exports.isAvailableGuildSticker = isAvailableGuildSticker;
exports.getFavoriteStickerIds = closure;
exports.getFavoriteStickerIds = getFavoriteStickerIds2;
exports.isFavoriteSticker = isFavoriteSticker;
}
function getFavoriteStickerIds() { // fn#39923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:1206, offset: 0x010f0400, size: 46 bytes, params: 1, frame: 5
return UserSettingsProtoStore.frecencyWithoutFetchingLatest.favoriteStickers?.stickerIds ?? env0_19;
}
function getFavoriteStickerIds() { // fn#39923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:1206, offset: 0x010f0400, size: 46 bytes, params: 1, frame: 5
return UserSettingsProtoStore.frecencyWithoutFetchingLatest.favoriteStickers?.stickerIds ?? env0_19;
}
function getStickerPackPreviewSticker(a0) { // fn#39924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:633, offset: 0x010f042e, size: 63 bytes, params: 2, frame: 13
const env0_0 = a0;
if (a0.cover_sticker_id != null) {
var value = a0.stickers.find(_fun39925);
if (value != null) {
return value;
function getStickerPackPreviewSticker(a0) { // fn#39924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:633, offset: 0x010f042e, size: 63 bytes, params: 2, frame: 13
const env0_0 = a0;
if (a0.cover_sticker_id != null) {
var value = a0.stickers.find(_fun39925);
if (value != null) {
return value;
}
}
}
return a0.stickers[0];
}
function getStickerExtensionFromFormatType(a0) { // fn#39926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:796, offset: 0x010f0488, size: 362 bytes, params: 2, frame: 15
const StickerExtensions = (require(4785) /* metro dependency 4785: StickersTypes */).StickerExtensions;
const StickerFormat = (require(4785) /* metro dependency 4785: StickersTypes */).StickerFormat;
const PNG = StickerFormat.PNG;
if (PNG === a0) {
return (require(1423) /* metro dependency 1423: AvatarUtils */).SUPPORTS_WEBP ? StickerExtensions.WEBP : StickerExtensions.PNG;
}
const APNG = StickerFormat.APNG;
if (APNG === a0) {
return StickerExtensions.APNG;
}
const LOTTIE = StickerFormat.LOTTIE;
if (LOTTIE === a0) {
return StickerExtensions.LOTTIE;
}
const GIF = StickerFormat.GIF;
if (GIF === a0) {
return StickerExtensions.GIF;
}
const Error = global.Error;
const value = 'Unexpected format type: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getStickerFormatTypeFromFileType(a0) { // fn#39927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:1581, offset: 0x010f05f2, size: 265 bytes, params: 2, frame: 12
const StickerFormat = (require(4785) /* metro dependency 4785: StickersTypes */).StickerFormat;
if (a0 === 'application/json') {
return StickerFormat.LOTTIE;
}
if (a0 === 'image/apng') {
return StickerFormat.APNG;
}
if (a0 === 'image/png') {
return StickerFormat.PNG;
}
if (a0 === 'image/webp') {
return StickerFormat.PNG;
}
if (a0 === 'image/gif') {
return StickerFormat.GIF;
}
const Error = global.Error;
const value = 'Unexpected file type: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getFilenameForSticker(a0) { // fn#39928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:1900, offset: 0x010f06fb, size: 67 bytes, params: 2, frame: 16
var r0;
var name;
let value = null;
if (value == a0) {
r0 = value;
} else {
name = a0.name;
value = getStickerExtensionFromFormatType(a0.format_type);
value = '' + name + '.' + value;
r0 = value;
}
return r0;
}
function getStickerAssetUrl(a0) { // fn#39929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:2001, offset: 0x010f073e, size: 729 bytes, params: 2, frame: 33
var enabled;
var r12;
var property;
var moduleValue;
var getForceSdrEmojisStickersConfig;
var forceSdrEmojisStickersConfig;
var error;
var protocol;
var moduleValue2;
var Math;
var value12;
let value = a1;
let r0 = value !== undefined ? value : {};
let isPreview = r0.isPreview;
isPreview = !(isPreview === undefined) && isPreview;
const size = r0.size;
r0 = size !== undefined ? size : DEFAULT_STICKER_DIMENSIONS;
let format_type = a0.format_type;
if (format_type == null) {
return null;
}
format_type = a0.format_type;
const format_type2 = a0.format_type;
const StickerFormat = require(dependencyMap[6]).StickerFormat;
const GIF = StickerFormat.GIF;
let r13 = format_type2 === GIF && isPreview;
const stickerExtensionFromFormatType = getStickerExtensionFromFormatType(r13 ? StickerFormat.PNG : format_type);
const value4 = Endpoints.STICKER_ASSET(a0.id, stickerExtensionFromFormatType);
try {
property = dependencyMap[8];
moduleValue = require(property);
getForceSdrEmojisStickersConfig = moduleValue.getForceSdrEmojisStickersConfig;
forceSdrEmojisStickersConfig = getForceSdrEmojisStickersConfig({location: 'sticker_url'});
enabled = forceSdrEmojisStickersConfig.enabled;
} catch (error) {
enabled = false;
}
const value7 = '';
r13 = enabled ? '&force_sdr=true' : value7;
const StickerExtensions = require(dependencyMap[6]).StickerExtensions;
const WEBP = StickerExtensions.WEBP;
if (PROJECT_ENV !== 'development') {
format_type = a0.format_type;
if (format_type === StickerFormat.LOTTIE) {
return value7 + global.location.protocol + ASSET_ENDPOINT + value4;
return a0.stickers[0];
function _fun39925({id}) { // fn#39925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:689, offset: 0x010f046d, size: 27 bytes, params: 2, frame: 2
return id === env0_0.cover_sticker_id;
}
format_type = a0.format_type;
if (format_type !== StickerFormat.APNG) {
r12 = value7;
} else if (isPreview) {
moduleValue2 = require(dependencyMap[9]);
r12 = moduleValue2.isAndroid() ? value7 : '&passthrough=false';
}
function getStickerExtensionFromFormatType(a0) { // fn#39926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:796, offset: 0x010f0488, size: 362 bytes, params: 2, frame: 15
const StickerExtensions = (StickersTypesModule).StickerExtensions;
const StickerFormat = (StickersTypesModule).StickerFormat;
const PNG = StickerFormat.PNG;
if (PNG === a0) {
return (require(1423) /* metro dependency 1423: AvatarUtils */).SUPPORTS_WEBP ? StickerExtensions.WEBP : StickerExtensions.PNG;
}
const APNG = StickerFormat.APNG;
if (APNG === a0) {
return StickerExtensions.APNG;
}
const LOTTIE = StickerFormat.LOTTIE;
if (LOTTIE === a0) {
return StickerExtensions.LOTTIE;
}
const GIF = StickerFormat.GIF;
if (GIF === a0) {
return StickerExtensions.GIF;
}
const Error = global.Error;
const value = 'Unexpected format type: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getStickerFormatTypeFromFileType(a0) { // fn#39927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:1581, offset: 0x010f05f2, size: 265 bytes, params: 2, frame: 12
const StickerFormat = (StickersTypesModule).StickerFormat;
if (a0 === 'application/json') {
return StickerFormat.LOTTIE;
}
if (a0 === 'image/apng') {
return StickerFormat.APNG;
}
if (a0 === 'image/png') {
return StickerFormat.PNG;
}
if (a0 === 'image/webp') {
return StickerFormat.PNG;
}
if (a0 === 'image/gif') {
return StickerFormat.GIF;
}
const Error = global.Error;
const value = 'Unexpected file type: ' + a0;
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
const error = new Error();
throw error instanceof Object ? error : value2;
}
function getFilenameForSticker(a0) { // fn#39928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:1900, offset: 0x010f06fb, size: 67 bytes, params: 2, frame: 16
var r0;
var name;
let value = null;
if (value == a0) {
r0 = value;
} else {
r12 = value7;
name = a0.name;
value = getStickerExtensionFromFormatType(a0.format_type);
value = '' + name + '.' + value;
r0 = value;
}
Math = global.Math;
value12 = Math.min(2, require(dependencyMap[10]).getDevicePixelRatio());
protocol = global.location.protocol;
value = require(dependencyMap[10]);
value = value.getBestMediaProxySize(r0 * value12);
return value7 + protocol + MEDIA_PROXY_ENDPOINT + value4 + '?size=' + value + r12 + (stickerExtensionFromFormatType !== WEBP ? value7 : '&quality=lossless') + r13;
return r0;
}
value = value7 + global.location.protocol + MEDIA_PROXY_ENDPOINT + value4;
return enabled ? value7 + value + '?force_sdr=true' : value;
}
function getStickerPackBannerAssetUrl({banner_asset_id}, a1) { // fn#39930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:2869, offset: 0x010f0a17, size: 261 bytes, params: 3, frame: 28
var r1;
if (banner_asset_id == null) {
return null;
}
var value;
const SUPPORTS_WEBP = (require(1423) /* metro dependency 1423: AvatarUtils */).SUPPORTS_WEBP;
const r12 = SUPPORTS_WEBP ? 'webp' : 'png';
const r3 = CDN_HOST != null ? 'https://' + CDN_HOST + '/app-assets/' + STICKER_APPLICATION_ID + '/store/' + banner_asset_id + '.' + r12 : '' + global.location.protocol + API_ENDPOINT + Endpoints.STORE_ASSET(STICKER_APPLICATION_ID,
banner_asset_id, r12);
if (a1 == null) {
r1 = r3;
} else {
value = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
value = value.getBestMediaProxySize(a1);
value = r3 + ('?size=' + value);
r1 = value;
}
return r1;
}
function isStickerAssetUrl(a0) { // fn#39931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:3163, offset: 0x010f0b1c, size: 49 bytes, params: 2, frame: 13
return a0.match(PROJECT_ENV !== 'development' ? env0_15 : env0_16) != null;
}
function isStickerPackAnimated({stickers}) { // fn#39932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:3227, offset: 0x010f0b4d, size: 29 bytes, params: 2, frame: 11
return stickers.some(_fun39933);
}
function shouldAttachSticker(a0, a1, a2, a3) { // fn#39936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:3628, offset: 0x010f0c68, size: 253 bytes, params: 5, frame: 17
const StickerSelectLocation = (require(4785) /* metro dependency 4785: StickersTypes */).StickerSelectLocation;
var value;
if (UploadAttachmentStore.getUploadCount(a2, a3) > 0) {
return true;
}
const stickerPreview = StickerMessagePreviewStore.getStickerPreview(a2, a3);
if (stickerPreview == null) {
if (StickerSelectLocation.STICKER_PICKER === a0) {
return a1.trim() !== '';
function getStickerAssetUrl(a0) { // fn#39929, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:2001, offset: 0x010f073e, size: 729 bytes, params: 2, frame: 33
var enabled;
var r12;
var property;
var moduleValue;
var getForceSdrEmojisStickersConfig;
var forceSdrEmojisStickersConfig;
var error;
var protocol;
var moduleValue2;
var Math;
var value12;
let value = a1;
let r0 = value !== undefined ? value : {};
let isPreview = r0.isPreview;
isPreview = !(isPreview === undefined) && isPreview;
const size = r0.size;
r0 = size !== undefined ? size : DEFAULT_STICKER_DIMENSIONS;
let format_type = a0.format_type;
if (format_type == null) {
return null;
}
if (StickerSelectLocation.AUTOCOMPLETE === a0) {
value = require(4787) /* metro dependency 4787: StickersSuggestionUtils */;
return value.getQueriesFromUserInput(a1).length > 1;
format_type = a0.format_type;
const format_type2 = a0.format_type;
const StickerFormat = require(dependencyMap[6]).StickerFormat;
const GIF = StickerFormat.GIF;
let r13 = format_type2 === GIF && isPreview;
const stickerExtensionFromFormatType = getStickerExtensionFromFormatType(r13 ? StickerFormat.PNG : format_type);
const value4 = Endpoints.STICKER_ASSET(a0.id, stickerExtensionFromFormatType);
try {
property = dependencyMap[8];
moduleValue = require(property);
getForceSdrEmojisStickersConfig = moduleValue.getForceSdrEmojisStickersConfig;
forceSdrEmojisStickersConfig = getForceSdrEmojisStickersConfig({location: 'sticker_url'});
enabled = forceSdrEmojisStickersConfig.enabled;
} catch (error) {
enabled = false;
}
StickerSelectLocation.BUILT_IN_INTEGRATION;
} else {
if (stickerPreview.length > 0) {
const value7 = '';
r13 = enabled ? '&force_sdr=true' : value7;
const StickerExtensions = require(dependencyMap[6]).StickerExtensions;
const WEBP = StickerExtensions.WEBP;
if (PROJECT_ENV !== 'development') {
format_type = a0.format_type;
if (format_type === StickerFormat.LOTTIE) {
return value7 + global.location.protocol + ASSET_ENDPOINT + value4;
}
format_type = a0.format_type;
if (format_type !== StickerFormat.APNG) {
r12 = value7;
} else if (isPreview) {
moduleValue2 = require(dependencyMap[9]);
r12 = moduleValue2.isAndroid() ? value7 : '&passthrough=false';
} else {
r12 = value7;
}
Math = global.Math;
value12 = Math.min(2, require(dependencyMap[10]).getDevicePixelRatio());
protocol = global.location.protocol;
value = require(dependencyMap[10]);
value = value.getBestMediaProxySize(r0 * value12);
return value7 + protocol + MEDIA_PROXY_ENDPOINT + value4 + '?size=' + value + r12 + (stickerExtensionFromFormatType !== WEBP ? value7 : '&quality=lossless') + r13;
}
value = value7 + global.location.protocol + MEDIA_PROXY_ENDPOINT + value4;
return enabled ? value7 + value + '?force_sdr=true' : value;
}
function getStickerPackBannerAssetUrl({banner_asset_id}, a1) { // fn#39930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:2869, offset: 0x010f0a17, size: 261 bytes, params: 3, frame: 28
var r1;
if (banner_asset_id == null) {
return null;
}
var value;
const SUPPORTS_WEBP = (AvatarUtilsModule).SUPPORTS_WEBP;
const r12 = SUPPORTS_WEBP ? 'webp' : 'png';
const r3 = CDN_HOST != null ? 'https://' + CDN_HOST + '/app-assets/' + STICKER_APPLICATION_ID + '/store/' + banner_asset_id + '.' + r12 : '' + global.location.protocol + API_ENDPOINT + Endpoints.STORE_ASSET(STICKER_APPLICATION_ID,
banner_asset_id, r12);
if (a1 == null) {
r1 = r3;
} else {
value = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
value = value.getBestMediaProxySize(a1);
value = r3 + ('?size=' + value);
r1 = value;
}
return r1;
}
function isStickerAssetUrl(a0) { // fn#39931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:3163, offset: 0x010f0b1c, size: 49 bytes, params: 2, frame: 13
return a0.match(PROJECT_ENV !== 'development' ? env0_15 : env0_16) != null;
}
function isStickerPackAnimated({stickers}) { // fn#39932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:3227, offset: 0x010f0b4d, size: 29 bytes, params: 2, frame: 11
return stickers.some(_fun39933);
function _fun39933({format_type}) { // fn#39933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:3247, offset: 0x010f0b6a, size: 124 bytes, params: 2, frame: 15
const value = environment.__proto__;
const StickerFormat = (StickersTypesModule).StickerFormat;
const APNG = StickerFormat.APNG;
let r0 = format_type === APNG || format_type === StickerFormat.LOTTIE;
r0 = !r0 ? format_type === StickerFormat.GIF : r0;
return r0;
}
}
function shouldAttachSticker(a0, a1, a2, a3) { // fn#39936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:3628, offset: 0x010f0c68, size: 253 bytes, params: 5, frame: 17
const StickerSelectLocation = (StickersTypesModule).StickerSelectLocation;
var value;
if (UploadAttachmentStore.getUploadCount(a2, a3) > 0) {
return true;
}
if (StickerSelectLocation.STICKER_PICKER === a0) {
return a1.trim() !== '';
const stickerPreview = StickerMessagePreviewStore.getStickerPreview(a2, a3);
if (stickerPreview == null) {
if (StickerSelectLocation.STICKER_PICKER === a0) {
return a1.trim() !== '';
}
if (StickerSelectLocation.AUTOCOMPLETE === a0) {
value = require(4787) /* metro dependency 4787: StickersSuggestionUtils */;
return value.getQueriesFromUserInput(a1).length > 1;
}
StickerSelectLocation.BUILT_IN_INTEGRATION;
} else {
if (stickerPreview.length > 0) {
return true;
}
if (StickerSelectLocation.STICKER_PICKER === a0) {
return a1.trim() !== '';
}
if (StickerSelectLocation.AUTOCOMPLETE === a0) {
value = require(4787) /* metro dependency 4787: StickersSuggestionUtils */;
return value.getQueriesFromUserInput(a1).length > 1;
}
StickerSelectLocation.BUILT_IN_INTEGRATION;
}
if (StickerSelectLocation.AUTOCOMPLETE === a0) {
value = require(4787) /* metro dependency 4787: StickersSuggestionUtils */;
return value.getQueriesFromUserInput(a1).length > 1;
}
StickerSelectLocation.BUILT_IN_INTEGRATION;
}
return false;
}
function isAvailableGuildSticker(a0) { // fn#39940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:4241, offset: 0x010f0e04, size: 44 bytes, params: 2, frame: 11
if (a0 === null) {
return false;
}
return GuildStore.getGuild(a0.guild_id) !== undefined;
}
function isFavoriteSticker(a0) { // fn#39941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:4380, offset: 0x010f0e30, size: 28 bytes, params: 2, frame: 11
return getFavoriteStickerIds().includes(a0);
}
function isAvailableGuildSticker(a0) { // fn#39940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:4241, offset: 0x010f0e04, size: 44 bytes, params: 2, frame: 11
if (a0 === null) {
return false;
}
return GuildStore.getGuild(a0.guild_id) !== undefined;
}
function _fun39925({id}) { // fn#39925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:689, offset: 0x010f046d, size: 27 bytes, params: 2, frame: 2
return id === env0_0.cover_sticker_id;
}
function isFavoriteSticker(a0) { // fn#39941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:4380, offset: 0x010f0e30, size: 28 bytes, params: 2, frame: 11
return getFavoriteStickerIds().includes(a0);
}
function _fun39933({format_type}) { // fn#39933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4821:3247, offset: 0x010f0b6a, size: 124 bytes, params: 2, frame: 15
const value = environment.__proto__;
const StickerFormat = (require(4785) /* metro dependency 4785: StickersTypes */).StickerFormat;
const APNG = StickerFormat.APNG;
let r0 = format_type === APNG || format_type === StickerFormat.LOTTIE;
r0 = !r0 ? format_type === StickerFormat.GIF : r0;
return r0;
}
global.__d(_fun39922, 4643, [1348, 1867, 4644, 4784, 3832, 661, 4785, 1423, 1853, 477, 1457, 4787,
2]) /* metro module 4643, dependencies: [1348, 1867, 4644, 4784, 3832, 661, 4785, 1423, 1853, 477, 1457, 4787, 2] */;
@@ -1,55 +1,65 @@
/* Metro module 8242; source: modules/stickers/native/NativeLottieView.tsx; dependencies: [31, 27, 33, 477, 8243, 116, 2] */
import React from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import Module00116 from '../../../by-id/module-00116.js'; /* Metro dependency 116 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun65895(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8427:6, offset: 0x01be487d, size: 322 bytes, params: 8, frame: 22
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(31) /* metro dependency 31 */;
let value = ReactModule;
const env0_0 = value.useEffect;
const env0_1 = value.useRef;
const env0_2 = importDefault(31) /* metro dependency 31 */;
const requireNativeComponent = (require(27) /* metro dependency 27 */).requireNativeComponent;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const requireNativeComponent = (ReactNativeModule).requireNativeComponent;
if (Reflect.apply((require(477) /* metro dependency 477: PlatformUtils */).isAndroid, value, [])) {
value = importDefault(8243) /* metro dependency 8243: LottieNodeNativeComponent */;
} else {
value = requireNativeComponent('NativeLottieNode');
}
const env0_5 = (importDefault(116) /* metro dependency 116 */)({supportedCommands: ['setup']});
object2 = {LOOP: 0};
object2[0] = 'LOOP';
object2.STILL = 1;
object2[1] = 'STILL';
object2.ONCE = 2;
object2[2] = 'ONCE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/NativeLottieView.tsx');
const env0_5 = (Module00116)({supportedCommands: ['setup']});
object = {LOOP: 0};
object[0] = 'LOOP';
object.STILL = 1;
object[1] = 'STILL';
object.ONCE = 2;
object[2] = 'ONCE';
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/NativeLottieView.tsx');
exports.default = _default_65896;
exports.NativeLottieRenderMode = object2;
}
exports.NativeLottieRenderMode = object;
function _default_65896({asset, url, width, height, opacity, renderMode = env0_6.LOOP, animating, accessibilityLabel}) { // fn#65896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8427:377, offset: 0x01be49bf, size: 241 bytes, params: 2, frame: 23
opacity = opacity === undefined ? 1 : opacity;
animating = animating === undefined || animating;
const value2 = undefined.useRef(null);
const env0_3 = useRef({asset: asset, url: url, width: width, height: height, animating: animating,
accessibilityLabel: accessibilityLabel});
useEffect(_fun65897);
useEffect(_fun65898, [renderMode]);
return ((Component) => <Component ref={value2} style={{width: width, height: height, opacity: opacity}} />)(env0_4);
function _fun65897() { // fn#65897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8427:588, offset: 0x01be4ab0, size: 21 bytes, params: 1, frame: 2
env0_3.current = React;
}
function _default_65896({asset, url, width, height, opacity, renderMode = env0_6.LOOP, animating, accessibilityLabel}) { // fn#65896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8427:377, offset: 0x01be49bf, size: 241 bytes, params: 2, frame: 23
opacity = opacity === undefined ? 1 : opacity;
animating = animating === undefined || animating;
const value2 = undefined.useRef(null);
const env0_3 = useRef({asset: asset, url: url, width: width, height: height, animating: animating,
accessibilityLabel: accessibilityLabel});
useEffect(_fun65897);
useEffect(_fun65898, [renderMode]);
return ((Component) => <Component ref={value2} style={{width: width, height: height, opacity: opacity}} />)(env0_4);
}
function _fun65898() { // fn#65898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8427:611, offset: 0x01be4ac5, size: 202 bytes, params: 1, frame: 25
var value5;
var binding;
var {asset, url, width, height, animating, accessibilityLabel} = env0_3.current;
var {asset, url, width, height, renderMode, animating, accessibilityLabel} = {asset: assetBinding, url: urlBinding,
width: widthBinding, height: heightBinding, renderMode: env0_0, animating: animatingBinding,
accessibilityLabel: accessibilityLabelBinding};
if (urlBinding !== '' && widthBinding !== 0 && heightBinding !== 0) {
value5 = environment.__proto__;
binding = env1_5;
binding.setup(env0_1.current, assetBinding, urlBinding, widthBinding, heightBinding, renderMode,
animatingBinding,
accessibilityLabelBinding);
}
}
function _fun65898() { // fn#65898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8427:611, offset: 0x01be4ac5, size: 202 bytes, params: 1, frame: 25
var value5;
var binding;
var {asset, url, width, height, animating, accessibilityLabel} = env0_3.current;
var {asset, url, width, height, renderMode, animating, accessibilityLabel} = {asset: assetBinding, url: urlBinding,
width: widthBinding, height: heightBinding, renderMode: env0_0, animating: animatingBinding,
accessibilityLabel: accessibilityLabelBinding};
if (urlBinding !== '' && widthBinding !== 0 && heightBinding !== 0) {
value5 = environment.__proto__;
binding = env1_5;
binding.setup(env0_1.current, assetBinding, urlBinding, widthBinding, heightBinding, renderMode,
animatingBinding,
accessibilityLabelBinding);
}
}
global.__d(_fun65895, 8242, [31, 27, 33, 477, 8243, 116,
2]) /* metro module 8242, dependencies: [31, 27, 33, 477, 8243, 116, 2] */;
+106 -99
View File
@@ -1,109 +1,116 @@
/* Metro module 10970; source: modules/stickers/native/Sticker.tsx; dependencies: [31, 27, 1310, 33, 4785, 4643, 1244, 8242, 10971, 5475, 4002, 6740, 6741, 2] */
import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as StickersTypesModule from '../StickersTypes.tsx'; /* Metro dependency 4785 */
function _fun84022(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11156:6, offset: 0x01f3482e, size: 193 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = getStickerAssetUrl_84023;
const getStickerAssetUrl_840232 = getStickerAssetUrl_84023;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).PixelRatio;
const themeStore = importDefault(1310) /* metro dependency 1310: ThemeStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/Sticker.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/Sticker.tsx');
exports.default = _default_84024;
exports.getStickerAssetUrl = closure;
}
function getStickerAssetUrl_84023(a0, a1, a2) { // fn#84023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11156:149, offset: 0x01f348ef, size: 258 bytes, params: 4, frame: 19
var r1;
var moduleValue;
var getStickerAssetUrl;
var object2;
const format_type = a0.format_type;
var value;
const StickerFormat = (require(4785) /* metro dependency 4785: StickersTypes */).StickerFormat;
const LOTTIE = StickerFormat.LOTTIE;
if (format_type === LOTTIE) {
value = require(4643) /* metro dependency 4643: StickersUtils */;
value = value.getStickerAssetUrl(a0);
r1 = value;
} else if (a0.format_type === StickerFormat.APNG) {
value = require(4643) /* metro dependency 4643: StickersUtils */;
value = value.getStickerAssetUrl(a0, {isPreview: !a2, size: a1});
r1 = value;
} else {
moduleValue = require(4643) /* metro dependency 4643: StickersUtils */;
getStickerAssetUrl = moduleValue.getStickerAssetUrl;
object2 = {isPreview: !a2};
object2.size = PixelRatio.getPixelSizeForLayoutSize(a1);
r1 = Reflect.apply(getStickerAssetUrl, moduleValue, [a0, object2]);
}
return r1 ?? '';
}
function _default_84024({sticker, size, animated, opaque}) { // fn#84024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11156:476, offset: 0x01f349f1, size: 691 bytes, params: 2, frame: 25
var moduleValue;
var id;
var moduleValue2;
var defaultImport;
var moduleValue3;
var NativeLottieView;
var NativeLottieRenderMode;
animated = animated === undefined || animated;
opaque = opaque === undefined || opaque;
const r7 = opaque ? 1 : 0.3;
const stickerAssetUrl_84023 = getStickerAssetUrl_84023(sticker, size, animated);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const rk6pOw = (require(1244) /* metro dependency 1244: indexNative */).t.rk6pOw;
let object2 = {};
object2.stickerName = sticker.name;
const value3 = Reflect.apply(formatToPlainString, intl, [rk6pOw, object2]);
let format_type = sticker.format_type;
const StickerFormat = (require(4785) /* metro dependency 4785: StickersTypes */).StickerFormat;
const LOTTIE = StickerFormat.LOTTIE;
if (format_type === LOTTIE) {
NativeLottieView = importDefault(8242) /* metro dependency 8242: NativeLottieView */;
var defaultImport2Props = {url: stickerAssetUrl_84023, asset: sticker.id ?? '', width: size, height: size,
opacity: r7};
NativeLottieRenderMode = (require(8242) /* metro dependency 8242: NativeLottieView */).NativeLottieRenderMode;
defaultImport2Props.renderMode = animated ? NativeLottieRenderMode.LOOP : NativeLottieRenderMode.STILL;
defaultImport2Props.accessibilityLabel = value3;
return <NativeLottieView {...defaultImport2Props} />;
}
format_type = sticker.format_type;
const APNG = StickerFormat.APNG;
if (format_type !== APNG) {
defaultImport = importDefault(5475) /* metro dependency 5475: FastImage */;
var defaultImportProps = {resizeMode: 'contain', style: {height: size, width: size, opacity: r7}};
moduleValue3 = require(4002) /* metro dependency 4002: shared */;
defaultImportProps.placeholder = moduleValue3.isThemeDark(ThemeStore.theme) ? importDefault(6740) /* metro dependency 6740 */ : importDefault(6741) /* metro dependency 6741 */;
defaultImportProps.source = {uri: stickerAssetUrl_84023};
defaultImportProps.accessible = true;
defaultImportProps.accessibilityLabel = value3;
return ((Component) => <Component {...defaultImportProps} />)(defaultImport);
}
if ('type' in sticker) {
moduleValue = require(4643) /* metro dependency 4643: StickersUtils */;
if (moduleValue.isGuildSticker(sticker)) {
object2 = {};
object2.style = {height: size, width: size, opacity: r7};
object2.url = stickerAssetUrl_84023;
id = sticker.id;
moduleValue2 = require(4643) /* metro dependency 4643: StickersUtils */;
object2.name = '' + id + '.' + moduleValue2.getStickerExtensionFromFormatType(sticker.format_type);
object2.accessibilityLabel = value3;
return ((Component) => <Component {...object2} />)(importDefault(10971) /* metro dependency 10971: NativeAPNGView */);
exports.getStickerAssetUrl = getStickerAssetUrl_840232;
function getStickerAssetUrl_84023(a0, a1, a2) { // fn#84023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11156:149, offset: 0x01f348ef, size: 258 bytes, params: 4, frame: 19
var r1;
var moduleValue;
var getStickerAssetUrl;
var object;
const format_type = a0.format_type;
var value;
const StickerFormat = (StickersTypesModule).StickerFormat;
const LOTTIE = StickerFormat.LOTTIE;
if (format_type === LOTTIE) {
value = require(4643) /* metro dependency 4643: StickersUtils */;
value = value.getStickerAssetUrl(a0);
r1 = value;
} else if (a0.format_type === StickerFormat.APNG) {
value = require(4643) /* metro dependency 4643: StickersUtils */;
value = value.getStickerAssetUrl(a0, {isPreview: !a2, size: a1});
r1 = value;
} else {
moduleValue = require(4643) /* metro dependency 4643: StickersUtils */;
getStickerAssetUrl = moduleValue.getStickerAssetUrl;
object = {isPreview: !a2};
object.size = PixelRatio.getPixelSizeForLayoutSize(a1);
r1 = Reflect.apply(getStickerAssetUrl, moduleValue, [a0, object]);
}
defaultImport = importDefault(5475) /* metro dependency 5475: FastImage */;
var defaultImportProps = {resizeMode: 'contain', style: {height: size, width: size, opacity: r7}};
moduleValue3 = require(4002) /* metro dependency 4002: shared */;
defaultImportProps.placeholder = moduleValue3.isThemeDark(ThemeStore.theme) ? importDefault(6740) /* metro dependency 6740 */ : importDefault(6741) /* metro dependency 6741 */;
defaultImportProps.source = {uri: stickerAssetUrl_84023};
defaultImportProps.accessible = true;
defaultImportProps.accessibilityLabel = value3;
return ((Component) => <Component {...defaultImportProps} />)(defaultImport);
return r1 ?? '';
}
return ((Component) => <Component style={{height: size, width: size,
opacity: r7}} url={stickerAssetUrl_84023} name={'' + sticker.id + '.' + (require(4643) /* metro dependency 4643: StickersUtils */).getStickerExtensionFromFormatType(sticker.format_type)} accessibilityLabel={value3} />)(importDefault(10971) /* metro dependency 10971: NativeAPNGView */);
function _default_84024({sticker, size, animated, opaque}) { // fn#84024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11156:476, offset: 0x01f349f1, size: 691 bytes, params: 2, frame: 25
var moduleValue;
var id;
var moduleValue2;
var defaultImport;
var moduleValue3;
var NativeLottieView;
var NativeLottieRenderMode;
animated = animated === undefined || animated;
opaque = opaque === undefined || opaque;
const r7 = opaque ? 1 : 0.3;
const stickerAssetUrl_84023 = getStickerAssetUrl_84023(sticker, size, animated);
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const rk6pOw = (IndexNativeModule).t.rk6pOw;
let object = {};
object.stickerName = sticker.name;
const value3 = Reflect.apply(formatToPlainString, intl, [rk6pOw, object]);
let format_type = sticker.format_type;
const StickerFormat = (StickersTypesModule).StickerFormat;
const LOTTIE = StickerFormat.LOTTIE;
if (format_type === LOTTIE) {
NativeLottieView = importDefault(8242) /* metro dependency 8242: NativeLottieView */;
var defaultImport2Props = {url: stickerAssetUrl_84023, asset: sticker.id ?? '', width: size, height: size,
opacity: r7};
NativeLottieRenderMode = (require(8242) /* metro dependency 8242: NativeLottieView */).NativeLottieRenderMode;
defaultImport2Props.renderMode = animated ? NativeLottieRenderMode.LOOP : NativeLottieRenderMode.STILL;
defaultImport2Props.accessibilityLabel = value3;
return <NativeLottieView {...defaultImport2Props} />;
}
format_type = sticker.format_type;
const APNG = StickerFormat.APNG;
if (format_type !== APNG) {
defaultImport = importDefault(5475) /* metro dependency 5475: FastImage */;
var defaultImportProps = {resizeMode: 'contain', style: {height: size, width: size, opacity: r7}};
moduleValue3 = require(4002) /* metro dependency 4002: shared */;
defaultImportProps.placeholder = moduleValue3.isThemeDark(ThemeStore.theme) ? importDefault(6740) /* metro dependency 6740 */ : importDefault(6741) /* metro dependency 6741 */;
defaultImportProps.source = {uri: stickerAssetUrl_84023};
defaultImportProps.accessible = true;
defaultImportProps.accessibilityLabel = value3;
return ((Component) => <Component {...defaultImportProps} />)(defaultImport);
}
if ('type' in sticker) {
moduleValue = require(4643) /* metro dependency 4643: StickersUtils */;
if (moduleValue.isGuildSticker(sticker)) {
object = {};
object.style = {height: size, width: size, opacity: r7};
object.url = stickerAssetUrl_84023;
id = sticker.id;
moduleValue2 = require(4643) /* metro dependency 4643: StickersUtils */;
object.name = '' + id + '.' + moduleValue2.getStickerExtensionFromFormatType(sticker.format_type);
object.accessibilityLabel = value3;
return ((Component) => <Component {...object} />)(importDefault(10971) /* metro dependency 10971: NativeAPNGView */);
}
defaultImport = importDefault(5475) /* metro dependency 5475: FastImage */;
var defaultImportProps = {resizeMode: 'contain', style: {height: size, width: size, opacity: r7}};
moduleValue3 = require(4002) /* metro dependency 4002: shared */;
defaultImportProps.placeholder = moduleValue3.isThemeDark(ThemeStore.theme) ? importDefault(6740) /* metro dependency 6740 */ : importDefault(6741) /* metro dependency 6741 */;
defaultImportProps.source = {uri: stickerAssetUrl_84023};
defaultImportProps.accessible = true;
defaultImportProps.accessibilityLabel = value3;
return ((Component) => <Component {...defaultImportProps} />)(defaultImport);
}
return ((Component) => <Component style={{height: size, width: size,
opacity: r7}} url={stickerAssetUrl_84023} name={'' + sticker.id + '.' + (require(4643) /* metro dependency 4643: StickersUtils */).getStickerExtensionFromFormatType(sticker.format_type)} accessibilityLabel={value3} />)(importDefault(10971) /* metro dependency 10971: NativeAPNGView */);
}
}
global.__d(_fun84022, 10970, [31, 27, 1310, 33, 4785, 4643, 1244, 8242, 10971, 5475, 4002, 6740, 6741,
2]) /* metro module 10970, dependencies: [31, 27, 1310, 33, 4785, 4643, 1244, 8242, 10971, 5475, 4002, 6740, 6741, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,33 +1,52 @@
/* Metro module 11067; source: modules/stickers/native/StickerOptionsActionSheet.tsx; dependencies: [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244, 2] */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as LinkIconModule from '../../../design/components/Icon/native/redesign/generated/LinkIcon.tsx'; /* Metro dependency 4056 */
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
function _fun84745(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11253:6, offset: 0x01f55fb5, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerOptionsActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerOptionsActionSheet.tsx');
exports.default = StickerOptionsActionSheet;
function StickerOptionsActionSheet({stickerUrl}) { // fn#84746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11253:218, offset: 0x01f56043, size: 244 bytes, params: 2, frame: 23
const value2 = ReactModule.useCallback(_fun84747, [stickerUrl]);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
const TableRow = (TableRowNativeModule).TableRow;
const object2 = {};
const LinkIcon = (LinkIconModule).LinkIcon;
object2.icon = <LinkIcon />;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const B1ubHx = (IndexNativeModule).t.B1ubHx;
object2.label = Reflect.apply(string, intl, [B1ubHx]);
object2.onPress = value2;
return (
<ActionSheet>
<TableRowGroup hasIcons>
<TableRow {...object2} />
</TableRowGroup>
</ActionSheet>
);
function _fun84747() { // fn#84747, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11253:290, offset: 0x01c408ce, size: 93 bytes, params: 1, frame: 15
const value = environment.__proto__;
ClipboardUtilsNativeModule.copy(stickerUrl);
(ToastUtilsModule).presentCopiedToClipboard();
(ActionSheetActionCreators).hideActionSheet();
}
}
}
function StickerOptionsActionSheet({stickerUrl}) { // fn#84746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11253:218, offset: 0x01f56043, size: 244 bytes, params: 2, frame: 23
const value2 = env0_3.useCallback(_fun84747, [stickerUrl]);
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object = {};
const LinkIcon = (require(4056) /* metro dependency 4056: LinkIcon */).LinkIcon;
object.icon = <LinkIcon />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const B1ubHx = (require(1244) /* metro dependency 1244: indexNative */).t.B1ubHx;
object.label = Reflect.apply(string, intl, [B1ubHx]);
object.onPress = value2;
return (
<ActionSheet>
<TableRowGroup hasIcons>
<TableRow {...object} />
</TableRowGroup>
</ActionSheet>
);
}
global.__d(_fun84745, 11067, [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244,
2]) /* metro module 11067, dependencies: [31, 33, 6797, 3856, 4080, 6805, 6231, 6238, 4056, 1244, 2] */;
@@ -1,20 +1,35 @@
/* Metro module 11061; source: modules/stickers/native/StickerPackBanner.tsx; dependencies: [31, 27, 33, 4643, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as StickersUtilsModule from '../StickersUtils.tsx'; /* Metro dependency 4643 */
function _fun84685(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11247:6, offset: 0x01f53280, size: 162 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_2 = value.Image;
const env0_3 = value.View;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPackBanner.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPackBanner.tsx');
exports.default = _default_84686;
function _default_84686({containerStyle, style, stickerPack}) { // fn#84686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11247:156, offset: 0x01f53322, size: 132 bytes, params: 2, frame: 19
const stickerPackBannerAssetUrl = (StickersUtilsModule).getStickerPackBannerAssetUrl(stickerPack,
1024);
return (
stickerPackBannerAssetUrl == null
? null
: (
<View style={containerStyle}>
<Image
source={{uri: stickerPackBannerAssetUrl}}
style={style}
resizeMode="contain"
/>
</View>
)
);
}
}
function _default_84686({containerStyle, style, stickerPack}) { // fn#84686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11247:156, offset: 0x01f53322, size: 132 bytes, params: 2, frame: 19
const stickerPackBannerAssetUrl = (require(4643) /* metro dependency 4643: StickersUtils */).getStickerPackBannerAssetUrl(stickerPack,
1024);
return stickerPackBannerAssetUrl == null ? null : <View style={containerStyle}><Image source={{uri: stickerPackBannerAssetUrl}} style={style} resizeMode="contain" /></View>;
}
global.__d(_fun84685, 11061, [31, 27, 33, 4643, 2]) /* metro module 11061, dependencies: [31, 27, 33, 4643, 2] */;
@@ -1,123 +1,157 @@
/* Metro module 11057; source: modules/stickers/native/StickerPackDetailActionSheet.tsx; dependencies: [57, 31, 11028, 661, 6276, 33, 4501, 1478, 1585, 22, 683, 6275, 11058, 11062, 6515, 6277, 11063, 5278, 10970, 2] */
import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import StickerPackHeader from './StickerPackHeader.tsx'; /* Metro dependency 11058 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as ActionSheetHeaderBarNativeModule from '../../../design/components/Sheet/native/ActionSheetHeaderBar.native.tsx'; /* Metro dependency 6515 */
import * as StickerPickerConstantsModule from './StickerPickerConstants.tsx'; /* Metro dependency 11028 */
import * as StickerPackInformationPopoutModule from './StickerPackInformationPopout.tsx'; /* Metro dependency 11062 */
function _fun84670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:6, offset: 0x01f525e8, size: 370 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const stickerPickerConstantsModule = require(11028) /* metro dependency 11028: StickerPickerConstants */;
const env0_5 = stickerPickerConstantsModule.MIN_MARGIN;
const env0_6 = stickerPickerConstantsModule.STICKER_SIZE;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_8 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_MAX_WIDTH;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.Fragment;
const env0_11 = value3.jsxs;
const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({focusedStickerPreviewContainer: {'position': 'absolute',
let value = ReactModule;
const env0_12 = (CreateStylesModule).createStyles({focusedStickerPreviewContainer: {'position': 'absolute',
'left': 0, 'top': 0, 'height': '100%', 'width': '100%', 'alignItems': 'center', 'justifyContent': 'center',
'backgroundColor': 'rgba(0, 0, 0, 0.85)'}, header: {'marginHorizontal': 16, 'marginVertical': 8,
'backgroundColor': 'transparent', height: undefined}, stickers: {'paddingHorizontal': 16, 'marginBottom': 16},
popoutContainer: {'position': 'absolute', 'bottom': 50}});
value = value.memo(StickerPackDetailActionSheet);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPackDetailActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPackDetailActionSheet.tsx');
exports.default = value;
}
function StickerPackDetailActionSheet({stickerPack, analyticsPopoutType, onClose}) { // fn#84671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:659, offset: 0x01f5275a, size: 882 bytes, params: 2, frame: 35
var r5;
var value;
const styles = useStyles();
const width = (UseWindowDimensionsNative)().width;
const binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_3 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_5 = value5[1];
const env0_6 = binding.useRef(null);
const bottom = (UseSafeAreaInsetsNative)().bottom;
const Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
const value7 = Reflect.apply(floor, Math, [Math2.min(ACTION_SHEET_MAX_WIDTH, width) / (STICKER_SIZE + MIN_MARGIN)]);
let defaultImport = Module00022;
const value8 = defaultImport.chunk(stickerPack.stickers, value7);
const env0_8 = binding.useRef(onClose);
const onClose_846732 = onClose_84673;
binding.useEffect(_fun84675, [onClose]);
binding.useEffect(function() {
return _fun84677;
}, []);
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[10]);
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
defaultImport.track(OPEN_POPOUT, {type: analyticsPopoutType, sticker_pack_id: stickerPack.id});
}, [analyticsPopoutType, stickerPack.id]);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object2 = {'scrollable': true, 'startExpanded': true, 'handleDisabled': true};
const stickerPackHeader = (
<StickerPackHeader
stickerPack={stickerPack}
style={styles.header}
onPress={StickerPackInformationPopoutModule.doesStickerPackHavePopoutInformation(stickerPack) ? onClose_846732 : undefined}
withBanner
withDescription
/>
);
const ActionSheetHeaderBar = (ActionSheetHeaderBarNativeModule).ActionSheetHeaderBar;
object2.header = (
<>
{stickerPackHeader}
<ActionSheetHeaderBar variant="floating" />
</>
);
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
const bottomSheet = (
<BottomSheet {...object2}>
<BottomSheetScrollView style={styles.stickers} contentContainerStyle={{paddingBottom: 32 + bottom}}>
{value8.map(_fun84679)}
</BottomSheetScrollView>
</BottomSheet>
);
const r7 = property != null && ((PressableOpacity) => <PressableOpacity accessibilityRole="none" style={styles.focusedStickerPreviewContainer} onPress={onPress_84680}>{((Component) => <Component sticker={property} size={128} />)(importDefault(10970) /* metro dependency 10970: Sticker */)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity);
if (property2) {
value = importDefault(11062) /* metro dependency 11062: StickerPackInformationPopout */;
value = ((Component) => <Component stickerPack={stickerPack} style={styles.popoutContainer} onClose={onClose_846732} />)(value);
r5 = value;
} else {
r5 = property2;
}
return (
<>
{bottomSheet}
{r7}
{r5}
</>
);
function StickerPackDetailActionSheetOnPressSticker(a0) { // fn#84672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:988, owner: StickerPackDetailActionSheet.onPressSticker, offset: 0x01b85a95, size: 19 bytes, params: 2, frame: 11
env0_3(a0);
}
function StickerPackDetailActionSheetOnClose() { // fn#84673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:1026, owner: StickerPackDetailActionSheet.onClose, offset: 0x01f52acc, size: 104 bytes, params: 1, frame: 14
if (env0_6.current != null) {
global.clearTimeout(env0_6.current);
}
const binding = env0_4;
env0_5(!binding);
if (!binding) {
env0_6.current = global.setTimeout(_fun84674, 4000);
}
function _fun84674() { // fn#84674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:1112, offset: 0x01e1b41a, size: 18 bytes, params: 1, frame: 11
return env1_5(false);
}
}
function _fun84675() { // fn#84675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:1150, offset: 0x01f52b34, size: 21 bytes, params: 1, frame: 2
env0_8.current = onClose;
}
function _fun84676() { // fn#84676, offset: 0x01f52b49, size: 11 bytes, params: 1, frame: 1
return _fun84677;
function _fun84677() { // fn#84677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:1191, offset: 0x01f52b54, size: 38 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_8.current?.();
}
}
function _fun84679(a0, a1) { // fn#84679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:1781, offset: 0x01f52bc5, size: 84 bytes, params: 3, frame: 17
let value = environment.__proto__;
value = importDefault(11063) /* metro dependency 11063: StickerPickerListRow */;
return ((Component) => <Component containerWidth={ConstantsModule.AnalyticEvents} stickers={a0} rowSize={ConstantsModule.AnalyticEvents} onPressSticker={StickerPackDetailActionSheetOnPressSticker} nativeRow={false} key={a1} />)(value);
}
function StickerPackDetailActionSheetOnPress() { // fn#84680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:2002, owner: StickerPackDetailActionSheet.onPress, offset: 0x01f52c19, size: 18 bytes, params: 1, frame: 11
return env0_3(null);
}
function StickerPackDetailActionSheet({stickerPack, analyticsPopoutType, onClose}) { // fn#84671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:659, offset: 0x01f5275a, size: 882 bytes, params: 2, frame: 35
var r5;
var value;
const styles = useStyles();
const width = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().width;
const binding = env0_4;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_3;
const value4 = binding2(value3, 2);
const property = value4[0];
var env0_3 = value4[1];
useState = binding.useState;
const value5 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value5[0];
const env0_5 = value5[1];
const env0_6 = binding.useRef(null);
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const Math = global.Math;
const floor = Math.floor;
const Math2 = global.Math;
const value7 = Reflect.apply(floor, Math, [Math2.min(ACTION_SHEET_MAX_WIDTH, width) / (STICKER_SIZE + MIN_MARGIN)]);
let defaultImport = importDefault(22) /* metro dependency 22 */;
const value8 = defaultImport.chunk(stickerPack.stickers, value7);
const env0_8 = binding.useRef(onClose);
const closure = onClose_84673;
binding.useEffect(_fun84675, [onClose]);
binding.useEffect(function() {
return _fun84677;
}, []);
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[10]);
var OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
defaultImport.track(OPEN_POPOUT, {type: analyticsPopoutType, sticker_pack_id: stickerPack.id});
}, [analyticsPopoutType, stickerPack.id]);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object = {'scrollable': true, 'startExpanded': true, 'handleDisabled': true};
const StickerPackHeader = importDefault(11058) /* metro dependency 11058: StickerPackHeader */;
const stickerPackInformationPopoutModule = require(11062) /* metro dependency 11062: StickerPackInformationPopout */;
const stickerPackHeader = <StickerPackHeader stickerPack={stickerPack} style={styles.header} onPress={stickerPackInformationPopoutModule.doesStickerPackHavePopoutInformation(stickerPack) ? closure : undefined} withBanner withDescription />;
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
object.header = <>{stickerPackHeader}<ActionSheetHeaderBar variant="floating" /></>;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const bottomSheet = <BottomSheet {...object}><BottomSheetScrollView style={styles.stickers} contentContainerStyle={{paddingBottom: 32 + bottom}}>{value8.map(_fun84679)}</BottomSheetScrollView></BottomSheet>;
const r7 = property != null && ((PressableOpacity) => <PressableOpacity accessibilityRole="none" style={styles.focusedStickerPreviewContainer} onPress={onPress_84680}>{((Component) => <Component sticker={property} size={128} />)(importDefault(10970) /* metro dependency 10970: Sticker */)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity);
if (property2) {
value = importDefault(11062) /* metro dependency 11062: StickerPackInformationPopout */;
value = ((Component) => <Component stickerPack={stickerPack} style={styles.popoutContainer} onClose={closure} />)(value);
r5 = value;
} else {
r5 = property2;
}
return (
<>
{bottomSheet}
{r7}
{r5}
</>
);
}
function StickerPackDetailActionSheetOnClose() { // fn#84673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:1026, owner: StickerPackDetailActionSheet.onClose, offset: 0x01f52acc, size: 104 bytes, params: 1, frame: 14
if (env0_6.current != null) {
global.clearTimeout(env0_6.current);
}
const binding = env0_4;
env0_5(!binding);
if (!binding) {
env0_6.current = global.setTimeout(_fun84674, 4000);
}
}
function _fun84675() { // fn#84675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:1150, offset: 0x01f52b34, size: 21 bytes, params: 1, frame: 2
env0_8.current = onClose;
}
function _fun84676() { // fn#84676, offset: 0x01f52b49, size: 11 bytes, params: 1, frame: 1
return _fun84677;
}
function _fun84679(a0, a1) { // fn#84679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:1781, offset: 0x01f52bc5, size: 84 bytes, params: 3, frame: 17
let value = environment.__proto__;
value = importDefault(11063) /* metro dependency 11063: StickerPickerListRow */;
const binding = env0_7;
return ((Component) => <Component containerWidth={binding} stickers={a0} rowSize={binding} onPressSticker={StickerPackDetailActionSheetOnPressSticker} nativeRow={false} key={a1} />)(value);
}
function StickerPackDetailActionSheetOnPress() { // fn#84680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:2002, owner: StickerPackDetailActionSheet.onPress, offset: 0x01f52c19, size: 18 bytes, params: 1, frame: 11
return env0_3(null);
}
function _fun84677() { // fn#84677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11243:1191, offset: 0x01f52b54, size: 38 bytes, params: 1, frame: 10
const value = environment.__proto__;
return env1_8.current?.();
}
global.__d(_fun84670, 11057, [57, 31, 11028, 661, 6276, 33, 4501, 1478, 1585, 22, 683, 6275, 11058, 11062, 6515,
6277, 11063, 5278, 10970,
2]) /* metro module 11057, dependencies: [57, 31, 11028, 661, 6276, 33, 4501, 1478, 1585, 22, 683, 6275, 11058, 11062, 6515, 6277, 11063, 5278, 10970, 2] */;
@@ -1,75 +1,121 @@
/* Metro module 11058; source: modules/stickers/native/StickerPackHeader.tsx; dependencies: [31, 27, 11028, 33, 4501, 697, 4573, 4643, 1305, 11059, 11060, 1244, 11061, 5278, 2] */
import Module11060 from '../../../by-id/module-11060.js'; /* Metro dependency 11060 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as StickerPickerConstantsModule from './StickerPickerConstants.tsx'; /* Metro dependency 11028 */
function _fun84681(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11244:6, offset: 0x01f52c2b, size: 543 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const {PADDING_HORIZONTAL, PADDING_VERTICAL} = require(11028) /* metro dependency 11028: StickerPickerConstants */;
const value3 = require(33) /* metro dependency 33 */;
const env0_4 = value3.jsx;
const env0_5 = value3.jsxs;
const env0_6 = value3.Fragment;
let value = ReactModule;
const {PADDING_HORIZONTAL, PADDING_VERTICAL} = StickerPickerConstantsModule;
const value4 = 2 * PADDING_VERTICAL;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object3 = {};
const object4 = {paddingTop: PADDING_VERTICAL, paddingHorizontal: PADDING_HORIZONTAL, height: 36 + value4,
const createStyles = CreateStylesModule.createStyles;
object = {};
const object2 = {paddingTop: PADDING_VERTICAL, paddingHorizontal: PADDING_HORIZONTAL, height: 36 + value4,
justifyContent: 'center', overflow: 'hidden'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.section = object4;
object3.label = {flex: -1};
object3.header = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
object3.bannerContainer = {'aspectRatio': 3.824074074074074, 'marginVertical': -8, 'width': '100%'};
object3.banner = {height: '100%'};
object3.headline = {'height': 20, 'flex': 1, 'flexDirection': 'row', 'alignItems': 'center'};
const object6 = {'marginLeft': 8, 'height': 16, 'width': 16, 'borderRadius': null, 'backgroundColor': null,
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.section = object2;
object.label = {flex: -1};
object.header = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'};
object.bannerContainer = {'aspectRatio': 3.824074074074074, 'marginVertical': -8, 'width': '100%'};
object.banner = {height: '100%'};
object.headline = {'height': 20, 'flex': 1, 'flexDirection': 'row', 'alignItems': 'center'};
const object5 = {'marginLeft': 8, 'height': 16, 'width': 16, 'borderRadius': null, 'backgroundColor': null,
'alignItems': 'center', 'justifyContent': 'center'};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object6.backgroundColor = BORDER_SUBTLE;
object3.iconContainer = object6;
object5.backgroundColor = BORDER_SUBTLE;
object.iconContainer = object5;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object3.icon = {color: INTERACTIVE_TEXT_DEFAULT};
object3.animatedIcon = {'position': 'relative', 'left': 1};
object3.premiumIcon = {'position': 'relative', 'left': -1};
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object3]);
object.icon = {color: INTERACTIVE_TEXT_DEFAULT};
object.animatedIcon = {'position': 'relative', 'left': 1};
object.premiumIcon = {'position': 'relative', 'left': -1};
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun84682);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPackHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPackHeader.tsx');
exports.default = value;
function _fun84682({stickerPack, style, onPress, withBanner, withDescription}) { // fn#84682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11244:979, offset: 0x01f52e4a, size: 938 bytes, params: 2, frame: 37
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
withBanner = !(withBanner === undefined) && withBanner;
withDescription = !(withDescription === undefined) && withDescription;
const styles = useStyles();
let jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
const Text = (TextModule).Text;
const text = (
<Text
style={styles.label}
lineClamp={1}
variant="text-md/bold"
color="mobile-text-heading-primary"
>
{stickerPack.name}
</Text>
);
const r17 = (require(4643) /* metro dependency 4643: StickersUtils */).isStickerPackAnimated(stickerPack) && <View style={styles.iconContainer}><Icon source={importDefault(11059) /* metro dependency 11059 */} style={styles.animatedIcon} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} color={styles.icon.color} /></View>;
const iconProps = {source: Module11060, style: styles.premiumIcon};
const Icon3 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon3.Sizes;
const EXTRA_SMALL = Sizes.EXTRA_SMALL;
iconProps.size = EXTRA_SMALL;
iconProps.color = styles.icon.color;
const view = (
<View style={styles.header}>
<View style={styles.headline}>
{text}
{r17}
<View style={styles.iconContainer}>
<Icon {...iconProps} />
</View>
</View>
</View>
);
const r8 = withDescription && stickerPack.description != null && <Text variant="text-sm/medium">{stickerPack.description}</Text>;
const intl = (IndexNativeModule).intl;
const fragment = (
<>
{view}
{r8}
<Text
lineClamp={1}
variant="text-xs/medium"
color="text-default"
>
{intl.format((IndexNativeModule).t['0S3JpO'],
{numStickers: stickerPack.stickers.length})}
</Text>
</>
);
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
const items3 = [
withBanner && ((Component) => <Component stickerPack={stickerPack} containerStyle={styles.bannerContainer} style={styles.banner} />)(importDefault(11061) /* metro dependency 11061: StickerPackBanner */),
];
items3[1] = (
onPress != null
? ((PressableOpacity) => <PressableOpacity style={[styles.section,
style]} onPress={onPress} accessibilityRole="header">{fragment}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)
: (
<View style={[styles.section, style]}>
{fragment}
</View>
)
);
return (
<>
{items3}
</>
);
}
}
function _fun84682({stickerPack, style, onPress, withBanner, withDescription}) { // fn#84682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11244:979, offset: 0x01f52e4a, size: 938 bytes, params: 2, frame: 37
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
withBanner = !(withBanner === undefined) && withBanner;
withDescription = !(withDescription === undefined) && withDescription;
const styles = useStyles();
let jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text style={styles.label} lineClamp={1} variant="text-md/bold" color="mobile-text-heading-primary">{stickerPack.name}</Text>;
const r17 = (require(4643) /* metro dependency 4643: StickersUtils */).isStickerPackAnimated(stickerPack) && <View style={styles.iconContainer}><Icon source={importDefault(11059) /* metro dependency 11059 */} style={styles.animatedIcon} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} color={styles.icon.color} /></View>;
const iconProps = {source: importDefault(11060) /* metro dependency 11060 */, style: styles.premiumIcon};
const Icon3 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon3.Sizes;
const EXTRA_SMALL = Sizes.EXTRA_SMALL;
iconProps.size = EXTRA_SMALL;
iconProps.color = styles.icon.color;
const view = <View style={styles.header}><View style={styles.headline}>{text}{r17}<View style={styles.iconContainer}><Icon {...iconProps} /></View></View></View>;
const r8 = withDescription && stickerPack.description != null && <Text variant="text-sm/medium">{stickerPack.description}</Text>;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const fragment = <>{view}{r8}<Text lineClamp={1} variant="text-xs/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['0S3JpO'],
{numStickers: stickerPack.stickers.length})}</Text></>;
jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
const items3 = [withBanner && ((Component) => <Component stickerPack={stickerPack} containerStyle={styles.bannerContainer} style={styles.banner} />)(importDefault(11061) /* metro dependency 11061: StickerPackBanner */)];
items3[1] = onPress != null ? ((PressableOpacity) => <PressableOpacity style={[styles.section,
style]} onPress={onPress} accessibilityRole="header">{fragment}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity) : <View style={[styles.section,
style]}>{fragment}</View>;
return (
<>
{items3}
</>
);
}
global.__d(_fun84681, 11058, [31, 27, 11028, 33, 4501, 697, 4573, 4643, 1305, 11059, 11060, 1244, 11061, 5278,
2]) /* metro module 11058, dependencies: [31, 27, 11028, 33, 4501, 697, 4573, 4643, 1305, 11059, 11060, 1244, 11061, 5278, 2] */;
@@ -1,10 +1,18 @@
/* Metro module 11062; source: modules/stickers/native/StickerPackInformationPopout.tsx; dependencies: [31, 27, 33, 4501, 697, 4643, 1244, 4573, 5278, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as StickersUtilsModule from '../StickersUtils.tsx'; /* Metro dependency 4643 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun84687(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11248:6, offset: 0x01f533a6, size: 445 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_2 = value.View;
const env0_3 = value.FlatList;
value = require(33) /* metro dependency 33 */;
@@ -12,94 +20,102 @@ function _fun84687(global, require, importDefault, importAll, module, exports, d
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'backgroundColor': null, 'width': '90%', 'marginHorizontal': '5%', 'padding': 16};
const object2 = {'backgroundColor': null, 'width': '90%', 'marginHorizontal': '5%', 'padding': 16};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object2.backgroundColor = BACKGROUND_BASE_LOW;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
const BLACK = (importDefault(697) /* metro dependency 697: native */).colors.BLACK;
object.shadowColor = BLACK;
object.shadowOffset = {'width': 2, 'height': 2};
object.shadowOpacity = 0.25;
object.shadowRadius = 5;
const env0_6 = Reflect.apply(createStyles, value, [{informationContainer: object,
object2.shadowColor = BLACK;
object2.shadowOffset = {'width': 2, 'height': 2};
object2.shadowOpacity = 0.25;
object2.shadowRadius = 5;
const env0_6 = Reflect.apply(createStyles, value, [{informationContainer: object2,
headerContainer: {'flexDirection': 'row', 'justifyContent': 'space-between', 'marginBottom': 8},
informationHeader: {lineHeight: 20}, informationContentContainer: {flexDirection: 'row'},
informationContent: {lineHeight: 20}, informationContentDescription: {'flex': 1, 'marginLeft': 5}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPackInformationPopout.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPackInformationPopout.tsx');
exports.default = _default_84689;
exports.doesStickerPackHavePopoutInformation = function(a0) {
return generateListData(a0).length > 0;
};
}
function generateListData(a0) { // fn#84688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11248:708, offset: 0x01f53563, size: 129 bytes, params: 2, frame: 17
var push;
var object2;
var intl;
const items2 = [];
const stickersUtilsModule = require(4643) /* metro dependency 4643: StickersUtils */;
if (stickersUtilsModule.isStickerPackAnimated(a0)) {
push = items2.push;
object2 = {key: 'animated'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.W11rMa);
Reflect.apply(push, items2, [object2]);
function generateListData(a0) { // fn#84688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11248:708, offset: 0x01f53563, size: 129 bytes, params: 2, frame: 17
var push;
var object;
var intl;
const items2 = [];
if (StickersUtilsModule.isStickerPackAnimated(a0)) {
push = items2.push;
object = {key: 'animated'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.W11rMa);
Reflect.apply(push, items2, [object]);
}
return items2;
}
return items2;
}
function _default_84689({stickerPack, onClose, style}) { // fn#84689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11248:849, offset: 0x01f535e4, size: 465 bytes, params: 2, frame: 30
const styles = useStyles();
const value2 = generateListData(stickerPack);
const items2 = [styles.informationContainer, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const XDm6yN = (require(1244) /* metro dependency 1244: indexNative */).t.XDm6yN;
const text = <Text style={styles.informationHeader} variant="text-md/semibold" color="mobile-text-heading-primary">{Reflect.apply(format,
intl, [XDm6yN, {stickerPackName: stickerPack.name}])}</Text>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<View style={items2}>
<View style={styles.headerContainer}>
{text}
<PressableOpacity
onPress={onClose}
accessibilityRole="button"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
>
<Text variant="text-md/bold" color="text-brand">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
</Text>
</PressableOpacity>
function _default_84689({stickerPack, onClose, style}) { // fn#84689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11248:849, offset: 0x01f535e4, size: 465 bytes, params: 2, frame: 30
const styles = useStyles();
const value2 = generateListData(stickerPack);
const items2 = [styles.informationContainer, style];
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const format = intl.format;
const XDm6yN = (IndexNativeModule).t.XDm6yN;
const text = (
<Text
style={styles.informationHeader}
variant="text-md/semibold"
color="mobile-text-heading-primary"
>
{Reflect.apply(format, intl, [XDm6yN, {stickerPackName: stickerPack.name}])}
</Text>
);
const PressableOpacity = (PressablesModule).PressableOpacity;
return (
<View style={items2}>
<View style={styles.headerContainer}>
{text}
<PressableOpacity
onPress={onClose}
accessibilityRole="button"
accessibilityLabel={intl.string((IndexNativeModule).t.cpT0Cq)}
>
<Text variant="text-md/bold" color="text-brand">
{intl.string((IndexNativeModule).t.cpT0Cq)}
</Text>
</PressableOpacity>
</View>
<FlatList data={value2} renderItem={renderItem_84690} />
</View>
<FlatList data={value2} renderItem={renderItem_84690} />
</View>
);
}
);
function _default_84689RenderItem({item}) { // fn#84690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11248:1458, owner: _default_84689.renderItem, offset: 0x01f537b5, size: 198 bytes, params: 2, frame: 22
const value = environment.__proto__;
const stylesBinding = styles;
const informationContentContainer = stylesBinding.informationContentContainer;
const Text = (TextModule).Text;
return (
<View style={informationContentContainer}>
<Text
style={stylesBinding.informationContent}
variant="text-md/medium"
color="text-default"
>
{'•'}
</Text>
<Text
style={[stylesBinding.informationContent, stylesBinding.informationContentDescription]}
variant="text-md/medium"
color="text-default"
>
{item.description}
</Text>
</View>
);
}
}
function _default_84689RenderItem({item}) { // fn#84690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11248:1458, owner: _default_84689.renderItem, offset: 0x01f537b5, size: 198 bytes, params: 2, frame: 22
const value = environment.__proto__;
const stylesBinding = styles;
const informationContentContainer = stylesBinding.informationContentContainer;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={informationContentContainer}>
<Text
style={stylesBinding.informationContent}
variant="text-md/medium"
color="text-default"
>
{'•'}
</Text>
<Text
style={[stylesBinding.informationContent, stylesBinding.informationContentDescription]}
variant="text-md/medium"
color="text-default"
>
{item.description}
</Text>
</View>
);
}
global.__d(_fun84687, 11062, [31, 27, 33, 4501, 697, 4643, 1244, 4573, 5278,
2]) /* metro module 11062, dependencies: [31, 27, 33, 4501, 697, 4643, 1244, 4573, 5278, 2] */;
+191 -154
View File
@@ -1,171 +1,208 @@
/* Metro module 11048; source: modules/stickers/native/StickerPicker.tsx; dependencies: [57, 31, 27, 1878, 6583, 3832, 661, 33, 4501, 697, 683, 11049, 11051, 566, 6771, 6789, 11032, 690, 11055, 6943, 4643, 11056, 7882, 6796, 11065, 6984, 1244, 11075, 11076, 11081, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import StickersStore from '../StickersStore.tsx'; /* Metro dependency 6583 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import TidaWebformExperiment from '../../guild/TidaWebformExperiment.tsx'; /* Metro dependency 6796 */
import UseExpressionPickerInsets from '../../expression_picker/native/useExpressionPickerInsets.tsx'; /* Metro dependency 11032 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as StickersConstantsModule from '../StickersConstants.tsx'; /* Metro dependency 3832 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as StickerSendabilityModule from '../StickerSendability.tsx'; /* Metro dependency 6943 */
import * as StickersHooksModule from '../StickersHooks.tsx'; /* Metro dependency 11049 */
import * as StickersUtilsModule from './StickersUtils.tsx'; /* Metro dependency 11051 */
import * as ShowStickerDetailActionSheetModule from './showStickerDetailActionSheet.tsx'; /* Metro dependency 11065 */
function _fun84543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:6, offset: 0x01f4f02f, size: 435 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.ActivityIndicator;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
const STICKER_SEARCH_HEADER_HEIGHT = (require(3832) /* metro dependency 3832: StickersConstants */).STICKER_SEARCH_HEADER_HEIGHT;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_9 = constantsModule.AnalyticEvents;
const env0_10 = constantsModule.AnalyticsPages;
const env0_11 = constantsModule.AnalyticsSections;
const env0_12 = constantsModule.UpsellTypes;
const env0_13 = constantsModule.ChatInputComponentViewedTypes;
const value4 = require(33) /* metro dependency 33 */;
const env0_14 = value4.jsx;
const env0_15 = value4.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
const env0_16 = Reflect.apply(createStyles, createStylesModule, [{container: {flex: 1},
let value = ReactModule;
const STICKER_SEARCH_HEADER_HEIGHT = (StickersConstantsModule).STICKER_SEARCH_HEADER_HEIGHT;
const createStyles = CreateStylesModule.createStyles;
const PX_8 = (Native).space.PX_8;
const env0_16 = Reflect.apply(createStyles, CreateStylesModule, [{container: {flex: 1},
header: {paddingVertical: PX_8}, loadingIndicator: {'alignItems': 'center', 'justifyContent': 'center',
'flex': 1}, emptyState: {'marginTop': null, 'alignItems': 'center', 'justifyContent': 'center', 'flex': 1,
marginTop: STICKER_SEARCH_HEADER_HEIGHT}}]);
value = value.memo(StickerPicker);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPicker.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPicker.tsx');
exports.default = value;
}
function StickerPicker({bottomSheetRef, bottomSheetIndex, channel, paddingTop, onPressSticker, stickerFormats, inPortalKeyboard}) { // fn#84544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:612, offset: 0x01f4f1e2, size: 1014 bytes, params: 2, frame: 49
var r10;
var SearchField;
var intl;
const styles = useStyles();
(require(11049) /* metro dependency 11049: StickersHooks */).useFetchStickerPacks();
const value3 = (require(11051) /* metro dependency 11051: StickersUtils */).useStickerCategories(channel);
const hasLoadedStickerPacks = (require(566) /* metro dependency 566: flux */).useStateFromStores([StickersStore],
function() {
return StickersStore.hasLoadedStickerPacks;
});
const binding = env0_4;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [0]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
const property2 = value5[1];
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const STICKER_PICKER = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).STICKER_PICKER;
const analyticsLocations = defaultImport(STICKER_PICKER).analyticsLocations;
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property3 = value7[0];
var env0_4 = value7[1];
const {safeAreaStyle,
safeAreaBottomKeyboardAware} = (importDefault(11032) /* metro dependency 11032: useExpressionPickerInsets */)({hasCategories: true});
const value9 = binding.useCallback(_fun84546, []);
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[10]);
var CHAT_INPUT_COMPONENT_VIEWED = AnalyticEvents.CHAT_INPUT_COMPONENT_VIEWED;
var channelBinding = channel;
defaultImport.track(CHAT_INPUT_COMPONENT_VIEWED, {type: ChatInputComponentViewedTypes.STICKER,
channel_id: channelBinding.id, guild_id: channelBinding.guild_id});
}, [channel.id, channel.guild_id]);
const value10 = binding.useCallback(_fun84549, [channel, onPressSticker, analyticsLocations]);
const value11 = binding.useCallback(function() {
var channelBinding = channel;
var defaultImport = importDefault(dependencyMap[10]);
var CHAT_INPUT_COMPONENT_VIEWED = AnalyticEvents.CHAT_INPUT_COMPONENT_VIEWED;
defaultImport.track(CHAT_INPUT_COMPONENT_VIEWED, {type: ChatInputComponentViewedTypes.STICKER_SEARCH,
channel_id: channelBinding.id, guild_id: channelBinding.guild_id});
}, [channel]);
const defaultImport3 = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
const useExperiment = defaultImport3.useExperiment;
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport3, [{location: 'StickerPicker'},
{autoTrackExposure: false}]).tidaWebformEnabled;
const value12 = binding.useCallback(_fun84551, [channel]);
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
if (value3.length === 0) {
r10 = null;
} else {
var viewBinding2Props = {style: styles.header};
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r10 = <View {...viewBinding2Props}><SearchField size="md" placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dt5h1C)} onChange={value9} onFocus={value11} isRound /></View>;
}
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.container}>
{r10}
{hasLoadedStickerPacks ? value3.length === 0 ? <View style={styles.emptyState}>{((Component) => <Component />)(importDefault(11075) /* metro dependency 11075: StickerPickerEmptyState */)}</View> : ((Component) => <Component bottomSheetRef={bottomSheetRef} bottomSheetIndex={bottomSheetIndex} setCategoryIndex={property2} onPressSticker={value10} onLongPressStickerDetail={tidaWebformEnabled ? value12 : undefined} insetBottom={safeAreaBottomKeyboardAware} insetTop={paddingTop} channel={channel} stickerFormats={stickerFormats} searchResults={property3} inPortalKeyboard={inPortalKeyboard} />)(importDefault(11076) /* metro dependency 11076: StickerPickerList */) : <ActivityIndicator animating size="large" style={styles.loadingIndicator} />}
{((Component) => <Component categories={value3} categoryIndex={property} style={safeAreaStyle} />)(importDefault(11081) /* metro dependency 11081: StickerPickerCategories */)}
</View>
</AnalyticsLocationProvider>
);
}
function _fun84546(a0) { // fn#84546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:1130, offset: 0x01f4f5e7, size: 110 bytes, params: 2, frame: 13
var environment;
var value;
var binding;
if (a0 === '') {
value = environment.__proto__;
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
value.batchUpdates(_fun84547);
} else {
binding = env0_4;
value = environment.__proto__;
value = require(11055) /* metro dependency 11055: StickersSearchUtils */;
binding(value.searchAllStickers(a0));
}
}
function _fun84549(a0) { // fn#84549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:1383, offset: 0x01f4f6cb, size: 477 bytes, params: 2, frame: 21
var object2;
var value5;
var defaultImport2;
const stickerSendability = (require(6943) /* metro dependency 6943: StickerSendability */).getStickerSendability(a0,
UserStore.getCurrentUser(), channel);
const StickerSendability = (require(6943) /* metro dependency 6943: StickerSendability */).StickerSendability;
const SENDABLE = StickerSendability.SENDABLE;
if (stickerSendability === SENDABLE) {
onPressSticker(a0);
} else {
var SENDABLE_WITH_PREMIUM = StickerSendability.SENDABLE_WITH_PREMIUM;
if (stickerSendability !== SENDABLE_WITH_PREMIUM) {
return undefined;
function StickerPicker({bottomSheetRef, bottomSheetIndex, channel, paddingTop, onPressSticker, stickerFormats, inPortalKeyboard}) { // fn#84544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:612, offset: 0x01f4f1e2, size: 1014 bytes, params: 2, frame: 49
var r10;
var SearchField;
var intl;
const styles = useStyles();
(StickersHooksModule).useFetchStickerPacks();
const value3 = (StickersUtilsModule).useStickerCategories(channel);
const hasLoadedStickerPacks = (require(566) /* metro dependency 566: flux */).useStateFromStores([StickersStore],
function() {
return StickersStore.hasLoadedStickerPacks;
});
const binding = env0_4;
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [0]);
const value5 = Module00057(value4, 2);
const property = value5[0];
const property2 = value5[1];
let defaultImport = UseAnalyticsLocations;
const STICKER_PICKER = (AnalyticsLocation).STICKER_PICKER;
const analyticsLocations = defaultImport(STICKER_PICKER).analyticsLocations;
useState = binding.useState;
const value7 = Module00057(Reflect.apply(useState, binding, [null]), 2);
const property3 = value7[0];
var env0_4 = value7[1];
const {safeAreaStyle,
safeAreaBottomKeyboardAware} = (UseExpressionPickerInsets)({hasCategories: true});
const value9 = binding.useCallback(_fun84546, []);
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[10]);
var CHAT_INPUT_COMPONENT_VIEWED = AnalyticEvents.CHAT_INPUT_COMPONENT_VIEWED;
var channelBinding = channel;
defaultImport.track(CHAT_INPUT_COMPONENT_VIEWED, {type: ChatInputComponentViewedTypes.STICKER,
channel_id: channelBinding.id, guild_id: channelBinding.guild_id});
}, [channel.id, channel.guild_id]);
const value10 = binding.useCallback(_fun84549, [channel, onPressSticker, analyticsLocations]);
const value11 = binding.useCallback(function() {
var channelBinding = channel;
var defaultImport = importDefault(dependencyMap[10]);
var CHAT_INPUT_COMPONENT_VIEWED = AnalyticEvents.CHAT_INPUT_COMPONENT_VIEWED;
defaultImport.track(CHAT_INPUT_COMPONENT_VIEWED, {type: ChatInputComponentViewedTypes.STICKER_SEARCH,
channel_id: channelBinding.id, guild_id: channelBinding.guild_id});
}, [channel]);
const defaultImport3 = TidaWebformExperiment;
const useExperiment = defaultImport3.useExperiment;
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport3, [{location: 'StickerPicker'},
{autoTrackExposure: false}]).tidaWebformEnabled;
const value12 = binding.useCallback(_fun84551, [channel]);
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
if (value3.length === 0) {
r10 = null;
} else {
var viewBinding2Props = {style: styles.header};
SearchField = (require(6984) /* metro dependency 6984: SearchFieldNative */).SearchField;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r10 = (
<View {...viewBinding2Props}>
<SearchField
size="md"
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dt5h1C)}
onChange={value9}
onFocus={value11}
isRound
/>
</View>
);
}
var moduleValue2 = require(4643) /* metro dependency 4643: StickersUtils */;
if (moduleValue2.isStandardSticker(a0)) {
value5 = StickersStore.getStickerPack(a0.pack_id);
if (value5 == null) {
return undefined;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<View style={styles.container}>
{r10}
{
hasLoadedStickerPacks
? (
value3.length === 0
? (
<View style={styles.emptyState}>
{((Component) => <Component />)(importDefault(11075) /* metro dependency 11075: StickerPickerEmptyState */)}
</View>
)
: ((Component) => <Component bottomSheetRef={bottomSheetRef} bottomSheetIndex={bottomSheetIndex} setCategoryIndex={property2} onPressSticker={value10} onLongPressStickerDetail={tidaWebformEnabled ? value12 : undefined} insetBottom={safeAreaBottomKeyboardAware} insetTop={paddingTop} channel={channel} stickerFormats={stickerFormats} searchResults={property3} inPortalKeyboard={inPortalKeyboard} />)(importDefault(11076) /* metro dependency 11076: StickerPickerList */)
)
: (
<ActivityIndicator
animating
size="large"
style={styles.loadingIndicator}
/>
)
}
{((Component) => <Component categories={value3} categoryIndex={property} style={safeAreaStyle} />)(importDefault(11081) /* metro dependency 11081: StickerPickerCategories */)}
</View>
</AnalyticsLocationProvider>
);
function _fun84546(a0) { // fn#84546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:1130, offset: 0x01f4f5e7, size: 110 bytes, params: 2, frame: 13
var environment;
var value;
var binding;
if (a0 === '') {
value = environment.__proto__;
value = require(690) /* metro dependency 690: ReactBatchUpdatesNative */;
value.batchUpdates(_fun84547);
} else {
binding = env0_4;
value = environment.__proto__;
value = require(11055) /* metro dependency 11055: StickersSearchUtils */;
binding(value.searchAllStickers(a0));
}
defaultImport2 = importDefault(11056) /* metro dependency 11056: openStickerPackDetailActionSheet */;
object2 = {};
object2.analyticsLocation = {page: channel.guild_id != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL};
object2.analyticsPopoutType = (require(11056) /* metro dependency 11056: openStickerPackDetailActionSheet */).AnalyticsPopoutType.STICKER_PACK_DETAIL;
object2.stickerPack = value5;
defaultImport2(object2);
return undefined;
function _fun84547() { // fn#84547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:1164, offset: 0x01f4f655, size: 29 bytes, params: 1, frame: 12
env1_2(0);
env1_4(null);
}
}
var moduleValue3 = require(4643) /* metro dependency 4643: StickersUtils */;
if (moduleValue3.isGuildSticker(a0)) {
(importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */).handleShowUpsellAlert({initialUpsellKey: UpsellTypes.GLOBAL_STICKER,
analyticsLocation: {page: channel.guild_id != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL,
section: AnalyticsSections.STICKER_PICKER_UPSELL}, analyticsLocations: analyticsLocations});
function _fun84549(a0) { // fn#84549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:1383, offset: 0x01f4f6cb, size: 477 bytes, params: 2, frame: 21
var object;
var stickersStoreBinding;
var value5;
var defaultImport2;
const stickerSendability = (StickerSendabilityModule).getStickerSendability(a0,
UserStore.getCurrentUser(), channel);
const StickerSendability = (StickerSendabilityModule).StickerSendability;
const SENDABLE = StickerSendability.SENDABLE;
if (stickerSendability === SENDABLE) {
onPressSticker(a0);
} else {
var SENDABLE_WITH_PREMIUM = StickerSendability.SENDABLE_WITH_PREMIUM;
if (stickerSendability !== SENDABLE_WITH_PREMIUM) {
return undefined;
}
var moduleValue2 = require(4643) /* metro dependency 4643: StickersUtils */;
if (moduleValue2.isStandardSticker(a0)) {
stickersStoreBinding = StickersStore;
value5 = stickersStoreBinding.getStickerPack(a0.pack_id);
if (value5 == null) {
return undefined;
}
defaultImport2 = importDefault(11056) /* metro dependency 11056: openStickerPackDetailActionSheet */;
object = {};
object.analyticsLocation = {page: channel.guild_id != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL};
object.analyticsPopoutType = (require(11056) /* metro dependency 11056: openStickerPackDetailActionSheet */).AnalyticsPopoutType.STICKER_PACK_DETAIL;
object.stickerPack = value5;
defaultImport2(object);
return undefined;
}
var moduleValue3 = require(4643) /* metro dependency 4643: StickersUtils */;
if (moduleValue3.isGuildSticker(a0)) {
(importDefault(7882) /* metro dependency 7882: PremiumUpsellUtils */).handleShowUpsellAlert({initialUpsellKey: UpsellTypes.GLOBAL_STICKER,
analyticsLocation: {page: channel.guild_id != null ? AnalyticsPages.GUILD_CHANNEL : AnalyticsPages.DM_CHANNEL,
section: AnalyticsSections.STICKER_PICKER_UPSELL}, analyticsLocations: analyticsLocations});
}
}
}
function _fun84551(a0) { // fn#84551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:2304, offset: 0x01f4f901, size: 59 bytes, params: 2, frame: 13
const value = environment.__proto__;
(ShowStickerDetailActionSheetModule).showStickerDetailActionSheet({renderableSticker: a0,
channel: channel});
}
}
}
function _fun84551(a0) { // fn#84551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:2304, offset: 0x01f4f901, size: 59 bytes, params: 2, frame: 13
const value = environment.__proto__;
(require(11065) /* metro dependency 11065: showStickerDetailActionSheet */).showStickerDetailActionSheet({renderableSticker: a0,
channel: channel});
}
function _fun84547() { // fn#84547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11234:1164, offset: 0x01f4f655, size: 29 bytes, params: 1, frame: 12
env1_2(0);
env1_4(null);
}
global.__d(_fun84543, 11048, [57, 31, 27, 1878, 6583, 3832, 661, 33, 4501, 697, 683, 11049, 11051, 566, 6771, 6789,
11032, 690, 11055, 6943, 4643, 11056, 7882, 6796, 11065, 6984, 1244, 11075, 11076, 11081,
2]) /* metro module 11048, dependencies: [57, 31, 27, 1878, 6583, 3832, 661, 33, 4501, 697, 683, 11049, 11051, 566, 6771, 6789, 11032, 690, 11055, 6943, 4643, 11056, 7882, 6796, 11065, 6984, 1244, 11075, 11076, 11081, 2] */;
@@ -1,232 +1,263 @@
/* Metro module 11081; source: modules/stickers/native/StickerPickerCategories.tsx; dependencies: [57, 31, 27, 1867, 11052, 661, 1346, 33, 4501, 697, 3829, 4643, 4785, 683, 5278, 1305, 1423, 6819, 10970, 4081, 4082, 8667, 8668, 8671, 1244, 11082, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import HapticFeedbackTypes from '../../haptics/HapticFeedbackTypes.tsx'; /* Metro dependency 4082 */
import UseExpressionPickerCategoriesPlaceholderConfig from '../../expression_picker/native/categories/useExpressionPickerCategoriesPlaceholderConfig.tsx'; /* Metro dependency 8667 */
import ExpressionPickerCategories from '../../expression_picker/native/categories/ExpressionPickerCategories.tsx'; /* Metro dependency 8668 */
import FastestListAndroid from '../../fastest_list/FastestList.android.tsx'; /* Metro dependency 8671 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ExpressionPickerConstantsModule from '../../expression_picker/ExpressionPickerConstants.tsx'; /* Metro dependency 1346 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as HapticUtilsNativeModule from '../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StickersUtilsModule from '../StickersUtils.tsx'; /* Metro dependency 4643 */
import * as StickersTypesModule from '../StickersTypes.tsx'; /* Metro dependency 4785 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as StickerPickerStoreModule from './StickerPickerStore.tsx'; /* Metro dependency 11052 */
function _fun84824(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:6, offset: 0x01f58b48, size: 550 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const env0_7 = (require(11052) /* metro dependency 11052: StickerPickerStore */).useStickerPickerStore;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.AnalyticEvents;
const env0_9 = constantsModule.AnalyticsPages;
const env0_10 = constantsModule.CATEGORY_ICON_RIPPLE_CONFIG;
const CATEGORY_ICON_SIZE = constantsModule.CATEGORY_ICON_SIZE;
const EXPRESSION_FOOTER_HEIGHT = constantsModule.EXPRESSION_FOOTER_HEIGHT;
const NODE_SIZE = constantsModule.NODE_SIZE;
const env0_13 = (require(1346) /* metro dependency 1346: ExpressionPickerConstants */).ExpressionPickerViewType;
const value3 = require(33) /* metro dependency 33 */;
const env0_14 = value3.jsx;
const env0_15 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.list = {flex: 1, height: EXPRESSION_FOOTER_HEIGHT};
object2.item = {height: EXPRESSION_FOOTER_HEIGHT, width: EXPRESSION_FOOTER_HEIGHT, justifyContent: 'center',
const CATEGORY_ICON_SIZE = ConstantsModule.CATEGORY_ICON_SIZE;
const EXPRESSION_FOOTER_HEIGHT = ConstantsModule.EXPRESSION_FOOTER_HEIGHT;
const NODE_SIZE = ConstantsModule.NODE_SIZE;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.list = {flex: 1, height: EXPRESSION_FOOTER_HEIGHT};
object.item = {height: EXPRESSION_FOOTER_HEIGHT, width: EXPRESSION_FOOTER_HEIGHT, justifyContent: 'center',
alignItems: 'center'};
object2.itemInner = {'justifyContent': 'center', 'alignItems': 'center', height: NODE_SIZE, width: NODE_SIZE,
object.itemInner = {'justifyContent': 'center', 'alignItems': 'center', height: NODE_SIZE, width: NODE_SIZE,
borderRadius: NODE_SIZE / 2};
object2.fadedItem = {opacity: 0.5};
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object2.activeItem = {opacity: 1, backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE};
object2.guildIcon = {height: CATEGORY_ICON_SIZE, width: CATEGORY_ICON_SIZE, borderRadius: CATEGORY_ICON_SIZE / 2};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.guildItemPlaceholder = {backgroundColor: BACKGROUND_MOD_MUTED};
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_17 = value.memo(_fun84825);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPickerCategories.tsx');
object.fadedItem = {opacity: 0.5};
const INTERACTIVE_BACKGROUND_ACTIVE = (Native).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object.activeItem = {opacity: 1, backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE};
object.guildIcon = {height: CATEGORY_ICON_SIZE, width: CATEGORY_ICON_SIZE, borderRadius: CATEGORY_ICON_SIZE / 2};
const BACKGROUND_MOD_MUTED = (Native).colors.BACKGROUND_MOD_MUTED;
object.guildItemPlaceholder = {backgroundColor: BACKGROUND_MOD_MUTED};
const env0_16 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_17 = ReactModule.memo(_fun84825);
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPickerCategories.tsx');
exports.default = _default_84827;
}
function _fun84825({category, onPressCategory, index, isActive}) { // fn#84825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:826, offset: 0x01f58d6e, size: 768 bytes, params: 2, frame: 29
var r7;
var Icon;
var moduleValue2;
const styles = useStyles();
const AnimateStickers = (UserSettingsModule).AnimateStickers;
const shouldAnimateSticker2 = (StickersUtilsModule).shouldAnimateSticker(AnimateStickers.useSetting(),
false);
const type = category.type;
const StickerCategoryTypes = (require(4785) /* metro dependency 4785: StickersTypes */).StickerCategoryTypes;
const GUILD = StickerCategoryTypes.GUILD;
const r16 = type !== GUILD ? null : GuildStore.getGuild(category.id);
const value6 = env0_4.useCallback(_fun84826, [category, r16, index, onPressCategory]);
const PressableOpacity = (PressablesModule).PressableOpacity;
object = {androidRippleConfig: CATEGORY_ICON_RIPPLE_CONFIG, accessibilityRole: 'tab',
accessibilityLabel: category.name, accessibilityState: {selected: isActive},
disabled: category.stickers.length === 0, onPress: category.stickers.length > 0 ? value6 : undefined,
style: styles.item};
const items2 = [styles.itemInner];
items2[1] = isActive ? styles.activeItem : styles.fadedItem;
if (category.icon != null) {
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {style: styles.guildIcon,
disableColor: category.type === (require(4785) /* metro dependency 4785: StickersTypes */).StickerCategoryTypes.PACK};
moduleValue2 = require(1423) /* metro dependency 1423: AvatarUtils */;
iconProps.source = moduleValue2.makeSource(category.icon);
r7 = <Icon {...iconProps} />;
} else {
r7 = (
category.type === (require(4785) /* metro dependency 4785: StickersTypes */).StickerCategoryTypes.GUILD
? ((Component) => <Component guild={r16} loadingStyle={styles.guildItemPlaceholder} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XSMALL} style={styles.guildIcon} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */)
: ((Component) => <Component sticker={'previewSticker' in category && category.previewSticker != null ? category.previewSticker : category.stickers[0]} animated={shouldAnimateSticker2 && isActive} size={CATEGORY_ICON_SIZE} />)(importDefault(10970) /* metro dependency 10970: Sticker */)
);
}
return (
<PressableOpacity {...object}>
<View style={items2}>
{r7}
</View>
</PressableOpacity>
);
function _fun84826() { // fn#84826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:1060, offset: 0x01f5906e, size: 252 bytes, params: 1, frame: 18
var id;
var defaultImport;
var track;
var EXPRESSION_PICKER_CATEGORY_SELECTED;
var object;
const type = category.type;
const value3 = undefined;
const StickerCategoryTypes = (StickersTypesModule).StickerCategoryTypes;
const PACK = StickerCategoryTypes.PACK;
if (!(type !== PACK && category.type !== StickerCategoryTypes.GUILD)) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
EXPRESSION_PICKER_CATEGORY_SELECTED = AnalyticEvents.EXPRESSION_PICKER_CATEGORY_SELECTED;
object = {};
object.location = {page: AnalyticsPages.EXPRESSION_PICKER};
object.tab = ExpressionPickerViewType.STICKER;
id = category.id;
object.sticker_pack_id = id;
id = Module00057 == null ? value3 : Module00057.id;
object.guild_id = id;
Reflect.apply(track, defaultImport, [EXPRESSION_PICKER_CATEGORY_SELECTED, object]);
}
return onPressCategory == null ? value3 : onPressCategory(index);
}
function _fun84825({category, onPressCategory, index, isActive}) { // fn#84825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:826, offset: 0x01f58d6e, size: 768 bytes, params: 2, frame: 29
var object2;
var r7;
var Icon;
var moduleValue2;
const styles = useStyles();
const AnimateStickers = (require(3829) /* metro dependency 3829: UserSettings */).AnimateStickers;
const shouldAnimateSticker2 = (require(4643) /* metro dependency 4643: StickersUtils */).shouldAnimateSticker(AnimateStickers.useSetting(),
false);
const type = category.type;
const StickerCategoryTypes = (require(4785) /* metro dependency 4785: StickersTypes */).StickerCategoryTypes;
const GUILD = StickerCategoryTypes.GUILD;
const r16 = type !== GUILD ? null : GuildStore.getGuild(category.id);
const value6 = env0_4.useCallback(_fun84826, [category, r16, index, onPressCategory]);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object2 = {androidRippleConfig: CATEGORY_ICON_RIPPLE_CONFIG, accessibilityRole: 'tab',
accessibilityLabel: category.name, accessibilityState: {selected: isActive},
disabled: category.stickers.length === 0, onPress: category.stickers.length > 0 ? value6 : undefined,
style: styles.item};
const items2 = [styles.itemInner];
items2[1] = isActive ? styles.activeItem : styles.fadedItem;
if (category.icon != null) {
Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var iconProps = {style: styles.guildIcon,
disableColor: category.type === (require(4785) /* metro dependency 4785: StickersTypes */).StickerCategoryTypes.PACK};
moduleValue2 = require(1423) /* metro dependency 1423: AvatarUtils */;
iconProps.source = moduleValue2.makeSource(category.icon);
r7 = <Icon {...iconProps} />;
} else {
r7 = category.type === (require(4785) /* metro dependency 4785: StickersTypes */).StickerCategoryTypes.GUILD ? ((Component) => <Component guild={r16} loadingStyle={styles.guildItemPlaceholder} size={(require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes.XSMALL} style={styles.guildIcon} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */) : ((Component) => <Component sticker={'previewSticker' in category && category.previewSticker != null ? category.previewSticker : category.stickers[0]} animated={shouldAnimateSticker2 && isActive} size={CATEGORY_ICON_SIZE} />)(importDefault(10970) /* metro dependency 10970: Sticker */);
}
return (
<PressableOpacity {...object2}>
<View style={items2}>
{r7}
</View>
</PressableOpacity>
);
}
function _default_84827({categories, categoryIndex, style}) { // fn#84827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2070, offset: 0x01f5916a, size: 853 bytes, params: 2, frame: 30
var PressableOpacity;
var object;
var intl;
const styles = useStyles();
const binding = env0_4;
const env0_2 = binding.useRef(undefined);
const value2 = binding.useRef(null);
const env0_3 = value2;
const value3 = binding.useMemo(function() {
return [categories.length];
}, [categories]);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_5 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value6[0];
const env0_7 = value6[1];
const value7 = useStickerPickerStore(function(a0) {
return a0.setPackToScrollTo;
});
binding.useEffect(_fun84830, [categories]);
binding.useEffect(_fun84832, [categoryIndex]);
const value8 = binding.useCallback(_fun84833, [property, property2]);
const value9 = binding.useCallback(_fun84834, [value8]);
const value10 = binding.useCallback(_fun84835, [categories, value7]);
const value11 = binding.useCallback(_fun84836, [property, value10]);
const value12 = binding.useCallback(_fun84837, [value8]);
const value13 = binding.useCallback(_fun84838, [categories, categoryIndex, value10]);
const value14 = (importDefault(8667) /* metro dependency 8667: useExpressionPickerCategoriesPlaceholderConfig */)();
const ExpressionPickerCategories = importDefault(8668) /* metro dependency 8668: ExpressionPickerCategories */;
const FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
const STICKER = ExpressionPickerViewType.STICKER;
const fastestListAndroid = <FastestListAndroid estimatedListSize="windowSize" horizontal itemSize={EXPRESSION_FOOTER_HEIGHT} keyboardShouldPersistTaps="always" listId={STICKER} onLayout={value12} onScroll={value9} placeholderConfig={value14} ref={value2} scrollReporting="callbacks" sections={value3} renderItem={value13} showsHorizontalScrollIndicator={false} style={styles.list} />;
let r5 = property != null && property2;
if (r5) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object = {onPress: value11, accessibilityRole: 'button'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rzCcjK);
r5 = <PressableOpacity {...object}><View style={[styles.item,
styles.fadedItem]}>{((Icon) => <Icon style={styles.guildIcon} source={importDefault(11082) /* metro dependency 11082 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View></PressableOpacity>;
}
return (
<ExpressionPickerCategories portalHostName="expression-footer" style={style}>
{fastestListAndroid}
{r5}
</ExpressionPickerCategories>
);
}
function _fun84826() { // fn#84826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:1060, offset: 0x01f5906e, size: 252 bytes, params: 1, frame: 18
var id;
var defaultImport;
var track;
var EXPRESSION_PICKER_CATEGORY_SELECTED;
var object2;
const type = category.type;
const value3 = undefined;
const StickerCategoryTypes = (require(4785) /* metro dependency 4785: StickersTypes */).StickerCategoryTypes;
const PACK = StickerCategoryTypes.PACK;
if (!(type !== PACK && category.type !== StickerCategoryTypes.GUILD)) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
EXPRESSION_PICKER_CATEGORY_SELECTED = AnalyticEvents.EXPRESSION_PICKER_CATEGORY_SELECTED;
object2 = {};
object2.location = {page: AnalyticsPages.EXPRESSION_PICKER};
object2.tab = ExpressionPickerViewType.STICKER;
id = category.id;
object2.sticker_pack_id = id;
id = env0_3 == null ? value3 : env0_3.id;
object2.guild_id = id;
Reflect.apply(track, defaultImport, [EXPRESSION_PICKER_CATEGORY_SELECTED, object2]);
}
return onPressCategory == null ? value3 : onPressCategory(index);
}
function _fun84830() { // fn#84830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2318, offset: 0x01f594bf, size: 48 bytes, params: 1, frame: 12
const index = categories.findIndex(function({type}) {
return type === require(dependencyMap[12]).StickerCategoryTypes.PACK;
});
if (index >= 0) {
env0_5(index);
}
}
function _fun84832() { // fn#84832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2422, offset: 0x01f59522, size: 132 bytes, params: 1, frame: 12
var categoryIndexBinding;
var value2;
var value3;
if (env0_2.current != null) {
if (env0_3.current != null) {
categoryIndexBinding = categoryIndex;
value2 = environment.__proto__;
value3 = categoryIndexBinding * EXPRESSION_FOOTER_HEIGHT;
if (value3 > env0_2.current.end || value3 < env0_2.current.start) {
env0_3.current.scrollToLocation({'section': 0, 'item': null, 'animated': false, item: categoryIndex});
function _default_84827({categories, categoryIndex, style}) { // fn#84827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2070, offset: 0x01f5916a, size: 853 bytes, params: 2, frame: 30
var PressableOpacity;
var object2;
var intl;
const styles = useStyles();
const binding = env0_4;
const env0_2 = binding.useRef(undefined);
const value2 = binding.useRef(null);
const env0_3 = value2;
const value3 = binding.useMemo(function() {
return [categories.length];
}, [categories]);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [null]);
const binding2 = env0_3;
const value5 = binding2(value4, 2);
const property = value5[0];
const env0_5 = value5[1];
useState = binding.useState;
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property2 = value6[0];
const env0_7 = value6[1];
const value7 = useStickerPickerStore(function(a0) {
return a0.setPackToScrollTo;
});
binding.useEffect(_fun84830, [categories]);
binding.useEffect(_fun84832, [categoryIndex]);
const value8 = binding.useCallback(_fun84833, [property, property2]);
const value9 = binding.useCallback(_fun84834, [value8]);
const value10 = binding.useCallback(_fun84835, [categories, value7]);
const value11 = binding.useCallback(_fun84836, [property, value10]);
const value12 = binding.useCallback(_fun84837, [value8]);
const value13 = binding.useCallback(_fun84838, [categories, categoryIndex, value10]);
const value14 = (UseExpressionPickerCategoriesPlaceholderConfig)();
const STICKER = ExpressionPickerViewType.STICKER;
const fastestListAndroid = (
<FastestListAndroid
estimatedListSize="windowSize"
horizontal
itemSize={EXPRESSION_FOOTER_HEIGHT}
keyboardShouldPersistTaps="always"
listId={STICKER}
onLayout={value12}
onScroll={value9}
placeholderConfig={value14}
ref={value2}
scrollReporting="callbacks"
sections={value3}
renderItem={value13}
showsHorizontalScrollIndicator={false}
style={styles.list}
/>
);
let r5 = property != null && property2;
if (r5) {
PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
object2 = {onPress: value11, accessibilityRole: 'button'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rzCcjK);
r5 = (
<PressableOpacity {...object2}>
<View style={[styles.item, styles.fadedItem]}>
{((Icon) => <Icon style={styles.guildIcon} source={importDefault(11082) /* metro dependency 11082 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</View>
</PressableOpacity>
);
}
return (
<ExpressionPickerCategories portalHostName="expression-footer" style={style}>
{fastestListAndroid}
{r5}
</ExpressionPickerCategories>
);
function _fun84830() { // fn#84830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2318, offset: 0x01f594bf, size: 48 bytes, params: 1, frame: 12
const index = categories.findIndex(function({type}) {
return type === require(dependencyMap[12]).StickerCategoryTypes.PACK;
});
if (index >= 0) {
env0_5(index);
}
}
function _fun84832() { // fn#84832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2422, offset: 0x01f59522, size: 132 bytes, params: 1, frame: 12
var categoryIndexBinding;
var value2;
var value3;
if (env0_2.current != null) {
if (env0_3.current != null) {
categoryIndexBinding = categoryIndex;
value2 = environment.__proto__;
value3 = categoryIndexBinding * EXPRESSION_FOOTER_HEIGHT;
if (value3 > env0_2.current.end || value3 < env0_2.current.start) {
env0_3.current.scrollToLocation({'section': 0, 'item': null, 'animated': false, item: categoryIndex});
}
}
}
}
function _fun84833() { // fn#84833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2600, offset: 0x01f595a6, size: 97 bytes, params: 1, frame: 14
var binding;
var binding2;
var value4;
if (env0_4 != null && env0_2.current != null) {
binding = env0_7;
binding2 = env0_4;
value4 = environment.__proto__;
binding(binding2 * EXPRESSION_FOOTER_HEIGHT > env0_2.current.end - (env0_6 ? 0 : EXPRESSION_FOOTER_HEIGHT));
}
}
function _fun84834(a0) { // fn#84834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2686, offset: 0x01f59607, size: 93 bytes, params: 2, frame: 12
env0_2.current = {start: a0.nativeEvent.contentOffset.x,
end: a0.nativeEvent.contentOffset.x + a0.nativeEvent.layoutMeasurement.width};
(0, ConstantsModule.AnalyticsPages)();
}
function _fun84835(a0) { // fn#84835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2838, offset: 0x01f59664, size: 88 bytes, params: 2, frame: 14
(0, ConstantsModule.AnalyticEvents)(categories[a0].id);
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (HapticFeedbackTypes).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_LIGHT]);
}
function _fun84836() { // fn#84836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2941, offset: 0x01f596bc, size: 43 bytes, params: 1, frame: 12
if (env0_4 != null) {
(0, ConstantsModule.CATEGORY_ICON_RIPPLE_CONFIG)(env0_4);
env0_7(false);
}
}
function _fun84837(a0) { // fn#84837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2994, offset: 0x01f596e7, size: 74 bytes, params: 2, frame: 11
if (env0_2.current == null) {
env0_2.current = {start: 0, end: a0.nativeEvent.layout.width};
(0, ConstantsModule.AnalyticsPages)();
}
}
function _fun84838(a0, a1) { // fn#84838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:3096, offset: 0x01f59731, size: 67 bytes, params: 3, frame: 15
return ((Component) => <Component category={categories[a1]} index={a1} isActive={a1 === categoryIndex} onPressCategory={ConstantsModule.CATEGORY_ICON_RIPPLE_CONFIG} />)(env1_17);
}
}
}
function _fun84833() { // fn#84833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2600, offset: 0x01f595a6, size: 97 bytes, params: 1, frame: 14
var binding;
var binding2;
var value4;
if (env0_4 != null && env0_2.current != null) {
binding = env0_7;
binding2 = env0_4;
value4 = environment.__proto__;
binding(binding2 * EXPRESSION_FOOTER_HEIGHT > env0_2.current.end - (env0_6 ? 0 : EXPRESSION_FOOTER_HEIGHT));
}
}
function _fun84834(a0) { // fn#84834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2686, offset: 0x01f59607, size: 93 bytes, params: 2, frame: 12
env0_2.current = {start: a0.nativeEvent.contentOffset.x,
end: a0.nativeEvent.contentOffset.x + a0.nativeEvent.layoutMeasurement.width};
env0_9();
}
function _fun84835(a0) { // fn#84835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2838, offset: 0x01f59664, size: 88 bytes, params: 2, frame: 14
env0_8(categories[a0].id);
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
}
function _fun84836() { // fn#84836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2941, offset: 0x01f596bc, size: 43 bytes, params: 1, frame: 12
if (env0_4 != null) {
env0_10(env0_4);
env0_7(false);
}
}
function _fun84837(a0) { // fn#84837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:2994, offset: 0x01f596e7, size: 74 bytes, params: 2, frame: 11
if (env0_2.current == null) {
env0_2.current = {start: 0, end: a0.nativeEvent.layout.width};
env0_9();
}
}
function _fun84838(a0, a1) { // fn#84838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11267:3096, offset: 0x01f59731, size: 67 bytes, params: 3, frame: 15
return ((Component) => <Component category={categories[a1]} index={a1} isActive={a1 === categoryIndex} onPressCategory={env0_10} />)(env1_17);
}
global.__d(_fun84824, 11081, [57, 31, 27, 1867, 11052, 661, 1346, 33, 4501, 697, 3829, 4643, 4785, 683, 5278, 1305,
1423, 6819, 10970, 4081, 4082, 8667, 8668, 8671, 1244, 11082,
2]) /* metro module 11081, dependencies: [57, 31, 27, 1867, 11052, 661, 1346, 33, 4501, 697, 3829, 4643, 4785, 683, 5278, 1305, 1423, 6819, 10970, 4081, 4082, 8667, 8668, 8671, 1244, 11082, 2] */;
@@ -1,20 +1,24 @@
/* Metro module 11028; source: modules/stickers/native/StickerPickerConstants.tsx; dependencies: [1346, 4785, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ExpressionPickerConstantsModule from '../../expression_picker/ExpressionPickerConstants.tsx'; /* Metro dependency 1346 */
import * as StickersTypesModule from '../StickersTypes.tsx'; /* Metro dependency 4785 */
function _fun84448(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11214:6, offset: 0x01f4a9e1, size: 294 bytes, params: 8, frame: 22
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(1346) /* metro dependency 1346: ExpressionPickerConstants */;
let value = ExpressionPickerConstantsModule;
const PADDING_VERTICAL = value.PADDING_VERTICAL;
const PADDING_HORIZONTAL = value.PADDING_HORIZONTAL;
const MIN_MARGIN = value.MIN_MARGIN;
value = 2 * PADDING_VERTICAL;
const StickerFormat = (require(4785) /* metro dependency 4785: StickersTypes */).StickerFormat;
const StickerFormat = (StickersTypesModule).StickerFormat;
const GIF = StickerFormat.GIF;
items = [GIF];
items2 = [GIF];
const PNG = StickerFormat.PNG;
items[1] = PNG;
items2[1] = PNG;
const APNG = StickerFormat.APNG;
items[2] = APNG;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPickerConstants.tsx');
items2[2] = APNG;
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPickerConstants.tsx');
exports.PADDING_HORIZONTAL = PADDING_HORIZONTAL;
exports.PADDING_VERTICAL = PADDING_VERTICAL;
exports.MIN_MARGIN = MIN_MARGIN;
@@ -26,6 +30,7 @@ function _fun84448(global, require, importDefault, importAll, module, exports, d
exports.STICKER_PICKER_PADDING = 100;
exports.STICKER_SCROLL_LOAD_DELAY_MS = 250;
exports.STICKER_SCROLL_LOAD_DELAY_AFTER_HEIGHT_CHANGE_MS = 750;
exports.STICKER_FORMATS = items;
exports.STICKER_FORMATS = items2;
}
global.__d(_fun84448, 11028, [1346, 4785, 2]) /* metro module 11028, dependencies: [1346, 4785, 2] */;
@@ -1,101 +1,144 @@
/* Metro module 11075; source: modules/stickers/native/StickerPickerEmptyState.tsx; dependencies: [57, 31, 27, 6583, 3832, 661, 1880, 33, 4501, 11049, 10970, 6771, 6789, 566, 683, 4573, 1244, 5278, 4081, 4082, 4578, 5475, 7938, 11069, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import HapticFeedbackTypes from '../../haptics/HapticFeedbackTypes.tsx'; /* Metro dependency 4082 */
import StickersStore from '../StickersStore.tsx'; /* Metro dependency 6583 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as StickersConstantsModule from '../StickersConstants.tsx'; /* Metro dependency 3832 */
import * as HapticUtilsNativeModule from '../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as StickersHooksModule from '../StickersHooks.tsx'; /* Metro dependency 11049 */
function _fun84775(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:6, offset: 0x01f56f0f, size: 419 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
const env0_7 = (require(3832) /* metro dependency 3832: StickersConstants */).EMPTY_STATE_STICKERS;
let value = require(661) /* metro dependency 661: Constants */;
let value = ConstantsModule;
const env0_8 = value.AnalyticEvents;
const env0_9 = value.AnalyticsSections;
const env0_10 = (require(1880) /* metro dependency 1880: PremiumConstants */).PremiumUpsellTypes;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'marginBottom': 8,
const env0_13 = (CreateStylesModule).createStyles({header: {'marginBottom': 8,
'textAlign': 'center'}, blurb: {'lineHeight': 18, 'textAlign': 'center', 'marginBottom': 12},
premiumButton: {'marginTop': 20, 'alignSelf': 'center', 'paddingLeft': 5, 'paddingRight': 10, 'flexGrow': 0},
nitroWheel: {width: 32}, stickersRow: {'flexDirection': 'row', 'alignSelf': 'center'},
sticker: {paddingHorizontal: 2}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPickerEmptyState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPickerEmptyState.tsx');
exports.default = _default_84777;
function EmptyStateSticker({sticker, isFocused}) { // fn#84776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:617, offset: 0x01f570b2, size: 115 bytes, params: 2, frame: 17
return ((Component) => <Component sticker={sticker} size={60} animated={(require(11049) /* metro dependency 11049: StickersHooks */).useShouldAnimateSticker(isFocused)} key={sticker?.id} />)(importDefault(10970) /* metro dependency 10970: Sticker */);
}
function _default_84777() { // fn#84777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:766, offset: 0x01f57125, size: 679 bytes, params: 1, frame: 27
const styles = useStyles();
(StickersHooksModule).useFetchStickerPacks();
let defaultImport = UseAnalyticsLocations;
const EMPTY_STATE = (AnalyticsLocation).EMPTY_STATE;
const analyticsLocations = defaultImport(EMPTY_STATE).analyticsLocations;
const value2 = (FluxModule).useStateFromStoresArray([StickersStore], _fun84778);
const [env0_2, env0_3] = env0_3Binding(ReactModule.useState(null), 2);
ReactModule.useEffect(function() {
var defaultImport = importDefault(dependencyMap[14]);
var PREMIUM_UPSELL_VIEWED = AnalyticEvents.PREMIUM_UPSELL_VIEWED;
defaultImport.track(PREMIUM_UPSELL_VIEWED, {type: PremiumUpsellTypes.EMPTY_STICKER_PICKER_UPSELL,
source: {section: AnalyticsSections.EMPTY_STICKER_PICKER_UPSELL}, location_stack: analyticsLocations});
}, [analyticsLocations]);
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const HEm04J = (require(1244) /* metro dependency 1244: indexNative */).t.HEm04J;
const items2 = [
<Text
style={styles.header}
accessibilityRole="header"
variant="heading-lg/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [HEm04J])}
</Text>,
];
string = intl.string;
const FnNud4 = (require(1244) /* metro dependency 1244: indexNative */).t.FnNud4;
items2[1] = (
<Text
style={styles.blurb}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [FnNud4])}
</Text>
);
items2[2] = (
<View style={styles.stickersRow}>
{value2.map(_fun84782)}
</View>
);
const Button = (ButtonNativeModule).Button;
items2[3] = (
<View style={styles.premiumButton}>
<Button
icon={((Component) => <Component source={importDefault(7938) /* metro dependency 7938 */} style={styles.nitroWheel} resizeMode="contain" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pj0XBN)}
variant="active"
size="sm"
onPress={function() {
return importDefault(dependencyMap[23])({section: AnalyticsSections.EXPRESSION_PICKER});
}}
/>
</View>
);
return (
<View>
{items2}
</View>
);
function _fun84778() { // fn#84778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:908, offset: 0x01f573cc, size: 45 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
return EMPTY_STATE_STICKERS.map(function(a0) {
return StickersStore.getStickerById(a0);
}).filter(function(a0) {
return a0 != null;
});
}
function _fun84782(a0) { // fn#84782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:1543, offset: 0x01f57471, size: 145 bytes, params: 2, frame: 19
const env0_0 = a0;
const value2 = undefined;
const PressableOpacity = (PressablesModule).PressableOpacity;
return (
<PressableOpacity
accessible={false}
onLongPress={onLongPress_84783}
style={styles.sticker}
key={a0 == null ? value2 : a0.id}
>
<EmptyStateSticker sticker={a0} isFocused={env0_2 === a0.id} />
</PressableOpacity>
);
function onLongPress_84783() { // fn#84783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:1601, offset: 0x01f57502, size: 84 bytes, params: 1, frame: 14
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (HapticFeedbackTypes).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_LIGHT]);
env1_3(env0_0.id);
}
}
}
}
function EmptyStateSticker({sticker, isFocused}) { // fn#84776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:617, offset: 0x01f570b2, size: 115 bytes, params: 2, frame: 17
return ((Component) => <Component sticker={sticker} size={60} animated={(require(11049) /* metro dependency 11049: StickersHooks */).useShouldAnimateSticker(isFocused)} key={sticker?.id} />)(importDefault(10970) /* metro dependency 10970: Sticker */);
}
function _default_84777() { // fn#84777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:766, offset: 0x01f57125, size: 679 bytes, params: 1, frame: 27
const styles = useStyles();
(require(11049) /* metro dependency 11049: StickersHooks */).useFetchStickerPacks();
let defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const EMPTY_STATE = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).EMPTY_STATE;
const analyticsLocations = defaultImport(EMPTY_STATE).analyticsLocations;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([StickersStore], _fun84778);
const binding = env0_4;
const [env0_2, env0_3] = env0_3Binding(binding.useState(null), 2);
binding.useEffect(function() {
var defaultImport = importDefault(dependencyMap[14]);
var PREMIUM_UPSELL_VIEWED = AnalyticEvents.PREMIUM_UPSELL_VIEWED;
defaultImport.track(PREMIUM_UPSELL_VIEWED, {type: PremiumUpsellTypes.EMPTY_STICKER_PICKER_UPSELL,
source: {section: AnalyticsSections.EMPTY_STICKER_PICKER_UPSELL}, location_stack: analyticsLocations});
}, [analyticsLocations]);
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const HEm04J = (require(1244) /* metro dependency 1244: indexNative */).t.HEm04J;
const items2 = [<Text style={styles.header} accessibilityRole="header" variant="heading-lg/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [HEm04J])}</Text>];
string = intl.string;
const FnNud4 = (require(1244) /* metro dependency 1244: indexNative */).t.FnNud4;
items2[1] = <Text style={styles.blurb} variant="text-sm/medium" color="text-default">{Reflect.apply(string, intl,
[FnNud4])}</Text>;
items2[2] = <View style={styles.stickersRow}>{value2.map(_fun84782)}</View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items2[3] = <View style={styles.premiumButton}><Button icon={((Component) => <Component source={importDefault(7938) /* metro dependency 7938 */} style={styles.nitroWheel} resizeMode="contain" />)(importDefault(5475) /* metro dependency 5475: FastImage */)} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pj0XBN)} variant="active" size="sm" onPress={function() {
return importDefault(dependencyMap[23])({section: AnalyticsSections.EXPRESSION_PICKER});
}} /></View>;
return (
<View>
{items2}
</View>
);
}
function _fun84778() { // fn#84778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:908, offset: 0x01f573cc, size: 45 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
return EMPTY_STATE_STICKERS.map(function(a0) {
return StickersStore.getStickerById(a0);
}).filter(function(a0) {
return a0 != null;
});
}
function _fun84782(a0) { // fn#84782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:1543, offset: 0x01f57471, size: 145 bytes, params: 2, frame: 19
const env0_0 = a0;
const value2 = undefined;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
return (
<PressableOpacity
accessible={false}
onLongPress={onLongPress_84783}
style={styles.sticker}
key={a0 == null ? value2 : a0.id}
>
<EmptyStateSticker sticker={a0} isFocused={env0_2 === a0.id} />
</PressableOpacity>
);
}
function onLongPress_84783() { // fn#84783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:1601, offset: 0x01f57502, size: 84 bytes, params: 1, frame: 14
const hapticUtilsNativeModule = require(4081) /* metro dependency 4081: HapticUtilsNative */;
const triggerHapticFeedback = hapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, hapticUtilsNativeModule, [IMPACT_LIGHT]);
env1_3(env0_0.id);
}
global.__d(_fun84775, 11075, [57, 31, 27, 6583, 3832, 661, 1880, 33, 4501, 11049, 10970, 6771, 6789, 566, 683, 4573,
1244, 5278, 4081, 4082, 4578, 5475, 7938, 11069,
2]) /* metro module 11075, dependencies: [57, 31, 27, 6583, 3832, 661, 1880, 33, 4501, 11049, 10970, 6771, 6789, 566, 683, 4573, 1244, 5278, 4081, 4082, 4578, 5475, 7938, 11069, 2] */;
@@ -1,319 +1,364 @@
/* Metro module 11076; source: modules/stickers/native/StickerPickerList.tsx; dependencies: [57, 31, 27, 6583, 11052, 11028, 33, 4501, 697, 1305, 11077, 4573, 1244, 4785, 8577, 566, 11078, 11063, 22, 7700, 11079, 8671, 5466, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import StickersStore from '../StickersStore.tsx'; /* Metro dependency 6583 */
import UseExpressionPickerListWidthNative from '../../expression_picker/native/useExpressionPickerListWidth.native.tsx'; /* Metro dependency 8577 */
import Module11077 from '../../../by-id/module-11077.js'; /* Metro dependency 11077 */
import UseStickerPickerListData from './useStickerPickerListData.tsx'; /* Metro dependency 11078 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as StickersTypesModule from '../StickersTypes.tsx'; /* Metro dependency 4785 */
import * as FastestListPropsPlaceholderModule from '../../fastest_list/props/FastestListPropsPlaceholder.tsx'; /* Metro dependency 7700 */
import * as StickerPickerConstantsModule from './StickerPickerConstants.tsx'; /* Metro dependency 11028 */
import * as StickerPickerStoreModule from './StickerPickerStore.tsx'; /* Metro dependency 11052 */
function _fun84785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:6, offset: 0x01f57587, size: 565 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const stickersStore = importDefault(6583) /* metro dependency 6583: StickersStore */;
const env0_7 = (require(11052) /* metro dependency 11052: StickerPickerStore */).useStickerPickerStore;
const stickerPickerConstantsModule = require(11028) /* metro dependency 11028: StickerPickerConstants */;
const env0_8 = stickerPickerConstantsModule.STICKER_SCROLL_LOAD_DELAY_MS;
const env0_9 = stickerPickerConstantsModule.STICKER_SCROLL_LOAD_DELAY_AFTER_HEIGHT_CHANGE_MS;
const env0_10 = stickerPickerConstantsModule.STICKER_SIZE;
const value3 = require(33) /* metro dependency 33 */;
const env0_11 = value3.jsx;
const env0_12 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED;
object2.listPlaceholder = {color: BACKGROUND_MOD_MUTED};
object.listPlaceholder = {color: BACKGROUND_MOD_MUTED};
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.section = {'justifyContent': 'center', 'overflow': 'hidden', backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
object.section = {'justifyContent': 'center', 'overflow': 'hidden', backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
const MOBILE_EXPRESSION_PICKER_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_EXPRESSION_PICKER_BACKGROUND_DEFAULT;
object2.sectionSticker = {backgroundColor: MOBILE_EXPRESSION_PICKER_BACKGROUND_DEFAULT};
const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'borderRadius': null,
object.sectionSticker = {backgroundColor: MOBILE_EXPRESSION_PICKER_BACKGROUND_DEFAULT};
const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'borderRadius': null,
'marginLeft': 12, 'marginRight': 12};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_MOD_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_NORMAL;
object3.backgroundColor = BACKGROUND_MOD_NORMAL;
object2.nsfwContainer = object3;
object2.nsfwText = {'marginLeft': 4, 'textAlign': 'center'};
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
object4.backgroundColor = BACKGROUND_MOD_NORMAL;
object.nsfwContainer = object4;
object.nsfwText = {'marginLeft': 4, 'textAlign': 'center'};
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const env0_14 = value.memo(_fun84786);
const env0_15 = value.memo(_fun84787);
const env0_16 = value.memo(_fun84788);
value = value.memo(_fun84789);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPickerList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPickerList.tsx');
exports.default = value;
}
function _fun84786({height}) { // fn#84786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:859, offset: 0x01f577bc, size: 272 bytes, params: 2, frame: 22
const styles = useStyles();
const items2 = [styles.nsfwContainer];
items2[1] = {height: height};
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(11077) /* metro dependency 11077 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
iconProps.size = SMALL;
const icon = <Icon {...iconProps} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={items2}>
{icon}
<Text
style={styles.nsfwText}
variant="text-sm/normal"
color="interactive-text-active"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uy25Qz)}
</Text>
</View>
);
}
function _fun84787({height, label, sectionStyle}) { // fn#84787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:1170, offset: 0x01f578cc, size: 135 bytes, params: 2, frame: 19
const styles = useStyles();
const items2 = [styles.section, sectionStyle];
items2[2] = {height: height};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={items2}>
<Text
lineClamp={1}
color="interactive-text-default"
variant="heading-sm/semibold"
>
{label}
</Text>
</View>
);
}
function _fun84789({bottomSheetRef, bottomSheetIndex, setCategoryIndex, searchResults, onPressSticker, onLongPressStickerDetail, insetBottom, insetTop, channel, inPortalKeyboard, stickerFormats}) { // fn#84789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:1461, offset: 0x01f5797c, size: 1227 bytes, params: 2, frame: 41
var r0;
const StickerFormat = (require(4785) /* metro dependency 4785: StickersTypes */).StickerFormat;
var FastestListAndroid;
var intl;
const env0_3 = onPressSticker;
const env0_4 = onLongPressStickerDetail;
insetBottom = insetBottom === undefined ? 0 : insetBottom;
insetTop = insetTop === undefined ? 0 : insetTop;
inPortalKeyboard = !(inPortalKeyboard === undefined) && inPortalKeyboard;
const r9 = stickerFormats !== undefined ? stickerFormats : [StickerFormat.PNG, StickerFormat.APNG,
StickerFormat.LOTTIE, StickerFormat.GIF];
const binding = env0_4;
const value7 = binding.useRef(null);
const styles = useStyles();
const [property, env0_10] = env0_3(binding.useState(null), 2);
const value10 = (importDefault(8577) /* metro dependency 8577: useExpressionPickerListWidthNative */)(inPortalKeyboard);
const hasLoadedStickerPacks = (require(566) /* metro dependency 566: flux */).useStateFromStores([StickersStore],
function() {
return StickersStore.hasLoadedStickerPacks;
});
const value12 = binding.useMemo(function() {
var env0_0 = {scrollTo: -1};
var env0_1 = _fun84793;
return {scroll: _fun84794, cancel: _fun84796};
}, [setCategoryIndex, useStickerPickerStore(function(a0) {
return a0.setPackToScrollTo;
}), bottomSheetRef]);
const value13 = (importDefault(11078) /* metro dependency 11078: useStickerPickerListData */)({channel: channel,
containerWidth: value10, searchResults: searchResults, stickerFormats: r9});
const sections = value13.sections;
const sectionHeights = value13.sectionHeights;
const sectionSize = value13.sectionSize;
const sectionFooterSize = value13.sectionFooterSize;
const sectionLabels = value13.sectionLabels;
const rowsBySection = value13.rowsBySection;
const rowHeight = value13.rowHeight;
const rowSize = value13.rowSize;
binding.useEffect(_fun84797, [inPortalKeyboard, bottomSheetIndex, hasLoadedStickerPacks,
value13.packToScrollToIndex, value12]);
const value14 = binding.useCallback(_fun84799, [sectionLabels, sectionSize, styles.sectionSticker]);
const value15 = binding.useCallback(_fun84800, [sectionFooterSize]);
const value16 = binding.useCallback(_fun84801, [channel, value10, property, onLongPressStickerDetail,
onPressSticker, rowHeight, rowSize, rowsBySection]);
const {onScroll, setCategory} = binding.useMemo(_fun84802, [setCategoryIndex, sectionHeights]);
const value18 = binding.useMemo(_fun84805, [styles, rowSize]);
binding.useEffect(function() {
return _fun84807;
}, [setCategory]);
binding.useEffect(function() {
return _fun84809;
}, [value12]);
if (searchResults?.length === 0) {
r0 = ((Component) => <Component inActionSheet insetTop={insetTop} insetBottom={insetBottom} />)(importDefault(11079) /* metro dependency 11079: StickerPickerListEmptyState */);
} else {
FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = <FastestListAndroid accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nf1s3u)} estimatedListSize={(require(5466) /* metro dependency 5466: useCustomKeyboardHeight */).getCustomKeyboardHeight()} inActionSheet insetEnd={insetBottom} insetStart={insetTop} itemSize={rowHeight} keyboardShouldPersistTaps="always" listId="sticker-picker-list" onScroll={onScroll} placeholderConfig={value18} renderItem={value16} renderSectionHeader={value14} renderSectionFooter={value15} ref={value7} scrollReporting="callbacks" sections={sections} sectionHeaderSize={sectionSize} sectionFooterSize={sectionFooterSize} />;
function _fun84786({height}) { // fn#84786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:859, offset: 0x01f577bc, size: 272 bytes, params: 2, frame: 22
const styles = useStyles();
const items2 = [styles.nsfwContainer];
items2[1] = {height: height};
const Icon = (NativeModule).Icon;
const iconProps = {source: Module11077};
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
iconProps.size = SMALL;
const icon = <Icon {...iconProps} />;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={items2}>
{icon}
<Text
style={styles.nsfwText}
variant="text-sm/normal"
color="interactive-text-active"
>
{intl.string((IndexNativeModule).t.uy25Qz)}
</Text>
</View>
);
}
return r0;
}
function _fun84792() { // fn#84792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:1972, offset: 0x01f57e61, size: 58 bytes, params: 1, frame: 3
const object = {scrollTo: -1};
return {scroll: scroll, cancel: function() {
return scrollToCancel;
}};
}
function _fun84787({height, label, sectionStyle}) { // fn#84787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:1170, offset: 0x01f578cc, size: 135 bytes, params: 2, frame: 19
const styles = useStyles();
const items2 = [styles.section, sectionStyle];
items2[2] = {height: height};
const Text = (TextModule).Text;
return (
<View style={items2}>
<Text
lineClamp={1}
color="interactive-text-default"
variant="heading-sm/semibold"
>
{label}
</Text>
</View>
);
}
function _fun84797() { // fn#84797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2566, offset: 0x01f57f71, size: 144 bytes, params: 1, frame: 13
var environment;
var binding;
var scroll;
if (packToScrollToIndex != null && hasLoadedStickerPacks) {
if (inPortalKeyboard) {
if (bottomSheetIndex.get() < 1) {
binding = env0_14;
scroll = binding.scroll;
value = environment.__proto__;
Reflect.apply(scroll, binding, [{index: packToScrollToIndex,
delay: STICKER_SCROLL_LOAD_DELAY_AFTER_HEIGHT_CHANGE_MS, expand: true}]);
} else {
binding = env0_14;
scroll = binding.scroll;
value = environment.__proto__;
Reflect.apply(scroll, binding, [{index: packToScrollToIndex, delay: STICKER_SCROLL_LOAD_DELAY_MS}]);
}
function _fun84788({height}) { // fn#84788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:1396, offset: 0x01f57953, size: 41 bytes, params: 2, frame: 14
return <View style={{height: height}} />;
}
function _fun84789({bottomSheetRef, bottomSheetIndex, setCategoryIndex, searchResults, onPressSticker, onLongPressStickerDetail, insetBottom, insetTop, channel, inPortalKeyboard, stickerFormats}) { // fn#84789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:1461, offset: 0x01f5797c, size: 1227 bytes, params: 2, frame: 41
var r0;
const StickerFormat = (StickersTypesModule).StickerFormat;
var FastestListAndroid;
var intl;
const onPressSticker2 = onPressSticker;
const onLongPressStickerDetail2 = onLongPressStickerDetail;
insetBottom = insetBottom === undefined ? 0 : insetBottom;
insetTop = insetTop === undefined ? 0 : insetTop;
inPortalKeyboard = !(inPortalKeyboard === undefined) && inPortalKeyboard;
const r9 = stickerFormats !== undefined ? stickerFormats : [StickerFormat.PNG, StickerFormat.APNG,
StickerFormat.LOTTIE, StickerFormat.GIF];
const binding = onLongPressStickerDetail2;
const value7 = binding.useRef(null);
const styles = useStyles();
const [property, env0_10] = onPressSticker2(binding.useState(null), 2);
const value10 = (UseExpressionPickerListWidthNative)(inPortalKeyboard);
const hasLoadedStickerPacks = (require(566) /* metro dependency 566: flux */).useStateFromStores([StickersStore],
function() {
return StickersStore.hasLoadedStickerPacks;
});
const value12 = binding.useMemo(function() {
var env0_0 = {scrollTo: -1};
var env0_1 = _fun84793;
return {scroll: _fun84794, cancel: _fun84796};
}, [setCategoryIndex, useStickerPickerStore(function(a0) {
return a0.setPackToScrollTo;
}), bottomSheetRef]);
const value13 = (UseStickerPickerListData)({channel: channel,
containerWidth: value10, searchResults: searchResults, stickerFormats: r9});
const sections = value13.sections;
const sectionHeights = value13.sectionHeights;
const sectionSize = value13.sectionSize;
const sectionFooterSize = value13.sectionFooterSize;
const sectionLabels = value13.sectionLabels;
const rowsBySection = value13.rowsBySection;
const rowHeight = value13.rowHeight;
const rowSize = value13.rowSize;
binding.useEffect(_fun84797, [inPortalKeyboard, bottomSheetIndex, hasLoadedStickerPacks,
value13.packToScrollToIndex, value12]);
const value14 = binding.useCallback(_fun84799, [sectionLabels, sectionSize, styles.sectionSticker]);
const value15 = binding.useCallback(_fun84800, [sectionFooterSize]);
const value16 = binding.useCallback(_fun84801, [channel, value10, property, onLongPressStickerDetail,
onPressSticker, rowHeight, rowSize, rowsBySection]);
const {onScroll, setCategory} = binding.useMemo(_fun84802, [setCategoryIndex, sectionHeights]);
const value18 = binding.useMemo(_fun84805, [styles, rowSize]);
binding.useEffect(function() {
return _fun84807;
}, [setCategory]);
binding.useEffect(function() {
return _fun84809;
}, [value12]);
if (searchResults?.length === 0) {
r0 = ((Component) => <Component inActionSheet insetTop={insetTop} insetBottom={insetBottom} />)(importDefault(11079) /* metro dependency 11079: StickerPickerListEmptyState */);
} else {
binding = env0_14;
scroll = binding.scroll;
value = environment.__proto__;
Reflect.apply(scroll, binding, [{index: packToScrollToIndex, delay: STICKER_SCROLL_LOAD_DELAY_MS}]);
FastestListAndroid = importDefault(8671) /* metro dependency 8671: FastestListAndroid */;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r0 = (
<FastestListAndroid
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nf1s3u)}
estimatedListSize={(require(5466) /* metro dependency 5466: useCustomKeyboardHeight */).getCustomKeyboardHeight()}
inActionSheet
insetEnd={insetBottom}
insetStart={insetTop}
itemSize={rowHeight}
keyboardShouldPersistTaps="always"
listId="sticker-picker-list"
onScroll={onScroll}
placeholderConfig={value18}
renderItem={value16}
renderSectionHeader={value14}
renderSectionFooter={value15}
ref={value7}
scrollReporting="callbacks"
sections={sections}
sectionHeaderSize={sectionSize}
sectionFooterSize={sectionFooterSize}
/>
);
}
}
return _fun84798;
}
return r0;
function _fun84792() { // fn#84792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:1972, offset: 0x01f57e61, size: 58 bytes, params: 1, frame: 3
const object = {scrollTo: -1};
return {scroll: scroll, cancel: function() {
return scrollToCancel;
}};
function scrollToCancel() { // fn#84793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2012, offset: 0x01f57e9b, size: 30 bytes, params: 1, frame: 11
return global.clearTimeout(env0_0.scrollTo);
}
function _fun84799(a0) { // fn#84799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2717, offset: 0x01f58016, size: 64 bytes, params: 2, frame: 14
return ((Component) => <Component label={sectionLabels[a0]} sectionStyle={styles.sectionSticker} height={sectionSize} />)(env1_15);
}
function _fun84800() { // fn#84800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2836, offset: 0x01f58056, size: 34 bytes, params: 1, frame: 13
return ((Component) => <Component height={sectionFooterSize} />)(env1_16);
}
function _fun84801(a0, a1) { // fn#84801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2879, offset: 0x01f58078, size: 246 bytes, params: 3, frame: 18
let property = rowsBySection[a0];
if (property != null) {
var type = property.type;
var StickerPickerSectionType = (require(11078) /* metro dependency 11078: useStickerPickerListData */).StickerPickerSectionType;
var STICKERS = StickerPickerSectionType.STICKERS;
if (STICKERS === type) {
property = property.stickersByRow[a1];
return ((Component) => <Component containerWidth={env0_11} stickers={property} rowSize={rowSize} onPressSticker={onPressSticker} onLongPressStickerDetail={onLongPressStickerDetail} focusedSticker={env0_9} setFocusedSticker={env0_10} channel={channel} />)(importDefault(11063) /* metro dependency 11063: StickerPickerListRow */);
}
StickerPickerSectionType = (require(11078) /* metro dependency 11078: useStickerPickerListData */).StickerPickerSectionType;
var NSFW = StickerPickerSectionType.NSFW;
if (NSFW === type) {
return ((Component) => <Component height={rowHeight} />)(env1_14);
}
}
return null;
}
function _fun84802() { // fn#84802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:3282, offset: 0x01f5816e, size: 74 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.debounce(function(a0) {
var r3;
var r4;
var r2;
var value3;
var value4;
var sectionHeightsBinding = sectionHeights;
var value2 = 0;
if (value2 < sectionHeightsBinding.length) {
if (a0 >= sectionHeights[value2]) {
r3 = value2;
r4 = value2;
while (true) {
value3 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (!(value4 < sectionHeights.length)) {
r2 = value3;
break;
function scroll({index, delay, expand}) { // fn#84794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2055, offset: 0x01f57eb9, size: 115 bytes, params: 2, frame: 16
var environment;
var value2;
var current;
const index2 = index;
scrollToCancel();
if (expand) {
value2 = environment.__proto__;
current = bottomSheetRef.current;
if (current != null) {
current.expandActionSheet();
}
if (a0 >= sectionHeights[value4]) {
r3 = value4;
r4 = value3;
continue;
}
r2 = value3;
break;
}
} else {
r2 = value2;
index2.scrollTo = global.setTimeout(_fun84795, delay);
setCategoryIndex(index);
function _fun84795() { // fn#84795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2182, offset: 0x01f57f2c, size: 69 bytes, params: 1, frame: 14
const current = env2_7.current;
if (current != null) {
current.scrollToLocation({'section': null, 'item': 0, 'animated': true, section: index});
}
env2_13(null);
}
}
} else {
r2 = value2;
function cancel_84796() { // fn#84796, offset: 0x00c38205, size: 9 bytes, params: 1, frame: 1
return scrollToCancel;
}
}
setCategoryIndex(r2);
}, 100);
return {onScroll: onScroll_84804, setCategory: value};
}
function _fun84805() { // fn#84805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:3596, offset: 0x01f58273, size: 222 bytes, params: 1, frame: 19
const object = {};
const FastestListPropsPlaceholderType = (require(7700) /* metro dependency 7700: FastestListPropsPlaceholder */).FastestListPropsPlaceholderType;
let SHAPE = FastestListPropsPlaceholderType.SHAPE;
object.type = SHAPE;
object.colorHex = styles.listPlaceholder.color;
object.shape = 'rect';
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.paddingVertical = PX_4;
SHAPE = FastestListPropsPlaceholderType.SHAPE;
return {sectionHeader: object, sectionItem: {type: SHAPE, colorHex: styles.listPlaceholder.color, shape: 'circle',
shapeCount: rowSize, width: STICKER_SIZE, height: STICKER_SIZE}};
}
function _fun84797() { // fn#84797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2566, offset: 0x01f57f71, size: 144 bytes, params: 1, frame: 13
var environment;
var binding;
var scroll;
if (packToScrollToIndex != null && hasLoadedStickerPacks) {
if (inPortalKeyboard) {
if (bottomSheetIndex.get() < 1) {
binding = env0_14;
scroll = binding.scroll;
value = environment.__proto__;
Reflect.apply(scroll, binding, [{index: packToScrollToIndex,
delay: STICKER_SCROLL_LOAD_DELAY_AFTER_HEIGHT_CHANGE_MS, expand: true}]);
} else {
binding = env0_14;
scroll = binding.scroll;
value = environment.__proto__;
Reflect.apply(scroll, binding, [{index: packToScrollToIndex, delay: STICKER_SCROLL_LOAD_DELAY_MS}]);
}
} else {
binding = env0_14;
scroll = binding.scroll;
value = environment.__proto__;
Reflect.apply(scroll, binding, [{index: packToScrollToIndex, delay: STICKER_SCROLL_LOAD_DELAY_MS}]);
}
}
return _fun84798;
function _fun84798() { // fn#84798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2664, offset: 0x01f58001, size: 21 bytes, params: 1, frame: 9
env1_14.cancel();
}
function _fun84806() { // fn#84806, offset: 0x01f58351, size: 11 bytes, params: 1, frame: 1
return function() {
return setCategory.cancel();
};
}
function _fun84808() { // fn#84808, offset: 0x01f5836f, size: 11 bytes, params: 1, frame: 1
return _fun84809;
}
function scrollToCancel() { // fn#84793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2012, offset: 0x01f57e9b, size: 30 bytes, params: 1, frame: 11
return global.clearTimeout(env0_0.scrollTo);
}
function scroll({index, delay, expand}) { // fn#84794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2055, offset: 0x01f57eb9, size: 115 bytes, params: 2, frame: 16
var environment;
var value2;
var current;
const env0_0 = index;
scrollToCancel();
if (expand) {
value2 = environment.__proto__;
current = bottomSheetRef.current;
if (current != null) {
current.expandActionSheet();
}
function _fun84799(a0) { // fn#84799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2717, offset: 0x01f58016, size: 64 bytes, params: 2, frame: 14
return ((Component) => <Component label={sectionLabels[a0]} sectionStyle={styles.sectionSticker} height={sectionSize} />)(env1_15);
}
function _fun84800() { // fn#84800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2836, offset: 0x01f58056, size: 34 bytes, params: 1, frame: 13
return ((Component) => <Component height={sectionFooterSize} />)(env1_16);
}
function _fun84801(a0, a1) { // fn#84801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2879, offset: 0x01f58078, size: 246 bytes, params: 3, frame: 18
let property = rowsBySection[a0];
if (property != null) {
var type = property.type;
var StickerPickerSectionType = (require(11078) /* metro dependency 11078: useStickerPickerListData */).StickerPickerSectionType;
var STICKERS = StickerPickerSectionType.STICKERS;
if (STICKERS === type) {
property = property.stickersByRow[a1];
return ((Component) => <Component containerWidth={JsxRuntimeModule.jsx} stickers={property} rowSize={rowSize} onPressSticker={onPressSticker} onLongPressStickerDetail={onLongPressStickerDetail} focusedSticker={StickerPickerConstantsModule.STICKER_SCROLL_LOAD_DELAY_AFTER_HEIGHT_CHANGE_MS} setFocusedSticker={env0_10} channel={channel} />)(importDefault(11063) /* metro dependency 11063: StickerPickerListRow */);
}
StickerPickerSectionType = (require(11078) /* metro dependency 11078: useStickerPickerListData */).StickerPickerSectionType;
var NSFW = StickerPickerSectionType.NSFW;
if (NSFW === type) {
return ((Component) => <Component height={rowHeight} />)(env1_14);
}
}
return null;
}
function _fun84802() { // fn#84802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:3282, offset: 0x01f5816e, size: 74 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
value = value.debounce(function(a0) {
var r3;
var r4;
var r2;
var value3;
var value4;
var sectionHeightsBinding = sectionHeights;
var value2 = 0;
if (value2 < sectionHeightsBinding.length) {
if (a0 >= sectionHeights[value2]) {
r3 = value2;
r4 = value2;
while (true) {
value3 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
value4 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
if (!(value4 < sectionHeights.length)) {
r2 = value3;
break;
}
if (a0 >= sectionHeights[value4]) {
r3 = value4;
r4 = value3;
continue;
}
r2 = value3;
break;
}
} else {
r2 = value2;
}
} else {
r2 = value2;
}
setCategoryIndex(r2);
}, 100);
return {onScroll: onScroll_84804, setCategory: value};
function onScroll_84804(a0) { // fn#84804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:3389, offset: 0x01f5821c, size: 87 bytes, params: 2, frame: 12
env0_0(a0.nativeEvent.contentOffset.y);
a0.nativeEvent.layoutMeasurement.height;
a0.nativeEvent.contentOffset.y;
a0.nativeEvent.contentSize.height;
}
}
function _fun84805() { // fn#84805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:3596, offset: 0x01f58273, size: 222 bytes, params: 1, frame: 19
const object2 = {};
const FastestListPropsPlaceholderType = (FastestListPropsPlaceholderModule).FastestListPropsPlaceholderType;
let SHAPE = FastestListPropsPlaceholderType.SHAPE;
object2.type = SHAPE;
object2.colorHex = styles.listPlaceholder.color;
object2.shape = 'rect';
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object2.paddingVertical = PX_4;
SHAPE = FastestListPropsPlaceholderType.SHAPE;
return {sectionHeader: object2, sectionItem: {type: SHAPE, colorHex: styles.listPlaceholder.color, shape: 'circle',
shapeCount: rowSize, width: STICKER_SIZE, height: STICKER_SIZE}};
}
function _fun84806() { // fn#84806, offset: 0x01f58351, size: 11 bytes, params: 1, frame: 1
return function() {
return setCategory.cancel();
};
function _fun84807() { // fn#84807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:3961, offset: 0x01f5835c, size: 19 bytes, params: 1, frame: 9
return setCategory.cancel();
}
}
function _fun84808() { // fn#84808, offset: 0x01f5836f, size: 11 bytes, params: 1, frame: 1
return _fun84809;
function _fun84809() { // fn#84809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:3999, offset: 0x01f58001, size: 21 bytes, params: 1, frame: 9
env1_14.cancel();
}
}
}
env0_0.scrollTo = global.setTimeout(_fun84795, delay);
setCategoryIndex(index);
}
function _fun84798() { // fn#84798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2664, offset: 0x01f58001, size: 21 bytes, params: 1, frame: 9
env1_14.cancel();
}
function onScroll_84804(a0) { // fn#84804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:3389, offset: 0x01f5821c, size: 87 bytes, params: 2, frame: 12
env0_0(a0.nativeEvent.contentOffset.y);
a0.nativeEvent.layoutMeasurement.height;
a0.nativeEvent.contentOffset.y;
a0.nativeEvent.contentSize.height;
}
function _fun84795() { // fn#84795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11262:2182, offset: 0x01f57f2c, size: 69 bytes, params: 1, frame: 14
const current = env2_7.current;
if (current != null) {
current.scrollToLocation({'section': null, 'item': 0, 'animated': true, section: index});
}
env2_13(null);
}
global.__d(_fun84785, 11076, [57, 31, 27, 6583, 11052, 11028, 33, 4501, 697, 1305, 11077, 4573, 1244, 4785, 8577,
566, 11078, 11063, 22, 7700, 11079, 8671, 5466,
2]) /* metro module 11076, dependencies: [57, 31, 27, 6583, 11052, 11028, 33, 4501, 697, 1305, 11077, 4573, 1244, 4785, 8577, 566, 11078, 11063, 22, 7700, 11079, 8671, 5466, 2] */;
@@ -1,34 +1,42 @@
/* Metro module 11079; source: modules/stickers/native/StickerPickerListEmptyState.tsx; dependencies: [31, 27, 661, 33, 4501, 697, 6277, 1305, 1244, 11080, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import Module11080 from '../../../by-id/module-11080.js'; /* Metro dependency 11080 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun84820(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11265:6, offset: 0x01f58878, size: 311 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).ScrollView;
const env0_5 = (require(661) /* metro dependency 661: Constants */).EXPRESSION_FOOTER_HEIGHT;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {emptyStateContainer: {'padding': 0, 'flex': 1}};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.emptyStateBody = {color: TEXT_SUBTLE};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.emptyStateImage = {marginBottom: PX_8, marginTop: 0};
const env0_7 = Reflect.apply(createStyles, createStylesModule, [object2]);
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {emptyStateContainer: {'padding': 0, 'flex': 1}};
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.emptyStateBody = {color: TEXT_SUBTLE};
const PX_8 = (Native).space.PX_8;
object.emptyStateImage = {marginBottom: PX_8, marginTop: 0};
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(StickerPickerListEmptyState);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPickerListEmptyState.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPickerListEmptyState.tsx');
exports.default = value;
function StickerPickerListEmptyState({inActionSheet, insetTop, insetBottom}) { // fn#84821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11265:367, offset: 0x01f589af, size: 298 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = env0_3.useMemo(function() {
return {marginBottom: insetBottom + EXPRESSION_FOOTER_HEIGHT, marginTop: insetTop, flex: 1};
}, [insetBottom, insetTop]);
const r2 = inActionSheet ? (require(6277) /* metro dependency 6277 */).BottomSheetScrollView : ScrollView;
const RefreshEmptyState = (NativeModule).RefreshEmptyState;
const intl = (IndexNativeModule).intl;
return ((Component) => <Component contentContainerStyle={value2} keyboardShouldPersistTaps="always"><RefreshEmptyState body={intl.string((IndexNativeModule).t.jyiGfc)} bodyStyle={styles.emptyStateBody} containerStyle={styles.emptyStateContainer} imageStyle={styles.emptyStateImage} source={Module11080} titleStyle={{marginBottom: 0}} /></Component>)(r2);
}
}
function StickerPickerListEmptyState({inActionSheet, insetTop, insetBottom}) { // fn#84821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11265:367, offset: 0x01f589af, size: 298 bytes, params: 2, frame: 22
const styles = useStyles();
const value2 = env0_3.useMemo(function() {
return {marginBottom: insetBottom + EXPRESSION_FOOTER_HEIGHT, marginTop: insetTop, flex: 1};
}, [insetBottom, insetTop]);
const r2 = inActionSheet ? (require(6277) /* metro dependency 6277 */).BottomSheetScrollView : ScrollView;
const RefreshEmptyState = (require(1305) /* metro dependency 1305: native */).RefreshEmptyState;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return ((Component) => <Component contentContainerStyle={value2} keyboardShouldPersistTaps="always"><RefreshEmptyState body={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jyiGfc)} bodyStyle={styles.emptyStateBody} containerStyle={styles.emptyStateContainer} imageStyle={styles.emptyStateImage} source={importDefault(11080) /* metro dependency 11080 */} titleStyle={{marginBottom: 0}} /></Component>)(r2);
}
global.__d(_fun84820, 11079, [31, 27, 661, 33, 4501, 697, 6277, 1305, 1244, 11080,
2]) /* metro module 11079, dependencies: [31, 27, 661, 33, 4501, 697, 6277, 1305, 1244, 11080, 2] */;
@@ -1,402 +1,425 @@
/* Metro module 11063; source: modules/stickers/native/StickerPickerListRow.tsx; dependencies: [57, 31, 27, 1878, 3832, 11028, 1346, 33, 4501, 477, 3829, 4081, 4082, 4643, 6943, 4785, 10970, 11064, 1216, 5278, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import Sticker from './Sticker.tsx'; /* Metro dependency 10970 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ExpressionPickerConstantsModule from '../../expression_picker/ExpressionPickerConstants.tsx'; /* Metro dependency 1346 */
import * as StickersConstantsModule from '../StickersConstants.tsx'; /* Metro dependency 3832 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StickersUtilsModule from '../StickersUtils.tsx'; /* Metro dependency 4643 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as StickerPickerConstantsModule from './StickerPickerConstants.tsx'; /* Metro dependency 11028 */
function _fun84692(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:6, offset: 0x01f53899, size: 331 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_6 = (require(3832) /* metro dependency 3832: StickersConstants */).StickerAnimationSettings;
const {ROW_HEIGHT, STICKER_SIZE} = require(11028) /* metro dependency 11028: StickerPickerConstants */;
const env0_8 = (require(1346) /* metro dependency 1346: ExpressionPickerConstants */).PADDING_VERTICAL;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({row: {'height': null,
ReactModule;
const {ROW_HEIGHT, STICKER_SIZE} = StickerPickerConstantsModule;
const env0_10 = (CreateStylesModule).createStyles({row: {'height': null,
'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between', 'overflow': 'hidden',
height: ROW_HEIGHT}, stickerImage: {height: STICKER_SIZE, width: STICKER_SIZE}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPickerListRow.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPickerListRow.tsx');
exports.default = StickerPickerListRow;
}
function StickerPickerListRow(a0) { // fn#84693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:435, offset: 0x01f539e4, size: 784 bytes, params: 2, frame: 36
var environment;
var r2;
var r0;
var containerWidth;
var stickers;
var rowSize;
var onPressSticker;
var onLongPressStickerDetail;
var focusedSticker;
var setFocusedSticker;
var channel;
var nativeRow;
var value;
var isAndroid;
var styles;
var AnimateStickers;
var useSetting;
var closure;
var items2;
var value2;
var value3;
var jsxRuntimeEnv0_9Binding;
var row;
var value4;
var property;
var push;
var StickerFormat;
var PNG;
var value5;
var value6;
var property2;
var property3;
var property4;
var object;
var id;
var name;
var format_type;
var moduleValue;
var getStickerAssetUrl;
var value7;
var defaultImport;
var object2;
var object6;
var defaultImport2;
var error;
var addBreadcrumb;
var object8;
var length;
var filter;
var value9;
var map;
exceptionSkip35: while (true) {
exceptionLanding35: while (true) {
containerWidth = a0.containerWidth;
stickers = a0.stickers;
var env0_0 = stickers;
rowSize = a0.rowSize;
onPressSticker = a0.onPressSticker;
var env0_1 = onPressSticker;
onLongPressStickerDetail = a0.onLongPressStickerDetail;
var env0_2 = onLongPressStickerDetail;
focusedSticker = a0.focusedSticker;
var env0_3 = focusedSticker;
setFocusedSticker = a0.setFocusedSticker;
var env0_4 = setFocusedSticker;
channel = a0.channel;
var env0_5 = channel;
nativeRow = a0.nativeRow;
reducibleJoin2: while (true) {
if (nativeRow !== undefined) {
r2 = nativeRow;
function StickerPickerListRow(a0) { // fn#84693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:435, offset: 0x01f539e4, size: 784 bytes, params: 2, frame: 36
var environment;
var r2;
var r0;
var containerWidth;
var stickers;
var rowSize;
var onPressSticker;
var onLongPressStickerDetail;
var focusedSticker;
var setFocusedSticker;
var channel;
var nativeRow;
var value;
var isAndroid;
var styles;
var AnimateStickers;
var useSetting;
var closure;
var items2;
var value2;
var value3;
var jsxRuntimeEnv0_9Binding;
var row;
var value4;
var property;
var push;
var StickerFormat;
var PNG;
var value5;
var value6;
var property2;
var property3;
var property4;
var object3;
var id;
var name;
var format_type;
var moduleValue;
var getStickerAssetUrl;
var value7;
var defaultImport;
var object4;
var object5;
var defaultImport2;
var error;
var addBreadcrumb;
var object7;
var length;
var filter;
var value9;
var map;
exceptionSkip35: while (true) {
exceptionLanding35: while (true) {
containerWidth = a0.containerWidth;
stickers = a0.stickers;
var env0_0 = stickers;
rowSize = a0.rowSize;
onPressSticker = a0.onPressSticker;
var env0_1 = onPressSticker;
onLongPressStickerDetail = a0.onLongPressStickerDetail;
var env0_2 = onLongPressStickerDetail;
focusedSticker = a0.focusedSticker;
var focusedSticker2 = focusedSticker;
setFocusedSticker = a0.setFocusedSticker;
var env0_4 = setFocusedSticker;
channel = a0.channel;
var env0_5 = channel;
nativeRow = a0.nativeRow;
reducibleJoin2: while (true) {
if (nativeRow !== undefined) {
r2 = nativeRow;
break reducibleJoin2;
}
value = environment;
value = require(dependencyMap[9]);
isAndroid = value.isAndroid;
value = Reflect.apply(isAndroid, value, []);
r2 = value;
break reducibleJoin2;
}
var env0_6 = undefined;
var env0_7 = undefined;
var env0_8 = undefined;
var env0_9 = undefined;
var env0_10 = undefined;
var env0_11 = undefined;
var env0_12 = undefined;
value = environment;
value = require(dependencyMap[9]);
isAndroid = value.isAndroid;
value = Reflect.apply(isAndroid, value, []);
r2 = value;
break reducibleJoin2;
}
var env0_6 = undefined;
var env0_7 = undefined;
var env0_8 = undefined;
var env0_9 = undefined;
var env0_10 = undefined;
var env0_11 = undefined;
var env0_12 = undefined;
value = environment;
styles = useStyles();
env0_6 = styles;
AnimateStickers = require(dependencyMap[10]).AnimateStickers;
useSetting = AnimateStickers.useSetting;
env0_7 = Reflect.apply(useSetting, AnimateStickers, []);
env0_8 = function(a0) {
require(dependencyMap[11]).triggerHapticFeedback(importDefault(dependencyMap[12]).IMPACT_LIGHT);
if (onPressSticker != null) {
onPressSticker(a0);
styles = useStyles();
env0_6 = styles;
AnimateStickers = require(dependencyMap[10]).AnimateStickers;
useSetting = AnimateStickers.useSetting;
env0_7 = Reflect.apply(useSetting, AnimateStickers, []);
env0_8 = function(a0) {
require(dependencyMap[11]).triggerHapticFeedback(importDefault(dependencyMap[12]).IMPACT_LIGHT);
if (onPressSticker != null) {
onPressSticker(a0);
}
};
env0_9 = handleOnLongPressSticker;
closure = rowTraits;
env0_10 = closure;
items2 = [];
if (r2) {
value4 = 0;
if (value4 < rowSize) {
r0 = value4;
reducibleLoop7: while (true) {
property = stickers[r0];
if (property !== undefined) {
value5 = closure(property);
value6 = focusedSticker2(value5, 3);
property2 = value6[value4];
property3 = value6[1];
property4 = value6[2];
push = items2.push;
object3 = {};
id = property.id;
object3.stickerId = id;
name = property.name;
object3.stickerName = name;
format_type = property.format_type;
object3.stickerType = format_type;
moduleValue = require(dependencyMap[16]);
getStickerAssetUrl = moduleValue.getStickerAssetUrl;
object3.stickerUrl = Reflect.apply(getStickerAssetUrl, moduleValue, [property, STICKER_SIZE,
property2]);
object3.stickerAnimated = property2;
object3.stickerDisabled = property4;
object3.stickerOpaque = property3;
Reflect.apply(push, items2, [object3]);
} else {
push = items2.push;
StickerFormat = require(dependencyMap[15]).StickerFormat;
PNG = StickerFormat.PNG;
Reflect.apply(push, items2, [{'stickerId': null, 'stickerName': '', 'stickerType': null,
'stickerUrl': '',
'stickerAnimated': false, 'stickerDisabled': true, 'stickerOpaque': false,
stickerType: PNG}]);
}
value7 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (value7 < rowSize) {
r0 = value7;
continue reducibleLoop7;
}
break reducibleLoop7;
}
}
try {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
property = dependencyMap[17];
} catch (error) {
break exceptionLanding35;
}
try {
defaultImport = importDefault(property);
} catch (error) {
break exceptionLanding35;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding35;
}
try {
row = styles.row;
} catch (error) {
break exceptionLanding35;
}
try {
object4.style = row;
} catch (error) {
break exceptionLanding35;
}
try {
object5 = {};
} catch (error) {
break exceptionLanding35;
}
try {
object5.rowContentWidth = containerWidth;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
object5.rowContentPaddingVertical = PADDING_VERTICAL;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
object5.itemSize = STICKER_SIZE;
} catch (error) {
break exceptionLanding35;
}
try {
object5.items = items2;
} catch (error) {
break exceptionLanding35;
}
try {
object4.rowData = object5;
} catch (error) {
break exceptionLanding35;
}
try {
closure = onPressSticker_84700;
} catch (error) {
break exceptionLanding35;
}
try {
object4.onPressSticker = closure;
} catch (error) {
break exceptionLanding35;
}
try {
closure = onLongPressSticker;
} catch (error) {
break exceptionLanding35;
}
try {
object4.onLongPressSticker = closure;
} catch (error) {
break exceptionLanding35;
}
try {
defaultImport2 = ((Component) => <Component {...object4} />)(defaultImport);
} catch (error) {
break exceptionLanding35;
}
return defaultImport2;
}
};
env0_9 = handleOnLongPressSticker;
closure = rowTraits;
env0_10 = closure;
items2 = [];
if (r2) {
value4 = 0;
if (value4 < rowSize) {
r0 = value4;
reducibleLoop7: while (true) {
property = stickers[r0];
if (property !== undefined) {
value5 = closure(property);
value6 = env0_3(value5, 3);
property2 = value6[value4];
property3 = value6[1];
property4 = value6[2];
push = items2.push;
object = {};
id = property.id;
object.stickerId = id;
name = property.name;
object.stickerName = name;
format_type = property.format_type;
object.stickerType = format_type;
moduleValue = require(dependencyMap[16]);
getStickerAssetUrl = moduleValue.getStickerAssetUrl;
object.stickerUrl = Reflect.apply(getStickerAssetUrl, moduleValue, [property, STICKER_SIZE,
property2]);
object.stickerAnimated = property2;
object.stickerDisabled = property4;
object.stickerOpaque = property3;
Reflect.apply(push, items2, [object]);
} else {
push = items2.push;
StickerFormat = require(dependencyMap[15]).StickerFormat;
PNG = StickerFormat.PNG;
Reflect.apply(push, items2, [{'stickerId': null, 'stickerName': '', 'stickerType': null,
'stickerUrl': '',
'stickerAnimated': false, 'stickerDisabled': true, 'stickerOpaque': false,
stickerType: PNG}]);
env0_11 = items2;
closure = StickerPickerListRow_loop;
value2 = 0;
env0_12 = value2;
if (value2 < rowSize) {
r2 = value2;
reducibleLoop4: while (true) {
closure();
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
env0_12 = value3;
if (value3 < rowSize) {
r2 = value3;
continue reducibleLoop4;
}
value7 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (value7 < rowSize) {
r0 = value7;
continue reducibleLoop7;
}
break reducibleLoop7;
break reducibleLoop4;
}
}
try {
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
property = dependencyMap[17];
} catch (error) {
break exceptionLanding35;
}
try {
defaultImport = importDefault(property);
} catch (error) {
break exceptionLanding35;
}
try {
object2 = {};
} catch (error) {
break exceptionLanding35;
}
try {
row = styles.row;
} catch (error) {
break exceptionLanding35;
}
try {
object2.style = row;
} catch (error) {
break exceptionLanding35;
}
try {
object6 = {};
} catch (error) {
break exceptionLanding35;
}
try {
object6.rowContentWidth = containerWidth;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
object6.rowContentPaddingVertical = PADDING_VERTICAL;
} catch (error) {
break exceptionLanding35;
}
try {
} catch (error) {
break exceptionLanding35;
}
try {
object6.itemSize = STICKER_SIZE;
} catch (error) {
break exceptionLanding35;
}
try {
object6.items = items2;
} catch (error) {
break exceptionLanding35;
}
try {
object2.rowData = object6;
} catch (error) {
break exceptionLanding35;
}
try {
closure = onPressSticker;
} catch (error) {
break exceptionLanding35;
}
try {
object2.onPressSticker = closure;
} catch (error) {
break exceptionLanding35;
}
try {
closure = onLongPressSticker_84702;
} catch (error) {
break exceptionLanding35;
}
try {
object2.onLongPressSticker = closure;
} catch (error) {
break exceptionLanding35;
}
try {
defaultImport2 = ((Component) => <Component {...object2} />)(defaultImport);
} catch (error) {
break exceptionLanding35;
}
return defaultImport2;
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
row = styles.row;
return (
<View style={row}>
{items2}
</View>
);
break exceptionSkip35;
}
env0_11 = items2;
closure = StickerPickerListRow_loop;
value2 = 0;
env0_12 = value2;
if (value2 < rowSize) {
r2 = value2;
reducibleLoop4: while (true) {
closure();
value3 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
env0_12 = value3;
if (value3 < rowSize) {
r2 = value3;
continue reducibleLoop4;
}
break reducibleLoop4;
}
}
jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
row = styles.row;
return (
<View style={row}>
{items2}
</View>
);
value = importDefault(dependencyMap[18]);
addBreadcrumb = value.addBreadcrumb;
object7 = {};
length = items2.length;
object7.itemLength = length;
filter = items2.filter;
value9 = Reflect.apply(filter, items2, [_fun84704]);
map = value9.map;
object7.items = Reflect.apply(map, value9, [_fun84705]);
Reflect.apply(addBreadcrumb, value, [{'message': 'Error in StickerPickerListRowNativeComponent',
'category': 'sticker', data: object7}]);
throw error;
break exceptionSkip35;
}
value = importDefault(dependencyMap[18]);
addBreadcrumb = value.addBreadcrumb;
object8 = {};
length = items2.length;
object8.itemLength = length;
filter = items2.filter;
value9 = Reflect.apply(filter, items2, [_fun84704]);
map = value9.map;
object8.items = Reflect.apply(map, value9, [_fun84705]);
Reflect.apply(addBreadcrumb, value, [{'message': 'Error in StickerPickerListRowNativeComponent',
'category': 'sticker', data: object8}]);
throw error;
break exceptionSkip35;
}
}
function handleOnLongPressSticker(a0) { // fn#84695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:800, owner: StickerPickerListRow.handleOnLongPressSticker, offset: 0x01f53d49, size: 217 bytes, params: 2, frame: 17
var moduleValue;
var value4;
var moduleValue2;
if (onLongPressStickerDetail != null) {
value4 = environment.__proto__;
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue2.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
onLongPressStickerDetail(a0);
} else {
var AnimateStickers = (require(3829) /* metro dependency 3829: UserSettings */).AnimateStickers;
var setting = AnimateStickers.getSetting();
var ANIMATE_ON_INTERACTION = StickerAnimationSettings.ANIMATE_ON_INTERACTION;
if (setting === ANIMATE_ON_INTERACTION) {
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
if (setFocusedSticker != null) {
setFocusedSticker(a0);
function handleOnLongPressSticker(a0) { // fn#84695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:800, owner: StickerPickerListRow.handleOnLongPressSticker, offset: 0x01f53d49, size: 217 bytes, params: 2, frame: 17
var moduleValue;
var value4;
var moduleValue2;
if (onLongPressStickerDetail != null) {
value4 = environment.__proto__;
moduleValue2 = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue2.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
onLongPressStickerDetail(a0);
} else {
var AnimateStickers = (require(3829) /* metro dependency 3829: UserSettings */).AnimateStickers;
var setting = AnimateStickers.getSetting();
var ANIMATE_ON_INTERACTION = StickerAnimationSettings.ANIMATE_ON_INTERACTION;
if (setting === ANIMATE_ON_INTERACTION) {
moduleValue = require(4081) /* metro dependency 4081: HapticUtilsNative */;
moduleValue.triggerHapticFeedback((importDefault(4082) /* metro dependency 4082: HapticFeedbackTypes */).IMPACT_LIGHT);
if (setFocusedSticker != null) {
setFocusedSticker(a0);
}
}
}
}
}
}
function rowTraits(a0) { // fn#84696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:1037, owner: StickerPickerListRow.rowTraits, offset: 0x01f53e22, size: 167 bytes, params: 2, frame: 21
var r3;
var moduleValue2;
var isSendableSticker;
let value = environment.__proto__;
const value2 = undefined;
const stickersUtilsModule = require(4643) /* metro dependency 4643: StickersUtils */;
const items2 = [stickersUtilsModule.shouldAnimateSticker(env0_7,
a0.id === (focusedSticker == null ? value2 : focusedSticker.id))];
const value4 = channel == null;
if (value4) {
r3 = value4;
} else {
moduleValue2 = require(6943) /* metro dependency 6943: StickerSendability */;
isSendableSticker = moduleValue2.isSendableSticker;
value = UserStore.getCurrentUser();
value = Reflect.apply(isSendableSticker, moduleValue2, [a0, value, channel]);
r3 = value;
}
items2[1] = r3;
items2[2] = onPressSticker == null;
return items2;
}
function rowTraits(a0) { // fn#84696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:1037, owner: StickerPickerListRow.rowTraits, offset: 0x01f53e22, size: 167 bytes, params: 2, frame: 21
var r3;
var moduleValue2;
var isSendableSticker;
let value = environment.__proto__;
const value2 = undefined;
const items2 = [StickersUtilsModule.shouldAnimateSticker(env0_7,
a0.id === (focusedSticker == null ? value2 : focusedSticker.id))];
const value4 = channel == null;
if (value4) {
r3 = value4;
} else {
moduleValue2 = require(6943) /* metro dependency 6943: StickerSendability */;
isSendableSticker = moduleValue2.isSendableSticker;
value = UserStore.getCurrentUser();
value = Reflect.apply(isSendableSticker, moduleValue2, [a0, value, channel]);
r3 = value;
}
items2[1] = r3;
items2[2] = onPressSticker == null;
return items2;
}
function StickerPickerListRow_loop() { // fn#84697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:1198, owner: StickerPickerListRow._loop, offset: 0x01f53ec9, size: 306 bytes, params: 1, frame: 25
var environment;
var binding;
var push;
var value5;
const property = stickers[env0_12];
if (property === undefined) {
binding = env0_11;
push = binding.push;
value5 = environment.__proto__;
Reflect.apply(push, binding, [<View style={styles.stickerImage} key={env0_12} />]);
return 1;
}
const value4 = env1_3(rowTraits(property), 3);
const property2 = value4[0];
const property3 = value4[1];
const property4 = value4[2];
binding = env0_11;
push = binding.push;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
Reflect.apply(push, binding,
[<PressableOpacity accessibilityRole="button" accessibilityLabel={property.name} style={styles.stickerImage} disabled={property4} onPress={onPress_84698} onLongPress={onLongPress_84699} key={property.id}>{((Component) => <Component sticker={property} size={STICKER_SIZE} animated={property2} opaque={property3} key={env0_12} />)(importDefault(10970) /* metro dependency 10970: Sticker */)}</PressableOpacity>]);
}
function StickerPickerListRow_loop() { // fn#84697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:1198, owner: StickerPickerListRow._loop, offset: 0x01f53ec9, size: 306 bytes, params: 1, frame: 25
var environment;
var binding;
var push;
var value5;
const property = stickers[env0_12];
if (property === undefined) {
binding = env0_11;
push = binding.push;
value5 = environment.__proto__;
Reflect.apply(push, binding, [<View style={styles.stickerImage} key={env0_12} />]);
return 1;
}
const value4 = env1_3(rowTraits(property), 3);
const property2 = value4[0];
const property3 = value4[1];
const property4 = value4[2];
binding = env0_11;
push = binding.push;
const PressableOpacity = (PressablesModule).PressableOpacity;
Reflect.apply(push, binding,
[<PressableOpacity accessibilityRole="button" accessibilityLabel={property.name} style={styles.stickerImage} disabled={property4} onPress={onPress_84698} onLongPress={onLongPress_84699} key={property.id}>{((Component) => <Component sticker={property} size={STICKER_SIZE} animated={property2} opaque={property3} key={env0_12} />)(Sticker)}</PressableOpacity>]);
function _loopOnPress() { // fn#84698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:1459, owner: StickerPickerListRow._loop.onPress, offset: 0x00e7cf74, size: 23 bytes, params: 1, frame: 11
return handleOnPressSticker(env0_0);
}
function StickerPickerListRowOnPressSticker(a0) { // fn#84700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:2210, owner: StickerPickerListRow.onPressSticker, offset: 0x01f53ffb, size: 55 bytes, params: 2, frame: 12
const env0_0 = a0;
const value2 = stickers.find(_fun84701);
if (value2 != null) {
handleOnPressSticker(value2);
}
}
function _loopOnLongPress() { // fn#84699, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:1499, owner: StickerPickerListRow._loop.onLongPress, offset: 0x01ed0784, size: 23 bytes, params: 1, frame: 11
return handleOnLongPressSticker(env0_0);
}
}
function StickerPickerListRowOnPressSticker(a0) { // fn#84700, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:2210, owner: StickerPickerListRow.onPressSticker, offset: 0x01f53ffb, size: 55 bytes, params: 2, frame: 12
const env0_0 = a0;
const value2 = stickers.find(_fun84701);
if (value2 != null) {
handleOnPressSticker(value2);
}
function _fun84701({id}) { // fn#84701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:2228, offset: 0x01f54032, size: 33 bytes, params: 2, frame: 2
return id === env0_0.nativeEvent.stickerId;
}
}
function onLongPressSticker(a0) { // fn#84702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:2317, owner: StickerPickerListRow.onLongPressSticker, offset: 0x01f54053, size: 55 bytes, params: 2, frame: 12
const env0_0 = a0;
const value2 = stickers.find(_fun84703);
if (value2 != null) {
handleOnLongPressSticker(value2);
}
function _fun84703({id}) { // fn#84703, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:2335, offset: 0x01f54032, size: 33 bytes, params: 2, frame: 2
return id === env0_0.nativeEvent.stickerId;
}
}
function StickerPickerListRowOnLongPressSticker(a0) { // fn#84702, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:2317, owner: StickerPickerListRow.onLongPressSticker, offset: 0x01f54053, size: 55 bytes, params: 2, frame: 12
const env0_0 = a0;
const value2 = stickers.find(_fun84703);
if (value2 != null) {
handleOnLongPressSticker(value2);
}
}
function _fun84704(a0) { // fn#84704, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:2568, offset: 0x01f5408a, size: 43 bytes, params: 2, frame: 4
@@ -409,7 +432,6 @@ function _fun84705({stickerId, stickerName, stickerUrl}) { // fn#84705, source:
return {stickerId: stickerId, stickerName: stickerName, stickerUrl: stickerUrl};
}
function _fun84701({id}) { // fn#84701, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11249:2228, offset: 0x01f54032, size: 33 bytes, params: 2, frame: 2
return id === env0_0.nativeEvent.stickerId;
}
global.__d(_fun84692, 11063, [57, 31, 27, 1878, 3832, 11028, 1346, 33, 4501, 477, 3829, 4081, 4082, 4643, 6943,
4785, 10970, 11064, 1216, 5278,
2]) /* metro module 11063, dependencies: [57, 31, 27, 1878, 3832, 11028, 1346, 33, 4501, 477, 3829, 4081, 4082, 4643, 6943, 4785, 10970, 11064, 1216, 5278, 2] */;
@@ -1,35 +1,40 @@
/* Metro module 11052; source: modules/stickers/native/StickerPickerStore.tsx; dependencies: [629, 690, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00629Module from '../../../by-id/module-00629.js'; /* Metro dependency 629 */
import * as ReactBatchUpdatesNativeModule from '../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
function _fun84652(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11238:6, offset: 0x01f5211e, size: 117 bytes, params: 8, frame: 18
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(function(a0) {
var env0_0 = a0;
return {packToScrollTo: null, setPackToScrollTo: _fun84654};
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickerPickerStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPickerStore.tsx');
exports.useStickerPickerStore = value;
function _fun84653(a0) { // fn#84653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11238:114, offset: 0x01f52193, size: 32 bytes, params: 2, frame: 3
const env0_0 = a0;
return {packToScrollTo: null, setPackToScrollTo: setPackToScrollTo};
function setPackToScrollTo(a0) { // fn#84654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11238:157, offset: 0x01f521b3, size: 54 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return (ReactBatchUpdatesNativeModule).batchUpdates(_fun84655);
function _fun84655() { // fn#84655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11238:182, offset: 0x01f521e9, size: 25 bytes, params: 1, frame: 11
env1_0(_fun84656);
function _fun84656(a0) { // fn#84656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11238:190, offset: 0x01f52202, size: 36 bytes, params: 2, frame: 4
const value = a0;
return value.packToScrollTo === env1_0 ? value : {packToScrollTo: env1_0};
}
}
}
}
}
function _fun84653(a0) { // fn#84653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11238:114, offset: 0x01f52193, size: 32 bytes, params: 2, frame: 3
const env0_0 = a0;
return {packToScrollTo: null, setPackToScrollTo: setPackToScrollTo};
}
function setPackToScrollTo(a0) { // fn#84654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11238:157, offset: 0x01f521b3, size: 54 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
const value = environment.__proto__;
return (require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun84655);
}
function _fun84655() { // fn#84655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11238:182, offset: 0x01f521e9, size: 25 bytes, params: 1, frame: 11
env1_0(_fun84656);
}
function _fun84656(a0) { // fn#84656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11238:190, offset: 0x01f52202, size: 36 bytes, params: 2, frame: 4
const value = a0;
return value.packToScrollTo === env1_0 ? value : {packToScrollTo: env1_0};
}
global.__d(_fun84652, 11052, [629, 690, 2]) /* metro module 11052, dependencies: [629, 690, 2] */;
@@ -1,16 +1,20 @@
/* Metro module 11051; source: modules/stickers/native/StickersUtils.tsx; dependencies: [31, 27, 1867, 1878, 11052, 661, 1346, 11049, 4785, 11053, 11054, 1583, 2] */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ExpressionPickerConstantsModule from '../../expression_picker/ExpressionPickerConstants.tsx'; /* Metro dependency 1346 */
import * as StickersTypesModule from '../StickersTypes.tsx'; /* Metro dependency 4785 */
import * as StickersHooksModule from '../StickersHooks.tsx'; /* Metro dependency 11049 */
import * as StickerPickerStoreModule from './StickerPickerStore.tsx'; /* Metro dependency 11052 */
function _fun84642(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84642, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:6, offset: 0x01f51cd6, size: 284 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 env0_4 = (require(27) /* metro dependency 27 */).NativeModules;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_7 = (require(11052) /* metro dependency 11052: StickerPickerStore */).useStickerPickerStore;
const env0_8 = (require(661) /* metro dependency 661: Constants */).GuildNSFWContentLevel;
const env0_9 = (require(1346) /* metro dependency 1346: ExpressionPickerConstants */).ExpressionPickerViewType;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/StickersUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickersUtils.tsx');
exports.useStickerCategories = useStickerCategories;
exports.preloadSticker = function({hash, url, width, height, frames, callback}) {
var NativeLottieUtils = NativeModules.NativeLottieUtils;
@@ -21,76 +25,78 @@ function _fun84642(global, require, importDefault, importAll, module, exports, d
NativeLottieUtils.dropPreload(a0);
};
exports.openStickerPickerToPackId = openStickerPickerToPackId;
}
function useStickerCategories(a0) { // fn#84643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:348, offset: 0x01f51df2, size: 120 bytes, params: 2, frame: 16
return ReactModule.useMemo(_fun84644, [GuildStore.getGuilds(),
(StickersHooksModule).useStickerPackCategories(a0),
UserStore.getCurrentUser()]);
function _fun84644() { // fn#84644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:449, offset: 0x01f51e6a, size: 62 bytes, params: 1, frame: 12
let value = env0_0.filter(function(a0) {
return a0.stickers.length > 0;
});
value = value.filter(_fun84646);
return value.map(_fun84647);
function _fun84646({id, type}) { // fn#84646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:496, offset: 0x01f51ebe, size: 160 bytes, params: 2, frame: 15
const value = environment.__proto__;
const property = env1_2[id];
const StickerCategoryTypes = (StickersTypesModule).StickerCategoryTypes;
const GUILD = StickerCategoryTypes.GUILD;
let r0 = type !== GUILD || env1_1 != null && env1_1.nsfwAllowed;
r0 = !r0 ? property == null : r0;
r0 = !r0 ? property.nsfwLevel !== GuildNSFWContentLevel.AGE_RESTRICTED && property.nsfwLevel !== GuildNSFWContentLevel.EXPLICIT : r0;
return !!r0;
}
function useStickerCategories(a0) { // fn#84643, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:348, offset: 0x01f51df2, size: 120 bytes, params: 2, frame: 16
return env0_3.useMemo(_fun84644, [GuildStore.getGuilds(),
(require(11049) /* metro dependency 11049: StickersHooks */).useStickerPackCategories(a0),
UserStore.getCurrentUser()]);
}
function _fun84647(a0) { // fn#84647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:667, offset: 0x01f51f5e, size: 192 bytes, params: 2, frame: 16
var r2;
var object;
let type = a0.type;
const value = environment.__proto__.__proto__;
const StickerCategoryTypes = (StickersTypesModule).StickerCategoryTypes;
const FAVORITE = StickerCategoryTypes.FAVORITE;
if (type === FAVORITE) {
r2 = a0.type === StickerCategoryTypes.FAVORITE ? importDefault(11053) /* metro dependency 11053 */ : importDefault(11054) /* metro dependency 11054 */;
object = {};
copyDataProperties(object, a0, 8);
object['icon'] = r2;
return object;
}
type = a0.type;
const RECENT = StickerCategoryTypes.RECENT;
if (type === RECENT) {
r2 = a0.type === StickerCategoryTypes.FAVORITE ? importDefault(11053) /* metro dependency 11053 */ : importDefault(11054) /* metro dependency 11054 */;
object = {};
copyDataProperties(object, a0, 8);
object['icon'] = r2;
return object;
}
return a0;
}
function openStickerPickerToPackId(a0, a1) { // fn#84650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:1087, offset: 0x01f52080, size: 68 bytes, params: 3, frame: 13
const env0_0 = a0;
useStickerPickerStore.getState().setPackToScrollTo(a1);
global.setTimeout(_fun84651, 1);
}
}
function _fun84644() { // fn#84644, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:449, offset: 0x01f51e6a, size: 62 bytes, params: 1, frame: 12
let value = env0_0.filter(function(a0) {
return a0.stickers.length > 0;
});
value = value.filter(_fun84646);
return value.map(_fun84647);
}
function _fun84651() { // fn#84651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:1141, offset: 0x01f520c4, size: 90 bytes, params: 1, frame: 15
var openCustomKeyboard;
var object2;
const current = env0_0.current;
if (current != null) {
openCustomKeyboard = current.openCustomKeyboard;
object2 = {};
value = environment.__proto__;
object2.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.EXPRESSION;
object2.context = ExpressionPickerViewType.STICKER;
Reflect.apply(openCustomKeyboard, current, [object2]);
}
}
function _fun84646({id, type}) { // fn#84646, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:496, offset: 0x01f51ebe, size: 160 bytes, params: 2, frame: 15
const value = environment.__proto__;
const property = env1_2[id];
const StickerCategoryTypes = (require(4785) /* metro dependency 4785: StickersTypes */).StickerCategoryTypes;
const GUILD = StickerCategoryTypes.GUILD;
let r0 = type !== GUILD || env1_1 != null && env1_1.nsfwAllowed;
r0 = !r0 ? property == null : r0;
r0 = !r0 ? property.nsfwLevel !== GuildNSFWContentLevel.AGE_RESTRICTED && property.nsfwLevel !== GuildNSFWContentLevel.EXPLICIT : r0;
return !!r0;
}
function openStickerPickerToPackId(a0, a1) { // fn#84650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:1087, offset: 0x01f52080, size: 68 bytes, params: 3, frame: 13
const env0_0 = a0;
useStickerPickerStore.getState().setPackToScrollTo(a1);
global.setTimeout(_fun84651, 1);
function _fun84651() { // fn#84651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:1141, offset: 0x01f520c4, size: 90 bytes, params: 1, frame: 15
var openCustomKeyboard;
var object;
const current = env0_0.current;
if (current != null) {
openCustomKeyboard = current.openCustomKeyboard;
object = {};
value = environment.__proto__;
object.type = (require(1583) /* metro dependency 1583: KeyboardTypes */).KeyboardTypes.EXPRESSION;
object.context = ExpressionPickerViewType.STICKER;
Reflect.apply(openCustomKeyboard, current, [object]);
}
}
function _fun84647(a0) { // fn#84647, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11237:667, offset: 0x01f51f5e, size: 192 bytes, params: 2, frame: 16
var r2;
var object2;
let type = a0.type;
const value = environment.__proto__.__proto__;
const StickerCategoryTypes = (require(4785) /* metro dependency 4785: StickersTypes */).StickerCategoryTypes;
const FAVORITE = StickerCategoryTypes.FAVORITE;
if (type === FAVORITE) {
r2 = a0.type === StickerCategoryTypes.FAVORITE ? importDefault(11053) /* metro dependency 11053 */ : importDefault(11054) /* metro dependency 11054 */;
object2 = {};
copyDataProperties(object2, a0, 8);
object2['icon'] = r2;
return object2;
}
type = a0.type;
const RECENT = StickerCategoryTypes.RECENT;
if (type === RECENT) {
r2 = a0.type === StickerCategoryTypes.FAVORITE ? importDefault(11053) /* metro dependency 11053 */ : importDefault(11054) /* metro dependency 11054 */;
object2 = {};
copyDataProperties(object2, a0, 8);
object2['icon'] = r2;
return object2;
}
return a0;
}
global.__d(_fun84642, 11051, [31, 27, 1867, 1878, 11052, 661, 1346, 11049, 4785, 11053, 11054, 1583,
2]) /* metro module 11051, dependencies: [31, 27, 1867, 1878, 11052, 661, 1346, 11049, 4785, 11053, 11054, 1583, 2] */;
@@ -1,27 +1,31 @@
/* Metro module 11056; source: modules/stickers/native/openStickerPackDetailActionSheet.tsx; dependencies: [661, 683, 4080, 11057, 1962, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun84668(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11242:6, offset: 0x01f5249e, size: 168 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/openStickerPackDetailActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/openStickerPackDetailActionSheet.tsx');
exports.default = openStickerPackDetailActionSheet;
exports.AnalyticsPopoutType = {EXPRESSION_SUGGESTIONS: 'Sticker Pack Detail Sheet (Expression Suggestions Popout)',
STICKER_PACK_DETAIL: 'Sticker Pack Detail Sheet',
STICKER_PACK_UPSELL: 'Sticker Pack Detail Sheet (Sticker Upsell Popout)'};
function openStickerPackDetailActionSheet({analyticsLocation, analyticsPopoutType, stickerPack}) { // fn#84669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11242:462, offset: 0x01f52546, size: 162 bytes, params: 2, frame: 21
const defaultImport = importDefault(dependencyMap[1]);
const track = defaultImport.track;
const STICKER_PACK_VIEW_ALL = AnalyticEvents.STICKER_PACK_VIEW_ALL;
Reflect.apply(track, defaultImport, [STICKER_PACK_VIEW_ALL, {location: analyticsLocation,
sticker_pack_id: stickerPack.id}]);
const defaultImport2 = importDefault(dependencyMap[2]);
const openLazy = defaultImport2.openLazy;
let value = require(dependencyMap[4]);
value = value(dependencyMap[3], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'StickerPackDetailActionSheet', {stickerPack: stickerPack,
analyticsPopoutType: analyticsPopoutType}]);
}
}
function openStickerPackDetailActionSheet({analyticsLocation, analyticsPopoutType, stickerPack}) { // fn#84669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11242:462, offset: 0x01f52546, size: 162 bytes, params: 2, frame: 21
const defaultImport = importDefault(dependencyMap[1]);
const track = defaultImport.track;
const STICKER_PACK_VIEW_ALL = AnalyticEvents.STICKER_PACK_VIEW_ALL;
Reflect.apply(track, defaultImport, [STICKER_PACK_VIEW_ALL, {location: analyticsLocation,
sticker_pack_id: stickerPack.id}]);
const defaultImport2 = importDefault(dependencyMap[2]);
const openLazy = defaultImport2.openLazy;
let value = require(dependencyMap[4]);
value = value(dependencyMap[3], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'StickerPackDetailActionSheet', {stickerPack: stickerPack,
analyticsPopoutType: analyticsPopoutType}]);
}
global.__d(_fun84668, 11056, [661, 683, 4080, 11057, 1962,
2]) /* metro module 11056, dependencies: [661, 683, 4080, 11057, 1962, 2] */;
@@ -1,15 +1,27 @@
/* Metro module 11070; source: modules/stickers/native/premium/StickersPremiumUpsellAlert.tsx; dependencies: [31, 27, 5140, 661, 1880, 33, 11071, 1244, 697, 11072, 11073, 4501, 1305, 4573, 694, 7037, 7942, 1478, 6771, 4596, 683, 5080, 7028, 1962, 5278, 8160, 11074, 2] */
import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
import Alert from '../../../../components_native/common/Alert.tsx'; /* Metro dependency 4596 */
import IAPStoreAndroid from '../../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import BillingActionCreators from '../../../../actions/native/BillingActionCreators.tsx'; /* Metro dependency 7037 */
import UsePremiumPlanPrice from '../../../premium/native/hooks/usePremiumPlanPrice.tsx'; /* Metro dependency 7942 */
import Module08160 from '../../../../by-id/module-08160.js'; /* Metro dependency 8160 */
import Module11074 from '../../../../by-id/module-11074.js'; /* Metro dependency 11074 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
function _fun84760(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:6, offset: 0x01f564d5, size: 742 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.Image;
const env0_6 = value.ScrollView;
const iapStoreAndroid = importDefault(5140) /* metro dependency 5140: IAPStoreAndroid */;
value = require(661) /* metro dependency 661: Constants */;
const env0_8 = value.AnalyticEvents;
const env0_9 = value.AnalyticsSections;
@@ -20,152 +32,181 @@ function _fun84760(global, require, importDefault, importAll, module, exports, d
value = require(33) /* metro dependency 33 */;
const env0_13 = value.jsx;
const env0_14 = value.jsxs;
object2 = {icon: importDefault(11071) /* metro dependency 11071 */, description: function() {
object = {icon: importDefault(11071) /* metro dependency 11071 */, description: function() {
return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.uAfKTe);
}};
const PREMIUM_PERK_PURPLE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PREMIUM_PERK_PURPLE;
object2.color = PREMIUM_PERK_PURPLE;
const items2 = [object2];
object.color = PREMIUM_PERK_PURPLE;
const items2 = [object];
items2[1] = {icon: importDefault(11072) /* metro dependency 11072 */, description: function() {
return require(dependencyMap[7]).intl.formatToPlainString(require(dependencyMap[7]).t.aVSVBO,
{numFreeGuildSubscriptions: NUM_FREE_GUILD_BOOSTS_WITH_PREMIUM});
}};
object2 = {icon: importDefault(11073) /* metro dependency 11073 */, description: function() {
object = {icon: importDefault(11073) /* metro dependency 11073 */, description: function() {
return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.pqHIf7);
}};
const PREMIUM_PERK_GREEN = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PREMIUM_PERK_GREEN;
object2.color = PREMIUM_PERK_GREEN;
items2[2] = object2;
object.color = PREMIUM_PERK_GREEN;
items2[2] = object;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.alert = {paddingTop: 18};
object2.shortHeightAlert = {height: 500};
object2.content = {alignItems: 'center'};
object2.closeContainer = {'flexDirection': 'row-reverse', 'width': '100%', 'marginBottom': 16};
object2.description = {'textAlign': 'center', 'lineHeight': 20};
const object3 = {'backgroundColor': null, 'borderRadius': null, 'marginTop': 16, 'marginBottom': 0,
object = {};
object.alert = {paddingTop: 18};
object.shortHeightAlert = {height: 500};
object.content = {alignItems: 'center'};
object.closeContainer = {'flexDirection': 'row-reverse', 'width': '100%', 'marginBottom': 16};
object.description = {'textAlign': 'center', 'lineHeight': 20};
const object4 = {'backgroundColor': null, 'borderRadius': null, 'marginTop': 16, 'marginBottom': 0,
'paddingHorizontal': 12, 'paddingVertical': 8, 'width': '100%'};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object3.backgroundColor = BACKGROUND_SURFACE_HIGH;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object2.perks = object3;
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object.perks = object4;
const PRIMARY_560 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_560;
object2.perkRow = {'paddingVertical': 10, 'borderBottomColor': null, 'borderBottomWidth': 1, 'flexDirection': 'row',
object.perkRow = {'paddingVertical': 10, 'borderBottomColor': null, 'borderBottomWidth': 1, 'flexDirection': 'row',
'alignItems': 'center', borderBottomColor: PRIMARY_560};
object2.lastPerkRow = {borderBottomWidth: 0};
object2.perkIcon = {'width': 24, 'marginRight': 20};
object2.perkText = {'lineHeight': 20, 'flexShrink': 1};
object2.imageHeader = {marginBottom: 12};
const env0_16 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/premium/StickersPremiumUpsellAlert.tsx');
object.lastPerkRow = {borderBottomWidth: 0};
object.perkIcon = {'width': 24, 'marginRight': 20};
object.perkText = {'lineHeight': 20, 'flexShrink': 1};
object.imageHeader = {marginBottom: 12};
const env0_16 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/premium/StickersPremiumUpsellAlert.tsx');
exports.default = _default_84765;
}
function PerkRow({perk, isLastPerk}) { // fn#84764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:1378, offset: 0x01f56887, size: 238 bytes, params: 2, frame: 22
const styles = useStyles();
const items2 = [styles.perkRow];
items2[1] = isLastPerk ? styles.lastPerkRow : undefined;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const icon = <Icon style={styles.perkIcon} source={perk.icon} disableColor={perk.color == null} color={perk.color} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={items2}>
{icon}
<Text
style={styles.perkText}
variant="text-md/medium"
color="interactive-text-active"
>
{perk.description()}
</Text>
</View>
);
}
function _default_84765({onClose, analyticsLocation}) { // fn#84765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:1699, offset: 0x01f56975, size: 814 bytes, params: 2, frame: 33
const styles = useStyles();
env0_3.useEffect(_fun84766, []);
const defaultImport = importDefault(7942) /* metro dependency 7942: usePremiumPlanPrice */;
const PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
const priceString = defaultImport(PREMIUM_MONTH_TIER_2)?.priceString;
const height = (importDefault(1478) /* metro dependency 1478: useWindowDimensionsNative */)().height;
const env0_1 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.f3Pet9);
const ButtonColors = (require(1305) /* metro dependency 1305: native */).ButtonColors;
const GREEN = ButtonColors.GREEN;
object2.confirmColor = GREEN;
object2.confirmText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o3Tnif);
object2.onConfirm = onConfirm;
object2.onClose = onClose;
object2.onCancel = onClose;
object2.style = [styles.alert, height <= 580 ? styles.shortHeightAlert : null];
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const view = <View style={styles.closeContainer}><PressableOpacity accessibilityRole="button" accessibilityLabel="close" onPress={onClose}><Icon source={importDefault(8160) /* metro dependency 8160 */} /></PressableOpacity></View>;
const items3 = [<Image source={importDefault(11074) /* metro dependency 11074 */} style={styles.imageHeader} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const format = intl.format;
const TBsJfQ = (require(1244) /* metro dependency 1244: indexNative */).t.TBsJfQ;
items3[1] = <Text style={styles.description} variant="text-md/medium">{Reflect.apply(format, intl, [TBsJfQ,
{monthlyPrice: priceString ?? '$...'}])}</Text>;
items3[2] = <View style={styles.perks}>{env0_15.map(_fun84770)}</View>;
return (
<Alert {...object2}>
{view}
<ScrollView>
<View style={styles.content} onStartShouldSetResponder={function() {
return true;
}}>
{items3}
</View>
</ScrollView>
</Alert>
);
}
function _fun84766() { // fn#84766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:1758, offset: 0x01f56ca3, size: 66 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
if (!IAPStoreAndroid.isReady()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun84767);
function PerkRow({perk, isLastPerk}) { // fn#84764, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:1378, offset: 0x01f56887, size: 238 bytes, params: 2, frame: 22
const styles = useStyles();
const items2 = [styles.perkRow];
items2[1] = isLastPerk ? styles.lastPerkRow : undefined;
const Icon = (NativeModule).Icon;
const icon = (
<Icon
style={styles.perkIcon}
source={perk.icon}
disableColor={perk.color == null}
color={perk.color}
/>
);
const Text = (TextModule).Text;
return (
<View style={items2}>
{icon}
<Text
style={styles.perkText}
variant="text-md/medium"
color="interactive-text-active"
>
{perk.description()}
</Text>
</View>
);
}
function _default_84765({onClose, analyticsLocation}) { // fn#84765, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:1699, offset: 0x01f56975, size: 814 bytes, params: 2, frame: 33
const styles = useStyles();
ReactModule.useEffect(_fun84766, []);
const defaultImport = UsePremiumPlanPrice;
const PREMIUM_MONTH_TIER_2 = SubscriptionPlans.PREMIUM_MONTH_TIER_2;
const priceString = defaultImport(PREMIUM_MONTH_TIER_2)?.priceString;
const height = (UseWindowDimensionsNative)().height;
const env0_1 = (UseAnalyticsLocations)().analyticsLocations;
const object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.f3Pet9);
const ButtonColors = (NativeModule).ButtonColors;
const GREEN = ButtonColors.GREEN;
object.confirmColor = GREEN;
object.confirmText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o3Tnif);
object.onConfirm = onConfirm_84768;
object.onClose = onClose;
object.onCancel = onClose;
object.style = [styles.alert, height <= 580 ? styles.shortHeightAlert : null];
const PressableOpacity = (PressablesModule).PressableOpacity;
const Icon = (NativeModule).Icon;
const view = (
<View style={styles.closeContainer}>
<PressableOpacity
accessibilityRole="button"
accessibilityLabel="close"
onPress={onClose}
>
<Icon source={Module08160} />
</PressableOpacity>
</View>
);
const items3 = [
<Image source={Module11074} style={styles.imageHeader} />,
];
const Text = (TextModule).Text;
const format = intl.format;
const TBsJfQ = (require(1244) /* metro dependency 1244: indexNative */).t.TBsJfQ;
items3[1] = (
<Text style={styles.description} variant="text-md/medium">
{Reflect.apply(format, intl, [TBsJfQ, {monthlyPrice: priceString ?? '$...'}])}
</Text>
);
items3[2] = (
<View style={styles.perks}>
{env0_15.map(_fun84770)}
</View>
);
return (
<Alert {...object}>
{view}
<ScrollView>
<View style={styles.content} onStartShouldSetResponder={function() {
return true;
}}>
{items3}
</View>
</ScrollView>
</Alert>
);
function _fun84766() { // fn#84766, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:1758, offset: 0x01f56ca3, size: 66 bytes, params: 1, frame: 11
var environment;
const value = environment.__proto__;
const iapStoreAndroidBinding = IAPStoreAndroid;
if (!iapStoreAndroidBinding.isReady()) {
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun84767);
}
function _fun84767() { // fn#84767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:1791, offset: 0x01f56ce5, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (BillingActionCreators).loadProducts();
}
}
function _default_84765OnConfirm() { // fn#84768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:2118, owner: _default_84765.onConfirm, offset: 0x01f56d0a, size: 177 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[20]);
const track = defaultImport.track;
const PREMIUM_PROMOTION_OPENED = AnalyticEvents.PREMIUM_PROMOTION_OPENED;
const object2 = {};
copyDataProperties(object2, analyticsLocation, undefined);
const STICKER_PREMIUM_TIER_2_UPSELL_MODAL = AnalyticsSections.STICKER_PREMIUM_TIER_2_UPSELL_MODAL;
object2['section'] = STICKER_PREMIUM_TIER_2_UPSELL_MODAL;
const BUTTON_CTA = AnalyticsObjects.BUTTON_CTA;
object2['object'] = BUTTON_CTA;
Reflect.apply(track, defaultImport, [PREMIUM_PROMOTION_OPENED, {location: object2}]);
const defaultImport2 = importDefault(dependencyMap[21]);
const pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[23]);
value = value(dependencyMap[22], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, {analyticsLocations: analyticsLocations}]);
}
function _fun84770(a0, a1) { // fn#84770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:2872, offset: 0x01f56dbb, size: 60 bytes, params: 3, frame: 16
return (
<PerkRow
perk={a0}
isLastPerk={a1 === env1_15.length - 1}
key={a1}
/>
);
}
}
}
function _default_84765OnConfirm() { // fn#84768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:2118, owner: _default_84765.onConfirm, offset: 0x01f56d0a, size: 177 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[20]);
const track = defaultImport.track;
const PREMIUM_PROMOTION_OPENED = AnalyticEvents.PREMIUM_PROMOTION_OPENED;
const object = {};
copyDataProperties(object, analyticsLocation, undefined);
const STICKER_PREMIUM_TIER_2_UPSELL_MODAL = AnalyticsSections.STICKER_PREMIUM_TIER_2_UPSELL_MODAL;
object['section'] = STICKER_PREMIUM_TIER_2_UPSELL_MODAL;
const BUTTON_CTA = AnalyticsObjects.BUTTON_CTA;
object['object'] = BUTTON_CTA;
Reflect.apply(track, defaultImport, [PREMIUM_PROMOTION_OPENED, {location: object}]);
const defaultImport2 = importDefault(dependencyMap[21]);
const pushLazy = defaultImport2.pushLazy;
value = require(dependencyMap[23]);
value = value(dependencyMap[22], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport2, [value, {analyticsLocations: analyticsLocations}]);
}
function _fun84770(a0, a1) { // fn#84770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:2872, offset: 0x01f56dbb, size: 60 bytes, params: 3, frame: 16
return (
<PerkRow
perk={a0}
isLastPerk={a1 === env1_15.length - 1}
key={a1}
/>
);
}
function _fun84767() { // fn#84767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11256:1791, offset: 0x01f56ce5, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(7037) /* metro dependency 7037: BillingActionCreators */).loadProducts();
}
global.__d(_fun84760, 11070, [31, 27, 5140, 661, 1880, 33, 11071, 1244, 697, 11072, 11073, 4501, 1305, 4573, 694,
7037, 7942, 1478, 6771, 4596, 683, 5080, 7028, 1962, 5278, 8160, 11074,
2]) /* metro module 11070, dependencies: [31, 27, 5140, 661, 1880, 33, 11071, 1244, 697, 11072, 11073, 4501, 1305, 4573, 694, 7037, 7942, 1478, 6771, 4596, 683, 5080, 7028, 1962, 5278, 8160, 11074, 2] */;
@@ -1,73 +1,76 @@
/* Metro module 11069; source: modules/stickers/native/premium/openStickersPremiumUpsellAlert.tsx; dependencies: [5, 31, 661, 33, 683, 6847, 4223, 4496, 11070, 1962, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
function _fun84752(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:6, offset: 0x01f56264, size: 197 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 */;
importAll(31) /* metro dependency 31 */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.AnalyticEvents;
const env0_5 = constantsModule.AnalyticsSections;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/premium/openStickersPremiumUpsellAlert.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/premium/openStickersPremiumUpsellAlert.tsx');
exports.default = function() {
return _openStickersPremiumUpsellAlert.apply(this, arguments);
};
}
function _openStickersPremiumUpsellAlert() { // fn#84753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:181, offset: 0x01f56329, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun84755).apply(this, arguments);
function* _fun84755(a0) { // fn#84755, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:266, offset: 0x01f56366, size: 228 bytes, params: 2, frame: 20
var environment;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
var binding = env2_1;
var binding2 = env2_2;
var value3 = binding(binding2[4]);
var track = value3.track;
var OPEN_MODAL = env2_4.OPEN_MODAL;
var STICKER_PREMIUM_TIER_2_UPSELL_MODAL = env2_5.STICKER_PREMIUM_TIER_2_UPSELL_MODAL;
Reflect.apply(track, value3, [OPEN_MODAL, {type: STICKER_PREMIUM_TIER_2_UPSELL_MODAL, location: a0}]);
var Promise = global.Promise;
var all = Promise.all;
binding = env2_0;
items2 = [binding(binding2[5]).fetchPremiumSubscriptionPlans()];
var value5 = binding(binding2[6]);
items2[1] = value5.fetchPaymentSources();
yield Reflect.apply(all, Promise, [items2]);
if (false) {
return undefined;
}
value = env2_1(env2_2[7]);
value.openLazy({importer: importer_84756});
}
function importer_84756() { // fn#84756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:481, offset: 0x01f5644a, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_0;
const binding2 = env3_2;
value = binding(binding2[9]);
value = value(binding2[8], binding2.paths);
return value.then(function({default: env0_0}) {
return _fun84758;
});
function _fun84757({default: env0_0}) { // fn#84757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:513, offset: 0x01f5648a, size: 23 bytes, params: 2, frame: 2
return _fun84758;
function _fun84758(a0) { // fn#84758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:528, offset: 0x01f564a1, size: 52 bytes, params: 2, frame: 14
const binding = env5_6;
const binding2 = env0_0;
const object = {};
copyDataProperties(object, a0, undefined);
object['analyticsLocation'] = env2_0;
return binding(binding2, object);
}
function _openStickersPremiumUpsellAlert() { // fn#84753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:181, offset: 0x01f56329, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun84755).apply(this, arguments);
}
}
}
function* _fun84755(a0) { // fn#84755, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:266, offset: 0x01f56366, size: 228 bytes, params: 2, frame: 20
var environment;
if (true) {
var env0_0 = a0;
value = environment.__proto__.__proto__;
var binding = env2_1;
var binding2 = env2_2;
var value3 = binding(binding2[4]);
var track = value3.track;
var OPEN_MODAL = env2_4.OPEN_MODAL;
var STICKER_PREMIUM_TIER_2_UPSELL_MODAL = env2_5.STICKER_PREMIUM_TIER_2_UPSELL_MODAL;
Reflect.apply(track, value3, [OPEN_MODAL, {type: STICKER_PREMIUM_TIER_2_UPSELL_MODAL, location: a0}]);
var Promise = global.Promise;
var all = Promise.all;
binding = env2_0;
items = [binding(binding2[5]).fetchPremiumSubscriptionPlans()];
var value5 = binding(binding2[6]);
items[1] = value5.fetchPaymentSources();
yield Reflect.apply(all, Promise, [items]);
if (false) {
return undefined;
}
value = env2_1(env2_2[7]);
value.openLazy({importer: importer_84756});
}
}
function importer_84756() { // fn#84756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:481, offset: 0x01f5644a, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__.__proto__;
const binding = env3_0;
const binding2 = env3_2;
value = binding(binding2[9]);
value = value(binding2[8], binding2.paths);
return value.then(function({default: env0_0}) {
return _fun84758;
});
}
function _fun84757({default: env0_0}) { // fn#84757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:513, offset: 0x01f5648a, size: 23 bytes, params: 2, frame: 2
return _fun84758;
}
function _fun84758(a0) { // fn#84758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11255:528, offset: 0x01f564a1, size: 52 bytes, params: 2, frame: 14
const binding = env5_6;
const binding2 = env0_0;
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['analyticsLocation'] = env2_0;
return binding(binding2, object2);
}
global.__d(_fun84752, 11069, [5, 31, 661, 33, 683, 6847, 4223, 4496, 11070, 1962,
2]) /* metro module 11069, dependencies: [5, 31, 661, 33, 683, 6847, 4223, 4496, 11070, 1962, 2] */;
@@ -1,22 +1,26 @@
/* Metro module 11065; source: modules/stickers/native/showStickerDetailActionSheet.tsx; dependencies: [4080, 11066, 1962, 2] */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun84708(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84708, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11251:6, offset: 0x01f541c3, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/showStickerDetailActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/showStickerDetailActionSheet.tsx');
exports.hideStickerDetailActionSheet = hideStickerDetailActionSheet;
exports.showStickerDetailActionSheet = showStickerDetailActionSheet;
function hideStickerDetailActionSheet() { // fn#84709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11251:249, offset: 0x01f54237, size: 43 bytes, params: 1, frame: 12
(ActionSheetActionCreators).hideActionSheet('sticker_detail_action_sheet');
}
function showStickerDetailActionSheet(a0) { // fn#84710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11251:348, offset: 0x01f54262, size: 82 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'sticker_detail_action_sheet', a0]);
}
}
function hideStickerDetailActionSheet() { // fn#84709, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11251:249, offset: 0x01f54237, size: 43 bytes, params: 1, frame: 12
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('sticker_detail_action_sheet');
}
function showStickerDetailActionSheet(a0) { // fn#84710, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11251:348, offset: 0x01f54262, size: 82 bytes, params: 2, frame: 16
const defaultImport = importDefault(dependencyMap[0]);
const openLazy = defaultImport.openLazy;
let value = require(dependencyMap[2]);
value = value(dependencyMap[1], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'sticker_detail_action_sheet', a0]);
}
global.__d(_fun84708, 11065, [4080, 11066, 1962, 2]) /* metro module 11065, dependencies: [4080, 11066, 1962, 2] */;
@@ -1,138 +1,141 @@
/* Metro module 11078; source: modules/stickers/native/useStickerPickerListData.tsx; dependencies: [31, 11052, 11028, 1346, 11051, 22, 1244, 4785, 8581, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ExpressionPickerConstantsModule from '../../expression_picker/ExpressionPickerConstants.tsx'; /* Metro dependency 1346 */
import * as StickersTypesModule from '../StickersTypes.tsx'; /* Metro dependency 4785 */
import * as StickerPickerConstantsModule from './StickerPickerConstants.tsx'; /* Metro dependency 11028 */
import * as StickersUtilsModule from './StickersUtils.tsx'; /* Metro dependency 11051 */
import * as StickerPickerStoreModule from './StickerPickerStore.tsx'; /* Metro dependency 11052 */
function _fun84811(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:6, offset: 0x01f583c0, size: 261 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(11052) /* metro dependency 11052: StickerPickerStore */).useStickerPickerStore;
const stickerPickerConstantsModule = require(11028) /* metro dependency 11028: StickerPickerConstants */;
const LABEL_HEIGHT = stickerPickerConstantsModule.LABEL_HEIGHT;
const env0_5 = stickerPickerConstantsModule.MIN_MARGIN;
const env0_6 = stickerPickerConstantsModule.ROW_HEIGHT;
const env0_7 = stickerPickerConstantsModule.STICKER_SIZE;
const PADDING_VERTICAL = (require(1346) /* metro dependency 1346: ExpressionPickerConstants */).PADDING_VERTICAL;
object2 = {STICKERS: 0};
object2[0] = 'STICKERS';
object2.NSFW = 1;
object2[1] = 'NSFW';
const LABEL_HEIGHT = StickerPickerConstantsModule.LABEL_HEIGHT;
const PADDING_VERTICAL = (ExpressionPickerConstantsModule).PADDING_VERTICAL;
object = {STICKERS: 0};
object[0] = 'STICKERS';
object.NSFW = 1;
object[1] = 'NSFW';
const env0_9 = LABEL_HEIGHT + 2 * PADDING_VERTICAL;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/native/useStickerPickerListData.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/useStickerPickerListData.tsx');
exports.default = useStickerPickerListData;
exports.StickerPickerSectionType = object2;
}
exports.StickerPickerSectionType = object;
function useStickerPickerListData({channel, containerWidth, searchResults, stickerFormats}) { // fn#84812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:417, offset: 0x01f584c5, size: 148 bytes, params: 2, frame: 18
const value2 = (StickersUtilsModule).useStickerCategories(channel);
return value2.useMemo(_fun84814, [containerWidth, value2, stickerFormats, searchResults,
useStickerPickerStore(function(a0) {
return a0.packToScrollTo;
})]);
function _fun84814() { // fn#84814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:597, offset: 0x01f58564, size: 305 bytes, params: 1, frame: 25
var push;
var items5;
var intl;
const Math = global.Math;
var value;
const value4 = Math.floor((containerWidth - MIN_MARGIN) / (STICKER_SIZE + MIN_MARGIN));
const items3 = [];
const items2 = [];
const items4 = [];
const items42 = items4;
const env0_4 = undefined;
const pushCategory_848152 = pushCategory_84815;
let searchResultsBinding = searchResults;
if (searchResultsBinding != null) {
searchResultsBinding = searchResults;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
pushCategory_848152(searchResultsBinding,
intl.string((require(1244) /* metro dependency 1244: indexNative */).t['zkoeq/']));
} else {
items42.map(_fun84817);
push = items2.push;
value = ((a0) => {
var env0_0 = 0;
return a0.map(_fun84819);
})(items3);
items5 = [];
arraySpread(items5, value, 0, undefined);
apply(push, items5, items2, undefined);
}
return {sections: items3, sectionHeights: items2, sectionSize: env1_9, sectionFooterSize: 12, sectionLabels: [],
rowHeight: ROW_HEIGHT, rowSize: value4, rowsBySection: items4, packToScrollToIndex: env0_4};
function pushCategory_84815(a0) { // fn#84815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:674, offset: 0x01f58695, size: 223 bytes, params: 2, frame: 17
var environment;
var value2;
var binding;
var push;
var value4;
let value = a1;
const r3 = value !== undefined ? value : '';
if (a2 === true) {
binding = ReactModule;
push = binding.push;
value4 = environment.__proto__.__proto__;
Reflect.apply(push, binding, [{type: env2_8.NSFW, stickersByRow: []}]);
binding = env0_1;
binding.push(1);
} else {
value = a0.filter(function(a0) {
return stickerFormats.includes(a0.format_type);
});
value2 = environment.__proto__.__proto__;
value = (importDefault(22) /* metro dependency 22 */).chunk(value, env0_0);
binding = ReactModule;
binding.push({type: env2_8.STICKERS, stickersByRow: value});
binding = env0_1;
binding.push(value.length);
}
env0_2.push(r3);
}
function useStickerPickerListData({channel, containerWidth, searchResults, stickerFormats}) { // fn#84812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:417, offset: 0x01f584c5, size: 148 bytes, params: 2, frame: 18
const value2 = (require(11051) /* metro dependency 11051: StickersUtils */).useStickerCategories(channel);
return value2.useMemo(_fun84814, [containerWidth, value2, stickerFormats, searchResults,
useStickerPickerStore(function(a0) {
return a0.packToScrollTo;
})]);
}
function _fun84817(a0, a1) { // fn#84817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:969, offset: 0x01f58790, size: 141 bytes, params: 3, frame: 16
var r4;
let value = environment.__proto__;
if (env1_4 === a0.id) {
env0_4 = a1;
}
const type = a0.type;
value = environment.__proto__.__proto__;
const StickerCategoryTypes = (StickersTypesModule).StickerCategoryTypes;
const GUILD = StickerCategoryTypes.GUILD;
const value2 = type === GUILD;
if (value2) {
value = require(8581) /* metro dependency 8581: AgeGateUtils */;
value = value.shouldNSFWGateGuild(a0.id);
r4 = value;
} else {
r4 = value2;
}
pushCategory_84815(a0.stickers, a0.name, r4);
}
function _fun84814() { // fn#84814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:597, offset: 0x01f58564, size: 305 bytes, params: 1, frame: 25
var push;
var items5;
var intl;
const Math = global.Math;
var value;
const value4 = Math.floor((containerWidth - MIN_MARGIN) / (STICKER_SIZE + MIN_MARGIN));
const items3 = [];
const items2 = [];
const items4 = [];
const env0_3 = items4;
const env0_4 = undefined;
const closure = pushCategory_84815;
let searchResultsBinding = searchResults;
if (searchResultsBinding != null) {
searchResultsBinding = searchResults;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
closure(searchResultsBinding,
intl.string((require(1244) /* metro dependency 1244: indexNative */).t['zkoeq/']));
} else {
env0_3.map(_fun84817);
push = items2.push;
value = ((a0) => {
var env0_0 = 0;
return a0.map(_fun84819);
})(items3);
items5 = [];
arraySpread(items5, value, 0, undefined);
apply(push, items5, items2, undefined);
}
return {sections: items3, sectionHeights: items2, sectionSize: env1_9, sectionFooterSize: 12, sectionLabels: [],
rowHeight: ROW_HEIGHT, rowSize: value4, rowsBySection: items4, packToScrollToIndex: env0_4};
}
function getSectionHeights(a0) { // fn#84818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:1125, offset: 0x01f5881d, size: 30 bytes, params: 2, frame: 11
return a0.map(_fun84819);
function _fun84819(a0, a1) { // fn#84819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:1177, offset: 0x01f5883b, size: 61 bytes, params: 3, frame: 5
var value;
if (a1 !== 0) {
value = environment.__proto__.__proto__.__proto__;
value = a0 * ROW_HEIGHT + env3_9;
value = value + 12 + env0_0;
env0_0 = value;
} else {
if (a0 === 0) {
return 0;
}
value = environment.__proto__.__proto__.__proto__;
value = a0 * ROW_HEIGHT + env3_9;
value = value + 12 + env0_0;
}
return value;
}
function pushCategory_84815(a0) { // fn#84815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:674, offset: 0x01f58695, size: 223 bytes, params: 2, frame: 17
var environment;
var value2;
var binding;
var push;
var value4;
let value = a1;
const r3 = value !== undefined ? value : '';
if (a2 === true) {
binding = env0_3;
push = binding.push;
value4 = environment.__proto__.__proto__;
Reflect.apply(push, binding, [{type: env2_8.NSFW, stickersByRow: []}]);
binding = env0_1;
binding.push(1);
} else {
value = a0.filter(function(a0) {
return stickerFormats.includes(a0.format_type);
});
value2 = environment.__proto__.__proto__;
value = (importDefault(22) /* metro dependency 22 */).chunk(value, env0_0);
binding = env0_3;
binding.push({type: env2_8.STICKERS, stickersByRow: value});
binding = env0_1;
binding.push(value.length);
}
env0_2.push(r3);
}
}
function _fun84817(a0, a1) { // fn#84817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:969, offset: 0x01f58790, size: 141 bytes, params: 3, frame: 16
var r4;
let value = environment.__proto__;
if (env1_4 === a0.id) {
env0_4 = a1;
}
const type = a0.type;
value = environment.__proto__.__proto__;
const StickerCategoryTypes = (require(4785) /* metro dependency 4785: StickersTypes */).StickerCategoryTypes;
const GUILD = StickerCategoryTypes.GUILD;
const value2 = type === GUILD;
if (value2) {
value = require(8581) /* metro dependency 8581: AgeGateUtils */;
value = value.shouldNSFWGateGuild(a0.id);
r4 = value;
} else {
r4 = value2;
}
pushCategory_84815(a0.stickers, a0.name, r4);
}
function getSectionHeights(a0) { // fn#84818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:1125, offset: 0x01f5881d, size: 30 bytes, params: 2, frame: 11
return a0.map(_fun84819);
}
function _fun84819(a0, a1) { // fn#84819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11264:1177, offset: 0x01f5883b, size: 61 bytes, params: 3, frame: 5
var value;
if (a1 !== 0) {
value = environment.__proto__.__proto__.__proto__;
value = a0 * ROW_HEIGHT + env3_9;
value = value + 12 + env0_0;
env0_0 = value;
} else {
if (a0 === 0) {
return 0;
}
value = environment.__proto__.__proto__.__proto__;
value = a0 * ROW_HEIGHT + env3_9;
value = value + 12 + env0_0;
}
return value;
}
global.__d(_fun84811, 11078, [31, 11052, 11028, 1346, 11051, 22, 1244, 4785, 8581,
2]) /* metro module 11078, dependencies: [31, 11052, 11028, 1346, 11051, 22, 1244, 4785, 8581, 2] */;
@@ -1,201 +1,208 @@
/* Metro module 15918; source: modules/stickers/useLoadGuildStickerWithCreator.tsx; dependencies: [5, 57, 31, 1878, 6584, 566, 11050, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildStickersStore from './GuildStickersStore.tsx'; /* Metro dependency 6584 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun122789(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:6, offset: 0x02575160, size: 181 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildStickersStore = importDefault(6584) /* metro dependency 6584: GuildStickersStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/stickers/useLoadGuildStickerWithCreator.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/useLoadGuildStickerWithCreator.tsx');
exports.default = useLoadGuildStickersWithCreator;
}
function useLoadGuildStickersWithCreator(a0) { // fn#122790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:241, offset: 0x02575215, size: 187 bytes, params: 2, frame: 18
var r0;
let env0_0 = a0;
let [property, env0_1] = Module00057(ReactModule.useState('loading'), 2);
const useStateFromStores = FluxModule.useStateFromStores;
let object = [GuildStickersStore];
const stickersByGuildId = Reflect.apply(useStateFromStores, FluxModule, [object, _fun122791]);
ReactModule.useEffect(function() {
var AbortController = global.AbortController;
var value2 = new AbortController();
var env0_0 = value2;
var env0_1 = value2.signal;
_fun122793()();
return _fun122797;
}, [a0]);
if (property === 'success') {
object = {status: property};
object.stickers = stickersByGuildId.map(function(a0) {
var r0;
var object;
var value = a0;
var value3 = UserStore.getUser(value.user_id);
if (value3 == null) {
r0 = value;
} else {
object = {};
copyDataProperties(object, value, value3);
object['user'] = value3;
r0 = object;
}
return r0;
});
r0 = object;
} else {
r0 = {status: property};
}
return r0;
function _fun122791() { // fn#122791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:370, offset: 0x025752d0, size: 27 bytes, params: 1, frame: 11
return GuildStickersStore.getStickersByGuildId(env0_0);
}
function _fun122792() { // fn#122792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:422, offset: 0x025752eb, size: 70 bytes, params: 1, frame: 10
const AbortController = global.AbortController;
const env0_1 = new AbortController().signal;
_fun122793()();
return _fun122797;
function _fun122793() { // fn#122793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:466, offset: 0x02575331, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_2(_fun122795);
return _fun122796;
function* _fun122795() { // fn#122795, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:486, offset: 0x02575360, size: 129 bytes, params: 1, frame: 17
var binding;
var binding2;
var property;
var fetchGuildStickersWithCreator;
var value5;
var error;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_0;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
binding2 = env4_1;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
property = binding2[6];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
fetchGuildStickersWithCreator = value.fetchGuildStickersWithCreator;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
binding = env2_1;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
value = Reflect.apply(fetchGuildStickersWithCreator, value, [require, binding]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
yield value;
try {
value = undefined;
value5 = false;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
if (value5) {
return value;
}
try {
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
dependencyMap('success');
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
env2_0 = null;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
}
}
}
function _fun122796() { // fn#122796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:609, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function useLoadGuildStickersWithCreator(a0) { // fn#122790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:241, offset: 0x02575215, size: 187 bytes, params: 2, frame: 18
var r0;
let env0_0 = a0;
const binding = env0_4;
let [property, env0_1] = env0_3(binding.useState('loading'), 2);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
let object = [GuildStickersStore];
const stickersByGuildId = Reflect.apply(useStateFromStores, fluxModule, [object, _fun122791]);
binding.useEffect(function() {
var AbortController = global.AbortController;
var value2 = new AbortController();
var env0_0 = value2;
var env0_1 = value2.signal;
_fun122793()();
return _fun122797;
}, [a0]);
if (property === 'success') {
object = {status: property};
object.stickers = stickersByGuildId.map(function(a0) {
var r0;
var object;
var value = a0;
var value3 = UserStore.getUser(value.user_id);
if (value3 == null) {
r0 = value;
} else {
object = {};
copyDataProperties(object, value, value3);
object['user'] = value3;
r0 = object;
}
return r0;
});
r0 = object;
} else {
r0 = {status: property};
}
return r0;
}
function _fun122791() { // fn#122791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:370, offset: 0x025752d0, size: 27 bytes, params: 1, frame: 11
return GuildStickersStore.getStickersByGuildId(env0_0);
}
function _fun122797() { // fn#122797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:666, offset: 0x025753e1, size: 43 bytes, params: 1, frame: 11
env1_1('loading');
const binding = env0_0;
if (binding != null) {
binding.abort();
}
}
function _fun122792() { // fn#122792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:422, offset: 0x025752eb, size: 70 bytes, params: 1, frame: 10
const AbortController = global.AbortController;
const env0_1 = new AbortController().signal;
_fun122793()();
return _fun122797;
}
function _fun122793() { // fn#122793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:466, offset: 0x02575331, size: 36 bytes, params: 1, frame: 12
const env0_0 = env2_2(_fun122795);
return _fun122796;
}
function _fun122797() { // fn#122797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:666, offset: 0x025753e1, size: 43 bytes, params: 1, frame: 11
env1_1('loading');
const binding = env0_0;
if (binding != null) {
binding.abort();
}
}
function* _fun122795() { // fn#122795, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16126:486, offset: 0x02575360, size: 129 bytes, params: 1, frame: 17
var binding;
var binding2;
var property;
var fetchGuildStickersWithCreator;
var value5;
var error;
if (true) {
value = environment.__proto__.__proto__.__proto__.__proto__;
try {
binding = env4_0;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
binding2 = env4_1;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
property = binding2[6];
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
value = binding(property);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
fetchGuildStickersWithCreator = value.fetchGuildStickersWithCreator;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
binding = env2_1;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
value = Reflect.apply(fetchGuildStickersWithCreator, value, [require, binding]);
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
yield value;
try {
value = undefined;
value5 = false;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
if (value5) {
return value;
}
try {
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
dependencyMap('success');
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
return undefined;
}
try {
env2_0 = null;
} catch (error) {
value = environment.__proto__.__proto__.__proto__;
dependencyMap('error');
value = environment.__proto__.__proto__;
env2_0 = null;
}
}
}
global.__d(_fun122789, 15918, [5, 57, 31, 1878, 6584, 566, 11050,
2]) /* metro module 15918, dependencies: [5, 57, 31, 1878, 6584, 566, 11050, 2] */;