/* Metro module 11197; source: modules/polls/PollsActionCreators.tsx; dependencies: [5, 3785, 4833, 1226, 1379, 4645, 4798, 4814, 4644, 8432, 661, 44, 4647, 1244, 6593, 11198, 8431, 4863, 22, 566, 694, 7152, 11203, 4002, 8436, 7067, 7880, 4131, 2] */ import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */ import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */ import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */ import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import LurkingStore from '../lurker_mode/LurkingStore.tsx'; /* Metro dependency 3785 */ import UploadAttachmentStore from '../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */ import AlertActionCreators from '../../actions/AlertActionCreators.tsx'; /* Metro dependency 4647 */ import GuildVerificationStore from '../../stores/GuildVerificationStore.tsx'; /* Metro dependency 4798 */ import MessageStore from '../../stores/MessageStore.tsx'; /* Metro dependency 4814 */ import ReferencedMessageStore from '../replies/ReferencedMessageStore.tsx'; /* Metro dependency 4833 */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as DraftStoreModule from '../../stores/DraftStore.tsx'; /* Metro dependency 4645 */ import * as PollsInteractionStoreModule from './PollsInteractionStore.tsx'; /* Metro dependency 8432 */ function _fun85513(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#85513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:6, offset: 0x01f71d84, size: 551 bytes, params: 8, frame: 22 let env0_0 = require; const _arrayLikeToArray_85516 = 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 handleShowVotesForAnswer2 = handleShowVotesForAnswer; const closure2 = function(a0) { var channelId = a0.channelId; var env0_0 = channelId; var messageId = a0.messageId; var env0_1 = a0.isEditing; updatePollState(channelId, messageId, _fun85524); }; const optimisticallySetAnswers = function() { return _optimisticallySetAnswers.apply(this, arguments); }; const closure3 = function() { return _handlePollSubmitVote.apply(this, arguments); }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = PollsInteractionStoreModule; const env0_13 = value.getPollState; const env0_14 = value.updatePollState; value = require(661) /* metro dependency 661: Constants */; const env0_15 = value.AnalyticEvents; const env0_16 = value.JoinGuildSources; object = {handlePollAnswerTapped: handlePollAnswerTapped, handlePollSubmitVote: closure3, handleUpdateVoteEditingState: closure2, handlePollActionTapped: function() { return _handlePollActionTapped.apply(this, arguments); }, createPoll: function() { return _createPoll.apply(this, arguments); }, endPollEarly: function() { return _endPollEarly.apply(this, arguments); }}; (FileImportTrackerModule).fileFinishedImporting('modules/polls/PollsActionCreators.tsx'); exports.default = object; exports.handleShowVotesForAnswer = handleShowVotesForAnswer2; function _createForOfIteratorHelperLoose_85514(a0, a1) { // fn#85514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:301, offset: 0x01f71fab, 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 _fun85515; } value = undefined; if (a0) { if (typeof a0 === 'string') { value = _arrayLikeToArray_85516(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_85516(a0, value); r6 = value; } else { regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', ''); if (regexp.test(r9)) { value = _arrayLikeToArray_85516(a0, value); r6 = value; } else { r6 = value; } } r5 = r6; } } else { r5 = value; } if (r5) { if (r5) { } return _fun85515; } 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 _fun85515() { // fn#85515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:872, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5 return env0_1 >= env0_0.length ? {done: true} : {done: false, value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]}; } } function getPollVoteEventProperties(a0, a1) { // fn#85517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:1211, offset: 0x01f7211f, size: 104 bytes, params: 3, frame: 16 var r3; const env0_0 = a0; const items2 = []; let value = 0; arraySpread(items2, a1, value, undefined); const env0_1 = value; const env0_2 = value; const getPollVoteEventProperties_loop2 = getPollVoteEventProperties_loop; let length = items2.length; if (value < length) { for (r3 = value; true; r3 = value) { getPollVoteEventProperties_loop2(items2[r3]); value = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1; length = items2.length; if (!(value < length)) { break; } } } return {analyticsSelectedAnswerIds: items2, selectedTextAnswersCount: env0_1, selectedEmojiAnswersCount: env0_2}; function getPollVoteEventProperties_loop(a0) { // fn#85518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:1283, owner: getPollVoteEventProperties._loop, offset: 0x01f72187, size: 135 bytes, params: 2, frame: 15 var poll_media; var value3; const env0_0 = a0; const value2 = undefined; if (env0_0 == null) { poll_media = value2; } else { value3 = env0_0.find(_fun85519); poll_media = value3 == null ? value2 : value3.poll_media; } if ((poll_media == null ? value2 : poll_media.text) != null) { env0_1 += 1; } if ((poll_media == null ? value2 : poll_media.emoji) != null) { env0_2 += 1; } return value2; function _fun85519({answer_id}) { // fn#85519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:1329, offset: 0x01f7220e, size: 37 bytes, params: 2, frame: 12 return answer_id === global.parseInt(env0_0); } } } function showLurkingAlert({guildId, title, body}) { // fn#85520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:1587, offset: 0x01f72233, size: 193 bytes, params: 2, frame: 19 const defaultImport = AlertActionCreators; const show = defaultImport.show; const object = {title: title, body: body}; const intl = (IndexNativeModule).intl; const string = intl.string; const t = (IndexNativeModule).t; object.confirmText = Reflect.apply(string, intl, [t['9VLmlZ']]); object.cancelText = intl.string(t['2m+Sqk']); object.onConfirm = function() { importDefault(dependencyMap[14]).joinGuild(guildId, {source: JoinGuildSources.POLL_ALERT}); }; Reflect.apply(show, defaultImport, [object]); } function handleShowVotesForAnswer({channelId, messageId, answerId}) { // fn#85522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:1846, offset: 0x01f72332, size: 358 bytes, params: 2, frame: 18 var r5; var lurkingStoreBinding; var message; var object; var showLurkingAlertBinding; const intl = (IndexNativeModule).intl; const t = (IndexNativeModule).t; var value; const channel = ChannelStore.getChannel(channelId); if (channel != null) { lurkingStoreBinding = LurkingStore; if (lurkingStoreBinding.isLurking(channel.guild_id)) { showLurkingAlertBinding = showLurkingAlert; object = {}; object.guildId = channel.guild_id; object.title = intl.string(t['7LpysO']); object.body = intl.string(t['5sHHoy']); showLurkingAlertBinding(object); } else { message = MessageStore.getMessage(channelId, messageId); if (message != null) { if (message.poll != null) { if (message.poll.answers.length !== 0) { r5 = answerId ?? global.String(message.poll.answers[0].answer_id); value = importAll(11198) /* metro dependency 11198: PollInteractionUtilsNative */; value.showVotesForAnswer({message: message, initialAnswerId: r5}); } } } } } } function handleUpdateVoteEditingState({channelId, messageId, isEditing}) { // fn#85523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:2314, offset: 0x01f72498, size: 54 bytes, params: 2, frame: 15 updatePollState(channelId, messageId, _fun85524); function _fun85524(a0) { // fn#85524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:2398, offset: 0x01f724ce, size: 99 bytes, params: 2, frame: 12 const object = {}; object.channelId = channelId; const Set = global.Set; const value2 = Object.create(Set.prototype, {constructor: {value: Set}}); const set = new Set(); object.selectedAnswerIds = set instanceof Object ? set : value2; object.submitting = false; object.editing = isEditing; const showResults = a0?.showResults; object.showResults = showResults != null && showResults; return object; } } function getCurrentAnswerIds({channelId, messageId}) { // fn#85525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:2535, offset: 0x01f72531, size: 72 bytes, params: 2, frame: 13 var r0; let value = MessageStore.getMessage(channelId, messageId); if (value == null) { r0 = []; } else { value = value.reactions.flatMap(function(a0) { return a0.me_vote === true ? a0.emoji.name : []; }); r0 = value; } return r0; } function _optimisticallySetAnswers() { // fn#85528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:2781, offset: 0x01f7259b, size: 50 bytes, params: 1, frame: 14 return Module00005(_fun85530).apply(this, arguments); async function _fun85530({channelId, messageId, answerIds}) { // fn#85530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:2854, offset: 0x01f725e1, size: 277 bytes, params: 2, frame: 22 var environment; if (true) { await undefined; if (false) { return undefined; } value = environment.__proto__.__proto__; var binding = env2_23; var value4 = binding({channelId: channelId, messageId: messageId}); binding = env2_1; var binding2 = env2_3; var value6 = binding(binding2[18]).difference(value4, answerIds); var value8 = binding(binding2[18]).difference(answerIds, value4); var env0_2 = env2_7.getId(); value = value6.map(function(a0) { return {type: 'MESSAGE_REACTION_REMOVE', id: a0}; }); items2 = []; value = arraySpread(items2, value, 0, answerIds); arraySpread(items2, value8.map(function(a0) { return {type: 'MESSAGE_REACTION_ADD', id: a0}; }), value, answerIds); var Emitter = binding(binding2[19]).Emitter; value = Emitter.batched(_fun85533); if (value == null) { return undefined; } await value; } function _fun85533() { // fn#85533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:3161, offset: 0x01f7271c, size: 177 bytes, params: 1, frame: 24 var r7; var r0; var property; var id; var type; var binding2; var binding3; var value5; var dispatch; var object; var binding4; var ReactionTypes; var VOTE; var value6; var value7; const binding = env0_3; let length = binding.length; const value2 = 0; if (value2 < length) { for (r7 = value2; true; r7 = value7) { property = binding[r7]; id = property.id; type = property.type; binding2 = env3_1; binding3 = env3_3; value5 = binding2(binding3[20]); dispatch = value5.dispatch; object = {type: type}; object.channelId = channelId; object.messageId = messageId; object.emoji = {id: id, name: id}; object.userId = env0_2; object.optimistic = true; binding4 = env3_0; ReactionTypes = binding4(binding3[21]).ReactionTypes; VOTE = ReactionTypes.VOTE; object.reactionType = VOTE; value6 = Reflect.apply(dispatch, value5, [object]); value7 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1; length = binding.length; if (!(value7 < length)) { r0 = value6; break; } } } else { r0 = undefined; } return r0; } } } function _handlePollSubmitVote() { // fn#85535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:3506, offset: 0x01f727cd, size: 50 bytes, params: 1, frame: 14 return Module00005(_fun85537).apply(this, arguments); async function _fun85537({channelId, messageId}) { // fn#85537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:3571, offset: 0x01f72813, size: 1119 bytes, params: 2, frame: 34 var environment; var r11; var r16; var r12; var value5; var binding; var getChannel; var value6; var isLurking; var guild_id; var canChatInGuild; var binding2; var value7; var show; var object; var intl; var string; var t; var p245wu; var value8; var value9; var value10; var selectedAnswerIds; var values; var value11; var closure; var object2; var value12; var value13; var value14; var binding3; var property; var value15; var submitPollVote; var object3; var value16; var value17; var value18; var binding4; var value19; var AccessibilityAnnouncer; var announce; var length; var value20; var binding5; var value21; var value22; var o20GSo; var value23; var binding6; var value24; var value25; var value26; var error; var binding7; var value27; var iufib1; var getAnyErrorMessage; var value28; var message; var binding8; var eAn6z2; var value29; var value30; var value31; var binding9; var binding10; var Qic1FD; if (false) { return undefined; } value = undefined; await value; if (false) { return undefined; } reduciblePort97: while (true) { exceptionLanding86: while (true) { value5 = environment.__proto__.__proto__; binding = env2_8; getChannel = binding.getChannel; value6 = Reflect.apply(getChannel, binding, [channelId]); if (value6 == null) { break reduciblePort97; } binding = env2_5; isLurking = binding.isLurking; guild_id = value6.guild_id; if (Reflect.apply(isLurking, binding, [guild_id])) { binding = env2_20; object = {}; object.guildId = value6.guild_id; binding9 = env2_0; binding10 = env2_3; intl = binding9(binding10[13]).intl; string = intl.string; t = binding9(binding10[13]).t; Qic1FD = t.Qic1FD; object.title = Reflect.apply(string, intl, [Qic1FD]); intl = binding9(binding10[13]).intl; string = intl.string; t = binding9(binding10[13]).t; object.body = Reflect.apply(string, intl, [t['5sHHoy']]); binding(object); break reduciblePort97; } binding = env2_10; canChatInGuild = binding.canChatInGuild; guild_id = value6.guild_id; if (Reflect.apply(canChatInGuild, binding, [guild_id])) { value8 = env2_13(channelId, messageId); binding = env2_1; value9 = binding(env2_3[11]); value9(value8 != null, 'Must not be able to vote without existing state!'); binding = env2_23; value10 = binding({channelId: channelId, messageId: messageId}); try { selectedAnswerIds = value8.selectedAnswerIds; } catch (error) { break exceptionLanding86; } try { values = selectedAnswerIds.values; } catch (error) { break exceptionLanding86; } try { value11 = Reflect.apply(values, selectedAnswerIds, []); } catch (error) { break exceptionLanding86; } try { object = []; } catch (error) { break exceptionLanding86; } try { arraySpread(object, value11, 0, undefined); } catch (error) { break exceptionLanding86; } try { binding = env2_14; } catch (error) { break exceptionLanding86; } try { closure = _fun85538; } catch (error) { break exceptionLanding86; } try { binding(channelId, messageId, closure); } catch (error) { break exceptionLanding86; } try { binding = env2_24; } catch (error) { break exceptionLanding86; } try { object2 = {}; } catch (error) { break exceptionLanding86; } try { object2.channelId = channelId; } catch (error) { break exceptionLanding86; } try { object2.messageId = messageId; } catch (error) { break exceptionLanding86; } try { object2.answerIds = object; } catch (error) { break exceptionLanding86; } try { value12 = binding(object2); } catch (error) { break exceptionLanding86; } await value12; try { value13 = undefined; value14 = false; } catch (error) { break exceptionLanding86; } if (value14) { return value13; } try { binding = env2_2; } catch (error) { break exceptionLanding86; } try { binding3 = env2_3; } catch (error) { break exceptionLanding86; } try { property = binding3[22]; } catch (error) { break exceptionLanding86; } try { value15 = binding(property); } catch (error) { break exceptionLanding86; } try { submitPollVote = value15.submitPollVote; } catch (error) { break exceptionLanding86; } try { object3 = {}; } catch (error) { break exceptionLanding86; } try { object3.channelId = channelId; } catch (error) { break exceptionLanding86; } try { object3.messageId = messageId; } catch (error) { break exceptionLanding86; } try { object3.answerIds = object; } catch (error) { break exceptionLanding86; } try { value16 = Reflect.apply(submitPollVote, value15, [object3]); } catch (error) { break exceptionLanding86; } await value16; try { value17 = undefined; value18 = false; } catch (error) { break exceptionLanding86; } if (value18) { return value17; } try { binding = env2_14; } catch (error) { break exceptionLanding86; } try { closure = function() { }; } catch (error) { break exceptionLanding86; } try { binding(channelId, messageId, closure); } catch (error) { break exceptionLanding86; } try { binding = env2_0; } catch (error) { break exceptionLanding86; } try { binding4 = env2_3; } catch (error) { break exceptionLanding86; } try { property = binding4[23]; } catch (error) { break exceptionLanding86; } try { value19 = binding(property); } catch (error) { break exceptionLanding86; } try { AccessibilityAnnouncer = value19.AccessibilityAnnouncer; } catch (error) { break exceptionLanding86; } try { announce = AccessibilityAnnouncer.announce; } catch (error) { break exceptionLanding86; } try { length = object.length; } catch (error) { break exceptionLanding86; } try { value20 = length === 0; } catch (error) { break exceptionLanding86; } if (value20) { try { binding = env2_0; } catch (error) { break exceptionLanding86; } try { binding6 = env2_3; } catch (error) { break exceptionLanding86; } try { property = binding6[13]; } catch (error) { break exceptionLanding86; } try { value24 = binding(property); } catch (error) { break exceptionLanding86; } try { intl = value24.intl; } catch (error) { break exceptionLanding86; } try { string = intl.string; } catch (error) { break exceptionLanding86; } try { property = binding6[13]; } catch (error) { break exceptionLanding86; } try { value25 = binding(property); } catch (error) { break exceptionLanding86; } try { t = value25.t; } catch (error) { break exceptionLanding86; } try { property = t['xcvy+3']; } catch (error) { break exceptionLanding86; } try { value26 = Reflect.apply(string, intl, [property]); } catch (error) { break exceptionLanding86; } r11 = value26; } else { try { binding = env2_0; } catch (error) { break exceptionLanding86; } try { binding5 = env2_3; } catch (error) { break exceptionLanding86; } try { property = binding5[13]; } catch (error) { break exceptionLanding86; } try { value21 = binding(property); } catch (error) { break exceptionLanding86; } try { intl = value21.intl; } catch (error) { break exceptionLanding86; } try { string = intl.string; } catch (error) { break exceptionLanding86; } try { property = binding5[13]; } catch (error) { break exceptionLanding86; } try { value22 = binding(property); } catch (error) { break exceptionLanding86; } try { t = value22.t; } catch (error) { break exceptionLanding86; } try { o20GSo = t.o20GSo; } catch (error) { break exceptionLanding86; } try { value23 = Reflect.apply(string, intl, [o20GSo]); } catch (error) { break exceptionLanding86; } r11 = value23; } try { Reflect.apply(announce, AccessibilityAnnouncer, [r11]); } catch (error) { break exceptionLanding86; } break reduciblePort97; } binding = env2_1; binding2 = env2_3; value7 = binding(binding2[12]); show = value7.show; object = {}; binding = env2_0; intl = binding(binding2[13]).intl; string = intl.string; t = binding(binding2[13]).t; p245wu = t.p245wu; object.title = Reflect.apply(string, intl, [p245wu]); intl = binding(binding2[13]).intl; string = intl.string; t = binding(binding2[13]).t; object.body = Reflect.apply(string, intl, [t['U/uodt']]); Reflect.apply(show, value7, [object]); break reduciblePort97; } binding = env2_1; binding7 = env2_3; value27 = binding(binding7[12]); show = value27.show; object = {}; binding = env2_0; intl = binding(binding7[13]).intl; string = intl.string; t = binding(binding7[13]).t; iufib1 = t.iufib1; object.title = Reflect.apply(string, intl, [iufib1]); getAnyErrorMessage = error.getAnyErrorMessage; reducibleJoin88: while (true) { if (getAnyErrorMessage == null) { r16 = value; break reducibleJoin88; } getAnyErrorMessage = error.getAnyErrorMessage; value28 = Reflect.apply(getAnyErrorMessage, error, []); r16 = value28; break reducibleJoin88; } reducibleJoin90: while (true) { if (r16 != null) { r12 = r16; break reducibleJoin90; } message = error.message; r12 = message; break reducibleJoin90; } reducibleJoin92: while (true) { if (r12 != null) { break reducibleJoin92; } binding = env2_0; binding8 = env2_3; intl = binding(binding8[13]).intl; string = intl.string; t = binding(binding8[13]).t; eAn6z2 = t.eAn6z2; value29 = Reflect.apply(string, intl, [eAn6z2]); r12 = value29; break reducibleJoin92; } object.body = r12; Reflect.apply(show, value27, [object]); binding = env2_24; await binding({channelId: channelId, messageId: messageId, answerIds: value10}); value30 = undefined; value31 = false; if (value31) { return value30; } binding = env2_14; binding(channelId, messageId, _fun85540); break reduciblePort97; } return value; function _fun85538(a0) { // fn#85538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:4029, offset: 0x01f72c72, size: 82 bytes, params: 2, frame: 14 const value = environment.__proto__.__proto__.__proto__; env3_1(env3_3[11])(a0 != null, 'Must not be able to vote without existing state!'); return {...a0, ['submitting']: true, ['editing']: false}; } } } function _handleClearPollVote() { // fn#85541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:4936, offset: 0x01f72cf3, size: 50 bytes, params: 1, frame: 14 return Module00005(_fun85543).apply(this, arguments); async function _fun85543({channelId, messageId}) { // fn#85543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:4999, offset: 0x01f72d39, size: 286 bytes, params: 2, frame: 21 var environment; var object; var binding2; var binding3; var intl; var string; var t; if (true) { await undefined; if (false) { return undefined; } value = environment.__proto__.__proto__; var binding = env2_8; var channel = binding.getChannel(channelId); if (channel == null) { return undefined; } if (Reflect.apply(env2_5.isLurking, binding, [channel.guild_id])) { binding = env2_20; object = {}; object.guildId = channel.guild_id; binding2 = env2_0; binding3 = env2_3; intl = binding2(binding3[13]).intl; string = intl.string; t = binding2(binding3[13]).t; object.title = Reflect.apply(string, intl, [t.B9QnBp]); intl = binding2(binding3[13]).intl; string = intl.string; t = binding2(binding3[13]).t; object.body = Reflect.apply(string, intl, [t.BVZCTn]); binding(object); return undefined; } env2_14(channelId, messageId, _fun85544); await env2_26({channelId: channelId, messageId: messageId}); } function _fun85544(a0) { // fn#85544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:5112, offset: 0x01f72e57, size: 95 bytes, params: 2, frame: 12 const object = {}; object.channelId = channelId; const Set = global.Set; object.selectedAnswerIds = new Set(); object.submitting = false; object.editing = false; const showResults = a0?.showResults; object.showResults = showResults != null && showResults; return object; } } } function _handlePollActionTapped() { // fn#85545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:5465, offset: 0x01f72eb6, size: 50 bytes, params: 1, frame: 14 return Module00005(_fun85547).apply(this, arguments); async function _fun85547({channelId, messageId, type}) { // fn#85547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:5534, offset: 0x01f72efc, size: 316 bytes, params: 2, frame: 19 var environment; if (true) { await undefined; if (false) { return undefined; } if (type === 'submit') { value = environment.__proto__.__proto__; await env2_26({channelId: channelId, messageId: messageId}); value = undefined; return undefined; } if (type === 'remove') { await handleClearPollVote({channelId: channelId, messageId: messageId}); return undefined; } if (type === 'cancel') { value = environment.__proto__.__proto__; env2_22({channelId: channelId, messageId: messageId, isEditing: false}); } else if (type === 'showVotes') { handleShowVotes({channelId: channelId, messageId: messageId}); } else if (type === 'showVoterDetails') { value = environment.__proto__.__proto__; env2_21({channelId: channelId, messageId: messageId}); } else { value = environment.__proto__.__proto__; value = env2_1(env2_3[11]); value(false, 'Unknown poll action type: ' + type); } } function handleClearPollVote() { // fn#85548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:5680, offset: 0x01f73038, size: 30 bytes, params: 1, frame: 13 return env3_28.apply(this, arguments); } function handleShowVotes({channelId, messageId}) { // fn#85549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:5900, offset: 0x01f73056, size: 48 bytes, params: 2, frame: 15 env3_14(channelId, messageId, _fun85550); function _fun85550(a0) { // fn#85550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:5959, offset: 0x01f73086, size: 272 bytes, params: 2, frame: 21 var environment; const r1 = a0 == null || !a0.showResults; value = environment.__proto__.__proto__.__proto__.__proto__; let binding = env4_11; const message = binding.getMessage(channelId, messageId); const value4 = 0; const r9 = message != null ? message.reactions.reduce(function(a0, {count_details}) { return a0 + (count_details?.vote ?? 0); }, value4) : value4; binding = env4_1; const value6 = undefined; const value7 = binding(env4_3[17]); const trackWithMetadata = value7.trackWithMetadata; const POLL_SHOW_RESULTS_CLICKED = env4_15.POLL_SHOW_RESULTS_CLICKED; channelIdBinding = channelId; Reflect.apply(trackWithMetadata, value7, [POLL_SHOW_RESULTS_CLICKED, {channel_id: channelIdBinding, message_id: messageId, show_results: r1, votes_count: r9}]); object = {channelId: channelIdBinding}; const Set = global.Set; object.selectedAnswerIds = new Set(); let submitting = a0 == null ? value6 : a0.submitting; object.submitting = submitting != null && submitting; submitting = a0 == null ? value6 : a0.submitting; object.editing = submitting != null && submitting; object.showResults = r1; return object; } } } } function _createPoll() { // fn#85552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:6632, offset: 0x01f73196, size: 50 bytes, params: 1, frame: 14 return Module00005(_fun85554).apply(this, arguments); async function _fun85554({channel, question, answers, allowMultiSelect, duration, layout, onClose}) { // fn#85554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:6677, offset: 0x01f731dc, size: 475 bytes, params: 2, frame: 29 var environment; var r3; var r2; var binding2; var property; var value6; var sendPollMessage; var object; var onAttachmentUploadError_855572; var value7; var value8; var value9; var value10; var error; var APIError; var prototype; var aPIError; var text; var JSON; var parse; if (true) { await undefined; if (false) { return undefined; } value = environment.__proto__.__proto__; var binding = env2_12; var getUploads = binding.getUploads; var id = channel.id; var Poll = env2_9.Poll; var value4 = Reflect.apply(getUploads, binding, [id, Poll]); var value5 = answers.map(_fun85555); var object2 = {}; var object3 = {}; object3.text = question.trim(); object2.question = object3; object2.answers = value5; object2.allow_multiselect = allowMultiSelect; object2.duration = duration; object2.layout_type = layout; try { binding = env2_1; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } try { binding2 = env2_3; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } try { property = binding2[25]; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } try { value6 = binding(property); } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } try { sendPollMessage = value6.sendPollMessage; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } try { id = channel.id; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } try { object = {}; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } try { object.attachmentsToUpload = value4; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } try { onAttachmentUploadError_855572 = onAttachmentUploadError_85557; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } try { object.onAttachmentUploadError = onAttachmentUploadError_855572; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } try { value7 = Reflect.apply(sendPollMessage, value6, [id, object2, object]); } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } await value7; try { value8 = undefined; value9 = false; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } if (value9) { return value8; } try { value10 = onClose == null; } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } if (!value10) { try { onClose(); } catch (error) { binding = env2_0; APIError = binding(env2_3[27]).APIError; if (error instanceof APIError) { if (error.getAnyErrorMessage() !== 'poll') { throw error; } if (error.text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; object2['body'] = Reflect.apply(parse, JSON, [error.text]); throw object2; } throw error; } binding = env2_0; APIError = binding(env2_3[27]).APIError; prototype = APIError.prototype; value = Object.create(prototype, {constructor: {value: APIError}}); aPIError = new APIError(); value = aPIError instanceof Object ? aPIError : value; r3 = value; value = r3.getAnyErrorMessage(); if (value !== 'poll') { throw error; } text = error.text; if (text != null) { object2 = {}; copyDataProperties(object2, error, undefined); JSON = global.JSON; parse = JSON.parse; text = error.text; value = Reflect.apply(parse, JSON, [text]); object2['body'] = value; throw object2; } r2 = error; throw r2; } } } function _fun85555(a0) { // fn#85555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:6811, offset: 0x01f733b7, size: 274 bytes, params: 2, frame: 17 var environment; var text; const env0_0 = a0; const value2 = undefined; const r8 = env0_2 == null ? value2 : env0_2.findIndex(_fun85556); const object = {}; object.attachment_ids = r8 === -1 ? value2 : ['' + r8]; const layoutBinding = layout; const value = environment.__proto__.__proto__.__proto__; const PollLayoutTypes = env3_0(env3_3[24]).PollLayoutTypes; const DEFAULT = PollLayoutTypes.DEFAULT; if (layoutBinding === DEFAULT) { text = a0.text; object.text = text == null ? value2 : text.trim(); } const image = a0.image; const emoji = image == null ? value2 : image.emoji; if (emoji != null) { if (emoji.id != null) { object.emoji = {id: emoji.id, name: ''}; } else if (emoji.optionallyDiverseSequence != null) { object.emoji = {name: emoji.optionallyDiverseSequence}; } } return {poll_media: object}; function _fun85556({id}) { // fn#85556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:6853, offset: 0x01f734c9, size: 27 bytes, params: 2, frame: 2 return id === env0_0.localCreationAnswerId; } } function onAttachmentUploadError_85557(a0, a1, a2) { // fn#85557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:7377, offset: 0x01f734e4, size: 93 bytes, params: 4, frame: 14 let value = environment.__proto__.__proto__.__proto__; value = env3_0(env3_3[26]); const handleUploadMessageAttachmentsErrors = value.handleUploadMessageAttachmentsErrors; const object = {file: a0}; object.guildId = channel.getGuildId(); object.analyticsLocations = []; object.code = a1; object.reason = a2; Reflect.apply(handleUploadMessageAttachmentsErrors, value, [object]); } } } function _endPollEarly() { // fn#85558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:7702, offset: 0x01f73541, size: 50 bytes, params: 1, frame: 14 return Module00005(_fun85560).apply(this, arguments); async function _fun85560({channelId, messageId}) { // fn#85560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:7751, offset: 0x01f73587, size: 260 bytes, params: 2, frame: 23 if (true) { await undefined; if (false) { return undefined; } value = environment.__proto__.__proto__; var binding = env2_1; var binding2 = env2_3; var value4 = binding(binding2[12]); var confirm = value4.confirm; var object = {}; binding = env2_0; var intl = binding(binding2[13]).intl; var string = intl.string; object.title = Reflect.apply(string, intl, [binding(binding2[13]).t['+rfkTK']]); intl = binding(binding2[13]).intl; string = intl.string; var H2I1gL = binding(binding2[13]).t.H2I1gL; object.body = Reflect.apply(string, intl, [H2I1gL]); await Reflect.apply(confirm, value4, [object]); if (false) { return undefined; } if (undefined) { value = env2_2(env2_3[22]); await value.endPollEarly({channelId: channelId, messageId: messageId}); value = undefined; return undefined; } } } } function handlePollAnswerTapped(a0) { // fn#85561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:8029, offset: 0x01f7368b, size: 354 bytes, params: 2, frame: 22 var object2; var allow_multiselect; var message; var poll; const answerId = a0.answerId; let value = Object.create(null); value.answerId = 0; value = copyDataProperties({}, a0, value, undefined); const value2 = undefined; let channelId = value.channelId; let messageId = value.messageId; const message2 = MessageStore.getMessage(channelId, messageId); if (message2 != null) { object2 = {message: message2, channelId: channelId, messageId: messageId}; channelId = object2.channelId; messageId = object2.messageId; message = object2.message; if (((require(8431) /* metro dependency 8431: formatPollMessageChatData */).computeBasicPollChatData(message) ?? ({})).tapShouldOpenVotersModal !== true) { poll = message.poll; allow_multiselect = poll == null ? value2 : poll.allow_multiselect; updatePollState(channelId, messageId, _fun85562); } else { handleShowVotesForAnswer({channelId: channelId, messageId: messageId, answerId: answerId}); } return value2; } const message3 = ReferencedMessageStore.getMessage(channelId, messageId); message = message3.message; if (message != null) { message = message3.message; object2 = {channelId: channelId, messageId: messageId, message: message}; channelId = object2.channelId; messageId = object2.messageId; message = object2.message; if (((require(8431) /* metro dependency 8431: formatPollMessageChatData */).computeBasicPollChatData(message) ?? ({})).tapShouldOpenVotersModal !== true) { poll = message.poll; allow_multiselect = poll == null ? value2 : poll.allow_multiselect; updatePollState(channelId, messageId, _fun85562); } else { handleShowVotesForAnswer({channelId: channelId, messageId: messageId, answerId: answerId}); } return value2; } (Module00044)(message2 != null, 'Tapped on a non-existent poll message'); const Error = global.Error; throw new Error(); function _fun85562(a0) { // fn#85562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:8582, offset: 0x01f737ed, size: 521 bytes, params: 2, frame: 20 var r3; var answers; var object; var Set; var set; var value3; var value4; var value5; var done; var value6; var value7; var getPollVoteEventPropertiesBinding; var poll; var analyticsSelectedAnswerIds; var selectedTextAnswersCount; var selectedEmojiAnswersCount; var trackWithMetadata; var POLL_VOTE_SELECTED; var channelIdBinding; var value12; var pollVoteEventPropertiesBinding; var defaultImport; if (a0 == null) { Set = global.Set; object = [answerId]; set = new Set(); value12 = environment.__proto__; getPollVoteEventPropertiesBinding = getPollVoteEventProperties; poll = message.poll; reducibleJoin12: while (true) { if (poll == null) { answers = undefined; break reducibleJoin12; } answers = poll.answers; break reducibleJoin12; } pollVoteEventPropertiesBinding = getPollVoteEventPropertiesBinding(answers, set); analyticsSelectedAnswerIds = pollVoteEventPropertiesBinding.analyticsSelectedAnswerIds; selectedTextAnswersCount = pollVoteEventPropertiesBinding.selectedTextAnswersCount; selectedEmojiAnswersCount = pollVoteEventPropertiesBinding.selectedEmojiAnswersCount; defaultImport = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */; trackWithMetadata = defaultImport.trackWithMetadata; POLL_VOTE_SELECTED = AnalyticEvents.POLL_VOTE_SELECTED; channelIdBinding = channelId; Reflect.apply(trackWithMetadata, defaultImport, [POLL_VOTE_SELECTED, {channel_id: channelIdBinding, message_id: messageId, selected_answer_ids: analyticsSelectedAnswerIds, selected_text_answers_count: selectedTextAnswersCount, selected_emoji_answers_count: selectedEmojiAnswersCount}]); return {'channelId': null, 'selectedAnswerIds': null, 'submitting': false, 'editing': false, 'showResults': false, channelId: channelIdBinding, selectedAnswerIds: set}; } object = {}; copyDataProperties(object, a0, undefined); Set = global.Set; set = new Set(object.selectedAnswerIds); object.selectedAnswerIds = set; if (set.has(answerId)) { set.delete(answerId); } else { reducibleJoin5: while (true) { if (allow_multiselect) { break reducibleJoin5; } value3 = environment.__proto__; value4 = _createForOfIteratorHelperLoose_85514(set); value5 = value4(); done = value5.done; if (done) { break reducibleJoin5; } r3 = value5; reducibleLoop4: while (true) { value6 = r3.value; set.delete(value6); value7 = value4(); done = value7.done; if (done) { break reducibleJoin5; } r3 = value7; continue reducibleLoop4; } } set.add(answerId); } getPollVoteEventPropertiesBinding = getPollVoteEventProperties; poll = message.poll; reducibleJoin9: while (true) { if (poll == null) { answers = undefined; break reducibleJoin9; } answers = poll.answers; break reducibleJoin9; } set = getPollVoteEventPropertiesBinding(answers, set); analyticsSelectedAnswerIds = set.analyticsSelectedAnswerIds; selectedTextAnswersCount = set.selectedTextAnswersCount; selectedEmojiAnswersCount = set.selectedEmojiAnswersCount; set = importDefault(4863) /* metro dependency 4863: AppAnalyticsUtils */; trackWithMetadata = set.trackWithMetadata; POLL_VOTE_SELECTED = AnalyticEvents.POLL_VOTE_SELECTED; Reflect.apply(trackWithMetadata, set, [POLL_VOTE_SELECTED, {channel_id: channelId, message_id: messageId, selected_answer_ids: analyticsSelectedAnswerIds, selected_text_answers_count: selectedTextAnswersCount, selected_emoji_answers_count: selectedEmojiAnswersCount}]); return object; } } } function _fun85540(a0) { // fn#85540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11383:4733, offset: 0x01f72cc4, size: 47 bytes, params: 2, frame: 12 var object; if (a0 != null) { object = {}; copyDataProperties(object, a0, undefined); object['submitting'] = false; object['editing'] = false; return object; } } global.__d(_fun85513, 11197, [5, 3785, 4833, 1226, 1379, 4645, 4798, 4814, 4644, 8432, 661, 44, 4647, 1244, 6593, 11198, 8431, 4863, 22, 566, 694, 7152, 11203, 4002, 8436, 7067, 7880, 4131, 2]) /* metro module 11197, dependencies: [5, 3785, 4833, 1226, 1379, 4645, 4798, 4814, 4644, 8432, 661, 44, 4647, 1244, 6593, 11198, 8431, 4863, 22, 566, 694, 7152, 11203, 4002, 8436, 7067, 7880, 4131, 2] */;