/* Metro module 9894; source: modules/group_dm/native/ChatGDMCustomize.tsx; dependencies: [5, 57, 31, 27, 1379, 33, 4501, 697, 5463, 566, 4805, 6518, 1423, 9895, 4603, 1244, 3857, 7684, 9896, 5278, 4573, 7981, 4578, 9898, 2] */
function _fun77540(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:6, offset: 0x01e0059a, size: 522 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 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_6 = value2.ScrollView;
const env0_7 = value2.View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = createStylesModule.createStyles;
object2 = {};
const MOBILE_ACTIONSHEET_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_ACTIONSHEET_BACKGROUND;
object2.container = {backgroundColor: MOBILE_ACTIONSHEET_BACKGROUND};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.iconUploader = {marginTop: PX_24, alignSelf: 'center'};
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object2.iconClear = {marginTop: PX_8, alignSelf: 'center'};
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.textInput = {marginVertical: PX_16};
const object3 = {};
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.marginTop = PX_8;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.gap = PX_8;
object3.flexDirection = 'row';
object3.alignItems = 'center';
object2.rateLimitedContainer = object3;
const TEXT_FEEDBACK_CRITICAL = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_CRITICAL;
object2.rateLimitedText = {fontSize: 12, color: TEXT_FEEDBACK_CRITICAL};
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object2]);
value = value.memo(value.forwardRef(_fun77541));
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/group_dm/native/ChatGDMCustomize.tsx');
exports.default = value;
}
function _fun77541({channelId, onFinish}, a1) { // fn#77541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:689, offset: 0x01e007a4, size: 1603 bytes, params: 3, frame: 39
var scrollView;
var object;
var items2;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var TextInput;
var object7;
var Button;
var object8;
var value32;
let env0_5 = undefined;
const styles = useStyles();
const insets = (importDefault(5463) /* metro dependency 5463: useSafeAreaInsetsKeyboardAwareNative */)({includeKeyboardHeight: true}).insets;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
const r8 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel) ?? '';
const value6 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(r8);
const env0_3 = value6;
let binding = env0_5;
const value7 = binding.useRef(null);
const env0_4 = value7;
let useState = binding.useState;
const value9 = env0_4(Reflect.apply(useState, binding, [undefined]), 2);
const property = value9[0];
env0_5 = property;
const property2 = value9[1];
const r6 = property != null && property.length > 0 && property !== value6;
const [property3, property4] = env0_4(env0_5.useState(undefined), 2);
const r18 = property3 === 'CLEARED_ICON' ? undefined : property3 ?? channel?.icon;
const value15 = channel?.isManaged() !== true;
const r9 = value15 && (property3 != null && property3 !== 'CLEARED_ICON' || channel?.icon != null);
binding = env0_5;
const value19 = binding.useMemo(function() {
return {makeURL: _fun77544, clear: _fun77545};
}, [channel, channelId]);
const value20 = binding.useCallback(_fun77546, [r6, property3]);
const value21 = binding.useState(null);
const binding2 = env0_4;
const value22 = binding2(value21, 2);
const property5 = value22[0];
const env0_11 = value22[1];
useState = binding.useState;
const value23 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property6 = value23[0];
const env0_12 = value23[1];
const value26 = binding.useCallback(env0_3(_fun77548),
[(importDefault(9895) /* metro dependency 9895: useAnnounceAsyncCompletionNative */)(), channelId, property,
property3, onFinish]);
binding.useEffect(_fun77549, [value6]);
binding.useEffect(_fun77550, [property5]);
binding.useImperativeHandle(a1, _fun77552);
if (channel == null) {
scrollView = ;
} else {
var scrollViewBindingProps = {style: styles.container};
object = {};
object.paddingHorizontal = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.paddingBottom = insets.bottom;
scrollViewBindingProps.contentContainerStyle = object;
items2 = [((Component) => )(importDefault(9896) /* metro dependency 9896: IconUploader */)];
items2[1] = r9 ? ((PressableOpacity) => {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['uY+Nk/'])})((require(5278) /* metro dependency 5278: Pressables */).PressableOpacity) : null;
var viewBindingProps2 = {style: styles.textInput};
TextInput = (require(7981) /* metro dependency 7981: TextInputNative */).TextInput;
items2[2] = ;
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
var buttonProps = {onPress: value26, text: intl.string(t.K344S7), variant: value20() ? 'primary' : 'secondary'};
value32 = value20();
buttonProps.disabled = value32 ? property5 != null : !value32;
buttonProps.loading = property6;
items2[3] = ;
items2[4] = property5 != null ? {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Whhv4w)}{((Component) => )(importDefault(9898) /* metro dependency 9898: CountDown */)} : null;
scrollView = {items2};
}
return scrollView;
}
function _fun77543() { // fn#77543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:1167, offset: 0x01e00de7, size: 30 bytes, params: 1, frame: 3
return {makeURL: makeURL_77544, clear: clear_77545};
}
function _fun77546() { // fn#77546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:1365, offset: 0x01e00e9c, size: 22 bytes, params: 1, frame: 3
return env0_7 != null || env0_6;
}
function* _fun77548() { // fn#77548, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:1502, offset: 0x01e00ebd, size: 601 bytes, params: 1, frame: 22
var r2;
var View2;
var retry_after;
var value;
var value2;
var value3;
var binding;
var value4;
var value5;
var value6;
var value7;
var binding2;
var property;
var value8;
var setIcon;
var value9;
var value10;
var value11;
var value12;
var value13;
var length;
var value14;
var value15;
var binding3;
var value16;
var setName;
var value17;
var value18;
var value19;
var value20;
var binding4;
var binding5;
var value21;
var intl;
var string;
var value22;
var t;
var ZhunuI;
var value23;
var value24;
var value25;
var value26;
var error;
var body;
var value27;
var value28;
var value29;
var binding6;
var value30;
var open;
var object3;
var value31;
var CircleErrorIcon;
var value32;
var formatToPlainString;
var value33;
var r477WB;
var object4;
var status;
var value34;
var value35;
exceptionLanding124: while (true) {
value = undefined;
value2 = false;
if (value2) {
return value;
}
value = undefined;
value3 = environment.__proto__;
reducibleJoin4: while (true) {
reduciblePort123: while (true) {
exceptionLanding74: while (true) {
try {
try {
binding = env1_12;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
break reducibleJoin4;
}
try {
body = error.body;
} catch (error) {
break exceptionLanding124;
}
try {
value27 = body == null;
} catch (error) {
break exceptionLanding124;
}
reducibleJoin81: while (true) {
if (value27) {
retry_after = value;
break reducibleJoin81;
}
try {
retry_after = body.retry_after;
} catch (error) {
break exceptionLanding124;
}
break reducibleJoin81;
}
try {
value28 = retry_after != null;
} catch (error) {
break exceptionLanding124;
}
if (value28) {
try {
} catch (error) {
break exceptionLanding124;
}
try {
body = error.body;
} catch (error) {
break exceptionLanding124;
}
try {
value35 = body == null;
} catch (error) {
break exceptionLanding124;
}
reducibleJoin122: while (true) {
if (value35) {
retry_after = value;
break reducibleJoin122;
}
try {
retry_after = body.retry_after;
} catch (error) {
break exceptionLanding124;
}
break reducibleJoin122;
}
try {
useStyles(retry_after);
} catch (error) {
break exceptionLanding124;
}
} else {
value29 = environment.__proto__.__proto__;
try {
binding = env2_1;
} catch (error) {
break exceptionLanding124;
}
try {
binding6 = env2_2;
} catch (error) {
break exceptionLanding124;
}
try {
property = binding6[16];
} catch (error) {
break exceptionLanding124;
}
try {
value30 = binding(property);
} catch (error) {
break exceptionLanding124;
}
try {
open = value30.open;
} catch (error) {
break exceptionLanding124;
}
try {
object3 = {};
} catch (error) {
break exceptionLanding124;
}
try {
object3.key = 'GCM_ERROR_GENERIC';
} catch (error) {
break exceptionLanding124;
}
try {
binding = env2_0;
} catch (error) {
break exceptionLanding124;
}
try {
property = binding6[17];
} catch (error) {
break exceptionLanding124;
}
try {
value31 = binding(property);
} catch (error) {
break exceptionLanding124;
}
try {
CircleErrorIcon = value31.CircleErrorIcon;
} catch (error) {
break exceptionLanding124;
}
try {
object3.IconComponent = CircleErrorIcon;
} catch (error) {
break exceptionLanding124;
}
try {
property = binding6[15];
} catch (error) {
break exceptionLanding124;
}
try {
value32 = binding(property);
} catch (error) {
break exceptionLanding124;
}
try {
intl = value32.intl;
} catch (error) {
break exceptionLanding124;
}
try {
formatToPlainString = intl.formatToPlainString;
} catch (error) {
break exceptionLanding124;
}
try {
property = binding6[15];
} catch (error) {
break exceptionLanding124;
}
try {
value33 = binding(property);
} catch (error) {
break exceptionLanding124;
}
try {
t = value33.t;
} catch (error) {
break exceptionLanding124;
}
try {
r477WB = t.r477WB;
} catch (error) {
break exceptionLanding124;
}
try {
object4 = {};
} catch (error) {
break exceptionLanding124;
}
try {
status = error.status;
} catch (error) {
break exceptionLanding124;
}
try {
object4.code = status;
} catch (error) {
break exceptionLanding124;
}
try {
value34 = Reflect.apply(formatToPlainString, intl, [r477WB, object4]);
} catch (error) {
break exceptionLanding124;
}
try {
object3.content = value34;
} catch (error) {
break exceptionLanding124;
}
try {
Reflect.apply(open, value30, [object3]);
} catch (error) {
break exceptionLanding124;
}
}
break reduciblePort123;
}
env1_12(false);
return value;
}
try {
try {
binding(true);
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
value4 = null;
try {
try {
value5 = value4 == View;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
reducibleJoin12: while (true) {
if (value5) {
try {
try {
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
value6 = View !== 'CLEARED_ICON';
r2 = value6;
break reducibleJoin12;
}
r2 = value5;
break reducibleJoin12;
}
if (!r2) {
value7 = environment.__proto__.__proto__;
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
binding2 = env2_2;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
property = binding2[14];
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
value8 = binding(property);
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
setIcon = value8.setIcon;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
value9 = View === 'CLEARED_ICON';
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
reducibleJoin25: while (true) {
if (value9) {
View2 = value4;
break reducibleJoin25;
}
try {
try {
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
View2 = View;
break reducibleJoin25;
}
try {
try {
value10 = Reflect.apply(setIcon, value8, [require, View2]);
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
yield value10;
try {
try {
value11 = undefined;
value12 = false;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
reducibleJoin30: while (true) {
if (value12) {
env1_12(false);
return value11;
}
break reducibleJoin30;
}
}
try {
try {
binding = env1_5;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
value13 = value4 != binding;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
reducibleJoin37: while (true) {
if (value13) {
try {
try {
binding = env1_5;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
length = binding.length;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
value14 = length > 0;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
r2 = value14;
break reducibleJoin37;
}
r2 = value13;
break reducibleJoin37;
}
if (r2) {
value15 = environment.__proto__.__proto__;
try {
try {
binding = env2_1;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
binding3 = env2_2;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
property = binding3[14];
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
value16 = binding(property);
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
setName = value16.setName;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
binding = env1_5;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
value17 = Reflect.apply(setName, value16, [require, binding]);
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
yield value17;
try {
try {
value18 = undefined;
value19 = false;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
reducibleJoin51: while (true) {
if (value19) {
env1_12(false);
return value18;
}
break reducibleJoin51;
}
}
try {
try {
binding = env1_13;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
value20 = environment.__proto__.__proto__;
try {
try {
binding4 = env2_0;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
binding5 = env2_2;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
property = binding5[15];
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
value21 = binding4(property);
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
intl = value21.intl;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
string = intl.string;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
property = binding5[15];
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
value22 = binding4(property);
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
t = value22.t;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
ZhunuI = t.ZhunuI;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
value23 = Reflect.apply(string, intl, [ZhunuI]);
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
value24 = binding(value23);
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
yield value24;
try {
try {
value25 = undefined;
value26 = false;
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
if (value26) {
env1_12(false);
return value25;
}
try {
try {
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
try {
try {
importDefault();
} catch (error) {
break exceptionLanding74;
}
} catch (error) {
break exceptionLanding124;
}
env1_12(false);
return value;
}
env1_12(false);
throw error;
}
function _fun77549() { // fn#77549, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:2005, offset: 0x01e01116, size: 46 bytes, params: 1, frame: 11
if (env0_4.current != null) {
env0_4.current.setText(env0_3);
}
}
function _fun77550() { // fn#77550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:2068, offset: 0x01e01144, size: 56 bytes, params: 1, frame: 13
if (env0_10 != null) {
global.setTimeout(_fun77551, 1000 * env0_10);
}
}
function _fun77552() { // fn#77552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:2146, offset: 0x01e0118e, size: 16 bytes, params: 1, frame: 2
return {hasUnsavedChanges: env0_9};
}
function makeURL_77544(a0) { // fn#77544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:1181, offset: 0x01e00e05, size: 96 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = undefined;
const defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
const getChannelIconURL = defaultImport.getChannelIconURL;
const object2 = {};
object2.id = channelId;
object2.icon = a0;
object2.applicationId = channel == null ? value : channel.getApplicationId();
object2.size = 64;
return Reflect.apply(getChannelIconURL, defaultImport, [object2]);
}
function clear_77545() { // fn#77545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:1290, offset: 0x01e00e65, size: 55 bytes, params: 1, frame: 14
const value = environment.__proto__;
const binding = env1_8;
const channelBinding = channel;
const value2 = undefined;
binding((channelBinding == null ? value2 : channel.icon) != null ? 'CLEARED_ICON' : value2);
return value2;
}
function _fun77551() { // fn#77551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10080:2094, offset: 0x01e0117c, size: 18 bytes, params: 1, frame: 11
return env1_11(null);
}