├── .editorconfig ├── .eslintignore ├── .eslintrc-base ├── .eslintrc-node ├── .eslintrc-react ├── .eslintrc-react-test ├── .gitignore ├── .npmignore ├── .travis.yml ├── CONTRIBUTING.md ├── DEVELOPMENT.md ├── LICENSE.txt ├── README.md ├── demo ├── app.jsx ├── index.html ├── webpack.config.dev.js └── webpack.config.hot.js ├── dist ├── curved-carousel.js ├── curved-carousel.js.map ├── curved-carousel.min.js └── curved-carousel.min.js.map ├── karma.conf.coverage.js ├── karma.conf.dev.js ├── karma.conf.js ├── package.json ├── src ├── components │ └── curved-carousel.jsx └── index.js ├── test └── client │ ├── main.js │ ├── spec │ └── components │ │ └── curved-carousel.spec.jsx │ └── test.html ├── webpack.config.coverage.js ├── webpack.config.dev.js ├── webpack.config.js └── webpack.config.test.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | max_line_length = 100 12 | 13 | [*.md] 14 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/* 2 | node_modules/* 3 | -------------------------------------------------------------------------------- /.eslintrc-base: -------------------------------------------------------------------------------- 1 | --- 2 | plugins: 3 | - "filenames" 4 | 5 | rules: 6 | "filenames/filenames": [2, "^[a-z0-9\\-\\.]+$"] # dash-cased filenames. 7 | -------------------------------------------------------------------------------- /.eslintrc-node: -------------------------------------------------------------------------------- 1 | --- 2 | extends: 3 | - "defaults/configurations/walmart/es5-node" 4 | - ".eslintrc-base" 5 | -------------------------------------------------------------------------------- /.eslintrc-react: -------------------------------------------------------------------------------- 1 | --- 2 | extends: 3 | - "defaults/configurations/walmart/es6-react" 4 | - ".eslintrc-base" 5 | -------------------------------------------------------------------------------- /.eslintrc-react-test: -------------------------------------------------------------------------------- 1 | --- 2 | extends: 3 | - "defaults/configurations/walmart/es6-react" 4 | - "defaults/environments/test" 5 | - ".eslintrc-base" 6 | 7 | globals: 8 | expect: false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### SublimeText ### 2 | *.sublime-workspace 3 | 4 | ### OSX ### 5 | .DS_Store 6 | .AppleDouble 7 | .LSOverride 8 | Icon 9 | 10 | # Thumbnails 11 | ._* 12 | 13 | # Files that might appear on external disk 14 | .Spotlight-V100 15 | .Trashes 16 | 17 | ### Windows ### 18 | # Windows image file caches 19 | Thumbs.db 20 | ehthumbs.db 21 | 22 | # Folder config file 23 | Desktop.ini 24 | 25 | # Recycle Bin used on file shares 26 | $RECYCLE.BIN/ 27 | 28 | # App specific 29 | 30 | coverage 31 | node_modules 32 | bower_components 33 | .tmp 34 | lib 35 | npm-debug.log 36 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Cruft 2 | *.sublime-workspace 3 | .DS_Store 4 | .AppleDouble 5 | .LSOverride 6 | Icon 7 | ._* 8 | .Spotlight-V100 9 | .Trashes 10 | Thumbs.db 11 | ehthumbs.db 12 | Desktop.ini 13 | $RECYCLE.BIN/ 14 | .tmp 15 | npm-debug.log 16 | 17 | # Code / build 18 | coverage 19 | node_modules 20 | bower_components 21 | demo 22 | test 23 | karma* 24 | webpack* 25 | .eslint* 26 | .editor* 27 | .travis* 28 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 0.10 5 | - 0.12 6 | 7 | # Use container-based Travis infrastructure. 8 | sudo: false 9 | 10 | branches: 11 | only: 12 | - master 13 | 14 | before_install: 15 | # GUI for real browsers. 16 | - export DISPLAY=:99.0 17 | - sh -e /etc/init.d/xvfb start 18 | 19 | script: 20 | - npm run check-ci 21 | 22 | # Prune deps to just production and ensure we can still build 23 | - npm prune --production 24 | - npm install --production 25 | - npm run build 26 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing 2 | ============ 3 | 4 | Thanks for helping out! 5 | 6 | ## Development 7 | 8 | Run `npm run demo` to run a webpack dev server with component examples. 9 | 10 | ## Checks, Tests 11 | 12 | Run `npm run check` before committing. 13 | 14 | ## Dist 15 | 16 | Please do not commit changes to files in `dist`. 17 | These files are only committed when we tag releases. 18 | -------------------------------------------------------------------------------- /DEVELOPMENT.md: -------------------------------------------------------------------------------- 1 | Development 2 | =========== 3 | 4 | ## Build 5 | 6 | Build for production use (NPM, bower, etc) and create `dist` UMD bundles 7 | (min'ed, non-min'ed) 8 | 9 | ``` 10 | $ npm run build 11 | ``` 12 | 13 | Note that `dist/` files are only updated and committed on **tagged releases**. 14 | 15 | 16 | ## Development 17 | 18 | All development tasks consist of watching the demo bundle, the test bundle 19 | and launching a browser pointed to the demo page. 20 | 21 | Run the `demo` application with watched rebuilds: 22 | 23 | ``` 24 | $ npm run dev # dev test/app server (OR) 25 | $ npm run open-dev # dev servers _and a browser window opens!_ 26 | ``` 27 | 28 | From there you can see: 29 | 30 | * Demo app: [127.0.0.1:3000](http://127.0.0.1:3000/) 31 | * Client tests: [127.0.0.1:3001/test/client/test.html](http://127.0.0.1:3001/test/client/test.html) 32 | 33 | 34 | ## Programming Guide 35 | 36 | ### Logging 37 | 38 | We use the following basic pattern for logging: 39 | 40 | ```js 41 | if (process.env.NODE_ENV !== "production") { 42 | /* eslint-disable no-console */ 43 | if (typeof console !== "undefined" && console.warn) { 44 | console.warn("Oh noes! bad things happened."); 45 | } 46 | /* eslint-enable no-console */ 47 | } 48 | ``` 49 | 50 | Replace `console.warn` in the condtional + method call as appropriate. 51 | 52 | Breaking this down: 53 | 54 | * `process.env.NODE_ENV !== "production"` - This part removes all traces of 55 | the code in the production bundle, to save on file size. This _also_ means 56 | that no warnings will be displayed in production. 57 | * `typeof console !== "undefined" && console.METHOD` - A permissive check to 58 | make sure the `console` object exists and can use the appropriate `METHOD` - 59 | `warn`, `info`, etc. 60 | 61 | To signal production mode to the webpack build, declare the `NODE_ENV` variable: 62 | 63 | ```js 64 | new webpack.DefinePlugin({ 65 | "process.env.NODE_ENV": JSON.stringify("production") 66 | }) 67 | ``` 68 | 69 | Unfortunately, we need to do _all_ of this every time to have Uglify properly 70 | drop the code, but with this trick, the production bundle has no change in code 71 | size. 72 | 73 | 74 | ## Quality 75 | 76 | ### In Development 77 | 78 | During development, you are expected to be running either: 79 | 80 | ``` 81 | $ npm run dev 82 | ``` 83 | 84 | to build the lib and test files. With these running, you can run the faster 85 | 86 | ``` 87 | $ npm run check-dev 88 | ``` 89 | 90 | Command. It is comprised of: 91 | 92 | ``` 93 | $ npm run lint 94 | $ npm run test-dev 95 | ``` 96 | 97 | Note that the tests here are not instrumented for code coverage and are thus 98 | more development / debugging friendly. 99 | 100 | ### Continuous Integration 101 | 102 | CI doesn't have source / test file watchers, so has to _build_ the test files 103 | via the commands: 104 | 105 | ``` 106 | $ npm run check # PhantomJS only 107 | $ npm run check-cov # (OR) PhantomJS w/ coverage 108 | $ npm run check-ci # (OR) PhantomJS,Firefox + coverage - available on Travis. 109 | ``` 110 | 111 | Which is currently comprised of: 112 | 113 | ``` 114 | $ npm run lint # AND ... 115 | 116 | $ npm run test # PhantomJS only 117 | $ npm run test-cov # (OR) PhantomJS w/ coverage 118 | $ npm run test-ci # (OR) PhantomJS,Firefox + coverage 119 | ``` 120 | 121 | Note that `(test|check)-(cov|ci)` run code coverage and thus the 122 | test code may be harder to debug because it is instrumented. 123 | 124 | ### Client Tests 125 | 126 | The client tests rely on webpack dev server to create and serve the bundle 127 | of the app/test code at: http://127.0.0.1:3001/assets/main.js which is done 128 | with the task `npm run server-test` (part of `npm dev`). 129 | 130 | #### Code Coverage 131 | 132 | Code coverage reports are outputted to: 133 | 134 | ``` 135 | coverage/ 136 | client/ 137 | BROWSER_STRING/ 138 | lcov-report/index.html # Viewable web report. 139 | ``` 140 | 141 | ## Releases 142 | 143 | **IMPORTANT - NPM**: To correctly run `preversion` your first step is to make 144 | sure that you have a very modern `npm` binary: 145 | 146 | ``` 147 | $ npm install -g npm 148 | ``` 149 | 150 | Built files in `dist/` should **not** be committeed during development or PRs. 151 | Instead we _only_ build and commit them for published, tagged releases. So 152 | the basic workflow is: 153 | 154 | ``` 155 | # Make sure you have a clean, up-to-date `master` 156 | $ git pull 157 | $ git status # (should be no changes) 158 | 159 | # Choose a semantic update for the new version. 160 | # If you're unsure, read about semantic versioning at http://semver.org/ 161 | $ npm version major|minor|patch -m "Version %s - INSERT_REASONS" 162 | 163 | # ... the `dist/` and `lib/` directories are now built, `package.json` is 164 | # updated, and the appropriate files are committed to git (but unpushed). 165 | # 166 | # *Note*: `lib/` is uncommitted, but built and must be present to push to npm. 167 | 168 | # Check that everything looks good in last commit and push. 169 | $ git diff HEAD^ HEAD 170 | $ git push && git push --tags 171 | # ... the project is now pushed to GitHub and available to `bower`. 172 | 173 | # And finally publish to `npm`! 174 | $ npm publish 175 | ``` 176 | 177 | And you've published! 178 | 179 | For additional information on the underlying NPM technologies and approaches, 180 | please review: 181 | 182 | * [`npm version`](https://docs.npmjs.com/cli/version): Runs verification, 183 | builds `dist/` and `lib/` via `scripts` commands. 184 | * Our scripts also run the applicable `git` commands, so be very careful 185 | when running out `version` commands. 186 | * [`npm publish`](https://docs.npmjs.com/cli/publish): Uploads to NPM. 187 | * **NOTE**: We don't _build_ in `prepublish` because of the 188 | [`npm install` runs `npm prepublish` bug](https://github.com/npm/npm/issues/3059) 189 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Formidable Labs 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/) 2 | *** 3 | NOTICE: SUPPORT FOR THIS PROJECT HAS ENDED 4 | 5 | This projected was owned and maintained by Walmart. This project has reached its end of life and Walmart no longer supports this project. 6 | 7 | We will no longer be monitoring the issues for this project or reviewing pull requests. You are free to continue using this project under the license terms or forks of this project at your own risk. This project is no longer subject to Walmart's bug bounty program or other security monitoring. 8 | 9 | 10 | ## Actions you can take 11 | 12 | We recommend you take the following action: 13 | 14 | * Review any configuration files used for build automation and make appropriate updates to remove or replace this project 15 | * Notify other members of your team and/or organization of this change 16 | * Notify your security team to help you evaluate alternative options 17 | 18 | ## Forking and transition of ownership 19 | 20 | For [security reasons](https://www.theregister.co.uk/2018/11/26/npm_repo_bitcoin_stealer/), Walmart does not transfer the ownership of our primary repos on Github or other platforms to other individuals/organizations. Further, we do not transfer ownership of packages for public package management systems. 21 | 22 | If you would like to fork this package and continue development, you should choose a new name for the project and create your own packages, build automation, etc. 23 | 24 | Please review the licensing terms of this project, which continue to be in effect even after decommission.##curved-carousel 25 | 26 | > A simple way to create an infinitely scrollable carousel, with optional curvature. 27 | 28 | ![http://i.imgur.com/QH0lxTn.gif](http://i.imgur.com/QH0lxTn.gif) 29 | 30 | #Install 31 | 32 | `npm install curved-carousel` 33 | 34 | ##Usage 35 | 36 | In order to use curved-carousel, wrap child elements with it as shown below: 37 | 38 | ```javascript 39 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | ``` 49 | 50 | **Note: it is generally adviseable to set a height on this component** 51 | 52 | ## Props 53 | 54 | ####**childWidth** 55 | 56 | *React.PropTypes.number* 57 | 58 | This should be a number, in pixels, of how wide child tiles should be. 59 | 60 | *Default value:* `180` 61 | 62 | ####**curve** 63 | 64 | *React.PropTypes.number* 65 | 66 | This should be a number between 0 and 100, that sets how curved the carousel should be. 67 | 68 | *Default value:* `50` 69 | 70 | ####**spacing** 71 | 72 | *React.PropTypes.number* 73 | 74 | This should be a number, in pixels, of the amount of space between tiles. 75 | 76 | *Default value:* `40` 77 | 78 | ####**rotation** 79 | 80 | *React.PropTypes.bool* 81 | 82 | When set to true, tiles will be rotated along the curve set with the `curve` prop. 83 | 84 | *Default value:* `true` 85 | 86 | ####**friction** 87 | 88 | *React.PropTypes.number* 89 | 90 | This should be a float, between `0.0` and `0.99`, that sets the amount of friction on the animation physics, with `1.0` essentially being no friction at all and `0.0` having no release at all. 91 | 92 | *Default value:* `0.95` 93 | 94 | ## Development 95 | 96 | Please see [DEVELOPMENT](DEVELOPMENT.md) 97 | 98 | ## Contributing 99 | 100 | Please see [CONTRIBUTING](CONTRIBUTING.md) 101 | -------------------------------------------------------------------------------- /demo/app.jsx: -------------------------------------------------------------------------------- 1 | /*global document:false*/ 2 | import React from "react"; 3 | import {CurvedCarousel} from "../src/index"; 4 | 5 | class App extends React.Component { 6 | constructor(props) { 7 | super(props); 8 | this.state = { 9 | curve: 50, 10 | friction: 0.95, 11 | rotation: true, 12 | spacing: 50 13 | }; 14 | this._adjustCurve = this._adjustCurve.bind(this); 15 | this._adjustRotation = this._adjustRotation.bind(this); 16 | this._adjustFriction = this._adjustFriction.bind(this); 17 | this._adjustSpacing = this._adjustSpacing.bind(this); 18 | } 19 | _adjustRotation() { 20 | this.setState({ 21 | rotation: event.target.checked 22 | }); 23 | } 24 | _adjustCurve() { 25 | this.setState({ 26 | curve: parseInt(event.target.value) 27 | }); 28 | } 29 | _adjustSpacing() { 30 | this.setState({ 31 | spacing: parseInt(event.target.value) 32 | }); 33 | } 34 | _adjustFriction() { 35 | this.setState({ 36 | friction: parseInt(event.target.value) / 100 37 | }); 38 | } 39 | render() { 40 | return ( 41 |
42 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 67 | 75 | 83 | 89 |
90 | ); 91 | } 92 | } 93 | 94 | const content = document.getElementById("content"); 95 | 96 | React.render(, content); 97 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | Demo 10 | 11 | 12 | 34 | 35 | 36 | 39 |
40 |

If you can see this, something is broken (or JS is not enabled)!!.

41 |
42 | 43 | 44 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /demo/webpack.config.dev.js: -------------------------------------------------------------------------------- 1 | /*globals __dirname:false */ 2 | "use strict"; 3 | 4 | var webpack = require("webpack"); 5 | 6 | module.exports = { 7 | 8 | devServer: { 9 | contentBase: __dirname, 10 | noInfo: false 11 | }, 12 | 13 | output: { 14 | path: __dirname, 15 | filename: "main.js", 16 | publicPath: "/assets/" 17 | }, 18 | 19 | cache: true, 20 | devtool: "source-map", 21 | entry: { 22 | app: ["./demo/app.jsx"] 23 | }, 24 | stats: { 25 | colors: true, 26 | reasons: true 27 | }, 28 | resolve: { 29 | extensions: ["", ".js", ".jsx"] 30 | }, 31 | module: { 32 | loaders: [ 33 | { 34 | test: /\.jsx?$/, 35 | exclude: [/node_modules/], 36 | loaders: ["babel-loader?stage=0"] 37 | }, { 38 | test: /\.css$/, 39 | loader: "style-loader!css-loader" 40 | }, { 41 | test: /\.(png|jpg)$/, 42 | loader: "url-loader?limit=8192" 43 | } 44 | ] 45 | }, 46 | plugins: [ 47 | new webpack.NoErrorsPlugin() 48 | ] 49 | }; 50 | -------------------------------------------------------------------------------- /demo/webpack.config.hot.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var _ = require("lodash"); 4 | var base = require("./webpack.config.dev"); 5 | 6 | // Update our own module version. 7 | var mod = _.cloneDeep(base.module); 8 | // First loader needs react hot. 9 | mod.loaders[0].loaders = ["react-hot"].concat(mod.loaders[0].loaders); 10 | 11 | module.exports = _.merge({}, _.omit(base, "entry", "module"), { 12 | entry: { 13 | app: ["webpack/hot/dev-server", "./demo/app.jsx"] 14 | }, 15 | 16 | module: mod 17 | }); 18 | -------------------------------------------------------------------------------- /dist/curved-carousel.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.CurvedCarousel=t():e.CurvedCarousel=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";e.exports={CurvedCarousel:n(1)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=Object.assign||function(e){for(var t=1;t-1*e.props.children.length*(e.props.childWidth+e.props.spacing)&&(o=-2*e.props.children.length*(e.props.childWidth+e.props.spacing)),e.setState({left:o})}},onMouseUp:function(t){if(e.state.dragging&&e.touchObject){var n=e.touchObject.prevX-e.touchObject.endX!==0?(e.touchObject.prevX-e.touchObject.endX)/(e.touchObject.currentTime-e.touchObject.previousTime)*12:0;e.setState({dragging:!1,velocity:n},function(){e._handleSwipe(t)})}},onMouseLeave:function(t){if(e.state.dragging&&e.touchObject){var n=e.touchObject.prevX-e.touchObject.endX!==0?(e.touchObject.prevX-e.touchObject.endX)/(e.touchObject.currentTime-e.touchObject.previousTime)*17:0;e.setState({dragging:!1,velocity:n},function(){e._handleSwipe(t)})}}}}},{key:"_handleClick",value:function(e){this.clickSafe===!0&&(e.preventDefault(),e.stopPropagation(),e.nativeEvent.stopPropagation())}},{key:"_handleSwipe",value:function(){this.touchObject=null,this._startRaf()}},{key:"_swipeDirection",value:function(e,t,n,r){var o,i,a,s;return o=e-t,i=n-r,a=Math.atan2(i,o),s=Math.round(180*a/Math.PI),0>s&&(s=360-Math.abs(s)),45>=s&&s>=0?1:360>=s&&s>=315?1:s>=135&&225>=s?-1:this.props.vertical===!0?s>=35&&135>=s?1:-1:0}},{key:"_rafCb",value:function(){if(!this.state.dragging){var e=this.state.velocity.toFixed(2)*this.props.friction;if(!(Math.abs(e)<.1)){var t=this.state.left-e;t<-2*this.props.children.length*(this.props.childWidth+this.props.spacing)&&(t=-1*this.props.children.length*(this.props.childWidth+this.props.spacing)),t>-1*this.props.children.length*(this.props.childWidth+this.props.spacing)&&(t=-2*this.props.children.length*(this.props.childWidth+this.props.spacing)),this.setState({velocity:e,left:t}),requestAnimationFrame(this._rafCb)}}}},{key:"_startRaf",value:function(){requestAnimationFrame(this._rafCb)}}]),t}(c["default"].Component);f.displayName="CurvedCarousel",f.propTypes={childWidth:c["default"].PropTypes.number,curve:c["default"].PropTypes.number,spacing:c["default"].PropTypes.number,rotation:c["default"].PropTypes.bool,friction:c["default"].PropTypes.number},f.defaultProps={childWidth:180,curve:50,spacing:40,rotation:!0,friction:.95},e.exports=f},function(e,t,n){e.exports=n(3)},function(e,t,n){"use strict";var r=n(4),o=n(6),i=n(157),a=n(158),s=n(13),u=n(159),l=n(29),c=n(167),p=n(161),d=n(168);o.addons={CSSTransitionGroup:a,LinkedStateMixin:r,PureRenderMixin:i,TransitionGroup:u,batchedUpdates:l.batchedUpdates,classSet:c,cloneWithProps:p,createFragment:s.create,update:d},e.exports=o},function(e,t,n){"use strict";var r=n(5),o=n(156),i={linkState:function(e){return new r(this.state[e],o.createStateKeySetter(this,e))}};e.exports=i},function(e,t,n){"use strict";function r(e,t){this.value=e,this.requestChange=t}function o(e){var t={value:"undefined"==typeof e?i.PropTypes.any.isRequired:e.isRequired,requestChange:i.PropTypes.func.isRequired};return i.PropTypes.shape(t)}var i=n(6);r.PropTypes={link:o},e.exports=r},function(e,t,n){"use strict";var r=n(7),o=n(11),i=n(25),a=n(40),s=n(15),u=n(20),l=n(14),c=(n(35),n(43)),p=n(45),d=n(94),f=n(22),h=n(70),v=n(31),m=n(125),g=n(32),y=n(153),C=n(16),E=n(114),b=n(155);d.inject();var _=l.createElement,x=l.createFactory,D=l.cloneElement,M=v.measure("React","render",h.render),T={Children:{map:o.map,forEach:o.forEach,count:o.count,only:b},Component:i,DOM:c,PropTypes:m,initializeTouchEvents:function(e){r.useTouchEvents=e},createClass:a.createClass,createElement:_,cloneElement:D,createFactory:x,createMixin:function(e){return e},constructAndRenderComponent:h.constructAndRenderComponent,constructAndRenderComponentByID:h.constructAndRenderComponentByID,findDOMNode:E,render:M,renderToString:y.renderToString,renderToStaticMarkup:y.renderToStaticMarkup,unmountComponentAtNode:h.unmountComponentAtNode,isValidElement:l.isValidElement,withContext:s.withContext,__spread:C};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:u,InstanceHandles:f,Mount:h,Reconciler:g,TextComponent:p});T.version="0.13.3",e.exports=T},function(e,t,n){"use strict";function r(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function o(e){return e===m.topMouseMove||e===m.topTouchMove}function i(e){return e===m.topMouseDown||e===m.topTouchStart}function a(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o1){for(var d=Array(p),f=0;p>f;f++)d[f]=arguments[f+2];u.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(i in h)"undefined"==typeof u[i]&&(u[i]=h[i])}return new s(e,l,c,o.current,r.current,u)},s.createFactory=function(e){var t=s.createElement.bind(null,e);return t.type=e,t},s.cloneAndReplaceProps=function(e,t){var n=new s(e.type,e.key,e.ref,e._owner,e._context,t);return n},s.cloneElement=function(e,t,n){var r,u=i({},e.props),l=e.key,c=e.ref,p=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,p=o.current),void 0!==t.key&&(l=""+t.key);for(r in t)t.hasOwnProperty(r)&&!a.hasOwnProperty(r)&&(u[r]=t[r])}var d=arguments.length-2;if(1===d)u.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];u.children=f}return new s(e.type,l,c,p,e._context,u)},s.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},e.exports=s},function(e,t,n){"use strict";var r=n(16),o=n(17),i=(n(18),{current:o,withContext:function(e,t){var n,o=i.current;i.current=r({},o,e);try{n=t()}finally{i.current=o}return n}});e.exports=i},function(e,t){"use strict";function n(e,t){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var n=Object(e),r=Object.prototype.hasOwnProperty,o=1;o=a;a++)if(o(e,a)&&o(t,a))r=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,r);return d(i(s)),s}function c(e,t,n,r,o,i){e=e||"",t=t||"",d(e!==t);var l=a(t,e);d(l||a(e,t));for(var c=0,p=l?s:u,f=e;;f=p(f,t)){var h;if(o&&f===e||i&&f===t||(h=n(f,l,r)),h===!1||f===t)break;d(c++1){var t=e.indexOf(f,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=l(e,t);i!==e&&c(e,i,n,r,!1,!0),i!==t&&c(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(c("",e,t,n,!0,!1),c(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){c("",e,t,n,!0,!1)},_getFirstCommonAncestorID:l,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:f};e.exports=m},function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};e.exports=r},function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";e.exports=n},function(e,t,n){"use strict";function r(e,t){this.props=e,this.context=t}var o=n(26),i=n(10);n(18);r.prototype.setState=function(e,t){i("object"==typeof e||"function"==typeof e||null==e),o.enqueueSetState(this,e),t&&o.enqueueCallback(this,t)},r.prototype.forceUpdate=function(e){o.enqueueForceUpdate(this),e&&o.enqueueCallback(this,e)};e.exports=r},function(e,t,n){"use strict";function r(e){e!==i.currentlyMountingInstance&&l.enqueueUpdate(e)}function o(e,t){p(null==a.current);var n=u.get(e);return n?n===i.currentlyUnmountingInstance?null:n:null}var i=n(27),a=n(20),s=n(14),u=n(28),l=n(29),c=n(16),p=n(10),d=(n(18),{enqueueCallback:function(e,t){p("function"==typeof t);var n=o(e);return n&&n!==i.currentlyMountingInstance?(n._pendingCallbacks?n._pendingCallbacks.push(t):n._pendingCallbacks=[t],void r(n)):null},enqueueCallbackInternal:function(e,t){p("function"==typeof t),e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t){var n=o(e,"replaceState");n&&(n._pendingStateQueue=[t],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueSetProps:function(e,t){var n=o(e,"setProps");if(n){p(n._isTopLevel);var i=n._pendingElement||n._currentElement,a=c({},i.props,t);n._pendingElement=s.cloneAndReplaceProps(i,a),r(n)}},enqueueReplaceProps:function(e,t){var n=o(e,"replaceProps");if(n){p(n._isTopLevel);var i=n._pendingElement||n._currentElement;n._pendingElement=s.cloneAndReplaceProps(i,t),r(n)}},enqueueElementInternal:function(e,t){e._pendingElement=t,r(e)}});e.exports=d},function(e,t){"use strict";var n={currentlyMountingInstance:null,currentlyUnmountingInstance:null};e.exports=n},function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};e.exports=n},function(e,t,n){"use strict";function r(){m(T.ReactReconcileTransaction&&E)}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=c.getPooled(),this.reconcileTransaction=T.ReactReconcileTransaction.getPooled()}function i(e,t,n,o,i){r(),E.batchedUpdates(e,t,n,o,i)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;m(t===g.length),g.sort(a);for(var n=0;t>n;n++){var r=g[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,f.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var i=0;in;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),o.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){return n}var o={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){o.storedMeasure=e}}};e.exports=o},function(e,t,n){"use strict";function r(){o.attachRefs(this,this._currentElement)}var o=n(33),i=(n(35),{mountComponent:function(e,t,n,o){var i=e.mountComponent(t,n,o);return n.getReactMountReady().enqueue(r,e),i},unmountComponent:function(e){o.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,n,i){var a=e._currentElement;if(t!==a||null==t._owner){var s=o.shouldUpdateRefs(a,t);s&&o.detachRefs(e,a),e.receiveComponent(t,n,i),s&&n.getReactMountReady().enqueue(r,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}});e.exports=i},function(e,t,n){"use strict";function r(e,t,n){"function"==typeof e?e(t.getPublicInstance()):i.addComponentAsRefTo(t,e,n)}function o(e,t,n){"function"==typeof e?e(null):i.removeComponentAsRefFrom(t,e,n)}var i=n(34),a={};a.attachRefs=function(e,t){var n=t.ref;null!=n&&r(n,e,t._owner)},a.shouldUpdateRefs=function(e,t){return t._owner!==e._owner||t.ref!==e.ref},a.detachRefs=function(e,t){var n=t.ref;null!=n&&o(n,e,t._owner)},e.exports=a},function(e,t,n){"use strict";var r=n(10),o={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,n){r(o.isValidOwner(n)),n.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,n){r(o.isValidOwner(n)),n.getPublicInstance().refs[t]===e.getPublicInstance()&&n.detachRef(t)}};e.exports=o},function(e,t,n){"use strict";function r(){if(y.current){var e=y.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function o(e){var t=e&&e.getPublicInstance();if(!t)return void 0;var n=t.constructor;return n?n.displayName||n.name||void 0:void 0}function i(){var e=y.current;return e&&o(e)||void 0}function a(e,t){e._store.validated||null!=e.key||(e._store.validated=!0,u('Each child in an array or iterator should have a unique "key" prop.',e,t))}function s(e,t,n){D.test(e)&&u("Child objects should have non-numeric keys so ordering is preserved.",t,n)}function u(e,t,n){var r=i(),a="string"==typeof n?n:n.displayName||n.name,s=r||a,u=_[e]||(_[e]={});if(!u.hasOwnProperty(s)){u[s]=!0;var l="";if(t&&t._owner&&t._owner!==y.current){var c=o(t._owner);l=" It was passed a child from "+c+"."}}}function l(e,t){if(Array.isArray(e))for(var n=0;n");var s="";o&&(s=" The element was created by "+o+".")}}function d(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function f(e){if(e._store){var t=e._store.originalProps,n=e.props;for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)&&d(t[r],n[r])||(p(r,e),t[r]=n[r]))}}function h(e){if(null!=e.type){var t=C.getComponentClassForElement(e),n=t.displayName||t.name;t.propTypes&&c(n,t.propTypes,e.props,g.prop),"function"==typeof t.getDefaultProps}}var v=n(14),m=n(13),g=n(36),y=(n(37),n(20)),C=n(38),E=n(24),b=n(10),_=(n(18),{}),x={},D=/^\d+$/,M={},T={checkAndWarnForMutatedProps:f,createElement:function(e,t,n){var r=v.createElement.apply(this,arguments);if(null==r)return r;for(var o=2;o"+o+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;n!==this._stringText&&(this._stringText=n,i.BackendIDOperations.updateTextContentByID(this._rootNodeID,n))}},unmountComponent:function(){o.unmountIDFromEnvironment(this._rootNodeID)}}),e.exports=u},function(e,t,n){"use strict";function r(e,t){return null==t||o.hasBooleanValue[e]&&!t||o.hasNumericValue[e]&&isNaN(t)||o.hasPositiveNumericValue[e]&&1>t||o.hasOverloadedBooleanValue[e]&&t===!1}var o=n(47),i=n(48),a=(n(18),{createMarkupForID:function(e){return o.ID_ATTRIBUTE_NAME+"="+i(e)},createMarkupForProperty:function(e,t){if(o.isStandardName.hasOwnProperty(e)&&o.isStandardName[e]){if(r(e,t))return"";var n=o.getAttributeName[e];return o.hasBooleanValue[e]||o.hasOverloadedBooleanValue[e]&&t===!0?n:n+"="+i(t)}return o.isCustomAttribute(e)?null==t?"":e+"="+i(t):null},setValueForProperty:function(e,t,n){if(o.isStandardName.hasOwnProperty(t)&&o.isStandardName[t]){var i=o.getMutationMethod[t];if(i)i(e,n);else if(r(t,n))this.deleteValueForProperty(e,t);else if(o.mustUseAttribute[t])e.setAttribute(o.getAttributeName[t],""+n);else{var a=o.getPropertyName[t];o.hasSideEffects[t]&&""+e[a]==""+n||(e[a]=n)}}else o.isCustomAttribute(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))},deleteValueForProperty:function(e,t){if(o.isStandardName.hasOwnProperty(t)&&o.isStandardName[t]){var n=o.getMutationMethod[t];if(n)n(e,void 0);else if(o.mustUseAttribute[t])e.removeAttribute(o.getAttributeName[t]);else{var r=o.getPropertyName[t],i=o.getDefaultValueForProperty(e.nodeName,r);o.hasSideEffects[t]&&""+e[r]===i||(e[r]=i)}}else o.isCustomAttribute(t)&&e.removeAttribute(t)}});e.exports=a},function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var o=n(10),i={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=e.Properties||{},n=e.DOMAttributeNames||{},a=e.DOMPropertyNames||{},u=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var l in t){o(!s.isStandardName.hasOwnProperty(l)),s.isStandardName[l]=!0;var c=l.toLowerCase();if(s.getPossibleStandardName[c]=l,n.hasOwnProperty(l)){var p=n[l];s.getPossibleStandardName[p]=l,s.getAttributeName[l]=p}else s.getAttributeName[l]=c;s.getPropertyName[l]=a.hasOwnProperty(l)?a[l]:l,u.hasOwnProperty(l)?s.getMutationMethod[l]=u[l]:s.getMutationMethod[l]=null;var d=t[l];s.mustUseAttribute[l]=r(d,i.MUST_USE_ATTRIBUTE),s.mustUseProperty[l]=r(d,i.MUST_USE_PROPERTY),s.hasSideEffects[l]=r(d,i.HAS_SIDE_EFFECTS),s.hasBooleanValue[l]=r(d,i.HAS_BOOLEAN_VALUE),s.hasNumericValue[l]=r(d,i.HAS_NUMERIC_VALUE),s.hasPositiveNumericValue[l]=r(d,i.HAS_POSITIVE_NUMERIC_VALUE),s.hasOverloadedBooleanValue[l]=r(d,i.HAS_OVERLOADED_BOOLEAN_VALUE),o(!s.mustUseAttribute[l]||!s.mustUseProperty[l]),o(s.mustUseProperty[l]||!s.hasSideEffects[l]),o(!!s.hasBooleanValue[l]+!!s.hasNumericValue[l]+!!s.hasOverloadedBooleanValue[l]<=1)}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;e.exports=r},function(e,t,n){"use strict";var r=n(51),o=n(70),i={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){o.purgeID(e)}};e.exports=i},function(e,t,n){"use strict";var r=n(52),o=n(61),i=n(46),a=n(70),s=n(31),u=n(10),l=n(69),c={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},p={updatePropertyByID:function(e,t,n){var r=a.getNode(e);u(!c.hasOwnProperty(t)),null!=n?i.setValueForProperty(r,t,n):i.deleteValueForProperty(r,t)},deletePropertyByID:function(e,t,n){var r=a.getNode(e);u(!c.hasOwnProperty(t)),i.deleteValueForProperty(r,t,n)},updateStylesByID:function(e,t){var n=a.getNode(e);r.setValueForStyles(n,t)},updateInnerHTMLByID:function(e,t){var n=a.getNode(e);l(n,t)},updateTextContentByID:function(e,t){var n=a.getNode(e);o.updateTextContent(n,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=a.getNode(e);o.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n]+)/,c="data-danger-index",p={dangerouslyRenderMarkup:function(e){u(o.canUseDOM);for(var t,n={},p=0;pi;i++)r[i]=e[i];return r}var o=n(10);e.exports=r},function(e,t,n){function r(e){return i(!!a),d.hasOwnProperty(e)||(e="*"),s.hasOwnProperty(e)||("*"===e?a.innerHTML="":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?d[e]:null}var o=n(54),i=n(10),a=o.canUseDOM?document.createElement("div"):null,s={circle:!0,clipPath:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},u=[1,'"],l=[1,"","
"],c=[3,"","
"],p=[1,"",""],d={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c,circle:p,clipPath:p,defs:p,ellipse:p,g:p,line:p,linearGradient:p,path:p,polygon:p,polyline:p,radialGradient:p,rect:p,stop:p,text:p};e.exports=r},function(e,t,n){"use strict";var r=n(9),o=r({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});e.exports=o},function(e,t,n){"use strict";var r=n(54),o=n(49),i=n(69),a=function(e,t){e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){i(e,o(t))})),e.exports=a},function(e,t,n){"use strict";var r=n(54),o=/^[ \r\n\t\f]/,i=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,a=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),o.test(t)||"<"===t[0]&&i.test(t)){e.innerHTML="\ufeff"+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}e.exports=a},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function o(e){var t=O(e);return t&&K.getID(t)}function i(e){var t=a(e);if(t)if(L.hasOwnProperty(t)){var n=L[t];n!==e&&(w(!c(n,t)),L[t]=e)}else L[t]=e;return t}function a(e){return e&&e.getAttribute&&e.getAttribute(k)||""}function s(e,t){var n=a(e);n!==t&&delete L[n],e.setAttribute(k,t),L[t]=e}function u(e){return L.hasOwnProperty(e)&&c(L[e],e)||(L[e]=K.findReactNodeByID(e)),L[e]}function l(e){var t=b.get(e)._rootNodeID;return C.isNullComponentID(t)?null:(L.hasOwnProperty(t)&&c(L[t],t)||(L[t]=K.findReactNodeByID(t)),L[t])}function c(e,t){if(e){w(a(e)===t);var n=K.findReactContainerForID(t);if(n&&N(n,e))return!0}return!1}function p(e){delete L[e]}function d(e){var t=L[e];return t&&c(t,e)?void(W=t):!1}function f(e){W=null,E.traverseAncestors(e,d);var t=W;return W=null,t}function h(e,t,n,r,o){var i=D.mountComponent(e,t,r,P);e._isTopLevel=!0,K._mountImageIntoNode(i,n,o)}function v(e,t,n,r){var o=T.ReactReconcileTransaction.getPooled();o.perform(h,null,e,t,n,o,r),T.ReactReconcileTransaction.release(o)}var m=n(47),g=n(71),y=(n(20),n(14)),C=(n(35),n(79)),E=n(22),b=n(28),_=n(80),x=n(31),D=n(32),M=n(26),T=n(29),P=n(17),N=n(82),O=n(85),I=n(86),w=n(10),R=n(69),S=n(89),A=(n(18),E.SEPARATOR),k=m.ID_ATTRIBUTE_NAME,L={},U=1,F=9,j={},B={},V=[],W=null,K={_instancesByReactRootID:j,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return K.scrollMonitor(n,function(){M.enqueueElementInternal(e,t),r&&M.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){w(t&&(t.nodeType===U||t.nodeType===F)),g.ensureScrollValueMonitoring();var n=K.registerContainer(t);return j[n]=e,n},_renderNewRootComponent:function(e,t,n){var r=I(e,null),o=K._registerComponent(r,t);return T.batchedUpdates(v,r,o,t,n),r},render:function(e,t,n){w(y.isValidElement(e));var r=j[o(t)];if(r){var i=r._currentElement;if(S(i,e))return K._updateRootComponent(r,e,t,n).getPublicInstance();K.unmountComponentAtNode(t)}var a=O(t),s=a&&K.isRenderedByReact(a),u=s&&!r,l=K._renderNewRootComponent(e,t,u).getPublicInstance();return n&&n.call(l),l},constructAndRenderComponent:function(e,t,n){var r=y.createElement(e,t);return K.render(r,n)},constructAndRenderComponentByID:function(e,t,n){var r=document.getElementById(n);return w(r),K.constructAndRenderComponent(e,t,r)},registerContainer:function(e){var t=o(e);return t&&(t=E.getReactRootIDFromNodeID(t)),t||(t=E.createReactRootID()),B[t]=e,t},unmountComponentAtNode:function(e){w(e&&(e.nodeType===U||e.nodeType===F));var t=o(e),n=j[t];return n?(K.unmountComponentFromNode(n,e),delete j[t],delete B[t],!0):!1},unmountComponentFromNode:function(e,t){for(D.unmountComponent(e),t.nodeType===F&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=E.getReactRootIDFromNodeID(e),n=B[t];return n},findReactNodeByID:function(e){var t=K.findReactContainerForID(e);return K.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=K.getID(e);return t?t.charAt(0)===A:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(K.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var n=V,r=0,o=f(t)||e;for(n[0]=o.firstChild,n.length=1;rl;l++){var d=s[l];i.hasOwnProperty(d)&&i[d]||(d===u.topWheel?c("wheel")?m.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",n):c("mousewheel")?m.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",n):m.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",n):d===u.topScroll?c("scroll",!0)?m.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",n):m.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",m.ReactEventListener.WINDOW_HANDLE):d===u.topFocus||d===u.topBlur?(c("focus",!0)?(m.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",n),m.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",n)):c("focusin")&&(m.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",n),m.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",n)),i[u.topBlur]=!0,i[u.topFocus]=!0):h.hasOwnProperty(d)&&m.ReactEventListener.trapBubbledEvent(d,h[d],n),i[d]=!0)}},trapBubbledEvent:function(e,t,n){return m.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return m.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!d){var e=u.refreshScrollValues;m.ReactEventListener.monitorScrollValue(e),d=!0}},eventNameDispatchConfigs:i.eventNameDispatchConfigs,registrationNameModules:i.registrationNameModules,putListener:i.putListener,getListener:i.getListener,deleteListener:i.deleteListener,deleteAllListeners:i.deleteAllListeners});e.exports=m},function(e,t,n){"use strict";var r=n(73),o=n(7),i=n(74),a=n(75),s=n(10),u={},l=null,c=function(e){if(e){var t=o.executeDispatch,n=r.getPluginModuleForEvent(e);n&&n.executeDispatch&&(t=n.executeDispatch),o.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},p=null,d={injection:{injectMount:o.injection.injectMount,injectInstanceHandle:function(e){p=e},getInstanceHandle:function(){return p},injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},eventNameDispatchConfigs:r.eventNameDispatchConfigs,registrationNameModules:r.registrationNameModules,putListener:function(e,t,n){s(!n||"function"==typeof n);var r=u[t]||(u[t]={});r[e]=n},getListener:function(e,t){var n=u[t];return n&&n[e]},deleteListener:function(e,t){var n=u[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in u)delete u[t][e]},extractEvents:function(e,t,n,o){for(var a,s=r.plugins,u=0,l=s.length;l>u;u++){var c=s[u];if(c){var p=c.extractEvents(e,t,n,o);p&&(a=i(a,p))}}return a},enqueueEvents:function(e){e&&(l=i(l,e))},processEventQueue:function(){var e=l;l=null,a(e,c),s(!l)},__purge:function(){u={}},__getListenerBank:function(){return u}};e.exports=d},function(e,t,n){"use strict";function r(){if(s)for(var e in u){var t=u[e],n=s.indexOf(e);if(a(n>-1),!l.plugins[n]){a(t.extractEvents),l.plugins[n]=t;var r=t.eventTypes;for(var i in r)a(o(r[i],t,i))}}}function o(e,t,n){a(!l.eventNameDispatchConfigs.hasOwnProperty(n)),l.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];i(s,t,n)}return!0}return e.registrationName?(i(e.registrationName,t,n),!0):!1}function i(e,t,n){a(!l.registrationNameModules[e]),l.registrationNameModules[e]=t,l.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(10),s=null,u={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){a(!s),s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];u.hasOwnProperty(n)&&u[n]===o||(a(!u[n]),u[n]=o,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return l.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=l.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];l.plugins.length=0;var t=l.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=l.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};e.exports=l},function(e,t,n){"use strict";function r(e,t){if(o(null!=t),null==e)return t;var n=Array.isArray(e),r=Array.isArray(t);return n&&r?(e.push.apply(e,t),e):n?(e.push(t),e):r?[e].concat(t):[e,t]}var o=n(10);e.exports=r},function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};e.exports=n},function(e,t,n){"use strict";function r(e){o.enqueueEvents(e),o.processEventQueue()}var o=n(72),i={handleTopLevel:function(e,t,n,i){var a=o.extractEvents(e,t,n,i);r(a)}};e.exports=i},function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};e.exports=n},function(e,t,n){"use strict";/** 3 | * Checks if an event is supported in the current execution environment. 4 | * 5 | * NOTE: This will not work correctly for non-generic events such as `change`, 6 | * `reset`, `load`, `error`, and `select`. 7 | * 8 | * Borrows from Modernizr. 9 | * 10 | * @param {string} eventNameSuffix Event name, e.g. "click". 11 | * @param {?boolean} capture Check if the capture phase is supported. 12 | * @return {boolean} True if the event is supported. 13 | * @internal 14 | * @license Modernizr 3.0.0pre (Custom Build) | MIT 15 | */ 16 | function r(e,t){if(!i.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,r=n in document;if(!r){var a=document.createElement("div");a.setAttribute(n,"return;"),r="function"==typeof a[n]}return!r&&o&&"wheel"===e&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var o,i=n(54);i.canUseDOM&&(o=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),e.exports=r},function(e,t,n){"use strict";function r(e){c[e]=!0}function o(e){delete c[e]}function i(e){return!!c[e]}var a,s=n(14),u=n(28),l=n(10),c={},p={injectEmptyComponent:function(e){a=s.createFactory(e)}},d=function(){};d.prototype.componentDidMount=function(){var e=u.get(this);e&&r(e._rootNodeID)},d.prototype.componentWillUnmount=function(){var e=u.get(this);e&&o(e._rootNodeID)},d.prototype.render=function(){return l(a),a()};var f=s.createElement(d),h={emptyElement:f,injection:p,isNullComponentID:i};e.exports=h},function(e,t,n){"use strict";var r=n(81),o={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return e.replace(">"," "+o.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var n=t.getAttribute(o.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=o},function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0;o";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t,n)+o},_createOpenTagMarkupAndPutListeners:function(e){var t=this._currentElement.props,n="<"+this._tag;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(b.hasOwnProperty(r))o(this._rootNodeID,r,i,e);else{r===x&&(i&&(i=this._previousStyleCopy=v({},t.style)),i=s.createMarkupForStyles(i));var a=l.createMarkupForProperty(r,i);a&&(n+=" "+a)}}if(e.renderToStaticMarkup)return n+">";var u=l.createMarkupForID(this._rootNodeID);return n+" "+u+">"},_createContentMarkup:function(e,t){var n="";("listing"===this._tag||"pre"===this._tag||"textarea"===this._tag)&&(n="\n");var r=this._currentElement.props,o=r.dangerouslySetInnerHTML;if(null!=o){if(null!=o.__html)return n+o.__html}else{var i=_[typeof r.children]?r.children:null,a=null!=i?null:r.children;if(null!=i)return n+m(i);if(null!=a){var s=this.mountChildren(a,e,t);return n+s.join("")}}return n},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,n,o){r(this._currentElement.props),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e,o)},_updateDOMProperties:function(e,t){var n,r,i,a=this._currentElement.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===x){var s=this._previousStyleCopy;for(r in s)s.hasOwnProperty(r)&&(i=i||{},i[r]="");this._previousStyleCopy=null}else b.hasOwnProperty(n)?C(this._rootNodeID,n):(u.isStandardName[n]||u.isCustomAttribute(n))&&M.deletePropertyByID(this._rootNodeID,n);for(n in a){var l=a[n],c=n===x?this._previousStyleCopy:e[n];if(a.hasOwnProperty(n)&&l!==c)if(n===x)if(l?l=this._previousStyleCopy=v({},l):this._previousStyleCopy=null,c){for(r in c)!c.hasOwnProperty(r)||l&&l.hasOwnProperty(r)||(i=i||{},i[r]="");for(r in l)l.hasOwnProperty(r)&&c[r]!==l[r]&&(i=i||{},i[r]=l[r])}else i=l;else b.hasOwnProperty(n)?o(this._rootNodeID,n,l,t):(u.isStandardName[n]||u.isCustomAttribute(n))&&M.updatePropertyByID(this._rootNodeID,n,l)}i&&M.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t,n){var r=this._currentElement.props,o=_[typeof e.children]?e.children:null,i=_[typeof r.children]?r.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=r.dangerouslySetInnerHTML&&r.dangerouslySetInnerHTML.__html,u=null!=o?null:e.children,l=null!=i?null:r.children,c=null!=o||null!=a,p=null!=i||null!=s;null!=u&&null==l?this.updateChildren(null,t,n):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=s?a!==s&&M.updateInnerHTMLByID(this._rootNodeID,s):null!=l&&this.updateChildren(l,t,n)},unmountComponent:function(){this.unmountChildren(),c.deleteAllListeners(this._rootNodeID),p.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},h.measureMethods(a,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),v(a.prototype,a.Mixin,f.Mixin),a.injection={injectIDOperations:function(e){a.BackendIDOperations=M=e}},e.exports=a},function(e,t,n){"use strict";function r(e,t,n){h.push({parentID:e,parentNode:null,type:c.INSERT_MARKUP,markupIndex:v.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function o(e,t,n){h.push({parentID:e,parentNode:null,type:c.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function i(e,t){h.push({parentID:e,parentNode:null,type:c.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function a(e,t){h.push({parentID:e,parentNode:null,type:c.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function s(){h.length&&(l.processChildrenUpdates(h,v),u())}function u(){h.length=0,v.length=0}var l=n(88),c=n(67),p=n(32),d=n(92),f=0,h=[],v=[],m={Mixin:{mountChildren:function(e,t,n){var r=d.instantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=this._rootNodeID+a,l=p.mountComponent(s,u,t,n);s._mountIndex=i,o.push(l),i++}return o},updateTextContent:function(e){f++;var t=!0;try{var n=this._renderedChildren;d.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(e),t=!1}finally{f--,f||(t?u():s())}},updateChildren:function(e,t,n){f++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{f--,f||(r?u():s())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=d.updateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var i,a=0,s=0;for(i in o)if(o.hasOwnProperty(i)){var u=r&&r[i],l=o[i];u===l?(this.moveChild(u,s,a),a=Math.max(u._mountIndex,a),u._mountIndex=s):(u&&(a=Math.max(u._mountIndex,a),this._unmountChildByName(u,i)),this._mountChildByNameAtIndex(l,i,s,t,n)),s++}for(i in r)!r.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||this._unmountChildByName(r[i],i)}},unmountChildren:function(){var e=this._renderedChildren;d.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex8&&11>=x),T=32,P=String.fromCharCode(T),N=f.topLevelTypes,O={beforeInput:{phasedRegistrationNames:{bubbled:C({onBeforeInput:null}),captured:C({onBeforeInputCapture:null})},dependencies:[N.topCompositionEnd,N.topKeyPress,N.topTextInput,N.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:C({onCompositionEnd:null}),captured:C({onCompositionEndCapture:null})},dependencies:[N.topBlur,N.topCompositionEnd,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:C({onCompositionStart:null}),captured:C({onCompositionStartCapture:null})},dependencies:[N.topBlur,N.topCompositionStart,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:C({onCompositionUpdate:null}),captured:C({onCompositionUpdateCapture:null})},dependencies:[N.topBlur,N.topCompositionUpdate,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]}},I=!1,w=null,R={eventTypes:O,extractEvents:function(e,t,n,r){return[l(e,t,n,r),d(e,t,n,r)]}};e.exports=R},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return m(e,r)}function o(e,t,n){var o=t?v.bubbled:v.captured,i=r(e,n,o);i&&(n._dispatchListeners=f(n._dispatchListeners,i),n._dispatchIDs=f(n._dispatchIDs,e))}function i(e){e&&e.dispatchConfig.phasedRegistrationNames&&d.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,o,e)}function a(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=m(e,r);o&&(n._dispatchListeners=f(n._dispatchListeners,o),n._dispatchIDs=f(n._dispatchIDs,e))}}function s(e){e&&e.dispatchConfig.registrationName&&a(e.dispatchMarker,null,e)}function u(e){h(e,i)}function l(e,t,n,r){d.injection.getInstanceHandle().traverseEnterLeave(n,r,a,e,t)}function c(e){h(e,s)}var p=n(8),d=n(72),f=n(74),h=n(75),v=p.PropagationPhases,m=d.getListener,g={accumulateTwoPhaseDispatches:u,accumulateDirectDispatches:c,accumulateEnterLeaveDispatches:l};e.exports=g},function(e,t,n){"use strict";function r(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var o=n(12),i=n(16),a=n(98);i(r.prototype,{getText:function(){return"value"in this._root?this._root.value:this._root[a()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;r>e&&n[e]===o[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===o[i-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),o.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(){return!i&&o.canUseDOM&&(i="textContent"in document.documentElement?"textContent":"innerText"),i}var o=n(54),i=null;e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(100),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var o in r)if(r.hasOwnProperty(o)){var i=r[o];i?this[o]=i(n):this[o]=n[o]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;s?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse}var o=n(12),i=n(16),a=n(19),s=n(101),u={type:null,target:s,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=a.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=a.thatReturnsTrue},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),r.Interface=u,r.augmentClass=function(e,t){var n=this,r=Object.create(n.prototype);i(r,e.prototype),e.prototype=r,e.prototype.constructor=e,e.Interface=i({},n.Interface,t),e.augmentClass=n.augmentClass,o.addPoolingTo(e,o.threeArgumentPooler)},o.addPoolingTo(r,o.threeArgumentPooler),e.exports=r},function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}e.exports=n},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(100),i={data:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function o(e){var t=x.getPooled(N.change,I,e);E.accumulateTwoPhaseDispatches(t),_.batchedUpdates(i,t)}function i(e){C.enqueueEvents(e),C.processEventQueue()}function a(e,t){O=e,I=t,O.attachEvent("onchange",o)}function s(){O&&(O.detachEvent("onchange",o),O=null,I=null)}function u(e,t,n){return e===P.topChange?n:void 0}function l(e,t,n){e===P.topFocus?(s(),a(t,n)):e===P.topBlur&&s()}function c(e,t){O=e,I=t,w=e.value,R=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(O,"value",k),O.attachEvent("onpropertychange",d)}function p(){O&&(delete O.value,O.detachEvent("onpropertychange",d),O=null,I=null,w=null,R=null)}function d(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==w&&(w=t,o(e))}}function f(e,t,n){return e===P.topInput?n:void 0}function h(e,t,n){e===P.topFocus?(p(),c(t,n)):e===P.topBlur&&p()}function v(e,t,n){return e!==P.topSelectionChange&&e!==P.topKeyUp&&e!==P.topKeyDown||!O||O.value===w?void 0:(w=O.value,I)}function m(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function g(e,t,n){return e===P.topClick?n:void 0}var y=n(8),C=n(72),E=n(96),b=n(54),_=n(29),x=n(100),D=n(78),M=n(104),T=n(42),P=y.topLevelTypes,N={change:{phasedRegistrationNames:{bubbled:T({onChange:null}),captured:T({onChangeCapture:null})},dependencies:[P.topBlur,P.topChange,P.topClick,P.topFocus,P.topInput,P.topKeyDown,P.topKeyUp,P.topSelectionChange]}},O=null,I=null,w=null,R=null,S=!1;b.canUseDOM&&(S=D("change")&&(!("documentMode"in document)||document.documentMode>8));var A=!1;b.canUseDOM&&(A=D("input")&&(!("documentMode"in document)||document.documentMode>9));var k={get:function(){return R.get.call(this)},set:function(e){w=""+e,R.set.call(this,e)}},L={eventTypes:N,extractEvents:function(e,t,n,o){var i,a;if(r(t)?S?i=u:a=l:M(t)?A?i=f:(i=v,a=h):m(t)&&(i=g),i){var s=i(e,t,n);if(s){var c=x.getPooled(N.change,s,o);return E.accumulateTwoPhaseDispatches(c),c}}a&&a(e,t,n)}};e.exports=L},function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=n},function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};e.exports=r},function(e,t,n){"use strict";var r=n(42),o=[r({ResponderEventPlugin:null}),r({SimpleEventPlugin:null}),r({TapEventPlugin:null}),r({EnterLeaveEventPlugin:null}),r({ChangeEventPlugin:null}),r({SelectEventPlugin:null}),r({BeforeInputEventPlugin:null}),r({AnalyticsEventPlugin:null}),r({MobileSafariClickEventPlugin:null})];e.exports=o},function(e,t,n){"use strict";var r=n(8),o=n(96),i=n(108),a=n(70),s=n(42),u=r.topLevelTypes,l=a.getFirstReactDOM,c={mouseEnter:{registrationName:s({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:s({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},p=[null,null],d={eventTypes:c,extractEvents:function(e,t,n,r){if(e===u.topMouseOver&&(r.relatedTarget||r.fromElement))return null;if(e!==u.topMouseOut&&e!==u.topMouseOver)return null;var s;if(t.window===t)s=t;else{var d=t.ownerDocument;s=d?d.defaultView||d.parentWindow:window}var f,h;if(e===u.topMouseOut?(f=t,h=l(r.relatedTarget||r.toElement)||s):(f=s,h=t),f===h)return null;var v=f?a.getID(f):"",m=h?a.getID(h):"",g=i.getPooled(c.mouseLeave,v,r);g.type="mouseleave",g.target=f,g.relatedTarget=h;var y=i.getPooled(c.mouseEnter,m,r);return y.type="mouseenter",y.target=h,y.relatedTarget=f,o.accumulateEnterLeaveDispatches(g,y,v,m),p[0]=g,p[1]=y,p}};e.exports=d},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(109),i=n(77),a=n(110),s={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:a,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+i.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+i.currentScrollTop}};o.augmentClass(r,s),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(100),i=n(101),a={view:function(e){if(e.view)return e.view;var t=i(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};o.augmentClass(r,a),e.exports=r},function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return r?!!n[r]:!1}function r(e){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=r},function(e,t,n){"use strict";var r,o=n(47),i=n(54),a=o.injection.MUST_USE_ATTRIBUTE,s=o.injection.MUST_USE_PROPERTY,u=o.injection.HAS_BOOLEAN_VALUE,l=o.injection.HAS_SIDE_EFFECTS,c=o.injection.HAS_NUMERIC_VALUE,p=o.injection.HAS_POSITIVE_NUMERIC_VALUE,d=o.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(i.canUseDOM){var f=document.implementation;r=f&&f.hasFeature&&f.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var h={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:a|u,allowTransparency:a,alt:null,async:u,autoComplete:null,autoPlay:u,cellPadding:null,cellSpacing:null,charSet:a,checked:s|u,classID:a,className:r?a:s,cols:a|p,colSpan:null,content:null,contentEditable:null,contextMenu:a,controls:s|u,coords:null,crossOrigin:null,data:null,dateTime:a,defer:u,dir:null,disabled:a|u,download:d,draggable:null,encType:null,form:a,formAction:a,formEncType:a,formMethod:a,formNoValidate:u,formTarget:a,frameBorder:a,headers:null,height:a,hidden:a|u,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:s,label:null,lang:null,list:a,loop:s|u,low:null,manifest:a,marginHeight:null,marginWidth:null,max:null,maxLength:a,media:a,mediaGroup:null,method:null,min:null,multiple:s|u,muted:s|u,name:null,noValidate:u,open:u,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:s|u,rel:null,required:u,role:a,rows:a|p,rowSpan:null,sandbox:null,scope:null,scoped:u,scrolling:null,seamless:a|u,selected:s|u,shape:null,size:a|p,sizes:a,span:p,spellCheck:null,src:null,srcDoc:s,srcSet:a,start:c,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:s|l, 17 | width:a,wmode:a,autoCapitalize:null,autoCorrect:null,itemProp:a,itemScope:a|u,itemType:a,itemID:a,itemRef:a,property:null,unselectable:a},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=h},function(e,t,n){"use strict";var r=n(8),o=n(19),i=r.topLevelTypes,a={eventTypes:null,extractEvents:function(e,t,n,r){if(e===i.topTouchStart){var a=r.target;a&&!a.onclick&&(a.onclick=o)}}};e.exports=a},function(e,t,n){"use strict";var r=n(114),o={getDOMNode:function(){return r(this)}};e.exports=o},function(e,t,n){"use strict";function r(e){return null==e?null:s(e)?e:o.has(e)?i.getNodeFromInstance(e):(a(null==e.render||"function"!=typeof e.render),void a(!1))}var o=(n(20),n(28)),i=n(70),a=n(10),s=n(84);n(18);e.exports=r},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(29),i=n(39),a=n(16),s=n(19),u={initialize:s,close:function(){d.isBatchingUpdates=!1}},l={initialize:s,close:o.flushBatchedUpdates.bind(o)},c=[l,u];a(r.prototype,i.Mixin,{getTransactionWrappers:function(){return c}});var p=new r,d={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o){var i=d.isBatchingUpdates;d.isBatchingUpdates=!0,i?e(t,n,r,o):p.perform(e,null,t,n,r,o)}};e.exports=d},function(e,t,n){"use strict";var r=n(117),o=n(113),i=n(40),a=n(14),s=n(9),u=a.createFactory("button"),l=s({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),c=i.createClass({displayName:"ReactDOMButton",tagName:"BUTTON",mixins:[r,o],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&l[t]||(e[t]=this.props[t]);return u(e,this.props.children)}});e.exports=c},function(e,t,n){"use strict";var r=n(118),o={componentDidMount:function(){this.props.autoFocus&&r(this.getDOMNode())}};e.exports=o},function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}e.exports=n},function(e,t,n){"use strict";var r=n(8),o=n(120),i=n(113),a=n(40),s=n(14),u=s.createFactory("form"),l=a.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[i,o],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(r.topLevelTypes.topSubmit,"submit")}});e.exports=l},function(e,t,n){"use strict";function r(e){e.remove()}var o=n(71),i=n(74),a=n(75),s=n(10),u={trapBubbledEvent:function(e,t){s(this.isMounted());var n=this.getDOMNode();s(n);var r=o.trapBubbledEvent(e,t,n);this._localEventListeners=i(this._localEventListeners,r)},componentWillUnmount:function(){this._localEventListeners&&a(this._localEventListeners,r)}};e.exports=u},function(e,t,n){"use strict";var r=n(8),o=n(120),i=n(113),a=n(40),s=n(14),u=s.createFactory("img"),l=a.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[i,o],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(r.topLevelTypes.topError,"error")}});e.exports=l},function(e,t,n){"use strict";var r=n(8),o=n(120),i=n(113),a=n(40),s=n(14),u=s.createFactory("iframe"),l=a.createClass({displayName:"ReactDOMIframe",tagName:"IFRAME",mixins:[i,o],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(r.topLevelTypes.topLoad,"load")}});e.exports=l},function(e,t,n){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var o=n(117),i=n(46),a=n(124),s=n(113),u=n(40),l=n(14),c=n(70),p=n(29),d=n(16),f=n(10),h=l.createFactory("input"),v={},m=u.createClass({displayName:"ReactDOMInput",tagName:"INPUT",mixins:[o,a.Mixin,s],getInitialState:function(){var e=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=e?e:null}},render:function(){var e=d({},this.props);e.defaultChecked=null,e.defaultValue=null;var t=a.getValue(this);e.value=null!=t?t:this.state.initialValue;var n=a.getChecked(this);return e.checked=null!=n?n:this.state.initialChecked,e.onChange=this._handleChange,h(e,this.props.children)},componentDidMount:function(){var e=c.getID(this.getDOMNode());v[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=c.getID(e);delete v[t]},componentDidUpdate:function(e,t,n){var r=this.getDOMNode();null!=this.props.checked&&i.setValueForProperty(r,"checked",this.props.checked||!1);var o=a.getValue(this);null!=o&&i.setValueForProperty(r,"value",""+o)},_handleChange:function(e){var t,n=a.getOnChange(this);n&&(t=n.call(this,e)),p.asap(r,this);var o=this.props.name;if("radio"===this.props.type&&null!=o){for(var i=this.getDOMNode(),s=i;s.parentNode;)s=s.parentNode;for(var u=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),l=0,d=u.length;d>l;l++){var h=u[l];if(h!==i&&h.form===i.form){var m=c.getID(h);f(m);var g=v[m];f(g),p.asap(r,g)}}}return t}});e.exports=m},function(e,t,n){"use strict";function r(e){l(null==e.props.checkedLink||null==e.props.valueLink)}function o(e){r(e),l(null==e.props.value&&null==e.props.onChange)}function i(e){r(e),l(null==e.props.checked&&null==e.props.onChange)}function a(e){this.props.valueLink.requestChange(e.target.value)}function s(e){this.props.checkedLink.requestChange(e.target.checked)}var u=n(125),l=n(10),c={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},p={Mixin:{propTypes:{value:function(e,t,n){return!e[t]||c[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t,n){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func}},getValue:function(e){return e.props.valueLink?(o(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(i(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(o(e),a):e.props.checkedLink?(i(e),s):e.props.onChange}};e.exports=p},function(e,t,n){"use strict";function r(e){function t(t,n,r,o,i){if(o=o||b,null==n[r]){var a=C[i];return t?new Error("Required "+a+" `"+r+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function o(e){function t(t,n,r,o){var i=t[n],a=v(i);if(a!==e){var s=C[o],u=m(i);return new Error("Invalid "+s+" `"+n+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `"+e+"`."))}return null}return r(t)}function i(){return r(E.thatReturns(null))}function a(e){function t(t,n,r,o){var i=t[n];if(!Array.isArray(i)){var a=C[o],s=v(i);return new Error("Invalid "+a+" `"+n+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u>",_=s(),x=d(),D={array:o("array"),bool:o("boolean"),func:o("function"),number:o("number"),object:o("object"),string:o("string"),any:i(),arrayOf:a,element:_,instanceOf:u,node:x,objectOf:c,oneOf:l,oneOfType:p,shape:f};e.exports=D},function(e,t,n){"use strict";var r=n(113),o=n(40),i=n(14),a=(n(18),i.createFactory("option")),s=o.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[r],componentWillMount:function(){},render:function(){return a(this.props,this.props.children)}});e.exports=s},function(e,t,n){"use strict";function r(){if(this._pendingUpdate){this._pendingUpdate=!1;var e=s.getValue(this);null!=e&&this.isMounted()&&i(this,e)}}function o(e,t,n){if(null==e[t])return null;if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to must be a scalar value if `multiple` is false.")}function i(e,t){var n,r,o,i=e.getDOMNode().options;if(e.props.multiple){for(n={},r=0,o=t.length;o>r;r++)n[""+t[r]]=!0;for(r=0,o=i.length;o>r;r++){var a=n.hasOwnProperty(i[r].value);i[r].selected!==a&&(i[r].selected=a)}}else{for(n=""+t,r=0,o=i.length;o>r;r++)if(i[r].value===n)return void(i[r].selected=!0);i.length&&(i[0].selected=!0)}}var a=n(117),s=n(124),u=n(113),l=n(40),c=n(14),p=n(29),d=n(16),f=c.createFactory("select"),h=l.createClass({displayName:"ReactDOMSelect",tagName:"SELECT",mixins:[a,s.Mixin,u],propTypes:{defaultValue:o,value:o},render:function(){var e=d({},this.props);return e.onChange=this._handleChange,e.value=null,f(e,this.props.children)},componentWillMount:function(){this._pendingUpdate=!1},componentDidMount:function(){var e=s.getValue(this);null!=e?i(this,e):null!=this.props.defaultValue&&i(this,this.props.defaultValue)},componentDidUpdate:function(e){var t=s.getValue(this);null!=t?(this._pendingUpdate=!1,i(this,t)):!e.multiple!=!this.props.multiple&&(null!=this.props.defaultValue?i(this,this.props.defaultValue):i(this,this.props.multiple?[]:""))},_handleChange:function(e){var t,n=s.getOnChange(this);return n&&(t=n.call(this,e)),this._pendingUpdate=!0,p.asap(r,this),t}});e.exports=h},function(e,t,n){"use strict";function r(){this.isMounted()&&this.forceUpdate()}var o=n(117),i=n(46),a=n(124),s=n(113),u=n(40),l=n(14),c=n(29),p=n(16),d=n(10),f=(n(18),l.createFactory("textarea")),h=u.createClass({displayName:"ReactDOMTextarea",tagName:"TEXTAREA",mixins:[o,a.Mixin,s],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&(d(null==e),Array.isArray(t)&&(d(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var n=a.getValue(this);return{initialValue:""+(null!=n?n:e)}},render:function(){var e=p({},this.props);return d(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null,e.onChange=this._handleChange,f(e,this.state.initialValue)},componentDidUpdate:function(e,t,n){var r=a.getValue(this);if(null!=r){var o=this.getDOMNode();i.setValueForProperty(o,"value",""+r)}},_handleChange:function(e){var t,n=a.getOnChange(this);return n&&(t=n.call(this,e)),c.asap(r,this),t}});e.exports=h},function(e,t,n){"use strict";function r(e){var t=p.getID(e),n=c.getReactRootIDFromNodeID(t),r=p.findReactContainerForID(n),o=p.getFirstReactDOM(r);return o}function o(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function i(e){for(var t=p.getFirstReactDOM(h(e.nativeEvent))||window,n=t;n;)e.ancestors.push(n),n=r(n);for(var o=0,i=e.ancestors.length;i>o;o++){t=e.ancestors[o];var a=p.getID(t)||"";m._handleTopLevel(e.topLevelType,t,a,e.nativeEvent)}}function a(e){var t=v(window);e(t)}var s=n(130),u=n(54),l=n(12),c=n(22),p=n(70),d=n(29),f=n(16),h=n(101),v=n(131);f(o.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),l.addPoolingTo(o,l.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(e){m._handleTopLevel=e},setEnabled:function(e){m._enabled=!!e},isEnabled:function(){return m._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?s.listen(r,t,m.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?s.capture(r,t,m.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=a.bind(null,e);s.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(m._enabled){var n=o.getPooled(e,t);try{d.batchedUpdates(i,n)}finally{o.release(n)}}}};e.exports=m},function(e,t,n){var r=n(19),o={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!0),{remove:function(){e.removeEventListener(t,n,!0)}}):{remove:r}},registerDefault:function(){}};e.exports=o},function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}e.exports=n},function(e,t,n){"use strict";var r=n(47),o=n(72),i=n(88),a=n(40),s=n(79),u=n(71),l=n(38),c=n(90),p=n(31),d=n(23),f=n(29),h={Component:i.injection,Class:a.injection,DOMComponent:c.injection,DOMProperty:r.injection,EmptyComponent:s.injection,EventPluginHub:o.injection,EventEmitter:u.injection,NativeComponent:l.injection,Perf:p.injection,RootIndex:d.injection,Updates:f.injection};e.exports=h},function(e,t,n){"use strict";function r(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=o.getPooled(null),this.putListenerQueue=u.getPooled()}var o=n(30),i=n(12),a=n(71),s=n(134),u=n(138),l=n(39),c=n(16),p={initialize:s.getSelectionInformation,close:s.restoreSelection},d={initialize:function(){var e=a.isEnabled();return a.setEnabled(!1),e},close:function(e){a.setEnabled(e)}},f={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},h={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},v=[h,p,d,f],m={getTransactionWrappers:function(){return v},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null,u.release(this.putListenerQueue),this.putListenerQueue=null}};c(r.prototype,l.Mixin,m),i.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e){return i(document.documentElement,e)}var o=n(135),i=n(82),a=n(118),s=n(137),u={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=s();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=s(),n=e.focusedElem,o=e.selectionRange;t!==n&&r(n)&&(u.hasSelectionCapabilities(n)&&u.setSelection(n,o),a(n))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=o.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,r=t.end;if("undefined"==typeof r&&(r=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(r,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",r-n),i.select()}else o.setOffsets(e,t)}};e.exports=u},function(e,t,n){"use strict";function r(e,t,n,r){return e===n&&t===r}function o(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function i(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var n=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0),u=r(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),l=u?0:s.toString().length,c=s.cloneRange();c.selectNodeContents(e),c.setEnd(s.startContainer,s.startOffset);var p=r(c.startContainer,c.startOffset,c.endContainer,c.endOffset),d=p?0:c.toString().length,f=d+l,h=document.createRange();h.setStart(n,o),h.setEnd(i,a);var v=h.collapsed;return{start:v?f:d,end:v?d:f}}function a(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[c()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=l(e,o),u=l(e,i);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=n(54),l=n(136),c=n(98),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:p?o:i,setOffsets:p?a:s};e.exports=d},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,t>=i&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}e.exports=o},function(e,t){function n(){try{return document.activeElement||document.body}catch(e){return document.body}}e.exports=n},function(e,t,n){"use strict";function r(){this.listenersToPut=[]}var o=n(12),i=n(71),a=n(16);a(r.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e=32||13===t?t:0}e.exports=n},function(e,t,n){"use strict";function r(e){if(e.key){var t=i[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=o(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var o=n(146),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(108),i={dataTransfer:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(109),i=n(110),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n){o.call(this,e,t,n)}var o=n(108),i={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),e.exports=r},function(e,t,n){"use strict";var r=n(47),o=r.injection.MUST_USE_ATTRIBUTE,i={Properties:{clipPath:o,cx:o,cy:o,d:o,dx:o,dy:o,fill:o,fillOpacity:o,fontFamily:o,fontSize:o,fx:o,fy:o,gradientTransform:o,gradientUnits:o,markerEnd:o,markerMid:o,markerStart:o,offset:o,opacity:o,patternContentUnits:o,patternUnits:o,points:o,preserveAspectRatio:o,r:o,rx:o,ry:o,spreadMethod:o,stopColor:o,stopOpacity:o,stroke:o,strokeDasharray:o,strokeLinecap:o,strokeOpacity:o,strokeWidth:o,textAnchor:o,transform:o,version:o,viewBox:o,x1:o,x2:o,x:o,y1:o,y2:o,y:o},DOMAttributeNames:{clipPath:"clip-path",fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};e.exports=i},function(e,t,n){"use strict";function r(e){var t=i.createFactory(e),n=o.createClass({tagName:e.toUpperCase(),displayName:"ReactFullPageComponent"+e,componentWillUnmount:function(){a(!1)},render:function(){return t(this.props)}});return n}var o=n(40),i=n(14),a=n(10);e.exports=r},function(e,t,n){"use strict";function r(e){p(i.isValidElement(e));var t;try{var n=a.createReactRootID();return t=u.getPooled(!1),t.perform(function(){var r=c(e,null),o=r.mountComponent(n,t,l);return s.addChecksumToMarkup(o)},null)}finally{u.release(t)}}function o(e){p(i.isValidElement(e));var t;try{var n=a.createReactRootID();return t=u.getPooled(!0),t.perform(function(){var r=c(e,null);return r.mountComponent(n,t,l)},null)}finally{u.release(t)}}var i=n(14),a=n(22),s=n(80),u=n(154),l=n(17),c=n(86),p=n(10);e.exports={renderToString:r,renderToStaticMarkup:o}},function(e,t,n){"use strict";function r(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=i.getPooled(null),this.putListenerQueue=a.getPooled()}var o=n(12),i=n(30),a=n(138),s=n(39),u=n(16),l=n(19),c={initialize:function(){this.reactMountReady.reset()},close:l},p={initialize:function(){this.putListenerQueue.reset()},close:l},d=[p,c],f={getTransactionWrappers:function(){return d},getReactMountReady:function(){ 18 | return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){i.release(this.reactMountReady),this.reactMountReady=null,a.release(this.putListenerQueue),this.putListenerQueue=null}};u(r.prototype,s.Mixin,f),o.addPoolingTo(r),e.exports=r},function(e,t,n){"use strict";function r(e){return i(o.isValidElement(e)),e}var o=n(14),i=n(10);e.exports=r},function(e,t){"use strict";function n(e,t){var n={};return function(r){n[t]=r,e.setState(n)}}var r={createStateSetter:function(e,t){return function(n,r,o,i,a,s){var u=t.call(e,n,r,o,i,a,s);u&&e.setState(u)}},createStateKeySetter:function(e,t){var r=e.__keySetters||(e.__keySetters={});return r[t]||(r[t]=n(e,t))}};r.Mixin={createStateSetter:function(e){return r.createStateSetter(this,e)},createStateKeySetter:function(e){return r.createStateKeySetter(this,e)}},e.exports=r},function(e,t,n){"use strict";var r=n(140),o={shouldComponentUpdate:function(e,t){return!r(this.props,e)||!r(this.state,t)}};e.exports=o},function(e,t,n){"use strict";var r=n(6),o=n(16),i=r.createFactory(n(159)),a=r.createFactory(n(164)),s=r.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:r.PropTypes.string.isRequired,transitionAppear:r.PropTypes.bool,transitionEnter:r.PropTypes.bool,transitionLeave:r.PropTypes.bool},getDefaultProps:function(){return{transitionAppear:!1,transitionEnter:!0,transitionLeave:!0}},_wrapChild:function(e){return a({name:this.props.transitionName,appear:this.props.transitionAppear,enter:this.props.transitionEnter,leave:this.props.transitionLeave},e)},render:function(){return i(o({},this.props,{childFactory:this._wrapChild}))}});e.exports=s},function(e,t,n){"use strict";var r=n(6),o=n(160),i=n(16),a=n(161),s=n(19),u=r.createClass({displayName:"ReactTransitionGroup",propTypes:{component:r.PropTypes.any,childFactory:r.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:s.thatReturnsArgument}},getInitialState:function(){return{children:o.getChildMapping(this.props.children)}},componentWillMount:function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidMount:function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t)},componentWillReceiveProps:function(e){var t=o.getChildMapping(e.children),n=this.state.children;this.setState({children:o.mergeChildMappings(n,t)});var r;for(r in t){var i=n&&n.hasOwnProperty(r);!t[r]||i||this.currentlyTransitioningKeys[r]||this.keysToEnter.push(r)}for(r in n){var a=t&&t.hasOwnProperty(r);!n[r]||a||this.currentlyTransitioningKeys[r]||this.keysToLeave.push(r)}},componentDidUpdate:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},performAppear:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)},_handleDoneAppearing:function(e){var t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performLeave:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var n=o.getChildMapping(this.props.children);if(n&&n.hasOwnProperty(e))this.performEnter(e);else{var r=i({},this.state.children);delete r[e],this.setState({children:r})}},render:function(){var e=[];for(var t in this.state.children){var n=this.state.children[t];n&&e.push(a(this.props.childFactory(n),{ref:t,key:t}))}return r.createElement(this.props.component,this.props,e)}});e.exports=u},function(e,t,n){"use strict";var r=n(11),o=n(13),i={getChildMapping:function(e){return e?o.extract(r.map(e,function(e){return e})):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var i in e)t.hasOwnProperty(i)?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;a1)for(var r=1;n>r;r++)t=arguments[r],t&&(e=(e?e+" ":"")+t);return e}e.exports=n},function(e,t,n){"use strict";var r=n(6),o=n(165),i=n(166),a=n(155),s=(n(18),17),u=r.createClass({displayName:"ReactCSSTransitionGroupChild",transition:function(e,t){var n=this.getDOMNode(),r=this.props.name+"-"+e,a=r+"-active",s=function(e){e&&e.target!==n||(o.removeClass(n,r),o.removeClass(n,a),i.removeEndEventListener(n,s),t&&t())};i.addEndEventListener(n,s),o.addClass(n,r),this.queueClass(a)},queueClass:function(e){this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,s))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(o.addClass.bind(o,this.getDOMNode())),this.classNameQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameQueue=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout)},componentWillAppear:function(e){this.props.appear?this.transition("appear",e):e()},componentWillEnter:function(e){this.props.enter?this.transition("enter",e):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e):e()},render:function(){return a(this.props.children)}});e.exports=u},function(e,t,n){var r=n(10),o={addClass:function(e,t){return r(!/\s/.test(t)),t&&(e.classList?e.classList.add(t):o.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return r(!/\s/.test(t)),t&&(e.classList?e.classList.remove(t):o.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?o.addClass:o.removeClass)(e,t)},hasClass:function(e,t){return r(!/\s/.test(t)),e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}};e.exports=o},function(e,t,n){"use strict";function r(){var e=document.createElement("div"),t=e.style;"AnimationEvent"in window||delete s.animationend.animation,"TransitionEvent"in window||delete s.transitionend.transition;for(var n in s){var r=s[n];for(var o in r)if(o in t){u.push(r[o]);break}}}function o(e,t,n){e.addEventListener(t,n,!1)}function i(e,t,n){e.removeEventListener(t,n,!1)}var a=n(54),s={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},u=[];a.canUseDOM&&r();var l={addEndEventListener:function(e,t){return 0===u.length?void window.setTimeout(t,0):void u.forEach(function(n){o(e,n,t)})},removeEndEventListener:function(e,t){0!==u.length&&u.forEach(function(n){i(e,n,t)})}};e.exports=l},function(e,t,n){"use strict";function r(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).join(" "):Array.prototype.join.call(arguments," ")}n(18);e.exports=r},function(e,t,n){"use strict";function r(e){return Array.isArray(e)?e.concat():e&&"object"==typeof e?a(new e.constructor,e):e}function o(e,t,n){u(Array.isArray(e));var r=t[n];u(Array.isArray(r))}function i(e,t){if(u("object"==typeof t),l.call(t,f))return u(1===Object.keys(t).length),t[f];var n=r(e);if(l.call(t,h)){var s=t[h];u(s&&"object"==typeof s),u(n&&"object"==typeof n),a(n,t[h])}l.call(t,c)&&(o(e,t,c),t[c].forEach(function(e){n.push(e)})),l.call(t,p)&&(o(e,t,p),t[p].forEach(function(e){n.unshift(e)})),l.call(t,d)&&(u(Array.isArray(e)),u(Array.isArray(t[d])),t[d].forEach(function(e){u(Array.isArray(e)),n.splice.apply(n,e)})),l.call(t,v)&&(u("function"==typeof t[v]),n=t[v](n));for(var m in t)g.hasOwnProperty(m)&&g[m]||(n[m]=i(e[m],t[m]));return n}var a=n(16),s=n(42),u=n(10),l={}.hasOwnProperty,c=s({$push:null}),p=s({$unshift:null}),d=s({$splice:null}),f=s({$set:null}),h=s({$merge:null}),v=s({$apply:null}),m=[c,p,d,f,h,v],g={};m.forEach(function(e){g[e]=!0}),e.exports=i}])}); 19 | //# sourceMappingURL=curved-carousel.min.js.map -------------------------------------------------------------------------------- /karma.conf.coverage.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* 3 | * Karma Configuration: "coverage" version. 4 | * 5 | * This configuration is the same as basic one-shot version, just with coverage. 6 | */ 7 | var webpackCovCfg = require("./webpack.config.coverage"); 8 | 9 | module.exports = function (config) { 10 | require("./karma.conf")(config); 11 | config.set({ 12 | reporters: ["spec", "coverage"], 13 | webpack: webpackCovCfg, 14 | coverageReporter: { 15 | reporters: [ 16 | { type: "json", file: "coverage.json" }, 17 | { type: "lcov" }, 18 | { type: "text-summary" } 19 | ], 20 | dir: "coverage/client" 21 | } 22 | }); 23 | }; 24 | -------------------------------------------------------------------------------- /karma.conf.dev.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* 3 | * Karma Configuration: "dev" version. 4 | * 5 | * This configuration relies on a `webpack-dev-server` already running and 6 | * bundling `webpack.config.test.js` on port 3001. If this is not running, 7 | * then the alternate `karma.conf.js` file will _also_ run the webpack dev 8 | * server during the test run. 9 | */ 10 | module.exports = function (config) { 11 | config.set({ 12 | frameworks: ["mocha", "phantomjs-shim"], 13 | reporters: ["spec"], 14 | browsers: ["PhantomJS"], 15 | basePath: ".", // repository root. 16 | files: [ 17 | // Sinon has issues with webpack. Do global include. 18 | "node_modules/sinon/pkg/sinon.js", 19 | 20 | // Test bundle (must be created via `npm run dev|hot|server-test`) 21 | "http://127.0.0.1:3001/assets/main.js" 22 | ], 23 | port: 9999, 24 | singleRun: true, 25 | client: { 26 | mocha: { 27 | ui: "bdd" 28 | } 29 | } 30 | }); 31 | }; 32 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /* 3 | * Karma Configuration: "full" version. 4 | * 5 | * This configuration runs a temporary `webpack-dev-server` and builds 6 | * the test files one-off for just a single run. This is appropriate for a 7 | * CI environment or if you're not otherwise running `npm run dev|hot`. 8 | */ 9 | var webpackCfg = require("./webpack.config.test"); 10 | 11 | // BUG: Karma 0.13 is broken for circular imports 12 | // TODO: Upgrade Karma to 0.13 when upstream bug is fixed. 13 | // https://github.com/FormidableLabs/ 14 | // formidable-react-component-boilerplate/issues/25 15 | 16 | module.exports = function (config) { 17 | // Start with the "dev" (webpack-dev-server is already running) config 18 | // and add in the webpack stuff. 19 | require("./karma.conf.dev")(config); 20 | 21 | // Overrides. 22 | config.set({ 23 | preprocessors: { 24 | "test/client/main.js": ["webpack"] 25 | }, 26 | files: [ 27 | // Sinon has issues with webpack. Do global include. 28 | "node_modules/sinon/pkg/sinon.js", 29 | 30 | // Test bundle (created via local webpack-dev-server in this config). 31 | "test/client/main.js" 32 | ], 33 | webpack: webpackCfg, 34 | webpackServer: { 35 | port: 3002, // Choose a non-conflicting port (3000 app, 3001 test dev) 36 | quiet: false, 37 | noInfo: true, 38 | stats: { 39 | assets: false, 40 | colors: true, 41 | version: false, 42 | hash: false, 43 | timings: false, 44 | chunks: false, 45 | chunkModules: false 46 | } 47 | } 48 | }); 49 | }; 50 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "curved-carousel", 3 | "version": "0.0.1", 4 | "description": "React Component", 5 | "main": "lib/index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/walmartreact/curved-carousel.git" 9 | }, 10 | "author": "Ken Wheeler", 11 | "license": "MIT", 12 | "bugs": { 13 | "url": "https://github.com/walmartreact/curved-carousel/issues" 14 | }, 15 | "homepage": "https://github.com/walmartreact/curved-carousel", 16 | "scripts": { 17 | "postinstall": "npm run build-lib", 18 | "preversion": "npm run check", 19 | "version": "npm run clean && npm run build && git add -A dist", 20 | "clean-dist": "rimraf dist", 21 | "build-dist-min": "webpack --config webpack.config.js", 22 | "build-dist-dev": "webpack --config webpack.config.dev.js", 23 | "build-dist": "npm run clean-dist && npm run build-dist-min && npm run build-dist-dev", 24 | "clean-lib": "rimraf lib", 25 | "build-lib": "npm run clean-lib && babel --stage 0 src -d lib", 26 | "clean": "npm run clean-lib && npm run clean-dist", 27 | "build": "npm run build-lib && npm run build-dist", 28 | "server-dev": "webpack-dev-server --port 3000 --config demo/webpack.config.dev.js --content-base demo", 29 | "server-hot": "webpack-dev-server --port 3000 --config demo/webpack.config.hot.js --hot --content-base demo", 30 | "server-test": "webpack-dev-server --port 3001 --config webpack.config.test.js", 31 | "dev": "npm run server-dev & npm run server-test", 32 | "hot": "npm run server-hot & npm run server-test", 33 | "open-demo": "opener http://127.0.0.1:3000", 34 | "open-dev": "npm run dev & npm run open-demo", 35 | "open-hot": "npm run hot & npm run open-demo", 36 | "lint-node": "eslint -c .eslintrc-node *.js demo/webpack.*.js", 37 | "lint-react": "eslint --ext .js,.jsx -c .eslintrc-react src demo/*.jsx", 38 | "lint-react-test": "eslint --ext .js,.jsx -c .eslintrc-react-test src test/client", 39 | "lint": "npm run lint-node && npm run lint-react && npm run lint-react-test", 40 | "test-frontend": "node node_modules/karma/bin/karma start karma.conf.js", 41 | "test-frontend-ci": "node node_modules/karma/bin/karma start --browsers PhantomJS,Firefox karma.conf.coverage.js", 42 | "test-frontend-cov": "node node_modules/karma/bin/karma start karma.conf.coverage.js", 43 | "test-frontend-dev": "node node_modules/karma/bin/karma start karma.conf.dev.js", 44 | "test": "npm run test-frontend && echo 'TODO Server 13, Integration 12 tests.'", 45 | "test-ci": "npm run test-frontend-ci", 46 | "test-cov": "npm run test-frontend-cov", 47 | "test-dev": "npm run test-frontend-dev", 48 | "check": "npm run lint && npm run test", 49 | "check-ci": "npm run lint && npm run test-ci", 50 | "check-cov": "npm run lint && npm run test-cov", 51 | "check-dev": "npm run lint && npm run test-dev" 52 | }, 53 | "dependencies": { 54 | "babel": "^5.5.8", 55 | "babel-core": "^5.5.8", 56 | "babel-loader": "^5.3.2", 57 | "css-loader": "~0.9.0", 58 | "rimraf": "^2.4.0", 59 | "style-loader": "~0.8.0", 60 | "url-loader": "~0.5.5", 61 | "webpack": "^1.10.0" 62 | }, 63 | "devDependencies": { 64 | "babel-eslint": "^3.1.25", 65 | "chai": "^3.2.0", 66 | "eslint": "^7.7.0", 67 | "eslint-config-defaults": "^3.0.3", 68 | "eslint-plugin-filenames": "^0.1.1", 69 | "eslint-plugin-react": "^2.6.4", 70 | "isparta-loader": "^0.2.0", 71 | "karma": "^0.12.37", 72 | "karma-chrome-launcher": "^0.2.0", 73 | "karma-coverage": "^0.4.2", 74 | "karma-firefox-launcher": "^0.1.6", 75 | "karma-ie-launcher": "^0.2.0", 76 | "karma-mocha": "^0.2.0", 77 | "karma-phantomjs-launcher": "^0.2.0", 78 | "karma-phantomjs-shim": "^1.0.0", 79 | "karma-safari-launcher": "^0.1.1", 80 | "karma-sauce-launcher": "^0.2.14", 81 | "karma-spec-reporter": "0.0.20", 82 | "karma-webpack": "^1.6.0", 83 | "lodash": "^4.17.20", 84 | "mocha": "^2.2.5", 85 | "opener": "^1.4.1", 86 | "phantomjs": "^1.9.17", 87 | "react": "0.13.x", 88 | "react-hot-loader": "^1.2.8", 89 | "sinon": "^1.15.4", 90 | "sinon-chai": "^2.8.0", 91 | "webpack-dev-server": "^3.11.0" 92 | } 93 | } -------------------------------------------------------------------------------- /src/components/curved-carousel.jsx: -------------------------------------------------------------------------------- 1 | /* eslint no-unused-lets:0 */ 2 | /*global window, requestAnimationFrame*/ 3 | 4 | import React from 'react/addons'; 5 | import cloneWithProps from 'react/lib/cloneWithProps'; 6 | 7 | React.initializeTouchEvents(true); 8 | 9 | class CurvedCarousel extends React.Component { 10 | constructor(props) { 11 | super(props); 12 | this.state = { 13 | dragging: false, 14 | left: (this.props.children.length * -1) * (this.props.childWidth + this.props.spacing), 15 | top: 0, 16 | velocity: 0, 17 | accel: 0, 18 | containerWidth: 0 19 | }; 20 | this.touchObject = {}; 21 | this.clickSafe = true; 22 | this._getMouseEvents = this._getMouseEvents.bind(this); 23 | this._rafCb = this._rafCb.bind(this); 24 | this._setPosition = this._setPosition.bind(this); 25 | } 26 | componentDidMount() { 27 | this._startRaf(); 28 | this._setPosition(); 29 | window.addEventListener('load', this._setPosition); 30 | window.addEventListener('resize', this._setPosition); 31 | } 32 | render() { 33 | return ( 34 |
39 |
40 | {this._childrenWithPositions()} 41 |
42 |
43 | ) 44 | } 45 | _setPosition() { 46 | this.setState({ 47 | containerWidth: React.findDOMNode(this.refs.container).offsetWidth 48 | }) 49 | } 50 | _onSelect(index) { 51 | if (Math.abs(this.state.velocity) < 0.5) { 52 | this.props.onSelect && this.props.onSelect.call(null, this.currentChildren[index].props.originalIndex); 53 | } 54 | } 55 | _childrenWithPositions() { 56 | let children = Array.prototype.slice.call(this.props.children, 0); 57 | let returnChildren = []; 58 | Array.prototype.slice.call(this.props.children, 0, this.props.children.length).reverse() 59 | .forEach((child, index) => { 60 | children.unshift(cloneWithProps(child, {key: 'clone' + (children.length - index)})); 61 | }); 62 | Array.prototype.slice.call(this.props.children, 0, this.props.children.length) 63 | .forEach((child, index) => { 64 | children.push(cloneWithProps(child, {key: 'clone' + index})); 65 | }); 66 | children.forEach((child, index) => { 67 | let left = (this.state.left + 68 | (index * (this.props.childWidth + this.props.spacing))); 69 | 70 | const alpha = 360 / this.state.containerWidth * 71 | (this.state.containerWidth / 2); 72 | 73 | const R = this.state.containerWidth; 74 | 75 | const y = left * Math.cos(1); 76 | 77 | let degrees = y / Math.PI * (this.props.curve / 100); 78 | 79 | let top = (Math.abs(y) * (this.props.curve / 100) / Math.SQRT1_2); 80 | 81 | const exp = left / (this.props.childWidth + this.props.spacing); 82 | 83 | top = top * Math.abs(exp) * ((Math.LN10 / 10)); 84 | 85 | if(this.props.rotation === false) { 86 | degrees = 0; 87 | } 88 | 89 | const style = { 90 | position: 'absolute', 91 | left: left + (this.state.containerWidth / 2) - (this.props.childWidth / 2), 92 | transform: 'rotate(' + degrees + 'deg)', 93 | transformOrigin: 'bottom center', 94 | top: top, 95 | width: this.props.childWidth 96 | }; 97 | returnChildren.push(cloneWithProps(child, {style: style, key: index, onClick: this._onSelect.bind(this, index)})); 98 | }); 99 | 100 | this.currentChildren = returnChildren; 101 | 102 | return returnChildren; 103 | } 104 | _getMouseEvents() { 105 | var self = this; 106 | 107 | if (this.props.dragging === false) { 108 | return null; 109 | } 110 | 111 | return { 112 | onMouseDown(e) { 113 | self.touchObject = { 114 | startX: e.pageX, 115 | startY: e.pageY, 116 | prevX: e.pageX, 117 | prevY: e.pageY, 118 | endX: e.pageX, 119 | endY: e.pageY, 120 | previousTime: new Date(), 121 | currentTime: new Date() 122 | }; 123 | 124 | self.setState({ 125 | dragging: true, 126 | velocity: 0 127 | }); 128 | }, 129 | onMouseMove(e) { 130 | if (!self.state.dragging) { 131 | return; 132 | } 133 | 134 | if (!self.touchObject) { 135 | return; 136 | } 137 | 138 | var direction = self._swipeDirection( 139 | self.touchObject.startX, 140 | e.clientX, 141 | self.touchObject.startY, 142 | e.clientY 143 | ); 144 | 145 | if (direction !== 0) { 146 | e.preventDefault(); 147 | } 148 | 149 | var length = self.props.vertical ? Math.round(Math.sqrt(Math.pow(e.clientY - self.touchObject.startY, 2))) 150 | : Math.round(Math.sqrt(Math.pow(e.clientX - self.touchObject.startX, 2))) 151 | 152 | self.touchObject = { 153 | startX: self.touchObject.startX, 154 | startY: self.touchObject.startY, 155 | previousTime: self.touchObject.currentTime, 156 | currentTime: new Date(), 157 | prevX: self.touchObject.endX, 158 | prevY: self.touchObject.endY, 159 | endX: e.pageX, 160 | endY: e.pageY, 161 | length: length, 162 | direction: direction 163 | }; 164 | 165 | let left = self.state.left + (e.clientX - self.touchObject.prevX); 166 | 167 | if (left < (self.props.children.length * -2) * (self.props.childWidth + self.props.spacing)) { 168 | left = (self.props.children.length * -1) * (self.props.childWidth + self.props.spacing); 169 | } 170 | 171 | if (left > (self.props.children.length * -1) * (self.props.childWidth + self.props.spacing)) { 172 | left = (self.props.children.length * -2) * (self.props.childWidth + self.props.spacing); 173 | } 174 | 175 | self.setState({ 176 | left: left 177 | }); 178 | }, 179 | onMouseUp(e) { 180 | if (!self.state.dragging) { 181 | return; 182 | } 183 | 184 | if (!self.touchObject) { 185 | return; 186 | } 187 | 188 | let velocity = self.touchObject.prevX - self.touchObject.endX !== 0 ? 189 | (self.touchObject.prevX - self.touchObject.endX) / 190 | (self.touchObject.currentTime - self.touchObject.previousTime) 191 | * 12 : 0; 192 | 193 | self.setState({ 194 | dragging: false, 195 | velocity: velocity 196 | }, function() { 197 | self._handleSwipe(e); 198 | }); 199 | 200 | }, 201 | onMouseLeave(e) { 202 | if (!self.state.dragging) { 203 | return; 204 | } 205 | 206 | if (!self.touchObject) { 207 | return; 208 | } 209 | 210 | let velocity = self.touchObject.prevX - self.touchObject.endX !== 0 ? 211 | (self.touchObject.prevX - self.touchObject.endX) / 212 | (self.touchObject.currentTime - self.touchObject.previousTime) 213 | * 17 : 0; 214 | 215 | self.setState({ 216 | dragging: false, 217 | velocity: velocity 218 | }, function() { 219 | self._handleSwipe(e); 220 | }); 221 | 222 | } 223 | } 224 | } 225 | _handleClick(e) { 226 | if (this.clickSafe === true) { 227 | e.preventDefault(); 228 | e.stopPropagation(); 229 | e.nativeEvent.stopPropagation(); 230 | } 231 | } 232 | _handleSwipe() { 233 | this.touchObject = null; 234 | this._startRaf(); 235 | } 236 | _swipeDirection(x1, x2, y1, y2) { 237 | 238 | var xDist, yDist, r, swipeAngle; 239 | 240 | xDist = x1 - x2; 241 | yDist = y1 - y2; 242 | r = Math.atan2(yDist, xDist); 243 | 244 | swipeAngle = Math.round(r * 180 / Math.PI); 245 | if (swipeAngle < 0) { 246 | swipeAngle = 360 - Math.abs(swipeAngle); 247 | } 248 | if ((swipeAngle <= 45) && (swipeAngle >= 0)) { 249 | return 1; 250 | } 251 | if ((swipeAngle <= 360) && (swipeAngle >= 315)) { 252 | return 1; 253 | } 254 | if ((swipeAngle >= 135) && (swipeAngle <= 225)) { 255 | return -1; 256 | } 257 | if (this.props.vertical === true) { 258 | if ((swipeAngle >= 35) && (swipeAngle <= 135)) { 259 | return 1; 260 | } else { 261 | return -1; 262 | } 263 | } 264 | return 0; 265 | 266 | } 267 | _rafCb() { 268 | 269 | if (this.state.dragging) { 270 | return; 271 | } 272 | 273 | let vel = this.state.velocity.toFixed(2) * this.props.friction; 274 | 275 | if (Math.abs(vel) < 0.1) { 276 | return; 277 | } 278 | 279 | let left = this.state.left - vel; 280 | 281 | if (left < (this.props.children.length * -2) * (this.props.childWidth + this.props.spacing)) { 282 | left = (this.props.children.length * -1) * (this.props.childWidth + this.props.spacing); 283 | } 284 | 285 | if (left > (this.props.children.length * -1) * (this.props.childWidth + this.props.spacing)) { 286 | left = (this.props.children.length * -2) * (this.props.childWidth + this.props.spacing); 287 | } 288 | 289 | this.setState({ 290 | velocity: vel, 291 | left: left 292 | }); 293 | 294 | requestAnimationFrame(this._rafCb); 295 | } 296 | _startRaf() { 297 | requestAnimationFrame(this._rafCb); 298 | } 299 | } 300 | 301 | CurvedCarousel.displayName = 'CurvedCarousel'; 302 | 303 | CurvedCarousel.propTypes = { 304 | childWidth: React.PropTypes.number, 305 | curve: React.PropTypes.number, 306 | spacing: React.PropTypes.number, 307 | rotation: React.PropTypes.bool, 308 | friction: React.PropTypes.number 309 | }; 310 | 311 | CurvedCarousel.defaultProps = { 312 | childWidth: 180, 313 | curve: 50, 314 | spacing: 40, 315 | rotation: true, 316 | friction: 0.95 317 | }; 318 | 319 | module.exports = CurvedCarousel; 320 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | CurvedCarousel: require("./components/curved-carousel") 3 | }; 4 | -------------------------------------------------------------------------------- /test/client/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Test setup for client-side tests. 3 | * 4 | * Intended for: 5 | * - Karma tests: `npm run test-client` 6 | * - Browser tests: `http://localhost:3000/test/client/test.html` 7 | */ 8 | /*globals window:false*/ 9 | const chai = require("chai"); 10 | const sinonChai = require("sinon-chai"); 11 | 12 | // -------------------------------------------------------------------------- 13 | // Chai / Sinon / Mocha configuration. 14 | // -------------------------------------------------------------------------- 15 | // Exports 16 | window.expect = chai.expect; 17 | 18 | // Plugins 19 | chai.use(sinonChai); 20 | 21 | // Mocha (part of static include). 22 | window.mocha.setup({ 23 | ui: "bdd", 24 | bail: false 25 | }); 26 | 27 | // -------------------------------------------------------------------------- 28 | // Bootstrap 29 | // -------------------------------------------------------------------------- 30 | // Use webpack to include all app code _except_ the entry point so we can get 31 | // code coverage in the bundle, whether tested or not. 32 | const srcReq = require.context("src", true, /\.jsx?$/); 33 | srcReq.keys().map(srcReq); 34 | 35 | // Use webpack to infer and `require` tests automatically. 36 | const testsReq = require.context(".", true, /\.spec.jsx?$/); 37 | testsReq.keys().map(testsReq); 38 | 39 | // Only start mocha in browser. 40 | if (!window.__karma__) { 41 | window.mocha.run(); 42 | } 43 | -------------------------------------------------------------------------------- /test/client/spec/components/curved-carousel.spec.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * Client tests 3 | */ 4 | import React from "react/addons"; 5 | import Component from "src/components/curved-carousel"; 6 | 7 | // Use `TestUtils` to inject into DOM, simulate events, etc. 8 | // See: https://facebook.github.io/react/docs/test-utils.html 9 | const TestUtils = React.addons.TestUtils; 10 | 11 | describe("components/curved-carousel", function () { 12 | 13 | it("has expected content with deep render", function () { 14 | // This is a "deep" render that renders children + all into an actual 15 | // browser DOM node. 16 | // 17 | // https://facebook.github.io/react/docs/test-utils.html#renderintodocument 18 | const rendered = TestUtils.renderIntoDocument(); 19 | 20 | // This is a real DOM node to assert on. 21 | const divNode = TestUtils 22 | .findRenderedDOMComponentWithTag(rendered, "div") 23 | .getDOMNode(); 24 | 25 | expect(divNode).to.have.property("innerHTML", "Edit me!"); 26 | }); 27 | 28 | it("has expected content with shallow render", function () { 29 | // This is a "shallow" render that renders only the current component 30 | // without using the actual DOM. 31 | // 32 | // https://facebook.github.io/react/docs/test-utils.html#shallow-rendering 33 | const renderer = TestUtils.createRenderer(); 34 | renderer.render(); 35 | const output = renderer.getRenderOutput(); 36 | 37 | expect(output.type).to.equal("div"); 38 | expect(output.props.children).to.contain("Edit me"); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /test/client/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Frontend Tests 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /webpack.config.coverage.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * Webpack frontend test (w/ coverage) configuration. 4 | */ 5 | var _ = require("lodash"); 6 | var testCfg = require("./webpack.config.test"); 7 | 8 | module.exports = _.merge({}, testCfg, { 9 | module: { 10 | preLoaders: [ 11 | // Manually instrument client code for code coverage. 12 | // https://github.com/deepsweet/isparta-loader handles ES6 + normal JS. 13 | { 14 | test: /src\/.*\.jsx?$/, 15 | exclude: /(test|node_modules)\//, 16 | loader: "isparta?{ babel: { stage: 1 } }" 17 | } 18 | ] 19 | } 20 | }); 21 | -------------------------------------------------------------------------------- /webpack.config.dev.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var webpack = require("webpack"); 4 | var config = require("./webpack.config"); 5 | 6 | // **WARNING**: Mutates base configuration. 7 | // We do this because lodash isn't available in `production` mode. 8 | config.output.filename = "curved-carousel.js"; 9 | config.plugins = [ 10 | new webpack.SourceMapDevToolPlugin("[file].map") 11 | ]; 12 | 13 | // Export mutated base. 14 | module.exports = config; 15 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var webpack = require("webpack"); 4 | var path = require("path"); 5 | 6 | module.exports = { 7 | cache: true, 8 | entry: path.join(__dirname, "src/index.js"), 9 | externals: [ 10 | { 11 | "react": { 12 | root: "React", 13 | commonjs2: "react", 14 | commonjs: "react", 15 | amd: "react" 16 | } 17 | } 18 | ], 19 | output: { 20 | path: path.join(__dirname, "dist"), 21 | filename: "curved-carousel.min.js", 22 | library: "CurvedCarousel", 23 | libraryTarget: "umd" 24 | }, 25 | resolve: { 26 | extensions: ["", ".js", ".jsx"] 27 | }, 28 | module: { 29 | loaders: [ 30 | { 31 | test: /\.jsx?$/, 32 | exclude: [/node_modules/], 33 | loader: "babel-loader?stage=0" 34 | }, { 35 | test: /\.css$/, 36 | loader: "style-loader!css-loader" 37 | }, { 38 | test: /\.(png|jpg)$/, 39 | loader: "url-loader?limit=8192" 40 | } 41 | ] 42 | }, 43 | plugins: [ 44 | new webpack.optimize.DedupePlugin(), 45 | new webpack.optimize.UglifyJsPlugin({ 46 | compress: { 47 | warnings: false 48 | } 49 | }), 50 | new webpack.DefinePlugin({ 51 | // Signal production, so that webpack removes non-production code that 52 | // is in condtionals like: `if (process.env.NODE_ENV === "production")` 53 | "process.env.NODE_ENV": JSON.stringify("production") 54 | }), 55 | new webpack.SourceMapDevToolPlugin("[file].map") 56 | ] 57 | }; 58 | -------------------------------------------------------------------------------- /webpack.config.test.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | /** 3 | * Webpack frontend test configuration. 4 | */ 5 | var path = require("path"); 6 | var _ = require("lodash"); 7 | var prodCfg = require("./webpack.config"); 8 | 9 | module.exports = { 10 | cache: true, 11 | context: path.join(__dirname, "test/client"), 12 | entry: "./main", 13 | output: { 14 | path: __dirname, 15 | filename: "main.js", 16 | publicPath: "/assets/" 17 | }, 18 | resolve: _.merge({}, prodCfg.resolve, { 19 | alias: { 20 | // Allow root import of `src/FOO` from ROOT/src. 21 | src: path.join(__dirname, "src") 22 | } 23 | }), 24 | module: prodCfg.module, 25 | devtool: "#source-map" 26 | }; 27 | --------------------------------------------------------------------------------