{"ast":null,"code":"'use strict';\n\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n  var it;\n\n  if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n    if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n      if (it) o = it;\n      var i = 0;\n      return function () {\n        if (i >= o.length) return {\n          done: true\n        };\n        return {\n          done: false,\n          value: o[i++]\n        };\n      };\n    }\n\n    throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n\n  it = o[Symbol.iterator]();\n  return it.next.bind(it);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) {\n    arr2[i] = arr[i];\n  }\n\n  return arr2;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    });\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(Object(source), true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(Object(source)).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction _assertThisInitialized(self) {\n  if (self === void 0) {\n    throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n  }\n\n  return self;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n  subClass.prototype = Object.create(superClass.prototype);\n  subClass.prototype.constructor = subClass;\n\n  _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n    o.__proto__ = p;\n    return o;\n  };\n\n  return _setPrototypeOf(o, p);\n}\n\nimport * as React from 'react';\nimport View from \"../../../exports/View\";\nimport VirtualizedList from \"../VirtualizedList\";\nimport invariant from 'fbjs/lib/invariant';\n\nvar VirtualizedSectionList = function (_React$PureComponent) {\n  _inheritsLoose(VirtualizedSectionList, _React$PureComponent);\n\n  function VirtualizedSectionList() {\n    var _this;\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n\n    _this._getItem = function (props, sections, index) {\n      if (!sections) {\n        return null;\n      }\n\n      var itemIdx = index - 1;\n\n      for (var i = 0; i < sections.length; i++) {\n        var section = sections[i];\n        var sectionData = section.data;\n        var itemCount = props.getItemCount(sectionData);\n\n        if (itemIdx === -1 || itemIdx === itemCount) {\n          return section;\n        } else if (itemIdx < itemCount) {\n          return props.getItem(sectionData, itemIdx);\n        } else {\n          itemIdx -= itemCount + 2;\n        }\n      }\n\n      return null;\n    };\n\n    _this._keyExtractor = function (item, index) {\n      var info = _this._subExtractor(index);\n\n      return info && info.key || String(index);\n    };\n\n    _this._convertViewable = function (viewable) {\n      invariant(viewable.index != null, 'Received a broken ViewToken');\n\n      var info = _this._subExtractor(viewable.index);\n\n      if (!info) {\n        return null;\n      }\n\n      var keyExtractor = info.section.keyExtractor || _this.props.keyExtractor;\n      return _objectSpread(_objectSpread({}, viewable), {}, {\n        index: info.index,\n        key: keyExtractor(viewable.item, info.index),\n        section: info.section\n      });\n    };\n\n    _this._onViewableItemsChanged = function (_ref) {\n      var viewableItems = _ref.viewableItems,\n          changed = _ref.changed;\n      var onViewableItemsChanged = _this.props.onViewableItemsChanged;\n\n      if (onViewableItemsChanged != null) {\n        onViewableItemsChanged({\n          viewableItems: viewableItems.map(_this._convertViewable, _assertThisInitialized(_this)).filter(Boolean),\n          changed: changed.map(_this._convertViewable, _assertThisInitialized(_this)).filter(Boolean)\n        });\n      }\n    };\n\n    _this._renderItem = function (listItemCount) {\n      return function (_ref2) {\n        var item = _ref2.item,\n            index = _ref2.index;\n\n        var info = _this._subExtractor(index);\n\n        if (!info) {\n          return null;\n        }\n\n        var infoIndex = info.index;\n\n        if (infoIndex == null) {\n          var section = info.section;\n\n          if (info.header === true) {\n            var renderSectionHeader = _this.props.renderSectionHeader;\n            return renderSectionHeader ? renderSectionHeader({\n              section: section\n            }) : null;\n          } else {\n            var renderSectionFooter = _this.props.renderSectionFooter;\n            return renderSectionFooter ? renderSectionFooter({\n              section: section\n            }) : null;\n          }\n        } else {\n          var renderItem = info.section.renderItem || _this.props.renderItem;\n\n          var SeparatorComponent = _this._getSeparatorComponent(index, info, listItemCount);\n\n          invariant(renderItem, 'no renderItem!');\n          return React.createElement(ItemWithSeparator, {\n            SeparatorComponent: SeparatorComponent,\n            LeadingSeparatorComponent: infoIndex === 0 ? _this.props.SectionSeparatorComponent : undefined,\n            cellKey: info.key,\n            index: infoIndex,\n            item: item,\n            leadingItem: info.leadingItem,\n            leadingSection: info.leadingSection,\n            onUpdateSeparator: _this._onUpdateSeparator,\n            prevCellKey: (_this._subExtractor(index - 1) || {}).key,\n            ref: function ref(_ref3) {\n              _this._cellRefs[info.key] = _ref3;\n            },\n            renderItem: renderItem,\n            section: info.section,\n            trailingItem: info.trailingItem,\n            trailingSection: info.trailingSection,\n            inverted: !!_this.props.inverted\n          });\n        }\n      };\n    };\n\n    _this._onUpdateSeparator = function (key, newProps) {\n      var ref = _this._cellRefs[key];\n      ref && ref.updateSeparatorProps(newProps);\n    };\n\n    _this._cellRefs = {};\n\n    _this._captureRef = function (ref) {\n      _this._listRef = ref;\n    };\n\n    return _this;\n  }\n\n  var _proto = VirtualizedSectionList.prototype;\n\n  _proto.scrollToLocation = function scrollToLocation(params) {\n    var index = params.itemIndex;\n\n    for (var i = 0; i < params.sectionIndex; i++) {\n      index += this.props.getItemCount(this.props.sections[i].data) + 2;\n    }\n\n    var viewOffset = params.viewOffset || 0;\n\n    if (this._listRef == null) {\n      return;\n    }\n\n    if (params.itemIndex > 0 && this.props.stickySectionHeadersEnabled) {\n      var frame = this._listRef._getFrameMetricsApprox(index - params.itemIndex);\n\n      viewOffset += frame.length;\n    }\n\n    var toIndexParams = _objectSpread(_objectSpread({}, params), {}, {\n      viewOffset: viewOffset,\n      index: index\n    });\n\n    this._listRef.scrollToIndex(toIndexParams);\n  };\n\n  _proto.getListRef = function getListRef() {\n    return this._listRef;\n  };\n\n  _proto.render = function render() {\n    var _this2 = this;\n\n    var _this$props = this.props,\n        ItemSeparatorComponent = _this$props.ItemSeparatorComponent,\n        SectionSeparatorComponent = _this$props.SectionSeparatorComponent,\n        _renderItem = _this$props.renderItem,\n        renderSectionFooter = _this$props.renderSectionFooter,\n        renderSectionHeader = _this$props.renderSectionHeader,\n        _sections = _this$props.sections,\n        stickySectionHeadersEnabled = _this$props.stickySectionHeadersEnabled,\n        passThroughProps = _objectWithoutPropertiesLoose(_this$props, [\"ItemSeparatorComponent\", \"SectionSeparatorComponent\", \"renderItem\", \"renderSectionFooter\", \"renderSectionHeader\", \"sections\", \"stickySectionHeadersEnabled\"]);\n\n    var listHeaderOffset = this.props.ListHeaderComponent ? 1 : 0;\n    var stickyHeaderIndices = this.props.stickySectionHeadersEnabled ? [] : undefined;\n    var itemCount = 0;\n\n    for (var _iterator = _createForOfIteratorHelperLoose(this.props.sections), _step; !(_step = _iterator()).done;) {\n      var section = _step.value;\n\n      if (stickyHeaderIndices != null) {\n        stickyHeaderIndices.push(itemCount + listHeaderOffset);\n      }\n\n      itemCount += 2;\n      itemCount += this.props.getItemCount(section.data);\n    }\n\n    var renderItem = this._renderItem(itemCount);\n\n    return React.createElement(VirtualizedList, _extends({}, passThroughProps, {\n      keyExtractor: this._keyExtractor,\n      stickyHeaderIndices: stickyHeaderIndices,\n      renderItem: renderItem,\n      data: this.props.sections,\n      getItem: function getItem(sections, index) {\n        return _this2._getItem(_this2.props, sections, index);\n      },\n      getItemCount: function getItemCount() {\n        return itemCount;\n      },\n      onViewableItemsChanged: this.props.onViewableItemsChanged ? this._onViewableItemsChanged : undefined,\n      ref: this._captureRef\n    }));\n  };\n\n  _proto._subExtractor = function _subExtractor(index) {\n    var itemIndex = index;\n    var _this$props2 = this.props,\n        getItem = _this$props2.getItem,\n        getItemCount = _this$props2.getItemCount,\n        keyExtractor = _this$props2.keyExtractor,\n        sections = _this$props2.sections;\n\n    for (var i = 0; i < sections.length; i++) {\n      var section = sections[i];\n      var sectionData = section.data;\n      var key = section.key || String(i);\n      itemIndex -= 1;\n\n      if (itemIndex >= getItemCount(sectionData) + 1) {\n        itemIndex -= getItemCount(sectionData) + 1;\n      } else if (itemIndex === -1) {\n        return {\n          section: section,\n          key: key + ':header',\n          index: null,\n          header: true,\n          trailingSection: sections[i + 1]\n        };\n      } else if (itemIndex === getItemCount(sectionData)) {\n        return {\n          section: section,\n          key: key + ':footer',\n          index: null,\n          header: false,\n          trailingSection: sections[i + 1]\n        };\n      } else {\n        var extractor = section.keyExtractor || keyExtractor;\n        return {\n          section: section,\n          key: key + ':' + extractor(getItem(sectionData, itemIndex), itemIndex),\n          index: itemIndex,\n          leadingItem: getItem(sectionData, itemIndex - 1),\n          leadingSection: sections[i - 1],\n          trailingItem: getItem(sectionData, itemIndex + 1),\n          trailingSection: sections[i + 1]\n        };\n      }\n    }\n  };\n\n  _proto._getSeparatorComponent = function _getSeparatorComponent(index, info, listItemCount) {\n    info = info || this._subExtractor(index);\n\n    if (!info) {\n      return null;\n    }\n\n    var ItemSeparatorComponent = info.section.ItemSeparatorComponent || this.props.ItemSeparatorComponent;\n    var SectionSeparatorComponent = this.props.SectionSeparatorComponent;\n    var isLastItemInList = index === listItemCount - 1;\n    var isLastItemInSection = info.index === this.props.getItemCount(info.section.data) - 1;\n\n    if (SectionSeparatorComponent && isLastItemInSection) {\n      return SectionSeparatorComponent;\n    }\n\n    if (ItemSeparatorComponent && !isLastItemInSection && !isLastItemInList) {\n      return ItemSeparatorComponent;\n    }\n\n    return null;\n  };\n\n  return VirtualizedSectionList;\n}(React.PureComponent);\n\nVirtualizedSectionList.defaultProps = _objectSpread(_objectSpread({}, VirtualizedList.defaultProps), {}, {\n  data: []\n});\n\nvar ItemWithSeparator = function (_React$Component) {\n  _inheritsLoose(ItemWithSeparator, _React$Component);\n\n  function ItemWithSeparator() {\n    var _this3;\n\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    _this3 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n    _this3.state = {\n      separatorProps: {\n        highlighted: false,\n        leadingItem: _this3.props.item,\n        leadingSection: _this3.props.leadingSection,\n        section: _this3.props.section,\n        trailingItem: _this3.props.trailingItem,\n        trailingSection: _this3.props.trailingSection\n      },\n      leadingSeparatorProps: {\n        highlighted: false,\n        leadingItem: _this3.props.leadingItem,\n        leadingSection: _this3.props.leadingSection,\n        section: _this3.props.section,\n        trailingItem: _this3.props.item,\n        trailingSection: _this3.props.trailingSection\n      }\n    };\n    _this3._separators = {\n      highlight: function highlight() {\n        ['leading', 'trailing'].forEach(function (s) {\n          return _this3._separators.updateProps(s, {\n            highlighted: true\n          });\n        });\n      },\n      unhighlight: function unhighlight() {\n        ['leading', 'trailing'].forEach(function (s) {\n          return _this3._separators.updateProps(s, {\n            highlighted: false\n          });\n        });\n      },\n      updateProps: function updateProps(select, newProps) {\n        var _this3$props = _this3.props,\n            LeadingSeparatorComponent = _this3$props.LeadingSeparatorComponent,\n            cellKey = _this3$props.cellKey,\n            prevCellKey = _this3$props.prevCellKey;\n\n        if (select === 'leading' && LeadingSeparatorComponent != null) {\n          _this3.setState(function (state) {\n            return {\n              leadingSeparatorProps: _objectSpread(_objectSpread({}, state.leadingSeparatorProps), newProps)\n            };\n          });\n        } else {\n          _this3.props.onUpdateSeparator(select === 'leading' && prevCellKey || cellKey, newProps);\n        }\n      }\n    };\n    return _this3;\n  }\n\n  ItemWithSeparator.getDerivedStateFromProps = function getDerivedStateFromProps(props, prevState) {\n    return {\n      separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n        leadingItem: props.item,\n        leadingSection: props.leadingSection,\n        section: props.section,\n        trailingItem: props.trailingItem,\n        trailingSection: props.trailingSection\n      }),\n      leadingSeparatorProps: _objectSpread(_objectSpread({}, prevState.leadingSeparatorProps), {}, {\n        leadingItem: props.leadingItem,\n        leadingSection: props.leadingSection,\n        section: props.section,\n        trailingItem: props.item,\n        trailingSection: props.trailingSection\n      })\n    };\n  };\n\n  var _proto2 = ItemWithSeparator.prototype;\n\n  _proto2.updateSeparatorProps = function updateSeparatorProps(newProps) {\n    this.setState(function (state) {\n      return {\n        separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n      };\n    });\n  };\n\n  _proto2.render = function render() {\n    var _this$props3 = this.props,\n        LeadingSeparatorComponent = _this$props3.LeadingSeparatorComponent,\n        SeparatorComponent = _this$props3.SeparatorComponent,\n        item = _this$props3.item,\n        index = _this$props3.index,\n        section = _this$props3.section,\n        inverted = _this$props3.inverted;\n    var element = this.props.renderItem({\n      item: item,\n      index: index,\n      section: section,\n      separators: this._separators\n    });\n    var leadingSeparator = LeadingSeparatorComponent != null && React.createElement(LeadingSeparatorComponent, this.state.leadingSeparatorProps);\n    var separator = SeparatorComponent != null && React.createElement(SeparatorComponent, this.state.separatorProps);\n    return leadingSeparator || separator ? React.createElement(View, null, inverted === false ? leadingSeparator : separator, element, inverted === false ? separator : leadingSeparator) : element;\n  };\n\n  return ItemWithSeparator;\n}(React.Component);\n\nexport default VirtualizedSectionList;","map":{"version":3,"sources":["/Users/rohitsingh/Documents/projects/new-nativebase-setup/NativeBase/example/node_modules/react-native-web/dist/vendor/react-native/VirtualizedSectionList/index.js"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","_createForOfIteratorHelperLoose","o","allowArrayLike","it","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","done","value","TypeError","next","bind","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","from","test","arr","len","arr2","_objectWithoutPropertiesLoose","excluded","sourceKeys","keys","indexOf","ownKeys","object","enumerableOnly","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","configurable","writable","_assertThisInitialized","self","ReferenceError","_inheritsLoose","subClass","superClass","create","_setPrototypeOf","p","setPrototypeOf","__proto__","React","View","VirtualizedList","invariant","VirtualizedSectionList","_React$PureComponent","_this","_len","args","_key","concat","_getItem","props","sections","index","itemIdx","section","sectionData","data","itemCount","getItemCount","getItem","_keyExtractor","item","info","_subExtractor","String","_convertViewable","viewable","keyExtractor","_onViewableItemsChanged","_ref","viewableItems","changed","onViewableItemsChanged","map","Boolean","_renderItem","listItemCount","_ref2","infoIndex","header","renderSectionHeader","renderSectionFooter","renderItem","SeparatorComponent","_getSeparatorComponent","createElement","ItemWithSeparator","LeadingSeparatorComponent","SectionSeparatorComponent","undefined","cellKey","leadingItem","leadingSection","onUpdateSeparator","_onUpdateSeparator","prevCellKey","ref","_ref3","_cellRefs","trailingItem","trailingSection","inverted","newProps","updateSeparatorProps","_captureRef","_listRef","_proto","scrollToLocation","params","itemIndex","sectionIndex","viewOffset","stickySectionHeadersEnabled","frame","_getFrameMetricsApprox","toIndexParams","scrollToIndex","getListRef","render","_this2","_this$props","ItemSeparatorComponent","_sections","passThroughProps","listHeaderOffset","ListHeaderComponent","stickyHeaderIndices","_iterator","_step","_this$props2","extractor","isLastItemInList","isLastItemInSection","PureComponent","defaultProps","_React$Component","_this3","_len2","_key2","state","separatorProps","highlighted","leadingSeparatorProps","_separators","highlight","s","updateProps","unhighlight","select","_this3$props","setState","getDerivedStateFromProps","prevState","_proto2","_this$props3","element","separators","leadingSeparator","separator","Component"],"mappings":"AASA;;AAEA,SAASA,QAAT,GAAoB;AAAEA,EAAAA,QAAQ,GAAGC,MAAM,CAACC,MAAP,IAAiB,UAAUC,MAAV,EAAkB;AAAE,SAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGC,SAAS,CAACC,MAA9B,EAAsCF,CAAC,EAAvC,EAA2C;AAAE,UAAIG,MAAM,GAAGF,SAAS,CAACD,CAAD,CAAtB;;AAA2B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Q,GAAGqD,YAAY,CAACrD,QAN5B;AAOA,QAAIsD,OAAO,GAAG,KAAKzG,KAAL,CAAWgC,UAAX,CAAsB;AAClCrB,MAAAA,IAAI,EAAEA,IAD4B;AAElCT,MAAAA,KAAK,EAAEA,KAF2B;AAGlCE,MAAAA,OAAO,EAAEA,OAHyB;AAIlCsG,MAAAA,UAAU,EAAE,KAAKb;AAJiB,KAAtB,CAAd;AAMA,QAAIc,gBAAgB,GAAGtE,yBAAyB,IAAI,IAA7B,IAAkDjD,KAAK,CAAC+C,aAAN,CAAoBE,yBAApB,EAA+C,KAAKoD,KAAL,CAAWG,qBAA1D,CAAzE;AACA,QAAIgB,SAAS,GAAG3E,kBAAkB,IAAI,IAAtB,IAA2C7C,KAAK,CAAC+C,aAAN,CAAoBF,kBAApB,EAAwC,KAAKwD,KAAL,CAAWC,cAAnD,CAA3D;AACA,WAAOiB,gBAAgB,IAAIC,SAApB,GAA6CxH,KAAK,CAAC+C,aAAN,CAAoB9C,IAApB,EAA0B,IAA1B,EAAgC8D,QAAQ,KAAK,KAAb,GAAqBwD,gBAArB,GAAwCC,SAAxE,EAAmFH,OAAnF,EAA4FtD,QAAQ,KAAK,KAAb,GAAqByD,SAArB,GAAiCD,gBAA7H,CAA7C,GAA8LF,OAArM;AACD,GAjBD;;AAmBA,SAAOrE,iBAAP;AACD,CAjHoC,CAiHnChD,KAAK,CAACyH,SAjH6B,CAArC;;AAmHA,eAAerH,sBAAf","sourcesContent":["/**\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n * @format\n */\n'use strict';\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } it = o[Symbol.iterator](); return it.next.bind(it); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nimport * as React from 'react';\nimport View from '../../../exports/View';\nimport VirtualizedList from '../VirtualizedList';\nimport invariant from 'fbjs/lib/invariant';\n\n/**\n * Right now this just flattens everything into one list and uses VirtualizedList under the\n * hood. The only operation that might not scale well is concatting the data arrays of all the\n * sections when new props are received, which should be plenty fast for up to ~10,000 items.\n */\nvar VirtualizedSectionList = /*#__PURE__*/function (_React$PureComponent) {\n  _inheritsLoose(VirtualizedSectionList, _React$PureComponent);\n\n  function VirtualizedSectionList() {\n    var _this;\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _React$PureComponent.call.apply(_React$PureComponent, [this].concat(args)) || this;\n\n    _this._getItem = function (props, sections, index) {\n      if (!sections) {\n        return null;\n      }\n\n      var itemIdx = index - 1;\n\n      for (var i = 0; i < sections.length; i++) {\n        var section = sections[i];\n        var sectionData = section.data;\n        var itemCount = props.getItemCount(sectionData);\n\n        if (itemIdx === -1 || itemIdx === itemCount) {\n          // We intend for there to be overflow by one on both ends of the list.\n          // This will be for headers and footers. When returning a header or footer\n          // item the section itself is the item.\n          return section;\n        } else if (itemIdx < itemCount) {\n          // If we are in the bounds of the list's data then return the item.\n          return props.getItem(sectionData, itemIdx);\n        } else {\n          itemIdx -= itemCount + 2; // Add two for the header and footer\n        }\n      }\n\n      return null;\n    };\n\n    _this._keyExtractor = function (item, index) {\n      var info = _this._subExtractor(index);\n\n      return info && info.key || String(index);\n    };\n\n    _this._convertViewable = function (viewable) {\n      invariant(viewable.index != null, 'Received a broken ViewToken');\n\n      var info = _this._subExtractor(viewable.index);\n\n      if (!info) {\n        return null;\n      }\n\n      var keyExtractor = info.section.keyExtractor || _this.props.keyExtractor;\n      return _objectSpread(_objectSpread({}, viewable), {}, {\n        index: info.index,\n\n        /* $FlowFixMe(>=0.63.0 site=react_native_fb) This comment suppresses an\n         * error found when Flow v0.63 was deployed. To see the error delete this\n         * comment and run Flow. */\n        key: keyExtractor(viewable.item, info.index),\n        section: info.section\n      });\n    };\n\n    _this._onViewableItemsChanged = function (_ref) {\n      var viewableItems = _ref.viewableItems,\n          changed = _ref.changed;\n      var onViewableItemsChanged = _this.props.onViewableItemsChanged;\n\n      if (onViewableItemsChanged != null) {\n        onViewableItemsChanged({\n          viewableItems: viewableItems.map(_this._convertViewable, _assertThisInitialized(_this)).filter(Boolean),\n          changed: changed.map(_this._convertViewable, _assertThisInitialized(_this)).filter(Boolean)\n        });\n      }\n    };\n\n    _this._renderItem = function (listItemCount) {\n      return function (_ref2) {\n        var item = _ref2.item,\n            index = _ref2.index;\n\n        var info = _this._subExtractor(index);\n\n        if (!info) {\n          return null;\n        }\n\n        var infoIndex = info.index;\n\n        if (infoIndex == null) {\n          var section = info.section;\n\n          if (info.header === true) {\n            var renderSectionHeader = _this.props.renderSectionHeader;\n            return renderSectionHeader ? renderSectionHeader({\n              section: section\n            }) : null;\n          } else {\n            var renderSectionFooter = _this.props.renderSectionFooter;\n            return renderSectionFooter ? renderSectionFooter({\n              section: section\n            }) : null;\n          }\n        } else {\n          var renderItem = info.section.renderItem || _this.props.renderItem;\n\n          var SeparatorComponent = _this._getSeparatorComponent(index, info, listItemCount);\n\n          invariant(renderItem, 'no renderItem!');\n          return /*#__PURE__*/React.createElement(ItemWithSeparator, {\n            SeparatorComponent: SeparatorComponent,\n            LeadingSeparatorComponent: infoIndex === 0 ? _this.props.SectionSeparatorComponent : undefined,\n            cellKey: info.key,\n            index: infoIndex,\n            item: item,\n            leadingItem: info.leadingItem,\n            leadingSection: info.leadingSection,\n            onUpdateSeparator: _this._onUpdateSeparator,\n            prevCellKey: (_this._subExtractor(index - 1) || {}).key,\n            ref: function ref(_ref3) {\n              _this._cellRefs[info.key] = _ref3;\n            },\n            renderItem: renderItem,\n            section: info.section,\n            trailingItem: info.trailingItem,\n            trailingSection: info.trailingSection,\n            inverted: !!_this.props.inverted\n          });\n        }\n      };\n    };\n\n    _this._onUpdateSeparator = function (key, newProps) {\n      var ref = _this._cellRefs[key];\n      ref && ref.updateSeparatorProps(newProps);\n    };\n\n    _this._cellRefs = {};\n\n    _this._captureRef = function (ref) {\n      _this._listRef = ref;\n    };\n\n    return _this;\n  }\n\n  var _proto = VirtualizedSectionList.prototype;\n\n  _proto.scrollToLocation = function scrollToLocation(params) {\n    var index = params.itemIndex;\n\n    for (var i = 0; i < params.sectionIndex; i++) {\n      index += this.props.getItemCount(this.props.sections[i].data) + 2;\n    }\n\n    var viewOffset = params.viewOffset || 0;\n\n    if (this._listRef == null) {\n      return;\n    }\n\n    if (params.itemIndex > 0 && this.props.stickySectionHeadersEnabled) {\n      // $FlowFixMe[prop-missing] Cannot access private property\n      var frame = this._listRef._getFrameMetricsApprox(index - params.itemIndex);\n\n      viewOffset += frame.length;\n    }\n\n    var toIndexParams = _objectSpread(_objectSpread({}, params), {}, {\n      viewOffset: viewOffset,\n      index: index\n    });\n\n    this._listRef.scrollToIndex(toIndexParams);\n  };\n\n  _proto.getListRef = function getListRef() {\n    return this._listRef;\n  };\n\n  _proto.render = function render() {\n    var _this2 = this;\n\n    var _this$props = this.props,\n        ItemSeparatorComponent = _this$props.ItemSeparatorComponent,\n        SectionSeparatorComponent = _this$props.SectionSeparatorComponent,\n        _renderItem = _this$props.renderItem,\n        renderSectionFooter = _this$props.renderSectionFooter,\n        renderSectionHeader = _this$props.renderSectionHeader,\n        _sections = _this$props.sections,\n        stickySectionHeadersEnabled = _this$props.stickySectionHeadersEnabled,\n        passThroughProps = _objectWithoutPropertiesLoose(_this$props, [\"ItemSeparatorComponent\", \"SectionSeparatorComponent\", \"renderItem\", \"renderSectionFooter\", \"renderSectionHeader\", \"sections\", \"stickySectionHeadersEnabled\"]);\n\n    var listHeaderOffset = this.props.ListHeaderComponent ? 1 : 0;\n    var stickyHeaderIndices = this.props.stickySectionHeadersEnabled ? [] : undefined;\n    var itemCount = 0;\n\n    for (var _iterator = _createForOfIteratorHelperLoose(this.props.sections), _step; !(_step = _iterator()).done;) {\n      var section = _step.value;\n\n      // Track the section header indices\n      if (stickyHeaderIndices != null) {\n        stickyHeaderIndices.push(itemCount + listHeaderOffset);\n      } // Add two for the section header and footer.\n\n\n      itemCount += 2;\n      itemCount += this.props.getItemCount(section.data);\n    }\n\n    var renderItem = this._renderItem(itemCount);\n\n    return /*#__PURE__*/React.createElement(VirtualizedList, _extends({}, passThroughProps, {\n      keyExtractor: this._keyExtractor,\n      stickyHeaderIndices: stickyHeaderIndices,\n      renderItem: renderItem,\n      data: this.props.sections,\n      getItem: function getItem(sections, index) {\n        return _this2._getItem(_this2.props, sections, index);\n      },\n      getItemCount: function getItemCount() {\n        return itemCount;\n      },\n      onViewableItemsChanged: this.props.onViewableItemsChanged ? this._onViewableItemsChanged : undefined,\n      ref: this._captureRef\n    }));\n  };\n\n  _proto._subExtractor = function _subExtractor(index) {\n    var itemIndex = index;\n    var _this$props2 = this.props,\n        getItem = _this$props2.getItem,\n        getItemCount = _this$props2.getItemCount,\n        keyExtractor = _this$props2.keyExtractor,\n        sections = _this$props2.sections;\n\n    for (var i = 0; i < sections.length; i++) {\n      var section = sections[i];\n      var sectionData = section.data;\n      var key = section.key || String(i);\n      itemIndex -= 1; // The section adds an item for the header\n\n      if (itemIndex >= getItemCount(sectionData) + 1) {\n        itemIndex -= getItemCount(sectionData) + 1; // The section adds an item for the footer.\n      } else if (itemIndex === -1) {\n        return {\n          section: section,\n          key: key + ':header',\n          index: null,\n          header: true,\n          trailingSection: sections[i + 1]\n        };\n      } else if (itemIndex === getItemCount(sectionData)) {\n        return {\n          section: section,\n          key: key + ':footer',\n          index: null,\n          header: false,\n          trailingSection: sections[i + 1]\n        };\n      } else {\n        var extractor = section.keyExtractor || keyExtractor;\n        return {\n          section: section,\n          key: key + ':' + extractor(getItem(sectionData, itemIndex), itemIndex),\n          index: itemIndex,\n          leadingItem: getItem(sectionData, itemIndex - 1),\n          leadingSection: sections[i - 1],\n          trailingItem: getItem(sectionData, itemIndex + 1),\n          trailingSection: sections[i + 1]\n        };\n      }\n    }\n  };\n\n  _proto._getSeparatorComponent = function _getSeparatorComponent(index, info, listItemCount) {\n    info = info || this._subExtractor(index);\n\n    if (!info) {\n      return null;\n    }\n\n    var ItemSeparatorComponent = info.section.ItemSeparatorComponent || this.props.ItemSeparatorComponent;\n    var SectionSeparatorComponent = this.props.SectionSeparatorComponent;\n    var isLastItemInList = index === listItemCount - 1;\n    var isLastItemInSection = info.index === this.props.getItemCount(info.section.data) - 1;\n\n    if (SectionSeparatorComponent && isLastItemInSection) {\n      return SectionSeparatorComponent;\n    }\n\n    if (ItemSeparatorComponent && !isLastItemInSection && !isLastItemInList) {\n      return ItemSeparatorComponent;\n    }\n\n    return null;\n  };\n\n  return VirtualizedSectionList;\n}(React.PureComponent);\n\nVirtualizedSectionList.defaultProps = _objectSpread(_objectSpread({}, VirtualizedList.defaultProps), {}, {\n  data: []\n});\n\nvar ItemWithSeparator = /*#__PURE__*/function (_React$Component) {\n  _inheritsLoose(ItemWithSeparator, _React$Component);\n\n  function ItemWithSeparator() {\n    var _this3;\n\n    for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n      args[_key2] = arguments[_key2];\n    }\n\n    _this3 = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n    _this3.state = {\n      separatorProps: {\n        highlighted: false,\n        leadingItem: _this3.props.item,\n        leadingSection: _this3.props.leadingSection,\n        section: _this3.props.section,\n        trailingItem: _this3.props.trailingItem,\n        trailingSection: _this3.props.trailingSection\n      },\n      leadingSeparatorProps: {\n        highlighted: false,\n        leadingItem: _this3.props.leadingItem,\n        leadingSection: _this3.props.leadingSection,\n        section: _this3.props.section,\n        trailingItem: _this3.props.item,\n        trailingSection: _this3.props.trailingSection\n      }\n    };\n    _this3._separators = {\n      highlight: function highlight() {\n        ['leading', 'trailing'].forEach(function (s) {\n          return _this3._separators.updateProps(s, {\n            highlighted: true\n          });\n        });\n      },\n      unhighlight: function unhighlight() {\n        ['leading', 'trailing'].forEach(function (s) {\n          return _this3._separators.updateProps(s, {\n            highlighted: false\n          });\n        });\n      },\n      updateProps: function updateProps(select, newProps) {\n        var _this3$props = _this3.props,\n            LeadingSeparatorComponent = _this3$props.LeadingSeparatorComponent,\n            cellKey = _this3$props.cellKey,\n            prevCellKey = _this3$props.prevCellKey;\n\n        if (select === 'leading' && LeadingSeparatorComponent != null) {\n          _this3.setState(function (state) {\n            return {\n              leadingSeparatorProps: _objectSpread(_objectSpread({}, state.leadingSeparatorProps), newProps)\n            };\n          });\n        } else {\n          _this3.props.onUpdateSeparator(select === 'leading' && prevCellKey || cellKey, newProps);\n        }\n      }\n    };\n    return _this3;\n  }\n\n  ItemWithSeparator.getDerivedStateFromProps = function getDerivedStateFromProps(props, prevState) {\n    return {\n      separatorProps: _objectSpread(_objectSpread({}, prevState.separatorProps), {}, {\n        leadingItem: props.item,\n        leadingSection: props.leadingSection,\n        section: props.section,\n        trailingItem: props.trailingItem,\n        trailingSection: props.trailingSection\n      }),\n      leadingSeparatorProps: _objectSpread(_objectSpread({}, prevState.leadingSeparatorProps), {}, {\n        leadingItem: props.leadingItem,\n        leadingSection: props.leadingSection,\n        section: props.section,\n        trailingItem: props.item,\n        trailingSection: props.trailingSection\n      })\n    };\n  };\n\n  var _proto2 = ItemWithSeparator.prototype;\n\n  _proto2.updateSeparatorProps = function updateSeparatorProps(newProps) {\n    this.setState(function (state) {\n      return {\n        separatorProps: _objectSpread(_objectSpread({}, state.separatorProps), newProps)\n      };\n    });\n  };\n\n  _proto2.render = function render() {\n    var _this$props3 = this.props,\n        LeadingSeparatorComponent = _this$props3.LeadingSeparatorComponent,\n        SeparatorComponent = _this$props3.SeparatorComponent,\n        item = _this$props3.item,\n        index = _this$props3.index,\n        section = _this$props3.section,\n        inverted = _this$props3.inverted;\n    var element = this.props.renderItem({\n      item: item,\n      index: index,\n      section: section,\n      separators: this._separators\n    });\n    var leadingSeparator = LeadingSeparatorComponent != null && /*#__PURE__*/React.createElement(LeadingSeparatorComponent, this.state.leadingSeparatorProps);\n    var separator = SeparatorComponent != null && /*#__PURE__*/React.createElement(SeparatorComponent, this.state.separatorProps);\n    return leadingSeparator || separator ? /*#__PURE__*/React.createElement(View, null, inverted === false ? leadingSeparator : separator, element, inverted === false ? separator : leadingSeparator) : element;\n  };\n\n  return ItemWithSeparator;\n}(React.Component);\n\nexport default VirtualizedSectionList;"]},"metadata":{},"sourceType":"module"}