Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,406 @@
|
||||
/* Metro module 8357; source: modules/interaction_components/ComponentStateContext.tsx; dependencies: [57, 31, 8057, 3785, 1379, 1945, 4798, 1878, 8358, 33, 1909, 4633, 4629, 566, 8229, 6860, 8360, 8056, 694, 4594, 4627, 2] */
|
||||
function _fun66523(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:6, offset: 0x01bffa12, size: 439 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const getApplicationWidgetContainerId = function({applicationId}) {
|
||||
return 'app-widget-' + applicationId;
|
||||
};
|
||||
const getParentsNotSupported = function(a0) {
|
||||
var env0_0 = 'ApplicationWidget';
|
||||
return _fun66540;
|
||||
};
|
||||
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 interactionStore = importDefault(8057) /* metro dependency 8057: InteractionStore */;
|
||||
const lurkingStore = importDefault(3785) /* metro dependency 3785: LurkingStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const localInteractionComponentStateStore = importDefault(8358) /* metro dependency 8358: LocalInteractionComponentStateStore */;
|
||||
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const closure = getActionComponentState;
|
||||
const closure2 = useShouldDisableInteractiveComponents;
|
||||
const env0_16 = value.createContext(null);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/ComponentStateContext.tsx');
|
||||
exports.getActionComponentState = closure;
|
||||
exports.useShouldDisableInteractiveComponents = closure2;
|
||||
exports.ComponentStateContextProvider = ComponentStateContextProvider;
|
||||
exports.useComponentState = useComponentState;
|
||||
exports.useComponentStateContext = useComponentStateContext;
|
||||
exports.useComponentContainerId = useComponentContainerId;
|
||||
exports.useComponentError = useComponentError;
|
||||
}
|
||||
|
||||
function useComponentValidatorState(a0, a1) { // fn#66525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:1888, offset: 0x01bffbeb, size: 184 bytes, params: 3, frame: 18
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const value2 = env0_4.useContext(env0_16);
|
||||
const value3 = env0_4.useCallback(_fun66526, [a0, value2]);
|
||||
env0_4.useEffect(_fun66528, [value2.validators, value3, a1, a0.id]);
|
||||
const validationErrors = value2.validationErrors;
|
||||
const value = null;
|
||||
const r3 = value == validationErrors ? undefined : validationErrors[a0.id];
|
||||
return {error: value != r3 ? r3 : value, validate: value3};
|
||||
}
|
||||
|
||||
function useComponentStateForMessage(a0, a1, a2) { // fn#66531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:2406, offset: 0x01bffdad, size: 335 bytes, params: 4, frame: 25
|
||||
var object2;
|
||||
let value = a1;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a2;
|
||||
const interactionComponentState = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocalInteractionComponentStateStore],
|
||||
_fun66532);
|
||||
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([InteractionStore], _fun66533,
|
||||
[a0]);
|
||||
const r3 = useShouldDisableInteractiveComponents(a0.channel_id) || value;
|
||||
value = useComponentValidatorState(a2, interactionComponentState);
|
||||
const error = value.error;
|
||||
const validate = value.validate;
|
||||
const r12 = a0.applicationId ?? a0.author.id;
|
||||
object2 = {state: interactionComponentState};
|
||||
object2.executeStateUpdate = env0_4.useCallback(_fun66534, [a0.channel_id, a0.flags, a0.id, a2.customId, a2.type,
|
||||
a2.id, r12, validate]);
|
||||
object2.isDisabled = r3 && isInteractionComponent(a2);
|
||||
object2.visualState = getActionComponentState(value3, a2, r3);
|
||||
object2.error = error;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useComponentStateForModal(a0, a1, a2) { // fn#66535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:3255, offset: 0x01c0000e, size: 303 bytes, params: 4, frame: 22
|
||||
var object2;
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
const interactionComponentState = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocalInteractionComponentStateStore],
|
||||
_fun66536);
|
||||
const property = interactionComponentState(env0_4.useState(a2), 1)[0];
|
||||
const {error, validate} = useComponentValidatorState(a1, interactionComponentState);
|
||||
var env0_4 = validate;
|
||||
const value5 = env0_4.useCallback(_fun66537, [a0.customId, a1.id, validate]);
|
||||
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun66538);
|
||||
object2 = {};
|
||||
const value6 = null;
|
||||
const r6 = value6 == interactionComponentState ? property : interactionComponentState;
|
||||
object2.state = value6 != r6 ? r6 : value6;
|
||||
object2.executeStateUpdate = value5;
|
||||
object2.isDisabled = false;
|
||||
const ActionComponentState = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).ActionComponentState;
|
||||
const NORMAL = ActionComponentState.NORMAL;
|
||||
object2.visualState = NORMAL;
|
||||
object2.error = error;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function getParentsNotSupported(a0) { // fn#66539, offset: 0x01c001f8, size: 19 bytes, params: 2, frame: 2
|
||||
return _fun66540;
|
||||
}
|
||||
|
||||
function isInteractionComponent(a0) { // fn#66541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:223, offset: 0x01c0024b, size: 336 bytes, params: 2, frame: 15
|
||||
const type = a0.type;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const BUTTON = ComponentType.BUTTON;
|
||||
if (BUTTON === type) {
|
||||
return a0.style !== (require(1909) /* metro dependency 1909: Server */).ButtonStyle.LINK;
|
||||
}
|
||||
const STRING_SELECT = ComponentType.STRING_SELECT;
|
||||
if (STRING_SELECT === type) {
|
||||
return true;
|
||||
}
|
||||
const USER_SELECT = ComponentType.USER_SELECT;
|
||||
if (USER_SELECT === type) {
|
||||
return true;
|
||||
}
|
||||
const ROLE_SELECT = ComponentType.ROLE_SELECT;
|
||||
if (ROLE_SELECT === type) {
|
||||
return true;
|
||||
}
|
||||
const MENTIONABLE_SELECT = ComponentType.MENTIONABLE_SELECT;
|
||||
if (MENTIONABLE_SELECT === type) {
|
||||
return true;
|
||||
}
|
||||
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
|
||||
if (CHANNEL_SELECT === type) {
|
||||
return true;
|
||||
}
|
||||
const ACTION_ROW = ComponentType.ACTION_ROW;
|
||||
if (ACTION_ROW !== type) {
|
||||
ComponentType.TEXT_INPUT;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getActionComponentState(a0, a1) { // fn#66542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:662, offset: 0x01c0039b, size: 299 bytes, params: 3, frame: 20
|
||||
const value = a2;
|
||||
let r2 = value !== undefined ? value : false;
|
||||
const ActionComponentState = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).ActionComponentState;
|
||||
const NORMAL = ActionComponentState.NORMAL;
|
||||
let r0 = a0 != null && a0.state !== (require(4629) /* metro dependency 4629: InteractionTypes */).InteractionState.FAILED ? a0.data.interactionType !== (require(1909) /* metro dependency 1909: Server */).InteractionTypes.MESSAGE_COMPONENT ? isInteractionComponent(a1) ? ActionComponentState.DISABLED : NORMAL : a0.data.componentId === a1.id ? ActionComponentState.LOADING : isInteractionComponent(a1) ? ActionComponentState.DISABLED : NORMAL : NORMAL;
|
||||
r2 = r2 && isInteractionComponent(a1);
|
||||
r0 = r2 ? ActionComponentState.DISABLED : r0;
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useShouldDisableInteractiveComponents(a0) { // fn#66543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:1186, offset: 0x01c004c6, size: 379 bytes, params: 2, frame: 23
|
||||
var r4;
|
||||
var r2;
|
||||
const channel = ChannelStore.getChannel(a0);
|
||||
const value3 = undefined;
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildVerificationStore],
|
||||
_fun66544, [channel]);
|
||||
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([LurkingStore], _fun66545,
|
||||
[channel]);
|
||||
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore, UserStore],
|
||||
_fun66546);
|
||||
const useUserCommunicationDisabledModule = require(8229) /* metro dependency 8229: useUserCommunicationDisabled */;
|
||||
const useCurrentUserCommunicationDisabled = useUserCommunicationDisabledModule.useCurrentUserCommunicationDisabled;
|
||||
const property = env0_3(Reflect.apply(useCurrentUserCommunicationDisabled, useUserCommunicationDisabledModule,
|
||||
[channel == null ? value3 : channel.guild_id]), 2)[1];
|
||||
let value = require(6860) /* metro dependency 6860: ThreadHooks */;
|
||||
value = value.useIsThreadModerator(channel);
|
||||
const value9 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanUnarchiveThread(channel);
|
||||
let r0 = value4 ? value5 : !value4;
|
||||
r0 = !r0 ? value6 : r0;
|
||||
if (!r0) {
|
||||
r4 = channel != null && channel.isLockedThread();
|
||||
r4 = r4 && !value;
|
||||
r0 = r4;
|
||||
}
|
||||
if (!r0) {
|
||||
r2 = channel != null && channel.isArchivedThread();
|
||||
r2 = r2 && !value9;
|
||||
r0 = r2;
|
||||
}
|
||||
r0 = !r0 ? property : r0;
|
||||
return !!r0;
|
||||
}
|
||||
|
||||
function ComponentStateContextProvider({children, message, modal, applicationWidget, validators, validationErrors, setValidationErrors, shouldDisableInteractiveComponents}) { // fn#66547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:4192, offset: 0x01c00745, size: 176 bytes, params: 2, frame: 23
|
||||
const env0_4 = validationErrors;
|
||||
shouldDisableInteractiveComponents = !(shouldDisableInteractiveComponents === undefined) && shouldDisableInteractiveComponents;
|
||||
const value2 = env0_4.useMemo(_fun66548, [message, modal, applicationWidget, shouldDisableInteractiveComponents,
|
||||
validators, validationErrors, setValidationErrors]);
|
||||
const Provider = env0_16.Provider;
|
||||
return (
|
||||
<Provider value={value2}>
|
||||
{children}
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function useComponentState(a0, a1) { // fn#66552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:5314, offset: 0x01c009f8, size: 42 bytes, params: 3, frame: 13
|
||||
return env0_4.useContext(env0_16).useComponentState(a0, a1);
|
||||
}
|
||||
|
||||
function useComponentStateContext() { // fn#66553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:5420, offset: 0x01c00a22, size: 24 bytes, params: 1, frame: 11
|
||||
return env0_4.useContext(env0_16);
|
||||
}
|
||||
|
||||
function useComponentContainerId() { // fn#66554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:5506, offset: 0x01c00a3a, size: 30 bytes, params: 1, frame: 11
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
return Reflect.apply(useContext, binding, [env0_16]).containerId;
|
||||
}
|
||||
|
||||
function useComponentError(a0) { // fn#66555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:5597, offset: 0x01c00a58, size: 65 bytes, params: 2, frame: 12
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const validationErrors = Reflect.apply(useContext, binding, [env0_16]).validationErrors;
|
||||
const value = null;
|
||||
const r1 = value == validationErrors ? undefined : validationErrors[a0.id];
|
||||
return value != r1 ? r1 : value;
|
||||
}
|
||||
|
||||
function _fun66526(a0) { // fn#66526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:1972, offset: 0x01bffca3, size: 117 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(8360) /* metro dependency 8360: validateComponent */;
|
||||
value = value(env0_0, a0, env0_2.modal != null ? 'modal' : 'message');
|
||||
if (env0_2.setValidationErrors != null) {
|
||||
env0_2.setValidationErrors(_fun66527);
|
||||
}
|
||||
return value == null;
|
||||
}
|
||||
|
||||
function _fun66528() { // fn#66528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:2147, offset: 0x01bffd3e, size: 51 bytes, params: 1, frame: 12
|
||||
const closure = currentValidate;
|
||||
const validators = env0_2.validators;
|
||||
if (validators != null) {
|
||||
validators.add(closure);
|
||||
}
|
||||
return _fun66530;
|
||||
}
|
||||
|
||||
function _fun66532() { // fn#66532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:2491, offset: 0x01bffefc, size: 42 bytes, params: 1, frame: 13
|
||||
return LocalInteractionComponentStateStore.getInteractionComponentState(env0_0.id, importDefault.id);
|
||||
}
|
||||
|
||||
function _fun66533() { // fn#66533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:2574, offset: 0x01bfff26, size: 27 bytes, params: 1, frame: 11
|
||||
return InteractionStore.getInteraction(env0_0);
|
||||
}
|
||||
|
||||
function _fun66534(a0) { // fn#66534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:2809, offset: 0x01bfff41, size: 205 bytes, params: 2, frame: 17
|
||||
var value2;
|
||||
var value3;
|
||||
var moduleValue;
|
||||
var executeMessageComponentInteraction;
|
||||
var object2;
|
||||
var binding;
|
||||
var id;
|
||||
if (validate(a0)) {
|
||||
value2 = environment.__proto__;
|
||||
value3 = ChannelStore.getChannel(env0_0.channel_id);
|
||||
if (value3 != null && importDefault.customId != null) {
|
||||
moduleValue = require(8056) /* metro dependency 8056: InteractionUtils */;
|
||||
executeMessageComponentInteraction = moduleValue.executeMessageComponentInteraction;
|
||||
object2 = {};
|
||||
object2.componentType = importDefault.type;
|
||||
binding = env0_0;
|
||||
id = binding.id;
|
||||
object2.messageId = id;
|
||||
object2.messageFlags = binding.flags;
|
||||
object2.customId = importDefault.customId;
|
||||
id = importDefault.id;
|
||||
object2.componentId = id;
|
||||
object2.applicationId = env0_3;
|
||||
id = value3.id;
|
||||
object2.channelId = id;
|
||||
object2.guildId = value3.guild_id;
|
||||
object2.localState = a0;
|
||||
Reflect.apply(executeMessageComponentInteraction, moduleValue, [object2]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function _fun66536() { // fn#66536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:3338, offset: 0x01c0013d, size: 43 bytes, params: 1, frame: 13
|
||||
return LocalInteractionComponentStateStore.getInteractionComponentState(env0_0.customId, require.id);
|
||||
}
|
||||
|
||||
function _fun66537(a0) { // fn#66537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:3494, offset: 0x01c00168, size: 112 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
let value = a0 == null;
|
||||
if (value) {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
value.dispatch({type: 'SET_INTERACTION_COMPONENT_STATE', rootContainerId: env0_0.customId,
|
||||
componentId: require.id,
|
||||
state: a0});
|
||||
value = !!validate(a0);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun66538() { // fn#66538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:3666, offset: 0x01c001d8, size: 32 bytes, params: 1, frame: 11
|
||||
if (interactionComponentState == null) {
|
||||
env0_5(importDefault);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun66540() { // fn#66540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:3858, offset: 0x01c0020b, size: 64 bytes, params: 1, frame: 14
|
||||
const Error = global.Error;
|
||||
const value = '' + env0_0 + ' does not support parents';
|
||||
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
const error = new Error();
|
||||
throw error instanceof Object ? error : value2;
|
||||
}
|
||||
|
||||
function _fun66544() { // fn#66544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:1247, offset: 0x01c00641, size: 63 bytes, params: 1, frame: 12
|
||||
return env0_0?.guild_id == null || GuildVerificationStore.canChatInGuild(env0_0.guild_id);
|
||||
}
|
||||
|
||||
function _fun66545() { // fn#66545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:1356, offset: 0x01c00680, size: 63 bytes, params: 1, frame: 12
|
||||
return env0_0?.guild_id != null && LurkingStore.isLurking(env0_0.guild_id);
|
||||
}
|
||||
|
||||
function _fun66546() { // fn#66546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:1462, offset: 0x01c006bf, size: 134 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
const value4 = null;
|
||||
const value5 = undefined;
|
||||
const r1 = value4 != (value4 == env0_0 ? value5 : env0_0.guild_id) && value4 != currentUser ? value4 == GuildMemberStore.getMember(value4 == env0_0 ? value5 : env0_0.guild_id,
|
||||
currentUser.id) ? value5 : GuildMemberStore.getMember(value4 == env0_0 ? value5 : env0_0.guild_id,
|
||||
currentUser.id).isPending : value4;
|
||||
return value4 != r1 && r1;
|
||||
}
|
||||
|
||||
function _fun66548() { // fn#66548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:4394, offset: 0x01c007f5, size: 341 bytes, params: 1, frame: 19
|
||||
var environment;
|
||||
var object2;
|
||||
var value2;
|
||||
var getApplicationWidgetContainerIdBinding;
|
||||
var value3;
|
||||
var bind;
|
||||
var value4;
|
||||
let messageBinding = message;
|
||||
if (messageBinding != null) {
|
||||
value4 = environment.__proto__;
|
||||
bind = useComponentStateForMessage.bind;
|
||||
messageBinding = message;
|
||||
return {useComponentState: Reflect.apply(bind, useComponentStateForMessage, [null, messageBinding,
|
||||
shouldDisableInteractiveComponents]), channelId: messageBinding.channel_id, containerId: messageBinding.id,
|
||||
message: messageBinding, validators: validators, getParents: getParents_66549};
|
||||
}
|
||||
let modalBinding = modal;
|
||||
if (modalBinding != null) {
|
||||
value3 = environment.__proto__;
|
||||
bind = useComponentStateForModal.bind;
|
||||
modalBinding = modal;
|
||||
return {useComponentState: Reflect.apply(bind, useComponentStateForModal, [null, modalBinding]),
|
||||
channelId: modalBinding.channelId, containerId: modalBinding.customId, modal: modalBinding,
|
||||
validators: validators, validationErrors: validationErrors, setValidationErrors: setValidationErrors,
|
||||
getParents: getParents_66550};
|
||||
}
|
||||
let applicationWidgetBinding = applicationWidget;
|
||||
if (applicationWidgetBinding != null) {
|
||||
object2 = {};
|
||||
object2.useComponentState = useComponentState_66551;
|
||||
value2 = environment.__proto__;
|
||||
getApplicationWidgetContainerIdBinding = getApplicationWidgetContainerId;
|
||||
applicationWidgetBinding = applicationWidget;
|
||||
object2.containerId = getApplicationWidgetContainerIdBinding(applicationWidgetBinding);
|
||||
object2.applicationWidget = applicationWidgetBinding;
|
||||
object2.validators = validators;
|
||||
object2.validationErrors = validationErrors;
|
||||
object2.setValidationErrors = setValidationErrors;
|
||||
object2.getParents = getParentsNotSupported('ApplicationWidget');
|
||||
return object2;
|
||||
}
|
||||
const Error = global.Error;
|
||||
throw new Error('ComponentStateContextProvider requires at least one of message, modal, or applicationWidget');
|
||||
}
|
||||
|
||||
function currentValidate() { // fn#66529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:2174, offset: 0x01bffd71, size: 20 bytes, params: 1, frame: 11
|
||||
return env1_3(require);
|
||||
}
|
||||
|
||||
function _fun66530() { // fn#66530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:2237, offset: 0x01bffd85, size: 40 bytes, params: 1, frame: 11
|
||||
const validators = env1_2.validators;
|
||||
if (validators != null) {
|
||||
validators.delete(currentValidate);
|
||||
}
|
||||
}
|
||||
|
||||
function getParents_66549(a0) { // fn#66549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:4552, offset: 0x01c0094a, size: 55 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(4627) /* metro dependency 4627: InteractionComponentUtils */).getParents(message.components, a0);
|
||||
}
|
||||
|
||||
function getParents_66550(a0) { // fn#66550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:4785, offset: 0x01c00981, size: 55 bytes, params: 2, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(4627) /* metro dependency 4627: InteractionComponentUtils */).getParents(modal.components, a0);
|
||||
}
|
||||
|
||||
function useComponentState_66551() { // fn#66551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8542:4884, offset: 0x01c009b8, size: 64 bytes, params: 1, frame: 14
|
||||
const Error = global.Error;
|
||||
const value = '' + env0_0 + ' does not support state';
|
||||
const value2 = Object.create(Error.prototype, {constructor: {value: Error}});
|
||||
const error = new Error();
|
||||
throw error instanceof Object ? error : value2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/* Metro module 8356; source: modules/interaction_components/InteractionComponentConstants.tsx; dependencies: [2] */
|
||||
function _fun66522(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8541:6, offset: 0x01bff9b6, size: 92 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/InteractionComponentConstants.tsx');
|
||||
exports.TEXT_DISPLAY_COMPONENT_MARKDOWN_RENDER_OPTIONS = {'allowList': true, 'allowHeading': true,
|
||||
'allowLinks': true, 'previewLinkTarget': true};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/* Metro module 4633; source: modules/interaction_components/InteractionComponentTypes.tsx; dependencies: [2] */
|
||||
function _fun39866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4811:6, offset: 0x010ee195, size: 228 bytes, params: 8, frame: 17
|
||||
var object3;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
object3 = {NORMAL: 0};
|
||||
object3[0] = 'NORMAL';
|
||||
object3.LOADING = 1;
|
||||
object3[1] = 'LOADING';
|
||||
object3.DISABLED = 2;
|
||||
object3[2] = 'DISABLED';
|
||||
const object4 = {STRING: 1};
|
||||
object4[1] = 'STRING';
|
||||
object4.USER = 2;
|
||||
object4[2] = 'USER';
|
||||
object4.ROLE = 3;
|
||||
object4[3] = 'ROLE';
|
||||
object4.CHANNEL = 4;
|
||||
object4[4] = 'CHANNEL';
|
||||
object4.GUILD = 5;
|
||||
object4[5] = 'GUILD';
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/InteractionComponentTypes.tsx');
|
||||
exports.ActionComponentState = object3;
|
||||
exports.asComponentId = function(a0) {
|
||||
return a0;
|
||||
};
|
||||
exports.SelectOptionType = object4;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,187 @@
|
||||
/* Metro module 15734; source: modules/interaction_components/InteractionModalManager.tsx; dependencies: [7, 6, 15, 17, 18, 5, 4234, 8057, 661, 1909, 15735, 1962, 683, 1870, 1216, 15746, 15749, 4860, 2] */
|
||||
function _fun120806(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15942:6, offset: 0x02536057, size: 325 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
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 applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */;
|
||||
const interactionStore = importDefault(8057) /* metro dependency 8057: InteractionStore */;
|
||||
const env0_11 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
|
||||
value = _fun120815(value);
|
||||
value = new value();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/InteractionModalManager.tsx');
|
||||
exports.default = value;
|
||||
exports.INTERACTION_IFRAME_MODAL_ANALYTICS_TYPE = 'interaction_iframe_modal';
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_120807() { // fn#120807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15942:203, offset: 0x0253619c, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_120807_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _handleInteractionModalCreate() { // fn#120810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15942:429, offset: 0x025361fe, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_8(_fun120812).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fun120815(a0) { // fn#120815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15942:1701, offset: 0x025364de, size: 42 bytes, params: 2, frame: 14
|
||||
const closure = InteractionModalManager;
|
||||
env0_7(closure, a0);
|
||||
return env0_3(closure);
|
||||
}
|
||||
|
||||
function* _fun120812(a0) { // fn#120812, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15942:510, offset: 0x0253623b, size: 265 bytes, params: 2, frame: 20
|
||||
var environment;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_0;
|
||||
var binding2 = env2_2;
|
||||
yield binding(binding2[11])(binding2[10], binding2.paths);
|
||||
var value4 = undefined;
|
||||
if (false) {
|
||||
return value4;
|
||||
}
|
||||
value4.openInteractionModal(a0);
|
||||
binding = env2_1;
|
||||
var binding3 = env2_2;
|
||||
var value6 = binding(binding3[12]);
|
||||
var track = value6.track;
|
||||
var OPEN_MODAL = env2_11.OPEN_MODAL;
|
||||
Reflect.apply(track, value6, [OPEN_MODAL, {type: 'interaction_modal', application_id: a0.application.id}]);
|
||||
var AndroidPullModeRenderingExperiment = env2_0(binding3[13]).AndroidPullModeRenderingExperiment;
|
||||
var getCurrentConfig = AndroidPullModeRenderingExperiment.getCurrentConfig;
|
||||
if (Reflect.apply(getCurrentConfig, AndroidPullModeRenderingExperiment, []).treatmentId >= 2) {
|
||||
env2_1(env2_2[14]).addBreadcrumb({'category': 'interaction_modal', 'message': 'Interaction modal opened',
|
||||
data: getInteractionModalDebugData(a0)});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function InteractionModalManager(a0) { // fn#120816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15942:1713, offset: 0x02536508, size: 194 bytes, params: 2, frame: 20
|
||||
var environment;
|
||||
var r0;
|
||||
var Reflect;
|
||||
let value = copyRestArgs(0, undefined);
|
||||
let value2 = environment.__proto__;
|
||||
let binding = env1_4;
|
||||
binding(this, InteractionModalManager);
|
||||
const items = [];
|
||||
arraySpread(items, value, 0, items);
|
||||
value = env1_6(InteractionModalManager);
|
||||
binding = env1_5;
|
||||
if (_isNativeReflectConstruct_120807()) {
|
||||
Reflect = global.Reflect;
|
||||
value = Reflect.construct(value, items, env1_6(this).constructor);
|
||||
r0 = value;
|
||||
} else {
|
||||
value = value.apply(this, items);
|
||||
r0 = value;
|
||||
}
|
||||
value = binding(this, r0);
|
||||
value.iframeModalOpenTimeMs = undefined;
|
||||
value.actions = {INTERACTION_MODAL_CREATE: function(a0) {
|
||||
_fun120818(a0);
|
||||
}, INTERACTION_IFRAME_MODAL_CREATE: INTERACTION_IFRAME_MODAL_CREATE_120819,
|
||||
INTERACTION_IFRAME_MODAL_CLOSE: INTERACTION_IFRAME_MODAL_CLOSE_120820,
|
||||
RPC_APP_DISCONNECTED: function({application}) {
|
||||
var value2 = InteractionStore.getIFrameModalApplicationId();
|
||||
if (application.id === value2 && value2 != null) {
|
||||
importDefault(dependencyMap[16])(value2, InteractionStore.getIFrameModalKey());
|
||||
}
|
||||
}};
|
||||
return value;
|
||||
}
|
||||
|
||||
function getInteractionModalDebugData(a0) { // fn#120813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15942:759, offset: 0x02536344, size: 410 bytes, params: 2, frame: 17
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
const interactionDebugContext = env3_10.getInteractionDebugContext(a0.nonce);
|
||||
const value3 = undefined;
|
||||
const data = interactionDebugContext == null ? value3 : interactionDebugContext.interaction.data;
|
||||
const application = env3_9.getApplication(a0.application.id);
|
||||
const object2 = {};
|
||||
object2.interactionId = a0.id;
|
||||
object2.nonce = a0.nonce;
|
||||
object2.channelId = a0.channelId;
|
||||
object2.applicationId = a0.application.id;
|
||||
object2.hasApplicationRecord = application != null;
|
||||
object2.hasActionApplicationBot = a0.application.bot != null;
|
||||
object2.componentCount = a0.components.length;
|
||||
object2.componentTypes = a0.components.map(function(a0) {
|
||||
return a0.type;
|
||||
});
|
||||
let interactionType = data == null ? value3 : data.interactionType;
|
||||
object2.sourceInteractionType = interactionType;
|
||||
object2.sourceApplicationId = data == null ? value3 : data.applicationId;
|
||||
object2.sourceMessageId = interactionDebugContext == null ? value3 : interactionDebugContext.messageId;
|
||||
interactionType = data == null ? value3 : data.interactionType;
|
||||
let InteractionTypes = env3_0(env3_2[9]).InteractionTypes;
|
||||
let MESSAGE_COMPONENT = InteractionTypes.MESSAGE_COMPONENT;
|
||||
object2.hasSourceCustomId = interactionType !== MESSAGE_COMPONENT ? value3 : data.customId != null;
|
||||
interactionType = data == null ? value3 : data.interactionType;
|
||||
InteractionTypes = env3_0(env3_2[9]).InteractionTypes;
|
||||
MESSAGE_COMPONENT = InteractionTypes.MESSAGE_COMPONENT;
|
||||
object2.hasSourceComponentId = interactionType !== MESSAGE_COMPONENT ? value3 : data.componentId != null;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function InteractionModalManagerINTERACTION_MODAL_CREATE(a0) { // fn#120817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15942:2035, owner: InteractionModalManager.INTERACTION_MODAL_CREATE, offset: 0x025365ca, size: 24 bytes, params: 2, frame: 11
|
||||
(function() {
|
||||
return _handleInteractionModalCreate.apply(this, arguments);
|
||||
})(a0);
|
||||
}
|
||||
|
||||
function InteractionModalManagerINTERACTION_IFRAME_MODAL_CREATE(a0) { // fn#120819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15942:2176, owner: InteractionModalManager.INTERACTION_IFRAME_MODAL_CREATE, offset: 0x025365e2, size: 125 bytes, params: 2, frame: 16
|
||||
const binding = env0_0;
|
||||
const Date = global.Date;
|
||||
binding.iframeModalOpenTimeMs = Date.now();
|
||||
(importDefault(15746) /* metro dependency 15746: openInteractionIframeModalNative */)(a0);
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
|
||||
Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: 'interaction_iframe_modal',
|
||||
application_id: a0.application.id}]);
|
||||
}
|
||||
|
||||
function InteractionModalManagerINTERACTION_IFRAME_MODAL_CLOSE({applicationId}) { // fn#120820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15942:2380, owner: InteractionModalManager.INTERACTION_IFRAME_MODAL_CLOSE, offset: 0x0253665f, size: 129 bytes, params: 2, frame: 17
|
||||
const binding = env0_0;
|
||||
const iframeModalOpenTimeMs = binding.iframeModalOpenTimeMs;
|
||||
const r6 = iframeModalOpenTimeMs != null ? global.Date.now() - iframeModalOpenTimeMs : undefined;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const MODAL_DISMISSED = AnalyticEvents.MODAL_DISMISSED;
|
||||
Reflect.apply(track, defaultImport, [MODAL_DISMISSED, {type: 'interaction_iframe_modal',
|
||||
application_id: applicationId, duration_open_ms: r6}]);
|
||||
binding.iframeModalOpenTimeMs = undefined;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
/* Metro module 12952; source: modules/interaction_components/InteractionModalStore.tsx; dependencies: [6, 7, 15, 17, 18, 1909, 44, 8055, 672, 7067, 566, 694, 2] */
|
||||
function _fun98672(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#98672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:6, offset: 0x021b1fa4, size: 391 bytes, params: 8, frame: 21
|
||||
var object2;
|
||||
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 */;
|
||||
object2 = {IN_FLIGHT: 0};
|
||||
object2[0] = 'IN_FLIGHT';
|
||||
object2.ERRORED = 1;
|
||||
object2[1] = 'ERRORED';
|
||||
object2.SUCCEEDED = 2;
|
||||
object2[2] = 'SUCCEEDED';
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
let value = _fun98676(Store);
|
||||
value.displayName = 'InteractionModalStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: function() {
|
||||
env0_8 = null;
|
||||
env0_9 = null;
|
||||
env0_10 = null;
|
||||
env0_11 = null;
|
||||
env0_12 = null;
|
||||
return true;
|
||||
}, INTERACTION_MODAL_CREATE: INTERACTION_MODAL_CREATE_98680,
|
||||
INTERACTION_IFRAME_MODAL_CREATE: INTERACTION_IFRAME_MODAL_CREATE_98681,
|
||||
INTERACTION_QUEUE: INTERACTION_QUEUE_98682, INTERACTION_SUCCESS: INTERACTION_SUCCESS_98687,
|
||||
INTERACTION_FAILURE: INTERACTION_FAILURE_98688});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/InteractionModalStore.tsx');
|
||||
exports.default = value;
|
||||
exports.InteractionModalState = object2;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_98673() { // fn#98673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:148, offset: 0x021b212b, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_98673_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun98676(a0) { // fn#98676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:472, offset: 0x021b218d, size: 74 bytes, params: 2, frame: 15
|
||||
const closure = InteractionModalStore;
|
||||
env0_7(closure, a0);
|
||||
return env0_4(closure, [{key: 'getModalState', value: value_98678}]);
|
||||
}
|
||||
|
||||
function INTERACTION_MODAL_CREATE_98680({nonce}) { // fn#98680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1023, offset: 0x021b220a, size: 83 bytes, params: 2, frame: 16
|
||||
var defaultImport;
|
||||
if (nonce === env0_12) {
|
||||
defaultImport = importDefault(7067) /* metro dependency 7067: MessageActionCreators */;
|
||||
defaultImport.deleteMessage(env0_11, env0_10, true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function INTERACTION_QUEUE_98682({messageId, nonce, data, preflight}) { // fn#98682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1319, offset: 0x021b225d, size: 389 bytes, params: 2, frame: 21
|
||||
var r9;
|
||||
var defaultImport;
|
||||
var IN_FLIGHT;
|
||||
var closure;
|
||||
var channelId;
|
||||
const interactionType = data.interactionType;
|
||||
const InteractionTypes = (require(1909) /* metro dependency 1909: Server */).InteractionTypes;
|
||||
const APPLICATION_COMMAND = InteractionTypes.APPLICATION_COMMAND;
|
||||
if (APPLICATION_COMMAND === interactionType) {
|
||||
channelId = data.channelId;
|
||||
} else {
|
||||
var MODAL_SUBMIT = InteractionTypes.MODAL_SUBMIT;
|
||||
if (MODAL_SUBMIT === interactionType) {
|
||||
defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
r9 = env0_8 == null || env0_9 === env0_13.ERRORED;
|
||||
r9 = !r9 ? env0_9 === env0_13.SUCCEEDED : r9;
|
||||
defaultImport(r9, 'cannot submit multiple modals at once');
|
||||
IN_FLIGHT = env0_13.IN_FLIGHT;
|
||||
closure = function(a0) {
|
||||
global.setTimeout(_fun98684, a0);
|
||||
};
|
||||
if (preflight != null) {
|
||||
closure(2 * (importDefault(672) /* metro dependency 672: Durations */).Millis.MINUTE);
|
||||
preflight.then(_fun98685).catch(_fun98686);
|
||||
} else {
|
||||
closure(10 * (importDefault(672) /* metro dependency 672: Durations */).Millis.SECOND);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function INTERACTION_SUCCESS_98687({nonce}) { // fn#98687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1963, offset: 0x021b24ba, size: 53 bytes, params: 2, frame: 3
|
||||
return nonce != null && nonce === env0_8 && true;
|
||||
}
|
||||
|
||||
function INTERACTION_FAILURE_98688({nonce}) { // fn#98688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:2071, offset: 0x021b24ef, size: 53 bytes, params: 2, frame: 3
|
||||
return nonce != null && nonce === env0_8 && true;
|
||||
}
|
||||
|
||||
function value_98678(a0) { // fn#98678, offset: 0x021b21d7, size: 22 bytes, params: 2, frame: 4
|
||||
return a0 !== env1_8 ? null : env1_9;
|
||||
}
|
||||
|
||||
function startTimeout(a0) { // fn#98683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1668, owner: INTERACTION_QUEUE_98682.startTimeout, offset: 0x021b23e2, size: 30 bytes, params: 2, frame: 13
|
||||
global.setTimeout(_fun98684, a0);
|
||||
}
|
||||
|
||||
function _fun98685() { // fn#98685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1802, offset: 0x021b2453, size: 58 bytes, params: 1, frame: 12
|
||||
const startTimeoutBinding = startTimeout;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const SECOND = Millis.SECOND;
|
||||
return startTimeoutBinding(10 * SECOND);
|
||||
}
|
||||
|
||||
function _fun98686() { // fn#98686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1854, offset: 0x021b248d, size: 45 bytes, params: 1, frame: 11
|
||||
let value = environment.__proto__;
|
||||
value = require(8055) /* metro dependency 8055: InteractionActionCreators */;
|
||||
return value.setFailed(nonce);
|
||||
}
|
||||
|
||||
function _fun98684() { // fn#98684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13142:1684, offset: 0x021b2400, size: 83 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__.__proto__;
|
||||
if (env2_8 === nonce && env2_9 === env2_13.IN_FLIGHT) {
|
||||
value = require(8055) /* metro dependency 8055: InteractionActionCreators */;
|
||||
value.setFailed(nonce);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,530 @@
|
||||
/* Metro module 15736; source: modules/interaction_components/InteractionModalUtils.tsx; dependencies: [5, 57, 31, 1226, 1379, 4645, 1945, 3969, 4644, 12952, 8358, 661, 8357, 1909, 1423, 8067, 6844, 566, 6518, 21, 694, 7879, 1244, 44, 4627, 7226, 8055, 4651, 507, 672, 2] */
|
||||
function _fun120826(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:6, offset: 0x02536e50, size: 417 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const closure = function() {
|
||||
return _submitModal.apply(this, arguments);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_8 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
|
||||
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
|
||||
const interactionModalStore = importDefault(12952) /* metro dependency 12952: InteractionModalStore */;
|
||||
const env0_13 = (require(12952) /* metro dependency 12952: InteractionModalStore */).InteractionModalState;
|
||||
const localInteractionComponentStateStore = importDefault(8358) /* metro dependency 8358: LocalInteractionComponentStateStore */;
|
||||
const env0_15 = (require(661) /* metro dependency 661: Constants */).Endpoints;
|
||||
const getData = function(a0, a1, a2) {
|
||||
var env0_0 = a0;
|
||||
var env0_1 = a2;
|
||||
return a1.map(_fun120839);
|
||||
};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/InteractionModalUtils.tsx');
|
||||
exports.useIsFirstTextInputInModal = useIsFirstTextInputInModal;
|
||||
exports.useModalState = useModalState_120844;
|
||||
exports.useIframeModalState = useIframeModalState;
|
||||
exports.submitModal = closure;
|
||||
}
|
||||
|
||||
function useApplicationInfo(a0) { // fn#120827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:274, offset: 0x02536ff1, size: 77 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return env0_5.useMemo(_fun120828, [a0.id, a0.icon, a0.name, a0.bot]);
|
||||
}
|
||||
|
||||
function getUploadsForModal(a0, a1) { // fn#120829, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:2534, offset: 0x02537168, size: 60 bytes, params: 3, frame: 14
|
||||
const env0_0 = a1;
|
||||
const getUploads = UploadAttachmentStore.getUploads;
|
||||
const InteractionModal = DraftType.InteractionModal;
|
||||
return Reflect.apply(getUploads, UploadAttachmentStore, [a0, InteractionModal]).filter(_fun120830);
|
||||
}
|
||||
|
||||
function _submitModal() { // fn#120832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:2783, offset: 0x025371ec, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun120834).apply(this, arguments);
|
||||
}
|
||||
|
||||
function getData(a0, a1, a2) { // fn#120838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:702, offset: 0x02537568, size: 38 bytes, params: 4, frame: 11
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a2;
|
||||
return a1.map(_fun120839);
|
||||
}
|
||||
|
||||
function useIsFirstTextInputInModal(a0) { // fn#120843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:3838, offset: 0x02537ad8, size: 152 bytes, params: 2, frame: 14
|
||||
const value2 = undefined;
|
||||
const value3 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
|
||||
const r1 = value3 == null || value3.modal == null ? value2 : value3.modal.components[0];
|
||||
const type = r1 == null ? value2 : r1.type;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const ACTION_ROW = ComponentType.ACTION_ROW;
|
||||
return type === ACTION_ROW && r1.components[0].id === a0;
|
||||
}
|
||||
|
||||
function useModalState_120844(a0, a1) { // fn#120844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:4082, offset: 0x02537b70, size: 436 bytes, params: 3, frame: 30
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const application = a0.application;
|
||||
const customId = a0.customId;
|
||||
const components = a0.components;
|
||||
let value2 = (importDefault(6844) /* metro dependency 6844: useUnmountAbortSignal */)();
|
||||
const env0_3 = value2;
|
||||
let binding = env0_5;
|
||||
let useState = binding.useState;
|
||||
const value3 = Reflect.apply(useState, binding, [null]);
|
||||
binding = env0_4;
|
||||
const value4 = binding(value3, 2);
|
||||
const property = value4[0];
|
||||
var env0_4 = value4[1];
|
||||
const binding2 = env0_5;
|
||||
useState = binding2.useState;
|
||||
const value5 = binding(Reflect.apply(useState, binding2, [null]), 2);
|
||||
const property2 = value5[0];
|
||||
var env0_5 = property2;
|
||||
const env0_6 = value5[1];
|
||||
const binding3 = env0_5;
|
||||
useState = binding3.useState;
|
||||
const value6 = binding(Reflect.apply(useState, binding3, [{}]), 2);
|
||||
const property3 = value6[0];
|
||||
const property4 = value6[1];
|
||||
const value7 = (require(566) /* metro dependency 566: flux */).useStateFromStores([InteractionModalStore],
|
||||
_fun120845, [property2]);
|
||||
const value8 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(function() {
|
||||
var Set = global.Set;
|
||||
var value = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
var value2 = new Set();
|
||||
return value2 instanceof Object ? value2 : value;
|
||||
});
|
||||
const value10 = env0_5.useCallback(env0_3(_fun120848), [value2, a0, value8]);
|
||||
env0_5.useEffect(_fun120851, [property2, value7, a1, customId, a0.channelId]);
|
||||
let value = useApplicationInfo(application);
|
||||
return {components: components, applicationIconURL: value.applicationIconURL,
|
||||
applicationName: value.applicationName, submissionState: value7, error: property, validators: value8,
|
||||
validationErrors: property3, setValidationErrors: property4, onSubmit: value10};
|
||||
}
|
||||
|
||||
function useIframeModalState(a0) { // fn#120853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:5113, offset: 0x02537f1f, size: 295 bytes, params: 2, frame: 26
|
||||
const application = a0.application;
|
||||
const customId = a0.customId;
|
||||
const {applicationIconURL, applicationName, applicationBaseUrl} = useApplicationInfo(application);
|
||||
const getChannel = ChannelStore.getChannel;
|
||||
let channelId = a0.channelId;
|
||||
const value3 = Reflect.apply(getChannel, ChannelStore, [channelId]);
|
||||
(importDefault(44) /* metro dependency 44 */)(value3 != null, 'channel should not be null');
|
||||
const object3 = {};
|
||||
channelId = a0.channelId;
|
||||
const id = application.id;
|
||||
const value = '';
|
||||
object3.instance_id = value + channelId + ':' + id + ':' + customId;
|
||||
object3.custom_id = customId;
|
||||
object3.channel_id = a0.channelId;
|
||||
if (value3.guild_id != null && value !== value3.guild_id) {
|
||||
object3.guild_id = value3.guild_id;
|
||||
}
|
||||
const URL = global.URL;
|
||||
const uRL = new URL(applicationBaseUrl ?? value);
|
||||
uRL.pathname = a0.iframePath;
|
||||
const object4 = {applicationIconURL: applicationIconURL, applicationName: applicationName,
|
||||
applicationBaseUrl: applicationBaseUrl, queryParams: object3};
|
||||
object4.iframeUrl = uRL.toString();
|
||||
return object4;
|
||||
}
|
||||
|
||||
function _fun120828() { // fn#120828, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:323, offset: 0x0253703e, size: 298 bytes, params: 1, frame: 20
|
||||
const value = environment.__proto__;
|
||||
const guildId = SelectedGuildStore.getGuildId();
|
||||
const value3 = undefined;
|
||||
const r5 = guildId != null && env0_0.bot != null ? GuildMemberStore.getMember(guildId, env0_0.bot.id) : value3;
|
||||
const object2 = {};
|
||||
const defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
||||
const getApplicationIconURL = defaultImport.getApplicationIconURL;
|
||||
const binding = env0_0;
|
||||
object2.applicationIconURL = Reflect.apply(getApplicationIconURL, defaultImport, [{id: binding.id,
|
||||
icon: binding.icon, botIconFirst: true, bot: r5 != null ? env0_0.bot : value3, guildMember: r5}]);
|
||||
object2.applicationName = (r5 == null ? value3 : r5.nick) != null ? r5.nick : env0_0.bot != null ? env0_0.bot.username : env0_0.name;
|
||||
object2.applicationBaseUrl = (importDefault(8067) /* metro dependency 8067: getURLForApplication */)(env0_0.id);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun120830({id}) { // fn#120830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:2617, offset: 0x025371a4, size: 72 bytes, params: 2, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const value2 = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).deserializeComponentUploadId(id);
|
||||
return (value2 == null ? value : value2.containerId) === require;
|
||||
}
|
||||
|
||||
function* _fun120834(a0, a1, a2) { // fn#120834, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:2830, offset: 0x02537229, size: 349 bytes, params: 4, frame: 25
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const env0_0 = a0;
|
||||
const env0_1 = a1;
|
||||
const env0_2 = a2;
|
||||
value = undefined;
|
||||
const channelId = a0.channelId;
|
||||
let binding = env2_7;
|
||||
env2_1(env2_2[23])(binding.getChannel(channelId) != null, 'expected channel');
|
||||
const value6 = env2_18(channelId, a0.customId);
|
||||
const r1 = value6.length > 0 ? env2_1(env2_2[25])(value6) : value;
|
||||
binding = env2_0;
|
||||
const binding2 = env2_2;
|
||||
const value8 = binding(binding2[26]);
|
||||
const addQueued = value8.addQueued;
|
||||
const InteractionTypes = binding(binding2[13]).InteractionTypes;
|
||||
const MODAL_SUBMIT = InteractionTypes.MODAL_SUBMIT;
|
||||
Reflect.apply(addQueued, value8, [a2, {data: {interactionType: MODAL_SUBMIT, applicationId: a0.application.id},
|
||||
preflight: r1}]);
|
||||
yield r1;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
const env0_4 = value6.map(_fun120835);
|
||||
const env0_5 = env2_16(a0.customId, a0.components, {uploads: value6});
|
||||
send_120836();
|
||||
return value;
|
||||
}
|
||||
|
||||
function _fun120839(a0) { // fn#120839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:718, offset: 0x0253758e, size: 1312 bytes, params: 2, frame: 20
|
||||
var environment;
|
||||
var r3;
|
||||
var uploadIds;
|
||||
var r4;
|
||||
var object2;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
var value9;
|
||||
let type = a0.type;
|
||||
let value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const ACTION_ROW = ComponentType.ACTION_ROW;
|
||||
if (ACTION_ROW === type) {
|
||||
object2 = {};
|
||||
object2.type = a0.type;
|
||||
object2.components = getData(env0_0, a0.components, importDefault);
|
||||
return object2;
|
||||
}
|
||||
const TEXT_INPUT = ComponentType.TEXT_INPUT;
|
||||
if (TEXT_INPUT === type) {
|
||||
value = LocalInteractionComponentStateStore.getInteractionComponentState(env0_0, a0.id);
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
object2.custom_id = a0.customId;
|
||||
value9 = null;
|
||||
type = value9 == value ? value2 : value.type;
|
||||
object2.value = type !== a0.type ? value9 : value.value;
|
||||
return object2;
|
||||
}
|
||||
const FILE_UPLOAD = ComponentType.FILE_UPLOAD;
|
||||
if (FILE_UPLOAD === type) {
|
||||
value = LocalInteractionComponentStateStore.getInteractionComponentState(env0_0, a0.id);
|
||||
value8 = null;
|
||||
type = value8 == value ? value2 : value.type;
|
||||
uploadIds = type !== a0.type ? value8 : value.uploadIds;
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
object2.custom_id = a0.customId;
|
||||
r4 = value8 == uploadIds ? value2 : uploadIds.map(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return importDefault.uploads.findIndex(_fun120841);
|
||||
});
|
||||
object2.values = value8 != r4 ? r4 : value8;
|
||||
return object2;
|
||||
}
|
||||
const STRING_SELECT = ComponentType.STRING_SELECT;
|
||||
if (STRING_SELECT === type) {
|
||||
value = LocalInteractionComponentStateStore.getInteractionComponentState(env0_0, a0.id);
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
object2.custom_id = a0.customId;
|
||||
value7 = null;
|
||||
type = value7 == value ? value2 : value.type;
|
||||
object2.values = type !== a0.type ? value7 : value.values;
|
||||
return object2;
|
||||
}
|
||||
const USER_SELECT = ComponentType.USER_SELECT;
|
||||
if (USER_SELECT === type) {
|
||||
value = LocalInteractionComponentStateStore.getInteractionComponentState(env0_0, a0.id);
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
object2.custom_id = a0.customId;
|
||||
value6 = null;
|
||||
type = value6 == value ? value2 : value.type;
|
||||
if (type !== a0.type) {
|
||||
r3 = value6;
|
||||
} else {
|
||||
value = value.selectedOptions.map(function(a0) {
|
||||
return a0.value;
|
||||
});
|
||||
r3 = value;
|
||||
}
|
||||
object2.values = r3;
|
||||
return object2;
|
||||
}
|
||||
const ROLE_SELECT = ComponentType.ROLE_SELECT;
|
||||
if (ROLE_SELECT === type) {
|
||||
value = LocalInteractionComponentStateStore.getInteractionComponentState(env0_0, a0.id);
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
object2.custom_id = a0.customId;
|
||||
value6 = null;
|
||||
type = value6 == value ? value2 : value.type;
|
||||
if (type !== a0.type) {
|
||||
r3 = value6;
|
||||
} else {
|
||||
value = value.selectedOptions.map(function(a0) {
|
||||
return a0.value;
|
||||
});
|
||||
r3 = value;
|
||||
}
|
||||
object2.values = r3;
|
||||
return object2;
|
||||
}
|
||||
const MENTIONABLE_SELECT = ComponentType.MENTIONABLE_SELECT;
|
||||
if (MENTIONABLE_SELECT === type) {
|
||||
value = LocalInteractionComponentStateStore.getInteractionComponentState(env0_0, a0.id);
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
object2.custom_id = a0.customId;
|
||||
value6 = null;
|
||||
type = value6 == value ? value2 : value.type;
|
||||
if (type !== a0.type) {
|
||||
r3 = value6;
|
||||
} else {
|
||||
value = value.selectedOptions.map(function(a0) {
|
||||
return a0.value;
|
||||
});
|
||||
r3 = value;
|
||||
}
|
||||
object2.values = r3;
|
||||
return object2;
|
||||
}
|
||||
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
|
||||
if (CHANNEL_SELECT === type) {
|
||||
value = LocalInteractionComponentStateStore.getInteractionComponentState(env0_0, a0.id);
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
object2.custom_id = a0.customId;
|
||||
value6 = null;
|
||||
type = value6 == value ? value2 : value.type;
|
||||
if (type !== a0.type) {
|
||||
r3 = value6;
|
||||
} else {
|
||||
value = value.selectedOptions.map(function(a0) {
|
||||
return a0.value;
|
||||
});
|
||||
r3 = value;
|
||||
}
|
||||
object2.values = r3;
|
||||
return object2;
|
||||
}
|
||||
const TEXT_DISPLAY = ComponentType.TEXT_DISPLAY;
|
||||
if (TEXT_DISPLAY === type) {
|
||||
return {type: a0.type};
|
||||
}
|
||||
const LABEL = ComponentType.LABEL;
|
||||
if (LABEL === type) {
|
||||
object2 = {};
|
||||
object2.type = a0.type;
|
||||
object2.component = getData(env0_0, [a0.component], importDefault)[0];
|
||||
return object2;
|
||||
}
|
||||
const RADIO_GROUP = ComponentType.RADIO_GROUP;
|
||||
if (RADIO_GROUP === type) {
|
||||
value = LocalInteractionComponentStateStore.getInteractionComponentState(env0_0, a0.id);
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
object2.custom_id = a0.customId;
|
||||
value5 = null;
|
||||
type = value5 == value ? value2 : value.type;
|
||||
object2.value = type !== a0.type ? value5 : value.value;
|
||||
return object2;
|
||||
}
|
||||
const CHECKBOX_GROUP = ComponentType.CHECKBOX_GROUP;
|
||||
if (CHECKBOX_GROUP === type) {
|
||||
value = LocalInteractionComponentStateStore.getInteractionComponentState(env0_0, a0.id);
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
object2.custom_id = a0.customId;
|
||||
value4 = null;
|
||||
type = value4 == value ? value2 : value.type;
|
||||
object2.values = type !== a0.type ? value4 : value.values;
|
||||
return object2;
|
||||
}
|
||||
const CHECKBOX = ComponentType.CHECKBOX;
|
||||
if (CHECKBOX === type) {
|
||||
value = LocalInteractionComponentStateStore.getInteractionComponentState(env0_0, a0.id);
|
||||
object2 = {};
|
||||
type = a0.type;
|
||||
object2.type = type;
|
||||
object2.custom_id = a0.customId;
|
||||
type = value == null ? value2 : value.type;
|
||||
object2.value = type === a0.type && value.value;
|
||||
return object2;
|
||||
}
|
||||
(importDefault(44) /* metro dependency 44 */)(false, 'unreachable');
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun120845() { // fn#120845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:4331, offset: 0x02537d24, size: 29 bytes, params: 1, frame: 11
|
||||
return InteractionModalStore.getModalState(env0_5);
|
||||
}
|
||||
|
||||
function* _fun120848() { // fn#120848, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:4405, offset: 0x02537d4c, size: 154 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var value3;
|
||||
var binding;
|
||||
var value4;
|
||||
var fromTimestamp;
|
||||
var Date;
|
||||
var value5;
|
||||
if (true) {
|
||||
value = environment.__proto__;
|
||||
env1_4(null);
|
||||
AuthenticationStore(null);
|
||||
if (_fun120849(DraftType)) {
|
||||
value3 = environment.__proto__.__proto__;
|
||||
binding = env2_1;
|
||||
value4 = binding(env2_2[19]);
|
||||
fromTimestamp = value4.fromTimestamp;
|
||||
Date = global.Date;
|
||||
value5 = Reflect.apply(fromTimestamp, value4, [Date.now()]);
|
||||
AuthenticationStore(value5);
|
||||
binding = env2_19;
|
||||
yield binding(require, env1_3, value5);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120851() { // fn#120851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:4592, offset: 0x02537e1f, size: 256 bytes, params: 1, frame: 20
|
||||
var defaultImport;
|
||||
var dispatch;
|
||||
var customIdBinding;
|
||||
var defaultImport2;
|
||||
var removeFiles;
|
||||
var intl;
|
||||
let binding = env0_7;
|
||||
const SUCCEEDED = InteractionModalState.SUCCEEDED;
|
||||
if (binding === SUCCEEDED) {
|
||||
defaultImport = importDefault(694) /* metro dependency 694: Dispatcher */;
|
||||
dispatch = defaultImport.dispatch;
|
||||
customIdBinding = customId;
|
||||
Reflect.apply(dispatch, defaultImport, [{type: 'CLEAR_INTERACTION_MODAL_STATE', customId: customIdBinding}]);
|
||||
defaultImport2 = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
|
||||
removeFiles = defaultImport2.removeFiles;
|
||||
binding = env0_0;
|
||||
Reflect.apply(removeFiles, defaultImport2, [binding.channelId, getUploadsForModal(binding.channelId,
|
||||
customIdBinding).map(function(a0) {
|
||||
return a0.id;
|
||||
}), DraftType.InteractionModal]);
|
||||
require();
|
||||
}
|
||||
binding = env0_7;
|
||||
const ERRORED = InteractionModalState.ERRORED;
|
||||
if (binding === ERRORED) {
|
||||
binding = env0_4;
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
binding(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uJgdEu));
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120835(a0, a1) { // fn#120835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:3143, offset: 0x02537386, size: 45 bytes, params: 3, frame: 13
|
||||
const value = environment.__proto__.__proto__.__proto__;
|
||||
return env3_0(env3_2[27]).getAttachmentPayload(a0, a1);
|
||||
}
|
||||
|
||||
function send_120836() { // fn#120836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:3240, offset: 0x025373b3, size: 297 bytes, params: 1, frame: 18
|
||||
var environment;
|
||||
var value3;
|
||||
var binding;
|
||||
var binding2;
|
||||
var value4;
|
||||
var HTTP;
|
||||
var post;
|
||||
var object3;
|
||||
var object4;
|
||||
var id;
|
||||
if (!(require != null && require.aborted)) {
|
||||
value3 = environment.__proto__.__proto__.__proto__;
|
||||
binding = env3_0;
|
||||
binding2 = env3_2;
|
||||
value4 = undefined;
|
||||
HTTP = binding(binding2[28]).HTTP;
|
||||
post = HTTP.post;
|
||||
object3 = {};
|
||||
object3.url = env3_15.INTERACTIONS;
|
||||
object4 = {};
|
||||
object4.type = binding(binding2[13]).InteractionTypes.MODAL_SUBMIT;
|
||||
binding = env0_0;
|
||||
id = binding.application.id;
|
||||
object4.application_id = id;
|
||||
id = env0_3.id;
|
||||
object4.channel_id = id;
|
||||
object4.guild_id = env0_3.guild_id;
|
||||
id = binding.id;
|
||||
object4.data = {id: id, custom_id: binding.customId, components: env0_5,
|
||||
attachments: env0_4.length > 0 ? env0_4 : value4};
|
||||
binding = env3_6;
|
||||
object4.session_id = binding.getSessionId();
|
||||
object4.nonce = importDefault;
|
||||
object3.body = object4;
|
||||
object3.signal = require;
|
||||
object3.rejectWithError = false;
|
||||
Reflect.apply(post, HTTP, [object3]).catch(_fun120837);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120840(a0) { // fn#120840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:1230, offset: 0x02537aae, size: 42 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return importDefault.uploads.findIndex(_fun120841);
|
||||
}
|
||||
|
||||
function _fun120849(a0) { // fn#120849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:4437, offset: 0x02537de6, size: 34 bytes, params: 2, frame: 12
|
||||
const env0_0 = true;
|
||||
a0.forEach(_fun120850);
|
||||
return env0_0;
|
||||
}
|
||||
|
||||
function _fun120837(a0) { // fn#120837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:3579, offset: 0x025374dc, size: 140 bytes, params: 2, frame: 15
|
||||
var value;
|
||||
var setFailed;
|
||||
var value2;
|
||||
var setTimeout;
|
||||
var send_120836Binding;
|
||||
var retry_after;
|
||||
if (a0.status === 429) {
|
||||
setTimeout = global.setTimeout;
|
||||
value = environment.__proto__;
|
||||
send_120836Binding = send_120836;
|
||||
retry_after = a0.body.retry_after;
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
setTimeout(send_120836Binding, retry_after * env4_1(env4_2[29]).Millis.SECOND);
|
||||
} else {
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
value = env4_0(env4_2[26]);
|
||||
setFailed = value.setFailed;
|
||||
value2 = environment.__proto__;
|
||||
Reflect.apply(setFailed, value, [importDefault]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120850(a0) { // fn#120850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15944:4468, offset: 0x02537e08, size: 23 bytes, params: 2, frame: 10
|
||||
if (a0()) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
/* Metro module 8358; source: modules/interaction_components/LocalInteractionComponentStateStore.tsx; dependencies: [6, 7, 15, 17, 18, 8359, 566, 694, 2] */
|
||||
function _fun66556(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:6, offset: 0x01c00a99, size: 498 bytes, params: 8, frame: 20
|
||||
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 */;
|
||||
let value = importDefault(8359) /* metro dependency 8359: LimitedMap */;
|
||||
value = new value(196606);
|
||||
value = importDefault(8359) /* metro dependency 8359: LimitedMap */;
|
||||
value = new value(196606);
|
||||
value = importDefault(8359) /* metro dependency 8359: LimitedMap */;
|
||||
value = new value(196606);
|
||||
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
|
||||
_fun66562(Store).displayName = 'LocalInteractionComponentStateStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */, {LOGOUT: LOGOUT_66567,
|
||||
QUEUE_INTERACTION_COMPONENT_STATE: QUEUE_INTERACTION_COMPONENT_STATE,
|
||||
SET_INTERACTION_COMPONENT_STATE: function({rootContainerId, componentId, state}) {
|
||||
setComponentState(rootContainerId, componentId, state);
|
||||
}, MESSAGE_DELETE: MESSAGE_DELETE_66570, MESSAGE_UPDATE: MESSAGE_UPDATE_66571,
|
||||
INTERACTION_SUCCESS: INTERACTION_SUCCESS_66572, INTERACTION_FAILURE: INTERACTION_FAILURE_66573,
|
||||
CLEAR_INTERACTION_MODAL_STATE: CLEAR_INTERACTION_MODAL_STATE});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/LocalInteractionComponentStateStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_66557() { // fn#66557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:148, offset: 0x01c00c8b, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_66557_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function setComponentState(a0, a1, a2) { // fn#66560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:412, offset: 0x01c00ced, size: 101 bytes, params: 4, frame: 15
|
||||
var r3;
|
||||
var map;
|
||||
let binding = env0_5;
|
||||
const value2 = binding.get(a0);
|
||||
if (value2 != null) {
|
||||
r3 = value2;
|
||||
} else {
|
||||
map = new global.Map();
|
||||
}
|
||||
r3.set(a1, a2);
|
||||
env0_5.set(a0, r3);
|
||||
binding = env0_6;
|
||||
env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
}
|
||||
|
||||
function deleteStatesForMessageId(a0) { // fn#66561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:509, offset: 0x01c00d52, size: 83 bytes, params: 2, frame: 13
|
||||
let binding = env0_7;
|
||||
const value2 = binding.get(a0);
|
||||
if (value2 != null) {
|
||||
env0_8.delete(value2);
|
||||
}
|
||||
env0_7.delete(a0);
|
||||
env0_5.delete(a0);
|
||||
binding = env0_6;
|
||||
env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
}
|
||||
|
||||
function _fun66562(a0) { // fn#66562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:616, offset: 0x01c00da5, size: 126 bytes, params: 2, frame: 16
|
||||
const closure = LocalInteractionComponentStateStore;
|
||||
env0_4(closure, a0);
|
||||
return env0_1(closure, [{key: 'getInteractionComponentStates', value: value_66564},
|
||||
{key: 'getInteractionComponentStateVersion', value: value_66565}, {key: 'getInteractionComponentState',
|
||||
value: value_66566}]);
|
||||
}
|
||||
|
||||
function LOGOUT_66567() { // fn#66567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1352, offset: 0x01c00e60, size: 60 bytes, params: 1, frame: 10
|
||||
let binding = env0_5;
|
||||
binding.clear();
|
||||
env0_7.clear();
|
||||
env0_8.clear();
|
||||
binding = env0_6;
|
||||
env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
}
|
||||
|
||||
function QUEUE_INTERACTION_COMPONENT_STATE({messageId, nonce, componentId, state}) { // fn#66568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1443, offset: 0x01c00e9c, size: 84 bytes, params: 2, frame: 19
|
||||
let binding = env0_7;
|
||||
binding.set(messageId, nonce);
|
||||
binding = env0_8;
|
||||
binding.set(nonce, {messageId: messageId, componentId: componentId});
|
||||
setComponentState(messageId, componentId, state);
|
||||
}
|
||||
|
||||
function MESSAGE_DELETE_66570({id}) { // fn#66570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1763, offset: 0x01c00f16, size: 45 bytes, params: 2, frame: 12
|
||||
const binding = env0_5;
|
||||
if (binding.has(id)) {
|
||||
deleteStatesForMessageId(id);
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function MESSAGE_UPDATE_66571({message}) { // fn#66571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1866, offset: 0x01c00f43, size: 66 bytes, params: 2, frame: 13
|
||||
if (message.id != null) {
|
||||
var binding = env0_5;
|
||||
if (binding.has(message.id)) {
|
||||
deleteStatesForMessageId(message.id);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function INTERACTION_SUCCESS_66572({nonce}) { // fn#66572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1997, offset: 0x01c00f85, size: 92 bytes, params: 2, frame: 13
|
||||
if (nonce == null) {
|
||||
return false;
|
||||
}
|
||||
let binding = env0_8;
|
||||
const value2 = binding.get(nonce);
|
||||
if (value2 == null) {
|
||||
return false;
|
||||
}
|
||||
env0_7.delete(value2.messageId);
|
||||
env0_8.delete(nonce);
|
||||
binding = env0_6;
|
||||
env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
}
|
||||
|
||||
function INTERACTION_FAILURE_66573({nonce}) { // fn#66573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:2156, offset: 0x01c00fe1, size: 136 bytes, params: 2, frame: 14
|
||||
if (nonce == null) {
|
||||
return false;
|
||||
}
|
||||
let binding = env0_8;
|
||||
const value2 = binding.get(nonce);
|
||||
if (value2 == null) {
|
||||
return false;
|
||||
}
|
||||
const componentId = value2.componentId;
|
||||
const messageId = value2.messageId;
|
||||
const value3 = env0_5.get(messageId);
|
||||
if (value3 != null) {
|
||||
if (value3.has(componentId)) {
|
||||
value3.delete(componentId);
|
||||
if (value3.size === 0) {
|
||||
env0_5.delete(messageId);
|
||||
}
|
||||
binding = env0_6;
|
||||
env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function CLEAR_INTERACTION_MODAL_STATE({customId}) { // fn#66574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:2448, offset: 0x01c01069, size: 41 bytes, params: 2, frame: 12
|
||||
let binding = env0_5;
|
||||
binding.delete(customId);
|
||||
binding = env0_6;
|
||||
env0_6 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
||||
}
|
||||
|
||||
function value_66566(a0, a1) { // fn#66566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8543:1175, offset: 0x01c00e23, size: 61 bytes, params: 3, frame: 13
|
||||
var r0;
|
||||
let value = environment.__proto__;
|
||||
value = env1_5.get(a0);
|
||||
const value2 = null;
|
||||
if (value2 == value) {
|
||||
r0 = value2;
|
||||
} else {
|
||||
value = value.get(a1);
|
||||
r0 = value2 != value ? value : value2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
/* Metro module 8362; source: modules/interaction_components/SearchableSelectActionComponentUtils.tsx; dependencies: [1379, 1945, 1938, 1867, 3793, 1878, 8358, 1909, 6526, 4617, 4633, 4805, 8363, 1360, 2] */
|
||||
function _fun66591(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8547:6, offset: 0x01c01b89, size: 269 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const closure = getSnowflakeSelectDefaultValues;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const localInteractionComponentStateStore = importDefault(8358) /* metro dependency 8358: LocalInteractionComponentStateStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/SearchableSelectActionComponentUtils.tsx');
|
||||
exports.MIN_REREQUEST_TIME = 1000;
|
||||
exports.queryMentionables = queryMentionables;
|
||||
exports.queryChannels = queryChannels_66597;
|
||||
exports.getInitialSnowflakeSelectOptions = getInitialSnowflakeSelectOptions;
|
||||
exports.getSnowflakeSelectDefaultValues = closure;
|
||||
}
|
||||
|
||||
function getSnowflakeSelectDefaultValues(a0, a1) { // fn#66592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8547:166, offset: 0x01c01c96, size: 114 bytes, params: 3, frame: 15
|
||||
var value2;
|
||||
const value = a2;
|
||||
const env0_0 = value !== undefined ? value : [];
|
||||
var env0_1;
|
||||
if (a0 != null) {
|
||||
env0_1 = GuildStore.getGuild(a1);
|
||||
value2 = a0.map(_fun66593);
|
||||
return value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
}
|
||||
}
|
||||
|
||||
function queryMentionables(a0, a1, a2) { // fn#66594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8547:1168, offset: 0x01c01f51, size: 350 bytes, params: 4, frame: 20
|
||||
const env0_0 = a2;
|
||||
var value;
|
||||
const channel = ChannelStore.getChannel(a2);
|
||||
if (channel == null) {
|
||||
return [];
|
||||
}
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const USER_SELECT = ComponentType.USER_SELECT;
|
||||
const r6 = a0 === USER_SELECT || a0 === ComponentType.MENTIONABLE_SELECT;
|
||||
const ROLE_SELECT = ComponentType.ROLE_SELECT;
|
||||
value = Reflect.apply((importDefault(6526) /* metro dependency 6526: AutocompleteUtils */).queryMentionResults,
|
||||
value, [{query: a1, channel: channel, canMentionEveryone: false, canMentionHere: false, canMentionUsers: r6,
|
||||
canMentionRoles: a0 === ROLE_SELECT || a0 === ComponentType.MENTIONABLE_SELECT, includeAllGuildUsers: true,
|
||||
includeNonMentionableRoles: true, checkRecentlyTalkedOnEmptyQuery: false, limit: 15}]);
|
||||
const users = value.users;
|
||||
const roles = value.roles;
|
||||
value = users.map(_fun66595);
|
||||
items = [];
|
||||
value = arraySpread(items, value, 0, 7);
|
||||
arraySpread(items, roles.map(function(a0) {
|
||||
var object = {};
|
||||
object.type = require(dependencyMap[10]).SelectOptionType.ROLE;
|
||||
object.value = a0.id;
|
||||
object.label = a0.name;
|
||||
return object;
|
||||
}), value, 7);
|
||||
return items;
|
||||
}
|
||||
|
||||
function queryChannels_66597(a0, a1, a2) { // fn#66597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8547:1961, offset: 0x01c0218a, size: 121 bytes, params: 4, frame: 13
|
||||
var r0;
|
||||
var value;
|
||||
const channel = ChannelStore.getChannel(a1);
|
||||
if (channel == null) {
|
||||
r0 = [];
|
||||
} else {
|
||||
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
||||
value = value.queryApplicationCommandChannelResults({query: a0, channel: channel, channelTypes: a2,
|
||||
limit: 15}).channels.map(function(a0) {
|
||||
var object = {};
|
||||
object.type = require(dependencyMap[10]).SelectOptionType.CHANNEL;
|
||||
object.value = a0.id;
|
||||
object.label = require(dependencyMap[11]).computeChannelName(a0, UserStore, RelationshipStore);
|
||||
return object;
|
||||
});
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function getInitialSnowflakeSelectOptions(a0, a1, a2) { // fn#66599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8547:2272, offset: 0x01c02261, size: 310 bytes, params: 4, frame: 20
|
||||
const interactionComponentState = LocalInteractionComponentStateStore.getInteractionComponentState(a1, a0.id);
|
||||
const getSnowflakeSelectDefaultValuesBinding = getSnowflakeSelectDefaultValues;
|
||||
const defaultValues = a0.defaultValues;
|
||||
let type = a0.type;
|
||||
const value3 = undefined;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
|
||||
const snowflakeSelectDefaultValuesBinding = getSnowflakeSelectDefaultValuesBinding(defaultValues, a2,
|
||||
type !== CHANNEL_SELECT ? value3 : a0.channelTypes);
|
||||
type = interactionComponentState == null ? value3 : interactionComponentState.type;
|
||||
const USER_SELECT = ComponentType.USER_SELECT;
|
||||
let r0 = type === USER_SELECT || (interactionComponentState == null ? value3 : interactionComponentState.type) === ComponentType.ROLE_SELECT || (interactionComponentState == null ? value3 : interactionComponentState.type) === ComponentType.MENTIONABLE_SELECT ? interactionComponentState.selectedOptions : (interactionComponentState == null ? value3 : interactionComponentState.type) !== ComponentType.CHANNEL_SELECT ? snowflakeSelectDefaultValuesBinding : interactionComponentState.selectedOptions;
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun66593(a0) { // fn#66593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8547:263, offset: 0x01c01d08, size: 585 bytes, params: 2, frame: 21
|
||||
var r2;
|
||||
var value4;
|
||||
var id;
|
||||
var value5;
|
||||
var binding;
|
||||
var object2;
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
var value7;
|
||||
var value8;
|
||||
var getUser;
|
||||
var value9;
|
||||
const type = a0.type;
|
||||
const value2 = undefined;
|
||||
const SnowflakeSelectDefaultValueTypes = (require(8363) /* metro dependency 8363: SnowflakeSelectDefaultValueTypes */).SnowflakeSelectDefaultValueTypes;
|
||||
const USER = SnowflakeSelectDefaultValueTypes.USER;
|
||||
if (USER === type) {
|
||||
getUser = UserStore.getUser;
|
||||
id = a0.id;
|
||||
value9 = Reflect.apply(getUser, UserStore, [id]);
|
||||
if (value9 == null) {
|
||||
return null;
|
||||
}
|
||||
r2 = env0_1 != null ? GuildMemberStore.getNick(env0_1.id, value9.id) : value2;
|
||||
id = value9.id;
|
||||
r2 = r2 ?? value9.globalName;
|
||||
r2 = r2 ?? value9.username;
|
||||
return {type: SelectOptionType.USER, value: id, label: r2};
|
||||
}
|
||||
const ROLE = SnowflakeSelectDefaultValueTypes.ROLE;
|
||||
if (ROLE === type) {
|
||||
value7 = null;
|
||||
if (value7 == env0_1) {
|
||||
return value7;
|
||||
}
|
||||
value8 = GuildRoleStore.getRole(env0_1.id, a0.id);
|
||||
return value7 == value8 ? value7 : {type: SelectOptionType.ROLE, value: value8.id, label: value8.name};
|
||||
}
|
||||
const CHANNEL = SnowflakeSelectDefaultValueTypes.CHANNEL;
|
||||
if (CHANNEL === type) {
|
||||
value4 = null;
|
||||
if (value4 == env0_1) {
|
||||
return value4;
|
||||
}
|
||||
value5 = ChannelStore.getChannel(a0.id);
|
||||
if (value4 == value5) {
|
||||
r2 = value4;
|
||||
} else if (value5.guild_id !== env0_1.id) {
|
||||
r2 = value4;
|
||||
} else if (env0_0.length > 0) {
|
||||
binding = env0_0;
|
||||
if (binding.includes(value5.type)) {
|
||||
object2 = {};
|
||||
object2.type = SelectOptionType.CHANNEL;
|
||||
object2.value = value5.id;
|
||||
object2.label = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(value5,
|
||||
UserStore,
|
||||
RelationshipStore);
|
||||
r2 = object2;
|
||||
} else {
|
||||
r2 = value4;
|
||||
}
|
||||
} else {
|
||||
object2 = {};
|
||||
object2.type = SelectOptionType.CHANNEL;
|
||||
object2.value = value5.id;
|
||||
object2.label = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(value5,
|
||||
UserStore,
|
||||
RelationshipStore);
|
||||
r2 = object2;
|
||||
}
|
||||
return r2;
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _fun66595(a0) { // fn#66595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8547:1682, offset: 0x01c020af, size: 153 bytes, params: 2, frame: 19
|
||||
const defaultImport = importDefault(4617) /* metro dependency 4617: NicknameUtils */;
|
||||
const getNickname = defaultImport.getNickname;
|
||||
const guildId = env0_1.getGuildId();
|
||||
let user = a0.user;
|
||||
const value4 = Reflect.apply(getNickname, defaultImport, [guildId, importDefault, user]);
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const USER = SelectOptionType.USER;
|
||||
user = a0.user;
|
||||
let r1 = value4 ?? a0.user.globalName;
|
||||
r1 = r1 ?? a0.user.username;
|
||||
return {type: USER, value: user.id, label: r1};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/* Metro module 8361; source: modules/interaction_components/StringSelectActionComponentUtils.tsx; dependencies: [8358, 1909, 2] */
|
||||
function _fun66587(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8546:6, offset: 0x01c01a91, size: 114 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const localInteractionComponentStateStore = importDefault(8358) /* metro dependency 8358: LocalInteractionComponentStateStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/StringSelectActionComponentUtils.tsx');
|
||||
exports.getInitialStringSelectOptions = getInitialStringSelectOptions;
|
||||
}
|
||||
|
||||
function getInitialStringSelectOptions(a0, a1) { // fn#66588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8546:239, offset: 0x01c01b03, size: 134 bytes, params: 3, frame: 17
|
||||
var r0;
|
||||
var value;
|
||||
const interactionComponentState = LocalInteractionComponentStateStore.getInteractionComponentState(a1, a0.id);
|
||||
const type = interactionComponentState?.type;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const STRING_SELECT = ComponentType.STRING_SELECT;
|
||||
if (type === STRING_SELECT) {
|
||||
r0 = interactionComponentState.values;
|
||||
} else {
|
||||
value = a0.options.filter(function(a0) {
|
||||
return a0.default;
|
||||
});
|
||||
value = value.map(_fun66590);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/* Metro module 15749; source: modules/interaction_components/closeIFrameModal.native.tsx; dependencies: [15747, 5080, 694, 2] */
|
||||
function _fun120941(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120941, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15957:6, offset: 0x0253b110, size: 120 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(15747) /* metro dependency 15747: InteractionIframeConstants */).INTERACTION_IFRAME_MODAL_KEY;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/closeIFrameModal.native.tsx');
|
||||
exports.default = closeIFrameModal;
|
||||
}
|
||||
|
||||
function closeIFrameModal(a0) { // fn#120942, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15957:237, offset: 0x0253b188, size: 81 bytes, params: 2, frame: 14
|
||||
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(INTERACTION_IFRAME_MODAL_KEY);
|
||||
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'INTERACTION_IFRAME_MODAL_CLOSE',
|
||||
applicationId: a0});
|
||||
}
|
||||
|
||||
+1023
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,13 @@
|
||||
/* Metro module 8353; source: modules/interaction_components/content_inventory_entry/utils.tsx; dependencies: [661, 1391, 2] */
|
||||
function _fun66499(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8538:6, offset: 0x01bfdfaf, size: 117 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = (require(661) /* metro dependency 661: Constants */).MessageEmbedFlags;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/content_inventory_entry/utils.tsx');
|
||||
exports.isContentInventoryFallbackEmbed = function(a0) {
|
||||
var moduleValue = require(dependencyMap[1]);
|
||||
return moduleValue.hasFlag(a0.flags ?? 0, MessageEmbedFlags.IS_CONTENT_INVENTORY_ENTRY);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/* Metro module 15747; source: modules/interaction_components/native/InteractionIframeConstants.tsx; dependencies: [2] */
|
||||
function _fun120931(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15955:6, offset: 0x0253aa71, size: 84 bytes, params: 8, frame: 15
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/InteractionIframeConstants.tsx');
|
||||
exports.INTERACTION_IFRAME_MODAL_KEY = 'interaction_iframe_modal';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/* Metro module 15748; source: modules/interaction_components/native/InteractionIframeModal.tsx; dependencies: [57, 31, 27, 4238, 33, 4501, 697, 15736, 5463, 7717, 15749, 4571, 3857, 1244, 10709, 10716, 5278, 4066, 4573, 8706, 2] */
|
||||
function _fun120932(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:6, offset: 0x0253aac5, size: 378 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 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_6 = (require(4238) /* metro dependency 4238: ApplicationConstants */).BotTagTypes;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value.jsx;
|
||||
const env0_8 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
const env0_9 = Reflect.apply(createStyles, value, [{wrapper: {backgroundColor: BACKGROUND_SURFACE_HIGH, flex: 1},
|
||||
header: {'flexDirection': 'row', 'padding': 16, 'justifyContent': 'space-between', 'alignItems': 'center'},
|
||||
headerCenterContainer: {'flexDirection': 'column', 'alignItems': 'center'},
|
||||
headerTitleContainer: {'flexDirection': 'row', 'marginBottom': 2}, closeButton: {marginEnd: 8},
|
||||
spacerView: {'marginStart': 8, 'width': 32}, botTag: {marginStart: 4}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/InteractionIframeModal.tsx');
|
||||
exports.default = InteractionIframeModal;
|
||||
}
|
||||
|
||||
function InteractionIframeModal(a0) { // fn#120933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:688, offset: 0x0253ac3f, size: 944 bytes, params: 2, frame: 29
|
||||
const value2 = undefined;
|
||||
const styles = useStyles();
|
||||
const application = a0.application;
|
||||
const title = a0.title;
|
||||
const id = application.id;
|
||||
const {queryParams,
|
||||
iframeUrl} = (require(15736) /* metro dependency 15736: InteractionModalUtils */).useIframeModalState(a0);
|
||||
const binding = env0_4;
|
||||
const [property, env0_1] = env0_3(binding.useState(false), 2);
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
binding.useLayoutEffect(_fun120934, []);
|
||||
let useCallback = binding.useCallback;
|
||||
const value6 = Reflect.apply(useCallback, binding, [_fun120936, [id]]);
|
||||
useCallback = binding.useCallback;
|
||||
(importDefault(4571) /* metro dependency 4571: useBackPressHandler */)(Reflect.apply(useCallback, binding,
|
||||
[_fun120937, [value6]]));
|
||||
const value8 = null;
|
||||
const r5 = property ? value8 : ((Component) => <Component onActivityCrash={onActivityCrash} applicationId={application.id} channelId={queryParams.channel_id} guildId={queryParams.guild_id} activityUrl={iframeUrl} activitySessionId={queryParams.instance_id} queryParams={queryParams} onLoadError={onLoadError} allowPopups={(require(10716) /* metro dependency 10716: allowPopups */).allowPopups(application)} referrerPolicy="origin" isPipOrGridMode={false} webViewKey={value2} ignoreSilentHardwareSwitch={false} />)(importDefault(10709) /* metro dependency 10709: EmbeddedActivityWebView */);
|
||||
const items3 = [styles.wrapper];
|
||||
items3[1] = {paddingTop: insets.top, paddingBottom: insets.bottom};
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
|
||||
const XLargeIcon = (require(4066) /* metro dependency 4066: XLargeIcon */).XLargeIcon;
|
||||
const items2 = [<PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
|
||||
[cpT0Cq])} onPress={value6} style={styles.closeButton}><XLargeIcon /></PressableOpacity>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const text = <Text variant="heading-sm/bold" color="mobile-text-heading-primary">{application.name}</Text>;
|
||||
const BotTag = importDefault(8706) /* metro dependency 8706: BotTag */;
|
||||
const BOT = BotTagTypes.BOT;
|
||||
const bot = application.bot;
|
||||
items2[1] = <View style={styles.headerCenterContainer}><View style={styles.headerTitleContainer}>{text}<BotTag type={BOT} verified={value8 == bot ? value2 : bot.verified} style={styles.botTag} /></View><Text variant="text-xs/medium" color="interactive-text-default">{title}</Text></View>;
|
||||
items2[2] = <View style={styles.spacerView} />;
|
||||
return (
|
||||
<View style={items3}>
|
||||
<View style={styles.header}>
|
||||
{items2}
|
||||
</View>
|
||||
{r5}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun120934() { // fn#120934, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:935, offset: 0x0253afef, size: 51 bytes, params: 1, frame: 11
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(require(7717) /* metro dependency 7717: DeviceOrientation */).lockOrientation('PORTRAIT');
|
||||
return _fun120935;
|
||||
}
|
||||
|
||||
function _fun120936() { // fn#120936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1045, offset: 0x0253b047, size: 40 bytes, params: 1, frame: 12
|
||||
const value = environment.__proto__;
|
||||
(importDefault(15749) /* metro dependency 15749: closeIFrameModalNative */)(id, undefined);
|
||||
}
|
||||
|
||||
function InteractionIframeModalOnActivityCrash() { // fn#120938, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1176, owner: InteractionIframeModal.onActivityCrash, offset: 0x0253b06f, size: 43 bytes, params: 1, frame: 13
|
||||
env0_1(true);
|
||||
global.setTimeout(_fun120939, 0);
|
||||
}
|
||||
|
||||
function onLoadError() { // fn#120940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:1347, owner: InteractionIframeModal.onLoadError, offset: 0x0253b09a, size: 118 bytes, params: 1, frame: 17
|
||||
const defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
||||
const open = defaultImport.open;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const HehpFW = (require(1244) /* metro dependency 1244: indexNative */).t.HehpFW;
|
||||
Reflect.apply(open, defaultImport, [{key: 'interaction_iframe_modal', content: Reflect.apply(string, intl,
|
||||
[HehpFW])}]);
|
||||
env0_2();
|
||||
}
|
||||
|
||||
function _fun120935() { // fn#120935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15956:976, offset: 0x0253b022, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(7717) /* metro dependency 7717: DeviceOrientation */).restoreDefaultOrientation();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
/* Metro module 15735; source: modules/interaction_components/native/InteractionModal.tsx; dependencies: [31, 27, 12952, 33, 4501, 697, 5080, 15736, 5463, 1305, 1423, 4573, 5278, 1244, 5312, 8357, 15737, 4578, 2] */
|
||||
function _fun120822(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120822, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15943:6, offset: 0x02536740, size: 574 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = InteractionModal;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const env0_3 = value.View;
|
||||
const env0_4 = value.ScrollView;
|
||||
const env0_5 = (require(12952) /* metro dependency 12952: InteractionModalStore */).InteractionModalState;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value.jsx;
|
||||
const env0_7 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object2.modal = {backgroundColor: BACKGROUND_BASE_LOW, flex: 1};
|
||||
object2.scroll = {flex: 1};
|
||||
const object3 = {flexGrow: 1};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object3.gap = PX_16;
|
||||
object2.modalContent = object3;
|
||||
const object6 = {flexDirection: 'row'};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.marginBottom = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object6.paddingHorizontal = PX_16;
|
||||
object2.header = object6;
|
||||
object2.titleView = {flex: 1};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.icon = {marginRight: PX_8};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.footer = {marginTop: 'auto', marginBottom: PX_16};
|
||||
object2.closeButton = {marginLeft: 'auto'};
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
object2.closeIcon = {color: TEXT_MUTED};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.error = {marginBottom: PX_16};
|
||||
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/InteractionModal.tsx');
|
||||
exports.default = closure;
|
||||
exports.openInteractionModal = function(a0) {
|
||||
importDefault(dependencyMap[6]).push(InteractionModal, a0, 'interaction_modal');
|
||||
};
|
||||
}
|
||||
|
||||
function InteractionModal(a0) { // fn#120823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15943:782, offset: 0x0253697e, size: 1138 bytes, params: 2, frame: 42
|
||||
const HelpMessage = (require(1305) /* metro dependency 1305: native */).HelpMessage;
|
||||
const styles = useStyles();
|
||||
const title = a0.title;
|
||||
const {components, applicationIconURL, applicationName, submissionState, error, validators, validationErrors,
|
||||
setValidationErrors,
|
||||
onSubmit} = (require(15736) /* metro dependency 15736: InteractionModalUtils */).useModalState(a0,
|
||||
onClose_120824);
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
|
||||
const items3 = [styles.modal];
|
||||
items3[1] = {paddingTop: insets.top, paddingBottom: insets.bottom};
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
const avatarProps = {style: styles.icon,
|
||||
source: (importDefault(1423) /* metro dependency 1423: AvatarUtils */).makeSource(applicationIconURL)};
|
||||
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
|
||||
const SMALL = AvatarSizes.SMALL;
|
||||
avatarProps.size = SMALL;
|
||||
const items2 = [<Avatar {...avatarProps} />];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <View style={styles.titleView}><Text variant="heading-xl/semibold" color="mobile-text-heading-primary">{title}</Text></View>;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const cpT0Cq = (require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq;
|
||||
onClose_120824Binding = onClose_120824;
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
items2[2] = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string, intl,
|
||||
[cpT0Cq])} onPress={onClose_120824Binding} style={styles.closeButton}><XSmallIcon color={styles.closeIcon.color} /></PressableOpacity>;
|
||||
const view = <View style={styles.header}>{items2}</View>;
|
||||
const value5 = null;
|
||||
const r18 = value5 != error ? error === '' ? value5 : <View style={styles.error}><HelpMessage messageType={(require(1305) /* metro dependency 1305: native */).HelpMessageTypes.ERROR}>{error}</HelpMessage></View> : value5;
|
||||
const HelpMessageTypes = (require(1305) /* metro dependency 1305: native */).HelpMessageTypes;
|
||||
const WARNING = HelpMessageTypes.WARNING;
|
||||
const items5 = [<View>{r18}<HelpMessage messageType={WARNING}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['dSTy/w'],
|
||||
{applicationName: applicationName})}</HelpMessage></View>];
|
||||
const ComponentStateContextProvider = (require(8357) /* metro dependency 8357: ComponentStateContext */).ComponentStateContextProvider;
|
||||
items5[1] = <ComponentStateContextProvider modal={a0} validators={validators} validationErrors={validationErrors} setValidationErrors={setValidationErrors}>{(require(15737) /* metro dependency 15737: renderComponents */).renderComponents(components)}</ComponentStateContextProvider>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
string = intl.string;
|
||||
const geKm7t = (require(1244) /* metro dependency 1244: indexNative */).t.geKm7t;
|
||||
const IN_FLIGHT = InteractionModalState.IN_FLIGHT;
|
||||
items5[2] = <View style={styles.footer}><Button text={Reflect.apply(string, intl,
|
||||
[geKm7t])} loading={submissionState === IN_FLIGHT} size="lg" onPress={onSubmit} /></View>;
|
||||
return (
|
||||
<View style={items3}>
|
||||
{view}
|
||||
<ScrollView
|
||||
style={styles.scroll}
|
||||
contentContainerStyle={styles.modalContent}
|
||||
keyboardShouldPersistTaps="handled"
|
||||
>
|
||||
{items5}
|
||||
</ScrollView>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function onClose_120824() { // fn#120824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15943:756, offset: 0x02536df0, size: 44 bytes, params: 1, frame: 11
|
||||
return (importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('interaction_modal');
|
||||
}
|
||||
|
||||
+156
@@ -0,0 +1,156 @@
|
||||
/* Metro module 8364; source: modules/interaction_components/native/NativeSearchableSelectActionComponentUtils.tsx; dependencies: [1379, 1938, 1867, 1878, 661, 4633, 1360, 1426, 6794, 8365, 673, 697, 8366, 6647, 2] */
|
||||
function _fun66601(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8549:6, offset: 0x01c02405, size: 215 bytes, params: 8, frame: 20
|
||||
let env0_0 = require;
|
||||
const closure = getChannelIconData;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_7 = constantsModule.ChannelTypes;
|
||||
const env0_8 = constantsModule.DEFAULT_ROLE_COLOR;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/NativeSearchableSelectActionComponentUtils.tsx');
|
||||
exports.transformSearchableSelectOptions = function(a0, a1) {
|
||||
var env0_0 = a1;
|
||||
var env0_1 = GuildStore.getGuild(a1);
|
||||
return a0.map(_fun66604).filter(require(dependencyMap[6]).isNotNullish);
|
||||
};
|
||||
exports.getChannelIconData = closure;
|
||||
}
|
||||
|
||||
function getChannelIconData(a0, a1) { // fn#66602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8549:186, offset: 0x01c024dc, size: 88 bytes, params: 3, frame: 14
|
||||
var r0;
|
||||
const type = a0.type;
|
||||
var value;
|
||||
const GUILD_CATEGORY = ChannelTypes.GUILD_CATEGORY;
|
||||
if (type === GUILD_CATEGORY) {
|
||||
r0 = importDefault(8366) /* metro dependency 8366 */;
|
||||
} else {
|
||||
value = require(6647) /* metro dependency 6647: ChannelUtils */;
|
||||
value = value.getChannelIconWithGuild(a0, a1);
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function transformSearchableSelectOptions(a0, a1) { // fn#66603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8549:453, offset: 0x01c02534, size: 91 bytes, params: 3, frame: 14
|
||||
const env0_0 = a1;
|
||||
const env0_1 = GuildStore.getGuild(a1);
|
||||
const value2 = a0.map(_fun66604);
|
||||
return value2.filter((require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish);
|
||||
}
|
||||
|
||||
function _fun66604(a0) { // fn#66604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8549:534, offset: 0x01c0258f, size: 835 bytes, params: 2, frame: 23
|
||||
var r0;
|
||||
var r6;
|
||||
var r1;
|
||||
var r8;
|
||||
var binding;
|
||||
var value5;
|
||||
var object2;
|
||||
var value7;
|
||||
var moduleValue;
|
||||
var customIconSrc;
|
||||
var unicodeEmoji;
|
||||
var value13;
|
||||
let value = a0;
|
||||
const type = value.type;
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const USER = SelectOptionType.USER;
|
||||
if (USER === type) {
|
||||
value13 = UserStore.getUser(value.value);
|
||||
if (value13 == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
value = require(1426) /* metro dependency 1426: AvatarUtils */;
|
||||
object2['iconSrc'] = value.ensureAvatarSource(value13.getAvatarSource(require, false)).uri;
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
const ROLE = SelectOptionType.ROLE;
|
||||
if (ROLE === type) {
|
||||
binding = env0_1;
|
||||
value7 = null;
|
||||
r6 = value7 != binding ? GuildRoleStore.getRole(binding.id, value.value) : value7;
|
||||
if (value7 == r6) {
|
||||
r0 = value;
|
||||
} else if (value7 == binding) {
|
||||
r0 = value;
|
||||
} else {
|
||||
moduleValue = require(6794) /* metro dependency 6794: RoleIconUtils */;
|
||||
r1 = moduleValue.canGuildUseRoleIcons(binding,
|
||||
r6) ? (require(6794) /* metro dependency 6794: RoleIconUtils */).getRoleIconData(r6) : value7;
|
||||
if (value7 == r1) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
value = require(1426) /* metro dependency 1426: AvatarUtils */;
|
||||
object2['iconSrc'] = value.ensureAvatarSource(importDefault(8365) /* metro dependency 8365 */).uri;
|
||||
if (value7 != r6.colorString) {
|
||||
value = require(673) /* metro dependency 673: ColorUtils */;
|
||||
value = value.hex2int(r6.colorString);
|
||||
r8 = value;
|
||||
} else {
|
||||
r8 = DEFAULT_ROLE_COLOR;
|
||||
}
|
||||
object2['iconColor'] = 4278190080 | r8;
|
||||
r0 = object2;
|
||||
} else {
|
||||
customIconSrc = r1.customIconSrc;
|
||||
unicodeEmoji = r1.unicodeEmoji;
|
||||
if (value7 != unicodeEmoji) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
object2['iconEmoji'] = {id: unicodeEmoji.id, name: unicodeEmoji.name,
|
||||
animated: unicodeEmoji.animated,
|
||||
src: unicodeEmoji.url, surrogates: unicodeEmoji.surrogates};
|
||||
r0 = object2;
|
||||
} else if (value7 != customIconSrc) {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
object2['iconSrc'] = customIconSrc;
|
||||
r0 = object2;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
value = require(1426) /* metro dependency 1426: AvatarUtils */;
|
||||
object2['iconSrc'] = value.ensureAvatarSource(importDefault(8365) /* metro dependency 8365 */).uri;
|
||||
if (value7 != r6.colorString) {
|
||||
value = require(673) /* metro dependency 673: ColorUtils */;
|
||||
value = value.hex2int(r6.colorString);
|
||||
r8 = value;
|
||||
} else {
|
||||
r8 = DEFAULT_ROLE_COLOR;
|
||||
}
|
||||
object2['iconColor'] = 4278190080 | r8;
|
||||
r0 = object2;
|
||||
}
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
const CHANNEL = SelectOptionType.CHANNEL;
|
||||
if (CHANNEL === type) {
|
||||
binding = env0_1;
|
||||
value5 = ChannelStore.getChannel(value.value);
|
||||
if (value5 == null) {
|
||||
r0 = value;
|
||||
} else {
|
||||
object2 = {};
|
||||
copyDataProperties(object2, value, undefined);
|
||||
value = require(1426) /* metro dependency 1426: AvatarUtils */;
|
||||
object2['iconSrc'] = value.ensureAvatarSource(getChannelIconData(value5, binding)).uri;
|
||||
value = require(673) /* metro dependency 673: ColorUtils */;
|
||||
value = value.hex2int((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_330);
|
||||
object2['iconColor'] = 4278190080 | value;
|
||||
r0 = object2;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
/* Metro module 14255; source: modules/interaction_components/native/SelectMenuNativeComponent.tsx; dependencies: [31, 27, 33, 4020, 14256, 2] */
|
||||
function _fun107843(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14452:6, offset: 0x0230ac9a, size: 198 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const requireNativeComponent = (require(27) /* metro dependency 27 */).requireNativeComponent;
|
||||
const env0_0 = (require(33) /* metro dependency 33 */).jsx;
|
||||
let value = require(4020) /* metro dependency 4020: FabricUtils */;
|
||||
if (value.isFabric()) {
|
||||
value = importDefault(14256) /* metro dependency 14256: SelectActionComponentViewNativeComponent */;
|
||||
} else {
|
||||
value = requireNativeComponent('DCDSelectActionComponentView');
|
||||
}
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/SelectMenuNativeComponent.tsx');
|
||||
exports.default = SelectMenuNativeComponent;
|
||||
}
|
||||
|
||||
function SelectMenuNativeComponent(a0) { // fn#107844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14452:325, offset: 0x0230ad60, size: 54 bytes, params: 2, frame: 14
|
||||
return ((Component) => <Component {...a0} {...{['style']: {width: '100%'}}} />)(env0_1);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Metro module 15745; source: modules/interaction_components/native/actions/CheckboxActionComponent.tsx; dependencies: [31, 33, 8357, 44, 1909, 9402, 2] */
|
||||
function _fun120922(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15953:6, offset: 0x0253a6ef, size: 152 bytes, params: 8, frame: 18
|
||||
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(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(_fun120923);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/CheckboxActionComponent.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun120923(a0) { // fn#120923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15953:130, offset: 0x0253a787, size: 360 bytes, params: 2, frame: 22
|
||||
let type = a0.type;
|
||||
const property = a0.default;
|
||||
const value2 = undefined;
|
||||
const value3 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
|
||||
(importDefault(44) /* metro dependency 44 */)(value3 != null,
|
||||
'CheckboxActionComponent must be rendered inside a ComponentStateContext');
|
||||
const value4 = value3.useComponentState(a0, property != null ? {type: type, value: property} : value2);
|
||||
const state = value4.state;
|
||||
const env0_2 = value4.executeStateUpdate;
|
||||
const value5 = env0_3.useMemo(function() {
|
||||
return state?.type === type && state.value;
|
||||
}, [state, type]);
|
||||
const parents = value3.getParents(a0);
|
||||
const r7 = parents == null ? value2 : parents[0];
|
||||
type = r7 == null ? value2 : r7.type;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const LABEL = ComponentType.LABEL;
|
||||
const r6 = type !== LABEL ? value2 : r7;
|
||||
(importDefault(44) /* metro dependency 44 */)(r6 != null,
|
||||
'CheckboxActionComponent must be a child of a Label component');
|
||||
const Checkbox = (require(9402) /* metro dependency 9402: CheckboxNative */).Checkbox;
|
||||
return (
|
||||
<Checkbox
|
||||
label={r6.label}
|
||||
description={r6.description}
|
||||
checked={value5}
|
||||
onToggle={function(a0) {
|
||||
executeStateUpdate({type: type, value: a0});
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
/* Metro module 15744; source: modules/interaction_components/native/actions/CheckboxGroupActionComponent.tsx; dependencies: [31, 33, 8357, 6231, 8950, 2] */
|
||||
function _fun120913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:6, offset: 0x0253a407, size: 145 bytes, params: 8, frame: 18
|
||||
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(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(_fun120914);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/CheckboxGroupActionComponent.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun120914(a0) { // fn#120914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:130, offset: 0x0253a498, size: 254 bytes, params: 2, frame: 21
|
||||
const type = a0.type;
|
||||
const options = a0.options;
|
||||
const env0_2 = a0.maxValues;
|
||||
const value2 = env0_2.useMemo(_fun120915, [options]);
|
||||
const value4 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
|
||||
value2.length > 0 ? {type: type, values: value2} : undefined);
|
||||
const state = value4.state;
|
||||
const env0_4 = value4.executeStateUpdate;
|
||||
const env0_5 = env0_2.useMemo(function() {
|
||||
return state?.type === type ? state.values : [];
|
||||
}, [state, type]);
|
||||
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
|
||||
return (
|
||||
<TableRowGroup hasIcons={false}>
|
||||
{options.map(_fun120919)}
|
||||
</TableRowGroup>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun120915() { // fn#120915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:194, offset: 0x0253a596, size: 45 bytes, params: 1, frame: 12
|
||||
return options.filter(function(a0) {
|
||||
return a0.default;
|
||||
}).map(function(a0) {
|
||||
return a0.value;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun120919(a0) { // fn#120919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:472, offset: 0x0253a5f7, size: 149 bytes, params: 2, frame: 19
|
||||
const binding = env0_5;
|
||||
const value3 = binding.includes(a0.value);
|
||||
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
|
||||
const label = a0.label;
|
||||
const description = a0.description;
|
||||
const env0_0 = a0.value;
|
||||
return (
|
||||
<TableCheckboxRow
|
||||
label={label}
|
||||
subLabel={description}
|
||||
checked={value3}
|
||||
onPress={onPress_120920}
|
||||
disabled={env0_5.length >= maxValues && !value3}
|
||||
key={a0.value}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function onPress_120920(a0) { // fn#120920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:605, offset: 0x0253a68c, size: 99 bytes, params: 2, frame: 15
|
||||
var r0;
|
||||
var items;
|
||||
var value4;
|
||||
const binding = env1_5;
|
||||
if (a0) {
|
||||
items = [];
|
||||
value4 = arraySpread(items, binding, 0, binding);
|
||||
items[value4] = value;
|
||||
value4 + 1;
|
||||
r0 = items;
|
||||
} else {
|
||||
r0 = binding.filter(function(a0) {
|
||||
return a0 !== value;
|
||||
});
|
||||
}
|
||||
executeStateUpdate({type: type, values: r0});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,502 @@
|
||||
/* Metro module 15741; source: modules/interaction_components/native/actions/FileUploadActionComponent.tsx; dependencies: [5, 31, 27, 1379, 4645, 661, 33, 4501, 4136, 6238, 13164, 1244, 4073, 11143, 8341, 5312, 8357, 44, 566, 4697, 4655, 15742, 1909, 4647, 4660, 11543, 4627, 7879, 11096, 1848, 11095, 4658, 4572, 697, 6231, 2] */
|
||||
function _fun120866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:6, offset: 0x02538a33, size: 350 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_120869 = function(a0, a1) {
|
||||
var r0;
|
||||
var r1;
|
||||
var r2;
|
||||
var value3;
|
||||
var length;
|
||||
var value5;
|
||||
var value = undefined;
|
||||
var value2 = value == null;
|
||||
reducibleJoin2: while (true) {
|
||||
if (value2) {
|
||||
r0 = value2;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
value3 = value > a0.length;
|
||||
r0 = value3;
|
||||
break reducibleJoin2;
|
||||
}
|
||||
reducibleJoin4: while (true) {
|
||||
if (r0) {
|
||||
length = a0.length;
|
||||
r1 = length;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
r1 = value;
|
||||
break reducibleJoin4;
|
||||
}
|
||||
value = (0, global.Array)(r1);
|
||||
var value4 = 0;
|
||||
if (value4 < r1) {
|
||||
r2 = value4;
|
||||
reducibleLoop5: while (true) {
|
||||
value[r2] = a0[r2];
|
||||
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
||||
if (value5 < r1) {
|
||||
r2 = value5;
|
||||
continue reducibleLoop5;
|
||||
}
|
||||
break reducibleLoop5;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_7 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).NOOP;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value.jsx;
|
||||
const env0_10 = value.jsxs;
|
||||
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({defaultAttachmentIconWrapper: {'width': 32,
|
||||
'alignItems': 'center'}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/FileUploadActionComponent.tsx');
|
||||
exports.default = FileUploadActionComponent;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_120867(a0, a1) { // fn#120867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:212, offset: 0x02538b91, size: 372 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 _fun120868;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_120869(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') {
|
||||
value = _arrayLikeToArray_120869(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_120869(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun120868;
|
||||
}
|
||||
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 MainAreaCanUpload({openFilePicker, minValues, maxValues, maxSizeBytes}) { // fn#120870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:1213, offset: 0x02538d05, size: 499 bytes, params: 2, frame: 25
|
||||
const fileSizeUtilsModule = require(4136) /* metro dependency 4136: FileSizeUtils */;
|
||||
const formatSize = fileSizeUtilsModule.formatSize;
|
||||
const BYTE_IN_KB = fileSizeUtilsModule.BYTE_IN_KB;
|
||||
const value3 = Reflect.apply(formatSize, fileSizeUtilsModule,
|
||||
[maxSizeBytes / BYTE_IN_KB, {'useKibibytes': true, 'useSpace': true}]);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {onPress: openFilePicker};
|
||||
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const Icon = TableRow2.Icon;
|
||||
const FileUpIcon = (require(13164) /* metro dependency 13164: FileUpIcon */).FileUpIcon;
|
||||
object2.icon = <Icon IconComponent={FileUpIcon} />;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.label = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['/2JwTv'],
|
||||
{maxValues: maxValues});
|
||||
object2.subLabel = minValues > 1 ? minValues === maxValues ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.SAr31z,
|
||||
{minValues: minValues,
|
||||
maxSize: value3}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t['ZG+3Ck'],
|
||||
{minValues: minValues, maxValues: maxValues,
|
||||
maxSize: value3}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.tyxwW1,
|
||||
{maxValues: maxValues, maxSize: value3});
|
||||
object2.start = true;
|
||||
object2.end = true;
|
||||
object2.arrow = true;
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function MainAreaLimitReached() { // fn#120871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:1808, offset: 0x02538ef8, size: 224 bytes, params: 1, frame: 19
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {'icon': null, 'label': null, 'subLabel': null, 'disabled': true, 'start': true, 'end': true};
|
||||
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const Icon = TableRow2.Icon;
|
||||
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
|
||||
object2.icon = <Icon IconComponent={CircleCheckIcon} />;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
object2.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['0PhgpK']]);
|
||||
string = intl.string;
|
||||
const HYg2Hn = (require(1244) /* metro dependency 1244: indexNative */).t.HYg2Hn;
|
||||
object2.subLabel = Reflect.apply(string, intl, [HYg2Hn]);
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function File({upload, handleRemoveFile}) { // fn#120872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:2073, offset: 0x02538fd8, size: 472 bytes, params: 2, frame: 26
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const styles = useStyles();
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const object2 = {};
|
||||
const AttachmentPreview = importDefault(11143) /* metro dependency 11143: AttachmentPreview */;
|
||||
const uri = upload.item.uri;
|
||||
const isImage = upload.isImage;
|
||||
const isVideo = upload.isVideo;
|
||||
const AttachmentIcon = (require(11143) /* metro dependency 11143: AttachmentPreview */).AttachmentIcon;
|
||||
object2.icon = <AttachmentPreview uri={uri} isImage={isImage} isVideo={isVideo} width={32} height={32} defaultPreview={<View style={styles.defaultAttachmentIconWrapper}><AttachmentIcon fileName={upload.filename} /></View>} />;
|
||||
object2.label = upload.filename ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZMirp0);
|
||||
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
|
||||
const object3 = {'variant': 'tertiary', 'size': 'sm'};
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
object3.icon = <XSmallIcon size="sm" />;
|
||||
object3.onPress = function() {
|
||||
return handleRemoveFile(upload.id);
|
||||
};
|
||||
const string = intl.string;
|
||||
const N86XcP = (require(1244) /* metro dependency 1244: indexNative */).t.N86XcP;
|
||||
object3.accessibilityLabel = Reflect.apply(string, intl, [N86XcP]);
|
||||
object2.trailing = <IconButton {...object3} />;
|
||||
object2.start = true;
|
||||
object2.end = true;
|
||||
return <TableRow {...object2} />;
|
||||
}
|
||||
|
||||
function FileUploadActionComponent(a0) { // fn#120874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:2762, offset: 0x025391b0, size: 938 bytes, params: 2, frame: 29
|
||||
var r8;
|
||||
var length;
|
||||
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
||||
var items2;
|
||||
const minValues = a0.minValues;
|
||||
const maxValues = a0.maxValues;
|
||||
const value2 = undefined;
|
||||
const value3 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
|
||||
(importDefault(44) /* metro dependency 44 */)(value3 != null,
|
||||
'FileUploadActionComponent must be used within a ComponentStateContextProvider');
|
||||
const channelId = value3.channelId;
|
||||
(importDefault(44) /* metro dependency 44 */)(channelId != null,
|
||||
'FileUploadActionComponent must be used inside a channel');
|
||||
const modal = value3.modal;
|
||||
const customId = modal == null ? value2 : modal.customId;
|
||||
(importDefault(44) /* metro dependency 44 */)(customId != null,
|
||||
'FileUploadActionComponent requires modalCustomId from context');
|
||||
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
});
|
||||
(importDefault(44) /* metro dependency 44 */)(channel != null, 'FileUploadActionComponent requires a valid channel');
|
||||
const kestrelConfig = (require(4697) /* metro dependency 4697: KestrelExperiment */).getKestrelConfig({location: 'native.FileUploadActionComponent'});
|
||||
const kestrelExperimentModule = require(4697) /* metro dependency 4697: KestrelExperiment */;
|
||||
const getEffectiveKestrelLimit = kestrelExperimentModule.getEffectiveKestrelLimit;
|
||||
const fileUtilsModule = require(4655) /* metro dependency 4655: FileUtils */;
|
||||
const value5 = Reflect.apply(getEffectiveKestrelLimit, kestrelExperimentModule, [kestrelConfig,
|
||||
fileUtilsModule.maxFileSize(channel.guild_id)]);
|
||||
const env0_4 = value5;
|
||||
const {uploadIds, setUploadIds,
|
||||
currentUploads} = (require(15742) /* metro dependency 15742: useFileUploadComponentState */).useFileUploadComponentState(a0);
|
||||
const parents = value3.getParents(a0);
|
||||
const r5 = parents == null ? value2 : parents[0];
|
||||
const type = r5 == null ? value2 : r5.type;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const LABEL = ComponentType.LABEL;
|
||||
let r0 = type !== LABEL ? value2 : r5;
|
||||
(importDefault(44) /* metro dependency 44 */)(r0 != null,
|
||||
'FileUploadActionComponent must be used within a label Component');
|
||||
const binding = env0_4;
|
||||
const value9 = binding.useCallback(_fun120876(), [uploadIds, maxValues, setUploadIds, value5, customId, channelId]);
|
||||
const value10 = binding.useCallback(_fun120881, [channelId, uploadIds, setUploadIds]);
|
||||
const value11 = binding.useCallback(_fun120883, [channel, maxValues, value9, uploadIds, currentUploads, value10]);
|
||||
if (maxValues !== 1) {
|
||||
var stackProps = {spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_12};
|
||||
length = uploadIds.length;
|
||||
r8 = length >= maxValues ? <MainAreaLimitReached /> : <MainAreaCanUpload openFilePicker={value11} minValues={minValues} maxValues={maxValues} maxSizeBytes={value5} />;
|
||||
items2 = [r8];
|
||||
length = currentUploads.length;
|
||||
r8 = length > 0 && ((TableRowGroup) => <TableRowGroup hasIcons>{currentUploads.map(_fun120892)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup);
|
||||
items2[1] = r8;
|
||||
r0 = <Stack {...stackProps}>{items2}</Stack>;
|
||||
} else {
|
||||
length = currentUploads.length;
|
||||
if (length === 1) {
|
||||
r0 = <File upload={currentUploads[0]} handleRemoveFile={value10} />;
|
||||
} else {
|
||||
var stackProps = {spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_12};
|
||||
length = uploadIds.length;
|
||||
r8 = length >= maxValues ? <MainAreaLimitReached /> : <MainAreaCanUpload openFilePicker={value11} minValues={minValues} maxValues={maxValues} maxSizeBytes={value5} />;
|
||||
items2 = [r8];
|
||||
length = currentUploads.length;
|
||||
r8 = length > 0 && ((TableRowGroup) => <TableRowGroup hasIcons>{currentUploads.map(_fun120892)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup);
|
||||
items2[1] = r8;
|
||||
r0 = <Stack {...stackProps}>{items2}</Stack>;
|
||||
}
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun120876() { // fn#120876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:3782, offset: 0x0253955a, size: 36 bytes, params: 1, frame: 12
|
||||
const env0_0 = env1_3(_fun120878);
|
||||
return _fun120880;
|
||||
}
|
||||
|
||||
function _fun120881(a0) { // fn#120881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4448, offset: 0x025397ab, size: 96 bytes, params: 2, frame: 18
|
||||
var environment;
|
||||
const env0_0 = a0;
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
|
||||
const remove = defaultImport.remove;
|
||||
const channelIdBinding = channelId;
|
||||
const InteractionModal = DraftType.InteractionModal;
|
||||
Reflect.apply(remove, defaultImport, [channelIdBinding, a0, InteractionModal]);
|
||||
setUploadIds(uploadIds.filter(_fun120882));
|
||||
}
|
||||
|
||||
function _fun120883() { // fn#120883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4552, offset: 0x0253980b, size: 271 bytes, params: 1, frame: 20
|
||||
var environment;
|
||||
let value = environment.__proto__;
|
||||
const InteractionModal = DraftType.InteractionModal;
|
||||
let object2 = {};
|
||||
object2.channel = channel;
|
||||
const maxValuesBinding = maxValues;
|
||||
object2.uploadLimit = maxValuesBinding;
|
||||
object2.onDismissKeyboard = onDismissKeyboard;
|
||||
object2.onRestoreKeyboard = NOOP;
|
||||
object2.onSelectFiles = onSelectFiles_120885;
|
||||
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
|
||||
value = require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */;
|
||||
const showMediaKeyboardActionSheet = value.showMediaKeyboardActionSheet;
|
||||
object2 = {};
|
||||
object2.channel = channel;
|
||||
object2.draftType = InteractionModal;
|
||||
object2.uploadLimit = maxValuesBinding;
|
||||
object2.disableWhenReachedLimit = true;
|
||||
object2.includedUploadIds = uploadIds;
|
||||
object2.onAttachPress = onAttachPress_120886;
|
||||
object2.onPressCamera = onPressCamera_120887;
|
||||
object2.onPressItem = onPressItem_120888;
|
||||
object2.onViewAll = onViewAll_120890;
|
||||
object2.onManageLimited = function() {
|
||||
var moduleValue = require(dependencyMap[30]);
|
||||
var object = {onDismissKeyboard: require(dependencyMap[28]).hideMediaKeyboardActionSheet};
|
||||
object.onRestoreKeyboard = NOOP;
|
||||
moduleValue.handleLimitedPickerDialog(object);
|
||||
};
|
||||
const hideMediaKeyboardActionSheet = (require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */).hideMediaKeyboardActionSheet;
|
||||
object2.onClose = hideMediaKeyboardActionSheet;
|
||||
object2.onBack = hideMediaKeyboardActionSheet;
|
||||
Reflect.apply(showMediaKeyboardActionSheet, value, [object2]);
|
||||
}
|
||||
|
||||
function _fun120892(a0) { // fn#120892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5869, offset: 0x02539b2f, size: 49 bytes, params: 2, frame: 15
|
||||
return (
|
||||
<File
|
||||
upload={a0}
|
||||
handleRemoveFile={env0_9}
|
||||
key={a0.id}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function* _fun120878(a0) { // fn#120878, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:3802, offset: 0x02539589, size: 412 bytes, params: 2, frame: 21
|
||||
var environment;
|
||||
var r6;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var done;
|
||||
var value7;
|
||||
var binding;
|
||||
var value8;
|
||||
var getFileSize;
|
||||
var uri;
|
||||
var value9;
|
||||
var value10;
|
||||
var value11;
|
||||
var value12;
|
||||
var map;
|
||||
var value13;
|
||||
var concat;
|
||||
var value14;
|
||||
var binding2;
|
||||
var value15;
|
||||
var show;
|
||||
var object2;
|
||||
var intl;
|
||||
var string;
|
||||
var t;
|
||||
var formatToPlainString;
|
||||
if (true) {
|
||||
if (a0.length !== 0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
if (View.length + a0.length > require) {
|
||||
value14 = environment.__proto__.__proto__.__proto__;
|
||||
binding = env3_1;
|
||||
binding2 = env3_2;
|
||||
value15 = binding(binding2[23]);
|
||||
show = value15.show;
|
||||
object2 = {};
|
||||
binding = env3_0;
|
||||
intl = binding(binding2[11]).intl;
|
||||
string = intl.string;
|
||||
t = binding(binding2[11]).t;
|
||||
object2.title = Reflect.apply(string, intl, [t.wOr6hB]);
|
||||
intl = binding(binding2[11]).intl;
|
||||
formatToPlainString = intl.formatToPlainString;
|
||||
t = binding(binding2[11]).t;
|
||||
object2.body = Reflect.apply(formatToPlainString, intl, [t.dy6viJ, {maxValues: require}]);
|
||||
return Reflect.apply(show, value15, [object2]);
|
||||
}
|
||||
value4 = environment.__proto__.__proto__.__proto__;
|
||||
value5 = env3_12(a0);
|
||||
value6 = value5();
|
||||
done = value6.done;
|
||||
reducibleJoin11: while (true) {
|
||||
reducibleJoin10: while (true) {
|
||||
if (done) {
|
||||
break reducibleJoin10;
|
||||
}
|
||||
r6 = value6;
|
||||
reducibleLoop4: while (true) {
|
||||
value7 = r6.value;
|
||||
binding = env3_0;
|
||||
value8 = binding(env3_2[24]);
|
||||
getFileSize = value8.getFileSize;
|
||||
uri = value7.uri;
|
||||
yield Reflect.apply(getFileSize, value8, [uri]);
|
||||
value9 = undefined;
|
||||
value10 = false;
|
||||
if (value10) {
|
||||
return value9;
|
||||
}
|
||||
if (value9 > env2_4) {
|
||||
value12 = env3_0(env3_2[25]);
|
||||
return value12.showFileSizeExceededAlert(env2_4, value9);
|
||||
}
|
||||
value11 = value5();
|
||||
done = value11.done;
|
||||
if (done) {
|
||||
break reducibleJoin10;
|
||||
}
|
||||
r6 = value11;
|
||||
continue reducibleLoop4;
|
||||
}
|
||||
}
|
||||
map = a0.map;
|
||||
value13 = Reflect.apply(map, a0, [_fun120879]);
|
||||
concat = View.concat;
|
||||
ChannelStore(Reflect.apply(concat, View, [value13]));
|
||||
break reducibleJoin11;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onDismissKeyboard() { // fn#120884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4627, offset: 0x0253991a, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__.__proto__;
|
||||
return (require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */).hideMediaKeyboardActionSheet();
|
||||
}
|
||||
|
||||
function onAttachPress_120886() { // fn#120886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4888, offset: 0x0253993f, size: 54 bytes, params: 1, frame: 14
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
|
||||
const handleAttachFile = value.handleAttachFile;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_1, environment);
|
||||
Reflect.apply(handleAttachFile, value, [object2]);
|
||||
}
|
||||
|
||||
function onPressCamera_120887(a0) { // fn#120887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4943, offset: 0x02539975, size: 68 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
|
||||
const handleCameraDialog = value.handleCameraDialog;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_1, undefined);
|
||||
object2['previewType'] = a0;
|
||||
Reflect.apply(handleCameraDialog, value, [object2]);
|
||||
}
|
||||
|
||||
function onPressItem_120888({item, isIncluded}) { // fn#120888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5011, offset: 0x025399b9, size: 158 bytes, params: 2, frame: 15
|
||||
var environment;
|
||||
var value2;
|
||||
var value3;
|
||||
let value = environment.__proto__.__proto__;
|
||||
(require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */).hideMediaKeyboardActionSheet();
|
||||
if (isIncluded) {
|
||||
value = environment.__proto__;
|
||||
value3 = currentUploads.find(_fun120889);
|
||||
if (value3 != null) {
|
||||
env1_9(value3.id);
|
||||
}
|
||||
} else {
|
||||
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
|
||||
value = value.mediaNodeToUploadItem(item);
|
||||
value2 = environment.__proto__;
|
||||
env1_8([value]);
|
||||
}
|
||||
}
|
||||
|
||||
function onViewAll_120890() { // fn#120890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5232, offset: 0x02539a94, size: 83 bytes, params: 1, frame: 15
|
||||
let value = environment.__proto__.__proto__;
|
||||
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
|
||||
const handleViewAllDialog = value.handleViewAllDialog;
|
||||
const object2 = {};
|
||||
copyDataProperties(object2, env0_1, undefined);
|
||||
object2['draftType'] = InteractionModal;
|
||||
object2['includedUploadIds'] = uploadIds;
|
||||
Reflect.apply(handleViewAllDialog, value, [object2]);
|
||||
}
|
||||
|
||||
function _fun120879(a0) { // fn#120879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4183, offset: 0x02539725, size: 134 bytes, params: 2, frame: 16
|
||||
const binding = env4_0;
|
||||
const binding2 = env4_2;
|
||||
const componentUploadId = binding(binding2[26]).makeComponentUploadId(dependencyMap);
|
||||
const value4 = env4_1(binding2[27]);
|
||||
const setFile = value4.setFile;
|
||||
const object3 = {};
|
||||
object3.channelId = importDefault;
|
||||
object3.id = componentUploadId;
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, a0, binding2);
|
||||
object4['id'] = componentUploadId;
|
||||
object3.file = object4;
|
||||
const InteractionModal = env4_7.InteractionModal;
|
||||
object3.draftType = InteractionModal;
|
||||
object3.allowOptimization = false;
|
||||
Reflect.apply(setFile, value4, [object3]);
|
||||
return componentUploadId;
|
||||
}
|
||||
|
||||
function _fun120889(a0) { // fn#120889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5098, offset: 0x02539a57, size: 61 bytes, params: 2, frame: 13
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = require(4658) /* metro dependency 4658: UploadUtils */;
|
||||
return value.doesImageMatchUpload(item.node.image, a0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
/* Metro module 15743; source: modules/interaction_components/native/actions/RadioGroupActionComponent.tsx; dependencies: [31, 33, 8357, 4017, 4577, 4581, 7988, 7987, 6238, 5312, 1244, 2] */
|
||||
function _fun120904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:6, offset: 0x02539e8e, size: 187 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_4 = value2.jsx;
|
||||
const env0_5 = value2.Fragment;
|
||||
const env0_6 = value2.jsxs;
|
||||
object = {code: 'function RadioGroupActionComponentTsx1(){const{withSpring,hasValue,SUBTLE_SPRING}=this.__closure;return{maxHeight:withSpring(hasValue?60:0,SUBTLE_SPRING),marginTop:withSpring(hasValue?8:0,SUBTLE_SPRING),opacity:withSpring(hasValue?1:0,SUBTLE_SPRING)};}'};
|
||||
value = value.memo(_fun120905);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/RadioGroupActionComponent.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun120905(a0) { // fn#120905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:420, offset: 0x02539f49, size: 699 bytes, params: 2, frame: 28
|
||||
var object2;
|
||||
var r5;
|
||||
var View;
|
||||
var TableRow;
|
||||
var intl;
|
||||
const type = a0.type;
|
||||
const options = a0.options;
|
||||
const required = a0.required;
|
||||
const binding = env0_3;
|
||||
let value2 = binding.useRef(null);
|
||||
var env0_3 = value2;
|
||||
const value3 = binding.useMemo(_fun120906, [options]);
|
||||
const value5 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
|
||||
value3 != null ? {type: type, value: value3} : undefined);
|
||||
const state = value5.state;
|
||||
const env0_5 = value5.executeStateUpdate;
|
||||
const value6 = env0_3.useMemo(function() {
|
||||
var stateBinding = state;
|
||||
var value2 = null;
|
||||
return (value2 == stateBinding ? undefined : state.type) !== type ? value2 : state.value;
|
||||
}, [state, type]);
|
||||
const value7 = value6 != null;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = p_120909;
|
||||
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, hasValue: value7};
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
object2.SUBTLE_SPRING = SUBTLE_SPRING;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 1287549755250;
|
||||
closure.__initData = env0_7;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
closure = onChange_120910;
|
||||
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
|
||||
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
|
||||
const tableRadioGroup = <TableRadioGroup hasIcons={false} defaultValue={value6 ?? ''} onChange={closure} groupRef={value2}>{options.map(_fun120911)}</TableRadioGroup>;
|
||||
if (required) {
|
||||
r5 = !required;
|
||||
} else {
|
||||
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
var viewProps = {style: value8, accessibilityElementsHidden: !value7,
|
||||
importantForAccessibility: value7 ? 'auto' : 'no-hide-descendants'};
|
||||
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
var tableRowProps = {icon: ((Icon) => <Icon IconComponent={(require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
tableRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5uAtZN']);
|
||||
tableRowProps.onPress = function() {
|
||||
return onChange_120910(null);
|
||||
};
|
||||
tableRowProps.start = true;
|
||||
tableRowProps.end = true;
|
||||
r5 = <View {...viewProps}><TableRow {...tableRowProps} /></View>;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{tableRadioGroup}
|
||||
{r5}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun120906() { // fn#120906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:502, offset: 0x0253a204, size: 45 bytes, params: 1, frame: 11
|
||||
return options.find(function(a0) {
|
||||
return a0.default;
|
||||
})?.value;
|
||||
}
|
||||
|
||||
function p_120909() { // fn#120909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:778, offset: 0x0253a261, size: 204 bytes, params: 1, frame: 22
|
||||
const object2 = {};
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const resultBinding = result;
|
||||
const value3 = 0;
|
||||
const r10 = resultBinding ? 60 : value3;
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
object2.maxHeight = Reflect.apply(withSpring, springModule, [r10, SUBTLE_SPRING]);
|
||||
const moduleValue2 = springModule;
|
||||
object2.marginTop = moduleValue2.withSpring(result ? 8 : value3, SUBTLE_SPRING);
|
||||
const moduleValue3 = springModule;
|
||||
object2.opacity = moduleValue3.withSpring(result ? 1 : value3, SUBTLE_SPRING);
|
||||
return object2;
|
||||
}
|
||||
|
||||
function onChange_120910(a0) { // fn#120910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:1107, offset: 0x0253a32d, size: 118 bytes, params: 2, frame: 14
|
||||
var current;
|
||||
if (a0 !== '') {
|
||||
if (a0 == null) {
|
||||
executeStateUpdate({type: type, value: null});
|
||||
current = env0_3.current;
|
||||
if (current != null) {
|
||||
current.setValue('');
|
||||
}
|
||||
} else if (env0_6 !== a0) {
|
||||
executeStateUpdate({type: type, value: a0});
|
||||
} else if (required) {
|
||||
executeStateUpdate({type: type, value: a0});
|
||||
} else {
|
||||
executeStateUpdate({type: type, value: null});
|
||||
current = env0_3.current;
|
||||
if (current != null) {
|
||||
current.setValue('');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120911(a0) { // fn#120911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:1360, offset: 0x0253a3a3, size: 82 bytes, params: 2, frame: 16
|
||||
const value = environment.__proto__;
|
||||
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
|
||||
return (
|
||||
<TableRadioRow
|
||||
label={a0.label}
|
||||
subLabel={a0.description}
|
||||
value={a0.value}
|
||||
key={a0.value}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
+112
@@ -0,0 +1,112 @@
|
||||
/* Metro module 14257; source: modules/interaction_components/native/actions/SearchableSelectActionComponent.tsx; dependencies: [31, 1379, 33, 4627, 8357, 44, 8362, 1909, 14255, 8364, 4080, 11443, 1962, 11439, 2] */
|
||||
function _fun107847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:6, offset: 0x0230ae65, size: 158 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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/SearchableSelectActionComponent.tsx');
|
||||
exports.default = SearchableSelectActionComponent;
|
||||
}
|
||||
|
||||
function SearchableSelectActionComponent(a0) { // fn#107848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:256, offset: 0x0230af03, size: 790 bytes, params: 2, frame: 28
|
||||
var require2;
|
||||
var r8;
|
||||
var require3;
|
||||
const env0_0 = a0;
|
||||
let type = a0.type;
|
||||
const value2 = undefined;
|
||||
const selectPlaceholder = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).getSelectPlaceholder(a0);
|
||||
const value4 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
const value5 = null;
|
||||
defaultImport(value5 != (value5 == value4 ? value2 : value4.modal),
|
||||
'SearchableSelectActionComponent must be rendered inside a modal ComponentStateContext');
|
||||
defaultImport(value5 != (value5 == value4 ? value2 : value4.channelId),
|
||||
'SearchableSelectActionComponent must be used inside a channel');
|
||||
const channel = ChannelStore.getChannel(value4.channelId);
|
||||
const guild_id = value5 == channel ? value2 : channel.guild_id;
|
||||
const r9 = value5 != guild_id ? guild_id : value5;
|
||||
const value7 = env0_3.useMemo(_fun107849, [a0.defaultValues, r9]);
|
||||
const {state, visualState, executeStateUpdate} = value4.useComponentState(a0, value7.length > 0 ? {type: type,
|
||||
selectedOptions: value7} : value2);
|
||||
const customId = value4.modal.customId;
|
||||
type = value5 == state ? value2 : state.type;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const USER_SELECT = ComponentType.USER_SELECT;
|
||||
if (type === USER_SELECT) {
|
||||
require2 = require;
|
||||
r8 = state.selectedOptions;
|
||||
require3 = require2;
|
||||
} else if ((value5 == state ? value2 : state.type) === (require(1909) /* metro dependency 1909: Server */).ComponentType.ROLE_SELECT) {
|
||||
require2 = require;
|
||||
r8 = state.selectedOptions;
|
||||
require3 = require2;
|
||||
} else if ((value5 == state ? value2 : state.type) === (require(1909) /* metro dependency 1909: Server */).ComponentType.MENTIONABLE_SELECT) {
|
||||
require2 = require;
|
||||
r8 = state.selectedOptions;
|
||||
require3 = require2;
|
||||
} else if ((value5 == state ? value2 : state.type) !== (require(1909) /* metro dependency 1909: Server */).ComponentType.CHANNEL_SELECT) {
|
||||
r8 = value7;
|
||||
require3 = require;
|
||||
} else {
|
||||
require2 = require;
|
||||
r8 = state.selectedOptions;
|
||||
require3 = require2;
|
||||
}
|
||||
const parents = value4.getParents(a0);
|
||||
const r1 = value5 == parents ? value2 : parents[0];
|
||||
type = value5 == r1 ? value2 : r1.type;
|
||||
const LABEL = ComponentType.LABEL;
|
||||
({channelId: value4.channelId, guildId: r9, containerId: customId, onSubmit: executeStateUpdate,
|
||||
labelComponent: type !== LABEL ? value2 : r1}).allowEmpty = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).canSelectBeEmpty(a0,
|
||||
'modal');
|
||||
const SelectMenuNativeComponent = importDefault(14255) /* metro dependency 14255: SelectMenuNativeComponent */;
|
||||
const object = {};
|
||||
copyDataProperties(object, a0, require3);
|
||||
object['placeholder'] = selectPlaceholder;
|
||||
object['state'] = visualState;
|
||||
object['selectedOptions'] = (require(8364) /* metro dependency 8364: NativeSearchableSelectActionComponentUtils */).transformSearchableSelectOptions(r8,
|
||||
r9);
|
||||
return <SelectMenuNativeComponent model={object} onTap={onTap} />;
|
||||
}
|
||||
|
||||
function _fun107849() { // fn#107849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:718, offset: 0x0230b219, size: 66 bytes, params: 1, frame: 13
|
||||
let value = environment.__proto__;
|
||||
const getSnowflakeSelectDefaultValues = (require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */).getSnowflakeSelectDefaultValues;
|
||||
value = Reflect.apply(getSnowflakeSelectDefaultValues, value, [env0_0.defaultValues, env0_1]);
|
||||
return value ?? [];
|
||||
}
|
||||
|
||||
function SearchableSelectActionComponentOnTap() { // fn#107850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:1601, owner: SearchableSelectActionComponent.onTap, offset: 0x0230b25b, size: 291 bytes, params: 1, frame: 19
|
||||
var defaultImport;
|
||||
var openLazy;
|
||||
var value3;
|
||||
var value4;
|
||||
var object2;
|
||||
var defaultImport2;
|
||||
var value5;
|
||||
var value6;
|
||||
const type = env0_0.type;
|
||||
const ComponentType = require(dependencyMap[7]).ComponentType;
|
||||
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
|
||||
if (type === CHANNEL_SELECT) {
|
||||
defaultImport2 = importDefault(dependencyMap[10]);
|
||||
openLazy = defaultImport2.openLazy;
|
||||
value5 = require(dependencyMap[12])(dependencyMap[11], dependencyMap.paths);
|
||||
value6 = 'ChannelSelectComponentActionSheet:' + customId;
|
||||
object2 = {selectionActionComponent: env0_0};
|
||||
copyDataProperties(object2, env0_3, undefined);
|
||||
Reflect.apply(openLazy, defaultImport2, [value5, value6, object2]);
|
||||
} else {
|
||||
defaultImport = importDefault(dependencyMap[10]);
|
||||
openLazy = defaultImport.openLazy;
|
||||
value3 = require(dependencyMap[12])(dependencyMap[13], dependencyMap.paths);
|
||||
value4 = 'MentionableSelectComponentActionSheet:' + customId;
|
||||
object2 = {selectionActionComponent: env0_0};
|
||||
copyDataProperties(object2, env0_3, undefined);
|
||||
Reflect.apply(openLazy, defaultImport, [value3, value4, object2]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
/* Metro module 14254; source: modules/interaction_components/native/actions/StringSelectActionComponent.tsx; dependencies: [31, 33, 4627, 8357, 44, 1909, 14255, 4080, 11437, 1962, 2] */
|
||||
function _fun107833(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:6, offset: 0x0230a8d9, 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/interaction_components/native/actions/StringSelectActionComponent.tsx');
|
||||
exports.default = StringSelectActionComponent;
|
||||
}
|
||||
|
||||
function StringSelectActionComponent(a0) { // fn#107834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:242, offset: 0x0230a967, size: 461 bytes, params: 2, frame: 24
|
||||
const env0_0 = a0;
|
||||
let type = a0.type;
|
||||
const options = a0.options;
|
||||
const value2 = undefined;
|
||||
const selectPlaceholder = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).getSelectPlaceholder(a0);
|
||||
const value4 = env0_3.useMemo(_fun107835, [options]);
|
||||
const value5 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
|
||||
var env0_3 = value5;
|
||||
(importDefault(44) /* metro dependency 44 */)((value5 == null ? value2 : value5.modal) != null,
|
||||
'StringSelectActionComponent must be rendered inside a modal ComponentStateContext');
|
||||
const value6 = value5.useComponentState(a0, value4.length > 0 ? {type: type, values: value4} : value2);
|
||||
const state = value6.state;
|
||||
const visualState = value6.visualState;
|
||||
const env0_5 = value6.executeStateUpdate;
|
||||
const value7 = env0_3.useMemo(_fun107838, [options, type, state]);
|
||||
const env0_6 = value5.modal.customId;
|
||||
const parents = value5.getParents(a0);
|
||||
const r2 = parents == null ? value2 : parents[0];
|
||||
type = r2 == null ? value2 : r2.type;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const LABEL = ComponentType.LABEL;
|
||||
const env0_7 = type !== LABEL ? value2 : r2;
|
||||
const SelectMenuNativeComponent = importDefault(14255) /* metro dependency 14255: SelectMenuNativeComponent */;
|
||||
const object = {};
|
||||
copyDataProperties(object, a0, options);
|
||||
object['placeholder'] = selectPlaceholder;
|
||||
object['state'] = visualState;
|
||||
object['selectedOptions'] = value7;
|
||||
return <SelectMenuNativeComponent model={object} onTap={onTap} />;
|
||||
}
|
||||
|
||||
function _fun107835() { // fn#107835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:356, offset: 0x0230ab34, size: 45 bytes, params: 1, frame: 12
|
||||
return options.filter(function(a0) {
|
||||
return a0.default;
|
||||
}).map(function(a0) {
|
||||
return a0.value;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun107838() { // fn#107838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:697, offset: 0x0230ab61, size: 88 bytes, params: 1, frame: 12
|
||||
return (state?.type === type ? state.values : []).map(function(a0) {
|
||||
var env0_0 = a0;
|
||||
return options.findIndex(_fun107840);
|
||||
}).filter(function(a0) {
|
||||
return a0 !== -1;
|
||||
});
|
||||
}
|
||||
|
||||
function StringSelectActionComponentOnTap() { // fn#107842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:1014, owner: StringSelectActionComponent.onTap, offset: 0x0230abdd, size: 189 bytes, params: 1, frame: 21
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(dependencyMap[7]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[9]);
|
||||
value = value(dependencyMap[8], dependencyMap.paths);
|
||||
const value3 = 'StringSelectComponentActionSheet:' + customId;
|
||||
const object2 = {};
|
||||
const binding = env0_0;
|
||||
object2.selectionActionComponent = binding;
|
||||
object2.labelComponent = env0_7;
|
||||
object2.channelId = env0_3.channelId;
|
||||
object2.containerId = customId;
|
||||
object2.onSubmit = executeStateUpdate;
|
||||
object2.allowEmpty = require(dependencyMap[2]).canSelectBeEmpty(binding, 'modal');
|
||||
Reflect.apply(openLazy, defaultImport, [value, value3, object2]);
|
||||
}
|
||||
|
||||
function _fun107839(a0) { // fn#107839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:748, offset: 0x0230abb9, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return options.findIndex(_fun107840);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/* Metro module 15739; source: modules/interaction_components/native/actions/TextInputActionComponent.tsx; dependencies: [57, 31, 33, 8357, 15736, 1909, 6985, 7687, 7682, 2] */
|
||||
function _fun120860(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15947:6, offset: 0x025385af, size: 164 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(_fun120861);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/TextInputActionComponent.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun120861(a0) { // fn#120861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15947:140, offset: 0x02538653, size: 533 bytes, params: 2, frame: 26
|
||||
const type = a0.type;
|
||||
const style = a0.style;
|
||||
const label = a0.label;
|
||||
const placeholder = a0.placeholder;
|
||||
const required = a0.required;
|
||||
const maxLength = a0.maxLength;
|
||||
let value = a0.value;
|
||||
const value3 = undefined;
|
||||
value = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
|
||||
value != null ? {type: type, value: value} : value3);
|
||||
const env0_2 = value.state;
|
||||
const executeStateUpdate = value.executeStateUpdate;
|
||||
const env0_3 = executeStateUpdate;
|
||||
const error = value.error;
|
||||
const useIsFirstTextInputInModal = (require(15736) /* metro dependency 15736: InteractionModalUtils */).useIsFirstTextInputInModal;
|
||||
value = Reflect.apply(useIsFirstTextInputInModal, value, [a0.id]);
|
||||
const textAreaFieldProps = {placeholder: placeholder, maxLength: maxLength,
|
||||
status: error != null ? 'error' : 'default', defaultValue: env0_2(env0_3.useState(function() {
|
||||
return state?.type === type ? state.value : value;
|
||||
}), 1)[0], onChange: env0_3.useCallback(function(a0) {
|
||||
return executeStateUpdate({type: type, value: a0});
|
||||
}, [type, executeStateUpdate]), autoFocus: value, isClearable: true};
|
||||
const TextInputComponentStyle = (require(1909) /* metro dependency 1909: Server */).TextInputComponentStyle;
|
||||
const SMALL = TextInputComponentStyle.SMALL;
|
||||
const r5 = SMALL === style ? ((TextField) => <TextField {...textAreaFieldProps} />)((require(6985) /* metro dependency 6985: TextFieldNative */).TextField) : (require(1909) /* metro dependency 1909: Server */).TextInputComponentStyle.PARAGRAPH !== style ? value3 : ((TextAreaField) => <TextAreaField {...textAreaFieldProps} />)((require(7687) /* metro dependency 7687: TextAreaFieldNative */).TextAreaField);
|
||||
if (label == null) {
|
||||
return r5;
|
||||
} else {
|
||||
const Input = (require(7682) /* metro dependency 7682: InputNative */).Input;
|
||||
return (
|
||||
<Input
|
||||
label={label}
|
||||
required={required}
|
||||
errorMessage={error}
|
||||
>
|
||||
{r5}
|
||||
</Input>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/* Metro module 11443; source: modules/interaction_components/native/components/ChannelSelectComponentActionSheet.tsx; dependencies: [31, 1379, 1867, 33, 8362, 11440, 11438, 8364, 1305, 9122, 2] */
|
||||
function _fun87594(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:6, offset: 0x01fc4bf2, size: 174 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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/ChannelSelectComponentActionSheet.tsx');
|
||||
exports.default = _default_87595;
|
||||
}
|
||||
|
||||
function _default_87595({selectionActionComponent, labelComponent, channelId, guildId, containerId, onSubmit, allowEmpty}) { // fn#87595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:149, offset: 0x01fc4ca0, size: 307 bytes, params: 2, frame: 25
|
||||
const value3 = (importDefault(11440) /* metro dependency 11440: useSearchableSelectComponent */)({selectActionComponent: selectionActionComponent,
|
||||
containerId: containerId, guildId: guildId, queryOptions: env0_3.useCallback(_fun87596, [channelId,
|
||||
selectionActionComponent.channelTypes]), onSubmit: onSubmit});
|
||||
const options = value3.options;
|
||||
const selectedOptions = value3.selectedOptions;
|
||||
const isSelected = value3.isSelected;
|
||||
const onPressOptionItem = value3.onPressOptionItem;
|
||||
var env0_3 = value3.submitSelection;
|
||||
return ((Component) => <Component onPressOptionItem={onPressOptionItem} renderIcon={renderIcon} selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} options={options} selectedCount={selectedOptions.length} selectedOptions={selectedOptions} isSelected={isSelected} submitSelection={function() {
|
||||
return submitSelection();
|
||||
}} onQueryChange={value3.setQuery} itemAccessibilityLabel={itemAccessibilityLabel} channelId={channelId} allowEmpty={allowEmpty} />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
|
||||
}
|
||||
|
||||
function _fun87596(a0) { // fn#87596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:297, offset: 0x01fc4dd3, size: 54 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */;
|
||||
return value.queryChannels(a0, channelId, channelTypes);
|
||||
}
|
||||
|
||||
function _default_87595RenderIcon(a0) { // fn#87597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:575, owner: _default_87595.renderIcon, offset: 0x01fc4e09, size: 139 bytes, params: 2, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const channel = ChannelStore.getChannel(a0.value);
|
||||
if (channel == null) {
|
||||
return null;
|
||||
}
|
||||
const getGuild = GuildStore.getGuild;
|
||||
const channelIconData = (require(8364) /* metro dependency 8364: NativeSearchableSelectActionComponentUtils */).getChannelIconData(channel,
|
||||
Reflect.apply(getGuild, GuildStore, [guildId]));
|
||||
return channelIconData != null && ((Icon) => <Icon source={channelIconData} />)((require(1305) /* metro dependency 1305: native */).Icon);
|
||||
}
|
||||
|
||||
function _default_87595ItemAccessibilityLabel({value}) { // fn#87599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11629:899, owner: _default_87595.itemAccessibilityLabel, offset: 0x01fc4e94, size: 70 bytes, params: 2, frame: 12
|
||||
const channel = ChannelStore.getChannel(environment.__proto__);
|
||||
if (channel != null) {
|
||||
return (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel});
|
||||
}
|
||||
}
|
||||
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
/* Metro module 13237; source: modules/interaction_components/native/components/GuildSelectComponentActionSheet.tsx; dependencies: [57, 31, 27, 1867, 4896, 33, 4501, 4633, 1244, 4080, 11438, 6819, 4617, 1305, 4573, 6526, 2] */
|
||||
function _fun100949(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:6, offset: 0x02201d0b, size: 291 bytes, params: 8, frame: 22
|
||||
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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const sortedGuildStore = importDefault(4896) /* metro dependency 4896: SortedGuildStore */;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.jsxs;
|
||||
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({guildIdentity: {'flexDirection': 'row',
|
||||
'alignItems': 'center'}, iconContainer: {marginRight: 16}, avatar: {marginRight: 4}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/GuildSelectComponentActionSheet.tsx');
|
||||
exports.default = _default_100950;
|
||||
}
|
||||
|
||||
function _default_100950({selectedGuild, onSelectGuild, user}) { // fn#100950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:327, offset: 0x02201e2e, size: 536 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
const styles = useStyles();
|
||||
let binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, ['']);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const GUILD = SelectOptionType.GUILD;
|
||||
useState = binding.useState;
|
||||
const value4 = binding2(Reflect.apply(useState, binding, [{type: GUILD, value: selectedGuild.id,
|
||||
label: selectedGuild.name, guild: selectedGuild}]), 2);
|
||||
const property3 = value4[0];
|
||||
var env0_4 = property3;
|
||||
const env0_5 = value4[1];
|
||||
const r7 = property3 != null ? [property3] : [];
|
||||
object2 = {'maxValues': 1, 'minValues': 1};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
object2.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ZImm/x']);
|
||||
binding = env0_4;
|
||||
return ((Component) => <Component onPressOptionItem={onPressOptionItem} onRemoveOptionItem={onRemoveOptionItem} renderIcon={renderIcon} renderHeaderIcon={renderHeaderIcon} iconContainerStyle={styles.iconContainer} renderDescription={renderDescription_100962} selectionActionComponent={object2} options={binding.useMemo(_fun100956,
|
||||
[property, binding.useCallback(function(a0) {
|
||||
return _fun100952(a0);
|
||||
},
|
||||
[])])} selectedCount={r7.length} selectedOptions={r7} isSelected={isSelected} submitSelection={submitSelection} onQueryChange={property2} itemAccessibilityLabel={function(a0) {
|
||||
return a0.label;
|
||||
}} allowEmpty={false} expanded />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
|
||||
}
|
||||
|
||||
function _fun100951(a0) { // fn#100951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:648, offset: 0x02202046, size: 21 bytes, params: 2, frame: 11
|
||||
return queryGuilds_100952(a0);
|
||||
}
|
||||
|
||||
function _default_100950SubmitSelection() { // fn#100957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1121, owner: _default_100950.submitSelection, offset: 0x0220218d, size: 37 bytes, params: 1, frame: 11
|
||||
const value = environment.__proto__;
|
||||
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _default_100950OnPressOptionItem(a0, a1) { // fn#100958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1188, owner: _default_100950.onPressOptionItem, offset: 0x022021b2, size: 41 bytes, params: 3, frame: 13
|
||||
onSelectGuild(a1.guild);
|
||||
env0_5(a1);
|
||||
submitSelection();
|
||||
}
|
||||
|
||||
function _default_100950RenderIcon(a0) { // fn#100960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1275, owner: _default_100950.renderIcon, offset: 0x022021db, size: 51 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
return ((Component) => <Component guild={a0.guild} />)(importDefault(6819) /* metro dependency 6819: GuildIcon */);
|
||||
}
|
||||
|
||||
function _default_100950RenderHeaderIcon(a0) { // fn#100961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1323, owner: _default_100950.renderHeaderIcon, offset: 0x0220220e, size: 80 bytes, params: 2, frame: 16
|
||||
const GuildIcon = importDefault(6819) /* metro dependency 6819: GuildIcon */;
|
||||
const GuildIconSizes = (require(6819) /* metro dependency 6819: GuildIcon */).GuildIconSizes;
|
||||
const XSMALL = GuildIconSizes.XSMALL;
|
||||
return <GuildIcon size={XSMALL} guild={a0.guild} />;
|
||||
}
|
||||
|
||||
function _default_100950RenderDescription(a0) { // fn#100962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1443, owner: _default_100950.renderDescription, offset: 0x0220225e, size: 319 bytes, params: 2, frame: 25
|
||||
var items2;
|
||||
const userBinding = user;
|
||||
const hasAvatarForGuild2 = userBinding.hasAvatarForGuild(a0.guild.id);
|
||||
const nickname = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getNickname(a0.guild.id,
|
||||
undefined, userBinding);
|
||||
if (hasAvatarForGuild2) {
|
||||
var viewBindingProps = {style: styles.guildIdentity};
|
||||
items2 = [hasAvatarForGuild2 && ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} style={styles.avatar} user={user} guildId={a0.guild.id} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)];
|
||||
items2[1] = ((Text) => <Text variant="text-sm/medium" color="text-default">{nickname ?? user.username}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
if (nickname != null) {
|
||||
var viewBindingProps = {style: styles.guildIdentity};
|
||||
items2 = [hasAvatarForGuild2 && ((Avatar) => <Avatar size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.SIZE_16} style={styles.avatar} user={user} guildId={a0.guild.id} animate />)((require(1305) /* metro dependency 1305: native */).Avatar)];
|
||||
items2[1] = ((Text) => <Text variant="text-sm/medium" color="text-default">{nickname ?? user.username}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
||||
return (
|
||||
<View {...viewBindingProps}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function _default_100950IsSelected({value}) { // fn#100963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:1885, owner: _default_100950.isSelected, offset: 0x0220239d, size: 41 bytes, params: 2, frame: 4
|
||||
return value === env0_4?.value;
|
||||
}
|
||||
|
||||
function queryGuilds_100952(a0) { // fn#100952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:651, offset: 0x0220205b, size: 155 bytes, params: 2, frame: 14
|
||||
var environment;
|
||||
var value;
|
||||
var reduce;
|
||||
var Array;
|
||||
var value2;
|
||||
var array;
|
||||
const queryGuilds_100952GuildRecordToGuildSearchableSelectOption = function(a0) {
|
||||
var object = {};
|
||||
object.type = require(dependencyMap[7]).SelectOptionType.GUILD;
|
||||
object.value = a0.id;
|
||||
object.label = a0.name;
|
||||
object.guild = a0;
|
||||
return object;
|
||||
};
|
||||
if (a0.length === 0) {
|
||||
value = environment.__proto__.__proto__;
|
||||
value = SortedGuildStore.getFlattenedGuildIds();
|
||||
reduce = value.reduce;
|
||||
Array = global.Array;
|
||||
value2 = Object.create(Array.prototype, {constructor: {value: Array}});
|
||||
array = new Array();
|
||||
return Reflect.apply(reduce, value, [_fun100954, array instanceof Object ? array : value2]);
|
||||
}
|
||||
value = environment.__proto__.__proto__;
|
||||
value = importDefault(6526) /* metro dependency 6526: AutocompleteUtils */;
|
||||
value = value.queryGuilds({query: a0});
|
||||
return value.map(function({record}) {
|
||||
return queryGuilds_100952GuildRecordToGuildSearchableSelectOption(record);
|
||||
});
|
||||
}
|
||||
|
||||
function _fun100954(a0, a1) { // fn#100954, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13427:851, offset: 0x0220213c, size: 56 bytes, params: 3, frame: 13
|
||||
let value = environment.__proto__.__proto__.__proto__;
|
||||
value = GuildStore.getGuild(a1);
|
||||
if (value != null) {
|
||||
a0.push(queryGuilds_100952GuildRecordToGuildSearchableSelectOption(value));
|
||||
}
|
||||
return a0;
|
||||
}
|
||||
|
||||
+209
@@ -0,0 +1,209 @@
|
||||
/* Metro module 11439; source: modules/interaction_components/native/components/MentionableSelectComponentActionSheet.tsx; dependencies: [31, 27, 1938, 1867, 4396, 1878, 661, 33, 4501, 697, 6736, 8362, 11440, 4633, 1305, 6794, 6795, 9097, 11438, 9210, 4573, 11441, 1244, 2] */
|
||||
function _fun87574(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:6, offset: 0x01fc3e41, size: 430 bytes, params: 8, frame: 25
|
||||
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(27) /* metro dependency 27 */).View;
|
||||
const guildRoleStore = importDefault(1938) /* metro dependency 1938: GuildRoleStore */;
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
let value = require(661) /* metro dependency 661: Constants */;
|
||||
const Fonts = value.Fonts;
|
||||
const env0_9 = value.DEFAULT_ROLE_COLOR_HEX;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_10 = value.jsx;
|
||||
const env0_11 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
let PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
|
||||
object2.name = {color: INTERACTIVE_TEXT_DEFAULT, fontFamily: PRIMARY_MEDIUM, fontSize: 12, lineHeight: 16};
|
||||
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
|
||||
PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
|
||||
object2.discriminator = {color: TEXT_MUTED, fontFamily: PRIMARY_MEDIUM, fontSize: 12};
|
||||
object2.roleCountContainer = {'display': 'flex', 'flexDirection': 'row', 'flexGrow': 1, 'alignItems': 'center',
|
||||
'justifyContent': 'flex-end', 'marginRight': 12};
|
||||
object2.roleCountText = {paddingRight: 4};
|
||||
const env0_12 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/MentionableSelectComponentActionSheet.tsx');
|
||||
exports.default = _default_87575;
|
||||
}
|
||||
|
||||
function _default_87575({selectionActionComponent, labelComponent, channelId, guildId, containerId, onSubmit, allowEmpty}) { // fn#87575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:624, offset: 0x01fc3fef, size: 440 bytes, params: 2, frame: 29
|
||||
const env0_3 = useStyles();
|
||||
const guild = GuildStore.getGuild(guildId);
|
||||
const defaultImport = importDefault(6736) /* metro dependency 6736: useGuildRoleMemberCounts */;
|
||||
const id = guild?.id;
|
||||
const MIN_REREQUEST_TIME = (require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */).MIN_REREQUEST_TIME;
|
||||
const env0_5 = defaultImport(id, MIN_REREQUEST_TIME);
|
||||
const binding = env0_3;
|
||||
const {options, selectedOptions, isSelected, onPressOptionItem, submitSelection,
|
||||
setQuery} = (importDefault(11440) /* metro dependency 11440: useSearchableSelectComponent */)({selectActionComponent: selectionActionComponent,
|
||||
containerId: containerId, guildId: guildId, queryOptions: binding.useCallback(_fun87576,
|
||||
[selectionActionComponent, channelId]), onSubmit: onSubmit});
|
||||
return ((Component) => <Component onPressOptionItem={onPressOptionItem} renderIcon={binding.useCallback(_fun87577,
|
||||
[guild,
|
||||
guildId])} renderDescription={renderDescription_87578} renderOptionSuffix={renderOptionSuffix} selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} options={options} selectedCount={selectedOptions.length} selectedOptions={selectedOptions} isSelected={isSelected} submitSelection={submitSelection} onQueryChange={setQuery} itemAccessibilityLabel={itemAccessibilityLabel} channelId={channelId} allowEmpty={allowEmpty} />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
|
||||
}
|
||||
|
||||
function _fun87576(a0) { // fn#87576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:837, offset: 0x01fc41a7, size: 59 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
value = require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */;
|
||||
return value.queryMentionables(selectionActionComponent.type, a0, channelId);
|
||||
}
|
||||
|
||||
function _fun87577(a0) { // fn#87577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:1094, offset: 0x01fc41e2, size: 595 bytes, params: 2, frame: 21
|
||||
var r7;
|
||||
var r2;
|
||||
var r9;
|
||||
var id;
|
||||
var moduleValue;
|
||||
var customIconSrc;
|
||||
var unicodeEmoji;
|
||||
const ShieldUserIcon = (require(9097) /* metro dependency 9097: ShieldUserIcon */).ShieldUserIcon;
|
||||
var value8;
|
||||
var isMobileOnline;
|
||||
var isMobileOnline2;
|
||||
var isVROnline;
|
||||
var isVROnline2;
|
||||
var getStatus;
|
||||
let type = a0.type;
|
||||
const value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const USER = SelectOptionType.USER;
|
||||
if (type === USER) {
|
||||
value8 = UserStore.getUser(a0.value);
|
||||
if (value8 == null) {
|
||||
return null;
|
||||
}
|
||||
isMobileOnline = PresenceStore.isMobileOnline;
|
||||
id = value8.id;
|
||||
isMobileOnline2 = Reflect.apply(isMobileOnline, PresenceStore, [id]);
|
||||
isVROnline = PresenceStore.isVROnline;
|
||||
id = value8.id;
|
||||
isVROnline2 = Reflect.apply(isVROnline, PresenceStore, [id]);
|
||||
getStatus = PresenceStore.getStatus;
|
||||
id = value8.id;
|
||||
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
|
||||
return (
|
||||
<Avatar
|
||||
user={value8}
|
||||
isMobileOnline={isMobileOnline2}
|
||||
isVROnline={isVROnline2}
|
||||
status={Reflect.apply(getStatus, PresenceStore, [id])}
|
||||
guildId={guildId ?? value2}
|
||||
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL}
|
||||
/>
|
||||
);
|
||||
}
|
||||
type = a0.type;
|
||||
const ROLE = SelectOptionType.ROLE;
|
||||
if (type === ROLE) {
|
||||
r7 = env0_4 != null ? GuildRoleStore.getRole(env0_4.id, a0.value) : value2;
|
||||
if (env0_4 == null) {
|
||||
return null;
|
||||
}
|
||||
if (r7 == null) {
|
||||
return null;
|
||||
}
|
||||
moduleValue = require(6794) /* metro dependency 6794: RoleIconUtils */;
|
||||
if (moduleValue.canGuildUseRoleIcons(env0_4, r7)) {
|
||||
r2 = (require(6794) /* metro dependency 6794: RoleIconUtils */).getRoleIconData(r7) ?? ({});
|
||||
customIconSrc = r2.customIconSrc;
|
||||
unicodeEmoji = r2.unicodeEmoji;
|
||||
r9 = customIconSrc != null ? {uri: customIconSrc} : value2;
|
||||
if (r9 != null) {
|
||||
return ((Component) => <Component source={r9} unicodeEmoji={unicodeEmoji} size={24} name={r7.name} />)(importDefault(6795) /* metro dependency 6795: RoleIcon */);
|
||||
}
|
||||
if (unicodeEmoji != null) {
|
||||
return ((Component) => <Component source={r9} unicodeEmoji={unicodeEmoji} size={24} name={r7.name} />)(importDefault(6795) /* metro dependency 6795: RoleIcon */);
|
||||
}
|
||||
return <ShieldUserIcon color={(r7 == null ? value2 : r7.colorString) ?? DEFAULT_ROLE_COLOR_HEX} />;
|
||||
}
|
||||
return <ShieldUserIcon color={(r7 == null ? value2 : r7.colorString) ?? DEFAULT_ROLE_COLOR_HEX} />;
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _default_87575RenderDescription(a0) { // fn#87578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:1915, owner: _default_87575.renderDescription, offset: 0x01fc4435, size: 147 bytes, params: 2, frame: 15
|
||||
var value3;
|
||||
var object2;
|
||||
var stylesBinding;
|
||||
var name;
|
||||
const type = a0.type;
|
||||
let value = environment.__proto__;
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const USER = SelectOptionType.USER;
|
||||
if (type === USER) {
|
||||
value3 = UserStore.getUser(a0.value);
|
||||
value = importDefault(9210) /* metro dependency 9210: DiscordTag */;
|
||||
object2 = {user: value3};
|
||||
stylesBinding = styles;
|
||||
name = stylesBinding.name;
|
||||
object2.usernameStyle = name;
|
||||
object2.discriminatorStyle = stylesBinding.discriminator;
|
||||
name = stylesBinding.name;
|
||||
object2.nicknameStyle = name;
|
||||
return ((Component) => <Component {...object2} />)(value);
|
||||
}
|
||||
}
|
||||
|
||||
function renderOptionSuffix(a0) { // fn#87579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:2114, owner: _default_87575.renderOptionSuffix, offset: 0x01fc44c8, size: 293 bytes, params: 2, frame: 20
|
||||
var r3;
|
||||
var r9;
|
||||
var value4;
|
||||
var stylesBinding;
|
||||
const type = a0.type;
|
||||
const value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const ROLE = SelectOptionType.ROLE;
|
||||
if (type === ROLE) {
|
||||
value4 = null;
|
||||
r3 = value4 != env0_4 ? GuildRoleStore.getRole(env0_4.id, a0.value) : value2;
|
||||
r9 = value4 == r3 ? value4 : value4 == env0_5 ? value2 : env0_5[r3.id];
|
||||
if (value4 == r9) {
|
||||
return value2;
|
||||
}
|
||||
stylesBinding = styles;
|
||||
return (
|
||||
<View style={stylesBinding.roleCountContainer}>
|
||||
{((Text) => <Text style={stylesBinding.roleCountText} variant="text-sm/medium" color="interactive-text-default">{r9}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
|
||||
{((UserIcon) => <UserIcon size="xs" />)((require(11441) /* metro dependency 11441: UserIcon */).UserIcon)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
function _default_87575ItemAccessibilityLabel(a0) { // fn#87580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11625:2625, owner: _default_87575.itemAccessibilityLabel, offset: 0x01fc45ed, size: 380 bytes, params: 2, frame: 20
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var value4;
|
||||
let type = a0.type;
|
||||
const value = environment.__proto__;
|
||||
const value2 = undefined;
|
||||
const SelectOptionType = (require(4633) /* metro dependency 4633: InteractionComponentTypes */).SelectOptionType;
|
||||
const USER = SelectOptionType.USER;
|
||||
if (type === USER) {
|
||||
value4 = UserStore.getUser(a0.value);
|
||||
return value4 == null ? intl.formatToPlainString(t.AydQ7a, {username: a0.label,
|
||||
discriminator: value4 == null ? value2 : value4.discriminator}) : value4.bot ? intl.formatToPlainString(t['zogo/8'],
|
||||
|
||||
{username: a0.label,
|
||||
discriminator: value4 == null ? value2 : value4.discriminator}) : intl.formatToPlainString(t.AydQ7a,
|
||||
{username: a0.label, discriminator: value4 == null ? value2 : value4.discriminator});
|
||||
}
|
||||
type = a0.type;
|
||||
const ROLE = SelectOptionType.ROLE;
|
||||
if (type === ROLE) {
|
||||
return intl.formatToPlainString(t.F6ejkk, {roleName: a0.label});
|
||||
}
|
||||
return value2;
|
||||
}
|
||||
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
/* Metro module 11438; source: modules/interaction_components/native/components/SelectComponentActionSheet.tsx; dependencies: [31, 27, 1379, 1934, 6276, 33, 4501, 697, 6758, 1244, 4578, 9100, 3874, 6238, 7974, 8707, 5463, 3869, 1585, 1478, 5314, 566, 4080, 6275, 6277, 2] */
|
||||
function _fun87558(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:6, offset: 0x01fc3050, size: 549 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 */;
|
||||
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const env0_7 = (require(6276) /* metro dependency 6276: ActionSheetConstants */).ACTION_SHEET_START_HEIGHT_RATIO;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.Fragment;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
||||
object2.selectionOptionItemIconWrapper = {width: PX_32, alignItems: 'center'};
|
||||
const object5 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.width = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object5.height = PX_16;
|
||||
object2.tagListIconWrapper = object5;
|
||||
const object7 = {};
|
||||
object7.transform = [{scale: 0.75}];
|
||||
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object7.top = -PX_4;
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object7.left = -PX_4;
|
||||
object2.tagListIcon = object7;
|
||||
const object8 = {};
|
||||
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
||||
object8.paddingHorizontal = PX_4;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.marginTop = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object8.marginHorizontal = PX_16;
|
||||
object2.textInputWrapper = object8;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/SelectComponentActionSheet.tsx');
|
||||
exports.default = SelectComponentActionSheet;
|
||||
}
|
||||
|
||||
function SelectionHeader({renderIcon, selectionActionComponent, labelComponent, selectButtonDisabled, selectedOptions, submitSelection, onPressOptionItem, onRemoveOptionItem, onQueryChange}) { // fn#87559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:612, offset: 0x01fc3275, size: 698 bytes, params: 2, frame: 32
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var Button;
|
||||
const styles = useStyles();
|
||||
const value3 = selectionActionComponent.maxValues > 1;
|
||||
const env0_6 = onRemoveOptionItem.useRef(null);
|
||||
const value5 = onRemoveOptionItem.useMemo(_fun87560, [selectedOptions, styles, renderIcon]);
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
|
||||
const object = {};
|
||||
let r14 = labelComponent?.label ?? selectionActionComponent.placeholder;
|
||||
r14 = r14 ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Otr6W2);
|
||||
object.title = r14;
|
||||
object.subtitle = value3 && selectionActionComponent.minValues > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.Jmwzdx,
|
||||
{count: selectionActionComponent.minValues}) : undefined;
|
||||
if (value3) {
|
||||
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
r14 = <Button size="sm" variant={selectButtonDisabled ? 'secondary' : 'primary'} disabled={selectButtonDisabled} onPress={submitSelection} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.XqMe3N)} />;
|
||||
} else {
|
||||
r14 = undefined;
|
||||
}
|
||||
object.trailing = r14;
|
||||
return (
|
||||
<>
|
||||
<BottomSheetTitleHeader {...object} />
|
||||
{onQueryChange != null && value5 != null ? ((Component) => <Component inActionSheet style={styles.textInputWrapper} icon={value3 ? value5.length === 0 ? undefined : <View /> : undefined} tags={value5} onRemove={function(a0) {
|
||||
var r2;
|
||||
var selectedOptionsBinding = selectedOptions;
|
||||
var value2 = undefined;
|
||||
r2 = selectedOptionsBinding == null ? value2 : selectedOptions[a0];
|
||||
if (r2 != null) {
|
||||
(onRemoveOptionItem ?? onPressOptionItem)(a0, r2);
|
||||
}
|
||||
return value2;
|
||||
}} onChangeText={onChangeText} />)(importDefault(9100) /* metro dependency 9100: TagListInputNative */) : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function SelectionOptionItem({item, onPressOptionItem, clearable, selected, disabled, index, start, end, iconContainerStyle, itemAccessibilityLabel, skipIcon, multi, renderDescription, renderIcon, renderOptionSuffix}) { // fn#87564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:1745, offset: 0x01fc3644, size: 596 bytes, params: 2, frame: 33
|
||||
var r8;
|
||||
var FormCheckbox;
|
||||
const styles = useStyles();
|
||||
const value5 = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useCheckboxA11yNative({checked: selected != null && selected,
|
||||
disabled: disabled});
|
||||
const useA11yRolesNativeModule = require(3874) /* metro dependency 3874: useA11yRolesNative */;
|
||||
const useRadioA11yNative = useA11yRolesNativeModule.useRadioA11yNative;
|
||||
const r19 = multi ? value5 : Reflect.apply(useRadioA11yNative, useA11yRolesNativeModule,
|
||||
[{selected: selected != null && selected, disabled: disabled}]);
|
||||
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
|
||||
const accessibilityRole = r19.accessibilityRole;
|
||||
const r20 = itemAccessibilityLabel?.(item);
|
||||
const accessibilityState = r19.accessibilityState;
|
||||
const r5 = skipIcon ? null : <View style={[styles.selectionOptionItemIconWrapper,
|
||||
iconContainerStyle]}>{renderIcon(item)}</View>;
|
||||
const label = item.label;
|
||||
const r6 = renderDescription?.(item);
|
||||
const r11 = renderOptionSuffix?.(item);
|
||||
if (clearable) {
|
||||
FormCheckbox = (require(7974) /* metro dependency 7974: FormCheckboxNative */).FormCheckbox;
|
||||
selected = !!selected && selected;
|
||||
r8 = <FormCheckbox checked={selected} />;
|
||||
} else if (selected !== true) {
|
||||
r8 = null;
|
||||
} else {
|
||||
const CheckmarkSmallBoldIcon = (require(8707) /* metro dependency 8707: CheckmarkSmallBoldIcon */).CheckmarkSmallBoldIcon;
|
||||
r8 = <CheckmarkSmallBoldIcon color="text-brand" />;
|
||||
}
|
||||
return (
|
||||
<TableRow
|
||||
accessibilityRole={accessibilityRole}
|
||||
accessibilityLabel={r20}
|
||||
accessibilityState={accessibilityState}
|
||||
start={start}
|
||||
end={end}
|
||||
disabled={disabled}
|
||||
icon={r5}
|
||||
label={label}
|
||||
labelLineClamp={1}
|
||||
subLabel={r6}
|
||||
subLabelLineClamp={1}
|
||||
onPress={function() {
|
||||
return onPressOptionItem(index, item);
|
||||
}}
|
||||
trailing={<View style={{flexDirection: 'row'}}>{r11}{r8}</View>}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function SelectComponentActionSheet({selectionActionComponent, labelComponent, onPressOptionItem, selectedOptions, selectedCount, renderIcon, renderHeaderIcon, iconContainerStyle, skipIcon, renderDescription, renderOptionSuffix, onQueryChange, options, itemStyle, isSelected, submitSelection, itemAccessibilityLabel, channelId, expanded, onRemoveOptionItem, allowEmpty}) { // fn#87566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:2666, offset: 0x01fc3898, size: 852 bytes, params: 2, frame: 42
|
||||
const env0_3 = renderIcon;
|
||||
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({isKeyboardAwareOnAndroid: false}).insets;
|
||||
env0_3.useEffect(function() {
|
||||
var AccessibilityAnnouncer = require(dependencyMap[17]).AccessibilityAnnouncer;
|
||||
AccessibilityAnnouncer.announce(require(dependencyMap[9]).intl.string(require(dependencyMap[9]).t['7gxe9o']));
|
||||
}, []);
|
||||
const value2 = env0_3.useMemo(function() {
|
||||
return ACTION_SHEET_START_HEIGHT_RATIO * (require(dependencyMap[19]).getWindowDimensions().height - require(dependencyMap[20]).NAV_BAR_HEIGHT_MULTILINE - require(dependencyMap[18]).getSafeAreaInsets().top);
|
||||
}, []);
|
||||
env0_3.useEffect(_fun87570,
|
||||
[(require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore], function() {
|
||||
return SelectedChannelStore.getChannelId();
|
||||
}), channelId, ChannelStore.getChannel(channelId)]);
|
||||
const value4 = env0_3.useMemo(function() {
|
||||
return selectionActionComponent.maxValues > 1;
|
||||
}, [selectionActionComponent]);
|
||||
const value5 = env0_3.useCallback(_fun87572, [isSelected, value4, allowEmpty, selectionActionComponent.maxValues,
|
||||
itemStyle, selectedCount, options.length, onPressOptionItem, renderIcon, iconContainerStyle, skipIcon,
|
||||
renderDescription, renderOptionSuffix, itemAccessibilityLabel]);
|
||||
const value6 = env0_3.useRef(null);
|
||||
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
||||
const bottomSheetProps = {scrollable: true, ref: value6, startHeight: value2, startExpanded: expanded,
|
||||
header: <SelectionHeader selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} selectButtonDisabled={selectedCount > selectionActionComponent.maxValues || (selectedCount === 0 ? !allowEmpty : selectedCount < selectionActionComponent.minValues)} selectedOptions={selectedOptions} submitSelection={submitSelection} onQueryChange={onQueryChange} onPressOptionItem={onPressOptionItem} onRemoveOptionItem={onRemoveOptionItem} renderIcon={renderHeaderIcon ?? renderIcon} />};
|
||||
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
|
||||
const object = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingBottom = PX_16 + insets.bottom;
|
||||
return (
|
||||
<BottomSheet {...bottomSheetProps}>
|
||||
<BottomSheetFlatList
|
||||
keyExtractor={function(a0, a1) {
|
||||
return '' + a1;
|
||||
}}
|
||||
data={options}
|
||||
renderItem={value5}
|
||||
contentContainerStyle={object}
|
||||
keyboardShouldPersistTaps="always"
|
||||
accessibilityRole={value4 ? 'none' : 'radiogroup'}
|
||||
/>
|
||||
</BottomSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87560() { // fn#87560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:873, offset: 0x01fc352f, size: 51 bytes, params: 1, frame: 13
|
||||
let r0 = selectedOptions?.map(_fun87561);
|
||||
r0 = r0 ?? [];
|
||||
return r0;
|
||||
}
|
||||
|
||||
function SelectionHeaderOnChangeText(a0) { // fn#87563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:1668, owner: SelectionHeader.onChangeText, offset: 0x01fc360d, size: 55 bytes, params: 2, frame: 12
|
||||
const current = env0_6.current;
|
||||
if (current != null) {
|
||||
current.scrollTo({'y': 0, 'animated': false});
|
||||
}
|
||||
onQueryChange(a0);
|
||||
}
|
||||
|
||||
function _fun87570() { // fn#87570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:3462, offset: 0x01fc3cc3, size: 98 bytes, params: 1, frame: 13
|
||||
var value;
|
||||
let r0 = env0_15 != null && env0_15.isGuildVoice();
|
||||
r0 = !r0 ? channelId == null : r0;
|
||||
r0 = !r0 ? channelId === channelId : r0;
|
||||
if (!r0) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
||||
value.hideActionSheet();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun87572({item, index}) { // fn#87572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:3606, offset: 0x01fc3d25, size: 257 bytes, params: 2, frame: 18
|
||||
var r6;
|
||||
const isSelected2 = isSelected(item, index);
|
||||
let r5 = env0_16 && selectedCount >= selectionActionComponent.maxValues && !isSelected2;
|
||||
if (!r5) {
|
||||
r6 = !env0_16 && isSelected2;
|
||||
r6 = r6 && !allowEmpty;
|
||||
r5 = r6;
|
||||
}
|
||||
return (
|
||||
<SelectionOptionItem
|
||||
itemStyle={itemStyle}
|
||||
item={item}
|
||||
index={index}
|
||||
start={index === 0}
|
||||
end={index === options.length - 1}
|
||||
clearable={env0_16 || allowEmpty}
|
||||
selected={isSelected2}
|
||||
disabled={r5}
|
||||
onPressOptionItem={onPressOptionItem}
|
||||
iconContainerStyle={iconContainerStyle}
|
||||
skipIcon={skipIcon}
|
||||
renderDescription={renderDescription}
|
||||
renderIcon={renderIcon}
|
||||
renderOptionSuffix={renderOptionSuffix}
|
||||
itemAccessibilityLabel={itemAccessibilityLabel}
|
||||
multi={env0_16}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun87561(a0) { // fn#87561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11624:922, offset: 0x01fc3562, size: 110 bytes, params: 2, frame: 19
|
||||
const object2 = {};
|
||||
object2.id = a0.value;
|
||||
object2.text = a0.label;
|
||||
value = environment.__proto__.__proto__;
|
||||
const stylesBinding = styles;
|
||||
object2.icon = <View style={stylesBinding.tagListIconWrapper}><View style={stylesBinding.tagListIcon}>{renderIcon(a0)}</View></View>;
|
||||
return object2;
|
||||
}
|
||||
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
/* Metro module 11437; source: modules/interaction_components/native/components/StringSelectComponentActionSheet.tsx; dependencies: [57, 31, 33, 4501, 697, 8361, 1909, 4080, 11438, 6739, 4573, 1244, 2] */
|
||||
function _fun87543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:6, offset: 0x01fc29ed, size: 298 bytes, params: 8, frame: 22
|
||||
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(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {'flexShrink': 0, 'borderRadius': null, 'overflow': 'hidden'};
|
||||
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
const env0_6 = Reflect.apply(createStyles, createStylesModule,
|
||||
[{selectionOptionItemWithDescription: {minHeight: 64}, selectionOptionItemDescription: {marginTop: 2},
|
||||
emojiWrapper: object, textEmoji: {'fontSize': 16, 'color': '#000000'}, fastImageEmoji: {'width': 24,
|
||||
'height': 24}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/StringSelectComponentActionSheet.tsx');
|
||||
exports.default = _default_87544;
|
||||
}
|
||||
|
||||
function _default_87544({selectionActionComponent, labelComponent, channelId, containerId, onSubmit, allowEmpty}) { // fn#87544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:412, offset: 0x01fc2b17, size: 486 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const initialStringSelectOptions = (require(8361) /* metro dependency 8361: StringSelectActionComponentUtils */).getInitialStringSelectOptions(selectionActionComponent,
|
||||
containerId);
|
||||
const binding = env0_4;
|
||||
const useState = binding.useState;
|
||||
const Set = global.Set;
|
||||
const value3 = Object.create(Set.prototype, {constructor: {value: Set}});
|
||||
const set = new Set(initialStringSelectOptions);
|
||||
const value6 = env0_3(Reflect.apply(useState, binding, [set instanceof Object ? set : value3]), 2);
|
||||
const property = value6[0];
|
||||
var env0_4 = value6[1];
|
||||
return ((Component) => <Component onPressOptionItem={binding.useCallback(_fun87547, [property,
|
||||
binding.useMemo(function() {
|
||||
return selectionActionComponent.maxValues > 1;
|
||||
}, [selectionActionComponent]), selectionActionComponent, binding.useCallback(_fun87546,
|
||||
[onSubmit])])} renderIcon={renderIcon} skipIcon={!binding.useMemo(function() {
|
||||
return selectionActionComponent.options.some(_fun87552);
|
||||
},
|
||||
[selectionActionComponent])} renderDescription={renderDescription_87554} selectionActionComponent={selectionActionComponent} labelComponent={labelComponent} options={selectionActionComponent.options} itemStyle={[binding.useMemo(function() {
|
||||
return selectionActionComponent.options.some(_fun87550);
|
||||
},
|
||||
[selectionActionComponent]) && styles.selectionOptionItemWithDescription]} selectedCount={property.size} isSelected={isSelected} submitSelection={submitSelection} itemAccessibilityLabel={itemAccessibilityLabel} channelId={channelId} allowEmpty={allowEmpty} />)(importDefault(11438) /* metro dependency 11438: SelectComponentActionSheet */);
|
||||
}
|
||||
|
||||
function _fun87546(a0) { // fn#87546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:669, offset: 0x01fc2d13, size: 90 bytes, params: 2, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const STRING_SELECT = ComponentType.STRING_SELECT;
|
||||
onSubmit({type: STRING_SELECT, values: a0});
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function _fun87547(a0, a1) { // fn#87547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:786, offset: 0x01fc2d6d, size: 134 bytes, params: 3, frame: 15
|
||||
const env0_0 = a1;
|
||||
const binding = env0_3;
|
||||
const value3 = binding.has(a1.value);
|
||||
if (env0_5) {
|
||||
if (!(!value3 && env0_3.size >= selectionActionComponent.maxValues)) {
|
||||
env0_4(function(a0) {
|
||||
var Set = global.Set;
|
||||
var value2 = new Set(a0);
|
||||
if (result) {
|
||||
value2.add(require.value);
|
||||
} else {
|
||||
value2.delete(require.value);
|
||||
}
|
||||
return value2;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
env0_6(value3 ? [] : [a1.value]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun87549() { // fn#87549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:957, offset: 0x01fc2e46, size: 34 bytes, params: 1, frame: 11
|
||||
return selectionActionComponent.options.some(function(a0) {
|
||||
return a0.description != null;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun87551() { // fn#87551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1021, offset: 0x01fc2e78, size: 34 bytes, params: 1, frame: 11
|
||||
return selectionActionComponent.options.some(function(a0) {
|
||||
return a0.emoji != null;
|
||||
});
|
||||
}
|
||||
|
||||
function _default_87544RenderIcon(a0) { // fn#87553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1115, owner: _default_87544.renderIcon, offset: 0x01fc2eab, size: 128 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
var src;
|
||||
var name;
|
||||
var stylesBinding;
|
||||
let emoji = a0.emoji;
|
||||
let value = null;
|
||||
if (value != emoji) {
|
||||
value = environment.__proto__;
|
||||
value = importDefault(6739) /* metro dependency 6739: Emoji */;
|
||||
emoji = a0.emoji;
|
||||
src = emoji.src;
|
||||
emoji = a0.emoji;
|
||||
name = emoji.name;
|
||||
stylesBinding = styles;
|
||||
value = ((Component) => <Component src={src} name={name} style={stylesBinding.emojiWrapper} textEmojiStyle={stylesBinding.textEmoji} fastImageStyle={stylesBinding.fastImageEmoji} />)(value);
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _default_87544RenderDescription(a0) { // fn#87554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1294, owner: _default_87544.renderDescription, offset: 0x01fc2f2b, size: 118 bytes, params: 2, frame: 16
|
||||
var r0;
|
||||
const description = a0.description;
|
||||
let value = null;
|
||||
if (value != description) {
|
||||
if (a0.description === '') {
|
||||
r0 = value;
|
||||
} else {
|
||||
value = environment.__proto__;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
value = <Text style={styles.selectionOptionItemDescription} variant="text-xs/medium" color="text-default">{a0.description}</Text>;
|
||||
r0 = value;
|
||||
}
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _default_87544IsSelected({value}) { // fn#87555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1615, owner: _default_87544.isSelected, offset: 0x01fc2fa1, size: 27 bytes, params: 2, frame: 11
|
||||
return env0_3.has(value);
|
||||
}
|
||||
|
||||
function _default_87544SubmitSelection() { // fn#87556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1649, owner: _default_87544.submitSelection, offset: 0x01fc2fbc, size: 33 bytes, params: 1, frame: 14
|
||||
const binding = env0_6;
|
||||
const binding2 = env0_3;
|
||||
const items2 = [];
|
||||
arraySpread(items2, binding2, 0, undefined);
|
||||
return binding(items2);
|
||||
}
|
||||
|
||||
function _default_87544ItemAccessibilityLabel({emoji, label, description}) { // fn#87557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11623:1686, owner: _default_87544.itemAccessibilityLabel, offset: 0x01fc2fdd, size: 115 bytes, params: 2, frame: 17
|
||||
let value = environment.__proto__;
|
||||
value = undefined;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const formatToPlainString = intl.formatToPlainString;
|
||||
const ZbrH2f = (require(1244) /* metro dependency 1244: indexNative */).t.ZbrH2f;
|
||||
return Reflect.apply(formatToPlainString, intl, [ZbrH2f, {emojiName: emoji == null ? value : emoji.name,
|
||||
optionName: label, optionDescription: description}]);
|
||||
}
|
||||
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
/* Metro module 11440; source: modules/interaction_components/native/components/useSearchableSelectComponent.tsx; dependencies: [57, 31, 8362, 4080, 2] */
|
||||
function _fun87581(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:6, offset: 0x01fc4769, size: 137 bytes, params: 8, frame: 19
|
||||
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 */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/components/useSearchableSelectComponent.tsx');
|
||||
exports.default = useSearchableSelectComponent;
|
||||
}
|
||||
|
||||
function useSearchableSelectComponent({selectActionComponent, containerId, guildId, queryOptions, onSubmit}) { // fn#87582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:122, offset: 0x01fc47f2, size: 303 bytes, params: 2, frame: 25
|
||||
var object2;
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, ['']);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const property2 = value3[1];
|
||||
var env0_4 = (require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */).getInitialSnowflakeSelectOptions(selectActionComponent,
|
||||
containerId, guildId);
|
||||
useState = binding.useState;
|
||||
value = binding2(Reflect.apply(useState, binding, [_fun87583]), 2);
|
||||
const property3 = value[0];
|
||||
const env0_6 = value[1];
|
||||
value = binding.useMemo(_fun87585, [property, queryOptions]);
|
||||
const result = selectActionComponent.maxValues > 1;
|
||||
object2 = {options: value};
|
||||
value = property3.values();
|
||||
const items2 = [];
|
||||
arraySpread(items2, value, 0, containerId);
|
||||
object2.selectedOptions = items2;
|
||||
object2.isSelected = isSelected;
|
||||
object2.onPressOptionItem = onPressOptionItem;
|
||||
object2.submitSelection = submitSelection;
|
||||
object2.setQuery = property2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun87583() { // fn#87583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:345, offset: 0x01fc4921, size: 56 bytes, params: 1, frame: 12
|
||||
const Map = global.Map;
|
||||
const binding = env0_4;
|
||||
let map = binding.map;
|
||||
const value = Reflect.apply(map, binding, [function(a0) {
|
||||
return [a0.value, a0];
|
||||
}]);
|
||||
const value2 = Object.create(Map.prototype, {constructor: {value: Map}});
|
||||
map = new Map();
|
||||
return map instanceof Object ? map : value2;
|
||||
}
|
||||
|
||||
function _fun87585() { // fn#87585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:420, offset: 0x01fc496f, size: 20 bytes, params: 1, frame: 11
|
||||
return queryOptions(env0_3);
|
||||
}
|
||||
|
||||
function useSearchableSelectComponentSubmitSelection(a0) { // fn#87586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:469, owner: useSearchableSelectComponent.submitSelection, offset: 0x01fc4983, size: 94 bytes, params: 2, frame: 15
|
||||
const object2 = {};
|
||||
object2.type = selectActionComponent.type;
|
||||
const value2 = a0.values();
|
||||
const items2 = [];
|
||||
arraySpread(items2, value2, 0, undefined);
|
||||
object2.selectedOptions = items2;
|
||||
onSubmit(object2);
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function useSearchableSelectComponentIsSelected({value}) { // fn#87587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:617, owner: useSearchableSelectComponent.isSelected, offset: 0x01fc49e1, size: 27 bytes, params: 2, frame: 11
|
||||
return env0_5.has(value);
|
||||
}
|
||||
|
||||
function useSearchableSelectComponentOnPressOptionItem(a0, a1) { // fn#87588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:653, owner: useSearchableSelectComponent.onPressOptionItem, offset: 0x01fc49fc, size: 190 bytes, params: 3, frame: 16
|
||||
var Map;
|
||||
const env0_0 = a1;
|
||||
const binding = env0_5;
|
||||
const value3 = binding.has(a1.value);
|
||||
if (result) {
|
||||
if (!(!value3 && env0_5.size >= selectActionComponent.maxValues)) {
|
||||
env0_6(_fun87589);
|
||||
}
|
||||
} else {
|
||||
Map = global.Map;
|
||||
useSearchableSelectComponentSubmitSelection(value3 ? new Map() : new Map());
|
||||
}
|
||||
}
|
||||
|
||||
function useSearchableSelectComponentSubmitSelection_87590() { // fn#87590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:849, owner: useSearchableSelectComponent.submitSelection, offset: 0x01fc4b0e, size: 20 bytes, params: 1, frame: 11
|
||||
useSearchableSelectComponentSubmitSelection(env0_5);
|
||||
}
|
||||
|
||||
function _fun87589(a0) { // fn#87589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11626:712, offset: 0x01fc4aba, size: 84 bytes, params: 2, frame: 14
|
||||
const Map = global.Map;
|
||||
const map = new Map(a0);
|
||||
if (env0_1) {
|
||||
map.delete(require.value);
|
||||
} else {
|
||||
map.set(require.value, require);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/* Metro module 14258; source: modules/interaction_components/native/display/TextDisplayComponent.tsx; dependencies: [57, 31, 27, 4502, 1934, 8356, 33, 477, 4020, 14259, 8357, 44, 6622, 8349, 566, 3829, 9874, 11380, 2] */
|
||||
function _fun107851(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14455:6, offset: 0x0230b37e, size: 305 bytes, params: 8, frame: 19
|
||||
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 requireNativeComponent = (require(27) /* metro dependency 27 */).requireNativeComponent;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
|
||||
const env0_6 = (require(8356) /* metro dependency 8356: InteractionComponentConstants */).TEXT_DISPLAY_COMPONENT_MARKDOWN_RENDER_OPTIONS;
|
||||
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
||||
let value = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
if (value.isAndroid()) {
|
||||
value = importDefault(14259) /* metro dependency 14259: TextDisplayComponentViewNativeComponent */;
|
||||
} else {
|
||||
value = require(4020) /* metro dependency 4020: FabricUtils */;
|
||||
if (value.isFabric()) {
|
||||
value = importDefault(14259) /* metro dependency 14259: TextDisplayComponentViewNativeComponent */;
|
||||
} else {
|
||||
value = requireNativeComponent('DCDTextDisplayComponentView');
|
||||
}
|
||||
}
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/display/TextDisplayComponent.tsx');
|
||||
exports.default = TextDisplayComponent;
|
||||
}
|
||||
|
||||
function TextDisplayComponent(a0) { // fn#107852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14455:438, offset: 0x0230b4af, size: 562 bytes, params: 2, frame: 24
|
||||
const value2 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentContainerId();
|
||||
const channelId = SelectedChannelStore.getChannelId();
|
||||
(importDefault(44) /* metro dependency 44 */)(channelId, 'channelId not available in TextDisplayComponent');
|
||||
const defaultImport2 = importDefault(6622) /* metro dependency 6622: MarkupUtils */;
|
||||
const parseToAST = defaultImport2.parseToAST;
|
||||
const content = a0.content;
|
||||
const renderMessageMarkupModule = require(8349) /* metro dependency 8349: renderMessageMarkup */;
|
||||
const getInitialParserState = renderMessageMarkupModule.getInitialParserState;
|
||||
const toAST = Reflect.apply(parseToAST, defaultImport2, [content, true, Reflect.apply(getInitialParserState,
|
||||
renderMessageMarkupModule, [{channelId: channelId,
|
||||
renderOptions: TEXT_DISPLAY_COMPONENT_MARKDOWN_RENDER_OPTIONS}])]);
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const value6 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[AccessibilityStore], function() {
|
||||
return [AccessibilityStore.roleStyle, AccessibilityStore.alwaysShowLinkDecorations];
|
||||
}]), 2);
|
||||
const property = value6[0];
|
||||
const property2 = value6[1];
|
||||
const AnimateEmoji = (require(3829) /* metro dependency 3829: UserSettings */).AnimateEmoji;
|
||||
const value7 = AnimateEmoji.useSetting();
|
||||
const binding = env0_8;
|
||||
const object = {};
|
||||
copyDataProperties(object, a0, undefined);
|
||||
object['content'] = toAST;
|
||||
return ((Component) => <Component model={object} markdownTextRenderOptions={{containerId: value2,
|
||||
shouldAnimateEmoji: value7, shouldShowLinkDecorations: property2, shouldShowRoleDot: property === 'dot',
|
||||
shouldShowRoleOnName: property === 'username'}} onTapLink={onTapLink} onLongPressLink={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onLongPressLink} onTapAttachmentLink={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapAttachmentLink} onLongPressAttachmentLink={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onLongPressAttachmentLink} onTapMention={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapMention} onTapTimestamp={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapTimestamp} onTapInlineCode={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapInlineCode} onTapEmoji={(require(11380) /* metro dependency 11380: contentHandlers */).contentHandlers.onTapEmoji} style={{width: '100%'}} />)(binding);
|
||||
}
|
||||
|
||||
function TextDisplayComponentOnTapLink({nativeEvent}) { // fn#107854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14455:1043, owner: TextDisplayComponent.onTapLink, offset: 0x0230b702, size: 60 bytes, params: 2, frame: 14
|
||||
const data = nativeEvent.data;
|
||||
const value = environment.__proto__;
|
||||
(require(9874) /* metro dependency 9874: handleMessagesTapLink */).handleMessagesTapURLLink(data, env0_0);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
/* Metro module 15738; source: modules/interaction_components/native/layouts/ActionRowLayoutComponent.tsx; dependencies: [31, 27, 33, 2] */
|
||||
function _fun120858(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15946:6, offset: 0x025384d8, size: 144 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_0 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_1 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/layouts/ActionRowLayoutComponent.tsx');
|
||||
exports.default = ActionRowLayoutComponent;
|
||||
}
|
||||
|
||||
function ActionRowLayoutComponent({components, renderComponents}) { // fn#120859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15946:251, offset: 0x02538568, size: 71 bytes, params: 2, frame: 16
|
||||
const value = null;
|
||||
return value == components || components.length === 0 ? value : <View>{renderComponents(components)}</View>;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/* Metro module 15740; source: modules/interaction_components/native/layouts/LabelLayoutComponent.tsx; dependencies: [31, 27, 33, 8357, 1909, 7682, 2] */
|
||||
function _fun120864(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15948:6, offset: 0x025388bd, size: 152 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 env0_2 = (require(27) /* metro dependency 27 */).View;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/layouts/LabelLayoutComponent.tsx');
|
||||
exports.default = LabelLayoutComponent;
|
||||
}
|
||||
|
||||
function LabelLayoutComponent({label, description, component, renderComponent}) { // fn#120865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15948:247, offset: 0x02538955, size: 222 bytes, params: 2, frame: 20
|
||||
const value2 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentError(component);
|
||||
const type = component.type;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const CHECKBOX = ComponentType.CHECKBOX;
|
||||
if (type === CHECKBOX) {
|
||||
return renderComponent(component, 'label-child');
|
||||
} else {
|
||||
const Input = (require(7682) /* metro dependency 7682: InputNative */).Input;
|
||||
return (
|
||||
<Input
|
||||
label={label}
|
||||
description={description}
|
||||
required={component.required}
|
||||
errorMessage={value2}
|
||||
>
|
||||
<View style={{width: '100%'}}>
|
||||
{renderComponent(component, 'label-child')}
|
||||
</View>
|
||||
</Input>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Metro module 15737; source: modules/interaction_components/native/renderComponents.tsx; dependencies: [31, 33, 1909, 15738, 14254, 15739, 14257, 14258, 15740, 15741, 15743, 15744, 15745, 2] */
|
||||
function _fun120854(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15945:6, offset: 0x02538046, size: 153 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = function(a0) {
|
||||
return a0.map(_fun120856);
|
||||
};
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/renderComponents.tsx');
|
||||
exports.renderComponents = closure;
|
||||
}
|
||||
|
||||
function renderComponents(a0) { // fn#120855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15945:119, offset: 0x025380df, size: 24 bytes, params: 2, frame: 11
|
||||
return a0.map(_fun120856);
|
||||
}
|
||||
|
||||
function renderComponent(a0, a1) { // fn#120857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15945:203, offset: 0x02538117, size: 961 bytes, params: 3, frame: 19
|
||||
const type = a0.type;
|
||||
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
|
||||
const ACTION_ROW = ComponentType.ACTION_ROW;
|
||||
if (ACTION_ROW === type) {
|
||||
return ((Component) => <Component {...a0} {...{['renderComponents']: renderComponents}} key={a1} />)(importDefault(15738) /* metro dependency 15738: ActionRowLayoutComponent */);
|
||||
}
|
||||
const STRING_SELECT = ComponentType.STRING_SELECT;
|
||||
if (STRING_SELECT === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14254) /* metro dependency 14254: StringSelectActionComponent */);
|
||||
}
|
||||
const TEXT_INPUT = ComponentType.TEXT_INPUT;
|
||||
if (TEXT_INPUT === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(15739) /* metro dependency 15739: TextInputActionComponent */);
|
||||
}
|
||||
const USER_SELECT = ComponentType.USER_SELECT;
|
||||
if (USER_SELECT === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */);
|
||||
}
|
||||
const ROLE_SELECT = ComponentType.ROLE_SELECT;
|
||||
if (ROLE_SELECT === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */);
|
||||
}
|
||||
const MENTIONABLE_SELECT = ComponentType.MENTIONABLE_SELECT;
|
||||
if (MENTIONABLE_SELECT === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */);
|
||||
}
|
||||
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
|
||||
if (CHANNEL_SELECT === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14257) /* metro dependency 14257: SearchableSelectActionComponent */);
|
||||
}
|
||||
const TEXT_DISPLAY = ComponentType.TEXT_DISPLAY;
|
||||
if (TEXT_DISPLAY === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(14258) /* metro dependency 14258: TextDisplayComponent */);
|
||||
}
|
||||
const LABEL = ComponentType.LABEL;
|
||||
if (LABEL === type) {
|
||||
return ((Component) => <Component {...a0} {...{['renderComponent']: renderComponent}} key={a1} />)(importDefault(15740) /* metro dependency 15740: LabelLayoutComponent */);
|
||||
}
|
||||
const FILE_UPLOAD = ComponentType.FILE_UPLOAD;
|
||||
if (FILE_UPLOAD === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(15741) /* metro dependency 15741: FileUploadActionComponent */);
|
||||
}
|
||||
const RADIO_GROUP = ComponentType.RADIO_GROUP;
|
||||
if (RADIO_GROUP === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(15743) /* metro dependency 15743: RadioGroupActionComponent */);
|
||||
}
|
||||
const CHECKBOX_GROUP = ComponentType.CHECKBOX_GROUP;
|
||||
if (CHECKBOX_GROUP === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(15744) /* metro dependency 15744: CheckboxGroupActionComponent */);
|
||||
}
|
||||
const CHECKBOX = ComponentType.CHECKBOX;
|
||||
if (CHECKBOX === type) {
|
||||
return ((Component) => <Component {...a0} key={a1} />)(importDefault(15745) /* metro dependency 15745: CheckboxActionComponent */);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120856(a0, a1) { // fn#120856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15945:162, offset: 0x025380f7, size: 32 bytes, params: 3, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return renderComponent(a0, a1.toString());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/* Metro module 15746; source: modules/interaction_components/openInteractionIframeModal.native.tsx; dependencies: [5, 15747, 5080, 15748, 1962, 2] */
|
||||
function _fun120926(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15954:6, offset: 0x0253a941, size: 151 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 */;
|
||||
const env0_4 = (require(15747) /* metro dependency 15747: InteractionIframeConstants */).INTERACTION_IFRAME_MODAL_KEY;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/openInteractionIframeModal.native.tsx');
|
||||
exports.default = function() {
|
||||
return _openInteractionIframeModal.apply(this, arguments);
|
||||
};
|
||||
}
|
||||
|
||||
function _openInteractionIframeModal() { // fn#120927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15954:145, offset: 0x0253a9d8, size: 50 bytes, params: 1, frame: 14
|
||||
return env0_3(_fun120929).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun120929(a0) { // fn#120929, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15954:222, offset: 0x0253aa15, size: 92 bytes, params: 2, frame: 18
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_1;
|
||||
var binding2 = env2_2;
|
||||
var value3 = binding(binding2[2]);
|
||||
value3.pushLazy(env2_0(binding2[4])(binding2[3], binding2.paths), a0, env2_4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Metro module 15742; source: modules/interaction_components/useFileUploadComponentState.tsx; dependencies: [31, 4645, 4644, 8357, 44, 1909, 2] */
|
||||
function _fun120893(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15950:6, offset: 0x02539b60, size: 159 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(4645) /* metro dependency 4645: DraftStore */).DraftType;
|
||||
const uploadAttachmentStore = importDefault(4644) /* metro dependency 4644: UploadAttachmentStore */;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/useFileUploadComponentState.tsx');
|
||||
exports.useFileUploadComponentState = useFileUploadComponentState;
|
||||
}
|
||||
|
||||
function useFileUploadComponentState(a0) { // fn#120894, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15950:262, offset: 0x02539bff, size: 324 bytes, params: 2, frame: 20
|
||||
const value2 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
|
||||
(importDefault(44) /* metro dependency 44 */)(value2 != null,
|
||||
'useFileUploadComponentState must be used within a ComponentStateContextProvider');
|
||||
const channelId = value2.channelId;
|
||||
(importDefault(44) /* metro dependency 44 */)(channelId != null,
|
||||
'useFileUploadComponentState must be used inside a channel');
|
||||
const {state, executeStateUpdate, error} = value2.useComponentState(a0);
|
||||
const binding = env0_3;
|
||||
const value4 = binding.useMemo(function() {
|
||||
return state?.type === require(dependencyMap[5]).ComponentType.FILE_UPLOAD ? state.uploadIds : [];
|
||||
}, [state]);
|
||||
const getUploads = UploadAttachmentStore.getUploads;
|
||||
const InteractionModal = DraftType.InteractionModal;
|
||||
let value = Reflect.apply(getUploads, UploadAttachmentStore, [channelId, InteractionModal]);
|
||||
value = binding.useMemo(_fun120896, [value4, value]);
|
||||
const value5 = binding.useCallback(function(a0) {
|
||||
var executeStateUpdateBinding = executeStateUpdate;
|
||||
var object = {};
|
||||
object.type = require(dependencyMap[5]).ComponentType.FILE_UPLOAD;
|
||||
object.uploadIds = a0;
|
||||
return executeStateUpdateBinding(object);
|
||||
}, [executeStateUpdate]);
|
||||
binding.useEffect(_fun120901, [value4, value, value5]);
|
||||
return {uploadIds: value4, setUploadIds: value5, currentUploads: value, error: error};
|
||||
}
|
||||
|
||||
function _fun120896() { // fn#120896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15950:757, offset: 0x02539d99, size: 45 bytes, params: 1, frame: 12
|
||||
return env0_2.map(_fun120897).filter(function(a0) {
|
||||
return a0 != null;
|
||||
});
|
||||
}
|
||||
|
||||
function _fun120901() { // fn#120901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15950:926, offset: 0x02539e2b, size: 63 bytes, params: 1, frame: 12
|
||||
if (env0_2.length > env0_4.length) {
|
||||
env0_5(env0_2.filter(_fun120902));
|
||||
}
|
||||
}
|
||||
|
||||
function _fun120897(a0) { // fn#120897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15950:768, offset: 0x02539dc6, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return env1_3.find(_fun120898);
|
||||
}
|
||||
|
||||
function _fun120902(a0) { // fn#120902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15950:969, offset: 0x02539e6a, size: 36 bytes, params: 2, frame: 11
|
||||
const env0_0 = a0;
|
||||
return env1_4.some(_fun120903);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
/* Metro module 8360; source: modules/interaction_components/validateComponent.tsx; dependencies: [1909, 4627, 1244, 44, 2] */
|
||||
function _fun66584(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8545:6, offset: 0x01c01366, size: 114 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/interaction_components/validateComponent.tsx');
|
||||
exports.default = validateComponent;
|
||||
}
|
||||
|
||||
function validateSelect({minValues, maxValues, required}, a1, a2) { // fn#66585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8545:111, offset: 0x01c013d8, size: 381 bytes, params: 4, frame: 20
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var moduleValue;
|
||||
const value = null;
|
||||
let r0 = value == a1 ? 0 : a1.type === (require(1909) /* metro dependency 1909: Server */).ComponentType.STRING_SELECT ? a1.values.length : a1.selectedOptions.length;
|
||||
if (r0 === 0) {
|
||||
moduleValue = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
|
||||
r0 = moduleValue.canSelectBeEmpty({minValues: minValues, required: required},
|
||||
a2) ? value : intl.string(t.eJEUvD);
|
||||
} else {
|
||||
r0 = r0 < minValues ? intl.formatToPlainString(t.Jmwzdx,
|
||||
{count: minValues}) : r0 > maxValues ? intl.formatToPlainString(t.LDvfRP, {count: maxValues}) : value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function validateComponent(a0, a1, a2) { // fn#66586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8545:645, offset: 0x01c01555, size: 1340 bytes, params: 4, frame: 25
|
||||
var length;
|
||||
var r2;
|
||||
var minValues;
|
||||
var maxValues;
|
||||
var required;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var minLength;
|
||||
var maxLength;
|
||||
const value = null;
|
||||
if (value != a1) {
|
||||
(importDefault(44) /* metro dependency 44 */)(a1.type === a0.type, 'component type matches state');
|
||||
}
|
||||
const type = a0.type;
|
||||
const value4 = 0;
|
||||
const value5 = undefined;
|
||||
let ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const BUTTON = ComponentType.BUTTON;
|
||||
if (BUTTON === type) {
|
||||
return value;
|
||||
}
|
||||
ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const STRING_SELECT = ComponentType.STRING_SELECT;
|
||||
if (STRING_SELECT === type) {
|
||||
return validateSelect(a0, a1, a2);
|
||||
}
|
||||
ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const USER_SELECT = ComponentType.USER_SELECT;
|
||||
if (USER_SELECT === type) {
|
||||
return validateSelect(a0, a1, a2);
|
||||
}
|
||||
ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const ROLE_SELECT = ComponentType.ROLE_SELECT;
|
||||
if (ROLE_SELECT === type) {
|
||||
return validateSelect(a0, a1, a2);
|
||||
}
|
||||
ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const MENTIONABLE_SELECT = ComponentType.MENTIONABLE_SELECT;
|
||||
if (MENTIONABLE_SELECT === type) {
|
||||
return validateSelect(a0, a1, a2);
|
||||
}
|
||||
ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
|
||||
if (CHANNEL_SELECT === type) {
|
||||
return validateSelect(a0, a1, a2);
|
||||
}
|
||||
ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const TEXT_INPUT = ComponentType.TEXT_INPUT;
|
||||
if (TEXT_INPUT === type) {
|
||||
minLength = a0.minLength;
|
||||
maxLength = a0.maxLength;
|
||||
return value == a1 || value4 === a1.value.length ? a0.required ? intl.string(t.eJEUvD) : value : a1.value.length < minLength || a1.value.length > maxLength ? intl.formatToPlainString(t.ONSqYd,
|
||||
|
||||
{min: minLength, max: maxLength}) : value;
|
||||
}
|
||||
ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const FILE_UPLOAD = ComponentType.FILE_UPLOAD;
|
||||
if (FILE_UPLOAD === type) {
|
||||
minValues = a0.minValues;
|
||||
maxValues = a0.maxValues;
|
||||
required = a0.required;
|
||||
length = value == a1 ? value5 : a1.uploadIds.length;
|
||||
r2 = value != length ? length : value4;
|
||||
r2 = value4 === r2 ? required ? intl.string(t.eJEUvD) : value : r2 < minValues ? intl.formatToPlainString(t.pmAt62,
|
||||
|
||||
{minValues: minValues}) : r2 > maxValues ? intl.formatToPlainString(t.dy6viJ,
|
||||
{maxValues: maxValues}) : value;
|
||||
return r2;
|
||||
}
|
||||
ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const RADIO_GROUP = ComponentType.RADIO_GROUP;
|
||||
if (RADIO_GROUP === type) {
|
||||
required = a0.required;
|
||||
return value == a1 ? required ? intl.string(t.eJEUvD) : value : value != a1.value ? value : required ? intl.string(t.eJEUvD) : value;
|
||||
}
|
||||
ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const CHECKBOX_GROUP = ComponentType.CHECKBOX_GROUP;
|
||||
if (CHECKBOX_GROUP === type) {
|
||||
minValues = a0.minValues;
|
||||
maxValues = a0.maxValues;
|
||||
required = a0.required;
|
||||
length = value == a1 ? value5 : a1.values.length;
|
||||
r2 = value != length ? length : value4;
|
||||
r2 = value4 === r2 ? required ? intl.string(t.eJEUvD) : value : r2 < minValues ? intl.formatToPlainString(t.Jmwzdx,
|
||||
|
||||
{count: minValues}) : r2 > maxValues ? intl.formatToPlainString(t.LDvfRP, {count: maxValues}) : value;
|
||||
return r2;
|
||||
}
|
||||
ComponentType = require(dependencyMap[value4]).ComponentType;
|
||||
const CHECKBOX = ComponentType.CHECKBOX;
|
||||
if (CHECKBOX === type) {
|
||||
return value;
|
||||
}
|
||||
(importDefault(44) /* metro dependency 44 */)(false, 'missing validator for this component');
|
||||
return value5;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user