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AQ,QAAS,KAAK,QAAQ,KAAK,UAAW,KAE9F,IAEJ,OAAO,QAAU","file":"/npm/react-3d-obj-carousel@0.0.8/js/Carousel.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-3d-obj-carousel@0.0.8/js/Carousel.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\nvar React = require('react');\n\nvar Util = require('./util');\nvar Layout = require('./layout');\nvar Depot = require('./depot');\n\nvar Carousel = React.createClass({\n    displayName: 'Carousel',\n\n    getInitialState: function getInitialState() {\n        return {\n            images: this.props.images,\n            figures: Layout[this.props.layout].figures(this.props.width, this.props.images, 0),\n            rotationY: 0\n        };\n    },\n    componentWillMount: function componentWillMount() {\n        this.depot = Depot(this.getInitialState(), this.props, this.setState.bind(this));\n        this.onRotate = this.depot.onRotate.bind(this);\n    },\n    componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n        this.depot.onNextProps(nextProps);\n    },\n    render: function render() {\n\n        var figures,\n            angle = 2 * Math.PI / this.state.figures.length,\n            translateZ = -Layout[this.props.layout].distance(this.props.width, this.state.figures.length);\n\n        figures = this.state.figures.map(function (d, i) {\n            var element;\n\n            if (d.image && d.image.props) {\n                element = d.image\n            } else {\n                element = React.createElement('img', { src: d.image, alt: i, height: '100%', width: '100%' })\n            }\n\n            return React.createElement(\n                'figure',\n                { key: i, style: Util.figureStyle(d) },\n                element\n            );\n        });\n\n        return React.createElement(\n            'section',\n            { className: 'react-3d-carousel' },\n            React.createElement(\n                'div',\n                { className: 'carousel',\n                    style: { transform: 'translateZ(' + translateZ + 'vh)' } },\n                figures\n            ),\n            React.createElement('div', { className: 'prev', onClick: Util.partial(this.onRotate, +angle) }),\n            React.createElement('div', { className: 'next', onClick: Util.partial(this.onRotate, -angle) })\n        );\n    }\n});\nmodule.exports = Carousel;"]}