This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,15 @@
// Metro module 9380 (f9381).
import { EmojiPickerItemType } from "./useEmojiPickerData";
export default function getEmojiPickerDataRowItemNativeSection({ label, guildId, emojiCount, emojisDisabled, emojisHidden, isSectionNitroLocked = false }, a1, a2) {
return {
type: EmojiPickerItemType.NATIVE_SECTION,
title: label,
guildId,
emojiCount,
emojisDisabled: isSectionNitroLocked ? [] : Array.from(emojisDisabled),
emojisHidden: Array.from(emojisHidden),
isSectionNitroLocked,
hasPremiumInlineRoadblockHeader: a1,
hasPremiumInlineRoadblockFooter: a2
};
};
@@ -0,0 +1,35 @@
// Metro module 9384 (f9385).
import { EmojiPickerItemType } from "./useEmojiPickerData";
import { EmojiTypes } from "../../../../emojis/EmojiTypes";
export default function getEmojiPickerDataRowItemSlimEmoji(a0) {
return {
type: EmojiPickerItemType.EMOJI_ROW_SLIM,
emojis: a0.emojis.map((emoji) => {
if (emoji.type === EmojiTypes.UNICODE) {
return {
name: emoji.name,
surrogates: emoji.surrogates
};
}
const r15 = a0.emojisDisabled.has(emoji.id);
return emoji.animated && r15 ? {
id: emoji.id,
name: emoji.name,
animated: true,
disabled: true
} : emoji.animated ? {
id: emoji.id,
name: emoji.name,
animated: true
} : r15 ? {
id: emoji.id,
name: emoji.name,
disabled: true
} : {
id: emoji.id,
name: emoji.name
};
}),
isSectionNitroLocked: a0.isSectionNitroLocked === true
};
};
@@ -0,0 +1,9 @@
// Metro module 9381 (f9382).
import { EmojiPickerItemType } from "./useEmojiPickerData";
export default function getEmojiPickerDataRowPremiumInlineRoadblock(a0) {
return {
type: EmojiPickerItemType.PREMIUM_INLINE_ROADBLOCK,
position: a0,
isSectionNitroLocked: true
};
};
@@ -0,0 +1,115 @@
// Metro module 9379 (f9380).
import { useMemo } from "react";
import EmojiStore, { LoadState } from "../../../../emojis/EmojiStore";
import { EmojiCategoryTypes } from "../../../EmojiPickerConstants";
import { EmojiPickerRenderingDataType } from "../EmojiPickerListConstants";
import { useStateFromStores } from "../../../../../_bundle/Module589";
import getEmojiPickerDataRowItemNativeSection from "./getEmojiPickerDataRowItemNativeSection";
import getEmojiPickerDataRowPremiumInlineRoadblock from "./getEmojiPickerDataRowPremiumInlineRoadblock";
import { PremiumUpsellSectionDividerPosition } from "../../../../premium/roadblocks/native/views/PremiumUpsellSectionDivider";
import getEmojiPickerDataRowItemSlimEmoji from "./getEmojiPickerDataRowItemSlimEmoji";
let c6177_8 = {
PLACEHOLDER: 0,
0: "PLACEHOLDER",
TITLE: 1,
1: "TITLE",
EMOJI_ROW: 2,
2: "EMOJI_ROW",
EMOJI_ROW_SLIM: 3,
3: "EMOJI_ROW_SLIM",
EMOJI_ROW_NSFW: 4,
4: "EMOJI_ROW_NSFW",
FOOTER_UPSELL: 5,
5: "FOOTER_UPSELL",
PREMIUM_INLINE_ROADBLOCK: 6,
6: "PREMIUM_INLINE_ROADBLOCK",
NATIVE_SECTION: 7,
7: "NATIVE_SECTION"
};
export default function useEmojiPickerData({ emojiSections, rowSize, isNativeEmojiPickerEnabled }) {
const stateFromStores = useStateFromStores([EmojiStore], () => EmojiStore.loadState === LoadState.Loaded || !isNativeEmojiPickerEnabled);
return useMemo(() => {
const data = [{
type: c6177_8.PLACEHOLDER,
isSectionNitroLocked: false
}];
let c26430_0 = data;
const r7 = {
data,
rowSize,
headerIndices: [],
hasGuildData: stateFromStores,
hasSearchData: false,
hasSearchUpsell: false
};
let c26430_1 = r7;
emojiSections.forEach((emojiSection, index) => {
const isSectionNitroLocked = emojiSection.isSectionNitroLocked === true;
let r6 = !!isSectionNitroLocked;
const r19 = r6 ? emojiSections[index - 1]?.isSectionNitroLocked !== true : r6;
if (r6) {
r6 = emojiSections[index + 1]?.isSectionNitroLocked !== true;
}
if (emojiSection.type !== EmojiPickerRenderingDataType.NATIVE_SECTION) {
if (r19) {
c26430_0.push(getEmojiPickerDataRowPremiumInlineRoadblock(PremiumUpsellSectionDividerPosition.START));
}
if (emojiSection.label != null) {
c26430_0.push({
type: c6177_8.TITLE,
title: emojiSection.label,
isSectionNitroLocked
});
c26430_1.headerIndices.push(c26430_0.length - 1);
}
const r81 = Math.ceil(emojiSection.emojis.length / rowSize);
const r82 = 0 < r81;
let r84 = 0;
if (r82) {
do {
const row = r84;
if (isNativeEmojiPickerEnabled) {
if (row === 0 ? emojiSection.type === EmojiPickerRenderingDataType.EMOJI : row === 0) {
c26430_1.hasSearchData = c26430_1.hasSearchData || emojiSection.footer === EmojiCategoryTypes.SEARCH_RESULTS || emojiSection.footer === EmojiCategoryTypes.PREMIUM_UPSELL;
c26430_0.push(getEmojiPickerDataRowItemSlimEmoji(emojiSection));
}
} else {
const type = emojiSection.type;
if (EmojiPickerRenderingDataType.EMOJI === type) {
c26430_0.push({
type: c6177_8.EMOJI_ROW,
row,
emojis: emojiSection.emojis,
emojisDisabled: emojiSection.emojisDisabled,
footer: emojiSection.footer,
isSectionNitroLocked
});
} else if (EmojiPickerRenderingDataType.NSFW === type) {
c26430_0.push({
type: c6177_8.EMOJI_ROW_NSFW,
isSectionNitroLocked
});
}
}
r84 = row + 1;
} while (r84 < r81);
}
if (emojiSection.footer === EmojiCategoryTypes.PREMIUM_UPSELL) {
c26430_1.hasSearchUpsell = true;
c26430_0.push({
type: c6177_8.FOOTER_UPSELL,
id: EmojiCategoryTypes.PREMIUM_UPSELL,
isSectionNitroLocked
});
}
if (r6) {
c26430_0.push(getEmojiPickerDataRowPremiumInlineRoadblock(PremiumUpsellSectionDividerPosition.END));
}
} else {
c26430_0.push(getEmojiPickerDataRowItemNativeSection(emojiSection, r19, r6));
}
});
return r7;
}, [stateFromStores, emojiSections, rowSize, isNativeEmojiPickerEnabled]);
};
export { c6177_8 as EmojiPickerItemType };