846 lines
32 KiB
React
846 lines
32 KiB
React
/* Metro module 317; source: unknown; dependencies: [57, 29, 6, 7, 15, 17, 18, 31, 33, 44, 304, 305] */
|
|
function _fun4826(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#4826, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:6, offset: 0x00cce24c, size: 309 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const env0_3 = ['ItemSeparatorComponent', 'SectionSeparatorComponent', 'renderItem', 'renderSectionFooter',
|
|
'renderSectionHeader', 'sections', 'stickySectionHeadersEnabled'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_5 = importDefault(29) /* metro dependency 29 */;
|
|
const env0_6 = importDefault(6) /* metro dependency 6 */;
|
|
const env0_7 = importDefault(7) /* metro dependency 7 */;
|
|
const env0_8 = importDefault(15) /* metro dependency 15 */;
|
|
const env0_9 = importDefault(17) /* metro dependency 17 */;
|
|
const env0_10 = importDefault(18) /* metro dependency 18 */;
|
|
const value = importAll(31) /* metro dependency 31 */;
|
|
const value2 = require(31) /* metro dependency 31 */;
|
|
const env0_11 = value2.useEffect;
|
|
const env0_12 = value2.useState;
|
|
const value3 = require(33) /* metro dependency 33 */;
|
|
const env0_13 = value3.jsx;
|
|
const env0_14 = value3.Fragment;
|
|
const env0_15 = value3.jsxs;
|
|
const PureComponent = value.PureComponent;
|
|
exports.default = _fun4836(PureComponent);
|
|
}
|
|
|
|
function _isNativeReflectConstruct_4827() { // fn#4827, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:422, offset: 0x00cce381, size: 94 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_4827_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function ItemWithSeparator(a0) { // fn#4830, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:5539, offset: 0x00cce3df, size: 632 bytes, params: 2, frame: 32
|
|
const LeadingSeparatorComponent = a0.LeadingSeparatorComponent;
|
|
const SeparatorComponent = a0.SeparatorComponent;
|
|
const cellKey = a0.cellKey;
|
|
const env0_3 = a0.prevCellKey;
|
|
const setSelfHighlightCallback = a0.setSelfHighlightCallback;
|
|
const env0_4 = setSelfHighlightCallback;
|
|
const env0_5 = a0.updateHighlightFor;
|
|
const setSelfUpdatePropsCallback = a0.setSelfUpdatePropsCallback;
|
|
const env0_7 = a0.updatePropsFor;
|
|
const item = a0.item;
|
|
const index = a0.index;
|
|
const section = a0.section;
|
|
const inverted = a0.inverted;
|
|
const [property, env0_8] = env0_4(useState(false), 2);
|
|
const [property2, env0_9] = env0_4(useState(false), 2);
|
|
const [property3, env0_11] = env0_4(useState({leadingItem: a0.leadingItem, leadingSection: a0.leadingSection,
|
|
section: a0.section, trailingItem: a0.item, trailingSection: a0.trailingSection}), 2);
|
|
const value9 = env0_4(useState({leadingItem: a0.item, leadingSection: a0.leadingSection, section: a0.section,
|
|
trailingItem: a0.trailingItem, trailingSection: a0.trailingSection}), 2);
|
|
const property4 = value9[0];
|
|
useEffect(_fun4831, [cellKey, setSelfHighlightCallback, value9[1], setSelfUpdatePropsCallback]);
|
|
const value10 = a0.renderItem({item: item, index: index, section: section, separators: {highlight: highlight,
|
|
unhighlight: unhighlight, updateProps: updateProps}});
|
|
const value11 = null;
|
|
const r6 = value11 != LeadingSeparatorComponent && <LeadingSeparatorComponent {...global.Object.assign({highlighted: property},
|
|
property3)} />;
|
|
const r7 = value11 != SeparatorComponent && <SeparatorComponent {...global.Object.assign({highlighted: property2},
|
|
property4)} />;
|
|
const r10 = r6 || r7;
|
|
return (
|
|
<>
|
|
{r10 ? inverted !== false ? r7 : r6 : value11}
|
|
{value10}
|
|
{r10 ? inverted === false ? r7 : r6 : value11}
|
|
</>
|
|
);
|
|
}
|
|
|
|
function _fun4836(a0) { // fn#4836, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:647, offset: 0x00cce7cc, size: 183 bytes, params: 2, frame: 16
|
|
const closure = VirtualizedSectionList;
|
|
env0_10(closure, a0);
|
|
return env0_7(closure, [{key: 'scrollToLocation', value: value_4848}, {key: 'getListRef', value: function() {
|
|
return this._listRef;
|
|
}}, {key: 'render', value: value_4850}, {key: '_getItem', value: function(a0, a1, a2) {
|
|
var r7;
|
|
var r8;
|
|
var value;
|
|
var value2;
|
|
var property;
|
|
var data;
|
|
var value3;
|
|
if (a1) {
|
|
value = a2 - 1;
|
|
value2 = 0;
|
|
if (value2 < a1.length) {
|
|
r7 = value2;
|
|
r8 = value;
|
|
loopExit3: while (true) {
|
|
property = a1[r7];
|
|
data = property.data;
|
|
value = a0.getItemCount(data);
|
|
if (r8 === -1) {
|
|
return property;
|
|
}
|
|
if (r8 === value) {
|
|
return property;
|
|
}
|
|
if (r8 < value) {
|
|
return a0.getItem(data, r8);
|
|
}
|
|
value = r8 - (value + 2);
|
|
value3 = typeof r7 === 'bigint' ? r7 + 1n : +r7 + 1;
|
|
if (value3 < a1.length) {
|
|
r7 = value3;
|
|
r8 = value;
|
|
continue;
|
|
}
|
|
break loopExit3;
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
return null;
|
|
}}, {key: '_subExtractor', value: value_4854}, {key: '_getSeparatorComponent', value: value_4855}]);
|
|
}
|
|
|
|
function _fun4831() { // fn#4831, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:6186, offset: 0x00cce657, size: 46 bytes, params: 1, frame: 14
|
|
const setSelfHighlightCallbackBinding = setSelfHighlightCallback;
|
|
let cellKeyBinding = cellKey;
|
|
setSelfHighlightCallbackBinding(cellKeyBinding, env0_9);
|
|
setSelfUpdatePropsCallback(cellKeyBinding, env0_13);
|
|
return function() {
|
|
var setSelfUpdatePropsCallbackBinding = setSelfUpdatePropsCallback;
|
|
var cellKeyBinding = cellKey;
|
|
setSelfUpdatePropsCallbackBinding(cellKeyBinding, null);
|
|
setSelfHighlightCallback(cellKeyBinding, null);
|
|
};
|
|
}
|
|
|
|
function highlight() { // fn#4833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:6280, owner: ItemWithSeparator.highlight, offset: 0x00cce6a6, size: 51 bytes, params: 1, frame: 14
|
|
env0_8(true);
|
|
env0_9(true);
|
|
if (prevCellKey != null) {
|
|
updateHighlightFor(prevCellKey, true);
|
|
}
|
|
}
|
|
|
|
function unhighlight() { // fn#4834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:6343, owner: ItemWithSeparator.unhighlight, offset: 0x00cce6d9, size: 51 bytes, params: 1, frame: 14
|
|
env0_8(false);
|
|
env0_9(false);
|
|
if (prevCellKey != null) {
|
|
updateHighlightFor(prevCellKey, false);
|
|
}
|
|
}
|
|
|
|
function updateProps(a0, a1) { // fn#4835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:6408, owner: ItemWithSeparator.updateProps, offset: 0x00cce70c, size: 192 bytes, params: 3, frame: 18
|
|
var binding;
|
|
var Object;
|
|
var prevCellKeyBinding;
|
|
var updatePropsForBinding;
|
|
if (a0 === 'leading') {
|
|
if (LeadingSeparatorComponent != null) {
|
|
binding = env0_11;
|
|
Object = global.Object;
|
|
binding(Object.assign({}, env0_10, a1));
|
|
} else {
|
|
prevCellKeyBinding = prevCellKey;
|
|
if (prevCellKeyBinding != null) {
|
|
updatePropsForBinding = updatePropsFor;
|
|
prevCellKeyBinding = prevCellKey;
|
|
Object = global.Object;
|
|
updatePropsForBinding(prevCellKeyBinding, Object.assign({}, env0_10, a1));
|
|
}
|
|
}
|
|
} else if (a0 === 'trailing' && SeparatorComponent != null) {
|
|
binding = env0_13;
|
|
Object = global.Object;
|
|
binding(Object.assign({}, env0_12, a1));
|
|
}
|
|
}
|
|
|
|
function VirtualizedSectionList() { // fn#4837, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:659, offset: 0x00cce883, size: 308 bytes, params: 1, frame: 21
|
|
var environment;
|
|
var r2;
|
|
var r6;
|
|
var r0;
|
|
var value7;
|
|
var Reflect;
|
|
var construct;
|
|
let value = environment.__proto__;
|
|
let binding = env1_6;
|
|
binding(this, VirtualizedSectionList);
|
|
const length = arguments.length;
|
|
const Array = global.Array;
|
|
const array = new Array(length);
|
|
const value6 = 0;
|
|
if (value6 < length) {
|
|
r2 = value6;
|
|
reducibleLoop1: while (true) {
|
|
array[r2] = arguments[r2];
|
|
value7 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
|
|
if (value7 < length) {
|
|
r2 = value7;
|
|
continue reducibleLoop1;
|
|
}
|
|
break reducibleLoop1;
|
|
}
|
|
}
|
|
const value8 = [].concat(array);
|
|
const value9 = env1_9(VirtualizedSectionList);
|
|
binding = env1_8;
|
|
if (_isNativeReflectConstruct_4827()) {
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
reducibleJoin6: while (true) {
|
|
if (value8) {
|
|
r6 = value8;
|
|
break reducibleJoin6;
|
|
}
|
|
r6 = [];
|
|
break reducibleJoin6;
|
|
}
|
|
r0 = Reflect.apply(construct, Reflect, [value9, r6, env1_9(this).constructor]);
|
|
} else {
|
|
r0 = value9.apply(this, value8);
|
|
}
|
|
value = binding(this, r0);
|
|
value._keyExtractor = _keyExtractor;
|
|
value._convertViewable = _convertViewable;
|
|
value._onViewableItemsChanged = _onViewableItemsChanged;
|
|
value._renderItem = function(a0) {
|
|
var env0_0 = a0;
|
|
return _fun4842;
|
|
};
|
|
value._updatePropsFor = _updatePropsFor;
|
|
value._updateHighlightFor = _updateHighlightFor;
|
|
value._setUpdateHighlightFor = _setUpdateHighlightFor;
|
|
value._setUpdatePropsFor = _setUpdatePropsFor;
|
|
value._updateHighlightMap = {};
|
|
value._updatePropsMap = {};
|
|
value._captureRef = _captureRef;
|
|
return value;
|
|
}
|
|
|
|
function value_4848(a0) { // fn#4848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:3129, offset: 0x00ccee12, size: 257 bytes, params: 2, frame: 20
|
|
var r3;
|
|
var r4;
|
|
var r1;
|
|
var r6;
|
|
var props;
|
|
var getItemCount;
|
|
var props2;
|
|
var sections;
|
|
var data;
|
|
var value2;
|
|
var value3;
|
|
var stickySectionHeadersEnabled;
|
|
var __getListMetrics;
|
|
var getCellMetricsApprox;
|
|
var value4;
|
|
var length;
|
|
var Object;
|
|
var assign;
|
|
var scrollToIndex;
|
|
let itemIndex = a0.itemIndex;
|
|
let sectionIndex = a0.sectionIndex;
|
|
let value = 0;
|
|
if (value < sectionIndex) {
|
|
r3 = value;
|
|
r4 = itemIndex;
|
|
reducibleLoop1: while (true) {
|
|
props = this.props;
|
|
getItemCount = props.getItemCount;
|
|
props2 = this.props;
|
|
sections = props2.sections;
|
|
data = sections[r3].data;
|
|
value2 = r4 + (Reflect.apply(getItemCount, props, [data]) + 2);
|
|
value3 = typeof r3 === 'bigint' ? r3 + 1n : +r3 + 1;
|
|
sectionIndex = a0.sectionIndex;
|
|
if (value3 < sectionIndex) {
|
|
r3 = value3;
|
|
r4 = value2;
|
|
continue reducibleLoop1;
|
|
}
|
|
r1 = value2;
|
|
break reducibleLoop1;
|
|
}
|
|
} else {
|
|
r1 = itemIndex;
|
|
}
|
|
let viewOffset = a0.viewOffset;
|
|
viewOffset = !viewOffset ? value : viewOffset;
|
|
let _listRef = this._listRef;
|
|
reducibleJoin8: while (true) {
|
|
if (_listRef == null) {
|
|
break reducibleJoin8;
|
|
}
|
|
_listRef = this._listRef;
|
|
itemIndex = a0.itemIndex;
|
|
reducibleJoin7: while (true) {
|
|
if (itemIndex > value) {
|
|
props = this.props;
|
|
stickySectionHeadersEnabled = props.stickySectionHeadersEnabled;
|
|
if (stickySectionHeadersEnabled) {
|
|
__getListMetrics = _listRef.__getListMetrics;
|
|
value = Reflect.apply(__getListMetrics, _listRef, []);
|
|
getCellMetricsApprox = value.getCellMetricsApprox;
|
|
itemIndex = a0.itemIndex;
|
|
value4 = r1 - itemIndex;
|
|
props = _listRef.props;
|
|
length = Reflect.apply(getCellMetricsApprox, value, [value4, props]).length;
|
|
value = viewOffset + length;
|
|
r6 = value;
|
|
break reducibleJoin7;
|
|
}
|
|
r6 = viewOffset;
|
|
break reducibleJoin7;
|
|
}
|
|
r6 = viewOffset;
|
|
break reducibleJoin7;
|
|
}
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
value = Reflect.apply(assign, Object, [{}, a0, {viewOffset: r6, index: r1}]);
|
|
_listRef = this._listRef;
|
|
scrollToIndex = _listRef.scrollToIndex;
|
|
Reflect.apply(scrollToIndex, _listRef, [value]);
|
|
break reducibleJoin8;
|
|
}
|
|
}
|
|
|
|
function value_4850() { // fn#4850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:3633, offset: 0x00ccef1e, size: 420 bytes, params: 1, frame: 27
|
|
var r5;
|
|
var r52;
|
|
var _onViewableItemsChanged;
|
|
var value5;
|
|
var value6;
|
|
var push;
|
|
var value7;
|
|
var value8;
|
|
var getItemCount;
|
|
var data;
|
|
var value9;
|
|
var value10;
|
|
var error;
|
|
var _renderItem;
|
|
var value11;
|
|
var jsxRuntimeEnv1_13Binding;
|
|
var defaultImport;
|
|
var Object;
|
|
var assign;
|
|
var _keyExtractor;
|
|
var onViewableItemsChanged;
|
|
var _captureRef;
|
|
const value = undefined;
|
|
let props = this.props;
|
|
props.ItemSeparatorComponent;
|
|
props.SectionSeparatorComponent;
|
|
props.renderItem;
|
|
props.renderSectionFooter;
|
|
props.renderSectionHeader;
|
|
props.sections;
|
|
props.stickySectionHeadersEnabled;
|
|
const value3 = env1_5(props, env1_3);
|
|
const ListHeaderComponent = this.props.ListHeaderComponent;
|
|
const value4 = 0;
|
|
reducibleJoin2: while (true) {
|
|
if (ListHeaderComponent) {
|
|
value5 = 1;
|
|
r5 = value5;
|
|
break reducibleJoin2;
|
|
}
|
|
r5 = value4;
|
|
break reducibleJoin2;
|
|
}
|
|
reducibleJoin4: while (true) {
|
|
if (this.props.stickySectionHeadersEnabled) {
|
|
r52 = [];
|
|
break reducibleJoin4;
|
|
}
|
|
r52 = value;
|
|
break reducibleJoin4;
|
|
}
|
|
var env0_1;
|
|
let sections = this.props.sections;
|
|
const iterator = sections[Symbol.iterator]();
|
|
const iterator2 = iterator.next;
|
|
let r2 = value4;
|
|
let r53 = iterator;
|
|
let item2 = Reflect.apply(iterator2, r53, []);
|
|
let item = item2.value;
|
|
item2 = item2.done ? undefined : r53;
|
|
reducibleJoin6: while (true) {
|
|
if (item2 === value) {
|
|
_renderItem = this._renderItem;
|
|
value11 = Reflect.apply(_renderItem, this, [r2]);
|
|
jsxRuntimeEnv1_13Binding = jsxRuntimeEnv1_13;
|
|
defaultImport = importDefault(305) /* metro dependency 305 */;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
_keyExtractor = this._keyExtractor;
|
|
props = this.props;
|
|
sections = props.sections;
|
|
props = this.props;
|
|
onViewableItemsChanged = props.onViewableItemsChanged;
|
|
reducibleJoin28: while (true) {
|
|
if (onViewableItemsChanged) {
|
|
_onViewableItemsChanged = this._onViewableItemsChanged;
|
|
break reducibleJoin28;
|
|
}
|
|
_onViewableItemsChanged = value;
|
|
break reducibleJoin28;
|
|
}
|
|
_captureRef = this._captureRef;
|
|
return ((Component) => <Component {...Reflect.apply(assign, Object, [{}, value3,
|
|
{keyExtractor: _keyExtractor,
|
|
stickyHeaderIndices: r52, renderItem: value11, data: sections, getItem: getItem_4851,
|
|
getItemCount: getItemCount, onViewableItemsChanged: _onViewableItemsChanged,
|
|
ref: _captureRef}])} />)(defaultImport);
|
|
}
|
|
break reducibleJoin6;
|
|
}
|
|
reducibleLoop6: while (true) {
|
|
try {
|
|
value6 = r52 == null;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
reducibleJoin13: while (true) {
|
|
if (value6) {
|
|
break reducibleJoin13;
|
|
}
|
|
try {
|
|
push = r52.push;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value7 = r2 + r5;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
Reflect.apply(push, r52, [value7]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
break reducibleJoin13;
|
|
}
|
|
try {
|
|
value8 = r2 + 2;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
env0_1 = value8;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
props = this.props;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
getItemCount = props.getItemCount;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
data = item.data;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value9 = Reflect.apply(getItemCount, props, [data]);
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
value10 = value8 + value9;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
try {
|
|
env0_1 = value10;
|
|
} catch (error) {
|
|
try {
|
|
item2.return();
|
|
} catch {
|
|
}
|
|
throw error;
|
|
}
|
|
r2 = value10;
|
|
r53 = item2;
|
|
item2 = Reflect.apply(iterator2, r53, []);
|
|
item = item2.value;
|
|
item2 = item2.done ? undefined : r53;
|
|
if (item2 === value) {
|
|
break reducibleLoop6;
|
|
}
|
|
continue reducibleLoop6;
|
|
}
|
|
value11 = this._renderItem(r2);
|
|
defaultImport = importDefault(305) /* metro dependency 305 */;
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
reducibleJoin28: while (true) {
|
|
if (this.props.onViewableItemsChanged) {
|
|
_onViewableItemsChanged = this._onViewableItemsChanged;
|
|
break reducibleJoin28;
|
|
}
|
|
_onViewableItemsChanged = value;
|
|
break reducibleJoin28;
|
|
}
|
|
return ((Component) => <Component {...Reflect.apply(assign, Object, [{}, value3, {keyExtractor: this._keyExtractor,
|
|
stickyHeaderIndices: r52, renderItem: value11, data: this.props.sections, getItem: getItem_4851,
|
|
getItemCount: getItemCount, onViewableItemsChanged: _onViewableItemsChanged,
|
|
ref: this._captureRef}])} />)(defaultImport);
|
|
}
|
|
|
|
function value_4854(a0) { // fn#4854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:4650, offset: 0x00ccf15c, size: 405 bytes, params: 2, frame: 28
|
|
var r4;
|
|
var r9;
|
|
var r14;
|
|
var r16;
|
|
var r11;
|
|
var property;
|
|
var data;
|
|
var key;
|
|
var String;
|
|
var object2;
|
|
var value3;
|
|
var value5;
|
|
let value = a0;
|
|
const {getItem, getItemCount, keyExtractor, sections} = this.props;
|
|
let length = sections.length;
|
|
const value2 = 0;
|
|
if (value2 < length) {
|
|
r4 = value2;
|
|
r9 = value;
|
|
while (true) {
|
|
property = sections[r4];
|
|
data = property.data;
|
|
key = property.key;
|
|
if (key) {
|
|
r14 = key;
|
|
} else {
|
|
String = global.String;
|
|
r14 = String(r4);
|
|
}
|
|
value = r9 - 1;
|
|
if (value >= getItemCount(data) + 1) {
|
|
value -= getItemCount(data) + 1;
|
|
value5 = typeof r4 === 'bigint' ? r4 + 1n : +r4 + 1;
|
|
length = sections.length;
|
|
if (!(value5 < length)) {
|
|
return undefined;
|
|
}
|
|
r4 = value5;
|
|
r9 = value;
|
|
continue;
|
|
}
|
|
break;
|
|
}
|
|
if (value === -1) {
|
|
r11 = {section: property, key: r14 + ':header', index: null, header: true,
|
|
trailingSection: sections[r4 + 1]};
|
|
} else if (value === getItemCount(data)) {
|
|
r11 = {section: property, key: r14 + ':footer', index: null, header: false,
|
|
trailingSection: sections[r4 + 1]};
|
|
} else {
|
|
object2 = {section: property};
|
|
value3 = r14 + ':';
|
|
r16 = property.keyExtractor || keyExtractor;
|
|
r16 = !r16 ? (require(304) /* metro dependency 304 */).keyExtractor : r16;
|
|
object2.key = value3 + r16(getItem(data, value), value);
|
|
object2.index = value;
|
|
object2.leadingItem = getItem(data, value - 1);
|
|
object2.leadingSection = sections[r4 - 1];
|
|
object2.trailingItem = getItem(data, value + 1);
|
|
object2.trailingSection = sections[r4 + 1];
|
|
r11 = object2;
|
|
}
|
|
return r11;
|
|
}
|
|
}
|
|
|
|
function value_4855(a0, a1, a2) { // fn#4855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:5226, offset: 0x00ccf2f1, size: 147 bytes, params: 4, frame: 17
|
|
var ItemSeparatorComponent;
|
|
var section;
|
|
var props;
|
|
var SectionSeparatorComponent;
|
|
var index;
|
|
var getItemCount;
|
|
var value2;
|
|
let value = a1;
|
|
const r1 = value || this._subExtractor(a0);
|
|
if (r1) {
|
|
section = r1.section;
|
|
ItemSeparatorComponent = section.ItemSeparatorComponent;
|
|
ItemSeparatorComponent = !ItemSeparatorComponent ? this.props.ItemSeparatorComponent : ItemSeparatorComponent;
|
|
props = this.props;
|
|
SectionSeparatorComponent = props.SectionSeparatorComponent;
|
|
value = a2 - 1;
|
|
index = r1.index;
|
|
props = this.props;
|
|
getItemCount = props.getItemCount;
|
|
section = r1.section;
|
|
value2 = index === Reflect.apply(getItemCount, props, [section.data]) - 1;
|
|
return SectionSeparatorComponent && value2 ? SectionSeparatorComponent : ItemSeparatorComponent ? value2 || a0 === value ? null : ItemSeparatorComponent : null;
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function VirtualizedSectionList_keyExtractor(a0, a1) { // fn#4838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:1000, owner: VirtualizedSectionList._keyExtractor, offset: 0x00cce9b7, size: 52 bytes, params: 3, frame: 12
|
|
const value = env0_0._subExtractor(a1);
|
|
let r0 = value && value.key;
|
|
r0 = !r0 ? global.String(a1) : r0;
|
|
return r0;
|
|
}
|
|
|
|
function _convertViewable(a0) { // fn#4839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:1086, owner: VirtualizedSectionList._convertViewable, offset: 0x00cce9eb, size: 235 bytes, params: 2, frame: 19
|
|
var keyExtractor;
|
|
var r5;
|
|
var section;
|
|
var keyExtractor2;
|
|
var item;
|
|
var Object;
|
|
var assign;
|
|
let value = environment.__proto__.__proto__;
|
|
const defaultImport = importDefault(44) /* metro dependency 44 */;
|
|
let index = a0.index;
|
|
defaultImport(index != null, 'Received a broken ViewToken');
|
|
const binding = env0_0;
|
|
const value3 = binding._subExtractor(a0.index);
|
|
if (value3) {
|
|
section = value3.section;
|
|
keyExtractor2 = section.keyExtractor;
|
|
keyExtractor = env0_0.props.keyExtractor;
|
|
keyExtractor = !keyExtractor ? (require(304) /* metro dependency 304 */).keyExtractor : keyExtractor;
|
|
if (keyExtractor2 != null) {
|
|
r5 = keyExtractor2(a0.item, value3.index);
|
|
} else {
|
|
item = a0.item;
|
|
index = value3.index;
|
|
value = 0;
|
|
value = keyExtractor(item, index ?? value);
|
|
r5 = value;
|
|
}
|
|
Object = global.Object;
|
|
assign = Object.assign;
|
|
index = value3.index;
|
|
section = value3.section;
|
|
return Reflect.apply(assign, Object, [{}, a0, {index: index, key: r5, section: section}]);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
function _onViewableItemsChanged({viewableItems, changed}) { // fn#4840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:1436, owner: VirtualizedSectionList._onViewableItemsChanged, offset: 0x00ccead6, size: 146 bytes, params: 2, frame: 17
|
|
var object2;
|
|
var map;
|
|
var _convertViewable;
|
|
var value2;
|
|
var filter;
|
|
var Boolean;
|
|
var value;
|
|
const onViewableItemsChanged = env0_0.props.onViewableItemsChanged;
|
|
if (onViewableItemsChanged != null) {
|
|
object2 = {};
|
|
map = viewableItems.map;
|
|
_convertViewable = env0_0._convertViewable;
|
|
value2 = Reflect.apply(map, viewableItems, [_convertViewable, env0_0]);
|
|
filter = value2.filter;
|
|
Boolean = global.Boolean;
|
|
object2.viewableItems = Reflect.apply(filter, value2, [Boolean]);
|
|
map = changed.map;
|
|
_convertViewable = env0_0._convertViewable;
|
|
value = Reflect.apply(map, changed, [_convertViewable, env0_0]);
|
|
filter = value.filter;
|
|
Boolean = global.Boolean;
|
|
object2.changed = Reflect.apply(filter, value, [Boolean]);
|
|
onViewableItemsChanged(object2);
|
|
}
|
|
}
|
|
|
|
function _renderItem(a0) { // fn#4841, owner: VirtualizedSectionList._renderItem, offset: 0x00cceb68, size: 16 bytes, params: 2, frame: 2
|
|
const env0_0 = a0;
|
|
return _fun4842;
|
|
}
|
|
|
|
function _updatePropsFor(a0, a1) { // fn#4843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:2610, owner: VirtualizedSectionList._updatePropsFor, offset: 0x00cced5a, size: 40 bytes, params: 3, frame: 11
|
|
const property = env0_0._updatePropsMap[a0];
|
|
if (property != null) {
|
|
property(a1);
|
|
}
|
|
}
|
|
|
|
function _updateHighlightFor(a0, a1) { // fn#4844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:2688, owner: VirtualizedSectionList._updateHighlightFor, offset: 0x00cced82, size: 40 bytes, params: 3, frame: 11
|
|
const property = env0_0._updateHighlightMap[a0];
|
|
if (property != null) {
|
|
property(a1);
|
|
}
|
|
}
|
|
|
|
function _setUpdateHighlightFor(a0, a1) { // fn#4845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:2773, owner: VirtualizedSectionList._setUpdateHighlightFor, offset: 0x00ccedaa, size: 52 bytes, params: 3, frame: 3
|
|
if (a1 != null) {
|
|
env0_0._updateHighlightMap[a0] = a1;
|
|
} else {
|
|
delete env0_0._updateHighlightFor[a0];
|
|
}
|
|
}
|
|
|
|
function _setUpdatePropsFor(a0, a1) { // fn#4846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:2876, owner: VirtualizedSectionList._setUpdatePropsFor, offset: 0x00ccedde, size: 52 bytes, params: 3, frame: 3
|
|
if (a1 != null) {
|
|
env0_0._updatePropsMap[a0] = a1;
|
|
} else {
|
|
delete env0_0._updatePropsMap[a0];
|
|
}
|
|
}
|
|
|
|
function value_4850GetItem(a0, a1) { // fn#4851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:4188, owner: value_4850.getItem, offset: 0x00ccf0c2, size: 33 bytes, params: 3, frame: 15
|
|
const binding = env0_0;
|
|
return binding._getItem(binding.props, a0, a1);
|
|
}
|
|
|
|
function _fun4842({item, index}) { // fn#4842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:358:1673, offset: 0x00cceb78, size: 482 bytes, params: 2, frame: 23
|
|
var renderItem;
|
|
var index2;
|
|
var section;
|
|
var value5;
|
|
var value6;
|
|
var value7;
|
|
var key;
|
|
var renderSectionFooter;
|
|
var renderSectionHeader;
|
|
const value = environment.__proto__;
|
|
let binding = env1_0;
|
|
const value2 = binding._subExtractor(index);
|
|
if (value2) {
|
|
index2 = value2.index;
|
|
if (index2 == null) {
|
|
section = value2.section;
|
|
if (value2.header === true) {
|
|
renderSectionHeader = env1_0.props.renderSectionHeader;
|
|
return renderSectionHeader ? renderSectionHeader({section: section}) : null;
|
|
}
|
|
renderSectionFooter = env1_0.props.renderSectionFooter;
|
|
return renderSectionFooter ? renderSectionFooter({section: section}) : null;
|
|
}
|
|
section = value2.section;
|
|
renderItem = section.renderItem;
|
|
renderItem = !renderItem ? env1_0.props.renderItem : renderItem;
|
|
binding = env1_0;
|
|
value5 = binding._getSeparatorComponent(index, value2, env0_0);
|
|
value6 = environment.__proto__.__proto__.__proto__;
|
|
value7 = undefined;
|
|
(importDefault(44) /* metro dependency 44 */)(renderItem, 'no renderItem!');
|
|
var itemWithSeparatorBindingProps = {SeparatorComponent: value5,
|
|
LeadingSeparatorComponent: index2 !== 0 ? value7 : env1_0.props.SectionSeparatorComponent};
|
|
key = value2.key;
|
|
itemWithSeparatorBindingProps.cellKey = key;
|
|
itemWithSeparatorBindingProps.index = index2;
|
|
itemWithSeparatorBindingProps.item = item;
|
|
itemWithSeparatorBindingProps.leadingItem = value2.leadingItem;
|
|
itemWithSeparatorBindingProps.leadingSection = value2.leadingSection;
|
|
binding = env1_0;
|
|
key = (binding._subExtractor(index - 1) || ({})).key;
|
|
itemWithSeparatorBindingProps.prevCellKey = key;
|
|
itemWithSeparatorBindingProps.setSelfHighlightCallback = env1_0._setUpdateHighlightFor;
|
|
itemWithSeparatorBindingProps.setSelfUpdatePropsCallback = env1_0._setUpdatePropsFor;
|
|
itemWithSeparatorBindingProps.updateHighlightFor = env1_0._updateHighlightFor;
|
|
itemWithSeparatorBindingProps.updatePropsFor = env1_0._updatePropsFor;
|
|
itemWithSeparatorBindingProps.renderItem = renderItem;
|
|
section = value2.section;
|
|
itemWithSeparatorBindingProps.section = section;
|
|
itemWithSeparatorBindingProps.trailingItem = value2.trailingItem;
|
|
itemWithSeparatorBindingProps.trailingSection = value2.trailingSection;
|
|
itemWithSeparatorBindingProps.inverted = !!env1_0.props.inverted;
|
|
return <ItemWithSeparator {...itemWithSeparatorBindingProps} />;
|
|
}
|
|
return null;
|
|
}
|
|
|