Files
discord-decomp/sources/by-id/module-01653.js
T
2026-07-28 01:06:53 +03:00

1046 lines
54 KiB
JavaScript

/* Metro module 1653; source: unknown; dependencies: [1654, 1613] */
import * as Module01613Module from './module-01613.js'; /* Metro dependency 1613 */
import * as Module01654Module from './module-01654.js'; /* Metro dependency 1654 */
function _fun18138(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#18138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:6, offset: 0x00e80e7e, size: 1507 bytes, params: 8, frame: 33
let closure = function() {
var r0;
var value6;
var value = arguments.length;
var Array = global.Array;
var value3 = new Array(value);
var value5 = 0;
if (value5 < value) {
for (r0 = value5; true; r0 = value6) {
value3[r0] = arguments[r0];
value6 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (!(value6 < value)) {
break;
}
}
}
return '\\(\\s*(' + value3.join(')\\s*,?\\s*(') + ')\\s*\\)';
};
const callWithSlashSeparator_181402 = callWithSlashSeparator_18140;
const closure3 = function() {
var r0;
var value6;
var value = arguments.length;
var Array = global.Array;
var value3 = new Array(value);
var value5 = 0;
if (value5 < value) {
for (r0 = value5; true; r0 = value6) {
value3[r0] = arguments[r0];
value6 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (!(value6 < value)) {
break;
}
}
}
return '\\(\\s*(' + value3.join(')\\s*,\\s*(') + ')\\s*\\)';
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object = {};
let RegExp = global.RegExp;
let value = closure('[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+');
value = 'rgb' + value;
const value2 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
let regExp = new RegExp(value);
object.rgb = regExp instanceof Object ? regExp : value2;
RegExp = global.RegExp;
value = closure3('[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+');
let value3 = callWithSlashSeparator_181402('[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+',
'[-+]?\\d*\\.?\\d+');
const value4 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
value = 'rgba(' + value + '|' + value3 + ')';
regExp = new RegExp(value);
object.rgba = regExp instanceof Object ? regExp : value4;
RegExp = global.RegExp;
value = closure('[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+%', '[-+]?\\d*\\.?\\d+%');
value = 'hsl' + value;
let value5 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
regExp = new RegExp(value);
object.hsl = regExp instanceof Object ? regExp : value5;
RegExp = global.RegExp;
value = closure3('[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+%', '[-+]?\\d*\\.?\\d+%', '[-+]?\\d*\\.?\\d+');
let value6 = callWithSlashSeparator_181402('[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+%', '[-+]?\\d*\\.?\\d+%',
'[-+]?\\d*\\.?\\d+');
const value7 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
value = 'hsla(' + value + '|' + value6 + ')';
regExp = new RegExp(value);
object.hsla = regExp instanceof Object ? regExp : value7;
RegExp = global.RegExp;
value = closure('[-+]?\\d*\\.?\\d+', '[-+]?\\d*\\.?\\d+%', '[-+]?\\d*\\.?\\d+%');
value = 'hwb' + value;
const value8 = Object.create(RegExp.prototype, {constructor: {value: RegExp}});
regExp = new RegExp(value);
object.hwb = regExp instanceof Object ? regExp : value8;
object.hex3 = RegExp('^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$', '');
object.hex4 = RegExp('^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$', '');
object.hex6 = RegExp('^#([0-9a-fA-F]{6})$', '');
object.hex8 = RegExp('^#([0-9a-fA-F]{8})$', '');
object = {code: 'function hue2rgb_Pnpm_ColorsTs1(p,q,t){if(t<0){t+=1;}if(t>1){t-=1;}if(t<1/6){return p+(q-p)*6*t;}if(t<1/2){return q;}if(t<2/3){return p+(q-p)*(2/3-t)*6;}return p;}'};
const env0_2 = _fun18142();
object = {code: 'function hslToRgb_Pnpm_ColorsTs2(h,s,l){const{hue2rgb}=this.__closure;const q=l<0.5?l*(1+s):l+s-l*s;const p=2*l-q;const r=hue2rgb(p,q,h+1/3);const g=hue2rgb(p,q,h);const b=hue2rgb(p,q,h-1/3);return Math.round(r*255)<<24|Math.round(g*255)<<16|Math.round(b*255)<<8;}'};
const env0_4 = _fun18144();
object = {code: 'function hwbToRgb_Pnpm_ColorsTs3(h,w,b){const{hue2rgb}=this.__closure;if(w+b>=1){const gray=Math.round(w*255/(w+b));return gray<<24|gray<<16|gray<<8;}const red=hue2rgb(0,1,h+1/3)*(1-w-b)+w;const green=hue2rgb(0,1,h)*(1-w-b)+w;const blue=hue2rgb(0,1,h-1/3)*(1-w-b)+w;return Math.round(red*255)<<24|Math.round(green*255)<<16|Math.round(blue*255)<<8;}'};
const env0_6 = _fun18146();
object = {code: 'function parse255_Pnpm_ColorsTs4(str){const int=Number.parseInt(str,10);if(int<0){return 0;}if(int>255){return 255;}return int;}'};
const env0_8 = _fun18148();
object = {code: 'function parse360_Pnpm_ColorsTs5(str){const int=Number.parseFloat(str);return(int%360+360)%360/360;}'};
const env0_10 = _fun18150();
object = {code: 'function parse1_Pnpm_ColorsTs6(str){const num=Number.parseFloat(str);if(num<0){return 0;}if(num>1){return 255;}return Math.round(num*255);}'};
const env0_12 = _fun18152();
object = {code: 'function parsePercentage_Pnpm_ColorsTs7(str){const int=Number.parseFloat(str);if(int<0){return 0;}if(int>100){return 1;}return int/100;}'};
const env0_14 = _fun18154();
object = {code: 'function clampRGBA_Pnpm_ColorsTs8(RGBA){for(let i=0;i<4;i++){RGBA[i]=Math.max(0,Math.min(RGBA[i],1));}}'};
value = _fun18156();
const env0_16 = (Module01654Module).makeShareable({'transparent': 0,
'aliceblue': 4042850303, 'antiquewhite': 4209760255, 'aqua': 16777215, 'aquamarine': 2147472639,
'azure': 4043309055, 'beige': 4126530815, 'bisque': 4293182719, 'black': 255, 'blanchedalmond': 4293643775,
'blue': 65535, 'blueviolet': 2318131967, 'brown': 2771004159, 'burlywood': 3736635391,
'burntsienna': 3934150143, 'cadetblue': 1604231423, 'chartreuse': 2147418367, 'chocolate': 3530104575,
'coral': 4286533887, 'cornflowerblue': 1687547391, 'cornsilk': 4294499583, 'crimson': 3692313855,
'cyan': 16777215, 'darkblue': 35839, 'darkcyan': 9145343, 'darkgoldenrod': 3095792639, 'darkgray': 2846468607,
'darkgreen': 6553855, 'darkgrey': 2846468607, 'darkkhaki': 3182914559, 'darkmagenta': 2332068863,
'darkolivegreen': 1433087999, 'darkorange': 4287365375, 'darkorchid': 2570243327, 'darkred': 2332033279,
'darksalmon': 3918953215, 'darkseagreen': 2411499519, 'darkslateblue': 1211993087, 'darkslategray': 793726975,
'darkslategrey': 793726975, 'darkturquoise': 13554175, 'darkviolet': 2483082239, 'deeppink': 4279538687,
'deepskyblue': 12582911, 'dimgray': 1768516095, 'dimgrey': 1768516095, 'dodgerblue': 512819199,
'firebrick': 2988581631, 'floralwhite': 4294635775, 'forestgreen': 579543807, 'fuchsia': 4278255615,
'gainsboro': 3705462015, 'ghostwhite': 4177068031, 'gold': 4292280575, 'goldenrod': 3668254975,
'gray': 2155905279, 'green': 8388863, 'greenyellow': 2919182335, 'grey': 2155905279, 'honeydew': 4043305215,
'hotpink': 4285117695, 'indianred': 3445382399, 'indigo': 1258324735, 'ivory': 4294963455, 'khaki': 4041641215,
'lavender': 3873897215, 'lavenderblush': 4293981695, 'lawngreen': 2096890111, 'lemonchiffon': 4294626815,
'lightblue': 2916673279, 'lightcoral': 4034953471, 'lightcyan': 3774873599, 'lightgoldenrodyellow': 4210742015,
'lightgray': 3553874943, 'lightgreen': 2431553791, 'lightgrey': 3553874943, 'lightpink': 4290167295,
'lightsalmon': 4288707327, 'lightseagreen': 548580095, 'lightskyblue': 2278488831, 'lightslategray': 2005441023,
'lightslategrey': 2005441023, 'lightsteelblue': 2965692159, 'lightyellow': 4294959359, 'lime': 16711935,
'limegreen': 852308735, 'linen': 4210091775, 'magenta': 4278255615, 'maroon': 2147483903,
'mediumaquamarine': 1724754687, 'mediumblue': 52735, 'mediumorchid': 3126187007, 'mediumpurple': 2473647103,
'mediumseagreen': 1018393087, 'mediumslateblue': 2070474495, 'mediumspringgreen': 16423679,
'mediumturquoise': 1221709055, 'mediumvioletred': 3340076543, 'midnightblue': 421097727,
'mintcream': 4127193855, 'mistyrose': 4293190143, 'moccasin': 4293178879, 'navajowhite': 4292783615,
'navy': 33023, 'oldlace': 4260751103, 'olive': 2155872511, 'olivedrab': 1804477439, 'orange': 4289003775,
'orangered': 4282712319, 'orchid': 3664828159, 'palegoldenrod': 4008225535, 'palegreen': 2566625535,
'paleturquoise': 2951671551, 'palevioletred': 3681588223, 'papayawhip': 4293907967, 'peachpuff': 4292524543,
'peru': 3448061951, 'pink': 4290825215, 'plum': 3718307327, 'powderblue': 2967529215, 'purple': 2147516671,
'rebeccapurple': 1714657791, 'red': 4278190335, 'rosybrown': 3163525119, 'royalblue': 1097458175,
'saddlebrown': 2336560127, 'salmon': 4202722047, 'sandybrown': 4104413439, 'seagreen': 780883967,
'seashell': 4294307583, 'sienna': 2689740287, 'silver': 3233857791, 'skyblue': 2278484991,
'slateblue': 1784335871, 'slategray': 1887473919, 'slategrey': 1887473919, 'snow': 4294638335,
'springgreen': 16744447, 'steelblue': 1182971135, 'tan': 3535047935, 'teal': 8421631, 'thistle': 3636451583,
'tomato': 4284696575, 'turquoise': 1088475391, 'violet': 4001558271, 'wheat': 4125012991, 'white': 4294967295,
'whitesmoke': 4126537215, 'yellow': 4294902015, 'yellowgreen': 2597139199});
const shareable = (Module01654Module).makeShareable(['backgroundColor', 'borderBottomColor',
'borderColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor', 'borderStartColor', 'borderEndColor',
'borderBlockColor', 'borderBlockEndColor', 'borderBlockStartColor', 'color', 'outlineColor', 'shadowColor',
'textDecorationColor', 'tintColor', 'textShadowColor', 'overlayColor', 'fill', 'floodColor', 'lightingColor',
'stopColor', 'stroke']);
const env0_18 = (Module01654Module).makeShareable({boxShadow: 'color'});
object = {code: "function normalizeColor_Pnpm_ColorsTs9(color){const{MATCHERS,names,parse255,parse1,hslToRgb,parse360,parsePercentage,hwbToRgb}=this.__closure;if(typeof color==='number'){if(color>>>0===color&&color>=0&&color<=0xffffffff){return color;}return null;}if(typeof color!=='string'){return null;}let match;if(match=MATCHERS.hex6.exec(color)){return Number.parseInt(match[1]+'ff',16)>>>0;}if(names[color]!==undefined){return names[color];}if(match=MATCHERS.rgb.exec(color)){return((parse255(match[1])<<24|parse255(match[2])<<16|parse255(match[3])<<8|0x000000ff)>>>0);}if(match=MATCHERS.rgba.exec(color)){if(match[6]!==undefined){return(parse255(match[6])<<24|parse255(match[7])<<16|parse255(match[8])<<8|parse1(match[9]))>>>0;}return(parse255(match[2])<<24|parse255(match[3])<<16|parse255(match[4])<<8|parse1(match[5]))>>>0;}if(match=MATCHERS.hex3.exec(color)){return Number.parseInt(match[1]+match[1]+match[2]+match[2]+match[3]+match[3]+'ff',16)>>>0;}if(match=MATCHERS.hex8.exec(color)){return Number.parseInt(match[1],16)>>>0;}if(match=MATCHERS.hex4.exec(color)){return Number.parseInt(match[1]+match[1]+match[2]+match[2]+match[3]+match[3]+match[4]+match[4],16)>>>0;}if(match=MATCHERS.hsl.exec(color)){return(hslToRgb(parse360(match[1]),parsePercentage(match[2]),parsePercentage(match[3]))|0x000000ff)>>>0;}if(match=MATCHERS.hsla.exec(color)){if(match[6]!==undefined){return(hslToRgb(parse360(match[6]),parsePercentage(match[7]),parsePercentage(match[8]))|parse1(match[9]))>>>0;}return(hslToRgb(parse360(match[2]),parsePercentage(match[3]),parsePercentage(match[4]))|parse1(match[5]))>>>0;}if(match=MATCHERS.hwb.exec(color)){return(hwbToRgb(parse360(match[1]),parsePercentage(match[2]),parsePercentage(match[3]))|0x000000ff)>>>0;}return null;}"};
const value12 = _fun18158();
closure = function(a0) {
return (a0 >> 24 & 255) / 255;
};
closure.__closure = {};
closure.__workletHash = 5651263271273;
closure.__initData = {code: 'function pnpm_ColorsTs10(c){return(c>>24&255)/255;}'};
const closure4 = function(a0) {
return a0 >> 16 & 255;
};
closure4.__closure = {};
closure4.__workletHash = 10831766115157;
closure4.__initData = {code: 'function pnpm_ColorsTs11(c){return c>>16&255;}'};
const closure5 = function(a0) {
return a0 >> 8 & 255;
};
closure5.__closure = {};
closure5.__workletHash = 3551227549865;
closure5.__initData = {code: 'function pnpm_ColorsTs12(c){return c>>8&255;}'};
const closure6 = function(a0) {
return 255 & a0;
};
closure6.__closure = {};
closure6.__workletHash = 8634480727248;
closure6.__initData = {code: 'function pnpm_ColorsTs13(c){return c&255;}'};
const closure7 = function(a0, a1, a2) {
var r0;
var value = 1;
r0 = arguments.length > 3 ? arguments[3] === undefined ? value : arguments[3] : value;
return 'rgba(' + a0 + ', ' + a1 + ', ' + a2 + ', ' + (r0 < 0.001 ? 0 : r0) + ')';
};
closure7.__closure = {};
closure7.__workletHash = 14577013878569;
closure7.__initData = {code: 'function pnpm_ColorsTs14(r,g,b,alpha=1){const safeAlpha=alpha<0.001?0:alpha;return"rgba("+r+", "+g+", "+b+", "+safeAlpha+")";}'};
object = {code: 'function RGBtoHSV_Pnpm_ColorsTs15(r,g,b){const max=Math.max(r,g,b);const min=Math.min(r,g,b);const d=max-min;const s=max===0?0:d/max;const v=max/255;let h=0;switch(max){case min:break;case r:h=g-b+d*(g<b?6:0);h/=6*d;break;case g:h=b-r+d*2;h/=6*d;break;case b:h=r-g+d*4;h/=6*d;break;}return{h:h,s:s,v:v};}'};
const value13 = _fun18165();
object = {code: 'function HSVtoRGB_Pnpm_ColorsTs16(h,s,v){let r,g,b;const i=Math.floor(h*6);const f=h*6-i;const p=v*(1-s);const q=v*(1-f*s);const t=v*(1-(1-f)*s);switch(i%6){case 0:[r,g,b]=[v,t,p];break;case 1:[r,g,b]=[q,v,p];break;case 2:[r,g,b]=[p,v,t];break;case 3:[r,g,b]=[p,q,v];break;case 4:[r,g,b]=[t,p,v];break;case 5:[r,g,b]=[v,p,q];break;}return{r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)};}'};
const value14 = _fun18167();
const hsvToColor2 = hsvToColor;
hsvToColor2.__closure = {HSVtoRGB: value14, rgbaColor: closure7};
hsvToColor2.__workletHash = 16564231422584;
hsvToColor2.__initData = {code: 'function pnpm_ColorsTs17(h,s,v,a){const{HSVtoRGB,rgbaColor}=this.__closure;const{r:r,g:g,b:b}=HSVtoRGB(h,s,v);return rgbaColor(r,g,b,a);}'};
object = {code: "function processColorInitially_Pnpm_ColorsTs18(color){const{normalizeColor}=this.__closure;if(color===null||color===undefined){return color;}let colorNumber;if(typeof color==='number'){colorNumber=color;}else{const normalizedColor=normalizeColor(color);if(normalizedColor===null||normalizedColor===undefined){return undefined;}if(typeof normalizedColor!=='number'){return null;}colorNumber=normalizedColor;}return(colorNumber<<24|colorNumber>>>8)>>>0;}"};
const value15 = _fun18170();
object = {code: "function isColor_Pnpm_ColorsTs19(value){const{processColorInitially}=this.__closure;if(typeof value!=='string'){return false;}return processColorInitially(value)!=null;}"};
const value16 = _fun18172();
const env0_28 = (Module01613Module).isAndroid();
object = {code: "function processColor_Pnpm_ColorsTs20(color){const{processColorInitially,IS_ANDROID}=this.__closure;let normalizedColor=processColorInitially(color);if(normalizedColor===null||normalizedColor===undefined){return undefined;}if(typeof normalizedColor!=='number'){return null;}if(IS_ANDROID){normalizedColor=normalizedColor|0x0;}return normalizedColor;}"};
const value18 = _fun18174();
object = {code: 'function processColorsInProps_Pnpm_ColorsTs21(props){const{ColorProperties,processColor,NestedColorProperties}=this.__closure;for(const key in props){if(ColorProperties.includes(key)){if(Array.isArray(props[key])){props[key]=props[key].map(function(color){return processColor(color);});}else{props[key]=processColor(props[key]);}}else if(NestedColorProperties[key]){const propGroupList=props[key];for(const propGroup of propGroupList){const nestedPropertyName=NestedColorProperties[key];if(propGroup[nestedPropertyName]!==undefined){propGroup[nestedPropertyName]=processColor(propGroup[nestedPropertyName]);}}}}}'};
const value19 = _fun18176();
object = {code: 'function convertToRGBA_Pnpm_ColorsTs22(color){const{processColorInitially}=this.__closure;const processedColor=processColorInitially(color);const a=(processedColor>>>24)/255;const r=(processedColor<<8>>>24)/255;const g=(processedColor<<16>>>24)/255;const b=(processedColor<<24>>>24)/255;return[r,g,b,a];}'};
const value20 = _fun18179();
object = {code: 'function rgbaArrayToRGBAColor_Pnpm_ColorsTs23(RGBA){const alpha=RGBA[3]<0.001?0:RGBA[3];return"rgba("+Math.round(RGBA[0]*255)+", "+Math.round(RGBA[1]*255)+", "+Math.round(RGBA[2]*255)+", "+alpha+")";}'};
const value21 = _fun18181();
object = {code: 'function toLinearSpace_Pnpm_ColorsTs24(RGBA,gamma=2.2){const res=[];for(let i=0;i<3;++i){res.push(Math.pow(RGBA[i],gamma));}res.push(RGBA[3]);return res;}'};
const value22 = _fun18183();
object = {code: 'function toGammaSpace_Pnpm_ColorsTs25(RGBA,gamma=2.2){const res=[];for(let i=0;i<3;++i){res.push(Math.pow(RGBA[i],1/gamma));}res.push(RGBA[3]);return res;}'};
const value23 = _fun18185();
exports.clampRGBA = value;
exports.ColorProperties = shareable;
exports.normalizeColor = value12;
exports.opacity = closure;
exports.red = closure4;
exports.green = closure5;
exports.blue = closure6;
exports.rgbaColor = closure7;
exports.RGBtoHSV = value13;
exports.hsvToColor = hsvToColor2;
exports.processColorInitially = value15;
exports.isColor = value16;
exports.processColor = value18;
exports.processColorsInProps = value19;
exports.convertToRGBA = value20;
exports.rgbaArrayToRGBAColor = value21;
exports.toLinearSpace = value22;
exports.toGammaSpace = value23;
function _fun18142() { // fn#18142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:1315, offset: 0x00e81461, size: 46 bytes, params: 1, frame: 2
const hue2rgb_181432 = hue2rgb_18143;
hue2rgb_181432.__closure = {};
hue2rgb_181432.__workletHash = 13577481829661;
hue2rgb_181432.__initData = env0_1;
return hue2rgb_181432;
}
function _fun18144() { // fn#18144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:1832, offset: 0x00e8148f, size: 55 bytes, params: 1, frame: 4
const hslToRgb_181452 = hslToRgb_18145;
hslToRgb_181452.__closure = {hue2rgb: env0_2};
hslToRgb_181452.__workletHash = 1406907784351;
hslToRgb_181452.__initData = env0_3;
return hslToRgb_181452;
function hslToRgb_18145(a0, a1, a2) { // fn#18145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:1849, offset: 0x00e814c6, size: 203 bytes, params: 4, frame: 18
var r6;
var value;
if (a2 < 0.5) {
r6 = a2 * (1 + a1);
} else {
value = a2 + a1;
value -= a2 * a1;
r6 = value;
}
value = 2 * a2 - r6;
const binding = env1_2;
const value3 = binding(value, r6, a0 + 0.3333333333333333);
const value4 = binding(value, r6, a0);
value = binding(value, r6, a0 - 0.3333333333333333);
let Math = global.Math;
const value6 = Math.round(255 * value3) << 24;
Math = global.Math;
const value8 = Math.round(255 * value4) << 16;
Math = global.Math;
value = Math.round(255 * value);
value <<= 8;
return value6 | value8 | value;
}
}
function _fun18146() { // fn#18146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:2494, offset: 0x00e81591, size: 55 bytes, params: 1, frame: 4
const hwbToRgb_181472 = hwbToRgb_18147;
hwbToRgb_181472.__closure = {hue2rgb: env0_2};
hwbToRgb_181472.__workletHash = 16684751503669;
hwbToRgb_181472.__initData = env0_5;
return hwbToRgb_181472;
function hwbToRgb_18147(a0, a1, a2) { // fn#18147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:2511, offset: 0x00e815c8, size: 281 bytes, params: 4, frame: 21
var value;
var Math;
var value10;
var value11;
if (a1 + a2 >= 1) {
Math = global.Math;
value = 255 * a1;
value = Math.round(value / (a1 + a2));
value10 = value << 24;
value11 = value << 16;
value <<= 8;
return value10 | value11 | value;
}
value = environment.__proto__;
const binding = env1_2;
value = binding(0, 1, a0 + 0.3333333333333333);
value = value * (1 - a1 - a2) + a1;
const value3 = binding(0, 1, a0) * (1 - a1 - a2) + a1;
const value5 = binding(0, 1, a0 - 0.3333333333333333) * (1 - a1 - a2) + a1;
Math = global.Math;
value = Math.round(255 * value);
value <<= 24;
Math = global.Math;
const value7 = Math.round(255 * value3) << 16;
Math = global.Math;
return value | value7 | Math.round(255 * value5) << 8;
}
}
function _fun18148() { // fn#18148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:3000, offset: 0x00e816e1, size: 46 bytes, params: 1, frame: 2
const closure = function(a0) {
var Number = global.Number;
var int = Number.parseInt(a0, 10);
var value = 0;
return int < value ? value : int > 255 ? 255 : int;
};
closure.__closure = {};
closure.__workletHash = 1908258547020;
closure.__initData = env0_7;
return closure;
}
function _fun18150() { // fn#18150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:3278, offset: 0x00e81744, size: 46 bytes, params: 1, frame: 2
const closure = function(a0) {
var Number = global.Number;
return (Number.parseFloat(a0) % 360 + 360) % 360 / 360;
};
closure.__closure = {};
closure.__workletHash = 15674458953827;
closure.__initData = env0_9;
return closure;
}
function _fun18152() { // fn#18152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:3587, offset: 0x00e817a0, size: 46 bytes, params: 1, frame: 2
const closure = function(a0) {
var r1;
var r0;
var value3;
var value = global.Number.parseFloat(a0);
var value2 = 0;
if (value < value2) {
r0 = value2;
} else {
value3 = 255;
if (value > 1) {
r1 = value3;
} else {
value = global.Math.round(value3 * value);
r1 = value;
}
r0 = r1;
}
return r0;
};
closure.__closure = {};
closure.__workletHash = 1305446443589;
closure.__initData = env0_11;
return closure;
}
function _fun18154() { // fn#18154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:3912, offset: 0x00e81816, size: 46 bytes, params: 1, frame: 2
const closure = function(a0) {
var r1;
var r0;
var Number = global.Number;
var value = Number.parseFloat(a0);
var value2 = 0;
if (value < value2) {
r0 = value2;
} else {
if (value > 100) {
r1 = 1;
} else {
value /= 100;
r1 = value;
}
r0 = r1;
}
return r0;
};
closure.__closure = {};
closure.__workletHash = 3056354218613;
closure.__initData = env0_13;
return closure;
}
function _fun18156() { // fn#18156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:4201, offset: 0x00e81879, size: 46 bytes, params: 1, frame: 2
const closure = function(a0) {
var Math;
var Math2;
var value2;
var value = 0;
var r0 = value;
reducibleLoop1: while (true) {
Math = global.Math;
Math2 = global.Math;
a0[r0] = Math.max(value, Math2.min(a0[r0], 1));
value2 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (value2 < 4) {
r0 = value2;
continue reducibleLoop1;
}
break reducibleLoop1;
}
};
closure.__closure = {};
closure.__workletHash = 13575809516663;
closure.__initData = env0_15;
return closure;
}
function _fun18158() { // fn#18158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:9665, offset: 0x00e818eb, size: 129 bytes, params: 1, frame: 4
const normalizeColor_181592 = normalizeColor_18159;
normalizeColor_181592.__closure = {MATCHERS: env0_0, names: env0_16, parse255: env0_8, parse1: env0_12,
hslToRgb: env0_4, parse360: env0_10, parsePercentage: env0_14, hwbToRgb: env0_6};
normalizeColor_181592.__workletHash = 13656798455904;
normalizeColor_181592.__initData = env0_19;
return normalizeColor_181592;
function normalizeColor_18159(a0) { // fn#18159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:9682, offset: 0x00e8196c, size: 1238 bytes, params: 2, frame: 29
var r1;
var r5;
var r0;
var value3;
var value4;
var value5;
var value6;
var value7;
var value8;
var value9;
var value10;
var value11;
var value12;
var binding;
var value13;
var binding3;
var binding5;
var binding7;
var binding9;
var Number;
var parseInt;
var value19;
var value21;
var value24;
var value25;
var value31;
let value = a0;
const value2 = typeof value;
if (value2 === 'number') {
value31 = null;
r0 = value >>> 0 !== value ? value31 : value >= 0 && value <= 4294967295 ? value : value31;
} else {
value3 = null;
if (value2 !== 'string') {
r0 = value3;
} else {
value4 = environment.__proto__;
value5 = env1_0.hex6.exec(value);
if (value5) {
value = global.Number.parseInt(value5[1] + 'ff', 16);
value >>>= 0;
r1 = value;
} else if (env1_16[value] !== undefined) {
r1 = env1_16[value];
} else {
value6 = env1_0.rgb.exec(value);
if (value6) {
binding = env1_8;
value = binding(value6[1]);
value <<= 24;
value = (value | binding(value6[2]) << 16 | binding(value6[3]) << 8 | 255) >>> 0;
r1 = value;
} else {
value7 = env1_0.rgba.exec(value);
if (value7) {
if (value7[6] !== undefined) {
binding = env1_8;
value = binding(value7[6]);
value <<= 24;
value24 = binding(value7[7]) << 16;
value25 = binding(value7[8]) << 8;
binding = env1_12;
value = (value | value24 | value25 | binding(value7[9])) >>> 0;
r5 = value;
} else {
binding = env1_8;
value = binding(value7[2]);
value <<= 24;
value19 = binding(value7[3]) << 16;
value21 = binding(value7[4]) << 8;
binding = env1_12;
value = (value | value19 | value21 | binding(value7[5])) >>> 0;
r5 = value;
}
r1 = r5;
} else {
value8 = env1_0.hex3.exec(value);
if (value8) {
Number = global.Number;
parseInt = Number.parseInt;
value = value8[1] + value8[1];
value += value8[2];
value += value8[2];
value += value8[3];
value = Reflect.apply(parseInt, Number, [value + value8[3] + 'ff', 16]);
value >>>= 0;
r1 = value;
} else {
value9 = env1_0.hex8.exec(value);
if (value9) {
value = global.Number.parseInt(value9[1], 16);
value >>>= 0;
r1 = value;
} else {
value10 = env1_0.hex4.exec(value);
if (value10) {
Number = global.Number;
parseInt = Number.parseInt;
value = value10[1] + value10[1];
value += value10[2];
value += value10[2];
value += value10[3];
value += value10[3];
value += value10[4];
value = Reflect.apply(parseInt, Number, [value + value10[4], 16]);
value >>>= 0;
r1 = value;
} else {
value11 = env1_0.hsl.exec(value);
if (value11) {
binding = env1_4;
value = env1_10(value11[1]);
binding9 = env1_14;
value = binding(value, binding9(value11[2]), binding9(value11[3]));
value = (255 | value) >>> 0;
r1 = value;
} else {
value12 = env1_0.hsla.exec(value);
if (value12) {
if (value12[6] !== undefined) {
binding = env1_4;
value = env1_10(value12[6]);
binding7 = env1_14;
value = binding(value, binding7(value12[7]), binding7(value12[8]));
binding = env1_12;
value |= binding(value12[9]);
value >>>= 0;
r5 = value;
} else {
binding = env1_4;
value = env1_10(value12[2]);
binding5 = env1_14;
value = binding(value, binding5(value12[3]), binding5(value12[4]));
binding = env1_12;
value |= binding(value12[5]);
value >>>= 0;
r5 = value;
}
r1 = r5;
} else {
value = env1_0.hwb.exec(value);
if (value) {
binding = env1_6;
value13 = env1_10(value[1]);
binding3 = env1_14;
value = binding(value13, binding3(value[2]), binding3(value[3]));
value = (255 | value) >>> 0;
r1 = value;
} else {
r1 = value3;
}
}
}
}
}
}
}
}
}
r0 = r1;
}
}
return r0;
}
}
function _fun18165() { // fn#18165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:12023, offset: 0x00e81f01, size: 46 bytes, params: 1, frame: 2
const RGBtoHSV2 = RGBtoHSV;
RGBtoHSV2.__closure = {};
RGBtoHSV2.__workletHash = 13961093508129;
RGBtoHSV2.__initData = env0_22;
return RGBtoHSV2;
}
function _fun18167() { // fn#18167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:12760, offset: 0x00e81ff4, size: 46 bytes, params: 1, frame: 2
const HSVtoRGB2 = HSVtoRGB;
HSVtoRGB2.__closure = {};
HSVtoRGB2.__workletHash = 5232397720804;
HSVtoRGB2.__initData = env0_23;
return HSVtoRGB2;
}
function hsvToColor(a0, a1, a2, a3) { // fn#18169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:13328, offset: 0x00e82134, size: 56 bytes, params: 5, frame: 17
const value2 = env0_24(a0, a1, a2);
return rgbaColor(value2.r, value2.g, value2.b, a3);
}
function _fun18170() { // fn#18170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:13964, offset: 0x00e8216c, size: 55 bytes, params: 1, frame: 4
const processColorInitially2 = processColorInitially;
processColorInitially2.__closure = {normalizeColor: env0_20};
processColorInitially2.__workletHash = 7970244905356;
processColorInitially2.__initData = env0_25;
return processColorInitially2;
function processColorInitially(a0) { // fn#18171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:13981, offset: 0x00e821a3, size: 83 bytes, params: 2, frame: 15
var r3;
let value = a0;
if (value == null) {
return value;
}
if (typeof value === 'number') {
r3 = value;
value = r3 << 24;
return (value | r3 >>> 8) >>> 0;
}
value = env1_20(value);
if (value == null) {
return undefined;
}
if (typeof value === 'number') {
r3 = value;
value = r3 << 24;
return (value | r3 >>> 8) >>> 0;
}
return null;
}
}
function _fun18172() { // fn#18172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:14435, offset: 0x00e821f6, size: 55 bytes, params: 1, frame: 4
const isColor2 = isColor;
isColor2.__closure = {processColorInitially: env0_26};
isColor2.__workletHash = 13504829084422;
isColor2.__initData = env0_27;
return isColor2;
function isColor(a0) { // fn#18173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:14452, offset: 0x00e8222d, size: 39 bytes, params: 2, frame: 12
var r0;
let value = typeof a0 === 'string';
if (value) {
value = environment.__proto__;
value = env1_26(a0);
value = value != null;
r0 = value;
} else {
r0 = value;
}
return r0;
}
}
function _fun18174() { // fn#18174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:14994, offset: 0x00e82254, size: 64 bytes, params: 1, frame: 4
const processColor_181752 = processColor_18175;
processColor_181752.__closure = {processColorInitially: env0_26, IS_ANDROID: env0_28};
processColor_181752.__workletHash = 850613387330;
processColor_181752.__initData = env0_29;
return processColor_181752;
function processColor_18175(a0) { // fn#18175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:15011, offset: 0x00e82294, size: 56 bytes, params: 2, frame: 13
const value = environment.__proto__;
const value2 = env1_26(a0);
const value3 = null;
if (value3 != value2) {
return typeof value2 !== 'number' ? value3 : env1_28 ? value2 | 0 : value2;
}
}
}
function _fun18176() { // fn#18176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:15838, offset: 0x00e822cc, size: 75 bytes, params: 1, frame: 4
const processColorsInProps2 = processColorsInProps;
processColorsInProps2.__closure = {ColorProperties: env0_17, processColor: env0_30, NestedColorProperties: env0_18};
processColorsInProps2.__workletHash = 978448002474;
processColorsInProps2.__initData = env0_31;
return processColorsInProps2;
function processColorsInProps(a0) { // fn#18177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:15855, offset: 0x00e82317, size: 243 bytes, params: 2, frame: 27
var environment;
var r5;
var r14;
var value;
var propertyName;
var propertyName2;
var binding;
var includes;
var iterator;
var iterator2;
var item;
var item2;
var property;
var property2;
var value2;
var property3;
var value3;
var error;
var Array;
var isArray;
var map;
exceptionSkip18: while (true) {
exceptionLanding18: while (true) {
value = environment.__proto__;
for (propertyName in a0) {
binding = env1_17;
includes = binding.includes;
if (Reflect.apply(includes, binding, [propertyName])) {
Array = global.Array;
isArray = Array.isArray;
if (Reflect.apply(isArray, Array, [a0[propertyName]])) {
property = a0[propertyName];
map = property.map;
a0[propertyName] = Reflect.apply(map, property, [_fun18178]);
r5 = propertyName2;
} else {
binding = env1_30;
a0[propertyName] = binding(a0[propertyName]);
r5 = propertyName2;
}
} else {
if (!env1_18[propertyName]) {
r5 = propertyName2;
continue;
}
iterator = a0[propertyName][Symbol.iterator]();
iterator2 = iterator.next;
r14 = iterator;
while (true) {
item2 = Reflect.apply(iterator2, r14, []);
item = item2.value;
item2 = item2.done ? undefined : r14;
if (item2 === undefined) {
r5 = propertyName2;
break;
}
try {
binding = env1_18;
} catch (error) {
break exceptionLanding18;
}
try {
property = binding[propertyName];
} catch (error) {
break exceptionLanding18;
}
try {
property2 = item[property];
} catch (error) {
break exceptionLanding18;
}
try {
value2 = property2 === undefined;
} catch (error) {
break exceptionLanding18;
}
if (value2) {
r14 = item2;
continue;
}
try {
binding = env1_30;
} catch (error) {
break exceptionLanding18;
}
try {
property3 = item[property];
} catch (error) {
break exceptionLanding18;
}
try {
value3 = binding(property3);
} catch (error) {
break exceptionLanding18;
}
try {
item[property] = value3;
} catch (error) {
break exceptionLanding18;
}
r14 = item2;
}
}
}
return undefined;
break exceptionSkip18;
}
try {
item2.return();
} catch {
}
throw error;
break exceptionSkip18;
}
function _fun18178(a0) { // fn#18178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:15955, offset: 0x00e8240a, size: 19 bytes, params: 2, frame: 11
return env2_30(a0);
}
}
}
function _fun18179() { // fn#18179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:16532, offset: 0x00e8241d, size: 55 bytes, params: 1, frame: 4
const convertToRGBA2 = convertToRGBA;
convertToRGBA2.__closure = {processColorInitially: env0_26};
convertToRGBA2.__workletHash = 15503083969849;
convertToRGBA2.__initData = env0_32;
return convertToRGBA2;
function convertToRGBA(a0) { // fn#18180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:16549, offset: 0x00e82454, size: 95 bytes, params: 2, frame: 13
let value = environment.__proto__;
value = env1_26(a0);
return [(value << 8 >>> 24) / 255, (value << 16 >>> 24) / 255, (value << 24 >>> 24) / 255, (value >>> 24) / 255];
}
}
function _fun18181() { // fn#18181, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:16970, offset: 0x00e824b3, size: 46 bytes, params: 1, frame: 2
const rgbaArrayToRGBAColor2 = rgbaArrayToRGBAColor;
rgbaArrayToRGBAColor2.__closure = {};
rgbaArrayToRGBAColor2.__workletHash = 9717764015913;
rgbaArrayToRGBAColor2.__initData = env0_33;
return rgbaArrayToRGBAColor2;
}
function _fun18183() { // fn#18183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:17381, offset: 0x00e82589, size: 46 bytes, params: 1, frame: 2
const closure = function(a0) {
var r5;
var Math;
var value = 2.2;
reducibleJoin3: while (true) {
if (arguments.length > 1) {
if (arguments[1] === undefined) {
r5 = value;
break reducibleJoin3;
}
value = arguments[1];
r5 = value;
break reducibleJoin3;
}
r5 = value;
break reducibleJoin3;
}
var items = [];
var r4 = 0;
reducibleLoop4: while (true) {
Math = global.Math;
items.push(Math.pow(a0[r4], r5));
value = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
if (value < 3) {
r4 = value;
continue reducibleLoop4;
}
break reducibleLoop4;
}
items.push(a0[3]);
return items;
};
closure.__closure = {};
closure.__workletHash = 2672100143834;
closure.__initData = env0_34;
return closure;
}
function _fun18185() { // fn#18185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:17802, offset: 0x00e82629, size: 46 bytes, params: 1, frame: 2
const closure = function(a0) {
var r5;
var Math;
var property;
var value = 2.2;
reducibleJoin3: while (true) {
if (arguments.length > 1) {
if (arguments[1] === undefined) {
r5 = value;
break reducibleJoin3;
}
value = arguments[1];
r5 = value;
break reducibleJoin3;
}
r5 = value;
break reducibleJoin3;
}
var items = [];
var r4 = 0;
reducibleLoop4: while (true) {
Math = global.Math;
property = a0[r4];
items.push(Math.pow(property, 1 / r5));
value = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
if (value < 3) {
r4 = value;
continue reducibleLoop4;
}
break reducibleLoop4;
}
items.push(a0[3]);
return items;
};
closure.__closure = {};
closure.__workletHash = 1726439203743;
closure.__initData = env0_35;
return closure;
}
}
function callWithSlashSeparator_18140() { // fn#18140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:285, offset: 0x00c57258, size: 150 bytes, params: 1, frame: 15
var r0;
var value5;
let value = arguments.length;
const Array = global.Array;
const array = new Array(value);
const value4 = 0;
if (value4 < value) {
for (r0 = value4; true; r0 = value5) {
array[r0] = arguments[r0];
value5 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (!(value5 < value)) {
break;
}
}
}
value = array.slice(value4, array.length - 1);
value = value.join(')\\s*,?\\s*(');
value = '\\(\\s*(' + value;
return value + ')\\s*/\\s*(' + array[array.length - 1] + ')\\s*\\)';
}
function hue2rgb_18143(a0, a1, a2) { // fn#18143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:1332, offset: 0x00c56f28, size: 136 bytes, params: 4, frame: 7
var r0;
let value = a0;
const value2 = a1;
const value3 = a2;
let r4 = value3 < 0 ? value3 + 1 : value3;
const r3 = r4 > 1 ? r4 - 1 : r4;
if (r3 < 0.16666666666666666) {
value += 6 * (value2 - value) * r3;
r0 = value;
} else if (r3 < 0.5) {
r0 = value2;
} else {
if (r3 < 0.6666666666666666) {
value += (value2 - value) * (0.6666666666666666 - r3) * 6;
r4 = value;
} else {
r4 = value;
}
r0 = r4;
}
return r0;
}
function RGBtoHSV(a0, a1, a2) { // fn#18166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:12040, offset: 0x00e81f2f, size: 197 bytes, params: 4, frame: 20
var r3;
let Math = global.Math;
let value = Math.max(a0, a1, a2);
Math = global.Math;
const value2 = Math.min(a0, a1, a2);
const value3 = value - value2;
const value4 = 0;
const r2 = value4 === value ? value4 : value3 / value;
const value6 = value / 255;
if (value2 === value) {
r3 = value4;
} else if (a0 === value) {
value = a1 - a2;
value += value3 * (a1 < a2 ? 6 : value4);
value /= 6 * value3;
r3 = value;
} else if (a1 === value) {
value = a2 - a0;
value += 2 * value3;
value /= 6 * value3;
r3 = value;
} else if (a2 !== value) {
r3 = value4;
} else {
value = a0 - a1;
value += 4 * value3;
value /= 6 * value3;
r3 = value;
}
return {h: r3, s: r2, v: value6};
}
function HSVtoRGB(a0, a1, a2) { // fn#18168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:12777, offset: 0x00e82022, size: 274 bytes, params: 4, frame: 18
var r3;
var r4;
var r5;
var value8;
const value = a2;
let Math = global.Math;
const value2 = Math.floor(6 * a0);
const value3 = 6 * a0 - value2;
const value4 = value * (1 - a1);
const value5 = value * (1 - value3 * a1);
const value6 = value * (1 - (1 - value3) * a1);
const value7 = value2 % 6;
if (value7 === 0) {
r3 = value6;
r4 = value4;
r5 = value;
} else if (value7 === 1) {
r3 = value;
r4 = value4;
r5 = value5;
} else if (value7 === 2) {
r3 = value;
r4 = value6;
r5 = value4;
} else if (value7 === 3) {
r3 = value5;
r4 = value;
r5 = value4;
} else if (value7 === 4) {
r3 = value4;
r4 = value;
r5 = value6;
} else {
value8 = undefined;
if (value7 !== 5) {
r3 = value8;
r4 = value8;
r5 = value8;
} else {
r3 = value4;
r4 = value5;
r5 = value;
}
}
const object = {};
Math = global.Math;
object.r = Math.round(255 * r5);
Math = global.Math;
object.g = Math.round(255 * r3);
Math = global.Math;
object.b = Math.round(255 * r4);
return object;
}
function rgbaArrayToRGBAColor(a0) { // fn#18182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1780:16987, offset: 0x00e824e1, size: 168 bytes, params: 2, frame: 24
let value = 0;
const r7 = a0[3] < 0.001 ? value : a0[3];
let Math = global.Math;
value = Math.round(255 * a0[value]);
Math = global.Math;
const value2 = Math.round(255 * a0[1]);
Math = global.Math;
return 'rgba(' + value + ', ' + value2 + ', ' + Math.round(255 * a0[2]) + ', ' + r7 + ')';
}
global.__d(_fun18138, 1653, [1654, 1613]) /* metro module 1653, dependencies: [1654, 1613] */;