Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,124 @@
/* Metro module 8360; source: modules/interaction_components/validateComponent.tsx; dependencies: [1909, 4627, 1244, 44, 2] */
function _fun66584(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8545:6, offset: 0x01c01366, size: 114 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/interaction_components/validateComponent.tsx');
exports.default = validateComponent;
}
function validateSelect({minValues, maxValues, required}, a1, a2) { // fn#66585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8545:111, offset: 0x01c013d8, size: 381 bytes, params: 4, frame: 20
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var moduleValue;
const value = null;
let r0 = value == a1 ? 0 : a1.type === (require(1909) /* metro dependency 1909: Server */).ComponentType.STRING_SELECT ? a1.values.length : a1.selectedOptions.length;
if (r0 === 0) {
moduleValue = require(4627) /* metro dependency 4627: InteractionComponentUtils */;
r0 = moduleValue.canSelectBeEmpty({minValues: minValues, required: required},
a2) ? value : intl.string(t.eJEUvD);
} else {
r0 = r0 < minValues ? intl.formatToPlainString(t.Jmwzdx,
{count: minValues}) : r0 > maxValues ? intl.formatToPlainString(t.LDvfRP, {count: maxValues}) : value;
}
return r0;
}
function validateComponent(a0, a1, a2) { // fn#66586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8545:645, offset: 0x01c01555, size: 1340 bytes, params: 4, frame: 25
var length;
var r2;
var minValues;
var maxValues;
var required;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var minLength;
var maxLength;
const value = null;
if (value != a1) {
(importDefault(44) /* metro dependency 44 */)(a1.type === a0.type, 'component type matches state');
}
const type = a0.type;
const value4 = 0;
const value5 = undefined;
let ComponentType = require(dependencyMap[value4]).ComponentType;
const BUTTON = ComponentType.BUTTON;
if (BUTTON === type) {
return value;
}
ComponentType = require(dependencyMap[value4]).ComponentType;
const STRING_SELECT = ComponentType.STRING_SELECT;
if (STRING_SELECT === type) {
return validateSelect(a0, a1, a2);
}
ComponentType = require(dependencyMap[value4]).ComponentType;
const USER_SELECT = ComponentType.USER_SELECT;
if (USER_SELECT === type) {
return validateSelect(a0, a1, a2);
}
ComponentType = require(dependencyMap[value4]).ComponentType;
const ROLE_SELECT = ComponentType.ROLE_SELECT;
if (ROLE_SELECT === type) {
return validateSelect(a0, a1, a2);
}
ComponentType = require(dependencyMap[value4]).ComponentType;
const MENTIONABLE_SELECT = ComponentType.MENTIONABLE_SELECT;
if (MENTIONABLE_SELECT === type) {
return validateSelect(a0, a1, a2);
}
ComponentType = require(dependencyMap[value4]).ComponentType;
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
if (CHANNEL_SELECT === type) {
return validateSelect(a0, a1, a2);
}
ComponentType = require(dependencyMap[value4]).ComponentType;
const TEXT_INPUT = ComponentType.TEXT_INPUT;
if (TEXT_INPUT === type) {
minLength = a0.minLength;
maxLength = a0.maxLength;
return value == a1 || value4 === a1.value.length ? a0.required ? intl.string(t.eJEUvD) : value : a1.value.length < minLength || a1.value.length > maxLength ? intl.formatToPlainString(t.ONSqYd,
{min: minLength, max: maxLength}) : value;
}
ComponentType = require(dependencyMap[value4]).ComponentType;
const FILE_UPLOAD = ComponentType.FILE_UPLOAD;
if (FILE_UPLOAD === type) {
minValues = a0.minValues;
maxValues = a0.maxValues;
required = a0.required;
length = value == a1 ? value5 : a1.uploadIds.length;
r2 = value != length ? length : value4;
r2 = value4 === r2 ? required ? intl.string(t.eJEUvD) : value : r2 < minValues ? intl.formatToPlainString(t.pmAt62,
{minValues: minValues}) : r2 > maxValues ? intl.formatToPlainString(t.dy6viJ,
{maxValues: maxValues}) : value;
return r2;
}
ComponentType = require(dependencyMap[value4]).ComponentType;
const RADIO_GROUP = ComponentType.RADIO_GROUP;
if (RADIO_GROUP === type) {
required = a0.required;
return value == a1 ? required ? intl.string(t.eJEUvD) : value : value != a1.value ? value : required ? intl.string(t.eJEUvD) : value;
}
ComponentType = require(dependencyMap[value4]).ComponentType;
const CHECKBOX_GROUP = ComponentType.CHECKBOX_GROUP;
if (CHECKBOX_GROUP === type) {
minValues = a0.minValues;
maxValues = a0.maxValues;
required = a0.required;
length = value == a1 ? value5 : a1.values.length;
r2 = value != length ? length : value4;
r2 = value4 === r2 ? required ? intl.string(t.eJEUvD) : value : r2 < minValues ? intl.formatToPlainString(t.Jmwzdx,
{count: minValues}) : r2 > maxValues ? intl.formatToPlainString(t.LDvfRP, {count: maxValues}) : value;
return r2;
}
ComponentType = require(dependencyMap[value4]).ComponentType;
const CHECKBOX = ComponentType.CHECKBOX;
if (CHECKBOX === type) {
return value;
}
(importDefault(44) /* metro dependency 44 */)(false, 'missing validator for this component');
return value5;
}