/* Metro module 11489; source: modules/safety_hub/native/AppealIngestionModal.tsx; dependencies: [5, 57, 31, 27, 11473, 5267, 661, 33, 4501, 697, 4573, 566, 11479, 1484, 5268, 11488, 11480, 5266, 6618, 1244, 4578, 5282, 11490, 480, 11495, 11497, 11499, 11501, 11502, 6518, 5280, 2] */
function _fun88020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:6, offset: 0x01fd1aa4, size: 535 bytes, params: 8, frame: 22
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(5) /* metro dependency 5 */;
const env0_5 = importDefault(57) /* metro dependency 57 */;
const env0_6 = importAll(31) /* metro dependency 31 */;
const env0_7 = (require(27) /* metro dependency 27 */).View;
const safetyHubStore = importDefault(11473) /* metro dependency 11473: SafetyHubStore */;
let value = require(5267) /* metro dependency 5267: SafetyHubConstants */;
const env0_9 = value.APPEAL_INGESTION_IMPRESSION_PROPERTIES;
const env0_10 = value.AppealIngestionSections;
const env0_11 = (require(661) /* metro dependency 661: Constants */).EMPTY_STRING_SNOWFLAKE_ID;
value = require(33) /* metro dependency 33 */;
const env0_12 = value.jsx;
const env0_13 = value.jsxs;
const env0_14 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
object2.headerContainer = {'alignSelf': 'stretch', 'marginTop': 16, 'marginBottom': 8, 'paddingHorizontal': 16};
object2.header = {'marginBottom': 8, 'textAlign': 'center'};
object2.subheader = {'lineHeight': 20, 'marginBottom': 8, 'textAlign': 'center'};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object2.separator = {'height': 1, 'backgroundColor': null, 'marginVertical': 24, backgroundColor: BORDER_SUBTLE};
object2.footerContainer = {marginBottom: 16};
object2.footerText = {'marginBottom': 16, 'textAlign': 'center'};
object2.footerButton = {paddingHorizontal: 16};
const env0_15 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/safety_hub/native/AppealIngestionModal.tsx');
exports.default = AppealIngestionModal;
exports.AppealIngestionModalHeader = AppealIngestionModalHeader;
exports.AppealIngestionModalScreen = AppealIngestionModalScreen;
}
function getHeader(a0) { // fn#88021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:796, offset: 0x01fd1cbb, size: 58 bytes, params: 2, frame: 14
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return ;
}
function AppealIngestionModal({classificationId}) { // fn#88022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:975, offset: 0x01fd1cf5, size: 276 bytes, params: 2, frame: 18
const value3 = (require(11479) /* metro dependency 11479: useSafetyHubClassifications */).useSafetyHubClassification(classificationId);
const env0_0 = value3.isDsaEligible;
if (value3.classification?.is_spam) {
}
if (value3.classification?.is_coppa) {
}
const value6 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(function() {
return _fun88024(isDsaEligible, is_spam, is_coppa);
});
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
const SPEED_BUMP = AppealIngestionSections.SPEED_BUMP;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return (
);
}
function AppealIngestionModalHeader({headerText, subHeaderText}) { // fn#88037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:2802, offset: 0x01fd2200, size: 246 bytes, params: 2, frame: 23
const styles = useStyles();
const items2 = [headerText != null && headerText !== '' && ((Text) => {headerText})((require(4573) /* metro dependency 4573: Text */).Text)];
items2[1] = subHeaderText != null && subHeaderText.length > 0 ? ((Text) => {subHeaderText})((require(4573) /* metro dependency 4573: Text */).Text) : null;
return (
{items2}
);
}
function AppealIngestionModalScreen({children}) { // fn#88038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:3234, offset: 0x01fd22f6, size: 1277 bytes, params: 2, frame: 39
var r11;
var r7;
var SafeAreaPaddingView;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var object5;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var jsxRuntimeEnv0_14Binding;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items3;
var object9;
const env0_5 = undefined;
let env0_6 = undefined;
const styles = useStyles();
const isSubmitting = (require(566) /* metro dependency 566: flux */).useStateFromStores([SafetyHubStore],
function() {
return SafetyHubStore.getIsSubmitting();
});
const value3 = (require(11479) /* metro dependency 11479: useSafetyHubClassifications */).useSafetyHubAppealSignal();
const freeTextAppealReason = (require(566) /* metro dependency 566: flux */).useStateFromStores([SafetyHubStore],
function() {
return SafetyHubStore.getFreeTextAppealReason();
});
const appealClassificationId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SafetyHubStore],
function() {
return SafetyHubStore.getAppealClassificationId();
});
const value4 = (require(11479) /* metro dependency 11479: useSafetyHubClassifications */).useSafetyHubClassification(appealClassificationId ?? EMPTY_STRING_SNOWFLAKE_ID);
let is_spam = value4.classification?.is_spam;
is_spam = !!is_spam && is_spam;
let is_coppa = value4.classification?.is_coppa;
is_coppa = !!is_coppa && is_coppa;
const appeal_ingestion_type = value4.classification?.appeal_ingestion_type;
const value7 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
let r2 = appeal_ingestion_type != null && appeal_ingestion_type !== (require(5268) /* metro dependency 5268: SafetyHubModels */).AppealIngestionType.IN_APP;
r2 = !r2 ? is_coppa : r2;
r2 = !r2 ? is_spam : r2;
const value10 = !r2;
const binding = env0_6;
let useState = binding.useState;
const value11 = Reflect.apply(useState, binding, ['']);
const binding2 = env0_5;
const value12 = binding2(value11, 2);
const property = value12[0];
const env0_4 = value12[1];
useState = binding.useState;
const value13 = binding2(Reflect.apply(useState, binding, ['']), 2);
const property2 = value13[0];
env0_6 = value13[1];
binding.useEffect(_fun88042, [value7]);
const value14 = binding.useCallback(_fun88045, [value7, property2]);
const value16 = binding.useCallback(env0_4(_fun88047), [appealClassificationId, value3, freeTextAppealReason,
value14]);
const view = ;
if (r2) {
r7 = value10;
} else {
SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView;
var safeAreaPaddingViewProps = {bottom: true, style: styles.footerButton};
if (property2 === AppealIngestionSections.CONFIRM_SUBMISSION) {
jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14;
items3 = [{intl.string(t['d6qgY/'])}];
items3[1] = property !== '' && {property};
items3[2] = ;
r11 = <>{items3}>;
} else {
r11 = ;
}
r7 = {r11};
}
return (
{children}
{view}
{r7}
);
}
function _fun88023() { // fn#88023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:1211, offset: 0x01fd1e09, size: 35 bytes, params: 1, frame: 15
return getScreens_88024(isDsaEligible, is_spam, is_coppa);
}
function _fun88042() { // fn#88042, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:3935, offset: 0x01fd282e, size: 45 bytes, params: 1, frame: 14
const env0_0 = env0_3.addListener('state', _fun88043);
return _fun88044;
}
function _fun88045() { // fn#88045, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:4111, offset: 0x01fd28ca, size: 177 bytes, params: 1, frame: 13
let binding = env0_5;
const SPEED_BUMP = AppealIngestionSections.SPEED_BUMP;
if (binding === SPEED_BUMP) {
binding = env0_3;
binding.push(AppealIngestionSections.COLLECT_SIGNAL);
} else {
binding = env0_5;
if (binding === AppealIngestionSections.COLLECT_SIGNAL) {
binding = env0_3;
binding.push(AppealIngestionSections.CONFIRM_SUBMISSION);
} else {
binding = env0_5;
if (binding === AppealIngestionSections.CONFIRM_SUBMISSION) {
binding = env0_3;
binding.push(AppealIngestionSections.REQUEST_SENT);
} else {
(importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).close();
}
}
}
}
function* _fun88047() { // fn#88047, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:4301, offset: 0x01fd2986, size: 187 bytes, params: 1, frame: 20
var code;
var value3;
var binding;
var value4;
var binding2;
var property;
var value5;
var requestReview;
var value6;
var value7;
var value8;
var error;
var value9;
var binding3;
var value10;
var getRequestReviewErrorFromCode;
var body;
let value = undefined;
if (true) {
reduciblePort25: while (true) {
exceptionLanding22: while (true) {
value = undefined;
value3 = environment.__proto__;
if (importAll === null) {
break reduciblePort25;
}
try {
binding = env1_4;
} catch (error) {
break exceptionLanding22;
}
try {
binding('');
} catch (error) {
break exceptionLanding22;
}
value4 = environment.__proto__.__proto__;
try {
binding = env2_2;
} catch (error) {
break exceptionLanding22;
}
try {
binding2 = env2_3;
} catch (error) {
break exceptionLanding22;
}
try {
property = binding2[16];
} catch (error) {
break exceptionLanding22;
}
try {
value5 = binding(property);
} catch (error) {
break exceptionLanding22;
}
try {
requestReview = value5.requestReview;
} catch (error) {
break exceptionLanding22;
}
try {
} catch (error) {
break exceptionLanding22;
}
try {
} catch (error) {
break exceptionLanding22;
}
try {
} catch (error) {
break exceptionLanding22;
}
try {
value6 = Reflect.apply(requestReview, value5, [importAll, require, importDefault]);
} catch (error) {
break exceptionLanding22;
}
yield value6;
try {
value7 = undefined;
value8 = false;
} catch (error) {
break exceptionLanding22;
}
if (value8) {
return value7;
}
try {
} catch (error) {
break exceptionLanding22;
}
try {
View();
} catch (error) {
break exceptionLanding22;
}
break reduciblePort25;
}
binding = env1_4;
value9 = environment.__proto__.__proto__;
binding3 = env2_0;
value10 = binding3(env2_3[17]);
getRequestReviewErrorFromCode = value10.getRequestReviewErrorFromCode;
body = error.body;
reducibleJoin24: while (true) {
if (body == null) {
code = value;
break reducibleJoin24;
}
code = body.code;
break reducibleJoin24;
}
binding(Reflect.apply(getRequestReviewErrorFromCode, value10, [code]));
break reduciblePort25;
}
}
return value;
}
function getScreens_88024(a0, a1, a2) { // fn#88024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:1215, offset: 0x01fd1e2c, size: 677 bytes, params: 4, frame: 24
var environment;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const object8 = {};
const value = environment.__proto__.__proto__;
const SPEED_BUMP = AppealIngestionSections.SPEED_BUMP;
const object9 = {};
object9.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).close);
object9.headerTitle = function() {
return getHeader();
};
object9.render = render_88026;
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
const APPEAL_INGESTION_SPEED_BUMP = ImpressionNames.APPEAL_INGESTION_SPEED_BUMP;
object9.impressionName = APPEAL_INGESTION_SPEED_BUMP;
object9.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES;
object8[SPEED_BUMP] = object9;
const COLLECT_SIGNAL = AppealIngestionSections.COLLECT_SIGNAL;
const object10 = {};
object10.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton();
object10.headerTitle = function() {
return getHeader();
};
object10.render = render_88028;
const APPEAL_INGESTION_COLLECT_SIGNAL = ImpressionNames.APPEAL_INGESTION_COLLECT_SIGNAL;
object10.impressionName = APPEAL_INGESTION_COLLECT_SIGNAL;
object10.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES;
object8[COLLECT_SIGNAL] = object10;
const CONFIRM_SUBMISSION = AppealIngestionSections.CONFIRM_SUBMISSION;
const object11 = {};
object11.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton();
object11.headerTitle = function() {
return getHeader();
};
object11.render = render_88030;
const APPEAL_INGESTION_CONFIRM_SUBMISSION = ImpressionNames.APPEAL_INGESTION_CONFIRM_SUBMISSION;
object11.impressionName = APPEAL_INGESTION_CONFIRM_SUBMISSION;
object11.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES;
object8[CONFIRM_SUBMISSION] = object11;
const REQUEST_SENT = AppealIngestionSections.REQUEST_SENT;
const object12 = {};
object12.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).close);
object12.headerTitle = function() {
return getHeader();
};
object12.render = render_88032;
const APPEAL_INGESTION_REQUEST_SENT = ImpressionNames.APPEAL_INGESTION_REQUEST_SENT;
object12.impressionName = APPEAL_INGESTION_REQUEST_SENT;
object12.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES;
object8[REQUEST_SENT] = object12;
const THANKS = AppealIngestionSections.THANKS;
const object13 = {};
object13.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).close);
object13.headerTitle = function() {
return getHeader();
};
object13.render = render_88034;
const APPEAL_INGESTION_THANKS = ImpressionNames.APPEAL_INGESTION_THANKS;
object13.impressionName = APPEAL_INGESTION_THANKS;
object13.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES;
object8[THANKS] = object13;
const SPAM = AppealIngestionSections.SPAM;
const object14 = {};
object14.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).close);
object14.headerTitle = function() {
return getHeader();
};
object14.render = render_88036;
const APPEAL_INGESTION_SPAM = ImpressionNames.APPEAL_INGESTION_SPAM;
object14.impressionName = APPEAL_INGESTION_SPAM;
object14.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES;
object8[SPAM] = object14;
return object8;
}
function _fun88043() { // fn#88043, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:3969, offset: 0x01fd285b, size: 77 bytes, params: 1, frame: 12
let binding = env1_3;
let getState = binding.getState;
const routes = Reflect.apply(getState, binding, []).routes;
binding = env1_3;
getState = binding.getState;
env1_6(routes[Reflect.apply(getState, binding, []).routes.length - 1].name);
}
function _fun88044() { // fn#88044, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:4049, offset: 0x01fd28a8, size: 34 bytes, params: 1, frame: 13
env1_3.removeListener('state', env0_0);
}
function getScreens_88024Render() { // fn#88026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:1357, owner: getScreens_88024.render, offset: 0x01fd20e0, size: 69 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => )(importDefault(11490) /* metro dependency 11490: AppealIngestionSpeedBump */);
}
function getScreens_88024Render_88028() { // fn#88028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:1599, owner: getScreens_88024.render, offset: 0x01fd2125, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => )(importDefault(11495) /* metro dependency 11495: AppealIngestionCollectSignal */);
}
function getScreens_88024Render_88030() { // fn#88030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:1830, owner: getScreens_88024.render, offset: 0x01fd2158, size: 51 bytes, params: 1, frame: 14
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => )(importDefault(11497) /* metro dependency 11497: AppealIngestionConfirmSubmission */);
}
function getScreens_88024Render_88032() { // fn#88032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:2074, owner: getScreens_88024.render, offset: 0x01fd218b, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => )(importDefault(11499) /* metro dependency 11499: AppealIngestionRequestSent */);
}
function getScreens_88024Render_88034() { // fn#88034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:2291, owner: getScreens_88024.render, offset: 0x01fd21b2, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => )(importDefault(11501) /* metro dependency 11501: AppealIngestionThanks */);
}
function getScreens_88024Render_88036() { // fn#88036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:2500, owner: getScreens_88024.render, offset: 0x01fd21d9, size: 39 bytes, params: 1, frame: 13
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => )(importDefault(11502) /* metro dependency 11502: AppealIngestionSpam */);
}