Files
2026-07-28 01:06:53 +03:00

398 lines
23 KiB
React

/* Metro module 416; source: unknown; dependencies: [29, 57, 31, 33, 144, 143, 48, 325, 262, 292, 147, 44, 289, 114, 253] */
import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module00057 from './module-00057.js'; /* Metro dependency 57 */
import Module00143 from './module-00143.js'; /* Metro dependency 143 */
import Module00147 from './module-00147.js'; /* Metro dependency 147 */
import Module00253 from './module-00253.js'; /* Metro dependency 253 */
import Module00292 from './module-00292.js'; /* Metro dependency 292 */
import Module00325 from './module-00325.js'; /* Metro dependency 325 */
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as Module00144Module from './module-00144.js'; /* Metro dependency 144 */
function _fun5835(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#5835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:6, offset: 0x00ce6ea7, size: 479 bytes, params: 8, frame: 19
const env0_2 = ['aria-busy', 'aria-checked', 'aria-disabled', 'aria-expanded', 'aria-selected',
'accessibilityState', 'id', 'tabIndex', 'selection', 'selectionColor', 'selectionHandleColor', 'cursorColor'];
const env0_3 = ['onBlur', 'onFocus'];
const env0_4 = ['ref', 'allowFontScaling', 'rejectResponderTermination', 'underlineColorAndroid', 'autoComplete',
'textContentType', 'readOnly', 'editable', 'enterKeyHint', 'returnKeyType', 'inputMode', 'showSoftInputOnFocus',
'keyboardType'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_16 = {'enter': 'default', 'done': 'done', 'go': 'go', 'next': 'next', 'previous': 'previous',
'search': 'search', 'send': 'send'};
const env0_17 = {'none': 'default', 'text': 'default', 'decimal': 'decimal-pad', 'numeric': 'number-pad',
'tel': 'phone-pad', 'search': 'default', 'email': 'email-address', 'url': 'url'};
const env0_18 = {'address-line1': 'postal-address-region', 'address-line2': 'postal-address-locality',
'bday': 'birthdate-full', 'bday-day': 'birthdate-day', 'bday-month': 'birthdate-month',
'bday-year': 'birthdate-year', 'cc-csc': 'cc-csc', 'cc-exp': 'cc-exp', 'cc-exp-month': 'cc-exp-month',
'cc-exp-year': 'cc-exp-year', 'cc-number': 'cc-number', 'country': 'postal-address-country',
'current-password': 'password', 'email': 'email', 'honorific-prefix': 'name-prefix',
'honorific-suffix': 'name-suffix', 'name': 'name', 'additional-name': 'name-middle',
'family-name': 'name-family', 'given-name': 'name-given', 'new-password': 'password-new', 'off': 'off',
'one-time-code': 'sms-otp', 'postal-code': 'postal-code', 'sex': 'gender', 'street-address': 'street-address',
'tel': 'tel', 'tel-country-code': 'tel-country-code', 'tel-national': 'tel-national', 'username': 'username'};
const TextInput2 = TextInput;
TextInput2.displayName = 'TextInput';
object = {};
object.currentlyFocusedInput = (importDefault(143) /* metro dependency 143 */).currentlyFocusedInput;
object.currentlyFocusedField = (importDefault(143) /* metro dependency 143 */).currentlyFocusedField;
object.focusTextInput = (importDefault(143) /* metro dependency 143 */).focusTextInput;
object.blurTextInput = (importDefault(143) /* metro dependency 143 */).blurTextInput;
TextInput2.State = object;
(Module00253).create({multilineDefault: {paddingTop: 5}});
const env0_19 = {'auto': 'auto', 'top': 'top', 'bottom': 'bottom', 'middle': 'center'};
exports.default = TextInput2;
function InternalTextInput(a0) { // fn#5836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:653, offset: 0x00ce7086, size: 1612 bytes, params: 2, frame: 45
var defaultValue;
var r12;
var Commands2;
var r23;
var r24;
var r13;
var r8;
var object;
var blurOnSubmit;
const env0_0 = a0;
const property = a0['aria-busy'];
const property2 = a0['aria-checked'];
const property3 = a0['aria-disabled'];
const property4 = a0['aria-expanded'];
const property5 = a0['aria-selected'];
const accessibilityState = a0.accessibilityState;
const id = a0.id;
const tabIndex = a0.tabIndex;
const selection = a0.selection;
const selectionColor = a0.selectionColor;
const selectionHandleColor = a0.selectionHandleColor;
const cursorColor = a0.cursorColor;
let binding = editable2;
const value2 = undefined;
const value3 = binding(a0, env0_2);
const value4 = null;
const value5 = useRef(value4);
let r6 = value4 == selection ? value4 : {start: selection.start,
end: value4 != selection.end ? selection.end : selection.start};
if (typeof a0.value === 'string') {
r12 = a0.value;
} else {
defaultValue = a0.defaultValue;
defaultValue = typeof defaultValue !== 'string' ? value2 : a0.defaultValue;
r12 = defaultValue;
}
if (Commands) {
Commands2 = Commands;
} else {
a0.multiline;
Commands2 = value2;
}
const value9 = Module00057(useState(0), 2);
const property6 = value9[0];
const property62 = property6;
const env0_4 = value9[1];
const value10 = useTextInputStateSynchronization({props: a0, inputRef: value5, mostRecentEventCount: property6,
selection: r6, text: r12, viewCommands: Commands2});
const setLastNativeText = value10.setLastNativeText;
const env0_6 = value10.setLastNativeSelection;
useLayoutEffect(_fun5839, []);
const value12 = (Module00325)(useCallback(_fun5841, [property6, Commands2]),
a0.forwardedRef);
const multiline = a0.multiline;
r6 = value4 != multiline && multiline;
let submitBehavior = a0.submitBehavior;
if (value4 != submitBehavior) {
if (r6) {
submitBehavior = a0.submitBehavior;
} else {
submitBehavior = a0.submitBehavior;
submitBehavior = submitBehavior === 'newline' ? 'blurAndSubmit' : a0.submitBehavior;
}
r23 = submitBehavior;
} else {
blurOnSubmit = a0.blurOnSubmit;
r23 = r6 ? blurOnSubmit !== true ? 'newline' : 'blurAndSubmit' : blurOnSubmit === false ? 'submit' : 'blurAndSubmit';
}
const accessible = a0.accessible;
const value19 = a0.focusable !== false;
const editable = a0.editable;
var editable2 = editable;
const hitSlop = a0.hitSlop;
const onPress = a0.onPress;
const onPress2 = onPress;
const value20 = useMemo(function() {
return {hitSlop: hitSlop, onPress: _fun5847, onPressIn: onPressIn, onPressOut: onPressOut, cancelable: null};
}, [editable, hitSlop, onPress, a0.onPressIn, a0.onPressOut, a0.rejectResponderTermination]);
let caretHidden = a0.caretHidden;
caretHidden = (importDefault(262) /* metro dependency 262 */).isTesting || caretHidden;
const value22 = (Module00292)(value20);
value22.onBlur;
value22.onFocus;
const value23 = editable2(value22, property62);
let r29 = value4 == a0 ? value2 : a0['aria-label'];
r29 = value4 == r29 ? value4 == a0 ? value2 : a0.accessibilityLabel : r29;
r6 = value4 == accessibilityState && value4 == property && value4 == property2;
r6 = r6 && value4 == property3 && value4 == property4 && value4 == property5;
const r27 = r6 ? value2 : {busy: value4 != property ? property : value4 == accessibilityState ? value2 : accessibilityState.busy,
checked: value4 != property2 ? property2 : value4 == accessibilityState ? value2 : accessibilityState.checked,
disabled: value4 != property3 ? property3 : value4 == accessibilityState ? value2 : accessibilityState.disabled,
expanded: value4 != property4 ? property4 : value4 == accessibilityState ? value2 : accessibilityState.expanded,
selected: value4 != property5 ? property5 : value4 == accessibilityState ? value2 : accessibilityState.selected};
const style = a0.style;
const value30 = (Module00147)(a0.style);
if (value4 == value30) {
r13 = style;
} else {
if (typeof (value4 == value30 ? value2 : value30.fontWeight) !== 'number') {
r24 = value4;
} else {
object = {};
object.fontWeight = value30.fontWeight.toString();
r24 = object;
}
if (value4 == value30.verticalAlign) {
r8 = r24;
} else {
r6 = r24 || ({});
r6.textAlignVertical = env0_19[value30.verticalAlign];
r6.verticalAlign = value2;
r8 = r6;
}
r13 = value4 == r8 ? style : [style, r8];
}
let autoCapitalize = a0.autoCapitalize;
autoCapitalize = !autoCapitalize ? 'sentences' : autoCapitalize;
let r28 = value4 == a0 ? value2 : a0['aria-labelledby'];
r28 = value4 == r28 ? value4 == a0 ? value2 : a0.accessibilityLabelledBy : r28;
const placeholder = a0.placeholder;
const r14 = value4 != placeholder ? placeholder : '';
const children = a0.children;
const Children = onPress2.Children;
const value33 = Children.count(children);
(importDefault(44) /* metro dependency 44 */)(!(value4 != a0.value && value33),
'Cannot specify both value and children.');
const r21 = (
value33 > 1
? ((Component) => <Component>{children}</Component>)(importDefault(289) /* metro dependency 289 */)
: children
);
binding = setLastNativeText;
const Object = global.Object;
const assign = Object.assign;
const rows = a0.rows;
return ((Component) => <Component value>{((Component) => <Component {...Reflect.apply(assign, Object,
[{ref: value12}, value3, {selectionColor: selectionColor,
selectionHandleColor: value2 !== selectionHandleColor ? selectionHandleColor : selectionColor,
cursorColor: value2 !== cursorColor ? cursorColor : selectionColor}, value23, {accessibilityLabel: r29,
accessibilityLabelledBy: r28, accessibilityState: r27, accessible: accessible !== false,
acceptDragAndDropTypes: a0.experimental_acceptDragAndDropTypes, autoCapitalize: autoCapitalize,
submitBehavior: r23, caretHidden: caretHidden, children: r21, disableFullscreenUI: a0.disableFullscreenUI,
focusable: value2 === tabIndex ? value19 : !tabIndex, mostRecentEventCount: property6,
nativeID: value4 != id ? id : a0.nativeID, numberOfLines: value4 != rows ? rows : a0.numberOfLines,
onBlur: onBlur_5848, onChange: onChange_5849, onFocus: onFocus_5850, onScroll: onScroll,
onSelectionChange: onSelectionChange, placeholder: r14, style: r13, text: r12,
textBreakStrategy: a0.textBreakStrategy}])} />)(binding)}</Component>)(importDefault(114) /* metro dependency 114 */);
function useTextInputStateSynchronization({props, mostRecentEventCount, selection, inputRef, text, viewCommands}) { // fn#5837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:1133, owner: InternalTextInput.useTextInputStateSynchronization, offset: 0x00ce76d2, size: 259 bytes, params: 2, frame: 26
var environment;
const value = environment.__proto__;
const [property, property2] = env1_8(useState(props.value), 2);
const [property3, property4] = env1_8(useState({selection: {'start': -1, 'end': -1},
mostRecentEventCount: mostRecentEventCount}), 2);
useLayoutEffect(_fun5838, [mostRecentEventCount, inputRef, props.value, props.defaultValue, property, selection,
property3.selection, text, viewCommands]);
return {setLastNativeText: property2, setLastNativeSelection: property4};
function _fun5838() { // fn#5838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:1411, offset: 0x00ce77d5, size: 364 bytes, params: 1, frame: 24
var start;
var mostRecentEventCountBinding;
var current;
var viewCommandsBinding;
var setTextAndSelection;
var textBinding;
var value12;
var value13;
const object = {};
if (env0_6 !== props.value && typeof props.value === 'string') {
propsBinding = props;
object.text = propsBinding.value;
ObjectWithoutProperties(propsBinding.value);
}
if (selection && selection && (selection.start !== selection.start || selection.end !== selection.end)) {
selectionBinding = selection;
object.selection = selectionBinding;
Module00057({selection: selectionBinding, mostRecentEventCount: mostRecentEventCount});
}
const Object = global.Object;
if (Object.keys(object).length !== 0 && inputRef.current != null) {
viewCommandsBinding = viewCommands;
setTextAndSelection = viewCommandsBinding.setTextAndSelection;
current = inputRef.current;
mostRecentEventCountBinding = mostRecentEventCount;
textBinding = text;
selectionBinding = selection;
value12 = undefined;
start = selectionBinding == null ? value12 : selection.start;
value13 = -1;
Reflect.apply(setTextAndSelection, viewCommandsBinding, [current, mostRecentEventCountBinding, textBinding,
start ?? value13, (selection == null ? value12 : selection.end) ?? value13]);
}
}
}
function _fun5839() { // fn#5839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:1976, offset: 0x00ce7941, size: 71 bytes, params: 1, frame: 13
var environment;
var value;
const current = env0_1.current;
if (current != null) {
value = environment.__proto__;
value = importDefault(143) /* metro dependency 143 */;
value.registerInput(current);
return _fun5840;
}
function _fun5840() { // fn#5840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2046, offset: 0x00ce7988, size: 107 bytes, params: 1, frame: 17
let value = environment.__proto__.__proto__;
const defaultImport = Module00143;
const unregisterInput = defaultImport.unregisterInput;
const currentBinding = current;
Reflect.apply(unregisterInput, defaultImport, [currentBinding]);
const defaultImport2 = defaultImport;
if (defaultImport2.currentlyFocusedInput() === currentBinding) {
value = importDefault(48) /* metro dependency 48 */;
value = value(current);
value.blur();
}
}
}
function _fun5841(a0) { // fn#5841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2159, offset: 0x00ce79f3, size: 89 bytes, params: 2, frame: 15
var Object;
env0_1.current = a0;
if (a0 != null) {
Object = global.Object;
Object.assign(a0, {clear: clear_5842, isFocused: isFocused, getNativeRef: getNativeRef,
setSelection: setSelection});
}
function clear_5842() { // fn#5842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2215, offset: 0x00ce7a4c, size: 60 bytes, params: 1, frame: 18
if (env1_1.current != null) {
Commands.setTextAndSelection(env1_1.current, env1_3, '', 0, 0);
}
}
function isFocused() { // fn#5843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2302, offset: 0x00ce7a88, size: 53 bytes, params: 1, frame: 11
let value = environment.__proto__.__proto__;
value = importDefault(143) /* metro dependency 143 */;
value = value.currentlyFocusedInput();
return value === env1_1.current;
}
function getNativeRef() { // fn#5844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2388, offset: 0x00ce7abd, size: 14 bytes, params: 1, frame: 1
return env1_1.current;
}
function setSelection(a0, a1) { // fn#5845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2443, offset: 0x00ce7acb, size: 60 bytes, params: 3, frame: 19
if (env1_1.current != null) {
Commands.setTextAndSelection(env1_1.current, env1_3, null, a0, a1);
}
}
}
function _fun5846() { // fn#5846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2935, offset: 0x00ce7b07, size: 52 bytes, params: 1, frame: 3
return {hitSlop: hitSlop, onPress: onPress, onPressIn: onPressIn, onPressOut: onPressOut, cancelable: null};
function onPress(a0) { // fn#5847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:2972, offset: 0x00ce7b3b, size: 79 bytes, params: 2, frame: 13
if (onPress != null) {
onPress(a0);
}
if (editable !== false && env1_1.current != null) {
env1_1.current.focus();
}
}
}
function InternalTextInputOnBlur(a0) { // fn#5848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:4704, owner: InternalTextInput.onBlur, offset: 0x00ce7b8a, size: 81 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importDefault(143) /* metro dependency 143 */;
value.blurInput(env0_1.current);
if (env0_0.onBlur) {
env0_0.onBlur(a0);
}
}
function InternalTextInputOnChange(a0) { // fn#5849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:4785, owner: InternalTextInput.onChange, offset: 0x00ce7bdb, size: 124 bytes, params: 2, frame: 13
const text = a0.nativeEvent.text;
if (env0_0.onChange) {
env0_0.onChange(a0);
}
if (env0_0.onChangeText) {
env0_0.onChangeText(text);
}
if (env0_1.current != null) {
setLastNativeText(text);
env0_4(a0.nativeEvent.eventCount);
}
}
function InternalTextInputOnFocus(a0) { // fn#5850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:4953, owner: InternalTextInput.onFocus, offset: 0x00ce7c57, size: 81 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = importDefault(143) /* metro dependency 143 */;
value.focusInput(env0_1.current);
if (env0_0.onFocus) {
env0_0.onFocus(a0);
}
}
function onScroll(a0) { // fn#5851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:5038, owner: InternalTextInput.onScroll, offset: 0x00ce7ca8, size: 38 bytes, params: 2, frame: 11
if (env0_0.onScroll) {
env0_0.onScroll(a0);
}
}
function onSelectionChange(a0) { // fn#5852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:5105, owner: InternalTextInput.onSelectionChange, offset: 0x00ce7cce, size: 92 bytes, params: 2, frame: 12
if (env0_0.onSelectionChange) {
env0_0.onSelectionChange(a0);
}
if (env0_1.current != null) {
setLastNativeSelection({selection: a0.nativeEvent.selection, mostRecentEventCount: env0_3});
}
}
}
function TextInput(a0) { // fn#5853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:457:6444, offset: 0x00ce7d2a, size: 278 bytes, params: 2, frame: 31
const ref = a0.ref;
const allowFontScaling = a0.allowFontScaling;
const r20 = allowFontScaling === undefined || allowFontScaling;
const rejectResponderTermination = a0.rejectResponderTermination;
const r19 = rejectResponderTermination === undefined || rejectResponderTermination;
const underlineColorAndroid = a0.underlineColorAndroid;
const r18 = underlineColorAndroid === undefined ? 'transparent' : underlineColorAndroid;
const autoComplete = a0.autoComplete;
const textContentType = a0.textContentType;
const readOnly = a0.readOnly;
const editable = a0.editable;
const enterKeyHint = a0.enterKeyHint;
const returnKeyType = a0.returnKeyType;
const inputMode = a0.inputMode;
const showSoftInputOnFocus = a0.showSoftInputOnFocus;
const keyboardType = a0.keyboardType;
const value2 = ObjectWithoutProperties(a0, env0_4);
const Object = global.Object;
return (
<InternalTextInput
{...Object.assign({allowFontScaling: r20, rejectResponderTermination: r19, underlineColorAndroid: r18,
editable: readOnly === undefined ? editable : !readOnly,
returnKeyType: enterKeyHint ? env0_16[enterKeyHint] : returnKeyType,
keyboardType: inputMode ? env0_17[inputMode] : keyboardType,
showSoftInputOnFocus: inputMode == null ? showSoftInputOnFocus : inputMode !== 'none',
autoComplete: env0_18[autoComplete] ?? autoComplete, textContentType: textContentType}, value2,
{forwardedRef: ref})}
/>
);
}
}
global.__d(_fun5835, 416, [29, 57, 31, 33, 144, 143, 48, 325, 262, 292, 147, 44, 289, 114,
253]) /* metro module 416, dependencies: [29, 57, 31, 33, 144, 143, 48, 325, 262, 292, 147, 44, 289, 114, 253] */;