Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,231 @@
|
||||
/* Metro module 9843; source: modules/reactions/native/ReactionEmojiOptionsActionSheet.tsx; dependencies: [31, 27, 4502, 6540, 3969, 33, 4501, 697, 3829, 6796, 566, 8533, 1423, 4080, 8633, 8635, 4573, 1244, 8629, 3857, 6797, 3856, 7151, 6805, 6739, 6231, 6238, 2] */
|
||||
function _fun77137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:6, offset: 0x01df2b02, size: 622 bytes, params: 8, frame: 22
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const emojiStore = importDefault(6540) /* metro dependency 6540: EmojiStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {alignItems: 'center'};
|
||||
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object5.paddingTop = PX_8;
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.gap = PX_16;
|
||||
object4.header = object5;
|
||||
const object6 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
|
||||
'backgroundColor': null, 'borderRadius': null, 'borderWidth': 4};
|
||||
const MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
|
||||
object6.backgroundColor = MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT;
|
||||
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
||||
const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG;
|
||||
object6.borderColor = BORDER_STRONG;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.paddingVertical = PX_8;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingHorizontal = PX_16;
|
||||
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object6.gap = PX_8;
|
||||
object4.reactionPill = object6;
|
||||
object4.emoji = {'width': 50, 'height': 50};
|
||||
object4.emojiText = {'fontSize': 24, 'lineHeight': 50, 'textAlign': 'center'};
|
||||
object4.reactionText = {'fontSize': 24, 'lineHeight': 50};
|
||||
object4.starIcon = {'height': 24, 'width': 24};
|
||||
const ICON_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING;
|
||||
object4.starIconSelected = {tintColor: ICON_FEEDBACK_WARNING};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
object4.starIconUnselected = {tintColor: INTERACTIVE_TEXT_DEFAULT};
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object4]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/reactions/native/ReactionEmojiOptionsActionSheet.tsx');
|
||||
exports.default = ReactionEmojiOptionsActionSheet;
|
||||
}
|
||||
|
||||
function ReactionEmojiOptionsActionSheet({channelId, messageId, reaction, canRemoveReactions}) { // fn#77138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:1012, offset: 0x01df2d70, size: 1572 bytes, params: 2, frame: 41
|
||||
var r14;
|
||||
var r12;
|
||||
var defaultImport2;
|
||||
var getEmojiURL;
|
||||
var animated;
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var string;
|
||||
var t;
|
||||
const styles = useStyles();
|
||||
const emoji = reaction.emoji;
|
||||
const value3 = emoji.id != null;
|
||||
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
|
||||
const value4 = DeveloperMode.useSetting();
|
||||
const defaultImport = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
|
||||
const useExperiment = defaultImport.useExperiment;
|
||||
let object2 = {location: 'ReactionEmojiOptionsActionSheet'};
|
||||
const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport, [object2,
|
||||
{autoTrackExposure: false}]).tidaWebformEnabled;
|
||||
const guildId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore],
|
||||
function() {
|
||||
return SelectedGuildStore.getGuildId();
|
||||
});
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun77140,
|
||||
[emoji.id]);
|
||||
const env0_4 = value5;
|
||||
const value6 = (require(8533) /* metro dependency 8533: EmojiPickerUtils */).useIsFavoriteEmoji(guildId, value5);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
|
||||
if (emoji.id != null) {
|
||||
defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
getEmojiURL = defaultImport2.getEmojiURL;
|
||||
object2 = {};
|
||||
object2.id = emoji.id;
|
||||
animated = emoji.animated;
|
||||
r14 = animated != null && animated;
|
||||
r14 = r14 && !useReducedMotion;
|
||||
r14 = r14 && AnimateEmoji.useSetting();
|
||||
object2.animated = r14;
|
||||
object2.size = 96;
|
||||
r12 = Reflect.apply(getEmojiURL, defaultImport2, [object2]);
|
||||
} else {
|
||||
r12 = undefined;
|
||||
}
|
||||
const r29 = reaction.burst_count > 0 ? reaction.burst_count : reaction.count;
|
||||
const binding = env0_4;
|
||||
const value11 = binding.useCallback(_fun77142, []);
|
||||
const value13 = binding.useCallback(_fun77144, [value11, value5, value6, binding.useCallback(_fun77143, [styles])]);
|
||||
const value14 = binding.useCallback(_fun77148, [emoji.id, value11]);
|
||||
const value15 = binding.useCallback(_fun77149, [r12, value11]);
|
||||
const value16 = binding.useCallback(_fun77150, [channelId, messageId, emoji, value11]);
|
||||
const r28 = emoji.name ?? '';
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
const value18 = ((Component) => <Component src={r12} name={r28} textEmojiStyle={styles.emojiText} fastImageStyle={styles.emoji} />)(importDefault(6739) /* metro dependency 6739: Emoji */);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const view = <View style={styles.header}><View style={styles.reactionPill}>{value18}<Text variant="text-lg/bold" color="text-default" style={styles.reactionText}>{r29}</Text></View><Text variant="text-lg/semibold" color="text-default">{value3 ? ':' + r28 + ':' : r28}</Text></View>;
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
let r19 = value3 && value5 != null;
|
||||
if (r19) {
|
||||
string = intl.string;
|
||||
t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
r19 = <TableRow label={value6 ? Reflect.apply(string, intl, [t.Ay49KA]) : Reflect.apply(string, intl,
|
||||
[t.nNsr67])} onPress={value13} />;
|
||||
}
|
||||
const items5 = [r19];
|
||||
items5[1] = value4 && value3 && <TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Ap2oVy)} onPress={value14} />;
|
||||
items5[2] = value4 && tidaWebformEnabled && value3 && r12 != null && <TableRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cIoudn)} onPress={value15} />;
|
||||
items5[3] = canRemoveReactions && <TableRow label={<Text variant="text-md/semibold" color="text-feedback-critical">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['zx/e4P'])}</Text>} onPress={value16} />;
|
||||
return (
|
||||
<ActionSheet>
|
||||
{view}
|
||||
<TableRowGroup hasIcons={false}>
|
||||
{items5}
|
||||
</TableRowGroup>
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun77140() { // fn#77140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:1389, offset: 0x01df3394, size: 50 bytes, params: 1, frame: 12
|
||||
const id = emoji.id;
|
||||
const value2 = null;
|
||||
return value2 != id ? EmojiStore.getCustomEmojiById(emoji.id) : value2;
|
||||
}
|
||||
|
||||
function _fun77142() { // fn#77142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:1733, offset: 0x01df33c6, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun77143(a0) { // fn#77143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:1788, offset: 0x01df33eb, size: 138 bytes, params: 2, frame: 15
|
||||
const object2 = {};
|
||||
const stylesBinding = styles;
|
||||
copyDataProperties(object2, stylesBinding.starIcon, undefined);
|
||||
if (a0) {
|
||||
copyDataProperties(object2, stylesBinding.starIconSelected, undefined);
|
||||
} else {
|
||||
copyDataProperties(object2, stylesBinding.starIconUnselected, undefined);
|
||||
}
|
||||
return ((Component) => <Component style={object2} />)(a0 ? (require(8633) /* metro dependency 8633: StarIcon */).StarIcon : (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon);
|
||||
}
|
||||
|
||||
function _fun77144() { // fn#77144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:1967, offset: 0x01df3475, size: 207 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
var closure;
|
||||
var binding;
|
||||
var value2;
|
||||
var moduleValue;
|
||||
var value;
|
||||
env0_7();
|
||||
if (env0_4 != null) {
|
||||
closure = content;
|
||||
binding = env0_5;
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(8629) /* metro dependency 8629: EmojiActionCreators */;
|
||||
if (binding) {
|
||||
moduleValue.unfavoriteEmoji(env0_4);
|
||||
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
value.open({key: 'EMOJI_UNFAVORITED', icon: icon_77146, content: closure});
|
||||
} else {
|
||||
moduleValue.favoriteEmoji(env0_4);
|
||||
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
value.open({key: 'EMOJI_FAVORITED', icon: icon_77147, content: closure});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun77148() { // fn#77148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2403, offset: 0x01df3602, size: 97 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (emoji.id != null) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
moduleValue.copy(emoji.id);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
|
||||
env0_7();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun77149() { // fn#77149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2511, offset: 0x01df3663, size: 87 bytes, params: 1, frame: 15
|
||||
var value2;
|
||||
if (env0_6 != null) {
|
||||
value2 = environment.__proto__;
|
||||
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_6);
|
||||
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
|
||||
env0_7();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun77150() { // fn#77150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2610, offset: 0x01df36ba, size: 63 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = importAll(7151) /* metro dependency 7151: ReactionActionCreators */;
|
||||
value.removeEmojiReactions(channelId, messageId, emoji);
|
||||
env0_7();
|
||||
}
|
||||
|
||||
function content() { // fn#77145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2000, offset: 0x01df3544, size: 154 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__.__proto__;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const binding = env1_5;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<Text style={{'marginLeft': 8, 'marginTop': 2}} variant="text-md/bold">
|
||||
{binding ? Reflect.apply(string, intl, [t.in1rga]) : Reflect.apply(string, intl, [t.mE2e8A])}
|
||||
</Text>
|
||||
);
|
||||
}
|
||||
|
||||
function icon_77146() { // fn#77146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2245, offset: 0x01df35de, size: 18 bytes, params: 1, frame: 11
|
||||
return env1_8(false);
|
||||
}
|
||||
|
||||
function icon_77147() { // fn#77147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2343, offset: 0x01df35f0, size: 18 bytes, params: 1, frame: 11
|
||||
return env1_8(true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user