katoikia-app/web-ui/web-react/node_modules/.cache/babel-loader/2c53c3f390e21325f15e5bc59d7...

1 line
110 KiB
JSON

{"ast":null,"code":"import React, { Component } from 'react';\nimport { ObjectUtils, classNames } from 'primereact/utils';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\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 _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\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\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 ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\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 = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nvar VirtualScroller = /*#__PURE__*/function (_Component) {\n _inherits(VirtualScroller, _Component);\n\n var _super = _createSuper(VirtualScroller);\n\n function VirtualScroller(props) {\n var _this;\n\n _classCallCheck(this, VirtualScroller);\n\n _this = _super.call(this, props);\n\n var isBoth = _this.isBoth();\n\n _this.state = {\n first: isBoth ? {\n rows: 0,\n cols: 0\n } : 0,\n last: isBoth ? {\n rows: 0,\n cols: 0\n } : 0,\n numItemsInViewport: isBoth ? {\n rows: 0,\n cols: 0\n } : 0,\n numToleratedItems: props.numToleratedItems,\n loading: props.loading,\n loaderArr: []\n };\n _this.onScroll = _this.onScroll.bind(_assertThisInitialized(_this));\n _this.lastScrollPos = isBoth ? {\n top: 0,\n left: 0\n } : 0;\n return _this;\n }\n\n _createClass(VirtualScroller, [{\n key: \"scrollTo\",\n value: function scrollTo(options) {\n this.el && this.el.scrollTo(options);\n }\n }, {\n key: \"scrollToIndex\",\n value: function scrollToIndex(index) {\n var _this2 = this;\n\n var behavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'auto';\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var first = this.state.first;\n\n var _this$calculateNumIte = this.calculateNumItems(),\n numToleratedItems = _this$calculateNumIte.numToleratedItems;\n\n var itemSize = this.props.itemSize;\n var contentPos = this.getContentPosition();\n\n var calculateFirst = function calculateFirst() {\n var _index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n var _numT = arguments.length > 1 ? arguments[1] : undefined;\n\n return _index <= _numT ? 0 : _index;\n };\n\n var calculateCoord = function calculateCoord(_first, _size, _cpos) {\n return _first * _size + _cpos;\n };\n\n var scrollTo = function scrollTo() {\n var left = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return _this2.scrollTo({\n left: left,\n top: top,\n behavior: behavior\n });\n };\n\n if (isBoth) {\n var newFirst = {\n rows: calculateFirst(index[0], numToleratedItems[0]),\n cols: calculateFirst(index[1], numToleratedItems[1])\n };\n\n if (newFirst.rows !== first.rows || newFirst.cols !== first.cols) {\n scrollTo(calculateCoord(newFirst.cols, itemSize[1], contentPos.left), calculateCoord(newFirst.rows, itemSize[0], contentPos.top));\n this.setState({\n first: newFirst\n });\n }\n } else {\n var _newFirst = calculateFirst(index, numToleratedItems);\n\n if (_newFirst !== first) {\n isHorizontal ? scrollTo(calculateCoord(_newFirst, itemSize, contentPos.left), 0) : scrollTo(0, calculateCoord(_newFirst, itemSize, contentPos.top));\n this.setState({\n first: _newFirst\n });\n }\n }\n }\n }, {\n key: \"scrollInView\",\n value: function scrollInView(index, to) {\n var _this3 = this;\n\n var behavior = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'auto';\n\n if (to) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n\n var _this$getRenderedRang = this.getRenderedRange(),\n first = _this$getRenderedRang.first,\n viewport = _this$getRenderedRang.viewport;\n\n var itemSize = this.props.itemSize;\n\n var scrollTo = function scrollTo() {\n var left = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return _this3.scrollTo({\n left: left,\n top: top,\n behavior: behavior\n });\n };\n\n var isToStart = to === 'to-start';\n var isToEnd = to === 'to-end';\n\n if (isToStart) {\n if (isBoth) {\n if (viewport.first.rows - first.rows > index[0]) {\n scrollTo(viewport.first.cols * itemSize, (viewport.first.rows - 1) * itemSize);\n } else if (viewport.first.cols - first.cols > index[1]) {\n scrollTo((viewport.first.cols - 1) * itemSize, viewport.first.rows * itemSize);\n }\n } else {\n if (viewport.first - first > index) {\n var pos = (viewport.first - 1) * itemSize;\n isHorizontal ? scrollTo(pos, 0) : scrollTo(0, pos);\n }\n }\n } else if (isToEnd) {\n if (isBoth) {\n if (viewport.last.rows - first.rows <= index[0] + 1) {\n scrollTo(viewport.first.cols * itemSize, (viewport.first.rows + 1) * itemSize);\n } else if (viewport.last.cols - first.cols <= index[1] + 1) {\n scrollTo((viewport.first.cols + 1) * itemSize, viewport.first.rows * itemSize);\n }\n } else {\n if (viewport.last - first <= index + 1) {\n var _pos2 = (viewport.first + 1) * itemSize;\n\n isHorizontal ? scrollTo(_pos2, 0) : scrollTo(0, _pos2);\n }\n }\n }\n } else {\n this.scrollToIndex(index, behavior);\n }\n }\n }, {\n key: \"getRows\",\n value: function getRows() {\n return this.state.loading ? this.props.loaderDisabled ? this.state.loaderArr : [] : this.loadedItems();\n }\n }, {\n key: \"getColumns\",\n value: function getColumns() {\n if (this.props.columns) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n\n if (isBoth || isHorizontal) {\n return this.state.loading && this.props.loaderDisabled ? isBoth ? this.state.loaderArr[0] : this.state.loaderArr : this.props.columns.slice(isBoth ? this.state.first.cols : this.state.first, isBoth ? this.state.last.cols : this.state.last);\n }\n }\n\n return this.props.columns;\n }\n }, {\n key: \"getRenderedRange\",\n value: function getRenderedRange() {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var _this$state = this.state,\n first = _this$state.first,\n last = _this$state.last,\n numItemsInViewport = _this$state.numItemsInViewport;\n var itemSize = this.props.itemSize;\n\n var calculateFirstInViewport = function calculateFirstInViewport(_pos, _size) {\n return Math.floor(_pos / (_size || _pos));\n };\n\n var firstInViewport = first;\n var lastInViewport = 0;\n\n if (this.el) {\n var scrollTop = this.el.scrollTop;\n var scrollLeft = this.el.scrollLeft;\n\n if (isBoth) {\n firstInViewport = {\n rows: calculateFirstInViewport(scrollTop, itemSize[0]),\n cols: calculateFirstInViewport(scrollLeft, itemSize[1])\n };\n lastInViewport = {\n rows: firstInViewport.rows + numItemsInViewport.rows,\n cols: firstInViewport.cols + numItemsInViewport.cols\n };\n } else {\n var scrollPos = isHorizontal ? scrollLeft : scrollTop;\n firstInViewport = calculateFirstInViewport(scrollPos, itemSize);\n lastInViewport = firstInViewport + numItemsInViewport;\n }\n }\n\n return {\n first: first,\n last: last,\n viewport: {\n first: firstInViewport,\n last: lastInViewport\n }\n };\n }\n }, {\n key: \"isVertical\",\n value: function isVertical() {\n return this.props.orientation === 'vertical';\n }\n }, {\n key: \"isHorizontal\",\n value: function isHorizontal() {\n return this.props.orientation === 'horizontal';\n }\n }, {\n key: \"isBoth\",\n value: function isBoth() {\n return this.props.orientation === 'both';\n }\n }, {\n key: \"calculateNumItems\",\n value: function calculateNumItems() {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var itemSize = this.props.itemSize;\n var contentPos = this.getContentPosition();\n var contentWidth = this.el ? this.el.offsetWidth - contentPos.left : 0;\n var contentHeight = this.el ? this.el.offsetHeight - contentPos.top : 0;\n\n var calculateNumItemsInViewport = function calculateNumItemsInViewport(_contentSize, _itemSize) {\n return Math.ceil(_contentSize / (_itemSize || _contentSize));\n };\n\n var calculateNumToleratedItems = function calculateNumToleratedItems(_numItems) {\n return Math.ceil(_numItems / 2);\n };\n\n var numItemsInViewport = isBoth ? {\n rows: calculateNumItemsInViewport(contentHeight, itemSize[0]),\n cols: calculateNumItemsInViewport(contentWidth, itemSize[1])\n } : calculateNumItemsInViewport(isHorizontal ? contentWidth : contentHeight, itemSize);\n var numToleratedItems = this.state.numToleratedItems || (isBoth ? [calculateNumToleratedItems(numItemsInViewport.rows), calculateNumToleratedItems(numItemsInViewport.cols)] : calculateNumToleratedItems(numItemsInViewport));\n return {\n numItemsInViewport: numItemsInViewport,\n numToleratedItems: numToleratedItems\n };\n }\n }, {\n key: \"calculateOptions\",\n value: function calculateOptions() {\n var _this4 = this;\n\n var isBoth = this.isBoth();\n var first = this.state.first;\n\n var _this$calculateNumIte2 = this.calculateNumItems(),\n numItemsInViewport = _this$calculateNumIte2.numItemsInViewport,\n numToleratedItems = _this$calculateNumIte2.numToleratedItems;\n\n var calculateLast = function calculateLast(_first, _num, _numT, _isCols) {\n return _this4.getLast(_first + _num + (_first < _numT ? 2 : 3) * _numT, _isCols);\n };\n\n var last = isBoth ? {\n rows: calculateLast(first.rows, numItemsInViewport.rows, numToleratedItems[0]),\n cols: calculateLast(first.cols, numItemsInViewport.cols, numToleratedItems[1], true)\n } : calculateLast(first, numItemsInViewport, numToleratedItems);\n var state = {\n numItemsInViewport: numItemsInViewport,\n last: last,\n numToleratedItems: numToleratedItems\n };\n\n if (this.props.showLoader) {\n state['loaderArr'] = isBoth ? Array.from({\n length: numItemsInViewport.rows\n }).map(function () {\n return Array.from({\n length: numItemsInViewport.cols\n });\n }) : Array.from({\n length: numItemsInViewport\n });\n }\n\n this.setState(state, function () {\n if (_this4.props.lazy) {\n _this4.props.onLazyLoad && _this4.props.onLazyLoad({\n first: _this4.state.first,\n last: _this4.state.last\n });\n }\n });\n }\n }, {\n key: \"getLast\",\n value: function getLast() {\n var last = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var isCols = arguments.length > 1 ? arguments[1] : undefined;\n\n if (this.props.items) {\n return Math.min(isCols ? (this.props.columns || this.props.items[0]).length : this.props.items.length, last);\n }\n\n return 0;\n }\n }, {\n key: \"getContentPosition\",\n value: function getContentPosition() {\n if (this.content) {\n var style = getComputedStyle(this.content);\n var left = parseInt(style.paddingLeft, 10) + Math.max(parseInt(style.left, 10), 0);\n var right = parseInt(style.paddingRight, 10) + Math.max(parseInt(style.right, 10), 0);\n var top = parseInt(style.paddingTop, 10) + Math.max(parseInt(style.top, 10), 0);\n var bottom = parseInt(style.paddingBottom, 10) + Math.max(parseInt(style.bottom, 10), 0);\n return {\n left: left,\n right: right,\n top: top,\n bottom: bottom,\n x: left + right,\n y: top + bottom\n };\n }\n\n return {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n x: 0,\n y: 0\n };\n }\n }, {\n key: \"setSize\",\n value: function setSize() {\n var _this5 = this;\n\n if (this.el) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var parentElement = this.el.parentElement;\n var width = this.props.scrollWidth || \"\".concat(this.el.offsetWidth || parentElement.offsetWidth, \"px\");\n var height = this.props.scrollHeight || \"\".concat(this.el.offsetHeight || parentElement.offsetHeight, \"px\");\n\n var setProp = function setProp(_name, _value) {\n return _this5.el.style[_name] = _value;\n };\n\n if (isBoth || isHorizontal) {\n setProp('height', height);\n setProp('width', width);\n } else {\n setProp('height', height);\n }\n }\n }\n }, {\n key: \"setSpacerSize\",\n value: function setSpacerSize() {\n var _this6 = this;\n\n var items = this.props.items;\n\n if (this.spacer && items) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var itemSize = this.props.itemSize;\n var contentPos = this.getContentPosition();\n\n var setProp = function setProp(_name, _value, _size) {\n var _cpos = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n\n return _this6.spacer.style[_name] = (_value || []).length * _size + _cpos + 'px';\n };\n\n if (isBoth) {\n setProp('height', items, itemSize[0], contentPos.y);\n setProp('width', this.props.columns || items[1], itemSize[1], contentPos.x);\n } else {\n isHorizontal ? setProp('width', this.props.columns || items, itemSize, contentPos.x) : setProp('height', items, itemSize, contentPos.y);\n }\n }\n }\n }, {\n key: \"setContentPosition\",\n value: function setContentPosition(pos) {\n var _this7 = this;\n\n if (this.content) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var first = pos ? pos.first : this.state.first;\n var itemSize = this.props.itemSize;\n\n var calculateTranslateVal = function calculateTranslateVal(_first, _size) {\n return _first * _size;\n };\n\n var setTransform = function setTransform() {\n var _x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n var _y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n _this7.sticky && (_this7.sticky.style.top = \"-\".concat(_y, \"px\"));\n _this7.content.style.transform = \"translate3d(\".concat(_x, \"px, \").concat(_y, \"px, 0)\");\n };\n\n if (isBoth) {\n setTransform(calculateTranslateVal(first.cols, itemSize[1]), calculateTranslateVal(first.rows, itemSize[0]));\n } else {\n var translateVal = calculateTranslateVal(first, itemSize);\n isHorizontal ? setTransform(translateVal, 0) : setTransform(0, translateVal);\n }\n }\n }\n }, {\n key: \"onScrollPositionChange\",\n value: function onScrollPositionChange(event) {\n var _this8 = this;\n\n var target = event.target;\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var _this$state2 = this.state,\n first = _this$state2.first,\n last = _this$state2.last,\n numItemsInViewport = _this$state2.numItemsInViewport,\n numToleratedItems = _this$state2.numToleratedItems;\n var itemSize = this.props.itemSize;\n var contentPos = this.getContentPosition();\n\n var calculateScrollPos = function calculateScrollPos(_pos, _cpos) {\n return _pos ? _pos > _cpos ? _pos - _cpos : _pos : 0;\n };\n\n var calculateCurrentIndex = function calculateCurrentIndex(_pos, _size) {\n return Math.floor(_pos / (_size || _pos));\n };\n\n var calculateTriggerIndex = function calculateTriggerIndex(_currentIndex, _first, _last, _num, _numT, _isScrollDownOrRight) {\n return _currentIndex <= _numT ? _numT : _isScrollDownOrRight ? _last - _num - _numT : _first + _numT - 1;\n };\n\n var calculateFirst = function calculateFirst(_currentIndex, _triggerIndex, _first, _last, _num, _numT, _isScrollDownOrRight) {\n if (_currentIndex <= _numT) return 0;else return Math.max(0, _isScrollDownOrRight ? _currentIndex < _triggerIndex ? _first : _currentIndex - _numT : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT);\n };\n\n var calculateLast = function calculateLast(_currentIndex, _first, _last, _num, _numT, _isCols) {\n var lastValue = _first + _num + 2 * _numT;\n\n if (_currentIndex >= _numT) {\n lastValue += _numT + 1;\n }\n\n return _this8.getLast(lastValue, _isCols);\n };\n\n var scrollTop = calculateScrollPos(target.scrollTop, contentPos.top);\n var scrollLeft = calculateScrollPos(target.scrollLeft, contentPos.left);\n var newFirst = 0;\n var newLast = last;\n var isRangeChanged = false;\n\n if (isBoth) {\n var isScrollDown = this.lastScrollPos.top <= scrollTop;\n var isScrollRight = this.lastScrollPos.left <= scrollLeft;\n var currentIndex = {\n rows: calculateCurrentIndex(scrollTop, itemSize[0]),\n cols: calculateCurrentIndex(scrollLeft, itemSize[1])\n };\n var triggerIndex = {\n rows: calculateTriggerIndex(currentIndex.rows, first.rows, last.rows, numItemsInViewport.rows, numToleratedItems[0], isScrollDown),\n cols: calculateTriggerIndex(currentIndex.cols, first.cols, last.cols, numItemsInViewport.cols, numToleratedItems[1], isScrollRight)\n };\n newFirst = {\n rows: calculateFirst(currentIndex.rows, triggerIndex.rows, first.rows, last.rows, numItemsInViewport.rows, numToleratedItems[0], isScrollDown),\n cols: calculateFirst(currentIndex.cols, triggerIndex.cols, first.cols, last.cols, numItemsInViewport.cols, numToleratedItems[1], isScrollRight)\n };\n newLast = {\n rows: calculateLast(currentIndex.rows, newFirst.rows, last.rows, numItemsInViewport.rows, numToleratedItems[0]),\n cols: calculateLast(currentIndex.cols, newFirst.cols, last.cols, numItemsInViewport.cols, numToleratedItems[1], true)\n };\n isRangeChanged = newFirst.rows !== first.rows && newLast.rows !== last.rows || newFirst.cols !== first.cols && newLast.cols !== last.cols;\n this.lastScrollPos = {\n top: scrollTop,\n left: scrollLeft\n };\n } else {\n var scrollPos = isHorizontal ? scrollLeft : scrollTop;\n var isScrollDownOrRight = this.lastScrollPos <= scrollPos;\n\n var _currentIndex2 = calculateCurrentIndex(scrollPos, itemSize);\n\n var _triggerIndex2 = calculateTriggerIndex(_currentIndex2, first, last, numItemsInViewport, numToleratedItems, isScrollDownOrRight);\n\n newFirst = calculateFirst(_currentIndex2, _triggerIndex2, first, last, numItemsInViewport, numToleratedItems, isScrollDownOrRight);\n newLast = calculateLast(_currentIndex2, newFirst, last, numItemsInViewport, numToleratedItems);\n isRangeChanged = newFirst !== first && newLast !== last;\n this.lastScrollPos = scrollPos;\n }\n\n return {\n first: newFirst,\n last: newLast,\n isRangeChanged: isRangeChanged\n };\n }\n }, {\n key: \"onScrollChange\",\n value: function onScrollChange(event) {\n var _this9 = this;\n\n var _this$onScrollPositio = this.onScrollPositionChange(event),\n first = _this$onScrollPositio.first,\n last = _this$onScrollPositio.last,\n isRangeChanged = _this$onScrollPositio.isRangeChanged;\n\n if (isRangeChanged) {\n var newState = {\n first: first,\n last: last\n };\n this.setContentPosition(newState);\n this.setState(newState, function () {\n _this9.props.onScrollIndexChange && _this9.props.onScrollIndexChange(newState);\n\n if (_this9.props.lazy) {\n _this9.props.onLazyLoad && _this9.props.onLazyLoad(newState);\n }\n });\n }\n }\n }, {\n key: \"onScroll\",\n value: function onScroll(event) {\n var _this10 = this;\n\n this.props.onScroll && this.props.onScroll(event);\n\n if (this.props.delay) {\n if (this.scrollTimeout) {\n clearTimeout(this.scrollTimeout);\n }\n\n if (!this.state.loading && this.props.showLoader) {\n var _this$onScrollPositio2 = this.onScrollPositionChange(event),\n changed = _this$onScrollPositio2.isRangeChanged;\n\n changed && this.setState({\n loading: true\n });\n }\n\n this.scrollTimeout = setTimeout(function () {\n _this10.onScrollChange(event);\n\n if (_this10.state.loading && _this10.props.showLoader && !_this10.props.lazy) {\n _this10.setState({\n loading: false\n });\n }\n }, this.props.delay);\n } else {\n this.onScrollChange(event);\n }\n }\n }, {\n key: \"getOptions\",\n value: function getOptions(renderedIndex) {\n var first = this.state.first;\n var count = (this.props.items || []).length;\n var index = this.isBoth() ? first.rows + renderedIndex : first + renderedIndex;\n return {\n index: index,\n count: count,\n first: index === 0,\n last: index === count - 1,\n even: index % 2 === 0,\n odd: index % 2 !== 0,\n props: this.props\n };\n }\n }, {\n key: \"loaderOptions\",\n value: function loaderOptions(index, extOptions) {\n var count = this.state.loaderArr.length;\n return _objectSpread({\n index: index,\n count: count,\n first: index === 0,\n last: index === count - 1,\n even: index % 2 === 0,\n odd: index % 2 !== 0,\n props: this.props\n }, extOptions);\n }\n }, {\n key: \"loadedItems\",\n value: function loadedItems() {\n var _this11 = this;\n\n var items = this.props.items;\n\n if (items && !this.state.loading) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var _this$state3 = this.state,\n first = _this$state3.first,\n last = _this$state3.last;\n if (isBoth) return items.slice(first.rows, last.rows).map(function (item) {\n return _this11.props.columns ? item : item.slice(first.cols, last.cols);\n });else if (isHorizontal && this.props.columns) return items;else return items.slice(first, last);\n }\n\n return [];\n }\n }, {\n key: \"isPropChanged\",\n value: function isPropChanged(prevProps) {\n var _this12 = this;\n\n var props = ['itemSize', 'scrollHeight'];\n return props.some(function (p) {\n return !ObjectUtils.equals(prevProps[p], _this12.props[p]);\n });\n }\n }, {\n key: \"init\",\n value: function init() {\n this.setSize();\n this.calculateOptions();\n this.setSpacerSize();\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.init();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n if (!prevProps.items || prevProps.items.length !== (this.props.items || []).length || this.isPropChanged(prevProps)) {\n this.init();\n }\n\n if (this.props.lazy && prevProps.loading !== this.props.loading && this.state.loading !== this.props.loading) {\n this.setState({\n loading: this.props.loading\n });\n }\n\n if (prevProps.orientation !== this.props.orientation) {\n this.lastScrollPos = this.isBoth() ? {\n top: 0,\n left: 0\n } : 0;\n }\n }\n }, {\n key: \"renderLoaderItem\",\n value: function renderLoaderItem(index) {\n var extOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var options = this.loaderOptions(index, extOptions);\n var content = ObjectUtils.getJSXElement(this.props.loadingTemplate, options);\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: index\n }, content);\n }\n }, {\n key: \"renderLoader\",\n value: function renderLoader() {\n var _this13 = this;\n\n if (!this.props.loaderDisabled && this.props.showLoader && this.state.loading) {\n var className = classNames('p-virtualscroller-loader', {\n 'p-component-overlay': !this.props.loadingTemplate\n });\n var content = /*#__PURE__*/React.createElement(\"i\", {\n className: \"p-virtualscroller-loading-icon pi pi-spinner pi-spin\"\n });\n\n if (this.props.loadingTemplate) {\n var isBoth = this.isBoth();\n var numItemsInViewport = this.state.numItemsInViewport;\n content = this.state.loaderArr.map(function (_, index) {\n return _this13.renderLoaderItem(index, isBoth && {\n numCols: numItemsInViewport.cols\n });\n });\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className\n }, content);\n }\n\n return null;\n }\n }, {\n key: \"renderSpacer\",\n value: function renderSpacer() {\n var _this14 = this;\n\n if (this.props.showSpacer) {\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this14.spacer = el;\n },\n className: \"p-virtualscroller-spacer\"\n });\n }\n\n return null;\n }\n }, {\n key: \"renderItem\",\n value: function renderItem(item, index) {\n var options = this.getOptions(index);\n var content = ObjectUtils.getJSXElement(this.props.itemTemplate, item, options);\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: options.index\n }, content);\n }\n }, {\n key: \"renderItems\",\n value: function renderItems(loadedItems) {\n var _this15 = this;\n\n return loadedItems.map(function (item, index) {\n return _this15.renderItem(item, index);\n });\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this16 = this;\n\n var loadedItems = this.loadedItems();\n var items = this.renderItems(loadedItems);\n var className = classNames('p-virtualscroller-content', {\n 'p-virtualscroller-loading': this.state.loading\n });\n var content = /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n ref: function ref(el) {\n return _this16.content = el;\n }\n }, items);\n\n if (this.props.contentTemplate) {\n var defaultOptions = {\n className: className,\n contentRef: function contentRef(el) {\n return _this16.content = el;\n },\n spacerRef: function spacerRef(el) {\n return _this16.spacer = el;\n },\n stickyRef: function stickyRef(el) {\n return _this16.sticky = el;\n },\n items: loadedItems,\n getItemOptions: function getItemOptions(index) {\n return _this16.getOptions(index);\n },\n children: items,\n element: content,\n props: this.props,\n loading: this.state.loading,\n getLoaderOptions: function getLoaderOptions(index, ext) {\n return _this16.loaderOptions(index, ext);\n },\n loadingTemplate: this.props.loadingTemplate,\n itemSize: this.props.itemSize,\n rows: this.getRows(),\n columns: this.getColumns(),\n vertical: this.isVertical(),\n horizontal: this.isHorizontal(),\n both: this.isBoth()\n };\n return ObjectUtils.getJSXElement(this.props.contentTemplate, defaultOptions);\n }\n\n return content;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this17 = this;\n\n if (this.props.disabled) {\n var content = ObjectUtils.getJSXElement(this.props.contentTemplate, {\n items: this.props.items,\n rows: this.props.items,\n columns: this.props.columns\n });\n return /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children, content);\n } else {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var className = classNames('p-virtualscroller', {\n 'p-both-scroll': isBoth,\n 'p-horizontal-scroll': isHorizontal\n }, this.props.className);\n var loader = this.renderLoader();\n\n var _content = this.renderContent();\n\n var spacer = this.renderSpacer();\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this17.el = el;\n },\n className: className,\n tabIndex: 0,\n style: this.props.style,\n onScroll: this.onScroll\n }, _content, spacer, loader);\n }\n }\n }]);\n\n return VirtualScroller;\n}(Component);\n\n_defineProperty(VirtualScroller, \"defaultProps\", {\n id: null,\n style: null,\n className: null,\n items: null,\n itemSize: 0,\n scrollHeight: null,\n scrollWidth: null,\n orientation: 'vertical',\n numToleratedItems: null,\n delay: 0,\n lazy: false,\n disabled: false,\n loaderDisabled: false,\n columns: null,\n loading: false,\n showSpacer: true,\n showLoader: false,\n loadingTemplate: null,\n itemTemplate: null,\n contentTemplate: null,\n onScroll: null,\n onScrollIndexChange: null,\n onLazyLoad: null\n});\n\nexport { VirtualScroller };","map":{"version":3,"names":["React","Component","ObjectUtils","classNames","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","_createClass","protoProps","staticProps","prototype","_assertThisInitialized","self","ReferenceError","_setPrototypeOf","o","p","setPrototypeOf","__proto__","_inherits","subClass","superClass","create","constructor","value","_typeof","obj","Symbol","iterator","_possibleConstructorReturn","call","_getPrototypeOf","getPrototypeOf","_defineProperty","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","push","apply","_objectSpread","arguments","source","forEach","getOwnPropertyDescriptors","defineProperties","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","result","NewTarget","Reflect","construct","sham","Proxy","Boolean","valueOf","e","VirtualScroller","_Component","_super","_this","isBoth","state","first","rows","cols","last","numItemsInViewport","numToleratedItems","loading","loaderArr","onScroll","bind","lastScrollPos","top","left","scrollTo","options","el","scrollToIndex","index","_this2","behavior","undefined","isHorizontal","_this$calculateNumIte","calculateNumItems","itemSize","contentPos","getContentPosition","calculateFirst","_index","_numT","calculateCoord","_first","_size","_cpos","newFirst","setState","_newFirst","scrollInView","to","_this3","_this$getRenderedRang","getRenderedRange","viewport","isToStart","isToEnd","pos","_pos2","getRows","loaderDisabled","loadedItems","getColumns","columns","slice","_this$state","calculateFirstInViewport","_pos","Math","floor","firstInViewport","lastInViewport","scrollTop","scrollLeft","scrollPos","isVertical","orientation","contentWidth","offsetWidth","contentHeight","offsetHeight","calculateNumItemsInViewport","_contentSize","_itemSize","ceil","calculateNumToleratedItems","_numItems","calculateOptions","_this4","_this$calculateNumIte2","calculateLast","_num","_isCols","getLast","showLoader","Array","from","map","lazy","onLazyLoad","isCols","items","min","content","style","getComputedStyle","parseInt","paddingLeft","max","right","paddingRight","paddingTop","bottom","paddingBottom","x","y","setSize","_this5","parentElement","width","scrollWidth","concat","height","scrollHeight","setProp","_name","_value","setSpacerSize","_this6","spacer","setContentPosition","_this7","calculateTranslateVal","setTransform","_x","_y","sticky","transform","translateVal","onScrollPositionChange","event","_this8","_this$state2","calculateScrollPos","calculateCurrentIndex","calculateTriggerIndex","_currentIndex","_last","_isScrollDownOrRight","_triggerIndex","lastValue","newLast","isRangeChanged","isScrollDown","isScrollRight","currentIndex","triggerIndex","isScrollDownOrRight","_currentIndex2","_triggerIndex2","onScrollChange","_this9","_this$onScrollPositio","newState","onScrollIndexChange","_this10","delay","scrollTimeout","clearTimeout","_this$onScrollPositio2","changed","setTimeout","getOptions","renderedIndex","count","even","odd","loaderOptions","extOptions","_this11","_this$state3","item","isPropChanged","prevProps","_this12","some","equals","init","componentDidMount","componentDidUpdate","prevState","renderLoaderItem","getJSXElement","loadingTemplate","createElement","Fragment","renderLoader","_this13","className","_","numCols","renderSpacer","_this14","showSpacer","ref","renderItem","itemTemplate","renderItems","_this15","renderContent","_this16","contentTemplate","defaultOptions","contentRef","spacerRef","stickyRef","getItemOptions","children","element","getLoaderOptions","ext","vertical","horizontal","both","render","_this17","disabled","loader","_content","tabIndex","id"],"sources":["/Users/paolasanchez/Desktop/Pry4/Katoikia/katoikia-app/web-ui/sakai-react/node_modules/primereact/virtualscroller/virtualscroller.esm.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { ObjectUtils, classNames } from 'primereact/utils';\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\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 _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\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n Object.defineProperty(subClass, \"prototype\", {\n writable: false\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n } else if (call !== void 0) {\n throw new TypeError(\"Derived constructors may only return object or undefined\");\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); 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 = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nvar VirtualScroller = /*#__PURE__*/function (_Component) {\n _inherits(VirtualScroller, _Component);\n\n var _super = _createSuper(VirtualScroller);\n\n function VirtualScroller(props) {\n var _this;\n\n _classCallCheck(this, VirtualScroller);\n\n _this = _super.call(this, props);\n\n var isBoth = _this.isBoth();\n\n _this.state = {\n first: isBoth ? {\n rows: 0,\n cols: 0\n } : 0,\n last: isBoth ? {\n rows: 0,\n cols: 0\n } : 0,\n numItemsInViewport: isBoth ? {\n rows: 0,\n cols: 0\n } : 0,\n numToleratedItems: props.numToleratedItems,\n loading: props.loading,\n loaderArr: []\n };\n _this.onScroll = _this.onScroll.bind(_assertThisInitialized(_this));\n _this.lastScrollPos = isBoth ? {\n top: 0,\n left: 0\n } : 0;\n return _this;\n }\n\n _createClass(VirtualScroller, [{\n key: \"scrollTo\",\n value: function scrollTo(options) {\n this.el && this.el.scrollTo(options);\n }\n }, {\n key: \"scrollToIndex\",\n value: function scrollToIndex(index) {\n var _this2 = this;\n\n var behavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'auto';\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var first = this.state.first;\n\n var _this$calculateNumIte = this.calculateNumItems(),\n numToleratedItems = _this$calculateNumIte.numToleratedItems;\n\n var itemSize = this.props.itemSize;\n var contentPos = this.getContentPosition();\n\n var calculateFirst = function calculateFirst() {\n var _index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n var _numT = arguments.length > 1 ? arguments[1] : undefined;\n\n return _index <= _numT ? 0 : _index;\n };\n\n var calculateCoord = function calculateCoord(_first, _size, _cpos) {\n return _first * _size + _cpos;\n };\n\n var scrollTo = function scrollTo() {\n var left = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return _this2.scrollTo({\n left: left,\n top: top,\n behavior: behavior\n });\n };\n\n if (isBoth) {\n var newFirst = {\n rows: calculateFirst(index[0], numToleratedItems[0]),\n cols: calculateFirst(index[1], numToleratedItems[1])\n };\n\n if (newFirst.rows !== first.rows || newFirst.cols !== first.cols) {\n scrollTo(calculateCoord(newFirst.cols, itemSize[1], contentPos.left), calculateCoord(newFirst.rows, itemSize[0], contentPos.top));\n this.setState({\n first: newFirst\n });\n }\n } else {\n var _newFirst = calculateFirst(index, numToleratedItems);\n\n if (_newFirst !== first) {\n isHorizontal ? scrollTo(calculateCoord(_newFirst, itemSize, contentPos.left), 0) : scrollTo(0, calculateCoord(_newFirst, itemSize, contentPos.top));\n this.setState({\n first: _newFirst\n });\n }\n }\n }\n }, {\n key: \"scrollInView\",\n value: function scrollInView(index, to) {\n var _this3 = this;\n\n var behavior = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'auto';\n\n if (to) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n\n var _this$getRenderedRang = this.getRenderedRange(),\n first = _this$getRenderedRang.first,\n viewport = _this$getRenderedRang.viewport;\n\n var itemSize = this.props.itemSize;\n\n var scrollTo = function scrollTo() {\n var left = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return _this3.scrollTo({\n left: left,\n top: top,\n behavior: behavior\n });\n };\n\n var isToStart = to === 'to-start';\n var isToEnd = to === 'to-end';\n\n if (isToStart) {\n if (isBoth) {\n if (viewport.first.rows - first.rows > index[0]) {\n scrollTo(viewport.first.cols * itemSize, (viewport.first.rows - 1) * itemSize);\n } else if (viewport.first.cols - first.cols > index[1]) {\n scrollTo((viewport.first.cols - 1) * itemSize, viewport.first.rows * itemSize);\n }\n } else {\n if (viewport.first - first > index) {\n var pos = (viewport.first - 1) * itemSize;\n isHorizontal ? scrollTo(pos, 0) : scrollTo(0, pos);\n }\n }\n } else if (isToEnd) {\n if (isBoth) {\n if (viewport.last.rows - first.rows <= index[0] + 1) {\n scrollTo(viewport.first.cols * itemSize, (viewport.first.rows + 1) * itemSize);\n } else if (viewport.last.cols - first.cols <= index[1] + 1) {\n scrollTo((viewport.first.cols + 1) * itemSize, viewport.first.rows * itemSize);\n }\n } else {\n if (viewport.last - first <= index + 1) {\n var _pos2 = (viewport.first + 1) * itemSize;\n\n isHorizontal ? scrollTo(_pos2, 0) : scrollTo(0, _pos2);\n }\n }\n }\n } else {\n this.scrollToIndex(index, behavior);\n }\n }\n }, {\n key: \"getRows\",\n value: function getRows() {\n return this.state.loading ? this.props.loaderDisabled ? this.state.loaderArr : [] : this.loadedItems();\n }\n }, {\n key: \"getColumns\",\n value: function getColumns() {\n if (this.props.columns) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n\n if (isBoth || isHorizontal) {\n return this.state.loading && this.props.loaderDisabled ? isBoth ? this.state.loaderArr[0] : this.state.loaderArr : this.props.columns.slice(isBoth ? this.state.first.cols : this.state.first, isBoth ? this.state.last.cols : this.state.last);\n }\n }\n\n return this.props.columns;\n }\n }, {\n key: \"getRenderedRange\",\n value: function getRenderedRange() {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var _this$state = this.state,\n first = _this$state.first,\n last = _this$state.last,\n numItemsInViewport = _this$state.numItemsInViewport;\n var itemSize = this.props.itemSize;\n\n var calculateFirstInViewport = function calculateFirstInViewport(_pos, _size) {\n return Math.floor(_pos / (_size || _pos));\n };\n\n var firstInViewport = first;\n var lastInViewport = 0;\n\n if (this.el) {\n var scrollTop = this.el.scrollTop;\n var scrollLeft = this.el.scrollLeft;\n\n if (isBoth) {\n firstInViewport = {\n rows: calculateFirstInViewport(scrollTop, itemSize[0]),\n cols: calculateFirstInViewport(scrollLeft, itemSize[1])\n };\n lastInViewport = {\n rows: firstInViewport.rows + numItemsInViewport.rows,\n cols: firstInViewport.cols + numItemsInViewport.cols\n };\n } else {\n var scrollPos = isHorizontal ? scrollLeft : scrollTop;\n firstInViewport = calculateFirstInViewport(scrollPos, itemSize);\n lastInViewport = firstInViewport + numItemsInViewport;\n }\n }\n\n return {\n first: first,\n last: last,\n viewport: {\n first: firstInViewport,\n last: lastInViewport\n }\n };\n }\n }, {\n key: \"isVertical\",\n value: function isVertical() {\n return this.props.orientation === 'vertical';\n }\n }, {\n key: \"isHorizontal\",\n value: function isHorizontal() {\n return this.props.orientation === 'horizontal';\n }\n }, {\n key: \"isBoth\",\n value: function isBoth() {\n return this.props.orientation === 'both';\n }\n }, {\n key: \"calculateNumItems\",\n value: function calculateNumItems() {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var itemSize = this.props.itemSize;\n var contentPos = this.getContentPosition();\n var contentWidth = this.el ? this.el.offsetWidth - contentPos.left : 0;\n var contentHeight = this.el ? this.el.offsetHeight - contentPos.top : 0;\n\n var calculateNumItemsInViewport = function calculateNumItemsInViewport(_contentSize, _itemSize) {\n return Math.ceil(_contentSize / (_itemSize || _contentSize));\n };\n\n var calculateNumToleratedItems = function calculateNumToleratedItems(_numItems) {\n return Math.ceil(_numItems / 2);\n };\n\n var numItemsInViewport = isBoth ? {\n rows: calculateNumItemsInViewport(contentHeight, itemSize[0]),\n cols: calculateNumItemsInViewport(contentWidth, itemSize[1])\n } : calculateNumItemsInViewport(isHorizontal ? contentWidth : contentHeight, itemSize);\n var numToleratedItems = this.state.numToleratedItems || (isBoth ? [calculateNumToleratedItems(numItemsInViewport.rows), calculateNumToleratedItems(numItemsInViewport.cols)] : calculateNumToleratedItems(numItemsInViewport));\n return {\n numItemsInViewport: numItemsInViewport,\n numToleratedItems: numToleratedItems\n };\n }\n }, {\n key: \"calculateOptions\",\n value: function calculateOptions() {\n var _this4 = this;\n\n var isBoth = this.isBoth();\n var first = this.state.first;\n\n var _this$calculateNumIte2 = this.calculateNumItems(),\n numItemsInViewport = _this$calculateNumIte2.numItemsInViewport,\n numToleratedItems = _this$calculateNumIte2.numToleratedItems;\n\n var calculateLast = function calculateLast(_first, _num, _numT, _isCols) {\n return _this4.getLast(_first + _num + (_first < _numT ? 2 : 3) * _numT, _isCols);\n };\n\n var last = isBoth ? {\n rows: calculateLast(first.rows, numItemsInViewport.rows, numToleratedItems[0]),\n cols: calculateLast(first.cols, numItemsInViewport.cols, numToleratedItems[1], true)\n } : calculateLast(first, numItemsInViewport, numToleratedItems);\n var state = {\n numItemsInViewport: numItemsInViewport,\n last: last,\n numToleratedItems: numToleratedItems\n };\n\n if (this.props.showLoader) {\n state['loaderArr'] = isBoth ? Array.from({\n length: numItemsInViewport.rows\n }).map(function () {\n return Array.from({\n length: numItemsInViewport.cols\n });\n }) : Array.from({\n length: numItemsInViewport\n });\n }\n\n this.setState(state, function () {\n if (_this4.props.lazy) {\n _this4.props.onLazyLoad && _this4.props.onLazyLoad({\n first: _this4.state.first,\n last: _this4.state.last\n });\n }\n });\n }\n }, {\n key: \"getLast\",\n value: function getLast() {\n var last = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var isCols = arguments.length > 1 ? arguments[1] : undefined;\n\n if (this.props.items) {\n return Math.min(isCols ? (this.props.columns || this.props.items[0]).length : this.props.items.length, last);\n }\n\n return 0;\n }\n }, {\n key: \"getContentPosition\",\n value: function getContentPosition() {\n if (this.content) {\n var style = getComputedStyle(this.content);\n var left = parseInt(style.paddingLeft, 10) + Math.max(parseInt(style.left, 10), 0);\n var right = parseInt(style.paddingRight, 10) + Math.max(parseInt(style.right, 10), 0);\n var top = parseInt(style.paddingTop, 10) + Math.max(parseInt(style.top, 10), 0);\n var bottom = parseInt(style.paddingBottom, 10) + Math.max(parseInt(style.bottom, 10), 0);\n return {\n left: left,\n right: right,\n top: top,\n bottom: bottom,\n x: left + right,\n y: top + bottom\n };\n }\n\n return {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0,\n x: 0,\n y: 0\n };\n }\n }, {\n key: \"setSize\",\n value: function setSize() {\n var _this5 = this;\n\n if (this.el) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var parentElement = this.el.parentElement;\n var width = this.props.scrollWidth || \"\".concat(this.el.offsetWidth || parentElement.offsetWidth, \"px\");\n var height = this.props.scrollHeight || \"\".concat(this.el.offsetHeight || parentElement.offsetHeight, \"px\");\n\n var setProp = function setProp(_name, _value) {\n return _this5.el.style[_name] = _value;\n };\n\n if (isBoth || isHorizontal) {\n setProp('height', height);\n setProp('width', width);\n } else {\n setProp('height', height);\n }\n }\n }\n }, {\n key: \"setSpacerSize\",\n value: function setSpacerSize() {\n var _this6 = this;\n\n var items = this.props.items;\n\n if (this.spacer && items) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var itemSize = this.props.itemSize;\n var contentPos = this.getContentPosition();\n\n var setProp = function setProp(_name, _value, _size) {\n var _cpos = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n\n return _this6.spacer.style[_name] = (_value || []).length * _size + _cpos + 'px';\n };\n\n if (isBoth) {\n setProp('height', items, itemSize[0], contentPos.y);\n setProp('width', this.props.columns || items[1], itemSize[1], contentPos.x);\n } else {\n isHorizontal ? setProp('width', this.props.columns || items, itemSize, contentPos.x) : setProp('height', items, itemSize, contentPos.y);\n }\n }\n }\n }, {\n key: \"setContentPosition\",\n value: function setContentPosition(pos) {\n var _this7 = this;\n\n if (this.content) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var first = pos ? pos.first : this.state.first;\n var itemSize = this.props.itemSize;\n\n var calculateTranslateVal = function calculateTranslateVal(_first, _size) {\n return _first * _size;\n };\n\n var setTransform = function setTransform() {\n var _x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n\n var _y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n _this7.sticky && (_this7.sticky.style.top = \"-\".concat(_y, \"px\"));\n _this7.content.style.transform = \"translate3d(\".concat(_x, \"px, \").concat(_y, \"px, 0)\");\n };\n\n if (isBoth) {\n setTransform(calculateTranslateVal(first.cols, itemSize[1]), calculateTranslateVal(first.rows, itemSize[0]));\n } else {\n var translateVal = calculateTranslateVal(first, itemSize);\n isHorizontal ? setTransform(translateVal, 0) : setTransform(0, translateVal);\n }\n }\n }\n }, {\n key: \"onScrollPositionChange\",\n value: function onScrollPositionChange(event) {\n var _this8 = this;\n\n var target = event.target;\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var _this$state2 = this.state,\n first = _this$state2.first,\n last = _this$state2.last,\n numItemsInViewport = _this$state2.numItemsInViewport,\n numToleratedItems = _this$state2.numToleratedItems;\n var itemSize = this.props.itemSize;\n var contentPos = this.getContentPosition();\n\n var calculateScrollPos = function calculateScrollPos(_pos, _cpos) {\n return _pos ? _pos > _cpos ? _pos - _cpos : _pos : 0;\n };\n\n var calculateCurrentIndex = function calculateCurrentIndex(_pos, _size) {\n return Math.floor(_pos / (_size || _pos));\n };\n\n var calculateTriggerIndex = function calculateTriggerIndex(_currentIndex, _first, _last, _num, _numT, _isScrollDownOrRight) {\n return _currentIndex <= _numT ? _numT : _isScrollDownOrRight ? _last - _num - _numT : _first + _numT - 1;\n };\n\n var calculateFirst = function calculateFirst(_currentIndex, _triggerIndex, _first, _last, _num, _numT, _isScrollDownOrRight) {\n if (_currentIndex <= _numT) return 0;else return Math.max(0, _isScrollDownOrRight ? _currentIndex < _triggerIndex ? _first : _currentIndex - _numT : _currentIndex > _triggerIndex ? _first : _currentIndex - 2 * _numT);\n };\n\n var calculateLast = function calculateLast(_currentIndex, _first, _last, _num, _numT, _isCols) {\n var lastValue = _first + _num + 2 * _numT;\n\n if (_currentIndex >= _numT) {\n lastValue += _numT + 1;\n }\n\n return _this8.getLast(lastValue, _isCols);\n };\n\n var scrollTop = calculateScrollPos(target.scrollTop, contentPos.top);\n var scrollLeft = calculateScrollPos(target.scrollLeft, contentPos.left);\n var newFirst = 0;\n var newLast = last;\n var isRangeChanged = false;\n\n if (isBoth) {\n var isScrollDown = this.lastScrollPos.top <= scrollTop;\n var isScrollRight = this.lastScrollPos.left <= scrollLeft;\n var currentIndex = {\n rows: calculateCurrentIndex(scrollTop, itemSize[0]),\n cols: calculateCurrentIndex(scrollLeft, itemSize[1])\n };\n var triggerIndex = {\n rows: calculateTriggerIndex(currentIndex.rows, first.rows, last.rows, numItemsInViewport.rows, numToleratedItems[0], isScrollDown),\n cols: calculateTriggerIndex(currentIndex.cols, first.cols, last.cols, numItemsInViewport.cols, numToleratedItems[1], isScrollRight)\n };\n newFirst = {\n rows: calculateFirst(currentIndex.rows, triggerIndex.rows, first.rows, last.rows, numItemsInViewport.rows, numToleratedItems[0], isScrollDown),\n cols: calculateFirst(currentIndex.cols, triggerIndex.cols, first.cols, last.cols, numItemsInViewport.cols, numToleratedItems[1], isScrollRight)\n };\n newLast = {\n rows: calculateLast(currentIndex.rows, newFirst.rows, last.rows, numItemsInViewport.rows, numToleratedItems[0]),\n cols: calculateLast(currentIndex.cols, newFirst.cols, last.cols, numItemsInViewport.cols, numToleratedItems[1], true)\n };\n isRangeChanged = newFirst.rows !== first.rows && newLast.rows !== last.rows || newFirst.cols !== first.cols && newLast.cols !== last.cols;\n this.lastScrollPos = {\n top: scrollTop,\n left: scrollLeft\n };\n } else {\n var scrollPos = isHorizontal ? scrollLeft : scrollTop;\n var isScrollDownOrRight = this.lastScrollPos <= scrollPos;\n\n var _currentIndex2 = calculateCurrentIndex(scrollPos, itemSize);\n\n var _triggerIndex2 = calculateTriggerIndex(_currentIndex2, first, last, numItemsInViewport, numToleratedItems, isScrollDownOrRight);\n\n newFirst = calculateFirst(_currentIndex2, _triggerIndex2, first, last, numItemsInViewport, numToleratedItems, isScrollDownOrRight);\n newLast = calculateLast(_currentIndex2, newFirst, last, numItemsInViewport, numToleratedItems);\n isRangeChanged = newFirst !== first && newLast !== last;\n this.lastScrollPos = scrollPos;\n }\n\n return {\n first: newFirst,\n last: newLast,\n isRangeChanged: isRangeChanged\n };\n }\n }, {\n key: \"onScrollChange\",\n value: function onScrollChange(event) {\n var _this9 = this;\n\n var _this$onScrollPositio = this.onScrollPositionChange(event),\n first = _this$onScrollPositio.first,\n last = _this$onScrollPositio.last,\n isRangeChanged = _this$onScrollPositio.isRangeChanged;\n\n if (isRangeChanged) {\n var newState = {\n first: first,\n last: last\n };\n this.setContentPosition(newState);\n this.setState(newState, function () {\n _this9.props.onScrollIndexChange && _this9.props.onScrollIndexChange(newState);\n\n if (_this9.props.lazy) {\n _this9.props.onLazyLoad && _this9.props.onLazyLoad(newState);\n }\n });\n }\n }\n }, {\n key: \"onScroll\",\n value: function onScroll(event) {\n var _this10 = this;\n\n this.props.onScroll && this.props.onScroll(event);\n\n if (this.props.delay) {\n if (this.scrollTimeout) {\n clearTimeout(this.scrollTimeout);\n }\n\n if (!this.state.loading && this.props.showLoader) {\n var _this$onScrollPositio2 = this.onScrollPositionChange(event),\n changed = _this$onScrollPositio2.isRangeChanged;\n\n changed && this.setState({\n loading: true\n });\n }\n\n this.scrollTimeout = setTimeout(function () {\n _this10.onScrollChange(event);\n\n if (_this10.state.loading && _this10.props.showLoader && !_this10.props.lazy) {\n _this10.setState({\n loading: false\n });\n }\n }, this.props.delay);\n } else {\n this.onScrollChange(event);\n }\n }\n }, {\n key: \"getOptions\",\n value: function getOptions(renderedIndex) {\n var first = this.state.first;\n var count = (this.props.items || []).length;\n var index = this.isBoth() ? first.rows + renderedIndex : first + renderedIndex;\n return {\n index: index,\n count: count,\n first: index === 0,\n last: index === count - 1,\n even: index % 2 === 0,\n odd: index % 2 !== 0,\n props: this.props\n };\n }\n }, {\n key: \"loaderOptions\",\n value: function loaderOptions(index, extOptions) {\n var count = this.state.loaderArr.length;\n return _objectSpread({\n index: index,\n count: count,\n first: index === 0,\n last: index === count - 1,\n even: index % 2 === 0,\n odd: index % 2 !== 0,\n props: this.props\n }, extOptions);\n }\n }, {\n key: \"loadedItems\",\n value: function loadedItems() {\n var _this11 = this;\n\n var items = this.props.items;\n\n if (items && !this.state.loading) {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var _this$state3 = this.state,\n first = _this$state3.first,\n last = _this$state3.last;\n if (isBoth) return items.slice(first.rows, last.rows).map(function (item) {\n return _this11.props.columns ? item : item.slice(first.cols, last.cols);\n });else if (isHorizontal && this.props.columns) return items;else return items.slice(first, last);\n }\n\n return [];\n }\n }, {\n key: \"isPropChanged\",\n value: function isPropChanged(prevProps) {\n var _this12 = this;\n\n var props = ['itemSize', 'scrollHeight'];\n return props.some(function (p) {\n return !ObjectUtils.equals(prevProps[p], _this12.props[p]);\n });\n }\n }, {\n key: \"init\",\n value: function init() {\n this.setSize();\n this.calculateOptions();\n this.setSpacerSize();\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.init();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n if (!prevProps.items || prevProps.items.length !== (this.props.items || []).length || this.isPropChanged(prevProps)) {\n this.init();\n }\n\n if (this.props.lazy && prevProps.loading !== this.props.loading && this.state.loading !== this.props.loading) {\n this.setState({\n loading: this.props.loading\n });\n }\n\n if (prevProps.orientation !== this.props.orientation) {\n this.lastScrollPos = this.isBoth() ? {\n top: 0,\n left: 0\n } : 0;\n }\n }\n }, {\n key: \"renderLoaderItem\",\n value: function renderLoaderItem(index) {\n var extOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var options = this.loaderOptions(index, extOptions);\n var content = ObjectUtils.getJSXElement(this.props.loadingTemplate, options);\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: index\n }, content);\n }\n }, {\n key: \"renderLoader\",\n value: function renderLoader() {\n var _this13 = this;\n\n if (!this.props.loaderDisabled && this.props.showLoader && this.state.loading) {\n var className = classNames('p-virtualscroller-loader', {\n 'p-component-overlay': !this.props.loadingTemplate\n });\n var content = /*#__PURE__*/React.createElement(\"i\", {\n className: \"p-virtualscroller-loading-icon pi pi-spinner pi-spin\"\n });\n\n if (this.props.loadingTemplate) {\n var isBoth = this.isBoth();\n var numItemsInViewport = this.state.numItemsInViewport;\n content = this.state.loaderArr.map(function (_, index) {\n return _this13.renderLoaderItem(index, isBoth && {\n numCols: numItemsInViewport.cols\n });\n });\n }\n\n return /*#__PURE__*/React.createElement(\"div\", {\n className: className\n }, content);\n }\n\n return null;\n }\n }, {\n key: \"renderSpacer\",\n value: function renderSpacer() {\n var _this14 = this;\n\n if (this.props.showSpacer) {\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this14.spacer = el;\n },\n className: \"p-virtualscroller-spacer\"\n });\n }\n\n return null;\n }\n }, {\n key: \"renderItem\",\n value: function renderItem(item, index) {\n var options = this.getOptions(index);\n var content = ObjectUtils.getJSXElement(this.props.itemTemplate, item, options);\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: options.index\n }, content);\n }\n }, {\n key: \"renderItems\",\n value: function renderItems(loadedItems) {\n var _this15 = this;\n\n return loadedItems.map(function (item, index) {\n return _this15.renderItem(item, index);\n });\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this16 = this;\n\n var loadedItems = this.loadedItems();\n var items = this.renderItems(loadedItems);\n var className = classNames('p-virtualscroller-content', {\n 'p-virtualscroller-loading': this.state.loading\n });\n var content = /*#__PURE__*/React.createElement(\"div\", {\n className: className,\n ref: function ref(el) {\n return _this16.content = el;\n }\n }, items);\n\n if (this.props.contentTemplate) {\n var defaultOptions = {\n className: className,\n contentRef: function contentRef(el) {\n return _this16.content = el;\n },\n spacerRef: function spacerRef(el) {\n return _this16.spacer = el;\n },\n stickyRef: function stickyRef(el) {\n return _this16.sticky = el;\n },\n items: loadedItems,\n getItemOptions: function getItemOptions(index) {\n return _this16.getOptions(index);\n },\n children: items,\n element: content,\n props: this.props,\n loading: this.state.loading,\n getLoaderOptions: function getLoaderOptions(index, ext) {\n return _this16.loaderOptions(index, ext);\n },\n loadingTemplate: this.props.loadingTemplate,\n itemSize: this.props.itemSize,\n rows: this.getRows(),\n columns: this.getColumns(),\n vertical: this.isVertical(),\n horizontal: this.isHorizontal(),\n both: this.isBoth()\n };\n return ObjectUtils.getJSXElement(this.props.contentTemplate, defaultOptions);\n }\n\n return content;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this17 = this;\n\n if (this.props.disabled) {\n var content = ObjectUtils.getJSXElement(this.props.contentTemplate, {\n items: this.props.items,\n rows: this.props.items,\n columns: this.props.columns\n });\n return /*#__PURE__*/React.createElement(React.Fragment, null, this.props.children, content);\n } else {\n var isBoth = this.isBoth();\n var isHorizontal = this.isHorizontal();\n var className = classNames('p-virtualscroller', {\n 'p-both-scroll': isBoth,\n 'p-horizontal-scroll': isHorizontal\n }, this.props.className);\n var loader = this.renderLoader();\n\n var _content = this.renderContent();\n\n var spacer = this.renderSpacer();\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: function ref(el) {\n return _this17.el = el;\n },\n className: className,\n tabIndex: 0,\n style: this.props.style,\n onScroll: this.onScroll\n }, _content, spacer, loader);\n }\n }\n }]);\n\n return VirtualScroller;\n}(Component);\n\n_defineProperty(VirtualScroller, \"defaultProps\", {\n id: null,\n style: null,\n className: null,\n items: null,\n itemSize: 0,\n scrollHeight: null,\n scrollWidth: null,\n orientation: 'vertical',\n numToleratedItems: null,\n delay: 0,\n lazy: false,\n disabled: false,\n loaderDisabled: false,\n columns: null,\n loading: false,\n showSpacer: true,\n showLoader: false,\n loadingTemplate: null,\n itemTemplate: null,\n contentTemplate: null,\n onScroll: null,\n onScrollIndexChange: null,\n onLazyLoad: null\n});\n\nexport { VirtualScroller };\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,WAAT,EAAsBC,UAAtB,QAAwC,kBAAxC;;AAEA,SAASC,eAAT,CAAyBC,QAAzB,EAAmCC,WAAnC,EAAgD;EAC9C,IAAI,EAAED,QAAQ,YAAYC,WAAtB,CAAJ,EAAwC;IACtC,MAAM,IAAIC,SAAJ,CAAc,mCAAd,CAAN;EACD;AACF;;AAED,SAASC,iBAAT,CAA2BC,MAA3B,EAAmCC,KAAnC,EAA0C;EACxC,KAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGD,KAAK,CAACE,MAA1B,EAAkCD,CAAC,EAAnC,EAAuC;IACrC,IAAIE,UAAU,GAAGH,KAAK,CAACC,CAAD,CAAtB;IACAE,UAAU,CAACC,UAAX,GAAwBD,UAAU,CAACC,UAAX,IAAyB,KAAjD;IACAD,UAAU,CAACE,YAAX,GAA0B,IAA1B;IACA,IAAI,WAAWF,UAAf,EAA2BA,UAAU,CAACG,QAAX,GAAsB,IAAtB;IAC3BC,MAAM,CAACC,cAAP,CAAsBT,MAAtB,EAA8BI,UAAU,CAACM,GAAzC,EAA8CN,UAA9C;EACD;AACF;;AAED,SAASO,YAAT,CAAsBd,WAAtB,EAAmCe,UAAnC,EAA+CC,WAA/C,EAA4D;EAC1D,IAAID,UAAJ,EAAgBb,iBAAiB,CAACF,WAAW,CAACiB,SAAb,EAAwBF,UAAxB,CAAjB;EAChB,IAAIC,WAAJ,EAAiBd,iBAAiB,CAACF,WAAD,EAAcgB,WAAd,CAAjB;EACjBL,MAAM,CAACC,cAAP,CAAsBZ,WAAtB,EAAmC,WAAnC,EAAgD;IAC9CU,QAAQ,EAAE;EADoC,CAAhD;EAGA,OAAOV,WAAP;AACD;;AAED,SAASkB,sBAAT,CAAgCC,IAAhC,EA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