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,4 +1,8 @@
/* Metro module 1888; source: modules/display_name_styles/DisplayNameStylesUtils.tsx; dependencies: [1889, 1890, 674, 1891, 2] */
import Module00674 from '../../by-id/module-00674.js'; /* Metro dependency 674 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as DisplayNameStylesConstantsModule from './DisplayNameStylesConstants.tsx'; /* Metro dependency 1889 */
function _fun20510(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#20510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:6, offset: 0x00ecad41, size: 252 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_20513 = function(a0, a1) {
@@ -44,16 +48,10 @@ function _fun20510(global, require, importDefault, importAll, module, exports, d
}
return value;
};
const closure = selectWeightedFont;
const selectWeightedFont2 = selectWeightedFont;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const displayNameStylesConstantsModule = require(1889) /* metro dependency 1889: DisplayNameStylesConstants */;
const env0_3 = displayNameStylesConstantsModule.EFFECT_ORDER;
const env0_4 = displayNameStylesConstantsModule.FLYWHEEL_EFFECTS;
const env0_5 = displayNameStylesConstantsModule.FLYWHEEL_FONTS;
const env0_6 = displayNameStylesConstantsModule.FONT_WEIGHTS;
const env0_7 = displayNameStylesConstantsModule.getColorPresetsForEffect;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesUtils.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/display_name_styles/DisplayNameStylesUtils.tsx');
exports.getEffectColorCount = function(a0) {
if (require(dependencyMap[1]).DisplayNameEffect.GRADIENT === a0) {
return 2;
@@ -71,7 +69,7 @@ function _fun20510(global, require, importDefault, importAll, module, exports, d
var value = null;
return value == a0 ? value : {fontId: a0.font_id, effectId: a0.effect_id, colors: a0.colors};
};
exports.selectWeightedFont = closure;
exports.selectWeightedFont = selectWeightedFont2;
exports.generateRandomDisplayNameStyles = generateRandomDisplayNameStyles;
exports.applyFlywheelViewingFallback = applyFlywheelViewingFallback;
exports.hasNonLatinLetters = function(a0) {
@@ -84,190 +82,197 @@ function _fun20510(global, require, importDefault, importAll, module, exports, d
'g'), ''));
};
}
function _createForOfIteratorHelperLoose_20511(a0, a1) { // fn#20511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:214, offset: 0x00ecae3d, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_20511(a0, a1) { // fn#20511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:214, offset: 0x00ecae3d, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun20512;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_20513(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun20512;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_20513(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_20513(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_20513(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
} else {
r5 = value;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
if (r5) {
}
return _fun20512;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun20512() { // fn#20512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:785, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
return _fun20512;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function selectWeightedFont(a0) { // fn#20514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1124, offset: 0x00ecafaf, size: 153 bytes, params: 2, frame: 21
var r2;
var value7;
var value8;
var value9;
var value10;
const value = 0;
const value2 = a0.reduce(_fun20515, value);
const Math = global.Math;
const value3 = Math.random() * value2;
const value5 = _createForOfIteratorHelperLoose_20511(a0);
const value6 = value5();
let done = value6.done;
if (done) {
return a0[a0.length - 1];
}
let r3 = value6;
let r8 = value3;
while (true) {
value7 = r3.value;
value8 = FONT_WEIGHTS.get(value7);
r2 = value8 ?? value;
value9 = r8 - r2;
if (value9 <= value) {
break;
}
value10 = value5();
done = value10.done;
function selectWeightedFont(a0) { // fn#20514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1124, offset: 0x00ecafaf, size: 153 bytes, params: 2, frame: 21
var r2;
var value7;
var value8;
var value9;
var value10;
const value = 0;
const value2 = a0.reduce(_fun20515, value);
const Math = global.Math;
const value3 = Math.random() * value2;
const value5 = _createForOfIteratorHelperLoose_20511(a0);
const value6 = value5();
let done = value6.done;
if (done) {
return a0[a0.length - 1];
}
r3 = value10;
r8 = value9;
continue;
let r3 = value6;
let r8 = value3;
while (true) {
value7 = r3.value;
value8 = FONT_WEIGHTS.get(value7);
r2 = value8 ?? value;
value9 = r8 - r2;
if (value9 <= value) {
break;
}
value10 = value5();
done = value10.done;
if (done) {
return a0[a0.length - 1];
}
r3 = value10;
r8 = value9;
continue;
}
return value7;
function _fun20515(a0, a1) { // fn#20515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1177, offset: 0x00ecb048, size: 43 bytes, params: 3, frame: 11
const value = environment.__proto__;
return a0 + (FONT_WEIGHTS.get(a1) ?? 0);
}
}
return value7;
}
function generateColorVariants(a0) { // fn#20517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1723, offset: 0x00ecb0f2, size: 478 bytes, params: 2, frame: 23
let value = (importDefault(674) /* metro dependency 674 */)(a0);
value = value.alpha(1);
const value2 = value.get('hsl.l');
const value3 = value.get('hsl.s');
let Math = global.Math;
const value4 = Math.min(1, 1.2 * value3);
Math = global.Math;
const value5 = Math.min(0.6, value2 + 0.1);
const object2 = {main: a0};
let set = value.set;
Math = global.Math;
object2.light1 = Reflect.apply(set, value, ['hsl.l', Math.min(1, 1.2 * value2)]).hex();
set = value.set;
Math = global.Math;
object2.light2 = Reflect.apply(set, value, ['hsl.l', Math.min(1, 1.6 * value2)]).hex();
set = value.set;
Math = global.Math;
object2.dark1 = Reflect.apply(set, value, ['hsl.l', Math.max(0, 0.6 * value2)]).hex();
set = value.set;
Math = global.Math;
object2.dark2 = Reflect.apply(set, value, ['hsl.l', Math.max(0, 0.2 * value2)]).hex();
set = value.set;
Math = global.Math;
object2.toonStroke = Reflect.apply(set, value, ['hsl.l', Math.max(0.12, 0.4 * value2)]).hex();
value = value.set('hsl.s', value4);
value = value.set('hsl.l', value5);
object2.neonStroke = value.hex();
return object2;
}
function generateRandomDisplayNameStyles(a0) { // fn#20519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:2379, offset: 0x00ecb306, size: 215 bytes, params: 2, frame: 20
let value = a1;
let r4 = value !== undefined ? value : false;
let Math = global.Math;
let floor = Math.floor;
const Math2 = global.Math;
const value2 = Math2.random();
let property = EFFECT_ORDER[Reflect.apply(floor, Math, [value2 * EFFECT_ORDER.length])];
r4 = r4 ? selectWeightedFont(a0) : a0[global.Math.floor(global.Math.random() * a0.length)];
value = getColorPresetsForEffect(property);
const object2 = {fontId: r4, effectId: property};
Math = global.Math;
floor = Math.floor;
const Math4 = global.Math;
property = value[Reflect.apply(floor, Math, [Math4.random() * value.length])];
const items2 = [];
arraySpread(items2, property, 0, value2);
object2.colors = items2;
return object2;
}
function applyFlywheelViewingFallback(a0, a1) { // fn#20520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:2654, offset: 0x00ecb3dd, size: 214 bytes, params: 3, frame: 15
var r1;
var object2;
const value = a0;
if (a1) {
return value;
function generateColorVariants(a0) { // fn#20517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1723, offset: 0x00ecb0f2, size: 478 bytes, params: 2, frame: 23
let value = (Module00674)(a0);
value = value.alpha(1);
const value2 = value.get('hsl.l');
const value3 = value.get('hsl.s');
let Math = global.Math;
const value4 = Math.min(1, 1.2 * value3);
Math = global.Math;
const value5 = Math.min(0.6, value2 + 0.1);
const object = {main: a0};
let set = value.set;
Math = global.Math;
object.light1 = Reflect.apply(set, value, ['hsl.l', Math.min(1, 1.2 * value2)]).hex();
set = value.set;
Math = global.Math;
object.light2 = Reflect.apply(set, value, ['hsl.l', Math.min(1, 1.6 * value2)]).hex();
set = value.set;
Math = global.Math;
object.dark1 = Reflect.apply(set, value, ['hsl.l', Math.max(0, 0.6 * value2)]).hex();
set = value.set;
Math = global.Math;
object.dark2 = Reflect.apply(set, value, ['hsl.l', Math.max(0, 0.2 * value2)]).hex();
set = value.set;
Math = global.Math;
object.toonStroke = Reflect.apply(set, value, ['hsl.l', Math.max(0.12, 0.4 * value2)]).hex();
value = value.set('hsl.s', value4);
value = value.set('hsl.l', value5);
object.neonStroke = value.hex();
return object;
}
if (value == null) {
return value;
function generateRandomDisplayNameStyles(a0) { // fn#20519, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:2379, offset: 0x00ecb306, size: 215 bytes, params: 2, frame: 20
let value = a1;
let r4 = value !== undefined ? value : false;
let Math = global.Math;
let floor = Math.floor;
const Math2 = global.Math;
const value2 = Math2.random();
let property = EFFECT_ORDER[Reflect.apply(floor, Math, [value2 * EFFECT_ORDER.length])];
r4 = r4 ? selectWeightedFont(a0) : a0[global.Math.floor(global.Math.random() * a0.length)];
value = getColorPresetsForEffect(property);
const object = {fontId: r4, effectId: property};
Math = global.Math;
floor = Math.floor;
const Math4 = global.Math;
property = value[Reflect.apply(floor, Math, [Math4.random() * value.length])];
const items2 = [];
arraySpread(items2, property, 0, value2);
object.colors = items2;
return object;
}
const r5 = FLYWHEEL_FONTS.includes(value.fontId) ? (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont.DEFAULT : value.fontId;
const r4 = FLYWHEEL_EFFECTS.includes(value.effectId) ? (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID : value.effectId;
if (r5 !== value.fontId) {
object2 = {};
copyDataProperties(object2, value, r5);
object2['fontId'] = r5;
object2['effectId'] = r4;
r1 = object2;
} else if (r4 === value.effectId) {
r1 = value;
} else {
object2 = {};
copyDataProperties(object2, value, r5);
object2['fontId'] = r5;
object2['effectId'] = r4;
r1 = object2;
function applyFlywheelViewingFallback(a0, a1) { // fn#20520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:2654, offset: 0x00ecb3dd, size: 214 bytes, params: 3, frame: 15
var r1;
var object;
const value = a0;
if (a1) {
return value;
}
if (value == null) {
return value;
}
const r5 = FLYWHEEL_FONTS.includes(value.fontId) ? (require(1891) /* metro dependency 1891: DisplayNameFont */).DisplayNameFont.DEFAULT : value.fontId;
const r4 = FLYWHEEL_EFFECTS.includes(value.effectId) ? (require(1890) /* metro dependency 1890: DisplayNameEffect */).DisplayNameEffect.SOLID : value.effectId;
if (r5 !== value.fontId) {
object = {};
copyDataProperties(object, value, r5);
object['fontId'] = r5;
object['effectId'] = r4;
r1 = object;
} else if (r4 === value.effectId) {
r1 = value;
} else {
object = {};
copyDataProperties(object, value, r5);
object['fontId'] = r5;
object['effectId'] = r4;
r1 = object;
}
return r1;
}
return r1;
}
function _fun20515(a0, a1) { // fn#20515, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:2015:1177, offset: 0x00ecb048, size: 43 bytes, params: 3, frame: 11
const value = environment.__proto__;
return a0 + (FONT_WEIGHTS.get(a1) ?? 0);
}
global.__d(_fun20510, 1888, [1889, 1890, 674, 1891,
2]) /* metro module 1888, dependencies: [1889, 1890, 674, 1891, 2] */;