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MnBzqB,GAAU4lB,GACT,gBAAC,EAAD,CACET,gBAAiB,CAAEyF,QAAS,OAAQjnB,gBAAiB,IACrDia,YAAY,EACZiN,QACEjF,EAAOoE,MAAMU,GAAYnsB,KAAKusB,gBAAgBC,SAAS/O,KAAO,GAEhEkD,QACE0G,EAAOoE,MAAMvN,KAAKC,IAAIgO,EAAa,EAAG9E,EAAOoE,MAAMtvB,OAAS,IAAI6D,KAC7DusB,gBAAgBC,SAAS/O,KAAO,GAErCjB,QACE6K,EAAOoE,MAAMvN,KAAKqB,IAAI4M,EAAa,EAAG,IAAInsB,KAAKusB,gBAC5CC,SAAS/O,KAAO,GAErBsI,eAAgB,kBAAMmG,GAAU,IAChC9F,kBAAmB,WACbiB,GACF+E,GAAeD,EAAa,GAAK9E,EAAOoE,MAAMtvB,SAGlDkqB,kBAAmB,WACbgB,GACF+E,GAAeD,EAAa,GAAK9E,EAAOoE,MAAMtvB,aCd5D,EAT4B,WAC1B,OACE,gBAAC,EAAD,KACE,0CACA,gBAAC,EAAD,uCCfN,IAEIswB,EAAU,aA2Cd5hB,EAAOpP,QAAUgxB","sources":["webpack://anime-girls-holding-programming-books/./node_modules/exenv/index.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/components/Modal.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/components/ModalPortal.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/helpers/ariaAppHider.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/helpers/bodyTrap.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/helpers/classList.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/helpers/focusManager.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/helpers/portalOpenInstances.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/helpers/safeHTMLElement.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/helpers/scopeTab.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/helpers/tabbable.js","webpack://anime-girls-holding-programming-books/./node_modules/react-modal/lib/index.js","webpack://anime-girls-holding-programming-books/./node_modules/react-image-lightbox/dist/index.es.js","webpack://anime-girls-holding-programming-books/./src/components/AnimeImage.tsx","webpack://anime-girls-holding-programming-books/./src/components/Layout.tsx","webpack://anime-girls-holding-programming-books/./src/hooks/useDirectories.ts","webpack://anime-girls-holding-programming-books/./src/hooks/useAnimeImages.ts","webpack://anime-girls-holding-programming-books/./src/components/AimeImageGrid.tsx","webpack://anime-girls-holding-programming-books/./src/pages/index.tsx","webpack://anime-girls-holding-programming-books/./node_modules/warning/warning.js"],"sourcesContent":["/*!\n Copyright (c) 2015 Jed Watson.\n Based on code that is Copyright 2013-2015, Facebook, Inc.\n All rights reserved.\n*/\n\n/* global define */\n(function () {\n 'use strict';\n\n var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n var ExecutionEnvironment = {\n canUseDOM: canUseDOM,\n canUseWorkers: typeof Worker !== 'undefined',\n canUseEventListeners: canUseDOM && !!(window.addEventListener || window.attachEvent),\n canUseViewport: canUseDOM && !!window.screen\n };\n\n if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n define(function () {\n return ExecutionEnvironment;\n });\n } else if (typeof module !== 'undefined' && module.exports) {\n module.exports = ExecutionEnvironment;\n } else {\n window.ExecutionEnvironment = ExecutionEnvironment;\n }\n})();","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.bodyOpenClassName = exports.portalClassName = undefined;\n\nvar _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\nvar _createClass = function () {\n function 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\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _reactDom = require(\"react-dom\");\n\nvar _reactDom2 = _interopRequireDefault(_reactDom);\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _ModalPortal = require(\"./ModalPortal\");\n\nvar _ModalPortal2 = _interopRequireDefault(_ModalPortal);\n\nvar _ariaAppHider = require(\"../helpers/ariaAppHider\");\n\nvar ariaAppHider = _interopRequireWildcard(_ariaAppHider);\n\nvar _safeHTMLElement = require(\"../helpers/safeHTMLElement\");\n\nvar _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\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 _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar portalClassName = exports.portalClassName = \"ReactModalPortal\";\nvar bodyOpenClassName = exports.bodyOpenClassName = \"ReactModal__Body--open\";\nvar isReact16 = _safeHTMLElement.canUseDOM && _reactDom2.default.createPortal !== undefined;\n\nvar createHTMLElement = function createHTMLElement(name) {\n return document.createElement(name);\n};\n\nvar getCreatePortal = function getCreatePortal() {\n return isReact16 ? _reactDom2.default.createPortal : _reactDom2.default.unstable_renderSubtreeIntoContainer;\n};\n\nfunction getParentElement(parentSelector) {\n return parentSelector();\n}\n\nvar Modal = function (_Component) {\n _inherits(Modal, _Component);\n\n function Modal() {\n var _ref;\n\n var _temp, _this, _ret;\n\n _classCallCheck(this, Modal);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Modal.__proto__ || Object.getPrototypeOf(Modal)).call.apply(_ref, [this].concat(args))), _this), _this.removePortal = function () {\n !isReact16 && _reactDom2.default.unmountComponentAtNode(_this.node);\n var parent = getParentElement(_this.props.parentSelector);\n\n if (parent && parent.contains(_this.node)) {\n parent.removeChild(_this.node);\n } else {\n // eslint-disable-next-line no-console\n console.warn('React-Modal: \"parentSelector\" prop did not returned any DOM ' + \"element. Make sure that the parent element is unmounted to \" + \"avoid any memory leaks.\");\n }\n }, _this.portalRef = function (ref) {\n _this.portal = ref;\n }, _this.renderPortal = function (props) {\n var createPortal = getCreatePortal();\n var portal = createPortal(_this, _react2.default.createElement(_ModalPortal2.default, _extends({\n defaultStyles: Modal.defaultStyles\n }, props)), _this.node);\n\n _this.portalRef(portal);\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n _createClass(Modal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (!_safeHTMLElement.canUseDOM) return;\n\n if (!isReact16) {\n this.node = createHTMLElement(\"div\");\n }\n\n this.node.className = this.props.portalClassName;\n var parent = getParentElement(this.props.parentSelector);\n parent.appendChild(this.node);\n !isReact16 && this.renderPortal(this.props);\n }\n }, {\n key: \"getSnapshotBeforeUpdate\",\n value: function getSnapshotBeforeUpdate(prevProps) {\n var prevParent = getParentElement(prevProps.parentSelector);\n var nextParent = getParentElement(this.props.parentSelector);\n return {\n prevParent: prevParent,\n nextParent: nextParent\n };\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, _, snapshot) {\n if (!_safeHTMLElement.canUseDOM) return;\n var _props = this.props,\n isOpen = _props.isOpen,\n portalClassName = _props.portalClassName;\n\n if (prevProps.portalClassName !== portalClassName) {\n this.node.className = portalClassName;\n }\n\n var prevParent = snapshot.prevParent,\n nextParent = snapshot.nextParent;\n\n if (nextParent !== prevParent) {\n prevParent.removeChild(this.node);\n nextParent.appendChild(this.node);\n } // Stop unnecessary renders if modal is remaining closed\n\n\n if (!prevProps.isOpen && !isOpen) return;\n !isReact16 && this.renderPortal(this.props);\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (!_safeHTMLElement.canUseDOM || !this.node || !this.portal) return;\n var state = this.portal.state;\n var now = Date.now();\n var closesAt = state.isOpen && this.props.closeTimeoutMS && (state.closesAt || now + this.props.closeTimeoutMS);\n\n if (closesAt) {\n if (!state.beforeClose) {\n this.portal.closeWithTimeout();\n }\n\n setTimeout(this.removePortal, closesAt - now);\n } else {\n this.removePortal();\n }\n }\n }, {\n key: \"render\",\n value: function render() {\n if (!_safeHTMLElement.canUseDOM || !isReact16) {\n return null;\n }\n\n if (!this.node && isReact16) {\n this.node = createHTMLElement(\"div\");\n }\n\n var createPortal = getCreatePortal();\n return createPortal(_react2.default.createElement(_ModalPortal2.default, _extends({\n ref: this.portalRef,\n defaultStyles: Modal.defaultStyles\n }, this.props)), this.node);\n }\n }], [{\n key: \"setAppElement\",\n value: function setAppElement(element) {\n ariaAppHider.setElement(element);\n }\n /* eslint-disable react/no-unused-prop-types */\n\n /* eslint-enable react/no-unused-prop-types */\n\n }]);\n\n return Modal;\n}(_react.Component);\n\nModal.propTypes = {\n isOpen: _propTypes2.default.bool.isRequired,\n style: _propTypes2.default.shape({\n content: _propTypes2.default.object,\n overlay: _propTypes2.default.object\n }),\n portalClassName: _propTypes2.default.string,\n bodyOpenClassName: _propTypes2.default.string,\n htmlOpenClassName: _propTypes2.default.string,\n className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n base: _propTypes2.default.string.isRequired,\n afterOpen: _propTypes2.default.string.isRequired,\n beforeClose: _propTypes2.default.string.isRequired\n })]),\n overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.shape({\n base: _propTypes2.default.string.isRequired,\n afterOpen: _propTypes2.default.string.isRequired,\n beforeClose: _propTypes2.default.string.isRequired\n })]),\n appElement: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(_safeHTMLElement2.default), _propTypes2.default.instanceOf(_safeHTMLElement.SafeHTMLCollection), _propTypes2.default.instanceOf(_safeHTMLElement.SafeNodeList), _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_safeHTMLElement2.default))]),\n onAfterOpen: _propTypes2.default.func,\n onRequestClose: _propTypes2.default.func,\n closeTimeoutMS: _propTypes2.default.number,\n ariaHideApp: _propTypes2.default.bool,\n shouldFocusAfterRender: _propTypes2.default.bool,\n shouldCloseOnOverlayClick: _propTypes2.default.bool,\n shouldReturnFocusAfterClose: _propTypes2.default.bool,\n preventScroll: _propTypes2.default.bool,\n parentSelector: _propTypes2.default.func,\n aria: _propTypes2.default.object,\n data: _propTypes2.default.object,\n role: _propTypes2.default.string,\n contentLabel: _propTypes2.default.string,\n shouldCloseOnEsc: _propTypes2.default.bool,\n overlayRef: _propTypes2.default.func,\n contentRef: _propTypes2.default.func,\n id: _propTypes2.default.string,\n overlayElement: _propTypes2.default.func,\n contentElement: _propTypes2.default.func\n};\nModal.defaultProps = {\n isOpen: false,\n portalClassName: portalClassName,\n bodyOpenClassName: bodyOpenClassName,\n role: \"dialog\",\n ariaHideApp: true,\n closeTimeoutMS: 0,\n shouldFocusAfterRender: true,\n shouldCloseOnEsc: true,\n shouldCloseOnOverlayClick: true,\n shouldReturnFocusAfterClose: true,\n preventScroll: false,\n parentSelector: function parentSelector() {\n return document.body;\n },\n overlayElement: function overlayElement(props, contentEl) {\n return _react2.default.createElement(\"div\", props, contentEl);\n },\n contentElement: function contentElement(props, children) {\n return _react2.default.createElement(\"div\", props, children);\n }\n};\nModal.defaultStyles = {\n overlay: {\n position: \"fixed\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: \"rgba(255, 255, 255, 0.75)\"\n },\n content: {\n position: \"absolute\",\n top: \"40px\",\n left: \"40px\",\n right: \"40px\",\n bottom: \"40px\",\n border: \"1px solid #ccc\",\n background: \"#fff\",\n overflow: \"auto\",\n WebkitOverflowScrolling: \"touch\",\n borderRadius: \"4px\",\n outline: \"none\",\n padding: \"20px\"\n }\n};\n(0, _reactLifecyclesCompat.polyfill)(Modal);\n\nif (process.env.NODE_ENV !== \"production\") {\n Modal.setCreateHTMLElement = function (fn) {\n return createHTMLElement = fn;\n };\n}\n\nexports.default = Modal;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _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\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar _createClass = function () {\n function 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\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _react = require(\"react\");\n\nvar _propTypes = require(\"prop-types\");\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _focusManager = require(\"../helpers/focusManager\");\n\nvar focusManager = _interopRequireWildcard(_focusManager);\n\nvar _scopeTab = require(\"../helpers/scopeTab\");\n\nvar _scopeTab2 = _interopRequireDefault(_scopeTab);\n\nvar _ariaAppHider = require(\"../helpers/ariaAppHider\");\n\nvar ariaAppHider = _interopRequireWildcard(_ariaAppHider);\n\nvar _classList = require(\"../helpers/classList\");\n\nvar classList = _interopRequireWildcard(_classList);\n\nvar _safeHTMLElement = require(\"../helpers/safeHTMLElement\");\n\nvar _safeHTMLElement2 = _interopRequireDefault(_safeHTMLElement);\n\nvar _portalOpenInstances = require(\"../helpers/portalOpenInstances\");\n\nvar _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);\n\nrequire(\"../helpers/bodyTrap\");\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n return newObj;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\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 _possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\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, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n} // so that our CSS is statically analyzable\n\n\nvar CLASS_NAMES = {\n overlay: \"ReactModal__Overlay\",\n content: \"ReactModal__Content\"\n};\nvar TAB_KEY = 9;\nvar ESC_KEY = 27;\nvar ariaHiddenInstances = 0;\n\nvar ModalPortal = function (_Component) {\n _inherits(ModalPortal, _Component);\n\n function ModalPortal(props) {\n _classCallCheck(this, ModalPortal);\n\n var _this = _possibleConstructorReturn(this, (ModalPortal.__proto__ || Object.getPrototypeOf(ModalPortal)).call(this, props));\n\n _this.setOverlayRef = function (overlay) {\n _this.overlay = overlay;\n _this.props.overlayRef && _this.props.overlayRef(overlay);\n };\n\n _this.setContentRef = function (content) {\n _this.content = content;\n _this.props.contentRef && _this.props.contentRef(content);\n };\n\n _this.afterClose = function () {\n var _this$props = _this.props,\n appElement = _this$props.appElement,\n ariaHideApp = _this$props.ariaHideApp,\n htmlOpenClassName = _this$props.htmlOpenClassName,\n bodyOpenClassName = _this$props.bodyOpenClassName; // Remove classes.\n\n bodyOpenClassName && classList.remove(document.body, bodyOpenClassName);\n htmlOpenClassName && classList.remove(document.getElementsByTagName(\"html\")[0], htmlOpenClassName); // Reset aria-hidden attribute if all modals have been removed\n\n if (ariaHideApp && ariaHiddenInstances > 0) {\n ariaHiddenInstances -= 1;\n\n if (ariaHiddenInstances === 0) {\n ariaAppHider.show(appElement);\n }\n }\n\n if (_this.props.shouldFocusAfterRender) {\n if (_this.props.shouldReturnFocusAfterClose) {\n focusManager.returnFocus(_this.props.preventScroll);\n focusManager.teardownScopedFocus();\n } else {\n focusManager.popWithoutFocus();\n }\n }\n\n if (_this.props.onAfterClose) {\n _this.props.onAfterClose();\n }\n\n _portalOpenInstances2.default.deregister(_this);\n };\n\n _this.open = function () {\n _this.beforeOpen();\n\n if (_this.state.afterOpen && _this.state.beforeClose) {\n clearTimeout(_this.closeTimer);\n\n _this.setState({\n beforeClose: false\n });\n } else {\n if (_this.props.shouldFocusAfterRender) {\n focusManager.setupScopedFocus(_this.node);\n focusManager.markForFocusLater();\n }\n\n _this.setState({\n isOpen: true\n }, function () {\n _this.openAnimationFrame = requestAnimationFrame(function () {\n _this.setState({\n afterOpen: true\n });\n\n if (_this.props.isOpen && _this.props.onAfterOpen) {\n _this.props.onAfterOpen({\n overlayEl: _this.overlay,\n contentEl: _this.content\n });\n }\n });\n });\n }\n };\n\n _this.close = function () {\n if (_this.props.closeTimeoutMS > 0) {\n _this.closeWithTimeout();\n } else {\n _this.closeWithoutTimeout();\n }\n };\n\n _this.focusContent = function () {\n return _this.content && !_this.contentHasFocus() && _this.content.focus({\n preventScroll: true\n });\n };\n\n _this.closeWithTimeout = function () {\n var closesAt = Date.now() + _this.props.closeTimeoutMS;\n\n _this.setState({\n beforeClose: true,\n closesAt: closesAt\n }, function () {\n _this.closeTimer = setTimeout(_this.closeWithoutTimeout, _this.state.closesAt - Date.now());\n });\n };\n\n _this.closeWithoutTimeout = function () {\n _this.setState({\n beforeClose: false,\n isOpen: false,\n afterOpen: false,\n closesAt: null\n }, _this.afterClose);\n };\n\n _this.handleKeyDown = function (event) {\n if (event.keyCode === TAB_KEY) {\n (0, _scopeTab2.default)(_this.content, event);\n }\n\n if (_this.props.shouldCloseOnEsc && event.keyCode === ESC_KEY) {\n event.stopPropagation();\n\n _this.requestClose(event);\n }\n };\n\n _this.handleOverlayOnClick = function (event) {\n if (_this.shouldClose === null) {\n _this.shouldClose = true;\n }\n\n if (_this.shouldClose && _this.props.shouldCloseOnOverlayClick) {\n if (_this.ownerHandlesClose()) {\n _this.requestClose(event);\n } else {\n _this.focusContent();\n }\n }\n\n _this.shouldClose = null;\n };\n\n _this.handleContentOnMouseUp = function () {\n _this.shouldClose = false;\n };\n\n _this.handleOverlayOnMouseDown = function (event) {\n if (!_this.props.shouldCloseOnOverlayClick && event.target == _this.overlay) {\n event.preventDefault();\n }\n };\n\n _this.handleContentOnClick = function () {\n _this.shouldClose = false;\n };\n\n _this.handleContentOnMouseDown = function () {\n _this.shouldClose = false;\n };\n\n _this.requestClose = function (event) {\n return _this.ownerHandlesClose() && _this.props.onRequestClose(event);\n };\n\n _this.ownerHandlesClose = function () {\n return _this.props.onRequestClose;\n };\n\n _this.shouldBeClosed = function () {\n return !_this.state.isOpen && !_this.state.beforeClose;\n };\n\n _this.contentHasFocus = function () {\n return document.activeElement === _this.content || _this.content.contains(document.activeElement);\n };\n\n _this.buildClassName = function (which, additional) {\n var classNames = (typeof additional === \"undefined\" ? \"undefined\" : _typeof(additional)) === \"object\" ? additional : {\n base: CLASS_NAMES[which],\n afterOpen: CLASS_NAMES[which] + \"--after-open\",\n beforeClose: CLASS_NAMES[which] + \"--before-close\"\n };\n var className = classNames.base;\n\n if (_this.state.afterOpen) {\n className = className + \" \" + classNames.afterOpen;\n }\n\n if (_this.state.beforeClose) {\n className = className + \" \" + classNames.beforeClose;\n }\n\n return typeof additional === \"string\" && additional ? className + \" \" + additional : className;\n };\n\n _this.attributesFromObject = function (prefix, items) {\n return Object.keys(items).reduce(function (acc, name) {\n acc[prefix + \"-\" + name] = items[name];\n return acc;\n }, {});\n };\n\n _this.state = {\n afterOpen: false,\n beforeClose: false\n };\n _this.shouldClose = null;\n _this.moveFromContentToOverlay = null;\n return _this;\n }\n\n _createClass(ModalPortal, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.isOpen) {\n this.open();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n if (process.env.NODE_ENV !== \"production\") {\n if (prevProps.bodyOpenClassName !== this.props.bodyOpenClassName) {\n // eslint-disable-next-line no-console\n console.warn('React-Modal: \"bodyOpenClassName\" prop has been modified. ' + \"This may cause unexpected behavior when multiple modals are open.\");\n }\n\n if (prevProps.htmlOpenClassName !== this.props.htmlOpenClassName) {\n // eslint-disable-next-line no-console\n console.warn('React-Modal: \"htmlOpenClassName\" prop has been modified. ' + \"This may cause unexpected behavior when multiple modals are open.\");\n }\n }\n\n if (this.props.isOpen && !prevProps.isOpen) {\n this.open();\n } else if (!this.props.isOpen && prevProps.isOpen) {\n this.close();\n } // Focus only needs to be set once when the modal is being opened\n\n\n if (this.props.shouldFocusAfterRender && this.state.isOpen && !prevState.isOpen) {\n this.focusContent();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n if (this.state.isOpen) {\n this.afterClose();\n }\n\n clearTimeout(this.closeTimer);\n cancelAnimationFrame(this.openAnimationFrame);\n }\n }, {\n key: \"beforeOpen\",\n value: function beforeOpen() {\n var _props = this.props,\n appElement = _props.appElement,\n ariaHideApp = _props.ariaHideApp,\n htmlOpenClassName = _props.htmlOpenClassName,\n bodyOpenClassName = _props.bodyOpenClassName; // Add classes.\n\n bodyOpenClassName && classList.add(document.body, bodyOpenClassName);\n htmlOpenClassName && classList.add(document.getElementsByTagName(\"html\")[0], htmlOpenClassName);\n\n if (ariaHideApp) {\n ariaHiddenInstances += 1;\n ariaAppHider.hide(appElement);\n }\n\n _portalOpenInstances2.default.register(this);\n } // Don't steal focus from inner elements\n\n }, {\n key: \"render\",\n value: function render() {\n var _props2 = this.props,\n id = _props2.id,\n className = _props2.className,\n overlayClassName = _props2.overlayClassName,\n defaultStyles = _props2.defaultStyles,\n children = _props2.children;\n var contentStyles = className ? {} : defaultStyles.content;\n var overlayStyles = overlayClassName ? {} : defaultStyles.overlay;\n\n if (this.shouldBeClosed()) {\n return null;\n }\n\n var overlayProps = {\n ref: this.setOverlayRef,\n className: this.buildClassName(\"overlay\", overlayClassName),\n style: _extends({}, overlayStyles, this.props.style.overlay),\n onClick: this.handleOverlayOnClick,\n onMouseDown: this.handleOverlayOnMouseDown\n };\n\n var contentProps = _extends({\n id: id,\n ref: this.setContentRef,\n style: _extends({}, contentStyles, this.props.style.content),\n className: this.buildClassName(\"content\", className),\n tabIndex: \"-1\",\n onKeyDown: this.handleKeyDown,\n onMouseDown: this.handleContentOnMouseDown,\n onMouseUp: this.handleContentOnMouseUp,\n onClick: this.handleContentOnClick,\n role: this.props.role,\n \"aria-label\": this.props.contentLabel\n }, this.attributesFromObject(\"aria\", _extends({\n modal: true\n }, this.props.aria)), this.attributesFromObject(\"data\", this.props.data || {}), {\n \"data-testid\": this.props.testId\n });\n\n var contentElement = this.props.contentElement(contentProps, children);\n return this.props.overlayElement(overlayProps, contentElement);\n }\n }]);\n\n return ModalPortal;\n}(_react.Component);\n\nModalPortal.defaultProps = {\n style: {\n overlay: {},\n content: {}\n },\n defaultStyles: {}\n};\nModalPortal.propTypes = {\n isOpen: _propTypes2.default.bool.isRequired,\n defaultStyles: _propTypes2.default.shape({\n content: _propTypes2.default.object,\n overlay: _propTypes2.default.object\n }),\n style: _propTypes2.default.shape({\n content: _propTypes2.default.object,\n overlay: _propTypes2.default.object\n }),\n className: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),\n overlayClassName: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]),\n bodyOpenClassName: _propTypes2.default.string,\n htmlOpenClassName: _propTypes2.default.string,\n ariaHideApp: _propTypes2.default.bool,\n appElement: _propTypes2.default.oneOfType([_propTypes2.default.instanceOf(_safeHTMLElement2.default), _propTypes2.default.instanceOf(_safeHTMLElement.SafeHTMLCollection), _propTypes2.default.instanceOf(_safeHTMLElement.SafeNodeList), _propTypes2.default.arrayOf(_propTypes2.default.instanceOf(_safeHTMLElement2.default))]),\n onAfterOpen: _propTypes2.default.func,\n onAfterClose: _propTypes2.default.func,\n onRequestClose: _propTypes2.default.func,\n closeTimeoutMS: _propTypes2.default.number,\n shouldFocusAfterRender: _propTypes2.default.bool,\n shouldCloseOnOverlayClick: _propTypes2.default.bool,\n shouldReturnFocusAfterClose: _propTypes2.default.bool,\n preventScroll: _propTypes2.default.bool,\n role: _propTypes2.default.string,\n contentLabel: _propTypes2.default.string,\n aria: _propTypes2.default.object,\n data: _propTypes2.default.object,\n children: _propTypes2.default.node,\n shouldCloseOnEsc: _propTypes2.default.bool,\n overlayRef: _propTypes2.default.func,\n contentRef: _propTypes2.default.func,\n id: _propTypes2.default.string,\n overlayElement: _propTypes2.default.func,\n contentElement: _propTypes2.default.func,\n testId: _propTypes2.default.string\n};\nexports.default = ModalPortal;\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.resetState = resetState;\nexports.log = log;\nexports.assertNodeList = assertNodeList;\nexports.setElement = setElement;\nexports.validateElement = validateElement;\nexports.hide = hide;\nexports.show = show;\nexports.documentNotReadyOrSSRTesting = documentNotReadyOrSSRTesting;\n\nvar _warning = require(\"warning\");\n\nvar _warning2 = _interopRequireDefault(_warning);\n\nvar _safeHTMLElement = require(\"./safeHTMLElement\");\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nvar globalElement = null;\n/* eslint-disable no-console */\n\n/* istanbul ignore next */\n\nfunction resetState() {\n if (globalElement) {\n if (globalElement.removeAttribute) {\n globalElement.removeAttribute(\"aria-hidden\");\n } else if (globalElement.length != null) {\n globalElement.forEach(function (element) {\n return element.removeAttribute(\"aria-hidden\");\n });\n } else {\n document.querySelectorAll(globalElement).forEach(function (element) {\n return element.removeAttribute(\"aria-hidden\");\n });\n }\n }\n\n globalElement = null;\n}\n/* istanbul ignore next */\n\n\nfunction log() {\n if (process.env.NODE_ENV !== \"production\") {\n var check = globalElement || {};\n console.log(\"ariaAppHider ----------\");\n console.log(check.nodeName, check.className, check.id);\n console.log(\"end ariaAppHider ----------\");\n }\n}\n/* eslint-enable no-console */\n\n\nfunction assertNodeList(nodeList, selector) {\n if (!nodeList || !nodeList.length) {\n throw new Error(\"react-modal: No elements were found for selector \" + selector + \".\");\n }\n}\n\nfunction setElement(element) {\n var useElement = element;\n\n if (typeof useElement === \"string\" && _safeHTMLElement.canUseDOM) {\n var el = document.querySelectorAll(useElement);\n assertNodeList(el, useElement);\n useElement = el;\n }\n\n globalElement = useElement || globalElement;\n return globalElement;\n}\n\nfunction validateElement(appElement) {\n var el = appElement || globalElement;\n\n if (el) {\n return Array.isArray(el) || el instanceof HTMLCollection || el instanceof NodeList ? el : [el];\n } else {\n (0, _warning2.default)(false, [\"react-modal: App element is not defined.\", \"Please use `Modal.setAppElement(el)` or set `appElement={el}`.\", \"This is needed so screen readers don't see main content\", \"when modal is opened. It is not recommended, but you can opt-out\", \"by setting `ariaHideApp={false}`.\"].join(\" \"));\n return [];\n }\n}\n\nfunction hide(appElement) {\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n\n try {\n for (var _iterator = validateElement(appElement)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var el = _step.value;\n el.setAttribute(\"aria-hidden\", \"true\");\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n}\n\nfunction show(appElement) {\n var _iteratorNormalCompletion2 = true;\n var _didIteratorError2 = false;\n var _iteratorError2 = undefined;\n\n try {\n for (var _iterator2 = validateElement(appElement)[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {\n var el = _step2.value;\n el.removeAttribute(\"aria-hidden\");\n }\n } catch (err) {\n _didIteratorError2 = true;\n _iteratorError2 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion2 && _iterator2.return) {\n _iterator2.return();\n }\n } finally {\n if (_didIteratorError2) {\n throw _iteratorError2;\n }\n }\n }\n}\n\nfunction documentNotReadyOrSSRTesting() {\n globalElement = null;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.resetState = resetState;\nexports.log = log;\n\nvar _portalOpenInstances = require(\"./portalOpenInstances\");\n\nvar _portalOpenInstances2 = _interopRequireDefault(_portalOpenInstances);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n} // Body focus trap see Issue #742\n\n\nvar before = void 0,\n after = void 0,\n instances = [];\n/* eslint-disable no-console */\n\n/* istanbul ignore next */\n\nfunction resetState() {\n var _arr = [before, after];\n\n for (var _i = 0; _i < _arr.length; _i++) {\n var item = _arr[_i];\n if (!item) continue;\n item.parentNode && item.parentNode.removeChild(item);\n }\n\n before = after = null;\n instances = [];\n}\n/* istanbul ignore next */\n\n\nfunction log() {\n console.log(\"bodyTrap ----------\");\n console.log(instances.length);\n var _arr2 = [before, after];\n\n for (var _i2 = 0; _i2 < _arr2.length; _i2++) {\n var item = _arr2[_i2];\n var check = item || {};\n console.log(check.nodeName, check.className, check.id);\n }\n\n console.log(\"edn bodyTrap ----------\");\n}\n/* eslint-enable no-console */\n\n\nfunction focusContent() {\n if (instances.length === 0) {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\"React-Modal: Open instances > 0 expected\");\n }\n\n return;\n }\n\n instances[instances.length - 1].focusContent();\n}\n\nfunction bodyTrap(eventType, openInstances) {\n if (!before && !after) {\n before = document.createElement(\"div\");\n before.setAttribute(\"data-react-modal-body-trap\", \"\");\n before.style.position = \"absolute\";\n before.style.opacity = \"0\";\n before.setAttribute(\"tabindex\", \"0\");\n before.addEventListener(\"focus\", focusContent);\n after = before.cloneNode();\n after.addEventListener(\"focus\", focusContent);\n }\n\n instances = openInstances;\n\n if (instances.length > 0) {\n // Add focus trap\n if (document.body.firstChild !== before) {\n document.body.insertBefore(before, document.body.firstChild);\n }\n\n if (document.body.lastChild !== after) {\n document.body.appendChild(after);\n }\n } else {\n // Remove focus trap\n if (before.parentElement) {\n before.parentElement.removeChild(before);\n }\n\n if (after.parentElement) {\n after.parentElement.removeChild(after);\n }\n }\n}\n\n_portalOpenInstances2.default.subscribe(bodyTrap);","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.resetState = resetState;\nexports.log = log;\nvar htmlClassList = {};\nvar docBodyClassList = {};\n/* eslint-disable no-console */\n\n/* istanbul ignore next */\n\nfunction removeClass(at, cls) {\n at.classList.remove(cls);\n}\n/* istanbul ignore next */\n\n\nfunction resetState() {\n var htmlElement = document.getElementsByTagName(\"html\")[0];\n\n for (var cls in htmlClassList) {\n removeClass(htmlElement, htmlClassList[cls]);\n }\n\n var body = document.body;\n\n for (var _cls in docBodyClassList) {\n removeClass(body, docBodyClassList[_cls]);\n }\n\n htmlClassList = {};\n docBodyClassList = {};\n}\n/* istanbul ignore next */\n\n\nfunction log() {\n if (process.env.NODE_ENV !== \"production\") {\n var classes = document.getElementsByTagName(\"html\")[0].className;\n var buffer = \"Show tracked classes:\\n\\n\";\n buffer += \" (\" + classes + \"):\\n \";\n\n for (var x in htmlClassList) {\n buffer += \" \" + x + \" \" + htmlClassList[x] + \"\\n \";\n }\n\n classes = document.body.className;\n buffer += \"\\n\\ndoc.body (\" + classes + \"):\\n \";\n\n for (var _x in docBodyClassList) {\n buffer += \" \" + _x + \" \" + docBodyClassList[_x] + \"\\n \";\n }\n\n buffer += \"\\n\";\n console.log(buffer);\n }\n}\n/* eslint-enable no-console */\n\n/**\n * Track the number of reference of a class.\n * @param {object} poll The poll to receive the reference.\n * @param {string} className The class name.\n * @return {string}\n */\n\n\nvar incrementReference = function incrementReference(poll, className) {\n if (!poll[className]) {\n poll[className] = 0;\n }\n\n poll[className] += 1;\n return className;\n};\n/**\n * Drop the reference of a class.\n * @param {object} poll The poll to receive the reference.\n * @param {string} className The class name.\n * @return {string}\n */\n\n\nvar decrementReference = function decrementReference(poll, className) {\n if (poll[className]) {\n poll[className] -= 1;\n }\n\n return className;\n};\n/**\n * Track a class and add to the given class list.\n * @param {Object} classListRef A class list of an element.\n * @param {Object} poll The poll to be used.\n * @param {Array} classes The list of classes to be tracked.\n */\n\n\nvar trackClass = function trackClass(classListRef, poll, classes) {\n classes.forEach(function (className) {\n incrementReference(poll, className);\n classListRef.add(className);\n });\n};\n/**\n * Untrack a class and remove from the given class list if the reference\n * reaches 0.\n * @param {Object} classListRef A class list of an element.\n * @param {Object} poll The poll to be used.\n * @param {Array} classes The list of classes to be untracked.\n */\n\n\nvar untrackClass = function untrackClass(classListRef, poll, classes) {\n classes.forEach(function (className) {\n decrementReference(poll, className);\n poll[className] === 0 && classListRef.remove(className);\n });\n};\n/**\n * Public inferface to add classes to the document.body.\n * @param {string} bodyClass The class string to be added.\n * It may contain more then one class\n * with ' ' as separator.\n */\n\n\nvar add = exports.add = function add(element, classString) {\n return trackClass(element.classList, element.nodeName.toLowerCase() == \"html\" ? htmlClassList : docBodyClassList, classString.split(\" \"));\n};\n/**\n * Public inferface to remove classes from the document.body.\n * @param {string} bodyClass The class string to be added.\n * It may contain more then one class\n * with ' ' as separator.\n */\n\n\nvar remove = exports.remove = function remove(element, classString) {\n return untrackClass(element.classList, element.nodeName.toLowerCase() == \"html\" ? htmlClassList : docBodyClassList, classString.split(\" \"));\n};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.resetState = resetState;\nexports.log = log;\nexports.handleBlur = handleBlur;\nexports.handleFocus = handleFocus;\nexports.markForFocusLater = markForFocusLater;\nexports.returnFocus = returnFocus;\nexports.popWithoutFocus = popWithoutFocus;\nexports.setupScopedFocus = setupScopedFocus;\nexports.teardownScopedFocus = teardownScopedFocus;\n\nvar _tabbable = require(\"../helpers/tabbable\");\n\nvar _tabbable2 = _interopRequireDefault(_tabbable);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nvar focusLaterElements = [];\nvar modalElement = null;\nvar needToFocus = false;\n/* eslint-disable no-console */\n\n/* istanbul ignore next */\n\nfunction resetState() {\n focusLaterElements = [];\n}\n/* istanbul ignore next */\n\n\nfunction log() {\n if (process.env.NODE_ENV !== \"production\") {\n console.log(\"focusManager ----------\");\n focusLaterElements.forEach(function (f) {\n var check = f || {};\n console.log(check.nodeName, check.className, check.id);\n });\n console.log(\"end focusManager ----------\");\n }\n}\n/* eslint-enable no-console */\n\n\nfunction handleBlur() {\n needToFocus = true;\n}\n\nfunction handleFocus() {\n if (needToFocus) {\n needToFocus = false;\n\n if (!modalElement) {\n return;\n } // need to see how jQuery shims document.on('focusin') so we don't need the\n // setTimeout, firefox doesn't support focusin, if it did, we could focus\n // the element outside of a setTimeout. Side-effect of this implementation\n // is that the document.body gets focus, and then we focus our element right\n // after, seems fine.\n\n\n setTimeout(function () {\n if (modalElement.contains(document.activeElement)) {\n return;\n }\n\n var el = (0, _tabbable2.default)(modalElement)[0] || modalElement;\n el.focus();\n }, 0);\n }\n}\n\nfunction markForFocusLater() {\n focusLaterElements.push(document.activeElement);\n}\n/* eslint-disable no-console */\n\n\nfunction returnFocus() {\n var preventScroll = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var toFocus = null;\n\n try {\n if (focusLaterElements.length !== 0) {\n toFocus = focusLaterElements.pop();\n toFocus.focus({\n preventScroll: preventScroll\n });\n }\n\n return;\n } catch (e) {\n console.warn([\"You tried to return focus to\", toFocus, \"but it is not in the DOM anymore\"].join(\" \"));\n }\n}\n/* eslint-enable no-console */\n\n\nfunction popWithoutFocus() {\n focusLaterElements.length > 0 && focusLaterElements.pop();\n}\n\nfunction setupScopedFocus(element) {\n modalElement = element;\n\n if (window.addEventListener) {\n window.addEventListener(\"blur\", handleBlur, false);\n document.addEventListener(\"focus\", handleFocus, true);\n } else {\n window.attachEvent(\"onBlur\", handleBlur);\n document.attachEvent(\"onFocus\", handleFocus);\n }\n}\n\nfunction teardownScopedFocus() {\n modalElement = null;\n\n if (window.addEventListener) {\n window.removeEventListener(\"blur\", handleBlur);\n document.removeEventListener(\"focus\", handleFocus);\n } else {\n window.detachEvent(\"onBlur\", handleBlur);\n document.detachEvent(\"onFocus\", handleFocus);\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.log = log;\nexports.resetState = resetState;\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n} // Tracks portals that are open and emits events to subscribers\n\n\nvar PortalOpenInstances = function PortalOpenInstances() {\n var _this = this;\n\n _classCallCheck(this, PortalOpenInstances);\n\n this.register = function (openInstance) {\n if (_this.openInstances.indexOf(openInstance) !== -1) {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\"React-Modal: Cannot register modal instance that's already open\");\n }\n\n return;\n }\n\n _this.openInstances.push(openInstance);\n\n _this.emit(\"register\");\n };\n\n this.deregister = function (openInstance) {\n var index = _this.openInstances.indexOf(openInstance);\n\n if (index === -1) {\n if (process.env.NODE_ENV !== \"production\") {\n // eslint-disable-next-line no-console\n console.warn(\"React-Modal: Unable to deregister \" + openInstance + \" as \" + \"it was never registered\");\n }\n\n return;\n }\n\n _this.openInstances.splice(index, 1);\n\n _this.emit(\"deregister\");\n };\n\n this.subscribe = function (callback) {\n _this.subscribers.push(callback);\n };\n\n this.emit = function (eventType) {\n _this.subscribers.forEach(function (subscriber) {\n return subscriber(eventType, // shallow copy to avoid accidental mutation\n _this.openInstances.slice());\n });\n };\n\n this.openInstances = [];\n this.subscribers = [];\n};\n\nvar portalOpenInstances = new PortalOpenInstances();\n/* eslint-disable no-console */\n\n/* istanbul ignore next */\n\nfunction log() {\n console.log(\"portalOpenInstances ----------\");\n console.log(portalOpenInstances.openInstances.length);\n portalOpenInstances.openInstances.forEach(function (p) {\n return console.log(p);\n });\n console.log(\"end portalOpenInstances ----------\");\n}\n/* istanbul ignore next */\n\n\nfunction resetState() {\n portalOpenInstances = new PortalOpenInstances();\n}\n/* eslint-enable no-console */\n\n\nexports.default = portalOpenInstances;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.canUseDOM = exports.SafeNodeList = exports.SafeHTMLCollection = undefined;\n\nvar _exenv = require(\"exenv\");\n\nvar _exenv2 = _interopRequireDefault(_exenv);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nvar EE = _exenv2.default;\nvar SafeHTMLElement = EE.canUseDOM ? window.HTMLElement : {};\nvar SafeHTMLCollection = exports.SafeHTMLCollection = EE.canUseDOM ? window.HTMLCollection : {};\nvar SafeNodeList = exports.SafeNodeList = EE.canUseDOM ? window.NodeList : {};\nvar canUseDOM = exports.canUseDOM = EE.canUseDOM;\nexports.default = SafeHTMLElement;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = scopeTab;\n\nvar _tabbable = require(\"./tabbable\");\n\nvar _tabbable2 = _interopRequireDefault(_tabbable);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction getActiveElement() {\n var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n return el.activeElement.shadowRoot ? getActiveElement(el.activeElement.shadowRoot) : el.activeElement;\n}\n\nfunction scopeTab(node, event) {\n var tabbable = (0, _tabbable2.default)(node);\n\n if (!tabbable.length) {\n // Do nothing, since there are no elements that can receive focus.\n event.preventDefault();\n return;\n }\n\n var target = void 0;\n var shiftKey = event.shiftKey;\n var head = tabbable[0];\n var tail = tabbable[tabbable.length - 1];\n var activeElement = getActiveElement(); // proceed with default browser behavior on tab.\n // Focus on last element on shift + tab.\n\n if (node === activeElement) {\n if (!shiftKey) return;\n target = tail;\n }\n\n if (tail === activeElement && !shiftKey) {\n target = head;\n }\n\n if (head === activeElement && shiftKey) {\n target = tail;\n }\n\n if (target) {\n event.preventDefault();\n target.focus();\n return;\n } // Safari radio issue.\n //\n // Safari does not move the focus to the radio button,\n // so we need to force it to really walk through all elements.\n //\n // This is very error prone, since we are trying to guess\n // if it is a safari browser from the first occurence between\n // chrome or safari.\n //\n // The chrome user agent contains the first ocurrence\n // as the 'chrome/version' and later the 'safari/version'.\n\n\n var checkSafari = /(\\bChrome\\b|\\bSafari\\b)\\//.exec(navigator.userAgent);\n var isSafariDesktop = checkSafari != null && checkSafari[1] != \"Chrome\" && /\\biPod\\b|\\biPad\\b/g.exec(navigator.userAgent) == null; // If we are not in safari desktop, let the browser control\n // the focus\n\n if (!isSafariDesktop) return;\n var x = tabbable.indexOf(activeElement);\n\n if (x > -1) {\n x += shiftKey ? -1 : 1;\n }\n\n target = tabbable[x]; // If the tabbable element does not exist,\n // focus head/tail based on shiftKey\n\n if (typeof target === \"undefined\") {\n event.preventDefault();\n target = shiftKey ? tail : head;\n target.focus();\n return;\n }\n\n event.preventDefault();\n target.focus();\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = findTabbableDescendants;\n/*!\n * Adapted from jQuery UI core\n *\n * http://jqueryui.com\n *\n * Copyright 2014 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * http://api.jqueryui.com/category/ui-core/\n */\n\nvar tabbableNode = /input|select|textarea|button|object/;\n\nfunction hidesContents(element) {\n var zeroSize = element.offsetWidth <= 0 && element.offsetHeight <= 0; // If the node is empty, this is good enough\n\n if (zeroSize && !element.innerHTML) return true;\n\n try {\n // Otherwise we need to check some styles\n var style = window.getComputedStyle(element);\n return zeroSize ? style.getPropertyValue(\"overflow\") !== \"visible\" || // if 'overflow: visible' set, check if there is actually any overflow\n element.scrollWidth <= 0 && element.scrollHeight <= 0 : style.getPropertyValue(\"display\") == \"none\";\n } catch (exception) {\n // eslint-disable-next-line no-console\n console.warn(\"Failed to inspect element style\");\n return false;\n }\n}\n\nfunction visible(element) {\n var parentElement = element;\n var rootNode = element.getRootNode && element.getRootNode();\n\n while (parentElement) {\n if (parentElement === document.body) break; // if we are not hidden yet, skip to checking outside the Web Component\n\n if (rootNode && parentElement === rootNode) parentElement = rootNode.host.parentNode;\n if (hidesContents(parentElement)) return false;\n parentElement = parentElement.parentNode;\n }\n\n return true;\n}\n\nfunction focusable(element, isTabIndexNotNaN) {\n var nodeName = element.nodeName.toLowerCase();\n var res = tabbableNode.test(nodeName) && !element.disabled || (nodeName === \"a\" ? element.href || isTabIndexNotNaN : isTabIndexNotNaN);\n return res && visible(element);\n}\n\nfunction tabbable(element) {\n var tabIndex = element.getAttribute(\"tabindex\");\n if (tabIndex === null) tabIndex = undefined;\n var isTabIndexNaN = isNaN(tabIndex);\n return (isTabIndexNaN || tabIndex >= 0) && focusable(element, !isTabIndexNaN);\n}\n\nfunction findTabbableDescendants(element) {\n var descendants = [].slice.call(element.querySelectorAll(\"*\"), 0).reduce(function (finished, el) {\n return finished.concat(!el.shadowRoot ? [el] : findTabbableDescendants(el.shadowRoot));\n }, []);\n return descendants.filter(tabbable);\n}\n\nmodule.exports = exports[\"default\"];","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _Modal = require(\"./components/Modal\");\n\nvar _Modal2 = _interopRequireDefault(_Modal);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nexports.default = _Modal2.default;\nmodule.exports = exports[\"default\"];","import React, { Component } from 'react';\nimport Modal from 'react-modal';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n }\n\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(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 _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 return Constructor;\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 _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 _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 if (superClass) _setPrototypeOf(subClass, superClass);\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 _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 _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\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 _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\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 _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\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 _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n/**\n * Placeholder for future translate functionality\n */\n\n\nfunction translate(str) {\n var replaceStrings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n if (!str) {\n return '';\n }\n\n var translated = str;\n\n if (replaceStrings) {\n Object.keys(replaceStrings).forEach(function (placeholder) {\n translated = translated.replace(placeholder, replaceStrings[placeholder]);\n });\n }\n\n return translated;\n}\n\nfunction getWindowWidth() {\n return typeof global.window !== 'undefined' ? global.window.innerWidth : 0;\n}\n\nfunction getWindowHeight() {\n return typeof global.window !== 'undefined' ? global.window.innerHeight : 0;\n}\n\nvar isCrossOriginFrame = function isCrossOriginFrame() {\n try {\n return global.window.location.hostname !== global.window.parent.location.hostname;\n } catch (e) {\n return true;\n }\n}; // Get the highest window context that isn't cross-origin\n// (When in an iframe)\n\n\nfunction getHighestSafeWindowContext() {\n var self = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : global.window.self; // If we reached the top level, return self\n\n if (self === global.window.top) {\n return self;\n } // If parent is the same origin, we can move up one context\n // Reference: https://stackoverflow.com/a/21965342/1601953\n\n\n if (!isCrossOriginFrame()) {\n return getHighestSafeWindowContext(self.parent);\n } // If a different origin, we consider the current level\n // as the top reachable one\n\n\n return self;\n} // Min image zoom level\n\n\nvar MIN_ZOOM_LEVEL = 0; // Max image zoom level\n\nvar MAX_ZOOM_LEVEL = 300; // Size ratio between previous and next zoom levels\n\nvar ZOOM_RATIO = 1.007; // How much to increase/decrease the zoom level when the zoom buttons are clicked\n\nvar ZOOM_BUTTON_INCREMENT_SIZE = 100; // Used to judge the amount of horizontal scroll needed to initiate a image move\n\nvar WHEEL_MOVE_X_THRESHOLD = 200; // Used to judge the amount of vertical scroll needed to initiate a zoom action\n\nvar WHEEL_MOVE_Y_THRESHOLD = 1;\nvar KEYS = {\n ESC: 27,\n LEFT_ARROW: 37,\n RIGHT_ARROW: 39\n}; // Actions\n\nvar ACTION_NONE = 0;\nvar ACTION_MOVE = 1;\nvar ACTION_SWIPE = 2;\nvar ACTION_PINCH = 3;\nvar SOURCE_ANY = 0;\nvar SOURCE_MOUSE = 1;\nvar SOURCE_TOUCH = 2;\nvar SOURCE_POINTER = 3; // Minimal swipe distance\n\nvar MIN_SWIPE_DISTANCE = 200;\n\nvar ReactImageLightbox = /*#__PURE__*/function (_Component) {\n _inherits(ReactImageLightbox, _Component);\n\n var _super = _createSuper(ReactImageLightbox);\n\n function ReactImageLightbox(props) {\n var _this;\n\n _classCallCheck(this, ReactImageLightbox);\n\n _this = _super.call(this, props);\n _this.state = {\n //-----------------------------\n // Animation\n //-----------------------------\n // Lightbox is closing\n // When Lightbox is mounted, if animation is enabled it will open with the reverse of the closing animation\n isClosing: !props.animationDisabled,\n // Component parts should animate (e.g., when images are moving, or image is being zoomed)\n shouldAnimate: false,\n //-----------------------------\n // Zoom settings\n //-----------------------------\n // Zoom level of image\n zoomLevel: MIN_ZOOM_LEVEL,\n //-----------------------------\n // Image position settings\n //-----------------------------\n // Horizontal offset from center\n offsetX: 0,\n // Vertical offset from center\n offsetY: 0,\n // image load error for srcType\n loadErrorStatus: {}\n }; // Refs\n\n _this.outerEl = /*#__PURE__*/React.createRef();\n _this.zoomInBtn = /*#__PURE__*/React.createRef();\n _this.zoomOutBtn = /*#__PURE__*/React.createRef();\n _this.caption = /*#__PURE__*/React.createRef();\n _this.closeIfClickInner = _this.closeIfClickInner.bind(_assertThisInitialized(_this));\n _this.handleImageDoubleClick = _this.handleImageDoubleClick.bind(_assertThisInitialized(_this));\n _this.handleImageMouseWheel = _this.handleImageMouseWheel.bind(_assertThisInitialized(_this));\n _this.handleKeyInput = _this.handleKeyInput.bind(_assertThisInitialized(_this));\n _this.handleMouseUp = _this.handleMouseUp.bind(_assertThisInitialized(_this));\n _this.handleMouseDown = _this.handleMouseDown.bind(_assertThisInitialized(_this));\n _this.handleMouseMove = _this.handleMouseMove.bind(_assertThisInitialized(_this));\n _this.handleOuterMousewheel = _this.handleOuterMousewheel.bind(_assertThisInitialized(_this));\n _this.handleTouchStart = _this.handleTouchStart.bind(_assertThisInitialized(_this));\n _this.handleTouchMove = _this.handleTouchMove.bind(_assertThisInitialized(_this));\n _this.handleTouchEnd = _this.handleTouchEnd.bind(_assertThisInitialized(_this));\n _this.handlePointerEvent = _this.handlePointerEvent.bind(_assertThisInitialized(_this));\n _this.handleCaptionMousewheel = _this.handleCaptionMousewheel.bind(_assertThisInitialized(_this));\n _this.handleWindowResize = _this.handleWindowResize.bind(_assertThisInitialized(_this));\n _this.handleZoomInButtonClick = _this.handleZoomInButtonClick.bind(_assertThisInitialized(_this));\n _this.handleZoomOutButtonClick = _this.handleZoomOutButtonClick.bind(_assertThisInitialized(_this));\n _this.requestClose = _this.requestClose.bind(_assertThisInitialized(_this));\n _this.requestMoveNext = _this.requestMoveNext.bind(_assertThisInitialized(_this));\n _this.requestMovePrev = _this.requestMovePrev.bind(_assertThisInitialized(_this)); // Timeouts - always clear it before umount\n\n _this.timeouts = []; // Current action\n\n _this.currentAction = ACTION_NONE; // Events source\n\n _this.eventsSource = SOURCE_ANY; // Empty pointers list\n\n _this.pointerList = []; // Prevent inner close\n\n _this.preventInnerClose = false;\n _this.preventInnerCloseTimeout = null; // Used to disable animation when changing props.mainSrc|nextSrc|prevSrc\n\n _this.keyPressed = false; // Used to store load state / dimensions of images\n\n _this.imageCache = {}; // Time the last keydown event was called (used in keyboard action rate limiting)\n\n _this.lastKeyDownTime = 0; // Used for debouncing window resize event\n\n _this.resizeTimeout = null; // Used to determine when actions are triggered by the scroll wheel\n\n _this.wheelActionTimeout = null;\n _this.resetScrollTimeout = null;\n _this.scrollX = 0;\n _this.scrollY = 0; // Used in panning zoomed images\n\n _this.moveStartX = 0;\n _this.moveStartY = 0;\n _this.moveStartOffsetX = 0;\n _this.moveStartOffsetY = 0; // Used to swipe\n\n _this.swipeStartX = 0;\n _this.swipeStartY = 0;\n _this.swipeEndX = 0;\n _this.swipeEndY = 0; // Used to pinch\n\n _this.pinchTouchList = null;\n _this.pinchDistance = 0; // Used to differentiate between images with identical src\n\n _this.keyCounter = 0; // Used to detect a move when all src's remain unchanged (four or more of the same image in a row)\n\n _this.moveRequested = false;\n return _this;\n }\n\n _createClass(ReactImageLightbox, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n if (!this.props.animationDisabled) {\n // Make opening animation play\n this.setState({\n isClosing: false\n });\n } // Prevents cross-origin errors when using a cross-origin iframe\n\n\n this.windowContext = getHighestSafeWindowContext();\n this.listeners = {\n resize: this.handleWindowResize,\n mouseup: this.handleMouseUp,\n touchend: this.handleTouchEnd,\n touchcancel: this.handleTouchEnd,\n pointerdown: this.handlePointerEvent,\n pointermove: this.handlePointerEvent,\n pointerup: this.handlePointerEvent,\n pointercancel: this.handlePointerEvent\n };\n Object.keys(this.listeners).forEach(function (type) {\n _this2.windowContext.addEventListener(type, _this2.listeners[type]);\n });\n this.loadAllImages();\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(nextProps) {\n var _this3 = this;\n\n this.getSrcTypes().forEach(function (srcType) {\n if (_this3.props[srcType.name] !== nextProps[srcType.name]) {\n _this3.moveRequested = false;\n }\n }); // Wait for move...\n\n return !this.moveRequested;\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this4 = this;\n\n var sourcesChanged = false;\n var prevSrcDict = {};\n var nextSrcDict = {};\n this.getSrcTypes().forEach(function (srcType) {\n if (prevProps[srcType.name] !== _this4.props[srcType.name]) {\n sourcesChanged = true;\n prevSrcDict[prevProps[srcType.name]] = true;\n nextSrcDict[_this4.props[srcType.name]] = true;\n }\n });\n\n if (sourcesChanged || this.moveRequested) {\n // Reset the loaded state for images not rendered next\n Object.keys(prevSrcDict).forEach(function (prevSrc) {\n if (!(prevSrc in nextSrcDict) && prevSrc in _this4.imageCache) {\n _this4.imageCache[prevSrc].loaded = false;\n }\n });\n this.moveRequested = false; // Load any new images\n\n this.loadAllImages(this.props);\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n var _this5 = this;\n\n this.didUnmount = true;\n Object.keys(this.listeners).forEach(function (type) {\n _this5.windowContext.removeEventListener(type, _this5.listeners[type]);\n });\n this.timeouts.forEach(function (tid) {\n return clearTimeout(tid);\n });\n }\n }, {\n key: \"setTimeout\",\n value: function (_setTimeout) {\n function setTimeout(_x, _x2) {\n return _setTimeout.apply(this, arguments);\n }\n\n setTimeout.toString = function () {\n return _setTimeout.toString();\n };\n\n return setTimeout;\n }(function (func, time) {\n var _this6 = this;\n\n var id = setTimeout(function () {\n _this6.timeouts = _this6.timeouts.filter(function (tid) {\n return tid !== id;\n });\n func();\n }, time);\n this.timeouts.push(id);\n return id;\n })\n }, {\n key: \"setPreventInnerClose\",\n value: function setPreventInnerClose() {\n var _this7 = this;\n\n if (this.preventInnerCloseTimeout) {\n this.clearTimeout(this.preventInnerCloseTimeout);\n }\n\n this.preventInnerClose = true;\n this.preventInnerCloseTimeout = this.setTimeout(function () {\n _this7.preventInnerClose = false;\n _this7.preventInnerCloseTimeout = null;\n }, 100);\n } // Get info for the best suited image to display with the given srcType\n\n }, {\n key: \"getBestImageForType\",\n value: function getBestImageForType(srcType) {\n var imageSrc = this.props[srcType];\n var fitSizes = {};\n\n if (this.isImageLoaded(imageSrc)) {\n // Use full-size image if available\n fitSizes = this.getFitSizes(this.imageCache[imageSrc].width, this.imageCache[imageSrc].height);\n } else if (this.isImageLoaded(this.props[\"\".concat(srcType, \"Thumbnail\")])) {\n // Fall back to using thumbnail if the image has not been loaded\n imageSrc = this.props[\"\".concat(srcType, \"Thumbnail\")];\n fitSizes = this.getFitSizes(this.imageCache[imageSrc].width, this.imageCache[imageSrc].height, true);\n } else {\n return null;\n }\n\n return {\n src: imageSrc,\n height: this.imageCache[imageSrc].height,\n width: this.imageCache[imageSrc].width,\n targetHeight: fitSizes.height,\n targetWidth: fitSizes.width\n };\n } // Get sizing for when an image is larger than the window\n\n }, {\n key: \"getFitSizes\",\n value: function getFitSizes(width, height, stretch) {\n var boxSize = this.getLightboxRect();\n var maxHeight = boxSize.height - this.props.imagePadding * 2;\n var maxWidth = boxSize.width - this.props.imagePadding * 2;\n\n if (!stretch) {\n maxHeight = Math.min(maxHeight, height);\n maxWidth = Math.min(maxWidth, width);\n }\n\n var maxRatio = maxWidth / maxHeight;\n var srcRatio = width / height;\n\n if (maxRatio > srcRatio) {\n // height is the constraining dimension of the photo\n return {\n width: width * maxHeight / height,\n height: maxHeight\n };\n }\n\n return {\n width: maxWidth,\n height: height * maxWidth / width\n };\n }\n }, {\n key: \"getMaxOffsets\",\n value: function getMaxOffsets() {\n var zoomLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.state.zoomLevel;\n var currentImageInfo = this.getBestImageForType('mainSrc');\n\n if (currentImageInfo === null) {\n return {\n maxX: 0,\n minX: 0,\n maxY: 0,\n minY: 0\n };\n }\n\n var boxSize = this.getLightboxRect();\n var zoomMultiplier = this.getZoomMultiplier(zoomLevel);\n var maxX = 0;\n\n if (zoomMultiplier * currentImageInfo.width - boxSize.width < 0) {\n // if there is still blank space in the X dimension, don't limit except to the opposite edge\n maxX = (boxSize.width - zoomMultiplier * currentImageInfo.width) / 2;\n } else {\n maxX = (zoomMultiplier * currentImageInfo.width - boxSize.width) / 2;\n }\n\n var maxY = 0;\n\n if (zoomMultiplier * currentImageInfo.height - boxSize.height < 0) {\n // if there is still blank space in the Y dimension, don't limit except to the opposite edge\n maxY = (boxSize.height - zoomMultiplier * currentImageInfo.height) / 2;\n } else {\n maxY = (zoomMultiplier * currentImageInfo.height - boxSize.height) / 2;\n }\n\n return {\n maxX: maxX,\n maxY: maxY,\n minX: -1 * maxX,\n minY: -1 * maxY\n };\n } // Get image src types\n\n }, {\n key: \"getSrcTypes\",\n value: function getSrcTypes() {\n return [{\n name: 'mainSrc',\n keyEnding: \"i\".concat(this.keyCounter)\n }, {\n name: 'mainSrcThumbnail',\n keyEnding: \"t\".concat(this.keyCounter)\n }, {\n name: 'nextSrc',\n keyEnding: \"i\".concat(this.keyCounter + 1)\n }, {\n name: 'nextSrcThumbnail',\n keyEnding: \"t\".concat(this.keyCounter + 1)\n }, {\n name: 'prevSrc',\n keyEnding: \"i\".concat(this.keyCounter - 1)\n }, {\n name: 'prevSrcThumbnail',\n keyEnding: \"t\".concat(this.keyCounter - 1)\n }];\n }\n /**\n * Get sizing when the image is scaled\n */\n\n }, {\n key: \"getZoomMultiplier\",\n value: function getZoomMultiplier() {\n var zoomLevel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.state.zoomLevel;\n return Math.pow(ZOOM_RATIO, zoomLevel);\n }\n /**\n * Get the size of the lightbox in pixels\n */\n\n }, {\n key: \"getLightboxRect\",\n value: function getLightboxRect() {\n if (this.outerEl.current) {\n return this.outerEl.current.getBoundingClientRect();\n }\n\n return {\n width: getWindowWidth(),\n height: getWindowHeight(),\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n }\n }, {\n key: \"clearTimeout\",\n value: function (_clearTimeout) {\n function clearTimeout(_x3) {\n return _clearTimeout.apply(this, arguments);\n }\n\n clearTimeout.toString = function () {\n return _clearTimeout.toString();\n };\n\n return clearTimeout;\n }(function (id) {\n this.timeouts = this.timeouts.filter(function (tid) {\n return tid !== id;\n });\n clearTimeout(id);\n } // Change zoom level\n )\n }, {\n key: \"changeZoom\",\n value: function changeZoom(zoomLevel, clientX, clientY) {\n // Ignore if zoom disabled\n if (!this.props.enableZoom) {\n return;\n } // Constrain zoom level to the set bounds\n\n\n var nextZoomLevel = Math.max(MIN_ZOOM_LEVEL, Math.min(MAX_ZOOM_LEVEL, zoomLevel)); // Ignore requests that don't change the zoom level\n\n if (nextZoomLevel === this.state.zoomLevel) {\n return;\n }\n\n if (nextZoomLevel === MIN_ZOOM_LEVEL) {\n // Snap back to center if zoomed all the way out\n this.setState({\n zoomLevel: nextZoomLevel,\n offsetX: 0,\n offsetY: 0\n });\n return;\n }\n\n var imageBaseSize = this.getBestImageForType('mainSrc');\n\n if (imageBaseSize === null) {\n return;\n }\n\n var currentZoomMultiplier = this.getZoomMultiplier();\n var nextZoomMultiplier = this.getZoomMultiplier(nextZoomLevel); // Default to the center of the image to zoom when no mouse position specified\n\n var boxRect = this.getLightboxRect();\n var pointerX = typeof clientX !== 'undefined' ? clientX - boxRect.left : boxRect.width / 2;\n var pointerY = typeof clientY !== 'undefined' ? clientY - boxRect.top : boxRect.height / 2;\n var currentImageOffsetX = (boxRect.width - imageBaseSize.width * currentZoomMultiplier) / 2;\n var currentImageOffsetY = (boxRect.height - imageBaseSize.height * currentZoomMultiplier) / 2;\n var currentImageRealOffsetX = currentImageOffsetX - this.state.offsetX;\n var currentImageRealOffsetY = currentImageOffsetY - this.state.offsetY;\n var currentPointerXRelativeToImage = (pointerX - currentImageRealOffsetX) / currentZoomMultiplier;\n var currentPointerYRelativeToImage = (pointerY - currentImageRealOffsetY) / currentZoomMultiplier;\n var nextImageRealOffsetX = pointerX - currentPointerXRelativeToImage * nextZoomMultiplier;\n var nextImageRealOffsetY = pointerY - currentPointerYRelativeToImage * nextZoomMultiplier;\n var nextImageOffsetX = (boxRect.width - imageBaseSize.width * nextZoomMultiplier) / 2;\n var nextImageOffsetY = (boxRect.height - imageBaseSize.height * nextZoomMultiplier) / 2;\n var nextOffsetX = nextImageOffsetX - nextImageRealOffsetX;\n var nextOffsetY = nextImageOffsetY - nextImageRealOffsetY; // When zooming out, limit the offset so things don't get left askew\n\n if (this.currentAction !== ACTION_PINCH) {\n var maxOffsets = this.getMaxOffsets();\n\n if (this.state.zoomLevel > nextZoomLevel) {\n nextOffsetX = Math.max(maxOffsets.minX, Math.min(maxOffsets.maxX, nextOffsetX));\n nextOffsetY = Math.max(maxOffsets.minY, Math.min(maxOffsets.maxY, nextOffsetY));\n }\n }\n\n this.setState({\n zoomLevel: nextZoomLevel,\n offsetX: nextOffsetX,\n offsetY: nextOffsetY\n });\n }\n }, {\n key: \"closeIfClickInner\",\n value: function closeIfClickInner(event) {\n if (!this.preventInnerClose && event.target.className.search(/\\bril-inner\\b/) > -1) {\n this.requestClose(event);\n }\n }\n /**\n * Handle user keyboard actions\n */\n\n }, {\n key: \"handleKeyInput\",\n value: function handleKeyInput(event) {\n event.stopPropagation(); // Ignore key input during animations\n\n if (this.isAnimating()) {\n return;\n } // Allow slightly faster navigation through the images when user presses keys repeatedly\n\n\n if (event.type === 'keyup') {\n this.lastKeyDownTime -= this.props.keyRepeatKeyupBonus;\n return;\n }\n\n var keyCode = event.which || event.keyCode; // Ignore key presses that happen too close to each other (when rapid fire key pressing or holding down the key)\n // But allow it if it's a lightbox closing action\n\n var currentTime = new Date();\n\n if (currentTime.getTime() - this.lastKeyDownTime < this.props.keyRepeatLimit && keyCode !== KEYS.ESC) {\n return;\n }\n\n this.lastKeyDownTime = currentTime.getTime();\n\n switch (keyCode) {\n // ESC key closes the lightbox\n case KEYS.ESC:\n event.preventDefault();\n this.requestClose(event);\n break;\n // Left arrow key moves to previous image\n\n case KEYS.LEFT_ARROW:\n if (!this.props.prevSrc) {\n return;\n }\n\n event.preventDefault();\n this.keyPressed = true;\n this.requestMovePrev(event);\n break;\n // Right arrow key moves to next image\n\n case KEYS.RIGHT_ARROW:\n if (!this.props.nextSrc) {\n return;\n }\n\n event.preventDefault();\n this.keyPressed = true;\n this.requestMoveNext(event);\n break;\n }\n }\n /**\n * Handle a mouse wheel event over the lightbox container\n */\n\n }, {\n key: \"handleOuterMousewheel\",\n value: function handleOuterMousewheel(event) {\n var _this8 = this; // Prevent scrolling of the background\n\n\n event.stopPropagation();\n var xThreshold = WHEEL_MOVE_X_THRESHOLD;\n var actionDelay = 0;\n var imageMoveDelay = 500;\n this.clearTimeout(this.resetScrollTimeout);\n this.resetScrollTimeout = this.setTimeout(function () {\n _this8.scrollX = 0;\n _this8.scrollY = 0;\n }, 300); // Prevent rapid-fire zoom behavior\n\n if (this.wheelActionTimeout !== null || this.isAnimating()) {\n return;\n }\n\n if (Math.abs(event.deltaY) < Math.abs(event.deltaX)) {\n // handle horizontal scrolls with image moves\n this.scrollY = 0;\n this.scrollX += event.deltaX;\n var bigLeapX = xThreshold / 2; // If the scroll amount has accumulated sufficiently, or a large leap was taken\n\n if (this.scrollX >= xThreshold || event.deltaX >= bigLeapX) {\n // Scroll right moves to next\n this.requestMoveNext(event);\n actionDelay = imageMoveDelay;\n this.scrollX = 0;\n } else if (this.scrollX <= -1 * xThreshold || event.deltaX <= -1 * bigLeapX) {\n // Scroll left moves to previous\n this.requestMovePrev(event);\n actionDelay = imageMoveDelay;\n this.scrollX = 0;\n }\n } // Allow successive actions after the set delay\n\n\n if (actionDelay !== 0) {\n this.wheelActionTimeout = this.setTimeout(function () {\n _this8.wheelActionTimeout = null;\n }, actionDelay);\n }\n }\n }, {\n key: \"handleImageMouseWheel\",\n value: function handleImageMouseWheel(event) {\n var yThreshold = WHEEL_MOVE_Y_THRESHOLD;\n\n if (Math.abs(event.deltaY) >= Math.abs(event.deltaX)) {\n event.stopPropagation(); // If the vertical scroll amount was large enough, perform a zoom\n\n if (Math.abs(event.deltaY) < yThreshold) {\n return;\n }\n\n this.scrollX = 0;\n this.scrollY += event.deltaY;\n this.changeZoom(this.state.zoomLevel - event.deltaY, event.clientX, event.clientY);\n }\n }\n /**\n * Handle a double click on the current image\n */\n\n }, {\n key: \"handleImageDoubleClick\",\n value: function handleImageDoubleClick(event) {\n if (this.state.zoomLevel > MIN_ZOOM_LEVEL) {\n // A double click when zoomed in zooms all the way out\n this.changeZoom(MIN_ZOOM_LEVEL, event.clientX, event.clientY);\n } else {\n // A double click when zoomed all the way out zooms in\n this.changeZoom(this.state.zoomLevel + ZOOM_BUTTON_INCREMENT_SIZE, event.clientX, event.clientY);\n }\n }\n }, {\n key: \"shouldHandleEvent\",\n value: function shouldHandleEvent(source) {\n if (this.eventsSource === source) {\n return true;\n }\n\n if (this.eventsSource === SOURCE_ANY) {\n this.eventsSource = source;\n return true;\n }\n\n switch (source) {\n case SOURCE_MOUSE:\n return false;\n\n case SOURCE_TOUCH:\n this.eventsSource = SOURCE_TOUCH;\n this.filterPointersBySource();\n return true;\n\n case SOURCE_POINTER:\n if (this.eventsSource === SOURCE_MOUSE) {\n this.eventsSource = SOURCE_POINTER;\n this.filterPointersBySource();\n return true;\n }\n\n return false;\n\n default:\n return false;\n }\n }\n }, {\n key: \"addPointer\",\n value: function addPointer(pointer) {\n this.pointerList.push(pointer);\n }\n }, {\n key: \"removePointer\",\n value: function removePointer(pointer) {\n this.pointerList = this.pointerList.filter(function (_ref) {\n var id = _ref.id;\n return id !== pointer.id;\n });\n }\n }, {\n key: \"filterPointersBySource\",\n value: function filterPointersBySource() {\n var _this9 = this;\n\n this.pointerList = this.pointerList.filter(function (_ref2) {\n var source = _ref2.source;\n return source === _this9.eventsSource;\n });\n }\n }, {\n key: \"handleMouseDown\",\n value: function handleMouseDown(event) {\n if (this.shouldHandleEvent(SOURCE_MOUSE) && ReactImageLightbox.isTargetMatchImage(event.target)) {\n this.addPointer(ReactImageLightbox.parseMouseEvent(event));\n this.multiPointerStart(event);\n }\n }\n }, {\n key: \"handleMouseMove\",\n value: function handleMouseMove(event) {\n if (this.shouldHandleEvent(SOURCE_MOUSE)) {\n this.multiPointerMove(event, [ReactImageLightbox.parseMouseEvent(event)]);\n }\n }\n }, {\n key: \"handleMouseUp\",\n value: function handleMouseUp(event) {\n if (this.shouldHandleEvent(SOURCE_MOUSE)) {\n this.removePointer(ReactImageLightbox.parseMouseEvent(event));\n this.multiPointerEnd(event);\n }\n }\n }, {\n key: \"handlePointerEvent\",\n value: function handlePointerEvent(event) {\n if (this.shouldHandleEvent(SOURCE_POINTER)) {\n switch (event.type) {\n case 'pointerdown':\n if (ReactImageLightbox.isTargetMatchImage(event.target)) {\n this.addPointer(ReactImageLightbox.parsePointerEvent(event));\n this.multiPointerStart(event);\n }\n\n break;\n\n case 'pointermove':\n this.multiPointerMove(event, [ReactImageLightbox.parsePointerEvent(event)]);\n break;\n\n case 'pointerup':\n case 'pointercancel':\n this.removePointer(ReactImageLightbox.parsePointerEvent(event));\n this.multiPointerEnd(event);\n break;\n }\n }\n }\n }, {\n key: \"handleTouchStart\",\n value: function handleTouchStart(event) {\n var _this10 = this;\n\n if (this.shouldHandleEvent(SOURCE_TOUCH) && ReactImageLightbox.isTargetMatchImage(event.target)) {\n [].forEach.call(event.changedTouches, function (eventTouch) {\n return _this10.addPointer(ReactImageLightbox.parseTouchPointer(eventTouch));\n });\n this.multiPointerStart(event);\n }\n }\n }, {\n key: \"handleTouchMove\",\n value: function handleTouchMove(event) {\n if (this.shouldHandleEvent(SOURCE_TOUCH)) {\n this.multiPointerMove(event, [].map.call(event.changedTouches, function (eventTouch) {\n return ReactImageLightbox.parseTouchPointer(eventTouch);\n }));\n }\n }\n }, {\n key: \"handleTouchEnd\",\n value: function handleTouchEnd(event) {\n var _this11 = this;\n\n if (this.shouldHandleEvent(SOURCE_TOUCH)) {\n [].map.call(event.changedTouches, function (touch) {\n return _this11.removePointer(ReactImageLightbox.parseTouchPointer(touch));\n });\n this.multiPointerEnd(event);\n }\n }\n }, {\n key: \"decideMoveOrSwipe\",\n value: function decideMoveOrSwipe(pointer) {\n if (this.state.zoomLevel <= MIN_ZOOM_LEVEL) {\n this.handleSwipeStart(pointer);\n } else {\n this.handleMoveStart(pointer);\n }\n }\n }, {\n key: \"multiPointerStart\",\n value: function multiPointerStart(event) {\n this.handleEnd(null);\n\n switch (this.pointerList.length) {\n case 1:\n {\n event.preventDefault();\n this.decideMoveOrSwipe(this.pointerList[0]);\n break;\n }\n\n case 2:\n {\n event.preventDefault();\n this.handlePinchStart(this.pointerList);\n break;\n }\n }\n }\n }, {\n key: \"multiPointerMove\",\n value: function multiPointerMove(event, pointerList) {\n switch (this.currentAction) {\n case ACTION_MOVE:\n {\n event.preventDefault();\n this.handleMove(pointerList[0]);\n break;\n }\n\n case ACTION_SWIPE:\n {\n event.preventDefault();\n this.handleSwipe(pointerList[0]);\n break;\n }\n\n case ACTION_PINCH:\n {\n event.preventDefault();\n this.handlePinch(pointerList);\n break;\n }\n }\n }\n }, {\n key: \"multiPointerEnd\",\n value: function multiPointerEnd(event) {\n if (this.currentAction !== ACTION_NONE) {\n this.setPreventInnerClose();\n this.handleEnd(event);\n }\n\n switch (this.pointerList.length) {\n case 0:\n {\n this.eventsSource = SOURCE_ANY;\n break;\n }\n\n case 1:\n {\n event.preventDefault();\n this.decideMoveOrSwipe(this.pointerList[0]);\n break;\n }\n\n case 2:\n {\n event.preventDefault();\n this.handlePinchStart(this.pointerList);\n break;\n }\n }\n }\n }, {\n key: \"handleEnd\",\n value: function handleEnd(event) {\n switch (this.currentAction) {\n case ACTION_MOVE:\n this.handleMoveEnd(event);\n break;\n\n case ACTION_SWIPE:\n this.handleSwipeEnd(event);\n break;\n\n case ACTION_PINCH:\n this.handlePinchEnd(event);\n break;\n }\n } // Handle move start over the lightbox container\n // This happens:\n // - On a mouseDown event\n // - On a touchstart event\n\n }, {\n key: \"handleMoveStart\",\n value: function handleMoveStart(_ref3) {\n var clientX = _ref3.x,\n clientY = _ref3.y;\n\n if (!this.props.enableZoom) {\n return;\n }\n\n this.currentAction = ACTION_MOVE;\n this.moveStartX = clientX;\n this.moveStartY = clientY;\n this.moveStartOffsetX = this.state.offsetX;\n this.moveStartOffsetY = this.state.offsetY;\n } // Handle dragging over the lightbox container\n // This happens:\n // - After a mouseDown and before a mouseUp event\n // - After a touchstart and before a touchend event\n\n }, {\n key: \"handleMove\",\n value: function handleMove(_ref4) {\n var clientX = _ref4.x,\n clientY = _ref4.y;\n var newOffsetX = this.moveStartX - clientX + this.moveStartOffsetX;\n var newOffsetY = this.moveStartY - clientY + this.moveStartOffsetY;\n\n if (this.state.offsetX !== newOffsetX || this.state.offsetY !== newOffsetY) {\n this.setState({\n offsetX: newOffsetX,\n offsetY: newOffsetY\n });\n }\n }\n }, {\n key: \"handleMoveEnd\",\n value: function handleMoveEnd() {\n var _this12 = this;\n\n this.currentAction = ACTION_NONE;\n this.moveStartX = 0;\n this.moveStartY = 0;\n this.moveStartOffsetX = 0;\n this.moveStartOffsetY = 0; // Snap image back into frame if outside max offset range\n\n var maxOffsets = this.getMaxOffsets();\n var nextOffsetX = Math.max(maxOffsets.minX, Math.min(maxOffsets.maxX, this.state.offsetX));\n var nextOffsetY = Math.max(maxOffsets.minY, Math.min(maxOffsets.maxY, this.state.offsetY));\n\n if (nextOffsetX !== this.state.offsetX || nextOffsetY !== this.state.offsetY) {\n this.setState({\n offsetX: nextOffsetX,\n offsetY: nextOffsetY,\n shouldAnimate: true\n });\n this.setTimeout(function () {\n _this12.setState({\n shouldAnimate: false\n });\n }, this.props.animationDuration);\n }\n }\n }, {\n key: \"handleSwipeStart\",\n value: function handleSwipeStart(_ref5) {\n var clientX = _ref5.x,\n clientY = _ref5.y;\n this.currentAction = ACTION_SWIPE;\n this.swipeStartX = clientX;\n this.swipeStartY = clientY;\n this.swipeEndX = clientX;\n this.swipeEndY = clientY;\n }\n }, {\n key: \"handleSwipe\",\n value: function handleSwipe(_ref6) {\n var clientX = _ref6.x,\n clientY = _ref6.y;\n this.swipeEndX = clientX;\n this.swipeEndY = clientY;\n }\n }, {\n key: \"handleSwipeEnd\",\n value: function handleSwipeEnd(event) {\n var xDiff = this.swipeEndX - this.swipeStartX;\n var xDiffAbs = Math.abs(xDiff);\n var yDiffAbs = Math.abs(this.swipeEndY - this.swipeStartY);\n this.currentAction = ACTION_NONE;\n this.swipeStartX = 0;\n this.swipeStartY = 0;\n this.swipeEndX = 0;\n this.swipeEndY = 0;\n\n if (!event || this.isAnimating() || xDiffAbs < yDiffAbs * 1.5) {\n return;\n }\n\n if (xDiffAbs < MIN_SWIPE_DISTANCE) {\n var boxRect = this.getLightboxRect();\n\n if (xDiffAbs < boxRect.width / 4) {\n return;\n }\n }\n\n if (xDiff > 0 && this.props.prevSrc) {\n event.preventDefault();\n this.requestMovePrev();\n } else if (xDiff < 0 && this.props.nextSrc) {\n event.preventDefault();\n this.requestMoveNext();\n }\n }\n }, {\n key: \"calculatePinchDistance\",\n value: function calculatePinchDistance() {\n var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pinchTouchList,\n _ref8 = _slicedToArray(_ref7, 2),\n a = _ref8[0],\n b = _ref8[1];\n\n return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2));\n }\n }, {\n key: \"calculatePinchCenter\",\n value: function calculatePinchCenter() {\n var _ref9 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.pinchTouchList,\n _ref10 = _slicedToArray(_ref9, 2),\n a = _ref10[0],\n b = _ref10[1];\n\n return {\n x: a.x - (a.x - b.x) / 2,\n y: a.y - (a.y - b.y) / 2\n };\n }\n }, {\n key: \"handlePinchStart\",\n value: function handlePinchStart(pointerList) {\n if (!this.props.enableZoom) {\n return;\n }\n\n this.currentAction = ACTION_PINCH;\n this.pinchTouchList = pointerList.map(function (_ref11) {\n var id = _ref11.id,\n x = _ref11.x,\n y = _ref11.y;\n return {\n id: id,\n x: x,\n y: y\n };\n });\n this.pinchDistance = this.calculatePinchDistance();\n }\n }, {\n key: \"handlePinch\",\n value: function handlePinch(pointerList) {\n this.pinchTouchList = this.pinchTouchList.map(function (oldPointer) {\n for (var i = 0; i < pointerList.length; i += 1) {\n if (pointerList[i].id === oldPointer.id) {\n return pointerList[i];\n }\n }\n\n return oldPointer;\n });\n var newDistance = this.calculatePinchDistance();\n var zoomLevel = this.state.zoomLevel + newDistance - this.pinchDistance;\n this.pinchDistance = newDistance;\n\n var _this$calculatePinchC = this.calculatePinchCenter(this.pinchTouchList),\n clientX = _this$calculatePinchC.x,\n clientY = _this$calculatePinchC.y;\n\n this.changeZoom(zoomLevel, clientX, clientY);\n }\n }, {\n key: \"handlePinchEnd\",\n value: function handlePinchEnd() {\n this.currentAction = ACTION_NONE;\n this.pinchTouchList = null;\n this.pinchDistance = 0;\n } // Handle the window resize event\n\n }, {\n key: \"handleWindowResize\",\n value: function handleWindowResize() {\n this.clearTimeout(this.resizeTimeout);\n this.resizeTimeout = this.setTimeout(this.forceUpdate.bind(this), 100);\n }\n }, {\n key: \"handleZoomInButtonClick\",\n value: function handleZoomInButtonClick() {\n var nextZoomLevel = this.state.zoomLevel + ZOOM_BUTTON_INCREMENT_SIZE;\n this.changeZoom(nextZoomLevel);\n\n if (nextZoomLevel === MAX_ZOOM_LEVEL) {\n this.zoomOutBtn.current.focus();\n }\n }\n }, {\n key: \"handleZoomOutButtonClick\",\n value: function handleZoomOutButtonClick() {\n var nextZoomLevel = this.state.zoomLevel - ZOOM_BUTTON_INCREMENT_SIZE;\n this.changeZoom(nextZoomLevel);\n\n if (nextZoomLevel === MIN_ZOOM_LEVEL) {\n this.zoomInBtn.current.focus();\n }\n }\n }, {\n key: \"handleCaptionMousewheel\",\n value: function handleCaptionMousewheel(event) {\n event.stopPropagation();\n\n if (!this.caption.current) {\n return;\n }\n\n var _this$caption$current = this.caption.current.getBoundingClientRect(),\n height = _this$caption$current.height;\n\n var _this$caption$current2 = this.caption.current,\n scrollHeight = _this$caption$current2.scrollHeight,\n scrollTop = _this$caption$current2.scrollTop;\n\n if (event.deltaY > 0 && height + scrollTop >= scrollHeight || event.deltaY < 0 && scrollTop <= 0) {\n event.preventDefault();\n }\n } // Detach key and mouse input events\n\n }, {\n key: \"isAnimating\",\n value: function isAnimating() {\n return this.state.shouldAnimate || this.state.isClosing;\n } // Check if image is loaded\n\n }, {\n key: \"isImageLoaded\",\n value: function isImageLoaded(imageSrc) {\n return imageSrc && imageSrc in this.imageCache && this.imageCache[imageSrc].loaded;\n } // Load image from src and call callback with image width and height on load\n\n }, {\n key: \"loadImage\",\n value: function loadImage(srcType, imageSrc, done) {\n var _this13 = this; // Return the image info if it is already cached\n\n\n if (this.isImageLoaded(imageSrc)) {\n this.setTimeout(function () {\n done();\n }, 1);\n return;\n }\n\n var inMemoryImage = new global.Image();\n\n if (this.props.imageCrossOrigin) {\n inMemoryImage.crossOrigin = this.props.imageCrossOrigin;\n }\n\n inMemoryImage.onerror = function (errorEvent) {\n _this13.props.onImageLoadError(imageSrc, srcType, errorEvent); // failed to load so set the state loadErrorStatus\n\n\n _this13.setState(function (prevState) {\n return {\n loadErrorStatus: _objectSpread2(_objectSpread2({}, prevState.loadErrorStatus), {}, _defineProperty({}, srcType, true))\n };\n });\n\n done(errorEvent);\n };\n\n inMemoryImage.onload = function () {\n _this13.props.onImageLoad(imageSrc, srcType, inMemoryImage);\n\n _this13.imageCache[imageSrc] = {\n loaded: true,\n width: inMemoryImage.width,\n height: inMemoryImage.height\n };\n done();\n };\n\n inMemoryImage.src = imageSrc;\n } // Load all images and their thumbnails\n\n }, {\n key: \"loadAllImages\",\n value: function loadAllImages() {\n var _this14 = this;\n\n var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props;\n\n var generateLoadDoneCallback = function generateLoadDoneCallback(srcType, imageSrc) {\n return function (err) {\n // Give up showing image on error\n if (err) {\n return;\n } // Don't rerender if the src is not the same as when the load started\n // or if the component has unmounted\n\n\n if (_this14.props[srcType] !== imageSrc || _this14.didUnmount) {\n return;\n } // Force rerender with the new image\n\n\n _this14.forceUpdate();\n };\n }; // Load the images\n\n\n this.getSrcTypes().forEach(function (srcType) {\n var type = srcType.name; // there is no error when we try to load it initially\n\n if (props[type] && _this14.state.loadErrorStatus[type]) {\n _this14.setState(function (prevState) {\n return {\n loadErrorStatus: _objectSpread2(_objectSpread2({}, prevState.loadErrorStatus), {}, _defineProperty({}, type, false))\n };\n });\n } // Load unloaded images\n\n\n if (props[type] && !_this14.isImageLoaded(props[type])) {\n _this14.loadImage(type, props[type], generateLoadDoneCallback(type, props[type]));\n }\n });\n } // Request that the lightbox be closed\n\n }, {\n key: \"requestClose\",\n value: function requestClose(event) {\n var _this15 = this; // Call the parent close request\n\n\n var closeLightbox = function closeLightbox() {\n return _this15.props.onCloseRequest(event);\n };\n\n if (this.props.animationDisabled || event.type === 'keydown' && !this.props.animationOnKeyInput) {\n // No animation\n closeLightbox();\n return;\n } // With animation\n // Start closing animation\n\n\n this.setState({\n isClosing: true\n }); // Perform the actual closing at the end of the animation\n\n this.setTimeout(closeLightbox, this.props.animationDuration);\n }\n }, {\n key: \"requestMove\",\n value: function requestMove(direction, event) {\n var _this16 = this; // Reset the zoom level on image move\n\n\n var nextState = {\n zoomLevel: MIN_ZOOM_LEVEL,\n offsetX: 0,\n offsetY: 0\n }; // Enable animated states\n\n if (!this.props.animationDisabled && (!this.keyPressed || this.props.animationOnKeyInput)) {\n nextState.shouldAnimate = true;\n this.setTimeout(function () {\n return _this16.setState({\n shouldAnimate: false\n });\n }, this.props.animationDuration);\n }\n\n this.keyPressed = false;\n this.moveRequested = true;\n\n if (direction === 'prev') {\n this.keyCounter -= 1;\n this.setState(nextState);\n this.props.onMovePrevRequest(event);\n } else {\n this.keyCounter += 1;\n this.setState(nextState);\n this.props.onMoveNextRequest(event);\n }\n } // Request to transition to the next image\n\n }, {\n key: \"requestMoveNext\",\n value: function requestMoveNext(event) {\n this.requestMove('next', event);\n } // Request to transition to the previous image\n\n }, {\n key: \"requestMovePrev\",\n value: function requestMovePrev(event) {\n this.requestMove('prev', event);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this17 = this;\n\n var _this$props = this.props,\n animationDisabled = _this$props.animationDisabled,\n animationDuration = _this$props.animationDuration,\n clickOutsideToClose = _this$props.clickOutsideToClose,\n discourageDownloads = _this$props.discourageDownloads,\n enableZoom = _this$props.enableZoom,\n imageTitle = _this$props.imageTitle,\n nextSrc = _this$props.nextSrc,\n prevSrc = _this$props.prevSrc,\n toolbarButtons = _this$props.toolbarButtons,\n reactModalStyle = _this$props.reactModalStyle,\n _onAfterOpen = _this$props.onAfterOpen,\n imageCrossOrigin = _this$props.imageCrossOrigin,\n reactModalProps = _this$props.reactModalProps,\n loader = _this$props.loader;\n var _this$state = this.state,\n zoomLevel = _this$state.zoomLevel,\n offsetX = _this$state.offsetX,\n offsetY = _this$state.offsetY,\n isClosing = _this$state.isClosing,\n loadErrorStatus = _this$state.loadErrorStatus;\n var boxSize = this.getLightboxRect();\n var transitionStyle = {}; // Transition settings for sliding animations\n\n if (!animationDisabled && this.isAnimating()) {\n transitionStyle = _objectSpread2(_objectSpread2({}, transitionStyle), {}, {\n transition: \"transform \".concat(animationDuration, \"ms\")\n });\n } // Key endings to differentiate between images with the same src\n\n\n var keyEndings = {};\n this.getSrcTypes().forEach(function (_ref12) {\n var name = _ref12.name,\n keyEnding = _ref12.keyEnding;\n keyEndings[name] = keyEnding;\n }); // Images to be displayed\n\n var images = [];\n\n var addImage = function addImage(srcType, imageClass, transforms) {\n // Ignore types that have no source defined for their full size image\n if (!_this17.props[srcType]) {\n return;\n }\n\n var bestImageInfo = _this17.getBestImageForType(srcType);\n\n var imageStyle = _objectSpread2(_objectSpread2({}, transitionStyle), ReactImageLightbox.getTransform(_objectSpread2(_objectSpread2({}, transforms), bestImageInfo)));\n\n if (zoomLevel > MIN_ZOOM_LEVEL) {\n imageStyle.cursor = 'move';\n } // support IE 9 and 11\n\n\n var hasTrueValue = function hasTrueValue(object) {\n return Object.keys(object).some(function (key) {\n return object[key];\n });\n }; // when error on one of the loads then push custom error stuff\n\n\n if (bestImageInfo === null && hasTrueValue(loadErrorStatus)) {\n images.push( /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(imageClass, \" ril__image ril-errored\"),\n style: imageStyle,\n key: _this17.props[srcType] + keyEndings[srcType]\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"ril__errorContainer\"\n }, _this17.props.imageLoadErrorMessage)));\n return;\n }\n\n if (bestImageInfo === null) {\n var loadingIcon = loader !== undefined ? loader : /*#__PURE__*/React.createElement(\"div\", {\n className: \"ril-loading-circle ril__loadingCircle ril__loadingContainer__icon\"\n }, _toConsumableArray(new Array(12)).map(function (_, index) {\n return /*#__PURE__*/React.createElement(\"div\", {\n // eslint-disable-next-line react/no-array-index-key\n key: index,\n className: \"ril-loading-circle-point ril__loadingCirclePoint\"\n });\n })); // Fall back to loading icon if the thumbnail has not been loaded\n\n images.push( /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(imageClass, \" ril__image ril-not-loaded\"),\n style: imageStyle,\n key: _this17.props[srcType] + keyEndings[srcType]\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"ril__loadingContainer\"\n }, loadingIcon)));\n return;\n }\n\n var imageSrc = bestImageInfo.src;\n\n if (discourageDownloads) {\n imageStyle.backgroundImage = \"url('\".concat(imageSrc, \"')\");\n images.push( /*#__PURE__*/React.createElement(\"div\", {\n className: \"\".concat(imageClass, \" ril__image ril__imageDiscourager\"),\n onDoubleClick: _this17.handleImageDoubleClick,\n onWheel: _this17.handleImageMouseWheel,\n style: imageStyle,\n key: imageSrc + keyEndings[srcType]\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"ril-download-blocker ril__downloadBlocker\"\n })));\n } else {\n images.push( /*#__PURE__*/React.createElement(\"img\", _extends({}, imageCrossOrigin ? {\n crossOrigin: imageCrossOrigin\n } : {}, {\n className: \"\".concat(imageClass, \" ril__image\"),\n onDoubleClick: _this17.handleImageDoubleClick,\n onWheel: _this17.handleImageMouseWheel,\n onDragStart: function onDragStart(e) {\n return e.preventDefault();\n },\n style: imageStyle,\n src: imageSrc,\n key: imageSrc + keyEndings[srcType],\n alt: typeof imageTitle === 'string' ? imageTitle : translate('Image'),\n draggable: false\n })));\n }\n };\n\n var zoomMultiplier = this.getZoomMultiplier(); // Next Image (displayed on the right)\n\n addImage('nextSrc', 'ril-image-next ril__imageNext', {\n x: boxSize.width\n }); // Main Image\n\n addImage('mainSrc', 'ril-image-current', {\n x: -1 * offsetX,\n y: -1 * offsetY,\n zoom: zoomMultiplier\n }); // Previous Image (displayed on the left)\n\n addImage('prevSrc', 'ril-image-prev ril__imagePrev', {\n x: -1 * boxSize.width\n });\n var modalStyle = {\n overlay: _objectSpread2({\n zIndex: 1000,\n backgroundColor: 'transparent'\n }, reactModalStyle.overlay),\n content: _objectSpread2({\n backgroundColor: 'transparent',\n overflow: 'hidden',\n // Needed, otherwise keyboard shortcuts scroll the page\n border: 'none',\n borderRadius: 0,\n padding: 0,\n top: 0,\n left: 0,\n right: 0,\n bottom: 0\n }, reactModalStyle.content)\n };\n return /*#__PURE__*/React.createElement(Modal, _extends({\n isOpen: true,\n onRequestClose: clickOutsideToClose ? this.requestClose : undefined,\n onAfterOpen: function onAfterOpen() {\n // Focus on the div with key handlers\n if (_this17.outerEl.current) {\n _this17.outerEl.current.focus();\n }\n\n _onAfterOpen();\n },\n style: modalStyle,\n contentLabel: translate('Lightbox'),\n appElement: typeof global.window !== 'undefined' ? global.window.document.body : undefined\n }, reactModalProps), /*#__PURE__*/React.createElement(\"div\", {\n // eslint-disable-line jsx-a11y/no-static-element-interactions\n // Floating modal with closing animations\n className: \"ril-outer ril__outer ril__outerAnimating \".concat(this.props.wrapperClassName, \" \").concat(isClosing ? 'ril-closing ril__outerClosing' : ''),\n style: {\n transition: \"opacity \".concat(animationDuration, \"ms\"),\n animationDuration: \"\".concat(animationDuration, \"ms\"),\n animationDirection: isClosing ? 'normal' : 'reverse'\n },\n ref: this.outerEl,\n onWheel: this.handleOuterMousewheel,\n onMouseMove: this.handleMouseMove,\n onMouseDown: this.handleMouseDown,\n onTouchStart: this.handleTouchStart,\n onTouchMove: this.handleTouchMove,\n tabIndex: \"-1\" // Enables key handlers on div\n ,\n onKeyDown: this.handleKeyInput,\n onKeyUp: this.handleKeyInput\n }, /*#__PURE__*/React.createElement(\"div\", {\n // eslint-disable-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events\n // Image holder\n className: \"ril-inner ril__inner\",\n onClick: clickOutsideToClose ? this.closeIfClickInner : undefined\n }, images), prevSrc && /*#__PURE__*/React.createElement(\"button\", {\n // Move to previous image button\n type: \"button\",\n className: \"ril-prev-button ril__navButtons ril__navButtonPrev\",\n key: \"prev\",\n \"aria-label\": this.props.prevLabel,\n title: this.props.prevLabel,\n onClick: !this.isAnimating() ? this.requestMovePrev : undefined // Ignore clicks during animation\n\n }), nextSrc && /*#__PURE__*/React.createElement(\"button\", {\n // Move to next image button\n type: \"button\",\n className: \"ril-next-button ril__navButtons ril__navButtonNext\",\n key: \"next\",\n \"aria-label\": this.props.nextLabel,\n title: this.props.nextLabel,\n onClick: !this.isAnimating() ? this.requestMoveNext : undefined // Ignore clicks during animation\n\n }), /*#__PURE__*/React.createElement(\"div\", {\n // Lightbox toolbar\n className: \"ril-toolbar ril__toolbar\"\n }, /*#__PURE__*/React.createElement(\"ul\", {\n className: \"ril-toolbar-left ril__toolbarSide ril__toolbarLeftSide\"\n }, /*#__PURE__*/React.createElement(\"li\", {\n className: \"ril-toolbar__item ril__toolbarItem\"\n }, /*#__PURE__*/React.createElement(\"span\", {\n className: \"ril-toolbar__item__child ril__toolbarItemChild\"\n }, imageTitle))), /*#__PURE__*/React.createElement(\"ul\", {\n className: \"ril-toolbar-right ril__toolbarSide ril__toolbarRightSide\"\n }, toolbarButtons && toolbarButtons.map(function (button, i) {\n return /*#__PURE__*/React.createElement(\"li\", {\n key: \"button_\".concat(i + 1),\n className: \"ril-toolbar__item ril__toolbarItem\"\n }, button);\n }), enableZoom && /*#__PURE__*/React.createElement(\"li\", {\n className: \"ril-toolbar__item ril__toolbarItem\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n // Lightbox zoom in button\n type: \"button\",\n key: \"zoom-in\",\n \"aria-label\": this.props.zoomInLabel,\n title: this.props.zoomInLabel,\n className: ['ril-zoom-in', 'ril__toolbarItemChild', 'ril__builtinButton', 'ril__zoomInButton'].concat(_toConsumableArray(zoomLevel === MAX_ZOOM_LEVEL ? ['ril__builtinButtonDisabled'] : [])).join(' '),\n ref: this.zoomInBtn,\n disabled: this.isAnimating() || zoomLevel === MAX_ZOOM_LEVEL,\n onClick: !this.isAnimating() && zoomLevel !== MAX_ZOOM_LEVEL ? this.handleZoomInButtonClick : undefined\n })), enableZoom && /*#__PURE__*/React.createElement(\"li\", {\n className: \"ril-toolbar__item ril__toolbarItem\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n // Lightbox zoom out button\n type: \"button\",\n key: \"zoom-out\",\n \"aria-label\": this.props.zoomOutLabel,\n title: this.props.zoomOutLabel,\n className: ['ril-zoom-out', 'ril__toolbarItemChild', 'ril__builtinButton', 'ril__zoomOutButton'].concat(_toConsumableArray(zoomLevel === MIN_ZOOM_LEVEL ? ['ril__builtinButtonDisabled'] : [])).join(' '),\n ref: this.zoomOutBtn,\n disabled: this.isAnimating() || zoomLevel === MIN_ZOOM_LEVEL,\n onClick: !this.isAnimating() && zoomLevel !== MIN_ZOOM_LEVEL ? this.handleZoomOutButtonClick : undefined\n })), /*#__PURE__*/React.createElement(\"li\", {\n className: \"ril-toolbar__item ril__toolbarItem\"\n }, /*#__PURE__*/React.createElement(\"button\", {\n // Lightbox close button\n type: \"button\",\n key: \"close\",\n \"aria-label\": this.props.closeLabel,\n title: this.props.closeLabel,\n className: \"ril-close ril-toolbar__item__child ril__toolbarItemChild ril__builtinButton ril__closeButton\",\n onClick: !this.isAnimating() ? this.requestClose : undefined // Ignore clicks during animation\n\n })))), this.props.imageCaption &&\n /*#__PURE__*/\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n React.createElement(\"div\", {\n // Image caption\n onWheel: this.handleCaptionMousewheel,\n onMouseDown: function onMouseDown(event) {\n return event.stopPropagation();\n },\n className: \"ril-caption ril__caption\",\n ref: this.caption\n }, /*#__PURE__*/React.createElement(\"div\", {\n className: \"ril-caption-content ril__captionContent\"\n }, this.props.imageCaption))));\n }\n }], [{\n key: \"isTargetMatchImage\",\n value: function isTargetMatchImage(target) {\n return target && /ril-image-current/.test(target.className);\n }\n }, {\n key: \"parseMouseEvent\",\n value: function parseMouseEvent(mouseEvent) {\n return {\n id: 'mouse',\n source: SOURCE_MOUSE,\n x: parseInt(mouseEvent.clientX, 10),\n y: parseInt(mouseEvent.clientY, 10)\n };\n }\n }, {\n key: \"parseTouchPointer\",\n value: function parseTouchPointer(touchPointer) {\n return {\n id: touchPointer.identifier,\n source: SOURCE_TOUCH,\n x: parseInt(touchPointer.clientX, 10),\n y: parseInt(touchPointer.clientY, 10)\n };\n }\n }, {\n key: \"parsePointerEvent\",\n value: function parsePointerEvent(pointerEvent) {\n return {\n id: pointerEvent.pointerId,\n source: SOURCE_POINTER,\n x: parseInt(pointerEvent.clientX, 10),\n y: parseInt(pointerEvent.clientY, 10)\n };\n } // Request to transition to the previous image\n\n }, {\n key: \"getTransform\",\n value: function getTransform(_ref13) {\n var _ref13$x = _ref13.x,\n x = _ref13$x === void 0 ? 0 : _ref13$x,\n _ref13$y = _ref13.y,\n y = _ref13$y === void 0 ? 0 : _ref13$y,\n _ref13$zoom = _ref13.zoom,\n zoom = _ref13$zoom === void 0 ? 1 : _ref13$zoom,\n width = _ref13.width,\n targetWidth = _ref13.targetWidth;\n var nextX = x;\n var windowWidth = getWindowWidth();\n\n if (width > windowWidth) {\n nextX += (windowWidth - width) / 2;\n }\n\n var scaleFactor = zoom * (targetWidth / width);\n return {\n transform: \"translate3d(\".concat(nextX, \"px,\").concat(y, \"px,0) scale3d(\").concat(scaleFactor, \",\").concat(scaleFactor, \",1)\")\n };\n }\n }]);\n\n return ReactImageLightbox;\n}(Component);\n\nReactImageLightbox.defaultProps = {\n imageTitle: null,\n imageCaption: null,\n toolbarButtons: null,\n reactModalProps: {},\n animationDisabled: false,\n animationDuration: 300,\n animationOnKeyInput: false,\n clickOutsideToClose: true,\n closeLabel: 'Close lightbox',\n discourageDownloads: false,\n enableZoom: true,\n imagePadding: 10,\n imageCrossOrigin: null,\n keyRepeatKeyupBonus: 40,\n keyRepeatLimit: 180,\n mainSrcThumbnail: null,\n nextLabel: 'Next image',\n nextSrc: null,\n nextSrcThumbnail: null,\n onAfterOpen: function onAfterOpen() {},\n onImageLoadError: function onImageLoadError() {},\n onImageLoad: function onImageLoad() {},\n onMoveNextRequest: function onMoveNextRequest() {},\n onMovePrevRequest: function onMovePrevRequest() {},\n prevLabel: 'Previous image',\n prevSrc: null,\n prevSrcThumbnail: null,\n reactModalStyle: {},\n wrapperClassName: '',\n zoomInLabel: 'Zoom in',\n zoomOutLabel: 'Zoom out',\n imageLoadErrorMessage: 'This image failed to load',\n loader: undefined\n};\nexport default ReactImageLightbox;","import React, { useState } from 'react';\nimport { useStaticQuery, graphql } from 'gatsby';\nimport { GatsbyImage, getImage } from 'gatsby-plugin-image';\nimport { ImageFile } from '../types';\n\ninterface AnimeImageProps {\n image: any;\n onClick: () => void;\n}\n\nconst AnimeImage: React.FC = ({ image, onClick }) => {\n const pic = getImage(image);\n return (\n \n \n \n Filename: \n {image.name.replace(/_/g, ' ')}\n \n \n \n \n );\n};\n\nexport default AnimeImage;\n","import React, { createContext, useCallback, useMemo, useState } from 'react';\nimport { useAnimeImages } from '../hooks/useAnimeImages';\nimport { useDirectories } from '../hooks/useDirectories';\nimport { AllImages } from '../types';\n\n// styles\nconst pageStyles = {\n color: '#232129',\n padding: 96,\n fontFamily: '-apple-system, Roboto, sans-serif, serif',\n};\n\nexport const ImagesContext = createContext(undefined);\nconst Layout: React.FC = ({ children }) => {\n const directories = useDirectories();\n const allImages = useAnimeImages();\n const [selectedDir, setSelectedDir] = useState('');\n\n const images = useMemo(() => {\n const desu: typeof allImages = {\n edges: [],\n };\n if (allImages && allImages.edges) {\n if (selectedDir === '') {\n return allImages;\n }\n desu.edges = allImages.edges.filter(({ node }) => {\n return selectedDir === node.relativeDirectory;\n });\n }\n return desu;\n }, [allImages, selectedDir]);\n\n const handleDirSelect = useCallback((relativePath: string) => {\n setSelectedDir(relativePath);\n }, []);\n\n return (\n \n
\n \n
\n {children}\n
\n
\n
\n );\n};\n\nexport default Layout;\n","import { useStaticQuery, graphql } from 'gatsby';\nimport { Directories, ImageFiles } from '../types';\n\nexport const useDirectories = (): Directories => {\n const data: Directories = useStaticQuery(graphql`\n query {\n allDirectory(filter: { sourceInstanceName: { eq: \"images\" } }) {\n edges {\n node {\n name\n relativePath\n }\n }\n }\n }\n `);\n return data;\n};\n","import { useStaticQuery, graphql } from 'gatsby';\nimport { AllImages, ImageQueryResponse } from '../types';\n\nconst useAnimeImages = (): AllImages => {\n const { allImages }: ImageQueryResponse = useStaticQuery(graphql`\n query {\n allImages: allFile(\n sort: { order: ASC, fields: relativeDirectory }\n filter: { sourceInstanceName: { eq: \"images\" } }\n ) {\n edges {\n node {\n name\n base\n id\n relativeDirectory\n childImageSharp {\n gatsbyImageData(\n width: 800\n placeholder: TRACED_SVG\n formats: [AUTO, JPG, PNG, AVIF]\n )\n original {\n src\n }\n }\n }\n }\n }\n }\n `);\n return allImages;\n};\n\nexport { useAnimeImages };\n","import React, { useContext, useState } from 'react';\nimport Lightbox from 'react-image-lightbox';\n\nimport AnimeImage from './AnimeImage';\nimport { ImagesContext } from './Layout';\n\nconst AnimeImageGrid: React.FC = () => {\n const images = useContext(ImagesContext);\n\n const [isOpen, setIsOpen] = useState(false);\n const [photoIndex, setPhotoIndex] = useState(0);\n return (\n <>\n
\n {images &&\n images.edges.map(({ node }, index) => (\n {\n setPhotoIndex(index);\n setIsOpen(true);\n }}\n />\n ))}\n
\n\n {isOpen && images && (\n setIsOpen(false)}\n onMovePrevRequest={() => {\n if (images) {\n setPhotoIndex((photoIndex - 1) % images.edges.length);\n }\n }}\n onMoveNextRequest={() => {\n if (images) {\n setPhotoIndex((photoIndex + 1) % images.edges.length);\n }\n }}\n />\n )}\n \n );\n};\n\nexport default AnimeImageGrid;\n","import React from 'react';\nimport AnimeImageGrid from '../components/AimeImageGrid';\nimport Layout from '../components/Layout';\n\n// styles\nconst pageStyles = {\n color: '#232129',\n padding: 96,\n fontFamily: '-apple-system, Roboto, sans-serif, serif',\n};\nconst headingStyles = {\n marginTop: 0,\n marginBottom: 64,\n maxWidth: 320,\n};\nconst headingAccentStyles = {\n color: '#663399',\n};\n\nconst linkStyle = {\n color: '#8954A8',\n fontWeight: 'bold',\n fontSize: 16,\n verticalAlign: '5%',\n};\n\n// markup\nconst IndexPage: React.FC = () => {\n return (\n \n Home Page\n \n \n );\n};\n\nexport default IndexPage;\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\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'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n"],"names":["canUseDOM","window","document","createElement","ExecutionEnvironment","canUseWorkers","Worker","canUseEventListeners","addEventListener","attachEvent","canUseViewport","screen","Object","defineProperty","exports","value","bodyOpenClassName","portalClassName","undefined","_extends","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","Constructor","protoProps","staticProps","_react","_react2","_interopRequireDefault","_reactDom2","_propTypes2","_ModalPortal2","ariaAppHider","obj","__esModule","newObj","default","_interopRequireWildcard","_safeHTMLElement","_safeHTMLElement2","_reactLifecyclesCompat","_classCallCheck","instance","TypeError","_possibleConstructorReturn","self","ReferenceError","isReact16","createPortal","createHTMLElement","name","getCreatePortal","unstable_renderSubtreeIntoContainer","getParentElement","parentSelector","Modal","_Component","_ref","_temp","_this","this","_len","args","Array","_key","__proto__","getPrototypeOf","apply","concat","removePortal","unmountComponentAtNode","node","parent","contains","removeChild","console","warn","portalRef","ref","portal","renderPortal","defaultStyles","subClass","superClass","create","constructor","setPrototypeOf","_inherits","className","appendChild","prevProps","prevParent","nextParent","_","snapshot","_props","isOpen","state","now","Date","closesAt","closeTimeoutMS","beforeClose","closeWithTimeout","setTimeout","element","setElement","Component","propTypes","bool","isRequired","style","shape","content","object","overlay","string","htmlOpenClassName","oneOfType","base","afterOpen","overlayClassName","appElement","instanceOf","SafeHTMLCollection","SafeNodeList","arrayOf","onAfterOpen","func","onRequestClose","number","ariaHideApp","shouldFocusAfterRender","shouldCloseOnOverlayClick","shouldReturnFocusAfterClose","preventScroll","aria","data","role","contentLabel","shouldCloseOnEsc","overlayRef","contentRef","id","overlayElement","contentElement","defaultProps","body","contentEl","children","position","top","left","right","bottom","backgroundColor","border","background","overflow","WebkitOverflowScrolling","borderRadius","outline","padding","polyfill","_typeof","Symbol","iterator","focusManager","_scopeTab2","classList","_portalOpenInstances2","CLASS_NAMES","ariaHiddenInstances","ModalPortal","setOverlayRef","setContentRef","afterClose","_this$props","remove","getElementsByTagName","show","returnFocus","teardownScopedFocus","popWithoutFocus","onAfterClose","deregister","open","beforeOpen","clearTimeout","closeTimer","setState","setupScopedFocus","markForFocusLater","openAnimationFrame","requestAnimationFrame","overlayEl","close","closeWithoutTimeout","focusContent","contentHasFocus","focus","handleKeyDown","event","keyCode","stopPropagation","requestClose","handleOverlayOnClick","shouldClose","ownerHandlesClose","handleContentOnMouseUp","handleOverlayOnMouseDown","preventDefault","handleContentOnClick","handleContentOnMouseDown","shouldBeClosed","activeElement","buildClassName","which","additional","classNames","attributesFromObject","prefix","items","keys","reduce","acc","moveFromContentToOverlay","prevState","cancelAnimationFrame","add","hide","register","_props2","contentStyles","overlayStyles","overlayProps","onClick","onMouseDown","contentProps","tabIndex","onKeyDown","onMouseUp","modal","testId","module","resetState","globalElement","removeAttribute","forEach","querySelectorAll","log","assertNodeList","useElement","el","validateElement","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_step","_iterator","next","done","setAttribute","err","return","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_step2","_iterator2","documentNotReadyOrSSRTesting","_warning","_warning2","nodeList","selector","Error","isArray","HTMLCollection","NodeList","join","_arr","before","after","_i","item","parentNode","instances","_arr2","_i2","check","nodeName","_portalOpenInstances","subscribe","eventType","openInstances","opacity","cloneNode","firstChild","insertBefore","lastChild","parentElement","htmlElement","cls","htmlClassList","removeClass","_cls","docBodyClassList","at","classString","classListRef","poll","toLowerCase","split","incrementReference","decrementReference","focusLaterElements","handleBlur","handleFocus","push","toFocus","pop","e","modalElement","removeEventListener","detachEvent","_tabbable","_tabbable2","needToFocus","portalOpenInstances","p","PortalOpenInstances","openInstance","indexOf","emit","index","splice","callback","subscribers","subscriber","slice","_exenv","EE","SafeHTMLElement","HTMLElement","tabbable","shiftKey","head","tail","getActiveElement","checkSafari","exec","navigator","userAgent","x","shadowRoot","findTabbableDescendants","descendants","finished","filter","tabbableNode","hidesContents","zeroSize","offsetWidth","offsetHeight","innerHTML","getComputedStyle","getPropertyValue","scrollWidth","scrollHeight","exception","focusable","isTabIndexNotNaN","test","disabled","href","rootNode","getRootNode","host","visible","getAttribute","isTabIndexNaN","isNaN","_Modal","_Modal2","ownKeys","enumerableOnly","getOwnPropertySymbols","symbols","sym","getOwnPropertyDescriptor","_objectSpread2","_defineProperty","getOwnPropertyDescriptors","_defineProperties","_getPrototypeOf","o","_setPrototypeOf","_assertThisInitialized","_createSuper","Derived","hasNativeReflectConstruct","Reflect","construct","sham","Proxy","Boolean","valueOf","_isNativeReflectConstruct","result","Super","NewTarget","_slicedToArray","arr","_arrayWithHoles","_s","_e","_n","_d","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","_toConsumableArray","_arrayLikeToArray","_arrayWithoutHoles","iter","from","_iterableToArray","_nonIterableSpread","minLen","n","toString","len","arr2","translate","str","replaceStrings","translated","placeholder","replace","getWindowWidth","g","innerWidth","isCrossOriginFrame","location","hostname","getHighestSafeWindowContext","MAX_ZOOM_LEVEL","KEYS","ReactImageLightbox","_super","isClosing","animationDisabled","shouldAnimate","zoomLevel","offsetX","offsetY","loadErrorStatus","outerEl","zoomInBtn","zoomOutBtn","caption","closeIfClickInner","bind","handleImageDoubleClick","handleImageMouseWheel","handleKeyInput","handleMouseUp","handleMouseDown","handleMouseMove","handleOuterMousewheel","handleTouchStart","handleTouchMove","handleTouchEnd","handlePointerEvent","handleCaptionMousewheel","handleWindowResize","handleZoomInButtonClick","handleZoomOutButtonClick","requestMoveNext","requestMovePrev","timeouts","currentAction","eventsSource","pointerList","preventInnerClose","preventInnerCloseTimeout","keyPressed","imageCache","lastKeyDownTime","resizeTimeout","wheelActionTimeout","resetScrollTimeout","scrollX","scrollY","moveStartX","moveStartY","moveStartOffsetX","moveStartOffsetY","swipeStartX","swipeStartY","swipeEndX","swipeEndY","pinchTouchList","pinchDistance","keyCounter","moveRequested","_this2","windowContext","listeners","resize","mouseup","touchend","touchcancel","pointerdown","pointermove","pointerup","pointercancel","type","loadAllImages","nextProps","_this3","getSrcTypes","srcType","_this4","sourcesChanged","prevSrcDict","nextSrcDict","prevSrc","loaded","_this5","didUnmount","tid","_setTimeout","_x","_x2","time","_this6","_this7","imageSrc","fitSizes","isImageLoaded","getFitSizes","width","height","src","targetHeight","targetWidth","stretch","boxSize","getLightboxRect","maxHeight","imagePadding","maxWidth","Math","min","currentImageInfo","getBestImageForType","maxX","minX","maxY","minY","zoomMultiplier","getZoomMultiplier","keyEnding","pow","current","getBoundingClientRect","innerHeight","_clearTimeout","_x3","clientX","clientY","enableZoom","nextZoomLevel","max","imageBaseSize","currentZoomMultiplier","nextZoomMultiplier","boxRect","pointerX","pointerY","currentImageOffsetX","currentImageOffsetY","nextImageRealOffsetX","nextImageRealOffsetY","nextOffsetX","nextOffsetY","maxOffsets","getMaxOffsets","search","isAnimating","currentTime","getTime","keyRepeatLimit","nextSrc","keyRepeatKeyupBonus","_this8","actionDelay","abs","deltaY","deltaX","xThreshold","changeZoom","filterPointersBySource","pointer","_this9","_ref2","shouldHandleEvent","isTargetMatchImage","addPointer","parseMouseEvent","multiPointerStart","multiPointerMove","removePointer","multiPointerEnd","parsePointerEvent","_this10","changedTouches","eventTouch","parseTouchPointer","map","_this11","touch","handleSwipeStart","handleMoveStart","handleEnd","decideMoveOrSwipe","handlePinchStart","handleMove","handleSwipe","handlePinch","setPreventInnerClose","handleMoveEnd","handleSwipeEnd","handlePinchEnd","_ref3","y","_ref4","newOffsetX","newOffsetY","_this12","animationDuration","_ref5","_ref6","xDiff","xDiffAbs","yDiffAbs","_ref7","_ref8","a","b","sqrt","_ref9","_ref10","_ref11","calculatePinchDistance","oldPointer","newDistance","_this$calculatePinchC","calculatePinchCenter","forceUpdate","_this$caption$current2","scrollTop","_this13","inMemoryImage","Image","imageCrossOrigin","crossOrigin","onerror","errorEvent","onImageLoadError","onload","onImageLoad","_this14","generateLoadDoneCallback","loadImage","_this15","closeLightbox","onCloseRequest","animationOnKeyInput","direction","_this16","nextState","onMovePrevRequest","onMoveNextRequest","requestMove","_this17","clickOutsideToClose","discourageDownloads","imageTitle","toolbarButtons","reactModalStyle","_onAfterOpen","reactModalProps","loader","_this$state","transitionStyle","transition","keyEndings","_ref12","images","addImage","imageClass","transforms","bestImageInfo","imageStyle","getTransform","cursor","some","imageLoadErrorMessage","backgroundImage","onDoubleClick","onWheel","onDragStart","alt","draggable","loadingIcon","zoom","modalStyle","zIndex","wrapperClassName","animationDirection","onMouseMove","onTouchStart","onTouchMove","onKeyUp","prevLabel","title","nextLabel","button","zoomInLabel","zoomOutLabel","closeLabel","imageCaption","mouseEvent","parseInt","touchPointer","identifier","pointerEvent","pointerId","_ref13","_ref13$x","_ref13$y","_ref13$zoom","nextX","windowWidth","scaleFactor","transform","mainSrcThumbnail","nextSrcThumbnail","prevSrcThumbnail","image","pic","getImage","G","pageStyles","color","fontFamily","ImagesContext","createContext","directories","useStaticQuery","allImages","useState","selectedDir","setSelectedDir","useMemo","desu","edges","relativeDirectory","handleDirSelect","useCallback","relativePath","Provider","allDirectory","_event","useContext","setIsOpen","photoIndex","setPhotoIndex","display","mainSrc","childImageSharp","original","warning"],"sourceRoot":""}