823 lines
37 KiB
TypeScript
823 lines
37 KiB
TypeScript
/* Metro module 4501; source: design/components/Styles/native/createStyles.tsx; dependencies: [57, 27, 4502, 3964, 3868, 477, 697, 3861, 4017, 4504, 4507, 4045, 1357, 2] */
|
|
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import ClientThemesBackgroundStore from '../../../../modules/client_themes/ClientThemesBackgroundStore.tsx'; /* Metro dependency 3964 */
|
|
import AccessibilityStore from '../../../../modules/a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as MobileVisualRefreshExperimentModule from '../../../../modules/themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
|
|
import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
|
|
import * as ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as MobileThemesUtilsModule from '../../../../modules/client_themes/native/MobileThemesUtils.tsx'; /* Metro dependency 4045 */
|
|
|
|
function _fun38426(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38426, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:6, offset: 0x010bff6e, size: 373 bytes, params: 8, frame: 21
|
|
let env0_0 = require;
|
|
const _arrayLikeToArray_38429 = function(a0, a1) {
|
|
var r0;
|
|
var r1;
|
|
var r2;
|
|
var value3;
|
|
var length;
|
|
var value5;
|
|
var value = undefined;
|
|
var value2 = value == null;
|
|
reducibleJoin2: while (true) {
|
|
if (value2) {
|
|
r0 = value2;
|
|
break reducibleJoin2;
|
|
}
|
|
value3 = value > a0.length;
|
|
r0 = value3;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (r0) {
|
|
length = a0.length;
|
|
r1 = length;
|
|
break reducibleJoin4;
|
|
}
|
|
r1 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
value = (0, global.Array)(r1);
|
|
var value4 = 0;
|
|
if (value4 < r1) {
|
|
r2 = value4;
|
|
reducibleLoop5: while (true) {
|
|
value[r2] = a0[r2];
|
|
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value5 < r1) {
|
|
r2 = value5;
|
|
continue reducibleLoop5;
|
|
}
|
|
break reducibleLoop5;
|
|
}
|
|
}
|
|
return value;
|
|
};
|
|
const createCacheKey = function(a0) {
|
|
var r2;
|
|
return copyRestArgs(0, r2).join('');
|
|
};
|
|
const processColorOrThrow2 = processColorOrThrow;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Set = global.Set;
|
|
Object.create(Set.prototype, {constructor: {value: Set}});
|
|
new Set(['backgroundColor', 'borderBottomColor', 'borderColor', 'borderEndColor', 'borderLeftColor',
|
|
'borderRightColor', 'borderStartColor', 'borderTopColor', 'color', 'shadowColor', 'shadowOffset',
|
|
'shadowOpacity', 'shadowRadius', 'elevation', 'textDecorationColor', 'textShadowColor', 'tintColor']);
|
|
const Symbol = global.Symbol;
|
|
const env0_7 = Symbol.for('dynamicToken');
|
|
const env0_8 = ['light', 'darker', 'midnight'];
|
|
object = {code: 'function createStylesTsx1(){const{resolvedStyles,withTiming,interpolateColor,themeIndex,stops,timingStandard}=this.__closure;const result={};for(const propertyName in resolvedStyles){const value=resolvedStyles[propertyName];if(Array.isArray(value)){result[propertyName]=withTiming(interpolateColor(themeIndex.get(),stops,value),timingStandard);}else{result[propertyName]=value;}}return result;}'};
|
|
(FileImportTrackerModule).fileFinishedImporting('design/components/Styles/native/createStyles.tsx');
|
|
exports.experimental_createToken = experimental_createToken;
|
|
exports.createStyles = function(a0) {
|
|
var env0_0 = a0;
|
|
var Map = global.Map;
|
|
var env0_1 = new Map();
|
|
var env0_2 = typeof a0 === 'function';
|
|
return _fun38436;
|
|
};
|
|
exports.createLegacyClassComponentStyles = function(a0) {
|
|
var env0_0 = a0;
|
|
var Map = global.Map;
|
|
var env0_1 = new Map();
|
|
return _fun38440;
|
|
};
|
|
exports.useLegacyClassComponentStyles = useLegacyClassComponentStyles;
|
|
exports.createStyleProperties = function(a0) {
|
|
var env0_0 = a0;
|
|
var Map = global.Map;
|
|
var env0_1 = new Map();
|
|
return _fun38445;
|
|
};
|
|
exports.processColorOrThrow = processColorOrThrow2;
|
|
exports.createNativeStyleProperties = function(a0) {
|
|
var env0_0 = a0;
|
|
var Map = global.Map;
|
|
var env0_1 = new Map();
|
|
return _fun38447;
|
|
};
|
|
exports.createAnimatedThemedStyles = createAnimatedThemedStyles;
|
|
function _createForOfIteratorHelperLoose_38427(a0, a1) { // fn#38427, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:158, offset: 0x010c00e3, 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)) {
|
|
if (r1) {
|
|
}
|
|
return _fun38428;
|
|
}
|
|
value = undefined;
|
|
if (a0) {
|
|
if (typeof a0 === 'string') {
|
|
value = _arrayLikeToArray_38429(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') {
|
|
value = _arrayLikeToArray_38429(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
|
if (regexp.test(r9)) {
|
|
value = _arrayLikeToArray_38429(a0, value);
|
|
r6 = value;
|
|
} else {
|
|
r6 = value;
|
|
}
|
|
}
|
|
r5 = r6;
|
|
}
|
|
} else {
|
|
r5 = value;
|
|
}
|
|
if (r5) {
|
|
if (r5) {
|
|
}
|
|
return _fun38428;
|
|
}
|
|
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 _fun38428() { // fn#38428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:729, 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]};
|
|
}
|
|
|
|
}
|
|
|
|
function processColorOrThrow(a0) { // fn#38431, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:1434, offset: 0x010c026b, size: 82 bytes, params: 2, frame: 14
|
|
var Error;
|
|
let value = processColor(a0);
|
|
if (value == null) {
|
|
Error = global.Error;
|
|
value = 'Unable to parse color: "' + a0 + '"';
|
|
throw new Error();
|
|
}
|
|
return value;
|
|
}
|
|
|
|
function parseThemedStyles(a0, a1) { // fn#38432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:1546, offset: 0x010c02bd, size: 634 bytes, params: 3, frame: 56
|
|
var r27;
|
|
var r37;
|
|
var r40;
|
|
var r42;
|
|
var r39;
|
|
var r41;
|
|
var r44;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var value8;
|
|
var hasOwnProperty;
|
|
var hasOwnProperty2;
|
|
var value9;
|
|
var internal;
|
|
var isSemanticColor;
|
|
var adjustColorSaturation;
|
|
var value10;
|
|
var adjustColorContrast;
|
|
var value11;
|
|
var moduleValue;
|
|
var getSemanticColorContextFromThemeContext;
|
|
var value12;
|
|
var resolveSemanticColor;
|
|
var resolve;
|
|
var object;
|
|
var moduleValue2;
|
|
var isAndroid;
|
|
var enabledExperiments;
|
|
var density;
|
|
const theme = a1.theme;
|
|
const saturation = a1.saturation;
|
|
const contrast = a1.contrast;
|
|
const object2 = {};
|
|
const value = 'compact';
|
|
const value3 = 'text';
|
|
const value4 = 'generic';
|
|
const value5 = 'border';
|
|
const value6 = 'background';
|
|
const value7 = saturation !== 1;
|
|
const properties = Object.keys(a0);
|
|
const properties2 = 0;
|
|
const properties3 = properties.length;
|
|
if (properties !== undefined) {
|
|
r27 = properties2;
|
|
reducibleLoop1: while (true) {
|
|
propertyName = properties[r27];
|
|
propertyName2 = r27 + 1;
|
|
if (propertyName === undefined) {
|
|
break reducibleLoop1;
|
|
}
|
|
property = a0[propertyName];
|
|
value8 = property != null;
|
|
reducibleJoin4: while (true) {
|
|
if (value8) {
|
|
hasOwnProperty = property.hasOwnProperty;
|
|
hasOwnProperty2 = Reflect.apply(hasOwnProperty, property, [env0_7]);
|
|
r37 = hasOwnProperty2;
|
|
break reducibleJoin4;
|
|
}
|
|
r37 = value8;
|
|
break reducibleJoin4;
|
|
}
|
|
reducibleJoin6: while (true) {
|
|
if (r37) {
|
|
value9 = property[env0_7](a1);
|
|
r40 = value9;
|
|
break reducibleJoin6;
|
|
}
|
|
r40 = property;
|
|
break reducibleJoin6;
|
|
}
|
|
if (r40 != null) {
|
|
hasOwnProperty = r40.hasOwnProperty;
|
|
reducibleJoin8: while (true) {
|
|
if (Reflect.apply(hasOwnProperty, r40, ['resolve'])) {
|
|
resolve = r40.resolve;
|
|
object = {theme: theme};
|
|
moduleValue2 = require(477) /* metro dependency 477: PlatformUtils */;
|
|
isAndroid = moduleValue2.isAndroid;
|
|
object.isAndroid = Reflect.apply(isAndroid, moduleValue2, []);
|
|
enabledExperiments = a1.enabledExperiments;
|
|
reducibleJoin27: while (true) {
|
|
if (enabledExperiments != null) {
|
|
r41 = enabledExperiments;
|
|
break reducibleJoin27;
|
|
}
|
|
r41 = [];
|
|
break reducibleJoin27;
|
|
}
|
|
object.enabledExperiments = r41;
|
|
density = a1.density;
|
|
r41 = density ?? value;
|
|
object.density = r41;
|
|
object2[propertyName] = Reflect.apply(resolve, r40, [object]);
|
|
r27 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleJoin8;
|
|
}
|
|
}
|
|
internal = (importDefault(697) /* metro dependency 697: native */).internal;
|
|
isSemanticColor = internal.isSemanticColor;
|
|
if (Reflect.apply(isSemanticColor, internal, [r40])) {
|
|
moduleValue = require(3861) /* metro dependency 3861: SemanticColorContextNative */;
|
|
getSemanticColorContextFromThemeContext = moduleValue.getSemanticColorContextFromThemeContext;
|
|
value12 = Reflect.apply(getSemanticColorContextFromThemeContext, moduleValue, [a1]);
|
|
internal = (importDefault(697) /* metro dependency 697: native */).internal;
|
|
resolveSemanticColor = internal.resolveSemanticColor;
|
|
object2[propertyName] = Reflect.apply(resolveSemanticColor, internal, [theme, r40, value12]);
|
|
r27 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
reducibleJoin23: while (true) {
|
|
reducibleJoin11: while (true) {
|
|
if (value7) {
|
|
break reducibleJoin11;
|
|
}
|
|
if (contrast === 1) {
|
|
r37 = r40;
|
|
break reducibleJoin23;
|
|
}
|
|
break reducibleJoin11;
|
|
}
|
|
if (typeof r40 !== 'string') {
|
|
r37 = r40;
|
|
break reducibleJoin23;
|
|
}
|
|
if (r40[0] !== '#') {
|
|
r37 = r40;
|
|
break reducibleJoin23;
|
|
}
|
|
reducibleJoin18: while (true) {
|
|
if (propertyName === 'backgroundColor') {
|
|
r41 = value6;
|
|
break reducibleJoin18;
|
|
}
|
|
reducibleJoin17: while (true) {
|
|
if (propertyName === 'borderColor') {
|
|
r39 = value5;
|
|
break reducibleJoin17;
|
|
}
|
|
r42 = propertyName !== 'color' ? value4 : value3;
|
|
r39 = r42;
|
|
break reducibleJoin17;
|
|
}
|
|
r41 = r39;
|
|
break reducibleJoin18;
|
|
}
|
|
reducibleJoin20: while (true) {
|
|
if (value7) {
|
|
internal = (importDefault(697) /* metro dependency 697: native */).internal;
|
|
adjustColorSaturation = internal.adjustColorSaturation;
|
|
value10 = Reflect.apply(adjustColorSaturation, internal, [r40, saturation, r41]);
|
|
r44 = value10;
|
|
break reducibleJoin20;
|
|
}
|
|
r44 = r40;
|
|
break reducibleJoin20;
|
|
}
|
|
reducibleJoin22: while (true) {
|
|
if (contrast === 1) {
|
|
r39 = r44;
|
|
break reducibleJoin22;
|
|
}
|
|
internal = (importDefault(697) /* metro dependency 697: native */).internal;
|
|
adjustColorContrast = internal.adjustColorContrast;
|
|
value11 = Reflect.apply(adjustColorContrast, internal, [r44, contrast, r41, theme]);
|
|
r39 = value11;
|
|
break reducibleJoin22;
|
|
}
|
|
r37 = r39;
|
|
break reducibleJoin23;
|
|
}
|
|
object2[propertyName] = r37;
|
|
r27 = propertyName2;
|
|
continue reducibleLoop1;
|
|
}
|
|
}
|
|
return object2;
|
|
}
|
|
|
|
function experimental_createToken(a0) { // fn#38433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:2905, offset: 0x010c0537, size: 30 bytes, params: 2, frame: 3
|
|
const env0_0 = a0;
|
|
return {[env0_7]: _fun38434};
|
|
function _fun38434(a0) { // fn#38434, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:2953, offset: 0x00c3fb7a, size: 19 bytes, params: 2, frame: 11
|
|
return env0_0(a0);
|
|
}
|
|
|
|
}
|
|
|
|
function createStyles(a0) { // fn#38435, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:2979, offset: 0x010c0555, size: 63 bytes, params: 2, frame: 11
|
|
const env0_0 = a0;
|
|
const Map = global.Map;
|
|
const map = new Map();
|
|
const result = typeof a0 === 'function';
|
|
return _fun38436;
|
|
function _fun38436(a0) { // fn#38436, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:3048, offset: 0x010c0594, size: 269 bytes, params: 2, frame: 24
|
|
var r10;
|
|
var items2;
|
|
let value = copyRestArgs(0, undefined);
|
|
let env0_0 = value;
|
|
const value3 = (NativeModule).useThemeContext();
|
|
const env0_1 = value3;
|
|
const createCacheKeyBinding = createCacheKey;
|
|
let object = [];
|
|
const value4 = arraySpread(object, value, 0, undefined);
|
|
object[value4] = value3.key;
|
|
value4 + 1;
|
|
const value5 = apply(createCacheKeyBinding, object, undefined, undefined);
|
|
let binding = env0_1;
|
|
const value7 = binding.get(value5);
|
|
if (value7 != null) {
|
|
return value7;
|
|
}
|
|
object = {};
|
|
const resultBinding = result;
|
|
let Object = global.Object;
|
|
const keys = Object.keys;
|
|
binding = env0_0;
|
|
if (resultBinding) {
|
|
items2 = [];
|
|
arraySpread(items2, value, 0, undefined);
|
|
value = Reflect.apply(keys, Object, [apply(binding, items2, undefined, undefined)]);
|
|
r10 = value;
|
|
} else {
|
|
r10 = Reflect.apply(keys, Object, [binding]);
|
|
}
|
|
Object = global.Object;
|
|
const defineProperties = Object.defineProperties;
|
|
const Object2 = global.Object;
|
|
Reflect.apply(defineProperties, Object, [object, Object2.fromEntries(r10.map(function(a0) {
|
|
var env0_0 = a0;
|
|
return [a0, {'configurable': true, 'enumerable': true, get: _fun38438}];
|
|
}))]);
|
|
env0_1.set(value5, object);
|
|
return object;
|
|
function _fun38437(a0) { // fn#38437, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:3264, offset: 0x010c06a1, size: 42 bytes, params: 2, frame: 3
|
|
const env0_0 = a0;
|
|
return [a0, {'configurable': true, 'enumerable': true, get: get_38438}];
|
|
function get_38438() { // fn#38438, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:3305, offset: 0x010c06cb, size: 122 bytes, params: 1, frame: 17
|
|
var r0;
|
|
var binding2;
|
|
var items2;
|
|
let value = environment.__proto__.__proto__.__proto__;
|
|
const parseThemedStylesBinding = parseThemedStyles;
|
|
value = environment.__proto__.__proto__;
|
|
const resultBinding = result;
|
|
let binding = env2_0;
|
|
if (resultBinding) {
|
|
value = environment.__proto__;
|
|
binding2 = env1_0;
|
|
items2 = [];
|
|
arraySpread(items2, binding2, 0, undefined);
|
|
value = apply(binding, items2, undefined, undefined);
|
|
r0 = value;
|
|
} else {
|
|
r0 = binding;
|
|
}
|
|
binding = env0_0;
|
|
const property = r0[binding];
|
|
value = environment.__proto__;
|
|
const themedStyles = parseThemedStylesBinding(property, env1_1);
|
|
const Object = global.Object;
|
|
Object.defineProperty(env1_2, binding, {value: themedStyles, enumerable: true});
|
|
return themedStyles;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function createLegacyClassComponentStyles(a0) { // fn#38439, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:3478, offset: 0x010c0745, size: 48 bytes, params: 2, frame: 10
|
|
const env0_0 = a0;
|
|
const Map = global.Map;
|
|
const map = new Map();
|
|
return _fun38440;
|
|
function _fun38440(a0) { // fn#38440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:3544, offset: 0x010c0775, size: 170 bytes, params: 2, frame: 20
|
|
let env0_0 = a0;
|
|
(NativeModule).FALLBACK_THEME_CONTEXT_VALUE;
|
|
let binding = object3;
|
|
const value2 = binding.get(a0.key);
|
|
if (value2 != null) {
|
|
return value2;
|
|
}
|
|
const object = {};
|
|
var object3 = object;
|
|
let Object = global.Object;
|
|
const value3 = Object.keys(env0_0);
|
|
Object = global.Object;
|
|
const defineProperties = Object.defineProperties;
|
|
const Object2 = global.Object;
|
|
Reflect.apply(defineProperties, Object, [object, Object2.fromEntries(value3.map(function(a0) {
|
|
var env0_0 = a0;
|
|
return [a0, {'configurable': true, 'enumerable': true, get: _fun38442}];
|
|
}))]);
|
|
binding = object3;
|
|
binding.set(a0.key, object);
|
|
return object;
|
|
function _fun38441(a0) { // fn#38441, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:3718, offset: 0x010c081f, size: 42 bytes, params: 2, frame: 3
|
|
const env0_0 = a0;
|
|
return [a0, {'configurable': true, 'enumerable': true, get: get_38442}];
|
|
function get_38442() { // fn#38442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:3759, offset: 0x010c0849, size: 78 bytes, params: 1, frame: 17
|
|
const parseThemedStylesBinding = parseThemedStyles;
|
|
const binding = env2_0;
|
|
const binding2 = env0_0;
|
|
const themedStyles = parseThemedStylesBinding(binding[binding2], env1_0);
|
|
const Object = global.Object;
|
|
Object.defineProperty(env1_1, binding2, {value: themedStyles, enumerable: true});
|
|
return themedStyles;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function useLegacyClassComponentStyles(a0) { // fn#38443, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:3921, offset: 0x010c0897, size: 45 bytes, params: 2, frame: 11
|
|
let value = NativeModule;
|
|
value = value.useThemeContext();
|
|
return a0(value);
|
|
}
|
|
|
|
function createStyleProperties(a0) { // fn#38444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:4026, offset: 0x010c08c4, size: 48 bytes, params: 2, frame: 10
|
|
const env0_0 = a0;
|
|
const Map = global.Map;
|
|
const map = new Map();
|
|
return _fun38445;
|
|
function _fun38445(a0) { // fn#38445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:4081, offset: 0x010c08f4, size: 195 bytes, params: 2, frame: 21
|
|
var r1;
|
|
let value = copyRestArgs(0, undefined);
|
|
const value3 = (NativeModule).useThemeContext();
|
|
const createCacheKeyBinding = createCacheKey;
|
|
let items2 = [];
|
|
const value4 = arraySpread(items2, value, 0, undefined);
|
|
items2[value4] = value3.key;
|
|
value4 + 1;
|
|
const value5 = apply(createCacheKeyBinding, items2, undefined, undefined);
|
|
let binding = env0_1;
|
|
const value7 = binding.get(value5);
|
|
if (value7 != null) {
|
|
return value7;
|
|
}
|
|
const parseThemedStylesBinding = parseThemedStyles;
|
|
if (typeof env0_0 === 'function') {
|
|
binding = env0_0;
|
|
items2 = [];
|
|
arraySpread(items2, value, 0, undefined);
|
|
value = apply(binding, items2, undefined, undefined);
|
|
r1 = value;
|
|
} else {
|
|
r1 = env0_0;
|
|
}
|
|
value = parseThemedStylesBinding(r1, value3);
|
|
env0_1.set(value5, value);
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
function createNativeStyleProperties(a0) { // fn#38446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:4343, offset: 0x010c09b7, size: 48 bytes, params: 2, frame: 10
|
|
const env0_0 = a0;
|
|
const Map = global.Map;
|
|
const map = new Map();
|
|
return _fun38447;
|
|
function _fun38447(a0, a1) { // fn#38447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:4404, offset: 0x010c09e7, size: 592 bytes, params: 3, frame: 25
|
|
var r14;
|
|
var r7;
|
|
var r1;
|
|
var value7;
|
|
var moduleValue2;
|
|
var propertyName;
|
|
var property;
|
|
let value = copyRestArgs(1, undefined);
|
|
const saturation = AccessibilityStore.saturation;
|
|
const value3 = undefined;
|
|
const customBackgroundGradient = (MobileThemesUtilsModule).getCustomBackgroundGradient();
|
|
const value5 = null;
|
|
const r0 = value5 != customBackgroundGradient ? customBackgroundGradient : ClientThemesBackgroundStore.gradientPreset;
|
|
const r3 = value5 != r0 ? r0 : value5;
|
|
const value6 = 0;
|
|
if (value5 != r3) {
|
|
value7 = 4;
|
|
moduleValue2 = require(dependencyMap[value7]);
|
|
r7 = moduleValue2.setThemeFlag(value6,
|
|
r3.theme === 'light' ? require(dependencyMap[value7]).ThemeContextFlags.MOBILE_LIGHT_GRADIENT_THEME_ENABLED : require(dependencyMap[value7]).ThemeContextFlags.MOBILE_DARK_GRADIENT_THEME_ENABLED);
|
|
r14 = value7;
|
|
} else {
|
|
r7 = value6;
|
|
}
|
|
let object = [];
|
|
if (MobileVisualRefreshExperimentModule.isMobileVisualRefreshEnabled('createFakeThemedContext')) {
|
|
object.push('mobile-visual-refresh');
|
|
}
|
|
const r5 = object.length > value6 ? object : value3;
|
|
object = {};
|
|
const FALLBACK_THEME_CONTEXT_VALUE = (NativeModule).FALLBACK_THEME_CONTEXT_VALUE;
|
|
copyDataProperties(object, FALLBACK_THEME_CONTEXT_VALUE, undefined);
|
|
object['flags'] = r7;
|
|
object['saturation'] = saturation;
|
|
object['theme'] = a0;
|
|
object['enabledExperiments'] = r5;
|
|
object['gradient'] = r3;
|
|
const JSON = global.JSON;
|
|
const value9 = JSON.stringify(object);
|
|
const object2 = {};
|
|
copyDataProperties(object2, object, undefined);
|
|
object2['key'] = value9;
|
|
const createCacheKeyBinding = createCacheKey;
|
|
object = [];
|
|
const value10 = arraySpread(object, value, value6, r14);
|
|
object[value10] = object2.key;
|
|
value10 + 1;
|
|
const value11 = apply(createCacheKeyBinding, object, value3, r14);
|
|
let binding = env0_1;
|
|
const value13 = binding.get(value11);
|
|
if (value5 != value13) {
|
|
return value13;
|
|
}
|
|
const parseThemedStylesBinding = parseThemedStyles;
|
|
if (typeof env0_0 === 'function') {
|
|
binding = env0_0;
|
|
object = [];
|
|
arraySpread(object, value, value6, r14);
|
|
value = apply(binding, object, value3, r14);
|
|
r1 = value;
|
|
} else {
|
|
r1 = env0_0;
|
|
}
|
|
value = parseThemedStylesBinding(r1, object2);
|
|
for (propertyName in value) {
|
|
property = value[propertyName];
|
|
value[propertyName] = processColorOrThrow(property);
|
|
}
|
|
env0_1.set(value11, value);
|
|
return value;
|
|
}
|
|
|
|
}
|
|
|
|
function createAnimatedThemedStyles(a0) { // fn#38448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:5267, offset: 0x010c0c37, size: 205 bytes, params: 2, frame: 25
|
|
var r6;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var internal;
|
|
var isSemanticColor;
|
|
const value = a1;
|
|
const r3 = value !== undefined ? value : env0_8;
|
|
for (propertyName in a0) {
|
|
property = a0[propertyName];
|
|
internal = (importDefault(697) /* metro dependency 697: native */).internal;
|
|
isSemanticColor = internal.isSemanticColor;
|
|
if (Reflect.apply(isSemanticColor, internal, [property])) {
|
|
[].push([propertyName, property]);
|
|
r6 = propertyName2;
|
|
} else {
|
|
({})[propertyName] = property;
|
|
r6 = propertyName2;
|
|
}
|
|
}
|
|
let map = r3.map;
|
|
const env0_3 = Reflect.apply(map, r3, [function(a0, a1) {
|
|
return a1;
|
|
}]);
|
|
const Map = global.Map;
|
|
map = new Map();
|
|
return _fun38450;
|
|
function _fun38450(a0) { // fn#38450, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:5450, offset: 0x010c0d04, size: 471 bytes, params: 2, frame: 25
|
|
var r4;
|
|
var r10;
|
|
var r6;
|
|
var r11;
|
|
var primaryColor;
|
|
var value5;
|
|
var object;
|
|
var enabledExperiments;
|
|
var value6;
|
|
var saturation;
|
|
var contrast;
|
|
var closure;
|
|
var value7;
|
|
var value8;
|
|
var done;
|
|
var value9;
|
|
var value10;
|
|
var value11;
|
|
var set;
|
|
const env0_0 = a0;
|
|
const value2 = (NativeModule).useThemeContext();
|
|
let binding = ReactNativeModule.processColor;
|
|
const get = binding.get;
|
|
let key = value2.key;
|
|
const value4 = Reflect.apply(get, binding, [key]);
|
|
let env0_1 = value4;
|
|
reducibleJoin12: while (true) {
|
|
if (value4 != null) {
|
|
r11 = value4;
|
|
break reducibleJoin12;
|
|
}
|
|
primaryColor = value2.primaryColor;
|
|
value5 = primaryColor != null;
|
|
object = {};
|
|
enabledExperiments = value2.enabledExperiments;
|
|
reducibleJoin3: while (true) {
|
|
if (enabledExperiments != null) {
|
|
r4 = enabledExperiments;
|
|
break reducibleJoin3;
|
|
}
|
|
r4 = [];
|
|
break reducibleJoin3;
|
|
}
|
|
object.enabledExperiments = r4;
|
|
value6 = 1;
|
|
reducibleJoin6: while (true) {
|
|
if (value5) {
|
|
r4 = value6;
|
|
break reducibleJoin6;
|
|
}
|
|
saturation = value2.saturation;
|
|
r10 = saturation ?? value6;
|
|
r4 = r10;
|
|
break reducibleJoin6;
|
|
}
|
|
object.saturation = r4;
|
|
reducibleJoin9: while (true) {
|
|
if (value5) {
|
|
r4 = value6;
|
|
break reducibleJoin9;
|
|
}
|
|
contrast = value2.contrast;
|
|
r6 = contrast ?? value6;
|
|
r4 = r6;
|
|
break reducibleJoin9;
|
|
}
|
|
object.contrast = r4;
|
|
var object3 = object;
|
|
object = {};
|
|
copyDataProperties(object, object3, undefined);
|
|
env0_1 = object;
|
|
closure = _loop_38451;
|
|
value7 = _createForOfIteratorHelperLoose_38427(env0_1);
|
|
value8 = value7();
|
|
done = value8.done;
|
|
if (!done) {
|
|
r6 = value8;
|
|
reducibleLoop10: while (true) {
|
|
value9 = r6.value;
|
|
value10 = env1_3(value9, 2);
|
|
var env0_3 = value10[0];
|
|
closure(value10[value6]);
|
|
value11 = value7();
|
|
done = value11.done;
|
|
if (done) {
|
|
break reducibleLoop10;
|
|
}
|
|
r6 = value11;
|
|
continue reducibleLoop10;
|
|
}
|
|
}
|
|
binding = ReactNativeModule.processColor;
|
|
set = binding.set;
|
|
key = value2.key;
|
|
Reflect.apply(set, binding, [key, object]);
|
|
r11 = object;
|
|
break reducibleJoin12;
|
|
}
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
closure = __38453;
|
|
object = {resolvedStyles: r11};
|
|
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
|
object.interpolateColor = ReanimatedRexportModule.interpolateColor;
|
|
object.themeIndex = a0;
|
|
object.stops = env0_3;
|
|
object.timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
|
|
closure.__closure = object;
|
|
closure.__workletHash = 6815805628278;
|
|
closure.__initData = env1_9;
|
|
return Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
|
|
function _loop_38451(a0) { // fn#38451, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:5719, offset: 0x010c0edb, size: 50 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
const binding = env0_1;
|
|
const binding2 = env0_3;
|
|
const binding3 = env1_0;
|
|
binding[binding2] = binding3.map(_fun38452);
|
|
function _fun38452(a0) { // fn#38452, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:5743, offset: 0x010c0f0d, size: 63 bytes, params: 2, frame: 15
|
|
const internal = (Native).internal;
|
|
return internal.resolveSemanticColor(a0, env0_0, env1_2);
|
|
}
|
|
|
|
}
|
|
|
|
function __38453() { // fn#38453, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4679:5952, offset: 0x010c0f4c, size: 180 bytes, params: 1, frame: 34
|
|
var r11;
|
|
var propertyName;
|
|
var propertyName2;
|
|
var property;
|
|
var Array;
|
|
var isArray;
|
|
var moduleValue;
|
|
var withTiming;
|
|
var moduleValue2;
|
|
var interpolateColor;
|
|
var binding2;
|
|
var value4;
|
|
var value5;
|
|
var timingStandard;
|
|
const object = {};
|
|
for (propertyName in ReactNativeModule.processColor) {
|
|
property = ReactNativeModule.processColor[propertyName];
|
|
Array = global.Array;
|
|
isArray = Array.isArray;
|
|
if (Reflect.apply(isArray, Array, [property])) {
|
|
moduleValue = require(4504) /* metro dependency 4504: timing */;
|
|
withTiming = moduleValue.withTiming;
|
|
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
interpolateColor = moduleValue2.interpolateColor;
|
|
binding2 = env0_0;
|
|
value4 = binding2.get();
|
|
value5 = Reflect.apply(interpolateColor, moduleValue2, [value4, env1_3, property]);
|
|
timingStandard = (require(4507) /* metro dependency 4507: timingPresets */).timingStandard;
|
|
object[propertyName] = Reflect.apply(withTiming, moduleValue, [value5, timingStandard]);
|
|
r11 = propertyName2;
|
|
} else {
|
|
object[propertyName] = property;
|
|
r11 = propertyName2;
|
|
}
|
|
}
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun38426, 4501, [57, 27, 4502, 3964, 3868, 477, 697, 3861, 4017, 4504, 4507, 4045, 1357,
|
|
2]) /* metro module 4501, dependencies: [57, 27, 4502, 3964, 3868, 477, 697, 3861, 4017, 4504, 4507, 4045, 1357, 2] */;
|