527 lines
29 KiB
React
527 lines
29 KiB
React
/* Metro module 1778; source: unknown; dependencies: [1779, 1653, 1780, 1621, 1762, 1654] */
|
|
function _fun19574(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#19574, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:6, offset: 0x00eadbb2, size: 1005 bytes, params: 8, frame: 24
|
|
var object6;
|
|
let env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let closure = pnpm_interpolateColorTs1;
|
|
const object8 = {};
|
|
const interpolate = (require(1779) /* metro dependency 1779 */).interpolate;
|
|
object8.interpolate = interpolate;
|
|
const Extrapolation = (require(1779) /* metro dependency 1779 */).Extrapolation;
|
|
object8.Extrapolation = Extrapolation;
|
|
object8.hsvToColor = (require(1653) /* metro dependency 1653 */).hsvToColor;
|
|
closure.__closure = object8;
|
|
closure.__workletHash = 1574790978150;
|
|
closure.__initData = {code: 'function pnpm_interpolateColorTs1(value,inputRange,colors,options){const{interpolate,Extrapolation,hsvToColor}=this.__closure;let h=0;const{useCorrectedHSVInterpolation=true}=options;if(useCorrectedHSVInterpolation){const correctedInputRange=[inputRange[0]];const originalH=colors.h;const correctedH=[originalH[0]];for(let i=1;i<originalH.length;++i){const d=originalH[i]-originalH[i-1];if(originalH[i]>originalH[i-1]&&d>0.5){correctedInputRange.push(inputRange[i]);correctedInputRange.push(inputRange[i]+0.00001);correctedH.push(originalH[i]-1);correctedH.push(originalH[i]);}else if(originalH[i]<originalH[i-1]&&d<-0.5){correctedInputRange.push(inputRange[i]);correctedInputRange.push(inputRange[i]+0.00001);correctedH.push(originalH[i]+1);correctedH.push(originalH[i]);}else{correctedInputRange.push(inputRange[i]);correctedH.push(originalH[i]);}}h=(interpolate(value,correctedInputRange,correctedH,Extrapolation.CLAMP)+1)%1;}else{h=interpolate(value,inputRange,colors.h,Extrapolation.CLAMP);}const s=interpolate(value,inputRange,colors.s,Extrapolation.CLAMP);const v=interpolate(value,inputRange,colors.v,Extrapolation.CLAMP);const a=interpolate(value,inputRange,colors.a,Extrapolation.CLAMP);return hsvToColor(h,s,v,a);}'};
|
|
closure = function(a0, a1) {
|
|
var env0_0 = a1;
|
|
return a0.map(_fun19577);
|
|
};
|
|
closure.__closure = {};
|
|
closure.__workletHash = 16826369876333;
|
|
closure.__initData = {code: 'function pnpm_interpolateColorTs2(x,gamma){return x.map(function(v){return Math.pow(v/255,gamma);});}'};
|
|
const closure2 = function(a0, a1) {
|
|
var Math = global.Math;
|
|
var Math2 = global.Math;
|
|
return Math.round(255 * Math2.pow(a0, 1 / a1));
|
|
};
|
|
closure2.__closure = {};
|
|
closure2.__workletHash = 5856560656141;
|
|
closure2.__initData = {code: 'function pnpm_interpolateColorTs3(x,gamma){return Math.round(Math.pow(x,1/gamma)*255);}'};
|
|
const closure3 = pnpm_interpolateColorTs4;
|
|
const object9 = {toLinearSpace: closure};
|
|
object9.interpolate = interpolate;
|
|
object9.Extrapolation = Extrapolation;
|
|
const rgbaColor = (require(1653) /* metro dependency 1653 */).rgbaColor;
|
|
object9.rgbaColor = rgbaColor;
|
|
object9.toGammaSpace = closure2;
|
|
closure3.__closure = object9;
|
|
closure3.__workletHash = 13883480600753;
|
|
closure3.__initData = {code: 'function pnpm_interpolateColorTs4(value,inputRange,colors,options){const{toLinearSpace,interpolate,Extrapolation,rgbaColor,toGammaSpace}=this.__closure;const{gamma=2.2}=options;let{r:outputR,g:outputG,b:outputB}=colors;if(gamma!==1){outputR=toLinearSpace(outputR,gamma);outputG=toLinearSpace(outputG,gamma);outputB=toLinearSpace(outputB,gamma);}const r=interpolate(value,inputRange,outputR,Extrapolation.CLAMP);const g=interpolate(value,inputRange,outputG,Extrapolation.CLAMP);const b=interpolate(value,inputRange,outputB,Extrapolation.CLAMP);const a=interpolate(value,inputRange,colors.a,Extrapolation.CLAMP);if(gamma===1){return rgbaColor(r,g,b,a);}return rgbaColor(toGammaSpace(r,gamma),toGammaSpace(g,gamma),toGammaSpace(b,gamma),a);}'};
|
|
closure = pnpm_interpolateColorTs5;
|
|
const object10 = {};
|
|
object10.interpolate = interpolate;
|
|
object10.Extrapolation = Extrapolation;
|
|
object10.culori = importDefault(1780) /* metro dependency 1780 */;
|
|
object10.rgbaColor = rgbaColor;
|
|
closure.__closure = object10;
|
|
closure.__workletHash = 7788654685113;
|
|
closure.__initData = {code: 'function pnpm_interpolateColorTs5(value,inputRange,colors,_options){const{interpolate,Extrapolation,culori,rgbaColor}=this.__closure;const l=interpolate(value,inputRange,colors.l,Extrapolation.CLAMP);const a=interpolate(value,inputRange,colors.a,Extrapolation.CLAMP);const b=interpolate(value,inputRange,colors.b,Extrapolation.CLAMP);const alpha=interpolate(value,inputRange,colors.alpha,Extrapolation.CLAMP);const{r:_r,g:_g,b:_b,alpha:_alpha}=culori.oklab.convert.toRgb({l:l,a:a,b:b,alpha:alpha});return rgbaColor(_r,_g,_b,_alpha);}'};
|
|
closure = _splitColorsIntoChannels;
|
|
const object11 = {};
|
|
object11.processColor = (require(1653) /* metro dependency 1653 */).processColor;
|
|
object11.red = (require(1653) /* metro dependency 1653 */).red;
|
|
object11.green = (require(1653) /* metro dependency 1653 */).green;
|
|
object11.blue = (require(1653) /* metro dependency 1653 */).blue;
|
|
object11.opacity = (require(1653) /* metro dependency 1653 */).opacity;
|
|
closure.__closure = object11;
|
|
closure.__workletHash = 8764168362190;
|
|
closure.__initData = {code: "function pnpm_interpolateColorTs6(colors,convFromRgb){const{processColor,red,green,blue,opacity}=this.__closure;const ch1=[];const ch2=[];const ch3=[];const alpha=[];for(let i=0;i<colors.length;i++){const color=colors[i];const processedColor=processColor(color);if(typeof processedColor==='number'){const convertedColor=convFromRgb({r:red(processedColor),g:green(processedColor),b:blue(processedColor)});ch1.push(convertedColor.ch1);ch2.push(convertedColor.ch2);ch3.push(convertedColor.ch3);alpha.push(opacity(processedColor));}}return{ch1:ch1,ch2:ch2,ch3:ch3,alpha:alpha};}"};
|
|
const closure4 = pnpm_interpolateColorTs7;
|
|
closure4.__closure = {_splitColorsIntoChannels: closure};
|
|
closure4.__workletHash = 937749076324;
|
|
closure4.__initData = {code: 'function pnpm_interpolateColorTs7(colors){const{_splitColorsIntoChannels}=this.__closure;const{ch1:ch1,ch2:ch2,ch3:ch3,alpha:alpha}=_splitColorsIntoChannels(colors,function(color){return{ch1:color.r,ch2:color.g,ch3:color.b};});return{r:ch1,g:ch2,b:ch3,a:alpha};}'};
|
|
const closure5 = pnpm_interpolateColorTs8;
|
|
const object12 = {_splitColorsIntoChannels: closure};
|
|
const RGBtoHSV = (require(1653) /* metro dependency 1653 */).RGBtoHSV;
|
|
object12.RGBtoHSV = RGBtoHSV;
|
|
closure5.__closure = object12;
|
|
closure5.__workletHash = 11798906675452;
|
|
closure5.__initData = {code: 'function pnpm_interpolateColorTs8(colors){const{_splitColorsIntoChannels,RGBtoHSV}=this.__closure;const{ch1:ch1,ch2:ch2,ch3:ch3,alpha:alpha}=_splitColorsIntoChannels(colors,function(color){const hsvColor=RGBtoHSV(color.r,color.g,color.b);return{ch1:hsvColor.h,ch2:hsvColor.s,ch3:hsvColor.v};});return{h:ch1,s:ch2,v:ch3,a:alpha};}'};
|
|
const closure6 = pnpm_interpolateColorTs9;
|
|
closure6.__closure = {_splitColorsIntoChannels: closure, culori: importDefault(1780) /* metro dependency 1780 */};
|
|
closure6.__workletHash = 11214827752418;
|
|
closure6.__initData = {code: 'function pnpm_interpolateColorTs9(colors){const{_splitColorsIntoChannels,culori}=this.__closure;const{ch1:ch1,ch2:ch2,ch3:ch3,alpha:alpha}=_splitColorsIntoChannels(colors,function(color){const labColor=culori.oklab.convert.fromRgb(color);return{ch1:labColor.l,ch2:labColor.a,ch3:labColor.b};});return{l:ch1,a:ch2,b:ch3,alpha:alpha};}'};
|
|
object6 = {code: 'function interpolateColor_Pnpm_interpolateColorTs10(value,inputRange,outputRange,colorSpace=\'RGB\',options={}){const{interpolateColorsHSV,getInterpolateHSV,interpolateColorsRGB,getInterpolateRGB,interpolateColorsLAB,getInterpolateLAB}=this.__closure;if(colorSpace===\'HSV\'){return interpolateColorsHSV(value,inputRange,getInterpolateHSV(outputRange),options);}else if(colorSpace===\'RGB\'){return interpolateColorsRGB(value,inputRange,getInterpolateRGB(outputRange),options);}else if(colorSpace===\'LAB\'){return interpolateColorsLAB(value,inputRange,getInterpolateLAB(outputRange),options);}throw new ReanimatedError("Invalid color space provided: "+colorSpace+". Supported values are: [\'RGB\', \'HSV\', \'LAB\'].");}'};
|
|
const value = _fun19588();
|
|
object6 = {RGB: 0};
|
|
object6[0] = 'RGB';
|
|
object6.HSV = 1;
|
|
object6[1] = 'HSV';
|
|
object6.LAB = 2;
|
|
object6[2] = 'LAB';
|
|
exports.Extrapolate = Extrapolation;
|
|
exports.interpolateColor = value;
|
|
exports.ColorSpace = object6;
|
|
exports.useInterpolateConfig = useInterpolateConfig;
|
|
}
|
|
|
|
function pnpm_interpolateColorTs1(a0, a1, a2, {useCorrectedHSVInterpolation}) { // fn#19575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:1364, offset: 0x00eadf9f, size: 699 bytes, params: 5, frame: 28
|
|
var r3;
|
|
var r5;
|
|
var value;
|
|
var interpolate;
|
|
var h;
|
|
const Extrapolation = (require(1779) /* metro dependency 1779 */).Extrapolation;
|
|
var CLAMP;
|
|
var property;
|
|
var items3;
|
|
var items2;
|
|
var length;
|
|
var value2;
|
|
var push;
|
|
var value3;
|
|
var value4;
|
|
var moduleValue;
|
|
reducibleJoin13: while (true) {
|
|
reducibleJoin12: while (true) {
|
|
if (useCorrectedHSVInterpolation === undefined) {
|
|
property = a1[0];
|
|
items3 = [property];
|
|
h = a2.h;
|
|
property = h[0];
|
|
items2 = [property];
|
|
length = h.length;
|
|
value = 1;
|
|
if (!(value < length)) {
|
|
break reducibleJoin12;
|
|
}
|
|
r3 = value;
|
|
reducibleLoop4: while (true) {
|
|
property = h[r3];
|
|
value2 = property - h[r3 - value];
|
|
property = h[r3];
|
|
reducibleJoin11: while (true) {
|
|
reducibleJoin8: while (true) {
|
|
if (property > h[r3 - value]) {
|
|
if (value2 > 0.5) {
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3]]);
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3] + 0.00001]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3] - value]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3]]);
|
|
break reducibleJoin11;
|
|
}
|
|
if (h[r3] < h[r3 - value]) {
|
|
if (value2 < -0.5) {
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3]]);
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3] + 0.00001]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3] + value]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3]]);
|
|
break reducibleJoin11;
|
|
}
|
|
break reducibleJoin8;
|
|
}
|
|
break reducibleJoin8;
|
|
}
|
|
property = h[r3];
|
|
if (property < h[r3 - value]) {
|
|
if (value2 < -0.5) {
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3]]);
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3] + 0.00001]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3] + value]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3]]);
|
|
break reducibleJoin11;
|
|
}
|
|
break reducibleJoin8;
|
|
}
|
|
break reducibleJoin8;
|
|
}
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3]]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3]]);
|
|
break reducibleJoin11;
|
|
}
|
|
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
|
length = h.length;
|
|
if (value3 < length) {
|
|
r3 = value3;
|
|
continue reducibleLoop4;
|
|
}
|
|
break reducibleJoin12;
|
|
}
|
|
} else {
|
|
if (!useCorrectedHSVInterpolation) {
|
|
value = environment;
|
|
value = require(1779) /* metro dependency 1779 */;
|
|
interpolate = value.interpolate;
|
|
h = a2.h;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
value = Reflect.apply(interpolate, value, [a0, a1, h, CLAMP]);
|
|
r5 = value;
|
|
break reducibleJoin13;
|
|
}
|
|
property = a1[0];
|
|
items3 = [property];
|
|
h = a2.h;
|
|
property = h[0];
|
|
items2 = [property];
|
|
length = h.length;
|
|
value = 1;
|
|
if (!(value < length)) {
|
|
break reducibleJoin12;
|
|
}
|
|
r3 = value;
|
|
reducibleLoop4: while (true) {
|
|
property = h[r3];
|
|
value2 = property - h[r3 - value];
|
|
property = h[r3];
|
|
reducibleJoin11: while (true) {
|
|
reducibleJoin8: while (true) {
|
|
if (property > h[r3 - value]) {
|
|
if (value2 > 0.5) {
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3]]);
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3] + 0.00001]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3] - value]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3]]);
|
|
break reducibleJoin11;
|
|
}
|
|
if (h[r3] < h[r3 - value]) {
|
|
if (value2 < -0.5) {
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3]]);
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3] + 0.00001]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3] + value]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3]]);
|
|
break reducibleJoin11;
|
|
}
|
|
break reducibleJoin8;
|
|
}
|
|
break reducibleJoin8;
|
|
}
|
|
property = h[r3];
|
|
if (property < h[r3 - value]) {
|
|
if (value2 < -0.5) {
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3]]);
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3] + 0.00001]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3] + value]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3]]);
|
|
break reducibleJoin11;
|
|
}
|
|
break reducibleJoin8;
|
|
}
|
|
break reducibleJoin8;
|
|
}
|
|
push = items3.push;
|
|
Reflect.apply(push, items3, [a1[r3]]);
|
|
push = items2.push;
|
|
Reflect.apply(push, items2, [h[r3]]);
|
|
break reducibleJoin11;
|
|
}
|
|
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
|
length = h.length;
|
|
if (value3 < length) {
|
|
r3 = value3;
|
|
continue reducibleLoop4;
|
|
}
|
|
break reducibleJoin12;
|
|
}
|
|
}
|
|
}
|
|
value4 = environment;
|
|
moduleValue = require(1779) /* metro dependency 1779 */;
|
|
interpolate = moduleValue.interpolate;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
value = (Reflect.apply(interpolate, moduleValue, [a0, items3, items2, CLAMP]) + value) % value;
|
|
r5 = value;
|
|
break reducibleJoin13;
|
|
}
|
|
interpolate = (require(1779) /* metro dependency 1779 */).interpolate;
|
|
const s = a2.s;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
value = Reflect.apply(interpolate, value, [a0, a1, s, CLAMP]);
|
|
const moduleValue2 = require(1779) /* metro dependency 1779 */;
|
|
interpolate = moduleValue2.interpolate;
|
|
const v = a2.v;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
const value5 = Reflect.apply(interpolate, moduleValue2, [a0, a1, v, CLAMP]);
|
|
const moduleValue3 = moduleValue2;
|
|
interpolate = moduleValue3.interpolate;
|
|
const a = a2.a;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
return (require(1653) /* metro dependency 1653 */).hsvToColor(r5, value, value5, Reflect.apply(interpolate,
|
|
moduleValue3, [a0, a1, a, CLAMP]));
|
|
}
|
|
|
|
function toLinearSpace(a0, a1) { // fn#19576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:2387, offset: 0x00eae25a, size: 29 bytes, params: 3, frame: 11
|
|
const env0_0 = a1;
|
|
return a0.map(function(a0) {
|
|
var Math = global.Math;
|
|
return Math.pow(a0 / 255, require);
|
|
});
|
|
}
|
|
|
|
function pnpm_interpolateColorTs4(a0, a1, {r, g, b, a}, {gamma}) { // fn#19579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:3545, offset: 0x00eae2d8, size: 428 bytes, params: 5, frame: 27
|
|
var r6;
|
|
var r9;
|
|
var r15;
|
|
var r0;
|
|
var toLinearSpaceBinding;
|
|
var value2;
|
|
var value3;
|
|
var moduleValue5;
|
|
var rgbaColor;
|
|
var toGammaSpaceBinding;
|
|
let value = 2.2;
|
|
const r12 = gamma === undefined ? value : gamma;
|
|
if (r12 === 1) {
|
|
r6 = r;
|
|
r9 = g;
|
|
r15 = b;
|
|
} else {
|
|
toLinearSpaceBinding = toLinearSpace;
|
|
value = toLinearSpaceBinding(r, r12);
|
|
value2 = toLinearSpaceBinding(g, r12);
|
|
value3 = toLinearSpaceBinding(b, r12);
|
|
r6 = value;
|
|
r9 = value2;
|
|
r15 = value3;
|
|
}
|
|
const moduleValue = require(1779) /* metro dependency 1779 */;
|
|
let interpolate = moduleValue.interpolate;
|
|
const Extrapolation = moduleValue.Extrapolation;
|
|
let CLAMP = Extrapolation.CLAMP;
|
|
const value4 = Reflect.apply(interpolate, moduleValue, [a0, a1, r6, CLAMP]);
|
|
const moduleValue2 = moduleValue;
|
|
interpolate = moduleValue2.interpolate;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
const value5 = Reflect.apply(interpolate, moduleValue2, [a0, a1, r9, CLAMP]);
|
|
const moduleValue3 = moduleValue;
|
|
interpolate = moduleValue3.interpolate;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
const value6 = Reflect.apply(interpolate, moduleValue3, [a0, a1, r15, CLAMP]);
|
|
const moduleValue4 = moduleValue;
|
|
interpolate = moduleValue4.interpolate;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
const value7 = Reflect.apply(interpolate, moduleValue4, [a0, a1, a, CLAMP]);
|
|
if (r12 === 1) {
|
|
value = require(1653) /* metro dependency 1653 */;
|
|
value = value.rgbaColor(value4, value5, value6, value7);
|
|
r0 = value;
|
|
} else {
|
|
moduleValue5 = require(1653) /* metro dependency 1653 */;
|
|
rgbaColor = moduleValue5.rgbaColor;
|
|
toGammaSpaceBinding = toGammaSpace;
|
|
value = toGammaSpaceBinding(value4, r12);
|
|
value = Reflect.apply(rgbaColor, moduleValue5, [value, toGammaSpaceBinding(value5, r12),
|
|
toGammaSpaceBinding(value6,
|
|
r12), value7]);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function pnpm_interpolateColorTs5(a0, a1, {l, a, b, alpha}, a3) { // fn#19580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:4770, offset: 0x00eae484, size: 353 bytes, params: 5, frame: 25
|
|
const moduleValue = require(1779) /* metro dependency 1779 */;
|
|
let interpolate = moduleValue.interpolate;
|
|
const Extrapolation = moduleValue.Extrapolation;
|
|
let CLAMP = Extrapolation.CLAMP;
|
|
const value2 = Reflect.apply(interpolate, moduleValue, [a0, a1, l, CLAMP]);
|
|
const moduleValue2 = moduleValue;
|
|
interpolate = moduleValue2.interpolate;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
const value3 = Reflect.apply(interpolate, moduleValue2, [a0, a1, a, CLAMP]);
|
|
const moduleValue3 = moduleValue;
|
|
interpolate = moduleValue3.interpolate;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
const value4 = Reflect.apply(interpolate, moduleValue3, [a0, a1, b, CLAMP]);
|
|
const moduleValue4 = moduleValue;
|
|
interpolate = moduleValue4.interpolate;
|
|
CLAMP = Extrapolation.CLAMP;
|
|
const value5 = Reflect.apply(interpolate, moduleValue4, [a0, a1, alpha, CLAMP]);
|
|
const convert = (importDefault(1780) /* metro dependency 1780 */).oklab.convert;
|
|
const value = convert.toRgb({l: value2, a: value3, b: value4, alpha: value5});
|
|
return (require(1653) /* metro dependency 1653 */).rgbaColor(value.r, value.g, value.b, value.alpha);
|
|
}
|
|
|
|
function _splitColorsIntoChannels(a0, a1) { // fn#19581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:5977, offset: 0x00eae5e5, size: 297 bytes, params: 3, frame: 25
|
|
var r9;
|
|
var property;
|
|
var object2;
|
|
var moduleValue;
|
|
var moduleValue2;
|
|
var moduleValue3;
|
|
var value3;
|
|
var push;
|
|
var ch1;
|
|
var ch2;
|
|
var ch3;
|
|
var moduleValue4;
|
|
var opacity;
|
|
const items5 = [];
|
|
const items2 = [];
|
|
const items3 = [];
|
|
const items4 = [];
|
|
let length = a0.length;
|
|
let value = 0;
|
|
if (value < length) {
|
|
r9 = value;
|
|
while (true) {
|
|
property = a0[r9];
|
|
value = require(1653) /* metro dependency 1653 */;
|
|
value = value.processColor(property);
|
|
if (typeof value === 'number') {
|
|
object2 = {};
|
|
moduleValue = require(1653) /* metro dependency 1653 */;
|
|
object2.r = moduleValue.red(value);
|
|
moduleValue2 = require(1653) /* metro dependency 1653 */;
|
|
object2.g = moduleValue2.green(value);
|
|
moduleValue3 = require(1653) /* metro dependency 1653 */;
|
|
object2.b = moduleValue3.blue(value);
|
|
value3 = a1(object2);
|
|
push = items5.push;
|
|
ch1 = value3.ch1;
|
|
Reflect.apply(push, items5, [ch1]);
|
|
push = items2.push;
|
|
ch2 = value3.ch2;
|
|
Reflect.apply(push, items2, [ch2]);
|
|
push = items3.push;
|
|
ch3 = value3.ch3;
|
|
Reflect.apply(push, items3, [ch3]);
|
|
push = items4.push;
|
|
moduleValue4 = require(1653) /* metro dependency 1653 */;
|
|
opacity = moduleValue4.opacity;
|
|
Reflect.apply(push, items4, [Reflect.apply(opacity, moduleValue4, [value])]);
|
|
}
|
|
value = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
|
|
length = a0.length;
|
|
if (value < length) {
|
|
r9 = value;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
return {ch1: items5, ch2: items2, ch3: items3, alpha: items4};
|
|
}
|
|
|
|
function pnpm_interpolateColorTs7(a0) { // fn#19582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:6777, offset: 0x00eae70e, size: 70 bytes, params: 2, frame: 13
|
|
const value = _splitColorsIntoChannels(a0, function(a0) {
|
|
return {ch1: a0.r, ch2: a0.g, ch3: a0.b};
|
|
});
|
|
return {r: value.ch1, g: value.ch2, b: value.ch3, a: value.alpha};
|
|
}
|
|
|
|
function pnpm_interpolateColorTs8(a0) { // fn#19584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:7349, offset: 0x00eae77a, size: 69 bytes, params: 2, frame: 13
|
|
const value = _splitColorsIntoChannels(a0, _fun19585);
|
|
return {h: value.ch1, s: value.ch2, v: value.ch3, a: value.alpha};
|
|
}
|
|
|
|
function pnpm_interpolateColorTs9(a0) { // fn#19586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:7994, offset: 0x00eae81a, size: 71 bytes, params: 2, frame: 13
|
|
const value = _splitColorsIntoChannels(a0, _fun19587);
|
|
return {l: value.ch1, a: value.ch2, b: value.ch3, alpha: value.alpha};
|
|
}
|
|
|
|
function _fun19588() { // fn#19588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:9007, offset: 0x00eae8b7, size: 112 bytes, params: 1, frame: 4
|
|
const closure = interpolateColor_19589;
|
|
closure.__closure = {interpolateColorsHSV: pnpm_interpolateColorTs1, getInterpolateHSV: pnpm_interpolateColorTs8,
|
|
interpolateColorsRGB: pnpm_interpolateColorTs4, getInterpolateRGB: pnpm_interpolateColorTs7,
|
|
interpolateColorsLAB: pnpm_interpolateColorTs5, getInterpolateLAB: pnpm_interpolateColorTs9};
|
|
closure.__workletHash = 10004340589678;
|
|
closure.__initData = env0_12;
|
|
return closure;
|
|
}
|
|
|
|
function useInterpolateConfig(a0, a1) { // fn#19590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:9786, offset: 0x00eaea41, size: 162 bytes, params: 3, frame: 17
|
|
const r4 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : env0_13.RGB;
|
|
const r3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
const value = require(1762) /* metro dependency 1762 */;
|
|
const useSharedValue = value.useSharedValue;
|
|
const object2 = {inputRange: a0, outputRange: a1, colorSpace: r4};
|
|
object2.cache = (require(1654) /* metro dependency 1654 */).makeMutable(null);
|
|
object2.options = r3;
|
|
return Reflect.apply(useSharedValue, value, [object2]);
|
|
}
|
|
|
|
function _fun19585({r, g, b}) { // fn#19585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:7397, offset: 0x00eae7bf, size: 91 bytes, params: 2, frame: 15
|
|
let value = environment.__proto__;
|
|
value = require(1653) /* metro dependency 1653 */;
|
|
value = value.RGBtoHSV(r, g, b);
|
|
return {ch1: value.h, ch2: value.s, ch3: value.v};
|
|
}
|
|
|
|
function _fun19587(a0) { // fn#19587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:8042, offset: 0x00eae861, size: 86 bytes, params: 2, frame: 11
|
|
let value = environment.__proto__;
|
|
value = (importDefault(1780) /* metro dependency 1780 */).oklab.convert.fromRgb(a0);
|
|
return {ch1: value.l, ch2: value.a, ch3: value.b};
|
|
}
|
|
|
|
function interpolateColor_19589(a0, a1, a2) { // fn#19589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1905:9024, offset: 0x00eae927, size: 282 bytes, params: 4, frame: 22
|
|
let value = 'RGB';
|
|
const r9 = arguments.length > 3 ? arguments[3] === undefined ? value : arguments[3] : value;
|
|
const r2 = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
|
if (r9 === 'HSV') {
|
|
value = environment.__proto__;
|
|
return pnpm_interpolateColorTs1(a0, a1, pnpm_interpolateColorTs8(a2), r2);
|
|
}
|
|
if (value === r9) {
|
|
value = environment.__proto__;
|
|
return pnpm_interpolateColorTs4(a0, a1, pnpm_interpolateColorTs7(a2), r2);
|
|
}
|
|
if (r9 === 'LAB') {
|
|
value = environment.__proto__;
|
|
return pnpm_interpolateColorTs5(a0, a1, pnpm_interpolateColorTs9(a2), r2);
|
|
}
|
|
value = environment.__proto__;
|
|
const ReanimatedError = (require(1621) /* metro dependency 1621 */).ReanimatedError;
|
|
value = 'Invalid color space provided: ' + r9 + ". Supported values are: ['RGB', 'HSV', 'LAB'].";
|
|
const value4 = Object.create(ReanimatedError.prototype, {constructor: {value: ReanimatedError}});
|
|
const reanimatedError = new ReanimatedError(value);
|
|
throw reanimatedError instanceof Object ? reanimatedError : value4;
|
|
}
|
|
|