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

No files matched your search

@@ -1,23 +1,25 @@
/* Metro module 9040; source: modules/guild_scheduled_events/CreateGuildScheduledEventConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun70380(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9225:6, offset: 0x01cf8b20, size: 196 bytes, params: 8, frame: 16
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {NONE: 0};
object2[0] = 'NONE';
object2.WEEKLY = 1;
object2[1] = 'WEEKLY';
object2.MONTHLY = 2;
object2[2] = 'MONTHLY';
object2.YEARLY = 3;
object2[3] = 'YEARLY';
object2.WEEKDAY_ONLY = 4;
object2[4] = 'WEEKDAY_ONLY';
object2.BIWEEKLY = 5;
object2[5] = 'BIWEEKLY';
object2.WEEKEND_ONLY = 6;
object2[6] = 'WEEKEND_ONLY';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/CreateGuildScheduledEventConstants.tsx');
exports.RecurrenceOptions = object2;
object = {NONE: 0};
object[0] = 'NONE';
object.WEEKLY = 1;
object[1] = 'WEEKLY';
object.MONTHLY = 2;
object[2] = 'MONTHLY';
object.YEARLY = 3;
object[3] = 'YEARLY';
object.WEEKDAY_ONLY = 4;
object[4] = 'WEEKDAY_ONLY';
object.BIWEEKLY = 5;
object[5] = 'BIWEEKLY';
object.WEEKEND_ONLY = 6;
object[6] = 'WEEKEND_ONLY';
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/CreateGuildScheduledEventConstants.tsx');
exports.RecurrenceOptions = object;
}
global.__d(_fun70380, 9040, [2]) /* metro module 9040, dependencies: [2] */;
@@ -1,129 +1,142 @@
/* Metro module 15411; source: modules/guild_scheduled_events/EventBannerStore.tsx; dependencies: [6, 7, 15, 17, 18, 1385, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun117892(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:6, offset: 0x024c4883, size: 331 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventStatus;
const env0_6 = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun117896(PersistedStore);
value.displayName = 'EventBannerStore';
value.persistKey = 'EventBanner';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{EVENT_BANNER_DISMISS: EVENT_BANNER_DISMISS, GUILD_SCHEDULED_EVENT_UPDATE: GUILD_SCHEDULED_EVENT_UPDATE_117902,
GUILD_SCHEDULED_EVENT_DELETE: GUILD_SCHEDULED_EVENT_DELETE_117903});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/EventBannerStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/EventBannerStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_117893() { // fn#117893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:184, offset: 0x024c49ce, 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) {
function _isNativeReflectConstruct_117893() { // fn#117893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:184, offset: 0x024c49ce, 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_117893_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_117893_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun117896(a0) { // fn#117896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:392, offset: 0x024c4a30, size: 124 bytes, params: 2, frame: 16
const closure = EventBannerStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_117898}, {key: 'isEventDismissed', value: value_117899},
{key: 'getState', value: value_117900}]);
}
function _fun117896(a0) { // fn#117896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:392, offset: 0x024c4a30, size: 124 bytes, params: 2, frame: 16
const EventBannerStore2 = EventBannerStore;
Inherits(EventBannerStore2, a0);
return CreateClass(EventBannerStore2, [{key: 'initialize', value: value_117898}, {key: 'isEventDismissed',
value: value_117899}, {key: 'getState', value: value_117900}]);
function EventBannerStore() { // fn#117897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:404, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, EventBannerStore);
const value3 = env1_3(EventBannerStore);
return env1_2(this, _isNativeReflectConstruct_117893() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function EVENT_BANNER_DISMISS({eventId}) { // fn#117901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:1024, offset: 0x024c4af2, size: 40 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, env0_6, eventId);
object2[eventId] = true;
}
function value_117898(a0) { // fn#117898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:702, offset: 0x024c4aac, size: 32 bytes, params: 2, frame: 3
var r1;
var value;
if (a0 != null) {
r1 = a0.dismissedEventIds ?? ({});
value = environment.__proto__;
}
}
function GUILD_SCHEDULED_EVENT_UPDATE_117902({guildScheduledEvent}) { // fn#117902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:1106, offset: 0x024c4b1a, size: 107 bytes, params: 2, frame: 13
var binding;
var id;
var property;
var object2;
let status = guildScheduledEvent.status;
const CANCELED = GuildScheduledEventStatus.CANCELED;
if (status === CANCELED) {
binding = env0_6;
id = guildScheduledEvent.id;
property = binding[id];
function value_117899(a0) { // fn#117899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:800, offset: 0x024c4acc, size: 22 bytes, params: 2, frame: 2
return env1_6[a0] != null;
}
function value_117900() { // fn#117900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:854, offset: 0x024c4ae2, size: 16 bytes, params: 1, frame: 2
return {dismissedEventIds: env1_6};
}
}
function EVENT_BANNER_DISMISS({eventId}) { // fn#117901, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:1024, offset: 0x024c4af2, size: 40 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, env0_6, eventId);
object[eventId] = true;
}
function GUILD_SCHEDULED_EVENT_UPDATE_117902({guildScheduledEvent}) { // fn#117902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:1106, offset: 0x024c4b1a, size: 107 bytes, params: 2, frame: 13
var binding;
var id;
var property;
var object;
let status = guildScheduledEvent.status;
const CANCELED = GuildScheduledEventStatus.CANCELED;
if (status === CANCELED) {
binding = env0_6;
id = guildScheduledEvent.id;
property = binding[id];
if (property == null) {
return false;
}
object = {};
copyDataProperties(object, env0_6, property);
id = guildScheduledEvent.id;
delete object[id];
} else {
status = guildScheduledEvent.status;
var COMPLETED = GuildScheduledEventStatus.COMPLETED;
if (status !== COMPLETED) {
return false;
}
binding = env0_6;
id = guildScheduledEvent.id;
property = binding[id];
if (property == null) {
return false;
}
object = {};
copyDataProperties(object, env0_6, property);
id = guildScheduledEvent.id;
delete object[id];
}
}
function GUILD_SCHEDULED_EVENT_DELETE_117903({guildScheduledEvent}) { // fn#117903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:1304, offset: 0x024c4b85, size: 65 bytes, params: 2, frame: 13
const property = env0_6[guildScheduledEvent.id];
if (property == null) {
return false;
}
object2 = {};
copyDataProperties(object2, env0_6, property);
id = guildScheduledEvent.id;
delete object2[id];
} else {
status = guildScheduledEvent.status;
var COMPLETED = GuildScheduledEventStatus.COMPLETED;
if (status !== COMPLETED) {
return false;
}
binding = env0_6;
id = guildScheduledEvent.id;
property = binding[id];
if (property == null) {
return false;
}
object2 = {};
copyDataProperties(object2, env0_6, property);
id = guildScheduledEvent.id;
delete object2[id];
const object = {};
copyDataProperties(object, env0_6, property);
delete object[guildScheduledEvent.id];
}
}
function GUILD_SCHEDULED_EVENT_DELETE_117903({guildScheduledEvent}) { // fn#117903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:1304, offset: 0x024c4b85, size: 65 bytes, params: 2, frame: 13
const property = env0_6[guildScheduledEvent.id];
if (property == null) {
return false;
}
const object2 = {};
copyDataProperties(object2, env0_6, property);
delete object2[guildScheduledEvent.id];
}
function value_117898(a0) { // fn#117898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:702, offset: 0x024c4aac, size: 32 bytes, params: 2, frame: 3
var r1;
var value;
if (a0 != null) {
r1 = a0.dismissedEventIds ?? ({});
value = environment.__proto__;
}
}
function value_117899(a0) { // fn#117899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:800, offset: 0x024c4acc, size: 22 bytes, params: 2, frame: 2
return env1_6[a0] != null;
}
function value_117900() { // fn#117900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15608:854, offset: 0x024c4ae2, size: 16 bytes, params: 1, frame: 2
return {dismissedEventIds: env1_6};
}
global.__d(_fun117892, 15411, [6, 7, 15, 17, 18, 1385, 566, 694,
2]) /* metro module 15411, dependencies: [6, 7, 15, 17, 18, 1385, 566, 694, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,14 +1,16 @@
/* Metro module 9032; source: modules/guild_scheduled_events/GuildScheduledEventModalActionCreators.native.tsx; dependencies: [5, 1385, 9033, 4080, 9034, 1962, 9039, 9227, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as GuildEventModalConstantsModule from './native/GuildEventModalConstants.tsx'; /* Metro dependency 9033 */
function _fun70242(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9217:6, offset: 0x01cf3eb8, size: 205 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = openGuildEventDetails;
const openGuildEventDetails2 = openGuildEventDetails;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).EXPLICIT_END_EVENT_SHEET_KEY;
const env0_5 = (require(9033) /* metro dependency 9033: GuildEventModalConstants */).GUILD_EVENT_INFO_ACTION_SHEET_KEY;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/GuildScheduledEventModalActionCreators.native.tsx');
exports.openGuildEventDetails = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/GuildScheduledEventModalActionCreators.native.tsx');
exports.openGuildEventDetails = openGuildEventDetails2;
exports.transitionToEventDetailsFromInvite = function() {
return _transitionToEventDetailsFromInvite.apply(this, arguments);
};
@@ -16,43 +18,45 @@ function _fun70242(global, require, importDefault, importAll, module, exports, d
importDefault(dependencyMap[3]).openLazy(require(dependencyMap[5])(dependencyMap[7], dependencyMap.paths),
EXPLICIT_END_EVENT_SHEET_KEY, {channel: a0});
};
}
function openGuildEventDetails({eventId, event, onClose, recurrenceId}) { // fn#70243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9217:189, offset: 0x01cf3f85, size: 189 bytes, params: 2, frame: 23
var r7;
var value;
const defaultImport = importDefault(dependencyMap[3]);
const openLazy = defaultImport.openLazy;
const value3 = require(dependencyMap[5])(dependencyMap[4], dependencyMap.paths);
const object2 = {eventId: eventId, event: event, onCloseActionSheet: onClose};
if (recurrenceId != null) {
r7 = recurrenceId;
} else {
value = require(dependencyMap[6]);
value = value.getNextRecurrenceIdInEvent(event);
r7 = value;
function openGuildEventDetails({eventId, event, onClose, recurrenceId}) { // fn#70243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9217:189, offset: 0x01cf3f85, size: 189 bytes, params: 2, frame: 23
var r7;
var value;
const defaultImport = importDefault(dependencyMap[3]);
const openLazy = defaultImport.openLazy;
const value3 = require(dependencyMap[5])(dependencyMap[4], dependencyMap.paths);
const object = {eventId: eventId, event: event, onCloseActionSheet: onClose};
if (recurrenceId != null) {
r7 = recurrenceId;
} else {
value = require(dependencyMap[6]);
value = value.getNextRecurrenceIdInEvent(event);
r7 = value;
}
object.recurrenceId = r7 ?? undefined;
Reflect.apply(openLazy, defaultImport, [value3, GUILD_EVENT_INFO_ACTION_SHEET_KEY, object, 'stack']);
}
object2.recurrenceId = r7 ?? undefined;
Reflect.apply(openLazy, defaultImport, [value3, GUILD_EVENT_INFO_ACTION_SHEET_KEY, object2, 'stack']);
}
function _transitionToEventDetailsFromInvite() { // fn#70244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9217:443, offset: 0x01cf4042, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun70246).apply(this, arguments);
}
function _transitionToEventDetailsFromInvite() { // fn#70244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9217:443, offset: 0x01cf4042, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun70246).apply(this, arguments);
function* _fun70246(a0, a1) { // fn#70246, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9217:536, offset: 0x01cf407f, size: 102 bytes, params: 3, frame: 16
if (false) {
return undefined;
}
const Promise = global.Promise;
yield Promise.resolve();
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_6;
value = undefined;
binding({eventId: a0.id, event: a0, recurrenceId: a1 == null ? value : a1.recurrenceId});
return value;
}
function* _fun70246(a0, a1) { // fn#70246, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9217:536, offset: 0x01cf407f, size: 102 bytes, params: 3, frame: 16
if (false) {
return undefined;
}
const Promise = global.Promise;
yield Promise.resolve();
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const binding = env2_6;
value = undefined;
binding({eventId: a0.id, event: a0, recurrenceId: a1 == null ? value : a1.recurrenceId});
return value;
}
global.__d(_fun70242, 9032, [5, 1385, 9033, 4080, 9034, 1962, 9039, 9227,
2]) /* metro module 9032, dependencies: [5, 1385, 9033, 4080, 9034, 1962, 9039, 9227, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,51 +1,51 @@
/* Metro module 9129; source: modules/guild_scheduled_events/GuildScheduledEventUtils.tsx; dependencies: [1385, 3738, 21, 2] */
import SnowflakeUtils from '../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun71547(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9314:6, offset: 0x01d23d0f, size: 150 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildScheduledEventsConstantsModule = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
const env0_2 = guildScheduledEventsConstantsModule.UpcomingGuildEventNoticeTypes;
const env0_3 = guildScheduledEventsConstantsModule.NEW_EVENT_WINDOW_MILLISECONDS;
const env0_4 = guildScheduledEventsConstantsModule.EVENT_STARTING_SOON_WINDOW_MILLISECONDS;
const env0_5 = guildScheduledEventsConstantsModule.ACKED_RECENTLY_WINDOW_DAYS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/GuildScheduledEventUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/GuildScheduledEventUtils.tsx');
exports.getNextShownUpcomingEventNoticeType = getNextShownUpcomingEventNoticeType;
function getNextShownUpcomingEventNoticeType({scheduled_start_time, id}, a1, a2, a3) { // fn#71548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9314:380, offset: 0x01d23da5, size: 370 bytes, params: 5, frame: 24
var isBetween2;
var value9;
let value = a2;
const value4 = (importDefault(3738) /* metro dependency 3738 */)();
const Date = global.Date;
const value5 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date(scheduled_start_time);
const time = (date instanceof Object ? date : value5).getTime();
const object = {};
object.start = time - EVENT_STARTING_SOON_WINDOW_MILLISECONDS;
object.end = time;
let isBetween = value4.isBetween;
if (Reflect.apply(isBetween, value4, [object.start, object.end])) {
if (a1 != null) {
value = (importDefault(3738) /* metro dependency 3738 */)(a1);
isBetween2 = value.isBetween(object.start, object.end);
isBetween = value.isBetween;
value9 = (importDefault(3738) /* metro dependency 3738 */)(time);
value = Reflect.apply(isBetween, value, [value9.subtract(ACKED_RECENTLY_WINDOW_DAYS, 'days'), time]);
return isBetween2 ? undefined : value ? a3 ? UpcomingGuildEventNoticeTypes.EVENT_STARTING_SOON : undefined : UpcomingGuildEventNoticeTypes.EVENT_STARTING_SOON;
}
return UpcomingGuildEventNoticeTypes.EVENT_STARTING_SOON;
}
const value8 = (SnowflakeUtils).extractTimestamp(id);
const Math = global.Math;
value = Math.min((value ?? value8) + NEW_EVENT_WINDOW_MILLISECONDS, time);
if (value4.isBetween(value8, value)) {
if (a1 != null) {
return undefined;
}
if (a3) {
return undefined;
}
return UpcomingGuildEventNoticeTypes.NEW_EVENT;
}
}
}
function getNextShownUpcomingEventNoticeType({scheduled_start_time, id}, a1, a2, a3) { // fn#71548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9314:380, offset: 0x01d23da5, size: 370 bytes, params: 5, frame: 24
var isBetween2;
var value9;
let value = a2;
const value4 = (importDefault(3738) /* metro dependency 3738 */)();
const Date = global.Date;
const value5 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date(scheduled_start_time);
const time = (date instanceof Object ? date : value5).getTime();
const object2 = {};
object2.start = time - EVENT_STARTING_SOON_WINDOW_MILLISECONDS;
object2.end = time;
let isBetween = value4.isBetween;
if (Reflect.apply(isBetween, value4, [object2.start, object2.end])) {
if (a1 != null) {
value = (importDefault(3738) /* metro dependency 3738 */)(a1);
isBetween2 = value.isBetween(object2.start, object2.end);
isBetween = value.isBetween;
value9 = (importDefault(3738) /* metro dependency 3738 */)(time);
value = Reflect.apply(isBetween, value, [value9.subtract(ACKED_RECENTLY_WINDOW_DAYS, 'days'), time]);
return isBetween2 ? undefined : value ? a3 ? UpcomingGuildEventNoticeTypes.EVENT_STARTING_SOON : undefined : UpcomingGuildEventNoticeTypes.EVENT_STARTING_SOON;
}
return UpcomingGuildEventNoticeTypes.EVENT_STARTING_SOON;
}
const value8 = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).extractTimestamp(id);
const Math = global.Math;
value = Math.min((value ?? value8) + NEW_EVENT_WINDOW_MILLISECONDS, time);
if (value4.isBetween(value8, value)) {
if (a1 != null) {
return undefined;
}
if (a3) {
return undefined;
}
return UpcomingGuildEventNoticeTypes.NEW_EVENT;
}
}
global.__d(_fun71547, 9129, [1385, 3738, 21, 2]) /* metro module 9129, dependencies: [1385, 3738, 21, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,70 +1,72 @@
/* Metro module 1385; source: modules/guild_scheduled_events/GuildScheduledEventsConstants.tsx; dependencies: [661, 672, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
function _fun16284(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#16284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1512:6, offset: 0x00e4bbb3, size: 830 bytes, params: 8, frame: 33
var object7;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const ChannelTypes = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
object7 = {SCHEDULED: 1};
object7[1] = 'SCHEDULED';
object7.ACTIVE = 2;
object7[2] = 'ACTIVE';
object7.COMPLETED = 3;
object7[3] = 'COMPLETED';
object7.CANCELED = 4;
object7[4] = 'CANCELED';
const ChannelTypes = (ConstantsModule).ChannelTypes;
object = {SCHEDULED: 1};
object[1] = 'SCHEDULED';
object.ACTIVE = 2;
object[2] = 'ACTIVE';
object.COMPLETED = 3;
object[3] = 'COMPLETED';
object.CANCELED = 4;
object[4] = 'CANCELED';
let Set = global.Set;
const COMPLETED = object7.COMPLETED;
const CANCELED = object7.CANCELED;
const COMPLETED = object.COMPLETED;
const CANCELED = object.CANCELED;
let set = new Set([COMPLETED, CANCELED]);
const object9 = {NONE: 0};
object9[0] = 'NONE';
object9.STAGE_INSTANCE = 1;
object9[1] = 'STAGE_INSTANCE';
object9.VOICE = 2;
object9[2] = 'VOICE';
object9.EXTERNAL = 3;
object9[3] = 'EXTERNAL';
object9.PRIME_TIME = 4;
object9[4] = 'PRIME_TIME';
const object10 = {EVENT_START: 1};
object10[1] = 'EVENT_START';
const object11 = {PUBLIC: 1};
object11[1] = 'PUBLIC';
object11.GUILD_ONLY = 2;
object11[2] = 'GUILD_ONLY';
const object2 = {NONE: 0};
object2[0] = 'NONE';
object2.STAGE_INSTANCE = 1;
object2[1] = 'STAGE_INSTANCE';
object2.VOICE = 2;
object2[2] = 'VOICE';
object2.EXTERNAL = 3;
object2[3] = 'EXTERNAL';
object2.PRIME_TIME = 4;
object2[4] = 'PRIME_TIME';
const object3 = {EVENT_START: 1};
object3[1] = 'EVENT_START';
const object4 = {PUBLIC: 1};
object4[1] = 'PUBLIC';
object4.GUILD_ONLY = 2;
object4[2] = 'GUILD_ONLY';
Set = global.Set;
let STAGE_INSTANCE = object9.STAGE_INSTANCE;
const PRIME_TIME = object9.PRIME_TIME;
let STAGE_INSTANCE = object2.STAGE_INSTANCE;
const PRIME_TIME = object2.PRIME_TIME;
set = new Set([STAGE_INSTANCE, PRIME_TIME]);
const object12 = {};
STAGE_INSTANCE = object9.STAGE_INSTANCE;
const object5 = {};
STAGE_INSTANCE = object2.STAGE_INSTANCE;
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
object12[STAGE_INSTANCE] = GUILD_STAGE_VOICE;
let VOICE = object9.VOICE;
object5[STAGE_INSTANCE] = GUILD_STAGE_VOICE;
let VOICE = object2.VOICE;
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
object12[VOICE] = GUILD_VOICE;
object5[VOICE] = GUILD_VOICE;
Set = global.Set;
const EXTERNAL = object9.EXTERNAL;
const EXTERNAL = object2.EXTERNAL;
set = new Set([EXTERNAL]);
Set = global.Set;
STAGE_INSTANCE = object9.STAGE_INSTANCE;
VOICE = object9.VOICE;
STAGE_INSTANCE = object2.STAGE_INSTANCE;
VOICE = object2.VOICE;
set = new Set([STAGE_INSTANCE, VOICE]);
const object13 = {EVENT_INFO: 0};
object13[0] = 'EVENT_INFO';
object13.RSVP_LIST = 1;
object13[1] = 'RSVP_LIST';
const object6 = {EVENT_INFO: 0};
object6[0] = 'EVENT_INFO';
object6.RSVP_LIST = 1;
object6[1] = 'RSVP_LIST';
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const DAY = Millis.DAY;
const value8 = 2 * DAY;
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const HOUR = Millis.HOUR;
const value9 = 12 * HOUR;
const object14 = {UNINTERESTED: 0};
object14[0] = 'UNINTERESTED';
object14.INTERESTED = 1;
object14[1] = 'INTERESTED';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/GuildScheduledEventsConstants.tsx');
const object8 = {UNINTERESTED: 0};
object8[0] = 'UNINTERESTED';
object8.INTERESTED = 1;
object8[1] = 'INTERESTED';
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/GuildScheduledEventsConstants.tsx');
exports.GUILD_EVENT_MAX_NAME_LENGTH = 100;
exports.GUILD_EVENT_MAX_DESCRIPTION_LENGTH = 1000;
exports.MAX_EVENT_LOCATION_LENGTH = 100;
@@ -72,22 +74,23 @@ function _fun16284(global, require, importDefault, importAll, module, exports, d
exports.ANALYTICS_GUILD_EVENTS_MODAL_NAME = 'Guild Events Modal';
exports.GUILD_EVENT_STAGE_UPSELL_CARD_KEY = 'hasSeenGuildEventStageUpsellCard';
exports.FAKE_EVENT_ID = '-1';
exports.GuildScheduledEventStatus = object7;
exports.GuildScheduledEventStatus = object;
exports.GuildScheduledEventStatusDone = set;
exports.GuildScheduledEventEntityTypes = object9;
exports.GuildScheduledEventNotificationTypes = object10;
exports.GuildScheduledEventPrivacyLevel = object11;
exports.GuildScheduledEventEntityTypes = object2;
exports.GuildScheduledEventNotificationTypes = object3;
exports.GuildScheduledEventPrivacyLevel = object4;
exports.AGE_VERIFICATION_STAGE_CHANNEL_TYPES = set;
exports.EntityChannelTypes = object12;
exports.EntityChannelTypes = object5;
exports.ENTITY_TYPES_REQUIRED_ENTITY_METADATA = set;
exports.ENTITY_TYPES_REQUIRED_CHANNEL_ID = set;
exports.EventDetailSections = object13;
exports.EventDetailSections = object6;
exports.MAX_RSVP_USER_DISPLAY_COUNT = 100;
exports.NEW_EVENT_WINDOW_MILLISECONDS = value8;
exports.EVENT_STARTING_SOON_WINDOW_MILLISECONDS = value9;
exports.ACKED_RECENTLY_WINDOW_DAYS = 4;
exports.UpcomingGuildEventNoticeTypes = {NEW_EVENT: 'Upcoming Event Notice',
EVENT_STARTING_SOON: 'Event Starting Soon Notice'};
exports.GuildScheduledEventUserResponses = object14;
exports.GuildScheduledEventUserResponses = object8;
}
global.__d(_fun16284, 1385, [661, 672, 2]) /* metro module 1385, dependencies: [661, 672, 2] */;
@@ -1,33 +1,37 @@
/* Metro module 15412; source: modules/guild_scheduled_events/GuildScheduledEventsNoticesActionCreators.tsx; dependencies: [694, 2] */
import Dispatcher from '../../Dispatcher.tsx'; /* Metro dependency 694 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun117904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15609:6, offset: 0x024c4bc6, size: 144 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/GuildScheduledEventsNoticesActionCreators.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/GuildScheduledEventsNoticesActionCreators.tsx');
exports.hideLiveChannelNotice = hideLiveChannelNotice;
exports.hideUpcomingEventNotice = hideUpcomingEventNotice;
exports.markUpcomingEventNoticeAsSeen = markUpcomingEventNoticeAsSeen;
exports.dismissEventBanner = dismissEventBanner;
}
function hideLiveChannelNotice({eventId, stageId}) { // fn#117905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15609:226, offset: 0x024c4c56, size: 91 bytes, params: 2, frame: 14
let value = eventId == null;
if (!(value && stageId == null)) {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'LIVE_CHANNEL_NOTICE_HIDE', eventId: eventId, stageId: stageId});
function hideLiveChannelNotice({eventId, stageId}) { // fn#117905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15609:226, offset: 0x024c4c56, size: 91 bytes, params: 2, frame: 14
let value = eventId == null;
if (!(value && stageId == null)) {
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.dispatch({type: 'LIVE_CHANNEL_NOTICE_HIDE', eventId: eventId, stageId: stageId});
}
}
function hideUpcomingEventNotice(a0) { // fn#117906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15609:397, offset: 0x024c4cb1, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'UPCOMING_GUILD_EVENT_NOTICE_HIDE',
eventId: a0});
}
function markUpcomingEventNoticeAsSeen(a0) { // fn#117907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15609:536, offset: 0x024c4ce9, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'UPCOMING_GUILD_EVENT_NOTICE_SEEN',
guildEventId: a0});
}
function dismissEventBanner(a0) { // fn#117908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15609:675, offset: 0x024c4d21, size: 56 bytes, params: 2, frame: 13
(Dispatcher).dispatch({type: 'EVENT_BANNER_DISMISS', eventId: a0});
}
}
function hideUpcomingEventNotice(a0) { // fn#117906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15609:397, offset: 0x024c4cb1, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPCOMING_GUILD_EVENT_NOTICE_HIDE',
eventId: a0});
}
function markUpcomingEventNoticeAsSeen(a0) { // fn#117907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15609:536, offset: 0x024c4ce9, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'UPCOMING_GUILD_EVENT_NOTICE_SEEN',
guildEventId: a0});
}
function dismissEventBanner(a0) { // fn#117908, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15609:675, offset: 0x024c4d21, size: 56 bytes, params: 2, frame: 13
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'EVENT_BANNER_DISMISS', eventId: a0});
}
global.__d(_fun117904, 15412, [694, 2]) /* metro module 15412, dependencies: [694, 2] */;
@@ -1,15 +1,18 @@
/* Metro module 14568; source: modules/guild_scheduled_events/LiveChannelNoticesStore.tsx; dependencies: [6, 7, 15, 17, 18, 1385, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun110181(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:6, offset: 0x0236dc73, size: 352 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const env0_5 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventStatus;
object = {hiddenEventsAndStages: []};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
let value = _fun110185(PersistedStore);
value.displayName = 'LiveChannelNoticesStore';
value.persistKey = 'liveChannelNotices_v2';
@@ -18,121 +21,147 @@ function _fun110181(global, require, importDefault, importAll, module, exports,
GUILD_SCHEDULED_EVENT_UPDATE: GUILD_SCHEDULED_EVENT_UPDATE_110191,
GUILD_SCHEDULED_EVENT_DELETE: GUILD_SCHEDULED_EVENT_DELETE_110193,
STAGE_INSTANCE_DELETE: STAGE_INSTANCE_DELETE_110195});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/LiveChannelNoticesStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/LiveChannelNoticesStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_110182() { // fn#110182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:184, offset: 0x0236ddd3, 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_110182_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun110185(a0) { // fn#110185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:416, offset: 0x0236de35, size: 122 bytes, params: 2, frame: 16
const closure = LiveChannelNoticesStore;
env0_4(closure, a0);
return env0_1(closure, [{key: 'initialize', value: value_110187}, {key: 'isLiveChannelNoticeHidden',
value: value_110188}, {key: 'getState', value: value_110189}]);
}
function LIVE_CHANNEL_NOTICE_HIDE({eventId, stageId}) { // fn#110190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:1211, offset: 0x0236df5e, size: 125 bytes, params: 2, frame: 14
if (eventId != null) {
env0_6.hiddenEventsAndStages.push('event-' + eventId);
} else if (stageId != null) {
env0_6.hiddenEventsAndStages.push('stage-' + stageId);
}
}
function GUILD_SCHEDULED_EVENT_UPDATE_110191({guildScheduledEvent}) { // fn#110191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:1393, offset: 0x0236dfdb, size: 157 bytes, params: 2, frame: 14
var binding;
let value = 'event-' + guildScheduledEvent.id;
value = env0_6.hiddenEventsAndStages.includes(value);
if (!(value ? guildScheduledEvent.status !== GuildScheduledEventStatus.CANCELED && guildScheduledEvent.status !== GuildScheduledEventStatus.COMPLETED : !value)) {
binding = env0_6;
binding.hiddenEventsAndStages = binding.hiddenEventsAndStages.filter(_fun110192);
}
}
function GUILD_SCHEDULED_EVENT_DELETE_110193({guildScheduledEvent}) { // fn#110193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:1651, offset: 0x0236e078, size: 107 bytes, params: 2, frame: 13
var binding;
const value = 'event-' + guildScheduledEvent.id;
const hiddenEventsAndStages = env0_6.hiddenEventsAndStages;
if (hiddenEventsAndStages.includes(value)) {
binding = env0_6;
binding.hiddenEventsAndStages = binding.hiddenEventsAndStages.filter(_fun110194);
}
}
function STAGE_INSTANCE_DELETE_110195({instance}) { // fn#110195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:1854, offset: 0x0236e0e3, size: 107 bytes, params: 2, frame: 13
var binding;
const value = 'stage-' + instance.id;
const hiddenEventsAndStages = env0_6.hiddenEventsAndStages;
if (hiddenEventsAndStages.includes(value)) {
binding = env0_6;
binding.hiddenEventsAndStages = binding.hiddenEventsAndStages.filter(_fun110196);
}
}
function value_110187(a0) { // fn#110187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:761, offset: 0x0236deaf, size: 36 bytes, params: 2, frame: 4
let value = a0 != null;
if (value && a0.hiddenEventsAndStages != null) {
value = environment.__proto__;
env1_6 = a0;
}
}
function value_110188({eventId, stageId}) { // fn#110188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:860, offset: 0x0236ded3, size: 139 bytes, params: 2, frame: 16
var r2;
var r1;
var r0;
var hiddenEventsAndStages;
let value = stageId == null;
if (value) {
r2 = value;
} else {
value = environment.__proto__;
hiddenEventsAndStages = env1_6.hiddenEventsAndStages;
value = !hiddenEventsAndStages.includes('stage-' + stageId);
r2 = value;
}
value = !r2;
if (r2) {
value = eventId != null;
if (value) {
value = environment.__proto__;
value = env1_6.hiddenEventsAndStages.includes('event-' + eventId);
r1 = value;
} else {
r1 = value;
function _isNativeReflectConstruct_110182() { // fn#110182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:184, offset: 0x0236ddd3, 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) {
}
r0 = r1;
} else {
r0 = value;
return (_isNativeReflectConstruct_110182_isNativeReflectConstruct = function() {
return !!result;
})();
}
return r0;
function _fun110185(a0) { // fn#110185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:416, offset: 0x0236de35, size: 122 bytes, params: 2, frame: 16
const LiveChannelNoticesStore2 = LiveChannelNoticesStore;
Inherits(LiveChannelNoticesStore2, a0);
return CreateClass(LiveChannelNoticesStore2, [{key: 'initialize', value: value_110187},
{key: 'isLiveChannelNoticeHidden', value: value_110188}, {key: 'getState', value: value_110189}]);
function LiveChannelNoticesStore() { // fn#110186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:428, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, LiveChannelNoticesStore);
const value3 = env1_3(LiveChannelNoticesStore);
return env1_2(this, _isNativeReflectConstruct_110182() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_110187(a0) { // fn#110187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:761, offset: 0x0236deaf, size: 36 bytes, params: 2, frame: 4
let value = a0 != null;
if (value && a0.hiddenEventsAndStages != null) {
value = environment.__proto__;
env1_6 = a0;
}
}
function value_110188({eventId, stageId}) { // fn#110188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:860, offset: 0x0236ded3, size: 139 bytes, params: 2, frame: 16
var r2;
var r1;
var r0;
var hiddenEventsAndStages;
let value = stageId == null;
if (value) {
r2 = value;
} else {
value = environment.__proto__;
hiddenEventsAndStages = env1_6.hiddenEventsAndStages;
value = !hiddenEventsAndStages.includes('stage-' + stageId);
r2 = value;
}
value = !r2;
if (r2) {
value = eventId != null;
if (value) {
value = environment.__proto__;
value = env1_6.hiddenEventsAndStages.includes('event-' + eventId);
r1 = value;
} else {
r1 = value;
}
r0 = r1;
} else {
r0 = value;
}
return r0;
}
function value_110189() { // fn#110189, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
}
function LIVE_CHANNEL_NOTICE_HIDE({eventId, stageId}) { // fn#110190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:1211, offset: 0x0236df5e, size: 125 bytes, params: 2, frame: 14
if (eventId != null) {
env0_6.hiddenEventsAndStages.push('event-' + eventId);
} else if (stageId != null) {
env0_6.hiddenEventsAndStages.push('stage-' + stageId);
}
}
function GUILD_SCHEDULED_EVENT_UPDATE_110191({guildScheduledEvent}) { // fn#110191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:1393, offset: 0x0236dfdb, size: 157 bytes, params: 2, frame: 14
var binding;
let value = 'event-' + guildScheduledEvent.id;
value = env0_6.hiddenEventsAndStages.includes(value);
if (!(value ? guildScheduledEvent.status !== GuildScheduledEventStatus.CANCELED && guildScheduledEvent.status !== GuildScheduledEventStatus.COMPLETED : !value)) {
binding = env0_6;
binding.hiddenEventsAndStages = binding.hiddenEventsAndStages.filter(_fun110192);
}
function _fun110192(a0) { // fn#110192, offset: 0x00ce1772, size: 16 bytes, params: 2, frame: 2
return a0 !== ClassCallCheck;
}
}
function GUILD_SCHEDULED_EVENT_DELETE_110193({guildScheduledEvent}) { // fn#110193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:1651, offset: 0x0236e078, size: 107 bytes, params: 2, frame: 13
var binding;
const value = 'event-' + guildScheduledEvent.id;
const hiddenEventsAndStages = env0_6.hiddenEventsAndStages;
if (hiddenEventsAndStages.includes(value)) {
binding = env0_6;
binding.hiddenEventsAndStages = binding.hiddenEventsAndStages.filter(_fun110194);
}
function _fun110194(a0) { // fn#110194, offset: 0x00ce1772, size: 16 bytes, params: 2, frame: 2
return a0 !== ClassCallCheck;
}
}
function STAGE_INSTANCE_DELETE_110195({instance}) { // fn#110195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14765:1854, offset: 0x0236e0e3, size: 107 bytes, params: 2, frame: 13
var binding;
const value = 'stage-' + instance.id;
const hiddenEventsAndStages = env0_6.hiddenEventsAndStages;
if (hiddenEventsAndStages.includes(value)) {
binding = env0_6;
binding.hiddenEventsAndStages = binding.hiddenEventsAndStages.filter(_fun110196);
}
function _fun110196(a0) { // fn#110196, offset: 0x00ce1772, size: 16 bytes, params: 2, frame: 2
return a0 !== ClassCallCheck;
}
}
}
global.__d(_fun110181, 14568, [6, 7, 15, 17, 18, 1385, 566, 694,
2]) /* metro module 14568, dependencies: [6, 7, 15, 17, 18, 1385, 566, 694, 2] */;
@@ -1,20 +1,25 @@
/* Metro module 9076; source: modules/guild_scheduled_events/PermissionsConstants.tsx; dependencies: [661, 483, 1387, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as BigFlagUtilsModule from '../../external/discord_common/js/shared/utils/BigFlagUtils.tsx'; /* Metro dependency 483 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as StageChannelPermissionsModule from '../stage_channels/StageChannelPermissions.tsx'; /* Metro dependency 1387 */
function _fun70924(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9261:6, offset: 0x01d0d3ec, size: 186 bytes, params: 8, frame: 20
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const Permissions = (require(661) /* metro dependency 661: Constants */).Permissions;
const Permissions = (ConstantsModule).Permissions;
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
let value = importAll(483) /* metro dependency 483: BigFlagUtils */;
let value = BigFlagUtilsModule;
let combine = value.combine;
const CONNECT = Permissions.CONNECT;
value = Reflect.apply(combine, value, [VIEW_CHANNEL, CONNECT]);
const bigFlagUtilsModule = importAll(483) /* metro dependency 483: BigFlagUtils */;
combine = bigFlagUtilsModule.combine;
const MODERATE_STAGE_CHANNEL_PERMISSIONS = (require(1387) /* metro dependency 1387: StageChannelPermissions */).MODERATE_STAGE_CHANNEL_PERMISSIONS;
const value3 = Reflect.apply(combine, bigFlagUtilsModule, [VIEW_CHANNEL, MODERATE_STAGE_CHANNEL_PERMISSIONS]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/PermissionsConstants.tsx');
combine = BigFlagUtilsModule.combine;
const MODERATE_STAGE_CHANNEL_PERMISSIONS = (StageChannelPermissionsModule).MODERATE_STAGE_CHANNEL_PERMISSIONS;
const value3 = Reflect.apply(combine, BigFlagUtilsModule, [VIEW_CHANNEL, MODERATE_STAGE_CHANNEL_PERMISSIONS]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/PermissionsConstants.tsx');
exports.CREATE_GUILD_EVENT_CORE_PERMISSIONS = VIEW_CHANNEL;
exports.CREATE_GUILD_EVENT_VOICE_CHANNEL_PERMISSIONS = value;
exports.CREATE_GUILD_EVENT_STAGE_CHANNEL_PERMISSIONS = value3;
}
global.__d(_fun70924, 9076, [661, 483, 1387, 2]) /* metro module 9076, dependencies: [661, 483, 1387, 2] */;
@@ -1,38 +1,45 @@
/* Metro module 9081; source: modules/guild_scheduled_events/StageChannelUpsellCardStore.tsx; dependencies: [1385, 685, 587, 690, 3769, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as StorageModule from '../../external/discord_common/js/packages/storage/Storage.tsx'; /* Metro dependency 587 */
import * as Module00685Module from '../../by-id/module-00685.js'; /* Metro dependency 685 */
import * as ReactBatchUpdatesNativeModule from '../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun70964(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70964, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9266:6, offset: 0x01d0f2ad, size: 151 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GUILD_EVENT_STAGE_UPSELL_CARD_KEY;
const env0_3 = (require(685) /* metro dependency 685 */).createWithEqualityFn(_fun70965);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/StageChannelUpsellCardStore.tsx');
const env0_3 = (Module00685Module).createWithEqualityFn(_fun70965);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/StageChannelUpsellCardStore.tsx');
exports.useStageChannelUpsellCardStore = useStageChannelUpsellCardStore;
function _fun70965(a0) { // fn#70965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9266:172, offset: 0x01d0f344, size: 81 bytes, params: 2, frame: 14
const env0_0 = a0;
const object = {};
const Storage = (StorageModule).Storage;
object.hasSeenUpsellCard = Storage.get(GUILD_EVENT_STAGE_UPSELL_CARD_KEY) === true;
object.markAsSeen = markAsSeen;
return object;
function markAsSeen() { // fn#70966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9266:234, offset: 0x01d0f395, size: 82 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
const Storage = (StorageModule).Storage;
Storage.set(GUILD_EVENT_STAGE_UPSELL_CARD_KEY, true);
(ReactBatchUpdatesNativeModule).batchUpdates(_fun70967);
function _fun70967() { // fn#70967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9266:287, offset: 0x01d0f3e7, size: 25 bytes, params: 1, frame: 11
return env1_0({hasSeenUpsellCard: true});
}
}
}
function useStageChannelUpsellCardStore() { // fn#70968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9266:453, offset: 0x01d0f400, size: 52 bytes, params: 1, frame: 13
return env0_3(function(a0) {
return [a0.hasSeenUpsellCard, a0.markAsSeen];
}, (require(3769) /* metro dependency 3769 */).shallow);
}
}
function _fun70965(a0) { // fn#70965, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9266:172, offset: 0x01d0f344, size: 81 bytes, params: 2, frame: 14
const env0_0 = a0;
const object2 = {};
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
object2.hasSeenUpsellCard = Storage.get(GUILD_EVENT_STAGE_UPSELL_CARD_KEY) === true;
object2.markAsSeen = markAsSeen;
return object2;
}
function useStageChannelUpsellCardStore() { // fn#70968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9266:453, offset: 0x01d0f400, size: 52 bytes, params: 1, frame: 13
return env0_3(function(a0) {
return [a0.hasSeenUpsellCard, a0.markAsSeen];
}, (require(3769) /* metro dependency 3769 */).shallow);
}
function markAsSeen() { // fn#70966, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9266:234, offset: 0x01d0f395, size: 82 bytes, params: 1, frame: 16
var environment;
const value = environment.__proto__;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set(GUILD_EVENT_STAGE_UPSELL_CARD_KEY, true);
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun70967);
}
function _fun70967() { // fn#70967, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9266:287, offset: 0x01d0f3e7, size: 25 bytes, params: 1, frame: 11
return env1_0({hasSeenUpsellCard: true});
}
global.__d(_fun70964, 9081, [1385, 685, 587, 690, 3769,
2]) /* metro module 9081, dependencies: [1385, 685, 587, 690, 3769, 2] */;
@@ -1,15 +1,17 @@
/* Metro module 9143; source: modules/guild_scheduled_events/StartEventPlatformUtils.native.tsx; dependencies: [5, 1379, 4294, 3969, 1385, 661, 44, 8113, 8118, 4796, 1230, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedGuildStore from '../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */
import RTCConnectionStore from '../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun71627(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71627, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9328:6, offset: 0x01d26f48, size: 241 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const selectedGuildStore = importDefault(3969) /* metro dependency 3969: SelectedGuildStore */;
const env0_8 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const env0_9 = (require(661) /* metro dependency 661: Constants */).Routes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/StartEventPlatformUtils.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/StartEventPlatformUtils.native.tsx');
exports.navigateToEvent = function() {
return _navigateToEvent.apply(this, arguments);
};
@@ -17,105 +19,107 @@ function _fun71627(global, require, importDefault, importAll, module, exports, d
var Promise = global.Promise;
return Promise.resolve();
};
}
function _navigateToEvent() { // fn#71628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9328:194, offset: 0x01d27039, size: 50 bytes, params: 1, frame: 14
return env0_4(_fun71630).apply(this, arguments);
}
function* _fun71630(a0, a1) { // fn#71630, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9328:249, offset: 0x01d27076, size: 535 bytes, params: 3, frame: 20
var binding;
var value3;
var transitionTo;
var channelId;
var value5;
var channelId2;
var value8;
var value10;
var value13;
if (true) {
var entity_type = a0.entity_type;
var guild_id = a0.guild_id;
value = environment.__proto__.__proto__;
var STAGE_INSTANCE = env2_8.STAGE_INSTANCE;
if (STAGE_INSTANCE === entity_type) {
binding = env2_6;
channelId2 = binding.getChannelId();
binding = env2_5;
value8 = binding.getChannel(a0.channel_id);
binding = env2_1;
binding(env2_3[6])(value8 != null, 'could not find channel');
if (channelId2 === value8.id) {
if (a1 != null) {
a1();
}
binding = env2_2;
value13 = binding(env2_3[7]);
yield value13.navigateToStage(value8, null);
if (false) {
return undefined;
}
binding = env2_0;
value = binding(env2_3[8]);
yield value.audienceAckRequestToSpeak(value8, false);
value = undefined;
if (false) {
return value;
}
return undefined;
}
binding = env2_2;
value10 = binding(env2_3[7]);
yield value10.connectToStage(value8, true);
if (false) {
return undefined;
}
if (a1 != null) {
a1();
}
binding = env2_2;
value13 = binding(env2_3[7]);
yield value13.navigateToStage(value8, null);
if (false) {
return undefined;
}
binding = env2_0;
value = binding(env2_3[8]);
yield value.audienceAckRequestToSpeak(value8, false);
value = undefined;
if (false) {
return value;
}
} else {
var VOICE = env2_8.VOICE;
if (VOICE === entity_type) {
binding = env2_6;
channelId = binding.getChannelId();
binding = env2_5;
value5 = binding.getChannel(a0.channel_id);
binding = env2_1;
binding(env2_3[6])(value5 != null, 'could not find channel');
if (channelId !== value5.id) {
value = env2_1(env2_3[9]);
value.selectVoiceChannel(value5.id);
}
if (a1 != null) {
a1();
}
} else if (env2_8.EXTERNAL === entity_type) {
binding = env2_7;
if (binding.getGuildId() !== guild_id) {
function _navigateToEvent() { // fn#71628, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9328:194, offset: 0x01d27039, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun71630).apply(this, arguments);
function* _fun71630(a0, a1) { // fn#71630, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9328:249, offset: 0x01d27076, size: 535 bytes, params: 3, frame: 20
var binding;
var value3;
var transitionTo;
var channelId;
var value5;
var channelId2;
var value8;
var value10;
var value13;
if (true) {
var entity_type = a0.entity_type;
var guild_id = a0.guild_id;
value = environment.__proto__.__proto__;
var STAGE_INSTANCE = env2_8.STAGE_INSTANCE;
if (STAGE_INSTANCE === entity_type) {
binding = env2_6;
channelId2 = binding.getChannelId();
binding = env2_5;
value8 = binding.getChannel(a0.channel_id);
binding = env2_1;
binding(env2_3[6])(value8 != null, 'could not find channel');
if (channelId2 === value8.id) {
if (a1 != null) {
a1();
}
binding = env2_2;
value13 = binding(env2_3[7]);
yield value13.navigateToStage(value8, null);
if (false) {
return undefined;
}
binding = env2_0;
value = binding(env2_3[8]);
yield value.audienceAckRequestToSpeak(value8, false);
value = undefined;
if (false) {
return value;
}
return undefined;
}
binding = env2_2;
value10 = binding(env2_3[7]);
yield value10.connectToStage(value8, true);
if (false) {
return undefined;
}
if (a1 != null) {
a1();
}
binding = env2_2;
value13 = binding(env2_3[7]);
yield value13.navigateToStage(value8, null);
if (false) {
return undefined;
}
binding = env2_0;
value3 = binding(env2_3[10]);
transitionTo = value3.transitionTo;
binding = env2_9;
Reflect.apply(transitionTo, value3, [binding.CHANNEL(guild_id)]);
}
if (a1 != null) {
a1();
value = binding(env2_3[8]);
yield value.audienceAckRequestToSpeak(value8, false);
value = undefined;
if (false) {
return value;
}
} else {
var VOICE = env2_8.VOICE;
if (VOICE === entity_type) {
binding = env2_6;
channelId = binding.getChannelId();
binding = env2_5;
value5 = binding.getChannel(a0.channel_id);
binding = env2_1;
binding(env2_3[6])(value5 != null, 'could not find channel');
if (channelId !== value5.id) {
value = env2_1(env2_3[9]);
value.selectVoiceChannel(value5.id);
}
if (a1 != null) {
a1();
}
} else if (env2_8.EXTERNAL === entity_type) {
binding = env2_7;
if (binding.getGuildId() !== guild_id) {
binding = env2_0;
value3 = binding(env2_3[10]);
transitionTo = value3.transitionTo;
binding = env2_9;
Reflect.apply(transitionTo, value3, [binding.CHANNEL(guild_id)]);
}
if (a1 != null) {
a1();
}
}
}
}
}
}
}
global.__d(_fun71627, 9143, [5, 1379, 4294, 3969, 1385, 661, 44, 8113, 8118, 4796, 1230,
2]) /* metro module 9143, dependencies: [5, 1379, 4294, 3969, 1385, 661, 44, 8113, 8118, 4796, 1230, 2] */;
@@ -1,147 +1,149 @@
/* Metro module 9142; source: modules/guild_scheduled_events/StartEventUtils.tsx; dependencies: [5, 1383, 1379, 1867, 1385, 661, 9086, 44, 8123, 9037, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as ChannelRecordModule from '../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun71613(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:6, offset: 0x01d26a0d, size: 310 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = function() {
return _createStageChannelForEvent.apply(this, arguments);
};
const closure2 = findOrCreateEventChannel;
const findOrCreateEventChannel2 = findOrCreateEventChannel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(1383) /* metro dependency 1383: ChannelRecord */).createChannelRecordFromServer;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildScheduledEventsConstantsModule = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
const env0_7 = guildScheduledEventsConstantsModule.GuildScheduledEventEntityTypes;
const env0_8 = guildScheduledEventsConstantsModule.GuildScheduledEventPrivacyLevel;
const env0_9 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/StartEventUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/StartEventUtils.tsx');
exports.createStageChannelForEvent = closure;
exports.findOrCreateEventChannel = closure2;
exports.findOrCreateEventChannel = findOrCreateEventChannel2;
exports.preStartEventActions = function() {
return _preStartEventActions.apply(this, arguments);
};
exports.setEventAsActive = function() {
return _setEventAsActive.apply(this, arguments);
};
}
function _createStageChannelForEvent() { // fn#71615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:365, offset: 0x01d26b43, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun71617).apply(this, arguments);
}
function findOrCreateEventChannel(a0, a1) { // fn#71618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:726, offset: 0x01d26c88, size: 118 bytes, params: 3, frame: 17
const guild_id = a0.guild_id;
const channel_id = a0.channel_id;
const guild = GuildStore.getGuild(guild_id);
if (guild == null) {
return global.Promise.resolve(null);
}
const channel = ChannelStore.getChannel(channel_id);
return channel == null ? createStageChannelForEvent(guild, a0.name, a1) : global.Promise.resolve(channel);
}
function _preStartEventActions() { // fn#71619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:948, offset: 0x01d26cfe, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun71621).apply(this, arguments);
}
function _setEventAsActive() { // fn#71622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:1186, offset: 0x01d26da6, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun71624).apply(this, arguments);
}
async function _fun71617({id}, a1) { // fn#71617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:442, offset: 0x01d26b89, size: 255 bytes, params: 3, frame: 22
let value = a2;
if (false) {
return undefined;
}
const r4 = value !== undefined ? value : [];
await undefined;
if (false) {
return undefined;
}
const items3 = [];
const push = items3.push;
const items2 = [];
arraySpread(items2, r4, 0, a1);
apply(push, items2, items3, a1);
value = environment.__proto__.__proto__;
const value5 = env2_1(env2_2[6]);
const createChannel = value5.createChannel;
const object2 = {};
object2.guildId = id;
const GUILD_STAGE_VOICE = env2_9.GUILD_STAGE_VOICE;
object2.type = GUILD_STAGE_VOICE;
object2.name = a1.substring(0, 100);
object2.permissionOverwrites = items3;
await Reflect.apply(createChannel, value5, [object2]);
if (false) {
return undefined;
}
if (null == undefined) {
throw new global.Error("Can't create channel for event");
}
if (undefined.status !== 201) {
throw new global.Error("Can't create channel for event");
}
return env2_4(undefined.body);
}
function* _fun71621(a0, a1) { // fn#71621, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:1013, offset: 0x01d26d3b, size: 107 bytes, params: 3, frame: 15
if (true) {
var entity_type = a0.entity_type;
value = environment.__proto__.__proto__;
var STAGE_INSTANCE = env2_7.STAGE_INSTANCE;
if (entity_type === STAGE_INSTANCE) {
yield env2_12(a0, a1);
var value3 = undefined;
function _createStageChannelForEvent() { // fn#71615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:365, offset: 0x01d26b43, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun71617).apply(this, arguments);
async function _fun71617({id}, a1) { // fn#71617, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:442, offset: 0x01d26b89, size: 255 bytes, params: 3, frame: 22
let value = a2;
if (false) {
return value3;
}
env2_1(env2_2[7])(value3 != null, 'could not find or create channel');
}
}
}
async function _fun71624({channel_id, entity_type, name, id, guild_id}) { // fn#71624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:1243, offset: 0x01d26dec, size: 348 bytes, params: 2, frame: 26
var binding;
var binding2;
var binding3;
var value8;
let value = a1;
if (true) {
var r9 = value !== undefined ? value : false;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var STAGE_INSTANCE = env2_7.STAGE_INSTANCE;
if (STAGE_INSTANCE === entity_type) {
binding = env2_1;
binding3 = env2_2;
binding(binding3[7])(channel_id != null, 'channel_id is required');
binding = env2_0;
value8 = binding(binding3[8]);
await value8.startStageInstance(channel_id, name, env2_8.GUILD_ONLY, r9, id);
} else {
var VOICE = env2_7.VOICE;
if (VOICE === entity_type) {
binding = env2_1;
binding2 = env2_2;
value = binding(binding2[7]);
value(channel_id != null, 'channel_id is required');
value = binding(binding2[9]);
await value.startEvent(id, guild_id);
value = undefined;
return undefined;
}
var EXTERNAL = env2_7.EXTERNAL;
if (EXTERNAL !== entity_type) {
const r4 = value !== undefined ? value : [];
await undefined;
if (false) {
return undefined;
}
value = env2_1(env2_2[9]);
await value.startEvent(id, guild_id);
const items3 = [];
const push = items3.push;
const items2 = [];
arraySpread(items2, r4, 0, a1);
apply(push, items2, items3, a1);
value = environment.__proto__.__proto__;
const value5 = env2_1(env2_2[6]);
const createChannel = value5.createChannel;
const object = {};
object.guildId = id;
const GUILD_STAGE_VOICE = env2_9.GUILD_STAGE_VOICE;
object.type = GUILD_STAGE_VOICE;
object.name = a1.substring(0, 100);
object.permissionOverwrites = items3;
await Reflect.apply(createChannel, value5, [object]);
if (false) {
return undefined;
}
if (null == undefined) {
throw new global.Error("Can't create channel for event");
}
if (undefined.status !== 201) {
throw new global.Error("Can't create channel for event");
}
return env2_4(undefined.body);
}
}
function findOrCreateEventChannel(a0, a1) { // fn#71618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:726, offset: 0x01d26c88, size: 118 bytes, params: 3, frame: 17
const guild_id = a0.guild_id;
const channel_id = a0.channel_id;
const guild = GuildStore.getGuild(guild_id);
if (guild == null) {
return global.Promise.resolve(null);
}
const channel = ChannelStore.getChannel(channel_id);
return channel == null ? createStageChannelForEvent(guild, a0.name, a1) : global.Promise.resolve(channel);
}
function _preStartEventActions() { // fn#71619, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:948, offset: 0x01d26cfe, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun71621).apply(this, arguments);
function* _fun71621(a0, a1) { // fn#71621, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:1013, offset: 0x01d26d3b, size: 107 bytes, params: 3, frame: 15
if (true) {
var entity_type = a0.entity_type;
value = environment.__proto__.__proto__;
var STAGE_INSTANCE = env2_7.STAGE_INSTANCE;
if (entity_type === STAGE_INSTANCE) {
yield env2_12(a0, a1);
var value3 = undefined;
if (false) {
return value3;
}
env2_1(env2_2[7])(value3 != null, 'could not find or create channel');
}
}
}
}
function _setEventAsActive() { // fn#71622, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:1186, offset: 0x01d26da6, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun71624).apply(this, arguments);
async function _fun71624({channel_id, entity_type, name, id, guild_id}) { // fn#71624, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9327:1243, offset: 0x01d26dec, size: 348 bytes, params: 2, frame: 26
var binding;
var binding2;
var binding3;
var value8;
let value = a1;
if (true) {
var r9 = value !== undefined ? value : false;
await undefined;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
var STAGE_INSTANCE = env2_7.STAGE_INSTANCE;
if (STAGE_INSTANCE === entity_type) {
binding = env2_1;
binding3 = env2_2;
binding(binding3[7])(channel_id != null, 'channel_id is required');
binding = env2_0;
value8 = binding(binding3[8]);
await value8.startStageInstance(channel_id, name, env2_8.GUILD_ONLY, r9, id);
} else {
var VOICE = env2_7.VOICE;
if (VOICE === entity_type) {
binding = env2_1;
binding2 = env2_2;
value = binding(binding2[7]);
value(channel_id != null, 'channel_id is required');
value = binding(binding2[9]);
await value.startEvent(id, guild_id);
value = undefined;
return undefined;
}
var EXTERNAL = env2_7.EXTERNAL;
if (EXTERNAL !== entity_type) {
return undefined;
}
value = env2_1(env2_2[9]);
await value.startEvent(id, guild_id);
}
}
}
}
}
global.__d(_fun71613, 9142, [5, 1383, 1379, 1867, 1385, 661, 9086, 44, 8123, 9037,
2]) /* metro module 9142, dependencies: [5, 1383, 1379, 1867, 1385, 661, 9086, 44, 8123, 9037, 2] */;
@@ -1,21 +1,25 @@
/* Metro module 9128; source: modules/guild_scheduled_events/UpcomingEventNoticesStore.tsx; dependencies: [6, 7, 15, 17, 18, 1226, 4117, 1385, 9129, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import GuildScheduledEventStore from './GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun71529(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:6, offset: 0x01d23807, size: 424 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
let value = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
let value = GuildScheduledEventsConstantsModule;
const env0_9 = value.GuildScheduledEventStatus;
const env0_10 = value.UpcomingGuildEventNoticeTypes;
const env0_11 = {};
const env0_12 = {};
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
const PersistedStore = (Flux).PersistedStore;
value = _fun71534(PersistedStore);
value.displayName = 'UpcomingEventNoticesStore';
value.persistKey = 'UpcomingEventNotices';
@@ -29,110 +33,137 @@ function _fun71529(global, require, importDefault, importAll, module, exports, d
resetStateForEvent(guildScheduledEvent.id);
}, GUILD_SCHEDULED_EVENT_USER_ADD: GUILD_SCHEDULED_EVENT_USER_ADD_71545,
UPCOMING_GUILD_EVENT_NOTICE_SEEN: UPCOMING_GUILD_EVENT_NOTICE_SEEN});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/UpcomingEventNoticesStore.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/UpcomingEventNoticesStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_71530() { // fn#71530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:242, offset: 0x01d239af, 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_71530_isNativeReflectConstruct = function() {
return !!result;
})();
}
function resetStateForEvent(a0) { // fn#71533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:449, offset: 0x01d23a11, size: 52 bytes, params: 2, frame: 13
let object2 = {};
copyDataProperties(object2, env0_11, undefined);
const value2 = delete object2[a0];
object2 = {};
copyDataProperties(object2, env0_12, value2);
delete object2[a0];
}
function _fun71534(a0) { // fn#71534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:544, offset: 0x01d23a45, size: 205 bytes, params: 2, frame: 16
const closure = UpcomingEventNoticesStore;
env0_6(closure, a0);
return env0_3(closure, [{key: 'initialize', value: function(a0) {
var property;
this.waitFor(AuthenticationStore, GuildScheduledEventStore);
if (a0 != null) {
property = a0.upcomingEventDismissals;
env1_11 = property ?? ({});
property = a0.upcomingEventSeenTimestamps;
env1_12 = property ?? ({});
function _isNativeReflectConstruct_71530() { // fn#71530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:242, offset: 0x01d239af, 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) {
}
}}, {key: 'getGuildEventNoticeDismissalTime', value: value_71537}, {key: 'getAllEventDismissals',
value: value_71538}, {key: 'getUpcomingNoticeSeenTime', value: value_71539},
{key: 'getAllUpcomingNoticeSeenTimes', value: value_71540}, {key: 'getState', value: value_71541}]);
}
return (_isNativeReflectConstruct_71530_isNativeReflectConstruct = function() {
return !!result;
})();
}
function UPCOMING_GUILD_EVENT_NOTICE_HIDE({eventId}) { // fn#71542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:1560, offset: 0x01d23b72, size: 54 bytes, params: 2, frame: 14
const object2 = {};
copyDataProperties(object2, env0_11, undefined);
const Date = global.Date;
object2[eventId] = Date.now();
}
function resetStateForEvent(a0) { // fn#71533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:449, offset: 0x01d23a11, size: 52 bytes, params: 2, frame: 13
let object = {};
copyDataProperties(object, env0_11, undefined);
const value2 = delete object[a0];
object = {};
copyDataProperties(object, env0_12, value2);
delete object[a0];
}
function GUILD_SCHEDULED_EVENT_USER_ADD_71545({userId, guildEventId}) { // fn#71545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:1925, offset: 0x01d23c12, size: 199 bytes, params: 2, frame: 19
var guildScheduledEvent;
var property;
var object2;
var Date;
const getId = AuthenticationStore.getId;
if (userId === Reflect.apply(getId, AuthenticationStore, [])) {
guildScheduledEvent = GuildScheduledEventStore.getGuildScheduledEvent(guildEventId);
if (guildScheduledEvent != null) {
if (guildScheduledEvent.status === GuildScheduledEventStatus.SCHEDULED) {
if (env0_11[guildEventId] == null) {
property = env0_12[guildEventId];
if ((require(9129) /* metro dependency 9129: GuildScheduledEventUtils */).getNextShownUpcomingEventNoticeType(guildScheduledEvent,
undefined, property, false) === UpcomingGuildEventNoticeTypes.NEW_EVENT) {
object2 = {};
copyDataProperties(object2, env0_11, property);
Date = global.Date;
object2[guildEventId] = Date.now();
function _fun71534(a0) { // fn#71534, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:544, offset: 0x01d23a45, size: 205 bytes, params: 2, frame: 16
const UpcomingEventNoticesStore2 = UpcomingEventNoticesStore;
Inherits(UpcomingEventNoticesStore2, a0);
return CreateClass(UpcomingEventNoticesStore2, [{key: 'initialize', value: function(a0) {
var property;
this.waitFor(AuthenticationStore, GuildScheduledEventStore);
if (a0 != null) {
property = a0.upcomingEventDismissals;
env1_11 = property ?? ({});
property = a0.upcomingEventSeenTimestamps;
env1_12 = property ?? ({});
}
}}, {key: 'getGuildEventNoticeDismissalTime', value: value_71537}, {key: 'getAllEventDismissals',
value: value_71538}, {key: 'getUpcomingNoticeSeenTime', value: value_71539},
{key: 'getAllUpcomingNoticeSeenTimes', value: value_71540}, {key: 'getState', value: value_71541}]);
function UpcomingEventNoticesStore() { // fn#71535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:556, offset: 0x00ea76ec, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_2(this, UpcomingEventNoticesStore);
const value3 = env1_5(UpcomingEventNoticesStore);
return env1_4(this, _isNativeReflectConstruct_71530() ? global.Reflect.construct(value3, arguments,
env1_5(this).constructor) : value3.apply(this, arguments));
}
function value_71537(a0) { // fn#71537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:1088, offset: 0x0108d3ec, size: 16 bytes, params: 2, frame: 2
return env1_11[a0];
}
function value_71538() { // fn#71538, offset: 0x00ef8482, size: 9 bytes, params: 1, frame: 1
return env1_11;
}
function value_71539(a0) { // fn#71539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:1210, offset: 0x00f8559b, size: 16 bytes, params: 2, frame: 2
return env1_12[a0];
}
function value_71540() { // fn#71540, offset: 0x00e2f9de, size: 9 bytes, params: 1, frame: 1
return env1_12;
}
function value_71541() { // fn#71541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:1323, offset: 0x01d23b59, size: 25 bytes, params: 1, frame: 3
return {upcomingEventDismissals: env1_11, upcomingEventSeenTimestamps: env1_12};
}
}
function UPCOMING_GUILD_EVENT_NOTICE_HIDE({eventId}) { // fn#71542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:1560, offset: 0x01d23b72, size: 54 bytes, params: 2, frame: 14
const object = {};
copyDataProperties(object, env0_11, undefined);
const Date = global.Date;
object[eventId] = Date.now();
}
function GUILD_SCHEDULED_EVENT_USER_ADD_71545({userId, guildEventId}) { // fn#71545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:1925, offset: 0x01d23c12, size: 199 bytes, params: 2, frame: 19
var guildScheduledEvent;
var property;
var object;
var Date;
const authenticationStoreBinding = AuthenticationStore;
const getId = authenticationStoreBinding.getId;
if (userId === Reflect.apply(getId, authenticationStoreBinding, [])) {
guildScheduledEvent = GuildScheduledEventStore.getGuildScheduledEvent(guildEventId);
if (guildScheduledEvent != null) {
if (guildScheduledEvent.status === GuildScheduledEventStatus.SCHEDULED) {
if (env0_11[guildEventId] == null) {
property = env0_12[guildEventId];
if ((require(9129) /* metro dependency 9129: GuildScheduledEventUtils */).getNextShownUpcomingEventNoticeType(guildScheduledEvent,
undefined, property, false) === UpcomingGuildEventNoticeTypes.NEW_EVENT) {
object = {};
copyDataProperties(object, env0_11, property);
Date = global.Date;
object[guildEventId] = Date.now();
}
}
}
}
}
}
function UPCOMING_GUILD_EVENT_NOTICE_SEEN({guildEventId}) { // fn#71546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:2251, offset: 0x01d23cd9, size: 54 bytes, params: 2, frame: 14
const object = {};
copyDataProperties(object, env0_12, undefined);
const Date = global.Date;
object[guildEventId] = Date.now();
}
}
function UPCOMING_GUILD_EVENT_NOTICE_SEEN({guildEventId}) { // fn#71546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:2251, offset: 0x01d23cd9, size: 54 bytes, params: 2, frame: 14
const object2 = {};
copyDataProperties(object2, env0_12, undefined);
const Date = global.Date;
object2[guildEventId] = Date.now();
}
function value_71541() { // fn#71541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9313:1323, offset: 0x01d23b59, size: 25 bytes, params: 1, frame: 3
return {upcomingEventDismissals: env1_11, upcomingEventSeenTimestamps: env1_12};
}
global.__d(_fun71529, 9128, [6, 7, 15, 17, 18, 1226, 4117, 1385, 9129, 566, 694,
2]) /* metro module 9128, dependencies: [6, 7, 15, 17, 18, 1226, 4117, 1385, 9129, 566, 694, 2] */;
@@ -1,8 +1,11 @@
/* Metro module 9123; source: modules/guild_scheduled_events/guildEventDetailsParser.native.tsx; dependencies: [2, 6622] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun71473(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71473, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9308:6, offset: 0x01d21f1c, size: 99 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/guildEventDetailsParser.native.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/guildEventDetailsParser.native.tsx');
exports.guildEventDetailsParser = (importDefault(6622) /* metro dependency 6622: MarkupUtils */).parseGuildEventDescription;
}
global.__d(_fun71473, 9123, [2, 6622]) /* metro module 9123, dependencies: [2, 6622] */;
@@ -1,8 +1,10 @@
/* Metro module 9033; source: modules/guild_scheduled_events/native/GuildEventModalConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun70249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9218:6, offset: 0x01cf413c, size: 137 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/GuildEventModalConstants.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/GuildEventModalConstants.tsx');
exports.CREATE_GUILD_EVENT_MODAL_KEY = 'create-guild-event-modal';
exports.START_EVENT_MODAL_KEY = 'start-event-modal';
exports.GUILD_EVENTS_LIST_ACTION_SHEET_KEY = 'guild-scheduled-events-list';
@@ -12,3 +14,4 @@ function _fun70249(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun70249, 9033, [2]) /* metro module 9033, dependencies: [2] */;
@@ -1,77 +1,81 @@
/* Metro module 9219; source: modules/guild_scheduled_events/native/GuildScheduledEventHeaderUtils.tsx; dependencies: [4117, 1385, 9039, 697, 9132, 1244, 8145, 9220, 2] */
import Module09132 from '../../../by-id/module-09132.js'; /* Metro dependency 9132 */
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 GuildScheduledEventsConstantsModule from '../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as GuildScheduledEventStoreModule from '../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
function _fun72102(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9404:6, offset: 0x01d39957, size: 156 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildScheduledEventStoreModule = require(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_3 = guildScheduledEventStoreModule.isGuildEventEnded;
const env0_4 = guildScheduledEventStoreModule.isGuildScheduledEventActive;
const env0_5 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/GuildScheduledEventHeaderUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/GuildScheduledEventHeaderUtils.tsx');
exports.getGuildScheduledEventHeaderProps = getGuildScheduledEventHeaderProps;
function getGuildScheduledEventHeaderProps({eventTimeData, isStage, theme, event, isCanceled, recurrenceId}) { // fn#72103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9404:343, offset: 0x01d399f3, size: 793 bytes, params: 2, frame: 35
var r1;
var r12;
var r13;
var r6;
var r7;
var r11;
var defaultImport2;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var defaultImport3;
var defaultImport4;
var value8;
var ICON_FEEDBACK_POSITIVE;
const startDateTimeString = eventTimeData.startDateTimeString;
const diffMinutes = eventTimeData.diffMinutes;
const currentOrPastEvent = eventTimeData.currentOrPastEvent;
const upcomingEvent = eventTimeData.upcomingEvent;
let r2 = recurrenceId != null ? (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(event) === recurrenceId && isGuildScheduledEventActive(event) : isGuildScheduledEventActive(event);
const isGuildEventEnded2 = isGuildEventEnded(event);
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
const defaultImport = Module09132;
if (r2) {
value8 = intl.string(t['X2K3/4']);
r12 = isStage ? importDefault(8145) /* metro dependency 8145 */ : defaultImport;
r13 = event?.entity_type !== GuildScheduledEventEntityTypes.EXTERNAL ? value8 : intl.string(t.TxqPQR);
ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
r6 = r13;
r7 = ICON_FEEDBACK_POSITIVE;
r11 = r12;
} else if (isGuildEventEnded2) {
defaultImport4 = importDefault(9220) /* metro dependency 9220 */;
r6 = startDateTimeString;
r7 = ICON_SUBTLE;
r11 = defaultImport4;
} else if (currentOrPastEvent) {
defaultImport3 = importDefault(9220) /* metro dependency 9220 */;
r6 = intl.string(t.WINqKV);
r7 = ICON_SUBTLE;
r11 = defaultImport3;
} else if (upcomingEvent) {
defaultImport2 = importDefault(9220) /* metro dependency 9220 */;
r6 = diffMinutes > 0 ? intl.formatToPlainString(t.PQlCWk, {minutes: diffMinutes}) : intl.string(t.WINqKV);
r7 = ICON_SUBTLE;
r11 = defaultImport2;
} else {
r6 = startDateTimeString;
r7 = ICON_SUBTLE;
r11 = defaultImport;
}
r7 = isCanceled ? (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL : r7;
const object = {icon: r11, text: r6};
object.color = (importDefault(697) /* metro dependency 697: native */).internal.resolveSemanticColor(theme, r7);
if (isGuildEventEnded2) {
r1 = !isGuildEventEnded2;
} else {
r2 = !r2 ? currentOrPastEvent : r2;
r2 = !r2 ? upcomingEvent : r2;
r1 = r2;
}
object.shouldChangeTextColor = r1;
return object;
}
}
function getGuildScheduledEventHeaderProps({eventTimeData, isStage, theme, event, isCanceled, recurrenceId}) { // fn#72103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9404:343, offset: 0x01d399f3, size: 793 bytes, params: 2, frame: 35
var r1;
var r12;
var r13;
var r6;
var r7;
var r11;
var defaultImport2;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var defaultImport3;
var defaultImport4;
var value8;
var ICON_FEEDBACK_POSITIVE;
const startDateTimeString = eventTimeData.startDateTimeString;
const diffMinutes = eventTimeData.diffMinutes;
const currentOrPastEvent = eventTimeData.currentOrPastEvent;
const upcomingEvent = eventTimeData.upcomingEvent;
let r2 = recurrenceId != null ? (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(event) === recurrenceId && isGuildScheduledEventActive(event) : isGuildScheduledEventActive(event);
const isGuildEventEnded2 = isGuildEventEnded(event);
const ICON_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_SUBTLE;
const defaultImport = importDefault(9132) /* metro dependency 9132 */;
if (r2) {
value8 = intl.string(t['X2K3/4']);
r12 = isStage ? importDefault(8145) /* metro dependency 8145 */ : defaultImport;
r13 = event?.entity_type !== GuildScheduledEventEntityTypes.EXTERNAL ? value8 : intl.string(t.TxqPQR);
ICON_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_POSITIVE;
r6 = r13;
r7 = ICON_FEEDBACK_POSITIVE;
r11 = r12;
} else if (isGuildEventEnded2) {
defaultImport4 = importDefault(9220) /* metro dependency 9220 */;
r6 = startDateTimeString;
r7 = ICON_SUBTLE;
r11 = defaultImport4;
} else if (currentOrPastEvent) {
defaultImport3 = importDefault(9220) /* metro dependency 9220 */;
r6 = intl.string(t.WINqKV);
r7 = ICON_SUBTLE;
r11 = defaultImport3;
} else if (upcomingEvent) {
defaultImport2 = importDefault(9220) /* metro dependency 9220 */;
r6 = diffMinutes > 0 ? intl.formatToPlainString(t.PQlCWk, {minutes: diffMinutes}) : intl.string(t.WINqKV);
r7 = ICON_SUBTLE;
r11 = defaultImport2;
} else {
r6 = startDateTimeString;
r7 = ICON_SUBTLE;
r11 = defaultImport;
}
r7 = isCanceled ? (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_CRITICAL : r7;
const object2 = {icon: r11, text: r6};
object2.color = (importDefault(697) /* metro dependency 697: native */).internal.resolveSemanticColor(theme, r7);
if (isGuildEventEnded2) {
r1 = !isGuildEventEnded2;
} else {
r2 = !r2 ? currentOrPastEvent : r2;
r2 = !r2 ? upcomingEvent : r2;
r1 = r2;
}
object2.shouldChangeTextColor = r1;
return object2;
}
global.__d(_fun72102, 9219, [4117, 1385, 9039, 697, 9132, 1244, 8145, 9220,
2]) /* metro module 9219, dependencies: [4117, 1385, 9039, 697, 9132, 1244, 8145, 9220, 2] */;
@@ -1,28 +1,45 @@
/* Metro module 9052; source: modules/guild_scheduled_events/native/GuildScheduledEventModalActionCreators.tsx; dependencies: [5, 31, 1379, 1935, 1867, 3784, 4117, 1385, 9033, 661, 33, 5080, 44, 9053, 1962, 4080, 9074, 9125, 9140, 9148, 4497, 9037, 3857, 1244, 9149, 9132, 9043, 9150, 9049, 6797, 3856, 9151, 8879, 9032, 9044, 9039, 9214, 8153, 3829, 6796, 1478, 9215, 6802, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildChannelStore from '../../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import GuildScheduledEventStore from '../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import GuildScheduledEventsActionCreators from '../GuildScheduledEventsActionCreators.tsx'; /* Metro dependency 9037 */
import RestoreEventRecurrence from '../restoreEventRecurrence.tsx'; /* Metro dependency 9214 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildScheduledEventsConstantsModule from '../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as GuildScheduledEventStoreModule from '../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as UseAlertStoreNativeModule from '../../../design/components/AlertModal/native/useAlertStore.native.tsx'; /* Metro dependency 4497 */
import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as ShowSimpleActionSheetModule from '../../action_sheet/native/showSimpleActionSheet.tsx'; /* Metro dependency 6802 */
import * as ReportModalsModule from '../../in_app_reports/ReportModals.tsx'; /* Metro dependency 8153 */
import * as ScheduleUtilsModule from '../utils/ScheduleUtils.tsx'; /* Metro dependency 9039 */
import * as GuildEventRsvpUtilsModule from '../utils/GuildEventRsvpUtils.tsx'; /* Metro dependency 9043 */
import * as UseEventExceptionModule from '../useEventException.tsx'; /* Metro dependency 9044 */
function _fun70752(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:6, offset: 0x01d067de, size: 523 bytes, params: 8, frame: 24
const env0_0 = require;
const closure = openCreateOrEditGuildEventModal;
const openCreateOrEditGuildEventModal2 = openCreateOrEditGuildEventModal;
const closure2 = function(a0, a1, a2) {
importDefault(dependencyMap[15]).hideAllActionSheets();
importDefault(dependencyMap[11]).pushLazy(require(dependencyMap[14])(dependencyMap[18], dependencyMap.paths),
{event: a0, recurrenceId: a1, onCloseActionSheet: a2}, START_EVENT_MODAL_KEY);
};
const closure3 = openDeleteGuildEventActionSheet;
const closure4 = updateRsvp_70758;
const closure5 = handleGuildScheduledEventRsvp;
const openDeleteGuildEventActionSheet2 = openDeleteGuildEventActionSheet;
const updateRsvp_707582 = updateRsvp_70758;
const handleGuildScheduledEventRsvp2 = handleGuildScheduledEventRsvp;
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 channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
let value = require(4117) /* metro dependency 4117: GuildScheduledEventStore */;
let value = GuildScheduledEventStoreModule;
const env0_9 = value.isGuildEventEnded;
const env0_10 = value.isGuildScheduledEventActive;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_12 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventUserResponses;
value = require(9033) /* metro dependency 9033: GuildEventModalConstants */;
const env0_13 = value.CREATE_GUILD_EVENT_MODAL_KEY;
const env0_14 = value.GUILD_EVENTS_LIST_ACTION_SHEET_KEY;
@@ -31,9 +48,8 @@ function _fun70752(global, require, importDefault, importAll, module, exports, d
const env0_16 = value.InstantInviteSources;
const env0_17 = value.Permissions;
const env0_18 = value.Routes;
const env0_19 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/GuildScheduledEventModalActionCreators.tsx');
exports.openCreateOrEditGuildEventModal = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/GuildScheduledEventModalActionCreators.tsx');
exports.openCreateOrEditGuildEventModal = openCreateOrEditGuildEventModal2;
exports.openGuildEventListActionSheet = function(a0) {
importDefault(dependencyMap[15]).openLazy(require(dependencyMap[14])(dependencyMap[17], dependencyMap.paths),
GUILD_EVENTS_LIST_ACTION_SHEET_KEY, {guild: a0});
@@ -42,373 +58,380 @@ function _fun70752(global, require, importDefault, importAll, module, exports, d
importDefault(dependencyMap[15]).hideActionSheet(GUILD_EVENTS_LIST_ACTION_SHEET_KEY);
};
exports.openStartGuildEventModal = closure2;
exports.openDeleteGuildEventActionSheet = closure3;
exports.updateRsvp = closure4;
exports.handleGuildScheduledEventRsvp = closure5;
exports.openDeleteGuildEventActionSheet = openDeleteGuildEventActionSheet2;
exports.updateRsvp = updateRsvp_707582;
exports.handleGuildScheduledEventRsvp = handleGuildScheduledEventRsvp2;
exports.openShareEvent = openShareEvent;
exports.transitionToEventDetailsFromInvite = function() {
return _transitionToEventDetailsFromInvite_70763.apply(this, arguments);
};
exports.showGuildEventModeratorActionSheet = showGuildEventModeratorActionSheet;
}
function openCreateOrEditGuildEventModal(a0, {guildEvent, channel, onClose, recurrenceId}) { // fn#70753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:460, offset: 0x01d069e9, size: 297 bytes, params: 3, frame: 22
var defaultImport2;
var defaultImport4;
const closure = function() {
importDefault(dependencyMap[11]).popWithKey(CREATE_GUILD_EVENT_MODAL_KEY);
if (onClose != null) {
onClose();
}
};
if (recurrenceId != null) {
importDefault(dependencyMap[12])(guildEvent != null, 'recurrence editing requires a guild event');
defaultImport4 = importDefault(dependencyMap[11]);
defaultImport4.pushLazy(require(dependencyMap[14])(dependencyMap[13], dependencyMap.paths),
{guildEvent: guildEvent,
recurrenceId: recurrenceId, onCloseModal: closure}, CREATE_GUILD_EVENT_MODAL_KEY);
} else {
importDefault(dependencyMap[15]).hideAllActionSheets();
defaultImport2 = importDefault(dependencyMap[11]);
defaultImport2.pushLazy(require(dependencyMap[14])(dependencyMap[16], dependencyMap.paths), {guild: a0,
targetChannel: channel, initialGuildEvent: guildEvent, onCloseModal: closure},
CREATE_GUILD_EVENT_MODAL_KEY);
}
}
function openDeleteGuildEventActionSheet(a0, a1, a2) { // fn#70756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1096, offset: 0x01d06bcf, size: 104 bytes, params: 4, frame: 16
(require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert('DeleteEventAlert',
((Component) => <Component eventId={a0} guildId={a1} recurrenceId={a2} />)(env0_4.lazy(_fun70757)));
}
function updateRsvp_70758(a0, a1, a2, a3) { // fn#70758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1269, offset: 0x01d06c64, size: 68 bytes, params: 5, frame: 20
const env0_0 = a3;
(importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */).updateRsvp(a0, a1, a2, a3,
_fun70759);
}
function handleGuildScheduledEventRsvp(a0, a1, a2, a3) { // fn#70760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1571, offset: 0x01d06d83, size: 109 bytes, params: 5, frame: 16
const env0_0 = a0;
const env0_1 = a2;
const env0_2 = a3;
const value = require(9043) /* metro dependency 9043: GuildEventRsvpUtils */;
value.handleRsvp({eventId: a0, recurrenceId: a1, guildId: a2, updateRsvp: updateRsvp_70761,
openRsvpPicker: openRsvpPicker, onRsvp: a3});
}
function _transitionToEventDetailsFromInvite_70763() { // fn#70763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1881, offset: 0x01d06e8f, size: 50 bytes, params: 1, frame: 14
return env0_3(_fun70765).apply(this, arguments);
}
function openShareEvent(a0, a1) { // fn#70768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:2806, offset: 0x01d06fe3, size: 530 bytes, params: 3, frame: 26
var defaultImport;
var open;
var object2;
var intl;
var value4;
var isGuildEventInvitable2;
var value7;
var moduleValue2;
var value;
const r3 = ChannelStore.getChannel(a0.channel_id) ?? GuildChannelStore.getDefaultChannel(a0.guild_id);
if (r3 != null) {
value4 = undefined;
isGuildEventInvitable2 = (require(9049) /* metro dependency 9049: useCanInviteForGuildEvent */).isGuildEventInvitable(a0);
if (isGuildEventInvitable2) {
value7 = GuildStore.getGuild(a0.guild_id);
if ((value7 == null ? value4 : value7.vanityURLCode) == null) {
(require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(r3,
{createInvite: isGuildEventInvitable2, guildScheduledEventId: a0.id, stackingBehavior: 'stack',
source: InstantInviteSources.GUILD_SCHEDULED_EVENT});
} else if (value7.vanityURLCode === '') {
(require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(r3,
{createInvite: isGuildEventInvitable2, guildScheduledEventId: a0.id, stackingBehavior: 'stack',
source: InstantInviteSources.GUILD_SCHEDULED_EVENT});
} else if (PermissionStore.can(Permissions.CREATE_INSTANT_INVITE, r3)) {
(require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(r3,
{createInvite: isGuildEventInvitable2, guildScheduledEventId: a0.id, stackingBehavior: 'stack',
source: InstantInviteSources.GUILD_SCHEDULED_EVENT});
} else {
moduleValue2 = require(9151) /* metro dependency 9151: InstantInviteUtils */;
moduleValue2.showVanityUrlInviteActionSheet(value7, r3, InstantInviteSources.GUILD_SCHEDULED_EVENT,
{guildScheduledEventId: a0.id, stackingBehavior: 'stack'});
function openCreateOrEditGuildEventModal(a0, {guildEvent, channel, onClose, recurrenceId}) { // fn#70753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:460, offset: 0x01d069e9, size: 297 bytes, params: 3, frame: 22
var defaultImport2;
var defaultImport4;
const closure = function() {
importDefault(dependencyMap[11]).popWithKey(CREATE_GUILD_EVENT_MODAL_KEY);
if (onClose != null) {
onClose();
}
} else if (a1 != null && a1 !== '') {
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(a1);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentLinkCopied();
};
if (recurrenceId != null) {
importDefault(dependencyMap[12])(guildEvent != null, 'recurrence editing requires a guild event');
defaultImport4 = importDefault(dependencyMap[11]);
defaultImport4.pushLazy(require(dependencyMap[14])(dependencyMap[13], dependencyMap.paths),
{guildEvent: guildEvent,
recurrenceId: recurrenceId, onCloseModal: closure}, CREATE_GUILD_EVENT_MODAL_KEY);
} else {
importDefault(dependencyMap[15]).hideAllActionSheets();
defaultImport2 = importDefault(dependencyMap[11]);
defaultImport2.pushLazy(require(dependencyMap[14])(dependencyMap[16], dependencyMap.paths), {guild: a0,
targetChannel: channel, initialGuildEvent: guildEvent, onCloseModal: closure},
CREATE_GUILD_EVENT_MODAL_KEY);
}
} else {
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport.open;
object2 = {key: 'ERROR_OCCURRED_TRY_AGAIN'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fEptJP);
object2.icon = importDefault(9149) /* metro dependency 9149 */;
Reflect.apply(open, defaultImport, [object2]);
}
}
function showGuildEventModeratorActionSheet(a0, a1, a2) { // fn#70770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:3734, offset: 0x01d071f5, size: 1962 bytes, params: 4, frame: 29
var r11;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var defaultImport;
var tidaWebformEnabled;
var moduleValue3;
var object;
const env0_0 = a0;
const env0_1 = a2;
const guild = GuildStore.getGuild(a0.guild_id);
const isInterestedInEventRecurrence2 = GuildScheduledEventStore.isInterestedInEventRecurrence(a0.id, a2);
const value3 = undefined;
const eventException = (require(9044) /* metro dependency 9044: useEventException */).getEventException(a2, a0.id);
const value5 = null;
const is_canceled = value5 == eventException ? value3 : eventException.is_canceled;
const r10 = value5 != is_canceled && is_canceled;
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(a0);
const scheduleUtilsModule = require(9039) /* metro dependency 9039: ScheduleUtils */;
const getEventTimeData = scheduleUtilsModule.getEventTimeData;
const withinStartWindow = Reflect.apply(getEventTimeData, scheduleUtilsModule,
[a0.scheduled_start_time]).withinStartWindow;
const items2 = [];
const r7 = isGuildScheduledEventActive2 || r10 ? value5 : {label: isInterestedInEventRecurrence2 ? intl.string(t['7M5gaN']) : intl.string(t.FXixvH),
onPress: onPress_70771};
if (value5 == guild) {
if (value5 != r7) {
items2.push(r7);
function openDeleteGuildEventActionSheet(a0, a1, a2) { // fn#70756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1096, offset: 0x01d06bcf, size: 104 bytes, params: 4, frame: 16
(UseAlertStoreNativeModule).openAlert('DeleteEventAlert',
((Component) => <Component eventId={a0} guildId={a1} recurrenceId={a2} />)(ReactModule.lazy(_fun70757)));
function _fun70757() { // fn#70757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1158, offset: 0x01d06c37, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__;
return require(dependencyMap[14])(dependencyMap[19], dependencyMap.paths);
}
} else if (a1) {
if (isGuildEventEnded(a0)) {
}
function updateRsvp_70758(a0, a1, a2, a3) { // fn#70758, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1269, offset: 0x01d06c64, size: 68 bytes, params: 5, frame: 20
const env0_0 = a3;
(GuildScheduledEventsActionCreators).updateRsvp(a0, a1, a2, a3,
_fun70759);
function _fun70759(a0) { // fn#70759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1327, offset: 0x01d06ca8, size: 219 bytes, params: 2, frame: 19
var r4;
var value5;
var defaultImport;
var open;
var object;
var intl;
var string;
var t;
const value = a0 != null;
if (value || importAll === GuildScheduledEventUserResponses.INTERESTED) {
value5 = environment.__proto__;
defaultImport = importDefault(dependencyMap[22]);
open = defaultImport.open;
object = {};
r4 = value ? 'ERROR_OCCURRED_TRY_AGAIN' : 'GUILD_EVENT_INTERESTED_NOTIFICATION';
object.key = r4;
intl = require(dependencyMap[23]).intl;
string = intl.string;
t = require(dependencyMap[23]).t;
r4 = value ? Reflect.apply(string, intl, [t.fEptJP]) : Reflect.apply(string, intl, [t.osvXlf]);
object.content = r4;
object.icon = importDefault(value ? dependencyMap[24] : dependencyMap[25]);
Reflect.apply(open, defaultImport, [object]);
}
}
}
function handleGuildScheduledEventRsvp(a0, a1, a2, a3) { // fn#70760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1571, offset: 0x01d06d83, size: 109 bytes, params: 5, frame: 16
const env0_0 = a0;
const env0_1 = a2;
const env0_2 = a3;
GuildEventRsvpUtilsModule.handleRsvp({eventId: a0, recurrenceId: a1, guildId: a2, updateRsvp: updateRsvp_70761,
openRsvpPicker: openRsvpPicker, onRsvp: a3});
function handleGuildScheduledEventRsvpUpdateRsvp(a0, a1, a2, a3) { // fn#70761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1686, owner: handleGuildScheduledEventRsvp.updateRsvp, offset: 0x01d06df0, size: 34 bytes, params: 5, frame: 17
updateRsvp_70758(env0_0, a1, importDefault, a3);
}
function openRsvpPicker(a0, a1) { // fn#70762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1732, owner: handleGuildScheduledEventRsvp.openRsvpPicker, offset: 0x01d06e12, size: 125 bytes, params: 3, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[15]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[14]);
value = value(dependencyMap[27], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'GuildEventRsvpPickerActionSheet', {event: a0, recurrenceId: a1,
guildId: importDefault, onRsvp: importAll}, 'stack']);
}
}
function _transitionToEventDetailsFromInvite_70763() { // fn#70763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1881, offset: 0x01d06e8f, size: 50 bytes, params: 1, frame: 14
return Module00005(_fun70765).apply(this, arguments);
function* _fun70765(a0, a1) { // fn#70765, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1974, offset: 0x01d06ecc, size: 150 bytes, params: 3, frame: 16
if (true) {
value = environment.__proto__.__proto__;
var value3 = env2_0(env2_2[32]);
yield value3.transitionToGuildFromEventInvite(a0);
if (false) {
return undefined;
}
if (!(a0.channel_id != null && env2_10(a0))) {
env2_0(env2_2[33]).openGuildEventDetails({eventId: a0.id, event: a0, recurrenceId: a1});
}
}
}
}
function openShareEvent(a0, a1) { // fn#70768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:2806, offset: 0x01d06fe3, size: 530 bytes, params: 3, frame: 26
var defaultImport;
var open;
var object;
var intl;
var value4;
var isGuildEventInvitable2;
var guildStoreBinding;
var value7;
var permissionStoreBinding;
var moduleValue2;
var value;
const r3 = ChannelStore.getChannel(a0.channel_id) ?? GuildChannelStore.getDefaultChannel(a0.guild_id);
if (r3 != null) {
value4 = undefined;
isGuildEventInvitable2 = (require(9049) /* metro dependency 9049: useCanInviteForGuildEvent */).isGuildEventInvitable(a0);
if (isGuildEventInvitable2) {
guildStoreBinding = GuildStore;
value7 = guildStoreBinding.getGuild(a0.guild_id);
if ((value7 == null ? value4 : value7.vanityURLCode) == null) {
(require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(r3,
{createInvite: isGuildEventInvitable2, guildScheduledEventId: a0.id, stackingBehavior: 'stack',
source: InstantInviteSources.GUILD_SCHEDULED_EVENT});
} else if (value7.vanityURLCode === '') {
(require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(r3,
{createInvite: isGuildEventInvitable2, guildScheduledEventId: a0.id, stackingBehavior: 'stack',
source: InstantInviteSources.GUILD_SCHEDULED_EVENT});
} else {
permissionStoreBinding = PermissionStore;
if (permissionStoreBinding.can(Permissions.CREATE_INSTANT_INVITE, r3)) {
(require(9151) /* metro dependency 9151: InstantInviteUtils */).showInstantInviteActionSheet(r3,
{createInvite: isGuildEventInvitable2, guildScheduledEventId: a0.id, stackingBehavior: 'stack',
source: InstantInviteSources.GUILD_SCHEDULED_EVENT});
} else {
moduleValue2 = require(9151) /* metro dependency 9151: InstantInviteUtils */;
moduleValue2.showVanityUrlInviteActionSheet(value7, r3, InstantInviteSources.GUILD_SCHEDULED_EVENT,
{guildScheduledEventId: a0.id, stackingBehavior: 'stack'});
}
}
} else if (a1 != null && a1 !== '') {
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(a1);
value = require(3856) /* metro dependency 3856: ToastUtils */;
value.presentLinkCopied();
}
} else {
defaultImport = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
open = defaultImport.open;
object = {key: 'ERROR_OCCURRED_TRY_AGAIN'};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fEptJP);
object.icon = importDefault(9149) /* metro dependency 9149 */;
Reflect.apply(open, defaultImport, [object]);
}
}
function showGuildEventModeratorActionSheet(a0, a1, a2) { // fn#70770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:3734, offset: 0x01d071f5, size: 1962 bytes, params: 4, frame: 29
var r11;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var defaultImport;
var tidaWebformEnabled;
var moduleValue3;
var object2;
const env0_0 = a0;
const env0_1 = a2;
const guild = GuildStore.getGuild(a0.guild_id);
const guildScheduledEventStoreBinding = GuildScheduledEventStore;
const isInterestedInEventRecurrence2 = guildScheduledEventStoreBinding.isInterestedInEventRecurrence(a0.id, a2);
const value3 = undefined;
const eventException = (UseEventExceptionModule).getEventException(a2, a0.id);
const value5 = null;
const is_canceled = value5 == eventException ? value3 : eventException.is_canceled;
const r10 = value5 != is_canceled && is_canceled;
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(a0);
const getEventTimeData = ScheduleUtilsModule.getEventTimeData;
const withinStartWindow = Reflect.apply(getEventTimeData, ScheduleUtilsModule,
[a0.scheduled_start_time]).withinStartWindow;
const items2 = [];
const r7 = isGuildScheduledEventActive2 || r10 ? value5 : {label: isInterestedInEventRecurrence2 ? intl.string(t['7M5gaN']) : intl.string(t.FXixvH),
onPress: onPress_70771};
if (value5 == guild) {
if (value5 != r7) {
items2.push(r7);
}
} else {
if (!isGuildScheduledEventActive2) {
if (withinStartWindow) {
if (isInterestedInEventRecurrence2) {
if (!r10) {
items2.push({label: intl.string(t.cK1GGY), onPress: onPress_70772});
}
} else if (value5 != r7) {
items2.push(r7);
}
} else if (!r10) {
items2.push({label: intl.string(t.cK1GGY), onPress: onPress_70772});
} else if (a1) {
if (isGuildEventEnded(a0)) {
if (value5 != r7) {
items2.push(r7);
}
}
r11 = !isGuildScheduledEventActive2 && withinStartWindow;
r11 = r11 && !isInterestedInEventRecurrence2;
r11 = !r11 ? value5 == r7 : r11;
if (!r11) {
items2.push(r7);
}
r11 = value5 == a2 || r10;
if (!r11) {
items2.push({label: intl.string(t.wmVmXN), onPress: onPress_70773});
}
if (!r10) {
items2.push({label: value5 != a2 ? intl.string(t.BW1Qoh) : intl.string(t.Rgy2dU),
onPress: onPress_70774});
}
if (isGuildScheduledEventActive2) {
items2.push({label: intl.string(t.qaYzPA), isDestructive: true, onPress: onPress_70775});
} else {
if (value5 != a2) {
if (value5 == eventException) {
items2.push({label: intl.string(t.tqClly), isDestructive: true, onPress: onPress_70777});
} else if (eventException.is_canceled) {
items2.push({label: intl.string(t.b8606G), onPress: onPress_70776});
} else {
items2.push({label: intl.string(t.tqClly), isDestructive: true, onPress: onPress_70777});
if (!isGuildScheduledEventActive2) {
if (withinStartWindow) {
if (isInterestedInEventRecurrence2) {
if (!r10) {
items2.push({label: intl.string(t.cK1GGY), onPress: onPress_70772});
}
} else if (value5 != r7) {
items2.push(r7);
}
} else if (!r10) {
items2.push({label: intl.string(t.cK1GGY), onPress: onPress_70772});
}
}
items2.push({label: value5 != a0.recurrence_rule ? intl.string(t.wr33rW) : intl.string(t.B9sJLX),
isDestructive: true, onPress: onPress_70778});
r11 = !isGuildScheduledEventActive2 && withinStartWindow;
r11 = r11 && !isInterestedInEventRecurrence2;
r11 = !r11 ? value5 == r7 : r11;
if (!r11) {
items2.push(r7);
}
r11 = value5 == a2 || r10;
if (!r11) {
items2.push({label: intl.string(t.wmVmXN), onPress: onPress_70773});
}
if (!r10) {
items2.push({label: value5 != a2 ? intl.string(t.BW1Qoh) : intl.string(t.Rgy2dU),
onPress: onPress_70774});
}
if (isGuildScheduledEventActive2) {
items2.push({label: intl.string(t.qaYzPA), isDestructive: true, onPress: onPress_70775});
} else {
if (value5 != a2) {
if (value5 == eventException) {
items2.push({label: intl.string(t.tqClly), isDestructive: true, onPress: onPress_70777});
} else if (eventException.is_canceled) {
items2.push({label: intl.string(t.b8606G), onPress: onPress_70776});
} else {
items2.push({label: intl.string(t.tqClly), isDestructive: true, onPress: onPress_70777});
}
}
items2.push({label: value5 != a0.recurrence_rule ? intl.string(t.wr33rW) : intl.string(t.B9sJLX),
isDestructive: true, onPress: onPress_70778});
}
}
} else if (value5 != r7) {
items2.push(r7);
}
let push = items2.push;
const string = intl.string;
const IBA5wX = t.IBA5wX;
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [IBA5wX]), isDestructive: true,
onPress: onPress_70779}]);
items2.push({label: value5 != a0.recurrence_rule ? intl.string(t.AYnhB7) : intl.string(t['9o+VKx']),
onPress: onPress_70780});
if (value5 != a2) {
items2.push({label: intl.string(t.QLtDqP), onPress: onPress_70781});
}
const DeveloperMode = (UserSettingsModule).DeveloperMode;
const getSetting = DeveloperMode.getSetting;
if (Reflect.apply(getSetting, DeveloperMode, [])) {
items2.push({label: intl.string(t.WZwPO4), onPress: onPress_70782});
if (value5 != a2) {
items2.push({label: intl.string(t.NZRGQo), onPress: onPress_70783});
}
defaultImport = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
tidaWebformEnabled = defaultImport.getCurrentConfig({location: 'showGuildEventModeratorActionSheet'}).tidaWebformEnabled;
moduleValue3 = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
if (tidaWebformEnabled && value5 != (importDefault(9215) /* metro dependency 9215: getGuildEventImage */)(a0,
moduleValue3.getWindowDimensions().width)) {
push = items2.push;
object2 = {};
object2.label = intl.string(t['8xHmxo']);
object2.onPress = onPress_70784;
Reflect.apply(push, items2, [object2]);
}
}
} else if (value5 != r7) {
items2.push(r7);
}
let push = items2.push;
const string = intl.string;
const IBA5wX = t.IBA5wX;
Reflect.apply(push, items2, [{label: Reflect.apply(string, intl, [IBA5wX]), isDestructive: true,
onPress: onPress_70779}]);
items2.push({label: value5 != a0.recurrence_rule ? intl.string(t.AYnhB7) : intl.string(t['9o+VKx']),
onPress: onPress_70780});
if (value5 != a2) {
items2.push({label: intl.string(t.QLtDqP), onPress: onPress_70781});
}
const DeveloperMode = (require(3829) /* metro dependency 3829: UserSettings */).DeveloperMode;
const getSetting = DeveloperMode.getSetting;
if (Reflect.apply(getSetting, DeveloperMode, [])) {
items2.push({label: intl.string(t.WZwPO4), onPress: onPress_70782});
if (value5 != a2) {
items2.push({label: intl.string(t.NZRGQo), onPress: onPress_70783});
(ShowSimpleActionSheetModule).showSimpleActionSheet({'key': 'GuildEvent',
'stackingBehavior': 'stack', 'options': null, 'hasIcons': false, options: items2});
return value3;
function showGuildEventModeratorActionSheetOnPress() { // fn#70771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4129, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d0799f, size: 38 bytes, params: 1, frame: 15
handleGuildScheduledEventRsvp(env0_0.id, importDefault, guild_id);
}
defaultImport = importDefault(6796) /* metro dependency 6796: TidaWebformExperiment */;
tidaWebformEnabled = defaultImport.getCurrentConfig({location: 'showGuildEventModeratorActionSheet'}).tidaWebformEnabled;
moduleValue3 = require(1478) /* metro dependency 1478: useWindowDimensionsNative */;
if (tidaWebformEnabled && value5 != (importDefault(9215) /* metro dependency 9215: getGuildEventImage */)(a0,
moduleValue3.getWindowDimensions().width)) {
push = items2.push;
object = {};
object.label = intl.string(t['8xHmxo']);
object.onPress = onPress_70784;
Reflect.apply(push, items2, [object]);
function showGuildEventModeratorActionSheetOnPress_70772() { // fn#70772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4289, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d079c5, size: 28 bytes, params: 1, frame: 13
openStartGuildEventModal(env0_0, importDefault);
}
}
(require(6802) /* metro dependency 6802: showSimpleActionSheet */).showSimpleActionSheet({'key': 'GuildEvent',
'stackingBehavior': 'stack', 'options': null, 'hasIcons': false, options: items2});
return value3;
}
function _fun70757() { // fn#70757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1158, offset: 0x01d06c37, size: 45 bytes, params: 1, frame: 13
const value = environment.__proto__;
return require(dependencyMap[14])(dependencyMap[19], dependencyMap.paths);
}
function _fun70759(a0) { // fn#70759, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1327, offset: 0x01d06ca8, size: 219 bytes, params: 2, frame: 19
var r4;
var value5;
var defaultImport;
var open;
var object2;
var intl;
var string;
var t;
const value = a0 != null;
if (value || importAll === GuildScheduledEventUserResponses.INTERESTED) {
value5 = environment.__proto__;
defaultImport = importDefault(dependencyMap[22]);
open = defaultImport.open;
object2 = {};
r4 = value ? 'ERROR_OCCURRED_TRY_AGAIN' : 'GUILD_EVENT_INTERESTED_NOTIFICATION';
object2.key = r4;
intl = require(dependencyMap[23]).intl;
string = intl.string;
t = require(dependencyMap[23]).t;
r4 = value ? Reflect.apply(string, intl, [t.fEptJP]) : Reflect.apply(string, intl, [t.osvXlf]);
object2.content = r4;
object2.icon = importDefault(value ? dependencyMap[24] : dependencyMap[25]);
Reflect.apply(open, defaultImport, [object2]);
}
}
function handleGuildScheduledEventRsvpUpdateRsvp(a0, a1, a2, a3) { // fn#70761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1686, owner: handleGuildScheduledEventRsvp.updateRsvp, offset: 0x01d06df0, size: 34 bytes, params: 5, frame: 17
updateRsvp_70758(env0_0, a1, importDefault, a3);
}
function openRsvpPicker(a0, a1) { // fn#70762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1732, owner: handleGuildScheduledEventRsvp.openRsvpPicker, offset: 0x01d06e12, size: 125 bytes, params: 3, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[15]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[14]);
value = value(dependencyMap[27], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'GuildEventRsvpPickerActionSheet', {event: a0, recurrenceId: a1,
guildId: importDefault, onRsvp: importAll}, 'stack']);
}
function* _fun70765(a0, a1) { // fn#70765, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:1974, offset: 0x01d06ecc, size: 150 bytes, params: 3, frame: 16
if (true) {
value = environment.__proto__.__proto__;
var value3 = env2_0(env2_2[32]);
yield value3.transitionToGuildFromEventInvite(a0);
if (false) {
return undefined;
function showGuildEventModeratorActionSheetOnPress_70773() { // fn#70773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4429, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d079e1, size: 44 bytes, params: 1, frame: 14
openCreateOrEditGuildEventModal(Module00005, {guildEvent: env0_0, recurrenceId: importDefault});
}
if (!(a0.channel_id != null && env2_10(a0))) {
env2_0(env2_2[33]).openGuildEventDetails({eventId: a0.id, event: a0, recurrenceId: a1});
function showGuildEventModeratorActionSheetOnPress_70774() { // fn#70774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4612, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07a0d, size: 35 bytes, params: 1, frame: 13
openCreateOrEditGuildEventModal(Module00005, {guildEvent: env0_0});
}
function showGuildEventModeratorActionSheetOnPress_70775() { // fn#70775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4748, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07a30, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
const endEvent = value.endEvent;
const binding = env0_0;
Reflect.apply(endEvent, value, [binding.id, binding.guild_id]);
}
function showGuildEventModeratorActionSheetOnPress_70776() { // fn#70776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4884, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07a68, size: 62 bytes, params: 1, frame: 17
const value = environment.__proto__;
(RestoreEventRecurrence)(ReactModule, Module00005.id, env0_0.id,
importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70777() { // fn#70777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4992, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07aa6, size: 39 bytes, params: 1, frame: 15
const openDeleteGuildEventActionSheetBinding = openDeleteGuildEventActionSheet;
const binding = env0_0;
openDeleteGuildEventActionSheetBinding(binding.id, binding.guild_id, importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70778() { // fn#70778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5192, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07acd, size: 35 bytes, params: 1, frame: 14
const openDeleteGuildEventActionSheetBinding = openDeleteGuildEventActionSheet;
const binding = env0_0;
openDeleteGuildEventActionSheetBinding(binding.id, binding.guild_id, undefined);
}
function showGuildEventModeratorActionSheetOnPress_70779() { // fn#70779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5353, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07af0, size: 71 bytes, params: 1, frame: 13
const value = environment.__proto__;
(ActionSheetActionCreators).hideAllActionSheets();
(ReportModalsModule).showReportModalForGuildScheduledEvent(env0_0);
}
function showGuildEventModeratorActionSheetOnPress_70780() { // fn#70780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5568, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07b37, size: 130 bytes, params: 1, frame: 22
const value = environment.__proto__;
const copy = ClipboardUtilsNativeModule.copy;
const protocol = global.location.protocol;
const host = global.location.host;
const GUILD_EVENT_DETAILS = Routes.GUILD_EVENT_DETAILS;
Reflect.apply(copy, ClipboardUtilsNativeModule, ['' + protocol + '//' + host + Reflect.apply(GUILD_EVENT_DETAILS,
Routes, [guild_id, env0_0.id, null])]);
}
function showGuildEventModeratorActionSheetOnPress_70781() { // fn#70781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5737, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07bb9, size: 132 bytes, params: 1, frame: 22
const value = environment.__proto__;
const copy = ClipboardUtilsNativeModule.copy;
const protocol = global.location.protocol;
const host = global.location.host;
const GUILD_EVENT_DETAILS = Routes.GUILD_EVENT_DETAILS;
Reflect.apply(copy, ClipboardUtilsNativeModule, ['' + protocol + '//' + host + Reflect.apply(GUILD_EVENT_DETAILS,
Routes, [guild_id, env0_0.id, importDefault])]);
}
function showGuildEventModeratorActionSheetOnPress_70782() { // fn#70782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5931, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07c3d, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(env0_0.id);
}
function showGuildEventModeratorActionSheetOnPress_70783() { // fn#70783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:6027, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07c6f, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(ClipboardUtilsNativeModule).copy(importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70784() { // fn#70784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:6281, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07c9c, size: 67 bytes, params: 1, frame: 14
const value = environment.__proto__;
(ClipboardUtilsNativeModule).copy(env0_5);
(ToastUtilsModule).presentCopiedToClipboard();
}
}
}
function showGuildEventModeratorActionSheetOnPress() { // fn#70771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4129, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d0799f, size: 38 bytes, params: 1, frame: 15
handleGuildScheduledEventRsvp(env0_0.id, importDefault, guild_id);
}
function showGuildEventModeratorActionSheetOnPress_70772() { // fn#70772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4289, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d079c5, size: 28 bytes, params: 1, frame: 13
openStartGuildEventModal(env0_0, importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70773() { // fn#70773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4429, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d079e1, size: 44 bytes, params: 1, frame: 14
openCreateOrEditGuildEventModal(env0_3, {guildEvent: env0_0, recurrenceId: importDefault});
}
function showGuildEventModeratorActionSheetOnPress_70774() { // fn#70774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4612, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07a0d, size: 35 bytes, params: 1, frame: 13
openCreateOrEditGuildEventModal(env0_3, {guildEvent: env0_0});
}
function showGuildEventModeratorActionSheetOnPress_70775() { // fn#70775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4748, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07a30, size: 56 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
const endEvent = value.endEvent;
const binding = env0_0;
Reflect.apply(endEvent, value, [binding.id, binding.guild_id]);
}
function showGuildEventModeratorActionSheetOnPress_70776() { // fn#70776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4884, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07a68, size: 62 bytes, params: 1, frame: 17
const value = environment.__proto__;
(importDefault(9214) /* metro dependency 9214: restoreEventRecurrence */)(env0_4, env0_3.id, env0_0.id,
importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70777() { // fn#70777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:4992, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07aa6, size: 39 bytes, params: 1, frame: 15
const openDeleteGuildEventActionSheetBinding = openDeleteGuildEventActionSheet;
const binding = env0_0;
openDeleteGuildEventActionSheetBinding(binding.id, binding.guild_id, importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70778() { // fn#70778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5192, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07acd, size: 35 bytes, params: 1, frame: 14
const openDeleteGuildEventActionSheetBinding = openDeleteGuildEventActionSheet;
const binding = env0_0;
openDeleteGuildEventActionSheetBinding(binding.id, binding.guild_id, undefined);
}
function showGuildEventModeratorActionSheetOnPress_70779() { // fn#70779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5353, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07af0, size: 71 bytes, params: 1, frame: 13
const value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideAllActionSheets();
(require(8153) /* metro dependency 8153: ReportModals */).showReportModalForGuildScheduledEvent(env0_0);
}
function showGuildEventModeratorActionSheetOnPress_70780() { // fn#70780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5568, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07b37, size: 130 bytes, params: 1, frame: 22
const value = environment.__proto__;
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = clipboardUtilsNativeModule.copy;
const protocol = global.location.protocol;
const host = global.location.host;
const GUILD_EVENT_DETAILS = Routes.GUILD_EVENT_DETAILS;
Reflect.apply(copy, clipboardUtilsNativeModule, ['' + protocol + '//' + host + Reflect.apply(GUILD_EVENT_DETAILS,
Routes, [guild_id, env0_0.id, null])]);
}
function showGuildEventModeratorActionSheetOnPress_70781() { // fn#70781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5737, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07bb9, size: 132 bytes, params: 1, frame: 22
const value = environment.__proto__;
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
const copy = clipboardUtilsNativeModule.copy;
const protocol = global.location.protocol;
const host = global.location.host;
const GUILD_EVENT_DETAILS = Routes.GUILD_EVENT_DETAILS;
Reflect.apply(copy, clipboardUtilsNativeModule, ['' + protocol + '//' + host + Reflect.apply(GUILD_EVENT_DETAILS,
Routes, [guild_id, env0_0.id, importDefault])]);
}
function showGuildEventModeratorActionSheetOnPress_70782() { // fn#70782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:5931, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07c3d, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
value.copy(env0_0.id);
}
function showGuildEventModeratorActionSheetOnPress_70783() { // fn#70783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:6027, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07c6f, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(importDefault);
}
function showGuildEventModeratorActionSheetOnPress_70784() { // fn#70784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9237:6281, owner: showGuildEventModeratorActionSheet.onPress, offset: 0x01d07c9c, size: 67 bytes, params: 1, frame: 14
const value = environment.__proto__;
(require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_5);
(require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard();
}
global.__d(_fun70752, 9052, [5, 31, 1379, 1935, 1867, 3784, 4117, 1385, 9033, 661, 33, 5080, 44, 9053, 1962, 4080,
9074, 9125, 9140, 9148, 4497, 9037, 3857, 1244, 9149, 9132, 9043, 9150, 9049, 6797, 3856, 9151, 8879, 9032,
9044, 9039, 9214, 8153, 3829, 6796, 1478, 9215, 6802,
2]) /* metro module 9052, dependencies: [5, 31, 1379, 1935, 1867, 3784, 4117, 1385, 9033, 661, 33, 5080, 44, 9053, 1962, 4080, 9074, 9125, 9140, 9148, 4497, 9037, 3857, 1244, 9149, 9132, 9043, 9150, 9049, 6797, 3856, 9151, 8879, 9032, 9044, 9039, 9214, 8153, 3829, 6796, 1478, 9215, 6802, 2] */;
@@ -1,67 +1,95 @@
/* Metro module 9148; source: modules/guild_scheduled_events/native/components/DeleteEventAlert.tsx; dependencies: [5, 31, 4117, 33, 4501, 566, 9037, 4080, 4500, 1244, 4573, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import GuildScheduledEventStore from '../../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as AlertModalNativeModule from '../../../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun71668(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:6, offset: 0x01d28edc, size: 213 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
importAll(31) /* metro dependency 31 */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({contentText: {textAlign: 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/DeleteEventAlert.tsx');
ReactModule;
const env0_6 = (CreateStylesModule).createStyles({contentText: {textAlign: 'center'}});
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/DeleteEventAlert.tsx');
exports.default = DeleteEventAlert;
}
function DeleteEventAlert({eventId, guildId, recurrenceId, eventException}) { // fn#71669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:313, offset: 0x01d28fb1, size: 751 bytes, params: 2, frame: 29
var object2;
const styles = useStyles();
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value4 = Reflect.apply(useStateFromStores, fluxModule, [[GuildScheduledEventStore], function() {
return GuildScheduledEventStore.getGuildScheduledEvent(eventId);
}])?.recurrence_rule != null;
const value5 = recurrenceId != null;
const AlertModal = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertModal;
object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object2.title = value5 ? Reflect.apply(string, intl, [t.tqClly]) : value4 ? Reflect.apply(string, intl,
[t.wr33rW]) : Reflect.apply(string, intl, [t.B9sJLX]);
object2.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.v2GWNQ);
object2.extraContent = value4 ? value5 ? null : ((Text) => <Text variant="text-md/medium" color="text-default" style={styles.contentText}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ZcpcyO,
{})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null;
const AlertActionButton = (require(4500) /* metro dependency 4500: AlertModalNative */).AlertActionButton;
const items2 = [<AlertActionButton variant="destructive" onPress={function() {
return _handleConfirmClick.apply(this, arguments);
}} text={value4 ? value5 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B9sJLX) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8ZsNv5']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B9sJLX)} key="delete" />];
items2[1] = <AlertActionButton variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oEAioF)} key="cancel" />;
object2.actions = items2;
return <AlertModal {...object2} />;
}
function _handleConfirmClick() { // fn#71670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:525, owner: DeleteEventAlert._handleConfirmClick, offset: 0x01d292a0, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun71672).apply(this, arguments);
}
function* _fun71672() { // fn#71672, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:586, offset: 0x01d292e0, size: 156 bytes, params: 1, frame: 20
if (true) {
value = environment.__proto__.__proto__;
var value4 = env3_1(env3_2[6]);
if (GuildScheduledEventStore) {
yield value4.deleteRecurrence(importDefault, require, dependencyMap, env2_3);
if (false) {
return undefined;
}
} else {
yield value4.deleteGuildEvent(require, importDefault);
if (false) {
return undefined;
function DeleteEventAlert({eventId, guildId, recurrenceId, eventException}) { // fn#71669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:313, offset: 0x01d28fb1, size: 751 bytes, params: 2, frame: 29
const styles = useStyles();
const useStateFromStores = FluxModule.useStateFromStores;
const value4 = Reflect.apply(useStateFromStores, FluxModule, [[GuildScheduledEventStore], function() {
return GuildScheduledEventStore.getGuildScheduledEvent(eventId);
}])?.recurrence_rule != null;
const value5 = recurrenceId != null;
const AlertModal = (AlertModalNativeModule).AlertModal;
object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object.title = value5 ? Reflect.apply(string, intl, [t.tqClly]) : value4 ? Reflect.apply(string, intl,
[t.wr33rW]) : Reflect.apply(string, intl, [t.B9sJLX]);
object.content = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.v2GWNQ);
object.extraContent = (
value4
? (
value5
? null
: ((Text) => <Text variant="text-md/medium" color="text-default" style={styles.contentText}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.ZcpcyO,
{})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
)
: null
);
const AlertActionButton = (AlertModalNativeModule).AlertActionButton;
const items2 = [
<AlertActionButton
variant="destructive"
onPress={function() {
return _handleConfirmClick.apply(this, arguments);
}}
text={value4 ? value5 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B9sJLX) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8ZsNv5']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.B9sJLX)}
key="delete"
/>,
];
items2[1] = (
<AlertActionButton
variant="secondary"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.oEAioF)}
key="cancel"
/>
);
object.actions = items2;
return <AlertModal {...object} />;
function _handleConfirmClick() { // fn#71670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:525, owner: DeleteEventAlert._handleConfirmClick, offset: 0x01d292a0, size: 53 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
return env1_3(_fun71672).apply(this, arguments);
function* _fun71672() { // fn#71672, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9333:586, offset: 0x01d292e0, size: 156 bytes, params: 1, frame: 20
if (true) {
value = environment.__proto__.__proto__;
var guildScheduledEventStoreBinding = GuildScheduledEventStore;
var value4 = env3_1(env3_2[6]);
if (guildScheduledEventStoreBinding) {
yield value4.deleteRecurrence(importDefault, require, dependencyMap, env2_3);
if (false) {
return undefined;
}
} else {
yield value4.deleteGuildEvent(require, importDefault);
if (false) {
return undefined;
}
}
env3_1(env3_2[7]).hideActionSheet();
}
}
}
env3_1(env3_2[7]).hideActionSheet();
}
}
global.__d(_fun71668, 9148, [5, 31, 4117, 33, 4501, 566, 9037, 4080, 4500, 1244, 4573,
2]) /* metro module 9148, dependencies: [5, 31, 4117, 33, 4501, 566, 9037, 4080, 4500, 1244, 4573, 2] */;
@@ -1,15 +1,30 @@
/* Metro module 9079; source: modules/guild_scheduled_events/native/components/EditGuildEventChannelSelection.tsx; dependencies: [31, 27, 3784, 3793, 1878, 4117, 661, 33, 4501, 697, 6992, 9075, 9061, 4805, 566, 6647, 9063, 9064, 1244, 4573, 5278, 1848, 9080, 9052, 4080, 9059, 1962, 1305, 9060, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import RelationshipStore from '../../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import GuildScheduledEventStore from '../../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import UseChannelName from '../../../channel/useChannelName.tsx'; /* Metro dependency 4805 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as InputFieldContainerNativeModule from '../../../../design/components/Input/native/InputFieldContainer.native.tsx'; /* Metro dependency 6992 */
import * as GuildScheduledEventModalActionCreatorsModule from '../GuildScheduledEventModalActionCreators.tsx'; /* Metro dependency 9052 */
import * as UseGuildsUserCanStartStageInModule from '../../useGuildsUserCanStartStageIn.tsx'; /* Metro dependency 9061 */
import * as UseGetEventChannelsByTypeModule from '../../useGetEventChannelsByType.tsx'; /* Metro dependency 9075 */
function _fun70949(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:6, offset: 0x01d0e493, size: 398 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_9 = value.ChannelTypes;
const env0_10 = value.Permissions;
value = require(33) /* metro dependency 33 */;
@@ -17,110 +32,147 @@ function _fun70949(global, require, importDefault, importAll, module, exports, d
const env0_12 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
const REDESIGN_BUTTON_TERTIARY_BACKGROUND = (Native).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND;
const env0_13 = Reflect.apply(createStyles, value, [{container: {flexDirection: 'column'},
channelSelectorButton: {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between',
backgroundColor: REDESIGN_BUTTON_TERTIARY_BACKGROUND}, channelIcon: {marginRight: 8},
channelTypeText: {'flex': 1, 'marginBottom': 8}, channelNameText: {flex: 1}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventChannelSelection.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventChannelSelection.tsx');
exports.default = EditGuildEventChannelSelection;
}
function EditGuildEventChannelSelection({guild, channelType, channel, guildEventId, recurrenceId, onChangeChannel, style}) { // fn#70950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:673, offset: 0x01d0e621, size: 993 bytes, params: 2, frame: 31
const Icon = (NativeModule).Icon;
const styles = useStyles();
const value3 = (InputFieldContainerNativeModule).useInputStyles({hasLeadingIcon: true});
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
const value4 = channelType === GUILD_STAGE_VOICE;
const env0_6 = (UseGetEventChannelsByTypeModule).useGetEventChannelsByType(guild.id,
channelType);
const env0_7 = (UseGuildsUserCanStartStageInModule).useChannelsUserCanStartStageIn(guild);
const value5 = (UseChannelName)(channel);
const env0_8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var permissionStoreBinding = PermissionStore;
var MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
return permissionStoreBinding.can(MANAGE_CHANNELS, guild);
});
const env0_9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getGuildScheduledEvent(guildEventId);
}, [guildEventId]);
const r13 = channel != null ? (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel) : importDefault(9063) /* metro dependency 9063 */;
const r12 = channel != null ? (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponent(channel) : (require(9064) /* metro dependency 9064: LocationIcon */).LocationIcon;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const t = (IndexNativeModule).t;
const r17 = value4 ? Reflect.apply(string, intl, [t.S7GjDz]) : Reflect.apply(string, intl, [t['7RYWCP']]);
const items2 = [styles.container, style];
const Text = (TextModule).Text;
const text = (
<Text
style={styles.channelTypeText}
variant="text-sm/semibold"
color="text-subtle"
>
{r17}
</Text>
);
const PressableOpacity = (PressablesModule).PressableOpacity;
const object2 = {accessibilityLabel: r17};
string = intl.string;
const AaXbMD = (IndexNativeModule).t.AaXbMD;
object2.accessibilityHint = Reflect.apply(string, intl, [AaXbMD]);
object2.accessibilityValue = {text: value5 ?? undefined};
object2.accessibilityRole = 'button';
object2.style = [value3.padding, value3.radius, styles.channelSelectorButton];
object2.onPress = onPress_70953;
const items5 = [
r12 != null
? ((Component) => <Component style={styles.channelIcon} />)(r12)
: (
<Icon source={r13} style={styles.channelIcon} />
),
];
items5[1] = (
<Text
style={styles.channelNameText}
variant="text-md/medium"
color="interactive-text-active"
>
{value5}
</Text>
);
items5[2] = <Icon source={importDefault(9060) /* metro dependency 9060 */} />;
return (
<View style={items2}>
{text}
<PressableOpacity {...object2}>
{items5}
</PressableOpacity>
</View>
);
function EditGuildEventChannelSelectionOnPress() { // fn#70953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:1715, owner: EditGuildEventChannelSelection.onPress, offset: 0x01d0ea43, size: 369 bytes, params: 1, frame: 26
var environment;
const value = environment.__proto__;
const value2 = undefined;
importAll(dependencyMap[21]).dismissGlobalKeyboard();
const value4 = env0_6.map(function(a0) {
var object = {value: a0.id};
object.label = require(dependencyMap[13]).computeChannelName(a0, UserStore, RelationshipStore, true);
return object;
});
const length = env0_7.length;
const value5 = null;
const r8 = (
length !== 0
? value5
: (
env0_8
? ((Component) => <Component guildId={guild.id} onCreate={onCreate_70955} />)(importDefault(dependencyMap[22]))
: value5
)
);
const defaultImport2 = importDefault(dependencyMap[24]);
const openLazy = defaultImport2.openLazy;
const value7 = require(dependencyMap[26])(dependencyMap[25], dependencyMap.paths);
const resultBinding = result;
const intl = require(dependencyMap[18]).intl;
const string = intl.string;
const t = require(dependencyMap[18]).t;
const id = value5 == channel ? value2 : channel.id;
Reflect.apply(openLazy, defaultImport2, [value7, 'SelectUpdatesChannel',
{title: resultBinding ? Reflect.apply(string, intl, [t.S7GjDz]) : Reflect.apply(string, intl, [t['7RYWCP']]),
items: value4, body: r8, onItemSelect: onItemSelect_70956, selectedItem: value5 != id ? id : value2,
hasIcons: false}]);
return value2;
function onPressOnCreate(a0) { // fn#70955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:1894, owner: EditGuildEventChannelSelection.onPress.onCreate, offset: 0x01d0ebfb, size: 88 bytes, params: 2, frame: 17
let value = environment.__proto__.__proto__;
value = undefined;
GuildScheduledEventModalActionCreatorsModule.openCreateOrEditGuildEventModal(guild, {channel: a0,
guildEvent: env1_9 ?? value, recurrenceId: recurrenceId});
return value;
}
function EditGuildEventChannelSelection({guild, channelType, channel, guildEventId, recurrenceId, onChangeChannel, style}) { // fn#70950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:673, offset: 0x01d0e621, size: 993 bytes, params: 2, frame: 31
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const styles = useStyles();
const value3 = (require(6992) /* metro dependency 6992: InputFieldContainerNative */).useInputStyles({hasLeadingIcon: true});
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
const value4 = channelType === GUILD_STAGE_VOICE;
const env0_6 = (require(9075) /* metro dependency 9075: useGetEventChannelsByType */).useGetEventChannelsByType(guild.id,
channelType);
const env0_7 = (require(9061) /* metro dependency 9061: useGuildsUserCanStartStageIn */).useChannelsUserCanStartStageIn(guild);
const value5 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel);
const env0_8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var MANAGE_CHANNELS = Permissions.MANAGE_CHANNELS;
return PermissionStore.can(MANAGE_CHANNELS, guild);
});
const env0_9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getGuildScheduledEvent(guildEventId);
}, [guildEventId]);
const r13 = channel != null ? (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel) : importDefault(9063) /* metro dependency 9063 */;
const r12 = channel != null ? (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponent(channel) : (require(9064) /* metro dependency 9064: LocationIcon */).LocationIcon;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r17 = value4 ? Reflect.apply(string, intl, [t.S7GjDz]) : Reflect.apply(string, intl, [t['7RYWCP']]);
const items2 = [styles.container, style];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text style={styles.channelTypeText} variant="text-sm/semibold" color="text-subtle">{r17}</Text>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const object = {accessibilityLabel: r17};
string = intl.string;
const AaXbMD = (require(1244) /* metro dependency 1244: indexNative */).t.AaXbMD;
object.accessibilityHint = Reflect.apply(string, intl, [AaXbMD]);
object.accessibilityValue = {text: value5 ?? undefined};
object.accessibilityRole = 'button';
object.style = [value3.padding, value3.radius, styles.channelSelectorButton];
object.onPress = onPress_70953;
const items5 = [r12 != null ? ((Component) => <Component style={styles.channelIcon} />)(r12) : <Icon source={r13} style={styles.channelIcon} />];
items5[1] = <Text style={styles.channelNameText} variant="text-md/medium" color="interactive-text-active">{value5}</Text>;
items5[2] = <Icon source={importDefault(9060) /* metro dependency 9060 */} />;
return (
<View style={items2}>
{text}
<PressableOpacity {...object}>
{items5}
</PressableOpacity>
</View>
);
}
function onPressOnItemSelect(a0) { // fn#70956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:2190, owner: EditGuildEventChannelSelection.onPress.onItemSelect, offset: 0x01d0ec53, size: 88 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const value2 = env1_6.find(_fun70957);
if (value2 != null) {
onChangeChannel(value2);
}
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
function _fun70957({id}) { // fn#70957, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:2208, offset: 0x00db0c48, size: 21 bytes, params: 2, frame: 2
return id === env0_0;
}
function EditGuildEventChannelSelectionOnPress() { // fn#70953, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:1715, owner: EditGuildEventChannelSelection.onPress, offset: 0x01d0ea43, size: 369 bytes, params: 1, frame: 26
var environment;
const value = environment.__proto__;
const value2 = undefined;
importAll(dependencyMap[21]).dismissGlobalKeyboard();
const value4 = env0_6.map(function(a0) {
var object = {value: a0.id};
object.label = require(dependencyMap[13]).computeChannelName(a0, UserStore, RelationshipStore, true);
return object;
});
const length = env0_7.length;
const value5 = null;
const r8 = length !== 0 ? value5 : env0_8 ? ((Component) => <Component guildId={guild.id} onCreate={onCreate_70955} />)(importDefault(dependencyMap[22])) : value5;
const defaultImport2 = importDefault(dependencyMap[24]);
const openLazy = defaultImport2.openLazy;
const value7 = require(dependencyMap[26])(dependencyMap[25], dependencyMap.paths);
const resultBinding = result;
const intl = require(dependencyMap[18]).intl;
const string = intl.string;
const t = require(dependencyMap[18]).t;
const id = value5 == channel ? value2 : channel.id;
Reflect.apply(openLazy, defaultImport2, [value7, 'SelectUpdatesChannel',
{title: resultBinding ? Reflect.apply(string, intl, [t.S7GjDz]) : Reflect.apply(string, intl, [t['7RYWCP']]),
items: value4, body: r8, onItemSelect: onItemSelect_70956, selectedItem: value5 != id ? id : value2,
hasIcons: false}]);
return value2;
}
}
function onPressOnCreate(a0) { // fn#70955, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:1894, owner: EditGuildEventChannelSelection.onPress.onCreate, offset: 0x01d0ebfb, size: 88 bytes, params: 2, frame: 17
let value = environment.__proto__.__proto__;
value = undefined;
const guildScheduledEventModalActionCreatorsModule = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
guildScheduledEventModalActionCreatorsModule.openCreateOrEditGuildEventModal(guild, {channel: a0,
guildEvent: env1_9 ?? value, recurrenceId: recurrenceId});
return value;
}
}
function onPressOnItemSelect_70956(a0) { // fn#70956, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9264:2190, owner: EditGuildEventChannelSelection.onPress.onItemSelect, offset: 0x01d0ec53, size: 88 bytes, params: 2, frame: 12
var environment;
const env0_0 = a0;
let value = environment.__proto__;
const value2 = env1_6.find(_fun70957);
if (value2 != null) {
onChangeChannel(value2);
}
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun70949, 9079, [31, 27, 3784, 3793, 1878, 4117, 661, 33, 4501, 697, 6992, 9075, 9061, 4805, 566, 6647,
9063, 9064, 1244, 4573, 5278, 1848, 9080, 9052, 4080, 9059, 1962, 1305, 9060,
2]) /* metro module 9079, dependencies: [31, 27, 3784, 3793, 1878, 4117, 661, 33, 4501, 697, 6992, 9075, 9061, 4805, 566, 6647, 9063, 9064, 1244, 4573, 5278, 1848, 9080, 9052, 4080, 9059, 1962, 1305, 9060, 2] */;
@@ -1,397 +1,455 @@
/* Metro module 9119; source: modules/guild_scheduled_events/native/components/EditGuildEventDetails.tsx; dependencies: [57, 31, 4117, 1385, 33, 4501, 1244, 3738, 9039, 1484, 4573, 4578, 1848, 9038, 3869, 9056, 9110, 9058, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Module03738 from '../../../../by-id/module-03738.js'; /* Metro dependency 3738 */
import EditGuildEventStepContainer from './EditGuildEventStepContainer.tsx'; /* Metro dependency 9056 */
import EditGuildEventStepHeader from './EditGuildEventStepHeader.tsx'; /* Metro dependency 9110 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as GuildScheduledEventsConstantsModule from '../../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as GuildScheduledEventStoreModule from '../../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as ScheduleUtilsModule from '../../utils/ScheduleUtils.tsx'; /* Metro dependency 9039 */
import * as GuildEventModalComponentsModule from './GuildEventModalComponents.tsx'; /* Metro dependency 9058 */
function _fun71437(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:6, offset: 0x01d1fb79, size: 267 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildScheduledEventActive;
const env0_7 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const value = require(33) /* metro dependency 33 */;
const value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({error: {paddingVertical: 8}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventDetails.tsx');
const env0_11 = (CreateStylesModule).createStyles({error: {paddingVertical: 8}});
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventDetails.tsx');
exports.default = EditGuildEventDetails;
}
function EditGuildEventDetails({guildEvent, initialGuildEvent, onChange}) { // fn#71438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:406, offset: 0x01d1fc84, size: 1311 bytes, params: 2, frame: 39
var r6;
var object;
const styles = useStyles();
const name = guildEvent.name;
const description = guildEvent.description;
const entityType = guildEvent.entityType;
const scheduledStartTime = guildEvent.scheduledStartTime;
const scheduledEndTime = guildEvent.scheduledEndTime;
const recurrenceRule = guildEvent.recurrenceRule;
const recurrenceRule2 = recurrenceRule;
let value2 = ReactModule.useMemo(_fun71439, [scheduledStartTime]);
const value3 = ReactModule.useMemo(_fun71440, [scheduledEndTime, scheduledStartTime]);
let useState = ReactModule.useState;
const value4 = Reflect.apply(useState, ReactModule, [_fun71441]);
const binding2 = recurrenceRule2;
const value5 = binding2(value4, 2);
const env0_7 = value5[0];
const env0_8 = value5[1];
const value6 = ReactModule.useMemo(function() {
return importDefault(dependencyMap[7])();
}, []);
const value7 = ReactModule.useMemo(function() {
var value2 = importDefault(dependencyMap[7])();
var MAX_DAYS_AHEAD_AN_EVENT_CAN_START = require(dependencyMap[8]).MAX_DAYS_AHEAD_AN_EVENT_CAN_START;
return value2.add(MAX_DAYS_AHEAD_AN_EVENT_CAN_START, 'days');
}, []);
const value8 = ReactModule.useMemo(_fun71444, [value2]);
const value9 = ReactModule.useMemo(function() {
var value2 = importDefault(dependencyMap[7])();
var MAX_DAYS_AHEAD_AN_EVENT_CAN_END = require(dependencyMap[8]).MAX_DAYS_AHEAD_AN_EVENT_CAN_END;
return value2.add(MAX_DAYS_AHEAD_AN_EVENT_CAN_END, 'days');
}, []);
const value11 = ReactModule.useRef(null);
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(initialGuildEvent);
useState = ReactModule.useState;
const value12 = binding2(Reflect.apply(useState, ReactModule, [null]), 2);
const property = value12[0];
const env0_11 = value12[1];
const env0_12 = (UseNavigationNativeModule).useNavigation();
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const r11 = (
property != null
? ((Text) => <Text style={styles.error} variant="text-sm/normal" color="text-feedback-critical">{property}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: null
);
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const PDTjLN = t.PDTjLN;
const fragment = (
<>
{r11}
<Button
text={Reflect.apply(string, intl, [PDTjLN])}
variant="primary"
onPress={onPress_71447}
disabled={property != null}
/>
</>
);
string = intl.string;
const GG6vbr = (require(1244) /* metro dependency 1244: indexNative */).t.GG6vbr;
const items2 = [
<EditGuildEventStepHeader
title={Reflect.apply(string, intl, [GG6vbr])}
subtitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q5lgwV)}
/>,
];
const GuildEventTopic = (GuildEventModalComponentsModule).GuildEventTopic;
items2[1] = <GuildEventTopic topic={name} onChange={function(a0) {
handleChangeEvent({name: a0});
}} />;
const GuildEventDatetime = (GuildEventModalComponentsModule).GuildEventDatetime;
items2[2] = (
<GuildEventDatetime
date={value2}
onChange={onChange_71449}
disabled={isGuildScheduledEventActive2}
minimumDate={value6}
maximumDate={value7}
dateLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kKOIwJ)}
timeLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6dGmCD'])}
/>
);
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
const value16 = entityType === EXTERNAL;
if (value16) {
r6 = (
<GuildEventDatetime
date={value3}
onChange={function(a0) {
handleChangeEvent({scheduledEndTime: a0.toISOString()});
}}
minimumDate={value8}
maximumDate={value9}
dateLabel={intl.string(t.CTLgZJ)}
timeLabel={intl.string(t.j2RuXF)}
/>
);
} else {
r6 = value16;
}
items2[3] = r6;
const GuildEventRecurrence = (GuildEventModalComponentsModule).GuildEventRecurrence;
items2[4] = (
<GuildEventRecurrence
startDate={value2}
recurrenceRule={recurrenceRule}
onRecurrenceChange={onRecurrenceChange}
/>
);
const GuildEventDescription = (GuildEventModalComponentsModule).GuildEventDescription;
items2[5] = (
<GuildEventDescription
description={description ?? ''}
onChange={function(a0) {
handleChangeEvent({description: a0});
}}
onFocus={function() {
global.setTimeout(_fun71454, 100);
}}
/>
);
return (
<EditGuildEventStepContainer action={fragment} ref={value11}>
{items2}
</EditGuildEventStepContainer>
);
function _fun71439() { // fn#71439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:610, offset: 0x01d201a3, size: 39 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (Module03738)(scheduledStartTime);
}
function EditGuildEventDetails({guildEvent, initialGuildEvent, onChange}) { // fn#71438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:406, offset: 0x01d1fc84, size: 1311 bytes, params: 2, frame: 39
var r6;
var object7;
const styles = useStyles();
const name = guildEvent.name;
const description = guildEvent.description;
const entityType = guildEvent.entityType;
const scheduledStartTime = guildEvent.scheduledStartTime;
const scheduledEndTime = guildEvent.scheduledEndTime;
const recurrenceRule = guildEvent.recurrenceRule;
const env0_4 = recurrenceRule;
const binding = env0_5;
let value2 = binding.useMemo(_fun71439, [scheduledStartTime]);
const value3 = binding.useMemo(_fun71440, [scheduledEndTime, scheduledStartTime]);
let useState = binding.useState;
const value4 = Reflect.apply(useState, binding, [_fun71441]);
const binding2 = env0_4;
const value5 = binding2(value4, 2);
const env0_7 = value5[0];
const env0_8 = value5[1];
const value6 = binding.useMemo(function() {
return importDefault(dependencyMap[7])();
}, []);
const value7 = binding.useMemo(function() {
var value2 = importDefault(dependencyMap[7])();
var MAX_DAYS_AHEAD_AN_EVENT_CAN_START = require(dependencyMap[8]).MAX_DAYS_AHEAD_AN_EVENT_CAN_START;
return value2.add(MAX_DAYS_AHEAD_AN_EVENT_CAN_START, 'days');
}, []);
const value8 = binding.useMemo(_fun71444, [value2]);
const value9 = binding.useMemo(function() {
var value2 = importDefault(dependencyMap[7])();
var MAX_DAYS_AHEAD_AN_EVENT_CAN_END = require(dependencyMap[8]).MAX_DAYS_AHEAD_AN_EVENT_CAN_END;
return value2.add(MAX_DAYS_AHEAD_AN_EVENT_CAN_END, 'days');
}, []);
const value11 = binding.useRef(null);
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(initialGuildEvent);
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property = value12[0];
const env0_11 = value12[1];
const env0_12 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const r11 = property != null ? ((Text) => <Text style={styles.error} variant="text-sm/normal" color="text-feedback-critical">{property}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const PDTjLN = t.PDTjLN;
const fragment = <>{r11}<Button text={Reflect.apply(string, intl,
[PDTjLN])} variant="primary" onPress={onPress_71447} disabled={property != null} /></>;
const EditGuildEventStepContainer = importDefault(9056) /* metro dependency 9056: EditGuildEventStepContainer */;
const EditGuildEventStepHeader = importDefault(9110) /* metro dependency 9110: EditGuildEventStepHeader */;
string = intl.string;
const GG6vbr = (require(1244) /* metro dependency 1244: indexNative */).t.GG6vbr;
const items2 = [<EditGuildEventStepHeader title={Reflect.apply(string, intl,
[GG6vbr])} subtitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.q5lgwV)} />];
const GuildEventTopic = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventTopic;
items2[1] = <GuildEventTopic topic={name} onChange={function(a0) {
handleChangeEvent({name: a0});
}} />;
const GuildEventDatetime = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventDatetime;
items2[2] = <GuildEventDatetime date={value2} onChange={onChange_71449} disabled={isGuildScheduledEventActive2} minimumDate={value6} maximumDate={value7} dateLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.kKOIwJ)} timeLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6dGmCD'])} />;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
const value16 = entityType === EXTERNAL;
if (value16) {
r6 = <GuildEventDatetime date={value3} onChange={function(a0) {
handleChangeEvent({scheduledEndTime: a0.toISOString()});
}} minimumDate={value8} maximumDate={value9} dateLabel={intl.string(t.CTLgZJ)} timeLabel={intl.string(t.j2RuXF)} />;
} else {
r6 = value16;
}
items2[3] = r6;
const GuildEventRecurrence = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventRecurrence;
items2[4] = <GuildEventRecurrence startDate={value2} recurrenceRule={recurrenceRule} onRecurrenceChange={onRecurrenceChange} />;
const GuildEventDescription = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventDescription;
items2[5] = <GuildEventDescription description={description ?? ''} onChange={function(a0) {
handleChangeEvent({description: a0});
}} onFocus={function() {
global.setTimeout(_fun71454, 100);
}} />;
return (
<EditGuildEventStepContainer action={fragment} ref={value11}>
{items2}
</EditGuildEventStepContainer>
);
}
function _fun71440() { // fn#71440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:644, offset: 0x01d201ca, size: 103 bytes, params: 1, frame: 14
var r0;
var value2;
var value3;
var value;
if (scheduledEndTime != null) {
value3 = environment.__proto__;
r0 = (importDefault(3738) /* metro dependency 3738 */)(scheduledEndTime);
} else {
value2 = environment.__proto__;
value = (importDefault(3738) /* metro dependency 3738 */)(scheduledStartTime);
value = value.add(1, 'hour');
r0 = value;
}
return r0;
}
function _fun71439() { // fn#71439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:610, offset: 0x01d201a3, size: 39 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(3738) /* metro dependency 3738 */)(scheduledStartTime);
}
function _fun71441() { // fn#71441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:714, offset: 0x01d20231, size: 71 bytes, params: 1, frame: 15
let value = environment.__proto__;
const recurrenceRuleToOption = ScheduleUtilsModule.recurrenceRuleToOption;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(scheduledStartTime);
return Reflect.apply(recurrenceRuleToOption, ScheduleUtilsModule, [value, recurrenceRule]);
}
function _fun71440() { // fn#71440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:644, offset: 0x01d201ca, size: 103 bytes, params: 1, frame: 14
var r0;
var value2;
var value3;
var value;
if (scheduledEndTime != null) {
value3 = environment.__proto__;
r0 = (importDefault(3738) /* metro dependency 3738 */)(scheduledEndTime);
} else {
value2 = environment.__proto__;
value = (importDefault(3738) /* metro dependency 3738 */)(scheduledStartTime);
value = value.add(1, 'hour');
r0 = value;
}
return r0;
}
function _fun71444() { // fn#71444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:919, offset: 0x01d202db, size: 57 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(ReactModule);
return value.add(15, 'minutes');
}
function _fun71441() { // fn#71441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:714, offset: 0x01d20231, size: 71 bytes, params: 1, frame: 15
let value = environment.__proto__;
const scheduleUtilsModule = require(9039) /* metro dependency 9039: ScheduleUtils */;
const recurrenceRuleToOption = scheduleUtilsModule.recurrenceRuleToOption;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(scheduledStartTime);
return Reflect.apply(recurrenceRuleToOption, scheduleUtilsModule, [value, recurrenceRule]);
}
function handleChangeEvent(a0) { // fn#71446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:1152, owner: EditGuildEventDetails.handleChangeEvent, offset: 0x01d20358, size: 30 bytes, params: 2, frame: 12
env0_11(null);
onChange(a0);
}
function _fun71444() { // fn#71444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:919, offset: 0x01d202db, size: 57 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(env0_5);
return value.add(15, 'minutes');
}
function handleChangeEvent(a0) { // fn#71446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:1152, owner: EditGuildEventDetails.handleChangeEvent, offset: 0x01d20358, size: 30 bytes, params: 2, frame: 12
env0_11(null);
onChange(a0);
}
function EditGuildEventDetailsOnPress() { // fn#71447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:1388, owner: EditGuildEventDetails.onPress, offset: 0x01d20376, size: 271 bytes, params: 1, frame: 16
var binding;
var guildEventBinding;
var name;
var length;
var value3;
var navigate;
var property;
var moduleValue2;
var EditGuildEventScreens;
var PREVIEW;
var Error;
var moduleValue3;
var intl;
var string;
var moduleValue4;
var t;
var GoV0uR;
var value4;
var prototype;
var error;
var value6;
var message;
var AccessibilityAnnouncer;
var announce;
importAll(dependencyMap[12]).dismissGlobalKeyboard();
reducibleJoin3: while (true) {
reduciblePort41: while (true) {
exceptionLanding40: while (true) {
try {
function EditGuildEventDetailsOnPress() { // fn#71447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:1388, owner: EditGuildEventDetails.onPress, offset: 0x01d20376, size: 271 bytes, params: 1, frame: 16
var binding;
var guildEventBinding;
var name;
var length;
var value3;
var navigate;
var property;
var moduleValue2;
var EditGuildEventScreens;
var PREVIEW;
var Error;
var moduleValue3;
var intl;
var string;
var moduleValue4;
var t;
var GoV0uR;
var value4;
var prototype;
var error;
var value6;
var message;
var AccessibilityAnnouncer;
var announce;
importAll(dependencyMap[12]).dismissGlobalKeyboard();
reducibleJoin3: while (true) {
reduciblePort41: while (true) {
exceptionLanding40: while (true) {
try {
binding = env0_11;
} catch (error) {
break exceptionLanding40;
}
break reducibleJoin3;
}
binding = env0_11;
message = error.message;
binding(message);
AccessibilityAnnouncer = require(dependencyMap[14]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
message = error.message;
Reflect.apply(announce, AccessibilityAnnouncer, [message]);
break reduciblePort41;
}
return undefined;
}
try {
binding(null);
} catch (error) {
break exceptionLanding40;
}
try {
guildEventBinding = guildEvent;
} catch (error) {
break exceptionLanding40;
}
try {
name = guildEventBinding.name;
} catch (error) {
break exceptionLanding40;
}
try {
length = name.length;
} catch (error) {
break exceptionLanding40;
}
try {
value3 = length === 0;
} catch (error) {
break exceptionLanding40;
}
if (!value3) {
try {
binding = env0_12;
} catch (error) {
break exceptionLanding40;
}
break reducibleJoin3;
try {
navigate = binding.navigate;
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
property = dependencyMap[13];
} catch (error) {
break exceptionLanding40;
}
try {
moduleValue2 = require(property);
} catch (error) {
break exceptionLanding40;
}
try {
EditGuildEventScreens = moduleValue2.EditGuildEventScreens;
} catch (error) {
break exceptionLanding40;
}
try {
PREVIEW = EditGuildEventScreens.PREVIEW;
} catch (error) {
break exceptionLanding40;
}
try {
Reflect.apply(navigate, binding, [PREVIEW]);
} catch (error) {
break exceptionLanding40;
}
return undefined;
}
try {
Error = global.Error;
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
property = dependencyMap[6];
} catch (error) {
break exceptionLanding40;
}
try {
moduleValue3 = require(property);
} catch (error) {
break exceptionLanding40;
}
try {
intl = moduleValue3.intl;
} catch (error) {
break exceptionLanding40;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding40;
}
try {
property = dependencyMap[6];
} catch (error) {
break exceptionLanding40;
}
try {
moduleValue4 = require(property);
} catch (error) {
break exceptionLanding40;
}
try {
t = moduleValue4.t;
} catch (error) {
break exceptionLanding40;
}
try {
GoV0uR = t.GoV0uR;
} catch (error) {
break exceptionLanding40;
}
try {
value4 = Reflect.apply(string, intl, [GoV0uR]);
} catch (error) {
break exceptionLanding40;
}
try {
prototype = Error.prototype;
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
error = new Error();
} catch (error) {
break exceptionLanding40;
}
try {
value6 = error instanceof Object ? error : undefined;
} catch (error) {
break exceptionLanding40;
}
try {
throw value6;
} catch (error) {
break exceptionLanding40;
}
binding = env0_11;
message = error.message;
binding(message);
AccessibilityAnnouncer = require(dependencyMap[14]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
message = error.message;
Reflect.apply(announce, AccessibilityAnnouncer, [message]);
break reduciblePort41;
}
return undefined;
}
try {
binding(null);
} catch (error) {
break exceptionLanding40;
}
try {
guildEventBinding = guildEvent;
} catch (error) {
break exceptionLanding40;
}
try {
name = guildEventBinding.name;
} catch (error) {
break exceptionLanding40;
}
try {
length = name.length;
} catch (error) {
break exceptionLanding40;
}
try {
value3 = length === 0;
} catch (error) {
break exceptionLanding40;
}
if (!value3) {
try {
binding = env0_12;
} catch (error) {
break exceptionLanding40;
function EditGuildEventDetailsOnChange_71449(a0) { // fn#71449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:1982, owner: EditGuildEventDetails.onChange, offset: 0x01d2049e, size: 279 bytes, params: 2, frame: 17
var binding;
var value3;
var value8;
var intl;
if (env0_10) {
binding = env0_11;
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return binding(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nKIaRG));
}
const object = {};
object.scheduledStartTime = a0.toISOString();
if (scheduledEndTime != null && GuildScheduledEventStoreModule.isGuildScheduledEventActive.isBefore(a0)) {
value3 = environment.__proto__;
object.scheduledEndTime = (importDefault(3738) /* metro dependency 3738 */)(a0).add(1, 'hour').toISOString();
}
if (a0 != null && env0_7 != null) {
value8 = environment.__proto__;
object.recurrenceRule = (require(9039) /* metro dependency 9039: ScheduleUtils */).recurrenceOptionToRecurrenceRule(env0_7,
a0);
}
handleChangeEvent(object);
}
try {
navigate = binding.navigate;
} catch (error) {
break exceptionLanding40;
function onRecurrenceChange(a0) { // fn#71451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:2740, owner: EditGuildEventDetails.onRecurrenceChange, offset: 0x01d205d9, size: 86 bytes, params: 2, frame: 15
var value2;
if (ReactModule != null) {
value2 = environment.__proto__;
onChange({recurrenceRule: (require(9039) /* metro dependency 9039: ScheduleUtils */).recurrenceOptionToRecurrenceRule(a0,
ReactModule)});
env0_8(a0);
}
}
try {
} catch (error) {
break exceptionLanding40;
function EditGuildEventDetailsOnFocus() { // fn#71453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:2953, owner: EditGuildEventDetails.onFocus, offset: 0x01d20648, size: 30 bytes, params: 1, frame: 13
global.setTimeout(_fun71454, 100);
function _fun71454() { // fn#71454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:2970, offset: 0x01d20666, size: 41 bytes, params: 1, frame: 10
if (env1_9.current != null) {
env1_9.current.scrollToEnd();
}
}
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
property = dependencyMap[13];
} catch (error) {
break exceptionLanding40;
}
try {
moduleValue2 = require(property);
} catch (error) {
break exceptionLanding40;
}
try {
EditGuildEventScreens = moduleValue2.EditGuildEventScreens;
} catch (error) {
break exceptionLanding40;
}
try {
PREVIEW = EditGuildEventScreens.PREVIEW;
} catch (error) {
break exceptionLanding40;
}
try {
Reflect.apply(navigate, binding, [PREVIEW]);
} catch (error) {
break exceptionLanding40;
}
return undefined;
}
try {
Error = global.Error;
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
property = dependencyMap[6];
} catch (error) {
break exceptionLanding40;
}
try {
moduleValue3 = require(property);
} catch (error) {
break exceptionLanding40;
}
try {
intl = moduleValue3.intl;
} catch (error) {
break exceptionLanding40;
}
try {
string = intl.string;
} catch (error) {
break exceptionLanding40;
}
try {
property = dependencyMap[6];
} catch (error) {
break exceptionLanding40;
}
try {
moduleValue4 = require(property);
} catch (error) {
break exceptionLanding40;
}
try {
t = moduleValue4.t;
} catch (error) {
break exceptionLanding40;
}
try {
GoV0uR = t.GoV0uR;
} catch (error) {
break exceptionLanding40;
}
try {
value4 = Reflect.apply(string, intl, [GoV0uR]);
} catch (error) {
break exceptionLanding40;
}
try {
prototype = Error.prototype;
} catch (error) {
break exceptionLanding40;
}
try {
} catch (error) {
break exceptionLanding40;
}
try {
error = new Error();
} catch (error) {
break exceptionLanding40;
}
try {
value6 = error instanceof Object ? error : undefined;
} catch (error) {
break exceptionLanding40;
}
try {
throw value6;
} catch (error) {
break exceptionLanding40;
}
}
function EditGuildEventDetailsOnChange_71449(a0) { // fn#71449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:1982, owner: EditGuildEventDetails.onChange, offset: 0x01d2049e, size: 279 bytes, params: 2, frame: 17
var binding;
var value3;
var value8;
var intl;
if (env0_10) {
binding = env0_11;
value = environment.__proto__;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return binding(intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nKIaRG));
}
const object2 = {};
object2.scheduledStartTime = a0.toISOString();
if (scheduledEndTime != null && env0_6.isBefore(a0)) {
value3 = environment.__proto__;
object2.scheduledEndTime = (importDefault(3738) /* metro dependency 3738 */)(a0).add(1, 'hour').toISOString();
}
if (a0 != null && env0_7 != null) {
value8 = environment.__proto__;
object2.recurrenceRule = (require(9039) /* metro dependency 9039: ScheduleUtils */).recurrenceOptionToRecurrenceRule(env0_7,
a0);
}
handleChangeEvent(object2);
}
function onRecurrenceChange(a0) { // fn#71451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:2740, owner: EditGuildEventDetails.onRecurrenceChange, offset: 0x01d205d9, size: 86 bytes, params: 2, frame: 15
var value2;
if (env0_5 != null) {
value2 = environment.__proto__;
onChange({recurrenceRule: (require(9039) /* metro dependency 9039: ScheduleUtils */).recurrenceOptionToRecurrenceRule(a0,
env0_5)});
env0_8(a0);
}
}
function EditGuildEventDetailsOnFocus() { // fn#71453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:2953, owner: EditGuildEventDetails.onFocus, offset: 0x01d20648, size: 30 bytes, params: 1, frame: 13
global.setTimeout(_fun71454, 100);
}
function _fun71454() { // fn#71454, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9304:2970, offset: 0x01d20666, size: 41 bytes, params: 1, frame: 10
if (env1_9.current != null) {
env1_9.current.scrollToEnd();
}
}
global.__d(_fun71437, 9119, [57, 31, 4117, 1385, 33, 4501, 1244, 3738, 9039, 1484, 4573, 4578, 1848, 9038, 3869,
9056, 9110, 9058,
2]) /* metro module 9119, dependencies: [57, 31, 4117, 1385, 33, 4501, 1244, 3738, 9039, 1484, 4573, 4578, 1848, 9038, 3869, 9056, 9110, 9058, 2] */;
@@ -1,238 +1,260 @@
/* Metro module 9074; source: modules/guild_scheduled_events/native/components/EditGuildEventModal.tsx; dependencies: [5, 57, 31, 1385, 33, 4501, 697, 9038, 9047, 1848, 9037, 3869, 1244, 9042, 9075, 9055, 9078, 9119, 9120, 5280, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import LazyAPIPromise from '../../../../utils/LazyAPIPromise.tsx'; /* Metro dependency 9047 */
import EditGuildEventModalNavbar from './EditGuildEventModalNavbar.tsx'; /* Metro dependency 9055 */
import EditGuildEventDetails from './EditGuildEventDetails.tsx'; /* Metro dependency 9119 */
import EditGuildEventPreview from './EditGuildEventPreview.tsx'; /* Metro dependency 9120 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as GuildScheduledEventsConstantsModule from '../../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as KeyboardManagerUtilsModule from '../../../../utils/native/KeyboardManagerUtils.tsx'; /* Metro dependency 1848 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as EditGuildEventUtilsModule from '../../utils/EditGuildEventUtils.tsx'; /* Metro dependency 9038 */
function _fun70896(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:6, offset: 0x01d0c675, size: 272 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const env0_9 = Reflect.apply(createStyles, createStylesModule,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule,
[{cardStyle: {backgroundColor: BACKGROUND_BASE_LOW}}]);
value = value.memo(_fun70897);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventModal.tsx');
exports.default = value;
}
function _fun70897({guild, onCloseModal, initialGuildEvent, targetChannel}) { // fn#70897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:280, offset: 0x01d0c785, size: 681 bytes, params: 2, frame: 27
const styles = useStyles();
const initialGuildEventData = (require(9038) /* metro dependency 9038: EditGuildEventUtils */).getInitialGuildEventData(initialGuildEvent,
targetChannel);
const binding = env0_6;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [initialGuildEventData]);
const binding2 = env0_5;
const value4 = binding2(value3, 2);
const property = value4[0];
const env0_4 = value4[1];
useState = binding.useState;
const editGuildEventUtilsModule = require(9038) /* metro dependency 9038: EditGuildEventUtils */;
const property2 = binding2(Reflect.apply(useState, binding,
[editGuildEventUtilsModule.isEditingEvent(initialGuildEvent)]), 1)[0];
useState = binding.useState;
const property3 = binding2(Reflect.apply(useState, binding, [_fun70898]), 1)[0];
const value5 = binding2((importDefault(9047) /* metro dependency 9047: LazyAPIPromise */)(_fun70899), 2);
var env0_6 = value5[0];
const property4 = value5[1];
let object5 = {guild: guild, guildEvent: property, initialGuildEvent: initialGuildEvent, isEdit: property2,
error: property4.error, loading: property4.loading, onSave: _fun70900(), onChange: onChange_70904};
const closure = function(a0) {
var env0_0 = a0;
return _fun70907;
};
object5 = {};
const EditGuildEventScreens = editGuildEventUtilsModule.EditGuildEventScreens;
let CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
const object6 = {title: ''};
const CHANNEL_SELECTOR2 = EditGuildEventScreens.CHANNEL_SELECTOR;
object6.customNavbar = closure(CHANNEL_SELECTOR2);
object6.headerLeft = function() {
return null;
};
object6.render = render_70909;
object6.fullscreen = true;
object5[CHANNEL_SELECTOR] = object6;
const DETAILS = EditGuildEventScreens.DETAILS;
const object7 = {title: ''};
const DETAILS2 = EditGuildEventScreens.DETAILS;
object7.customNavbar = closure(DETAILS2);
object7.render = render_70910;
object7.fullscreen = true;
object5[DETAILS] = object7;
const PREVIEW = EditGuildEventScreens.PREVIEW;
const object8 = {title: ''};
const PREVIEW2 = EditGuildEventScreens.PREVIEW;
object8.customNavbar = closure(PREVIEW2);
object8.render = render_70911;
object8.fullscreen = true;
object5[PREVIEW] = object8;
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
return (
<Navigator
screens={object5}
initialRouteName={CHANNEL_SELECTOR}
initialRouteStack={property3}
cardShadowEnabled={false}
cardOverlayEnabled={false}
cardStyle={styles.cardStyle}
/>
);
}
function _fun70898() { // fn#70898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:506, offset: 0x01d0ca2e, size: 107 bytes, params: 1, frame: 15
const binding = env0_5;
const object2 = {};
const EditGuildEventScreens = (require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens;
const CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
object2.name = CHANNEL_SELECTOR;
return binding ? [object2, {name: EditGuildEventScreens.DETAILS}] : [object2];
}
function _fun70899() { // fn#70899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:694, offset: 0x01d0ca99, size: 177 bytes, params: 1, frame: 17
var r0;
let value = environment.__proto__;
const value2 = undefined;
(importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
if (env0_5) {
if ((initialGuildEvent == null ? value2 : initialGuildEvent.id) != null) {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.saveEvent(initialGuildEvent.id, env0_3, guild.id);
r0 = value;
} else {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.createGuildEvent(env0_3, guild.id);
r0 = value;
function _fun70897({guild, onCloseModal, initialGuildEvent, targetChannel}) { // fn#70897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:280, offset: 0x01d0c785, size: 681 bytes, params: 2, frame: 27
const styles = useStyles();
const initialGuildEventData = (EditGuildEventUtilsModule).getInitialGuildEventData(initialGuildEvent,
targetChannel);
const binding = env0_6;
let useState = binding.useState;
const value3 = Reflect.apply(useState, binding, [initialGuildEventData]);
const value4 = Module00057(value3, 2);
const property = value4[0];
const env0_4 = value4[1];
useState = binding.useState;
const property2 = Module00057(Reflect.apply(useState, binding,
[EditGuildEventUtilsModule.isEditingEvent(initialGuildEvent)]), 1)[0];
useState = binding.useState;
const property3 = Module00057(Reflect.apply(useState, binding, [_fun70898]), 1)[0];
const value5 = Module00057((LazyAPIPromise)(_fun70899), 2);
var env0_6 = value5[0];
const property4 = value5[1];
let object = {guild: guild, guildEvent: property, initialGuildEvent: initialGuildEvent, isEdit: property2,
error: property4.error, loading: property4.loading, onSave: _fun70900(), onChange: onChange_70904};
const closure = function(a0) {
var env0_0 = a0;
return _fun70907;
};
object = {};
const EditGuildEventScreens = EditGuildEventUtilsModule.EditGuildEventScreens;
let CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
const object2 = {title: ''};
const CHANNEL_SELECTOR2 = EditGuildEventScreens.CHANNEL_SELECTOR;
object2.customNavbar = closure(CHANNEL_SELECTOR2);
object2.headerLeft = function() {
return null;
};
object2.render = render_70909;
object2.fullscreen = true;
object[CHANNEL_SELECTOR] = object2;
const DETAILS = EditGuildEventScreens.DETAILS;
const object3 = {title: ''};
const DETAILS2 = EditGuildEventScreens.DETAILS;
object3.customNavbar = closure(DETAILS2);
object3.render = render_70910;
object3.fullscreen = true;
object[DETAILS] = object3;
const PREVIEW = EditGuildEventScreens.PREVIEW;
const object4 = {title: ''};
const PREVIEW2 = EditGuildEventScreens.PREVIEW;
object4.customNavbar = closure(PREVIEW2);
object4.render = render_70911;
object4.fullscreen = true;
object[PREVIEW] = object4;
const Navigator = (NavigatorNativeModule).Navigator;
CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
return (
<Navigator
screens={object}
initialRouteName={CHANNEL_SELECTOR}
initialRouteStack={property3}
cardShadowEnabled={false}
cardOverlayEnabled={false}
cardStyle={styles.cardStyle}
/>
);
function _fun70898() { // fn#70898, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:506, offset: 0x01d0ca2e, size: 107 bytes, params: 1, frame: 15
const object = {};
const EditGuildEventScreens = (EditGuildEventUtilsModule).EditGuildEventScreens;
const CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
object.name = CHANNEL_SELECTOR;
return Module00057 ? [object, {name: EditGuildEventScreens.DETAILS}] : [object];
}
} else {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.createGuildEvent(env0_3, guild.id);
r0 = value;
}
return r0;
}
function _fun70900() { // fn#70900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:878, offset: 0x01d0cb4a, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun70902);
return _fun70903;
}
function onChange_70904(a0) { // fn#70904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1281, offset: 0x01d0cc8c, size: 230 bytes, params: 2, frame: 19
var environment;
var id;
var r3;
var value2;
var value3;
var moduleValue;
var getChannelTypeFromEntity;
var value4;
var moduleValue2;
var getEventChannelsByType;
var property;
const env0_0 = a0;
let entityType = a0.entityType;
const value = null;
if (value != entityType) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(9042) /* metro dependency 9042: EntityUtils */;
getChannelTypeFromEntity = moduleValue.getChannelTypeFromEntity;
entityType = a0.entityType;
value4 = Reflect.apply(getChannelTypeFromEntity, moduleValue, [entityType]);
moduleValue2 = require(9075) /* metro dependency 9075: useGetEventChannelsByType */;
getEventChannelsByType = moduleValue2.getEventChannelsByType;
id = guild.id;
property = env1_5(Reflect.apply(getEventChannelsByType, moduleValue2, [id, value4]), 1)[0];
id = value == property ? value3 : property.id;
r3 = value != id ? id : value;
a0.channelId = r3;
entityType = a0.entityType;
r3 = entityType !== GuildScheduledEventEntityTypes.EXTERNAL && env0_3.entityType === GuildScheduledEventEntityTypes.EXTERNAL;
if (r3) {
a0.entityMetadata = value;
}
}
env0_4(_fun70905);
}
function getChannelSelectorHeader(a0) { // fn#70906, offset: 0x01d0cd8e, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun70907;
}
function render_70909() { // fn#70909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1809, offset: 0x01d0cddf, size: 86 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component {...env0_7} {...{['guildEventId']: initialGuildEvent?.id}} />)(importDefault(9078) /* metro dependency 9078: EditGuildEventWhere */);
}
function render_70910() { // fn#70910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:2014, offset: 0x01d0ce35, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...env0_7} />)(importDefault(9119) /* metro dependency 9119: EditGuildEventDetails */);
}
function render_70911() { // fn#70911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:2186, offset: 0x01d0ce6a, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...env0_7} />)(importDefault(9120) /* metro dependency 9120: EditGuildEventPreview */);
}
function* _fun70902() { // fn#70902, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:898, offset: 0x01d0cb79, size: 275 bytes, params: 1, frame: 19
var value6;
var binding;
var binding2;
var AccessibilityAnnouncer;
var announce;
var intl;
var value7;
var binding3;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = undefined;
yield env2_6();
const value4 = undefined;
if (false) {
return value4;
}
if (value4 != null) {
if (env2_5) {
if ((importAll == null ? value3 : importAll.id) != null) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding3 = env3_3;
AccessibilityAnnouncer = binding(binding3[11]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = binding(binding3[12]).intl;
Reflect.apply(announce, AccessibilityAnnouncer, [intl.string(binding(binding3[12]).t['F9On+q'])]);
function _fun70899() { // fn#70899, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:694, offset: 0x01d0ca99, size: 177 bytes, params: 1, frame: 17
var r0;
let value = environment.__proto__;
const value2 = undefined;
(KeyboardManagerUtilsModule).dismissGlobalKeyboard();
if (Module00057) {
if ((initialGuildEvent == null ? value2 : initialGuildEvent.id) != null) {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.saveEvent(initialGuildEvent.id, env0_3, guild.id);
r0 = value;
} else {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.createGuildEvent(env0_3, guild.id);
r0 = value;
}
} else {
value6 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
AccessibilityAnnouncer = binding(binding2[11]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = binding(binding2[12]).intl;
Reflect.apply(announce, AccessibilityAnnouncer, [intl.string(binding(binding2[12]).t['5HzXO5'])]);
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.createGuildEvent(env0_3, guild.id);
r0 = value;
}
} else {
value6 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
AccessibilityAnnouncer = binding(binding2[11]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = binding(binding2[12]).intl;
Reflect.apply(announce, AccessibilityAnnouncer, [intl.string(binding(binding2[12]).t['5HzXO5'])]);
return r0;
}
importDefault();
function _fun70900() { // fn#70900, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:878, offset: 0x01d0cb4a, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun70902);
return _fun70903;
function* _fun70902() { // fn#70902, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:898, offset: 0x01d0cb79, size: 275 bytes, params: 1, frame: 19
var value6;
var binding;
var binding2;
var AccessibilityAnnouncer;
var announce;
var intl;
var value7;
var binding3;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
const value3 = undefined;
yield env2_6();
const value4 = undefined;
if (false) {
return value4;
}
if (value4 != null) {
if (env2_5) {
if ((importAll == null ? value3 : importAll.id) != null) {
value7 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding3 = env3_3;
AccessibilityAnnouncer = binding(binding3[11]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = binding(binding3[12]).intl;
Reflect.apply(announce, AccessibilityAnnouncer, [intl.string(binding(binding3[12]).t['F9On+q'])]);
} else {
value6 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
AccessibilityAnnouncer = binding(binding2[11]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = binding(binding2[12]).intl;
Reflect.apply(announce, AccessibilityAnnouncer, [intl.string(binding(binding2[12]).t['5HzXO5'])]);
}
} else {
value6 = environment.__proto__.__proto__.__proto__;
binding = env3_0;
binding2 = env3_3;
AccessibilityAnnouncer = binding(binding2[11]).AccessibilityAnnouncer;
announce = AccessibilityAnnouncer.announce;
intl = binding(binding2[12]).intl;
Reflect.apply(announce, AccessibilityAnnouncer, [intl.string(binding(binding2[12]).t['5HzXO5'])]);
}
importDefault();
}
return value3;
}
function _fun70903() { // fn#70903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1146, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function onChange_70904(a0) { // fn#70904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1281, offset: 0x01d0cc8c, size: 230 bytes, params: 2, frame: 19
var environment;
var id;
var r3;
var value2;
var value3;
var moduleValue;
var getChannelTypeFromEntity;
var value4;
var moduleValue2;
var getEventChannelsByType;
var property;
const env0_0 = a0;
let entityType = a0.entityType;
const value = null;
if (value != entityType) {
value2 = environment.__proto__;
value3 = undefined;
moduleValue = require(9042) /* metro dependency 9042: EntityUtils */;
getChannelTypeFromEntity = moduleValue.getChannelTypeFromEntity;
entityType = a0.entityType;
value4 = Reflect.apply(getChannelTypeFromEntity, moduleValue, [entityType]);
moduleValue2 = require(9075) /* metro dependency 9075: useGetEventChannelsByType */;
getEventChannelsByType = moduleValue2.getEventChannelsByType;
id = guild.id;
property = env1_5(Reflect.apply(getEventChannelsByType, moduleValue2, [id, value4]), 1)[0];
id = value == property ? value3 : property.id;
r3 = value != id ? id : value;
a0.channelId = r3;
entityType = a0.entityType;
r3 = entityType !== GuildScheduledEventEntityTypes.EXTERNAL && env0_3.entityType === GuildScheduledEventEntityTypes.EXTERNAL;
if (r3) {
a0.entityMetadata = value;
}
}
env0_4(_fun70905);
function _fun70905(a0) { // fn#70905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1548, offset: 0x01d0cd72, size: 28 bytes, params: 2, frame: 11
const object = {};
copyDataProperties(object, a0, undefined);
copyDataProperties(object, env0_0, environment);
return object;
}
}
function getChannelSelectorHeader(a0) { // fn#70906, offset: 0x01d0cd8e, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun70907;
function _fun70907() { // fn#70907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1597, offset: 0x01d0cda0, size: 63 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__;
return ((Component) => <Component screen={env0_0} onClose={onCloseModal} />)(EditGuildEventModalNavbar);
}
}
function render_70909() { // fn#70909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1809, offset: 0x01d0cddf, size: 86 bytes, params: 1, frame: 16
const value = environment.__proto__;
return ((Component) => <Component {...GuildScheduledEventsConstantsModule.GuildScheduledEventEntityTypes} {...{['guildEventId']: initialGuildEvent?.id}} />)(importDefault(9078) /* metro dependency 9078: EditGuildEventWhere */);
}
function render_70910() { // fn#70910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:2014, offset: 0x01d0ce35, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...GuildScheduledEventsConstantsModule.GuildScheduledEventEntityTypes} />)(EditGuildEventDetails);
}
function render_70911() { // fn#70911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:2186, offset: 0x01d0ce6a, size: 53 bytes, params: 1, frame: 14
const value = environment.__proto__;
return ((Component) => <Component {...GuildScheduledEventsConstantsModule.GuildScheduledEventEntityTypes} />)(EditGuildEventPreview);
}
}
return value3;
}
function _fun70907() { // fn#70907, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9259:1597, offset: 0x01d0cda0, size: 63 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__;
return ((Component) => <Component screen={env0_0} onClose={onCloseModal} />)(importDefault(9055) /* metro dependency 9055: EditGuildEventModalNavbar */);
}
global.__d(_fun70896, 9074, [5, 57, 31, 1385, 33, 4501, 697, 9038, 9047, 1848, 9037, 3869, 1244, 9042, 9075, 9055,
9078, 9119, 9120, 5280,
2]) /* metro module 9074, dependencies: [5, 57, 31, 1385, 33, 4501, 697, 9038, 9047, 1848, 9037, 3869, 1244, 9042, 9075, 9055, 9078, 9119, 9120, 5280, 2] */;
@@ -1,54 +1,80 @@
/* Metro module 9055; source: modules/guild_scheduled_events/native/components/EditGuildEventModalNavbar.tsx; dependencies: [57, 31, 27, 33, 4501, 9038, 1360, 6618, 4573, 1244, 5277, 8160, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as HeaderActionButtonNativeModule from '../../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
function _fun70799(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9240:6, offset: 0x01d08519, size: 275 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'flexDirection': 'row',
ReactModule;
const env0_7 = (CreateStylesModule).createStyles({header: {'flexDirection': 'row',
'alignItems': 'center', 'justifyContent': 'space-between', 'paddingHorizontal': 4, 'paddingVertical': 8},
headerTitle: {'lineHeight': 28, 'textTransform': 'uppercase'}, buttonContainer: {width: 60},
rightButton: {marginLeft: 12}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventModalNavbar.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventModalNavbar.tsx');
exports.default = EditGuildEventModalNavbar;
}
function EditGuildEventModalNavbar({screen, onClose}) { // fn#70800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9240:534, offset: 0x01d0862c, size: 574 bytes, params: 2, frame: 30
var r2;
const styles = useStyles();
const EditGuildEventScreens = (require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens;
const CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
if (CHANNEL_SELECTOR === screen) {
r2 = [1, 3];
} else if ((require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens.DETAILS === screen) {
r2 = [2, 3];
} else if ((require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens.PREVIEW === screen) {
r2 = [3, 3];
} else {
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(screen);
r2 = undefined;
function EditGuildEventModalNavbar({screen, onClose}) { // fn#70800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9240:534, offset: 0x01d0862c, size: 574 bytes, params: 2, frame: 30
var r2;
const styles = useStyles();
const EditGuildEventScreens = (require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens;
const CHANNEL_SELECTOR = EditGuildEventScreens.CHANNEL_SELECTOR;
if (CHANNEL_SELECTOR === screen) {
r2 = [1, 3];
} else if ((require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens.DETAILS === screen) {
r2 = [2, 3];
} else if ((require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens.PREVIEW === screen) {
r2 = [3, 3];
} else {
(require(1360) /* metro dependency 1360: GlobalUtils */).assertNever(screen);
r2 = undefined;
}
const value3 = Module00057(r2, 2);
const property = value3[0];
const property2 = value3[1];
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
let buttonContainer = styles.buttonContainer;
const items2 = [
<View style={buttonContainer} />,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<Text
style={styles.headerTitle}
variant="text-xs/bold"
color="text-default"
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['42HaFY'], {step: property,
total: property2})}
</Text>
);
buttonContainer = styles.buttonContainer;
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
items2[2] = (
<View style={buttonContainer}>
<HeaderActionButton
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
onPress={onClose}
source={importDefault(8160) /* metro dependency 8160 */}
style={styles.rightButton}
/>
</View>
);
return (
<SafeAreaPaddingView top style={styles.header}>
{items2}
</SafeAreaPaddingView>
);
}
const value3 = env0_3(r2, 2);
const property = value3[0];
const property2 = value3[1];
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
let buttonContainer = styles.buttonContainer;
const items2 = [<View style={buttonContainer} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.headerTitle} variant="text-xs/bold" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['42HaFY'],
{step: property, total: property2})}</Text>;
buttonContainer = styles.buttonContainer;
const HeaderActionButton = (require(5277) /* metro dependency 5277: HeaderActionButtonNative */).HeaderActionButton;
items2[2] = <View style={buttonContainer}><HeaderActionButton accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)} onPress={onClose} source={importDefault(8160) /* metro dependency 8160 */} style={styles.rightButton} /></View>;
return (
<SafeAreaPaddingView top style={styles.header}>
{items2}
</SafeAreaPaddingView>
);
}
global.__d(_fun70799, 9055, [57, 31, 27, 33, 4501, 9038, 1360, 6618, 4573, 1244, 5277, 8160,
2]) /* metro module 9055, dependencies: [57, 31, 27, 33, 4501, 9038, 1360, 6618, 4573, 1244, 5277, 8160, 2] */;
@@ -1,219 +1,249 @@
/* Metro module 9120; source: modules/guild_scheduled_events/native/components/EditGuildEventPreview.tsx; dependencies: [31, 27, 1379, 661, 33, 4501, 697, 477, 566, 4805, 9042, 9121, 1305, 1244, 4573, 9122, 9123, 9038, 6618, 9048, 4578, 9039, 4496, 9124, 1962, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as PlatformUtilsModule from '../../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as GuildEventCardComponentsModule from './GuildEventCardComponents.tsx'; /* Metro dependency 9048 */
import * as GuildEventUtilsModule from './GuildEventUtils.tsx'; /* Metro dependency 9121 */
function _fun71455(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71455, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:6, offset: 0x01d2068f, size: 744 bytes, params: 8, frame: 27
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const value = 0;
const env0_3 = importAll(dependencyMap[value]);
const env0_4 = (require(27) /* metro dependency 27 */).View;
const value2 = 2;
const env0_5 = importDefault(dependencyMap[value2]);
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const Fonts = (ConstantsModule).Fonts;
const createStyles = CreateStylesModule.createStyles;
object = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {'flex': 1, 'padding': 16, 'paddingBottom': 0, 'backgroundColor': null,
object.container = {'flex': 1, 'padding': 16, 'paddingBottom': 0, 'backgroundColor': null,
'flexDirection': 'column', 'height': '100%', 'overflow': 'visible', backgroundColor: BACKGROUND_BASE_LOW};
object2.centered = {'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center'};
object2.centerContainer = {'flexGrow': 0, 'width': '100%'};
object2.flex = {'flex': 1, 'overflow': 'visible'};
object2.header = {'alignItems': 'center', 'paddingBottom': 24};
const object4 = {'fontSize': 24, 'fontFamily': null, 'lineHeight': 30, 'marginTop': 16, 'marginBottom': 8};
object.centered = {'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center'};
object.centerContainer = {'flexGrow': 0, 'width': '100%'};
object.flex = {'flex': 1, 'overflow': 'visible'};
object.header = {'alignItems': 'center', 'paddingBottom': 24};
const object3 = {'fontSize': 24, 'fontFamily': null, 'lineHeight': 30, 'marginTop': 16, 'marginBottom': 8};
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object4.fontFamily = PRIMARY_BOLD;
object3.fontFamily = PRIMARY_BOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object4.color = MOBILE_TEXT_HEADING_PRIMARY;
object2.headerTitle = object4;
object2.headerSubtitle = {textAlign: 'center'};
const object7 = {'padding': 16, 'backgroundColor': null, 'marginBottom': 24, 'borderColor': null, 'borderWidth': 1,
object3.color = MOBILE_TEXT_HEADING_PRIMARY;
object.headerTitle = object3;
object.headerSubtitle = {textAlign: 'center'};
const object5 = {'padding': 16, 'backgroundColor': null, 'marginBottom': 24, 'borderColor': null, 'borderWidth': 1,
'borderRadius': null, 'shadowOpacity': 0.2, 'elevation': 2, 'shadowRadius': 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object7.backgroundColor = BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object7.borderColor = BORDER_SUBTLE;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object7.shadowOffset = {'height': 8, 'width': 0};
object7.overflow = 'visible';
object2.eventContainer = object7;
object2.channelContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center',
'height': 14};
const object9 = {'tintColor': null, 'marginRight': 4, 'height': 14};
object5.borderColor = BORDER_SUBTLE;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
object5.shadowOffset = {'height': 8, 'width': 0};
object5.overflow = 'visible';
object.eventContainer = object5;
object.channelContainer = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'height': 14};
const object6 = {'tintColor': null, 'marginRight': 4, 'height': 14};
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object9.tintColor = TEXT_SUBTLE;
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
object9.transform = [{translateY: platformUtilsModule.isAndroid() ? value2 : value}];
object2.channelIcon = object9;
object2.buttonContainer = {'position': 'absolute', 'bottom': 16, 'left': 0, 'right': 0};
const object10 = {'paddingBottom': 8, 'fontSize': 14};
object6.tintColor = TEXT_SUBTLE;
object6.transform = [{translateY: PlatformUtilsModule.isAndroid() ? value2 : value}];
object.channelIcon = object6;
object.buttonContainer = {'position': 'absolute', 'bottom': 16, 'left': 0, 'right': 0};
const object8 = {'paddingBottom': 8, 'fontSize': 14};
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
object10.fontFamily = PRIMARY_MEDIUM;
object8.fontFamily = PRIMARY_MEDIUM;
const RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object10.color = RED_400;
object2.error = object10;
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventPreview.tsx');
object8.color = RED_400;
object.error = object8;
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventPreview.tsx');
exports.default = EditGuildEventPreview;
}
function PreviewBody({event}) { // fn#71456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:1394, offset: 0x01d20977, size: 635 bytes, params: 2, frame: 32
var r11;
var formatToPlainString;
var sxcQPE;
var object;
const styles = useStyles();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channel_id);
}, [event.channel_id]);
const r14 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(value3) ?? (require(9042) /* metro dependency 9042: EntityUtils */).getLocationFromEvent(event);
const env0_3 = (require(9121) /* metro dependency 9121: GuildEventUtils */).getEventLocationIconSource(event,
value3, true);
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const legacyText = <LegacyText style={styles.headerTitle}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBsFE3)}</LegacyText>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
if (value3 != null) {
formatToPlainString = intl.formatToPlainString;
sxcQPE = (require(1244) /* metro dependency 1244: indexNative */).t.sxcQPE;
object = {};
object.channelName = (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: value3});
r11 = Reflect.apply(formatToPlainString, intl, [sxcQPE, object]);
} else {
r11 = undefined;
}
return (
<View style={styles.header}>
{legacyText}
<Text
style={styles.headerSubtitle}
accessibilityLabel={r11}
variant="text-sm/medium"
color="text-default"
>
{value3 != null ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.f55NX0,
{channelName: r14,
channelHook: channelHook}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.KDPFi9)}
</Text>
</View>
);
}
function EditGuildEventPreview({guild, initialGuildEvent, guildEvent, isEdit, loading, error, onSave}) { // fn#71459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:2587, offset: 0x01d20d2a, size: 738 bytes, params: 2, frame: 38
const env0_3 = isEdit;
const styles = useStyles();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r17 = isEdit ? Reflect.apply(string, intl, [t.e5VEcE]) : Reflect.apply(string, intl, [t['60lJ0C']]);
const value4 = env0_3.useMemo(_fun71460, [guildEvent, guild.id]);
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const items3 = [styles.flex];
items3[1] = styles.centered;
const GuildEventCardImageHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardImageHeader;
const items2 = [<GuildEventCardImageHeader event={value4} />];
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
items2[1] = <GuildEventCardHeader event={value4} isPreview />;
const GuildEventCardMetaInfo = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardMetaInfo;
items2[2] = <GuildEventCardMetaInfo event={value4} />;
const GuildEventSimpleLocation = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventSimpleLocation;
items2[3] = <GuildEventSimpleLocation event={value4} />;
const view = <View style={styles.centerContainer}><View style={styles.eventContainer}>{items2}</View><PreviewBody event={value4} /></View>;
const r13 = error != null ? ((LegacyText) => <LegacyText style={styles.error}>{error.getAnyErrorMessage()}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText) : null;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<SafeAreaPaddingView bottom style={styles.container}>
<View style={items3}>
{view}
<View style={styles.buttonContainer}>
{r13}
<Button
text={r17}
variant="primary"
onPress={onPress_71461}
disabled={loading}
loading={loading}
/>
</View>
</View>
</SafeAreaPaddingView>
);
}
function channelHook() { // fn#71458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:2042, owner: PreviewBody.channelHook, offset: 0x01d20bf2, size: 312 bytes, params: 1, frame: 28
var r10;
let value = environment.__proto__;
const Fragment = env1_3.Fragment;
const value3 = null;
const view = <View style={styles.channelContainer}>{value3 != env0_3 && ((Icon) => <Icon source={env0_3} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
if (value3 != env0_2) {
value = require(9123) /* metro dependency 9123: guildEventDetailsParserNative */;
value = value.guildEventDetailsParser(env0_2, true);
r10 = value;
} else {
r10 = value3;
}
return (
<Fragment key={value3 != env0_2 ? env0_2 : 'preview-body'}>
{view}
<Text
accessibilityElementsHidden
importantForAccessibility="no"
variant="text-sm/medium"
color="text-default"
>
{r10}
</Text>
</Fragment>
);
}
function _fun71460() { // fn#71460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:2808, offset: 0x01d2100c, size: 55 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9038) /* metro dependency 9038: EditGuildEventUtils */;
return value.convertToFakeGuildEvent(guildEvent, guild.id);
}
function EditGuildEventPreviewOnPress() { // fn#71461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3460, owner: EditGuildEventPreview.onPress, offset: 0x01d21043, size: 137 bytes, params: 1, frame: 16
var environment;
var value2;
var moduleValue;
var value;
if (guildEvent.recurrenceRule == null) {
onSave();
} else if (isEdit) {
value2 = environment.__proto__;
moduleValue = require(9039) /* metro dependency 9039: ScheduleUtils */;
if (moduleValue.hasScheduleChanges(initialGuildEvent, guildEvent)) {
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_71462});
function PreviewBody({event}) { // fn#71456, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:1394, offset: 0x01d20977, size: 635 bytes, params: 2, frame: 32
var r11;
var formatToPlainString;
var sxcQPE;
var object2;
const styles = useStyles();
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([channelStore], function() {
return channelStore.getChannel(channel_id);
}, [event.channel_id]);
const r14 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(value3) ?? (require(9042) /* metro dependency 9042: EntityUtils */).getLocationFromEvent(event);
const env0_3 = (GuildEventUtilsModule).getEventLocationIconSource(event,
value3, true);
const LegacyText = (NativeModule).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const legacyText = (
<LegacyText style={styles.headerTitle}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yBsFE3)}
</LegacyText>
);
const Text = (TextModule).Text;
if (value3 != null) {
formatToPlainString = intl.formatToPlainString;
sxcQPE = (require(1244) /* metro dependency 1244: indexNative */).t.sxcQPE;
object2 = {};
object2.channelName = (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: value3});
r11 = Reflect.apply(formatToPlainString, intl, [sxcQPE, object2]);
} else {
onSave();
r11 = undefined;
}
} else {
onSave();
return (
<View style={styles.header}>
{legacyText}
<Text
style={styles.headerSubtitle}
accessibilityLabel={r11}
variant="text-sm/medium"
color="text-default"
>
{value3 != null ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.f55NX0,
{channelName: r14,
channelHook: channelHook}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.KDPFi9)}
</Text>
</View>
);
function channelHook() { // fn#71458, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:2042, owner: PreviewBody.channelHook, offset: 0x01d20bf2, size: 312 bytes, params: 1, frame: 28
var r10;
let value = environment.__proto__;
const Fragment = env1_3.Fragment;
const value3 = null;
const view = (
<View style={styles.channelContainer}>
{value3 != env0_3 && ((Icon) => <Icon source={env0_3} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.EXTRA_SMALL} style={styles.channelIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</View>
);
const Text = (TextModule).Text;
if (value3 != env0_2) {
value = require(9123) /* metro dependency 9123: guildEventDetailsParserNative */;
value = value.guildEventDetailsParser(env0_2, true);
r10 = value;
} else {
r10 = value3;
}
return (
<Fragment key={value3 != env0_2 ? env0_2 : 'preview-body'}>
{view}
<Text
accessibilityElementsHidden
importantForAccessibility="no"
variant="text-sm/medium"
color="text-default"
>
{r10}
</Text>
</Fragment>
);
}
}
function EditGuildEventPreview({guild, initialGuildEvent, guildEvent, isEdit, loading, error, onSave}) { // fn#71459, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:2587, offset: 0x01d20d2a, size: 738 bytes, params: 2, frame: 38
const isEdit2 = isEdit;
const styles = useStyles();
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const r17 = isEdit ? Reflect.apply(string, intl, [t.e5VEcE]) : Reflect.apply(string, intl, [t['60lJ0C']]);
const value4 = isEdit2.useMemo(_fun71460, [guildEvent, guild.id]);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const items3 = [styles.flex];
items3[1] = styles.centered;
const GuildEventCardImageHeader = (GuildEventCardComponentsModule).GuildEventCardImageHeader;
const items2 = [
<GuildEventCardImageHeader event={value4} />,
];
const GuildEventCardHeader = (GuildEventCardComponentsModule).GuildEventCardHeader;
items2[1] = <GuildEventCardHeader event={value4} isPreview />;
const GuildEventCardMetaInfo = (GuildEventCardComponentsModule).GuildEventCardMetaInfo;
items2[2] = <GuildEventCardMetaInfo event={value4} />;
const GuildEventSimpleLocation = (GuildEventCardComponentsModule).GuildEventSimpleLocation;
items2[3] = <GuildEventSimpleLocation event={value4} />;
const view = (
<View style={styles.centerContainer}>
<View style={styles.eventContainer}>
{items2}
</View>
<PreviewBody event={value4} />
</View>
);
const r13 = (
error != null
? ((LegacyText) => <LegacyText style={styles.error}>{error.getAnyErrorMessage()}</LegacyText>)((require(1305) /* metro dependency 1305: native */).LegacyText)
: null
);
const Button = (ButtonNativeModule).Button;
return (
<SafeAreaPaddingView bottom style={styles.container}>
<View style={items3}>
{view}
<View style={styles.buttonContainer}>
{r13}
<Button
text={r17}
variant="primary"
onPress={onPress_71461}
disabled={loading}
loading={loading}
/>
</View>
</View>
</SafeAreaPaddingView>
);
function _fun71460() { // fn#71460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:2808, offset: 0x01d2100c, size: 55 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9038) /* metro dependency 9038: EditGuildEventUtils */;
return value.convertToFakeGuildEvent(guildEvent, guild.id);
}
function EditGuildEventPreviewOnPress() { // fn#71461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3460, owner: EditGuildEventPreview.onPress, offset: 0x01d21043, size: 137 bytes, params: 1, frame: 16
var environment;
var value2;
var moduleValue;
var value;
if (guildEvent.recurrenceRule == null) {
onSave();
} else if (isEdit) {
value2 = environment.__proto__;
moduleValue = require(9039) /* metro dependency 9039: ScheduleUtils */;
if (moduleValue.hasScheduleChanges(initialGuildEvent, guildEvent)) {
value = importDefault(4496) /* metro dependency 4496: AlertActionCreators */;
value.openLazy({importer: importer_71462});
} else {
onSave();
}
} else {
onSave();
}
function onPressImporter_71462() { // fn#71462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3553, owner: EditGuildEventPreview.onPress.importer, offset: 0x01d210cc, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[24]);
value = value(dependencyMap[23], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun71464;
});
function _fun71463({default: env0_0}) { // fn#71463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3587, offset: 0x01d2110c, size: 23 bytes, params: 2, frame: 2
return _fun71464;
function _fun71464(a0) { // fn#71464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3602, offset: 0x01d21123, size: 52 bytes, params: 2, frame: 14
return ((Component) => <Component {...a0} {...{['onConfirm']: onSave}} />)(env0_0);
}
}
}
}
}
}
function onPressImporter_71462() { // fn#71462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3553, owner: EditGuildEventPreview.onPress.importer, offset: 0x01d210cc, size: 64 bytes, params: 1, frame: 13
var environment;
let value = environment.__proto__.__proto__;
value = require(dependencyMap[24]);
value = value(dependencyMap[23], dependencyMap.paths);
return value.then(function({default: env0_0}) {
return _fun71464;
});
}
function _fun71463({default: env0_0}) { // fn#71463, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3587, offset: 0x01d2110c, size: 23 bytes, params: 2, frame: 2
return _fun71464;
}
function _fun71464(a0) { // fn#71464, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9305:3602, offset: 0x01d21123, size: 52 bytes, params: 2, frame: 14
return ((Component) => <Component {...a0} {...{['onConfirm']: onSave}} />)(env0_0);
}
global.__d(_fun71455, 9120, [31, 27, 1379, 661, 33, 4501, 697, 477, 566, 4805, 9042, 9121, 1305, 1244, 4573, 9122,
9123, 9038, 6618, 9048, 4578, 9039, 4496, 9124, 1962,
2]) /* metro module 9120, dependencies: [31, 27, 1379, 661, 33, 4501, 697, 477, 566, 4805, 9042, 9121, 1305, 1244, 4573, 9122, 9123, 9038, 6618, 9048, 4578, 9039, 4496, 9124, 1962, 2] */;
@@ -1,140 +1,171 @@
/* Metro module 9053; source: modules/guild_scheduled_events/native/components/EditGuildEventRecurrenceModal.tsx; dependencies: [5, 57, 31, 33, 4501, 697, 9044, 9039, 9047, 1848, 9054, 4578, 1244, 9055, 9038, 9056, 9057, 4573, 5280, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseEventException from '../../useEventException.tsx'; /* Metro dependency 9044 */
import LazyAPIPromise from '../../../../utils/LazyAPIPromise.tsx'; /* Metro dependency 9047 */
import SaveGuildEventRecurrence from '../../saveGuildEventRecurrence.tsx'; /* Metro dependency 9054 */
import EditGuildEventModalNavbar from './EditGuildEventModalNavbar.tsx'; /* Metro dependency 9055 */
import EditGuildEventStepContainer from './EditGuildEventStepContainer.tsx'; /* Metro dependency 9056 */
import GuildEventSchedule from './GuildEventSchedule.tsx'; /* Metro dependency 9057 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as KeyboardManagerUtilsModule from '../../../../utils/native/KeyboardManagerUtils.tsx'; /* Metro dependency 1848 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as EditGuildEventUtilsModule from '../../utils/EditGuildEventUtils.tsx'; /* Metro dependency 9038 */
import * as ScheduleUtilsModule from '../../utils/ScheduleUtils.tsx'; /* Metro dependency 9039 */
function _fun70785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:6, offset: 0x01d07cdf, size: 265 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
const env0_9 = Reflect.apply(createStyles, value, [{cardStyle: {backgroundColor: BACKGROUND_BASE_LOW}}]);
object = {TIME: 'TIME'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventRecurrenceModal.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventRecurrenceModal.tsx');
exports.default = EditGuildEventRecurrenceModal;
}
function EditGuildEventRecurrenceModal({guildEvent, onCloseModal, recurrenceId}) { // fn#70786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:414, offset: 0x01d07de8, size: 558 bytes, params: 2, frame: 25
var object2;
const styles = useStyles();
const scheduleForRecurrenceWithException = (require(9039) /* metro dependency 9039: ScheduleUtils */).getScheduleForRecurrenceWithException((require(9039) /* metro dependency 9039: ScheduleUtils */).getBaseScheduleForRecurrence(recurrenceId,
guildEvent), (importDefault(9044) /* metro dependency 9044: useEventException */)(recurrenceId, guildEvent.id));
let binding = env0_6;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [scheduleForRecurrenceWithException]);
const binding2 = env0_5;
const value6 = binding2(value5, 2);
var env0_5 = value6[0];
var env0_6 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property = value7[0];
const env0_8 = value7[1];
const value8 = binding2((importDefault(9047) /* metro dependency 9047: LazyAPIPromise */)(_fun70787), 2);
const env0_9 = value8[0];
const error = value8[1].error;
const env0_10 = error;
const value9 = _fun70788();
binding.useEffect(_fun70793, [error]);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const env0_12 = <Button size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R3BPH+'])} onPress={value9} disabled={property != null} />;
object2 = {};
binding = env0_10;
let TIME = binding.TIME;
object2[TIME] = {title: '', customNavbar: customNavbar, headerLeft: function() {
return null;
}, render: render_70796, fullscreen: true};
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
TIME = binding.TIME;
return (
<Navigator
screens={object2}
initialRouteName={TIME}
cardShadowEnabled={false}
cardOverlayEnabled={false}
cardStyle={styles.cardStyle}
/>
);
}
function _fun70787() { // fn#70787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:716, offset: 0x01d08016, size: 78 bytes, params: 1, frame: 17
const value = environment.__proto__;
(importAll(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
return (importDefault(9054) /* metro dependency 9054: saveGuildEventRecurrence */)(guildEvent, recurrenceId, env0_5,
env0_3);
}
function _fun70788() { // fn#70788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:805, offset: 0x01d08064, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun70790);
return _fun70791;
}
function handleScheduleChange({startDate, endDate}) { // fn#70792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:976, owner: EditGuildEventRecurrenceModal.handleScheduleChange, offset: 0x01d08100, size: 110 bytes, params: 2, frame: 16
var r0;
let value = startDate != null;
if (value && endDate != null && endDate.isBefore(startDate)) {
value = startDate.clone();
value = value.add(1, 'hour');
r0 = value;
} else {
r0 = endDate;
}
env0_6({startDate: startDate, endDate: r0});
env0_8(null);
}
function _fun70793() { // fn#70793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:1114, offset: 0x01d0816e, size: 57 bytes, params: 1, frame: 14
const binding = env0_8;
const errorBinding = error;
const value2 = null;
const value3 = undefined;
const r3 = value2 == errorBinding ? value3 : error.getAnyErrorMessage();
binding(value2 != r3 ? r3 : value2);
return value3;
}
function customNavbar() { // fn#70794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:1337, owner: EditGuildEventRecurrenceModal.customNavbar, offset: 0x01d081a7, size: 84 bytes, params: 1, frame: 16
const EditGuildEventModalNavbar = importDefault(9055) /* metro dependency 9055: EditGuildEventModalNavbar */;
const EditGuildEventScreens = (require(9038) /* metro dependency 9038: EditGuildEventUtils */).EditGuildEventScreens;
const DETAILS = EditGuildEventScreens.DETAILS;
return <EditGuildEventModalNavbar screen={DETAILS} onClose={onCloseModal} />;
}
function EditGuildEventRecurrenceModalRender() { // fn#70796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:1438, owner: EditGuildEventRecurrenceModal.render, offset: 0x01d081fb, size: 196 bytes, params: 1, frame: 20
const value = environment.__proto__;
const EditGuildEventStepContainer = importDefault(9056) /* metro dependency 9056: EditGuildEventStepContainer */;
const defaultImportProps = {action: env0_12};
const value3 = ((Component) => <Component guildEvent={guildEvent} recurrenceId={recurrenceId} schedule={env0_5} onChange={handleScheduleChange} />)(importDefault(9057) /* metro dependency 9057: GuildEventSchedule */);
const value4 = null;
return (
<EditGuildEventStepContainer {...defaultImportProps}>
{value3}
{value4 != env0_7 ? ((Text) => <Text variant="text-md/normal" color="text-feedback-critical">{env0_7}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : value4}
</EditGuildEventStepContainer>
);
}
function* _fun70790() { // fn#70790, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:825, offset: 0x01d08093, size: 109 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__.__proto__;
if (Reflect.apply(env3_0(env3_3[7]).areSchedulesIdentical, value, [env2_5, env2_4])) {
importDefault();
} else {
var styles = useStyles();
yield styles;
value = undefined;
if (false) {
return value;
}
if (value != null) {
importDefault();
}
function EditGuildEventRecurrenceModal({guildEvent, onCloseModal, recurrenceId}) { // fn#70786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:414, offset: 0x01d07de8, size: 558 bytes, params: 2, frame: 25
const styles = useStyles();
const scheduleForRecurrenceWithException = (ScheduleUtilsModule).getScheduleForRecurrenceWithException((ScheduleUtilsModule).getBaseScheduleForRecurrence(recurrenceId,
guildEvent), (UseEventException)(recurrenceId, guildEvent.id));
let binding = env0_6;
let useState = binding.useState;
const value5 = Reflect.apply(useState, binding, [scheduleForRecurrenceWithException]);
const binding2 = env0_5;
const value6 = binding2(value5, 2);
var env0_5 = value6[0];
var env0_6 = value6[1];
useState = binding.useState;
const value7 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property = value7[0];
const env0_8 = value7[1];
const value8 = binding2((LazyAPIPromise)(_fun70787), 2);
const env0_9 = value8[0];
const error = value8[1].error;
const error2 = error;
const value9 = _fun70788();
binding.useEffect(_fun70793, [error]);
const Button = (ButtonNativeModule).Button;
const intl = (IndexNativeModule).intl;
const env0_12 = (
<Button
size="md"
text={intl.string((IndexNativeModule).t['R3BPH+'])}
onPress={value9}
disabled={property != null}
/>
);
object = {};
binding = error2;
let TIME = binding.TIME;
object[TIME] = {title: '', customNavbar: customNavbar, headerLeft: function() {
return null;
}, render: render_70796, fullscreen: true};
const Navigator = (NavigatorNativeModule).Navigator;
TIME = binding.TIME;
return (
<Navigator
screens={object}
initialRouteName={TIME}
cardShadowEnabled={false}
cardOverlayEnabled={false}
cardStyle={styles.cardStyle}
/>
);
function _fun70787() { // fn#70787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:716, offset: 0x01d08016, size: 78 bytes, params: 1, frame: 17
const value = environment.__proto__;
(KeyboardManagerUtilsModule).dismissGlobalKeyboard();
return (SaveGuildEventRecurrence)(guildEvent, recurrenceId, env0_5,
env0_3);
}
function _fun70788() { // fn#70788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:805, offset: 0x01d08064, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_4(_fun70790);
return _fun70791;
function* _fun70790() { // fn#70790, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:825, offset: 0x01d08093, size: 109 bytes, params: 1, frame: 16
if (true) {
value = environment.__proto__.__proto__.__proto__;
if (Reflect.apply(env3_0(env3_3[7]).areSchedulesIdentical, value, [env2_5, env2_4])) {
importDefault();
} else {
var styles = useStyles();
yield styles;
value = undefined;
if (false) {
return value;
}
if (value != null) {
importDefault();
}
}
}
}
function _fun70791() { // fn#70791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:909, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function handleScheduleChange({startDate, endDate}) { // fn#70792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:976, owner: EditGuildEventRecurrenceModal.handleScheduleChange, offset: 0x01d08100, size: 110 bytes, params: 2, frame: 16
var r0;
let value = startDate != null;
if (value && endDate != null && endDate.isBefore(startDate)) {
value = startDate.clone();
value = value.add(1, 'hour');
r0 = value;
} else {
r0 = endDate;
}
env0_6({startDate: startDate, endDate: r0});
env0_8(null);
}
function _fun70793() { // fn#70793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:1114, offset: 0x01d0816e, size: 57 bytes, params: 1, frame: 14
const binding = env0_8;
const errorBinding = error;
const value2 = null;
const value3 = undefined;
const r3 = value2 == errorBinding ? value3 : error.getAnyErrorMessage();
binding(value2 != r3 ? r3 : value2);
return value3;
}
function customNavbar() { // fn#70794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:1337, owner: EditGuildEventRecurrenceModal.customNavbar, offset: 0x01d081a7, size: 84 bytes, params: 1, frame: 16
const EditGuildEventScreens = (EditGuildEventUtilsModule).EditGuildEventScreens;
const DETAILS = EditGuildEventScreens.DETAILS;
return <EditGuildEventModalNavbar screen={DETAILS} onClose={onCloseModal} />;
}
function EditGuildEventRecurrenceModalRender() { // fn#70796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9238:1438, owner: EditGuildEventRecurrenceModal.render, offset: 0x01d081fb, size: 196 bytes, params: 1, frame: 20
const value = environment.__proto__;
const defaultImportProps = {action: env0_12};
const value3 = ((Component) => <Component guildEvent={guildEvent} recurrenceId={recurrenceId} schedule={env0_5} onChange={handleScheduleChange} />)(GuildEventSchedule);
const value4 = null;
return (
<EditGuildEventStepContainer {...defaultImportProps}>
{value3}
{
value4 != env0_7
? ((Text) => <Text variant="text-md/normal" color="text-feedback-critical">{env0_7}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: value4
}
</EditGuildEventStepContainer>
);
}
}
}
global.__d(_fun70785, 9053, [5, 57, 31, 33, 4501, 697, 9044, 9039, 9047, 1848, 9054, 4578, 1244, 9055, 9038, 9056,
9057, 4573, 5280,
2]) /* metro module 9053, dependencies: [5, 57, 31, 33, 4501, 697, 9044, 9039, 9047, 1848, 9054, 4578, 1244, 9055, 9038, 9056, 9057, 4573, 5280, 2] */;
@@ -1,56 +1,61 @@
/* Metro module 9056; source: modules/guild_scheduled_events/native/components/EditGuildEventStepContainer.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 5463, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import UseSafeAreaInsetsKeyboardAwareNative from '../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun70801(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9241:6, offset: 0x01d0886a, size: 347 bytes, params: 8, frame: 24
var object2;
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 value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.View;
const env0_5 = value2.ScrollView;
const value3 = require(33) /* metro dependency 33 */;
const env0_6 = value3.jsx;
const env0_7 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {'flex': 1, 'paddingHorizontal': 0, 'paddingVertical': 0, 'backgroundColor': null,
object.container = {'flex': 1, 'paddingHorizontal': 0, 'paddingVertical': 0, 'backgroundColor': null,
'flexDirection': 'column', 'height': '100%', backgroundColor: BACKGROUND_BASE_LOW};
object2.flex = {flex: 1};
object2.scroller = {paddingHorizontal: 16};
object.flex = {flex: 1};
object.scroller = {paddingHorizontal: 16};
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.buttonContainer = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'paddingHorizontal': 16,
object.buttonContainer = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'paddingHorizontal': 16,
'paddingVertical': 16, backgroundColor: BACKGROUND_BASE_LOW};
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.forwardRef(_fun70802);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventStepContainer.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventStepContainer.tsx');
exports.default = value;
}
function _fun70802({children, action}, a1) { // fn#70802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9241:563, offset: 0x01d089c5, size: 309 bytes, params: 3, frame: 25
const styles = useStyles();
const binding = env0_3;
const [property, env0_0] = env0_2(binding.useState(32), 2);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)().insets;
return (
<View style={styles.container}>
<ScrollView
ref={a1}
automaticallyAdjustContentInsets={false}
keyboardShouldPersistTaps="handled"
style={[styles.flex, {marginBottom: property + insets.bottom}]}
contentContainerStyle={styles.scroller}
>
{children}
</ScrollView>
<View
style={[styles.buttonContainer, {paddingBottom: insets.bottom}]}
onLayout={binding.useCallback(_fun70803, [])}
>
{action}
function _fun70802({children, action}, a1) { // fn#70802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9241:563, offset: 0x01d089c5, size: 309 bytes, params: 3, frame: 25
const styles = useStyles();
const binding = env0_3;
const [property, env0_0] = Module00057(binding.useState(32), 2);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)().insets;
return (
<View style={styles.container}>
<ScrollView
ref={a1}
automaticallyAdjustContentInsets={false}
keyboardShouldPersistTaps="handled"
style={[styles.flex, {marginBottom: property + insets.bottom}]}
contentContainerStyle={styles.scroller}
>
{children}
</ScrollView>
<View
style={[styles.buttonContainer, {paddingBottom: insets.bottom}]}
onLayout={binding.useCallback(_fun70803, [])}
>
{action}
</View>
</View>
</View>
);
);
function _fun70803({nativeEvent}) { // fn#70803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9241:683, offset: 0x01d08afa, size: 36 bytes, params: 2, frame: 11
env0_0(nativeEvent.layout.height);
}
}
}
global.__d(_fun70801, 9056, [57, 31, 27, 33, 4501, 697, 5463,
2]) /* metro module 9056, dependencies: [57, 31, 27, 33, 4501, 697, 5463, 2] */;
@@ -1,34 +1,55 @@
/* Metro module 9110; source: modules/guild_scheduled_events/native/components/EditGuildEventStepHeader.tsx; dependencies: [31, 27, 33, 4501, 4573, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun71261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9295:6, offset: 0x01d1b1c5, size: 241 bytes, params: 8, frame: 20
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 value = require(33) /* metro dependency 33 */;
const env0_3 = value.jsx;
const env0_4 = value.jsxs;
const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({header: {'alignItems': 'center',
ReactModule;
const env0_5 = (CreateStylesModule).createStyles({header: {'alignItems': 'center',
'paddingBottom': 24}, headerTitle: {'marginTop': 8, 'marginBottom': 8}, headerSubtitle: {textAlign: 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventStepHeader.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildEventStepHeader.tsx');
exports.default = EditGuildEventStepHeader;
function EditGuildEventStepHeader({title, subtitle}) { // fn#71262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9295:416, offset: 0x01d1b2b6, size: 218 bytes, params: 2, frame: 22
const Text = (TextModule).Text;
const styles = useStyles();
return (
<View style={styles.header}>
<Text
style={styles.headerTitle}
accessibilityRole="header"
variant="heading-xl/semibold"
color="mobile-text-heading-primary"
>
{title}
</Text>
{
subtitle != null
? (
subtitle === ''
? null
: (
<Text
style={styles.headerSubtitle}
variant="text-sm/medium"
color="text-default"
>
{subtitle}
</Text>
)
)
: null
}
</View>
);
}
}
function EditGuildEventStepHeader({title, subtitle}) { // fn#71262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9295:416, offset: 0x01d1b2b6, size: 218 bytes, params: 2, frame: 22
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const styles = useStyles();
return (
<View style={styles.header}>
<Text
style={styles.headerTitle}
accessibilityRole="header"
variant="heading-xl/semibold"
color="mobile-text-heading-primary"
>
{title}
</Text>
{subtitle != null ? subtitle === '' ? null : <Text style={styles.headerSubtitle} variant="text-sm/medium" color="text-default">{subtitle}</Text> : null}
</View>
);
}
global.__d(_fun71261, 9110, [31, 27, 33, 4501, 4573,
2]) /* metro module 9110, dependencies: [31, 27, 33, 4501, 4573, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,27 +1,31 @@
/* Metro module 9124; source: modules/guild_scheduled_events/native/components/EditGuildScheduledEventResetWarningAlert.tsx; dependencies: [31, 33, 4596, 1244, 2] */
import Alert from '../../../../components_native/common/Alert.tsx'; /* Metro dependency 4596 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun71474(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71474, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9309:6, offset: 0x01d21f7f, size: 138 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_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildScheduledEventResetWarningAlert.tsx');
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/EditGuildScheduledEventResetWarningAlert.tsx');
exports.default = EditGuildScheduledEventResetWarningAlert;
function EditGuildScheduledEventResetWarningAlert({onClose, onConfirm}) { // fn#71475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9309:255, offset: 0x01d22009, size: 298 bytes, params: 2, frame: 22
const object = {onClose: onClose, onConfirm: onConfirm};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aNCYas);
const format = intl.format;
const RWBa5X = (require(1244) /* metro dependency 1244: indexNative */).t.RWBa5X;
object.body = Reflect.apply(format, intl, [RWBa5X, {}]);
object.confirmText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cY+Oob']);
const Colors = Alert.Colors;
const GREEN = Colors.GREEN;
object.confirmColor = GREEN;
object.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
return <Alert {...object} />;
}
}
function EditGuildScheduledEventResetWarningAlert({onClose, onConfirm}) { // fn#71475, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9309:255, offset: 0x01d22009, size: 298 bytes, params: 2, frame: 22
const Alert = importDefault(4596) /* metro dependency 4596: Alert */;
const object2 = {onClose: onClose, onConfirm: onConfirm};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.title = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aNCYas);
const format = intl.format;
const RWBa5X = (require(1244) /* metro dependency 1244: indexNative */).t.RWBa5X;
object2.body = Reflect.apply(format, intl, [RWBa5X, {}]);
object2.confirmText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['cY+Oob']);
const Colors = Alert.Colors;
const GREEN = Colors.GREEN;
object2.confirmColor = GREEN;
object2.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC']);
return <Alert {...object2} />;
}
global.__d(_fun71474, 9124, [31, 33, 4596, 1244, 2]) /* metro module 9124, dependencies: [31, 33, 4596, 1244, 2] */;
@@ -1,72 +1,111 @@
/* Metro module 9227; source: modules/guild_scheduled_events/native/components/EndEventActionSheet.tsx; dependencies: [31, 27, 1385, 661, 33, 4501, 697, 9127, 4080, 9228, 8132, 1305, 1244, 4573, 4578, 9037, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import ScrollHandlingActionSheet from '../../../stage_channels/native/components/ScrollHandlingActionSheet.tsx'; /* Metro dependency 8132 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as GuildScheduledEventsConstantsModule from '../../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun72158(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:6, offset: 0x01d3c87b, size: 364 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).EXPLICIT_END_EVENT_SHEET_KEY;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
ReactModule;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'fontSize': 24, 'fontFamily': null, 'textAlign': 'center'};
const object2 = {'fontSize': 24, 'fontFamily': null, 'textAlign': 'center'};
const PRIMARY_BOLD = Fonts.PRIMARY_BOLD;
object.fontFamily = PRIMARY_BOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object.color = MOBILE_TEXT_HEADING_PRIMARY;
object2.fontFamily = PRIMARY_BOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.color = MOBILE_TEXT_HEADING_PRIMARY;
const env0_7 = Reflect.apply(createStyles, value, [{container: {'paddingVertical': 24, 'paddingHorizontal': 16,
'alignItems': 'center'}, title: object, subtitle: {'marginTop': 8, 'textAlign': 'center'},
'alignItems': 'center'}, title: object2, subtitle: {'marginTop': 8, 'textAlign': 'center'},
cancelButtonContainer: {'marginTop': 24, 'alignSelf': 'stretch'}, confirmButtonContainer: {'marginTop': 8,
'alignSelf': 'stretch'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/EndEventActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/EndEventActionSheet.tsx');
exports.default = EndEventActionSheet;
}
function EndEventActionSheet({channel}) { // fn#72159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:686, offset: 0x01d3c9e7, size: 606 bytes, params: 2, frame: 31
const styles = useStyles();
if ((require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useActiveEvent(channel.id) == null) {
return null;
}
const closure = onPress_72160;
const ScrollHandlingActionSheet = importDefault(8132) /* metro dependency 8132: ScrollHandlingActionSheet */;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items2 = [<LegacyText style={styles.title} accessibilityRole="header">{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['4Ao8LC']])}</LegacyText>];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
items2[1] = <Text style={styles.subtitle} variant="text-md/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0I0B8f'])}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const P60OAX = (require(1244) /* metro dependency 1244: indexNative */).t.P60OAX;
items2[2] = <View style={styles.cancelButtonContainer}><Button text={Reflect.apply(string, intl,
[P60OAX])} grow onPress={closure} /></View>;
items2[3] = <View style={styles.confirmButtonContainer}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mjB9pd)} variant="destructive" grow onPress={onPress_72161} /></View>;
return (
<ScrollHandlingActionSheet>
<View style={styles.container}>
{items2}
function EndEventActionSheet({channel}) { // fn#72159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:686, offset: 0x01d3c9e7, size: 606 bytes, params: 2, frame: 31
const styles = useStyles();
if ((require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useActiveEvent(channel.id) == null) {
return null;
}
const onPress_721602 = onPress_72160;
const LegacyText = (NativeModule).LegacyText;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items2 = [
<LegacyText style={styles.title} accessibilityRole="header">
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['4Ao8LC']])}
</LegacyText>,
];
const Text = (TextModule).Text;
items2[1] = (
<Text
style={styles.subtitle}
variant="text-md/medium"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0I0B8f'])}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const P60OAX = (require(1244) /* metro dependency 1244: indexNative */).t.P60OAX;
items2[2] = (
<View style={styles.cancelButtonContainer}>
<Button
text={Reflect.apply(string, intl, [P60OAX])}
grow
onPress={onPress_721602}
/>
</View>
</ScrollHandlingActionSheet>
);
}
);
items2[3] = (
<View style={styles.confirmButtonContainer}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mjB9pd)}
variant="destructive"
grow
onPress={onPress_72161}
/>
</View>
);
return (
<ScrollHandlingActionSheet>
<View style={styles.container}>
{items2}
</View>
</ScrollHandlingActionSheet>
);
function EndEventActionSheetOnPress() { // fn#72160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:808, owner: EndEventActionSheet.onPress, offset: 0x01d3cc45, size: 76 bytes, params: 1, frame: 14
let value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet(EXPLICIT_END_EVENT_SHEET_KEY);
value = require(9228) /* metro dependency 9228: CallsUtils */;
value.handleDisconnect(channel);
}
function EndEventActionSheetOnPress() { // fn#72160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:808, owner: EndEventActionSheet.onPress, offset: 0x01d3cc45, size: 76 bytes, params: 1, frame: 14
let value = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(EXPLICIT_END_EVENT_SHEET_KEY);
value = require(9228) /* metro dependency 9228: CallsUtils */;
value.handleDisconnect(channel);
}
function EndEventActionSheetOnPress_72161() { // fn#72161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:1469, owner: EndEventActionSheet.onPress, offset: 0x01d3cc91, size: 64 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
const endEvent = value.endEvent;
const binding = env0_1;
Reflect.apply(endEvent, value, [binding.id, binding.guild_id]);
onPress_72160();
}
}
function EndEventActionSheetOnPress_72161() { // fn#72161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9412:1469, owner: EndEventActionSheet.onPress, offset: 0x01d3cc91, size: 64 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
const endEvent = value.endEvent;
const binding = env0_1;
Reflect.apply(endEvent, value, [binding.id, binding.guild_id]);
onPress_72160();
}
global.__d(_fun72158, 9227, [31, 27, 1385, 661, 33, 4501, 697, 9127, 4080, 9228, 8132, 1305, 1244, 4573, 4578, 9037,
2]) /* metro module 9227, dependencies: [31, 27, 1385, 661, 33, 4501, 697, 9127, 4080, 9228, 8132, 1305, 1244, 4573, 4578, 9037, 2] */;
@@ -1,105 +1,130 @@
/* Metro module 9135; source: modules/guild_scheduled_events/native/components/GuildEventCard.tsx; dependencies: [31, 27, 4294, 4117, 1385, 33, 4501, 697, 9048, 6261, 566, 9038, 6239, 8128, 9136, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import RTCConnectionStore from '../../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as GuildScheduledEventsConstantsModule from '../../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as GuildScheduledEventStoreModule from '../../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as CardNativeModule from '../../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
import * as ButtonGroupNativeModule from '../../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
import * as EditGuildEventUtilsModule from '../../utils/EditGuildEventUtils.tsx'; /* Metro dependency 9038 */
import * as GuildEventCardComponentsModule from './GuildEventCardComponents.tsx'; /* Metro dependency 9048 */
function _fun71563(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71563, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:6, offset: 0x01d24787, size: 322 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const env0_5 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildScheduledEventActive;
const env0_6 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).AGE_VERIFICATION_STAGE_CHANNEL_TYPES;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const styles = Reflect.apply(createStyles, createStylesModule, [{actionContainer: {paddingTop: PX_16,
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const PX_16 = (Native).space.PX_16;
const styles = Reflect.apply(createStyles, CreateStylesModule, [{actionContainer: {paddingTop: PX_16,
paddingBottom: 0}}]);
value = value.memo(_fun71565);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventCard.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventCard.tsx');
exports.default = value;
exports.useGuildEventCardStyles = styles;
}
function GuildEventCardControls({event, isConnected, onCloseAction}) { // fn#71564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:334, offset: 0x01d248c9, size: 287 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).usePrimaryActionButtonType(event,
isConnected);
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
const GuildEventCardPrimaryAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardPrimaryAction;
const guildEventCardPrimaryAction = (
<GuildEventCardPrimaryAction
event={event}
onCloseAction={onCloseAction}
isConnected={isConnected}
/>
);
const PrimaryActionType = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).PrimaryActionType;
const START = PrimaryActionType.START;
const r6 = value2 === START && ((GuildEventCardRSVPAction) => <GuildEventCardRSVPAction event={event} />)((require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardRSVPAction);
const GuildEventShareAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventShareAction;
return (
<ButtonGroup direction="horizontal" style={styles.actionContainer}>
{guildEventCardPrimaryAction}
{r6}
<GuildEventShareAction event={event} />
</ButtonGroup>
);
}
function GuildEventCardControls({event, isConnected, onCloseAction}) { // fn#71564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:334, offset: 0x01d248c9, size: 287 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).usePrimaryActionButtonType(event,
isConnected);
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const GuildEventCardPrimaryAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardPrimaryAction;
const guildEventCardPrimaryAction = <GuildEventCardPrimaryAction event={event} onCloseAction={onCloseAction} isConnected={isConnected} />;
const PrimaryActionType = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).PrimaryActionType;
const START = PrimaryActionType.START;
const r6 = value2 === START && ((GuildEventCardRSVPAction) => <GuildEventCardRSVPAction event={event} />)((require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardRSVPAction);
const GuildEventShareAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventShareAction;
return (
<ButtonGroup direction="horizontal" style={styles.actionContainer}>
{guildEventCardPrimaryAction}
{r6}
<GuildEventShareAction event={event} />
</ButtonGroup>
);
}
function _fun71565({event, onPress, onCloseAction, hideControls, hideAgeVerificationNotice, isNew}) { // fn#71565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:768, offset: 0x01d249e8, size: 600 bytes, params: 2, frame: 35
var r8;
hideControls = !(hideControls === undefined) && hideControls;
hideAgeVerificationNotice = !(hideAgeVerificationNotice === undefined) && hideAgeVerificationNotice;
isNew = !(isNew === undefined) && isNew;
const channel_id = event.channel_id;
var value;
const r17 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], _fun71566,
[channel_id]) && isGuildScheduledEventActive(event);
const editGuildEventUtilsModule = require(9038) /* metro dependency 9038: EditGuildEventUtils */;
const value3 = editGuildEventUtilsModule.recurrenceRuleFromServer(event.recurrence_rule);
const closure = function() {
if (onPress != null) {
onPress(event);
function _fun71565({event, onPress, onCloseAction, hideControls, hideAgeVerificationNotice, isNew}) { // fn#71565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:768, offset: 0x01d249e8, size: 600 bytes, params: 2, frame: 35
var r8;
hideControls = !(hideControls === undefined) && hideControls;
hideAgeVerificationNotice = !(hideAgeVerificationNotice === undefined) && hideAgeVerificationNotice;
isNew = !(isNew === undefined) && isNew;
const channel_id = event.channel_id;
var value;
const r17 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], _fun71566,
[channel_id]) && isGuildScheduledEventActive(event);
const value3 = EditGuildEventUtilsModule.recurrenceRuleFromServer(event.recurrence_rule);
const closure = function() {
if (onPress != null) {
onPress(event);
}
};
const Card = (CardNativeModule).Card;
const GuildEventCardHeader = (GuildEventCardComponentsModule).GuildEventCardHeader;
const items2 = [
<GuildEventCardHeader event={event} isNew={isNew} />,
];
const GuildEventCardMetaInfo = (GuildEventCardComponentsModule).GuildEventCardMetaInfo;
items2[1] = <GuildEventCardMetaInfo event={event} onTitlePress={closure} />;
items2[2] = !hideAgeVerificationNotice && AGE_VERIFICATION_STAGE_CHANNEL_TYPES.has(event.entity_type) && ((Component) => <Component noBackground onConfirmPress={onCloseAction} channelId={channel_id} />)(importDefault(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */);
const GuildEventSimpleLocation = (GuildEventCardComponentsModule).GuildEventSimpleLocation;
items2[3] = <GuildEventSimpleLocation event={event} />;
items2[4] = (
hideControls
? null
: (
<GuildEventCardControls
event={event}
onCloseAction={onCloseAction}
isConnected={r17}
/>
)
);
const value10 = value3 != null;
if (value10) {
value = importDefault(9136) /* metro dependency 9136: GuildEventRecurrences */;
value = ((Component) => <Component guildId={event.guild_id} recurrenceRule={value3} guildEventId={event.id} onRecurrencePress={onRecurrencePress} />)(value);
r8 = value;
} else {
r8 = value10;
}
};
const Card = (require(6239) /* metro dependency 6239: CardNative */).Card;
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
const items2 = [<GuildEventCardHeader event={event} isNew={isNew} />];
const GuildEventCardMetaInfo = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardMetaInfo;
items2[1] = <GuildEventCardMetaInfo event={event} onTitlePress={closure} />;
items2[2] = !hideAgeVerificationNotice && AGE_VERIFICATION_STAGE_CHANNEL_TYPES.has(event.entity_type) && ((Component) => <Component noBackground onConfirmPress={onCloseAction} channelId={channel_id} />)(importDefault(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */);
const GuildEventSimpleLocation = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventSimpleLocation;
items2[3] = <GuildEventSimpleLocation event={event} />;
items2[4] = hideControls ? null : <GuildEventCardControls event={event} onCloseAction={onCloseAction} isConnected={r17} />;
const value10 = value3 != null;
if (value10) {
value = importDefault(9136) /* metro dependency 9136: GuildEventRecurrences */;
value = ((Component) => <Component guildId={event.guild_id} recurrenceRule={value3} guildEventId={event.id} onRecurrencePress={onRecurrencePress} />)(value);
r8 = value;
} else {
r8 = value10;
items2[5] = r8;
return (
<Card accessible={false} onPress={closure}>
<View>
{items2}
</View>
</Card>
);
function _fun71566() { // fn#71566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:928, offset: 0x01d24c40, size: 47 bytes, params: 1, frame: 10
var r0;
let value = environment.__proto__;
const isConnected2 = RTCConnectionStore.isConnected();
if (isConnected2) {
value = RTCConnectionStore.getChannelId();
value = value === channel_id;
r0 = value;
} else {
r0 = isConnected2;
}
return r0;
}
function onRecurrencePress(a0) { // fn#71568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:1567, offset: 0x01d24c6f, size: 39 bytes, params: 2, frame: 14
return onPress?.(event, a0);
}
}
items2[5] = r8;
return (
<Card accessible={false} onPress={closure}>
<View>
{items2}
</View>
</Card>
);
}
function _fun71566() { // fn#71566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:928, offset: 0x01d24c40, size: 47 bytes, params: 1, frame: 10
var r0;
let value = environment.__proto__;
const isConnected2 = RTCConnectionStore.isConnected();
if (isConnected2) {
value = RTCConnectionStore.getChannelId();
value = value === channel_id;
r0 = value;
} else {
r0 = isConnected2;
}
return r0;
}
function onRecurrencePress(a0) { // fn#71568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9320:1567, offset: 0x01d24c6f, size: 39 bytes, params: 2, frame: 14
return onPress?.(event, a0);
}
global.__d(_fun71563, 9135, [31, 27, 4294, 4117, 1385, 33, 4501, 697, 9048, 6261, 566, 9038, 6239, 8128, 9136,
2]) /* metro module 9135, dependencies: [31, 27, 4294, 4117, 1385, 33, 4501, 697, 9048, 6261, 566, 9038, 6239, 8128, 9136, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,299 +1,365 @@
/* Metro module 9058; source: modules/guild_scheduled_events/native/components/GuildEventModalComponents.tsx; dependencies: [31, 27, 1385, 661, 33, 4501, 7981, 1244, 9039, 4573, 8554, 1848, 4080, 9059, 1962, 9060, 9061, 9062, 6711, 9063, 9064, 8145, 6707, 7988, 7987, 7681, 3738, 9066, 4572, 2] */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import Module09060 from '../../../../by-id/module-09060.js'; /* Metro dependency 9060 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildScheduledEventsConstantsModule from '../../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as VoiceNormalIconModule from '../../../../design/components/Icon/native/redesign/generated/VoiceNormalIcon.tsx'; /* Metro dependency 6711 */
import * as TextAreaNativeModule from '../../../../design/components/TextInput/native/TextArea.native.tsx'; /* Metro dependency 7681 */
import * as TextInputNativeModule from '../../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
import * as TableRadioRowNativeModule from '../../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as NativeModule from '../../../../design/components/experimental/native.tsx'; /* Metro dependency 8554 */
import * as UseGuildsUserCanStartStageInModule from '../../useGuildsUserCanStartStageIn.tsx'; /* Metro dependency 9061 */
import * as LocationIconModule from '../../../../design/components/Icon/native/redesign/generated/LocationIcon.tsx'; /* Metro dependency 9064 */
function _fun70809(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:6, offset: 0x01d08ed9, size: 456 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
let value = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
let value = GuildScheduledEventsConstantsModule;
const env0_6 = value.GuildScheduledEventEntityTypes;
const env0_7 = value.GUILD_EVENT_MAX_DESCRIPTION_LENGTH;
const env0_8 = value.MAX_EVENT_LOCATION_LENGTH;
const env0_9 = value.GUILD_EVENT_MAX_NAME_LENGTH;
const env0_10 = (require(661) /* metro dependency 661: Constants */).GuildFeatures;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({formGroup: {paddingVertical: 8},
const env0_13 = (CreateStylesModule).createStyles({formGroup: {paddingVertical: 8},
formGroupSmall: {paddingVertical: 4}, formGroupLarge: {'paddingTop': 16, 'paddingBottom': 4},
dateInput: {'flexGrow': 1, 'flexShrink': 1, 'flexBasis': '60%'}, timeInput: {'flexGrow': 1, 'flexShrink': 1,
'flexBasis': '30%'}, formHeader: {marginBottom: 8}, header: {'display': 'flex', 'flexDirection': 'row',
'alignItems': 'center', 'marginBottom': 8}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventModalComponents.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventModalComponents.tsx');
exports.GuildEventTopic = GuildEventTopic;
exports.GuildEventLocation = GuildEventLocation;
exports.GuildEventRecurrence = GuildEventRecurrence;
exports.GuildEventEntityTypeSelection = GuildEventEntityTypeSelection;
exports.GuildEventDescription = GuildEventDescription;
exports.GuildEventDatetime = GuildEventDatetime;
}
function GuildEventTopic({topic, onChange}) { // fn#70810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:798, offset: 0x01d090a1, size: 274 bytes, params: 2, frame: 24
const styles = useStyles();
const TextInput = (TextInputNativeModule).TextInput;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.formGroupSmall}>
<TextInput
label={intl.string((IndexNativeModule).t['0HbEQ6'])}
accessibilityLabel={intl.string((IndexNativeModule).t['0HbEQ6'])}
placeholder={intl.string((IndexNativeModule).t['6/yars'])}
onChange={onChange}
value={topic}
maxLength={GUILD_EVENT_MAX_NAME_LENGTH}
autoFocus
isClearable
/>
</View>
);
}
function GuildEventTopic({topic, onChange}) { // fn#70810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:798, offset: 0x01d090a1, size: 274 bytes, params: 2, frame: 24
const styles = useStyles();
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.formGroupSmall}>
<TextInput
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0HbEQ6'])}
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0HbEQ6'])}
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6/yars'])}
function GuildEventLocation({location, onChange, onFocus}) { // fn#70811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1165, offset: 0x01d091b3, size: 233 bytes, params: 2, frame: 25
const styles = useStyles();
const TextInput = (TextInputNativeModule).TextInput;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.formGroupLarge}>
<TextInput
label={intl.string((IndexNativeModule).t.yx785A)}
placeholder={intl.string((IndexNativeModule).t.mkCMia)}
value={location}
maxLength={MAX_EVENT_LOCATION_LENGTH}
onChange={onChange}
onFocus={onFocus}
isClearable
/>
</View>
);
}
function GuildEventRecurrence({startDate, recurrenceRule, onRecurrenceChange}) { // fn#70812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1481, offset: 0x01d0929c, size: 491 bytes, params: 2, frame: 26
const styles = useStyles();
const env0_3 = ReactModule.useMemo(_fun70813, [recurrenceRule, startDate]);
const label = (require(9039) /* metro dependency 9039: ScheduleUtils */).getRecurrenceOptions(startDate).find(_fun70814)?.label;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const view = (
<View style={styles.header}>
<Text variant="text-sm/semibold" color="text-subtle">
{intl.string((IndexNativeModule).t['59TVxL'])}
</Text>
</View>
);
const InputButton = (NativeModule).InputButton;
return (
<View style={styles.formGroup}>
{view}
<InputButton
onPress={onPress_70815}
text={intl.string((IndexNativeModule).t['59TVxL'])}
value={label}
icon={Module09060}
iconPosition="end"
accessibilityLabel={intl.string((IndexNativeModule).t['59TVxL'])}
accessibilityHint={label}
/>
</View>
);
function _fun70813() { // fn#70813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1589, offset: 0x01d09487, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9039) /* metro dependency 9039: ScheduleUtils */;
return value.recurrenceRuleToOption(startDate, recurrenceRule);
}
function _fun70814({value}) { // fn#70814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1690, offset: 0x01d094b9, size: 21 bytes, params: 2, frame: 2
return value === env0_3;
}
function GuildEventRecurrenceOnPress() { // fn#70815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1941, owner: GuildEventRecurrence.onPress, offset: 0x01d094ce, size: 201 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
importAll(dependencyMap[11]).dismissGlobalKeyboard();
const defaultImport = importDefault(dependencyMap[12]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[14]);
value = value(dependencyMap[13], dependencyMap.paths);
const object = {};
const intl = require(dependencyMap[7]).intl;
object.title = intl.string(require(dependencyMap[7]).t['59TVxL']);
object.items = ReactModule;
object.onItemSelect = onItemSelect;
object.selectedItem = env0_3;
object.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value, 'SelectRecurrenceOption', object]);
function onItemSelect(a0) { // fn#70816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:2115, owner: GuildEventRecurrence.onPress.onItemSelect, offset: 0x01d09597, size: 52 bytes, params: 2, frame: 12
let value = environment.__proto__;
onRecurrenceChange(a0);
value = environment.__proto__.__proto__;
(ActionSheetActionCreators).hideActionSheet();
}
}
}
function GuildEventEntityTypeSelection({guild, entityType, disabled, onChange}) { // fn#70817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:2387, offset: 0x01d095cb, size: 698 bytes, params: 2, frame: 26
var unshift;
const value2 = (UseGuildsUserCanStartStageInModule).useChannelsUserCanStartStageIn(guild);
let object = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const BVZqJl = t.BVZqJl;
object.name = Reflect.apply(string, intl, [BVZqJl]);
const VOICE = GuildScheduledEventEntityTypes.VOICE;
object.value = VOICE;
object.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['EV//4f']);
object.icon = importDefault(9062) /* metro dependency 9062 */;
const VoiceNormalIcon = (VoiceNormalIconModule).VoiceNormalIcon;
object.IconComponent = VoiceNormalIcon;
object.disabled = disabled;
const items2 = [object];
object = {};
object.name = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w7ipbz);
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
object.value = EXTERNAL;
string = intl.string;
const DYxrHm = (require(1244) /* metro dependency 1244: indexNative */).t.DYxrHm;
object.description = Reflect.apply(string, intl, [DYxrHm]);
object.icon = importDefault(9063) /* metro dependency 9063 */;
const LocationIcon = (LocationIconModule).LocationIcon;
object.IconComponent = LocationIcon;
object.disabled = disabled;
items2[1] = object;
const features = guild.features;
const has = features.has;
const COMMUNITY = GuildFeatures.COMMUNITY;
if (Reflect.apply(has, features, [COMMUNITY])) {
unshift = items2.unshift;
object = {};
object.name = intl.string(t.EErMzA);
object.value = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
object.description = intl.string(t.LgALpp);
object.icon = importDefault(8145) /* metro dependency 8145 */;
object.IconComponent = (require(6707) /* metro dependency 6707: StageIcon */).StageIcon;
object.disabled = value2.length === 0 || disabled;
Reflect.apply(unshift, items2, [object]);
}
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
return (
<TableRadioGroup
defaultValue={entityType}
onChange={onChange}
value={topic}
maxLength={GUILD_EVENT_MAX_NAME_LENGTH}
autoFocus
isClearable
/>
</View>
);
}
hasIcons
>
{items2.map(_fun70818)}
</TableRadioGroup>
);
function _fun70818({name, value, description, IconComponent, disabled}) { // fn#70818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3193, offset: 0x01d09885, size: 103 bytes, params: 2, frame: 20
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={name}
subLabel={description}
value={value}
icon={<IconComponent />}
disabled={disabled}
key={name}
/>
);
}
function GuildEventLocation({location, onChange, onFocus}) { // fn#70811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1165, offset: 0x01d091b3, size: 233 bytes, params: 2, frame: 25
const styles = useStyles();
const TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.formGroupLarge}>
<TextInput
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yx785A)}
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mkCMia)}
value={location}
maxLength={MAX_EVENT_LOCATION_LENGTH}
onChange={onChange}
onFocus={onFocus}
isClearable
/>
</View>
);
}
function GuildEventRecurrence({startDate, recurrenceRule, onRecurrenceChange}) { // fn#70812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1481, offset: 0x01d0929c, size: 491 bytes, params: 2, frame: 26
const styles = useStyles();
const env0_3 = env0_4.useMemo(_fun70813, [recurrenceRule, startDate]);
const label = (require(9039) /* metro dependency 9039: ScheduleUtils */).getRecurrenceOptions(startDate).find(_fun70814)?.label;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = <View style={styles.header}><Text variant="text-sm/semibold" color="text-subtle">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['59TVxL'])}</Text></View>;
const InputButton = (require(8554) /* metro dependency 8554: native */).InputButton;
return (
<View style={styles.formGroup}>
{view}
<InputButton
onPress={onPress_70815}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['59TVxL'])}
value={label}
icon={importDefault(9060) /* metro dependency 9060 */}
iconPosition="end"
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['59TVxL'])}
accessibilityHint={label}
/>
</View>
);
}
function GuildEventEntityTypeSelection({guild, entityType, disabled, onChange}) { // fn#70817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:2387, offset: 0x01d095cb, size: 698 bytes, params: 2, frame: 26
var unshift;
const value2 = (require(9061) /* metro dependency 9061: useGuildsUserCanStartStageIn */).useChannelsUserCanStartStageIn(guild);
let object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const BVZqJl = t.BVZqJl;
object2.name = Reflect.apply(string, intl, [BVZqJl]);
const VOICE = GuildScheduledEventEntityTypes.VOICE;
object2.value = VOICE;
object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['EV//4f']);
object2.icon = importDefault(9062) /* metro dependency 9062 */;
const VoiceNormalIcon = (require(6711) /* metro dependency 6711: VoiceNormalIcon */).VoiceNormalIcon;
object2.IconComponent = VoiceNormalIcon;
object2.disabled = disabled;
const items2 = [object2];
object2 = {};
object2.name = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.w7ipbz);
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
object2.value = EXTERNAL;
string = intl.string;
const DYxrHm = (require(1244) /* metro dependency 1244: indexNative */).t.DYxrHm;
object2.description = Reflect.apply(string, intl, [DYxrHm]);
object2.icon = importDefault(9063) /* metro dependency 9063 */;
const LocationIcon = (require(9064) /* metro dependency 9064: LocationIcon */).LocationIcon;
object2.IconComponent = LocationIcon;
object2.disabled = disabled;
items2[1] = object2;
const features = guild.features;
const has = features.has;
const COMMUNITY = GuildFeatures.COMMUNITY;
if (Reflect.apply(has, features, [COMMUNITY])) {
unshift = items2.unshift;
object2 = {};
object2.name = intl.string(t.EErMzA);
object2.value = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
object2.description = intl.string(t.LgALpp);
object2.icon = importDefault(8145) /* metro dependency 8145 */;
object2.IconComponent = (require(6707) /* metro dependency 6707: StageIcon */).StageIcon;
object2.disabled = value2.length === 0 || disabled;
Reflect.apply(unshift, items2, [object2]);
}
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
return (
<TableRadioGroup
defaultValue={entityType}
onChange={onChange}
hasIcons
>
{items2.map(_fun70818)}
</TableRadioGroup>
);
}
function GuildEventDescription({description, onChange, onFocus}) { // fn#70819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3364, offset: 0x01d098ec, size: 263 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = env0_4.useRef(null);
const TextArea = (require(7681) /* metro dependency 7681: TextAreaNative */).TextArea;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.formGroupSmall} ref={value2}>
<TextArea
label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['+gRCC7'])}
maxLength={GUILD_EVENT_MAX_DESCRIPTION_LENGTH}
placeholder={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['kWO/E8'])}
onChange={onChange}
onFocus={onFocus_70820}
value={description}
/>
</View>
);
}
function GuildEventDescription({description, onChange, onFocus}) { // fn#70819, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3364, offset: 0x01d098ec, size: 263 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = ReactModule.useRef(null);
const TextArea = (TextAreaNativeModule).TextArea;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.formGroupSmall} ref={value2}>
<TextArea
label={intl.string((IndexNativeModule).t['+gRCC7'])}
maxLength={GUILD_EVENT_MAX_DESCRIPTION_LENGTH}
placeholder={intl.string((IndexNativeModule).t['kWO/E8'])}
onChange={onChange}
onFocus={onFocus_70820}
value={description}
/>
</View>
);
function GuildEventDescriptionOnFocus() { // fn#70820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3662, owner: GuildEventDescription.onFocus, offset: 0x01d099f3, size: 32 bytes, params: 1, frame: 11
if (onFocus != null) {
onFocus(env0_1);
}
}
function GuildEventDatetime({dateLabel, timeLabel, date = importDefault(dependencyMap[26])(), minimumDate, maximumDate, disabled, onChange = function() {
}}) { // fn#70821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3716, offset: 0x01d09a13, size: 598 bytes, params: 2, frame: 31
var value;
if (maximumDate === undefined) {
value = (importDefault(3738) /* metro dependency 3738 */)();
value = value.add(30, 'days');
value = value.endOf('month');
}
const styles = useStyles();
const closure = function(a0) {
var env0_0 = a0;
return _fun70824;
};
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
value = <Text style={styles.formHeader} variant="text-sm/semibold" color="text-subtle">{dateLabel}</Text>;
const InputButton = (require(8554) /* metro dependency 8554: native */).InputButton;
value = <View style={styles.dateInput}>{value}<InputButton text={dateLabel} value={date.format('MMM Do YYYY')} onPress={closure('date')} disabled={disabled} /></View>;
const items2 = [value];
items2[1] = <View style={styles.timeInput}><Text style={styles.formHeader} variant="text-sm/semibold" color="text-subtle">{timeLabel}</Text><InputButton text={timeLabel} value={date.format('LT')} onPress={closure('time')} disabled={disabled} /></View>;
return (
<View style={styles.formGroup}>
<Stack direction="horizontal" spacing={16}>
{items2}
</Stack>
</View>
);
}
function _fun70813() { // fn#70813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1589, offset: 0x01d09487, size: 50 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(9039) /* metro dependency 9039: ScheduleUtils */;
return value.recurrenceRuleToOption(startDate, recurrenceRule);
}
function GuildEventDatetime({dateLabel, timeLabel, date = importDefault(dependencyMap[26])(), minimumDate, maximumDate, disabled, onChange = function() {
}}) { // fn#70821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3716, offset: 0x01d09a13, size: 598 bytes, params: 2, frame: 31
var value;
if (maximumDate === undefined) {
value = (importDefault(3738) /* metro dependency 3738 */)();
value = value.add(30, 'days');
value = value.endOf('month');
}
const styles = useStyles();
const closure = function(a0) {
var env0_0 = a0;
return _fun70824;
};
const Stack = (StackNativeModule).Stack;
const Text = (TextModule).Text;
value = (
<Text
style={styles.formHeader}
variant="text-sm/semibold"
color="text-subtle"
>
{dateLabel}
</Text>
);
const InputButton = (NativeModule).InputButton;
value = (
<View style={styles.dateInput}>
{value}
<InputButton
text={dateLabel}
value={date.format('MMM Do YYYY')}
onPress={closure('date')}
disabled={disabled}
/>
</View>
);
const items2 = [value];
items2[1] = (
<View style={styles.timeInput}>
<Text
style={styles.formHeader}
variant="text-sm/semibold"
color="text-subtle"
>
{timeLabel}
</Text>
<InputButton
text={timeLabel}
value={date.format('LT')}
onPress={closure('time')}
disabled={disabled}
/>
</View>
);
return (
<View style={styles.formGroup}>
<Stack direction="horizontal" spacing={16}>
{items2}
</Stack>
</View>
);
function handleOpenDatePicker(a0) { // fn#70823, owner: GuildEventDatetime.handleOpenDatePicker, offset: 0x01d09c69, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun70824;
function _fun70824() { // fn#70824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3921, offset: 0x01d09c7b, size: 268 bytes, params: 1, frame: 19
var environment;
var r6;
var value2;
var defaultImport;
var openLazy;
var value4;
var object;
var binding;
if (!disabled) {
value2 = environment.__proto__.__proto__;
importAll(dependencyMap[11]).dismissGlobalKeyboard();
r6 = env0_0 === 'date' ? dateLabel : timeLabel;
defaultImport = importDefault(dependencyMap[12]);
openLazy = defaultImport.openLazy;
value4 = require(dependencyMap[14])(dependencyMap[27], dependencyMap.paths);
object = {onSubmit: onSubmit_70825, title: r6};
binding = env1_2;
object.startDate = binding.toDate();
r6 = minimumDate != null ? minimumDate.toDate() : env1_2.toDate();
object.minimumDate = r6;
binding = env1_4;
object.maximumDate = binding.toDate();
object.requireDateChanged = true;
object.mode = env0_0;
Reflect.apply(openLazy, defaultImport, [value4, 'DatePicker', object]);
}
function onSubmit_70825(a0) { // fn#70825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:4052, offset: 0x01d09d87, size: 118 bytes, params: 2, frame: 15
var set;
var object;
var binding;
if (env1_0 !== 'date') {
value = environment.__proto__.__proto__;
env2_6(a0);
} else {
set = a0.set;
object = {};
value = environment.__proto__.__proto__;
binding = env2_2;
object.hour = binding.get('hour');
object.minute = binding.get('minute');
object.second = 0;
object.millisecond = 0;
env2_6(Reflect.apply(set, a0, [object]));
}
}
function _fun70814({value}) { // fn#70814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1690, offset: 0x01d094b9, size: 21 bytes, params: 2, frame: 2
return value === env0_3;
}
}
function GuildEventRecurrenceOnPress() { // fn#70815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:1941, owner: GuildEventRecurrence.onPress, offset: 0x01d094ce, size: 201 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
importAll(dependencyMap[11]).dismissGlobalKeyboard();
const defaultImport = importDefault(dependencyMap[12]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[14]);
value = value(dependencyMap[13], dependencyMap.paths);
const object2 = {};
const intl = require(dependencyMap[7]).intl;
object2.title = intl.string(require(dependencyMap[7]).t['59TVxL']);
object2.items = env0_4;
object2.onItemSelect = onItemSelect_70816;
object2.selectedItem = env0_3;
object2.hasIcons = false;
Reflect.apply(openLazy, defaultImport, [value, 'SelectRecurrenceOption', object2]);
}
}
function _fun70818({name, value, description, IconComponent, disabled}) { // fn#70818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3193, offset: 0x01d09885, size: 103 bytes, params: 2, frame: 20
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={name}
subLabel={description}
value={value}
icon={<IconComponent />}
disabled={disabled}
key={name}
/>
);
}
function GuildEventDatetimeHandleOpenDatePicker(a0) { // fn#70823, owner: GuildEventDatetime.handleOpenDatePicker, offset: 0x01d09c69, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun70824;
}
function onPressOnItemSelect(a0) { // fn#70816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:2115, owner: GuildEventRecurrence.onPress.onItemSelect, offset: 0x01d09597, size: 52 bytes, params: 2, frame: 12
let value = environment.__proto__;
onRecurrenceChange(a0);
value = environment.__proto__.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function _fun70824() { // fn#70824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:3921, offset: 0x01d09c7b, size: 268 bytes, params: 1, frame: 19
var environment;
var r6;
var value2;
var defaultImport;
var openLazy;
var value4;
var object2;
var binding;
if (!disabled) {
value2 = environment.__proto__.__proto__;
importAll(dependencyMap[11]).dismissGlobalKeyboard();
r6 = env0_0 === 'date' ? dateLabel : timeLabel;
defaultImport = importDefault(dependencyMap[12]);
openLazy = defaultImport.openLazy;
value4 = require(dependencyMap[14])(dependencyMap[27], dependencyMap.paths);
object2 = {onSubmit: onSubmit_70825, title: r6};
binding = env1_2;
object2.startDate = binding.toDate();
r6 = minimumDate != null ? minimumDate.toDate() : env1_2.toDate();
object2.minimumDate = r6;
binding = env1_4;
object2.maximumDate = binding.toDate();
object2.requireDateChanged = true;
object2.mode = env0_0;
Reflect.apply(openLazy, defaultImport, [value4, 'DatePicker', object2]);
}
}
function onSubmit_70825(a0) { // fn#70825, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9243:4052, offset: 0x01d09d87, size: 118 bytes, params: 2, frame: 15
var set;
var object2;
var binding;
if (env1_0 !== 'date') {
value = environment.__proto__.__proto__;
env2_6(a0);
} else {
set = a0.set;
object2 = {};
value = environment.__proto__.__proto__;
binding = env2_2;
object2.hour = binding.get('hour');
object2.minute = binding.get('minute');
object2.second = 0;
object2.millisecond = 0;
env2_6(Reflect.apply(set, a0, [object2]));
}
}
global.__d(_fun70809, 9058, [31, 27, 1385, 661, 33, 4501, 7981, 1244, 9039, 4573, 8554, 1848, 4080, 9059, 1962,
9060, 9061, 9062, 6711, 9063, 9064, 8145, 6707, 7988, 7987, 7681, 3738, 9066, 4572,
2]) /* metro module 9058, dependencies: [31, 27, 1385, 661, 33, 4501, 7981, 1244, 9039, 4573, 8554, 1848, 4080, 9059, 1962, 9060, 9061, 9062, 6711, 9063, 9064, 8145, 6707, 7988, 7987, 7681, 3738, 9066, 4572, 2] */;
@@ -1,121 +1,142 @@
/* Metro module 9138; source: modules/guild_scheduled_events/native/components/GuildEventRecurrence.tsx; dependencies: [31, 27, 1379, 1867, 4117, 33, 4501, 697, 566, 9044, 9077, 9045, 9039, 1244, 5278, 9048, 4573, 9052, 1305, 9139, 2] */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildScheduledEventStore from '../../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import Module09139 from '../../../../by-id/module-09139.js'; /* Metro dependency 9139 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as UseEventScheduleModule from '../../useEventSchedule.tsx'; /* Metro dependency 9045 */
import * as GuildEventCardComponentsModule from './GuildEventCardComponents.tsx'; /* Metro dependency 9048 */
import * as UseManageResourcePermissionsModule from '../../../permissions/useManageResourcePermissions.tsx'; /* Metro dependency 9077 */
function _fun71581(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:6, offset: 0x01d2556f, size: 437 bytes, params: 8, frame: 22
var object4;
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 guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {container: {'alignSelf': 'stretch', 'flexDirection': 'row', 'justifyContent': 'space-between',
object = {container: {'alignSelf': 'stretch', 'flexDirection': 'row', 'justifyContent': 'space-between',
'alignItems': 'center'}, eventHeader: {'marginStart': 8, 'flexShrink': 0, 'flexGrow': 1}};
const object5 = {};
const object2 = {};
const INTERACTIVE_BACKGROUND_SELECTED = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_SELECTED;
object5.backgroundColor = INTERACTIVE_BACKGROUND_SELECTED;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.active = object5;
object4.actions = {'alignItems': 'center', 'flexDirection': 'row', 'flexShrink': 0};
const object6 = {'flexShrink': 0, 'alignItems': 'center', 'flexDirection': 'row', 'padding': 8, 'marginLeft': 8};
object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object4.secondarySmallButton = object6;
object2.backgroundColor = INTERACTIVE_BACKGROUND_SELECTED;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.active = object2;
object.actions = {'alignItems': 'center', 'flexDirection': 'row', 'flexShrink': 0};
const object3 = {'flexShrink': 0, 'alignItems': 'center', 'flexDirection': 'row', 'padding': 8, 'marginLeft': 8};
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object.secondarySmallButton = object3;
const TEXT_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_STRONG;
object4.secondarySmallIcon = {tintColor: TEXT_STRONG};
const env0_10 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventRecurrence.tsx');
object.secondarySmallIcon = {tintColor: TEXT_STRONG};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventRecurrence.tsx');
exports.default = GuildEventRecurrence_71582;
}
function GuildEventRecurrence_71582({recurrenceId, guildEventId, onPress, isActive}) { // fn#71582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:832, offset: 0x01d25724, size: 1142 bytes, params: 2, frame: 34
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const guildScheduledEvent = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getGuildScheduledEvent(guildEventId);
});
const env0_3 = guildScheduledEvent;
const value3 = (importDefault(9044) /* metro dependency 9044: useEventException */)(recurrenceId,
guildScheduledEvent?.id);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildScheduledEvent?.guild_id);
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(guildScheduledEvent?.channel_id);
});
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const env0_5 = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[channel ?? guild]).canManageGuildEvent(guildScheduledEvent);
const value4 = (require(9045) /* metro dependency 9045: useEventSchedule */).useEventScheduleById(guildEventId,
recurrenceId);
const value6 = env0_3.useMemo(_fun71586, [value4 == null ? undefined : value4.startTime.toISOString()]);
if (guildScheduledEvent == null) {
return null;
}
const is_canceled = (value3 ?? ({})).is_canceled;
let r11 = is_canceled !== undefined && is_canceled;
const value8 = '';
const value13 = (r11 ? value8 + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyBVRm) + ', ' : value8) + guildScheduledEvent.name + (value6 != null ? ', ' + value6.startDateTimeString : value8);
const items2 = [styles.container];
items2[1] = isActive ? styles.active : undefined;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps2 = {'accessible': true, 'accessibilityRole': 'button', accessibilityLabel: value13,
onPress: onPress_71587, style: styles.eventHeader};
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
const pressableOpacity = <PressableOpacity {...pressableOpacityProps2}><GuildEventCardHeader isActive={isActive} event={guildScheduledEvent} showUserCount={false} showCreator={false} recurrenceId={recurrenceId} /></PressableOpacity>;
r11 = r11 && ((Text) => <Text variant="text-sm/semibold" color="text-feedback-critical">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyBVRm)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
const object = {'accessible': true, 'accessibilityRole': 'button'};
const string = intl.string;
const HIgA5a = (require(1244) /* metro dependency 1244: indexNative */).t.HIgA5a;
object.accessibilityLabel = value8 + Reflect.apply(string, intl, [HIgA5a]) + ', ' + value13;
object.onPress = onPress_71588;
object.style = styles.secondarySmallButton;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(9139) /* metro dependency 9139 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
iconProps.size = REFRESH_SMALL_16;
iconProps.style = styles.secondarySmallIcon;
return (
<View style={items2}>
{pressableOpacity}
<View style={styles.actions}>
{r11}
<PressableOpacity {...object}>
<Icon {...iconProps} />
</PressableOpacity>
function GuildEventRecurrence_71582({recurrenceId, guildEventId, onPress, isActive}) { // fn#71582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:832, offset: 0x01d25724, size: 1142 bytes, params: 2, frame: 34
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const guildScheduledEvent = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getGuildScheduledEvent(guildEventId);
});
const guildScheduledEvent2 = guildScheduledEvent;
const value3 = (importDefault(9044) /* metro dependency 9044: useEventException */)(recurrenceId,
guildScheduledEvent?.id);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildScheduledEvent?.guild_id);
});
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(guildScheduledEvent?.channel_id);
});
const useManageResourcePermissions = UseManageResourcePermissionsModule.useManageResourcePermissions;
const env0_5 = Reflect.apply(useManageResourcePermissions, UseManageResourcePermissionsModule,
[channel ?? guild]).canManageGuildEvent(guildScheduledEvent);
const value4 = (UseEventScheduleModule).useEventScheduleById(guildEventId,
recurrenceId);
const value6 = guildScheduledEvent2.useMemo(_fun71586,
[value4 == null ? undefined : value4.startTime.toISOString()]);
if (guildScheduledEvent == null) {
return null;
}
const is_canceled = (value3 ?? ({})).is_canceled;
let r11 = is_canceled !== undefined && is_canceled;
const value8 = '';
const value13 = (r11 ? value8 + intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyBVRm) + ', ' : value8) + guildScheduledEvent.name + (value6 != null ? ', ' + value6.startDateTimeString : value8);
const items2 = [styles.container];
items2[1] = isActive ? styles.active : undefined;
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps2 = {'accessible': true, 'accessibilityRole': 'button', accessibilityLabel: value13,
onPress: onPress_71587, style: styles.eventHeader};
const GuildEventCardHeader = (GuildEventCardComponentsModule).GuildEventCardHeader;
const pressableOpacity = (
<PressableOpacity {...pressableOpacityProps2}>
<GuildEventCardHeader
isActive={isActive}
event={guildScheduledEvent}
showUserCount={false}
showCreator={false}
recurrenceId={recurrenceId}
/>
</PressableOpacity>
);
r11 = r11 && ((Text) => <Text variant="text-sm/semibold" color="text-feedback-critical">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.fyBVRm)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
const object2 = {'accessible': true, 'accessibilityRole': 'button'};
const string = intl.string;
const HIgA5a = (require(1244) /* metro dependency 1244: indexNative */).t.HIgA5a;
object2.accessibilityLabel = value8 + Reflect.apply(string, intl, [HIgA5a]) + ', ' + value13;
object2.onPress = onPress_71588;
object2.style = styles.secondarySmallButton;
const Icon = (NativeModule).Icon;
const iconProps = {source: Module09139};
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const REFRESH_SMALL_16 = Sizes.REFRESH_SMALL_16;
iconProps.size = REFRESH_SMALL_16;
iconProps.style = styles.secondarySmallIcon;
return (
<View style={items2}>
{pressableOpacity}
<View style={styles.actions}>
{r11}
<PressableOpacity {...object2}>
<Icon {...iconProps} />
</PressableOpacity>
</View>
</View>
</View>
);
}
);
function _fun71586() { // fn#71586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:1360, offset: 0x01d25c12, size: 58 bytes, params: 1, frame: 13
const value2 = null;
return value2 != env0_6 ? (require(9039) /* metro dependency 9039: ScheduleUtils */).getEventTimeData(env0_6) : value2;
}
function _fun71586() { // fn#71586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:1360, offset: 0x01d25c12, size: 58 bytes, params: 1, frame: 13
const value2 = null;
return value2 != env0_6 ? (require(9039) /* metro dependency 9039: ScheduleUtils */).getEventTimeData(env0_6) : value2;
}
function GuildEventRecurrence_71582OnPress(a0) { // fn#71587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:1748, owner: GuildEventRecurrence_71582.onPress, offset: 0x01d25c4c, size: 55 bytes, params: 2, frame: 12
a0.stopPropagation();
if (!(env0_7 || onPress == null)) {
onPress(recurrenceId);
}
}
function GuildEventRecurrence_71582OnPress(a0) { // fn#71587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:1748, owner: GuildEventRecurrence_71582.onPress, offset: 0x01d25c4c, size: 55 bytes, params: 2, frame: 12
a0.stopPropagation();
if (!(env0_7 || onPress == null)) {
onPress(recurrenceId);
}
}
function GuildEventRecurrence_71582OnPress_71588(a0) { // fn#71588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:2230, owner: GuildEventRecurrence_71582.onPress, offset: 0x01d25c83, size: 80 bytes, params: 2, frame: 15
var value2;
var moduleValue;
a0.stopPropagation();
if (guild != null) {
value2 = environment.__proto__;
moduleValue = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue.showGuildEventModeratorActionSheet(guildScheduledEvent, env0_5, recurrenceId);
}
}
function GuildEventRecurrence_71582OnPress_71588(a0) { // fn#71588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9323:2230, owner: GuildEventRecurrence_71582.onPress, offset: 0x01d25c83, size: 80 bytes, params: 2, frame: 15
var value2;
var moduleValue;
a0.stopPropagation();
if (guild != null) {
value2 = environment.__proto__;
moduleValue = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue.showGuildEventModeratorActionSheet(guildScheduledEvent, env0_5, recurrenceId);
}
}
global.__d(_fun71581, 9138, [31, 27, 1379, 1867, 4117, 33, 4501, 697, 566, 9044, 9077, 9045, 9039, 1244, 5278, 9048,
4573, 9052, 1305, 9139,
2]) /* metro module 9138, dependencies: [31, 27, 1379, 1867, 4117, 33, 4501, 697, 566, 9044, 9077, 9045, 9039, 1244, 5278, 9048, 4573, 9052, 1305, 9139, 2] */;
@@ -1,10 +1,17 @@
/* Metro module 9136; source: modules/guild_scheduled_events/native/components/GuildEventRecurrences.tsx; dependencies: [31, 27, 33, 4501, 697, 9137, 4573, 1244, 21, 9138, 4578, 2] */
import SnowflakeUtils from '../../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import UseGuildEventRecurrences from '../../useGuildEventRecurrences.tsx'; /* Metro dependency 9137 */
import GuildEventRecurrence from './GuildEventRecurrence.tsx'; /* Metro dependency 9138 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
function _fun71569(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:6, offset: 0x01d24c96, size: 271 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_4 = value.View;
const env0_5 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
@@ -12,48 +19,58 @@ function _fun71569(global, require, importDefault, importAll, module, exports, d
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'marginTop': 8, 'marginBottom': 8, 'borderRadius': null, 'maxHeight': 140};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_8 = Reflect.apply(createStyles, value, [{container: {marginTop: 16}, scrollView: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventRecurrences.tsx');
const object2 = {'marginTop': 8, 'marginBottom': 8, 'borderRadius': null, 'maxHeight': 140};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_8 = Reflect.apply(createStyles, value, [{container: {marginTop: 16}, scrollView: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventRecurrences.tsx');
exports.default = GuildEventRecurrences;
}
function GuildEventRecurrences({guildId, recurrenceRule, guildEventId, onRecurrencePress, activeRecurrenceId, hideViewMoreButton}) { // fn#71570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:424, offset: 0x01d24da5, size: 441 bytes, params: 2, frame: 29
const value2 = ReactModule.useRef(null);
const styles = useStyles();
const value3 = (UseGuildEventRecurrences)(guildEventId, guildId,
recurrenceRule);
const recurrenceStartTimes = value3.recurrenceStartTimes;
const canViewMoreRecurrences = value3.canViewMoreRecurrences;
const env0_4 = value3.updateRecurrenceStartTimes;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [
<Text variant="heading-md/semibold">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['D/jjoa'])}
</Text>,
];
items2[1] = (
<ScrollView style={styles.scrollView} ref={value2}>
{recurrenceStartTimes.map(_fun71571)}
</ScrollView>
);
items2[2] = canViewMoreRecurrences && !hideViewMoreButton && ((Button) => <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8O7Hpy'])} onPress={onPress_71572} size="sm" />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
return (
<View style={styles.container}>
{items2}
</View>
);
function _fun71571(a0) { // fn#71571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:873, offset: 0x01d24f5e, size: 114 bytes, params: 2, frame: 18
const value = environment.__proto__;
const defaultImport = SnowflakeUtils;
const fromTimestamp = defaultImport.fromTimestamp;
const getTime = a0.getTime;
const value2 = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, a0, [])]);
return ((Component) => <Component recurrenceId={value2} guildEventId={guildEventId} onPress={onRecurrencePress} isActive={value2 === activeRecurrenceId} key={value2} />)(GuildEventRecurrence);
}
function GuildEventRecurrences({guildId, recurrenceRule, guildEventId, onRecurrencePress, activeRecurrenceId, hideViewMoreButton}) { // fn#71570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:424, offset: 0x01d24da5, size: 441 bytes, params: 2, frame: 29
const value2 = env0_3.useRef(null);
const styles = useStyles();
const value3 = (importDefault(9137) /* metro dependency 9137: useGuildEventRecurrences */)(guildEventId, guildId,
recurrenceRule);
const recurrenceStartTimes = value3.recurrenceStartTimes;
const canViewMoreRecurrences = value3.canViewMoreRecurrences;
const env0_4 = value3.updateRecurrenceStartTimes;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const items2 = [<Text variant="heading-md/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['D/jjoa'])}</Text>];
items2[1] = <ScrollView style={styles.scrollView} ref={value2}>{recurrenceStartTimes.map(_fun71571)}</ScrollView>;
items2[2] = canViewMoreRecurrences && !hideViewMoreButton && ((Button) => <Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8O7Hpy'])} onPress={onPress_71572} size="sm" />)((require(4578) /* metro dependency 4578: ButtonNative */).Button);
return (
<View style={styles.container}>
{items2}
</View>
);
}
function GuildEventRecurrencesOnPress(a0) { // fn#71572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:1080, owner: GuildEventRecurrences.onPress, offset: 0x01d24fd0, size: 53 bytes, params: 2, frame: 10
a0.stopPropagation();
updateRecurrenceStartTimes();
const current = ReactModule.current;
if (current != null) {
current.scrollToEnd();
}
}
function _fun71571(a0) { // fn#71571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:873, offset: 0x01d24f5e, size: 114 bytes, params: 2, frame: 18
const value = environment.__proto__;
const defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const fromTimestamp = defaultImport.fromTimestamp;
const getTime = a0.getTime;
const value2 = Reflect.apply(fromTimestamp, defaultImport, [Reflect.apply(getTime, a0, [])]);
return ((Component) => <Component recurrenceId={value2} guildEventId={guildEventId} onPress={onRecurrencePress} isActive={value2 === activeRecurrenceId} key={value2} />)(importDefault(9138) /* metro dependency 9138: GuildEventRecurrence */);
}
function GuildEventRecurrencesOnPress(a0) { // fn#71572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9321:1080, owner: GuildEventRecurrences.onPress, offset: 0x01d24fd0, size: 53 bytes, params: 2, frame: 10
a0.stopPropagation();
updateRecurrenceStartTimes();
const current = env0_3.current;
if (current != null) {
current.scrollToEnd();
}
}
global.__d(_fun71569, 9136, [31, 27, 33, 4501, 697, 9137, 4573, 1244, 21, 9138, 4578,
2]) /* metro module 9136, dependencies: [31, 27, 33, 4501, 697, 9137, 4573, 1244, 21, 9138, 4578, 2] */;
@@ -1,75 +1,88 @@
/* Metro module 9057; source: modules/guild_scheduled_events/native/components/GuildEventSchedule.tsx; dependencies: [31, 33, 3738, 9039, 9058, 1244, 2] */
import Module03738 from '../../../../by-id/module-03738.js'; /* Metro dependency 3738 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ScheduleUtilsModule from '../../utils/ScheduleUtils.tsx'; /* Metro dependency 9039 */
import * as GuildEventModalComponentsModule from './GuildEventModalComponents.tsx'; /* Metro dependency 9058 */
function _fun70804(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9242:6, offset: 0x01d08b1e, size: 161 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 value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventSchedule.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventSchedule.tsx');
exports.default = GuildEventSchedule;
}
function GuildEventSchedule({guildEvent, recurrenceId, schedule, onChange}) { // fn#70805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9242:261, offset: 0x01d08bbf, size: 649 bytes, params: 2, frame: 30
var r5;
const MAX_YEARS_AHEAD_RECURRING_EVENT = (require(9039) /* metro dependency 9039: ScheduleUtils */).MAX_YEARS_AHEAD_RECURRING_EVENT;
const value2 = (importDefault(3738) /* metro dependency 3738 */)();
const value3 = (importDefault(3738) /* metro dependency 3738 */)();
let add = value3.add;
const MAX_DAYS_AHEAD_AN_EVENT_CAN_START = (require(9039) /* metro dependency 9039: ScheduleUtils */).MAX_DAYS_AHEAD_AN_EVENT_CAN_START;
const value4 = Reflect.apply(add, value3, [MAX_DAYS_AHEAD_AN_EVENT_CAN_START, 'days']);
const value5 = env0_3.useMemo(_fun70806, [schedule.startDate]);
const value6 = (importDefault(3738) /* metro dependency 3738 */)();
add = value6.add;
const MAX_DAYS_AHEAD_AN_EVENT_CAN_END = (require(9039) /* metro dependency 9039: ScheduleUtils */).MAX_DAYS_AHEAD_AN_EVENT_CAN_END;
const value7 = Reflect.apply(add, value6, [MAX_DAYS_AHEAD_AN_EVENT_CAN_END, 'days']);
if (recurrenceId != null) {
value4.add(MAX_YEARS_AHEAD_RECURRING_EVENT, 'years');
value7.add(MAX_YEARS_AHEAD_RECURRING_EVENT, 'years');
}
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const GuildEventDatetime = (require(9058) /* metro dependency 9058: GuildEventModalComponents */).GuildEventDatetime;
const guildEventDatetimeProps2 = {date: schedule.startDate, onChange: function(a0) {
var r3;
var onChangeBinding = onChange;
var object = {};
copyDataProperties(object, schedule, r3);
object['startDate'] = a0;
onChangeBinding(object);
}, minimumDate: value2, maximumDate: value4};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
guildEventDatetimeProps2.dateLabel = Reflect.apply(string, intl, [t.kKOIwJ]);
guildEventDatetimeProps2.timeLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6dGmCD']);
const guildEventDatetime = <GuildEventDatetime {...guildEventDatetimeProps2} />;
const value9 = guildEvent.scheduled_end_time != null;
if (value9) {
r5 = <GuildEventDatetime date={schedule.endDate} onChange={function(a0) {
function GuildEventSchedule({guildEvent, recurrenceId, schedule, onChange}) { // fn#70805, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9242:261, offset: 0x01d08bbf, size: 649 bytes, params: 2, frame: 30
var r5;
const MAX_YEARS_AHEAD_RECURRING_EVENT = (ScheduleUtilsModule).MAX_YEARS_AHEAD_RECURRING_EVENT;
const value2 = (Module03738)();
const value3 = (Module03738)();
let add = value3.add;
const MAX_DAYS_AHEAD_AN_EVENT_CAN_START = (ScheduleUtilsModule).MAX_DAYS_AHEAD_AN_EVENT_CAN_START;
const value4 = Reflect.apply(add, value3, [MAX_DAYS_AHEAD_AN_EVENT_CAN_START, 'days']);
const value5 = ReactModule.useMemo(_fun70806, [schedule.startDate]);
const value6 = (Module03738)();
add = value6.add;
const MAX_DAYS_AHEAD_AN_EVENT_CAN_END = (ScheduleUtilsModule).MAX_DAYS_AHEAD_AN_EVENT_CAN_END;
const value7 = Reflect.apply(add, value6, [MAX_DAYS_AHEAD_AN_EVENT_CAN_END, 'days']);
if (recurrenceId != null) {
value4.add(MAX_YEARS_AHEAD_RECURRING_EVENT, 'years');
value7.add(MAX_YEARS_AHEAD_RECURRING_EVENT, 'years');
}
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const GuildEventDatetime = (GuildEventModalComponentsModule).GuildEventDatetime;
const guildEventDatetimeProps2 = {date: schedule.startDate, onChange: function(a0) {
var r3;
var onChangeBinding = onChange;
var object = {};
copyDataProperties(object, schedule, r3);
object['endDate'] = a0;
object['startDate'] = a0;
onChangeBinding(object);
}} minimumDate={value5} maximumDate={value7} dateLabel={intl.string(t.CTLgZJ)} timeLabel={intl.string(t.j2RuXF)} />;
} else {
r5 = value9;
}, minimumDate: value2, maximumDate: value4};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
guildEventDatetimeProps2.dateLabel = Reflect.apply(string, intl, [t.kKOIwJ]);
guildEventDatetimeProps2.timeLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6dGmCD']);
const guildEventDatetime = <GuildEventDatetime {...guildEventDatetimeProps2} />;
const value9 = guildEvent.scheduled_end_time != null;
if (value9) {
r5 = (
<GuildEventDatetime
date={schedule.endDate}
onChange={function(a0) {
var r3;
var onChangeBinding = onChange;
var object = {};
copyDataProperties(object, schedule, r3);
object['endDate'] = a0;
onChangeBinding(object);
}}
minimumDate={value5}
maximumDate={value7}
dateLabel={intl.string(t.CTLgZJ)}
timeLabel={intl.string(t.j2RuXF)}
/>
);
} else {
r5 = value9;
}
return (
<>
{guildEventDatetime}
{r5}
</>
);
function _fun70806() { // fn#70806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9242:437, offset: 0x01d08e48, size: 63 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(schedule.startDate);
return value.add(15, 'minutes');
}
}
return (
<>
{guildEventDatetime}
{r5}
</>
);
}
function _fun70806() { // fn#70806, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9242:437, offset: 0x01d08e48, size: 63 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(3738) /* metro dependency 3738 */;
value = value(schedule.startDate);
return value.add(15, 'minutes');
}
global.__d(_fun70804, 9057, [31, 33, 3738, 9039, 9058, 1244,
2]) /* metro module 9057, dependencies: [31, 33, 3738, 9039, 9058, 1244, 2] */;
@@ -1,58 +1,63 @@
/* Metro module 9121; source: modules/guild_scheduled_events/native/components/GuildEventUtils.tsx; dependencies: [9042, 9063, 6647, 9064, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as EntityUtilsModule from '../../utils/EntityUtils.tsx'; /* Metro dependency 9042 */
function _fun71465(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71465, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9306:6, offset: 0x01d21157, size: 116 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventUtils.tsx');
exports.getEventLocationIconSource = getEventLocationIconSource;
exports.getEventLocationIconComponent = getEventLocationIconComponent;
}
function getEventLocationIconSource(a0, a1, a2) { // fn#71466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9306:223, offset: 0x01d211cb, size: 133 bytes, params: 4, frame: 15
var r2;
var r0;
var value;
const locationFromEvent = (require(9042) /* metro dependency 9042: EntityUtils */).getLocationFromEvent(a0);
const value3 = null;
if (value3 != locationFromEvent) {
r0 = importDefault(9063) /* metro dependency 9063 */;
} else if (value3 != a1) {
value = require(6647) /* metro dependency 6647: ChannelUtils */;
if (a2) {
value = value.getChannelIcon(a1);
r2 = value;
function getEventLocationIconSource(a0, a1, a2) { // fn#71466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9306:223, offset: 0x01d211cb, size: 133 bytes, params: 4, frame: 15
var r2;
var r0;
var value;
const locationFromEvent = (EntityUtilsModule).getLocationFromEvent(a0);
const value3 = null;
if (value3 != locationFromEvent) {
r0 = importDefault(9063) /* metro dependency 9063 */;
} else if (value3 != a1) {
value = require(6647) /* metro dependency 6647: ChannelUtils */;
if (a2) {
value = value.getChannelIcon(a1);
r2 = value;
} else {
value = value.getSimpleChannelIcon(a1);
r2 = value;
}
r0 = r2;
} else {
value = value.getSimpleChannelIcon(a1);
r2 = value;
r0 = value3;
}
r0 = r2;
} else {
r0 = value3;
return r0;
}
return r0;
}
function getEventLocationIconComponent(a0, a1, a2) { // fn#71467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9306:383, offset: 0x01d21250, size: 148 bytes, params: 4, frame: 16
var r2;
var r0;
var value;
const locationFromEvent = (require(9042) /* metro dependency 9042: EntityUtils */).getLocationFromEvent(a0);
const value3 = null;
if (value3 != locationFromEvent) {
r0 = (require(9064) /* metro dependency 9064: LocationIcon */).LocationIcon;
} else if (value3 != a1) {
value = require(6647) /* metro dependency 6647: ChannelUtils */;
if (a2) {
value = value.getChannelIconComponent(a1);
r2 = value;
function getEventLocationIconComponent(a0, a1, a2) { // fn#71467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9306:383, offset: 0x01d21250, size: 148 bytes, params: 4, frame: 16
var r2;
var r0;
var value;
const locationFromEvent = (EntityUtilsModule).getLocationFromEvent(a0);
const value3 = null;
if (value3 != locationFromEvent) {
r0 = (require(9064) /* metro dependency 9064: LocationIcon */).LocationIcon;
} else if (value3 != a1) {
value = require(6647) /* metro dependency 6647: ChannelUtils */;
if (a2) {
value = value.getChannelIconComponent(a1);
r2 = value;
} else {
value = value.getSimpleChannelIconComponent(a1);
r2 = value;
}
r0 = value3 != r2 ? r2 : value3;
} else {
value = value.getSimpleChannelIconComponent(a1);
r2 = value;
r0 = value3;
}
r0 = value3 != r2 ? r2 : value3;
} else {
r0 = value3;
return r0;
}
return r0;
}
global.__d(_fun71465, 9121, [9042, 9063, 6647, 9064,
2]) /* metro module 9121, dependencies: [9042, 9063, 6647, 9064, 2] */;
@@ -1,104 +1,129 @@
/* Metro module 12099; source: modules/guild_scheduled_events/native/components/GuildEventVoiceBanner.tsx; dependencies: [31, 27, 1934, 4117, 33, 4501, 697, 9127, 566, 9077, 9039, 4080, 9052, 7709, 9032, 5278, 9048, 4578, 1244, 2] */
import SelectedChannelStore from '../../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as GuildScheduledEventStoreModule from '../../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as GuildEventCardComponentsModule from './GuildEventCardComponents.tsx'; /* Metro dependency 9048 */
import * as UseManageResourcePermissionsModule from '../../../permissions/useManageResourcePermissions.tsx'; /* Metro dependency 9077 */
import * as UseGuildScheduledEventsModule from '../../useGuildScheduledEvents.tsx'; /* Metro dependency 9127 */
function _fun92913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:6, offset: 0x0209de6a, size: 371 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_6 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildScheduledEventActive;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {'margin': 12, 'padding': 12, 'borderRadius': null, 'borderColor': null, 'borderWidth': 1};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'margin': 12, 'padding': 12, 'borderRadius': null, 'borderColor': null, 'borderWidth': 1};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object.borderColor = BORDER_SUBTLE;
object2.borderColor = BORDER_SUBTLE;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{header: object,
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [{header: object2,
descriptionContainerStyle: {paddingTop: 4}, buttonContainer: {marginTop: 12}}]);
value = value.memo(_fun92914);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventVoiceBanner.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventVoiceBanner.tsx');
exports.default = value;
}
function _fun92914({channel}) { // fn#92914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:474, offset: 0x0209dfdd, size: 671 bytes, params: 2, frame: 28
var Button;
var intl;
const styles = useStyles();
const value3 = (UseGuildScheduledEventsModule).useActiveEvent(channel.id);
const value4 = (UseGuildScheduledEventsModule).useImminentUpcomingGuildEvents(channel.id);
const useStateFromStores = FluxModule.useStateFromStores;
const value5 = Reflect.apply(useStateFromStores, FluxModule, [[SelectedChannelStore], function() {
return SelectedChannelStore.getVoiceChannelId();
}]) === channel.id;
const r2 = value3 ?? value4?.[0];
const useManageResourcePermissions = UseManageResourcePermissionsModule.useManageResourcePermissions;
const canManageGuildEvent2 = Reflect.apply(useManageResourcePermissions, UseManageResourcePermissionsModule,
[channel]).canManageGuildEvent(r2);
const r22 = (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(r2) ?? undefined;
const binding = r22;
const value7 = binding.useCallback(_fun92916, [r2, channel, value3, r22]);
const value8 = binding.useCallback(_fun92918, [r2]);
if (r2 == null) {
return null;
}
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(r2);
const PressableOpacity = (PressablesModule).PressableOpacity;
const GuildEventCardHeader = (GuildEventCardComponentsModule).GuildEventCardHeader;
const items2 = [
<GuildEventCardHeader event={r2} showUserCount={false} />,
];
const GuildEventCardMetaInfo = (GuildEventCardComponentsModule).GuildEventCardMetaInfo;
items2[1] = (
<GuildEventCardMetaInfo
event={r2}
descriptionContainerStyle={styles.descriptionContainerStyle}
condensed={value5}
/>
);
let r6 = value5 && canManageGuildEvent2 && !isGuildScheduledEventActive2;
if (r6) {
var viewBindingProps = {style: styles.buttonContainer};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r6 = (
<View {...viewBindingProps}>
<Button
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cK1GGY)}
onPress={value7}
variant="active"
size="sm"
grow
/>
</View>
);
}
items2[2] = r6;
return (
<PressableOpacity
accessibilityRole="button"
onPress={value8}
style={styles.header}
>
{items2}
</PressableOpacity>
);
function _fun92916() { // fn#92916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:833, offset: 0x0209e28f, size: 112 bytes, params: 1, frame: 16
var environment;
var value4;
var moduleValue;
if (env0_1 == null && env0_2 != null) {
value4 = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
moduleValue = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue.openStartGuildEventModal(env0_2, env0_3, _fun92917);
}
function _fun92917() { // fn#92917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:923, offset: 0x0209e2ff, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
value.openVoiceChannelActionSheet(channel);
}
}
function _fun92918() { // fn#92918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:1002, offset: 0x0209e32c, size: 104 bytes, params: 1, frame: 14
var value2;
if (env0_2 != null) {
value2 = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(9032) /* metro dependency 9032: GuildScheduledEventModalActionCreatorsNative */).openGuildEventDetails({eventId: env0_2.id,
event: env0_2});
}
}
function _fun92914({channel}) { // fn#92914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:474, offset: 0x0209dfdd, size: 671 bytes, params: 2, frame: 28
var Button;
var intl;
const styles = useStyles();
const value3 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useActiveEvent(channel.id);
const value4 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useImminentUpcomingGuildEvents(channel.id);
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStores = fluxModule.useStateFromStores;
const value5 = Reflect.apply(useStateFromStores, fluxModule, [[SelectedChannelStore], function() {
return SelectedChannelStore.getVoiceChannelId();
}]) === channel.id;
const r2 = value3 ?? value4?.[0];
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const canManageGuildEvent2 = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[channel]).canManageGuildEvent(r2);
const r22 = (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(r2) ?? undefined;
const binding = r22;
const value7 = binding.useCallback(_fun92916, [r2, channel, value3, r22]);
const value8 = binding.useCallback(_fun92918, [r2]);
if (r2 == null) {
return null;
}
const isGuildScheduledEventActive2 = isGuildScheduledEventActive(r2);
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
const items2 = [<GuildEventCardHeader event={r2} showUserCount={false} />];
const GuildEventCardMetaInfo = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardMetaInfo;
items2[1] = <GuildEventCardMetaInfo event={r2} descriptionContainerStyle={styles.descriptionContainerStyle} condensed={value5} />;
let r6 = value5 && canManageGuildEvent2 && !isGuildScheduledEventActive2;
if (r6) {
var viewBindingProps = {style: styles.buttonContainer};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r6 = <View {...viewBindingProps}><Button text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cK1GGY)} onPress={value7} variant="active" size="sm" grow /></View>;
}
items2[2] = r6;
return (
<PressableOpacity
accessibilityRole="button"
onPress={value8}
style={styles.header}
>
{items2}
</PressableOpacity>
);
}
function _fun92916() { // fn#92916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:833, offset: 0x0209e28f, size: 112 bytes, params: 1, frame: 16
var environment;
var value4;
var moduleValue;
if (env0_1 == null && env0_2 != null) {
value4 = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
moduleValue = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue.openStartGuildEventModal(env0_2, env0_3, _fun92917);
}
}
function _fun92918() { // fn#92918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:1002, offset: 0x0209e32c, size: 104 bytes, params: 1, frame: 14
var value2;
if (env0_2 != null) {
value2 = environment.__proto__;
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
(require(9032) /* metro dependency 9032: GuildScheduledEventModalActionCreatorsNative */).openGuildEventDetails({eventId: env0_2.id,
event: env0_2});
}
}
function _fun92917() { // fn#92917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12285:923, offset: 0x0209e2ff, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(7709) /* metro dependency 7709: PrivateChannelCallUtils */;
value.openVoiceChannelActionSheet(channel);
}
global.__d(_fun92913, 12099, [31, 27, 1934, 4117, 33, 4501, 697, 9127, 566, 9077, 9039, 4080, 9052, 7709, 9032,
5278, 9048, 4578, 1244,
2]) /* metro module 12099, dependencies: [31, 27, 1934, 4117, 33, 4501, 697, 9127, 566, 9077, 9039, 4080, 9052, 7709, 9032, 5278, 9048, 4578, 1244, 2] */;
@@ -1,130 +1,161 @@
/* Metro module 9125; source: modules/guild_scheduled_events/native/components/GuildEventsListActionSheet.tsx; dependencies: [31, 27, 4605, 1385, 661, 4865, 33, 4501, 9126, 6758, 1244, 9067, 9052, 9127, 9036, 9032, 4594, 683, 5097, 6275, 9130, 6619, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UseMountEffect from '../../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import ReadStateStore from '../../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import UseRefValue from '../../../../hooks/useRefValue.tsx'; /* Metro dependency 6619 */
import GuildScheduledEventManager from '../../GuildScheduledEventManager.tsx'; /* Metro dependency 9036 */
import UseCanCreateAnEvent from '../../useCanCreateAnEvent.tsx'; /* Metro dependency 9126 */
import UseGuildScheduledEvents from '../../useGuildScheduledEvents.tsx'; /* Metro dependency 9127 */
import GuildEventsListView from './GuildEventsListView.tsx'; /* Metro dependency 9130 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildScheduledEventsConstantsModule from '../../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ReadStateConstantsModule from '../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as GuildScheduledEventModalActionCreatorsNativeModule from '../../GuildScheduledEventModalActionCreators.native.tsx'; /* Metro dependency 9032 */
import * as GuildScheduledEventModalActionCreatorsModule from '../GuildScheduledEventModalActionCreators.tsx'; /* Metro dependency 9052 */
function _fun71476(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71476, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:6, offset: 0x01d22133, size: 294 bytes, params: 8, frame: 20
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 readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const env0_6 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).ANALYTICS_GUILD_EVENTS_MODAL_NAME;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_8 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {flex: 1}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventsListActionSheet.tsx');
const env0_10 = (CreateStylesModule).createStyles({container: {flex: 1}});
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventsListActionSheet.tsx');
exports.default = GuildEventsListActionSheet;
}
function GuildEventsListHeader({eventCount, guild}) { // fn#71477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:284, offset: 0x01d22259, size: 387 bytes, params: 2, frame: 24
var r4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var ActionSheetHeaderPressableText;
var object;
const value2 = (UseCanCreateAnEvent)(guild.id);
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
const r6 = eventCount > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.p1zLAf,
{count: eventCount}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tlopTM);
if (value2) {
ActionSheetHeaderPressableText = (require(9067) /* metro dependency 9067: ActionSheetHeaderPressableTextNative */).ActionSheetHeaderPressableText;
r4 = (
<ActionSheetHeaderPressableText
accessibilityLabel={intl.string(t['60lJ0C'])}
label={intl.string(t.NzROFF)}
onPress={onPress_71478}
/>
);
} else {
r4 = value2;
}
return <BottomSheetTitleHeader title={r6} trailing={r4} />;
function GuildEventsListHeaderOnPress() { // fn#71478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:684, owner: GuildEventsListHeader.onPress, offset: 0x01d223dc, size: 90 bytes, params: 1, frame: 16
var environment;
var value2;
var moduleValue2;
if (env0_1) {
value2 = environment.__proto__;
(require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */).closeGuildEventListActionSheet();
moduleValue2 = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue2.openCreateOrEditGuildEventModal(guild, {onClose: onClose_71479});
}
function onPressOnClose_71479() { // fn#71479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:787, owner: GuildEventsListHeader.onPress.onClose, offset: 0x01d22436, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value.openGuildEventListActionSheet(guild);
}
}
function GuildEventsListHeader({eventCount, guild}) { // fn#71477, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:284, offset: 0x01d22259, size: 387 bytes, params: 2, frame: 24
var r4;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var ActionSheetHeaderPressableText;
var object3;
const value2 = (importDefault(9126) /* metro dependency 9126: useCanCreateAnEvent */)(guild.id);
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
const r6 = eventCount > 0 ? intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t.p1zLAf,
{count: eventCount}) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tlopTM);
if (value2) {
ActionSheetHeaderPressableText = (require(9067) /* metro dependency 9067: ActionSheetHeaderPressableTextNative */).ActionSheetHeaderPressableText;
r4 = <ActionSheetHeaderPressableText accessibilityLabel={intl.string(t['60lJ0C'])} label={intl.string(t.NzROFF)} onPress={onPress_71478} />;
} else {
r4 = value2;
}
return <BottomSheetTitleHeader title={r6} trailing={r4} />;
}
function GuildEventsListActionSheet({guild}) { // fn#71480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:967, offset: 0x01d22463, size: 502 bytes, params: 2, frame: 27
const defaultImport = importDefault(9127) /* metro dependency 9127: useGuildScheduledEvents */;
let id = guild.id;
const value2 = defaultImport(id);
const styles = useStyles();
const binding = env0_3;
const useRef = binding.useRef;
const ackMessageId = ReadStateStore.ackMessageId;
id = guild.id;
const GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
const value3 = Reflect.apply(useRef, binding, [Reflect.apply(ackMessageId, ReadStateStore, [id, GUILD_EVENT])]);
binding.useEffect(_fun71481, [value2, guild.id]);
const value4 = binding.useCallback(_fun71483, []);
const value5 = binding.useCallback(_fun71484, [guild]);
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun71486);
binding.useEffect(_fun71487, [guild.id]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const bottomSheetProps = {'showGradient': true, 'scrollable': null, 'startExpanded': true,
scrollable: value2.length > 0};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const VSlyAn = (require(1244) /* metro dependency 1244: indexNative */).t.VSlyAn;
bottomSheetProps.dismissAccessibilityLabel = Reflect.apply(string, intl, [VSlyAn]);
bottomSheetProps.header = <GuildEventsListHeader eventCount={value2.length} guild={guild} />;
return (
<BottomSheet {...bottomSheetProps}>
<View style={styles.container}>
{((Component) => <Component inActionSheet events={value2} onPressEvent={value5} onCloseAction={value4} guild={guild} lastAckedId={(importDefault(6619) /* metro dependency 6619: useRefValue */)(value3)} />)(importDefault(9130) /* metro dependency 9130: GuildEventsListView */)}
</View>
</BottomSheet>
);
}
function GuildEventsListActionSheet({guild}) { // fn#71480, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:967, offset: 0x01d22463, size: 502 bytes, params: 2, frame: 27
const defaultImport = UseGuildScheduledEvents;
let id = guild.id;
const value2 = defaultImport(id);
const styles = useStyles();
const useRef = ReactModule.useRef;
const readStateStoreBinding = ReadStateStore;
const ackMessageId = readStateStoreBinding.ackMessageId;
id = guild.id;
const GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
const value3 = Reflect.apply(useRef, ReactModule, [Reflect.apply(ackMessageId, readStateStoreBinding, [id,
GUILD_EVENT])]);
ReactModule.useEffect(_fun71481, [value2, guild.id]);
const value4 = ReactModule.useCallback(_fun71483, []);
const value5 = ReactModule.useCallback(_fun71484, [guild]);
(UseMountEffect)(_fun71486);
ReactModule.useEffect(_fun71487, [guild.id]);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const bottomSheetProps = {'showGradient': true, 'scrollable': null, 'startExpanded': true,
scrollable: value2.length > 0};
const intl = (IndexNativeModule).intl;
const string = intl.string;
const VSlyAn = (IndexNativeModule).t.VSlyAn;
bottomSheetProps.dismissAccessibilityLabel = Reflect.apply(string, intl, [VSlyAn]);
bottomSheetProps.header = <GuildEventsListHeader eventCount={value2.length} guild={guild} />;
return (
<BottomSheet {...bottomSheetProps}>
<View style={styles.container}>
{((Component) => <Component inActionSheet events={value2} onPressEvent={value5} onCloseAction={value4} guild={guild} lastAckedId={(UseRefValue)(value3)} />)(GuildEventsListView)}
</View>
</BottomSheet>
);
function _fun71481() { // fn#71481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1101, offset: 0x01d22659, size: 73 bytes, params: 1, frame: 12
env0_1.forEach(_fun71482);
(GuildScheduledEventManager).getGuildEventsForCurrentUser(guild.id);
function _fun71482({id}) { // fn#71482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1117, offset: 0x01d226a2, size: 64 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */;
const getGuildEventUserCounts = value.getGuildEventUserCounts;
const id = guild.id;
return Reflect.apply(getGuildEventUserCounts, value, [id, id, []]);
}
}
function _fun71483() { // fn#71483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1246, offset: 0x01d226e2, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(GuildScheduledEventModalActionCreatorsModule).closeGuildEventListActionSheet();
}
function _fun71484(a0, a1) { // fn#71484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1316, offset: 0x01d22707, size: 80 bytes, params: 3, frame: 14
var environment;
const value = environment.__proto__;
(GuildScheduledEventModalActionCreatorsNativeModule).openGuildEventDetails({eventId: a0.id,
event: a0, recurrenceId: a1, onClose: onClose_71485});
function onClose_71485() { // fn#71485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1392, offset: 0x01d22436, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value.openGuildEventListActionSheet(guild);
}
}
function _fun71486() { // fn#71486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1471, offset: 0x01d22757, size: 90 bytes, params: 1, frame: 16
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: ANALYTICS_GUILD_EVENTS_MODAL_NAME, guild_id: guild.id,
guild_events_count: env0_1.length}]);
}
function _fun71487() { // fn#71487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1572, offset: 0x01d227b1, size: 78 bytes, params: 1, frame: 14
var value2;
var moduleValue;
if (guild.id != null) {
value2 = environment.__proto__;
moduleValue = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
moduleValue.ackGuildFeature(guild.id, ReadStateTypes.GUILD_EVENT);
}
}
function GuildEventsListHeaderOnPress() { // fn#71478, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:684, owner: GuildEventsListHeader.onPress, offset: 0x01d223dc, size: 90 bytes, params: 1, frame: 16
var environment;
var value2;
var moduleValue2;
if (env0_1) {
value2 = environment.__proto__;
(require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */).closeGuildEventListActionSheet();
moduleValue2 = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
moduleValue2.openCreateOrEditGuildEventModal(guild, {onClose: onClose_71479});
}
}
function _fun71481() { // fn#71481, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1101, offset: 0x01d22659, size: 73 bytes, params: 1, frame: 12
env0_1.forEach(_fun71482);
(importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventsForCurrentUser(guild.id);
}
function _fun71483() { // fn#71483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1246, offset: 0x01d226e2, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
(require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */).closeGuildEventListActionSheet();
}
function _fun71484(a0, a1) { // fn#71484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1316, offset: 0x01d22707, size: 80 bytes, params: 3, frame: 14
var environment;
const value = environment.__proto__;
(require(9032) /* metro dependency 9032: GuildScheduledEventModalActionCreatorsNative */).openGuildEventDetails({eventId: a0.id,
event: a0, recurrenceId: a1, onClose: onClose_71485});
}
function _fun71486() { // fn#71486, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1471, offset: 0x01d22757, size: 90 bytes, params: 1, frame: 16
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: ANALYTICS_GUILD_EVENTS_MODAL_NAME, guild_id: guild.id,
guild_events_count: env0_1.length}]);
}
function _fun71487() { // fn#71487, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1572, offset: 0x01d227b1, size: 78 bytes, params: 1, frame: 14
var value2;
var moduleValue;
if (guild.id != null) {
value2 = environment.__proto__;
moduleValue = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
moduleValue.ackGuildFeature(guild.id, ReadStateTypes.GUILD_EVENT);
}
}
function onPressOnClose_71479() { // fn#71479, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:787, owner: GuildEventsListHeader.onPress.onClose, offset: 0x01d22436, size: 45 bytes, params: 1, frame: 12
let value = environment.__proto__.__proto__;
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value.openGuildEventListActionSheet(guild);
}
function _fun71482({id}) { // fn#71482, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9310:1117, offset: 0x01d226a2, size: 64 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */;
const getGuildEventUserCounts = value.getGuildEventUserCounts;
const id = guild.id;
return Reflect.apply(getGuildEventUserCounts, value, [id, id, []]);
}
global.__d(_fun71476, 9125, [31, 27, 4605, 1385, 661, 4865, 33, 4501, 9126, 6758, 1244, 9067, 9052, 9127, 9036,
9032, 4594, 683, 5097, 6275, 9130, 6619,
2]) /* metro module 9125, dependencies: [31, 27, 4605, 1385, 661, 4865, 33, 4501, 9126, 6758, 1244, 9067, 9052, 9127, 9036, 9032, 4594, 683, 5097, 6275, 9130, 6619, 2] */;
@@ -1,75 +1,80 @@
/* Metro module 9130; source: modules/guild_scheduled_events/native/components/GuildEventsListView.tsx; dependencies: [31, 27, 33, 697, 1585, 6277, 9131, 9135, 21, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildEventsNoContent from './GuildEventsNoContent.tsx'; /* Metro dependency 9131 */
import GuildEventCard from './GuildEventCard.tsx'; /* Metro dependency 9135 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
function _fun71549(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:6, offset: 0x01d23f17, size: 264 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const value = require(27) /* metro dependency 27 */;
const env0_3 = value.View;
const env0_4 = value.FlatList;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
object2 = {};
ReactModule;
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.spacer = {height: PX_16, width: '100%'};
object.spacer = {height: PX_16, width: '100%'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {paddingHorizontal: PX_16};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventsListView.tsx');
object.container = {paddingHorizontal: PX_16};
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventsListView.tsx');
exports.default = GuildEventsListView;
exports.styles = object2;
}
function FormSeparator_71550() { // fn#71550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:253, offset: 0x01d2401f, size: 37 bytes, params: 1, frame: 13
return <View style={env0_6.spacer} />;
}
function GuildEventsListView({events, guild, onPressEvent, onCloseAction, lastAckedId, inActionSheet}) { // fn#71551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:423, offset: 0x01d24044, size: 350 bytes, params: 2, frame: 21
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
if (events.length === 0) {
const BottomSheetView = (require(6277) /* metro dependency 6277 */).BottomSheetView;
return (
<BottomSheetView>
{((Component) => <Component onClose={onCloseAction} guild={guild} />)(importDefault(9131) /* metro dependency 9131: GuildEventsNoContent */)}
</BottomSheetView>
);
exports.styles = object;
function FormSeparator_71550() { // fn#71550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:253, offset: 0x01d2401f, size: 37 bytes, params: 1, frame: 13
return <View style={env0_6.spacer} />;
}
const r2 = inActionSheet ? (require(6277) /* metro dependency 6277 */).BottomSheetFlatList : FlatList;
const r2Props = {data: events, style: env0_6.container, keyExtractor: function(a0) {
return a0.id;
}, renderItem: renderItem_71553, ItemSeparatorComponent: FormSeparator_71550, initialNumToRender: 5,
ListEmptyComponent: ListEmptyComponent};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
r2Props.contentContainerStyle = {paddingBottom: PX_16 + bottom};
return ((Component) => <Component {...r2Props} />)(r2);
}
function GuildEventsListViewRenderItem({item}) { // fn#71553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:755, owner: GuildEventsListView.renderItem, offset: 0x01d241a2, size: 137 bytes, params: 2, frame: 19
var r4;
let value = environment.__proto__;
const GuildEventCard = importDefault(9135) /* metro dependency 9135: GuildEventCard */;
const onCloseActionBinding = onCloseAction;
const onPressEventBinding = onPressEvent;
const value3 = lastAckedId != null;
if (value3) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(item.id, lastAckedId);
value = value > 0;
r4 = value;
} else {
r4 = value3;
function GuildEventsListView({events, guild, onPressEvent, onCloseAction, lastAckedId, inActionSheet}) { // fn#71551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:423, offset: 0x01d24044, size: 350 bytes, params: 2, frame: 21
const bottom = (UseSafeAreaInsetsNative)().bottom;
if (events.length === 0) {
const BottomSheetView = (require(6277) /* metro dependency 6277 */).BottomSheetView;
return (
<BottomSheetView>
{((Component) => <Component onClose={onCloseAction} guild={guild} />)(importDefault(9131) /* metro dependency 9131: GuildEventsNoContent */)}
</BottomSheetView>
);
}
const r2 = inActionSheet ? (require(6277) /* metro dependency 6277 */).BottomSheetFlatList : FlatList;
const r2Props = {data: events, style: env0_6.container, keyExtractor: function(a0) {
return a0.id;
}, renderItem: renderItem_71553, ItemSeparatorComponent: FormSeparator_71550, initialNumToRender: 5,
ListEmptyComponent: ListEmptyComponent};
const PX_16 = (Native).space.PX_16;
r2Props.contentContainerStyle = {paddingBottom: PX_16 + bottom};
return ((Component) => <Component {...r2Props} />)(r2);
function GuildEventsListViewRenderItem({item}) { // fn#71553, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:755, owner: GuildEventsListView.renderItem, offset: 0x01d241a2, size: 137 bytes, params: 2, frame: 19
var r4;
let value = environment.__proto__;
const onCloseActionBinding = onCloseAction;
const onPressEventBinding = onPressEvent;
const value3 = lastAckedId != null;
if (value3) {
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.compare(item.id, lastAckedId);
value = value > 0;
r4 = value;
} else {
r4 = value3;
}
return (
<GuildEventCard
event={item}
onCloseAction={onCloseActionBinding}
onPress={onPressEventBinding}
isNew={r4}
/>
);
}
function ListEmptyComponent() { // fn#71554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:932, owner: GuildEventsListView.ListEmptyComponent, offset: 0x01d2422b, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component onClose={onCloseAction} guild={guild} />)(GuildEventsNoContent);
}
}
return (
<GuildEventCard
event={item}
onCloseAction={onCloseActionBinding}
onPress={onPressEventBinding}
isNew={r4}
/>
);
}
function GuildEventsListViewListEmptyComponent() { // fn#71554, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9315:932, owner: GuildEventsListView.ListEmptyComponent, offset: 0x01d2422b, size: 59 bytes, params: 1, frame: 15
const value = environment.__proto__;
return ((Component) => <Component onClose={onCloseAction} guild={guild} />)(importDefault(9131) /* metro dependency 9131: GuildEventsNoContent */);
}
global.__d(_fun71549, 9130, [31, 27, 33, 697, 1585, 6277, 9131, 9135, 21,
2]) /* metro module 9130, dependencies: [31, 27, 33, 697, 1585, 6277, 9131, 9135, 21, 2] */;
@@ -1,13 +1,23 @@
/* Metro module 9131; source: modules/guild_scheduled_events/native/components/GuildEventsNoContent.tsx; dependencies: [31, 27, 3784, 661, 482, 33, 4501, 6597, 697, 566, 8124, 9132, 9133, 4573, 1244, 6766, 9112, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import PermissionStore from '../../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import TextStyles from '../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import StageSparkle from '../../../stage_channels/native/components/StageSparkle.tsx'; /* Metro dependency 8124 */
import Module09132 from '../../../../by-id/module-09132.js'; /* Metro dependency 9132 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as ConstantsModule2 from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as CalendarIconModule from '../../../../design/components/Icon/native/redesign/generated/CalendarIcon.tsx'; /* Metro dependency 9133 */
function _fun71555(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9316:6, offset: 0x01d24266, size: 387 bytes, params: 8, frame: 26
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).GuildSettingsSections;
let value = require(482) /* metro dependency 482: Constants */;
ReactModule;
let value = ConstantsModule;
const Fonts = value.Fonts;
const env0_6 = value.Permissions;
value = require(33) /* metro dependency 33 */;
@@ -15,43 +25,64 @@ function _fun71555(global, require, importDefault, importAll, module, exports, d
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
const object2 = {};
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 24, {marginBottom: 8}), 24);
object['textAlign'] = 'center';
const MOBILE_TEXT_HEADING_PRIMARY = (Native).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object2, TextStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 24, {marginBottom: 8}), 24);
object2['textAlign'] = 'center';
const env0_9 = Reflect.apply(createStyles, value, [{container: {'display': 'flex', 'flexDirection': 'column',
'justifyContent': 'center', 'alignItems': 'center', 'marginBottom': 88, 'padding': 16}, title: object,
'justifyContent': 'center', 'alignItems': 'center', 'marginBottom': 88, 'padding': 16}, title: object2,
subtitle: {'paddingBottom': 2, 'textAlign': 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventsNoContent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildEventsNoContent.tsx');
exports.default = GuildEventsNoContent;
function GuildEventsNoContent({guild, onClose}) { // fn#71556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9316:657, offset: 0x01d243e9, size: 541 bytes, params: 2, frame: 29
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var permissionStoreBinding = PermissionStore;
var MANAGE_ROLES = Permissions.MANAGE_ROLES;
return permissionStoreBinding.can(MANAGE_ROLES, guild);
}, [guild]);
const object2 = {icon: Module09132};
const CalendarIcon = (CalendarIconModule).CalendarIcon;
object2.IconComponent = CalendarIcon;
const items2 = [
<StageSparkle {...object2} />,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['WgZ+3D'])}
</Text>
);
items2[2] = (
<Text
style={styles.subtitle}
variant="text-sm/normal"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['v/S/PG'])}
</Text>
);
items2[3] = value2 && ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround style={styles.subtitle} variant="text-sm/normal" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['K+DH2o'],
{onClick: function() {
onClose();
importDefault(dependencyMap[16]).open(guild.id, GuildSettingsSections.ROLES);
}})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround);
return (
<View style={styles.container}>
{items2}
</View>
);
}
}
function GuildEventsNoContent({guild, onClose}) { // fn#71556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9316:657, offset: 0x01d243e9, size: 541 bytes, params: 2, frame: 29
const styles = useStyles();
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() {
var MANAGE_ROLES = Permissions.MANAGE_ROLES;
return PermissionStore.can(MANAGE_ROLES, guild);
}, [guild]);
const StageSparkle = importDefault(8124) /* metro dependency 8124: StageSparkle */;
const object = {icon: importDefault(9132) /* metro dependency 9132 */};
const CalendarIcon = (require(9133) /* metro dependency 9133: CalendarIcon */).CalendarIcon;
object.IconComponent = CalendarIcon;
const items2 = [<StageSparkle {...object} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items2[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['WgZ+3D'])}</Text>;
items2[2] = <Text style={styles.subtitle} variant="text-sm/normal" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['v/S/PG'])}</Text>;
items2[3] = value2 && ((TextWithIOSLinkWorkaround) => <TextWithIOSLinkWorkaround style={styles.subtitle} variant="text-sm/normal" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['K+DH2o'],
{onClick: function() {
onClose();
importDefault(dependencyMap[16]).open(guild.id, GuildSettingsSections.ROLES);
}})}</TextWithIOSLinkWorkaround>)((require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround);
return (
<View style={styles.container}>
{items2}
</View>
);
}
global.__d(_fun71555, 9131, [31, 27, 3784, 661, 482, 33, 4501, 6597, 697, 566, 8124, 9132, 9133, 4573, 1244, 6766,
9112,
2]) /* metro module 9131, dependencies: [31, 27, 3784, 661, 482, 33, 4501, 6597, 697, 566, 8124, 9132, 9133, 4573, 1244, 6766, 9112, 2] */;
@@ -1,14 +1,28 @@
/* Metro module 9034; source: modules/guild_scheduled_events/native/components/GuildScheduledEventDetailsActionSheet.tsx; dependencies: [57, 31, 27, 1867, 4117, 1385, 33, 4501, 697, 1244, 6771, 6789, 566, 9035, 9046, 9047, 9036, 1585, 8853, 9048, 9221, 6275, 6277, 9223, 9224, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildScheduledEventStore from '../../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import UseAnalyticsLocations from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import UseInterestedEventUsers from '../../useInterestedEventUsers.tsx'; /* Metro dependency 9046 */
import LazyAPIPromise from '../../../../utils/LazyAPIPromise.tsx'; /* Metro dependency 9047 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as GuildScheduledEventsConstantsModule from '../../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as UseAnalyticsLocationsModule from '../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import * as SegmentedControlStateNativeModule from '../../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */
import * as GuildEventCardComponentsModule from './GuildEventCardComponents.tsx'; /* Metro dependency 9048 */
function _fun70251(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:6, offset: 0x01cf41de, size: 328 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
let value = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
let value = GuildScheduledEventsConstantsModule;
const env0_8 = value.EventDetailSections;
const env0_9 = value.MAX_RSVP_USER_DISPLAY_COUNT;
value = require(33) /* metro dependency 33 */;
@@ -16,145 +30,165 @@ function _fun70251(global, require, importDefault, importAll, module, exports, d
const env0_11 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
const PX_12 = (Native).space.PX_12;
const env0_12 = Reflect.apply(createStyles, value, [{segmentedControl: {paddingHorizontal: PX_12},
header: {flexDirection: 'column'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildScheduledEventDetailsActionSheet.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildScheduledEventDetailsActionSheet.tsx');
exports.default = GuildScheduledEventDetailsActionSheet;
}
function GuildScheduledEventDetailsActionSheet({eventId, event, recurrenceId, onCloseActionSheet}) { // fn#70252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:494, offset: 0x01cf4326, size: 1172 bytes, params: 2, frame: 39
let env0_3 = undefined;
const env0_4 = undefined;
const styles = useStyles();
const defaultImport = importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */;
const GUILD_EVENT_MODAL = (importDefault(6789) /* metro dependency 6789: AnalyticsLocation */).GUILD_EVENT_MODAL;
const analyticsLocations = defaultImport(GUILD_EVENT_MODAL).analyticsLocations;
let binding = env0_4;
let useState = binding.useState;
const value4 = env0_3(Reflect.apply(useState, binding, [recurrenceId]), 2);
const property = value4[0];
const property2 = value4[1];
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getGuildScheduledEvent(eventId) ?? event;
}, [eventId, event]);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun70254);
const id = value5?.id;
const value8 = (importDefault(9035) /* metro dependency 9035: useGuildScheduledEventUserCount */)(value5?.guild_id,
id, property);
env0_3 = value8;
const value9 = (importDefault(9046) /* metro dependency 9046: useInterestedEventUsers */)(id, property);
binding = value9;
const value10 = binding.useMemo(_fun70255, [value9, value8]);
const value11 = (importDefault(9047) /* metro dependency 9047: LazyAPIPromise */)(_fun70256);
const binding2 = env0_3;
const value12 = binding2(value11, 2);
const env0_5 = value12[0];
const {loading, error} = value12[1];
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property4 = value13[0];
const env0_6 = value13[1];
useState = binding.useState;
const value14 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property5 = value14[0];
const env0_7 = value14[1];
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value15 = binding.useCallback(_fun70257, []);
const value16 = binding.useCallback(function() {
}, []);
let EVENT_INFO = EventDetailSections.EVENT_INFO;
items = [EVENT_INFO];
if (value6) {
items.push(EventDetailSections.RSVP_LIST);
}
const segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
const object3 = {pageWidth: 0, defaultIndex: property4, onSetActiveIndex: onSetActiveIndex_70259};
object3.items = items.map(_fun70260);
const value17 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object3]);
if (value5 == null) {
return null;
}
const GuildEventCardImageHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardImageHeader;
const view = <View style={styles.header} onLayout={value16}><GuildEventCardImageHeader event={value5} />{items.length > 1 ? <View style={styles.segmentedControl}>{((SegmentedControl) => <SegmentedControl state={value17} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}</View> : null}</View>;
const r8 = property4 < items.length ? items[property4] : EventDetailSections.EVENT_INFO;
const AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
EVENT_INFO = EventDetailSections.EVENT_INFO;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet
scrollable
startExpanded
onDismiss={onCloseActionSheet}
header={view}
>
{r8 === EVENT_INFO ? ((BottomSheetScrollView) => <BottomSheetScrollView>{((Component) => <Component guildEvent={value5} safeBottomPadding={bottom} onCloseActionSheet={onCloseActionSheet} onLayout={value15} recurrenceId={property} onRecurrencePress={property2} />)(importDefault(9223) /* metro dependency 9223: EventDetailInfoSheet */)}</BottomSheetScrollView>)((require(6277) /* metro dependency 6277 */).BottomSheetScrollView) : ((Component) => <Component userListItems={value10} guildId={value5.guild_id} loading={loading} error={error} contentHeight={property5 - bottom} safeBottomPadding={bottom} />)(importDefault(9224) /* metro dependency 9224: EventDetailRsvpSheet */)}
</BottomSheet>
</AnalyticsLocationProvider>
);
}
function _fun70254() { // fn#70254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:844, offset: 0x01cf47df, size: 51 bytes, params: 1, frame: 14
const getGuild = GuildStore.getGuild;
return Reflect.apply(getGuild, GuildStore, [env0_2?.guild_id]) != null;
}
function _fun70255() { // fn#70255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:987, offset: 0x01cf4812, size: 131 bytes, params: 1, frame: 17
var r0;
var binding2;
var items2;
var value;
const binding = env0_3;
const length = env0_4.length;
const r2 = length >= MAX_RSVP_USER_DISPLAY_COUNT && binding > MAX_RSVP_USER_DISPLAY_COUNT;
const value5 = 0;
const r4 = r2 ? global.Math.max(binding - length, value5) : value5;
if (r4 > value5) {
if (env0_4.length > value5) {
binding2 = env0_4;
items2 = [];
value = arraySpread(items2, binding2, value5, binding);
items2[value] = {count: r4};
value + 1;
r0 = items2;
} else {
r0 = env0_4;
function GuildScheduledEventDetailsActionSheet({eventId, event, recurrenceId, onCloseActionSheet}) { // fn#70252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:494, offset: 0x01cf4326, size: 1172 bytes, params: 2, frame: 39
let env0_3 = undefined;
const env0_4 = undefined;
const styles = useStyles();
const defaultImport = UseAnalyticsLocations;
const GUILD_EVENT_MODAL = (AnalyticsLocation).GUILD_EVENT_MODAL;
const analyticsLocations = defaultImport(GUILD_EVENT_MODAL).analyticsLocations;
let binding = env0_4;
let useState = binding.useState;
const value4 = env0_3(Reflect.apply(useState, binding, [recurrenceId]), 2);
const property = value4[0];
const property2 = value4[1];
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getGuildScheduledEvent(eventId) ?? event;
}, [eventId, event]);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun70254);
const id = value5?.id;
const value8 = (importDefault(9035) /* metro dependency 9035: useGuildScheduledEventUserCount */)(value5?.guild_id,
id, property);
env0_3 = value8;
const value9 = (UseInterestedEventUsers)(id, property);
binding = value9;
const value10 = binding.useMemo(_fun70255, [value9, value8]);
const value11 = (LazyAPIPromise)(_fun70256);
const binding2 = env0_3;
const value12 = binding2(value11, 2);
const env0_5 = value12[0];
const {loading, error} = value12[1];
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property4 = value13[0];
const env0_6 = value13[1];
useState = binding.useState;
const value14 = binding2(Reflect.apply(useState, binding, [0]), 2);
const property5 = value14[0];
const env0_7 = value14[1];
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value15 = binding.useCallback(_fun70257, []);
const value16 = binding.useCallback(function() {
}, []);
let EVENT_INFO = EventDetailSections.EVENT_INFO;
items2 = [EVENT_INFO];
if (value6) {
items2.push(EventDetailSections.RSVP_LIST);
}
} else {
r0 = env0_4;
const useSegmentedControlState = SegmentedControlStateNativeModule.useSegmentedControlState;
const object = {pageWidth: 0, defaultIndex: property4, onSetActiveIndex: onSetActiveIndex};
object.items = items2.map(_fun70260);
const value17 = Reflect.apply(useSegmentedControlState, SegmentedControlStateNativeModule, [object]);
if (value5 == null) {
return null;
}
const GuildEventCardImageHeader = (GuildEventCardComponentsModule).GuildEventCardImageHeader;
const view = (
<View style={styles.header} onLayout={value16}>
<GuildEventCardImageHeader event={value5} />
{
items2.length > 1
? (
<View style={styles.segmentedControl}>
{((SegmentedControl) => <SegmentedControl state={value17} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}
</View>
)
: null
}
</View>
);
const r8 = property4 < items2.length ? items2[property4] : EventDetailSections.EVENT_INFO;
const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider;
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
EVENT_INFO = EventDetailSections.EVENT_INFO;
return (
<AnalyticsLocationProvider value={analyticsLocations}>
<BottomSheet
scrollable
startExpanded
onDismiss={onCloseActionSheet}
header={view}
>
{
r8 === EVENT_INFO
? ((BottomSheetScrollView) => <BottomSheetScrollView>{((Component) => <Component guildEvent={value5} safeBottomPadding={bottom} onCloseActionSheet={onCloseActionSheet} onLayout={value15} recurrenceId={property} onRecurrencePress={property2} />)(importDefault(9223) /* metro dependency 9223: EventDetailInfoSheet */)}</BottomSheetScrollView>)((require(6277) /* metro dependency 6277 */).BottomSheetScrollView)
: ((Component) => <Component userListItems={value10} guildId={value5.guild_id} loading={loading} error={error} contentHeight={property5 - bottom} safeBottomPadding={bottom} />)(importDefault(9224) /* metro dependency 9224: EventDetailRsvpSheet */)
}
</BottomSheet>
</AnalyticsLocationProvider>
);
function _fun70254() { // fn#70254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:844, offset: 0x01cf47df, size: 51 bytes, params: 1, frame: 14
const guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
return Reflect.apply(getGuild, guildStoreBinding, [env0_2?.guild_id]) != null;
}
function _fun70255() { // fn#70255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:987, offset: 0x01cf4812, size: 131 bytes, params: 1, frame: 17
var r0;
var binding2;
var items2;
var value;
const binding = env0_3;
const length = env0_4.length;
const r2 = length >= MAX_RSVP_USER_DISPLAY_COUNT && binding > MAX_RSVP_USER_DISPLAY_COUNT;
const value5 = 0;
const r4 = r2 ? global.Math.max(binding - length, value5) : value5;
if (r4 > value5) {
if (env0_4.length > value5) {
binding2 = env0_4;
items2 = [];
value = arraySpread(items2, binding2, value5, binding);
items2[value] = {count: r4};
value + 1;
r0 = items2;
} else {
r0 = env0_4;
}
} else {
r0 = env0_4;
}
return r0;
}
function _fun70256() { // fn#70256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1162, offset: 0x01cf4895, size: 91 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = undefined;
return (importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventUsers(env0_2 == null ? value : env0_2.id,
null, env0_2 == null ? value : env0_2.guild_id);
}
function _fun70257({nativeEvent}) { // fn#70257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1408, offset: 0x01cf48f0, size: 36 bytes, params: 2, frame: 11
env0_7(nativeEvent.layout.height);
}
function onSetActiveIndex(a0) { // fn#70259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1607, owner: GuildScheduledEventDetailsActionSheet.onSetActiveIndex, offset: 0x01cf4914, size: 73 bytes, params: 2, frame: 13
if (a0 < env0_8.length && env0_8[a0] === EventDetailSections.RSVP_LIST) {
env0_5();
}
env0_6(a0);
}
function _fun70260(a0) { // fn#70260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1666, offset: 0x01cf495d, size: 251 bytes, params: 2, frame: 18
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const binding = env0_3;
const value = environment.__proto__;
const EVENT_INFO = EventDetailSections.EVENT_INFO;
const r1 = EVENT_INFO === a0 ? intl.string(t.iW6Xuo) : EventDetailSections.RSVP_LIST === a0 ? intl.formatToPlainString(t['ZrTT/N'],
{userCount: binding}) : intl.string(t.iW6Xuo);
return {id: r1, label: r1, page: null};
}
}
return r0;
}
function _fun70256() { // fn#70256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1162, offset: 0x01cf4895, size: 91 bytes, params: 1, frame: 17
let value = environment.__proto__;
value = undefined;
return (importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventUsers(env0_2 == null ? value : env0_2.id,
null, env0_2 == null ? value : env0_2.guild_id);
}
function _fun70257({nativeEvent}) { // fn#70257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1408, offset: 0x01cf48f0, size: 36 bytes, params: 2, frame: 11
env0_7(nativeEvent.layout.height);
}
function GuildScheduledEventDetailsActionSheetOnSetActiveIndex(a0) { // fn#70259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1607, owner: GuildScheduledEventDetailsActionSheet.onSetActiveIndex, offset: 0x01cf4914, size: 73 bytes, params: 2, frame: 13
if (a0 < env0_8.length && env0_8[a0] === EventDetailSections.RSVP_LIST) {
env0_5();
}
env0_6(a0);
}
function _fun70260(a0) { // fn#70260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9219:1666, offset: 0x01cf495d, size: 251 bytes, params: 2, frame: 18
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const binding = env0_3;
const value = environment.__proto__;
const EVENT_INFO = EventDetailSections.EVENT_INFO;
const r1 = EVENT_INFO === a0 ? intl.string(t.iW6Xuo) : EventDetailSections.RSVP_LIST === a0 ? intl.formatToPlainString(t['ZrTT/N'],
{userCount: binding}) : intl.string(t.iW6Xuo);
return {id: r1, label: r1, page: null};
}
global.__d(_fun70251, 9034, [57, 31, 27, 1867, 4117, 1385, 33, 4501, 697, 1244, 6771, 6789, 566, 9035, 9046, 9047,
9036, 1585, 8853, 9048, 9221, 6275, 6277, 9223, 9224,
2]) /* metro module 9034, dependencies: [57, 31, 27, 1867, 4117, 1385, 33, 4501, 697, 1244, 6771, 6789, 566, 9035, 9046, 9047, 9036, 1585, 8853, 9048, 9221, 6275, 6277, 9223, 9224, 2] */;
@@ -1,93 +1,108 @@
/* Metro module 10751; source: modules/guild_scheduled_events/native/components/GuildScheduledEventPrompts.tsx; dependencies: [31, 33, 4501, 697, 9077, 7972, 9052, 9132, 1244, 3826, 3738, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as UseManageResourcePermissionsModule from '../../../permissions/useManageResourcePermissions.tsx'; /* Metro dependency 9077 */
function _fun82663(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:6, offset: 0x01efdba6, size: 332 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
object2.actionBarCTAContainer = {marginVertical: 4};
ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {};
object.actionBarCTAContainer = {marginVertical: 4};
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
object2.iconStyle = {'tintColor': null, 'width': 20, 'height': 20, tintColor: WHITE};
const object3 = {};
object.iconStyle = {'tintColor': null, 'width': 20, 'height': 20, tintColor: WHITE};
const object4 = {};
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
object3.backgroundColor = BACKGROUND_BRAND;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.padding = 4;
object2.iconContainerStyle = object3;
object4.backgroundColor = BACKGROUND_BRAND;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.padding = 4;
object.iconContainerStyle = object4;
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object2.greenIcon = {backgroundColor: GREEN_360};
const env0_4 = Reflect.apply(createStyles, createStylesModule, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildScheduledEventPrompts.tsx');
object.greenIcon = {backgroundColor: GREEN_360};
const env0_4 = Reflect.apply(createStyles, CreateStylesModule, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/GuildScheduledEventPrompts.tsx');
exports.ScheduleEventPrompt = ScheduleEventPrompt;
exports.StartEventPrompt = StartEventPrompt;
}
function ScheduleEventPrompt({guild, channel, isLive}) { // fn#82664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:555, offset: 0x01efdcf2, size: 298 bytes, params: 2, frame: 21
var r0;
var FormCTA;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const styles = useStyles();
const useManageResourcePermissions = UseManageResourcePermissionsModule.useManageResourcePermissions;
if (Reflect.apply(useManageResourcePermissions, UseManageResourcePermissionsModule,
[channel]).canCreateGuildEvent) {
FormCTA = (require(7972) /* metro dependency 7972: native */).FormCTA;
r0 = (
<FormCTA
style={styles.actionBarCTAContainer}
onPress={onPress_82665}
iconSource={importDefault(9132) /* metro dependency 9132 */}
iconStyle={styles.iconStyle}
iconContainerStyle={styles.iconContainerStyle}
completed={isLive}
title={intl.string(t['60lJ0C'])}
subtitle={intl.string(t['EYn7/y'])}
/>
);
} else {
r0 = null;
}
return r0;
function ScheduleEventPromptOnPress() { // fn#82665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:748, owner: ScheduleEventPrompt.onPress, offset: 0x01efde1c, size: 56 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value.openCreateOrEditGuildEventModal(guild, {channel: channel});
}
function ScheduleEventPrompt({guild, channel, isLive}) { // fn#82664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:555, offset: 0x01efdcf2, size: 298 bytes, params: 2, frame: 21
var r0;
var FormCTA;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
if (Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[channel]).canCreateGuildEvent) {
FormCTA = (require(7972) /* metro dependency 7972: native */).FormCTA;
r0 = <FormCTA style={styles.actionBarCTAContainer} onPress={onPress_82665} iconSource={importDefault(9132) /* metro dependency 9132 */} iconStyle={styles.iconStyle} iconContainerStyle={styles.iconContainerStyle} completed={isLive} title={intl.string(t['60lJ0C'])} subtitle={intl.string(t['EYn7/y'])} />;
} else {
r0 = null;
}
return r0;
}
function StartEventPrompt({event, recurrenceId, channel, isLive}) { // fn#82666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:1026, offset: 0x01efde54, size: 397 bytes, params: 2, frame: 24
var r0;
var FormCTA;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var formatToPlainString;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var PTebCR;
var object;
var value;
const styles = useStyles();
const name = event.name;
const scheduled_start_time = event.scheduled_start_time;
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
if (Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[channel]).canManageGuildEvent(event)) {
FormCTA = (require(7972) /* metro dependency 7972: native */).FormCTA;
var formCTAProps2 = {style: styles.actionBarCTAContainer, onPress: onPress_82667,
iconSource: importDefault(9132) /* metro dependency 9132 */, iconStyle: styles.iconStyle,
iconContainerStyle: [styles.iconContainerStyle, styles.greenIcon], completed: isLive,
title: intl.formatToPlainString(t['1vGXqM'], {eventName: name})};
formatToPlainString = intl.formatToPlainString;
PTebCR = t.PTebCR;
object = {};
value = require(3826) /* metro dependency 3826: DateUtils */;
object.startTime = value.calendarFormat((importDefault(3738) /* metro dependency 3738 */)(scheduled_start_time));
formCTAProps2.subtitle = Reflect.apply(formatToPlainString, intl, [PTebCR, object]);
value = <FormCTA {...formCTAProps2} />;
r0 = value;
} else {
r0 = null;
function StartEventPrompt({event, recurrenceId, channel, isLive}) { // fn#82666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:1026, offset: 0x01efde54, size: 397 bytes, params: 2, frame: 24
var r0;
var FormCTA;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
const t = (IndexNativeModule).t;
var PTebCR;
var object2;
var value;
const styles = useStyles();
const name = event.name;
const scheduled_start_time = event.scheduled_start_time;
const useManageResourcePermissions = UseManageResourcePermissionsModule.useManageResourcePermissions;
if (Reflect.apply(useManageResourcePermissions, UseManageResourcePermissionsModule,
[channel]).canManageGuildEvent(event)) {
FormCTA = (require(7972) /* metro dependency 7972: native */).FormCTA;
var formCTAProps2 = {style: styles.actionBarCTAContainer, onPress: onPress_82667,
iconSource: importDefault(9132) /* metro dependency 9132 */, iconStyle: styles.iconStyle,
iconContainerStyle: [styles.iconContainerStyle, styles.greenIcon], completed: isLive,
title: intl.formatToPlainString(t['1vGXqM'], {eventName: name})};
formatToPlainString = intl.formatToPlainString;
PTebCR = t.PTebCR;
object2 = {};
value = require(3826) /* metro dependency 3826: DateUtils */;
object2.startTime = value.calendarFormat((importDefault(3738) /* metro dependency 3738 */)(scheduled_start_time));
formCTAProps2.subtitle = Reflect.apply(formatToPlainString, intl, [PTebCR, object2]);
value = <FormCTA {...formCTAProps2} />;
r0 = value;
} else {
r0 = null;
}
return r0;
function StartEventPromptOnPress() { // fn#82667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:1271, owner: StartEventPrompt.onPress, offset: 0x01efdfe1, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value.openStartGuildEventModal(event, recurrenceId);
}
}
return r0;
}
function ScheduleEventPromptOnPress() { // fn#82665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:748, owner: ScheduleEventPrompt.onPress, offset: 0x01efde1c, size: 56 bytes, params: 1, frame: 15
let value = environment.__proto__;
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value.openCreateOrEditGuildEventModal(guild, {channel: channel});
}
function StartEventPromptOnPress() { // fn#82667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10937:1271, owner: StartEventPrompt.onPress, offset: 0x01efdfe1, size: 50 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value.openStartGuildEventModal(event, recurrenceId);
}
global.__d(_fun82663, 10751, [31, 33, 4501, 697, 9077, 7972, 9052, 9132, 1244, 3826, 3738,
2]) /* metro module 10751, dependencies: [31, 33, 4501, 697, 9077, 7972, 9052, 9132, 1244, 3826, 3738, 2] */;
@@ -1,113 +1,164 @@
/* Metro module 9080; source: modules/guild_scheduled_events/native/components/StageChannelUpsell.tsx; dependencies: [57, 31, 27, 1383, 9081, 9033, 661, 33, 4501, 697, 5278, 1305, 8160, 9082, 4573, 1244, 4578, 5080, 9083, 1962, 4080, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ChannelRecordModule from '../../../../records/ChannelRecord.tsx'; /* Metro dependency 1383 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as GuildEventModalConstantsModule from '../GuildEventModalConstants.tsx'; /* Metro dependency 9033 */
import * as StageChannelUpsellCardStoreModule from '../../StageChannelUpsellCardStore.tsx'; /* Metro dependency 9081 */
function _fun70958(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70958, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:6, offset: 0x01d0ecab, size: 469 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 */;
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_4 = value.Image;
const env0_5 = value.View;
const env0_6 = (require(1383) /* metro dependency 1383: ChannelRecord */).createChannelRecord;
const env0_7 = (require(9081) /* metro dependency 9081: StageChannelUpsellCardStore */).useStageChannelUpsellCardStore;
const env0_8 = (require(9033) /* metro dependency 9033: GuildEventModalConstants */).CREATE_GUILD_EVENT_MODAL_KEY;
const env0_9 = (require(661) /* metro dependency 661: Constants */).ChannelTypes;
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;
const object = {'flexDirection': 'column', 'alignItems': 'center', 'backgroundColor': null, 'padding': 16,
const object2 = {'flexDirection': 'column', 'alignItems': 'center', 'backgroundColor': null, 'padding': 16,
'margin': 16};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_12 = Reflect.apply(createStyles, value, [{container: object, image: {marginBottom: 16},
object2.backgroundColor = BACKGROUND_BASE_LOW;
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const env0_12 = Reflect.apply(createStyles, value, [{container: object2, image: {marginBottom: 16},
closeContainer: {'position': 'absolute', 'top': 14, 'right': 14}, header: {'lineHeight': 20, 'marginBottom': 4},
description: {'textAlign': 'center', 'marginBottom': 4}, button: {'marginTop': 12, 'alignSelf': 'stretch'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/StageChannelUpsell.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/StageChannelUpsell.tsx');
exports.default = StageChannelUpsell;
}
function StageChannelUpsell({guildId, onCreate}) { // fn#70959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:838, offset: 0x01d0ee80, size: 717 bytes, params: 2, frame: 28
var r0;
var items2;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var description;
var Button;
const styles = useStyles();
const value3 = Module00057(useStageChannelUpsellCardStore(), 2);
if (value3[0]) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
items2 = [
<PressableOpacity
onPress={value3[1]}
accessibilityRole="button"
style={styles.closeContainer}
>
{((Icon) => <Icon source={importDefault(8160) /* metro dependency 8160 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</PressableOpacity>,
];
items2[1] = <Image source={importDefault(9082) /* metro dependency 9082 */} style={styles.image} />;
string = intl.string;
items2[2] = (
<Text
style={styles.header}
variant="text-md/bold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [t.Sx8Ezi])}
</Text>
);
description = styles.description;
string = intl.string;
items2[3] = (
<Text
style={description}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [t.JUzPhm])}
</Text>
);
description = styles.description;
items2[4] = (
<Text
style={description}
variant="text-sm/medium"
color="text-default"
>
{intl.format(t.Vh7rP7, {suggestionsHook: suggestionsHook})}
</Text>
);
var viewBindingProps2 = {style: styles.button};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[5] = (
<View {...viewBindingProps2}>
<Button
variant="secondary"
size="md"
text={Reflect.apply(string, intl, [t['X/3SyA']])}
onPress={onPress_70961}
/>
</View>
);
r0 = (
<View {...viewBindingProps}>
{items2}
</View>
);
}
return r0;
function suggestionsHook(a0, a1) { // fn#70960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:1572, owner: StageChannelUpsell.suggestionsHook, offset: 0x01d0f14d, size: 67 bytes, params: 3, frame: 15
const Text = (TextModule).Text;
return (
<Text
variant="text-sm/semibold"
color="mobile-text-heading-primary"
key={a1}
>
{a0}
</Text>
);
}
function StageChannelUpsellOnPress() { // fn#70961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:1812, owner: StageChannelUpsell.onPress, offset: 0x01d0f190, size: 186 bytes, params: 1, frame: 21
var environment;
const value = environment.__proto__;
importDefault(dependencyMap[17]).popWithKey(CREATE_GUILD_EVENT_MODAL_KEY);
const defaultImport2 = importDefault(dependencyMap[17]);
const pushLazy = defaultImport2.pushLazy;
const value2 = require(dependencyMap[19])(dependencyMap[18], dependencyMap.paths);
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
Reflect.apply(pushLazy, defaultImport2, [value2, {guildId: guildId, channelType: GUILD_STAGE_VOICE,
onChannelCreated: onChannelCreated_70962, onClose: onClose_70963}, 'CREATE_CHANNEL_MODAL_KEY']);
env0_2();
importDefault(dependencyMap[20]).hideActionSheet();
function onPressOnChannelCreated(a0) { // fn#70962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:1942, owner: StageChannelUpsell.onPress.onChannelCreated, offset: 0x01d0f24a, size: 57 bytes, params: 2, frame: 12
var value2;
let value = environment.__proto__.__proto__;
const createChannelRecordBinding = createChannelRecord;
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
value = createChannelRecordBinding({id: a0, type: GUILD_STAGE_VOICE});
if (value != null) {
value2 = environment.__proto__;
onCreate(value);
}
}
function onPressOnClose() { // fn#70963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:2010, owner: StageChannelUpsell.onPress.onClose, offset: 0x01d0f283, size: 42 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(ModalActionCreators).popWithKey('CREATE_CHANNEL_MODAL_KEY');
}
}
function StageChannelUpsell({guildId, onCreate}) { // fn#70959, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:838, offset: 0x01d0ee80, size: 717 bytes, params: 2, frame: 28
var r0;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var description;
var Button;
const styles = useStyles();
const value3 = env0_3(useStageChannelUpsellCardStore(), 2);
if (value3[0]) {
r0 = null;
} else {
var viewBindingProps = {style: styles.container};
items2 = [((PressableOpacity) => <PressableOpacity onPress={value3[1]} accessibilityRole="button" style={styles.closeContainer}>{((Icon) => <Icon source={importDefault(8160) /* metro dependency 8160 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity>)((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity)];
items2[1] = <Image source={importDefault(9082) /* metro dependency 9082 */} style={styles.image} />;
string = intl.string;
items2[2] = <Text style={styles.header} variant="text-md/bold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t.Sx8Ezi])}</Text>;
description = styles.description;
string = intl.string;
items2[3] = <Text style={description} variant="text-sm/medium" color="text-default">{Reflect.apply(string, intl,
[t.JUzPhm])}</Text>;
description = styles.description;
items2[4] = <Text style={description} variant="text-sm/medium" color="text-default">{intl.format(t.Vh7rP7,
{suggestionsHook: suggestionsHook})}</Text>;
var viewBindingProps2 = {style: styles.button};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items2[5] = <View {...viewBindingProps2}><Button variant="secondary" size="md" text={Reflect.apply(string, intl,
[t['X/3SyA']])} onPress={onPress_70961} /></View>;
r0 = <View {...viewBindingProps}>{items2}</View>;
}
return r0;
}
function suggestionsHook(a0, a1) { // fn#70960, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:1572, owner: StageChannelUpsell.suggestionsHook, offset: 0x01d0f14d, size: 67 bytes, params: 3, frame: 15
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
variant="text-sm/semibold"
color="mobile-text-heading-primary"
key={a1}
>
{a0}
</Text>
);
}
function StageChannelUpsellOnPress() { // fn#70961, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:1812, owner: StageChannelUpsell.onPress, offset: 0x01d0f190, size: 186 bytes, params: 1, frame: 21
var environment;
const value = environment.__proto__;
importDefault(dependencyMap[17]).popWithKey(CREATE_GUILD_EVENT_MODAL_KEY);
const defaultImport2 = importDefault(dependencyMap[17]);
const pushLazy = defaultImport2.pushLazy;
const value2 = require(dependencyMap[19])(dependencyMap[18], dependencyMap.paths);
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
Reflect.apply(pushLazy, defaultImport2, [value2, {guildId: guildId, channelType: GUILD_STAGE_VOICE,
onChannelCreated: onChannelCreated_70962, onClose: onClose_70963}, 'CREATE_CHANNEL_MODAL_KEY']);
env0_2();
importDefault(dependencyMap[20]).hideActionSheet();
}
function onPressOnChannelCreated(a0) { // fn#70962, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:1942, owner: StageChannelUpsell.onPress.onChannelCreated, offset: 0x01d0f24a, size: 57 bytes, params: 2, frame: 12
var value2;
let value = environment.__proto__.__proto__;
const createChannelRecordBinding = createChannelRecord;
const GUILD_STAGE_VOICE = ChannelTypes.GUILD_STAGE_VOICE;
value = createChannelRecordBinding({id: a0, type: GUILD_STAGE_VOICE});
if (value != null) {
value2 = environment.__proto__;
onCreate(value);
}
}
function onPressOnClose() { // fn#70963, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9265:2010, owner: StageChannelUpsell.onPress.onClose, offset: 0x01d0f283, size: 42 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey('CREATE_CHANNEL_MODAL_KEY');
}
global.__d(_fun70958, 9080, [57, 31, 27, 1383, 9081, 9033, 661, 33, 4501, 697, 5278, 1305, 8160, 9082, 4573, 1244,
4578, 5080, 9083, 1962, 4080,
2]) /* metro module 9080, dependencies: [57, 31, 27, 1383, 9081, 9033, 661, 33, 4501, 697, 5278, 1305, 8160, 9082, 4573, 1244, 4578, 5080, 9083, 1962, 4080, 2] */;
@@ -1,200 +1,245 @@
/* Metro module 9140; source: modules/guild_scheduled_events/native/components/StartEventModal.tsx; dependencies: [5, 57, 31, 27, 1379, 1867, 1385, 9033, 33, 4501, 697, 5080, 5278, 1244, 1305, 8196, 4573, 9135, 566, 9077, 9141, 6618, 8128, 9144, 4578, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import ModalActionCreators from '../../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import GuildEventCard from './GuildEventCard.tsx'; /* Metro dependency 9135 */
import UseStartEvent from '../../useStartEvent.tsx'; /* Metro dependency 9141 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as GuildScheduledEventsConstantsModule from '../../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as SafeAreaViewModule from '../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as GuildEventModalConstantsModule from '../GuildEventModalConstants.tsx'; /* Metro dependency 9033 */
import * as UseManageResourcePermissionsModule from '../../../permissions/useManageResourcePermissions.tsx'; /* Metro dependency 9077 */
function _fun71590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:6, offset: 0x01d25d19, size: 732 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const closure = PreviewEventCard;
const PreviewEventCard2 = PreviewEventCard;
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 env0_6 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
let value = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
let value = GuildScheduledEventsConstantsModule;
const env0_9 = value.AGE_VERIFICATION_STAGE_CHANNEL_TYPES;
const env0_10 = value.GuildScheduledEventEntityTypes;
const env0_11 = (require(9033) /* metro dependency 9033: GuildEventModalConstants */).START_EVENT_MODAL_KEY;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {flex: 1};
object = {};
const object2 = {flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.padding = PX_16;
object2.padding = PX_16;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object4.backgroundColor = BACKGROUND_BASE_LOW;
object3.mainContainer = object4;
object3.container = {'flex': 1, 'flexDirection': 'column', 'justifyContent': 'space-between',
object2.backgroundColor = BACKGROUND_BASE_LOW;
object.mainContainer = object2;
object.container = {'flex': 1, 'flexDirection': 'column', 'justifyContent': 'space-between',
'alignContent': 'center'};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.headerContainer = {'display': 'flex', 'flexDirection': 'column', gap: PX_24};
object3.footerContainer = {'display': 'flex', 'flexDirection': 'column'};
object.headerContainer = {'display': 'flex', 'flexDirection': 'column', gap: PX_24};
object.footerContainer = {'display': 'flex', 'flexDirection': 'column'};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object3.header = {alignItems: 'center', paddingTop: PX_24};
object3.headerTitle = {'lineHeight': 24, 'textAlign': 'center'};
const object7 = {'display': 'flex', 'flexDirection': 'column'};
object.header = {alignItems: 'center', paddingTop: PX_24};
object.headerTitle = {'lineHeight': 24, 'textAlign': 'center'};
const object5 = {'display': 'flex', 'flexDirection': 'column'};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object7.gap = PX_8;
object5.gap = PX_8;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.marginTop = PX_16;
object3.buttonContainer = object7;
const object8 = {'borderColor': null, 'backgroundColor': null, 'shadowColor': '#000', 'shadowOpacity': 0.2,
object5.marginTop = PX_16;
object.buttonContainer = object5;
const object6 = {'borderColor': null, 'backgroundColor': null, 'shadowColor': '#000', 'shadowOpacity': 0.2,
'shadowRadius': 16};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object8.borderColor = BORDER_SUBTLE;
object6.borderColor = BORDER_SUBTLE;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object8.backgroundColor = BACKGROUND_SURFACE_HIGH;
object8.shadowOffset = {'height': 8, 'width': 0};
object3.previewCard = object8;
object3.headerPrivacyLevel = {'textAlign': 'center', 'lineHeight': 18};
const env0_14 = Reflect.apply(createStyles, value, [object3]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/StartEventModal.tsx');
object6.backgroundColor = BACKGROUND_SURFACE_HIGH;
object6.shadowOffset = {'height': 8, 'width': 0};
object.previewCard = object6;
object.headerPrivacyLevel = {'textAlign': 'center', 'lineHeight': 18};
const env0_14 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/StartEventModal.tsx');
exports.default = StartEventModal;
exports.PreviewEventCard = closure;
}
function NavigationBar({onClose}) { // fn#71591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1137, offset: 0x01d25ff5, size: 199 bytes, params: 2, frame: 22
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 Icon = (require(1305) /* metro dependency 1305: native */).Icon;
return (
<View>
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
onPress={function() {
return onClose();
}}
>
<Icon source={importDefault(8196) /* metro dependency 8196 */} />
</PressableOpacity>
</View>
);
}
function StartEventHeader({event}) { // fn#71593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1373, offset: 0x01d260bc, size: 238 bytes, params: 2, frame: 25
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<View style={styles.header}>
<Text
style={styles.headerPrivacyLevel}
variant="heading-lg/bold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['q+fFJv'])}
</Text>
<Text
style={styles.headerTitle}
variant="text-md/medium"
color="text-default"
>
{event.name}
</Text>
</View>
);
}
function PreviewEventCard({event}) { // fn#71594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1721, offset: 0x01d261aa, size: 83 bytes, params: 2, frame: 16
const styles = useStyles();
return ((Component) => <Component event={event} hideControls style={styles.previewCard} hideAgeVerificationNotice />)(importDefault(9135) /* metro dependency 9135: GuildEventCard */);
}
function StartEventModal({event, onCloseActionSheet}) { // fn#71595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1975, offset: 0x01d261fd, size: 964 bytes, params: 2, frame: 37
let env0_5 = undefined;
const styles = useStyles();
const env0_2 = event.guild_id;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guild_id);
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(event.channel_id);
}, [event]);
const useManageResourcePermissionsModule = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
const useManageResourcePermissions = useManageResourcePermissionsModule.useManageResourcePermissions;
const env0_3 = Reflect.apply(useManageResourcePermissions, useManageResourcePermissionsModule,
[value2 ?? guild]).canManageGuildEvent(event);
const entity_type = event.entity_type;
const STAGE_INSTANCE = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
const value4 = entity_type === STAGE_INSTANCE;
let binding = env0_5;
const value5 = binding.useState(value4);
binding = undefined;
const value6 = binding(value5, 2);
const property = value6[0];
env0_5 = value6[1];
const value7 = binding((importDefault(9141) /* metro dependency 9141: useStartEvent */)(), 2);
const env0_6 = value7[0];
const {loading, error} = value7[1];
const closure = onClose_71598;
const value8 = _fun71599();
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const navigationBar = <NavigationBar onClose={closure} />;
const view = <View style={styles.headerContainer}><StartEventHeader event={event} /><PreviewEventCard event={event} /></View>;
const items5 = [AGE_VERIFICATION_STAGE_CHANNEL_TYPES.has(event.entity_type) && ((Component) => <Component channelId={event.channel_id} />)(importDefault(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */)];
items5[1] = value4 ? ((NotificationToggle) => <NotificationToggle sendStartNotification={property} onToggle={onToggle_71604} />)((require(9144) /* metro dependency 9144: StartStageChannelModal */).NotificationToggle) : null;
const r18 = error != null ? ((Text) => <Text variant="text-sm/medium" color="text-feedback-critical">{error.getAnyErrorMessage()}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items5[2] = <View style={styles.buttonContainer}>{r18}<Button variant="active" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cK1GGY)} onPress={value8} disabled={loading} loading={loading} /></View>;
return (
<SafeAreaPaddingView
top
bottom
style={styles.mainContainer}
>
{navigationBar}
<View style={styles.container}>
{view}
<View style={styles.footerContainer}>
{items5}
</View>
exports.PreviewEventCard = PreviewEventCard2;
function NavigationBar({onClose}) { // fn#71591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1137, offset: 0x01d25ff5, size: 199 bytes, params: 2, frame: 22
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const cpT0Cq = (IndexNativeModule).t.cpT0Cq;
const Icon = (NativeModule).Icon;
return (
<View>
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl, [cpT0Cq])}
onPress={function() {
return onClose();
}}
>
<Icon source={importDefault(8196) /* metro dependency 8196 */} />
</PressableOpacity>
</View>
</SafeAreaPaddingView>
);
}
function StartEventModalOnClose() { // fn#71598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:2407, owner: StartEventModal.onClose, offset: 0x01d265fb, size: 73 bytes, params: 1, frame: 14
let value = a0;
const r2 = value !== undefined ? value : false;
value = environment.__proto__;
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).popWithKey(START_EVENT_MODAL_KEY);
if (onCloseActionSheet != null) {
onCloseActionSheet(r2);
);
}
}
function _fun71599() { // fn#71599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:2482, offset: 0x01d26644, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun71601);
return _fun71603;
}
function StartEventHeader({event}) { // fn#71593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1373, offset: 0x01d260bc, size: 238 bytes, params: 2, frame: 25
const styles = useStyles();
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<View style={styles.header}>
<Text
style={styles.headerPrivacyLevel}
variant="heading-lg/bold"
color="mobile-text-heading-primary"
>
{intl.string((IndexNativeModule).t['q+fFJv'])}
</Text>
<Text
style={styles.headerTitle}
variant="text-md/medium"
color="text-default"
>
{event.name}
</Text>
</View>
);
}
function StartEventModalOnToggle() { // fn#71604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:3062, owner: StartEventModal.onToggle, offset: 0x01d266df, size: 25 bytes, params: 1, frame: 11
env0_5(function(a0) {
return !a0;
});
}
function PreviewEventCard({event}) { // fn#71594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1721, offset: 0x01d261aa, size: 83 bytes, params: 2, frame: 16
const styles = useStyles();
return ((Component) => <Component event={event} hideControls style={styles.previewCard} hideAgeVerificationNotice />)(GuildEventCard);
}
function* _fun71601() { // fn#71601, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:2502, offset: 0x01d26673, size: 90 bytes, params: 1, frame: 16
var environment;
if (true) {
value = environment.__proto__.__proto__;
if (env2_3) {
yield View(require, env2_4, {onSuccess: function() {
return ChannelStore(true);
}});
if (false) {
return undefined;
function StartEventModal({event, onCloseActionSheet}) { // fn#71595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:1975, offset: 0x01d261fd, size: 964 bytes, params: 2, frame: 37
let env0_5 = undefined;
const styles = useStyles();
const env0_2 = event.guild_id;
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guild_id);
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(event.channel_id);
}, [event]);
const useManageResourcePermissions = UseManageResourcePermissionsModule.useManageResourcePermissions;
const env0_3 = Reflect.apply(useManageResourcePermissions, UseManageResourcePermissionsModule,
[value2 ?? guild]).canManageGuildEvent(event);
const entity_type = event.entity_type;
const STAGE_INSTANCE = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
const value4 = entity_type === STAGE_INSTANCE;
let binding = env0_5;
const value5 = binding.useState(value4);
binding = undefined;
const value6 = binding(value5, 2);
const property = value6[0];
env0_5 = value6[1];
const value7 = binding((UseStartEvent)(), 2);
const env0_6 = value7[0];
const {loading, error} = value7[1];
const onClose_715982 = onClose_71598;
const value8 = _fun71599();
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const navigationBar = <NavigationBar onClose={onClose_715982} />;
const view = (
<View style={styles.headerContainer}>
<StartEventHeader event={event} />
<PreviewEventCard event={event} />
</View>
);
const items5 = [
AGE_VERIFICATION_STAGE_CHANNEL_TYPES.has(event.entity_type) && ((Component) => <Component channelId={event.channel_id} />)(importDefault(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */),
];
items5[1] = (
value4
? ((NotificationToggle) => <NotificationToggle sendStartNotification={property} onToggle={onToggle} />)((require(9144) /* metro dependency 9144: StartStageChannelModal */).NotificationToggle)
: null
);
const r18 = (
error != null
? ((Text) => <Text variant="text-sm/medium" color="text-feedback-critical">{error.getAnyErrorMessage()}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)
: null
);
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items5[2] = (
<View style={styles.buttonContainer}>
{r18}
<Button
variant="active"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cK1GGY)}
onPress={value8}
disabled={loading}
loading={loading}
/>
</View>
);
return (
<SafeAreaPaddingView
top
bottom
style={styles.mainContainer}
>
{navigationBar}
<View style={styles.container}>
{view}
<View style={styles.footerContainer}>
{items5}
</View>
</View>
</SafeAreaPaddingView>
);
function StartEventModalOnClose() { // fn#71598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:2407, owner: StartEventModal.onClose, offset: 0x01d265fb, size: 73 bytes, params: 1, frame: 14
let value = a0;
const r2 = value !== undefined ? value : false;
value = environment.__proto__;
(ModalActionCreators).popWithKey(START_EVENT_MODAL_KEY);
if (onCloseActionSheet != null) {
onCloseActionSheet(r2);
}
} else {
ChannelStore(false);
}
function _fun71599() { // fn#71599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:2482, offset: 0x01d26644, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun71601);
return _fun71603;
function* _fun71601() { // fn#71601, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:2502, offset: 0x01d26673, size: 90 bytes, params: 1, frame: 16
var environment;
if (true) {
value = environment.__proto__.__proto__;
if (env2_3) {
yield View(require, env2_4, {onSuccess: function() {
return ChannelStore(true);
}});
if (false) {
return undefined;
}
} else {
ChannelStore(false);
}
}
}
function _fun71603() { // fn#71603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:2589, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function onToggle() { // fn#71604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9325:3062, owner: StartEventModal.onToggle, offset: 0x01d266df, size: 25 bytes, params: 1, frame: 11
env0_5(function(a0) {
return !a0;
});
}
}
}
global.__d(_fun71590, 9140, [5, 57, 31, 27, 1379, 1867, 1385, 9033, 33, 4501, 697, 5080, 5278, 1244, 1305, 8196,
4573, 9135, 566, 9077, 9141, 6618, 8128, 9144, 4578,
2]) /* metro module 9140, dependencies: [5, 57, 31, 27, 1379, 1867, 1385, 9033, 33, 4501, 697, 5080, 5278, 1244, 1305, 8196, 4573, 9135, 566, 9077, 9141, 6618, 8128, 9144, 4578, 2] */;
@@ -1,66 +1,74 @@
/* Metro module 9217; source: modules/guild_scheduled_events/native/components/ThrottledButton.tsx; dependencies: [31, 33, 4578, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
function _fun72084(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:6, offset: 0x01d39481, size: 154 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = useThrottledActionHandler;
const useThrottledActionHandler2 = useThrottledActionHandler;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/ThrottledButton.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/ThrottledButton.tsx');
exports.default = ThrottledButton;
exports.useThrottledActionHandler = closure;
}
exports.useThrottledActionHandler = useThrottledActionHandler2;
function useThrottledActionHandler() { // fn#72085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:120, offset: 0x01d3951b, size: 83 bytes, params: 1, frame: 14
const value = a0;
let env0_0 = value !== undefined ? value : 500;
const env0_1 = ReactModule.useRef(null);
ReactModule.useEffect(function() {
return _fun72087;
}, []);
return function(a0) {
var env0_0 = a0;
return _fun72089;
};
function _fun72086() { // fn#72086, offset: 0x01d3956e, size: 11 bytes, params: 1, frame: 1
return _fun72087;
function _fun72087() { // fn#72087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:207, offset: 0x01d39579, size: 29 bytes, params: 1, frame: 11
return global.clearTimeout(env1_1.current);
}
function useThrottledActionHandler() { // fn#72085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:120, offset: 0x01d3951b, size: 83 bytes, params: 1, frame: 14
const value = a0;
let env0_0 = value !== undefined ? value : 500;
const env0_1 = env0_2.useRef(null);
env0_2.useEffect(function() {
return _fun72087;
}, []);
return function(a0) {
var env0_0 = a0;
return _fun72089;
};
}
}
function ThrottledButton(a0) { // fn#72091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:441, offset: 0x01d39618, size: 173 bytes, params: 2, frame: 20
const onPress = a0.onPress;
const onPressIn = a0.onPressIn;
const onPressOut = a0.onPressOut;
let throttleMs = a0.throttleMs;
throttleMs = throttleMs === undefined ? 500 : throttleMs;
const object2 = {'onPress': 0, 'onPressIn': 0, 'onPressOut': 0, 'throttleMs': 0};
silentSetPrototypeOf(object2, null, undefined);
const value = copyDataProperties({}, a0, object2, undefined);
const value3 = useThrottledActionHandler(throttleMs);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const buttonProps = {...value};
buttonProps['onPress'] = value3(onPress);
buttonProps['onPressIn'] = value3(onPressIn);
buttonProps['onPressOut'] = value3(onPressOut);
return <Button {...buttonProps} />;
}
function _fun72088(a0) { // fn#72088, offset: 0x01d39596, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun72089;
function _fun72089(a0) { // fn#72089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:243, offset: 0x01d395a8, size: 93 bytes, params: 2, frame: 14
var environment;
if (env0_0 != null && env1_1.current === null) {
env0_0(a0);
value = environment.__proto__;
env1_1.current = global.setTimeout(_fun72090, env1_0);
}
function _fun72090() { // fn#72090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:302, offset: 0x01d39605, size: 19 bytes, params: 1, frame: 2
env2_1.current = null;
}
function _fun72086() { // fn#72086, offset: 0x01d3956e, size: 11 bytes, params: 1, frame: 1
return _fun72087;
}
}
function _fun72088(a0) { // fn#72088, offset: 0x01d39596, size: 18 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun72089;
}
}
function _fun72089(a0) { // fn#72089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:243, offset: 0x01d395a8, size: 93 bytes, params: 2, frame: 14
var environment;
if (env0_0 != null && env1_1.current === null) {
env0_0(a0);
value = environment.__proto__;
env1_1.current = global.setTimeout(_fun72090, env1_0);
}
function ThrottledButton(a0) { // fn#72091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:441, offset: 0x01d39618, size: 173 bytes, params: 2, frame: 20
const onPress = a0.onPress;
const onPressIn = a0.onPressIn;
const onPressOut = a0.onPressOut;
let throttleMs = a0.throttleMs;
throttleMs = throttleMs === undefined ? 500 : throttleMs;
const object = {'onPress': 0, 'onPressIn': 0, 'onPressOut': 0, 'throttleMs': 0};
silentSetPrototypeOf(object, null, undefined);
const value = copyDataProperties({}, a0, object, undefined);
const value3 = useThrottledActionHandler(throttleMs);
const Button = (ButtonNativeModule).Button;
const buttonProps = {...value};
buttonProps['onPress'] = value3(onPress);
buttonProps['onPressIn'] = value3(onPressIn);
buttonProps['onPressOut'] = value3(onPressOut);
return <Button {...buttonProps} />;
}
}
function _fun72090() { // fn#72090, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9402:302, offset: 0x01d39605, size: 19 bytes, params: 1, frame: 2
env2_1.current = null;
}
global.__d(_fun72084, 9217, [31, 33, 4578, 2]) /* metro module 9217, dependencies: [31, 33, 4578, 2] */;
@@ -1,81 +1,96 @@
/* Metro module 11842; source: modules/guild_scheduled_events/native/components/UpcomingEventsLongPressActionSheet.tsx; dependencies: [31, 27, 1867, 4864, 4865, 33, 4501, 566, 6805, 6758, 6819, 1244, 7972, 1305, 11843, 5097, 4080, 11844, 11845, 6613, 6610, 2] */
import GuildStore from '../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import UserGuildSettingsStore from '../../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import NotificationSettingsModalActionCreators from '../../../../actions/NotificationSettingsModalActionCreators.tsx'; /* Metro dependency 6613 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as ReadStateConstantsModule from '../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as ReadStateActionCreatorsModule from '../../../../actions/ReadStateActionCreators.tsx'; /* Metro dependency 5097 */
import * as NotificationSettingsUtilsModule from '../../../../utils/NotificationSettingsUtils.tsx'; /* Metro dependency 6610 */
function _fun90756(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90756, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:6, offset: 0x02044375, size: 265 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_6 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
const value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
const env0_9 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({headerIcon: {marginRight: 16}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/UpcomingEventsLongPressActionSheet.tsx');
ReactModule;
const env0_9 = (CreateStylesModule).createStyles({headerIcon: {marginRight: 16}});
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/UpcomingEventsLongPressActionSheet.tsx');
exports.default = UpcomingEventsLongPressActionSheet;
function UpcomingEventsLongPressActionSheet({guildId}) { // fn#90757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:377, offset: 0x0204447e, size: 701 bytes, params: 2, frame: 31
const styles = useStyles();
const guild = require(dependencyMap[7]).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const value2 = require(dependencyMap[7]).useStateFromStores([UserGuildSettingsStore], function() {
return UserGuildSettingsStore.isMuteScheduledEventsEnabled(guildId);
});
const ActionSheet = require(dependencyMap[8]).ActionSheet;
const BottomSheetTitleHeader = require(dependencyMap[9]).BottomSheetTitleHeader;
const object2 = {};
const defaultImport = importDefault(dependencyMap[10]);
const GuildIconSizes = require(dependencyMap[10]).GuildIconSizes;
const LARGE = GuildIconSizes.LARGE;
object2.leading = (
<View style={styles.headerIcon}>
{((Component) => <Component guild={guild} size={LARGE} />)(defaultImport)}
</View>
);
const intl = require(dependencyMap[11]).intl;
let string = intl.string;
const t = require(dependencyMap[11]).t;
object2.title = Reflect.apply(string, intl, [t.tlopTM]);
const items2 = [
<BottomSheetTitleHeader {...object2} />,
];
const FormRow = require(dependencyMap[12]).FormRow;
const object4 = {};
const Icon = require(dependencyMap[13]).Icon;
object4.leading = <Icon source={importDefault(dependencyMap[14])} />;
const FormLabel = require(dependencyMap[12]).FormLabel;
object4.label = <FormLabel text={intl.string(require(dependencyMap[11]).t.e6RscS)} />;
object4.onPress = onPress_90760;
items2[1] = <FormRow {...object4} />;
const formRowProps = {leading: <Icon source={importDefault(value2 ? dependencyMap[17] : dependencyMap[18])} />};
string = intl.string;
formRowProps.label = (
<FormLabel text={value2 ? Reflect.apply(string, intl, [t.COiLo0]) : Reflect.apply(string, intl, [t.ONG3Yz])} />
);
formRowProps.onPress = onPress_90761;
items2[2] = <FormRow {...formRowProps} />;
return (
<ActionSheet>
{items2}
</ActionSheet>
);
function UpcomingEventsLongPressActionSheetOnPress() { // fn#90760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:940, owner: UpcomingEventsLongPressActionSheet.onPress, offset: 0x02044756, size: 82 bytes, params: 1, frame: 16
const value = environment.__proto__;
const ackGuildFeature = ReadStateActionCreatorsModule.ackGuildFeature;
const guildIdBinding = guildId;
const GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
Reflect.apply(ackGuildFeature, ReadStateActionCreatorsModule, [guildIdBinding, GUILD_EVENT]);
(ActionSheetActionCreators).hideActionSheet();
}
function UpcomingEventsLongPressActionSheetOnPress_90761() { // fn#90761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:1213, owner: UpcomingEventsLongPressActionSheet.onPress, offset: 0x020447a8, size: 97 bytes, params: 1, frame: 19
const defaultImport = NotificationSettingsModalActionCreators;
const updateGuildNotificationSettings = defaultImport.updateGuildNotificationSettings;
const guildIdBinding = guildId;
const object = {};
const value3 = !env0_1;
object.mute_scheduled_events = value3;
const NotificationLabel = (NotificationSettingsUtilsModule).NotificationLabel;
Reflect.apply(updateGuildNotificationSettings, defaultImport, [guildIdBinding, object,
NotificationLabel.mutedEvents(value3)]);
}
}
}
function UpcomingEventsLongPressActionSheet({guildId}) { // fn#90757, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:377, offset: 0x0204447e, size: 701 bytes, params: 2, frame: 31
const styles = useStyles();
const guild = require(dependencyMap[7]).useStateFromStores([GuildStore], function() {
return GuildStore.getGuild(guildId);
});
const value2 = require(dependencyMap[7]).useStateFromStores([UserGuildSettingsStore], function() {
return UserGuildSettingsStore.isMuteScheduledEventsEnabled(guildId);
});
const ActionSheet = require(dependencyMap[8]).ActionSheet;
const BottomSheetTitleHeader = require(dependencyMap[9]).BottomSheetTitleHeader;
const object = {};
const defaultImport = importDefault(dependencyMap[10]);
const GuildIconSizes = require(dependencyMap[10]).GuildIconSizes;
const LARGE = GuildIconSizes.LARGE;
object.leading = <View style={styles.headerIcon}>{((Component) => <Component guild={guild} size={LARGE} />)(defaultImport)}</View>;
const intl = require(dependencyMap[11]).intl;
let string = intl.string;
const t = require(dependencyMap[11]).t;
object.title = Reflect.apply(string, intl, [t.tlopTM]);
const items2 = [<BottomSheetTitleHeader {...object} />];
const FormRow = require(dependencyMap[12]).FormRow;
const object3 = {};
const Icon = require(dependencyMap[13]).Icon;
object3.leading = <Icon source={importDefault(dependencyMap[14])} />;
const FormLabel = require(dependencyMap[12]).FormLabel;
object3.label = <FormLabel text={intl.string(require(dependencyMap[11]).t.e6RscS)} />;
object3.onPress = onPress_90760;
items2[1] = <FormRow {...object3} />;
const formRowProps = {leading: <Icon source={importDefault(value2 ? dependencyMap[17] : dependencyMap[18])} />};
string = intl.string;
formRowProps.label = <FormLabel text={value2 ? Reflect.apply(string, intl, [t.COiLo0]) : Reflect.apply(string, intl,
[t.ONG3Yz])} />;
formRowProps.onPress = onPress_90761;
items2[2] = <FormRow {...formRowProps} />;
return (
<ActionSheet>
{items2}
</ActionSheet>
);
}
function UpcomingEventsLongPressActionSheetOnPress() { // fn#90760, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:940, owner: UpcomingEventsLongPressActionSheet.onPress, offset: 0x02044756, size: 82 bytes, params: 1, frame: 16
const value = environment.__proto__;
const readStateActionCreatorsModule = require(5097) /* metro dependency 5097: ReadStateActionCreators */;
const ackGuildFeature = readStateActionCreatorsModule.ackGuildFeature;
const guildIdBinding = guildId;
const GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
Reflect.apply(ackGuildFeature, readStateActionCreatorsModule, [guildIdBinding, GUILD_EVENT]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
function UpcomingEventsLongPressActionSheetOnPress_90761() { // fn#90761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12028:1213, owner: UpcomingEventsLongPressActionSheet.onPress, offset: 0x020447a8, size: 97 bytes, params: 1, frame: 19
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
const updateGuildNotificationSettings = defaultImport.updateGuildNotificationSettings;
const guildIdBinding = guildId;
const object2 = {};
const value3 = !env0_1;
object2.mute_scheduled_events = value3;
const NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel;
Reflect.apply(updateGuildNotificationSettings, defaultImport, [guildIdBinding, object2,
NotificationLabel.mutedEvents(value3)]);
}
global.__d(_fun90756, 11842, [31, 27, 1867, 4864, 4865, 33, 4501, 566, 6805, 6758, 6819, 1244, 7972, 1305, 11843,
5097, 4080, 11844, 11845, 6613, 6610,
2]) /* metro module 11842, dependencies: [31, 27, 1867, 4864, 4865, 33, 4501, 566, 6805, 6758, 6819, 1244, 7972, 1305, 11843, 5097, 4080, 11844, 11845, 6613, 6610, 2] */;
@@ -1,91 +1,111 @@
/* Metro module 9150; source: modules/guild_scheduled_events/native/components/action_sheets/GuildEventRsvpPickerActionSheet.tsx; dependencies: [57, 31, 27, 1385, 33, 4501, 697, 9043, 1244, 6275, 6758, 6618, 7988, 7987, 4578, 9052, 4080, 2] */
import Module00057 from '../../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import Native from '../../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as GuildScheduledEventsConstantsModule from '../../../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as ButtonNativeModule from '../../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as BottomSheetNativeModule from '../../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
import * as SafeAreaViewModule from '../../../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as BottomSheetTitleHeaderNativeModule from '../../../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */
import * as TableRadioRowNativeModule from '../../../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
import * as GuildEventRsvpUtilsModule from '../../../utils/GuildEventRsvpUtils.tsx'; /* Metro dependency 9043 */
import * as GuildScheduledEventModalActionCreatorsModule from '../../GuildScheduledEventModalActionCreators.tsx'; /* Metro dependency 9052 */
function _fun71676(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:6, offset: 0x01d293dd, size: 301 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventUserResponses;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {paddingHorizontal: PX_16};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.buttonWrapper = {marginTop: PX_24};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/action_sheets/GuildEventRsvpPickerActionSheet.tsx');
object = {};
const PX_16 = (Native).space.PX_16;
object.container = {paddingHorizontal: PX_16};
const PX_24 = (Native).space.PX_24;
object.buttonWrapper = {marginTop: PX_24};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/action_sheets/GuildEventRsvpPickerActionSheet.tsx');
exports.default = GuildEventRsvpPickerActionSheet;
}
function GuildEventRsvpPickerActionSheet({event, recurrenceId, guildId, onRsvp}) { // fn#71677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:466, offset: 0x01d2950a, size: 685 bytes, params: 2, frame: 26
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const useState = ReactModule.useState;
const ResponseOptions = (require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).ResponseOptions;
const SERIES = ResponseOptions.SERIES;
const value4 = onRsvp(Reflect.apply(useState, ReactModule, [SERIES]), 2);
const property = value4[0];
const property2 = value4[1];
const response = (require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).getExistingRsvp(event.id,
null)?.response;
let INTERESTED = GuildScheduledEventUserResponses.INTERESTED;
const r1 = response === INTERESTED ? GuildScheduledEventUserResponses.UNINTERESTED : GuildScheduledEventUserResponses.INTERESTED;
INTERESTED = GuildScheduledEventUserResponses.INTERESTED;
const r6 = r1 === INTERESTED ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WtORed) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8MPCVr']);
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
const object = {};
const BottomSheetTitleHeader = (BottomSheetTitleHeaderNativeModule).BottomSheetTitleHeader;
object.header = <BottomSheetTitleHeader title={r6} />;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const tableRadioGroup = (
<TableRadioGroup
defaultValue={property}
onChange={property2}
hasIcons={false}
>
{(require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).getResponseOptions().map(_fun71678)}
</TableRadioGroup>
);
const Button = (ButtonNativeModule).Button;
const object4 = {onPress: onPress_71679};
const string = intl.string;
const TyCVIq = (require(1244) /* metro dependency 1244: indexNative */).t.TyCVIq;
object4.text = Reflect.apply(string, intl, [TyCVIq]);
return (
<BottomSheet {...object}>
<SafeAreaPaddingView bottom style={styles.container}>
{tableRadioGroup}
<View style={styles.buttonWrapper}>
<Button {...object4} />
</View>
</SafeAreaPaddingView>
</BottomSheet>
);
function _fun71678(a0) { // fn#71678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:1108, offset: 0x01d297b7, size: 72 bytes, params: 2, frame: 16
const value = environment.__proto__;
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
value={a0.value}
label={a0.name}
key={a0.value}
/>
);
}
function GuildEventRsvpPickerActionSheet({event, recurrenceId, guildId, onRsvp}) { // fn#71677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:466, offset: 0x01d2950a, size: 685 bytes, params: 2, frame: 26
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const binding = env0_4;
const useState = binding.useState;
const ResponseOptions = (require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).ResponseOptions;
const SERIES = ResponseOptions.SERIES;
const value4 = onRsvp(Reflect.apply(useState, binding, [SERIES]), 2);
const property = value4[0];
const property2 = value4[1];
const response = (require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).getExistingRsvp(event.id,
null)?.response;
let INTERESTED = GuildScheduledEventUserResponses.INTERESTED;
const r1 = response === INTERESTED ? GuildScheduledEventUserResponses.UNINTERESTED : GuildScheduledEventUserResponses.INTERESTED;
INTERESTED = GuildScheduledEventUserResponses.INTERESTED;
const r6 = r1 === INTERESTED ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WtORed) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8MPCVr']);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const object2 = {};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
object2.header = <BottomSheetTitleHeader title={r6} />;
const SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const tableRadioGroup = <TableRadioGroup defaultValue={property} onChange={property2} hasIcons={false}>{(require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).getResponseOptions().map(_fun71678)}</TableRadioGroup>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const object3 = {onPress: onPress_71679};
const string = intl.string;
const TyCVIq = (require(1244) /* metro dependency 1244: indexNative */).t.TyCVIq;
object3.text = Reflect.apply(string, intl, [TyCVIq]);
return (
<BottomSheet {...object2}>
<SafeAreaPaddingView bottom style={styles.container}>
{tableRadioGroup}
<View style={styles.buttonWrapper}>
<Button {...object3} />
</View>
</SafeAreaPaddingView>
</BottomSheet>
);
}
function GuildEventRsvpPickerActionSheetOnPress() { // fn#71679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:1241, owner: GuildEventRsvpPickerActionSheet.onPress, offset: 0x01d297ff, size: 157 bytes, params: 1, frame: 21
const ResponseOptions = (GuildEventRsvpUtilsModule).ResponseOptions;
const SERIES = ResponseOptions.SERIES;
const value3 = null;
const recurrenceId2 = ReactModule === SERIES ? value3 : recurrenceId;
GuildScheduledEventModalActionCreatorsModule.updateRsvp(event.id, recurrenceId2, guildId, ReactNativeModule.View);
if (value3 != onRsvp) {
onRsvp();
}
(ActionSheetActionCreators).hideActionSheet();
}
function _fun71678(a0) { // fn#71678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:1108, offset: 0x01d297b7, size: 72 bytes, params: 2, frame: 16
const value = environment.__proto__;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
value={a0.value}
label={a0.name}
key={a0.value}
/>
);
}
function GuildEventRsvpPickerActionSheetOnPress() { // fn#71679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9335:1241, owner: GuildEventRsvpPickerActionSheet.onPress, offset: 0x01d297ff, size: 157 bytes, params: 1, frame: 21
const binding = env0_4;
const ResponseOptions = (require(9043) /* metro dependency 9043: GuildEventRsvpUtils */).ResponseOptions;
const SERIES = ResponseOptions.SERIES;
const value3 = null;
const recurrenceId2 = binding === SERIES ? value3 : recurrenceId;
const guildScheduledEventModalActionCreatorsModule = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
guildScheduledEventModalActionCreatorsModule.updateRsvp(event.id, recurrenceId2, guildId, env0_5);
if (value3 != onRsvp) {
onRsvp();
}
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
}
global.__d(_fun71676, 9150, [57, 31, 27, 1385, 33, 4501, 697, 9043, 1244, 6275, 6758, 6618, 7988, 7987, 4578, 9052,
4080,
2]) /* metro module 9150, dependencies: [57, 31, 27, 1385, 33, 4501, 697, 9043, 1244, 6275, 6758, 6618, 7988, 7987, 4578, 9052, 4080, 2] */;
@@ -1,239 +1,314 @@
/* Metro module 9223; source: modules/guild_scheduled_events/native/components/event_detail/EventDetailInfoSheet.tsx; dependencies: [31, 27, 4502, 1945, 1867, 4294, 1878, 1385, 9033, 482, 33, 4501, 697, 6597, 4080, 566, 9038, 9036, 9035, 9048, 9216, 4573, 1244, 1305, 3995, 8128, 6261, 9136, 2] */
import GuildStore from '../../../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import GuildMemberStore from '../../../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
import ActionSheetActionCreators from '../../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import RTCConnectionStore from '../../../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
import AccessibilityStore from '../../../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import TextStyles from '../../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import UseGuildScheduledEventUserCount from '../../../useGuildScheduledEventUserCount.tsx'; /* Metro dependency 9035 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as GuildScheduledEventsConstantsModule from '../../../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonGroupNativeModule from '../../../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
import * as StageChannelAgeVerificationNoticeModule from '../../../../stage_channels/native/StageChannelAgeVerificationNotice.tsx'; /* Metro dependency 8128 */
import * as GuildEventModalConstantsModule from '../../GuildEventModalConstants.tsx'; /* Metro dependency 9033 */
import * as EditGuildEventUtilsModule from '../../../utils/EditGuildEventUtils.tsx'; /* Metro dependency 9038 */
import * as BellIconModule from '../../../../../design/components/Icon/native/redesign/generated/BellIcon.tsx'; /* Metro dependency 9216 */
function _fun72130(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:6, offset: 0x01d3b0dc, size: 766 bytes, params: 8, frame: 28
var object2;
const env0_0 = require;
const closure = function() {
importDefault(dependencyMap[14]).hideActionSheet(GUILD_EVENT_INFO_ACTION_SHEET_KEY);
};
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 accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_10 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).AGE_VERIFICATION_STAGE_CHANNEL_TYPES;
const env0_11 = (require(9033) /* metro dependency 9033: GuildEventModalConstants */).GUILD_EVENT_INFO_ACTION_SHEET_KEY;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
let value = require(33) /* metro dependency 33 */;
const Fonts = (ConstantsModule).Fonts;
let value = JsxRuntimeModule;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.eventContainer = {paddingHorizontal: PX_16};
object2.eventHeader = {paddingTop: 19};
const object3 = {};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object.eventContainer = {paddingHorizontal: PX_16};
object.eventHeader = {paddingTop: 19};
const object4 = {};
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object3, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 20), undefined);
object2.eventTitle = object3;
copyDataProperties(object4, TextStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 20), undefined);
object.eventTitle = object4;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.controlsContainer = {paddingTop: PX_16};
const object5 = {};
object.controlsContainer = {paddingTop: PX_16};
const object6 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingTop = PX_16;
object6.paddingTop = PX_16;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object5.paddingBottom = PX_8;
object2.eventTitleContainer = object5;
const object9 = {};
object6.paddingBottom = PX_8;
object.eventTitleContainer = object6;
const object7 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object9.paddingTop = PX_16;
object7.paddingTop = PX_16;
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object9.paddingBottom = PX_4;
object2.eventDescriptionContainer = object9;
const object10 = {};
const value3 = textStyles;
object7.paddingBottom = PX_4;
object.eventDescriptionContainer = object7;
const object8 = {};
const PRIMARY_MEDIUM = Fonts.PRIMARY_MEDIUM;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
copyDataProperties(object10, value3(PRIMARY_MEDIUM, TEXT_SUBTLE, 14), undefined);
object2.guildTextStyle = object10;
copyDataProperties(object8, TextStyles(PRIMARY_MEDIUM, TEXT_SUBTLE, 14), undefined);
object.guildTextStyle = object8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.interestedContainer = {paddingTop: PX_8, flexDirection: 'row'};
object.interestedContainer = {paddingTop: PX_8, flexDirection: 'row'};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.interestedIcon = {marginRight: PX_8};
object2.ageVerificationContainer = {marginTop: 16};
const env0_15 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/event_detail/EventDetailInfoSheet.tsx');
object.interestedIcon = {marginRight: PX_8};
object.ageVerificationContainer = {marginTop: 16};
const env0_15 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/event_detail/EventDetailInfoSheet.tsx');
exports.default = EventDetailInfoSheet;
exports.closeGuildEventInfoActionSheet = closure;
}
function EventDetailInfoSheet({guildEvent, safeBottomPadding, onLayout, onCloseActionSheet, recurrenceId, onRecurrencePress}) { // fn#72132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1198, offset: 0x01d3b404, size: 1608 bytes, params: 2, frame: 39
var r5;
var items6;
const DividerPosition = (require(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */).DividerPosition;
var value;
const styles = useStyles();
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], _fun72134,
[guildEvent.channel_id]);
const editGuildEventUtilsModule = require(9038) /* metro dependency 9038: EditGuildEventUtils */;
const value3 = editGuildEventUtilsModule.recurrenceRuleFromServer(guildEvent.recurrence_rule);
env0_3.useEffect(_fun72135, [guildEvent.guild_id, guildEvent.id]);
const value4 = (importDefault(9035) /* metro dependency 9035: useGuildScheduledEventUserCount */)(guildEvent.guild_id,
guildEvent.id, recurrenceId);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun72136);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserStore,
GuildMemberStore], _fun72137, [guildEvent]);
const creator = value6.creator;
const env0_5 = value6.creatorMember;
const items3 = [styles.eventContainer];
items3[1] = {paddingBottom: safeBottomPadding + 16};
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
const items4 = [<GuildEventCardHeader event={guildEvent} style={styles.eventHeader} showUserCount={false} showEndDate showCreator={false} recurrenceId={recurrenceId} />];
const GuildEventCardTitle = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardTitle;
items4[1] = <GuildEventCardTitle event={guildEvent} textStyle={styles.eventTitle} style={styles.eventTitleContainer} />;
const GuildEventCardSimpleGuildInfo = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardSimpleGuildInfo;
items4[2] = <GuildEventCardSimpleGuildInfo event={guildEvent} textStyle={styles.guildTextStyle} />;
const GuildEventSimpleLocation = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventSimpleLocation;
items4[3] = <GuildEventSimpleLocation event={guildEvent} />;
const BellIcon = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
const bellIcon = <BellIcon size="sm" style={styles.interestedIcon} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items4[4] = <View style={styles.interestedContainer}>{bellIcon}<Text variant="text-sm/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['+DLsD8'],
{count: value4})}</Text></View>;
let r7 = creator != null && value5;
if (r7) {
var viewBinding2Props = {style: styles.interestedContainer};
items6 = [((Avatar) => <Avatar user={creator} guildId={guildEvent.guild_id} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20} style={styles.interestedIcon} />)((require(1305) /* metro dependency 1305: native */).Avatar)];
items6[1] = <Text variant="text-sm/medium" color="text-default">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['66DLFs'],
{usernameHook: usernameHook_72138})}</Text>;
r7 = <View {...viewBinding2Props}>{items6}</View>;
}
items4[5] = r7;
const GuildEventCardDescription = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardDescription;
items4[6] = <GuildEventCardDescription event={guildEvent} style={styles.eventDescriptionContainer} />;
items4[7] = AGE_VERIFICATION_STAGE_CHANNEL_TYPES.has(guildEvent.entity_type) && ((Component) => <Component noBackground divider={[DividerPosition.TOP,
DividerPosition.BOTTOM]} onConfirmPress={onConfirmPress} channelId={guildEvent.channel_id} style={styles.ageVerificationContainer} />)(importDefault(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */);
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
const GuildEventCardPrimaryAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardPrimaryAction;
const guildEventCardPrimaryAction = <GuildEventCardPrimaryAction event={guildEvent} onCloseAction={function() {
closeGuildEventInfoActionSheet();
if (onCloseActionSheet != null) {
onCloseActionSheet();
function EventDetailInfoSheet({guildEvent, safeBottomPadding, onLayout, onCloseActionSheet, recurrenceId, onRecurrencePress}) { // fn#72132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1198, offset: 0x01d3b404, size: 1608 bytes, params: 2, frame: 39
var r5;
var items6;
const DividerPosition = (StageChannelAgeVerificationNoticeModule).DividerPosition;
var value;
const styles = useStyles();
const env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() {
return AccessibilityStore.roleStyle;
});
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore], _fun72134,
[guildEvent.channel_id]);
const value3 = EditGuildEventUtilsModule.recurrenceRuleFromServer(guildEvent.recurrence_rule);
env0_3.useEffect(_fun72135, [guildEvent.guild_id, guildEvent.id]);
const value4 = (UseGuildScheduledEventUserCount)(guildEvent.guild_id,
guildEvent.id, recurrenceId);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun72136);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UserStore,
GuildMemberStore], _fun72137, [guildEvent]);
const creator = value6.creator;
const env0_5 = value6.creatorMember;
const items3 = [styles.eventContainer];
items3[1] = {paddingBottom: safeBottomPadding + 16};
const GuildEventCardHeader = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardHeader;
const items4 = [
<GuildEventCardHeader
event={guildEvent}
style={styles.eventHeader}
showUserCount={false}
showEndDate
showCreator={false}
recurrenceId={recurrenceId}
/>,
];
const GuildEventCardTitle = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardTitle;
items4[1] = (
<GuildEventCardTitle
event={guildEvent}
textStyle={styles.eventTitle}
style={styles.eventTitleContainer}
/>
);
const GuildEventCardSimpleGuildInfo = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardSimpleGuildInfo;
items4[2] = <GuildEventCardSimpleGuildInfo event={guildEvent} textStyle={styles.guildTextStyle} />;
const GuildEventSimpleLocation = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventSimpleLocation;
items4[3] = <GuildEventSimpleLocation event={guildEvent} />;
const BellIcon = (BellIconModule).BellIcon;
const bellIcon = <BellIcon size="sm" style={styles.interestedIcon} />;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items4[4] = (
<View style={styles.interestedContainer}>
{bellIcon}
<Text variant="text-sm/medium" color="text-default">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['+DLsD8'], {count: value4})}
</Text>
</View>
);
let r7 = creator != null && value5;
if (r7) {
var viewBinding2Props = {style: styles.interestedContainer};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
items6 = [
<Avatar
user={creator}
guildId={guildEvent.guild_id}
size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.XSMALL_20}
style={styles.interestedIcon}
/>,
];
items6[1] = (
<Text variant="text-sm/medium" color="text-default">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['66DLFs'],
{usernameHook: usernameHook})}
</Text>
);
r7 = (
<View {...viewBinding2Props}>
{items6}
</View>
);
}
}} isConnected={value2} recurrenceId={recurrenceId} />;
const r15 = value5 ? ((GuildEventShareAction) => <GuildEventShareAction event={guildEvent} />)((require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventShareAction) : null;
const GuildEventModeratorAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventModeratorAction;
items4[8] = <ButtonGroup direction="horizontal" style={styles.controlsContainer}>{guildEventCardPrimaryAction}{r15}<GuildEventModeratorAction event={guildEvent} recurrenceId={recurrenceId} /></ButtonGroup>;
const value17 = value3 != null;
if (value17) {
value = importDefault(9136) /* metro dependency 9136: GuildEventRecurrences */;
value = ((Component) => <Component guildId={guildEvent.guild_id} recurrenceRule={value3} guildEventId={guildEvent.id} onRecurrencePress={function(a0) {
return onRecurrencePress(a0);
}} activeRecurrenceId={recurrenceId} />)(value);
r5 = value;
} else {
r5 = value17;
items4[5] = r7;
const GuildEventCardDescription = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardDescription;
items4[6] = <GuildEventCardDescription event={guildEvent} style={styles.eventDescriptionContainer} />;
items4[7] = AGE_VERIFICATION_STAGE_CHANNEL_TYPES.has(guildEvent.entity_type) && ((Component) => <Component noBackground divider={[DividerPosition.TOP,
DividerPosition.BOTTOM]} onConfirmPress={onConfirmPress_72139} channelId={guildEvent.channel_id} style={styles.ageVerificationContainer} />)(importDefault(8128) /* metro dependency 8128: StageChannelAgeVerificationNotice */);
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
const GuildEventCardPrimaryAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventCardPrimaryAction;
const guildEventCardPrimaryAction = (
<GuildEventCardPrimaryAction
event={guildEvent}
onCloseAction={function() {
closeGuildEventInfoActionSheet();
if (onCloseActionSheet != null) {
onCloseActionSheet();
}
}}
isConnected={value2}
recurrenceId={recurrenceId}
/>
);
const r15 = (
value5
? ((GuildEventShareAction) => <GuildEventShareAction event={guildEvent} />)((require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventShareAction)
: null
);
const GuildEventModeratorAction = (require(9048) /* metro dependency 9048: GuildEventCardComponents */).GuildEventModeratorAction;
items4[8] = (
<ButtonGroup direction="horizontal" style={styles.controlsContainer}>
{guildEventCardPrimaryAction}
{r15}
<GuildEventModeratorAction event={guildEvent} recurrenceId={recurrenceId} />
</ButtonGroup>
);
const value17 = value3 != null;
if (value17) {
value = importDefault(9136) /* metro dependency 9136: GuildEventRecurrences */;
value = ((Component) => <Component guildId={guildEvent.guild_id} recurrenceRule={value3} guildEventId={guildEvent.id} onRecurrencePress={function(a0) {
return onRecurrencePress(a0);
}} activeRecurrenceId={recurrenceId} />)(value);
r5 = value;
} else {
r5 = value17;
}
items4[9] = r5;
return (
<View style={items3} onLayout={onLayout}>
{items4}
</View>
);
function _fun72134() { // fn#72134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1429, offset: 0x01d3ba5b, size: 52 bytes, params: 1, frame: 10
var r0;
let value = environment.__proto__;
const isConnected2 = RTCConnectionStore.isConnected();
if (isConnected2) {
value = RTCConnectionStore.getChannelId();
value = value === guildEvent.channel_id;
r0 = value;
} else {
r0 = isConnected2;
}
return r0;
}
function _fun72135() { // fn#72135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1567, offset: 0x01d3ba8f, size: 86 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */;
const getGuildEventUserCounts = value.getGuildEventUserCounts;
const guildEventBinding = guildEvent;
Reflect.apply(getGuildEventUserCounts, value, [guildEventBinding.guild_id, guildEventBinding.id, []]);
(importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventsForCurrentUser(guildEventBinding.guild_id);
}
function _fun72136() { // fn#72136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1765, offset: 0x01d3bae5, size: 38 bytes, params: 1, frame: 11
const value = environment.__proto__;
const guildStoreBinding = GuildStore;
const getGuild = guildStoreBinding.getGuild;
return Reflect.apply(getGuild, guildStoreBinding, [guildEvent.guild_id]) != null;
}
function _fun72137() { // fn#72137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1843, offset: 0x01d3bb0b, size: 107 bytes, params: 1, frame: 16
var r0;
var object;
var value2;
var userStoreBinding;
var getUser;
var guildMemberStoreBinding;
var getMember;
var guild_id;
let creator_id = guildEvent.creator_id;
if (creator_id != null) {
object = {};
value2 = environment.__proto__;
userStoreBinding = UserStore;
getUser = userStoreBinding.getUser;
guildEventBinding = guildEvent;
creator_id = guildEventBinding.creator_id;
object.creator = Reflect.apply(getUser, userStoreBinding, [creator_id]);
guildMemberStoreBinding = GuildMemberStore;
getMember = guildMemberStoreBinding.getMember;
guild_id = guildEventBinding.guild_id;
creator_id = guildEventBinding.creator_id;
object.creatorMember = Reflect.apply(getMember, guildMemberStoreBinding, [guild_id, creator_id]);
r0 = object;
} else {
r0 = {'creator': null, 'creatorMember': null};
}
return r0;
}
function usernameHook() { // fn#72138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:2962, owner: EventDetailInfoSheet.usernameHook, offset: 0x01d3bb76, size: 336 bytes, params: 1, frame: 23
var r8;
var creatorMemberBinding;
var RoleDot;
let value = environment.__proto__;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
let r0 = roleStyle === 'dot' && creatorMember?.colorString != null;
if (r0) {
RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
creatorMemberBinding = creatorMember;
r0 = (
<RoleDot
size="small"
color={creatorMemberBinding.colorString}
colors={creatorMemberBinding.colorStrings}
/>
);
}
const value7 = undefined;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const legacyTextProps = {style: creatorMember != null ? roleStyle !== 'username' ? value7 : creatorMember.colorString != null ? {color: creatorMember.colorString} : value7 : value7};
const nick = creatorMember == null ? value7 : creatorMember.nick;
if (nick != null) {
r8 = nick;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(creator);
r8 = value;
}
return (
<>
{r0}
<LegacyText {...legacyTextProps}>
{r8}
</LegacyText>
</>
);
}
function EventDetailInfoSheetOnConfirmPress() { // fn#72139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:3524, owner: EventDetailInfoSheet.onConfirmPress, offset: 0x01d3bcc6, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ActionSheetActionCreators).hideAllActionSheets();
}
}
items4[9] = r5;
return (
<View style={items3} onLayout={onLayout}>
{items4}
</View>
);
}
function _fun72134() { // fn#72134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1429, offset: 0x01d3ba5b, size: 52 bytes, params: 1, frame: 10
var r0;
let value = environment.__proto__;
const isConnected2 = RTCConnectionStore.isConnected();
if (isConnected2) {
value = RTCConnectionStore.getChannelId();
value = value === guildEvent.channel_id;
r0 = value;
} else {
r0 = isConnected2;
}
return r0;
}
function _fun72135() { // fn#72135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1567, offset: 0x01d3ba8f, size: 86 bytes, params: 1, frame: 20
let value = environment.__proto__;
value = importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */;
const getGuildEventUserCounts = value.getGuildEventUserCounts;
const guildEventBinding = guildEvent;
Reflect.apply(getGuildEventUserCounts, value, [guildEventBinding.guild_id, guildEventBinding.id, []]);
(importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventsForCurrentUser(guildEventBinding.guild_id);
}
function _fun72136() { // fn#72136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1765, offset: 0x01d3bae5, size: 38 bytes, params: 1, frame: 11
const value = environment.__proto__;
const getGuild = GuildStore.getGuild;
return Reflect.apply(getGuild, GuildStore, [guildEvent.guild_id]) != null;
}
function _fun72137() { // fn#72137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:1843, offset: 0x01d3bb0b, size: 107 bytes, params: 1, frame: 16
var r0;
var object2;
var value2;
var getUser;
var getMember;
var guild_id;
let creator_id = guildEvent.creator_id;
if (creator_id != null) {
object2 = {};
value2 = environment.__proto__;
getUser = UserStore.getUser;
guildEventBinding = guildEvent;
creator_id = guildEventBinding.creator_id;
object2.creator = Reflect.apply(getUser, UserStore, [creator_id]);
getMember = GuildMemberStore.getMember;
guild_id = guildEventBinding.guild_id;
creator_id = guildEventBinding.creator_id;
object2.creatorMember = Reflect.apply(getMember, GuildMemberStore, [guild_id, creator_id]);
r0 = object2;
} else {
r0 = {'creator': null, 'creatorMember': null};
}
return r0;
}
function EventDetailInfoSheetUsernameHook() { // fn#72138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:2962, owner: EventDetailInfoSheet.usernameHook, offset: 0x01d3bb76, size: 336 bytes, params: 1, frame: 23
var r8;
var creatorMemberBinding;
var RoleDot;
let value = environment.__proto__;
const jsxRuntimeEnv1_14Binding = jsxRuntimeEnv1_14;
let r0 = roleStyle === 'dot' && creatorMember?.colorString != null;
if (r0) {
RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
creatorMemberBinding = creatorMember;
r0 = <RoleDot size="small" color={creatorMemberBinding.colorString} colors={creatorMemberBinding.colorStrings} />;
}
const value7 = undefined;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const legacyTextProps = {style: creatorMember != null ? roleStyle !== 'username' ? value7 : creatorMember.colorString != null ? {color: creatorMember.colorString} : value7 : value7};
const nick = creatorMember == null ? value7 : creatorMember.nick;
if (nick != null) {
r8 = nick;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(creator);
r8 = value;
}
return (
<>
{r0}
<LegacyText {...legacyTextProps}>
{r8}
</LegacyText>
</>
);
}
function EventDetailInfoSheetOnConfirmPress() { // fn#72139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9408:3524, owner: EventDetailInfoSheet.onConfirmPress, offset: 0x01d3bcc6, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideAllActionSheets();
}
global.__d(_fun72130, 9223, [31, 27, 4502, 1945, 1867, 4294, 1878, 1385, 9033, 482, 33, 4501, 697, 6597, 4080, 566,
9038, 9036, 9035, 9048, 9216, 4573, 1244, 1305, 3995, 8128, 6261, 9136,
2]) /* metro module 9223, dependencies: [31, 27, 4502, 1945, 1867, 4294, 1878, 1385, 9033, 482, 33, 4501, 697, 6597, 4080, 566, 9038, 9036, 9035, 9048, 9216, 4573, 1244, 1305, 3995, 8128, 6261, 9136, 2] */;
@@ -1,195 +1,249 @@
/* Metro module 9224; source: modules/guild_scheduled_events/native/components/event_detail/EventDetailRsvpSheet.tsx; dependencies: [31, 27, 4396, 1878, 482, 33, 4501, 697, 6597, 8124, 9225, 4573, 1244, 7972, 5475, 6771, 566, 1305, 9210, 3995, 8743, 9226, 6277, 5461, 2] */
import UserStore from '../../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import PresenceStore from '../../../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */
import TextStyles from '../../../../rebrand/native/TextStyles.tsx'; /* Metro dependency 6597 */
import UseAnalyticsLocations from '../../../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import StageSparkle from '../../../../stage_channels/native/components/StageSparkle.tsx'; /* Metro dependency 8124 */
import DiscordTag from '../../../../user_profile/native/DiscordTag.tsx'; /* Metro dependency 9210 */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as IndexNativeModule from '../../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as CreateStylesModule from '../../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as TextModule from '../../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as Module06277Module from '../../../../../by-id/module-06277.js'; /* Metro dependency 6277 */
import * as NativeModule from '../../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as EventDetailTypesModule from './EventDetailTypes.tsx'; /* Metro dependency 9226 */
function _fun72142(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:6, offset: 0x01d3bd0f, size: 655 bytes, params: 8, frame: 31
var object2;
const env0_0 = require;
const closure = EventDetailRsvpSheet;
const EventDetailRsvpSheet2 = EventDetailRsvpSheet;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const Fonts = (require(482) /* metro dependency 482: Constants */).Fonts;
const value2 = require(33) /* metro dependency 33 */;
const env0_7 = value2.jsx;
const env0_8 = value2.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {staticMessageContentContainer: {'flex': 1, 'padding': 16}};
object2.userList = {paddingTop: 16};
object2.userListRow = {paddingVertical: 8};
let value = ReactModule;
const Fonts = (ConstantsModule).Fonts;
const createStyles = CreateStylesModule.createStyles;
object = {staticMessageContentContainer: {'flex': 1, 'padding': 16}};
object.userList = {paddingTop: 16};
object.userListRow = {paddingVertical: 8};
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object2.userName = {color: TEXT_DEFAULT, fontFamily: PRIMARY_SEMIBOLD, fontSize: 16};
object2.emptyDisplayContainer = {'alignItems': 'center', 'justifyContent': 'center', 'minHeight': 200};
object2.staticMessageContent = {height: '100%'};
const object3 = {paddingTop: 24};
const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */;
object.userName = {color: TEXT_DEFAULT, fontFamily: PRIMARY_SEMIBOLD, fontSize: 16};
object.emptyDisplayContainer = {'alignItems': 'center', 'justifyContent': 'center', 'minHeight': 200};
object.staticMessageContent = {height: '100%'};
const object4 = {paddingTop: 24};
const DISPLAY_EXTRABOLD = Fonts.DISPLAY_EXTRABOLD;
let MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
copyDataProperties(object3, textStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 20, {marginBottom: 8}), 20);
object3['textAlign'] = 'center';
object2.emptyDisplayTitle = object3;
copyDataProperties(object4, TextStyles(DISPLAY_EXTRABOLD, MOBILE_TEXT_HEADING_PRIMARY, 20, {marginBottom: 8}), 20);
object4['textAlign'] = 'center';
object.emptyDisplayTitle = object4;
MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY;
object2.remainingUsersIcon = {'tintColor': null, 'height': 18, 'width': 18, tintColor: MOBILE_TEXT_HEADING_PRIMARY};
object.remainingUsersIcon = {'tintColor': null, 'height': 18, 'width': 18, tintColor: MOBILE_TEXT_HEADING_PRIMARY};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.remainingUsersIconContainer = {'backgroundColor': null, 'borderRadius': 16, 'height': 32, 'width': 32,
object.remainingUsersIconContainer = {'backgroundColor': null, 'borderRadius': 16, 'height': 32, 'width': 32,
'alignItems': 'center', 'justifyContent': 'center', backgroundColor: BACKGROUND_BASE_LOWEST};
const env0_9 = Reflect.apply(createStyles, createStylesModule, [object2]);
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [object]);
value = value.memo(_fun72151);
closure.displayName = 'EventDetailRsvpSheet';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/event_detail/EventDetailRsvpSheet.tsx');
exports.default = closure;
EventDetailRsvpSheet2.displayName = 'EventDetailRsvpSheet';
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/event_detail/EventDetailRsvpSheet.tsx');
exports.default = EventDetailRsvpSheet2;
exports.UserRow = value;
}
function EmptyDisplay({children, style}) { // fn#72143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:927, offset: 0x01d3bf9e, size: 130 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.emptyDisplayContainer, style];
let value = importDefault(8124) /* metro dependency 8124: StageSparkle */;
value = ((Component) => <Component icon={importDefault(9225) /* metro dependency 9225 */} />)(value);
return (
<View style={items2}>
{value}
{children}
</View>
);
}
function FetchErrorDisplay({style}) { // fn#72144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1069, offset: 0x01d3c020, size: 161 bytes, params: 2, frame: 21
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<EmptyDisplay style={style}>
<Text
style={styles.emptyDisplayTitle}
variant="heading-lg/extrabold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.obChXk)}
</Text>
</EmptyDisplay>
);
}
function NoUsersDisplay({style}) { // fn#72145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1320, offset: 0x01d3c0c1, size: 161 bytes, params: 2, frame: 21
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<EmptyDisplay style={style}>
<Text
style={styles.emptyDisplayTitle}
variant="heading-lg/extrabold"
color="mobile-text-heading-primary"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hW0mBR)}
</Text>
</EmptyDisplay>
);
}
function RemainingUsersRow({remainingUsersGroup}) { // fn#72146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1568, offset: 0x01d3c162, size: 237 bytes, params: 2, frame: 26
const styles = useStyles();
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const object2 = {};
const userListRow = styles.userListRow;
object2.DEPRECATED_style = userListRow;
object2.leading = <View style={styles.remainingUsersIconContainer}>{((Component) => <Component source={importDefault(9225) /* metro dependency 9225 */} style={styles.remainingUsersIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</View>;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const BdQTfR = (require(1244) /* metro dependency 1244: indexNative */).t.BdQTfR;
object2.label = Reflect.apply(formatToPlainString, intl, [BdQTfR, {userRemainCount: remainingUsersGroup.count}]);
return <FormRow {...object2} key="userRemaining" />;
}
function keyExtractor_72147(a0) { // fn#72147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:2737, offset: 0x01d3c24f, size: 81 bytes, params: 2, frame: 12
const value = require(9226) /* metro dependency 9226: EventDetailTypes */;
return value.isRemainingUsersGroup(a0) ? 'RemainingUsersGroup-' + a0.count : a0.user_id;
}
function EventDetailRsvpSheet({userListItems, guildId, loading, error, contentHeight, safeBottomPadding}) { // fn#72148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:2846, offset: 0x01d3c2a0, size: 430 bytes, params: 2, frame: 24
const BottomSheetFlatList = (require(6277) /* metro dependency 6277 */).BottomSheetFlatList;
const styles = useStyles();
const object2 = {paddingBottom: safeBottomPadding};
const value2 = env0_3.useCallback(_fun72149, [guildId]);
const closure = StaticMessageContainer;
return loading && userListItems.length === 0 ? ((Component) => <Component>{((ActivityIndicator) => <ActivityIndicator style={[styles.staticMessageContent,
object2]} />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}</Component>)(closure) : error != null ? ((Component) => <Component><FetchErrorDisplay style={[styles.staticMessageContent,
object2]} /></Component>)(closure) : userListItems.length === 0 ? ((Component) => <Component><NoUsersDisplay style={[styles.staticMessageContent,
object2]} /></Component>)(closure) : <BottomSheetFlatList contentContainerStyle={[styles.userList,
{paddingBottom: safeBottomPadding}]} data={userListItems} renderItem={value2} ItemSeparatorComponent={(require(7972) /* metro dependency 7972: native */).FormDivider} keyExtractor={keyExtractor_72147} />;
}
function _fun72151({eventUser, guildId}) { // fn#72151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1922, offset: 0x01d3c53c, size: 482 bytes, params: 2, frame: 32
var object4;
var r10;
var value;
const styles = useStyles();
const env0_1 = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(eventUser.user_id);
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
let user_id = eventUser.user_id;
const {isMobileOnline, isVROnline, status} = Reflect.apply(useStateFromStoresObject, fluxModule, [[PresenceStore],
function() {
var object = {};
var eventUserBinding = eventUser;
object.isMobileOnline = PresenceStore.isMobileOnline(eventUserBinding.user_id);
object.isVROnline = PresenceStore.isVROnline(eventUserBinding.user_id);
object.status = PresenceStore.getStatus(eventUserBinding.user_id);
return object;
}, [user_id]]);
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
object4 = {};
const userListRow = styles.userListRow;
object4.DEPRECATED_style = userListRow;
object4.leading = user != null ? ((Avatar) => <Avatar user={user} guildId={guildId} isMobileOnline={isMobileOnline} isVROnline={isVROnline} status={status} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} autoStatusCutout />)((require(1305) /* metro dependency 1305: native */).Avatar) : null;
const DiscordTag = importDefault(9210) /* metro dependency 9210: DiscordTag */;
const object2 = {user: user};
const nick = eventUser.member?.nick;
if (nick != null) {
r10 = nick;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(eventUser.user);
r10 = value;
}
object2.nick = r10;
let userName = styles.userName;
object2.usernameStyle = userName;
userName = styles.userName;
object2.nicknameStyle = userName;
object4.label = <DiscordTag {...object2} />;
object4.onPress = onPress_72154;
user_id = eventUser.user_id;
return <FormRow {...object4} key={user_id} />;
}
function _fun72149({item}) { // fn#72149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:3006, offset: 0x01d3c44e, size: 100 bytes, params: 2, frame: 16
const value = environment.__proto__;
return (require(9226) /* metro dependency 9226: EventDetailTypes */).isRemainingUsersGroup(item) ? <RemainingUsersRow remainingUsersGroup={item} /> : ((Component) => <Component eventUser={item} guildId={guildId} />)(env1_10);
}
function StaticMessageContainer({children}) { // fn#72150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:3155, owner: EventDetailRsvpSheet.StaticMessageContainer, offset: 0x01d3c4b2, size: 138 bytes, params: 2, frame: 20
const styles = useStyles();
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
return (
<BottomSheetScrollView style={styles.staticMessageContentContainer} scrollEnabled={false}>
<View style={[styles.staticMessageContentContainer, {minHeight: contentHeight}]}>
function EmptyDisplay({children, style}) { // fn#72143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:927, offset: 0x01d3bf9e, size: 130 bytes, params: 2, frame: 20
const styles = useStyles();
const items2 = [styles.emptyDisplayContainer, style];
let value = StageSparkle;
value = ((Component) => <Component icon={importDefault(9225) /* metro dependency 9225 */} />)(value);
return (
<View style={items2}>
{value}
{children}
</View>
</BottomSheetScrollView>
);
}
function onPress_72154() { // fn#72154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:2660, offset: 0x01d3c792, size: 60 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
const user_id = eventUser.user_id;
value({userId: user_id, sourceAnalyticsLocations: analyticsLocations});
);
}
function FetchErrorDisplay({style}) { // fn#72144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1069, offset: 0x01d3c020, size: 161 bytes, params: 2, frame: 21
const styles = useStyles();
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<EmptyDisplay style={style}>
<Text
style={styles.emptyDisplayTitle}
variant="heading-lg/extrabold"
color="mobile-text-heading-primary"
>
{intl.string((IndexNativeModule).t.obChXk)}
</Text>
</EmptyDisplay>
);
}
function NoUsersDisplay({style}) { // fn#72145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1320, offset: 0x01d3c0c1, size: 161 bytes, params: 2, frame: 21
const styles = useStyles();
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
return (
<EmptyDisplay style={style}>
<Text
style={styles.emptyDisplayTitle}
variant="heading-lg/extrabold"
color="mobile-text-heading-primary"
>
{intl.string((IndexNativeModule).t.hW0mBR)}
</Text>
</EmptyDisplay>
);
}
function RemainingUsersRow({remainingUsersGroup}) { // fn#72146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1568, offset: 0x01d3c162, size: 237 bytes, params: 2, frame: 26
const styles = useStyles();
const FormRow = (NativeModule).FormRow;
const object = {};
const userListRow = styles.userListRow;
object.DEPRECATED_style = userListRow;
object.leading = (
<View style={styles.remainingUsersIconContainer}>
{((Component) => <Component source={importDefault(9225) /* metro dependency 9225 */} style={styles.remainingUsersIcon} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
</View>
);
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const BdQTfR = (IndexNativeModule).t.BdQTfR;
object.label = Reflect.apply(formatToPlainString, intl, [BdQTfR, {userRemainCount: remainingUsersGroup.count}]);
return <FormRow {...object} key="userRemaining" />;
}
function keyExtractor_72147(a0) { // fn#72147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:2737, offset: 0x01d3c24f, size: 81 bytes, params: 2, frame: 12
return EventDetailTypesModule.isRemainingUsersGroup(a0) ? 'RemainingUsersGroup-' + a0.count : a0.user_id;
}
function EventDetailRsvpSheet({userListItems, guildId, loading, error, contentHeight, safeBottomPadding}) { // fn#72148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:2846, offset: 0x01d3c2a0, size: 430 bytes, params: 2, frame: 24
const BottomSheetFlatList = (Module06277Module).BottomSheetFlatList;
const styles = useStyles();
const object = {paddingBottom: safeBottomPadding};
const value2 = env0_3.useCallback(_fun72149, [guildId]);
const StaticMessageContainer2 = StaticMessageContainer;
return (
loading && userListItems.length === 0
? (
<StaticMessageContainer2>
{((ActivityIndicator) => <ActivityIndicator style={[styles.staticMessageContent,
object]} />)((require(5461) /* metro dependency 5461: ActivityIndicatorNative */).ActivityIndicator)}
</StaticMessageContainer2>
)
: (
error != null
? (
<StaticMessageContainer2>
<FetchErrorDisplay style={[styles.staticMessageContent, object]} />
</StaticMessageContainer2>
)
: (
userListItems.length === 0
? (
<StaticMessageContainer2>
<NoUsersDisplay style={[styles.staticMessageContent, object]} />
</StaticMessageContainer2>
)
: (
<BottomSheetFlatList
contentContainerStyle={[styles.userList, {paddingBottom: safeBottomPadding}]}
data={userListItems}
renderItem={value2}
ItemSeparatorComponent={(require(7972) /* metro dependency 7972: native */).FormDivider}
keyExtractor={keyExtractor_72147}
/>
)
)
)
);
function _fun72149({item}) { // fn#72149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:3006, offset: 0x01d3c44e, size: 100 bytes, params: 2, frame: 16
const value = environment.__proto__;
return (
(require(9226) /* metro dependency 9226: EventDetailTypes */).isRemainingUsersGroup(item)
? (
<RemainingUsersRow remainingUsersGroup={item} />
)
: ((Component) => <Component eventUser={item} guildId={guildId} />)(env1_10)
);
}
function StaticMessageContainer({children}) { // fn#72150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:3155, owner: EventDetailRsvpSheet.StaticMessageContainer, offset: 0x01d3c4b2, size: 138 bytes, params: 2, frame: 20
const styles = useStyles();
const BottomSheetScrollView = (Module06277Module).BottomSheetScrollView;
return (
<BottomSheetScrollView style={styles.staticMessageContentContainer} scrollEnabled={false}>
<View style={[styles.staticMessageContentContainer, {minHeight: contentHeight}]}>
{children}
</View>
</BottomSheetScrollView>
);
}
}
function _fun72151({eventUser, guildId}) { // fn#72151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:1922, offset: 0x01d3c53c, size: 482 bytes, params: 2, frame: 32
var object3;
var r10;
var value;
const styles = useStyles();
const env0_1 = (UseAnalyticsLocations)().analyticsLocations;
const user = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(eventUser.user_id);
});
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresObject = fluxModule.useStateFromStoresObject;
let user_id = eventUser.user_id;
const {isMobileOnline, isVROnline, status} = Reflect.apply(useStateFromStoresObject, fluxModule, [[PresenceStore],
function() {
var object = {};
var presenceStoreBinding = PresenceStore;
var eventUserBinding = eventUser;
object.isMobileOnline = presenceStoreBinding.isMobileOnline(eventUserBinding.user_id);
object.isVROnline = presenceStoreBinding.isVROnline(eventUserBinding.user_id);
object.status = presenceStoreBinding.getStatus(eventUserBinding.user_id);
return object;
}, [user_id]]);
const FormRow = (NativeModule).FormRow;
object3 = {};
const userListRow = styles.userListRow;
object3.DEPRECATED_style = userListRow;
object3.leading = (
user != null
? ((Avatar) => <Avatar user={user} guildId={guildId} isMobileOnline={isMobileOnline} isVROnline={isVROnline} status={status} size={(require(1305) /* metro dependency 1305: native */).AvatarSizes.REFRESH_MEDIUM_32} autoStatusCutout />)((require(1305) /* metro dependency 1305: native */).Avatar)
: null
);
let object = {user: user};
const nick = eventUser.member?.nick;
if (nick != null) {
r10 = nick;
} else {
value = importDefault(3995) /* metro dependency 3995: UserUtils */;
value = value.getName(eventUser.user);
r10 = value;
}
object.nick = r10;
let userName = styles.userName;
object.usernameStyle = userName;
userName = styles.userName;
object.nicknameStyle = userName;
object3.label = <DiscordTag {...object} />;
object3.onPress = onPress_72154;
user_id = eventUser.user_id;
return <FormRow {...object3} key={user_id} />;
function onPress_72154() { // fn#72154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9409:2660, offset: 0x01d3c792, size: 60 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = importDefault(8743) /* metro dependency 8743: showUserProfileActionSheet */;
const user_id = eventUser.user_id;
value({userId: user_id, sourceAnalyticsLocations: analyticsLocations});
}
}
}
global.__d(_fun72142, 9224, [31, 27, 4396, 1878, 482, 33, 4501, 697, 6597, 8124, 9225, 4573, 1244, 7972, 5475, 6771,
566, 1305, 9210, 3995, 8743, 9226, 6277, 5461,
2]) /* metro module 9224, dependencies: [31, 27, 4396, 1878, 482, 33, 4501, 697, 6597, 8124, 9225, 4573, 1244, 7972, 5475, 6771, 566, 1305, 9210, 3995, 8743, 9226, 6277, 5461, 2] */;
@@ -1,10 +1,13 @@
/* Metro module 9226; source: modules/guild_scheduled_events/native/components/event_detail/EventDetailTypes.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun72156(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9411:6, offset: 0x01d3c814, size: 87 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/components/event_detail/EventDetailTypes.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/components/event_detail/EventDetailTypes.tsx');
exports.isRemainingUsersGroup = function(a0) {
return a0.count !== undefined;
};
}
global.__d(_fun72156, 9226, [2]) /* metro module 9226, dependencies: [2] */;
File diff suppressed because it is too large. Load diff
@@ -1,41 +1,48 @@
/* Metro module 9876; source: modules/guild_scheduled_events/native/handleAcceptEventInstantInvite.tsx; dependencies: [4117, 8581, 4116, 8879, 9052, 2] */
import GuildScheduledEventStore from '../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as AgeGateUtilsModule from '../../age_gate/native/AgeGateUtils.tsx'; /* Metro dependency 8581 */
import * as GuildScheduledEventModalActionCreatorsModule from './GuildScheduledEventModalActionCreators.tsx'; /* Metro dependency 9052 */
function _fun77460(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77460, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10062:6, offset: 0x01dfd79c, size: 118 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/handleAcceptEventInstantInvite.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/handleAcceptEventInstantInvite.tsx');
exports.default = handleAcceptEventInstantInvite;
}
function handleAcceptEventInstantInvite(a0) { // fn#77461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10062:222, offset: 0x01dfd812, size: 211 bytes, params: 2, frame: 18
var moduleValue2;
var getGuildScheduledEvent;
var guild_scheduled_event;
const value2 = undefined;
const ageGateUtilsModule = require(8581) /* metro dependency 8581: AgeGateUtils */;
if (!ageGateUtilsModule.handleNSFWGuildInvite(a0)) {
moduleValue2 = require(4116) /* metro dependency 4116: InviteTypeUtils */;
if (moduleValue2.isGuildScheduledEventInviteEmbed(a0)) {
if (a0.code != null) {
getGuildScheduledEvent = GuildScheduledEventStore.getGuildScheduledEvent;
guild_scheduled_event = a0.guild_scheduled_event;
if (Reflect.apply(getGuildScheduledEvent, GuildScheduledEventStore,
[guild_scheduled_event == null ? value2 : guild_scheduled_event.id]) != null) {
(importDefault(8879) /* metro dependency 8879: InstantInviteActionCreators */).acceptInvite({inviteKey: a0.code,
context: {location: 'Guild Scheduled Event Invite Button Embed'}, callback: callback_77462});
function handleAcceptEventInstantInvite(a0) { // fn#77461, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10062:222, offset: 0x01dfd812, size: 211 bytes, params: 2, frame: 18
var moduleValue2;
var guildScheduledEventStoreBinding;
var getGuildScheduledEvent;
var guild_scheduled_event;
const value2 = undefined;
if (!AgeGateUtilsModule.handleNSFWGuildInvite(a0)) {
moduleValue2 = require(4116) /* metro dependency 4116: InviteTypeUtils */;
if (moduleValue2.isGuildScheduledEventInviteEmbed(a0)) {
if (a0.code != null) {
guildScheduledEventStoreBinding = GuildScheduledEventStore;
getGuildScheduledEvent = guildScheduledEventStoreBinding.getGuildScheduledEvent;
guild_scheduled_event = a0.guild_scheduled_event;
if (Reflect.apply(getGuildScheduledEvent, guildScheduledEventStoreBinding,
[guild_scheduled_event == null ? value2 : guild_scheduled_event.id]) != null) {
(importDefault(8879) /* metro dependency 8879: InstantInviteActionCreators */).acceptInvite({inviteKey: a0.code,
context: {location: 'Guild Scheduled Event Invite Button Embed'}, callback: callback_77462});
}
}
}
}
return value2;
function handleAcceptEventInstantInviteCallback() { // fn#77462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10062:566, owner: handleAcceptEventInstantInvite.callback, offset: 0x01dfd8e5, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(GuildScheduledEventModalActionCreatorsModule).transitionToEventDetailsFromInvite(env0_0);
}
}
return value2;
}
function handleAcceptEventInstantInviteCallback() { // fn#77462, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10062:566, owner: handleAcceptEventInstantInvite.callback, offset: 0x01dfd8e5, size: 45 bytes, params: 1, frame: 12
const value = environment.__proto__;
(require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */).transitionToEventDetailsFromInvite(env0_0);
}
global.__d(_fun77460, 9876, [4117, 8581, 4116, 8879, 9052,
2]) /* metro module 9876, dependencies: [4117, 8581, 4116, 8879, 9052, 2] */;
@@ -1,78 +1,87 @@
/* Metro module 11841; source: modules/guild_scheduled_events/native/hooks/useEventsButtonProps.tsx; dependencies: [31, 4605, 4864, 4865, 566, 9127, 6664, 8919, 9052, 4080, 11842, 1962, 1244, 11846, 2] */
import ReadStateStore from '../../../../stores/ReadStateStore.tsx'; /* Metro dependency 4605 */
import UserGuildSettingsStore from '../../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */
import UseGuildScheduledEvents from '../../useGuildScheduledEvents.tsx'; /* Metro dependency 9127 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ReadStateConstantsModule from '../../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */
import * as UseShowMemberVerificationGateModule from '../../../guild_member_verification/hooks/useShowMemberVerificationGate.tsx'; /* Metro dependency 6664 */
import * as BaseChannelItemModule from '../../../guild_sidebar/native/BaseChannelItem.tsx'; /* Metro dependency 11846 */
function _fun90750(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90750, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:6, offset: 0x02043f92, size: 175 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 readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
const env0_6 = (require(4865) /* metro dependency 4865: ReadStateConstants */).ReadStateTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/native/hooks/useEventsButtonProps.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/native/hooks/useEventsButtonProps.tsx');
exports.default = useEventsButtonProps;
}
function useEventsButtonProps(a0) { // fn#90751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:264, offset: 0x02044041, size: 467 bytes, params: 2, frame: 24
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const env0_0 = a0;
const {hasUnread,
mentionCount} = (FluxModule).useStateFromStoresObject([ReadStateStore],
_fun90752, [a0.id]);
const value3 = (FluxModule).useStateFromStores([UserGuildSettingsStore],
_fun90753);
const value4 = (UseGuildScheduledEvents)(a0.id);
const value5 = ReactModule.useCallback(_fun90754, [a0]);
const value6 = ReactModule.useCallback(_fun90755, [a0.id]);
const r4 = value4.length > 0 ? intl.formatToPlainString(t.IBdqSu, {number: value4.length}) : intl.string(t.tlopTM);
const ChannelModes = (BaseChannelItemModule).ChannelModes;
const DEFAULT = ChannelModes.DEFAULT;
return {hasUnread: hasUnread, mentionCount: mentionCount,
mode: hasUnread && !value3 ? ChannelModes.UNREAD_IMPORTANT : DEFAULT, name: r4, eventsMuted: value3,
handlePress: value5, handleLongPress: value6};
function _fun90752() { // fn#90752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:341, offset: 0x02044214, size: 78 bytes, params: 1, frame: 16
const object = {};
const readStateStoreBinding = ReadStateStore;
const hasUnread = readStateStoreBinding.hasUnread;
const binding = env0_0;
let id = binding.id;
let GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
object.hasUnread = Reflect.apply(hasUnread, readStateStoreBinding, [id, GUILD_EVENT]);
const getMentionCount = readStateStoreBinding.getMentionCount;
id = binding.id;
GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
object.mentionCount = Reflect.apply(getMentionCount, readStateStoreBinding, [id, GUILD_EVENT]);
return object;
}
function useEventsButtonProps(a0) { // fn#90751, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:264, offset: 0x02044041, size: 467 bytes, params: 2, frame: 24
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const env0_0 = a0;
const {hasUnread,
mentionCount} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ReadStateStore],
_fun90752, [a0.id]);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore],
_fun90753);
const value4 = (importDefault(9127) /* metro dependency 9127: useGuildScheduledEvents */)(a0.id);
const binding = env0_3;
const value5 = binding.useCallback(_fun90754, [a0]);
const value6 = binding.useCallback(_fun90755, [a0.id]);
const r4 = value4.length > 0 ? intl.formatToPlainString(t.IBdqSu, {number: value4.length}) : intl.string(t.tlopTM);
const ChannelModes = (require(11846) /* metro dependency 11846: BaseChannelItem */).ChannelModes;
const DEFAULT = ChannelModes.DEFAULT;
return {hasUnread: hasUnread, mentionCount: mentionCount,
mode: hasUnread && !value3 ? ChannelModes.UNREAD_IMPORTANT : DEFAULT, name: r4, eventsMuted: value3,
handlePress: value5, handleLongPress: value6};
}
function _fun90753() { // fn#90753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:516, offset: 0x02044262, size: 32 bytes, params: 1, frame: 11
const userGuildSettingsStoreBinding = UserGuildSettingsStore;
return userGuildSettingsStoreBinding.isMuteScheduledEventsEnabled(env0_0.id);
}
function _fun90752() { // fn#90752, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:341, offset: 0x02044214, size: 78 bytes, params: 1, frame: 16
const object2 = {};
const hasUnread = ReadStateStore.hasUnread;
const binding = env0_0;
let id = binding.id;
let GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
object2.hasUnread = Reflect.apply(hasUnread, ReadStateStore, [id, GUILD_EVENT]);
const getMentionCount = ReadStateStore.getMentionCount;
id = binding.id;
GUILD_EVENT = ReadStateTypes.GUILD_EVENT;
object2.mentionCount = Reflect.apply(getMentionCount, ReadStateStore, [id, GUILD_EVENT]);
return object2;
}
function _fun90754() { // fn#90754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:592, offset: 0x02044282, size: 122 bytes, params: 1, frame: 15
var r0;
let value = environment.__proto__;
if (UseShowMemberVerificationGateModule.shouldShowMembershipVerificationGate(env0_0.id)) {
value = require(8919) /* metro dependency 8919: MemberVerificationModalActionCreators */;
value = value.openMemberVerificationModal(env0_0.id);
r0 = value;
} else {
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value = value.openGuildEventListActionSheet(env0_0);
r0 = value;
}
return r0;
}
function _fun90753() { // fn#90753, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:516, offset: 0x02044262, size: 32 bytes, params: 1, frame: 11
return UserGuildSettingsStore.isMuteScheduledEventsEnabled(env0_0.id);
}
function _fun90755() { // fn#90755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:753, offset: 0x020442fc, size: 121 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[9]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
const binding = env0_0;
Reflect.apply(openLazy, defaultImport, [value, 'UpcomingEventsLongPress-' + binding.id, {guildId: binding.id}]);
}
function _fun90754() { // fn#90754, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:592, offset: 0x02044282, size: 122 bytes, params: 1, frame: 15
var r0;
let value = environment.__proto__;
const useShowMemberVerificationGateModule = require(6664) /* metro dependency 6664: useShowMemberVerificationGate */;
if (useShowMemberVerificationGateModule.shouldShowMembershipVerificationGate(env0_0.id)) {
value = require(8919) /* metro dependency 8919: MemberVerificationModalActionCreators */;
value = value.openMemberVerificationModal(env0_0.id);
r0 = value;
} else {
value = require(9052) /* metro dependency 9052: GuildScheduledEventModalActionCreators */;
value = value.openGuildEventListActionSheet(env0_0);
r0 = value;
}
return r0;
}
function _fun90755() { // fn#90755, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12027:753, offset: 0x020442fc, size: 121 bytes, params: 1, frame: 18
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[9]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[11]);
value = value(dependencyMap[10], dependencyMap.paths);
const binding = env0_0;
Reflect.apply(openLazy, defaultImport, [value, 'UpcomingEventsLongPress-' + binding.id, {guildId: binding.id}]);
}
global.__d(_fun90750, 11841, [31, 4605, 4864, 4865, 566, 9127, 6664, 8919, 9052, 4080, 11842, 1962, 1244, 11846,
2]) /* metro module 11841, dependencies: [31, 4605, 4864, 4865, 566, 9127, 6664, 8919, 9052, 4080, 11842, 1962, 1244, 11846, 2] */;
@@ -1,29 +1,32 @@
/* Metro module 9214; source: modules/guild_scheduled_events/restoreEventRecurrence.tsx; dependencies: [9037, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun72078(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9399:6, offset: 0x01d39166, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/restoreEventRecurrence.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/restoreEventRecurrence.tsx');
exports.default = restoreEventRecurrence;
}
function restoreEventRecurrence({scheduled_start_time, scheduled_end_time}, a1, a2, a3) { // fn#72079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9399:193, offset: 0x01d391c9, size: 143 bytes, params: 5, frame: 19
var r0;
var value;
if (scheduled_start_time != null) {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.updateGuildEventException({scheduled_start_time: scheduled_start_time,
scheduled_end_time: scheduled_end_time, is_canceled: false}, a1, a2, a3);
r0 = value;
} else if (scheduled_end_time == null) {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.deleteGuildEventException(a1, a2, a3);
r0 = value;
} else {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.updateGuildEventException({scheduled_start_time: scheduled_start_time,
scheduled_end_time: scheduled_end_time, is_canceled: false}, a1, a2, a3);
r0 = value;
function restoreEventRecurrence({scheduled_start_time, scheduled_end_time}, a1, a2, a3) { // fn#72079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9399:193, offset: 0x01d391c9, size: 143 bytes, params: 5, frame: 19
var r0;
var value;
if (scheduled_start_time != null) {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.updateGuildEventException({scheduled_start_time: scheduled_start_time,
scheduled_end_time: scheduled_end_time, is_canceled: false}, a1, a2, a3);
r0 = value;
} else if (scheduled_end_time == null) {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.deleteGuildEventException(a1, a2, a3);
r0 = value;
} else {
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
value = value.updateGuildEventException({scheduled_start_time: scheduled_start_time,
scheduled_end_time: scheduled_end_time, is_canceled: false}, a1, a2, a3);
r0 = value;
}
return r0;
}
return r0;
}
global.__d(_fun72078, 9214, [9037, 2]) /* metro module 9214, dependencies: [9037, 2] */;
@@ -1,61 +1,63 @@
/* Metro module 9054; source: modules/guild_scheduled_events/saveGuildEventRecurrence.tsx; dependencies: [9039, 9037, 21, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ScheduleUtilsModule from './utils/ScheduleUtils.tsx'; /* Metro dependency 9039 */
function _fun70797(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9239:6, offset: 0x01d082bf, size: 103 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/guild_scheduled_events/saveGuildEventRecurrence.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/saveGuildEventRecurrence.tsx');
exports.default = saveGuildEventRecurrence;
}
function saveGuildEventRecurrence(a0, a1, a2, a3) { // fn#70798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9239:195, offset: 0x01d08326, size: 499 bytes, params: 5, frame: 28
var r0;
var object2;
var value7;
var updateGuildEventException;
var value;
const value2 = undefined;
const baseScheduleForRecurrence = (require(9039) /* metro dependency 9039: ScheduleUtils */).getBaseScheduleForRecurrence(a1,
a0);
const scheduleUtilsModule = require(9039) /* metro dependency 9039: ScheduleUtils */;
let areDatesIdentical = scheduleUtilsModule.areDatesIdentical;
let startDate = baseScheduleForRecurrence.startDate;
const value4 = Reflect.apply(areDatesIdentical, scheduleUtilsModule, [startDate, a2.startDate]);
const value5 = null;
startDate = value4 ? value5 : a2.startDate;
const moduleValue3 = scheduleUtilsModule;
areDatesIdentical = moduleValue3.areDatesIdentical;
let endDate = baseScheduleForRecurrence.endDate;
endDate = Reflect.apply(areDatesIdentical, moduleValue3, [endDate, a2.endDate]) ? value5 : a2.endDate;
if (value5 != a3) {
value7 = scheduleUtilsModule.areSchedulesIdentical(a2, baseScheduleForRecurrence);
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
if (value7) {
value = value.deleteGuildEventException(a0.guild_id, a0.id, a3.event_exception_id);
r0 = value;
} else {
updateGuildEventException = value.updateGuildEventException;
object2 = {};
object2.scheduled_start_time = value5 == startDate ? value2 : startDate.toISOString();
r0 = value5 == endDate ? value2 : endDate.toISOString();
object2.scheduled_end_time = r0;
object2.is_canceled = a3.is_canceled;
value = Reflect.apply(updateGuildEventException, value, [object2, a0.guild_id, a0.id, a1]);
r0 = value;
function saveGuildEventRecurrence(a0, a1, a2, a3) { // fn#70798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9239:195, offset: 0x01d08326, size: 499 bytes, params: 5, frame: 28
var r0;
var object;
var value7;
var updateGuildEventException;
var value;
const value2 = undefined;
const baseScheduleForRecurrence = (ScheduleUtilsModule).getBaseScheduleForRecurrence(a1,
a0);
let areDatesIdentical = ScheduleUtilsModule.areDatesIdentical;
let startDate = baseScheduleForRecurrence.startDate;
const value4 = Reflect.apply(areDatesIdentical, ScheduleUtilsModule, [startDate, a2.startDate]);
const value5 = null;
startDate = value4 ? value5 : a2.startDate;
areDatesIdentical = ScheduleUtilsModule.areDatesIdentical;
let endDate = baseScheduleForRecurrence.endDate;
endDate = Reflect.apply(areDatesIdentical, ScheduleUtilsModule, [endDate, a2.endDate]) ? value5 : a2.endDate;
if (value5 != a3) {
value7 = ScheduleUtilsModule.areSchedulesIdentical(a2, baseScheduleForRecurrence);
value = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
if (value7) {
value = value.deleteGuildEventException(a0.guild_id, a0.id, a3.event_exception_id);
r0 = value;
} else {
updateGuildEventException = value.updateGuildEventException;
object = {};
object.scheduled_start_time = value5 == startDate ? value2 : startDate.toISOString();
r0 = value5 == endDate ? value2 : endDate.toISOString();
object.scheduled_end_time = r0;
object.is_canceled = a3.is_canceled;
value = Reflect.apply(updateGuildEventException, value, [object, a0.guild_id, a0.id, a1]);
r0 = value;
}
return r0;
}
return r0;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(a1);
const defaultImport = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
const createGuildEventException = defaultImport.createGuildEventException;
object = {};
const Date = global.Date;
const value6 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
object.original_scheduled_start_time = (date instanceof Object ? date : value6).toISOString();
object.scheduled_start_time = value5 == startDate ? value2 : startDate.toISOString();
object.scheduled_end_time = value5 == endDate ? value2 : endDate.toISOString();
object.is_canceled = false;
return Reflect.apply(createGuildEventException, defaultImport, [object, a0.guild_id, a0.id]);
}
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.extractTimestamp(a1);
const defaultImport = importDefault(9037) /* metro dependency 9037: GuildScheduledEventsActionCreators */;
const createGuildEventException = defaultImport.createGuildEventException;
object2 = {};
const Date = global.Date;
const value6 = Object.create(Date.prototype, {constructor: {value: Date}});
const date = new Date();
object2.original_scheduled_start_time = (date instanceof Object ? date : value6).toISOString();
object2.scheduled_start_time = value5 == startDate ? value2 : startDate.toISOString();
object2.scheduled_end_time = value5 == endDate ? value2 : endDate.toISOString();
object2.is_canceled = false;
return Reflect.apply(createGuildEventException, defaultImport, [object2, a0.guild_id, a0.id]);
}
global.__d(_fun70797, 9054, [9039, 9037, 21, 2]) /* metro module 9054, dependencies: [9039, 9037, 21, 2] */;
@@ -1,19 +1,25 @@
/* Metro module 14570; source: modules/guild_scheduled_events/useActiveEventOrStageInstanceChannel.tsx; dependencies: [1379, 9127, 14569, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseLiveStageChannels from '../stage_channels/useLiveStageChannels.tsx'; /* Metro dependency 14569 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseGuildScheduledEventsModule from './useGuildScheduledEvents.tsx'; /* Metro dependency 9127 */
function _fun110210(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14767:6, offset: 0x0236e4ae, size: 118 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useActiveEventOrStageInstanceChannel.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useActiveEventOrStageInstanceChannel.tsx');
exports.useActiveEventOrStageInstanceChannel = useActiveEventOrStageInstanceChannel;
function useActiveEventOrStageInstanceChannel(a0) { // fn#110211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14767:250, offset: 0x0236e524, size: 103 bytes, params: 2, frame: 15
const value2 = undefined;
const value3 = (UseGuildScheduledEventsModule).useFirstActiveEventChannel(a0);
const value4 = (UseLiveStageChannels)(a0);
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const property = value4[0];
return value3 ?? Reflect.apply(getChannel, channelStoreBinding, [property == null ? value2 : property.id]);
}
}
function useActiveEventOrStageInstanceChannel(a0) { // fn#110211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14767:250, offset: 0x0236e524, size: 103 bytes, params: 2, frame: 15
const value2 = undefined;
const value3 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useFirstActiveEventChannel(a0);
const value4 = (importDefault(14569) /* metro dependency 14569: useLiveStageChannels */)(a0);
const getChannel = ChannelStore.getChannel;
const property = value4[0];
return value3 ?? Reflect.apply(getChannel, ChannelStore, [property == null ? value2 : property.id]);
}
global.__d(_fun110210, 14570, [1379, 9127, 14569, 2]) /* metro module 14570, dependencies: [1379, 9127, 14569, 2] */;
@@ -1,4 +1,13 @@
/* Metro module 9126; source: modules/guild_scheduled_events/useCanCreateAnEvent.tsx; dependencies: [57, 1935, 1867, 3784, 661, 566, 9077, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildChannelStore from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as GuildChannelStoreModule from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
function _fun71488(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71488, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9311:6, offset: 0x01d227ff, size: 225 bytes, params: 8, frame: 19
let env0_0 = require;
const _arrayLikeToArray_71491 = function(a0, a1) {
@@ -46,159 +55,163 @@ function _fun71488(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_4 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_VOCAL_CHANNELS_KEY;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_7 = (require(661) /* metro dependency 661: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useCanCreateAnEvent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useCanCreateAnEvent.tsx');
exports.default = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[5]).useStateFromStores([GuildStore, GuildChannelStore, PermissionStore], _fun71493,
[a0, a1]);
};
}
function _createForOfIteratorHelperLoose_71489(a0, a1) { // fn#71489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9311:199, offset: 0x01d228e0, 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)) {
function _createForOfIteratorHelperLoose_71489(a0, a1) { // fn#71489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9311:199, offset: 0x01d228e0, 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);
}
return _fun71490;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_71491(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun71490;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_71491(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_71491(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun71490;
}
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 useCanCreateAnEvent(a0, a1) { // fn#71492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9311:1209, offset: 0x01d22a54, size: 102 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, GuildChannelStore,
PermissionStore], _fun71493, [a0, a1]);
}
function _fun71493() { // fn#71493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9311:1287, offset: 0x01d22aba, size: 270 bytes, params: 1, frame: 22
var r1;
var _createForOfIteratorHelperLoose_71489Binding;
var getChannels;
var value4;
var value5;
var value6;
var done;
var value7;
var channel;
var type;
var moduleValue;
var attachChannelPermissions;
var value8;
var property;
var value9;
const guild = GuildStore.getGuild(env0_0);
let can = PermissionStore.can;
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
if (!Reflect.apply(can, PermissionStore, [ADMINISTRATOR, guild])) {
can = PermissionStore.can;
reducibleJoin9: while (true) {
if (!Reflect.apply(can, PermissionStore, [Permissions.CREATE_EVENTS, guild])) {
_createForOfIteratorHelperLoose_71489Binding = _createForOfIteratorHelperLoose_71489;
getChannels = GuildChannelStore.getChannels;
value4 = Reflect.apply(getChannels, GuildChannelStore, [env0_0]);
value5 = _createForOfIteratorHelperLoose_71489Binding(value4[GUILD_VOCAL_CHANNELS_KEY]);
value6 = value5();
done = value6.done;
if (!done) {
r1 = value6;
reducibleLoop3: while (true) {
value7 = r1.value;
channel = value7.channel;
if (require != null) {
type = channel.type;
reducibleJoin5: while (true) {
if (type !== require) {
value9 = value5();
done = value9.done;
if (done) {
return false;
}
r1 = value9;
continue reducibleLoop3;
}
break reducibleJoin5;
}
}
moduleValue = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
attachChannelPermissions = moduleValue.attachChannelPermissions;
value8 = Reflect.apply(attachChannelPermissions, moduleValue, [channel]);
property = env1_2(value8, 1)[0];
can = PermissionStore.can;
if (Reflect.apply(can, PermissionStore, [property, channel])) {
return true;
}
value9 = value5();
done = value9.done;
if (done) {
return false;
}
r1 = value9;
continue reducibleLoop3;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_71491(a0, value);
r6 = value;
} else {
r6 = value;
}
}
return false;
r5 = r6;
}
break reducibleJoin9;
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun71490;
}
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 _fun71490() { // fn#71490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9311:770, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
return true;
function useCanCreateAnEvent(a0, a1) { // fn#71492, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9311:1209, offset: 0x01d22a54, size: 102 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (FluxModule).useStateFromStores([GuildStore, GuildChannelStore,
PermissionStore], _fun71493, [a0, a1]);
function _fun71493() { // fn#71493, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9311:1287, offset: 0x01d22aba, size: 270 bytes, params: 1, frame: 22
var r1;
var _createForOfIteratorHelperLoose_71489Binding;
var guildChannelStoreBinding;
var getChannels;
var value4;
var value5;
var value6;
var done;
var value7;
var channel;
var type;
var moduleValue;
var attachChannelPermissions;
var value8;
var property;
var value9;
const guild = GuildStore.getGuild(env0_0);
let can = PermissionStore.can;
const ADMINISTRATOR = Permissions.ADMINISTRATOR;
if (!Reflect.apply(can, permissionStoreBinding, [ADMINISTRATOR, guild])) {
can = PermissionStore.can;
reducibleJoin9: while (true) {
if (!Reflect.apply(can, permissionStoreBinding, [Permissions.CREATE_EVENTS, guild])) {
_createForOfIteratorHelperLoose_71489Binding = _createForOfIteratorHelperLoose_71489;
guildChannelStoreBinding = GuildChannelStore;
getChannels = guildChannelStoreBinding.getChannels;
value4 = Reflect.apply(getChannels, guildChannelStoreBinding, [env0_0]);
value5 = _createForOfIteratorHelperLoose_71489Binding(value4[GUILD_VOCAL_CHANNELS_KEY]);
value6 = value5();
done = value6.done;
if (!done) {
r1 = value6;
reducibleLoop3: while (true) {
value7 = r1.value;
channel = value7.channel;
if (require != null) {
type = channel.type;
reducibleJoin5: while (true) {
if (type !== require) {
value9 = value5();
done = value9.done;
if (done) {
return false;
}
r1 = value9;
continue reducibleLoop3;
}
break reducibleJoin5;
}
}
moduleValue = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
attachChannelPermissions = moduleValue.attachChannelPermissions;
value8 = Reflect.apply(attachChannelPermissions, moduleValue, [channel]);
property = env1_2(value8, 1)[0];
permissionStoreBinding = PermissionStore;
can = permissionStoreBinding.can;
if (Reflect.apply(can, permissionStoreBinding, [property, channel])) {
return true;
}
value9 = value5();
done = value9.done;
if (done) {
return false;
}
r1 = value9;
continue reducibleLoop3;
}
}
return false;
}
break reducibleJoin9;
}
}
return true;
}
}
}
global.__d(_fun71488, 9126, [57, 1935, 1867, 3784, 661, 566, 9077,
2]) /* metro module 9126, dependencies: [57, 1935, 1867, 3784, 661, 566, 9077, 2] */;
@@ -1,154 +1,162 @@
/* Metro module 9049; source: modules/guild_scheduled_events/useCanInviteForGuildEvent.tsx; dependencies: [1384, 1379, 1935, 1867, 3784, 4117, 1385, 661, 3789, 9050, 566, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import StageInstanceStore from '../stage_channels/StageInstanceStore.tsx'; /* Metro dependency 1384 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import GuildChannelStore from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as GuildScheduledEventStoreModule from './GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as CanViewInviteModalModule from '../instant_invite/canViewInviteModal.tsx'; /* Metro dependency 9050 */
function _fun70742(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9234:6, offset: 0x01d06275, size: 287 bytes, params: 8, frame: 21
let env0_0 = require;
const closure = canEveryoneRoleViewEvent;
const closure2 = isGuildEventInvitable;
const canEveryoneRoleViewEvent2 = canEveryoneRoleViewEvent;
const isGuildEventInvitable2 = isGuildEventInvitable;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const env0_8 = (require(4117) /* metro dependency 4117: GuildScheduledEventStore */).isGuildEventEnded;
const env0_9 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const env0_10 = (require(661) /* metro dependency 661: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useCanInviteForGuildEvent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useCanInviteForGuildEvent.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[10]).useStateFromStores([GuildChannelStore, ChannelStore, GuildStore,
StageInstanceStore], _fun70746, [a0]);
};
exports.canEveryoneRoleViewEvent = closure;
exports.isGuildEventInvitable = closure2;
}
exports.canEveryoneRoleViewEvent = canEveryoneRoleViewEvent2;
exports.isGuildEventInvitable = isGuildEventInvitable2;
function canEveryoneRoleViewEvent(a0) { // fn#70743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9234:237, offset: 0x01d06394, size: 195 bytes, params: 2, frame: 16
var moduleValue;
const value = a0;
const value2 = a1;
const value3 = undefined;
const iterator = (value2 !== value3 ? value2 : [ChannelStore])[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
const value5 = item2 === value3;
const r3 = value5 ? value3 : item;
if (!value5) {
item2.return();
}
let r0 = 'entity_type' in value ? {entityType: value.entity_type, channelId: value.channel_id} : value;
const entityType = r0.entityType;
const channelId = r0.channelId;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
if (entityType === EXTERNAL) {
return true;
}
const channel = r3.getChannel(channelId);
const value7 = channel != null;
if (value7) {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r0 = moduleValue.canEveryoneRole(Permissions.VIEW_CHANNEL, channel);
} else {
r0 = value7;
}
return r0;
}
function canEveryoneRoleViewEvent(a0) { // fn#70743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9234:237, offset: 0x01d06394, size: 195 bytes, params: 2, frame: 16
var moduleValue;
const value = a0;
const value2 = a1;
const value3 = undefined;
const iterator = (value2 !== value3 ? value2 : [ChannelStore])[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
const value5 = item2 === value3;
const r3 = value5 ? value3 : item;
if (!value5) {
item2.return();
}
let r0 = 'entity_type' in value ? {entityType: value.entity_type, channelId: value.channel_id} : value;
const entityType = r0.entityType;
const channelId = r0.channelId;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
if (entityType === EXTERNAL) {
return true;
}
const channel = r3.getChannel(channelId);
const value7 = channel != null;
if (value7) {
moduleValue = importAll(3789) /* metro dependency 3789: PermissionUtils */;
r0 = moduleValue.canEveryoneRole(Permissions.VIEW_CHANNEL, channel);
} else {
r0 = value7;
}
return r0;
}
function isGuildEventInvitable(a0) { // fn#70744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9234:544, offset: 0x01d06457, size: 358 bytes, params: 2, frame: 23
var r1;
var r0;
var r6;
var r9;
var r7;
var item3;
var item4;
var item5;
let value = a1;
const value2 = undefined;
const iterator = (value !== value2 ? value : [GuildChannelStore, ChannelStore, GuildStore,
StageInstanceStore])[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const r11 = item2 === value2 ? value2 : item;
if (value) {
r0 = item2;
r1 = value;
r6 = value2;
} else {
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value = item3 === value2;
function isGuildEventInvitable(a0) { // fn#70744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9234:544, offset: 0x01d06457, size: 358 bytes, params: 2, frame: 23
var r1;
var r0;
var r6;
var r9;
var r7;
var item3;
var item4;
var item5;
let value = a1;
const value2 = undefined;
const iterator = (value !== value2 ? value : [GuildChannelStore, ChannelStore, GuildStore,
StageInstanceStore])[Symbol.iterator]();
const iterator2 = iterator.next;
let item2 = Reflect.apply(iterator2, iterator, []);
let item = item2.value;
item2 = item2.done ? undefined : iterator;
const r11 = item2 === value2 ? value2 : item;
if (value) {
r0 = item3;
r0 = item2;
r1 = value;
r6 = value2;
} else {
r0 = item3;
r1 = value;
r6 = item;
item3 = Reflect.apply(iterator2, item2, []);
item = item3.value;
item3 = item3.done ? undefined : item2;
value = item3 === value2;
if (value) {
r0 = item3;
r1 = value;
r6 = value2;
} else {
r0 = item3;
r1 = value;
r6 = item;
}
}
}
if (r1) {
r9 = value2;
} else {
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value = item4 === value2;
if (value) {
r0 = item4;
r1 = value;
if (r1) {
r9 = value2;
} else {
r0 = item4;
r1 = value;
r9 = item;
item4 = Reflect.apply(iterator2, r0, []);
item = item4.value;
item4 = item4.done ? undefined : r0;
value = item4 === value2;
if (value) {
r0 = item4;
r1 = value;
r9 = value2;
} else {
r0 = item4;
r1 = value;
r9 = item;
}
}
}
if (r1) {
r7 = value2;
} else {
item5 = Reflect.apply(iterator2, r0, []);
item = item5.value;
item5 = item5.done ? undefined : r0;
value = item5 === value2;
if (value) {
r0 = item5;
r1 = value;
if (r1) {
r7 = value2;
} else {
r0 = item5;
r1 = value;
r7 = item;
item5 = Reflect.apply(iterator2, r0, []);
item = item5.value;
item5 = item5.done ? undefined : r0;
value = item5 === value2;
if (value) {
r0 = item5;
r1 = value;
r7 = value2;
} else {
r0 = item5;
r1 = value;
r7 = item;
}
}
if (!r1) {
r0.return();
}
if (isGuildEventEnded(a0)) {
return false;
}
const guild_id = a0.guild_id;
const channel_id = a0.channel_id;
const entity_type = a0.entity_type;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
const r3 = entity_type === EXTERNAL ? r11.getDefaultChannel(a0.guild_id) : r6.getChannel(channel_id);
const guild = r9.getGuild(guild_id);
const stageInstanceByChannel = r7.getStageInstanceByChannel(channel_id);
const canViewInviteModal2 = CanViewInviteModalModule.canViewInviteModal(PermissionStore, guild, r3,
stageInstanceByChannel);
return canViewInviteModal2 ? r3 != null && canEveryoneRoleViewEvent(a0, [r6]) : !!canViewInviteModal2;
}
if (!r1) {
r0.return();
function useCanInviteForGuildEvent(a0) { // fn#70745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9234:966, offset: 0x01d065bd, size: 99 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStores([GuildChannelStore, ChannelStore,
GuildStore, StageInstanceStore], _fun70746, [a0]);
function _fun70746() { // fn#70746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9234:1050, offset: 0x01d06620, size: 60 bytes, params: 1, frame: 14
return isGuildEventInvitable(env0_0, [GuildChannelStore, ChannelStore, GuildStore, StageInstanceStore]);
}
}
if (isGuildEventEnded(a0)) {
return false;
}
const guild_id = a0.guild_id;
const channel_id = a0.channel_id;
const entity_type = a0.entity_type;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
const r3 = entity_type === EXTERNAL ? r11.getDefaultChannel(a0.guild_id) : r6.getChannel(channel_id);
const canViewInviteModal2 = (require(9050) /* metro dependency 9050: canViewInviteModal */).canViewInviteModal(PermissionStore,
r9.getGuild(guild_id), r3, r7.getStageInstanceByChannel(channel_id));
return canViewInviteModal2 ? r3 != null && canEveryoneRoleViewEvent(a0, [r6]) : !!canViewInviteModal2;
}
function useCanInviteForGuildEvent(a0) { // fn#70745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9234:966, offset: 0x01d065bd, size: 99 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildChannelStore, ChannelStore,
GuildStore, StageInstanceStore], _fun70746, [a0]);
}
function _fun70746() { // fn#70746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9234:1050, offset: 0x01d06620, size: 60 bytes, params: 1, frame: 14
return isGuildEventInvitable(env0_0, [GuildChannelStore, ChannelStore, GuildStore, StageInstanceStore]);
}
global.__d(_fun70742, 9049, [1384, 1379, 1935, 1867, 3784, 4117, 1385, 661, 3789, 9050, 566,
2]) /* metro module 9049, dependencies: [1384, 1379, 1935, 1867, 3784, 4117, 1385, 661, 3789, 9050, 566, 2] */;
@@ -1,12 +1,15 @@
/* Metro module 11839; source: modules/guild_scheduled_events/useCanSeeEventsInChannelList.tsx; dependencies: [9126, 9127, 11840, 2] */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun90745(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#90745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12025:6, offset: 0x02043dad, size: 99 bytes, params: 8, frame: 17
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useCanSeeEventsInChannelList.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useCanSeeEventsInChannelList.tsx');
exports.default = useCanSeeEventsInChannelList;
function useCanSeeEventsInChannelList(a0) { // fn#90746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12025:199, offset: 0x02043e10, size: 89 bytes, params: 2, frame: 16
return !(importDefault(11840) /* metro dependency 11840: useIsHubForGuild */)(a0) && ((importDefault(9126) /* metro dependency 9126: useCanCreateAnEvent */)(a0) || (importDefault(9127) /* metro dependency 9127: useGuildScheduledEvents */)(a0).length > 0);
}
}
function useCanSeeEventsInChannelList(a0) { // fn#90746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12025:199, offset: 0x02043e10, size: 89 bytes, params: 2, frame: 16
return !(importDefault(11840) /* metro dependency 11840: useIsHubForGuild */)(a0) && ((importDefault(9126) /* metro dependency 9126: useCanCreateAnEvent */)(a0) || (importDefault(9127) /* metro dependency 9127: useGuildScheduledEvents */)(a0).length > 0);
}
global.__d(_fun90745, 11839, [9126, 9127, 11840, 2]) /* metro module 11839, dependencies: [9126, 9127, 11840, 2] */;
@@ -1,4 +1,8 @@
/* Metro module 9044; source: modules/guild_scheduled_events/useEventException.tsx; dependencies: [4117, 566, 2] */
import GuildScheduledEventStore from './GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
function _fun70665(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70665, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9229:6, offset: 0x01d02d58, size: 138 bytes, params: 8, frame: 18
let env0_0 = require;
const _getEventException = function(a0, a1) {
@@ -7,35 +11,38 @@ function _fun70665(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useEventException.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useEventException.tsx');
exports.default = useEventException;
exports.getEventException = getEventException;
function _getEventException(a0, a1) { // fn#70666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9229:106, offset: 0x01d02de2, size: 43 bytes, params: 3, frame: 12
const env0_0 = a1;
return a0?.find(function({event_exception_id}) {
return event_exception_id === require;
});
function _fun70667({event_exception_id}) { // fn#70667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9229:169, offset: 0x01d02e0d, size: 22 bytes, params: 2, frame: 2
return event_exception_id === require;
}
}
function useEventException(a0, a1) { // fn#70668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9229:295, offset: 0x01d02e23, size: 80 bytes, params: 3, frame: 16
const env0_0 = a1;
const _getEventExceptionBinding = _getEventException;
const useStateFromStoresArray = FluxModule.useStateFromStoresArray;
return _getEventExceptionBinding(Reflect.apply(useStateFromStoresArray, FluxModule, [[GuildScheduledEventStore],
_fun70669]), a0);
function _fun70669() { // fn#70669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9229:390, offset: 0x01d02e73, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__;
return GuildScheduledEventStore.getGuildScheduledEvent(require)?.guild_scheduled_event_exceptions ?? [];
}
}
function getEventException(a0, a1) { // fn#70670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9229:532, offset: 0x01d02ea7, size: 63 bytes, params: 3, frame: 15
return _getEventException(GuildScheduledEventStore.getGuildScheduledEvent(a1)?.guild_scheduled_event_exceptions ?? [],
a0);
}
}
function _getEventException(a0, a1) { // fn#70666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9229:106, offset: 0x01d02de2, size: 43 bytes, params: 3, frame: 12
const env0_0 = a1;
return a0?.find(function({event_exception_id}) {
return event_exception_id === require;
});
}
function useEventException(a0, a1) { // fn#70668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9229:295, offset: 0x01d02e23, size: 80 bytes, params: 3, frame: 16
const env0_0 = a1;
const _getEventExceptionBinding = _getEventException;
const fluxModule = require(566) /* metro dependency 566: flux */;
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
return _getEventExceptionBinding(Reflect.apply(useStateFromStoresArray, fluxModule, [[GuildScheduledEventStore],
_fun70669]), a0);
}
function getEventException(a0, a1) { // fn#70670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9229:532, offset: 0x01d02ea7, size: 63 bytes, params: 3, frame: 15
return _getEventException(GuildScheduledEventStore.getGuildScheduledEvent(a1)?.guild_scheduled_event_exceptions ?? [],
a0);
}
function _fun70669() { // fn#70669, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9229:390, offset: 0x01d02e73, size: 52 bytes, params: 1, frame: 12
const value = environment.__proto__;
return GuildScheduledEventStore.getGuildScheduledEvent(require)?.guild_scheduled_event_exceptions ?? [];
}
global.__d(_fun70665, 9044, [4117, 566, 2]) /* metro module 9044, dependencies: [4117, 566, 2] */;
@@ -1,101 +1,107 @@
/* Metro module 9045; source: modules/guild_scheduled_events/useEventSchedule.tsx; dependencies: [4117, 9039, 9044, 566, 2] */
import GuildScheduledEventStore from './GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import UseEventException from './useEventException.tsx'; /* Metro dependency 9044 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as UseEventExceptionModule from './useEventException.tsx'; /* Metro dependency 9044 */
function _fun70671(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:6, offset: 0x01d02ee6, size: 155 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useEventSchedule.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useEventSchedule.tsx');
exports.default = useEventSchedule;
exports.useEventScheduleById = useEventScheduleById;
exports.getEventSchedule = getEventSchedule;
}
function _getEventSchedule(a0, a1, a2) { // fn#70672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:106, offset: 0x01d02f81, size: 231 bytes, params: 4, frame: 18
var object2;
var Date;
var scheduled_start_time;
var value6;
var date;
const recurrence_rule = a0.recurrence_rule;
const value = null;
if (value == recurrence_rule) {
object2 = {};
Date = global.Date;
scheduled_start_time = a0.scheduled_start_time;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
object2.startTime = date instanceof Object ? date : value6;
object2.endTime = value != a0.scheduled_end_time ? new global.Date() : value;
} else {
if (value == a2) {
object2 = {};
function _getEventSchedule(a0, a1, a2) { // fn#70672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:106, offset: 0x01d02f81, size: 231 bytes, params: 4, frame: 18
var object;
var Date;
var scheduled_start_time;
var value6;
var date;
const recurrence_rule = a0.recurrence_rule;
const value = null;
if (value == recurrence_rule) {
object = {};
Date = global.Date;
scheduled_start_time = a0.scheduled_start_time;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
object2.startTime = date instanceof Object ? date : value6;
object2.endTime = value != a0.scheduled_end_time ? new global.Date() : value;
return object2;
object.startTime = date instanceof Object ? date : value6;
object.endTime = value != a0.scheduled_end_time ? new global.Date() : value;
} else {
if (value == a2) {
object = {};
Date = global.Date;
scheduled_start_time = a0.scheduled_start_time;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
object.startTime = date instanceof Object ? date : value6;
object.endTime = value != a0.scheduled_end_time ? new global.Date() : value;
return object;
}
var value3 = undefined;
var {startDate,
endDate} = (require(9039) /* metro dependency 9039: ScheduleUtils */).getScheduleForRecurrenceWithException((require(9039) /* metro dependency 9039: ScheduleUtils */).getBaseScheduleForRecurrence(a2,
a0), a1);
object = {startTime: startDate.toDate()};
object.endTime = value == endDate ? value3 : endDate.toDate();
}
var value3 = undefined;
var {startDate,
endDate} = (require(9039) /* metro dependency 9039: ScheduleUtils */).getScheduleForRecurrenceWithException((require(9039) /* metro dependency 9039: ScheduleUtils */).getBaseScheduleForRecurrence(a2,
a0), a1);
object2 = {startTime: startDate.toDate()};
object2.endTime = value == endDate ? value3 : endDate.toDate();
return object;
}
return object2;
}
function useEventSchedule(a0, a1) { // fn#70673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:583, offset: 0x01d03068, size: 97 bytes, params: 3, frame: 16
var r3;
let value = a1;
if (value != null) {
r3 = value;
} else {
value = require(9039) /* metro dependency 9039: ScheduleUtils */;
value = value.getNextRecurrenceIdInEvent(a0);
r3 = value;
function useEventSchedule(a0, a1) { // fn#70673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:583, offset: 0x01d03068, size: 97 bytes, params: 3, frame: 16
var r3;
let value = a1;
if (value != null) {
r3 = value;
} else {
value = require(9039) /* metro dependency 9039: ScheduleUtils */;
value = value.getNextRecurrenceIdInEvent(a0);
r3 = value;
}
return _getEventSchedule(a0, (UseEventException)(r3, a0.id), r3);
}
return _getEventSchedule(a0, (importDefault(9044) /* metro dependency 9044: useEventException */)(r3, a0.id), r3);
}
function useEventScheduleById(a0, a1) { // fn#70674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:734, offset: 0x01d030c9, size: 166 bytes, params: 3, frame: 18
var r5;
var r0;
let value = a1;
const env0_0 = a0;
const value3 = undefined;
const guildScheduledEvent = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
_fun70675);
const value4 = null;
if (value4 != value) {
r5 = value;
} else {
value = require(9039) /* metro dependency 9039: ScheduleUtils */;
value = value.getNextRecurrenceIdInEvent(guildScheduledEvent);
r5 = value;
function useEventScheduleById(a0, a1) { // fn#70674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:734, offset: 0x01d030c9, size: 166 bytes, params: 3, frame: 18
var r5;
var r0;
let value = a1;
const env0_0 = a0;
const value3 = undefined;
const guildScheduledEvent = (FluxModule).useStateFromStores([GuildScheduledEventStore],
_fun70675);
const value4 = null;
if (value4 != value) {
r5 = value;
} else {
value = require(9039) /* metro dependency 9039: ScheduleUtils */;
value = value.getNextRecurrenceIdInEvent(guildScheduledEvent);
r5 = value;
}
value = importDefault(9044) /* metro dependency 9044: useEventException */;
value = value(r5, value4 == guildScheduledEvent ? value3 : guildScheduledEvent.id);
if (value4 == guildScheduledEvent) {
r0 = value4;
} else {
value = _getEventSchedule(guildScheduledEvent, value, r5);
r0 = value;
}
return r0;
function _fun70675() { // fn#70675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:807, offset: 0x01d0316f, size: 27 bytes, params: 1, frame: 11
return GuildScheduledEventStore.getGuildScheduledEvent(env0_0);
}
}
value = importDefault(9044) /* metro dependency 9044: useEventException */;
value = value(r5, value4 == guildScheduledEvent ? value3 : guildScheduledEvent.id);
if (value4 == guildScheduledEvent) {
r0 = value4;
} else {
value = _getEventSchedule(guildScheduledEvent, value, r5);
r0 = value;
function getEventSchedule(a0, a1) { // fn#70676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:993, offset: 0x01d0318a, size: 61 bytes, params: 3, frame: 17
const _getEventScheduleBinding = _getEventSchedule;
const getEventException = UseEventExceptionModule.getEventException;
return _getEventScheduleBinding(a0, Reflect.apply(getEventException, UseEventExceptionModule, [a1, a0.id]), a1);
}
return r0;
}
function getEventSchedule(a0, a1) { // fn#70676, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:993, offset: 0x01d0318a, size: 61 bytes, params: 3, frame: 17
const _getEventScheduleBinding = _getEventSchedule;
const value = require(9044) /* metro dependency 9044: useEventException */;
const getEventException = value.getEventException;
return _getEventScheduleBinding(a0, Reflect.apply(getEventException, value, [a1, a0.id]), a1);
}
function _fun70675() { // fn#70675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9230:807, offset: 0x01d0316f, size: 27 bytes, params: 1, frame: 11
return GuildScheduledEventStore.getGuildScheduledEvent(env0_0);
}
global.__d(_fun70671, 9045, [4117, 9039, 9044, 566,
2]) /* metro module 9045, dependencies: [4117, 9039, 9044, 566, 2] */;
@@ -1,4 +1,12 @@
/* Metro module 9075; source: modules/guild_scheduled_events/useGetEventChannelsByType.tsx; dependencies: [1384, 1935, 3784, 9076, 566, 9077, 2] */
import StageInstanceStore from '../stage_channels/StageInstanceStore.tsx'; /* Metro dependency 1384 */
import GuildChannelStore from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as GuildChannelStoreModule from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import * as PermissionsConstantsModule from './PermissionsConstants.tsx'; /* Metro dependency 9076 */
function _fun70912(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70912, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:6, offset: 0x01d0ce9f, size: 266 bytes, params: 8, frame: 20
let env0_0 = require;
const _arrayLikeToArray_70915 = function(a0, a1) {
@@ -44,201 +52,201 @@ function _fun70912(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = getEventChannelsByType;
const getEventChannelsByType2 = getEventChannelsByType;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_4 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_VOCAL_CHANNELS_KEY;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const permissionsConstantsModule = require(9076) /* metro dependency 9076: PermissionsConstants */;
const env0_6 = permissionsConstantsModule.CREATE_GUILD_EVENT_VOICE_CHANNEL_PERMISSIONS;
const env0_7 = permissionsConstantsModule.CREATE_GUILD_EVENT_STAGE_CHANNEL_PERMISSIONS;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useGetEventChannelsByType.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useGetEventChannelsByType.tsx');
exports.useCanCreateEventInStageChannel = useCanCreateEventInStageChannel;
exports.useCanCreateEventInVoiceChannel = useCanCreateEventInVoiceChannel;
exports.getEventChannelsByType = closure;
exports.getEventChannelsByType = getEventChannelsByType2;
exports.useGetEventChannelsByType = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[4]).useStateFromStoresArray([GuildChannelStore], _fun70923, [a0, a1]);
};
}
function _createForOfIteratorHelperLoose_70913(a0, a1) { // fn#70913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:275, offset: 0x01d0cfa9, 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)) {
function _createForOfIteratorHelperLoose_70913(a0, a1) { // fn#70913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:275, offset: 0x01d0cfa9, 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);
}
return _fun70914;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_70915(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') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun70914;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_70915(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_70915(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_70915(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun70914;
}
return _fun70914;
}
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 getEventChannelsByType(a0, a1) { // fn#70916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:1185, offset: 0x01d0d11d, size: 265 bytes, params: 3, frame: 20
var r10;
var r1;
var r9;
var value6;
var channel;
var moduleValue;
var manageResourcePermissions;
var canCreateGuildEvent;
var canManageAllEvents;
var type;
var isGuildVoice2;
var isGuildStageVoice2;
var value8;
let value = a2;
const value2 = undefined;
let r2 = value !== value2 ? value : [GuildChannelStore];
const iterator = r2[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
value = item2 === value2;
const r4 = value ? value2 : item;
if (!value) {
item2.return();
}
if (a1 == null) {
return [];
}
const items2 = [];
const value4 = _createForOfIteratorHelperLoose_70913(r4.getChannels(a0)[GUILD_VOCAL_CHANNELS_KEY]);
const value5 = value4();
let done = value5.done;
if (!done) {
r2 = value5;
while (true) {
value6 = r2.value;
channel = value6.channel;
moduleValue = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
manageResourcePermissions = moduleValue.getManageResourcePermissions(channel);
canCreateGuildEvent = manageResourcePermissions.canCreateGuildEvent;
canManageAllEvents = manageResourcePermissions.canManageAllEvents;
r10 = canCreateGuildEvent || canManageAllEvents;
type = channel.type;
if (type !== a1) {
continue;
}
isGuildVoice2 = channel.isGuildVoice();
if (isGuildVoice2) {
r1 = r10;
continue;
}
r1 = isGuildVoice2;
continue;
if (r1) {
continue;
}
isGuildStageVoice2 = channel.isGuildStageVoice();
if (isGuildStageVoice2) {
r9 = r10;
continue;
}
r9 = isGuildStageVoice2;
continue;
r1 = r9;
if (!r1) {
continue;
}
items2.push(channel);
value8 = value4();
done = value8.done;
if (done) {
break;
}
r2 = value8;
continue;
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 _fun70914() { // fn#70914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:846, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
return items2;
}
function useCanCreateEventInStageChannel(a0) { // fn#70917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:1667, offset: 0x01d0d226, size: 139 bytes, params: 2, frame: 22
const env0_0 = a0;
return a0.isGuildStageVoice() && (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore],
_fun70918, [a0]) && (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore],
_fun70919) == null;
}
function useCanCreateEventInVoiceChannel(a0) { // fn#70920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:1923, offset: 0x01d0d2f1, size: 91 bytes, params: 2, frame: 17
const env0_0 = a0;
return a0.isGuildVoice() && (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore],
_fun70921, [a0]);
}
function useGetEventChannelsByType(a0, a1) { // fn#70922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:2133, offset: 0x01d0d36c, size: 87 bytes, params: 3, frame: 17
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildChannelStore], _fun70923, [a0,
a1]);
}
function _fun70918() { // fn#70918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:1750, offset: 0x01d0d2b1, size: 32 bytes, params: 1, frame: 13
return PermissionStore.can(CREATE_GUILD_EVENT_STAGE_CHANNEL_PERMISSIONS, env0_0);
}
function _fun70919() { // fn#70919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:1806, offset: 0x01d0d2d1, size: 32 bytes, params: 1, frame: 11
return StageInstanceStore.getStageInstanceByChannel(env0_0.id);
}
function _fun70921() { // fn#70921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:2006, offset: 0x01d0d34c, size: 32 bytes, params: 1, frame: 13
return PermissionStore.can(CREATE_GUILD_EVENT_VOICE_CHANNEL_PERMISSIONS, env0_0);
}
function _fun70923() { // fn#70923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:2218, offset: 0x01d0d3c3, size: 41 bytes, params: 1, frame: 15
return getEventChannelsByType(env0_0, require, [GuildChannelStore]);
function getEventChannelsByType(a0, a1) { // fn#70916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:1185, offset: 0x01d0d11d, size: 265 bytes, params: 3, frame: 20
var r10;
var r1;
var r9;
var value6;
var channel;
var moduleValue;
var manageResourcePermissions;
var canCreateGuildEvent;
var canManageAllEvents;
var type;
var isGuildVoice2;
var isGuildStageVoice2;
var value8;
let value = a2;
const value2 = undefined;
let r2 = value !== value2 ? value : [GuildChannelStore];
const iterator = r2[Symbol.iterator]();
let item2 = iterator.next();
const item = item2.value;
item2 = item2.done ? undefined : iterator;
value = item2 === value2;
const r4 = value ? value2 : item;
if (!value) {
item2.return();
}
if (a1 == null) {
return [];
}
const items2 = [];
const value4 = _createForOfIteratorHelperLoose_70913(r4.getChannels(a0)[GUILD_VOCAL_CHANNELS_KEY]);
const value5 = value4();
let done = value5.done;
if (!done) {
r2 = value5;
while (true) {
value6 = r2.value;
channel = value6.channel;
moduleValue = require(9077) /* metro dependency 9077: useManageResourcePermissions */;
manageResourcePermissions = moduleValue.getManageResourcePermissions(channel);
canCreateGuildEvent = manageResourcePermissions.canCreateGuildEvent;
canManageAllEvents = manageResourcePermissions.canManageAllEvents;
r10 = canCreateGuildEvent || canManageAllEvents;
type = channel.type;
if (type !== a1) {
continue;
}
isGuildVoice2 = channel.isGuildVoice();
if (isGuildVoice2) {
r1 = r10;
continue;
}
r1 = isGuildVoice2;
continue;
if (r1) {
continue;
}
isGuildStageVoice2 = channel.isGuildStageVoice();
if (isGuildStageVoice2) {
r9 = r10;
continue;
}
r9 = isGuildStageVoice2;
continue;
r1 = r9;
if (!r1) {
continue;
}
items2.push(channel);
value8 = value4();
done = value8.done;
if (done) {
break;
}
r2 = value8;
continue;
}
}
return items2;
}
function useCanCreateEventInStageChannel(a0) { // fn#70917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:1667, offset: 0x01d0d226, size: 139 bytes, params: 2, frame: 22
const env0_0 = a0;
return a0.isGuildStageVoice() && (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore],
_fun70918, [a0]) && (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore],
_fun70919) == null;
function _fun70918() { // fn#70918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:1750, offset: 0x01d0d2b1, size: 32 bytes, params: 1, frame: 13
return PermissionStore.can(CREATE_GUILD_EVENT_STAGE_CHANNEL_PERMISSIONS, env0_0);
}
function _fun70919() { // fn#70919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:1806, offset: 0x01d0d2d1, size: 32 bytes, params: 1, frame: 11
return StageInstanceStore.getStageInstanceByChannel(env0_0.id);
}
}
function useCanCreateEventInVoiceChannel(a0) { // fn#70920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:1923, offset: 0x01d0d2f1, size: 91 bytes, params: 2, frame: 17
const env0_0 = a0;
return a0.isGuildVoice() && (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore],
_fun70921, [a0]);
function _fun70921() { // fn#70921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:2006, offset: 0x01d0d34c, size: 32 bytes, params: 1, frame: 13
return PermissionStore.can(CREATE_GUILD_EVENT_VOICE_CHANNEL_PERMISSIONS, env0_0);
}
}
function useGetEventChannelsByType(a0, a1) { // fn#70922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:2133, offset: 0x01d0d36c, size: 87 bytes, params: 3, frame: 17
const env0_0 = a0;
const env0_1 = a1;
return (FluxModule).useStateFromStoresArray([GuildChannelStore], _fun70923, [a0,
a1]);
function _fun70923() { // fn#70923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9260:2218, offset: 0x01d0d3c3, size: 41 bytes, params: 1, frame: 15
return getEventChannelsByType(env0_0, require, [GuildChannelStore]);
}
}
}
global.__d(_fun70912, 9075, [1384, 1935, 3784, 9076, 566, 9077,
2]) /* metro module 9075, dependencies: [1384, 1935, 3784, 9076, 566, 9077, 2] */;
@@ -1,177 +1,184 @@
/* Metro module 9137; source: modules/guild_scheduled_events/useGuildEventRecurrences.tsx; dependencies: [57, 31, 4117, 566, 8819, 9039, 22, 21, 672, 9036, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import GuildScheduledEventStore from './GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import UsePrevValue from '../../hooks/usePrevValue.tsx'; /* Metro dependency 8819 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ScheduleUtilsModule from './utils/ScheduleUtils.tsx'; /* Metro dependency 9039 */
function _fun71573(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:6, offset: 0x01d25005, size: 153 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 */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useGuildEventRecurrences.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useGuildEventRecurrences.tsx');
exports.default = useGuildEventRecurrences;
}
function useGuildEventRecurrences(a0, a1, a2) { // fn#71574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:230, offset: 0x01d2509e, size: 414 bytes, params: 4, frame: 29
var r3;
var scheduled_start_time;
var moduleValue2;
var generateNextRecurrences;
var rRule;
var Date;
var value5;
var date;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = undefined;
const guildScheduledEvent = (FluxModule).useStateFromStores([GuildScheduledEventStore],
_fun71575);
const guildScheduledEvent2 = guildScheduledEvent;
const value3 = (UsePrevValue)(a2);
const env0_4 = value3;
let binding = env0_4;
const useState = binding.useState;
if (a2 == null) {
r3 = [];
} else if (guildScheduledEvent != null) {
moduleValue2 = require(9039) /* metro dependency 9039: ScheduleUtils */;
generateNextRecurrences = moduleValue2.generateNextRecurrences;
rRule = (require(9039) /* metro dependency 9039: ScheduleUtils */).getRRule(a2);
Date = global.Date;
scheduled_start_time = guildScheduledEvent.scheduled_start_time;
value5 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r3 = Reflect.apply(generateNextRecurrences, moduleValue2, [4, rRule, date instanceof Object ? date : value5]);
} else {
r3 = [];
}
const value9 = guildScheduledEvent2(Reflect.apply(useState, binding, [r3]), 2);
const property = value9[0];
const env0_6 = value9[1];
binding = env0_4;
const useEffect = binding.useEffect;
object = [a2];
object[1] = property.length;
object[2] = guildScheduledEvent;
object[3] = value3;
Reflect.apply(useEffect, binding, [_fun71576, object]);
binding.useEffect(_fun71577, [a0, a1, property]);
const useMemo = binding.useMemo;
[a2, property][2] = guildScheduledEvent == null ? value2 : guildScheduledEvent.scheduled_start_time;
object = {recurrenceStartTimes: property, canViewMoreRecurrences: Reflect.apply(useMemo, binding, [_fun71579,
object]), updateRecurrenceStartTimes: updateRecurrenceStartTimes};
return object;
function _fun71575() { // fn#71575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:309, offset: 0x01d2523c, size: 27 bytes, params: 1, frame: 11
return GuildScheduledEventStore.getGuildScheduledEvent(env0_0);
}
function useGuildEventRecurrences(a0, a1, a2) { // fn#71574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:230, offset: 0x01d2509e, size: 414 bytes, params: 4, frame: 29
var r3;
var scheduled_start_time;
var moduleValue2;
var generateNextRecurrences;
var rRule;
var Date;
var value5;
var date;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = undefined;
const guildScheduledEvent = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
_fun71575);
const env0_3 = guildScheduledEvent;
const value3 = (importDefault(8819) /* metro dependency 8819: usePrevValue */)(a2);
const env0_4 = value3;
let binding = env0_4;
const useState = binding.useState;
if (a2 == null) {
r3 = [];
} else if (guildScheduledEvent != null) {
moduleValue2 = require(9039) /* metro dependency 9039: ScheduleUtils */;
generateNextRecurrences = moduleValue2.generateNextRecurrences;
rRule = (require(9039) /* metro dependency 9039: ScheduleUtils */).getRRule(a2);
Date = global.Date;
scheduled_start_time = guildScheduledEvent.scheduled_start_time;
value5 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r3 = Reflect.apply(generateNextRecurrences, moduleValue2, [4, rRule, date instanceof Object ? date : value5]);
} else {
r3 = [];
}
const value9 = env0_3(Reflect.apply(useState, binding, [r3]), 2);
const property = value9[0];
const env0_6 = value9[1];
binding = env0_4;
const useEffect = binding.useEffect;
object = [a2];
object[1] = property.length;
object[2] = guildScheduledEvent;
object[3] = value3;
Reflect.apply(useEffect, binding, [_fun71576, object]);
binding.useEffect(_fun71577, [a0, a1, property]);
const useMemo = binding.useMemo;
[a2, property][2] = guildScheduledEvent == null ? value2 : guildScheduledEvent.scheduled_start_time;
object = {recurrenceStartTimes: property, canViewMoreRecurrences: Reflect.apply(useMemo, binding, [_fun71579,
object]), updateRecurrenceStartTimes: updateRecurrenceStartTimes};
return object;
}
function _fun71575() { // fn#71575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:309, offset: 0x01d2523c, size: 27 bytes, params: 1, frame: 11
return GuildScheduledEventStore.getGuildScheduledEvent(env0_0);
}
function _fun71576() { // fn#71576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:514, offset: 0x01d25257, size: 203 bytes, params: 1, frame: 19
var value2;
var defaultImport;
var isEqual;
var binding;
var rRule;
var moduleValue2;
var generateNextRecurrences;
var length;
var Date;
var scheduled_start_time;
if (env0_4 != null) {
if (importDefault != null) {
if (guildScheduledEvent != null) {
value2 = environment.__proto__;
defaultImport = importDefault(22) /* metro dependency 22 */;
isEqual = defaultImport.isEqual;
binding = env0_4;
if (!Reflect.apply(isEqual, defaultImport, [binding, importDefault])) {
rRule = (require(9039) /* metro dependency 9039: ScheduleUtils */).getRRule(importDefault);
binding = env0_6;
moduleValue2 = require(9039) /* metro dependency 9039: ScheduleUtils */;
generateNextRecurrences = moduleValue2.generateNextRecurrences;
length = env0_5.length;
Date = global.Date;
scheduled_start_time = guildScheduledEvent.scheduled_start_time;
binding(Reflect.apply(generateNextRecurrences, moduleValue2, [length, rRule, new Date()]));
function _fun71576() { // fn#71576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:514, offset: 0x01d25257, size: 203 bytes, params: 1, frame: 19
var value2;
var defaultImport;
var isEqual;
var binding;
var rRule;
var moduleValue2;
var generateNextRecurrences;
var length;
var Date;
var scheduled_start_time;
if (env0_4 != null) {
if (importDefault != null) {
if (guildScheduledEvent != null) {
value2 = environment.__proto__;
defaultImport = importDefault(22) /* metro dependency 22 */;
isEqual = defaultImport.isEqual;
binding = env0_4;
if (!Reflect.apply(isEqual, defaultImport, [binding, importDefault])) {
rRule = (require(9039) /* metro dependency 9039: ScheduleUtils */).getRRule(importDefault);
binding = env0_6;
moduleValue2 = require(9039) /* metro dependency 9039: ScheduleUtils */;
generateNextRecurrences = moduleValue2.generateNextRecurrences;
length = env0_5.length;
Date = global.Date;
scheduled_start_time = guildScheduledEvent.scheduled_start_time;
binding(Reflect.apply(generateNextRecurrences, moduleValue2, [length, rRule, new Date()]));
}
}
}
}
}
}
}
function _fun71577() { // fn#71577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:712, offset: 0x01d25322, size: 86 bytes, params: 1, frame: 15
var environment;
var value2;
var value3;
if (require != null) {
value2 = env0_5.map(_fun71578);
value3 = environment.__proto__;
(importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventUserCounts(require,
env0_0, value2);
}
}
function _fun71577() { // fn#71577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:712, offset: 0x01d25322, size: 86 bytes, params: 1, frame: 15
var environment;
var value2;
var value3;
if (require != null) {
value2 = env0_5.map(_fun71578);
value3 = environment.__proto__;
(importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */).getGuildEventUserCounts(require,
env0_0, value2);
}
function _fun71578(a0) { // fn#71578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:742, offset: 0x01d25378, size: 123 bytes, params: 2, frame: 18
let value = environment.__proto__.__proto__;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const fromTimestamp = value.fromTimestamp;
const Math = global.Math;
const floor = Math.floor;
const time = a0.getTime();
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let SECOND = Millis.SECOND;
const value3 = Reflect.apply(floor, Math, [time / SECOND]);
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
SECOND = Millis.SECOND;
return Reflect.apply(fromTimestamp, value, [value3 * SECOND]);
}
function _fun71579() { // fn#71579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:906, offset: 0x01d253f3, size: 220 bytes, params: 1, frame: 18
if (importDefault == null) {
return false;
}
if (env0_5.length === 0) {
return false;
}
if (guildScheduledEvent?.scheduled_start_time == null) {
return false;
}
const Date = global.Date;
const date = new Date();
const setFullYear = date.setFullYear;
const fullYear = date.getFullYear();
const MAX_YEARS_AHEAD_RECURRING_EVENT = (require(9039) /* metro dependency 9039: ScheduleUtils */).MAX_YEARS_AHEAD_RECURRING_EVENT;
Reflect.apply(setFullYear, date, [fullYear + MAX_YEARS_AHEAD_RECURRING_EVENT]);
const binding = env0_5;
const property = binding[binding.length - 1];
let value = (require(9039) /* metro dependency 9039: ScheduleUtils */).getRRule(importDefault);
value = value.after(property);
return value != null && value <= date;
}
function updateRecurrenceStartTimes() { // fn#71580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:1279, owner: useGuildEventRecurrences.updateRecurrenceStartTimes, offset: 0x01d254cf, size: 160 bytes, params: 1, frame: 21
var value2;
var rRule;
var binding;
var property;
var binding2;
var items2;
var moduleValue2;
var value;
if (importDefault != null) {
if (guildScheduledEvent != null) {
value2 = environment.__proto__;
rRule = (require(9039) /* metro dependency 9039: ScheduleUtils */).getRRule(importDefault);
binding = env0_5;
property = binding[binding.length - 1];
binding = env0_6;
binding2 = env0_5;
items2 = [];
value = arraySpread(items2, binding2, 0, undefined);
moduleValue2 = require(9039) /* metro dependency 9039: ScheduleUtils */;
arraySpread(items2, moduleValue2.generateNextRecurrences(4, rRule, property, true), value, true);
binding(items2);
}
function _fun71579() { // fn#71579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:906, offset: 0x01d253f3, size: 220 bytes, params: 1, frame: 18
if (importDefault == null) {
return false;
}
if (env0_5.length === 0) {
return false;
}
if (guildScheduledEvent?.scheduled_start_time == null) {
return false;
}
const Date = global.Date;
const date = new Date();
const setFullYear = date.setFullYear;
const fullYear = date.getFullYear();
const MAX_YEARS_AHEAD_RECURRING_EVENT = (ScheduleUtilsModule).MAX_YEARS_AHEAD_RECURRING_EVENT;
Reflect.apply(setFullYear, date, [fullYear + MAX_YEARS_AHEAD_RECURRING_EVENT]);
const binding = env0_5;
const property = binding[binding.length - 1];
let value = (ScheduleUtilsModule).getRRule(importDefault);
value = value.after(property);
return value != null && value <= date;
}
function updateRecurrenceStartTimes() { // fn#71580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:1279, owner: useGuildEventRecurrences.updateRecurrenceStartTimes, offset: 0x01d254cf, size: 160 bytes, params: 1, frame: 21
var value2;
var rRule;
var binding;
var property;
var binding2;
var items2;
var moduleValue2;
var value;
if (importDefault != null) {
if (guildScheduledEvent != null) {
value2 = environment.__proto__;
rRule = (require(9039) /* metro dependency 9039: ScheduleUtils */).getRRule(importDefault);
binding = env0_5;
property = binding[binding.length - 1];
binding = env0_6;
binding2 = env0_5;
items2 = [];
value = arraySpread(items2, binding2, 0, undefined);
moduleValue2 = require(9039) /* metro dependency 9039: ScheduleUtils */;
arraySpread(items2, moduleValue2.generateNextRecurrences(4, rRule, property, true), value, true);
binding(items2);
}
}
}
}
}
function _fun71578(a0) { // fn#71578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9322:742, offset: 0x01d25378, size: 123 bytes, params: 2, frame: 18
let value = environment.__proto__.__proto__;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
const fromTimestamp = value.fromTimestamp;
const Math = global.Math;
const floor = Math.floor;
const time = a0.getTime();
let Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
let SECOND = Millis.SECOND;
const value3 = Reflect.apply(floor, Math, [time / SECOND]);
Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
SECOND = Millis.SECOND;
return Reflect.apply(fromTimestamp, value, [value3 * SECOND]);
}
global.__d(_fun71573, 9137, [57, 31, 4117, 566, 8819, 9039, 22, 21, 672, 9036,
2]) /* metro module 9137, dependencies: [57, 31, 4117, 566, 8819, 9039, 22, 21, 672, 9036, 2] */;
@@ -1,103 +1,119 @@
/* Metro module 14567; source: modules/guild_scheduled_events/useGuildHasLiveChannelNotice.tsx; dependencies: [31, 4810, 1384, 4492, 1379, 3784, 4300, 14568, 1385, 482, 14569, 566, 9127, 14570, 6273, 6268, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import StageInstanceStore from '../stage_channels/StageInstanceStore.tsx'; /* Metro dependency 1384 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import SortedVoiceStateStore from '../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
import ApplicationStreamingStore from '../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
import StageChannelParticipantStore from '../stage_channels/StageChannelParticipantStore.tsx'; /* Metro dependency 4810 */
import LiveChannelNoticesStore from './LiveChannelNoticesStore.tsx'; /* Metro dependency 14568 */
import UseLiveStageChannels from '../stage_channels/useLiveStageChannels.tsx'; /* Metro dependency 14569 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
import * as StageChannelParticipantStoreHooksModule from '../stage_channels/StageChannelParticipantStoreHooks.tsx'; /* Metro dependency 6273 */
import * as UseGuildScheduledEventsModule from './useGuildScheduledEvents.tsx'; /* Metro dependency 9127 */
import * as UseActiveEventOrStageInstanceChannelModule from './useActiveEventOrStageInstanceChannel.tsx'; /* Metro dependency 14570 */
function _fun110170(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:6, offset: 0x0236d6a0, size: 290 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 stageChannelParticipantStore = importDefault(4810) /* metro dependency 4810: StageChannelParticipantStore */;
const stageInstanceStore = importDefault(1384) /* metro dependency 1384: StageInstanceStore */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const liveChannelNoticesStore = importDefault(14568) /* metro dependency 14568: LiveChannelNoticesStore */;
const env0_11 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventEntityTypes;
const env0_12 = (require(482) /* metro dependency 482: Constants */).Permissions;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useGuildHasLiveChannelNotice.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useGuildHasLiveChannelNotice.tsx');
exports.useGuildHasLiveChannelNotice = useGuildHasLiveChannelNotice;
exports.useGuildLiveChannelNoticeInfo = useGuildLiveChannelNoticeInfo;
}
function useGuildHasLiveChannelNotice(a0) { // fn#110171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:368, offset: 0x0236d7c2, size: 263 bytes, params: 2, frame: 23
const value2 = undefined;
const value3 = (UseLiveStageChannels)(a0);
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const property = value3[0];
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore], _fun110172,
[Reflect.apply(getChannel, channelStoreBinding, [property == null ? value2 : property.id])]);
const value6 = (UseGuildScheduledEventsModule).useGuildActiveEvent(a0);
const value = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([LiveChannelNoticesStore],
_fun110173, [value5, value6]);
const isStageNoticeHidden = value.isStageNoticeHidden;
return value6 != null ? value5 != null ? !isStageNoticeHidden : !value.isEventNoticeHidden : value5 != null && !isStageNoticeHidden;
function _fun110172() { // fn#110172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:507, offset: 0x0236d8c9, size: 47 bytes, params: 1, frame: 13
return StageInstanceStore.getStageInstanceByChannel(env0_0?.id);
}
function useGuildHasLiveChannelNotice(a0) { // fn#110171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:368, offset: 0x0236d7c2, size: 263 bytes, params: 2, frame: 23
const value2 = undefined;
const value3 = (importDefault(14569) /* metro dependency 14569: useLiveStageChannels */)(a0);
const getChannel = ChannelStore.getChannel;
const property = value3[0];
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore], _fun110172,
[Reflect.apply(getChannel, ChannelStore, [property == null ? value2 : property.id])]);
const value6 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useGuildActiveEvent(a0);
const value = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([LiveChannelNoticesStore],
_fun110173, [value5, value6]);
const isStageNoticeHidden = value.isStageNoticeHidden;
return value6 != null ? value5 != null ? !isStageNoticeHidden : !value.isEventNoticeHidden : value5 != null && !isStageNoticeHidden;
}
function _fun110173() { // fn#110173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:641, offset: 0x0236d8f8, size: 110 bytes, params: 1, frame: 18
const object = {};
const liveChannelNoticesStoreBinding = LiveChannelNoticesStore;
const value3 = undefined;
object.isStageNoticeHidden = liveChannelNoticesStoreBinding.isLiveChannelNoticeHidden({stageId: env0_1 == null ? value3 : env0_1.id});
object.isEventNoticeHidden = LiveChannelNoticesStore.isLiveChannelNoticeHidden({eventId: env0_2 == null ? value3 : env0_2.id});
return object;
}
function useGuildLiveChannelNoticeInfo(a0) { // fn#110174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:937, offset: 0x0236d966, size: 470 bytes, params: 2, frame: 25
const value2 = undefined;
const value3 = (require(14570) /* metro dependency 14570: useActiveEventOrStageInstanceChannel */).useActiveEventOrStageInstanceChannel(a0);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun110175);
const value5 = (require(9127) /* metro dependency 9127: useGuildScheduledEvents */).useGuildActiveEvent(a0);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore], _fun110176,
[value3]);
const stageChannelParticipantStoreHooksModule = require(6273) /* metro dependency 6273: StageChannelParticipantStoreHooks */;
const useActualStageSpeakerCount = stageChannelParticipantStoreHooksModule.useActualStageSpeakerCount;
const value8 = Reflect.apply(useActualStageSpeakerCount, stageChannelParticipantStoreHooksModule,
[value3 == null ? value2 : value3.id]) > 0;
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
_fun110177);
const value10 = false;
const r6 = value3 == null ? value3 != null && value5 != null ? value9 : value10 : value6 != null ? value8 : value3 != null && value5 != null ? value9 : value10;
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageChannelParticipantStore],
_fun110178, [value3]);
return value13.useMemo(_fun110180, [value4, value5 == null ? value2 : value5.entity_type, r6, value13,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore], _fun110179)]);
}
function _fun110172() { // fn#110172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:507, offset: 0x0236d8c9, size: 47 bytes, params: 1, frame: 13
return StageInstanceStore.getStageInstanceByChannel(env0_0?.id);
}
function _fun110173() { // fn#110173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:641, offset: 0x0236d8f8, size: 110 bytes, params: 1, frame: 18
const object2 = {};
const value3 = undefined;
object2.isStageNoticeHidden = LiveChannelNoticesStore.isLiveChannelNoticeHidden({stageId: env0_1 == null ? value3 : env0_1.id});
object2.isEventNoticeHidden = LiveChannelNoticesStore.isLiveChannelNoticeHidden({eventId: env0_2 == null ? value3 : env0_2.id});
return object2;
}
function _fun110175() { // fn#110175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1069, offset: 0x0236db3c, size: 51 bytes, params: 1, frame: 14
return env0_0 != null && PermissionStore.can(Permissions.CONNECT, env0_0);
}
function _fun110177() { // fn#110177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1327, offset: 0x0236db6f, size: 51 bytes, params: 1, frame: 12
return env0_0 != null && SortedVoiceStateStore.getVoiceStatesForChannel(env0_0).length > 0;
}
function _fun110178() { // fn#110178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1470, offset: 0x0236dba2, size: 86 bytes, params: 1, frame: 16
var r0;
var value3;
var value;
const value2 = env0_0 != null;
if (value2) {
value3 = environment.__proto__;
value = StageChannelParticipantStore.getParticipantCount(env0_0.id,
(require(6268) /* metro dependency 6268: StageChannelParticipants */).StageChannelParticipantNamedIndex.AUDIENCE);
value = value > 0;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun110179() { // fn#110179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1606, offset: 0x0236dbf8, size: 56 bytes, params: 1, frame: 12
return env0_0 != null && ApplicationStreamingStore.getAllApplicationStreamsForChannel(env0_0.id).length > 0;
}
function _fun110180() { // fn#110180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1722, offset: 0x0236dc30, size: 67 bytes, params: 1, frame: 4
const entity_typeBinding = entity_type;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
return {hasButton: entity_typeBinding === EXTERNAL || env0_1, hasSpeakers: env0_2, hasAudience: env0_3,
hasStream: env0_4};
function useGuildLiveChannelNoticeInfo(a0) { // fn#110174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:937, offset: 0x0236d966, size: 470 bytes, params: 2, frame: 25
const value2 = undefined;
const value3 = (UseActiveEventOrStageInstanceChannelModule).useActiveEventOrStageInstanceChannel(a0);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun110175);
const value5 = (UseGuildScheduledEventsModule).useGuildActiveEvent(a0);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore], _fun110176,
[value3]);
const useActualStageSpeakerCount = StageChannelParticipantStoreHooksModule.useActualStageSpeakerCount;
const value8 = Reflect.apply(useActualStageSpeakerCount, StageChannelParticipantStoreHooksModule,
[value3 == null ? value2 : value3.id]) > 0;
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
_fun110177);
const value10 = false;
const r6 = value3 == null ? value3 != null && value5 != null ? value9 : value10 : value6 != null ? value8 : value3 != null && value5 != null ? value9 : value10;
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageChannelParticipantStore],
_fun110178, [value3]);
return value13.useMemo(_fun110180, [value4, value5 == null ? value2 : value5.entity_type, r6, value13,
(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore], _fun110179)]);
function _fun110175() { // fn#110175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1069, offset: 0x0236db3c, size: 51 bytes, params: 1, frame: 14
return env0_0 != null && PermissionStore.can(Permissions.CONNECT, env0_0);
}
function _fun110176() { // fn#110176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1172, offset: 0x0236d8c9, size: 47 bytes, params: 1, frame: 13
return StageInstanceStore.getStageInstanceByChannel(env0_0?.id);
}
function _fun110177() { // fn#110177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1327, offset: 0x0236db6f, size: 51 bytes, params: 1, frame: 12
return env0_0 != null && SortedVoiceStateStore.getVoiceStatesForChannel(env0_0).length > 0;
}
function _fun110178() { // fn#110178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1470, offset: 0x0236dba2, size: 86 bytes, params: 1, frame: 16
var r0;
var value3;
var stageChannelParticipantStoreBinding;
var value;
const value2 = env0_0 != null;
if (value2) {
value3 = environment.__proto__;
stageChannelParticipantStoreBinding = StageChannelParticipantStore;
value = stageChannelParticipantStoreBinding.getParticipantCount(env0_0.id,
(require(6268) /* metro dependency 6268: StageChannelParticipants */).StageChannelParticipantNamedIndex.AUDIENCE);
value = value > 0;
r0 = value;
} else {
r0 = value2;
}
return r0;
}
function _fun110179() { // fn#110179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1606, offset: 0x0236dbf8, size: 56 bytes, params: 1, frame: 12
return env0_0 != null && ApplicationStreamingStore.getAllApplicationStreamsForChannel(env0_0.id).length > 0;
}
function _fun110180() { // fn#110180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1722, offset: 0x0236dc30, size: 67 bytes, params: 1, frame: 4
const entity_typeBinding = entity_type;
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
return {hasButton: entity_typeBinding === EXTERNAL || env0_1, hasSpeakers: env0_2, hasAudience: ReactModule,
hasStream: env0_4};
}
}
}
global.__d(_fun110170, 14567, [31, 4810, 1384, 4492, 1379, 3784, 4300, 14568, 1385, 482, 14569, 566, 9127, 14570,
6273, 6268,
2]) /* metro module 14567, dependencies: [31, 4810, 1384, 4492, 1379, 3784, 4300, 14568, 1385, 482, 14569, 566, 9127, 14570, 6273, 6268, 2] */;
@@ -1,11 +1,13 @@
/* Metro module 9035; source: modules/guild_scheduled_events/useGuildScheduledEventUserCount.tsx; dependencies: [31, 4117, 566, 9036, 2] */
import GuildScheduledEventStore from './GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun70261(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9220:6, offset: 0x01cf4a58, size: 139 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(31) /* metro dependency 31 */).useEffect;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useGuildScheduledEventUserCount.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useGuildScheduledEventUserCount.tsx');
exports.default = function(a0, a1, a2) {
var env0_0 = a0;
var env0_1 = a1;
@@ -14,27 +16,33 @@ function _fun70261(global, require, importDefault, importAll, module, exports, d
useEffect(_fun70264, [a1, a0, a2]);
return value2;
};
}
function useGuildScheduledEventUserCount(a0, a1, a2) { // fn#70262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9220:236, offset: 0x01cf4ae3, size: 113 bytes, params: 4, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const userCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getUserCount(require, importDefault);
});
useEffect(_fun70264, [a1, a0, a2]);
return userCount;
function _fun70263() { // fn#70263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9220:322, offset: 0x01cf4b54, size: 32 bytes, params: 1, frame: 13
return GuildScheduledEventStore.getUserCount(require, importDefault);
}
function useGuildScheduledEventUserCount(a0, a1, a2) { // fn#70262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9220:236, offset: 0x01cf4ae3, size: 113 bytes, params: 4, frame: 19
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const userCount = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore],
function() {
return GuildScheduledEventStore.getUserCount(require, importDefault);
});
useEffect(_fun70264, [a1, a0, a2]);
return userCount;
}
function _fun70264() { // fn#70264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9220:358, offset: 0x01cf4b74, size: 106 bytes, params: 1, frame: 17
var value4;
var defaultImport;
if (env0_0 != null && require != null) {
value4 = environment.__proto__;
defaultImport = importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */;
defaultImport.getGuildEventUserCounts(env0_0, require, importDefault != null ? [importDefault] : []);
}
}
function _fun70264() { // fn#70264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9220:358, offset: 0x01cf4b74, size: 106 bytes, params: 1, frame: 17
var value4;
var defaultImport;
if (env0_0 != null && require != null) {
value4 = environment.__proto__;
defaultImport = importDefault(9036) /* metro dependency 9036: GuildScheduledEventManager */;
defaultImport.getGuildEventUserCounts(env0_0, require, importDefault != null ? [importDefault] : []);
}
}
global.__d(_fun70261, 9035, [31, 4117, 566, 9036,
2]) /* metro module 9035, dependencies: [31, 4117, 566, 9036, 2] */;
@@ -1,4 +1,17 @@
/* Metro module 9127; source: modules/guild_scheduled_events/useGuildScheduledEvents.tsx; dependencies: [57, 31, 1379, 1867, 3784, 4117, 9128, 1385, 661, 672, 566, 9039, 9129, 9045, 2] */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import Durations from '../../utils/Durations.tsx'; /* Metro dependency 672 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import GuildScheduledEventStore from './GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import UpcomingEventNoticesStore from './UpcomingEventNoticesStore.tsx'; /* Metro dependency 9128 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as GuildScheduledEventStoreModule from './GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as UseEventScheduleModule from './useEventSchedule.tsx'; /* Metro dependency 9045 */
function _fun71494(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71494, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:6, offset: 0x01d22bc8, size: 463 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = function(a0) {
@@ -9,16 +22,9 @@ function _fun71494(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
let value = require(4117) /* metro dependency 4117: GuildScheduledEventStore */;
let value = GuildScheduledEventStoreModule;
const env0_7 = value.isGuildScheduledEventActive;
const env0_8 = value.StaticGuildEventIndexes;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const upcomingEventNoticesStore = importDefault(9128) /* metro dependency 9128: UpcomingEventNoticesStore */;
value = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
const env0_11 = value.GuildScheduledEventEntityTypes;
const env0_12 = value.GuildScheduledEventStatus;
@@ -26,10 +32,10 @@ function _fun71494(global, require, importDefault, importAll, module, exports, d
const env0_13 = value.GuildFeatures;
const env0_14 = value.Permissions;
const env0_15 = [];
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
const Millis = (Durations).Millis;
const MINUTE = Millis.MINUTE;
const env0_16 = 15 * MINUTE;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useGuildScheduledEvents.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useGuildScheduledEvents.tsx');
exports.default = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
@@ -59,291 +65,308 @@ function _fun71494(global, require, importDefault, importAll, module, exports, d
return require(dependencyMap[10]).useStateFromStores([ChannelStore, GuildScheduledEventStore], _fun71519, [a0]);
};
exports.useImminentUpcomingGuildEvents = useImminentUpcomingGuildEvents;
}
function useGuildUpcomingEvents(a0) { // fn#71495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:395, offset: 0x01d22d97, size: 92 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildScheduledEventStore,
ChannelStore, PermissionStore], _fun71496, [a0]);
}
function useGuildEvents(a0, a1) { // fn#71498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:821, offset: 0x01d22e9f, size: 111 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildStore,
GuildScheduledEventStore, PermissionStore, ChannelStore], _fun71499, [a1, a0]);
}
function useActiveEvent(a0) { // fn#71501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1150, offset: 0x01d22fb8, size: 91 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore, ChannelStore,
PermissionStore], _fun71502, [a0]);
}
function useActiveEventsByChannel(a0) { // fn#71503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1466, offset: 0x01d23098, size: 110 bytes, params: 2, frame: 17
const env0_0 = a0;
return env0_3.useMemo(_fun71505,
[(require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildScheduledEventStore], _fun71504,
[a0])]);
}
function useGuildUpcomingEventsNotice(a0) { // fn#71507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1784, offset: 0x01d23181, size: 415 bytes, params: 2, frame: 26
var r5;
var r12;
var length;
var value9;
var property;
var id;
var property2;
var property3;
var property4;
var value10;
var moduleValue5;
var nextShownUpcomingEventNoticeType;
var value12;
const env0_0 = a0;
const value2 = useGuildUpcomingEvents(a0);
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UpcomingEventNoticesStore],
function() {
return UpcomingEventNoticesStore.getAllEventDismissals();
});
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([UpcomingEventNoticesStore],
function() {
return UpcomingEventNoticesStore.getAllUpcomingNoticeSeenTimes();
});
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([GuildScheduledEventStore],
_fun71510, [value2]);
const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun71512);
if (value2 != null) {
if (value5 == null) {
return undefined;
}
if (guild != null && !guild.features.has(GuildFeatures.COMMUNITY) && guild.features.has(GuildFeatures.INTERNAL_EMPLOYEE_ONLY)) {
length = value2.length;
value9 = 0;
if (value9 < length) {
r5 = value9;
while (true) {
property = value2[r5];
id = property.id;
property2 = value3[id];
id = property.id;
property3 = value4[id];
id = property.id;
property4 = value5[id];
value10 = property4 != null;
r12 = value10 && property4;
moduleValue5 = require(9129) /* metro dependency 9129: GuildScheduledEventUtils */;
nextShownUpcomingEventNoticeType = moduleValue5.getNextShownUpcomingEventNoticeType(property,
property2,
property3,
r12);
if (nextShownUpcomingEventNoticeType != null) {
return {upcomingEvent: property, noticeType: nextShownUpcomingEventNoticeType};
}
value12 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
length = value2.length;
if (value12 < length) {
r5 = value12;
continue;
}
break;
function useGuildUpcomingEvents(a0) { // fn#71495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:395, offset: 0x01d22d97, size: 92 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStoresArray([GuildScheduledEventStore,
ChannelStore, PermissionStore], _fun71496, [a0]);
function _fun71496() { // fn#71496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:479, offset: 0x01d22df3, size: 61 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
const guildScheduledEventStoreBinding = GuildScheduledEventStore;
const getGuildScheduledEventsByIndex = guildScheduledEventStoreBinding.getGuildScheduledEventsByIndex;
const GUILD_EVENT_UPCOMING = StaticGuildEventIndexes.GUILD_EVENT_UPCOMING;
return Reflect.apply(getGuildScheduledEventsByIndex, guildScheduledEventStoreBinding,
[Reflect.apply(GUILD_EVENT_UPCOMING, StaticGuildEventIndexes, [env0_0])]).filter(function(a0) {
if (a0.entity_type === GuildScheduledEventEntityTypes.NONE) {
return false;
}
if (a0.status !== GuildScheduledEventStatus.SCHEDULED) {
return false;
}
return undefined;
}
return undefined;
}
}
}
function useGuildActiveEvent(a0) { // fn#71513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2574, offset: 0x01d233cc, size: 91 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore, ChannelStore,
PermissionStore], _fun71514, [a0]);
}
function useGuildChannelScheduledEvents(a0) { // fn#71516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2902, offset: 0x01d234cf, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore], _fun71517,
[a0]);
}
function useFirstActiveEventChannel(a0) { // fn#71518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3087, offset: 0x01d23544, size: 83 bytes, params: 2, frame: 17
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore, GuildScheduledEventStore],
_fun71519, [a0]);
}
function useImminentUpcomingGuildEvents(a0) { // fn#71521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3371, offset: 0x01d23614, size: 182 bytes, params: 2, frame: 19
const env0_0 = a0;
const binding = env0_3;
const [property, env0_1] = env0_2(binding.useState(function() {
var Date = global.Date;
return Date.now();
}), 2);
binding.useEffect(_fun71523, []);
return binding.useMemo(_fun71527,
[(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildScheduledEventStore], _fun71526, [a0,
property])]);
}
function _fun71496() { // fn#71496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:479, offset: 0x01d22df3, size: 61 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
const getGuildScheduledEventsByIndex = GuildScheduledEventStore.getGuildScheduledEventsByIndex;
const GUILD_EVENT_UPCOMING = StaticGuildEventIndexes.GUILD_EVENT_UPCOMING;
return Reflect.apply(getGuildScheduledEventsByIndex, GuildScheduledEventStore, [Reflect.apply(GUILD_EVENT_UPCOMING,
StaticGuildEventIndexes, [env0_0])]).filter(function(a0) {
if (a0.entity_type === GuildScheduledEventEntityTypes.NONE) {
return false;
}
if (a0.status !== GuildScheduledEventStatus.SCHEDULED) {
return false;
}
if (a0.channel_id == null) {
return true;
}
return PermissionStore.can(Permissions.VIEW_CHANNEL, ChannelStore.getChannel(a0.channel_id));
});
}
function _fun71499() { // fn#71499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:901, offset: 0x01d22f0e, size: 107 bytes, params: 1, frame: 15
var environment;
var r0;
var getGuildScheduledEventsByIndex;
let value = environment.__proto__;
const guild = GuildStore.getGuild(env0_0);
if (guild == null) {
r0 = env1_15;
} else {
getGuildScheduledEventsByIndex = GuildScheduledEventStore.getGuildScheduledEventsByIndex;
r0 = require ?? StaticGuildEventIndexes.GUILD_EVENT_UPCOMING(guild.id);
value = Reflect.apply(getGuildScheduledEventsByIndex, GuildScheduledEventStore, [r0]);
value = value.filter(function({channel_id}) {
if (channel_id == null) {
return true;
}
return PermissionStore.can(Permissions.VIEW_CHANNEL, ChannelStore.getChannel(channel_id));
});
r0 = value;
}
return r0;
}
function _fun71502() { // fn#71502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1221, offset: 0x01d23013, size: 133 bytes, params: 1, frame: 15
let value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
const can = PermissionStore.can;
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
const value4 = Reflect.apply(can, PermissionStore, [VIEW_CHANNEL, channel]);
const value5 = null;
if (value4) {
if (value5 == (value5 == channel ? undefined : channel.guild_id)) {
return value5;
}
value = GuildScheduledEventStore.getGuildScheduledEventsByIndex(StaticGuildEventIndexes.CHANNEL_EVENT_ACTIVE(env0_0));
return value.length > 0 ? value[0] : value5;
}
return value5;
}
function _fun71504() { // fn#71504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1547, offset: 0x01d23106, size: 27 bytes, params: 1, frame: 11
return GuildScheduledEventStore.getGuildScheduledEventsForGuild(env0_0);
}
function _fun71505() { // fn#71505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1612, offset: 0x01d23121, size: 60 bytes, params: 1, frame: 12
const Map = global.Map;
const map = new Map();
env0_1.forEach(_fun71506);
return map;
}
function _fun71510() { // fn#71510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2052, offset: 0x01d2334a, size: 46 bytes, params: 1, frame: 13
return env0_1 == null ? {} : env0_1.reduce(function(a0, a1) {
var value2 = require(dependencyMap[11]).getNextRecurrenceIdInEvent(a1);
var object = {};
copyDataProperties(object, a0, value2);
object[a1.id] = GuildScheduledEventStore.isInterestedInEventRecurrence(a1.id, value2);
return object;
}, {});
}
function _fun71514() { // fn#71514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2650, offset: 0x01d23427, size: 62 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
const getGuildScheduledEventsByIndex = GuildScheduledEventStore.getGuildScheduledEventsByIndex;
const GUILD_EVENT_ACTIVE = StaticGuildEventIndexes.GUILD_EVENT_ACTIVE;
return Reflect.apply(getGuildScheduledEventsByIndex, GuildScheduledEventStore, [Reflect.apply(GUILD_EVENT_ACTIVE,
StaticGuildEventIndexes, [env0_0])]).find(function(a0) {
if (a0.entity_type !== GuildScheduledEventEntityTypes.NONE) {
if (isGuildScheduledEventActive(a0)) {
if (a0.channel_id == null) {
return true;
}
return PermissionStore.can(Permissions.VIEW_CHANNEL, ChannelStore.getChannel(a0.channel_id));
});
}
}
function useGuildEvents(a0, a1) { // fn#71498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:821, offset: 0x01d22e9f, size: 111 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (FluxModule).useStateFromStoresArray([GuildStore,
GuildScheduledEventStore, PermissionStore, ChannelStore], _fun71499, [a1, a0]);
function _fun71499() { // fn#71499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:901, offset: 0x01d22f0e, size: 107 bytes, params: 1, frame: 15
var environment;
var r0;
var guildScheduledEventStoreBinding;
var getGuildScheduledEventsByIndex;
let value = environment.__proto__;
const guild = GuildStore.getGuild(env0_0);
if (guild == null) {
r0 = env1_15;
} else {
guildScheduledEventStoreBinding = GuildScheduledEventStore;
getGuildScheduledEventsByIndex = guildScheduledEventStoreBinding.getGuildScheduledEventsByIndex;
r0 = require ?? StaticGuildEventIndexes.GUILD_EVENT_UPCOMING(guild.id);
value = Reflect.apply(getGuildScheduledEventsByIndex, guildScheduledEventStoreBinding, [r0]);
value = value.filter(function({channel_id}) {
if (channel_id == null) {
return true;
}
return PermissionStore.can(Permissions.VIEW_CHANNEL, ChannelStore.getChannel(channel_id));
});
r0 = value;
}
return r0;
}
}
function useActiveEvent(a0) { // fn#71501, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1150, offset: 0x01d22fb8, size: 91 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStores([GuildScheduledEventStore, ChannelStore,
PermissionStore], _fun71502, [a0]);
function _fun71502() { // fn#71502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1221, offset: 0x01d23013, size: 133 bytes, params: 1, frame: 15
var guildScheduledEventStoreBinding;
let value = environment.__proto__;
const channel = ChannelStore.getChannel(env0_0);
const permissionStoreBinding = PermissionStore;
const can = permissionStoreBinding.can;
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
const value4 = Reflect.apply(can, permissionStoreBinding, [VIEW_CHANNEL, channel]);
const value5 = null;
if (value4) {
if (value5 == (value5 == channel ? undefined : channel.guild_id)) {
return value5;
}
guildScheduledEventStoreBinding = GuildScheduledEventStore;
value = guildScheduledEventStoreBinding.getGuildScheduledEventsByIndex(StaticGuildEventIndexes.CHANNEL_EVENT_ACTIVE(env0_0));
return value.length > 0 ? value[0] : value5;
}
return value5;
}
}
function useActiveEventsByChannel(a0) { // fn#71503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1466, offset: 0x01d23098, size: 110 bytes, params: 2, frame: 17
const env0_0 = a0;
return ReactModule.useMemo(_fun71505,
[(FluxModule).useStateFromStoresArray([GuildScheduledEventStore], _fun71504,
[a0])]);
function _fun71504() { // fn#71504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1547, offset: 0x01d23106, size: 27 bytes, params: 1, frame: 11
return GuildScheduledEventStore.getGuildScheduledEventsForGuild(env0_0);
}
function _fun71505() { // fn#71505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1612, offset: 0x01d23121, size: 60 bytes, params: 1, frame: 12
const Map = global.Map;
const map = new Map();
env0_1.forEach(_fun71506);
return map;
function _fun71506(a0) { // fn#71506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1649, offset: 0x01d2315d, size: 36 bytes, params: 2, frame: 13
const channel_id = a0.channel_id;
if (channel_id != null) {
env0_0.set(channel_id, a0);
}
}
}
}
function useGuildUpcomingEventsNotice(a0) { // fn#71507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1784, offset: 0x01d23181, size: 415 bytes, params: 2, frame: 26
var r5;
var r12;
var length;
var value9;
var property;
var id;
var property2;
var property3;
var property4;
var value10;
var moduleValue5;
var nextShownUpcomingEventNoticeType;
var value12;
const env0_0 = a0;
const value2 = useGuildUpcomingEvents(a0);
const useStateFromStoresObject = FluxModule.useStateFromStoresObject;
const upcomingEventNoticesStoreBinding = UpcomingEventNoticesStore;
const value3 = Reflect.apply(useStateFromStoresObject, FluxModule, [[upcomingEventNoticesStoreBinding], function() {
return UpcomingEventNoticesStore.getAllEventDismissals();
}]);
const value4 = FluxModule.useStateFromStoresObject([upcomingEventNoticesStoreBinding], function() {
return UpcomingEventNoticesStore.getAllUpcomingNoticeSeenTimes();
});
const value5 = FluxModule.useStateFromStoresObject([GuildScheduledEventStore], _fun71510, [value2]);
const guild = FluxModule.useStateFromStores([GuildStore], _fun71512);
if (value2 != null) {
if (value5 == null) {
return undefined;
}
if (guild != null && !guild.features.has(GuildFeatures.COMMUNITY) && guild.features.has(GuildFeatures.INTERNAL_EMPLOYEE_ONLY)) {
length = value2.length;
value9 = 0;
if (value9 < length) {
r5 = value9;
while (true) {
property = value2[r5];
id = property.id;
property2 = value3[id];
id = property.id;
property3 = value4[id];
id = property.id;
property4 = value5[id];
value10 = property4 != null;
r12 = value10 && property4;
moduleValue5 = require(9129) /* metro dependency 9129: GuildScheduledEventUtils */;
nextShownUpcomingEventNoticeType = moduleValue5.getNextShownUpcomingEventNoticeType(property,
property2,
property3,
r12);
if (nextShownUpcomingEventNoticeType != null) {
return {upcomingEvent: property, noticeType: nextShownUpcomingEventNoticeType};
}
value12 = typeof r5 === 'bigint' ? r5 + 1n : +r5 + 1;
length = value2.length;
if (value12 < length) {
r5 = value12;
continue;
}
break;
}
return undefined;
}
return undefined;
}
}
return false;
});
}
function _fun71510() { // fn#71510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2052, offset: 0x01d2334a, size: 46 bytes, params: 1, frame: 13
return env0_1 == null ? {} : env0_1.reduce(function(a0, a1) {
var value2 = require(dependencyMap[11]).getNextRecurrenceIdInEvent(a1);
var object = {};
copyDataProperties(object, a0, value2);
object[a1.id] = GuildScheduledEventStore.isInterestedInEventRecurrence(a1.id, value2);
return object;
}, {});
}
function _fun71517() { // fn#71517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2985, offset: 0x01d2351a, size: 42 bytes, params: 1, frame: 13
const getGuildScheduledEventsByIndex = GuildScheduledEventStore.getGuildScheduledEventsByIndex;
const CHANNEL_EVENT_UPCOMING = StaticGuildEventIndexes.CHANNEL_EVENT_UPCOMING;
return Reflect.apply(getGuildScheduledEventsByIndex, GuildScheduledEventStore,
[Reflect.apply(CHANNEL_EVENT_UPCOMING, StaticGuildEventIndexes, [env0_0])]);
}
function _fun71512() { // fn#71512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2237, offset: 0x01c7a19a, size: 27 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_0);
}
function _fun71519() { // fn#71519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3168, offset: 0x01d23597, size: 92 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__;
const getGuildScheduledEventsByIndex = GuildScheduledEventStore.getGuildScheduledEventsByIndex;
const GUILD_EVENT_ACTIVE = StaticGuildEventIndexes.GUILD_EVENT_ACTIVE;
return ChannelStore.getChannel(Reflect.apply(getGuildScheduledEventsByIndex, GuildScheduledEventStore,
[Reflect.apply(GUILD_EVENT_ACTIVE, StaticGuildEventIndexes, [env0_0])]).find(_fun71520)?.channel_id);
}
function _fun71523() { // fn#71523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3485, offset: 0x01d236ca, size: 45 bytes, params: 1, frame: 14
const env0_0 = global.setInterval(_fun71524, env1_16);
return _fun71525;
}
function _fun71526() { // fn#71526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3605, offset: 0x01d23718, size: 58 bytes, params: 1, frame: 13
return env0_0 == null ? [] : GuildScheduledEventStore.getGuildScheduledEventsByIndex(StaticGuildEventIndexes.CHANNEL_EVENT_UPCOMING(env0_0));
}
function _fun71527() { // fn#71527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3708, offset: 0x01d23752, size: 28 bytes, params: 1, frame: 11
return env0_2.filter(_fun71528);
}
function _fun71506(a0) { // fn#71506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:1649, offset: 0x01d2315d, size: 36 bytes, params: 2, frame: 13
const channel_id = a0.channel_id;
if (channel_id != null) {
env0_0.set(channel_id, a0);
}
function useGuildActiveEvent(a0) { // fn#71513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2574, offset: 0x01d233cc, size: 91 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStores([GuildScheduledEventStore, ChannelStore,
PermissionStore], _fun71514, [a0]);
function _fun71514() { // fn#71514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2650, offset: 0x01d23427, size: 62 bytes, params: 1, frame: 13
var environment;
const value = environment.__proto__;
const guildScheduledEventStoreBinding = GuildScheduledEventStore;
const getGuildScheduledEventsByIndex = guildScheduledEventStoreBinding.getGuildScheduledEventsByIndex;
const GUILD_EVENT_ACTIVE = StaticGuildEventIndexes.GUILD_EVENT_ACTIVE;
return Reflect.apply(getGuildScheduledEventsByIndex, guildScheduledEventStoreBinding,
[Reflect.apply(GUILD_EVENT_ACTIVE, StaticGuildEventIndexes, [env0_0])]).find(function(a0) {
if (a0.entity_type !== GuildScheduledEventEntityTypes.NONE) {
if (isGuildScheduledEventActive(a0)) {
if (a0.channel_id == null) {
return true;
}
return PermissionStore.can(Permissions.VIEW_CHANNEL, ChannelStore.getChannel(a0.channel_id));
}
}
return false;
});
}
}
function useGuildChannelScheduledEvents(a0) { // fn#71516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2902, offset: 0x01d234cf, size: 75 bytes, params: 2, frame: 16
const env0_0 = a0;
return (FluxModule).useStateFromStores([GuildScheduledEventStore], _fun71517,
[a0]);
function _fun71517() { // fn#71517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:2985, offset: 0x01d2351a, size: 42 bytes, params: 1, frame: 13
const guildScheduledEventStoreBinding = GuildScheduledEventStore;
const getGuildScheduledEventsByIndex = guildScheduledEventStoreBinding.getGuildScheduledEventsByIndex;
const CHANNEL_EVENT_UPCOMING = StaticGuildEventIndexes.CHANNEL_EVENT_UPCOMING;
return Reflect.apply(getGuildScheduledEventsByIndex, guildScheduledEventStoreBinding,
[Reflect.apply(CHANNEL_EVENT_UPCOMING, StaticGuildEventIndexes, [env0_0])]);
}
}
function useFirstActiveEventChannel(a0) { // fn#71518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3087, offset: 0x01d23544, size: 83 bytes, params: 2, frame: 17
const env0_0 = a0;
return (FluxModule).useStateFromStores([ChannelStore, GuildScheduledEventStore],
_fun71519, [a0]);
function _fun71519() { // fn#71519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3168, offset: 0x01d23597, size: 92 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__;
const guildScheduledEventStoreBinding = GuildScheduledEventStore;
const getGuildScheduledEventsByIndex = guildScheduledEventStoreBinding.getGuildScheduledEventsByIndex;
const GUILD_EVENT_ACTIVE = StaticGuildEventIndexes.GUILD_EVENT_ACTIVE;
return ChannelStore.getChannel(Reflect.apply(getGuildScheduledEventsByIndex, guildScheduledEventStoreBinding,
[Reflect.apply(GUILD_EVENT_ACTIVE, StaticGuildEventIndexes, [env0_0])]).find(_fun71520)?.channel_id);
function _fun71520({channel_id}) { // fn#71520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3243, offset: 0x01d235f3, size: 33 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return ChannelStore.getChannel(channel_id) != null;
}
}
}
function useImminentUpcomingGuildEvents(a0) { // fn#71521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3371, offset: 0x01d23614, size: 182 bytes, params: 2, frame: 19
const env0_0 = a0;
const [property, env0_1] = Module00057(ReactModule.useState(function() {
var Date = global.Date;
return Date.now();
}), 2);
ReactModule.useEffect(_fun71523, []);
return ReactModule.useMemo(_fun71527,
[(FluxModule).useStateFromStores([GuildScheduledEventStore], _fun71526, [a0,
property])]);
function _fun71523() { // fn#71523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3485, offset: 0x01d236ca, size: 45 bytes, params: 1, frame: 14
const env0_0 = global.setInterval(_fun71524, env1_16);
return _fun71525;
function _fun71524() { // fn#71524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3509, offset: 0x01d236f7, size: 33 bytes, params: 1, frame: 11
const value = environment.__proto__;
const binding = env1_1;
const Date = global.Date;
binding(Date.now());
}
function _fun71525() { // fn#71525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3539, offset: 0x013378b1, size: 24 bytes, params: 1, frame: 11
return global.clearInterval(env0_0);
}
}
function _fun71526() { // fn#71526, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3605, offset: 0x01d23718, size: 58 bytes, params: 1, frame: 13
return env0_0 == null ? [] : GuildScheduledEventStore.getGuildScheduledEventsByIndex(StaticGuildEventIndexes.CHANNEL_EVENT_UPCOMING(env0_0));
}
function _fun71527() { // fn#71527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3708, offset: 0x01d23752, size: 28 bytes, params: 1, frame: 11
return Module00057.filter(_fun71528);
function _fun71528(a0) { // fn#71528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3722, offset: 0x01d2376e, size: 153 bytes, params: 2, frame: 17
const value = environment.__proto__.__proto__;
const value2 = undefined;
const {startTime, endTime} = (UseEventScheduleModule).getEventSchedule(a0);
const {withinStartWindow,
diffMinutes} = (require(9039) /* metro dependency 9039: ScheduleUtils */).getEventTimeData(startTime.toISOString(),
endTime == null ? value2 : endTime.toISOString());
const status = a0.status;
const ACTIVE = GuildScheduledEventStatus.ACTIVE;
return status !== ACTIVE && withinStartWindow && diffMinutes < 15;
}
}
}
}
function _fun71520({channel_id}) { // fn#71520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3243, offset: 0x01d235f3, size: 33 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return ChannelStore.getChannel(channel_id) != null;
}
function _fun71524() { // fn#71524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3509, offset: 0x01d236f7, size: 33 bytes, params: 1, frame: 11
const value = environment.__proto__;
const binding = env1_1;
const Date = global.Date;
binding(Date.now());
}
function _fun71528(a0) { // fn#71528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9312:3722, offset: 0x01d2376e, size: 153 bytes, params: 2, frame: 17
const value = environment.__proto__.__proto__;
const value2 = undefined;
const {startTime, endTime} = (require(9045) /* metro dependency 9045: useEventSchedule */).getEventSchedule(a0);
const {withinStartWindow,
diffMinutes} = (require(9039) /* metro dependency 9039: ScheduleUtils */).getEventTimeData(startTime.toISOString(),
endTime == null ? value2 : endTime.toISOString());
const status = a0.status;
const ACTIVE = GuildScheduledEventStatus.ACTIVE;
return status !== ACTIVE && withinStartWindow && diffMinutes < 15;
}
global.__d(_fun71494, 9127, [57, 31, 1379, 1867, 3784, 4117, 9128, 1385, 661, 672, 566, 9039, 9129, 9045,
2]) /* metro module 9127, dependencies: [57, 31, 1379, 1867, 3784, 4117, 9128, 1385, 661, 672, 566, 9039, 9129, 9045, 2] */;
@@ -1,43 +1,49 @@
/* Metro module 9061; source: modules/guild_scheduled_events/useGuildsUserCanStartStageIn.tsx; dependencies: [1935, 3784, 1387, 566, 2] */
import GuildChannelStore from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildChannelStoreModule from '../../stores/GuildChannelStore.tsx'; /* Metro dependency 1935 */
function _fun70832(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70832, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9246:6, offset: 0x01d0a13e, size: 149 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_3 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_VOCAL_CHANNELS_KEY;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useGuildsUserCanStartStageIn.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useGuildsUserCanStartStageIn.tsx');
exports.useChannelsUserCanStartStageIn = useChannelsUserCanStartStageIn;
}
function useChannelsUserCanStartStageIn(a0) { // fn#70833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9246:281, offset: 0x01d0a1d3, size: 112 bytes, params: 2, frame: 17
const value = null;
const id = value == a0 ? undefined : a0.id;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildChannelStore, PermissionStore],
_fun70834, [value != id ? id : value]);
function _fun70834() { // fn#70834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9246:415, offset: 0x01d0a243, size: 60 bytes, params: 1, frame: 13
return GuildChannelStore.getChannels(env0_0)[GUILD_VOCAL_CHANNELS_KEY].reduce(_fun70835, []);
function _fun70835(a0, a1) { // fn#70835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9246:447, offset: 0x01d0a27f, size: 118 bytes, params: 3, frame: 19
var permissionStore2;
var channel2;
var value;
var permissionStoreBinding;
var isGuildStageVoice2;
const channel = a1.channel;
if (channel.isGuildStageVoice()) {
channel2 = a1.channel;
value = environment.__proto__.__proto__;
permissionStoreBinding = PermissionStore;
permissionStore2 = permissionStoreBinding !== undefined ? permissionStoreBinding : PermissionStore;
isGuildStageVoice2 = channel2.isGuildStageVoice();
if (isGuildStageVoice2 ? permissionStore2.can((require(1387) /* metro dependency 1387: StageChannelPermissions */).MODERATE_STAGE_CHANNEL_PERMISSIONS,
channel2) : !!isGuildStageVoice2) {
a0.push(channel);
}
}
return a0;
}
function useChannelsUserCanStartStageIn(a0) { // fn#70833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9246:281, offset: 0x01d0a1d3, size: 112 bytes, params: 2, frame: 17
const value = null;
const id = value == a0 ? undefined : a0.id;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([GuildChannelStore, PermissionStore],
_fun70834, [value != id ? id : value]);
}
function _fun70834() { // fn#70834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9246:415, offset: 0x01d0a243, size: 60 bytes, params: 1, frame: 13
return GuildChannelStore.getChannels(env0_0)[GUILD_VOCAL_CHANNELS_KEY].reduce(_fun70835, []);
}
function _fun70835(a0, a1) { // fn#70835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9246:447, offset: 0x01d0a27f, size: 118 bytes, params: 3, frame: 19
var PermissionStore2;
var channel2;
var value;
var isGuildStageVoice2;
const channel = a1.channel;
if (channel.isGuildStageVoice()) {
channel2 = a1.channel;
value = environment.__proto__.__proto__;
PermissionStore2 = PermissionStore !== undefined ? PermissionStore : PermissionStore;
isGuildStageVoice2 = channel2.isGuildStageVoice();
if (isGuildStageVoice2 ? PermissionStore2.can((require(1387) /* metro dependency 1387: StageChannelPermissions */).MODERATE_STAGE_CHANNEL_PERMISSIONS,
channel2) : !!isGuildStageVoice2) {
a0.push(channel);
}
}
return a0;
}
global.__d(_fun70832, 9061, [1935, 3784, 1387, 566,
2]) /* metro module 9061, dependencies: [1935, 3784, 1387, 566, 2] */;
@@ -1,87 +1,94 @@
/* Metro module 9046; source: modules/guild_scheduled_events/useInterestedEventUsers.tsx; dependencies: [31, 4117, 1385, 566, 2] */
import GuildScheduledEventStore from './GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun70677(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70677, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:6, offset: 0x01d031c7, size: 157 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(31) /* metro dependency 31 */).useMemo;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const env0_4 = (require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */).GuildScheduledEventUserResponses;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useInterestedEventUsers.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useInterestedEventUsers.tsx');
exports.default = useInterestedEventUsers;
}
function useInterestedEventUsers(a0, a1) { // fn#70678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:269, offset: 0x01d03264, size: 169 bytes, params: 3, frame: 24
const env0_0 = a0;
const env0_1 = a1;
let useStateFromStoresArray = FluxModule.useStateFromStoresArray;
const guildScheduledEventStoreBinding = GuildScheduledEventStore;
const value2 = Reflect.apply(useStateFromStoresArray, FluxModule, [[guildScheduledEventStoreBinding], _fun70679,
[a0]]);
useStateFromStoresArray = FluxModule.useStateFromStoresArray;
return useMemo(_fun70681, [value2, Reflect.apply(useStateFromStoresArray, FluxModule,
[[guildScheduledEventStoreBinding], _fun70680, [a0, a1]])]);
function _fun70679() { // fn#70679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:350, offset: 0x01d0330d, size: 48 bytes, params: 1, frame: 15
const Object = global.Object;
const values = Object.values;
const guildScheduledEventStoreBinding = GuildScheduledEventStore;
const getUsersForGuildEvent = guildScheduledEventStoreBinding.getUsersForGuildEvent;
return Reflect.apply(values, Object, [Reflect.apply(getUsersForGuildEvent, guildScheduledEventStoreBinding, [env0_0,
null])]);
}
function useInterestedEventUsers(a0, a1) { // fn#70678, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:269, offset: 0x01d03264, size: 169 bytes, params: 3, frame: 24
const env0_0 = a0;
const env0_1 = a1;
const fluxModule = require(566) /* metro dependency 566: flux */;
let useStateFromStoresArray = fluxModule.useStateFromStoresArray;
const value2 = Reflect.apply(useStateFromStoresArray, fluxModule, [[GuildScheduledEventStore], _fun70679, [a0]]);
const moduleValue2 = fluxModule;
useStateFromStoresArray = moduleValue2.useStateFromStoresArray;
return useMemo(_fun70681, [value2, Reflect.apply(useStateFromStoresArray, moduleValue2, [[GuildScheduledEventStore],
_fun70680, [a0, a1]])]);
}
function _fun70680() { // fn#70680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:446, offset: 0x01d0333d, size: 50 bytes, params: 1, frame: 15
const Object = global.Object;
const values = Object.values;
const guildScheduledEventStoreBinding = GuildScheduledEventStore;
const getUsersForGuildEvent = guildScheduledEventStoreBinding.getUsersForGuildEvent;
return Reflect.apply(values, Object, [Reflect.apply(getUsersForGuildEvent, guildScheduledEventStoreBinding, [env0_0,
require])]);
}
function _fun70679() { // fn#70679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:350, offset: 0x01d0330d, size: 48 bytes, params: 1, frame: 15
const Object = global.Object;
const values = Object.values;
const getUsersForGuildEvent = GuildScheduledEventStore.getUsersForGuildEvent;
return Reflect.apply(values, Object, [Reflect.apply(getUsersForGuildEvent, GuildScheduledEventStore, [env0_0,
null])]);
}
function _fun70681() { // fn#70681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:512, offset: 0x01d0336f, size: 141 bytes, params: 1, frame: 15
const binding = env0_3;
let closure = function(a0, a1) {
a0[a1.user_id] = a1;
return a0;
};
const env0_0 = binding.reduce(closure, {});
const value = ReactModule.useMemo.filter(_fun70683);
const value2 = binding.filter(function({response}) {
return response === GuildScheduledEventUserResponses.INTERESTED;
});
const Set = global.Set;
const set = new Set();
closure = addUserToAllInterested;
value.forEach(closure);
value2.forEach(closure);
return [];
function _fun70683({user_id}) { // fn#70683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:576, offset: 0x01d0340e, size: 54 bytes, params: 2, frame: 3
var r0;
var response;
const property = env0_0[user_id];
let value = property == null;
if (value) {
r0 = value;
} else {
response = property.response;
value = environment.__proto__.__proto__;
value = response === GuildScheduledEventUserResponses.INTERESTED;
r0 = value;
}
return r0;
}
function _fun70680() { // fn#70680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:446, offset: 0x01d0333d, size: 50 bytes, params: 1, frame: 15
const Object = global.Object;
const values = Object.values;
const getUsersForGuildEvent = GuildScheduledEventStore.getUsersForGuildEvent;
return Reflect.apply(values, Object, [Reflect.apply(getUsersForGuildEvent, GuildScheduledEventStore, [env0_0,
require])]);
}
function addUserToAllInterested(a0) { // fn#70685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:725, offset: 0x01d03460, size: 67 bytes, params: 2, frame: 13
let binding = env0_1;
const has = binding.has;
const user_id = a0.user_id;
if (!Reflect.apply(has, binding, [user_id])) {
binding = ReactModule.useMemo;
binding.push(a0);
binding = env0_1;
binding.add(a0.user_id);
}
}
function _fun70681() { // fn#70681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:512, offset: 0x01d0336f, size: 141 bytes, params: 1, frame: 15
const binding = env0_3;
let closure = function(a0, a1) {
a0[a1.user_id] = a1;
return a0;
};
const env0_0 = binding.reduce(closure, {});
const value = env0_2.filter(_fun70683);
const value2 = binding.filter(function({response}) {
return response === GuildScheduledEventUserResponses.INTERESTED;
});
const Set = global.Set;
const set = new Set();
closure = addUserToAllInterested;
value.forEach(closure);
value2.forEach(closure);
return [];
}
}
function _fun70683({user_id}) { // fn#70683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:576, offset: 0x01d0340e, size: 54 bytes, params: 2, frame: 3
var r0;
var response;
const property = env0_0[user_id];
let value = property == null;
if (value) {
r0 = value;
} else {
response = property.response;
value = environment.__proto__.__proto__;
value = response === GuildScheduledEventUserResponses.INTERESTED;
r0 = value;
}
return r0;
}
function addUserToAllInterested(a0) { // fn#70685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9231:725, offset: 0x01d03460, size: 67 bytes, params: 2, frame: 13
let binding = env0_1;
const has = binding.has;
const user_id = a0.user_id;
if (!Reflect.apply(has, binding, [user_id])) {
binding = env0_2;
binding.push(a0);
binding = env0_1;
binding.add(a0.user_id);
}
}
global.__d(_fun70677, 9046, [31, 4117, 1385, 566,
2]) /* metro module 9046, dependencies: [31, 4117, 1385, 566, 2] */;
@@ -1,193 +1,208 @@
/* Metro module 9218; source: modules/guild_scheduled_events/useSelectStage.tsx; dependencies: [5, 57, 31, 1379, 1934, 566, 8113, 2] */
import Module00005 from '../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
function _fun72092(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:6, offset: 0x01d396c5, size: 181 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(5) /* metro dependency 5 */;
const env0_3 = importDefault(57) /* metro dependency 57 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/useSelectStage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useSelectStage.tsx');
exports.default = useSelectStage;
}
function useSelectStage() { // fn#72093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:239, offset: 0x01d3977a, size: 184 bytes, params: 1, frame: 18
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getVoiceChannelId();
}, []);
let value = Module00057(ReactModule.useState(value2), 2);
const property = value[0];
const env0_2 = value[1];
ReactModule.useEffect(function() {
var env0_0 = global.setTimeout(_fun72096, 500);
return _fun72097;
}, [value2]);
const useCallback = ReactModule.useCallback;
value = _fun72098();
value = Reflect.apply(useCallback, ReactModule, [value, [property]]);
return [property, value];
function _fun72095() { // fn#72095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:386, offset: 0x01d39845, size: 44 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun72096, 500);
return _fun72097;
function _fun72096() { // fn#72096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:409, offset: 0x00d6a38c, size: 20 bytes, params: 1, frame: 11
env1_2(env1_0);
}
function useSelectStage() { // fn#72093, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:239, offset: 0x01d3977a, size: 184 bytes, params: 1, frame: 18
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore],
function() {
return SelectedChannelStore.getVoiceChannelId();
}, []);
const binding = env0_4;
let value = env0_3(binding.useState(value2), 2);
const property = value[0];
const env0_2 = value[1];
binding.useEffect(function() {
var env0_0 = global.setTimeout(_fun72096, 500);
return _fun72097;
}, [value2]);
const useCallback = binding.useCallback;
value = _fun72098();
value = Reflect.apply(useCallback, binding, [value, [property]]);
return [property, value];
}
function _fun72097() { // fn#72097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:432, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11
global.clearTimeout(env0_0);
}
function _fun72095() { // fn#72095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:386, offset: 0x01d39845, size: 44 bytes, params: 1, frame: 14
const env0_0 = global.setTimeout(_fun72096, 500);
return _fun72097;
}
}
function _fun72098() { // fn#72098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:481, offset: 0x01d39871, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_2(_fun72100);
return _fun72101;
}
function* _fun72100(a0, a1) { // fn#72100, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:501, offset: 0x01d398a0, size: 183 bytes, params: 3, frame: 19
var value3;
var value4;
var binding;
var getChannel;
var value5;
var value6;
var binding2;
var property;
var value8;
var connectOrLurkStage;
var value9;
var value10;
var value11;
var binding3;
var value12;
var navigateToStage;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
reducibleJoin4: while (true) {
reduciblePort37: while (true) {
exceptionLanding36: while (true) {
function _fun72098() { // fn#72098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:481, offset: 0x01d39871, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_2(_fun72100);
return _fun72101;
function* _fun72100(a0, a1) { // fn#72100, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:501, offset: 0x01d398a0, size: 183 bytes, params: 3, frame: 19
var value3;
var value4;
var binding;
var getChannel;
var value5;
var value6;
var binding2;
var property;
var value8;
var connectOrLurkStage;
var value9;
var value10;
var value11;
var binding3;
var value12;
var navigateToStage;
var error;
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
reducibleJoin4: while (true) {
reduciblePort37: while (true) {
exceptionLanding36: while (true) {
try {
} catch (error) {
break exceptionLanding36;
}
break reducibleJoin4;
}
env2_2(null);
break reduciblePort37;
}
return undefined;
}
try {
value3 = dependencyMap !== a1;
} catch (error) {
break exceptionLanding36;
}
if (!value3) {
value4 = environment.__proto__.__proto__.__proto__;
try {
binding = env3_5;
} catch (error) {
break exceptionLanding36;
}
try {
getChannel = binding.getChannel;
} catch (error) {
break exceptionLanding36;
}
try {
value5 = Reflect.apply(getChannel, binding, [a1]);
} catch (error) {
break exceptionLanding36;
}
try {
value6 = value5 != null;
} catch (error) {
break exceptionLanding36;
}
reducibleJoin13: while (true) {
if (value6) {
try {
binding = env3_0;
} catch (error) {
break exceptionLanding36;
}
try {
binding3 = env3_1;
} catch (error) {
break exceptionLanding36;
}
try {
property = binding3[6];
} catch (error) {
break exceptionLanding36;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding36;
}
try {
navigateToStage = value12.navigateToStage;
} catch (error) {
break exceptionLanding36;
}
try {
Reflect.apply(navigateToStage, value12, [value5]);
} catch (error) {
break exceptionLanding36;
}
return undefined;
}
break reducibleJoin13;
}
}
try {
binding = env2_2;
} catch (error) {
break exceptionLanding36;
}
try {
binding(a1);
} catch (error) {
break exceptionLanding36;
}
break reducibleJoin4;
}
env2_2(null);
break reduciblePort37;
}
return undefined;
}
try {
value3 = dependencyMap !== a1;
} catch (error) {
break exceptionLanding36;
}
if (!value3) {
value4 = environment.__proto__.__proto__.__proto__;
try {
binding = env3_5;
} catch (error) {
break exceptionLanding36;
}
try {
getChannel = binding.getChannel;
} catch (error) {
break exceptionLanding36;
}
try {
value5 = Reflect.apply(getChannel, binding, [a1]);
} catch (error) {
break exceptionLanding36;
}
try {
value6 = value5 != null;
} catch (error) {
break exceptionLanding36;
}
reducibleJoin13: while (true) {
if (value6) {
try {
binding = env3_0;
} catch (error) {
break exceptionLanding36;
}
try {
binding3 = env3_1;
binding2 = env3_1;
} catch (error) {
break exceptionLanding36;
}
try {
property = binding3[6];
property = binding2[6];
} catch (error) {
break exceptionLanding36;
}
try {
value12 = binding(property);
value8 = binding(property);
} catch (error) {
break exceptionLanding36;
}
try {
navigateToStage = value12.navigateToStage;
connectOrLurkStage = value8.connectOrLurkStage;
} catch (error) {
break exceptionLanding36;
}
try {
Reflect.apply(navigateToStage, value12, [value5]);
value9 = Reflect.apply(connectOrLurkStage, value8, [a0, a1]);
} catch (error) {
break exceptionLanding36;
}
return undefined;
yield value9;
try {
value10 = undefined;
value11 = false;
} catch (error) {
break exceptionLanding36;
}
return value11 ? value10 : undefined;
}
break reducibleJoin13;
function _fun72101() { // fn#72101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9403:673, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
try {
binding = env2_2;
} catch (error) {
break exceptionLanding36;
}
try {
binding(a1);
} catch (error) {
break exceptionLanding36;
}
try {
binding = env3_0;
} catch (error) {
break exceptionLanding36;
}
try {
binding2 = env3_1;
} catch (error) {
break exceptionLanding36;
}
try {
property = binding2[6];
} catch (error) {
break exceptionLanding36;
}
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding36;
}
try {
connectOrLurkStage = value8.connectOrLurkStage;
} catch (error) {
break exceptionLanding36;
}
try {
value9 = Reflect.apply(connectOrLurkStage, value8, [a0, a1]);
} catch (error) {
break exceptionLanding36;
}
yield value9;
try {
value10 = undefined;
value11 = false;
} catch (error) {
break exceptionLanding36;
}
return value11 ? value10 : undefined;
}
global.__d(_fun72092, 9218, [5, 57, 31, 1379, 1934, 566, 8113,
2]) /* metro module 9218, dependencies: [5, 57, 31, 1379, 1934, 566, 8113, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,8 +1,12 @@
/* Metro module 9038; source: modules/guild_scheduled_events/utils/EditGuildEventUtils.tsx; dependencies: [1226, 1385, 9039, 9042, 2] */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildScheduledEventsConstantsModule from '../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun70339(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9223:6, offset: 0x01cf684a, size: 298 bytes, params: 8, frame: 21
const env0_0 = require;
const closure = recurrenceRuleToServer;
const closure2 = recurrenceRuleFromServer;
const recurrenceRuleToServer2 = recurrenceRuleToServer;
const recurrenceRuleFromServer2 = recurrenceRuleFromServer;
const eventExceptionsToServer = function(a0) {
return a0.map(_fun70343);
};
@@ -11,23 +15,94 @@ function _fun70339(global, require, importDefault, importAll, module, exports, d
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const guildScheduledEventsConstantsModule = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
const env0_3 = guildScheduledEventsConstantsModule.GuildScheduledEventEntityTypes;
const env0_4 = guildScheduledEventsConstantsModule.GuildScheduledEventStatus;
const env0_5 = guildScheduledEventsConstantsModule.GuildScheduledEventPrivacyLevel;
const env0_6 = guildScheduledEventsConstantsModule.FAKE_EVENT_ID;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/utils/EditGuildEventUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/utils/EditGuildEventUtils.tsx');
exports.EditGuildEventScreens = {CHANNEL_SELECTOR: 'ChannelSelector', DETAILS: 'Details', PREVIEW: 'Preview'};
exports.isEditingEvent = function(a0) {
var Boolean = global.Boolean;
return Boolean(a0?.id);
};
exports.recurrenceRuleToServer = closure;
exports.recurrenceRuleFromServer = closure2;
exports.recurrenceRuleToServer = recurrenceRuleToServer2;
exports.recurrenceRuleFromServer = recurrenceRuleFromServer2;
exports.isExistingGuildEvent = closure3;
exports.convertToFakeGuildEvent = convertToFakeGuildEvent;
exports.getInitialGuildEventData = getInitialGuildEventData;
function eventExceptionsToServer(a0) { // fn#70342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9223:987, offset: 0x01cf6af7, size: 24 bytes, params: 2, frame: 11
return a0.map(function(a0) {
return {event_exception_id: a0.eventExceptionId, event_id: a0.eventId, guild_id: a0.guildId,
scheduled_start_time: a0.scheduledStartTime, scheduled_end_time: a0.scheduledEndTime,
is_canceled: a0.isCanceled};
});
}
function convertToFakeGuildEvent({name, description, privacyLevel, channelId, scheduledStartTime, scheduledEndTime, entityType, entityMetadata, image, recurrenceRule, eventExceptions}, a1, a2) { // fn#70346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9223:1656, offset: 0x01cf6b90, size: 241 bytes, params: 4, frame: 23
const value = a2;
const object = {};
object.id = value ?? FAKE_EVENT_ID;
object.name = name;
object.description = description ?? null;
object.privacy_level = privacyLevel;
object.scheduled_start_time = scheduledStartTime;
object.scheduled_end_time = scheduledEndTime;
object.entity_type = entityType;
object.entity_metadata = entityMetadata ?? null;
object.image = image ?? undefined;
object.channel_id = channelId;
object.guild_id = a1;
object.creator_id = AuthenticationStore.getId();
const SCHEDULED = GuildScheduledEventStatus.SCHEDULED;
object.status = SCHEDULED;
object.recurrence_rule = recurrenceRuleToServer(recurrenceRule);
object.guild_scheduled_event_exceptions = eventExceptionsToServer(eventExceptions);
return object;
}
function getInitialGuildEventData(a0, a1) { // fn#70347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9223:2262, offset: 0x01cf6c81, size: 587 bytes, params: 3, frame: 17
const object = {};
let value = undefined;
const name = a0 == null ? value : a0.name;
const value2 = '';
object.name = name ?? value2;
object.privacyLevel = (a0 == null ? value : a0.privacy_level) ?? GuildScheduledEventPrivacyLevel.GUILD_ONLY;
object.description = (a0 == null ? value : a0.description) ?? value2;
object.scheduledStartTime = (a0 == null ? value : a0.scheduled_start_time) ?? (require(9039) /* metro dependency 9039: ScheduleUtils */).getInitialEventStartDate().toISOString();
object.entityType = (a0 == null ? value : a0.entity_type) ?? GuildScheduledEventEntityTypes.NONE;
object.entityMetadata = (a0 == null ? value : a0.entity_metadata) ?? value;
object.channelId = a0 == null ? value : a0.channel_id;
object.creatorId = a0 == null ? value : a0.creator_id;
object.image = a0 == null ? value : a0.image;
object.scheduledEndTime = a0 == null ? value : a0.scheduled_end_time;
object.recurrenceRule = recurrenceRuleFromServer(a0 == null ? value : a0.recurrence_rule);
object.eventExceptions = ((a0 == null ? value : a0.guild_scheduled_event_exceptions) ?? []).map(function(a0) {
return {eventExceptionId: a0.event_exception_id, eventId: a0.event_id, guildId: a0.guild_id,
scheduledStartTime: a0.scheduled_start_time, scheduledEndTime: a0.scheduled_end_time,
isCanceled: a0.is_canceled};
});
if (isExistingGuildEvent(a0)) {
if ((a0 == null ? value : a0.entity_type) === GuildScheduledEventEntityTypes.EXTERNAL) {
value = require(9042) /* metro dependency 9042: EntityUtils */;
value = value.getLocationFromEvent(a0);
if (value != null) {
object.entityMetadata = {location: value};
}
} else if (object.channelId == null && a1 != null) {
object.channelId = a1.id;
if (a1.isGuildStageVoice()) {
object.entityType = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
} else if (a1.isGuildVoice()) {
object.entityType = GuildScheduledEventEntityTypes.VOICE;
}
}
} else if (object.channelId == null && a1 != null) {
object.channelId = a1.id;
if (a1.isGuildStageVoice()) {
object.entityType = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
} else if (a1.isGuildVoice()) {
object.entityType = GuildScheduledEventEntityTypes.VOICE;
}
}
return object;
}
}
function recurrenceRuleToServer(a0) { // fn#70340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9223:340, offset: 0x01cf6974, size: 171 bytes, params: 2, frame: 8
@@ -53,7 +128,7 @@ function recurrenceRuleToServer(a0) { // fn#70340, source: /ci/build/discord/dis
function recurrenceRuleFromServer(a0) { // fn#70341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9223:665, offset: 0x01cf6a1f, size: 216 bytes, params: 2, frame: 16
var r3;
var r0;
var object2;
var object;
var Date;
var start;
var value2;
@@ -63,12 +138,12 @@ function recurrenceRuleFromServer(a0) { // fn#70341, source: /ci/build/discord/d
if (value == a0) {
r0 = value;
} else {
object2 = {};
object = {};
Date = global.Date;
start = a0.start;
value2 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
object2.start = (date instanceof Object ? date : value2).toISOString();
object.start = (date instanceof Object ? date : value2).toISOString();
end = a0.end;
if (value != end) {
Date = global.Date;
@@ -79,94 +154,24 @@ function recurrenceRuleFromServer(a0) { // fn#70341, source: /ci/build/discord/d
} else {
r3 = value;
}
object2.end = r3;
object2.frequency = a0.frequency;
object2.interval = a0.interval;
object2.byWeekday = a0.by_weekday;
object2.byNWeekday = a0.by_n_weekday;
object2.byMonth = a0.by_month;
object2.byMonthDay = a0.by_month_day;
object2.byYearDay = a0.by_year_day;
object2.count = a0.count;
r0 = object2;
object.end = r3;
object.frequency = a0.frequency;
object.interval = a0.interval;
object.byWeekday = a0.by_weekday;
object.byNWeekday = a0.by_n_weekday;
object.byMonth = a0.by_month;
object.byMonthDay = a0.by_month_day;
object.byYearDay = a0.by_year_day;
object.count = a0.count;
r0 = object;
}
return r0;
}
function eventExceptionsToServer(a0) { // fn#70342, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9223:987, offset: 0x01cf6af7, size: 24 bytes, params: 2, frame: 11
return a0.map(function(a0) {
return {event_exception_id: a0.eventExceptionId, event_id: a0.eventId, guild_id: a0.guildId,
scheduled_start_time: a0.scheduledStartTime, scheduled_end_time: a0.scheduledEndTime,
is_canceled: a0.isCanceled};
});
}
function convertToFakeGuildEvent({name, description, privacyLevel, channelId, scheduledStartTime, scheduledEndTime, entityType, entityMetadata, image, recurrenceRule, eventExceptions}, a1, a2) { // fn#70346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9223:1656, offset: 0x01cf6b90, size: 241 bytes, params: 4, frame: 23
const value = a2;
const object2 = {};
object2.id = value ?? FAKE_EVENT_ID;
object2.name = name;
object2.description = description ?? null;
object2.privacy_level = privacyLevel;
object2.scheduled_start_time = scheduledStartTime;
object2.scheduled_end_time = scheduledEndTime;
object2.entity_type = entityType;
object2.entity_metadata = entityMetadata ?? null;
object2.image = image ?? undefined;
object2.channel_id = channelId;
object2.guild_id = a1;
object2.creator_id = AuthenticationStore.getId();
const SCHEDULED = GuildScheduledEventStatus.SCHEDULED;
object2.status = SCHEDULED;
object2.recurrence_rule = recurrenceRuleToServer(recurrenceRule);
object2.guild_scheduled_event_exceptions = eventExceptionsToServer(eventExceptions);
return object2;
}
function getInitialGuildEventData(a0, a1) { // fn#70347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9223:2262, offset: 0x01cf6c81, size: 587 bytes, params: 3, frame: 17
const object2 = {};
let value = undefined;
const name = a0 == null ? value : a0.name;
const value2 = '';
object2.name = name ?? value2;
object2.privacyLevel = (a0 == null ? value : a0.privacy_level) ?? GuildScheduledEventPrivacyLevel.GUILD_ONLY;
object2.description = (a0 == null ? value : a0.description) ?? value2;
object2.scheduledStartTime = (a0 == null ? value : a0.scheduled_start_time) ?? (require(9039) /* metro dependency 9039: ScheduleUtils */).getInitialEventStartDate().toISOString();
object2.entityType = (a0 == null ? value : a0.entity_type) ?? GuildScheduledEventEntityTypes.NONE;
object2.entityMetadata = (a0 == null ? value : a0.entity_metadata) ?? value;
object2.channelId = a0 == null ? value : a0.channel_id;
object2.creatorId = a0 == null ? value : a0.creator_id;
object2.image = a0 == null ? value : a0.image;
object2.scheduledEndTime = a0 == null ? value : a0.scheduled_end_time;
object2.recurrenceRule = recurrenceRuleFromServer(a0 == null ? value : a0.recurrence_rule);
object2.eventExceptions = ((a0 == null ? value : a0.guild_scheduled_event_exceptions) ?? []).map(function(a0) {
return {eventExceptionId: a0.event_exception_id, eventId: a0.event_id, guildId: a0.guild_id,
scheduledStartTime: a0.scheduled_start_time, scheduledEndTime: a0.scheduled_end_time,
isCanceled: a0.is_canceled};
});
if (isExistingGuildEvent(a0)) {
if ((a0 == null ? value : a0.entity_type) === GuildScheduledEventEntityTypes.EXTERNAL) {
value = require(9042) /* metro dependency 9042: EntityUtils */;
value = value.getLocationFromEvent(a0);
if (value != null) {
object2.entityMetadata = {location: value};
}
} else if (object2.channelId == null && a1 != null) {
object2.channelId = a1.id;
if (a1.isGuildStageVoice()) {
object2.entityType = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
} else if (a1.isGuildVoice()) {
object2.entityType = GuildScheduledEventEntityTypes.VOICE;
}
}
} else if (object2.channelId == null && a1 != null) {
object2.channelId = a1.id;
if (a1.isGuildStageVoice()) {
object2.entityType = GuildScheduledEventEntityTypes.STAGE_INSTANCE;
} else if (a1.isGuildVoice()) {
object2.entityType = GuildScheduledEventEntityTypes.VOICE;
}
}
return object2;
function _fun70343({eventExceptionId, eventId, guildId, scheduledStartTime, scheduledEndTime, isCanceled}) { // fn#70343, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9223:1037, offset: 0x01cf6b0f, size: 71 bytes, params: 2, frame: 3
return {event_exception_id: eventExceptionId, event_id: eventId, guild_id: guildId,
scheduled_start_time: scheduledStartTime, scheduled_end_time: scheduledEndTime, is_canceled: isCanceled};
}
global.__d(_fun70339, 9038, [1226, 1385, 9039, 9042,
2]) /* metro module 9038, dependencies: [1226, 1385, 9039, 9042, 2] */;
@@ -1,12 +1,12 @@
/* Metro module 9042; source: modules/guild_scheduled_events/utils/EntityUtils.tsx; dependencies: [1379, 1385, 2] */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as GuildScheduledEventsConstantsModule from '../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun70655(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9227:6, offset: 0x01d0283d, size: 190 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildScheduledEventsConstantsModule = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
const env0_1 = guildScheduledEventsConstantsModule.GuildScheduledEventEntityTypes;
const env0_2 = guildScheduledEventsConstantsModule.EntityChannelTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/utils/EntityUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/utils/EntityUtils.tsx');
exports.getChannelFromEvent = getChannelFromEvent;
exports.getLocationFromEvent = function(a0) {
return _getLocationFromEvent(a0.entity_type, a0.entity_metadata);
@@ -17,14 +17,15 @@ function _fun70655(global, require, importDefault, importAll, module, exports, d
exports.getChannelTypeFromEntity = function(a0) {
return a0 === GuildScheduledEventEntityTypes.VOICE ? EntityChannelTypes[a0] : a0 !== GuildScheduledEventEntityTypes.STAGE_INSTANCE ? undefined : EntityChannelTypes[a0];
};
function _getLocationFromEvent(a0, a1) { // fn#70656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9227:174, offset: 0x01d028fb, size: 55 bytes, params: 3, frame: 3
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
return a0 === EXTERNAL && a1 != null && 'location' in a1 ? a1.location : null;
}
function getChannelFromEvent(a0) { // fn#70657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9227:394, offset: 0x01d02932, size: 77 bytes, params: 2, frame: 13
return a0.entity_type in EntityChannelTypes && a0.channel_id != null && ChannelStore.getChannel(a0.channel_id) != null ? ChannelStore.getChannel(a0.channel_id) : undefined;
}
}
function _getLocationFromEvent(a0, a1) { // fn#70656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9227:174, offset: 0x01d028fb, size: 55 bytes, params: 3, frame: 3
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
return a0 === EXTERNAL && a1 != null && 'location' in a1 ? a1.location : null;
}
function getChannelFromEvent(a0) { // fn#70657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9227:394, offset: 0x01d02932, size: 77 bytes, params: 2, frame: 13
return a0.entity_type in EntityChannelTypes && a0.channel_id != null && ChannelStore.getChannel(a0.channel_id) != null ? ChannelStore.getChannel(a0.channel_id) : undefined;
}
global.__d(_fun70655, 9042, [1379, 1385, 2]) /* metro module 9042, dependencies: [1379, 1385, 2] */;
@@ -1,93 +1,95 @@
/* Metro module 9043; source: modules/guild_scheduled_events/utils/GuildEventRsvpUtils.tsx; dependencies: [1226, 4117, 1385, 1244, 9044, 9045, 9039, 2] */
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import GuildScheduledEventStore from '../GuildScheduledEventStore.tsx'; /* Metro dependency 4117 */
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 GuildScheduledEventsConstantsModule from '../GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
function _fun70661(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70661, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9228:6, offset: 0x01d029ed, size: 232 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const closure = function(a0, a1) {
return GuildScheduledEventStore.getRsvp(a0, a1, AuthenticationStore.getId());
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const guildScheduledEventStore = importDefault(4117) /* metro dependency 4117: GuildScheduledEventStore */;
const guildScheduledEventsConstantsModule = require(1385) /* metro dependency 1385: GuildScheduledEventsConstants */;
const env0_4 = guildScheduledEventsConstantsModule.GuildScheduledEventUserResponses;
const env0_5 = guildScheduledEventsConstantsModule.GuildScheduledEventStatusDone;
object2 = {SERIES: 0};
object2[0] = 'SERIES';
object2.RECURRENCE = 1;
object2[1] = 'RECURRENCE';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/utils/GuildEventRsvpUtils.tsx');
object = {SERIES: 0};
object[0] = 'SERIES';
object.RECURRENCE = 1;
object[1] = 'RECURRENCE';
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/utils/GuildEventRsvpUtils.tsx');
exports.getExistingRsvp = closure;
exports.ResponseOptions = object2;
exports.ResponseOptions = object;
exports.getResponseOptions = getResponseOptions;
exports.handleRsvp = handleRsvp;
}
function getResponseOptions() { // fn#70663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9228:522, offset: 0x01d02aff, size: 158 bytes, params: 1, frame: 17
const intl = (IndexNativeModule).intl;
const string = intl.string;
const t = (IndexNativeModule).t;
const {SERIES, RECURRENCE} = env0_6;
return [{name: Reflect.apply(string, intl, [t.uoorxi]), value: SERIES}, {name: intl.string(t.lwZCFT),
value: RECURRENCE}];
}
function getResponseOptions() { // fn#70663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9228:522, offset: 0x01d02aff, size: 158 bytes, params: 1, frame: 17
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const {SERIES, RECURRENCE} = env0_6;
return [{name: Reflect.apply(string, intl, [t.uoorxi]), value: SERIES}, {name: intl.string(t.lwZCFT),
value: RECURRENCE}];
}
function handleRsvp({eventId, recurrenceId, guildId, updateRsvp, openRsvpPicker, onRsvp}) { // fn#70664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9228:698, offset: 0x01d02b9d, size: 443 bytes, params: 2, frame: 29
var scheduled_start_time;
var r12;
var r9;
var value4;
var eventException;
var moduleValue2;
var startTime;
var moduleValue3;
var getRecurrenceStatus;
var Date;
var value6;
var date;
var getExistingRsvpBinding;
var id;
var existingRsvpBinding;
const guildScheduledEvent = GuildScheduledEventStore.getGuildScheduledEvent(eventId);
if (guildScheduledEvent != null) {
value4 = undefined;
eventException = (require(9044) /* metro dependency 9044: useEventException */).getEventException(recurrenceId,
eventId);
moduleValue2 = require(9045) /* metro dependency 9045: useEventSchedule */;
startTime = moduleValue2.getEventSchedule(guildScheduledEvent, recurrenceId).startTime;
scheduled_start_time = guildScheduledEvent == null ? value4 : guildScheduledEvent.scheduled_start_time;
if (scheduled_start_time != null) {
moduleValue3 = require(9039) /* metro dependency 9039: ScheduleUtils */;
getRecurrenceStatus = moduleValue3.getRecurrenceStatus;
Date = global.Date;
function handleRsvp({eventId, recurrenceId, guildId, updateRsvp, openRsvpPicker, onRsvp}) { // fn#70664, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9228:698, offset: 0x01d02b9d, size: 443 bytes, params: 2, frame: 29
var scheduled_start_time;
var r12;
var r9;
var value4;
var eventException;
var moduleValue2;
var startTime;
var moduleValue3;
var getRecurrenceStatus;
var Date;
var value6;
var date;
var getExistingRsvpBinding;
var id;
var existingRsvpBinding;
const guildScheduledEvent = GuildScheduledEventStore.getGuildScheduledEvent(eventId);
if (guildScheduledEvent != null) {
value4 = undefined;
eventException = (require(9044) /* metro dependency 9044: useEventException */).getEventException(recurrenceId,
eventId);
moduleValue2 = require(9045) /* metro dependency 9045: useEventSchedule */;
startTime = moduleValue2.getEventSchedule(guildScheduledEvent, recurrenceId).startTime;
scheduled_start_time = guildScheduledEvent == null ? value4 : guildScheduledEvent.scheduled_start_time;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r12 = Reflect.apply(getRecurrenceStatus, moduleValue3, [eventException, startTime,
date instanceof Object ? date : value6]);
} else {
r12 = null;
}
r9 = r12 == null ? recurrenceId ?? (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(guildScheduledEvent) : GuildScheduledEventStatusDone.has(r12) ? null : recurrenceId ?? (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(guildScheduledEvent);
getExistingRsvpBinding = getExistingRsvp;
id = guildScheduledEvent.id;
existingRsvpBinding = getExistingRsvpBinding(id);
id = guildScheduledEvent.id;
if (r9 == null) {
updateRsvp(eventId, null, guildId,
existingRsvpBinding != null ? GuildScheduledEventUserResponses.UNINTERESTED : GuildScheduledEventUserResponses.INTERESTED);
if (onRsvp != null) {
onRsvp();
if (scheduled_start_time != null) {
moduleValue3 = require(9039) /* metro dependency 9039: ScheduleUtils */;
getRecurrenceStatus = moduleValue3.getRecurrenceStatus;
Date = global.Date;
scheduled_start_time = guildScheduledEvent == null ? value4 : guildScheduledEvent.scheduled_start_time;
value6 = Object.create(Date.prototype, {constructor: {value: Date}});
date = new Date();
r12 = Reflect.apply(getRecurrenceStatus, moduleValue3, [eventException, startTime,
date instanceof Object ? date : value6]);
} else {
r12 = null;
}
} else if (getExistingRsvpBinding(id, r9) != null) {
updateRsvp(eventId, r9, guildId,
existingRsvpBinding != null ? GuildScheduledEventUserResponses.INTERESTED : GuildScheduledEventUserResponses.UNINTERESTED);
if (onRsvp != null) {
onRsvp();
r9 = r12 == null ? recurrenceId ?? (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(guildScheduledEvent) : GuildScheduledEventStatusDone.has(r12) ? null : recurrenceId ?? (require(9039) /* metro dependency 9039: ScheduleUtils */).getNextRecurrenceIdInEvent(guildScheduledEvent);
getExistingRsvpBinding = getExistingRsvp;
id = guildScheduledEvent.id;
existingRsvpBinding = getExistingRsvpBinding(id);
id = guildScheduledEvent.id;
if (r9 == null) {
updateRsvp(eventId, null, guildId,
existingRsvpBinding != null ? GuildScheduledEventUserResponses.UNINTERESTED : GuildScheduledEventUserResponses.INTERESTED);
if (onRsvp != null) {
onRsvp();
}
} else if (getExistingRsvpBinding(id, r9) != null) {
updateRsvp(eventId, r9, guildId,
existingRsvpBinding != null ? GuildScheduledEventUserResponses.INTERESTED : GuildScheduledEventUserResponses.UNINTERESTED);
if (onRsvp != null) {
onRsvp();
}
} else {
openRsvpPicker(guildScheduledEvent, r9);
}
} else {
openRsvpPicker(guildScheduledEvent, r9);
}
}
}
global.__d(_fun70661, 9043, [1226, 4117, 1385, 1244, 9044, 9045, 9039,
2]) /* metro module 9043, dependencies: [1226, 4117, 1385, 1244, 9044, 9045, 9039, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,8 +1,10 @@
/* Metro module 9051; source: modules/guild_scheduled_events/utils/ShareEventUtils.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun70749(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#70749, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9236:6, offset: 0x01d06730, size: 102 bytes, params: 8, frame: 16
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/utils/ShareEventUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/utils/ShareEventUtils.tsx');
exports.SHARE_EVENT_DETAILS_LINK = function({guildId, guildEventId}) {
return 'https://discord.com/events/' + guildId + '/' + guildEventId;
};
@@ -11,3 +13,4 @@ function _fun70749(global, require, importDefault, importAll, module, exports, d
};
}
global.__d(_fun70749, 9051, [2]) /* metro module 9051, dependencies: [2] */;
@@ -1,32 +1,35 @@
/* Metro module 9215; source: modules/guild_scheduled_events/utils/getGuildEventImage.tsx; dependencies: [661, 1457, 2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun72080(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72080, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9400:6, offset: 0x01d39258, 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 */).Endpoints;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/guild_scheduled_events/utils/getGuildEventImage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/utils/getGuildEventImage.tsx');
exports.default = getGuildEventImageURL;
function getGuildEventImageURL(a0, a1) { // fn#72081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9400:219, offset: 0x01d392cd, size: 298 bytes, params: 3, frame: 27
var r5;
var width;
let value = a1;
if (a0.image == null) {
return null;
}
if (value != null) {
r5 = value;
} else {
width = global.window.screen.width;
value = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
value = width * value.getDevicePixelRatio();
r5 = value;
}
const bestMediaProxySize = (require(1457) /* metro dependency 1457: ImageLoaderUtils */).getBestMediaProxySize(r5);
const GLOBAL_ENV = global.window.GLOBAL_ENV;
const CDN_HOST = GLOBAL_ENV.CDN_HOST;
return (CDN_HOST != null ? '' + 'https:' + '//' + CDN_HOST + '/guild-events/' + a0.id + '/' + a0.image : global.location.protocol + global.window.GLOBAL_ENV.API_ENDPOINT + Endpoints.GUILD_EVENT_IMAGE(a0.id,
a0.image, 'png')) + ('?size=' + bestMediaProxySize);
}
}
function getGuildEventImageURL(a0, a1) { // fn#72081, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9400:219, offset: 0x01d392cd, size: 298 bytes, params: 3, frame: 27
var r5;
var width;
let value = a1;
if (a0.image == null) {
return null;
}
if (value != null) {
r5 = value;
} else {
width = global.window.screen.width;
value = require(1457) /* metro dependency 1457: ImageLoaderUtils */;
value = width * value.getDevicePixelRatio();
r5 = value;
}
const bestMediaProxySize = (require(1457) /* metro dependency 1457: ImageLoaderUtils */).getBestMediaProxySize(r5);
const GLOBAL_ENV = global.window.GLOBAL_ENV;
const CDN_HOST = GLOBAL_ENV.CDN_HOST;
return (CDN_HOST != null ? '' + 'https:' + '//' + CDN_HOST + '/guild-events/' + a0.id + '/' + a0.image : global.location.protocol + global.window.GLOBAL_ENV.API_ENDPOINT + Endpoints.GUILD_EVENT_IMAGE(a0.id,
a0.image, 'png')) + ('?size=' + bestMediaProxySize);
}
global.__d(_fun72080, 9215, [661, 1457, 2]) /* metro module 9215, dependencies: [661, 1457, 2] */;