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,224 +1,236 @@
/* Metro module 12001; source: modules/contact_sync/native/ContactSyncActionCreators.tsx; dependencies: [5, 5040, 661, 3829, 1391, 683, 11997, 5042, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ConnectedAccountsStore from '../../../stores/ConnectedAccountsStore.tsx'; /* Metro dependency 5040 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
function _fun92200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:6, offset: 0x0207f81d, size: 219 bytes, params: 8, frame: 19
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_5 = constantsModule.AnalyticEvents;
const env0_6 = constantsModule.FriendDiscoveryFlags;
const env0_7 = constantsModule.PlatformTypes;
object2 = {updateName: _fun92205(), updateDiscoverability: _fun92201(), updateContactSyncEnabled: _fun92209()};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/ContactSyncActionCreators.tsx');
exports.default = object2;
}
function _fun92201() { // fn#92201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:190, offset: 0x0207f8f8, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun92203);
return _fun92204;
}
function _fun92205() { // fn#92205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:848, offset: 0x0207fb14, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun92207);
return _fun92208;
}
function _fun92209() { // fn#92209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:1090, offset: 0x0207fc03, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun92211);
return _fun92212;
}
function* _fun92203({phone, email}) { // fn#92203, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:210, offset: 0x0207f927, size: 493 bytes, params: 2, frame: 25
var r13;
var r4;
var r10;
var r8;
var value6;
var value8;
var value13;
var value14;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var FriendDiscoverySettings = binding(env2_2[3]).FriendDiscoverySettings;
var setting = FriendDiscoverySettings.getSetting();
binding = env2_4;
var getLocalAccount = binding.getLocalAccount;
var CONTACTS = env2_7.CONTACTS;
var name = Reflect.apply(getLocalAccount, binding, [CONTACTS])?.name;
if (phone == null) {
r13 = setting;
} else {
value6 = env2_0(env2_2[4]);
r13 = value6.setFlag(setting, env2_6.FIND_BY_PHONE, phone);
}
if (email == null) {
r4 = r13;
} else {
value8 = env2_0(env2_2[4]);
r4 = value8.setFlag(r13, env2_6.FIND_BY_EMAIL, email);
}
FriendDiscoverySettings = env2_0(env2_2[3]).FriendDiscoverySettings;
yield FriendDiscoverySettings.updateSetting(r4);
if (false) {
return undefined;
}
var value12 = env2_1(env2_2[5]);
var track = value12.track;
var USER_DISCOVERY_UPDATED = env2_5.USER_DISCOVERY_UPDATED;
var object2 = {has_name: typeof name === 'string'};
if (phone != null) {
r10 = phone;
} else {
value13 = env2_0(env2_2[4]);
r10 = value13.hasFlag(setting, env2_6.FIND_BY_PHONE);
}
object2.discoverable_phone = r10;
if (email != null) {
r8 = email;
} else {
value14 = env2_0(env2_2[4]);
r8 = value14.hasFlag(setting, env2_6.FIND_BY_EMAIL);
}
object2.discoverable_email = r8;
var value15 = env2_0(env2_2[6]);
var isContactSyncEnabled = value15.isContactSyncEnabled;
binding = env2_4;
getLocalAccount = binding.getLocalAccount;
CONTACTS = env2_7.CONTACTS;
object2.contact_sync_enabled = Reflect.apply(isContactSyncEnabled, value15, [Reflect.apply(getLocalAccount,
binding,
[CONTACTS])]);
Reflect.apply(track, value12, [USER_DISCOVERY_UPDATED, object2]);
}
}
function* _fun92207(a0) { // fn#92207, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:868, offset: 0x0207fb43, size: 192 bytes, params: 2, frame: 22
if (true) {
value = environment.__proto__.__proto__;
var value3 = env2_1(env2_2[7]);
var update = value3.update;
var CONTACTS = env2_7.CONTACTS;
yield Reflect.apply(update, value3, [CONTACTS, '@me', {name: a0}]);
if (false) {
return undefined;
}
var value6 = env2_1(env2_2[5]);
var track = value6.track;
var NAME_SUBMITTED = env2_5.NAME_SUBMITTED;
Reflect.apply(track, value6, [NAME_SUBMITTED, {num_words: a0 != null ? a0.split(' ').length : 1,
num_chars: a0 != null ? a0.length : 0}]);
}
}
function* _fun92211({enabled, name}, a1) { // fn#92211, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:1110, offset: 0x0207fc32, size: 653 bytes, params: 3, frame: 26
var length;
var value8;
var object2;
var value11;
var track;
var NAME_SUBMITTED;
var value14;
var connect;
var value17;
var binding2;
var setting;
var value21;
var hasFlag;
var binding3;
var hasFlag2;
var hasFlag3;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_4;
var getLocalAccount = binding.getLocalAccount;
var CONTACTS = env2_7.CONTACTS;
var id = Reflect.apply(getLocalAccount, binding, [CONTACTS])?.id;
if (id == null) {
binding = env2_1;
value14 = binding(env2_2[7]);
connect = value14.connect;
CONTACTS = env2_7.CONTACTS;
object2 = {friend_sync: enabled};
yield Reflect.apply(connect, value14, [CONTACTS, '@me', name, a1, object2]);
if (false) {
return undefined;
object = {updateName: _fun92205(), updateDiscoverability: _fun92201(), updateContactSyncEnabled: _fun92209()};
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/ContactSyncActionCreators.tsx');
exports.default = object;
function _fun92201() { // fn#92201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:190, offset: 0x0207f8f8, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun92203);
return _fun92204;
function* _fun92203({phone, email}) { // fn#92203, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:210, offset: 0x0207f927, size: 493 bytes, params: 2, frame: 25
var r13;
var r4;
var r10;
var r8;
var value6;
var value8;
var value13;
var value14;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_0;
var FriendDiscoverySettings = binding(env2_2[3]).FriendDiscoverySettings;
var setting = FriendDiscoverySettings.getSetting();
binding = env2_4;
var getLocalAccount = binding.getLocalAccount;
var CONTACTS = env2_7.CONTACTS;
var name = Reflect.apply(getLocalAccount, binding, [CONTACTS])?.name;
if (phone == null) {
r13 = setting;
} else {
value6 = env2_0(env2_2[4]);
r13 = value6.setFlag(setting, env2_6.FIND_BY_PHONE, phone);
}
if (email == null) {
r4 = r13;
} else {
value8 = env2_0(env2_2[4]);
r4 = value8.setFlag(r13, env2_6.FIND_BY_EMAIL, email);
}
FriendDiscoverySettings = env2_0(env2_2[3]).FriendDiscoverySettings;
yield FriendDiscoverySettings.updateSetting(r4);
if (false) {
return undefined;
}
var value12 = env2_1(env2_2[5]);
var track = value12.track;
var USER_DISCOVERY_UPDATED = env2_5.USER_DISCOVERY_UPDATED;
var object = {has_name: typeof name === 'string'};
if (phone != null) {
r10 = phone;
} else {
value13 = env2_0(env2_2[4]);
r10 = value13.hasFlag(setting, env2_6.FIND_BY_PHONE);
}
object.discoverable_phone = r10;
if (email != null) {
r8 = email;
} else {
value14 = env2_0(env2_2[4]);
r8 = value14.hasFlag(setting, env2_6.FIND_BY_EMAIL);
}
object.discoverable_email = r8;
var value15 = env2_0(env2_2[6]);
var isContactSyncEnabled = value15.isContactSyncEnabled;
binding = env2_4;
getLocalAccount = binding.getLocalAccount;
CONTACTS = env2_7.CONTACTS;
object.contact_sync_enabled = Reflect.apply(isContactSyncEnabled, value15, [Reflect.apply(getLocalAccount,
binding,
[CONTACTS])]);
Reflect.apply(track, value12, [USER_DISCOVERY_UPDATED, object]);
}
if (name !== undefined) {
value17 = env2_1(env2_2[5]);
track = value17.track;
NAME_SUBMITTED = env2_5.NAME_SUBMITTED;
object2 = {};
length = name != null ? name.split(' ').length : 1;
object2.num_words = length;
length = name != null ? name.length : 0;
object2.num_chars = length;
Reflect.apply(track, value17, [NAME_SUBMITTED, object2]);
}
binding = env2_0;
binding2 = env2_2;
setting = binding(binding2[3]).FriendDiscoverySettings.getSetting();
value21 = binding(binding2[4]);
hasFlag = value21.hasFlag;
binding3 = env2_6;
hasFlag2 = Reflect.apply(hasFlag, value21, [setting, binding3.FIND_BY_PHONE]);
hasFlag3 = binding(binding2[4]).hasFlag(setting, binding3.FIND_BY_EMAIL);
binding = env2_1;
binding(binding2[5]).track(env2_5.CONTACT_SYNC_TOGGLED, {is_enabled: enabled,
am_discoverable_phone: hasFlag2,
am_discoverable_email: hasFlag3});
return undefined;
}
if (name !== undefined) {
binding = env2_1;
value8 = binding(env2_2[7]);
yield value8.update(env2_7.CONTACTS, id, {friend_sync: enabled, name: name});
if (false) {
return undefined;
}
binding = env2_1;
value11 = binding(env2_2[5]);
track = value11.track;
NAME_SUBMITTED = env2_5.NAME_SUBMITTED;
object2 = {};
length = name != null ? name.split(' ').length : 1;
object2.num_words = length;
length = name != null ? name.length : 0;
object2.num_chars = length;
Reflect.apply(track, value11, [NAME_SUBMITTED, object2]);
binding = env2_0;
binding2 = env2_2;
setting = binding(binding2[3]).FriendDiscoverySettings.getSetting();
value21 = binding(binding2[4]);
hasFlag = value21.hasFlag;
binding3 = env2_6;
hasFlag2 = Reflect.apply(hasFlag, value21, [setting, binding3.FIND_BY_PHONE]);
hasFlag3 = binding(binding2[4]).hasFlag(setting, binding3.FIND_BY_EMAIL);
binding = env2_1;
binding(binding2[5]).track(env2_5.CONTACT_SYNC_TOGGLED, {is_enabled: enabled,
am_discoverable_phone: hasFlag2,
am_discoverable_email: hasFlag3});
return undefined;
function _fun92204() { // fn#92204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:800, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
var value5 = env2_1(env2_2[7]);
var setFriendSync = value5.setFriendSync;
CONTACTS = env2_7.CONTACTS;
yield Reflect.apply(setFriendSync, value5, [CONTACTS, id, enabled]);
if (false) {
return undefined;
}
binding = env2_0;
binding2 = env2_2;
setting = binding(binding2[3]).FriendDiscoverySettings.getSetting();
value21 = binding(binding2[4]);
hasFlag = value21.hasFlag;
binding3 = env2_6;
hasFlag2 = Reflect.apply(hasFlag, value21, [setting, binding3.FIND_BY_PHONE]);
hasFlag3 = binding(binding2[4]).hasFlag(setting, binding3.FIND_BY_EMAIL);
env2_1(binding2[5]).track(env2_5.CONTACT_SYNC_TOGGLED, {is_enabled: enabled, am_discoverable_phone: hasFlag2,
am_discoverable_email: hasFlag3});
}
function _fun92205() { // fn#92205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:848, offset: 0x0207fb14, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun92207);
return _fun92208;
function* _fun92207(a0) { // fn#92207, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:868, offset: 0x0207fb43, size: 192 bytes, params: 2, frame: 22
if (true) {
value = environment.__proto__.__proto__;
var value3 = env2_1(env2_2[7]);
var update = value3.update;
var CONTACTS = env2_7.CONTACTS;
yield Reflect.apply(update, value3, [CONTACTS, '@me', {name: a0}]);
if (false) {
return undefined;
}
var value6 = env2_1(env2_2[5]);
var track = value6.track;
var NAME_SUBMITTED = env2_5.NAME_SUBMITTED;
Reflect.apply(track, value6, [NAME_SUBMITTED, {num_words: a0 != null ? a0.split(' ').length : 1,
num_chars: a0 != null ? a0.length : 0}]);
}
}
function _fun92208() { // fn#92208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:1042, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function _fun92209() { // fn#92209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:1090, offset: 0x0207fc03, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun92211);
return _fun92212;
function* _fun92211({enabled, name}, a1) { // fn#92211, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:1110, offset: 0x0207fc32, size: 653 bytes, params: 3, frame: 26
var length;
var value8;
var object;
var value11;
var track;
var NAME_SUBMITTED;
var value14;
var connect;
var value17;
var binding2;
var setting;
var value21;
var hasFlag;
var binding3;
var hasFlag2;
var hasFlag3;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_4;
var getLocalAccount = binding.getLocalAccount;
var CONTACTS = env2_7.CONTACTS;
var id = Reflect.apply(getLocalAccount, binding, [CONTACTS])?.id;
if (id == null) {
binding = env2_1;
value14 = binding(env2_2[7]);
connect = value14.connect;
CONTACTS = env2_7.CONTACTS;
object = {friend_sync: enabled};
yield Reflect.apply(connect, value14, [CONTACTS, '@me', name, a1, object]);
if (false) {
return undefined;
}
if (name !== undefined) {
value17 = env2_1(env2_2[5]);
track = value17.track;
NAME_SUBMITTED = env2_5.NAME_SUBMITTED;
object = {};
length = name != null ? name.split(' ').length : 1;
object.num_words = length;
length = name != null ? name.length : 0;
object.num_chars = length;
Reflect.apply(track, value17, [NAME_SUBMITTED, object]);
}
binding = env2_0;
binding2 = env2_2;
setting = binding(binding2[3]).FriendDiscoverySettings.getSetting();
value21 = binding(binding2[4]);
hasFlag = value21.hasFlag;
binding3 = env2_6;
hasFlag2 = Reflect.apply(hasFlag, value21, [setting, binding3.FIND_BY_PHONE]);
hasFlag3 = binding(binding2[4]).hasFlag(setting, binding3.FIND_BY_EMAIL);
binding = env2_1;
binding(binding2[5]).track(env2_5.CONTACT_SYNC_TOGGLED, {is_enabled: enabled,
am_discoverable_phone: hasFlag2,
am_discoverable_email: hasFlag3});
return undefined;
}
if (name !== undefined) {
binding = env2_1;
value8 = binding(env2_2[7]);
yield value8.update(env2_7.CONTACTS, id, {friend_sync: enabled, name: name});
if (false) {
return undefined;
}
binding = env2_1;
value11 = binding(env2_2[5]);
track = value11.track;
NAME_SUBMITTED = env2_5.NAME_SUBMITTED;
object = {};
length = name != null ? name.split(' ').length : 1;
object.num_words = length;
length = name != null ? name.length : 0;
object.num_chars = length;
Reflect.apply(track, value11, [NAME_SUBMITTED, object]);
binding = env2_0;
binding2 = env2_2;
setting = binding(binding2[3]).FriendDiscoverySettings.getSetting();
value21 = binding(binding2[4]);
hasFlag = value21.hasFlag;
binding3 = env2_6;
hasFlag2 = Reflect.apply(hasFlag, value21, [setting, binding3.FIND_BY_PHONE]);
hasFlag3 = binding(binding2[4]).hasFlag(setting, binding3.FIND_BY_EMAIL);
binding = env2_1;
binding(binding2[5]).track(env2_5.CONTACT_SYNC_TOGGLED, {is_enabled: enabled,
am_discoverable_phone: hasFlag2,
am_discoverable_email: hasFlag3});
return undefined;
}
var value5 = env2_1(env2_2[7]);
var setFriendSync = value5.setFriendSync;
CONTACTS = env2_7.CONTACTS;
yield Reflect.apply(setFriendSync, value5, [CONTACTS, id, enabled]);
if (false) {
return undefined;
}
binding = env2_0;
binding2 = env2_2;
setting = binding(binding2[3]).FriendDiscoverySettings.getSetting();
value21 = binding(binding2[4]);
hasFlag = value21.hasFlag;
binding3 = env2_6;
hasFlag2 = Reflect.apply(hasFlag, value21, [setting, binding3.FIND_BY_PHONE]);
hasFlag3 = binding(binding2[4]).hasFlag(setting, binding3.FIND_BY_EMAIL);
env2_1(binding2[5]).track(env2_5.CONTACT_SYNC_TOGGLED, {is_enabled: enabled, am_discoverable_phone: hasFlag2,
am_discoverable_email: hasFlag3});
}
}
function _fun92212() { // fn#92212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12187:1845, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
global.__d(_fun92200, 12001, [5, 5040, 661, 3829, 1391, 683, 11997, 5042,
2]) /* metro module 12001, dependencies: [5, 5040, 661, 3829, 1391, 683, 11997, 5042, 2] */;
@@ -1,13 +1,17 @@
/* Metro module 11999; source: modules/contact_sync/native/ContactSyncAnalyticsUtils.tsx; dependencies: [1878, 11994, 11995, 661, 11997, 683, 12000, 2] */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ContactSyncModalStoreModule from './ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
import * as ContactSyncConstantsModule from './ContactSyncConstants.tsx'; /* Metro dependency 11995 */
import * as ContactSyncUtilsModule from './ContactSyncUtils.tsx'; /* Metro dependency 11997 */
function _fun92193(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12185:6, offset: 0x0207f245, size: 366 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_4 = (require(11994) /* metro dependency 11994: ContactSyncModalStore */).getIsOnboarding;
const env0_5 = (require(11995) /* metro dependency 11995: ContactSyncConstants */).ContactPermissions;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/ContactSyncAnalyticsUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/ContactSyncAnalyticsUtils.tsx');
exports.Steps = {INITIALIZED: 'Flow Initialized', LANDING: 'Landing',
PERMISSION_REQUESTED: 'Contacts Permission Requested', NAME_INPUT: 'Name Input',
SUGGESTIONS_RESULTS: 'Suggestions Results', CONTACT_INVITES: 'Contact Invites',
@@ -17,92 +21,94 @@ function _fun92193(global, require, importDefault, importAll, module, exports, d
exports.trackFlowStart = trackFlowStart;
exports.trackFlowStep = trackFlowStep;
exports.trackFlowEnd = trackFlowEnd;
}
function trackFlowStart(a0) { // fn#92194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12185:756, offset: 0x0207f3b3, size: 136 bytes, params: 2, frame: 15
const env0_0 = a0;
env0_8 = env0_7.LANDING;
const Date = global.Date;
env0_9 = Date.now();
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const result = (currentUser == null ? value3 : currentUser.phone) != null;
let value = ContactSyncUtilsModule;
value = value.checkContactPermissions();
value.then(_fun92195);
return value3;
function _fun92195(a0) { // fn#92195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12185:912, offset: 0x0207f43b, size: 218 bytes, params: 2, frame: 19
const NOT_DETERMINED = ContactPermissions.NOT_DETERMINED;
const r6 = a0 === NOT_DETERMINED ? null : a0 !== ContactPermissions.AUTHORIZED ? 'denied' : 'accepted';
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CONTACT_SYNC_FLOW_KEY = AnalyticEvents.CONTACT_SYNC_FLOW_KEY;
const object = {};
copyDataProperties(object, env0_0, undefined);
object['flow_type'] = 'Contact Sync';
const binding = env1_7;
const INITIALIZED = binding.INITIALIZED;
object['from_step'] = INITIALIZED;
const LANDING = binding.LANDING;
object['to_step'] = LANDING;
object['skip'] = false;
object['back'] = false;
object['seconds_on_from_step'] = 0;
object['has_phone_number'] = result;
object['mobile_contacts_permission'] = r6;
Reflect.apply(track, defaultImport, [CONTACT_SYNC_FLOW_KEY, object]);
}
function trackFlowStart(a0) { // fn#92194, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12185:756, offset: 0x0207f3b3, size: 136 bytes, params: 2, frame: 15
const env0_0 = a0;
env0_8 = env0_7.LANDING;
const Date = global.Date;
env0_9 = Date.now();
const currentUser = UserStore.getCurrentUser();
const value3 = undefined;
const result = (currentUser == null ? value3 : currentUser.phone) != null;
let value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
value = value.checkContactPermissions();
value.then(_fun92195);
return value3;
}
function trackFlowStep(a0, a1, a2, a3) { // fn#92196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12185:1205, offset: 0x0207f515, size: 273 bytes, params: 5, frame: 25
var moduleValue;
const getIsOnboardingBinding = getIsOnboarding;
const value2 = undefined;
const isOnboardingBinding = getIsOnboardingBinding();
const Date = global.Date;
const value5 = (Date.now() - env0_9) / 1000;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTACT_SYNC_FLOW_KEY = AnalyticEvents.CONTACT_SYNC_FLOW_KEY;
const object2 = {};
copyDataProperties(object2, a3, undefined);
object2['location'] = isOnboardingBinding ? 'Onboarding' : a3 == null ? value2 : a3.location;
object2['flow_type'] = 'Contact Sync';
object2['from_step'] = env0_8;
object2['to_step'] = a0;
object2['skip'] = a1;
object2['back'] = a2;
object2['seconds_on_from_step'] = value5;
Reflect.apply(track, defaultImport, [CONTACT_SYNC_FLOW_KEY, object2]);
if (isOnboardingBinding) {
moduleValue = require(12000) /* metro dependency 12000: NewUserAnalyticsUtils */;
moduleValue.trackNUFStep(env0_8, a0, {skip: a1});
}
env0_8 = a0;
return value2;
}
function trackFlowEnd(a0, a1) { // fn#92197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12185:1503, offset: 0x0207f626, size: 230 bytes, params: 3, frame: 20
const getIsOnboardingBinding = getIsOnboarding;
const value2 = undefined;
const isOnboardingBinding = getIsOnboardingBinding();
const Date = global.Date;
const value4 = Date.now();
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTACT_SYNC_FLOW_KEY = AnalyticEvents.CONTACT_SYNC_FLOW_KEY;
const object2 = {};
copyDataProperties(object2, a1, undefined);
object2['location'] = isOnboardingBinding ? 'Onboarding' : a1 == null ? value2 : a1.location;
object2['flow_type'] = 'Contact Sync';
object2['from_step'] = env0_8;
const COMPLETE = env0_7.COMPLETE;
object2['to_step'] = COMPLETE;
object2['skip'] = a0;
object2['back'] = false;
object2['seconds_on_from_step'] = (value4 - env0_9) / 1000;
Reflect.apply(track, defaultImport, [CONTACT_SYNC_FLOW_KEY, object2]);
return value2;
}
function trackFlowStep(a0, a1, a2, a3) { // fn#92196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12185:1205, offset: 0x0207f515, size: 273 bytes, params: 5, frame: 25
var moduleValue;
const getIsOnboardingBinding = getIsOnboarding;
const value2 = undefined;
const isOnboardingBinding = getIsOnboardingBinding();
const Date = global.Date;
const value5 = (Date.now() - env0_9) / 1000;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CONTACT_SYNC_FLOW_KEY = AnalyticEvents.CONTACT_SYNC_FLOW_KEY;
const object = {};
copyDataProperties(object, a3, undefined);
object['location'] = isOnboardingBinding ? 'Onboarding' : a3 == null ? value2 : a3.location;
object['flow_type'] = 'Contact Sync';
object['from_step'] = env0_8;
object['to_step'] = a0;
object['skip'] = a1;
object['back'] = a2;
object['seconds_on_from_step'] = value5;
Reflect.apply(track, defaultImport, [CONTACT_SYNC_FLOW_KEY, object]);
if (isOnboardingBinding) {
moduleValue = require(12000) /* metro dependency 12000: NewUserAnalyticsUtils */;
moduleValue.trackNUFStep(env0_8, a0, {skip: a1});
}
env0_8 = a0;
return value2;
}
function trackFlowEnd(a0, a1) { // fn#92197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12185:1503, offset: 0x0207f626, size: 230 bytes, params: 3, frame: 20
const getIsOnboardingBinding = getIsOnboarding;
const value2 = undefined;
const isOnboardingBinding = getIsOnboardingBinding();
const Date = global.Date;
const value4 = Date.now();
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const CONTACT_SYNC_FLOW_KEY = AnalyticEvents.CONTACT_SYNC_FLOW_KEY;
const object = {};
copyDataProperties(object, a1, undefined);
object['location'] = isOnboardingBinding ? 'Onboarding' : a1 == null ? value2 : a1.location;
object['flow_type'] = 'Contact Sync';
object['from_step'] = env0_8;
const COMPLETE = env0_7.COMPLETE;
object['to_step'] = COMPLETE;
object['skip'] = a0;
object['back'] = false;
object['seconds_on_from_step'] = (value4 - env0_9) / 1000;
Reflect.apply(track, defaultImport, [CONTACT_SYNC_FLOW_KEY, object]);
return value2;
}
function _fun92195(a0) { // fn#92195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12185:912, offset: 0x0207f43b, size: 218 bytes, params: 2, frame: 19
const NOT_DETERMINED = ContactPermissions.NOT_DETERMINED;
const r6 = a0 === NOT_DETERMINED ? null : a0 !== ContactPermissions.AUTHORIZED ? 'denied' : 'accepted';
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const CONTACT_SYNC_FLOW_KEY = AnalyticEvents.CONTACT_SYNC_FLOW_KEY;
const object2 = {};
copyDataProperties(object2, env0_0, undefined);
object2['flow_type'] = 'Contact Sync';
const binding = env1_7;
const INITIALIZED = binding.INITIALIZED;
object2['from_step'] = INITIALIZED;
const LANDING = binding.LANDING;
object2['to_step'] = LANDING;
object2['skip'] = false;
object2['back'] = false;
object2['seconds_on_from_step'] = 0;
object2['has_phone_number'] = result;
object2['mobile_contacts_permission'] = r6;
Reflect.apply(track, defaultImport, [CONTACT_SYNC_FLOW_KEY, object2]);
}
global.__d(_fun92193, 11999, [1878, 11994, 11995, 661, 11997, 683, 12000,
2]) /* metro module 11999, dependencies: [1878, 11994, 11995, 661, 11997, 683, 12000, 2] */;
@@ -1,28 +1,30 @@
/* Metro module 11995; source: modules/contact_sync/native/ContactSyncConstants.tsx; dependencies: [2] */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
function _fun92126(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12181:6, offset: 0x0207db30, size: 296 bytes, params: 8, frame: 19
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {DEFAULT: 0};
object2[0] = 'DEFAULT';
object2.UPSELL_ACTION_SHEET = 1;
object2[1] = 'UPSELL_ACTION_SHEET';
const object5 = {NOT_DETERMINED: -1};
object5[-1] = 'NOT_DETERMINED';
object5.UNAUTHORIZED = 0;
object5[0] = 'UNAUTHORIZED';
object5.AUTHORIZED = 1;
object5[1] = 'AUTHORIZED';
const object6 = {MUTUAL_CONTACT_INFO_ONLY: 1};
object6[1] = 'MUTUAL_CONTACT_INFO_ONLY';
object6.ANYONE_WITH_CONTACT_INFO = 2;
object6[2] = 'ANYONE_WITH_CONTACT_INFO';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/ContactSyncConstants.tsx');
exports.ContactSyncLandingPage = object2;
object = {DEFAULT: 0};
object[0] = 'DEFAULT';
object.UPSELL_ACTION_SHEET = 1;
object[1] = 'UPSELL_ACTION_SHEET';
const object3 = {NOT_DETERMINED: -1};
object3[-1] = 'NOT_DETERMINED';
object3.UNAUTHORIZED = 0;
object3[0] = 'UNAUTHORIZED';
object3.AUTHORIZED = 1;
object3[1] = 'AUTHORIZED';
const object4 = {MUTUAL_CONTACT_INFO_ONLY: 1};
object4[1] = 'MUTUAL_CONTACT_INFO_ONLY';
object4.ANYONE_WITH_CONTACT_INFO = 2;
object4[2] = 'ANYONE_WITH_CONTACT_INFO';
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/ContactSyncConstants.tsx');
exports.ContactSyncLandingPage = object;
exports.ContactSyncScenes = {WELCOME: 'WELCOME', NAME_INPUT: 'NAME_INPUT', SUGGESTIONS: 'SUGGESTIONS',
ADD_PHONE: 'ADD_PHONE', VERIFY_PHONE: 'VERIFY_PHONE', VERIFY_PASSWORD: 'VERIFY_PASSWORD'};
exports.ContactPermissions = object5;
exports.ContactSyncSuggestionsSetting = object6;
exports.ContactPermissions = object3;
exports.ContactSyncSuggestionsSetting = object4;
exports.CONTACT_SYNC_MODAL_KEY = 'contact-sync';
}
global.__d(_fun92126, 11995, [2]) /* metro module 11995, dependencies: [2] */;
@@ -1,431 +1,446 @@
/* Metro module 11998; source: modules/contact_sync/native/ContactSyncManager.tsx; dependencies: [7, 6, 15, 17, 18, 5, 5040, 1878, 11996, 11995, 661, 587, 11997, 5459, 4860, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
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 UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ConnectedAccountsStore from '../../../stores/ConnectedAccountsStore.tsx'; /* Metro dependency 5040 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ContactSyncConstantsModule from './ContactSyncConstants.tsx'; /* Metro dependency 11995 */
import * as ContactSyncPersistedStoreModule from './ContactSyncPersistedStore.tsx'; /* Metro dependency 11996 */
function _fun92178(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:6, offset: 0x0207ece0, size: 402 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(7) /* metro dependency 7 */;
const env0_3 = importDefault(6) /* metro dependency 6 */;
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 env0_7 = importDefault(5) /* metro dependency 5 */;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(11996) /* metro dependency 11996: ContactSyncPersistedStore */;
let value = ContactSyncPersistedStoreModule;
const env0_10 = value.setStoredContacts;
const env0_11 = value.deleteStoredContacts;
const env0_12 = value.useContactSyncStore;
const env0_13 = (require(11995) /* metro dependency 11995: ContactSyncConstants */).ContactPermissions;
const env0_14 = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
const env0_15 = _fun92182();
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun92186(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/ContactSyncManager.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/ContactSyncManager.tsx');
exports.default = value;
exports.LAST_USER_CONTACTS_REQUEST_TIMESTAMP_KEY = 'LAST_USER_CONTACTS_REQUEST_TIMESTAMP_KEY';
exports.removeLastUserContactsUpload = function() {
var Storage = require(dependencyMap[11]).Storage;
Storage.remove('LAST_USER_CONTACTS_REQUEST_TIMESTAMP_KEY');
};
}
function _isNativeReflectConstruct_92179() { // fn#92179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:313, offset: 0x0207ee72, 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_92179() { // fn#92179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:313, offset: 0x0207ee72, 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_92179_isNativeReflectConstruct = function() {
return !!result;
})();
}
return (_isNativeReflectConstruct_92179_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun92182() { // fn#92182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:561, offset: 0x0207eed4, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_7(_fun92184);
return _fun92185;
}
function _fun92186(a0) { // fn#92186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:984, offset: 0x0207f06e, size: 42 bytes, params: 2, frame: 14
const closure = ContactSyncLifecycleManager;
env0_6(closure, a0);
return env0_2(closure);
}
function* _fun92184() { // fn#92184, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:581, offset: 0x0207ef03, size: 363 bytes, params: 1, frame: 23
var phone;
var value7;
var value8;
var getCurrentUser;
var value9;
var value10;
var value11;
var binding2;
var property;
var value12;
var getContacts;
var getState;
var value13;
var storedContacts;
var value14;
var value15;
var value16;
var names;
var payload;
var value17;
var binding3;
var value18;
var uploadContacts;
var value19;
var value20;
var value21;
var binding4;
var value22;
var set;
var error;
if (false) {
return undefined;
}
value = undefined;
let binding = env2_0;
let Storage = binding(env2_1[11]).Storage;
const value4 = 0;
const r11 = Storage.get('LAST_USER_CONTACTS_REQUEST_TIMESTAMP_KEY', value4) ?? value4;
const Date = global.Date;
const value6 = Date.now();
reducibleJoin5: while (true) {
reduciblePort58: while (true) {
exceptionLanding57: while (true) {
try {
value7 = r11 + 86400000;
} catch (error) {
break exceptionLanding57;
}
break reducibleJoin5;
function _fun92182() { // fn#92182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:561, offset: 0x0207eed4, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun92184);
return _fun92185;
function* _fun92184() { // fn#92184, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:581, offset: 0x0207ef03, size: 363 bytes, params: 1, frame: 23
var phone;
var value7;
var value8;
var getCurrentUser;
var value9;
var value10;
var value11;
var binding2;
var property;
var value12;
var getContacts;
var getState;
var value13;
var storedContacts;
var value14;
var value15;
var value16;
var names;
var payload;
var value17;
var binding3;
var value18;
var uploadContacts;
var value19;
var value20;
var value21;
var binding4;
var value22;
var set;
var error;
if (false) {
return undefined;
}
env2_11();
break reduciblePort58;
}
return value;
}
try {
value8 = value7 <= value6;
} catch (error) {
break exceptionLanding57;
}
if (value8) {
try {
binding = env2_9;
} catch (error) {
break exceptionLanding57;
}
try {
getCurrentUser = binding.getCurrentUser;
} catch (error) {
break exceptionLanding57;
}
try {
value9 = Reflect.apply(getCurrentUser, binding, []);
} catch (error) {
break exceptionLanding57;
}
try {
value10 = value9 == null;
} catch (error) {
break exceptionLanding57;
}
reducibleJoin14: while (true) {
if (value10) {
phone = value;
break reducibleJoin14;
value = undefined;
let binding = env2_0;
let Storage = binding(env2_1[11]).Storage;
const value4 = 0;
const r11 = Storage.get('LAST_USER_CONTACTS_REQUEST_TIMESTAMP_KEY', value4) ?? value4;
const Date = global.Date;
const value6 = Date.now();
reducibleJoin5: while (true) {
reduciblePort58: while (true) {
exceptionLanding57: while (true) {
try {
value7 = r11 + 86400000;
} catch (error) {
break exceptionLanding57;
}
break reducibleJoin5;
}
env2_11();
break reduciblePort58;
}
return value;
}
try {
phone = value9.phone;
value8 = value7 <= value6;
} catch (error) {
break exceptionLanding57;
}
break reducibleJoin14;
}
try {
value11 = phone == null;
} catch (error) {
break exceptionLanding57;
}
if (value11) {
if (value8) {
try {
binding = env2_9;
} catch (error) {
break exceptionLanding57;
}
try {
getCurrentUser = binding.getCurrentUser;
} catch (error) {
break exceptionLanding57;
}
try {
value9 = Reflect.apply(getCurrentUser, binding, []);
} catch (error) {
break exceptionLanding57;
}
try {
value10 = value9 == null;
} catch (error) {
break exceptionLanding57;
}
reducibleJoin14: while (true) {
if (value10) {
phone = value;
break reducibleJoin14;
}
try {
phone = value9.phone;
} catch (error) {
break exceptionLanding57;
}
break reducibleJoin14;
}
try {
value11 = phone == null;
} catch (error) {
break exceptionLanding57;
}
if (value11) {
return value;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding57;
}
try {
binding2 = env2_1;
} catch (error) {
break exceptionLanding57;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding57;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding57;
}
try {
getContacts = value12.getContacts;
} catch (error) {
break exceptionLanding57;
}
try {
binding = env2_12;
} catch (error) {
break exceptionLanding57;
}
try {
getState = binding.getState;
} catch (error) {
break exceptionLanding57;
}
try {
value13 = Reflect.apply(getState, binding, []);
} catch (error) {
break exceptionLanding57;
}
try {
storedContacts = value13.storedContacts;
} catch (error) {
break exceptionLanding57;
}
try {
value14 = Reflect.apply(getContacts, value12, [phone, storedContacts]);
} catch (error) {
break exceptionLanding57;
}
yield value14;
try {
value15 = undefined;
value16 = false;
} catch (error) {
break exceptionLanding57;
}
if (value16) {
return value15;
}
try {
names = value15.names;
} catch (error) {
break exceptionLanding57;
}
try {
payload = value15.payload;
} catch (error) {
break exceptionLanding57;
}
try {
binding = env2_10;
} catch (error) {
break exceptionLanding57;
}
try {
binding(names);
} catch (error) {
break exceptionLanding57;
}
try {
value17 = payload == null;
} catch (error) {
break exceptionLanding57;
}
reducibleJoin58: while (true) {
reducibleJoin53: while (true) {
if (value17) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding57;
}
try {
binding4 = env2_1;
} catch (error) {
break exceptionLanding57;
}
try {
property = binding4[11];
} catch (error) {
break exceptionLanding57;
}
try {
value22 = binding(property);
} catch (error) {
break exceptionLanding57;
}
try {
Storage = value22.Storage;
} catch (error) {
break exceptionLanding57;
}
try {
set = Storage.set;
} catch (error) {
break exceptionLanding57;
}
break reducibleJoin53;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding57;
}
try {
binding3 = env2_1;
} catch (error) {
break exceptionLanding57;
}
try {
property = binding3[12];
} catch (error) {
break exceptionLanding57;
}
try {
value18 = binding(property);
} catch (error) {
break exceptionLanding57;
}
try {
uploadContacts = value18.uploadContacts;
} catch (error) {
break exceptionLanding57;
}
try {
value19 = Reflect.apply(uploadContacts, value18, [payload, true]);
} catch (error) {
break exceptionLanding57;
}
yield value19;
try {
value20 = undefined;
value21 = false;
} catch (error) {
break exceptionLanding57;
}
if (value21) {
return value20;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding57;
}
try {
binding4 = env2_1;
} catch (error) {
break exceptionLanding57;
}
try {
property = binding4[11];
} catch (error) {
break exceptionLanding57;
}
try {
value22 = binding(property);
} catch (error) {
break exceptionLanding57;
}
try {
Storage = value22.Storage;
} catch (error) {
break exceptionLanding57;
}
try {
set = Storage.set;
} catch (error) {
break exceptionLanding57;
}
break reducibleJoin53;
}
try {
Reflect.apply(set, Storage, ['LAST_USER_CONTACTS_REQUEST_TIMESTAMP_KEY', value6]);
} catch (error) {
break exceptionLanding57;
}
break reducibleJoin58;
}
}
return value;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding57;
function _fun92185() { // fn#92185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:932, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
try {
binding2 = env2_1;
} catch (error) {
break exceptionLanding57;
}
try {
property = binding2[12];
} catch (error) {
break exceptionLanding57;
}
try {
value12 = binding(property);
} catch (error) {
break exceptionLanding57;
}
try {
getContacts = value12.getContacts;
} catch (error) {
break exceptionLanding57;
}
try {
binding = env2_12;
} catch (error) {
break exceptionLanding57;
}
try {
getState = binding.getState;
} catch (error) {
break exceptionLanding57;
}
try {
value13 = Reflect.apply(getState, binding, []);
} catch (error) {
break exceptionLanding57;
}
try {
storedContacts = value13.storedContacts;
} catch (error) {
break exceptionLanding57;
}
try {
value14 = Reflect.apply(getContacts, value12, [phone, storedContacts]);
} catch (error) {
break exceptionLanding57;
}
yield value14;
try {
value15 = undefined;
value16 = false;
} catch (error) {
break exceptionLanding57;
}
if (value16) {
return value15;
}
try {
names = value15.names;
} catch (error) {
break exceptionLanding57;
}
try {
payload = value15.payload;
} catch (error) {
break exceptionLanding57;
}
try {
binding = env2_10;
} catch (error) {
break exceptionLanding57;
}
try {
binding(names);
} catch (error) {
break exceptionLanding57;
}
try {
value17 = payload == null;
} catch (error) {
break exceptionLanding57;
}
reducibleJoin58: while (true) {
reducibleJoin53: while (true) {
if (value17) {
try {
binding = env2_0;
} catch (error) {
break exceptionLanding57;
}
try {
binding4 = env2_1;
} catch (error) {
break exceptionLanding57;
}
try {
property = binding4[11];
} catch (error) {
break exceptionLanding57;
}
try {
value22 = binding(property);
} catch (error) {
break exceptionLanding57;
}
try {
Storage = value22.Storage;
} catch (error) {
break exceptionLanding57;
}
try {
set = Storage.set;
} catch (error) {
break exceptionLanding57;
}
break reducibleJoin53;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding57;
}
try {
binding3 = env2_1;
} catch (error) {
break exceptionLanding57;
}
try {
property = binding3[12];
} catch (error) {
break exceptionLanding57;
}
try {
value18 = binding(property);
} catch (error) {
break exceptionLanding57;
}
try {
uploadContacts = value18.uploadContacts;
} catch (error) {
break exceptionLanding57;
}
try {
value19 = Reflect.apply(uploadContacts, value18, [payload, true]);
} catch (error) {
break exceptionLanding57;
}
yield value19;
try {
value20 = undefined;
value21 = false;
} catch (error) {
break exceptionLanding57;
}
if (value21) {
return value20;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding57;
}
try {
binding4 = env2_1;
} catch (error) {
break exceptionLanding57;
}
try {
property = binding4[11];
} catch (error) {
break exceptionLanding57;
}
try {
value22 = binding(property);
} catch (error) {
break exceptionLanding57;
}
try {
Storage = value22.Storage;
} catch (error) {
break exceptionLanding57;
}
try {
set = Storage.set;
} catch (error) {
break exceptionLanding57;
}
break reducibleJoin53;
}
function _fun92186(a0) { // fn#92186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:984, offset: 0x0207f06e, size: 42 bytes, params: 2, frame: 14
const ContactSyncLifecycleManager2 = ContactSyncLifecycleManager;
Inherits(ContactSyncLifecycleManager2, a0);
return CreateClass(ContactSyncLifecycleManager2);
function ContactSyncLifecycleManager(a0) { // fn#92187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:996, offset: 0x0207f098, size: 165 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ContactSyncLifecycleManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_5(ContactSyncLifecycleManager);
binding = env1_4;
if (_isNativeReflectConstruct_92179()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
try {
Reflect.apply(set, Storage, ['LAST_USER_CONTACTS_REQUEST_TIMESTAMP_KEY', value6]);
} catch (error) {
break exceptionLanding57;
value = binding(this, r0);
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_92188};
value.handleConnectionOpen = handleConnectionOpen_92189;
return value;
function ContactSyncLifecycleManagerPOST_CONNECTION_OPEN() { // fn#92188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:1295, owner: ContactSyncLifecycleManager.POST_CONNECTION_OPEN, offset: 0x00eed68e, size: 19 bytes, params: 1, frame: 9
return env0_0.handleConnectionOpen();
}
break reducibleJoin58;
function ContactSyncLifecycleManagerHandleConnectionOpen() { // fn#92189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:1348, owner: ContactSyncLifecycleManager.handleConnectionOpen, offset: 0x0207f13d, size: 133 bytes, params: 1, frame: 14
var environment;
var connectedAccountsStoreBinding;
var value3;
var moduleValue;
let value = environment.__proto__.__proto__;
if (UserStore.getCurrentUser() != null) {
connectedAccountsStoreBinding = ConnectedAccountsStore;
value3 = connectedAccountsStoreBinding.getLocalAccount(PlatformTypes.CONTACTS);
moduleValue = require(11997) /* metro dependency 11997: ContactSyncUtils */;
if (moduleValue.isContactSyncEnabled(value3)) {
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
value = value.checkContactPermissions();
value.then(_fun92190);
}
}
function _fun92190(a0) { // fn#92190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:1493, offset: 0x0207f1c2, size: 66 bytes, params: 2, frame: 11
var environment;
const value = environment.__proto__.__proto__.__proto__;
const AUTHORIZED = ContactPermissions.AUTHORIZED;
if (a0 === AUTHORIZED) {
(require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(_fun92191);
}
function _fun92191() { // fn#92191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:1546, offset: 0x0207f204, size: 15 bytes, params: 1, frame: 9
return env4_15();
}
}
}
}
}
return value;
}
function ContactSyncLifecycleManager(a0) { // fn#92187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:996, offset: 0x0207f098, size: 165 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_3;
binding(this, ContactSyncLifecycleManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(ContactSyncLifecycleManager);
binding = env1_4;
if (_isNativeReflectConstruct_92179()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.actions = {POST_CONNECTION_OPEN: POST_CONNECTION_OPEN_92188};
value.handleConnectionOpen = handleConnectionOpen_92189;
return value;
}
function ContactSyncLifecycleManagerHandleConnectionOpen() { // fn#92189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:1348, owner: ContactSyncLifecycleManager.handleConnectionOpen, offset: 0x0207f13d, size: 133 bytes, params: 1, frame: 14
var environment;
var value3;
var moduleValue;
let value = environment.__proto__.__proto__;
if (UserStore.getCurrentUser() != null) {
value3 = ConnectedAccountsStore.getLocalAccount(PlatformTypes.CONTACTS);
moduleValue = require(11997) /* metro dependency 11997: ContactSyncUtils */;
if (moduleValue.isContactSyncEnabled(value3)) {
value = require(11997) /* metro dependency 11997: ContactSyncUtils */;
value = value.checkContactPermissions();
value.then(_fun92190);
}
}
}
function _fun92190(a0) { // fn#92190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:1493, offset: 0x0207f1c2, size: 66 bytes, params: 2, frame: 11
var environment;
const value = environment.__proto__.__proto__.__proto__;
const AUTHORIZED = ContactPermissions.AUTHORIZED;
if (a0 === AUTHORIZED) {
(require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */).runAfterInteractions(_fun92191);
}
}
function _fun92191() { // fn#92191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12184:1546, offset: 0x0207f204, size: 15 bytes, params: 1, frame: 9
return env4_15();
}
global.__d(_fun92178, 11998, [7, 6, 15, 17, 18, 5, 5040, 1878, 11996, 11995, 661, 587, 11997, 5459, 4860,
2]) /* metro module 11998, dependencies: [7, 6, 15, 17, 18, 5, 5040, 1878, 11996, 11995, 661, 587, 11997, 5459, 4860, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,25 +1,28 @@
/* Metro module 11994; source: modules/contact_sync/native/ContactSyncModalStore.tsx; dependencies: [5040, 1878, 11995, 661, 629, 690, 2] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ConnectedAccountsStore from '../../../stores/ConnectedAccountsStore.tsx'; /* Metro dependency 5040 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00629Module from '../../../by-id/module-00629.js'; /* Metro dependency 629 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as ReactBatchUpdatesNativeModule from '../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
import * as ContactSyncConstantsModule from './ContactSyncConstants.tsx'; /* Metro dependency 11995 */
function _fun92091(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92091, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:6, offset: 0x0207d3c1, size: 421 bytes, params: 8, frame: 20
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_4 = (require(11995) /* metro dependency 11995: ContactSyncConstants */).ContactPermissions;
const env0_5 = (require(661) /* metro dependency 661: Constants */).PlatformTypes;
object2 = {NORMAL: 0};
object2[0] = 'NORMAL';
object2.ONBOARDING = 1;
object2[1] = 'ONBOARDING';
object2.ONBOARDING_INVITE = 2;
object2[2] = 'ONBOARDING_INVITE';
let value = require(629) /* metro dependency 629 */;
object = {NORMAL: 0};
object[0] = 'NORMAL';
object.ONBOARDING = 1;
object[1] = 'ONBOARDING';
object.ONBOARDING_INVITE = 2;
object[2] = 'ONBOARDING_INVITE';
let value = Module00629Module;
value = value.create(function() {
return initialValues();
});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/ContactSyncModalStore.tsx');
exports.ContactSyncModes = object2;
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/ContactSyncModalStore.tsx');
exports.ContactSyncModes = object;
exports.useContactSyncModalStore = value;
exports.initialize = initialize_92094;
exports.setAllowSync = setAllowSync;
@@ -33,204 +36,207 @@ function _fun92091(global, require, importDefault, importAll, module, exports, d
exports.setError = setError;
exports.useIsOnboarding = useIsOnboarding;
exports.getIsOnboarding = getIsOnboarding;
function initialValues() { // fn#92092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:336, offset: 0x0207d566, size: 60 bytes, params: 1, frame: 3
const NORMAL = env0_6.NORMAL;
const NOT_DETERMINED = ContactPermissions.NOT_DETERMINED;
return {'mode': null, 'permissionState': null, 'error': '', 'phone': null, 'phoneToken': null, 'name': null,
'isNameFromContactBook': false, 'allowPhone': true, 'allowEmail': true, 'bulkAddToken': null, mode: NORMAL,
permissionState: NOT_DETERMINED, suggestions: []};
}
function initialize_92094(a0) { // fn#92094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:698, offset: 0x0207d5a2, size: 131 bytes, params: 2, frame: 15
const env0_0 = a0;
const connectedAccountsStoreBinding = ConnectedAccountsStore;
const getLocalAccount = connectedAccountsStoreBinding.getLocalAccount;
const CONTACTS = PlatformTypes.CONTACTS;
const value2 = Reflect.apply(getLocalAccount, connectedAccountsStoreBinding, [CONTACTS]);
const value3 = undefined;
const env0_1 = value2 == null ? value3 : value2.name;
const currentUser = UserStore.getCurrentUser();
const env0_2 = currentUser == null ? value3 : currentUser.phone;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92095);
return value3;
function _fun92095() { // fn#92095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:851, offset: 0x0207d625, size: 29 bytes, params: 1, frame: 11
return env1_7.setState(_fun92096);
function _fun92096() { // fn#92096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:867, offset: 0x0207d642, size: 66 bytes, params: 1, frame: 13
const object = {};
copyDataProperties(object, initialValues(), undefined);
object['mode'] = env1_0;
object['phone'] = phone;
object['name'] = name;
return object;
}
}
}
function setAllowSync(a0) { // fn#92097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:936, offset: 0x0207d684, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92098);
function _fun92098() { // fn#92098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:983, offset: 0x0207d6ba, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92099);
function _fun92099(a0) { // fn#92099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1000, offset: 0x0207d6d9, size: 39 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, undefined);
const binding = env1_0;
object['allowPhone'] = binding;
object['allowEmail'] = binding;
return object;
}
}
}
function setAllowPhone(a0) { // fn#92100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1060, offset: 0x0207d700, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92101);
function _fun92101() { // fn#92101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1108, offset: 0x0207d736, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92102);
function _fun92102(a0) { // fn#92102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1125, offset: 0x0207d755, size: 30 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, undefined);
object['allowPhone'] = env1_0;
return object;
}
}
}
function setAllowEmail(a0) { // fn#92103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1172, offset: 0x0207d773, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92104);
function _fun92104() { // fn#92104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1220, offset: 0x0207d7a9, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92105);
function _fun92105(a0) { // fn#92105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1237, offset: 0x0207d7c8, size: 30 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, undefined);
object['allowEmail'] = env1_0;
return object;
}
}
}
function setSuggestions(a0, a1) { // fn#92106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1285, offset: 0x0207d7e6, size: 61 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92107);
function _fun92107() { // fn#92107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1336, offset: 0x0207d823, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92108);
function _fun92108(a0) { // fn#92108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1353, offset: 0x0207d842, size: 43 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, a0, undefined);
object['suggestions'] = env1_0;
object['bulkAddToken'] = require;
return object;
}
}
}
function setPhone(a0) { // fn#92109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1411, offset: 0x0207d86d, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92110);
function _fun92110() { // fn#92110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1454, offset: 0x0207d8a3, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92111);
function _fun92111(a0) { // fn#92111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1471, offset: 0x0207d8c2, size: 30 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, undefined);
object['phone'] = env1_0;
return object;
}
}
}
function setPhoneToken(a0) { // fn#92112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1513, offset: 0x0207d8e0, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92113);
function _fun92113() { // fn#92113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1561, offset: 0x0207d916, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92114);
function _fun92114(a0) { // fn#92114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1578, offset: 0x0207d935, size: 30 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, undefined);
object['phoneToken'] = env1_0;
return object;
}
}
}
function setName_92115(a0) { // fn#92115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1619, offset: 0x0207d953, size: 67 bytes, params: 2, frame: 13
const value = a1;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : false;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92116);
function _fun92116() { // fn#92116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1666, offset: 0x0207d996, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92117);
function _fun92117(a0) { // fn#92117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1683, offset: 0x0207d9b5, size: 43 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, a0, undefined);
object['name'] = env1_0;
object['isNameFromContactBook'] = env1_1;
return object;
}
}
}
function setPermissionState(a0) { // fn#92118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1753, offset: 0x0207d9e0, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92119);
function _fun92119() { // fn#92119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1806, offset: 0x0207da16, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92120);
function _fun92120(a0) { // fn#92120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1823, offset: 0x0207da35, size: 30 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, undefined);
object['permissionState'] = env1_0;
return object;
}
}
}
function setError(a0) { // fn#92121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1870, offset: 0x0207da53, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92122);
function _fun92122() { // fn#92122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1913, offset: 0x0207da89, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92123);
function _fun92123(a0) { // fn#92123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1930, offset: 0x0207daa8, size: 30 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, undefined);
object['error'] = env1_0;
return object;
}
}
}
function useIsOnboarding() { // fn#92124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1974, offset: 0x0207dac6, size: 51 bytes, params: 1, frame: 11
const mode = env0_7().mode;
const ONBOARDING = env0_6.ONBOARDING;
return mode === ONBOARDING || mode === env0_6.ONBOARDING_INVITE;
}
function getIsOnboarding() { // fn#92125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:2084, offset: 0x0207daf9, size: 55 bytes, params: 1, frame: 11
const binding = env0_7;
const getState = binding.getState;
const mode = Reflect.apply(getState, binding, []).mode;
const ONBOARDING = env0_6.ONBOARDING;
return mode === ONBOARDING || mode === env0_6.ONBOARDING_INVITE;
}
}
function initialValues() { // fn#92092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:336, offset: 0x0207d566, size: 60 bytes, params: 1, frame: 3
const NORMAL = env0_6.NORMAL;
const NOT_DETERMINED = ContactPermissions.NOT_DETERMINED;
return {'mode': null, 'permissionState': null, 'error': '', 'phone': null, 'phoneToken': null, 'name': null,
'isNameFromContactBook': false, 'allowPhone': true, 'allowEmail': true, 'bulkAddToken': null, mode: NORMAL,
permissionState: NOT_DETERMINED, suggestions: []};
}
function initialize_92094(a0) { // fn#92094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:698, offset: 0x0207d5a2, size: 131 bytes, params: 2, frame: 15
const env0_0 = a0;
const getLocalAccount = ConnectedAccountsStore.getLocalAccount;
const CONTACTS = PlatformTypes.CONTACTS;
const value2 = Reflect.apply(getLocalAccount, ConnectedAccountsStore, [CONTACTS]);
const value3 = undefined;
const env0_1 = value2 == null ? value3 : value2.name;
const currentUser = UserStore.getCurrentUser();
const env0_2 = currentUser == null ? value3 : currentUser.phone;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92095);
return value3;
}
function setAllowSync(a0) { // fn#92097, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:936, offset: 0x0207d684, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92098);
}
function setAllowPhone(a0) { // fn#92100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1060, offset: 0x0207d700, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92101);
}
function setAllowEmail(a0) { // fn#92103, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1172, offset: 0x0207d773, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92104);
}
function setSuggestions(a0, a1) { // fn#92106, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1285, offset: 0x0207d7e6, size: 61 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92107);
}
function setPhone(a0) { // fn#92109, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1411, offset: 0x0207d86d, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92110);
}
function setPhoneToken(a0) { // fn#92112, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1513, offset: 0x0207d8e0, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92113);
}
function setName_92115(a0) { // fn#92115, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1619, offset: 0x0207d953, size: 67 bytes, params: 2, frame: 13
const value = a1;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : false;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92116);
}
function setPermissionState(a0) { // fn#92118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1753, offset: 0x0207d9e0, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92119);
}
function setError(a0) { // fn#92121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1870, offset: 0x0207da53, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92122);
}
function useIsOnboarding() { // fn#92124, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1974, offset: 0x0207dac6, size: 51 bytes, params: 1, frame: 11
const mode = env0_7().mode;
const ONBOARDING = env0_6.ONBOARDING;
return mode === ONBOARDING || mode === env0_6.ONBOARDING_INVITE;
}
function getIsOnboarding() { // fn#92125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:2084, offset: 0x0207daf9, size: 55 bytes, params: 1, frame: 11
const binding = env0_7;
const getState = binding.getState;
const mode = Reflect.apply(getState, binding, []).mode;
const ONBOARDING = env0_6.ONBOARDING;
return mode === ONBOARDING || mode === env0_6.ONBOARDING_INVITE;
}
function _fun92095() { // fn#92095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:851, offset: 0x0207d625, size: 29 bytes, params: 1, frame: 11
return env1_7.setState(_fun92096);
}
function _fun92098() { // fn#92098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:983, offset: 0x0207d6ba, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92099);
}
function _fun92101() { // fn#92101, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1108, offset: 0x0207d736, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92102);
}
function _fun92104() { // fn#92104, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1220, offset: 0x0207d7a9, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92105);
}
function _fun92107() { // fn#92107, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1336, offset: 0x0207d823, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92108);
}
function _fun92110() { // fn#92110, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1454, offset: 0x0207d8a3, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92111);
}
function _fun92113() { // fn#92113, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1561, offset: 0x0207d916, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92114);
}
function _fun92116() { // fn#92116, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1666, offset: 0x0207d996, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92117);
}
function _fun92119() { // fn#92119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1806, offset: 0x0207da16, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92120);
}
function _fun92122() { // fn#92122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1913, offset: 0x0207da89, size: 31 bytes, params: 1, frame: 11
env1_7.setState(_fun92123);
}
function _fun92096() { // fn#92096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:867, offset: 0x0207d642, size: 66 bytes, params: 1, frame: 13
const object2 = {};
copyDataProperties(object2, initialValues(), undefined);
object2['mode'] = env1_0;
object2['phone'] = phone;
object2['name'] = name;
return object2;
}
function _fun92099(a0) { // fn#92099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1000, offset: 0x0207d6d9, size: 39 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, undefined);
const binding = env1_0;
object2['allowPhone'] = binding;
object2['allowEmail'] = binding;
return object2;
}
function _fun92102(a0) { // fn#92102, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1125, offset: 0x0207d755, size: 30 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['allowPhone'] = env1_0;
return object2;
}
function _fun92105(a0) { // fn#92105, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1237, offset: 0x0207d7c8, size: 30 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['allowEmail'] = env1_0;
return object2;
}
function _fun92108(a0) { // fn#92108, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1353, offset: 0x0207d842, size: 43 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['suggestions'] = env1_0;
object2['bulkAddToken'] = require;
return object2;
}
function _fun92111(a0) { // fn#92111, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1471, offset: 0x0207d8c2, size: 30 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['phone'] = env1_0;
return object2;
}
function _fun92114(a0) { // fn#92114, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1578, offset: 0x0207d935, size: 30 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['phoneToken'] = env1_0;
return object2;
}
function _fun92117(a0) { // fn#92117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1683, offset: 0x0207d9b5, size: 43 bytes, params: 2, frame: 13
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['name'] = env1_0;
object2['isNameFromContactBook'] = env1_1;
return object2;
}
function _fun92120(a0) { // fn#92120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1823, offset: 0x0207da35, size: 30 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['permissionState'] = env1_0;
return object2;
}
function _fun92123(a0) { // fn#92123, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12180:1930, offset: 0x0207daa8, size: 30 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['error'] = env1_0;
return object2;
}
global.__d(_fun92091, 11994, [5040, 1878, 11995, 661, 629, 690,
2]) /* metro module 11994, dependencies: [5040, 1878, 11995, 661, 629, 690, 2] */;
@@ -1,22 +1,28 @@
/* Metro module 11996; source: modules/contact_sync/native/ContactSyncPersistedStore.tsx; dependencies: [587, 690, 694, 629, 2] */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
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 Module00629Module from '../../../by-id/module-00629.js'; /* Metro dependency 629 */
import * as ReactBatchUpdatesNativeModule from '../../../external/discord_common/js/shared/utils/ReactBatchUpdates.native.tsx'; /* Metro dependency 690 */
function _fun92127(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92127, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:6, offset: 0x0207dc58, size: 337 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const closure = setStoredContacts;
let Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const setStoredContacts2 = setStoredContacts;
let Storage = (StorageModule).Storage;
Storage.asyncGet('V2_DCD_CONTACTS_STORAGE_KEY', function(a0) {
setStoredContacts(a0);
});
let value = require(629) /* metro dependency 629 */;
let value = Module00629Module;
value = value.create(function() {
return {'loadedPolicyNotice': false, 'storedContacts': '', 'upsellCTADismissed': false,
'policyUpdateNoticeDismissed': false, 'dmListCTADismissed': false};
});
Storage.asyncGet('ContactSyncDMListCTADismissed', _fun92134);
Storage.asyncGet('ContactSyncUpsellCTADismissed', _fun92136);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/ContactSyncPersistedStore.tsx');
exports.setStoredContacts = closure;
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/ContactSyncPersistedStore.tsx');
exports.setStoredContacts = setStoredContacts2;
exports.deleteStoredContacts = deleteStoredContacts;
exports.useContactSyncStore = value;
exports.dismissUpsellCTA = dismissUpsellCTA;
@@ -28,118 +34,120 @@ function _fun92127(global, require, importDefault, importAll, module, exports, d
}
};
exports.clearDismissState = clearDismissState;
}
function setStoredContacts(a0) { // fn#92128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:259, offset: 0x0207dda9, size: 122 bytes, params: 2, frame: 18
const env0_0 = a0;
const Storage = (StorageModule).Storage;
Storage.set('V2_DCD_CONTACTS_STORAGE_KEY', a0);
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92129);
(Dispatcher).wait(_fun92131);
function _fun92129() { // fn#92129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:310, offset: 0x0207de23, size: 31 bytes, params: 1, frame: 11
env1_4.setState(_fun92130);
function _fun92130(a0) { // fn#92130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:327, offset: 0x0207de42, size: 30 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, undefined);
object['storedContacts'] = env1_0;
return object;
}
function setStoredContacts(a0) { // fn#92128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:259, offset: 0x0207dda9, size: 122 bytes, params: 2, frame: 18
const env0_0 = a0;
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set('V2_DCD_CONTACTS_STORAGE_KEY', a0);
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92129);
(importDefault(694) /* metro dependency 694: Dispatcher */).wait(_fun92131);
}
}
function _fun92131() { // fn#92131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:375, offset: 0x0207de60, size: 69 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (Dispatcher).dispatch({type: 'CONTACT_SYNC_STORED_CONTACTS',
empty: env0_0 === ''});
}
function _fun92134(a0) { // fn#92134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:682, offset: 0x0207deb5, size: 168 bytes, params: 2, frame: 15
const Boolean = global.Boolean;
const env0_0 = Boolean(a0);
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const r4 = Storage.get('contact_sync_dm_list_cta_first_seen_date') ?? global.Date.now();
const Date = global.Date;
if (Date.now() - r4 > 5184000000) {
}
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92135);
}
function _fun92136(a0) { // fn#92136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:875, offset: 0x0207df7f, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92137);
}
function _fun92134(a0) { // fn#92134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:682, offset: 0x0207deb5, size: 168 bytes, params: 2, frame: 15
const Boolean = global.Boolean;
const env0_0 = Boolean(a0);
const Storage = (StorageModule).Storage;
const r4 = Storage.get('contact_sync_dm_list_cta_first_seen_date') ?? global.Date.now();
const Date = global.Date;
if (Date.now() - r4 > 5184000000) {
}
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92135);
function _fun92135() { // fn#92135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:803, offset: 0x0207df5d, size: 34 bytes, params: 1, frame: 12
return env1_4.setState({dmListCTADismissed: env0_0});
}
function deleteStoredContacts() { // fn#92138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1099, offset: 0x0207dfdd, size: 130 bytes, params: 1, frame: 15
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
const r0 = Storage.get('V2_DCD_CONTACTS_STORAGE_KEY') ?? '';
Storage.remove('V2_DCD_CONTACTS_STORAGE_KEY');
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92139);
return r0;
}
}
function dismissUpsellCTA() { // fn#92141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1303, offset: 0x0207e099, size: 83 bytes, params: 1, frame: 16
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set('ContactSyncUpsellCTADismissed', true);
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92142);
}
function _fun92136(a0) { // fn#92136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:875, offset: 0x0207df7f, size: 54 bytes, params: 2, frame: 12
const env0_0 = a0;
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92137);
function _fun92137() { // fn#92137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:901, offset: 0x0207dfb5, size: 40 bytes, params: 1, frame: 12
return env1_4.setState({upsellCTADismissed: !!env0_0});
}
function dismissDMListCTA() { // fn#92144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1455, offset: 0x0207e124, size: 83 bytes, params: 1, frame: 16
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.set('ContactSyncDMListCTADismissed', true);
(require(690) /* metro dependency 690: ReactBatchUpdatesNative */).batchUpdates(_fun92145);
}
}
function clearDismissState() { // fn#92148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1730, offset: 0x0207e213, size: 105 bytes, params: 1, frame: 16
const Storage = (require(587) /* metro dependency 587: Storage */).Storage;
Storage.remove('ContactSyncUpsellCTADismissed');
Storage.remove('ContactSyncDMListCTADismissed');
env0_4.setState(function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['upsellCTADismissed'] = false;
object['dmListCTADismissed'] = false;
return object;
});
}
function deleteStoredContacts() { // fn#92138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1099, offset: 0x0207dfdd, size: 130 bytes, params: 1, frame: 15
const Storage = (StorageModule).Storage;
const r0 = Storage.get('V2_DCD_CONTACTS_STORAGE_KEY') ?? '';
Storage.remove('V2_DCD_CONTACTS_STORAGE_KEY');
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92139);
return r0;
function _fun92139() { // fn#92139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1205, offset: 0x0207e05f, size: 31 bytes, params: 1, frame: 11
env1_4.setState(function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['storedContacts'] = '';
return object;
});
}
function _fun92129() { // fn#92129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:310, offset: 0x0207de23, size: 31 bytes, params: 1, frame: 11
env1_4.setState(_fun92130);
}
}
function _fun92131() { // fn#92131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:375, offset: 0x0207de60, size: 69 bytes, params: 1, frame: 13
const value = environment.__proto__;
return (importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'CONTACT_SYNC_STORED_CONTACTS',
empty: env0_0 === ''});
}
function dismissUpsellCTA() { // fn#92141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1303, offset: 0x0207e099, size: 83 bytes, params: 1, frame: 16
const Storage = (StorageModule).Storage;
Storage.set('ContactSyncUpsellCTADismissed', true);
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92142);
function _fun92142() { // fn#92142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1379, offset: 0x0207e0ec, size: 31 bytes, params: 1, frame: 11
env1_4.setState(function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['upsellCTADismissed'] = true;
return object;
});
}
function _fun92135() { // fn#92135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:803, offset: 0x0207df5d, size: 34 bytes, params: 1, frame: 12
return env1_4.setState({dmListCTADismissed: env0_0});
}
}
function _fun92137() { // fn#92137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:901, offset: 0x0207dfb5, size: 40 bytes, params: 1, frame: 12
return env1_4.setState({upsellCTADismissed: !!env0_0});
}
function dismissDMListCTA() { // fn#92144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1455, offset: 0x0207e124, size: 83 bytes, params: 1, frame: 16
const Storage = (StorageModule).Storage;
Storage.set('ContactSyncDMListCTADismissed', true);
(ReactBatchUpdatesNativeModule).batchUpdates(_fun92145);
function _fun92145() { // fn#92145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1531, offset: 0x0207e177, size: 29 bytes, params: 1, frame: 11
return env1_4.setState(function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['dmListCTADismissed'] = true;
return object;
});
}
function _fun92139() { // fn#92139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1205, offset: 0x0207e05f, size: 31 bytes, params: 1, frame: 11
env1_4.setState(function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['storedContacts'] = '';
return object;
});
}
}
function _fun92142() { // fn#92142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1379, offset: 0x0207e0ec, size: 31 bytes, params: 1, frame: 11
env1_4.setState(function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['upsellCTADismissed'] = true;
return object;
});
}
function clearDismissState() { // fn#92148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1730, offset: 0x0207e213, size: 105 bytes, params: 1, frame: 16
const Storage = (StorageModule).Storage;
Storage.remove('ContactSyncUpsellCTADismissed');
Storage.remove('ContactSyncDMListCTADismissed');
env0_4.setState(function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['upsellCTADismissed'] = false;
object['dmListCTADismissed'] = false;
return object;
});
}
function _fun92145() { // fn#92145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:1531, offset: 0x0207e177, size: 29 bytes, params: 1, frame: 11
return env1_4.setState(function(a0) {
var r2;
var object = {};
copyDataProperties(object, a0, r2);
object['dmListCTADismissed'] = true;
return object;
});
}
function _fun92130(a0) { // fn#92130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12182:327, offset: 0x0207de42, size: 30 bytes, params: 2, frame: 12
const object2 = {};
copyDataProperties(object2, a0, undefined);
object2['storedContacts'] = env1_0;
return object2;
}
global.__d(_fun92127, 11996, [587, 690, 694, 629,
2]) /* metro module 11996, dependencies: [587, 690, 694, 629, 2] */;
@@ -1,16 +1,26 @@
/* Metro module 11997; source: modules/contact_sync/native/ContactSyncUtils.tsx; dependencies: [5, 27, 5040, 11996, 11995, 661, 478, 5046, 480, 694, 11998, 3829, 1216, 566, 1391, 1948, 3853, 5080, 2] */
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
import ConnectedAccountsStore from '../../../stores/ConnectedAccountsStore.tsx'; /* Metro dependency 5040 */
import TrackedHTTPUtils from '../../../utils/TrackedHTTPUtils.tsx'; /* Metro dependency 5046 */
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 PlatformUtilsModule from '../../../external/discord_common/js/shared/utils/PlatformUtils.tsx'; /* Metro dependency 478 */
import * as AnalyticsUtilsModule from '../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FlagUtilsModule from '../../../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */
import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */
import * as ContactSyncPersistedStoreModule from './ContactSyncPersistedStore.tsx'; /* Metro dependency 11996 */
import * as ContactSyncManagerModule from './ContactSyncManager.tsx'; /* Metro dependency 11998 */
function _fun92150(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:6, offset: 0x0207e29e, size: 624 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = isContactSyncEnabled;
const isContactSyncEnabled2 = isContactSyncEnabled;
const closure2 = function() {
return importDefault(dependencyMap[15]).getArticleURL(HelpdeskArticles.CONTACT_SYNC);
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = (require(27) /* metro dependency 27 */).NativeModules;
const connectedAccountsStore = importDefault(5040) /* metro dependency 5040: ConnectedAccountsStore */;
let value = require(11996) /* metro dependency 11996: ContactSyncPersistedStore */;
let value = ContactSyncPersistedStoreModule;
const env0_6 = value.useContactSyncStore;
const env0_7 = value.clearDismissState;
const env0_8 = value.deleteStoredContacts;
@@ -29,13 +39,13 @@ function _fun92150(global, require, importDefault, importAll, module, exports, d
error = new Error('No phone number');
Error = global.Error;
error = new Error('Failed to fetch contact image');
const closure3 = isContactSyncAvailable;
const isContactSyncAvailable2 = isContactSyncAvailable;
const value6 = _fun92154();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/ContactSyncUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/ContactSyncUtils.tsx');
exports.ContactSyncPermissionDenied = error;
exports.ContactSyncFailedUserHasNoPhone = error;
exports.ContactImageFetchFailed = error;
exports.isContactSyncAvailable = closure3;
exports.isContactSyncAvailable = isContactSyncAvailable2;
exports.checkContactPermissions = checkContactPermissions;
exports.uploadContacts = value6;
exports.bulkAddFriends = bulkAddFriends;
@@ -50,7 +60,7 @@ function _fun92150(global, require, importDefault, importAll, module, exports, d
return require(dependencyMap[13]).useStateFromStores([ConnectedAccountsStore], _fun92174);
};
exports.useContactSyncUserIsDiscoverable = useContactSyncUserIsDiscoverable;
exports.isContactSyncEnabled = closure;
exports.isContactSyncEnabled = isContactSyncEnabled2;
exports.getOpenLearnMoreUrl = closure2;
exports.handleOpenLearnMoreLink = function() {
importDefault(dependencyMap[16]).openURL(getOpenLearnMoreUrl());
@@ -58,226 +68,239 @@ function _fun92150(global, require, importDefault, importAll, module, exports, d
exports.transitionToAddFriendsLandingPage = function() {
importDefault(dependencyMap[17]).popWithKey(CONTACT_SYNC_MODAL_KEY);
};
}
function isContactSyncEnabled(a0) { // fn#92151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1173, offset: 0x0207e50e, size: 45 bytes, params: 2, frame: 3
return a0 != null && a0.friendSync && a0.type === PlatformTypes.CONTACTS;
}
function isContactSyncAvailable() { // fn#92153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:542, offset: 0x0207e56b, size: 88 bytes, params: 1, frame: 13
const value2 = undefined;
const isIOS2 = (require(478) /* metro dependency 478: PlatformUtils */).isIOS();
return isIOS2 ? !!isIOS2 : (NativeModules.DCDContactSyncManager == null ? value2 : NativeModules.DCDContactSyncManager.isContactSyncSupported) ?? (NativeModules.DCDContactSyncManager == null ? value2 : NativeModules.DCDContactSyncManager.isContactSyncSupported) != null;
}
function _fun92154() { // fn#92154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:662, offset: 0x0207e5c3, size: 36 bytes, params: 1, frame: 12
const env0_0 = env0_3(_fun92156);
return _fun92158;
}
function checkContactPermissions() { // fn#92159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1591, offset: 0x0207e749, size: 70 bytes, params: 1, frame: 12
return isContactSyncAvailable() ? NativeModules.DCDContactSyncManager.hasContactsPermissions() : global.Promise.resolve(ContactPermissions.UNAUTHORIZED);
}
function bulkAddFriends(a0, a1) { // fn#92160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1739, offset: 0x0207e78f, size: 141 bytes, params: 3, frame: 16
const defaultImport = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
const post = defaultImport.post;
const object2 = {};
const USER_BULK_RELATIONSHIPS = Endpoints.USER_BULK_RELATIONSHIPS;
object2.url = USER_BULK_RELATIONSHIPS;
object2.body = {user_ids: a0, token: a1};
const NetworkActionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames;
const USER_BULK_RELATIONSHIPS_UPDATE = NetworkActionNames.USER_BULK_RELATIONSHIPS_UPDATE;
object2.trackedActionData = {event: USER_BULK_RELATIONSHIPS_UPDATE};
object2.rejectWithError = false;
return Reflect.apply(post, defaultImport, [object2]).then(function(a0) {
return a0.body;
});
}
function adminDeleteContactSync() { // fn#92162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1965, offset: 0x0207e81c, size: 195 bytes, params: 1, frame: 20
clearDismissState();
deleteStoredContacts();
(require(11998) /* metro dependency 11998: ContactSyncManager */).removeLastUserContactsUpload();
const ContactSyncEnabled = (require(3829) /* metro dependency 3829: UserSettings */).ContactSyncEnabled;
ContactSyncEnabled.updateSetting(false);
const defaultImport = importDefault(5046) /* metro dependency 5046: TrackedHTTPUtils */;
const object2 = {};
const CONNECTION = Endpoints.CONNECTION;
const CONTACTS = PlatformTypes.CONTACTS;
object2.url = Reflect.apply(CONNECTION, Endpoints, [CONTACTS, '@me']);
object2.oldFormErrors = true;
const NetworkActionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).NetworkActionNames;
const USER_CONNECTIONS_UPDATE = NetworkActionNames.USER_CONNECTIONS_UPDATE;
object2.trackedActionData = {event: USER_CONNECTIONS_UPDATE};
object2.rejectWithError = false;
return defaultImport.delete(object2);
}
function getImageForContactId(a0) { // fn#92163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2255, offset: 0x0207e8df, size: 63 bytes, params: 2, frame: 11
const env0_0 = a0;
const env0_1 = NativeModules.DCDContactSyncManager;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun92164);
return promise instanceof Object ? promise : value;
}
function getContacts(a0) { // fn#92166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2420, offset: 0x0207e9a2, size: 84 bytes, params: 2, frame: 12
let value = a1;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : '';
const env0_2 = NativeModules.DCDContactSyncManager;
const Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(function(a0, a1) {
DCDContactSyncManager.syncContacts(a1, a0, _fun92168);
});
return promise instanceof Object ? promise : value;
}
function getStoredContacts() { // fn#92170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2742, offset: 0x0207eaf5, size: 87 bytes, params: 1, frame: 14
var r0;
var JSON;
var value2;
var error;
let value = environment;
const getState = useContactSyncStore.getState;
try {
JSON = global.JSON;
value2 = JSON.parse(Reflect.apply(getState, useContactSyncStore, []).storedContacts);
r0 = value2;
} catch (error) {
value = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
value.captureException(error);
r0 = {};
function isContactSyncEnabled(a0) { // fn#92151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1173, offset: 0x0207e50e, size: 45 bytes, params: 2, frame: 3
return a0 != null && a0.friendSync && a0.type === PlatformTypes.CONTACTS;
}
return r0;
}
function useContactSyncAccount() { // fn#92171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2903, offset: 0x0207eb4c, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectedAccountsStore], function() {
return ConnectedAccountsStore.getLocalAccount(PlatformTypes.CONTACTS);
});
}
function useContactSyncEnabled() { // fn#92173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:3038, offset: 0x0207eba5, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectedAccountsStore], _fun92174);
}
function useContactSyncUserIsDiscoverable() { // fn#92175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:3206, offset: 0x0207ec09, size: 127 bytes, params: 1, frame: 18
const FriendDiscoverySettings = (require(3829) /* metro dependency 3829: UserSettings */).FriendDiscoverySettings;
const value2 = FriendDiscoverySettings.useSetting();
const flagUtilsModule = require(1391) /* metro dependency 1391: FlagUtils */;
let hasFlag = flagUtilsModule.hasFlag;
const FIND_BY_PHONE = FriendDiscoveryFlags.FIND_BY_PHONE;
const value = Reflect.apply(hasFlag, flagUtilsModule, [value2, FIND_BY_PHONE]);
const moduleValue2 = flagUtilsModule;
hasFlag = moduleValue2.hasFlag;
const FIND_BY_EMAIL = FriendDiscoveryFlags.FIND_BY_EMAIL;
const hasFlag2 = Reflect.apply(hasFlag, moduleValue2, [value2, FIND_BY_EMAIL]);
return {phone: value, email: hasFlag2, any: value || hasFlag2};
}
async function _fun92156(a0) { // fn#92156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:682, offset: 0x0207e5fb, size: 269 bytes, params: 2, frame: 21
let value = a1;
if (false) {
return undefined;
function isContactSyncAvailable() { // fn#92153, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:542, offset: 0x0207e56b, size: 88 bytes, params: 1, frame: 13
const value2 = undefined;
const isIOS2 = (PlatformUtilsModule).isIOS();
return isIOS2 ? !!isIOS2 : (NativeModules.DCDContactSyncManager == null ? value2 : NativeModules.DCDContactSyncManager.isContactSyncSupported) ?? (NativeModules.DCDContactSyncManager == null ? value2 : NativeModules.DCDContactSyncManager.isContactSyncSupported) != null;
}
const r8 = value !== undefined ? value : false;
await undefined;
if (false) {
return undefined;
function _fun92154() { // fn#92154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:662, offset: 0x0207e5c3, size: 36 bytes, params: 1, frame: 12
const env0_0 = Module00005(_fun92156);
return _fun92158;
async function _fun92156(a0) { // fn#92156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:682, offset: 0x0207e5fb, size: 269 bytes, params: 2, frame: 21
let value = a1;
if (false) {
return undefined;
}
const r8 = value !== undefined ? value : false;
await undefined;
if (false) {
return undefined;
}
const JSON = global.JSON;
value = JSON.parse(a0);
const binding = env2_1;
const binding2 = env2_2;
const value6 = binding(binding2[7]);
const put = value6.put;
const object = {};
const CONNECTION_SYNC_CONTACTS = env2_12.CONNECTION_SYNC_CONTACTS;
object.url = CONNECTION_SYNC_CONTACTS;
const ANYONE_WITH_CONTACT_INFO = env2_11.ANYONE_WITH_CONTACT_INFO;
object.body = {friend_list_entries: value, background: r8, allowed_in_suggestions: ANYONE_WITH_CONTACT_INFO,
include_mutual_friends_count: false};
const NetworkActionNames = env2_0(binding2[8]).NetworkActionNames;
const USER_CONTACTS_SYNC = NetworkActionNames.USER_CONTACTS_SYNC;
object.trackedActionData = {event: USER_CONTACTS_SYNC};
object.rejectWithError = false;
await Reflect.apply(put, value6, [object]);
value = undefined;
if (false) {
return value;
}
const body = value.body;
env2_1(env2_2[9]).wait(_fun92157);
return body;
function _fun92157() { // fn#92157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1017, offset: 0x0207e708, size: 65 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
return env3_1(env3_2[9]).dispatch({type: 'LOAD_FRIEND_SUGGESTIONS_SUCCESS', suggestions: body.friend_suggestions});
}
}
function _fun92158() { // fn#92158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1127, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
const JSON = global.JSON;
value = JSON.parse(a0);
const binding = env2_1;
const binding2 = env2_2;
const value6 = binding(binding2[7]);
const put = value6.put;
const object2 = {};
const CONNECTION_SYNC_CONTACTS = env2_12.CONNECTION_SYNC_CONTACTS;
object2.url = CONNECTION_SYNC_CONTACTS;
const ANYONE_WITH_CONTACT_INFO = env2_11.ANYONE_WITH_CONTACT_INFO;
object2.body = {friend_list_entries: value, background: r8, allowed_in_suggestions: ANYONE_WITH_CONTACT_INFO,
include_mutual_friends_count: false};
const NetworkActionNames = env2_0(binding2[8]).NetworkActionNames;
const USER_CONTACTS_SYNC = NetworkActionNames.USER_CONTACTS_SYNC;
object2.trackedActionData = {event: USER_CONTACTS_SYNC};
object2.rejectWithError = false;
await Reflect.apply(put, value6, [object2]);
value = undefined;
if (false) {
return value;
function checkContactPermissions() { // fn#92159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1591, offset: 0x0207e749, size: 70 bytes, params: 1, frame: 12
return isContactSyncAvailable() ? NativeModules.DCDContactSyncManager.hasContactsPermissions() : global.Promise.resolve(ContactPermissions.UNAUTHORIZED);
}
const body = value.body;
env2_1(env2_2[9]).wait(_fun92157);
return body;
}
function _fun92164(a0, a1) { // fn#92164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2309, offset: 0x0207e91e, size: 50 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
DCDContactSyncManager.getImageForContactId(env0_0, _fun92165);
}
function _fun92167(a0, a1) { // fn#92167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2481, offset: 0x0207e9f6, size: 55 bytes, params: 3, frame: 15
DCDContactSyncManager.syncContacts(a1, a0, _fun92168);
}
function _fun92174() { // fn#92174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:3111, offset: 0x0207ebe0, size: 41 bytes, params: 1, frame: 12
const value = environment.__proto__;
const isContactSyncEnabledBinding = isContactSyncEnabled;
const getLocalAccount = ConnectedAccountsStore.getLocalAccount;
const CONTACTS = PlatformTypes.CONTACTS;
return isContactSyncEnabledBinding(Reflect.apply(getLocalAccount, ConnectedAccountsStore, [CONTACTS]));
}
function _fun92157() { // fn#92157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1017, offset: 0x0207e708, size: 65 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
return env3_1(env3_2[9]).dispatch({type: 'LOAD_FRIEND_SUGGESTIONS_SUCCESS', suggestions: body.friend_suggestions});
}
function _fun92165(a0, a1) { // fn#92165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2343, offset: 0x0207e950, size: 82 bytes, params: 3, frame: 14
var value;
if (a0 == null) {
env0_0(a1.replace(RegExp('(\\r\\n|\\n|\\r)', 'gm'), ''));
} else {
value = environment.__proto__.__proto__;
require(env2_17);
function bulkAddFriends(a0, a1) { // fn#92160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1739, offset: 0x0207e78f, size: 141 bytes, params: 3, frame: 16
const defaultImport = TrackedHTTPUtils;
const post = defaultImport.post;
const object = {};
const USER_BULK_RELATIONSHIPS = Endpoints.USER_BULK_RELATIONSHIPS;
object.url = USER_BULK_RELATIONSHIPS;
object.body = {user_ids: a0, token: a1};
const NetworkActionNames = (AnalyticsUtilsModule).NetworkActionNames;
const USER_BULK_RELATIONSHIPS_UPDATE = NetworkActionNames.USER_BULK_RELATIONSHIPS_UPDATE;
object.trackedActionData = {event: USER_BULK_RELATIONSHIPS_UPDATE};
object.rejectWithError = false;
return Reflect.apply(post, defaultImport, [object]).then(function(a0) {
return a0.body;
});
}
}
function _fun92168(a0, a1, a2) { // fn#92168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2509, offset: 0x0207ea2d, size: 178 bytes, params: 4, frame: 18
var environment;
var r2;
var unencryptedName;
var value4;
var JSON;
var value5;
var error;
var value7;
const value = undefined;
const value2 = null;
if (value2 == a0) {
function adminDeleteContactSync() { // fn#92162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:1965, offset: 0x0207e81c, size: 195 bytes, params: 1, frame: 20
clearDismissState();
deleteStoredContacts();
(ContactSyncManagerModule).removeLastUserContactsUpload();
const ContactSyncEnabled = (UserSettingsModule).ContactSyncEnabled;
ContactSyncEnabled.updateSetting(false);
const defaultImport = TrackedHTTPUtils;
const object = {};
const CONNECTION = Endpoints.CONNECTION;
const CONTACTS = PlatformTypes.CONTACTS;
object.url = Reflect.apply(CONNECTION, Endpoints, [CONTACTS, '@me']);
object.oldFormErrors = true;
const NetworkActionNames = (AnalyticsUtilsModule).NetworkActionNames;
const USER_CONNECTIONS_UPDATE = NetworkActionNames.USER_CONNECTIONS_UPDATE;
object.trackedActionData = {event: USER_CONNECTIONS_UPDATE};
object.rejectWithError = false;
return defaultImport.delete(object);
}
function getImageForContactId(a0) { // fn#92163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2255, offset: 0x0207e8df, size: 63 bytes, params: 2, frame: 11
const env0_0 = a0;
const env0_1 = NativeModules.DCDContactSyncManager;
const Promise = global.Promise;
const value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(_fun92164);
return promise instanceof Object ? promise : value;
function _fun92164(a0, a1) { // fn#92164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2309, offset: 0x0207e91e, size: 50 bytes, params: 3, frame: 13
const env0_0 = a0;
const env0_1 = a1;
DCDContactSyncManager.getImageForContactId(env0_0, _fun92165);
function _fun92165(a0, a1) { // fn#92165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2343, offset: 0x0207e950, size: 82 bytes, params: 3, frame: 14
var value;
if (a0 == null) {
env0_0(a1.replace(RegExp('(\\r\\n|\\n|\\r)', 'gm'), ''));
} else {
value = environment.__proto__.__proto__;
require(env2_17);
}
}
}
}
function getContacts(a0) { // fn#92166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2420, offset: 0x0207e9a2, size: 84 bytes, params: 2, frame: 12
let value = a1;
const env0_0 = a0;
const env0_1 = value !== undefined ? value : '';
const env0_2 = NativeModules.DCDContactSyncManager;
const Promise = global.Promise;
value = Object.create(Promise.prototype, {constructor: {value: Promise}});
const promise = new Promise(function(a0, a1) {
DCDContactSyncManager.syncContacts(a1, a0, _fun92168);
});
return promise instanceof Object ? promise : value;
function _fun92167(a0, a1) { // fn#92167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2481, offset: 0x0207e9f6, size: 55 bytes, params: 3, frame: 15
DCDContactSyncManager.syncContacts(a1, a0, _fun92168);
function _fun92168(a0, a1, a2) { // fn#92168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2509, offset: 0x0207ea2d, size: 178 bytes, params: 4, frame: 18
var environment;
var r2;
var unencryptedName;
var value4;
var JSON;
var value5;
var error;
var value7;
const value = undefined;
const value2 = null;
if (value2 == a0) {
try {
JSON = global.JSON;
value5 = JSON.parse(a1);
r2 = value5;
} catch (error) {
r2 = {};
}
value7 = global.Object.values(r2).find(_fun92169);
unencryptedName = value2 == value7 ? value : value7.unencryptedName;
env0_0({names: a1, ownName: value2 != unencryptedName ? unencryptedName : value2, payload: a2});
} else {
value4 = environment.__proto__.__proto__;
require(env2_16);
}
return value;
function _fun92169({phone}) { // fn#92169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2615, offset: 0x0207eadf, size: 22 bytes, params: 2, frame: 2
return phone === env2_0;
}
}
}
}
function getStoredContacts() { // fn#92170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2742, offset: 0x0207eaf5, size: 87 bytes, params: 1, frame: 14
var r0;
var JSON;
var value2;
var error;
let value = environment;
const getState = useContactSyncStore.getState;
try {
JSON = global.JSON;
value5 = JSON.parse(a1);
r2 = value5;
value2 = JSON.parse(Reflect.apply(getState, useContactSyncStore, []).storedContacts);
r0 = value2;
} catch (error) {
r2 = {};
value = importDefault(1216) /* metro dependency 1216: SentryUtilsNative */;
value.captureException(error);
r0 = {};
}
value7 = global.Object.values(r2).find(_fun92169);
unencryptedName = value2 == value7 ? value : value7.unencryptedName;
env0_0({names: a1, ownName: value2 != unencryptedName ? unencryptedName : value2, payload: a2});
} else {
value4 = environment.__proto__.__proto__;
require(env2_16);
return r0;
}
function useContactSyncAccount() { // fn#92171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2903, offset: 0x0207eb4c, size: 59 bytes, params: 1, frame: 13
return (require(566) /* metro dependency 566: flux */).useStateFromStores([ConnectedAccountsStore], function() {
return ConnectedAccountsStore.getLocalAccount(PlatformTypes.CONTACTS);
});
function _fun92172() { // fn#92172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2976, offset: 0x0207eb87, size: 30 bytes, params: 1, frame: 11
const connectedAccountsStoreBinding = ConnectedAccountsStore;
const getLocalAccount = connectedAccountsStoreBinding.getLocalAccount;
const CONTACTS = PlatformTypes.CONTACTS;
return Reflect.apply(getLocalAccount, connectedAccountsStoreBinding, [CONTACTS]);
}
}
function useContactSyncEnabled() { // fn#92173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:3038, offset: 0x0207eba5, size: 59 bytes, params: 1, frame: 13
return (FluxModule).useStateFromStores([ConnectedAccountsStore], _fun92174);
function _fun92174() { // fn#92174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:3111, offset: 0x0207ebe0, size: 41 bytes, params: 1, frame: 12
const value = environment.__proto__;
const isContactSyncEnabledBinding = isContactSyncEnabled;
const connectedAccountsStoreBinding = ConnectedAccountsStore;
const getLocalAccount = connectedAccountsStoreBinding.getLocalAccount;
const CONTACTS = PlatformTypes.CONTACTS;
return isContactSyncEnabledBinding(Reflect.apply(getLocalAccount, connectedAccountsStoreBinding, [CONTACTS]));
}
}
function useContactSyncUserIsDiscoverable() { // fn#92175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:3206, offset: 0x0207ec09, size: 127 bytes, params: 1, frame: 18
const FriendDiscoverySettings = (UserSettingsModule).FriendDiscoverySettings;
const value2 = FriendDiscoverySettings.useSetting();
let hasFlag = FlagUtilsModule.hasFlag;
const FIND_BY_PHONE = FriendDiscoveryFlags.FIND_BY_PHONE;
const value = Reflect.apply(hasFlag, FlagUtilsModule, [value2, FIND_BY_PHONE]);
hasFlag = FlagUtilsModule.hasFlag;
const FIND_BY_EMAIL = FriendDiscoveryFlags.FIND_BY_EMAIL;
const hasFlag2 = Reflect.apply(hasFlag, FlagUtilsModule, [value2, FIND_BY_EMAIL]);
return {phone: value, email: hasFlag2, any: value || hasFlag2};
}
return value;
}
function _fun92169({phone}) { // fn#92169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12183:2615, offset: 0x0207eadf, size: 22 bytes, params: 2, frame: 2
return phone === env2_0;
}
global.__d(_fun92150, 11997, [5, 27, 5040, 11996, 11995, 661, 478, 5046, 480, 694, 11998, 3829, 1216, 566, 1391,
1948, 3853, 5080,
2]) /* metro module 11997, dependencies: [5, 27, 5040, 11996, 11995, 661, 478, 5046, 480, 694, 11998, 3829, 1216, 566, 1391, 1948, 3853, 5080, 2] */;
@@ -1,193 +1,246 @@
/* Metro module 12020; source: modules/contact_sync/native/components/AddPhoneScreens.tsx; dependencies: [5, 57, 31, 27, 1878, 11994, 33, 4501, 5314, 697, 1484, 4573, 1244, 9015, 9016, 11993, 632, 5459, 44, 9024, 9010, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
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 UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import AddPhone from '../../../verification/native/components/AddPhone.tsx'; /* Metro dependency 9015 */
import PhoneActionCreators from '../../../phone/PhoneActionCreators.tsx'; /* Metro dependency 9016 */
import VerifyPhone from '../../../verification/native/components/VerifyPhone.tsx'; /* Metro dependency 9024 */
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 UseStateFromStoresModule from '../../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as PhoneActionCreatorsModule from '../../../phone/PhoneActionCreators.tsx'; /* Metro dependency 9016 */
import * as ContactSyncModalActionCreatorsModule from '../ContactSyncModalActionCreators.tsx'; /* Metro dependency 11993 */
import * as ContactSyncModalStoreModule from '../ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
function _fun92320(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92320, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:6, offset: 0x02084a62, size: 437 bytes, params: 8, frame: 24
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const env0_8 = (require(11994) /* metro dependency 11994: ContactSyncModalStore */).useContactSyncModalStore;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object2.container = {paddingTop: NAV_BAR_HEIGHT + 32};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.redesignContainer = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW, paddingTop: NAV_BAR_HEIGHT + 32};
object2.header = {alignItems: 'center'};
object2.title = {textAlign: 'center'};
object2.subtitle = {'marginTop': 8, 'lineHeight': 18, 'textAlign': 'center'};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/AddPhoneScreens.tsx');
object = {};
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object.container = {paddingTop: NAV_BAR_HEIGHT + 32};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.redesignContainer = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW, paddingTop: NAV_BAR_HEIGHT + 32};
object.header = {alignItems: 'center'};
object.title = {textAlign: 'center'};
object.subtitle = {'marginTop': 8, 'lineHeight': 18, 'textAlign': 'center'};
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/AddPhoneScreens.tsx');
exports.AddPhoneScreen = AddPhoneScreen;
exports.VerifyPhoneScreen = VerifyPhoneScreen;
exports.VerifyPasswordScreen = VerifyPasswordScreen;
}
function AddPhoneScreen() { // fn#92321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:625, offset: 0x02084c17, size: 371 bytes, params: 1, frame: 26
const env0_0 = (UseNavigationNativeModule).useNavigation();
const styles = useStyles();
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const Xgb497 = (IndexNativeModule).t.Xgb497;
const view = (
<View style={styles.header}>
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [Xgb497])}
</Text>
<Text
style={styles.subtitle}
variant="text-sm/medium"
color="text-default"
>
{intl.string((IndexNativeModule).t.qFmzyo)}
</Text>
</View>
);
const ChangePhoneReason = (PhoneActionCreatorsModule).ChangePhoneReason;
const CONTACT_SYNC = ChangePhoneReason.CONTACT_SYNC;
return (
<AddPhone
style={styles.container}
reason={CONTACT_SYNC}
header={view}
onComplete={onComplete_92322}
/>
);
function AddPhoneScreenOnComplete(a0) { // fn#92322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1134, owner: AddPhoneScreen.onComplete, offset: 0x02084d8a, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (ContactSyncModalActionCreatorsModule).submitPhone(a0, env0_0);
}
function AddPhoneScreen() { // fn#92321, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:625, offset: 0x02084c17, size: 371 bytes, params: 1, frame: 26
const env0_0 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const Xgb497 = (require(1244) /* metro dependency 1244: indexNative */).t.Xgb497;
const view = <View style={styles.header}><Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl,
[Xgb497])}</Text><Text style={styles.subtitle} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qFmzyo)}</Text></View>;
const AddPhone = importDefault(9015) /* metro dependency 9015: AddPhone */;
const ChangePhoneReason = (require(9016) /* metro dependency 9016: PhoneActionCreators */).ChangePhoneReason;
const CONTACT_SYNC = ChangePhoneReason.CONTACT_SYNC;
return (
<AddPhone
style={styles.container}
reason={CONTACT_SYNC}
header={view}
onComplete={onComplete}
/>
);
}
function VerifyPhoneScreen() { // fn#92323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1186, offset: 0x02084dbb, size: 336 bytes, params: 1, frame: 23
const styles = useStyles();
const binding = env0_5;
let useState = binding.useState;
const value2 = Reflect.apply(useState, binding, [false]);
const binding2 = env0_4;
const value3 = binding2(value2, 2);
const property = value3[0];
const env0_0 = value3[1];
useState = binding.useState;
const value4 = binding2(Reflect.apply(useState, binding, []), 2);
const property2 = value4[0];
const env0_1 = value4[1];
const phone = useContactSyncModalStore().phone;
binding.useEffect(_fun92325, [(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(),
phone, (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore],
_fun92324)]);
const value7 = _fun92329();
(importDefault(44) /* metro dependency 44 */)(phone != null,
"Phone shouldn't be null when trying to verify the code");
return ((Component) => <Component phone={phone} loading={property} error={property2} backgroundStyle={styles.redesignContainer} disableKeyboardAvoidingView onCodeEnteredIntercept={value7} onVerified={onVerified} />)(importDefault(9024) /* metro dependency 9024: VerifyPhone */);
}
function VerifyPasswordScreen() { // fn#92334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2149, offset: 0x020850d4, size: 307 bytes, params: 1, frame: 22
const binding = env0_5;
const [property, env0_0] = env0_4(binding.useState(false), 2);
const value4 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const styles = useStyles();
const phoneToken = useContactSyncModalStore().phoneToken;
binding.useEffect(_fun92336, [value4,
(require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([UserStore], _fun92335)]);
(importDefault(44) /* metro dependency 44 */)(phoneToken != null,
"Phone token shouldn't be null when trying to verify the password");
return ((Component) => <Component hideUnverifiedBanner parentLoading={property} style={styles.redesignContainer} onSubmit={onSubmit} onError={onError} onSuccess={function() {
}} />)(importDefault(9010) /* metro dependency 9010: UserSettingsConfirmPassword */);
}
function AddPhoneScreenOnComplete(a0) { // fn#92322, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1134, owner: AddPhoneScreen.onComplete, offset: 0x02084d8a, size: 49 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).submitPhone(a0, env0_0);
}
function _fun92324() { // fn#92324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1377, offset: 0x02084f0b, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.phone;
}
function _fun92325() { // fn#92325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1455, offset: 0x02084f2e, size: 90 bytes, params: 1, frame: 14
var environment;
var value2;
var moduleValue;
if (env0_3 != null) {
value2 = environment.__proto__;
moduleValue = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
moduleValue.handlePhoneVerificationComplete(env0_3, env0_2).then(_fun92326);
}
return _fun92328;
}
function _fun92329() { // fn#92329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1645, offset: 0x02084feb, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun92331);
return _fun92332;
}
function VerifyPhoneScreen() { // fn#92323, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1186, offset: 0x02084dbb, size: 336 bytes, params: 1, frame: 23
const styles = useStyles();
let useState = ReactModule.useState;
const value2 = Reflect.apply(useState, ReactModule, [false]);
const value3 = Module00057(value2, 2);
const property = value3[0];
const env0_0 = value3[1];
useState = ReactModule.useState;
const value4 = Module00057(Reflect.apply(useState, ReactModule, []), 2);
const property2 = value4[0];
const env0_1 = value4[1];
const phone = useContactSyncModalStore().phone;
ReactModule.useEffect(_fun92325, [(UseNavigationNativeModule).useNavigation(),
phone, (UseStateFromStoresModule).useStateFromStores([UserStore],
_fun92324)]);
const value7 = _fun92329();
(Module00044)(phone != null,
"Phone shouldn't be null when trying to verify the code");
return ((Component) => <Component phone={phone} loading={property} error={property2} backgroundStyle={styles.redesignContainer} disableKeyboardAvoidingView onCodeEnteredIntercept={value7} onVerified={onVerified_92333} />)(VerifyPhone);
function _fun92324() { // fn#92324, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1377, offset: 0x02084f0b, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.phone;
}
function onVerified(a0) { // fn#92333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2080, owner: VerifyPhoneScreen.onVerified, offset: 0x020850a3, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
(require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).verifyPhoneWithPassword(a0, env0_2);
}
function _fun92325() { // fn#92325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1455, offset: 0x02084f2e, size: 90 bytes, params: 1, frame: 14
var environment;
var value2;
var moduleValue;
if (Module00005 != null) {
value2 = environment.__proto__;
moduleValue = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
moduleValue.handlePhoneVerificationComplete(Module00005, env0_2).then(_fun92326);
}
return _fun92328;
function _fun92326() { // fn#92326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1539, offset: 0x02084f88, size: 54 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
value = value.runAfterInteractions(_fun92327);
function _fun92327() { // fn#92327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1577, offset: 0x02084fbe, size: 18 bytes, params: 1, frame: 11
return env2_0(false);
}
}
function _fun92328() { // fn#92328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1592, offset: 0x02084fd0, size: 27 bytes, params: 1, frame: 9
const binding = env0_0;
if (binding != null) {
binding.cancel();
}
}
}
function _fun92329() { // fn#92329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1645, offset: 0x02084feb, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun92331);
return _fun92332;
function* _fun92331(a0) { // fn#92331, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1665, offset: 0x0208501a, size: 137 bytes, params: 2, frame: 16
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
require(true);
importDefault(undefined);
const value4 = env3_0(env3_2[15]);
yield value4.verifyPhone(a0);
const value5 = undefined;
if (false) {
return value5;
}
const codeIntercepted = value5.codeIntercepted;
const addedPhone = value5.addedPhone;
importDefault(value5.error);
if (!(addedPhone && codeIntercepted)) {
require(false);
}
return codeIntercepted;
}
function _fun92332() { // fn#92332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1811, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function VerifyPhoneScreenOnVerified(a0) { // fn#92333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2080, owner: VerifyPhoneScreen.onVerified, offset: 0x020850a3, size: 49 bytes, params: 2, frame: 14
const value = environment.__proto__;
(ContactSyncModalActionCreatorsModule).verifyPhoneWithPassword(a0, env0_2);
}
function _fun92336() { // fn#92336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2395, offset: 0x02085207, size: 90 bytes, params: 1, frame: 14
var environment;
var value2;
var moduleValue;
if (env0_3 != null) {
value2 = environment.__proto__;
moduleValue = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
moduleValue.handlePhoneVerificationComplete(env0_3, env0_1).then(_fun92337);
}
return _fun92339;
}
function VerifyPasswordScreenOnSubmit(a0) { // fn#92340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2749, owner: VerifyPasswordScreen.onSubmit, offset: 0x02085297, size: 86 bytes, params: 2, frame: 17
env0_0(true);
const defaultImport = importDefault(9016) /* metro dependency 9016: PhoneActionCreators */;
const addPhone = defaultImport.addPhone;
const phoneTokenBinding = phoneToken;
const ChangePhoneReason = (require(9016) /* metro dependency 9016: PhoneActionCreators */).ChangePhoneReason;
const CONTACT_SYNC = ChangePhoneReason.CONTACT_SYNC;
return Reflect.apply(addPhone, defaultImport, [phoneTokenBinding, a0, CONTACT_SYNC]);
}
function VerifyPasswordScreen() { // fn#92334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2149, offset: 0x020850d4, size: 307 bytes, params: 1, frame: 22
const [property, env0_0] = Module00057(ReactModule.useState(false), 2);
const value4 = (UseNavigationNativeModule).useNavigation();
const styles = useStyles();
const phoneToken = useContactSyncModalStore().phoneToken;
ReactModule.useEffect(_fun92336, [value4,
(UseStateFromStoresModule).useStateFromStores([UserStore], _fun92335)]);
(Module00044)(phoneToken != null,
"Phone token shouldn't be null when trying to verify the password");
return ((Component) => <Component hideUnverifiedBanner parentLoading={property} style={styles.redesignContainer} onSubmit={onSubmit_92340} onError={onError_92341} onSuccess={function() {
}} />)(importDefault(9010) /* metro dependency 9010: UserSettingsConfirmPassword */);
function _fun92335() { // fn#92335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2310, offset: 0x02084f0b, size: 35 bytes, params: 1, frame: 10
const value = environment.__proto__;
return UserStore.getCurrentUser()?.phone;
}
function _fun92326() { // fn#92326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1539, offset: 0x02084f88, size: 54 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
value = value.runAfterInteractions(_fun92327);
}
function _fun92336() { // fn#92336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2395, offset: 0x02085207, size: 90 bytes, params: 1, frame: 14
var environment;
var value2;
var moduleValue;
if (Module00005 != null) {
value2 = environment.__proto__;
moduleValue = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
moduleValue.handlePhoneVerificationComplete(Module00005, env0_1).then(_fun92337);
}
return _fun92339;
function _fun92337() { // fn#92337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2479, offset: 0x02085261, size: 54 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
value = value.runAfterInteractions(_fun92338);
function _fun92338() { // fn#92338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2517, offset: 0x02084fbe, size: 18 bytes, params: 1, frame: 11
return env2_0(false);
}
}
function _fun92339() { // fn#92339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2532, offset: 0x02084fd0, size: 27 bytes, params: 1, frame: 9
const binding = env0_0;
if (binding != null) {
binding.cancel();
}
}
}
function VerifyPasswordScreenOnSubmit(a0) { // fn#92340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2749, owner: VerifyPasswordScreen.onSubmit, offset: 0x02085297, size: 86 bytes, params: 2, frame: 17
env0_0(true);
const defaultImport = PhoneActionCreators;
const addPhone = defaultImport.addPhone;
const phoneTokenBinding = phoneToken;
const ChangePhoneReason = (PhoneActionCreatorsModule).ChangePhoneReason;
const CONTACT_SYNC = ChangePhoneReason.CONTACT_SYNC;
return Reflect.apply(addPhone, defaultImport, [phoneTokenBinding, a0, CONTACT_SYNC]);
}
function VerifyPasswordScreenOnError() { // fn#92341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2831, owner: VerifyPasswordScreen.onError, offset: 0x00d6ca9a, size: 18 bytes, params: 1, frame: 11
return env0_0(false);
}
function _fun92328() { // fn#92328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1592, offset: 0x02084fd0, size: 27 bytes, params: 1, frame: 9
const binding = env0_0;
if (binding != null) {
binding.cancel();
}
}
function* _fun92331(a0) { // fn#92331, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1665, offset: 0x0208501a, size: 137 bytes, params: 2, frame: 16
if (false) {
return undefined;
}
value = environment.__proto__.__proto__;
require(true);
importDefault(undefined);
const value4 = env3_0(env3_2[15]);
yield value4.verifyPhone(a0);
const value5 = undefined;
if (false) {
return value5;
}
const codeIntercepted = value5.codeIntercepted;
const addedPhone = value5.addedPhone;
importDefault(value5.error);
if (!(addedPhone && codeIntercepted)) {
require(false);
}
return codeIntercepted;
}
function _fun92337() { // fn#92337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:2479, offset: 0x02085261, size: 54 bytes, params: 1, frame: 12
var environment;
let value = environment.__proto__.__proto__;
value = require(5459) /* metro dependency 5459: RunAfterInteractionsUtils */;
value = value.runAfterInteractions(_fun92338);
}
function _fun92327() { // fn#92327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12206:1577, offset: 0x02084fbe, size: 18 bytes, params: 1, frame: 11
return env2_0(false);
}
global.__d(_fun92320, 12020, [5, 57, 31, 27, 1878, 11994, 33, 4501, 5314, 697, 1484, 4573, 1244, 9015, 9016, 11993,
632, 5459, 44, 9024, 9010,
2]) /* metro module 12020, dependencies: [5, 57, 31, 27, 1878, 11994, 33, 4501, 5314, 697, 1484, 4573, 1244, 9015, 9016, 11993, 632, 5459, 44, 9024, 9010, 2] */;
@@ -1,27 +1,31 @@
/* Metro module 12019; source: modules/contact_sync/native/components/ContactSyncBackToLanding.tsx; dependencies: [1484, 5282, 11993, 2] */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as NavigatorHeaderNativeModule from '../../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
function _fun92317(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92317, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12205:6, offset: 0x0208495c, size: 96 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/contact_sync/native/components/ContactSyncBackToLanding.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncBackToLanding.tsx');
exports.default = ContactSyncBackToLanding;
}
function ContactSyncBackToLanding(a0) { // fn#92318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12205:203, offset: 0x020849bc, size: 87 bytes, params: 2, frame: 16
const env0_0 = a0;
const env0_1 = (UseNavigationNativeModule).useNavigation();
const getHeaderBackButton = NavigatorHeaderNativeModule.getHeaderBackButton;
return Reflect.apply(getHeaderBackButton, NavigatorHeaderNativeModule, [_fun92319, true])(a0);
function _fun92319() { // fn#92319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12205:306, offset: 0x02084a13, size: 79 bytes, params: 1, frame: 12
var value2;
if (env0_0.navigateToLandingPage != null) {
env0_0.navigateToLandingPage();
} else {
value2 = environment.__proto__;
(require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).goBackToLanding(env0_1);
}
}
function ContactSyncBackToLanding(a0) { // fn#92318, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12205:203, offset: 0x020849bc, size: 87 bytes, params: 2, frame: 16
const env0_0 = a0;
const env0_1 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const value = require(5282) /* metro dependency 5282: NavigatorHeaderNative */;
const getHeaderBackButton = value.getHeaderBackButton;
return Reflect.apply(getHeaderBackButton, value, [_fun92319, true])(a0);
}
function _fun92319() { // fn#92319, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12205:306, offset: 0x02084a13, size: 79 bytes, params: 1, frame: 12
var value2;
if (env0_0.navigateToLandingPage != null) {
env0_0.navigateToLandingPage();
} else {
value2 = environment.__proto__;
(require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).goBackToLanding(env0_1);
}
}
global.__d(_fun92317, 12019, [1484, 5282, 11993, 2]) /* metro module 12019, dependencies: [1484, 5282, 11993, 2] */;
@@ -1,50 +1,58 @@
/* Metro module 12011; source: modules/contact_sync/native/components/ContactSyncError.tsx; dependencies: [31, 33, 4501, 4017, 4504, 4573, 2] */
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
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 _fun92283(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12197:6, offset: 0x02082b30, size: 214 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(33) /* metro dependency 33 */).jsx;
const env0_4 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({container: {justifyContent: 'center'},
ReactModule;
const env0_4 = (CreateStylesModule).createStyles({container: {justifyContent: 'center'},
error: {'paddingHorizontal': 16, 'textAlign': 'center'}});
object = {code: 'function ContactSyncErrorTsx1(){const{withTiming,hasError,ERROR_HEIGHT}=this.__closure;return{height:withTiming(hasError?ERROR_HEIGHT:0)};}'};
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncError.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncError.tsx');
exports.default = ContactSyncError;
function ContactSyncError({style, error}) { // fn#92284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12197:482, offset: 0x02082c06, size: 272 bytes, params: 2, frame: 23
const styles = useStyles();
const r12 = error != null && error !== '';
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const ContactSyncErrorL2 = ContactSyncErrorL;
const object = {};
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object.hasError = r12;
object.ERROR_HEIGHT = 44;
ContactSyncErrorL2.__closure = object;
ContactSyncErrorL2.__workletHash = 14558247431913;
ContactSyncErrorL2.__initData = env0_5;
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [ContactSyncErrorL2]);
const View = (ReanimatedRexport).View;
const items2 = [styles.container, style, value4];
const Text = (TextModule).Text;
return (
<View style={items2}>
<Text
variant="text-sm/medium"
color="text-feedback-critical"
style={styles.error}
>
{error}
</Text>
</View>
);
function ContactSyncErrorL() { // fn#92285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12197:588, owner: ContactSyncError.l, offset: 0x02082d16, size: 58 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
return {height: value.withTiming(env0_0 ? 44 : 0)};
}
}
}
function ContactSyncError({style, error}) { // fn#92284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12197:482, offset: 0x02082c06, size: 272 bytes, params: 2, frame: 23
const styles = useStyles();
const r12 = error != null && error !== '';
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = ContactSyncErrorL;
const object2 = {};
object2.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
object2.hasError = r12;
object2.ERROR_HEIGHT = 44;
closure.__closure = object2;
closure.__workletHash = 14558247431913;
closure.__initData = env0_5;
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
const items2 = [styles.container, style, value4];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={items2}>
<Text
variant="text-sm/medium"
color="text-feedback-critical"
style={styles.error}
>
{error}
</Text>
</View>
);
}
function ContactSyncErrorL() { // fn#92285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12197:588, owner: ContactSyncError.l, offset: 0x02082d16, size: 58 bytes, params: 1, frame: 13
let value = environment.__proto__;
value = require(4504) /* metro dependency 4504: timing */;
return {height: value.withTiming(env0_0 ? 44 : 0)};
}
global.__d(_fun92283, 12011, [31, 33, 4501, 4017, 4504, 4573,
2]) /* metro module 12011, dependencies: [31, 33, 4501, 4017, 4504, 4573, 2] */;
@@ -1,12 +1,23 @@
/* Metro module 12017; source: modules/contact_sync/native/components/ContactSyncInviteFriends.tsx; dependencies: [31, 27, 1878, 661, 33, 4501, 697, 566, 5475, 12018, 4573, 1244, 4578, 683, 3995, 9212, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import FastImage from '../../../../components_native/common/FastImage.tsx'; /* Metro dependency 5475 */
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 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 ShowShareActionSheetAndroidModule from '../../../action_sheet/native/showShareActionSheet.android.tsx'; /* Metro dependency 9212 */
function _fun92312(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92312, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12203:6, offset: 0x0208448a, size: 403 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_3 = (require(27) /* metro dependency 27 */).View;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
let value = require(661) /* metro dependency 661: Constants */;
ReactModule;
let value = ConstantsModule;
const env0_5 = value.AnalyticEvents;
const env0_6 = value.AnalyticsSections;
value = require(33) /* metro dependency 33 */;
@@ -15,75 +26,96 @@ function _fun92312(global, require, importDefault, importAll, module, exports, d
const env0_9 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.marginTop = PX_24;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.marginHorizontal = PX_16;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object.paddingBottom = PX_32;
const object2 = {};
const PX_24 = (Native).space.PX_24;
object2.marginTop = PX_24;
const PX_16 = (Native).space.PX_16;
object2.marginHorizontal = PX_16;
const PX_32 = (Native).space.PX_32;
object2.paddingBottom = PX_32;
const env0_10 = Reflect.apply(createStyles, value, [{container: {'flex': 1, 'alignItems': 'center',
'justifyContent': 'center', 'paddingHorizontal': 16}, art: {marginBottom: 16}, title: {'marginBottom': 8,
'textAlign': 'center'}, subtitle: {'lineHeight': 18, 'textAlign': 'center'}, button: object}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncInviteFriends.tsx');
'textAlign': 'center'}, subtitle: {'lineHeight': 18, 'textAlign': 'center'}, button: object2}]);
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncInviteFriends.tsx');
exports.default = _default_92313;
}
function _default_92313() { // fn#92313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12203:557, offset: 0x0208461d, size: 513 bytes, params: 1, frame: 28
const styles = useStyles();
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
let value = importDefault(5475) /* metro dependency 5475: FastImage */;
value = ((Component) => <Component style={styles.art} source={importDefault(12018) /* metro dependency 12018 */} />)(value);
const items2 = [value];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const ZxBpLf = (require(1244) /* metro dependency 1244: indexNative */).t.ZxBpLf;
items2[1] = <Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [ZxBpLf])}</Text>;
items2[2] = <Text style={styles.subtitle} variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['fXtCJ+'])}</Text>;
value = <View style={styles.container}>{items2}</View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
return (
<>
{value}
<View style={styles.button}>
<Button
variant="primary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6Qgrev'])}
onPress={onPress_92315}
/>
function _default_92313() { // fn#92313, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12203:557, offset: 0x0208461d, size: 513 bytes, params: 1, frame: 28
const styles = useStyles();
const env0_0 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
let value = FastImage;
value = ((Component) => <Component style={styles.art} source={importDefault(12018) /* metro dependency 12018 */} />)(value);
const items2 = [value];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const ZxBpLf = (require(1244) /* metro dependency 1244: indexNative */).t.ZxBpLf;
items2[1] = (
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [ZxBpLf])}
</Text>
);
items2[2] = (
<Text
style={styles.subtitle}
variant="text-sm/medium"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['fXtCJ+'])}
</Text>
);
value = (
<View style={styles.container}>
{items2}
</View>
</>
);
}
);
const Button = (ButtonNativeModule).Button;
return (
<>
{value}
<View style={styles.button}>
<Button
variant="primary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['6Qgrev'])}
onPress={onPress_92315}
/>
</View>
</>
);
function _default_92313OnPress() { // fn#92315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12203:1171, owner: _default_92313.onPress, offset: 0x0208481e, size: 248 bytes, params: 1, frame: 20
var r6;
var defaultImport2;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
let CONTACT_SYNC_MODAL = AnalyticsSections.CONTACT_SYNC_MODAL;
Reflect.apply(track, defaultImport, [FRIEND_ADD_VIEWED, {friend_add_type: 'Invite',
source_page: CONTACT_SYNC_MODAL}]);
const intl = (IndexNativeModule).intl;
const formatToPlainString = intl.formatToPlainString;
const property = (IndexNativeModule).t['6E9a1J'];
if (currentUser != null) {
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r6 = defaultImport2.getUserTag(currentUser);
} else {
r6 = '';
}
const value5 = Reflect.apply(formatToPlainString, intl, [property, {url: 'https://discord.com/', username: r6}]);
const showShareActionSheet = ShowShareActionSheetAndroidModule.showShareActionSheet;
CONTACT_SYNC_MODAL = AnalyticsSections.CONTACT_SYNC_MODAL;
Reflect.apply(showShareActionSheet, ShowShareActionSheetAndroidModule, [{message: value5}, CONTACT_SYNC_MODAL]);
}
function _default_92313OnPress() { // fn#92315, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12203:1171, owner: _default_92313.onPress, offset: 0x0208481e, size: 248 bytes, params: 1, frame: 20
var r6;
var defaultImport2;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const FRIEND_ADD_VIEWED = AnalyticEvents.FRIEND_ADD_VIEWED;
let CONTACT_SYNC_MODAL = AnalyticsSections.CONTACT_SYNC_MODAL;
Reflect.apply(track, defaultImport, [FRIEND_ADD_VIEWED, {friend_add_type: 'Invite',
source_page: CONTACT_SYNC_MODAL}]);
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const formatToPlainString = intl.formatToPlainString;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['6E9a1J'];
if (currentUser != null) {
defaultImport2 = importDefault(3995) /* metro dependency 3995: UserUtils */;
r6 = defaultImport2.getUserTag(currentUser);
} else {
r6 = '';
}
const value5 = Reflect.apply(formatToPlainString, intl, [property, {url: 'https://discord.com/', username: r6}]);
const showShareActionSheetAndroidModule = require(9212) /* metro dependency 9212: showShareActionSheetAndroid */;
const showShareActionSheet = showShareActionSheetAndroidModule.showShareActionSheet;
CONTACT_SYNC_MODAL = AnalyticsSections.CONTACT_SYNC_MODAL;
Reflect.apply(showShareActionSheet, showShareActionSheetAndroidModule, [{message: value5}, CONTACT_SYNC_MODAL]);
}
global.__d(_fun92312, 12017, [31, 27, 1878, 661, 33, 4501, 697, 566, 5475, 12018, 4573, 1244, 4578, 683, 3995, 9212,
2]) /* metro module 12017, dependencies: [31, 27, 1878, 661, 33, 4501, 697, 566, 5475, 12018, 4573, 1244, 4578, 683, 3995, 9212, 2] */;
@@ -1,42 +1,51 @@
/* Metro module 12006; source: modules/contact_sync/native/components/ContactSyncLandingImage.tsx; dependencies: [31, 27, 33, 4501, 12007, 12008, 2] */
import Module12007 from '../../../../by-id/module-12007.js'; /* Metro dependency 12007 */
import Module12008 from '../../../../by-id/module-12008.js'; /* Metro dependency 12008 */
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 CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
function _fun92274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12192:6, offset: 0x0208239e, size: 288 bytes, params: 8, frame: 19
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
ReactModule;
let value = ReactNativeModule;
const env0_2 = value.Image;
const env0_3 = value.View;
value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.Fragment;
const env0_6 = value.jsxs;
const env0_7 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({leftContainer: {'zIndex': 2,
const env0_7 = (CreateStylesModule).createStyles({leftContainer: {'zIndex': 2,
'height': 106, 'width': 102, 'position': 'absolute'}, landingImageLeft: {'left': 58, 'top': -92},
rightContainer: {'position': 'absolute', 'height': 113, 'width': 103}, landingImageRight: {'left': 134,
'top': -99}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncLandingImage.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncLandingImage.tsx');
exports.default = ContactSyncLandingImage;
function ContactSyncLandingImage() { // fn#92275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12192:505, offset: 0x020824be, size: 191 bytes, params: 1, frame: 23
const styles = useStyles();
return (
<>
<View style={styles.leftContainer}>
<Image
resizeMode="contain"
style={styles.landingImageLeft}
source={Module12007}
/>
</View>
<View style={styles.rightContainer}>
<Image
resizeMode="contain"
style={styles.landingImageRight}
source={Module12008}
/>
</View>
</>
);
}
}
function ContactSyncLandingImage() { // fn#92275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12192:505, offset: 0x020824be, size: 191 bytes, params: 1, frame: 23
const styles = useStyles();
return (
<>
<View style={styles.leftContainer}>
<Image
resizeMode="contain"
style={styles.landingImageLeft}
source={importDefault(12007) /* metro dependency 12007 */}
/>
</View>
<View style={styles.rightContainer}>
<Image
resizeMode="contain"
style={styles.landingImageRight}
source={importDefault(12008) /* metro dependency 12008 */}
/>
</View>
</>
);
}
global.__d(_fun92274, 12006, [31, 27, 33, 4501, 12007, 12008,
2]) /* metro module 12006, dependencies: [31, 27, 33, 4501, 12007, 12008, 2] */;
@@ -1,92 +1,123 @@
/* Metro module 12009; source: modules/contact_sync/native/components/ContactSyncLandingOnboardingRedesign.tsx; dependencies: [5, 31, 27, 4661, 33, 4501, 697, 5314, 4662, 12010, 4573, 1244, 4578, 12011, 12003, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import RedesignContactSyncDiscoverabilityFooter from './RedesignContactSyncDiscoverabilityFooter.tsx'; /* Metro dependency 12003 */
import Module12010 from '../../../../by-id/module-12010.js'; /* Metro dependency 12010 */
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 */
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NativePermissionConstantsModule from '../../../native_permissions/NativePermissionConstants.tsx'; /* Metro dependency 4661 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
function _fun92278(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12195:6, offset: 0x02082609, size: 538 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
let value = require(27) /* metro dependency 27 */;
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.Image;
const env0_7 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NativePermissionTypes;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
const env0_10 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
const value2 = -PX_32;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object2.content = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', 'textAlign': 'center',
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object.content = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', 'textAlign': 'center',
marginTop: value2 - NAV_BAR_HEIGHT};
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.headerImage = {'height': 135, 'width': 216, marginBottom: PX_24};
object.headerImage = {'height': 135, 'width': 216, marginBottom: PX_24};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.title = {marginBottom: PX_8};
object.title = {marginBottom: PX_8};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.subtitle = {marginBottom: PX_24};
object.subtitle = {marginBottom: PX_24};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.buttonContainer = {'height': 48, 'width': '100%', paddingHorizontal: PX_16};
const object3 = {};
object.buttonContainer = {'height': 48, 'width': '100%', paddingHorizontal: PX_16};
const object4 = {};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.paddingBottom = PX_4;
object3.justifyContent = 'flex-end';
object4.paddingBottom = PX_4;
object4.justifyContent = 'flex-end';
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.paddingHorizontal = PX_16;
object2.trailing = object3;
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncLandingOnboardingRedesign.tsx');
object4.paddingHorizontal = PX_16;
object.trailing = object4;
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncLandingOnboardingRedesign.tsx');
exports.default = _default_92279;
}
function _default_92279({onNext, loading, error, discoverabilityEnabled, setDiscoverabilityEnabled}) { // fn#92279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12195:725, offset: 0x02082823, size: 614 bytes, params: 2, frame: 33
const styles = useStyles();
const value3 = env0_4.useCallback(env0_3(_fun92281), [onNext]);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const items2 = [<Image resizeMode="contain" style={styles.headerImage} source={importDefault(12010) /* metro dependency 12010 */} />];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = <Text style={styles.title} variant="heading-xl/bold">{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['/G+nci']])}</Text>;
string = intl.string;
const G8zcHt = (require(1244) /* metro dependency 1244: indexNative */).t.G8zcHt;
items2[2] = <Text style={styles.subtitle} variant="text-sm/medium">{Reflect.apply(string, intl, [G8zcHt])}</Text>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
const LhlgY9 = (require(1244) /* metro dependency 1244: indexNative */).t.LhlgY9;
items2[3] = <View style={styles.buttonContainer}><Button variant="primary" size="lg" text={Reflect.apply(string,
intl, [LhlgY9])} onPress={value3} loading={loading} /></View>;
items2[4] = ((Component) => <Component error={error} />)(importDefault(12011) /* metro dependency 12011: ContactSyncError */);
return (
<>
<View style={styles.content}>
{items2}
function _default_92279({onNext, loading, error, discoverabilityEnabled, setDiscoverabilityEnabled}) { // fn#92279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12195:725, offset: 0x02082823, size: 614 bytes, params: 2, frame: 33
const styles = useStyles();
const value3 = ReactModule.useCallback(Module00005(_fun92281), [onNext]);
const jsxRuntimeEnv0_10Binding = jsxRuntimeEnv0_10;
const items2 = [
<Image
resizeMode="contain"
style={styles.headerImage}
source={Module12010}
/>,
];
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
items2[1] = (
<Text style={styles.title} variant="heading-xl/bold">
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['/G+nci']])}
</Text>
);
string = intl.string;
const G8zcHt = (require(1244) /* metro dependency 1244: indexNative */).t.G8zcHt;
items2[2] = (
<Text style={styles.subtitle} variant="text-sm/medium">
{Reflect.apply(string, intl, [G8zcHt])}
</Text>
);
const Button = (ButtonNativeModule).Button;
string = intl.string;
const LhlgY9 = (require(1244) /* metro dependency 1244: indexNative */).t.LhlgY9;
items2[3] = (
<View style={styles.buttonContainer}>
<Button
variant="primary"
size="lg"
text={Reflect.apply(string, intl, [LhlgY9])}
onPress={value3}
loading={loading}
/>
</View>
<View style={styles.trailing}>
{((Component) => <Component discoverabilityEnabled={discoverabilityEnabled} onValueChanged={setDiscoverabilityEnabled} />)(importDefault(12003) /* metro dependency 12003: RedesignContactSyncDiscoverabilityFooter */)}
</View>
</>
);
}
);
items2[4] = ((Component) => <Component error={error} />)(importDefault(12011) /* metro dependency 12011: ContactSyncError */);
return (
<>
<View style={styles.content}>
{items2}
</View>
<View style={styles.trailing}>
{((Component) => <Component discoverabilityEnabled={discoverabilityEnabled} onValueChanged={setDiscoverabilityEnabled} />)(RedesignContactSyncDiscoverabilityFooter)}
</View>
</>
);
function* _fun92281() { // fn#92281, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12195:840, offset: 0x02082a94, size: 86 bytes, params: 1, frame: 13
if (true) {
__proto__ = environment.__proto__.__proto__;
var value3 = env2_1(env2_2[8]);
var requestPermission = value3.requestPermission;
var CONTACTS = env2_7.CONTACTS;
yield Reflect.apply(requestPermission, value3, [CONTACTS]);
if (false) {
return undefined;
}
if (__proto__) {
__proto__ = environment.__proto__;
require();
}
}
}
function* _fun92281() { // fn#92281, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12195:840, offset: 0x02082a94, size: 86 bytes, params: 1, frame: 13
if (true) {
__proto__ = environment.__proto__.__proto__;
var value3 = env2_1(env2_2[8]);
var requestPermission = value3.requestPermission;
var CONTACTS = env2_7.CONTACTS;
yield Reflect.apply(requestPermission, value3, [CONTACTS]);
if (false) {
return undefined;
}
if (__proto__) {
__proto__ = environment.__proto__;
require();
}
}
}
global.__d(_fun92278, 12009, [5, 31, 27, 4661, 33, 4501, 697, 5314, 4662, 12010, 4573, 1244, 4578, 12011, 12003,
2]) /* metro module 12009, dependencies: [5, 31, 27, 4661, 33, 4501, 697, 5314, 4662, 12010, 4573, 1244, 4578, 12011, 12003, 2] */;
@@ -1,74 +1,160 @@
/* Metro module 12014; source: modules/contact_sync/native/components/ContactSyncNameInput.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 5463, 1244, 4573, 1305, 4578, 12011, 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 NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
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 _fun92293(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12200:6, offset: 0x020830af, size: 440 bytes, params: 8, frame: 26
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;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object2.flex = {flex: 1};
object2.content = {'flex': 1, 'padding': 16, 'paddingBottom': 0};
object2.title = {'marginBottom': 8, 'textAlign': 'center'};
object2.subtitle = {'lineHeight': 18, 'textAlign': 'center', 'marginBottom': 16};
const object4 = {'width': '100%', 'marginTop': 8, 'marginBottom': 12, 'padding': 12};
object = {};
object.flex = {flex: 1};
object.content = {'flex': 1, 'padding': 16, 'paddingBottom': 0};
object.title = {'marginBottom': 8, 'textAlign': 'center'};
object.subtitle = {'lineHeight': 18, 'textAlign': 'center', 'marginBottom': 16};
const object3 = {'width': '100%', 'marginTop': 8, 'marginBottom': 12, 'padding': 12};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object4.backgroundColor = BACKGROUND_BASE_LOWEST;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object2.input = object4;
object2.formSubtitle = {lineHeight: 16};
const object6 = {flexGrow: 0};
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object.input = object3;
object.formSubtitle = {lineHeight: 16};
const object5 = {flexGrow: 0};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object6.paddingTop = PX_16;
object5.paddingTop = PX_16;
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object6.paddingBottom = PX_12;
object2.button = object6;
object2.error = {marginTop: 8};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncNameInput.tsx');
object5.paddingBottom = PX_12;
object.button = object5;
object.error = {marginTop: 8};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncNameInput.tsx');
exports.default = _default_92294;
function _default_92294({loading, error, initialName, prefilledFromContactBook, onNext, onRemoveName}) { // fn#92294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12200:631, offset: 0x02083267, size: 1216 bytes, params: 2, frame: 37
prefilledFromContactBook = !(prefilledFromContactBook === undefined) && prefilledFromContactBook;
const styles = useStyles();
const [property, property2] = Module00057(ReactModule.useState(initialName), 2);
const insets = (UseSafeAreaInsetsKeyboardAwareNative)({includeKeyboardHeight: true}).insets;
const value5 = onRemoveName != null;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r17 = value5 ? Reflect.apply(string, intl, [t.i4jeWR]) : Reflect.apply(string, intl, [t.PDTjLN]);
const items4 = [styles.content];
items4[1] = {paddingBottom: insets.bottom};
const Text = (TextModule).Text;
string = intl.string;
const items2 = [
<Text
style={styles.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{value5 ? Reflect.apply(string, intl, [t['/OywGQ']]) : Reflect.apply(string, intl, [t['sO+NI5']])}
</Text>,
];
string = intl.string;
items2[1] = (
<Text
style={styles.subtitle}
variant="text-sm/medium"
color="text-default"
>
{value5 ? Reflect.apply(string, intl, [t['xCHh/t']]) : Reflect.apply(string, intl, [t.xI496M])}
</Text>
);
items2[2] = (
<Text variant="eyebrow" color="interactive-text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['42/D2U'])}
</Text>
);
const InputView = (NativeModule).InputView;
const ClearButtonVisibility = (NativeModule).ClearButtonVisibility;
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
items2[3] = (
<InputView
value={property}
onChangeText={property2}
style={styles.input}
autoFocus
showBorder={false}
showTopContainer={false}
clearButtonVisibility={WITH_CONTENT}
autoCorrect
autoComplete="name"
textContentType="name"
/>
);
items2[4] = (
prefilledFromContactBook
? (
<Text
style={styles.formSubtitle}
variant="text-xs/medium"
color="text-default"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bCQt9K)}
</Text>
)
: null
);
const items3 = [
<View style={styles.flex}>
{items2}
</View>,
];
const Button = (ButtonNativeModule).Button;
items3[1] = (
<Button
variant="primary"
size={value5 ? 'md' : 'lg'}
text={r17}
onPress={onPress_92295}
loading={loading}
disabled={property === ''}
/>
);
items3[2] = (
value5
? (
<View style={styles.button}>
<Button
variant="secondary"
size="md"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['91RssO'])}
onPress={onPress_92296}
/>
</View>
)
: null
);
items3[3] = ((Component) => <Component style={styles.error} error={error} />)(importDefault(12011) /* metro dependency 12011: ContactSyncError */);
return (
<View style={items4}>
{items3}
</View>
);
function _default_92294OnPress() { // fn#92295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12200:1952, owner: _default_92294.onPress, offset: 0x00d6dbf1, size: 20 bytes, params: 1, frame: 11
return onNext(env0_2);
}
function _default_92294OnPress_92296() { // fn#92296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12200:2123, owner: _default_92294.onPress, offset: 0x01b3f2ee, size: 30 bytes, params: 1, frame: 11
return onRemoveName?.();
}
}
}
function _default_92294({loading, error, initialName, prefilledFromContactBook, onNext, onRemoveName}) { // fn#92294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12200:631, offset: 0x02083267, size: 1216 bytes, params: 2, frame: 37
prefilledFromContactBook = !(prefilledFromContactBook === undefined) && prefilledFromContactBook;
const styles = useStyles();
const [property, property2] = env0_3(env0_4.useState(initialName), 2);
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const value5 = onRemoveName != null;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const r17 = value5 ? Reflect.apply(string, intl, [t.i4jeWR]) : Reflect.apply(string, intl, [t.PDTjLN]);
const items4 = [styles.content];
items4[1] = {paddingBottom: insets.bottom};
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const items2 = [<Text style={styles.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{value5 ? Reflect.apply(string,
intl, [t['/OywGQ']]) : Reflect.apply(string, intl, [t['sO+NI5']])}</Text>];
string = intl.string;
items2[1] = <Text style={styles.subtitle} variant="text-sm/medium" color="text-default">{value5 ? Reflect.apply(string,
intl, [t['xCHh/t']]) : Reflect.apply(string, intl, [t.xI496M])}</Text>;
items2[2] = <Text variant="eyebrow" color="interactive-text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['42/D2U'])}</Text>;
const InputView = (require(1305) /* metro dependency 1305: native */).InputView;
const ClearButtonVisibility = (require(1305) /* metro dependency 1305: native */).ClearButtonVisibility;
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
items2[3] = <InputView value={property} onChangeText={property2} style={styles.input} autoFocus showBorder={false} showTopContainer={false} clearButtonVisibility={WITH_CONTENT} autoCorrect autoComplete="name" textContentType="name" />;
items2[4] = prefilledFromContactBook ? <Text style={styles.formSubtitle} variant="text-xs/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bCQt9K)}</Text> : null;
const items3 = [<View style={styles.flex}>{items2}</View>];
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
items3[1] = <Button variant="primary" size={value5 ? 'md' : 'lg'} text={r17} onPress={onPress_92295} loading={loading} disabled={property === ''} />;
items3[2] = value5 ? <View style={styles.button}><Button variant="secondary" size="md" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['91RssO'])} onPress={onPress_92296} /></View> : null;
items3[3] = ((Component) => <Component style={styles.error} error={error} />)(importDefault(12011) /* metro dependency 12011: ContactSyncError */);
return (
<View style={items4}>
{items3}
</View>
);
}
global.__d(_fun92293, 12014, [57, 31, 27, 33, 4501, 697, 5463, 1244, 4573, 1305, 4578, 12011,
2]) /* metro module 12014, dependencies: [57, 31, 27, 33, 4501, 697, 5463, 1244, 4573, 1305, 4578, 12011, 2] */;
@@ -1,299 +1,317 @@
/* Metro module 13368; source: modules/contact_sync/native/components/ContactSyncNameUpdateModal.tsx; dependencies: [5, 57, 31, 27, 11995, 33, 5080, 4501, 697, 5314, 11997, 12001, 3857, 1244, 8947, 12014, 5282, 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 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 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 NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as ContactSyncConstantsModule from '../ContactSyncConstants.tsx'; /* Metro dependency 11995 */
import * as ContactSyncUtilsModule from '../ContactSyncUtils.tsx'; /* Metro dependency 11997 */
function _fun101785(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:6, offset: 0x0221f46c, size: 417 bytes, params: 8, frame: 23
var object4;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importDefault(57) /* metro dependency 57 */;
const env0_5 = importAll(31) /* metro dependency 31 */;
const env0_6 = (require(27) /* metro dependency 27 */).View;
const ContactSyncScenes = (require(11995) /* metro dependency 11995: ContactSyncConstants */).ContactSyncScenes;
const env0_8 = (require(33) /* metro dependency 33 */).jsx;
const closure = onClose_101786;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object5 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object5.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object5.paddingTop = NAV_BAR_HEIGHT + 32;
const env0_10 = Reflect.apply(createStyles, createStylesModule, [{container: object5}]);
object4 = {};
const ContactSyncScenes = (ContactSyncConstantsModule).ContactSyncScenes;
const onClose_1017862 = onClose_101786;
const createStyles = CreateStylesModule.createStyles;
const object2 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center'};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object2.paddingTop = NAV_BAR_HEIGHT + 32;
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [{container: object2}]);
object = {};
const NAME_INPUT = ContactSyncScenes.NAME_INPUT;
const object6 = {'render': null, 'ignoreKeyboard': true, 'fullscreen': true, 'headerLeft': null, 'title': ''};
object6.render = render_101793;
object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(closure);
object4[NAME_INPUT] = object6;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncNameUpdateModal.tsx');
const object3 = {'render': null, 'ignoreKeyboard': true, 'fullscreen': true, 'headerLeft': null, 'title': ''};
object3.render = render_101793;
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(onClose_1017862);
object[NAME_INPUT] = object3;
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncNameUpdateModal.tsx');
exports.default = ContactSyncNameUpdateModal;
}
function onClose_101786() { // fn#101786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:191, offset: 0x0221f60d, size: 37 bytes, params: 1, frame: 11
(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop();
}
function ContactSyncNameInputScreen_101787() { // fn#101787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:395, offset: 0x0221f632, size: 218 bytes, params: 1, frame: 20
const value2 = undefined;
const styles = useStyles();
const value3 = (require(11997) /* metro dependency 11997: ContactSyncUtils */).useContactSyncAccount();
const [property, env0_0] = env0_4(env0_5.useState(false), 2);
return (
<View style={styles.container}>
{((Component) => <Component onNext={_fun101788()} onRemoveName={onRemoveName} loading={property} initialName={(value3 == null ? value2 : value3.name) ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
</View>
);
}
function render_101793() { // fn#101793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:929, offset: 0x0221f839, size: 23 bytes, params: 1, frame: 13
return <ContactSyncNameInputScreen_101787 />;
}
function ContactSyncNameUpdateModal() { // fn#101794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:1173, offset: 0x0221f850, size: 69 bytes, params: 1, frame: 15
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const NAME_INPUT = ContactSyncScenes.NAME_INPUT;
return <Navigator initialRouteName={NAME_INPUT} screens={env0_12} />;
}
function _fun101788() { // fn#101788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:489, offset: 0x0221f70c, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun101790);
return _fun101791;
}
function* _fun101790(a0) { // fn#101790, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:509, offset: 0x0221f73b, size: 236 bytes, params: 2, frame: 20
var binding;
var binding2;
var property;
var value4;
var updateName;
var value5;
var value6;
var value7;
var error;
var binding3;
var value8;
var open;
var object2;
var binding4;
var intl;
var string;
var t;
var R0RpRX;
if (true) {
value = environment.__proto__.__proto__;
require(true);
try {
binding = env3_1;
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
return undefined;
}
try {
binding2 = env3_2;
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
return undefined;
}
try {
property = binding2[11];
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
return undefined;
}
try {
updateName = value4.updateName;
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
return undefined;
}
try {
value5 = Reflect.apply(updateName, value4, [a0]);
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
return undefined;
}
if (value7) {
return value6;
}
try {
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
return undefined;
}
try {
require(false);
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
return undefined;
}
try {
binding = env3_9;
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
return undefined;
}
try {
binding();
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object2 = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object2.content = Reflect.apply(string, intl, [R0RpRX]);
object2.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object2]);
require(false);
}
function onClose_101786() { // fn#101786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:191, offset: 0x0221f60d, size: 37 bytes, params: 1, frame: 11
(ModalActionCreators).pop();
}
function ContactSyncNameInputScreen_101787() { // fn#101787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:395, offset: 0x0221f632, size: 218 bytes, params: 1, frame: 20
const value2 = undefined;
const styles = useStyles();
const value3 = (ContactSyncUtilsModule).useContactSyncAccount();
const [property, env0_0] = Module00057(ReactModule.useState(false), 2);
return (
<View style={styles.container}>
{((Component) => <Component onNext={_fun101788()} onRemoveName={onRemoveName} loading={property} initialName={(value3 == null ? value2 : value3.name) ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
</View>
);
function _fun101788() { // fn#101788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:489, offset: 0x0221f70c, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun101790);
return _fun101791;
function* _fun101790(a0) { // fn#101790, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:509, offset: 0x0221f73b, size: 236 bytes, params: 2, frame: 20
var binding;
var binding2;
var property;
var value4;
var updateName;
var value5;
var value6;
var value7;
var error;
var binding3;
var value8;
var open;
var object;
var binding4;
var intl;
var string;
var t;
var R0RpRX;
if (true) {
value = environment.__proto__.__proto__;
require(true);
try {
binding = env3_1;
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
return undefined;
}
try {
binding2 = env3_2;
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
return undefined;
}
try {
property = binding2[11];
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
return undefined;
}
try {
value4 = binding(property);
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
return undefined;
}
try {
updateName = value4.updateName;
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
return undefined;
}
try {
value5 = Reflect.apply(updateName, value4, [a0]);
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
return undefined;
}
yield value5;
try {
value6 = undefined;
value7 = false;
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
return undefined;
}
if (value7) {
return value6;
}
try {
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
return undefined;
}
try {
require(false);
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
return undefined;
}
try {
binding = env3_9;
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
return undefined;
}
try {
binding();
} catch (error) {
binding = env3_1;
binding3 = env3_2;
value8 = binding(binding3[12]);
open = value8.open;
object = {key: 'ERROR_GENERIC_TITLE'};
binding4 = env3_0;
intl = binding4(binding3[13]).intl;
string = intl.string;
t = binding4(binding3[13]).t;
R0RpRX = t.R0RpRX;
object.content = Reflect.apply(string, intl, [R0RpRX]);
object.icon = binding(binding3[14]);
Reflect.apply(open, value8, [object]);
require(false);
}
}
}
function _fun101791() { // fn#101791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:708, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
function onRemoveName() { // fn#101792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:827, owner: ContactSyncNameInputScreen_101787.onRemoveName, offset: 0x0221f827, size: 18 bytes, params: 1, frame: 11
return env0_1(null);
}
}
function render_101793() { // fn#101793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:929, offset: 0x0221f839, size: 23 bytes, params: 1, frame: 13
return <ContactSyncNameInputScreen_101787 />;
}
function ContactSyncNameUpdateModal() { // fn#101794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13558:1173, offset: 0x0221f850, size: 69 bytes, params: 1, frame: 15
const Navigator = (NavigatorNativeModule).Navigator;
const NAME_INPUT = ContactSyncScenes.NAME_INPUT;
return <Navigator initialRouteName={NAME_INPUT} screens={env0_12} />;
}
}
global.__d(_fun101785, 13368, [5, 57, 31, 27, 11995, 33, 5080, 4501, 697, 5314, 11997, 12001, 3857, 1244, 8947,
12014, 5282, 5280,
2]) /* metro module 13368, dependencies: [5, 57, 31, 27, 11995, 33, 5080, 4501, 697, 5314, 11997, 12001, 3857, 1244, 8947, 12014, 5282, 5280, 2] */;
File diff suppressed because it is too large. Load diff
@@ -1,113 +1,169 @@
/* Metro module 12004; source: modules/contact_sync/native/components/ContactSyncSettingsActionSheet.tsx; dependencies: [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as ContactSyncModalStoreModule from '../ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
import * as ContactSyncUtilsModule from '../ContactSyncUtils.tsx'; /* Metro dependency 11997 */
function _fun92266(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92266, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12190:6, offset: 0x0208178f, size: 445 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_2 = (require(27) /* metro dependency 27 */).View;
let value = require(11994) /* metro dependency 11994: ContactSyncModalStore */;
ReactModule;
let value = ContactSyncModalStoreModule;
const env0_3 = value.setAllowEmail;
const env0_4 = value.setAllowPhone;
const env0_5 = value.setAllowSync;
const env0_6 = value.useContactSyncModalStore;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const Fonts = (ConstantsModule).Fonts;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, paddingBottom: 16};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object2.formRow = {'marginTop': 8, 'paddingVertical': 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
object2.syncRow = {marginTop: 24};
const object3 = {};
object = {};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.container = {backgroundColor: BACKGROUND_BASE_LOW, paddingBottom: 16};
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
object.formRow = {'marginTop': 8, 'paddingVertical': 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
object.syncRow = {marginTop: 24};
const object4 = {};
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
object3.fontFamily = PRIMARY_SEMIBOLD;
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
object3.color = INTERACTIVE_TEXT_ACTIVE;
object2.formText = object3;
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
object2.info = {'marginTop': 8, 'fontSize': 14, 'lineHeight': 18, 'paddingHorizontal': 16, color: TEXT_SUBTLE};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncSettingsActionSheet.tsx');
object4.fontFamily = PRIMARY_SEMIBOLD;
const INTERACTIVE_TEXT_ACTIVE = (Native).colors.INTERACTIVE_TEXT_ACTIVE;
object4.color = INTERACTIVE_TEXT_ACTIVE;
object.formText = object4;
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
object.info = {'marginTop': 8, 'fontSize': 14, 'lineHeight': 18, 'paddingHorizontal': 16, color: TEXT_SUBTLE};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncSettingsActionSheet.tsx');
exports.default = ContactSyncSettingsActionSheet;
function ContactSyncSettingsActionSheet() { // fn#92267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12190:782, offset: 0x0208194c, size: 1228 bytes, params: 1, frame: 32
const styles = useStyles();
const {allowPhone, allowEmail} = useContactSyncModalStore();
const r14 = allowPhone || allowEmail;
const FormRow = (NativeModule).FormRow;
const formRowProps3 = {DEPRECATED_style: [styles.formRow, styles.syncRow]};
const FormRow2 = (NativeModule).FormRow;
let Label = FormRow2.Label;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
formRowProps3.label = (
<Label
style={styles.formText}
text={Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.a5QL24])}
/>
);
formRowProps3.onPress = onPress_92268;
const FormRow3 = (NativeModule).FormRow;
let Checkbox = FormRow3.Checkbox;
formRowProps3.trailing = <Checkbox selected={r14} />;
const items2 = [
<FormRow {...formRowProps3} />,
];
const FormText = (NativeModule).FormText;
items2[1] = (
<FormText style={styles.info}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pfjsB5)}
</FormText>
);
items2[2] = (
<FormText style={styles.info}>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cW1nr9)}
</FormText>
);
items2[3] = (
<FormText style={styles.info}>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.eswIfi,
{learnMoreHook: learnMoreHook})}
</FormText>
);
const FormTitle = (NativeModule).FormTitle;
items2[4] = (
<FormTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0t2wRW'])} thinTitle />
);
const formRowProps = {DEPRECATED_style: styles.formRow};
const FormRow4 = (NativeModule).FormRow;
Label = FormRow4.Label;
formRowProps.label = (
<Label
style={styles.formText}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eJnn0+'])}
/>
);
const Text = (TextModule).Text;
string = intl.string;
const X7pIKN = (require(1244) /* metro dependency 1244: indexNative */).t.X7pIKN;
formRowProps.subLabel = (
<Text variant="text-sm/medium" color="text-default">
{Reflect.apply(string, intl, [X7pIKN])}
</Text>
);
formRowProps.onPress = function() {
setAllowPhone(!allowPhone);
};
const FormRow5 = (NativeModule).FormRow;
Checkbox = FormRow5.Checkbox;
formRowProps.trailing = <Checkbox selected={allowPhone} />;
items2[5] = <FormRow {...formRowProps} />;
const formRowProps2 = {DEPRECATED_style: styles.formRow};
const FormRow6 = (NativeModule).FormRow;
Label = FormRow6.Label;
formRowProps2.label = (
<Label
style={styles.formText}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI4d4S)}
/>
);
formRowProps2.subLabel = (
<Text variant="text-sm/medium" color="text-default">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ilGsHE)}
</Text>
);
formRowProps2.onPress = function() {
setAllowEmail(!allowEmail);
};
const FormRow7 = (NativeModule).FormRow;
Checkbox = FormRow7.Checkbox;
formRowProps2.trailing = <Checkbox selected={allowEmail} />;
items2[6] = <FormRow {...formRowProps2} />;
const view = (
<View style={styles.container}>
{items2}
</View>
);
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
return (
<ActionSheet startExpanded>
{view}
</ActionSheet>
);
function ContactSyncSettingsActionSheetOnPress() { // fn#92268, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12190:1071, owner: ContactSyncSettingsActionSheet.onPress, offset: 0x02081e18, size: 26 bytes, params: 1, frame: 11
setAllowSync(!ReactNativeModule.View);
}
function learnMoreHook(a0, a1) { // fn#92269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12190:1393, owner: ContactSyncSettingsActionSheet.learnMoreHook, offset: 0x02081e32, size: 91 bytes, params: 3, frame: 17
const Text = (TextModule).Text;
return (
<Text
onPress={(ContactSyncUtilsModule).handleOpenLearnMoreLink}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
}
}
function ContactSyncSettingsActionSheet() { // fn#92267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12190:782, offset: 0x0208194c, size: 1228 bytes, params: 1, frame: 32
const styles = useStyles();
const {allowPhone, allowEmail} = useContactSyncModalStore();
const r14 = allowPhone || allowEmail;
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
const formRowProps3 = {DEPRECATED_style: [styles.formRow, styles.syncRow]};
const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow;
let Label = FormRow2.Label;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
formRowProps3.label = <Label style={styles.formText} text={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.a5QL24])} />;
formRowProps3.onPress = onPress_92268;
const FormRow3 = (require(7972) /* metro dependency 7972: native */).FormRow;
let Checkbox = FormRow3.Checkbox;
formRowProps3.trailing = <Checkbox selected={r14} />;
const items2 = [<FormRow {...formRowProps3} />];
const FormText = (require(7972) /* metro dependency 7972: native */).FormText;
items2[1] = <FormText style={styles.info}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pfjsB5)}</FormText>;
items2[2] = <FormText style={styles.info}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cW1nr9)}</FormText>;
items2[3] = <FormText style={styles.info}>{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.eswIfi,
{learnMoreHook: learnMoreHook})}</FormText>;
const FormTitle = (require(7972) /* metro dependency 7972: native */).FormTitle;
items2[4] = <FormTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0t2wRW'])} thinTitle />;
const formRowProps = {DEPRECATED_style: styles.formRow};
const FormRow4 = (require(7972) /* metro dependency 7972: native */).FormRow;
Label = FormRow4.Label;
formRowProps.label = <Label style={styles.formText} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eJnn0+'])} />;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
string = intl.string;
const X7pIKN = (require(1244) /* metro dependency 1244: indexNative */).t.X7pIKN;
formRowProps.subLabel = <Text variant="text-sm/medium" color="text-default">{Reflect.apply(string, intl,
[X7pIKN])}</Text>;
formRowProps.onPress = function() {
setAllowPhone(!allowPhone);
};
const FormRow5 = (require(7972) /* metro dependency 7972: native */).FormRow;
Checkbox = FormRow5.Checkbox;
formRowProps.trailing = <Checkbox selected={allowPhone} />;
items2[5] = <FormRow {...formRowProps} />;
const formRowProps2 = {DEPRECATED_style: styles.formRow};
const FormRow6 = (require(7972) /* metro dependency 7972: native */).FormRow;
Label = FormRow6.Label;
formRowProps2.label = <Label style={styles.formText} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI4d4S)} />;
formRowProps2.subLabel = <Text variant="text-sm/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ilGsHE)}</Text>;
formRowProps2.onPress = function() {
setAllowEmail(!allowEmail);
};
const FormRow7 = (require(7972) /* metro dependency 7972: native */).FormRow;
Checkbox = FormRow7.Checkbox;
formRowProps2.trailing = <Checkbox selected={allowEmail} />;
items2[6] = <FormRow {...formRowProps2} />;
const view = <View style={styles.container}>{items2}</View>;
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
return (
<ActionSheet startExpanded>
{view}
</ActionSheet>
);
}
function ContactSyncSettingsActionSheetLearnMoreHook(a0, a1) { // fn#92269, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12190:1393, owner: ContactSyncSettingsActionSheet.learnMoreHook, offset: 0x02081e32, size: 91 bytes, params: 3, frame: 17
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<Text
onPress={(require(11997) /* metro dependency 11997: ContactSyncUtils */).handleOpenLearnMoreLink}
variant="text-sm/medium"
color="text-link"
key={a1}
>
{a0}
</Text>
);
}
global.__d(_fun92266, 12004, [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805,
2]) /* metro module 12004, dependencies: [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805, 2] */;
@@ -1,240 +1,309 @@
/* Metro module 12015; source: modules/contact_sync/native/components/ContactSyncSuggestions.tsx; dependencies: [57, 31, 27, 661, 12016, 33, 4501, 697, 5314, 4584, 4573, 3995, 1423, 8950, 1305, 1244, 3860, 4000, 21, 7972, 7705, 8416, 4589, 676, 4578, 683, 2] */
import SnowflakeUtils from '../../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AvatarUtils from '../../../../utils/AvatarUtils.tsx'; /* Metro dependency 1423 */
import defaultImport2 from '../../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
import UseScaledRowHeight from '../../../main_tabs_v2/native/shared_components/user_list/useScaledRowHeight.tsx'; /* Metro dependency 7705 */
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 ConstantsIOSModule from '../../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as UseTokenModule from '../../../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
import * as UserUtilsModule from '../../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import * as ColorUtilsModule from '../../../../utils/ColorUtils.tsx'; /* Metro dependency 4000 */
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 UseFontScaleModule from '../../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as FlashListModule from '../../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
import * as TableCheckboxRowNativeModule from '../../../../design/components/TableRow/native/TableCheckboxRow.native.tsx'; /* Metro dependency 8950 */
import * as FriendsScreenConstantsModule from '../../../main_tabs_v2/native/friends/screens/FriendsScreenConstants.tsx'; /* Metro dependency 12016 */
function _fun92297(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:6, offset: 0x02083727, size: 659 bytes, params: 8, frame: 24
var object4;
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(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_7 = (require(12016) /* metro dependency 12016: FriendsScreenConstants */).SuggestedFriendSource;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_8 = value.jsx;
const env0_9 = value.Fragment;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object4 = {};
const object5 = {flex: 1};
object = {};
const object2 = {flex: 1};
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
object5.backgroundColor = BACKGROUND_BASE_LOWER;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object5.paddingTop = NAV_BAR_HEIGHT + 32;
object5.justifyContent = 'center';
object4.container = object5;
const object7 = {alignItems: 'center'};
object2.backgroundColor = BACKGROUND_BASE_LOWER;
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object2.paddingTop = NAV_BAR_HEIGHT + 32;
object2.justifyContent = 'center';
object.container = object2;
const object3 = {alignItems: 'center'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.paddingTop = PX_16;
object3.paddingTop = PX_16;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object7.paddingBottom = PX_24;
object4.header = object7;
object4.title = {'marginBottom': 8, 'textAlign': 'center'};
object4.subtitle = {'lineHeight': 18, 'textAlign': 'center'};
object3.paddingBottom = PX_24;
object.header = object3;
object.title = {'marginBottom': 8, 'textAlign': 'center'};
object.subtitle = {'lineHeight': 18, 'textAlign': 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object4.list = {flex: 1, marginTop: PX_12};
object.list = {flex: 1, marginTop: PX_12};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object4.divider = {backgroundColor: BORDER_SUBTLE};
object4.linearGradient = {'position': 'absolute', 'width': '100%', 'bottom': 0, 'minHeight': 136};
const object8 = {'position': 'absolute', 'width': '100%', 'bottom': 0};
object.divider = {backgroundColor: BORDER_SUBTLE};
object.linearGradient = {'position': 'absolute', 'width': '100%', 'bottom': 0, 'minHeight': 136};
const object6 = {'position': 'absolute', 'width': '100%', 'bottom': 0};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object8.padding = PX_16;
object6.padding = PX_16;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object8.paddingBottom = PX_32;
object4.redesignButton = object8;
object6.paddingBottom = PX_32;
object.redesignButton = object6;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.sectionHeader = {'marginBottom': null, 'flexDirection': 'row', 'alignItems': 'center',
object.sectionHeader = {'marginBottom': null, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'space-between', marginBottom: PX_8};
const env0_11 = Reflect.apply(createStyles, value, [object4]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncSuggestions.tsx');
const env0_11 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncSuggestions.tsx');
exports.default = _default_92301;
}
function SuggestedFriendsSectionHeader({label}) { // fn#92298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:979, offset: 0x020839ba, size: 106 bytes, params: 2, frame: 18
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<View style={styles.sectionHeader}>
<Text color="text-muted" variant="text-sm/semibold">
{label}
</Text>
</View>
);
}
function SuggestionRow({start, end, suggestion, selected, onSelect}) { // fn#92299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:1178, offset: 0x02083a24, size: 493 bytes, params: 2, frame: 28
var r9;
var intl;
const name = suggestion.reasons[0]?.name;
const userTag = (require(3995) /* metro dependency 3995: UserUtils */).getUserTag(suggestion.suggested_user);
const r5 = name == null || name === '' ? userTag : name;
const userAvatarSource = (importDefault(1423) /* metro dependency 1423: AvatarUtils */).getUserAvatarSource(suggestion.suggested_user);
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
const object2 = {start: start, end: end};
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object2.icon = <Avatar source={userAvatarSource} size={REFRESH_MEDIUM_32} />;
object2.checked = selected;
object2.label = r5;
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const text = <Text variant="text-xs/medium" color="text-muted">{userTag}</Text>;
const value6 = suggestion.mutual_friends_count != null;
if (value6) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r9 = <Text variant="text-xs/medium" color="text-muted">{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.z7y34b,
{count: suggestion.mutual_friends_count})}</Text>;
} else {
r9 = value6;
}
object2.subLabel = <>{text}{r9}</>;
object2.onPress = function() {
return onSelect(suggestion.suggested_user.id);
};
return <TableCheckboxRow {...object2} />;
}
function _default_92301({friendSuggestions, onSubmit}) { // fn#92301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:1857, offset: 0x02083c30, size: 924 bytes, params: 2, frame: 30
const styles = useStyles();
const value2 = friendSuggestions.reduce(function(a0, a1) {
a0[a1.suggested_user.id] = true;
return a0;
}, {});
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
const useToken = useTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value3 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_BASE_LOW]);
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
const items = [colorUtilsModule.hexOpacityToRgba(value3, 0)];
const moduleValue3 = colorUtilsModule;
items[1] = moduleValue3.hexOpacityToRgba(value3, 100);
const binding = env0_4;
var [property, env0_4] = env0_3(binding.useState(value2), 2);
const value7 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale();
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
const value8 = PX_16 + PX_32 + 40;
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const value10 = value8 + Reflect.apply(max, Math, [18 * Math2.min(value7, 2) - 18, 0]);
const value11 = binding.useCallback(_fun92303, [property]);
const value13 = (importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(property).some(_fun92304);
const value14 = binding.useMemo(function() {
friendSuggestions.forEach(_fun92306);
return [{type: 'header'}];
}, [friendSuggestions, property]);
const value15 = binding.useCallback(_fun92307, [friendSuggestions.length, styles.divider, styles.header,
styles.subtitle, styles.title, value11]);
const value16 = (importDefault(7705) /* metro dependency 7705: useScaledRowHeight */)();
const items4 = [styles.container];
items4[1] = styles.list;
const FlashList = (require(8416) /* metro dependency 8416: flashList */).FlashList;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const items5 = [<FlashList contentContainerStyle={{paddingHorizontal: PX_16,
paddingBottom: value10}} data={value14} renderItem={value15} estimatedItemSize={value16} />];
const defaultImport2 = importDefault(4589) /* metro dependency 4589 */;
const {START, END} = (require(676) /* metro dependency 676: ConstantsIOS */).VerticalGradient;
items5[1] = ((Component) => <Component style={styles.linearGradient} start={START} end={END} pointerEvents="none" colors={items} />)(defaultImport2);
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items5[2] = <View style={styles.redesignButton}><Button variant="primary" size="lg" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['J5/69j'])} onPress={onPress_92308} disabled={!value13} /></View>;
return (
<View style={items4}>
{items5}
</View>
);
}
function _fun92303(a0) { // fn#92303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:2287, offset: 0x02083fe5, size: 47 bytes, params: 2, frame: 14
const binding = env0_4;
const object2 = {};
const binding2 = env0_3;
copyDataProperties(object2, binding2, undefined);
object2[a0] = !binding2[a0];
binding(object2);
}
function _fun92305() { // fn#92305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:2366, offset: 0x02084014, size: 56 bytes, params: 1, frame: 13
friendSuggestions.forEach(_fun92306);
return [{type: 'header'}];
}
function _fun92307({item, index}) { // fn#92307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:2549, offset: 0x02084094, size: 607 bytes, params: 2, frame: 28
var value;
var stylesBinding;
var jsxRuntimeEnv1_9Binding;
var object;
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 items2;
var items3;
if (item.type === 'header') {
value = environment.__proto__;
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
object = {};
stylesBinding = styles;
object.style = stylesBinding.header;
string = intl.string;
items2 = [<Text style={stylesBinding.title} accessibilityRole="header" variant="heading-xl/extrabold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl, [t['7Fjv54']])}</Text>];
string = intl.string;
items2[1] = <Text style={stylesBinding.subtitle} variant="text-sm/medium" color="text-default">{Reflect.apply(string,
intl, [t.ait1x0])}</Text>;
items3 = [<View {...object}>{items2}</View>];
string = intl.string;
items3[1] = <SuggestedFriendsSectionHeader label={Reflect.apply(string, intl, [t['1uAmCw']])} />;
function SuggestedFriendsSectionHeader({label}) { // fn#92298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:979, offset: 0x020839ba, size: 106 bytes, params: 2, frame: 18
const styles = useStyles();
const Text = (TextModule).Text;
return (
<>
{items3}
</>
<View style={styles.sectionHeader}>
<Text color="text-muted" variant="text-sm/semibold">
{label}
</Text>
</View>
);
}
const friendSuggestion = item.props.friendSuggestion;
const id = friendSuggestion.suggested_user.id;
value = environment.__proto__;
const Fragment = env1_4.Fragment;
const friendSuggestionsBinding = friendSuggestions;
return (
<Fragment key={id}>
<SuggestionRow
start={index === 1}
end={index === friendSuggestionsBinding.length}
suggestion={friendSuggestion}
selected={item.props.selected}
onSelect={env0_5}
/>
{index < friendSuggestionsBinding.length ? ((FormDivider) => <FormDivider iconPush style={styles.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider) : null}
</Fragment>
);
}
function _default_92301OnPress() { // fn#92308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:3837, owner: _default_92301.onPress, offset: 0x020842f3, size: 89 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.keys(env0_3);
value = value.filter(_fun92309);
onSubmit(value);
value.forEach(function(a0) {
var defaultImport = importDefault(dependencyMap[25]);
var FRIEND_SUGGESTION_ADDED = AnalyticEvents.FRIEND_SUGGESTION_ADDED;
defaultImport.track(FRIEND_SUGGESTION_ADDED, {suggested_user_id: a0,
suggestion_source: SuggestedFriendSource.USER_SUGGESTIONS, location: 'Contact Sync Suggestions'});
});
}
function _fun92306(a0) { // fn#92306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:2422, offset: 0x0208404c, size: 72 bytes, params: 2, frame: 14
env0_0.push({type: 'suggestedFriend', props: {friendSuggestion: a0, selected: env1_3[a0.suggested_user.id]}});
}
function _fun92309(a0) { // fn#92309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:3873, offset: 0x0208434c, size: 16 bytes, params: 2, frame: 2
return env1_3[a0];
function SuggestionRow({start, end, suggestion, selected, onSelect}) { // fn#92299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:1178, offset: 0x02083a24, size: 493 bytes, params: 2, frame: 28
var r9;
var intl;
const name = suggestion.reasons[0]?.name;
const userTag = (UserUtilsModule).getUserTag(suggestion.suggested_user);
const r5 = name == null || name === '' ? userTag : name;
const userAvatarSource = (AvatarUtils).getUserAvatarSource(suggestion.suggested_user);
const TableCheckboxRow = (TableCheckboxRowNativeModule).TableCheckboxRow;
const object = {start: start, end: end};
const Avatar = (NativeModule).Avatar;
const AvatarSizes = (NativeModule).AvatarSizes;
const REFRESH_MEDIUM_32 = AvatarSizes.REFRESH_MEDIUM_32;
object.icon = <Avatar source={userAvatarSource} size={REFRESH_MEDIUM_32} />;
object.checked = selected;
object.label = r5;
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const Text = (TextModule).Text;
const text = (
<Text variant="text-xs/medium" color="text-muted">
{userTag}
</Text>
);
const value6 = suggestion.mutual_friends_count != null;
if (value6) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r9 = (
<Text variant="text-xs/medium" color="text-muted">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.z7y34b,
{count: suggestion.mutual_friends_count})}
</Text>
);
} else {
r9 = value6;
}
object.subLabel = (
<>
{text}
{r9}
</>
);
object.onPress = function() {
return onSelect(suggestion.suggested_user.id);
};
return <TableCheckboxRow {...object} />;
}
function _default_92301({friendSuggestions, onSubmit}) { // fn#92301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:1857, offset: 0x02083c30, size: 924 bytes, params: 2, frame: 30
const styles = useStyles();
const value2 = friendSuggestions.reduce(function(a0, a1) {
a0[a1.suggested_user.id] = true;
return a0;
}, {});
const useToken = UseTokenModule.useToken;
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
const value3 = Reflect.apply(useToken, UseTokenModule, [BACKGROUND_BASE_LOW]);
const items2 = [ColorUtilsModule.hexOpacityToRgba(value3, 0)];
items2[1] = ColorUtilsModule.hexOpacityToRgba(value3, 100);
const binding = env0_4;
var [property, env0_4] = Module00057(binding.useState(value2), 2);
const value7 = (UseFontScaleModule).useFontScale();
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
const value8 = PX_16 + PX_32 + 40;
const Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
const value10 = value8 + Reflect.apply(max, Math, [18 * Math2.min(value7, 2) - 18, 0]);
const value11 = binding.useCallback(_fun92303, [property]);
const value13 = (SnowflakeUtils).keys(property).some(_fun92304);
const value14 = binding.useMemo(function() {
friendSuggestions.forEach(_fun92306);
return [{type: 'header'}];
}, [friendSuggestions, property]);
const value15 = binding.useCallback(_fun92307, [friendSuggestions.length, styles.divider, styles.header,
styles.subtitle, styles.title, value11]);
const value16 = (UseScaledRowHeight)();
const items4 = [styles.container];
items4[1] = styles.list;
const FlashList = (FlashListModule).FlashList;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const items5 = [
<FlashList
contentContainerStyle={{paddingHorizontal: PX_16, paddingBottom: value10}}
data={value14}
renderItem={value15}
estimatedItemSize={value16}
/>,
];
const {START, END} = (ConstantsIOSModule).VerticalGradient;
items5[1] = ((Component) => <Component style={styles.linearGradient} start={START} end={END} pointerEvents="none" colors={items2} />)(defaultImport2);
const Button = (ButtonNativeModule).Button;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
items5[2] = (
<View style={styles.redesignButton}>
<Button
variant="primary"
size="lg"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['J5/69j'])}
onPress={onPress_92308}
disabled={!value13}
/>
</View>
);
return (
<View style={items4}>
{items5}
</View>
);
function _fun92303(a0) { // fn#92303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:2287, offset: 0x02083fe5, size: 47 bytes, params: 2, frame: 14
const binding = env0_4;
const object = {};
copyDataProperties(object, Module00057, undefined);
object[a0] = !Module00057[a0];
binding(object);
}
function _fun92304(a0) { // fn#92304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:2343, offset: 0x00e658b7, size: 16 bytes, params: 2, frame: 2
return Module00057[a0];
}
function _fun92305() { // fn#92305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:2366, offset: 0x02084014, size: 56 bytes, params: 1, frame: 13
friendSuggestions.forEach(_fun92306);
return [{type: 'header'}];
function _fun92306(a0) { // fn#92306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:2422, offset: 0x0208404c, size: 72 bytes, params: 2, frame: 14
env0_0.push({type: 'suggestedFriend', props: {friendSuggestion: a0, selected: env1_3[a0.suggested_user.id]}});
}
}
function _fun92307({item, index}) { // fn#92307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:2549, offset: 0x02084094, size: 607 bytes, params: 2, frame: 28
var value;
var stylesBinding;
var jsxRuntimeEnv1_9Binding;
var object2;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var items2;
var items3;
if (item.type === 'header') {
value = environment.__proto__;
jsxRuntimeEnv1_9Binding = jsxRuntimeEnv1_9;
object2 = {};
stylesBinding = styles;
object2.style = stylesBinding.header;
string = intl.string;
items2 = [
<Text
style={stylesBinding.title}
accessibilityRole="header"
variant="heading-xl/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [t['7Fjv54']])}
</Text>,
];
string = intl.string;
items2[1] = (
<Text
style={stylesBinding.subtitle}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [t.ait1x0])}
</Text>
);
items3 = [
<View {...object2}>
{items2}
</View>,
];
string = intl.string;
items3[1] = <SuggestedFriendsSectionHeader label={Reflect.apply(string, intl, [t['1uAmCw']])} />;
return (
<>
{items3}
</>
);
}
const friendSuggestion = item.props.friendSuggestion;
const id = friendSuggestion.suggested_user.id;
value = environment.__proto__;
const Fragment = env1_4.Fragment;
const friendSuggestionsBinding = friendSuggestions;
return (
<Fragment key={id}>
<SuggestionRow
start={index === 1}
end={index === friendSuggestionsBinding.length}
suggestion={friendSuggestion}
selected={item.props.selected}
onSelect={ReactNativeModule.View}
/>
{
index < friendSuggestionsBinding.length
? ((FormDivider) => <FormDivider iconPush style={styles.divider} />)((require(7972) /* metro dependency 7972: native */).FormDivider)
: null
}
</Fragment>
);
}
function _default_92301OnPress() { // fn#92308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:3837, owner: _default_92301.onPress, offset: 0x020842f3, size: 89 bytes, params: 1, frame: 14
var environment;
let value = environment.__proto__;
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
value = value.keys(Module00057);
value = value.filter(_fun92309);
onSubmit(value);
value.forEach(function(a0) {
var defaultImport = importDefault(dependencyMap[25]);
var FRIEND_SUGGESTION_ADDED = AnalyticEvents.FRIEND_SUGGESTION_ADDED;
defaultImport.track(FRIEND_SUGGESTION_ADDED, {suggested_user_id: a0,
suggestion_source: SuggestedFriendSource.USER_SUGGESTIONS, location: 'Contact Sync Suggestions'});
});
function _fun92309(a0) { // fn#92309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12201:3873, offset: 0x0208434c, size: 16 bytes, params: 2, frame: 2
return env1_3[a0];
}
}
}
}
global.__d(_fun92297, 12015, [57, 31, 27, 661, 12016, 33, 4501, 697, 5314, 4584, 4573, 3995, 1423, 8950, 1305, 1244,
3860, 4000, 21, 7972, 7705, 8416, 4589, 676, 4578, 683,
2]) /* metro module 12015, dependencies: [57, 31, 27, 661, 12016, 33, 4501, 697, 5314, 4584, 4573, 3995, 1423, 8950, 1305, 1244, 3860, 4000, 21, 7972, 7705, 8416, 4589, 676, 4578, 683, 2] */;
@@ -1,64 +1,71 @@
/* Metro module 12618; source: modules/contact_sync/native/components/ContactSyncUpsellCTA.tsx; dependencies: [31, 11996, 661, 33, 4501, 697, 7972, 683, 11993, 6802, 1244, 12619, 2] */
import AnalyticsUtils from '../../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import Module12619 from '../../../../by-id/module-12619.js'; /* Metro dependency 12619 */
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
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 NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as ContactSyncPersistedStoreModule from '../ContactSyncPersistedStore.tsx'; /* Metro dependency 11996 */
function _fun96783(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#96783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12808:6, offset: 0x02166e60, size: 291 bytes, params: 8, frame: 24
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(11996) /* metro dependency 11996: ContactSyncPersistedStore */).dismissUpsellCTA;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_4 = constantsModule.AnalyticEvents;
const env0_5 = constantsModule.AnalyticsSections;
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
const object = {padding: 12};
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
const object2 = {padding: 12};
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object.backgroundColor = BACKGROUND_SURFACE_HIGH;
const env0_7 = Reflect.apply(createStyles, createStylesModule, [{container: object}]);
object2.backgroundColor = BACKGROUND_SURFACE_HIGH;
const env0_7 = Reflect.apply(createStyles, CreateStylesModule, [{container: object2}]);
value = value.memo(ContactSyncUpsellCTA);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncUpsellCTA.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/ContactSyncUpsellCTA.tsx');
exports.default = value;
function ContactSyncUpsellCTA({style, location}) { // fn#96784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12808:346, offset: 0x02166f83, size: 241 bytes, params: 2, frame: 20
const styles = useStyles();
const FormCTA = (NativeModule).FormCTA;
const formCTAProps = {onPress: onPress_96785, onLongPress: onLongPress_96786, style: [styles.container, style],
iconSource: Module12619};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const T6Rfd9 = (require(1244) /* metro dependency 1244: indexNative */).t.T6Rfd9;
formCTAProps.title = Reflect.apply(string, intl, [T6Rfd9]);
formCTAProps.subtitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.c6KIpg);
return <FormCTA {...formCTAProps} />;
function ContactSyncUpsellCTAOnPress() { // fn#96785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12808:442, owner: ContactSyncUpsellCTA.onPress, offset: 0x02167074, size: 160 bytes, params: 1, frame: 21
const value = environment.__proto__;
const defaultImport = AnalyticsUtils;
const track = defaultImport.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
const CONTACT_SYNC_MODAL = AnalyticsSections.CONTACT_SYNC_MODAL;
const locationBinding = location;
const value3 = 'Friends List Upsell';
Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: CONTACT_SYNC_MODAL,
location: {page: locationBinding != null ? location : value3}}]);
(require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).openContactSyncModal({},
{page: location ?? value3});
}
function ContactSyncUpsellCTAOnLongPress() { // fn#96786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12808:636, owner: ContactSyncUpsellCTA.onLongPress, offset: 0x02167114, size: 132 bytes, params: 1, frame: 18
var environment;
let value = environment.__proto__;
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
const showSimpleActionSheet = value.showSimpleActionSheet;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const WAI6xu = (IndexNativeModule).t.WAI6xu;
Reflect.apply(showSimpleActionSheet, value, [{'key': 'ContactSyncUpsellLongPress', 'options': null,
'hasIcons': false, options: [{label: Reflect.apply(string, intl, [WAI6xu]), onPress: function() {
dismissUpsellCTA();
}}]}]);
}
}
}
function ContactSyncUpsellCTA({style, location}) { // fn#96784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12808:346, offset: 0x02166f83, size: 241 bytes, params: 2, frame: 20
const styles = useStyles();
const FormCTA = (require(7972) /* metro dependency 7972: native */).FormCTA;
const formCTAProps = {onPress: onPress_96785, onLongPress: onLongPress_96786, style: [styles.container, style],
iconSource: importDefault(12619) /* metro dependency 12619 */};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const T6Rfd9 = (require(1244) /* metro dependency 1244: indexNative */).t.T6Rfd9;
formCTAProps.title = Reflect.apply(string, intl, [T6Rfd9]);
formCTAProps.subtitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.c6KIpg);
return <FormCTA {...formCTAProps} />;
}
function ContactSyncUpsellCTAOnPress() { // fn#96785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12808:442, owner: ContactSyncUpsellCTA.onPress, offset: 0x02167074, size: 160 bytes, params: 1, frame: 21
const value = environment.__proto__;
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
const track = defaultImport.track;
const OPEN_MODAL = AnalyticEvents.OPEN_MODAL;
const CONTACT_SYNC_MODAL = AnalyticsSections.CONTACT_SYNC_MODAL;
const locationBinding = location;
const value3 = 'Friends List Upsell';
Reflect.apply(track, defaultImport, [OPEN_MODAL, {type: CONTACT_SYNC_MODAL,
location: {page: locationBinding != null ? location : value3}}]);
(require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).openContactSyncModal({},
{page: location ?? value3});
}
function ContactSyncUpsellCTAOnLongPress() { // fn#96786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12808:636, owner: ContactSyncUpsellCTA.onLongPress, offset: 0x02167114, size: 132 bytes, params: 1, frame: 18
var environment;
let value = environment.__proto__;
value = require(6802) /* metro dependency 6802: showSimpleActionSheet */;
const showSimpleActionSheet = value.showSimpleActionSheet;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
Reflect.apply(showSimpleActionSheet, value, [{'key': 'ContactSyncUpsellLongPress', 'options': null,
'hasIcons': false, options: [{label: Reflect.apply(string, intl, [WAI6xu]), onPress: function() {
dismissUpsellCTA();
}}]}]);
}
global.__d(_fun96783, 12618, [31, 11996, 661, 33, 4501, 697, 7972, 683, 11993, 6802, 1244, 12619,
2]) /* metro module 12618, dependencies: [31, 11996, 661, 33, 4501, 697, 7972, 683, 11993, 6802, 1244, 12619, 2] */;
@@ -1,58 +1,76 @@
/* Metro module 12003; source: modules/contact_sync/native/components/RedesignContactSyncDiscoverabilityFooter.tsx; dependencies: [27, 661, 33, 4501, 697, 6808, 1244, 4573, 1948, 2] */
import HelpdeskUtils from '../../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as TableSwitchRowNativeModule from '../../../../design/components/TableRow/native/TableSwitchRow.native.tsx'; /* Metro dependency 6808 */
function _fun92264(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12189:6, offset: 0x020814e2, size: 345 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(27) /* metro dependency 27 */).View;
const env0_4 = (require(661) /* metro dependency 661: Constants */).HelpdeskArticles;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.Fragment;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
object = {};
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.footerText = {paddingTop: PX_8};
const object4 = {};
object.footerText = {paddingTop: PX_8};
const object3 = {};
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
object4.borderColor = INTERACTIVE_BACKGROUND_ACTIVE;
object4.borderWidth = 1;
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object4.overflow = 'hidden';
object3.borderColor = INTERACTIVE_BACKGROUND_ACTIVE;
object3.borderWidth = 1;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
object3.overflow = 'hidden';
const SHADOW_LOW = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_LOW;
copyDataProperties(object4, SHADOW_LOW, undefined);
object2.tableRowContainer = object4;
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/RedesignContactSyncDiscoverabilityFooter.tsx');
copyDataProperties(object3, SHADOW_LOW, undefined);
object.tableRowContainer = object3;
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/RedesignContactSyncDiscoverabilityFooter.tsx');
exports.default = RedesignContactSyncDiscoverabilityFooter;
function RedesignContactSyncDiscoverabilityFooter({discoverabilityEnabled, onValueChanged}) { // fn#92265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12189:543, offset: 0x0208163b, size: 340 bytes, params: 2, frame: 28
const styles = useStyles();
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
const TableSwitchRow = (TableSwitchRowNativeModule).TableSwitchRow;
const intl = (IndexNativeModule).intl;
const view = (
<View style={styles.tableRowContainer}>
<TableSwitchRow
label={intl.string((IndexNativeModule).t.a5QL24)}
onValueChange={onValueChanged}
value={discoverabilityEnabled}
start
end
/>
</View>
);
const Text = (TextModule).Text;
const format = intl.format;
const zopgpe = (IndexNativeModule).t.zopgpe;
const defaultImport = HelpdeskUtils;
const getArticleURL = defaultImport.getArticleURL;
const CONTACT_SYNC = HelpdeskArticles.CONTACT_SYNC;
return (
<>
{view}
<Text
style={styles.footerText}
variant="text-xs/medium"
color="text-muted"
>
{Reflect.apply(format, intl, [zopgpe, {helpdeskUrl: Reflect.apply(getArticleURL, defaultImport,
[CONTACT_SYNC])}])}
</Text>
</>
);
}
}
function RedesignContactSyncDiscoverabilityFooter({discoverabilityEnabled, onValueChanged}) { // fn#92265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12189:543, offset: 0x0208163b, size: 340 bytes, params: 2, frame: 28
const styles = useStyles();
const jsxRuntimeEnv0_6Binding = jsxRuntimeEnv0_6;
const TableSwitchRow = (require(6808) /* metro dependency 6808: TableSwitchRowNative */).TableSwitchRow;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = <View style={styles.tableRowContainer}><TableSwitchRow label={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a5QL24)} onValueChange={onValueChanged} value={discoverabilityEnabled} start end /></View>;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const format = intl.format;
const zopgpe = (require(1244) /* metro dependency 1244: indexNative */).t.zopgpe;
const defaultImport = importDefault(1948) /* metro dependency 1948: HelpdeskUtils */;
const getArticleURL = defaultImport.getArticleURL;
const CONTACT_SYNC = HelpdeskArticles.CONTACT_SYNC;
return (
<>
{view}
<Text
style={styles.footerText}
variant="text-xs/medium"
color="text-muted"
>
{Reflect.apply(format, intl, [zopgpe, {helpdeskUrl: Reflect.apply(getArticleURL, defaultImport,
[CONTACT_SYNC])}])}
</Text>
</>
);
}
global.__d(_fun92264, 12003, [27, 661, 33, 4501, 697, 6808, 1244, 4573, 1948,
2]) /* metro module 12003, dependencies: [27, 661, 33, 4501, 697, 6808, 1244, 4573, 1948, 2] */;
@@ -1,488 +1,531 @@
/* Metro module 12002; source: modules/contact_sync/native/components/RedesignContactSyncModal.tsx; dependencies: [5, 57, 31, 27, 1878, 7030, 11994, 11995, 661, 4661, 33, 4501, 697, 5314, 11993, 4573, 1244, 11997, 12003, 1585, 1484, 566, 12001, 477, 676, 683, 4080, 12004, 1962, 4662, 7704, 12005, 12006, 12009, 12012, 12013, 12014, 12015, 12017, 480, 5282, 12019, 12020, 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 UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import AppStateStore from '../../../../stores/native/AppStateStore.tsx'; /* Metro dependency 7030 */
import ThemedGradient from '../../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
import UseBackHandlerSkipPhoneScreens from './useBackHandlerSkipPhoneScreens.tsx'; /* Metro dependency 12012 */
import SkipHeaderButton from '../../../nuf/native/components/SkipHeaderButton.tsx'; /* Metro dependency 12013 */
import ContactSyncNameInput from './ContactSyncNameInput.tsx'; /* Metro dependency 12014 */
import ContactSyncBackToLanding from './ContactSyncBackToLanding.tsx'; /* Metro dependency 12019 */
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 AnalyticsUtilsModule from '../../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as NativePermissionConstantsModule from '../../../native_permissions/NativePermissionConstants.tsx'; /* Metro dependency 4661 */
import * as NavigatorNativeModule from '../../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
import * as ContactSyncModalActionCreatorsModule from '../ContactSyncModalActionCreators.tsx'; /* Metro dependency 11993 */
import * as ContactSyncModalStoreModule from '../ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
import * as UseBackHandlerSkipPhoneScreensModule from './useBackHandlerSkipPhoneScreens.tsx'; /* Metro dependency 12012 */
import * as AddPhoneScreensModule from './AddPhoneScreens.tsx'; /* Metro dependency 12020 */
function _fun92213(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:6, offset: 0x0207febf, size: 578 bytes, params: 8, frame: 23
const env0_0 = require;
const headerTitle_92214 = function() {
return null;
};
const headerLeft = function() {
const headerLeft_92215 = function() {
return null;
};
const closure = ContactSyncModal;
const ContactSyncModal2 = ContactSyncModal;
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 userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const appStateStore = importDefault(7030) /* metro dependency 7030: AppStateStore */;
let value = require(11994) /* metro dependency 11994: ContactSyncModalStore */;
let value = ContactSyncModalStoreModule;
const env0_9 = value.setName;
const env0_10 = value.useContactSyncModalStore;
const env0_11 = value.useIsOnboarding;
value = require(11995) /* metro dependency 11995: ContactSyncConstants */;
const env0_12 = value.ContactPermissions;
const env0_13 = value.ContactSyncScenes;
const env0_14 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_15 = (require(4661) /* metro dependency 4661: NativePermissionConstants */).NativePermissionTypes;
value = require(33) /* metro dependency 33 */;
const env0_16 = value.jsx;
const env0_17 = value.Fragment;
const env0_18 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
object.paddingTop = NAV_BAR_HEIGHT + 32;
const env0_19 = Reflect.apply(createStyles, value, [{container: object, landingTrailing: {textAlign: 'center'}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/RedesignContactSyncModal.tsx');
exports.default = closure;
const object2 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center'};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
object2.paddingTop = NAV_BAR_HEIGHT + 32;
const env0_19 = Reflect.apply(createStyles, value, [{container: object2, landingTrailing: {textAlign: 'center'}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/RedesignContactSyncModal.tsx');
exports.default = ContactSyncModal2;
exports.ContactSyncOnboardingModal = ContactSyncOnboardingModal;
}
function OnboardingTrailingLanding() { // fn#92216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:651, offset: 0x02080101, size: 161 bytes, params: 1, frame: 20
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const format = intl.format;
const property = (require(1244) /* metro dependency 1244: indexNative */).t['84S6+Z'];
const object = {};
object.learnMoreUrl = (require(11997) /* metro dependency 11997: ContactSyncUtils */).getOpenLearnMoreUrl();
return (
<Text
style={styles.landingTrailing}
variant="text-sm/medium"
color="text-muted"
>
{Reflect.apply(format, intl, [property, object])}
</Text>
);
}
function OnboardingTrailing({isOnboarding, discoverabilityEnabled, setDiscoverabilityEnabled}) { // fn#92217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:890, offset: 0x020801a2, size: 89 bytes, params: 2, frame: 16
var r0;
var value;
if (isOnboarding) {
r0 = <OnboardingTrailingLanding />;
} else {
value = importDefault(12003) /* metro dependency 12003: RedesignContactSyncDiscoverabilityFooter */;
value = ((Component) => <Component discoverabilityEnabled={discoverabilityEnabled} onValueChanged={setDiscoverabilityEnabled} />)(value);
r0 = value;
function OnboardingTrailingLanding() { // fn#92216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:651, offset: 0x02080101, size: 161 bytes, params: 1, frame: 20
const styles = useStyles();
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
const format = intl.format;
const property = (IndexNativeModule).t['84S6+Z'];
const object2 = {};
object2.learnMoreUrl = (require(11997) /* metro dependency 11997: ContactSyncUtils */).getOpenLearnMoreUrl();
return (
<Text
style={styles.landingTrailing}
variant="text-sm/medium"
color="text-muted"
>
{Reflect.apply(format, intl, [property, object2])}
</Text>
);
}
return r0;
}
function ContactSyncLandingScreen({openSettingsSheet, loading, setLoading, onComplete}) { // fn#92218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:1086, offset: 0x020801fb, size: 942 bytes, params: 2, frame: 36
var r8;
var defaultImport3;
var object6;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
const styles = useStyles();
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value3 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const env0_3 = value3;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const env0_4 = currentUser;
const phone = currentUser?.phone;
const env0_5 = phone;
const {permissionState, error} = useContactSyncModalStore();
const [property, property2] = env0_4(env0_5.useState(true), 2);
const value7 = useIsOnboarding();
const value8 = env0_5.useCallback(_fun92220, [currentUser?.email, property, value7, value3, setLoading, phone]);
env0_5.useEffect(_fun92225, [(require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore],
function() {
return AppStateStore.getState();
}, [])]);
env0_5.useEffect(_fun92226, [openSettingsSheet]);
const value11 = env0_5.useCallback(env0_3(_fun92228), [value8, onComplete]);
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
const value12 = ((Component) => <Component absolute />)(importDefault(7704) /* metro dependency 7704: ThemedGradient */);
const items2 = [styles.container];
items2[1] = {paddingBottom: bottom > 0 ? bottom : 16};
if (value7) {
defaultImport3 = importDefault(12005) /* metro dependency 12005: NewUserPermissionsOnboardingAndroid */;
r8 = ((Component) => <Component title={intl.string(t.DjcfHu)} subtitle={intl.string(t['kq+Cd3'])} trailing={<OnboardingTrailing isOnboarding={value7} discoverabilityEnabled={property} setDiscoverabilityEnabled={property2} />} header={((Component) => <Component />)(importDefault(12006) /* metro dependency 12006: ContactSyncLandingImage */)} loading={loading} showSkip={value7} onAllow={value11} onDontAllow={onDontAllow} />)(defaultImport3);
} else if (permissionState !== ContactPermissions.AUTHORIZED) {
defaultImport3 = importDefault(12005) /* metro dependency 12005: NewUserPermissionsOnboardingAndroid */;
r8 = ((Component) => <Component title={intl.string(t.DjcfHu)} subtitle={intl.string(t['kq+Cd3'])} trailing={<OnboardingTrailing isOnboarding={value7} discoverabilityEnabled={property} setDiscoverabilityEnabled={property2} />} header={((Component) => <Component />)(importDefault(12006) /* metro dependency 12006: ContactSyncLandingImage */)} loading={loading} showSkip={value7} onAllow={value11} onDontAllow={onDontAllow} />)(defaultImport3);
} else {
r8 = ((Component) => <Component onNext={value8} error={error} loading={loading} discoverabilityEnabled={property} setDiscoverabilityEnabled={property2} />)(importDefault(12009) /* metro dependency 12009: ContactSyncLandingOnboardingRedesign */);
}
return (
<>
{value12}
<View style={items2}>
{r8}
</View>
</>
);
}
function ContactSyncNameInputScreen({navigateToLandingPage}) { // fn#92230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:2787, offset: 0x020808ca, size: 346 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const [property, env0_2] = env0_4(env0_5.useState(false), 2);
const {name, isNameFromContactBook, error} = useContactSyncModalStore();
(importDefault(12012) /* metro dependency 12012: useBackHandlerSkipPhoneScreens */)(value2, navigateToLandingPage);
const value7 = env0_5.useCallback(_fun92231(), [value2]);
env0_5.useLayoutEffect(_fun92236, [property, value7, value2]);
const contactSyncNameInput = importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */;
const value8 = '';
return (
<View style={styles.container}>
{((Component) => <Component onNext={value7} error={error} loading={property} initialName={name ?? value8} prefilledFromContactBook={name != null && value8 !== name && isNameFromContactBook} />)(contactSyncNameInput)}
</View>
);
}
function ContactSyncSuggestionScreen({onComplete}) { // fn#92239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3462, offset: 0x02080b5e, size: 318 bytes, params: 2, frame: 20
var r0;
var value;
const styles = useStyles();
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
const suggestions = useContactSyncModalStore().suggestions;
(require(12012) /* metro dependency 12012: useBackHandlerSkipPhoneScreens */).useBackHandlerMinimizeApp();
env0_5.useLayoutEffect(_fun92241, [env0_5.useCallback(_fun92240, [onComplete, suggestions.length]), value2,
onComplete, suggestions.length]);
if (suggestions.length > 0) {
value = importDefault(12015) /* metro dependency 12015: ContactSyncSuggestions */;
value = ((Component) => <Component friendSuggestions={suggestions} onSubmit={onSubmit} />)(value);
r0 = value;
} else {
var viewBindingProps = {style: styles.container};
value = importDefault(12017) /* metro dependency 12017: ContactSyncInviteFriends */;
value = <View {...viewBindingProps}>{((Component) => <Component />)(value)}</View>;
r0 = value;
}
return r0;
}
function ContactSyncModal({onComplete, initialRoutes, openSettingsSheet}) { // fn#92245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4024, offset: 0x02080d95, size: 381 bytes, params: 2, frame: 21
const [property, env0_3] = env0_4(env0_5.useState(false), 2);
const value4 = useIsOnboarding();
env0_5.useEffect(_fun92246, [value4]);
const value5 = env0_5.useMemo(function() {
return onComplete ?? _fun92248;
}, [onComplete]);
var env0_5 = value5;
const value6 = env0_5.useMemo(_fun92249, [value4, property, openSettingsSheet, value5]);
env0_5.useEffect(function() {
return _fun92262;
}, [value4, value5]);
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const r5 = initialRoutes ?? [{name: ContactSyncScenes.WELCOME}];
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
<Navigator
screens={value6}
initialRouteStack={r5}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
}
function ContactSyncOnboardingModal(a0) { // fn#92263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:6825, offset: 0x0208149b, size: 71 bytes, params: 2, frame: 15
return (
<ContactSyncModal
onComplete={a0.route.params.onComplete}
openSettingsSheet={a0.openSettingsSheet}
initialRoutes={a0.initialRoutes}
/>
);
}
function _fun92220() { // fn#92220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:1420, offset: 0x020805a9, size: 56 bytes, params: 1, frame: 13
var environment;
setLoading(true);
const setTimeout = global.setTimeout;
const value = environment.__proto__;
setTimeout(env1_3(_fun92222), 25);
}
function _fun92225() { // fn#92225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:1741, offset: 0x020806eb, size: 116 bytes, params: 1, frame: 15
const value = environment.__proto__;
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && env0_9 === (require(676) /* metro dependency 676: ConstantsIOS */).AppStates.ACTIVE) {
(require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).refreshContactSyncPermissionStatus();
}
}
function _fun92226() { // fn#92226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:1865, offset: 0x0208075f, size: 150 bytes, params: 1, frame: 19
var defaultImport;
var defaultImport2;
var openLazy;
var value;
if (openSettingsSheet) {
value = environment.__proto__;
defaultImport = importDefault(dependencyMap[25]);
defaultImport.track(AnalyticEvents.OPEN_POPOUT, {type: 'Contact Sync', location: {page: 'Contact Sync'}});
defaultImport2 = importDefault(dependencyMap[26]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[28]);
value = value(dependencyMap[27], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'Contact Sync Info Settings']);
}
}
function* _fun92228() { // fn#92228, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:2060, offset: 0x02080800, size: 143 bytes, params: 1, frame: 15
var closeContactSyncModal;
var value6;
if (true) {
value = environment.__proto__.__proto__;
var value3 = env2_1(env2_2[29]);
var requestPermission = value3.requestPermission;
var CONTACTS = env2_15.CONTACTS;
yield Reflect.apply(requestPermission, value3, [CONTACTS]);
var value4 = undefined;
if (false) {
return value4;
}
if (value4) {
value = environment.__proto__;
AppStateStore();
function OnboardingTrailing({isOnboarding, discoverabilityEnabled, setDiscoverabilityEnabled}) { // fn#92217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:890, offset: 0x020801a2, size: 89 bytes, params: 2, frame: 16
var r0;
var value;
if (isOnboarding) {
r0 = <OnboardingTrailingLanding />;
} else {
value = env2_0(env2_2[14]);
closeContactSyncModal = value.closeContactSyncModal;
value6 = environment.__proto__;
Reflect.apply(closeContactSyncModal, value, [{onComplete: dependencyMap, skip: true}]);
value = importDefault(12003) /* metro dependency 12003: RedesignContactSyncDiscoverabilityFooter */;
value = ((Component) => <Component discoverabilityEnabled={discoverabilityEnabled} onValueChanged={setDiscoverabilityEnabled} />)(value);
r0 = value;
}
return r0;
}
}
function onDontAllow() { // fn#92229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:2591, owner: ContactSyncLandingScreen.onDontAllow, offset: 0x0208088f, size: 59 bytes, params: 1, frame: 13
const onCompleteBinding = onComplete;
let value = environment.__proto__;
value = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
value.closeContactSyncModal({onComplete: onCompleteBinding, skip: true});
}
function _fun92231() { // fn#92231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3012, offset: 0x02080a24, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun92233);
return _fun92235;
}
function _fun92236() { // fn#92236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3206, offset: 0x02080ade, size: 38 bytes, params: 1, frame: 12
const binding = env0_0;
binding.setOptions({headerRight: headerRight_92237});
}
function _fun92240(a0, a1) { // fn#92240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3628, offset: 0x02080c9c, size: 82 bytes, params: 3, frame: 14
const value = environment.__proto__;
(require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).closeContactSyncModal({onComplete: onComplete,
skip: a0, friendsFound: suggestions.length, friendsAdded: a1});
}
function _fun92241() { // fn#92241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3769, offset: 0x02080cee, size: 38 bytes, params: 1, frame: 12
const binding = env0_1;
binding.setOptions({headerRight: headerRight_92242});
}
function ContactSyncSuggestionScreenOnSubmit(a0) { // fn#92244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3931, owner: ContactSyncSuggestionScreen.onSubmit, offset: 0x02080d64, size: 49 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
return value.bulkAddFriendSuggestions(a0, onComplete);
}
function _fun92246() { // fn#92246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4165, offset: 0x02080f12, size: 49 bytes, params: 1, frame: 11
var value;
if (env0_4) {
value = environment.__proto__;
value = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
value.refreshContactSyncPermissionStatus();
}
}
function _fun92247() { // fn#92247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4243, offset: 0x02080f43, size: 30 bytes, params: 1, frame: 3
return onComplete ?? (function() {
});
}
function _fun92249() { // fn#92249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4283, offset: 0x02080f61, size: 68 bytes, params: 1, frame: 11
return getScreens_92250({isOnboarding: env0_4, loading: env0_2, setLoading: env0_3,
openSettingsSheet: openSettingsSheet, onComplete: env0_5});
}
function _fun92261() { // fn#92261, offset: 0x02081450, size: 11 bytes, params: 1, frame: 1
return _fun92262;
}
function* _fun92222() { // fn#92222, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:1445, offset: 0x020805ec, size: 237 bytes, params: 1, frame: 18
var environment;
var r5;
var binding;
var value12;
if (true) {
value = environment.__proto__.__proto__;
if (UserStore) {
value12 = environment.__proto__.__proto__.__proto__;
function ContactSyncLandingScreen({openSettingsSheet, loading, setLoading, onComplete}) { // fn#92218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:1086, offset: 0x020801fb, size: 942 bytes, params: 2, frame: 36
var r8;
var defaultImport3;
var object;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
const value3 = (UseNavigationNativeModule).useNavigation();
const env0_3 = value3;
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getCurrentUser();
});
const currentUser2 = currentUser;
const phone = currentUser?.phone;
const phone2 = phone;
const {permissionState, error} = useContactSyncModalStore();
const [property, property2] = currentUser2(phone2.useState(true), 2);
const value7 = useIsOnboarding();
const value8 = phone2.useCallback(_fun92220, [currentUser?.email, property, value7, value3, setLoading, phone]);
phone2.useEffect(_fun92225, [(require(566) /* metro dependency 566: flux */).useStateFromStores([AppStateStore],
function() {
return AppStateStore.getState();
}, [])]);
phone2.useEffect(_fun92226, [openSettingsSheet]);
const value11 = phone2.useCallback(env0_3(_fun92228), [value8, onComplete]);
const jsxRuntimeEnv0_17Binding = jsxRuntimeEnv0_17;
const value12 = ((Component) => <Component absolute />)(ThemedGradient);
const items2 = [styles.container];
items2[1] = {paddingBottom: bottom > 0 ? bottom : 16};
if (value7) {
defaultImport3 = importDefault(12005) /* metro dependency 12005: NewUserPermissionsOnboardingAndroid */;
r8 = ((Component) => <Component title={intl.string(t.DjcfHu)} subtitle={intl.string(t['kq+Cd3'])} trailing={<OnboardingTrailing isOnboarding={value7} discoverabilityEnabled={property} setDiscoverabilityEnabled={property2} />} header={((Component) => <Component />)(importDefault(12006) /* metro dependency 12006: ContactSyncLandingImage */)} loading={loading} showSkip={value7} onAllow={value11} onDontAllow={onDontAllow} />)(defaultImport3);
} else if (permissionState !== ContactPermissions.AUTHORIZED) {
defaultImport3 = importDefault(12005) /* metro dependency 12005: NewUserPermissionsOnboardingAndroid */;
r8 = ((Component) => <Component title={intl.string(t.DjcfHu)} subtitle={intl.string(t['kq+Cd3'])} trailing={<OnboardingTrailing isOnboarding={value7} discoverabilityEnabled={property} setDiscoverabilityEnabled={property2} />} header={((Component) => <Component />)(importDefault(12006) /* metro dependency 12006: ContactSyncLandingImage */)} loading={loading} showSkip={value7} onAllow={value11} onDontAllow={onDontAllow} />)(defaultImport3);
} else {
binding = env3_1;
var value4 = undefined;
var value5 = binding(env3_2[22]);
var updateDiscoverability = value5.updateDiscoverability;
var object2 = {};
r5 = View ? (env2_4 == null ? value4 : env2_4.email) != null : !!View;
object2.email = r5;
r5 = View ? env2_5 != null : !!View;
object2.phone = r5;
yield Reflect.apply(updateDiscoverability, value5, [object2]);
if (false) {
return undefined;
r8 = ((Component) => <Component onNext={value8} error={error} loading={loading} discoverabilityEnabled={property} setDiscoverabilityEnabled={property2} />)(importDefault(12009) /* metro dependency 12009: ContactSyncLandingOnboardingRedesign */);
}
return (
<>
{value12}
<View style={items2}>
{r8}
</View>
</>
);
function _fun92220() { // fn#92220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:1420, offset: 0x020805a9, size: 56 bytes, params: 1, frame: 13
var environment;
setLoading(true);
const setTimeout = global.setTimeout;
const value = environment.__proto__;
setTimeout(env1_3(_fun92222), 25);
function* _fun92222() { // fn#92222, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:1445, offset: 0x020805ec, size: 237 bytes, params: 1, frame: 18
var environment;
var r5;
var binding;
var value12;
if (true) {
value = environment.__proto__.__proto__;
if (UserStore) {
value12 = environment.__proto__.__proto__.__proto__;
} else {
binding = env3_1;
var value4 = undefined;
var value5 = binding(env3_2[22]);
var updateDiscoverability = value5.updateDiscoverability;
var object = {};
r5 = View ? (env2_4 == null ? value4 : env2_4.email) != null : !!View;
object.email = r5;
r5 = View ? env2_5 != null : !!View;
object.phone = r5;
yield Reflect.apply(updateDiscoverability, value5, [object]);
if (false) {
return undefined;
}
}
var value13 = env3_0(env3_2[14]);
yield value13.startContactSync(env2_3);
if (false) {
return undefined;
}
global.setTimeout(function() {
return importDefault(false);
}, 2000);
}
}
}
function _fun92225() { // fn#92225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:1741, offset: 0x020806eb, size: 116 bytes, params: 1, frame: 15
const value = environment.__proto__;
if ((require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && env0_9 === (require(676) /* metro dependency 676: ConstantsIOS */).AppStates.ACTIVE) {
(require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).refreshContactSyncPermissionStatus();
}
}
var value13 = env3_0(env3_2[14]);
yield value13.startContactSync(env2_3);
if (false) {
return undefined;
function _fun92226() { // fn#92226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:1865, offset: 0x0208075f, size: 150 bytes, params: 1, frame: 19
var defaultImport;
var defaultImport2;
var openLazy;
var value;
if (openSettingsSheet) {
value = environment.__proto__;
defaultImport = importDefault(dependencyMap[25]);
defaultImport.track(AnalyticEvents.OPEN_POPOUT, {type: 'Contact Sync', location: {page: 'Contact Sync'}});
defaultImport2 = importDefault(dependencyMap[26]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[28]);
value = value(dependencyMap[27], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'Contact Sync Info Settings']);
}
}
global.setTimeout(function() {
return importDefault(false);
}, 2000);
}
}
function* _fun92233(a0) { // fn#92233, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3032, offset: 0x02080a53, size: 121 bytes, params: 2, frame: 15
var environment;
if (true) {
value = environment.__proto__.__proto__;
dependencyMap(true);
env3_9(a0);
var value4 = env3_0(env3_2[14]);
yield value4.startContactSync(require);
if (false) {
return undefined;
function* _fun92228() { // fn#92228, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:2060, offset: 0x02080800, size: 143 bytes, params: 1, frame: 15
var closeContactSyncModal;
var value6;
if (true) {
value = environment.__proto__.__proto__;
var value3 = env2_1(env2_2[29]);
var requestPermission = value3.requestPermission;
var CONTACTS = env2_15.CONTACTS;
yield Reflect.apply(requestPermission, value3, [CONTACTS]);
var value4 = undefined;
if (false) {
return value4;
}
if (value4) {
value = environment.__proto__;
AppStateStore();
} else {
value = env2_0(env2_2[14]);
closeContactSyncModal = value.closeContactSyncModal;
value6 = environment.__proto__;
Reflect.apply(closeContactSyncModal, value, [{onComplete: dependencyMap, skip: true}]);
}
}
}
global.setTimeout(function() {
return dependencyMap(false);
}, 2000);
function onDontAllow() { // fn#92229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:2591, owner: ContactSyncLandingScreen.onDontAllow, offset: 0x0208088f, size: 59 bytes, params: 1, frame: 13
const onCompleteBinding = onComplete;
let value = environment.__proto__;
value = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
value.closeContactSyncModal({onComplete: onCompleteBinding, skip: true});
}
}
}
function headerRight_92237() { // fn#92237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3237, offset: 0x02080b04, size: 70 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__.__proto__;
return ((Component) => <Component insideNavigator disabled={env1_1} onPress={onPress_92238} />)(importDefault(12013) /* metro dependency 12013: SkipHeaderButton */);
}
function ContactSyncNameInputScreen({navigateToLandingPage}) { // fn#92230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:2787, offset: 0x020808ca, size: 346 bytes, params: 2, frame: 25
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const [property, env0_2] = Module00057(ReactModule.useState(false), 2);
const {name, isNameFromContactBook, error} = useContactSyncModalStore();
(UseBackHandlerSkipPhoneScreens)(value2, navigateToLandingPage);
const value7 = ReactModule.useCallback(_fun92231(), [value2]);
ReactModule.useLayoutEffect(_fun92236, [property, value7, value2]);
const value8 = '';
return (
<View style={styles.container}>
{((Component) => <Component onNext={value7} error={error} loading={property} initialName={name ?? value8} prefilledFromContactBook={name != null && value8 !== name && isNameFromContactBook} />)(ContactSyncNameInput)}
</View>
);
function _fun92231() { // fn#92231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3012, offset: 0x02080a24, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun92233);
return _fun92235;
function* _fun92233(a0) { // fn#92233, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3032, offset: 0x02080a53, size: 121 bytes, params: 2, frame: 15
var environment;
if (true) {
value = environment.__proto__.__proto__;
dependencyMap(true);
env3_9(a0);
var value4 = env3_0(env3_2[14]);
yield value4.startContactSync(require);
if (false) {
return undefined;
}
global.setTimeout(function() {
return dependencyMap(false);
}, 2000);
}
}
function headerRight_92242() { // fn#92242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3800, offset: 0x02080d14, size: 59 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__.__proto__;
return ((Component) => <Component insideNavigator onPress={onPress_92243} />)(importDefault(12013) /* metro dependency 12013: SkipHeaderButton */);
}
function _fun92235() { // fn#92235, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3129, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
function getScreens_92250({isOnboarding, loading, setLoading, openSettingsSheet, onComplete, navigateToLandingPage}) { // fn#92250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4287, offset: 0x02080fa5, size: 804 bytes, params: 2, frame: 22
const object3 = {};
const WELCOME = ContactSyncScenes.WELCOME;
const object4 = {ignoreKeyboard: true};
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const CONTACT_SYNC_START = ImpressionNames.CONTACT_SYNC_START;
object4.impressionName = CONTACT_SYNC_START;
const ImpressionGroups = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionGroups;
let CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
object4.impressionProperties = {impression_group: CONTACT_SYNC_FLOW};
object4.fullscreen = true;
object4.headerTitle = headerTitle_92214;
object4.headerLeft = isOnboarding ? headerLeft : (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun92251);
object4.render = render_92252;
object3[WELCOME] = object4;
const NAME_INPUT = ContactSyncScenes.NAME_INPUT;
const CONTACT_SYNC_INPUT_NAME = ImpressionNames.CONTACT_SYNC_INPUT_NAME;
CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
headerTitle_92214Binding = headerTitle_92214;
const headerLeftBinding = headerLeft;
object3[NAME_INPUT] = {ignoreKeyboard: true, impressionName: CONTACT_SYNC_INPUT_NAME,
impressionProperties: {impression_group: CONTACT_SYNC_FLOW}, fullscreen: true,
headerTitle: headerTitle_92214Binding, headerLeft: headerLeftBinding, render: render_92253};
const SUGGESTIONS = ContactSyncScenes.SUGGESTIONS;
const CONTACT_SYNC_SUGGESTIONS = ImpressionNames.CONTACT_SYNC_SUGGESTIONS;
CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
object3[SUGGESTIONS] = {ignoreKeyboard: true, impressionName: CONTACT_SYNC_SUGGESTIONS,
impressionProperties: {impression_group: CONTACT_SYNC_FLOW}, fullscreen: true,
headerTitle: headerTitle_92214Binding, headerLeft: headerLeftBinding, render: render_92254};
const ADD_PHONE = ContactSyncScenes.ADD_PHONE;
const USER_ADD_PHONE = ImpressionNames.USER_ADD_PHONE;
CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
object3[ADD_PHONE] = {impressionName: USER_ADD_PHONE, impressionProperties: {impression_group: CONTACT_SYNC_FLOW},
fullscreen: true, headerTitle: headerTitle_92214Binding, headerLeft: headerLeft_92255, render: render_92256};
const VERIFY_PHONE = ContactSyncScenes.VERIFY_PHONE;
const USER_VERIFY_PHONE = ImpressionNames.USER_VERIFY_PHONE;
CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
object3[VERIFY_PHONE] = {impressionName: USER_VERIFY_PHONE,
impressionProperties: {impression_group: CONTACT_SYNC_FLOW}, fullscreen: true,
headerTitle: headerTitle_92214Binding, headerLeft: headerLeft_92257, render: render_92258};
const VERIFY_PASSWORD = ContactSyncScenes.VERIFY_PASSWORD;
const USER_VERIFY_PASSWORD = ImpressionNames.USER_VERIFY_PASSWORD;
CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
object3[VERIFY_PASSWORD] = {impressionName: USER_VERIFY_PASSWORD,
impressionProperties: {impression_group: CONTACT_SYNC_FLOW}, fullscreen: true, headerLeft: headerLeft_92259,
headerTitle: headerTitle_92214Binding, render: render_92260};
return object3;
}
}
function _fun92236() { // fn#92236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3206, offset: 0x02080ade, size: 38 bytes, params: 1, frame: 12
const binding = env0_0;
binding.setOptions({headerRight: headerRight_92237});
function headerRight_92237() { // fn#92237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3237, offset: 0x02080b04, size: 70 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__.__proto__;
return ((Component) => <Component insideNavigator disabled={env1_1} onPress={onPress_92238} />)(SkipHeaderButton);
function headerRight_92237OnPress() { // fn#92238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3291, owner: headerRight_92237.onPress, offset: 0x02080b4a, size: 20 bytes, params: 1, frame: 11
env2_3('');
}
}
}
function _fun92262() { // fn#92262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:6462, offset: 0x0208145b, size: 64 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (!env1_4) {
value2 = environment.__proto__.__proto__;
moduleValue = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
moduleValue.closeContactSyncModal({onComplete: env1_5});
}
function ContactSyncSuggestionScreen({onComplete}) { // fn#92239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3462, offset: 0x02080b5e, size: 318 bytes, params: 2, frame: 20
var r0;
var value;
const styles = useStyles();
const value2 = (UseNavigationNativeModule).useNavigation();
const suggestions = useContactSyncModalStore().suggestions;
(UseBackHandlerSkipPhoneScreensModule).useBackHandlerMinimizeApp();
ReactModule.useLayoutEffect(_fun92241, [ReactModule.useCallback(_fun92240, [onComplete, suggestions.length]), value2,
onComplete, suggestions.length]);
if (suggestions.length > 0) {
value = importDefault(12015) /* metro dependency 12015: ContactSyncSuggestions */;
value = ((Component) => <Component friendSuggestions={suggestions} onSubmit={onSubmit_92244} />)(value);
r0 = value;
} else {
var viewBindingProps = {style: styles.container};
value = importDefault(12017) /* metro dependency 12017: ContactSyncInviteFriends */;
value = (
<View {...viewBindingProps}>
{((Component) => <Component />)(value)}
</View>
);
r0 = value;
}
return r0;
function _fun92240(a0, a1) { // fn#92240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3628, offset: 0x02080c9c, size: 82 bytes, params: 3, frame: 14
const value = environment.__proto__;
(ContactSyncModalActionCreatorsModule).closeContactSyncModal({onComplete: onComplete,
skip: a0, friendsFound: suggestions.length, friendsAdded: a1});
}
function _fun92241() { // fn#92241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3769, offset: 0x02080cee, size: 38 bytes, params: 1, frame: 12
const binding = env0_1;
binding.setOptions({headerRight: headerRight_92242});
function headerRight_92242() { // fn#92242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3800, offset: 0x02080d14, size: 59 bytes, params: 1, frame: 14
var environment;
const value = environment.__proto__.__proto__;
return ((Component) => <Component insideNavigator onPress={onPress_92243} />)(SkipHeaderButton);
function headerRight_92242OnPress() { // fn#92243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3843, owner: headerRight_92242.onPress, offset: 0x02080d4f, size: 21 bytes, params: 1, frame: 13
return env2_3(true, 0);
}
}
}
function ContactSyncSuggestionScreenOnSubmit(a0) { // fn#92244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3931, owner: ContactSyncSuggestionScreen.onSubmit, offset: 0x02080d64, size: 49 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
return value.bulkAddFriendSuggestions(a0, onComplete);
}
}
function ContactSyncModal({onComplete, initialRoutes, openSettingsSheet}) { // fn#92245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4024, offset: 0x02080d95, size: 381 bytes, params: 2, frame: 21
const [property, env0_3] = Module00057(env0_5.useState(false), 2);
const value4 = useIsOnboarding();
env0_5.useEffect(_fun92246, [value4]);
const value5 = env0_5.useMemo(function() {
return onComplete ?? _fun92248;
}, [onComplete]);
var env0_5 = value5;
const value6 = env0_5.useMemo(_fun92249, [value4, property, openSettingsSheet, value5]);
env0_5.useEffect(function() {
return _fun92262;
}, [value4, value5]);
const Navigator = (NavigatorNativeModule).Navigator;
const r5 = initialRoutes ?? [{name: ContactSyncScenes.WELCOME}];
const intl = (IndexNativeModule).intl;
return (
<Navigator
screens={value6}
initialRouteStack={r5}
headerBackTitle={intl.string((IndexNativeModule).t['13/7kX'])}
/>
);
function _fun92246() { // fn#92246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4165, offset: 0x02080f12, size: 49 bytes, params: 1, frame: 11
var value;
if (Module00057) {
value = environment.__proto__;
value = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
value.refreshContactSyncPermissionStatus();
}
}
function _fun92247() { // fn#92247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4243, offset: 0x02080f43, size: 30 bytes, params: 1, frame: 3
return onComplete ?? (function() {
});
}
function _fun92249() { // fn#92249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4283, offset: 0x02080f61, size: 68 bytes, params: 1, frame: 11
return getScreens_92250({isOnboarding: Module00057, loading: env0_2, setLoading: env0_3,
openSettingsSheet: openSettingsSheet, onComplete: env0_5});
function getScreens_92250({isOnboarding, loading, setLoading, openSettingsSheet, onComplete, navigateToLandingPage}) { // fn#92250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4287, offset: 0x02080fa5, size: 804 bytes, params: 2, frame: 22
const object = {};
const WELCOME = ContactSyncScenes.WELCOME;
const object2 = {ignoreKeyboard: true};
const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames;
const CONTACT_SYNC_START = ImpressionNames.CONTACT_SYNC_START;
object2.impressionName = CONTACT_SYNC_START;
const ImpressionGroups = (AnalyticsUtilsModule).ImpressionGroups;
let CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
object2.impressionProperties = {impression_group: CONTACT_SYNC_FLOW};
object2.fullscreen = true;
object2.headerTitle = headerTitle_92214;
object2.headerLeft = isOnboarding ? headerLeft_92215 : (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(_fun92251);
object2.render = render_92252;
object[WELCOME] = object2;
const NAME_INPUT = ContactSyncScenes.NAME_INPUT;
const CONTACT_SYNC_INPUT_NAME = ImpressionNames.CONTACT_SYNC_INPUT_NAME;
CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
headerTitle_92214Binding = headerTitle_92214;
const headerLeft_92215Binding = headerLeft_92215;
object[NAME_INPUT] = {ignoreKeyboard: true, impressionName: CONTACT_SYNC_INPUT_NAME,
impressionProperties: {impression_group: CONTACT_SYNC_FLOW}, fullscreen: true,
headerTitle: headerTitle_92214Binding, headerLeft: headerLeft_92215Binding, render: render_92253};
const SUGGESTIONS = ContactSyncScenes.SUGGESTIONS;
const CONTACT_SYNC_SUGGESTIONS = ImpressionNames.CONTACT_SYNC_SUGGESTIONS;
CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
object[SUGGESTIONS] = {ignoreKeyboard: true, impressionName: CONTACT_SYNC_SUGGESTIONS,
impressionProperties: {impression_group: CONTACT_SYNC_FLOW}, fullscreen: true,
headerTitle: headerTitle_92214Binding, headerLeft: headerLeft_92215Binding, render: render_92254};
const ADD_PHONE = ContactSyncScenes.ADD_PHONE;
const USER_ADD_PHONE = ImpressionNames.USER_ADD_PHONE;
CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
object[ADD_PHONE] = {impressionName: USER_ADD_PHONE, impressionProperties: {impression_group: CONTACT_SYNC_FLOW},
fullscreen: true, headerTitle: headerTitle_92214Binding, headerLeft: headerLeft_92255, render: render_92256};
const VERIFY_PHONE = ContactSyncScenes.VERIFY_PHONE;
const USER_VERIFY_PHONE = ImpressionNames.USER_VERIFY_PHONE;
CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
object[VERIFY_PHONE] = {impressionName: USER_VERIFY_PHONE,
impressionProperties: {impression_group: CONTACT_SYNC_FLOW}, fullscreen: true,
headerTitle: headerTitle_92214Binding, headerLeft: headerLeft_92257, render: render_92258};
const VERIFY_PASSWORD = ContactSyncScenes.VERIFY_PASSWORD;
const USER_VERIFY_PASSWORD = ImpressionNames.USER_VERIFY_PASSWORD;
CONTACT_SYNC_FLOW = ImpressionGroups.CONTACT_SYNC_FLOW;
object[VERIFY_PASSWORD] = {impressionName: USER_VERIFY_PASSWORD,
impressionProperties: {impression_group: CONTACT_SYNC_FLOW}, fullscreen: true, headerLeft: headerLeft_92259,
headerTitle: headerTitle_92214Binding, render: render_92260};
return object;
function _fun92251() { // fn#92251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4679, offset: 0x020812c9, size: 59 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
return (ContactSyncModalActionCreatorsModule).closeContactSyncModal({onComplete: onComplete,
skip: true});
}
function getScreens_92250Render() { // fn#92252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4747, owner: getScreens_92250.render, offset: 0x02081304, size: 62 bytes, params: 1, frame: 14
return (
<ContactSyncLandingScreen
onComplete={onComplete}
openSettingsSheet={openSettingsSheet}
loading={loading}
setLoading={setLoading}
/>
);
}
function getScreens_92250Render_92253() { // fn#92253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:5087, owner: getScreens_92250.render, offset: 0x02081342, size: 35 bytes, params: 1, frame: 13
return <ContactSyncNameInputScreen navigateToLandingPage={navigateToLandingPage} />;
}
function getScreens_92250Render_92254() { // fn#92254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:5399, owner: getScreens_92250.render, offset: 0x02081365, size: 35 bytes, params: 1, frame: 13
return <ContactSyncSuggestionScreen onComplete={onComplete} />;
}
function getScreens_92250HeaderLeft(a0) { // fn#92255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:5653, owner: getScreens_92250.headerLeft, offset: 0x02081388, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['navigateToLandingPage']: navigateToLandingPage}} />)(ContactSyncBackToLanding);
}
function getScreens_92250Render_92256() { // fn#92256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:5706, owner: getScreens_92250.render, offset: 0x020813c9, size: 45 bytes, params: 1, frame: 13
const AddPhoneScreen = (AddPhoneScreensModule).AddPhoneScreen;
return <AddPhoneScreen />;
}
function getScreens_92250HeaderLeft_92257(a0) { // fn#92257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:5950, owner: getScreens_92250.headerLeft, offset: 0x02081388, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['navigateToLandingPage']: navigateToLandingPage}} />)(ContactSyncBackToLanding);
}
function getScreens_92250Render_92258() { // fn#92258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:6003, owner: getScreens_92250.render, offset: 0x020813f6, size: 45 bytes, params: 1, frame: 13
const VerifyPhoneScreen = (AddPhoneScreensModule).VerifyPhoneScreen;
return <VerifyPhoneScreen />;
}
function getScreens_92250HeaderLeft_92259(a0) { // fn#92259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:6232, owner: getScreens_92250.headerLeft, offset: 0x02081388, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['navigateToLandingPage']: navigateToLandingPage}} />)(ContactSyncBackToLanding);
}
function getScreens_92250Render_92260() { // fn#92260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:6309, owner: getScreens_92250.render, offset: 0x02081423, size: 45 bytes, params: 1, frame: 13
const VerifyPasswordScreen = (AddPhoneScreensModule).VerifyPasswordScreen;
return <VerifyPasswordScreen />;
}
}
}
function _fun92261() { // fn#92261, offset: 0x02081450, size: 11 bytes, params: 1, frame: 1
return _fun92262;
function _fun92262() { // fn#92262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:6462, offset: 0x0208145b, size: 64 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (!env1_4) {
value2 = environment.__proto__.__proto__;
moduleValue = require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */;
moduleValue.closeContactSyncModal({onComplete: env1_5});
}
}
}
}
function ContactSyncOnboardingModal(a0) { // fn#92263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:6825, offset: 0x0208149b, size: 71 bytes, params: 2, frame: 15
return (
<ContactSyncModal
onComplete={a0.route.params.onComplete}
openSettingsSheet={a0.openSettingsSheet}
initialRoutes={a0.initialRoutes}
/>
);
}
}
function headerRight_92237OnPress() { // fn#92238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3291, owner: headerRight_92237.onPress, offset: 0x02080b4a, size: 20 bytes, params: 1, frame: 11
env2_3('');
}
function headerRight_92242OnPress() { // fn#92243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:3843, owner: headerRight_92242.onPress, offset: 0x02080d4f, size: 21 bytes, params: 1, frame: 13
return env2_3(true, 0);
}
function _fun92251() { // fn#92251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4679, offset: 0x020812c9, size: 59 bytes, params: 1, frame: 12
const value = environment.__proto__.__proto__.__proto__;
return (require(11993) /* metro dependency 11993: ContactSyncModalActionCreators */).closeContactSyncModal({onComplete: onComplete,
skip: true});
}
function getScreens_92250Render() { // fn#92252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:4747, owner: getScreens_92250.render, offset: 0x02081304, size: 62 bytes, params: 1, frame: 14
return (
<ContactSyncLandingScreen
onComplete={onComplete}
openSettingsSheet={openSettingsSheet}
loading={loading}
setLoading={setLoading}
/>
);
}
function getScreens_92250Render_92253() { // fn#92253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:5087, owner: getScreens_92250.render, offset: 0x02081342, size: 35 bytes, params: 1, frame: 13
return <ContactSyncNameInputScreen navigateToLandingPage={navigateToLandingPage} />;
}
function getScreens_92250Render_92254() { // fn#92254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:5399, owner: getScreens_92250.render, offset: 0x02081365, size: 35 bytes, params: 1, frame: 13
return <ContactSyncSuggestionScreen onComplete={onComplete} />;
}
function getScreens_92250HeaderLeft(a0) { // fn#92255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:5653, owner: getScreens_92250.headerLeft, offset: 0x02081388, size: 65 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component {...a0} {...{['navigateToLandingPage']: navigateToLandingPage}} />)(importDefault(12019) /* metro dependency 12019: ContactSyncBackToLanding */);
}
function getScreens_92250Render_92256() { // fn#92256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:5706, owner: getScreens_92250.render, offset: 0x020813c9, size: 45 bytes, params: 1, frame: 13
const AddPhoneScreen = (require(12020) /* metro dependency 12020: AddPhoneScreens */).AddPhoneScreen;
return <AddPhoneScreen />;
}
function getScreens_92250Render_92258() { // fn#92258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:6003, owner: getScreens_92250.render, offset: 0x020813f6, size: 45 bytes, params: 1, frame: 13
const VerifyPhoneScreen = (require(12020) /* metro dependency 12020: AddPhoneScreens */).VerifyPhoneScreen;
return <VerifyPhoneScreen />;
}
function getScreens_92250Render_92260() { // fn#92260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12188:6309, owner: getScreens_92250.render, offset: 0x02081423, size: 45 bytes, params: 1, frame: 13
const VerifyPasswordScreen = (require(12020) /* metro dependency 12020: AddPhoneScreens */).VerifyPasswordScreen;
return <VerifyPasswordScreen />;
function _fun92248() { // fn#92248, offset: 0x00c37b63, size: 4 bytes, params: 1, frame: 1
}
global.__d(_fun92213, 12002, [5, 57, 31, 27, 1878, 7030, 11994, 11995, 661, 4661, 33, 4501, 697, 5314, 11993, 4573,
1244, 11997, 12003, 1585, 1484, 566, 12001, 477, 676, 683, 4080, 12004, 1962, 4662, 7704, 12005, 12006, 12009,
12012, 12013, 12014, 12015, 12017, 480, 5282, 12019, 12020, 5280,
2]) /* metro module 12002, dependencies: [5, 57, 31, 27, 1878, 7030, 11994, 11995, 661, 4661, 33, 4501, 697, 5314, 11993, 4573, 1244, 11997, 12003, 1585, 1484, 566, 12001, 477, 676, 683, 4080, 12004, 1962, 4662, 7704, 12005, 12006, 12009, 12012, 12013, 12014, 12015, 12017, 480, 5282, 12019, 12020, 5280, 2] */;
@@ -1,48 +1,52 @@
/* Metro module 12012; source: modules/contact_sync/native/components/useBackHandlerSkipPhoneScreens.tsx; dependencies: [27, 11995, 5286, 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 UseNavigatorBackPressHandlerNativeModule from '../../../../design/components/Navigator/native/useNavigatorBackPressHandler.native.tsx'; /* Metro dependency 5286 */
import * as ContactSyncConstantsModule from '../ContactSyncConstants.tsx'; /* Metro dependency 11995 */
function _fun92286(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12198:6, offset: 0x02082d50, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = (require(27) /* metro dependency 27 */).NativeModules;
const env0_3 = (require(11995) /* metro dependency 11995: ContactSyncConstants */).ContactSyncScenes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/contact_sync/native/components/useBackHandlerSkipPhoneScreens.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/contact_sync/native/components/useBackHandlerSkipPhoneScreens.tsx');
exports.default = useBackHandlerSkipPhoneScreens;
exports.useBackHandlerMinimizeApp = useBackHandlerMinimizeApp;
}
function useBackHandlerSkipPhoneScreens(a0, a1) { // fn#92287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12198:265, offset: 0x02082de8, size: 61 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(_fun92288);
}
function useBackHandlerMinimizeApp() { // fn#92289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12198:601, offset: 0x02082ed0, size: 47 bytes, params: 1, frame: 12
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(function() {
var MinimizeApp = NativeModules.MinimizeApp;
MinimizeApp.minimizeApp();
return true;
});
}
function _fun92288() { // fn#92288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12198:348, offset: 0x02082e25, size: 171 bytes, params: 1, frame: 14
var binding;
var items2;
var routes;
if (require != null) {
require();
} else {
binding = env0_0;
value = environment.__proto__;
items2 = [ContactSyncScenes.ADD_PHONE];
items2[1] = ContactSyncScenes.VERIFY_PHONE;
items2[2] = ContactSyncScenes.VERIFY_PASSWORD;
routes = binding.getState().routes;
if (routes.length <= 2) {
binding.pop();
} else if (items2.includes(routes[routes.length - 2].name)) {
binding.pop(routes.length - 1);
function useBackHandlerSkipPhoneScreens(a0, a1) { // fn#92287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12198:265, offset: 0x02082de8, size: 61 bytes, params: 3, frame: 12
const env0_0 = a0;
const env0_1 = a1;
(UseNavigatorBackPressHandlerNativeModule).useNavigatorBackPressHandler(_fun92288);
function _fun92288() { // fn#92288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12198:348, offset: 0x02082e25, size: 171 bytes, params: 1, frame: 14
var binding;
var items2;
var routes;
if (require != null) {
require();
} else {
binding = env0_0;
value = environment.__proto__;
items2 = [ContactSyncScenes.ADD_PHONE];
items2[1] = ContactSyncScenes.VERIFY_PHONE;
items2[2] = ContactSyncScenes.VERIFY_PASSWORD;
routes = binding.getState().routes;
if (routes.length <= 2) {
binding.pop();
} else if (items2.includes(routes[routes.length - 2].name)) {
binding.pop(routes.length - 1);
}
}
return true;
}
}
return true;
function useBackHandlerMinimizeApp() { // fn#92289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12198:601, offset: 0x02082ed0, size: 47 bytes, params: 1, frame: 12
(require(5286) /* metro dependency 5286: useNavigatorBackPressHandlerNative */).useNavigatorBackPressHandler(function() {
var MinimizeApp = NativeModules.MinimizeApp;
MinimizeApp.minimizeApp();
return true;
});
}
}
global.__d(_fun92286, 12012, [27, 11995, 5286, 2]) /* metro module 12012, dependencies: [27, 11995, 5286, 2] */;