Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,230 @@
|
||||
/* Metro module 14156; source: modules/settings/native/renderer/SettingSegmentedControlRenderer.tsx; dependencies: [57, 31, 27, 13172, 9693, 33, 4501, 697, 14147, 13177, 44, 13175, 8853, 9221, 8861, 2] */
|
||||
function _fun107121(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107121, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:6, offset: 0x022f3f3d, size: 354 bytes, params: 8, frame: 23
|
||||
const env0_0 = require;
|
||||
const _arrayLikeToArray_107124 = 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 Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const userSettingSearchStore = importDefault(13172) /* metro dependency 13172: UserSettingSearchStore */;
|
||||
const env0_7 = (require(9693) /* metro dependency 9693: SettingRendererConstants */).NodeType;
|
||||
let value = require(33) /* metro dependency 33 */;
|
||||
const env0_8 = value.jsx;
|
||||
const env0_9 = value.Fragment;
|
||||
const env0_10 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
const object = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingHorizontal = PX_16;
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object.paddingTop = PX_16;
|
||||
const env0_11 = Reflect.apply(createStyles, value, [{controlContainer: object, pageContainer: {flex: 1}}]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/settings/native/renderer/SettingSegmentedControlRenderer.tsx');
|
||||
exports.default = SettingSegmentedControl;
|
||||
}
|
||||
|
||||
function _createForOfIteratorHelperLoose_107122(a0, a1) { // fn#107122, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:208, offset: 0x022f409f, size: 372 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 _fun107123;
|
||||
}
|
||||
value = undefined;
|
||||
if (a0) {
|
||||
if (typeof a0 === 'string') {
|
||||
value = _arrayLikeToArray_107124(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_107124(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
|
||||
if (regexp.test(r9)) {
|
||||
value = _arrayLikeToArray_107124(a0, value);
|
||||
r6 = value;
|
||||
} else {
|
||||
r6 = value;
|
||||
}
|
||||
}
|
||||
r5 = r6;
|
||||
}
|
||||
} else {
|
||||
r5 = value;
|
||||
}
|
||||
if (r5) {
|
||||
if (r5) {
|
||||
}
|
||||
return _fun107123;
|
||||
}
|
||||
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 SettingSegmentedControl({node}) { // fn#107125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:1375, offset: 0x022f4213, size: 366 bytes, params: 2, frame: 23
|
||||
const env0_0 = node.defaultIndex;
|
||||
const settings = node.settings;
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value2 = Reflect.apply(useState, binding, [0]);
|
||||
const binding2 = env0_3;
|
||||
const value3 = binding2(value2, 2);
|
||||
const property = value3[0];
|
||||
const env0_2 = value3[1];
|
||||
useState = binding.useState;
|
||||
const value4 = binding2(Reflect.apply(useState, binding, [_fun107126]), 2);
|
||||
const property2 = value4[0];
|
||||
value4[1];
|
||||
const value5 = binding.useCallback(_fun107127, []);
|
||||
const value7 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({items: binding.useMemo(function() {
|
||||
settings.forEach(_fun107129);
|
||||
return [];
|
||||
}, [settings]), pageWidth: property, defaultIndex: property2});
|
||||
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
|
||||
const SegmentedControl = (require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl;
|
||||
const view = <View style={styles.controlContainer} onLayout={value5}><SegmentedControl state={value7} /></View>;
|
||||
const SegmentedControlPages = (require(8861) /* metro dependency 8861: SegmentedControlPagesNative */).SegmentedControlPages;
|
||||
return (
|
||||
<>
|
||||
{view}
|
||||
<View style={styles.pageContainer}>
|
||||
<SegmentedControlPages state={value7} />
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun107126() { // fn#107126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:1511, offset: 0x022f4381, size: 170 bytes, params: 1, frame: 17
|
||||
var value6;
|
||||
var value7;
|
||||
var value8;
|
||||
let value = environment.__proto__;
|
||||
const field = UserSettingSearchStore.getField('selected');
|
||||
if (field == null) {
|
||||
return defaultIndex;
|
||||
}
|
||||
let settingsBinding = settings;
|
||||
let indexOf = settingsBinding.indexOf;
|
||||
const value4 = Reflect.apply(indexOf, settingsBinding, [field]);
|
||||
if (value4 !== -1) {
|
||||
return value4;
|
||||
}
|
||||
const _createForOfIteratorHelperLoose_107122Binding = _createForOfIteratorHelperLoose_107122;
|
||||
const getAncestors = (importDefault(14147) /* metro dependency 14147: SettingTreeManager */).getAncestors;
|
||||
value = _createForOfIteratorHelperLoose_107122Binding(Reflect.apply(getAncestors, value, [field]));
|
||||
const value5 = value();
|
||||
let done = value5.done;
|
||||
if (done) {
|
||||
value = environment;
|
||||
return defaultIndex;
|
||||
}
|
||||
let r3 = value5;
|
||||
loopExit3: while (true) {
|
||||
value6 = r3.value;
|
||||
settingsBinding = settings;
|
||||
indexOf = settingsBinding.indexOf;
|
||||
value7 = Reflect.apply(indexOf, settingsBinding, [value6]);
|
||||
if (value7 !== -1) {
|
||||
break loopExit3;
|
||||
}
|
||||
value8 = value();
|
||||
done = value8.done;
|
||||
if (done) {
|
||||
value = environment;
|
||||
return defaultIndex;
|
||||
}
|
||||
r3 = value8;
|
||||
continue;
|
||||
}
|
||||
return value7;
|
||||
}
|
||||
|
||||
function _fun107128() { // fn#107128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:1842, offset: 0x022f442b, size: 36 bytes, params: 1, frame: 12
|
||||
settings.forEach(_fun107129);
|
||||
return [];
|
||||
}
|
||||
|
||||
function _fun107129(a0) { // fn#107129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14353:1874, offset: 0x022f444f, size: 188 bytes, params: 2, frame: 20
|
||||
const SETTING_RENDERER_CONFIG = (require(13177) /* metro dependency 13177: SettingsRendererConfig */).SETTING_RENDERER_CONFIG;
|
||||
const property = SETTING_RENDERER_CONFIG[a0];
|
||||
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
||||
const type = property.type;
|
||||
const ROUTE = NodeType.ROUTE;
|
||||
defaultImport(type === ROUTE, 'Invalid setting type for segmented control: ' + a0);
|
||||
const component = property.screen.getComponent();
|
||||
const binding = env0_0;
|
||||
const push = binding.push;
|
||||
const object2 = {};
|
||||
object2.label = (require(13175) /* metro dependency 13175: SettingRendererUtils */).getSettingTitle(a0);
|
||||
object2.id = a0;
|
||||
object2.page = ((Component) => <Component />)(component);
|
||||
Reflect.apply(push, binding, [object2]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user