// Module ID: 321 // Function ID: 322 // Dependencies: [41, 42, 93, 95, 98, 19, 17, 21, 38, 322] // Module 321 import _modDef38 from "module_38" /* 38 */; import _possibleConstructorReturnDefault from "_possibleConstructorReturn" /* 93 */; import _classCallCheck from "_classCallCheck" /* 41 */; import _createClass from "_createClass" /* 42 */; import _getPrototypeOf from "_getPrototypeOf" /* 95 */; import _inherits from "_inherits" /* 98 */; import noop from "module_19" /* 19 */; const CellRenderer = fn; function _isNativeReflectConstruct() { try { const _Boolean = Boolean; const call = valueOf.call; const _Reflect = Reflect; const _Boolean2 = Boolean; if (typeof call === "unknown") { let callResult = valueOf(); } else { callResult = call(constructResult); } closure_0 = !callResult; _isNativeReflectConstruct = function _isNativeReflectConstruct() { return closure_0; }; return _isNativeReflectConstruct(); } catch (err) { } } _possibleConstructorReturnDefault; const isValidElement = fn(19).isValidElement; get_ActivityIndicator = fn(17); ({ StyleSheet, View: closure_7 } = get_ActivityIndicator); const jsxProd = fn(21); ({ jsx: closure_8, jsxs: closure_9 } = jsxProd); class CellRenderer { constructor() { self = this; items = [...arguments]; closure_0 = undefined; tmp = closure_3(this, CellRenderer); items1 = [...items]; tmp2 = hasOwnProperty; obj = hasOwnProperty(CellRenderer); tmp3 = closure_4; if (c10()) { tmp5 = globalThis; _Reflect = Reflect; constructResult = Reflect.construct(obj, items1, tmp2(self).constructor); } else { constructResult = obj.apply(self, items1); } tmp3Result = tmp3(self, constructResult); closure_0 = tmp3Result; obj1 = { separatorProps: { highlighted: false, leadingItem: tmp3Result.props.item } }; tmp3Result.state = obj1; tmp3Result._separators = { highlight() { ({ props, props: props2 } = closure_0); const items = [, ]; ({ cellKey: arr[0], prevCellKey: arr[1] } = props); props2.onUpdateSeparators(items, { highlighted: true }); }, unhighlight() { ({ props, props: props2 } = closure_0); const items = [, ]; ({ cellKey: arr[0], prevCellKey: arr[1] } = props); props2.onUpdateSeparators(items, { highlighted: false }); }, updateProps(arg0, arg1) { const props = closure_0.props; let prevCellKey = props.cellKey; const props2 = closure_0.props; if ("leading" === arg0) { prevCellKey = props.prevCellKey; } const items = [prevCellKey]; props2.onUpdateSeparators(items, arg1); } }; tmp3Result._onLayout = (arg0) => { const props = closure_0.props; const onCellLayout = props.onCellLayout; if (onCellLayout != null) { onCellLayout(arg0, tmp.props.cellKey, tmp.props.index); } }; tmp3Result._onCellFocusCapture = (arg0) => { const props = closure_0.props; const onCellFocusCapture = props.onCellFocusCapture; if (onCellFocusCapture != null) { onCellFocusCapture(closure_0.props.cellKey); } }; return tmp3Result; } } _inherits(CellRenderer, noop.PureComponent); const entry = { key: "updateSeparatorProps", value: function updateSeparatorProps(arg0) { closure_0 = arg0; this.setState((separatorProps) => { const obj = { separatorProps: null }; const merged = Object.assign(separatorProps.separatorProps); const merged1 = Object.assign(closure_0); obj.separatorProps = {}; return obj; }); } }; let items = [ entry, { key: "componentWillUnmount", value: function componentWillUnmount() { const props = this.props; props.onUnmount(this.props.cellKey); } }, { key: "_renderElement", value: function _renderElement(renderItem, ListItemComponent, item, index) { let tmp = renderItem; if (renderItem) { tmp = ListItemComponent; } if (tmp) { const _console = console; console.warn("VirtualizedList: Both ListItemComponent and renderItem props are present. ListItemComponent will take precedence over renderItem."); } const self = this; if (ListItemComponent) { const obj2 = { item, index, separators: self._separators }; let tmp7 = React6(ListItemComponent, obj2); } else if (renderItem) { const obj = { item, index, separators: self._separators }; tmp7 = renderItem(obj); } else { _modDef38(false, "VirtualizedList: Either ListItemComponent or renderItem props are required but none were found."); } return tmp7; } }, { key: "render", value: function render() { const self = this; const props = this.props; ({ CellRendererComponent, ItemSeparatorComponent, horizontal, item, index, inversionStyle, onCellLayout } = props); const _renderElementResult = this._renderElement(props.renderItem, props.ListItemComponent, item, index); let tmp2 = ItemSeparatorComponent; if (!isValidElement(ItemSeparatorComponent)) { let tmp3 = ItemSeparatorComponent; if (ItemSeparatorComponent) { const obj = {}; const merged = Object.assign(self.state.separatorProps); tmp3 = React6(ItemSeparatorComponent, obj); } tmp2 = tmp3; } if (inversionStyle) { let items = row; if (horizontal) { items = [, ]; items[0] = items.rowReverse; items[1] = inversionStyle; let items1 = items; } else { items1 = [items.columnReverse, inversionStyle]; } } else { let tmp7 = inversionStyle; if (horizontal) { const items2 = [row.row, inversionStyle]; tmp7 = items2; } if (CellRendererComponent) { const obj2 = { cellKey: props.cellKey, index, item, style: tmp7, onFocusCapture: self._onCellFocusCapture }; if (onCellLayout) { const obj3 = { onLayout: self._onLayout }; onCellLayout = obj3; } const merged1 = Object.assign(onCellLayout); const items3 = [_renderElementResult, tmp2]; obj2.children = items3; let tmp10Result = tmp10(CellRendererComponent, obj2); } else { const obj4 = { style: tmp7, onFocusCapture: self._onCellFocusCapture }; let tmp12 = onCellLayout; if (onCellLayout) { const obj5 = { onLayout: self._onLayout }; tmp12 = obj5; } const merged2 = Object.assign(tmp12); const items4 = [_renderElementResult, tmp2]; obj4.children = items4; tmp10Result = tmp10(React5, obj4); } const obj6 = { cellKey: self.props.cellKey, children: tmp10Result }; return React6(CellRenderer(322).VirtualizedListCellContextProvider, obj6); } } } ]; const entry1 = { key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(item, separatorProps) { let tmp = null; if (item.item !== separatorProps.separatorProps.leadingItem) { const obj = { separatorProps: null }; const obj2 = {}; const merged = Object.assign(separatorProps.separatorProps); obj2.leadingItem = item.item; obj.separatorProps = obj2; tmp = obj; } return tmp; } }; let items1 = [entry1]; const row = StyleSheet.create({ row: { flexDirection: "row" }, rowReverse: { flexDirection: "row-reverse" }, columnReverse: { flexDirection: "column-reverse" } }); export default _createClass(CellRenderer, items, items1);