diff --git a/README.md b/README.md index 3200519..f640ae3 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ npm install react-countdown-clock | prop | type | default | description | |------------------|----------------|---------|-----------------------------------------------------------| | seconds | integer | 60 | Seconds to countdown | -| color | string | #000 | Colour of counter | +| color | string | #000 | Colour of progressing counter | +| backgroundColor | string | #000 | Colour of counter background, default to color | +| fontColor | string | #000 | Colour of counter text, default to color | | alpha | float | 1.0 | Alpha transparency of counter | | size | integer | 300 | Width & height of canvas element | | weight | integer | | Weight of circle, in pixels | diff --git a/build/react-countdown-clock.js b/build/react-countdown-clock.js index ab8d492..91cd304 100644 --- a/build/react-countdown-clock.js +++ b/build/react-countdown-clock.js @@ -1,7 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactCountdownClock=e(require("react")):t.ReactCountdownClock=e(t.React)}(this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/Users/hugh/Dropbox/Development/Web/react-countdown-clock/build",e(e.s=2)}([function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t,e,n,r,o,s,a,u){if(i(e),!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,r,o,s,a,u],h=0;c=new Error(e.replace(/%s/g,function(){return p[h++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(t){};t.exports=r},function(t,e,n){var r,i,o,s;o=n(0),i=n(3),r=n(7),s=r({_seconds:0,_radius:null,_fraction:null,_content:null,_canvas:null,_timeoutIds:[],displayName:"ReactCountdownClock",componentDidUpdate:function(t){if(t.seconds!==this.props.seconds&&(this._seconds=t.seconds,this._setupTimer()),t.color!==this.props.color&&(this._clearBackground(),this._drawBackground(),this._updateCanvas()),t.paused!==this.props.paused&&(this.props.paused||this._startTimer(),this.props.paused))return this._pauseTimer()},componentDidMount:function(){return this._seconds=this.props.seconds,this._setupTimer()},componentWillUnmount:function(){return this._cancelTimer()},_setupTimer:function(){if(this._setScale(),this._setupCanvases(),this._drawBackground(),this._drawTimer(),!this.props.paused)return this._startTimer()},_updateCanvas:function(){return this._clearTimer(),this._drawTimer()},_setScale:function(){return this._radius=this.props.size/2,this._fraction=2/this._seconds,this._tickPeriod=this._calculateTick(),this._innerRadius=this.props.weight?this._radius-this.props.weight:this._radius/1.8},_calculateTick:function(){var t,e;return e=1.8,t=this._seconds*e,t>1e3?1e3:t},_setupCanvases:function(){if(this._background=this.refs.background.getContext("2d"),this._timer=this.refs.timer.getContext("2d"),this._timer.textAlign="center",this._timer.textBaseline="middle",null!=this.props.onClick)return this.refs.component.addEventListener("click",this.props.onClick)},_startTimer:function(){return this._timeoutIds.push(setTimeout(function(t){return function(){return t._tick()}}(this),200))},_pauseTimer:function(){return this._stopTimer(),this._updateCanvas()},_stopTimer:function(){var t,e,n,r,i;for(n=this._timeoutIds,r=[],t=0,e=n.length;t=1&&(i="0"+r),s<10&&(r>=1||e>=1)&&(a="0"+s),u=[],e>0&&u.push(n),(r>0||e>0)&&u.push(i),u.push(a),u.join(":")):this._seconds.toFixed(t)},_fontSize:function(t){var e;return"auto"===this.props.fontSize?(e=function(){switch(t.length){case 8:return 4;case 5:return 3;default:return 2}}(),this._radius/e+"px"):this.props.fontSize},_drawTimer:function(){var t,e,n;return e=this._fraction*this._seconds+1.5,t=this._formattedTime(),n=this.props.paused&&null!=this.props.pausedText?this.props.pausedText:t,this._timer.globalAlpha=this.props.alpha,this._timer.fillStyle=this.props.color,this._timer.font="bold "+this._fontSize(t)+" "+this.props.font,this._timer.fillText(n,this._radius,this._radius),this._timer.beginPath(),this._timer.arc(this._radius,this._radius,this._radius,1.5*Math.PI,Math.PI*e,!1),this._timer.arc(this._radius,this._radius,this._innerRadius,Math.PI*e,1.5*Math.PI,!0),this._timer.closePath(),this._timer.fill()},render:function(){return o.createElement("div",{ref:"component",className:"react-countdown-clock"},o.createElement("canvas",{ref:"background",style:{position:"absolute"},width:this.props.size,height:this.props.size}),o.createElement("canvas",{ref:"timer",style:{position:"absolute"},width:this.props.size,height:this.props.size}))}}),s.propTypes={seconds:i.number,size:i.number,weight:i.number,color:i.string,fontSize:i.string,font:i.string,alpha:i.number,timeFormat:i.string,onComplete:i.func,onClick:i.func,showMilliseconds:i.bool,paused:i.bool,pausedText:i.string},s.defaultProps={seconds:60,size:300,color:"#000",alpha:1,timeFormat:"hms",fontSize:"auto",font:"Arial",showMilliseconds:!0,paused:!1},t.exports=s},function(t,e,n){t.exports=n(4)()},function(t,e,n){"use strict";var r=n(5),i=n(1),o=n(6);t.exports=function(){function t(t,e,n,r,s,a){a!==o&&i(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e,n){"use strict";function r(t){return function(){return t}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(t){return t},t.exports=i},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";var r=n(0),i=n(8);if(void 0===r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var o=(new r.Component).updater;t.exports=i(r.Component,r.isValidElement,o)},function(t,e,n){"use strict";function r(t){return t}function i(t,e,n){function i(t,e){var n=g.hasOwnProperty(e)?g[e]:null;T.hasOwnProperty(e)&&a("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",e),t&&a("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",e)}function c(t,n){if(n){a("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),a(!e(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=t.prototype,o=r.__reactAutoBindPairs;n.hasOwnProperty(u)&&b.mixins(t,n.mixins);for(var s in n)if(n.hasOwnProperty(s)&&s!==u){var c=n[s],p=r.hasOwnProperty(s);if(i(p,s),b.hasOwnProperty(s))b[s](t,c);else{var h=g.hasOwnProperty(s),d="function"==typeof c,m=d&&!h&&!p&&!1!==n.autobind;if(m)o.push(s,c),r[s]=c;else if(p){var _=g[s];a(h&&("DEFINE_MANY_MERGED"===_||"DEFINE_MANY"===_),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",_,s),"DEFINE_MANY_MERGED"===_?r[s]=l(r[s],c):"DEFINE_MANY"===_&&(r[s]=f(r[s],c))}else r[s]=c}}}else;}function p(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var i=n in b;a(!i,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var o=n in t;a(!o,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),t[n]=r}}}function h(t,e){a(t&&e&&"object"==typeof t&&"object"==typeof e,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in e)e.hasOwnProperty(n)&&(a(void 0===t[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),t[n]=e[n]);return t}function l(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return h(i,n),h(i,r),i}}function f(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function d(t,e){var n=e.bind(t);return n}function m(t){for(var e=t.__reactAutoBindPairs,n=0;n1e3?1e3:t},_setupCanvases:function(){if(this._background=this.refs.background.getContext("2d"),this._timer=this.refs.timer.getContext("2d"),this._timer.textAlign="center",this._timer.textBaseline="middle",null!=this.props.onClick)return this.refs.component.addEventListener("click",this.props.onClick)},_startTimer:function(){return this._timeoutIds.push(setTimeout(function(t){return function(){return t._tick()}}(this),200))},_pauseTimer:function(){return this._stopTimer(),this._updateCanvas()},_stopTimer:function(){var t,e,r,n,i;for(r=this._timeoutIds,n=[],t=0,e=r.length;t=1&&(i="0"+n),s<10&&(n>=1||e>=1)&&(a="0"+s),u=[],e>0&&u.push(r),(n>0||e>0)&&u.push(i),u.push(a),u.join(":")):this._seconds.toFixed(t)},_fontSize:function(t){var e,r;return"auto"===this.props.fontSize?(e=function(){switch(t.length){case 8:return 4;case 5:return 3;default:return 2}}(),r=this._radius/e,r+"px"):this.props.fontSize},_drawTimer:function(){var t,e,r;return e=this._fraction*this._seconds+1.5,t=this._formattedTime(),r=this.props.paused&&null!=this.props.pausedText?this.props.pausedText:t,this._timer.fillStyle=this.props.fontColor||this.props.color,this._timer.font="bold "+this._fontSize(t)+" "+this.props.font,this._timer.fillText(r,this._radius,this._radius),this._timer.fill(),this._timer.globalAlpha=this.props.alpha,this._timer.fillStyle=this.props.color,this._timer.beginPath(),this._timer.arc(this._radius,this._radius,this._radius,1.5*Math.PI,Math.PI*e,!1),this._timer.arc(this._radius,this._radius,this._innerRadius,Math.PI*e,1.5*Math.PI,!0),this._timer.closePath(),this._timer.fill()},render:function(){return o.createElement("div",{ref:"component",className:"react-countdown-clock"},o.createElement("canvas",{ref:"background",style:{position:"absolute"},width:this.props.size,height:this.props.size}),o.createElement("canvas",{ref:"timer",style:{position:"absolute"},width:this.props.size,height:this.props.size}))}}),s.propTypes={seconds:i.number,size:i.number,weight:i.number,color:i.string,fontSize:i.string,font:i.string,alpha:i.number,timeFormat:i.string,onComplete:i.func,onClick:i.func,showMilliseconds:i.bool,paused:i.bool,pausedText:i.string,backgroundColor:o.PropTypes.string,fontColor:o.PropTypes.string},s.defaultProps={seconds:60,size:300,color:"#000",alpha:1,timeFormat:"hms",fontSize:"auto",font:"Arial",showMilliseconds:!0,paused:!1},t.exports=s},function(t,e){function r(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(p===clearTimeout)return clearTimeout(t);if((p===n||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function s(){m&&h&&(m=!1,h.length?d=h.concat(d):y=-1,d.length&&a())}function a(){if(!m){var t=i(s);m=!0;for(var e=d.length;e;){for(h=d,d=[];++y1)for(var r=1;r1?e-1:0),n=1;n2?n-2:0),o=2;o 1000) {\n return 1000;\n } else {\n return tick;\n }\n },\n _setupCanvases: function() {\n this._background = this.refs.background.getContext('2d');\n this._timer = this.refs.timer.getContext('2d');\n this._timer.textAlign = 'center';\n this._timer.textBaseline = 'middle';\n if (this.props.onClick != null) {\n return this.refs.component.addEventListener('click', this.props.onClick);\n }\n },\n _startTimer: function() {\n return this._timeoutIds.push(setTimeout(((function(_this) {\n return function() {\n return _this._tick();\n };\n })(this)), 200));\n },\n _pauseTimer: function() {\n this._stopTimer();\n return this._updateCanvas();\n },\n _stopTimer: function() {\n var i, len, ref, results, timeout;\n ref = this._timeoutIds;\n results = [];\n for (i = 0, len = ref.length; i < len; i++) {\n timeout = ref[i];\n results.push(clearTimeout(timeout));\n }\n return results;\n },\n _cancelTimer: function() {\n this._stopTimer();\n if (this.props.onClick != null) {\n return this.refs.component.removeEventListener('click', this.props.onClick);\n }\n },\n _tick: function() {\n var start;\n start = Date.now();\n return this._timeoutIds.push(setTimeout(((function(_this) {\n return function() {\n var duration;\n duration = (Date.now() - start) / 1000;\n _this._seconds -= duration;\n if (_this._seconds <= 0) {\n _this._seconds = 0;\n _this._handleComplete();\n return _this._clearTimer();\n } else {\n _this._updateCanvas();\n return _this._tick();\n }\n };\n })(this)), this._tickPeriod));\n },\n _handleComplete: function() {\n if (this.props.onComplete) {\n return this.props.onComplete();\n }\n },\n _clearBackground: function() {\n return this._background.clearRect(0, 0, this.refs.timer.width, this.refs.timer.height);\n },\n _clearTimer: function() {\n return this._timer.clearRect(0, 0, this.refs.timer.width, this.refs.timer.height);\n },\n _drawBackground: function() {\n this._background.beginPath();\n this._background.globalAlpha = this.props.alpha / 3;\n this._background.fillStyle = this.props.color;\n this._background.arc(this._radius, this._radius, this._radius, 0, Math.PI * 2, false);\n this._background.arc(this._radius, this._radius, this._innerRadius, Math.PI * 2, 0, true);\n this._background.closePath();\n return this._background.fill();\n },\n _formattedTime: function() {\n var decimals, hours, hoursStr, minutes, minutesStr, ref, seconds, secondsStr, timeParts;\n decimals = (ref = this._seconds <= 9.9 && this.props.showMilliseconds) != null ? ref : {\n 1: 0\n };\n if (this.props.timeFormat === 'hms') {\n hours = parseInt(this._seconds / 3600) % 24;\n minutes = parseInt(this._seconds / 60) % 60;\n seconds = (this._seconds % 60).toFixed(decimals);\n hoursStr = \"\" + hours;\n minutesStr = \"\" + minutes;\n secondsStr = \"\" + seconds;\n if (hours < 10) {\n hoursStr = \"0\" + hours;\n }\n if (minutes < 10 && hours >= 1) {\n minutesStr = \"0\" + minutes;\n }\n if (seconds < 10 && (minutes >= 1 || hours >= 1)) {\n secondsStr = \"0\" + seconds;\n }\n timeParts = [];\n if (hours > 0) {\n timeParts.push(hoursStr);\n }\n if (minutes > 0 || hours > 0) {\n timeParts.push(minutesStr);\n }\n timeParts.push(secondsStr);\n return timeParts.join(':');\n } else {\n return this._seconds.toFixed(decimals);\n }\n },\n _fontSize: function(timeString) {\n var scale, size;\n if (this.props.fontSize === 'auto') {\n scale = (function() {\n switch (timeString.length) {\n case 8:\n return 4;\n case 5:\n return 3;\n default:\n return 2;\n }\n })();\n size = this._radius / scale;\n return size + \"px\";\n } else {\n return this.props.fontSize;\n }\n },\n _drawTimer: function() {\n var formattedTime, percent, text;\n percent = this._fraction * this._seconds + 1.5;\n formattedTime = this._formattedTime();\n text = (this.props.paused && (this.props.pausedText != null)) ? this.props.pausedText : formattedTime;\n this._timer.globalAlpha = this.props.alpha;\n this._timer.fillStyle = this.props.color;\n this._timer.font = \"bold \" + (this._fontSize(formattedTime)) + \" \" + this.props.font;\n this._timer.fillText(text, this._radius, this._radius);\n this._timer.beginPath();\n this._timer.arc(this._radius, this._radius, this._radius, Math.PI * 1.5, Math.PI * percent, false);\n this._timer.arc(this._radius, this._radius, this._innerRadius, Math.PI * percent, Math.PI * 1.5, true);\n this._timer.closePath();\n return this._timer.fill();\n },\n render: function() {\n return React.createElement(\"div\", {\n \"ref\": 'component',\n \"className\": \"react-countdown-clock\"\n }, React.createElement(\"canvas\", {\n \"ref\": 'background',\n \"style\": {\n position: 'absolute'\n },\n \"width\": this.props.size,\n \"height\": this.props.size\n }), React.createElement(\"canvas\", {\n \"ref\": 'timer',\n \"style\": {\n position: 'absolute'\n },\n \"width\": this.props.size,\n \"height\": this.props.size\n }));\n }\n});\n\nReactCountdownClock.propTypes = {\n seconds: PropTypes.number,\n size: PropTypes.number,\n weight: PropTypes.number,\n color: PropTypes.string,\n fontSize: PropTypes.string,\n font: PropTypes.string,\n alpha: PropTypes.number,\n timeFormat: PropTypes.string,\n onComplete: PropTypes.func,\n onClick: PropTypes.func,\n showMilliseconds: PropTypes.bool,\n paused: PropTypes.bool,\n pausedText: PropTypes.string\n};\n\nReactCountdownClock.defaultProps = {\n seconds: 60,\n size: 300,\n color: '#000',\n alpha: 1,\n timeFormat: 'hms',\n fontSize: 'auto',\n font: 'Arial',\n showMilliseconds: true,\n paused: false\n};\n\nmodule.exports = ReactCountdownClock;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\nif (false) {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = __webpack_require__(4)();\n}\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\nvar emptyFunction = __webpack_require__(5);\nvar invariant = __webpack_require__(1);\nvar ReactPropTypesSecret = __webpack_require__(6);\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar React = __webpack_require__(0);\nvar factory = __webpack_require__(8);\n\nif (typeof React === 'undefined') {\n throw Error(\n 'create-react-class could not find the React object. If you are using script tags, ' +\n 'make sure that React is being loaded before create-react-class.'\n );\n}\n\n// Hack to grab NoopUpdateQueue from isomorphic React\nvar ReactNoopUpdateQueue = new React.Component().updater;\n\nmodule.exports = factory(\n React.Component,\n React.isValidElement,\n ReactNoopUpdateQueue\n);\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar _assign = __webpack_require__(9);\n\nvar emptyObject = __webpack_require__(10);\nvar _invariant = __webpack_require__(1);\n\nif (false) {\n var warning = require('fbjs/lib/warning');\n}\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\n\nvar ReactPropTypeLocationNames;\nif (false) {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {\n ReactPropTypeLocationNames = {};\n}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n var injectedMixins = [];\n\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return
Hello World
;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\n var ReactClassInterface = {\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return
Hello, {name}!
;\n * }\n *\n * @return {ReactComponent}\n * @required\n */\n render: 'DEFINE_ONCE',\n\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n };\n\n /**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\n var RESERVED_SPEC_KEYS = {\n displayName: function(Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function(Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function(Constructor, childContextTypes) {\n if (false) {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n Constructor.childContextTypes = _assign(\n {},\n Constructor.childContextTypes,\n childContextTypes\n );\n },\n contextTypes: function(Constructor, contextTypes) {\n if (false) {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n Constructor.contextTypes = _assign(\n {},\n Constructor.contextTypes,\n contextTypes\n );\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function(Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(\n Constructor.getDefaultProps,\n getDefaultProps\n );\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function(Constructor, propTypes) {\n if (false) {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function(Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function() {}\n };\n\n function validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an _invariant so components\n // don't show up in prod but only in __DEV__\n if (false) {\n warning(\n typeof typeDef[propName] === 'function',\n '%s: %s type `%s` is invalid; it must be a function, usually from ' +\n 'React.PropTypes.',\n Constructor.displayName || 'ReactClass',\n ReactPropTypeLocationNames[location],\n propName\n );\n }\n }\n }\n }\n\n function validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name)\n ? ReactClassInterface[name]\n : null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactClassMixin.hasOwnProperty(name)) {\n _invariant(\n specPolicy === 'OVERRIDE_BASE',\n 'ReactClassInterface: You are attempting to override ' +\n '`%s` from your class specification. Ensure that your method names ' +\n 'do not overlap with React methods.',\n name\n );\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (isAlreadyDefined) {\n _invariant(\n specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClassInterface: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be due ' +\n 'to a mixin.',\n name\n );\n }\n }\n\n /**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (false) {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n isMixinValid,\n \"%s: You're attempting to include a mixin that is either null \" +\n 'or not an object. Check the mixins included by the component, ' +\n 'as well as any mixins they include themselves. ' +\n 'Expected object but got %s.',\n Constructor.displayName || 'ReactClass',\n spec === null ? null : typeofSpec\n );\n }\n }\n\n return;\n }\n\n _invariant(\n typeof spec !== 'function',\n \"ReactClass: You're attempting to \" +\n 'use a component class or function as a mixin. Instead, just use a ' +\n 'regular object.'\n );\n _invariant(\n !isValidElement(spec),\n \"ReactClass: You're attempting to \" +\n 'use a component as a mixin. Instead, just use a regular object.'\n );\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind =\n isFunction &&\n !isReactClassMethod &&\n !isAlreadyDefined &&\n spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride.\n _invariant(\n isReactClassMethod &&\n (specPolicy === 'DEFINE_MANY_MERGED' ||\n specPolicy === 'DEFINE_MANY'),\n 'ReactClass: Unexpected spec policy %s for key %s ' +\n 'when mixing in component specs.',\n specPolicy,\n name\n );\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (false) {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n }\n\n function mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n _invariant(\n !isReserved,\n 'ReactClass: You are attempting to define a reserved ' +\n 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' +\n 'as an instance property instead; it will still be accessible on the ' +\n 'constructor.',\n name\n );\n\n var isInherited = name in Constructor;\n _invariant(\n !isInherited,\n 'ReactClass: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be ' +\n 'due to a mixin.',\n name\n );\n Constructor[name] = property;\n }\n }\n\n /**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\n function mergeIntoWithNoDuplicateKeys(one, two) {\n _invariant(\n one && two && typeof one === 'object' && typeof two === 'object',\n 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'\n );\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n _invariant(\n one[key] === undefined,\n 'mergeIntoWithNoDuplicateKeys(): ' +\n 'Tried to merge two objects with the same key: `%s`. This conflict ' +\n 'may be due to a mixin; in particular, this may be caused by two ' +\n 'getInitialState() or getDefaultProps() methods returning objects ' +\n 'with clashing keys.',\n key\n );\n one[key] = two[key];\n }\n }\n return one;\n }\n\n /**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n }\n\n /**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n }\n\n /**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\n function bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n if (false) {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function(newThis) {\n for (\n var _len = arguments.length,\n args = Array(_len > 1 ? _len - 1 : 0),\n _key = 1;\n _key < _len;\n _key++\n ) {\n args[_key - 1] = arguments[_key];\n }\n\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n false,\n 'bind(): React component methods may only be bound to the ' +\n 'component instance. See %s',\n componentName\n );\n }\n } else if (!args.length) {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n false,\n 'bind(): You are binding a component method to the component. ' +\n 'React does this for you automatically in a high-performance ' +\n 'way, so you can safely remove this call. See %s',\n componentName\n );\n }\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n }\n\n /**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\n function bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n }\n\n var IsMountedPreMixin = {\n componentDidMount: function() {\n this.__isMounted = true;\n }\n };\n\n var IsMountedPostMixin = {\n componentWillUnmount: function() {\n this.__isMounted = false;\n }\n };\n\n /**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\n var ReactClassMixin = {\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function(newState, callback) {\n this.updater.enqueueReplaceState(this, newState, callback);\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function() {\n if (false) {\n warning(\n this.__didWarnIsMounted,\n '%s: isMounted is deprecated. Instead, make sure to clean up ' +\n 'subscriptions and pending requests in componentWillUnmount to ' +\n 'prevent memory leaks.',\n (this.constructor && this.constructor.displayName) ||\n this.name ||\n 'Component'\n );\n this.__didWarnIsMounted = true;\n }\n return !!this.__isMounted;\n }\n };\n\n var ReactClassComponent = function() {};\n _assign(\n ReactClassComponent.prototype,\n ReactComponent.prototype,\n ReactClassMixin\n );\n\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n function createClass(spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function(props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n\n if (false) {\n warning(\n this instanceof Constructor,\n 'Something is calling a React component directly. Use a factory or ' +\n 'JSX instead. See: https://fb.me/react-legacyfactory'\n );\n }\n\n // Wire up auto-binding\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n\n this.state = null;\n\n // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n if (false) {\n // We allow auto-mocks to proceed as if they're returning null.\n if (\n initialState === undefined &&\n this.getInitialState._isMockFunction\n ) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n _invariant(\n typeof initialState === 'object' && !Array.isArray(initialState),\n '%s.getInitialState(): must return an object or null',\n Constructor.displayName || 'ReactCompositeComponent'\n );\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n\n mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n mixSpecIntoComponent(Constructor, spec);\n mixSpecIntoComponent(Constructor, IsMountedPostMixin);\n\n // Initialize the defaultProps property after all mixins have been merged.\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (false) {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n _invariant(\n Constructor.prototype.render,\n 'createClass(...): Class specification must implement a `render` method.'\n );\n\n if (false) {\n warning(\n !Constructor.prototype.componentShouldUpdate,\n '%s has a method called ' +\n 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +\n 'The name is phrased as a question because the function is ' +\n 'expected to return a value.',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.componentWillRecieveProps,\n '%s has a method called ' +\n 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n }\n\n return createClass;\n}\n\nmodule.exports = factory;\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n\n\nvar emptyObject = {};\n\nif (false) {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n/***/ })\n/******/ ]);\n});\n\n\n// WEBPACK FOOTER //\n// react-countdown-clock.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/Users/hugh/Dropbox/Development/Web/react-countdown-clock/build\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c6d3fef36e4448ad09bc","module.exports = __WEBPACK_EXTERNAL_MODULE_0__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\"}\n// module id = 0\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/fbjs/lib/invariant.js\n// module id = 1\n// module chunks = 0","React = require 'react'\nPropTypes = require 'prop-types'\nCreateReactClass = require 'create-react-class'\n\nReactCountdownClock = CreateReactClass\n _seconds: 0\n _radius: null\n _fraction: null\n _content: null\n _canvas: null\n _timeoutIds: []\n\n displayName: 'ReactCountdownClock'\n\n componentDidUpdate: (props) ->\n if props.seconds != @props.seconds\n @_seconds = props.seconds\n @_setupTimer()\n\n if props.color != @props.color\n @_clearBackground()\n @_drawBackground()\n @_updateCanvas()\n\n if props.paused != @props.paused\n @_startTimer() if !@props.paused\n @_pauseTimer() if @props.paused\n\n componentDidMount: ->\n @_seconds = @props.seconds\n @_setupTimer()\n\n componentWillUnmount: ->\n @_cancelTimer()\n\n _setupTimer: ->\n @_setScale()\n @_setupCanvases()\n @_drawBackground()\n @_drawTimer()\n @_startTimer() unless @props.paused\n\n _updateCanvas: ->\n @_clearTimer()\n @_drawTimer()\n\n _setScale: ->\n @_radius = @props.size / 2\n @_fraction = 2 / @_seconds\n @_tickPeriod = @_calculateTick()\n @_innerRadius =\n if @props.weight\n @_radius - @props.weight\n else\n @_radius / 1.8\n\n _calculateTick: ->\n # Tick period (milleseconds) needs to be fast for smaller time periods and slower\n # for longer ones. This provides smoother rendering. It should never exceed 1 second.\n tickScale = 1.8\n tick = @_seconds * tickScale\n if tick > 1000 then 1000 else tick\n\n _setupCanvases: ->\n @_background = @refs.background.getContext '2d'\n @_timer = @refs.timer.getContext '2d'\n @_timer.textAlign = 'center'\n @_timer.textBaseline = 'middle'\n if @props.onClick?\n @refs.component.addEventListener 'click', @props.onClick\n\n _startTimer: ->\n # Give it a moment to collect it's thoughts for smoother render\n @_timeoutIds.push(setTimeout ( => @_tick() ), 200)\n\n _pauseTimer: ->\n @_stopTimer()\n @_updateCanvas()\n\n _stopTimer: ->\n for timeout in @_timeoutIds\n clearTimeout timeout\n\n _cancelTimer: ->\n @_stopTimer()\n\n if @props.onClick?\n @refs.component.removeEventListener 'click', @props.onClick\n\n _tick: ->\n start = Date.now()\n @_timeoutIds.push(setTimeout ( =>\n duration = (Date.now() - start) / 1000\n @_seconds -= duration\n\n if @_seconds <= 0\n @_seconds = 0\n @_handleComplete()\n @_clearTimer()\n else\n @_updateCanvas()\n @_tick()\n ), @_tickPeriod)\n\n _handleComplete: ->\n if @props.onComplete\n @props.onComplete()\n\n _clearBackground: ->\n @_background.clearRect 0, 0, @refs.timer.width, @refs.timer.height\n\n _clearTimer: ->\n @_timer.clearRect 0, 0, @refs.timer.width, @refs.timer.height\n\n _drawBackground: ->\n @_background.beginPath()\n @_background.globalAlpha = @props.alpha / 3\n @_background.fillStyle = @props.color\n @_background.arc @_radius, @_radius, @_radius, 0, Math.PI * 2, false\n @_background.arc @_radius, @_radius, @_innerRadius, Math.PI * 2, 0, true\n @_background.closePath()\n @_background.fill()\n\n _formattedTime: ->\n decimals = (@_seconds <= 9.9 && @props.showMilliseconds) ? 1 : 0\n\n if @props.timeFormat == 'hms'\n hours = parseInt( @_seconds / 3600 ) % 24\n minutes = parseInt( @_seconds / 60 ) % 60\n seconds = (@_seconds % 60).toFixed(decimals)\n\n hoursStr = \"#{hours}\"\n minutesStr = \"#{minutes}\"\n secondsStr = \"#{seconds}\"\n\n hoursStr = \"0#{hours}\" if hours < 10\n minutesStr = \"0#{minutes}\" if minutes < 10 && hours >= 1\n secondsStr = \"0#{seconds}\" if seconds < 10 && (minutes >= 1 || hours >= 1)\n\n timeParts = []\n timeParts.push hoursStr if hours > 0\n timeParts.push minutesStr if minutes > 0 || hours > 0\n timeParts.push secondsStr\n\n timeParts.join ':'\n else\n return @_seconds.toFixed(decimals)\n\n _fontSize: (timeString) ->\n if @props.fontSize == 'auto'\n scale = switch timeString.length\n when 8 then 4 # hh:mm:ss\n when 5 then 3 # mm:ss\n else 2 # ss or ss.s\n size = @_radius / scale\n \"#{size}px\"\n else\n @props.fontSize\n\n _drawTimer: ->\n percent = @_fraction * @_seconds + 1.5\n formattedTime = @_formattedTime()\n text = if (@props.paused && @props.pausedText?) then @props.pausedText else formattedTime\n\n # Timer\n @_timer.globalAlpha = @props.alpha\n @_timer.fillStyle = @props.color\n @_timer.font = \"bold #{@_fontSize(formattedTime)} #{@props.font}\"\n @_timer.fillText text, @_radius, @_radius\n @_timer.beginPath()\n @_timer.arc @_radius, @_radius, @_radius, Math.PI * 1.5, Math.PI * percent, false\n @_timer.arc @_radius, @_radius, @_innerRadius, Math.PI * percent, Math.PI * 1.5, true\n @_timer.closePath()\n @_timer.fill()\n\n render: ->\n React.createElement(\"div\", {\"ref\": 'component', \"className\": \"react-countdown-clock\"},\n React.createElement(\"canvas\", {\"ref\": 'background', \"style\": ( position: 'absolute' ), \"width\": (@props.size), \"height\": (@props.size)}),\n React.createElement(\"canvas\", {\"ref\": 'timer', \"style\": ( position: 'absolute' ), \"width\": (@props.size), \"height\": (@props.size)})\n )\n\nReactCountdownClock.propTypes =\n seconds: PropTypes.number\n size: PropTypes.number\n weight: PropTypes.number\n color: PropTypes.string\n fontSize: PropTypes.string\n font: PropTypes.string\n alpha: PropTypes.number\n timeFormat: PropTypes.string\n onComplete: PropTypes.func\n onClick: PropTypes.func\n showMilliseconds: PropTypes.bool\n paused: PropTypes.bool\n pausedText: PropTypes.string\n\nReactCountdownClock.defaultProps =\n seconds: 60\n size: 300\n color: '#000'\n alpha: 1\n timeFormat: 'hms'\n fontSize: 'auto'\n font: 'Arial'\n showMilliseconds: true\n paused: false\n\nmodule.exports = ReactCountdownClock\n\n\n\n// WEBPACK FOOTER //\n// ../node_modules/cjsx-loader!./react-countdown-clock.coffee","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/prop-types/index.js\n// module id = 3\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/prop-types/factoryWithThrowingShims.js\n// module id = 4\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/fbjs/lib/emptyFunction.js\n// module id = 5\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/prop-types/lib/ReactPropTypesSecret.js\n// module id = 6\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar React = require('react');\nvar factory = require('./factory');\n\nif (typeof React === 'undefined') {\n throw Error(\n 'create-react-class could not find the React object. If you are using script tags, ' +\n 'make sure that React is being loaded before create-react-class.'\n );\n}\n\n// Hack to grab NoopUpdateQueue from isomorphic React\nvar ReactNoopUpdateQueue = new React.Component().updater;\n\nmodule.exports = factory(\n React.Component,\n React.isValidElement,\n ReactNoopUpdateQueue\n);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/create-react-class/index.js\n// module id = 7\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar _assign = require('object-assign');\n\nvar emptyObject = require('fbjs/lib/emptyObject');\nvar _invariant = require('fbjs/lib/invariant');\n\nif (process.env.NODE_ENV !== 'production') {\n var warning = require('fbjs/lib/warning');\n}\n\nvar MIXINS_KEY = 'mixins';\n\n// Helper function to allow the creation of anonymous functions which do not\n// have .name set to the name of the variable being assigned to.\nfunction identity(fn) {\n return fn;\n}\n\nvar ReactPropTypeLocationNames;\nif (process.env.NODE_ENV !== 'production') {\n ReactPropTypeLocationNames = {\n prop: 'prop',\n context: 'context',\n childContext: 'child context'\n };\n} else {\n ReactPropTypeLocationNames = {};\n}\n\nfunction factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {\n /**\n * Policies that describe methods in `ReactClassInterface`.\n */\n\n var injectedMixins = [];\n\n /**\n * Composite components are higher-level components that compose other composite\n * or host components.\n *\n * To create a new type of `ReactClass`, pass a specification of\n * your new class to `React.createClass`. The only requirement of your class\n * specification is that you implement a `render` method.\n *\n * var MyComponent = React.createClass({\n * render: function() {\n * return
Hello World
;\n * }\n * });\n *\n * The class specification supports a specific protocol of methods that have\n * special meaning (e.g. `render`). See `ReactClassInterface` for\n * more the comprehensive protocol. Any other properties and methods in the\n * class specification will be available on the prototype.\n *\n * @interface ReactClassInterface\n * @internal\n */\n var ReactClassInterface = {\n /**\n * An array of Mixin objects to include when defining your component.\n *\n * @type {array}\n * @optional\n */\n mixins: 'DEFINE_MANY',\n\n /**\n * An object containing properties and methods that should be defined on\n * the component's constructor instead of its prototype (static methods).\n *\n * @type {object}\n * @optional\n */\n statics: 'DEFINE_MANY',\n\n /**\n * Definition of prop types for this component.\n *\n * @type {object}\n * @optional\n */\n propTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types for this component.\n *\n * @type {object}\n * @optional\n */\n contextTypes: 'DEFINE_MANY',\n\n /**\n * Definition of context types this component sets for its children.\n *\n * @type {object}\n * @optional\n */\n childContextTypes: 'DEFINE_MANY',\n\n // ==== Definition methods ====\n\n /**\n * Invoked when the component is mounted. Values in the mapping will be set on\n * `this.props` if that prop is not specified (i.e. using an `in` check).\n *\n * This method is invoked before `getInitialState` and therefore cannot rely\n * on `this.state` or use `this.setState`.\n *\n * @return {object}\n * @optional\n */\n getDefaultProps: 'DEFINE_MANY_MERGED',\n\n /**\n * Invoked once before the component is mounted. The return value will be used\n * as the initial value of `this.state`.\n *\n * getInitialState: function() {\n * return {\n * isOn: false,\n * fooBaz: new BazFoo()\n * }\n * }\n *\n * @return {object}\n * @optional\n */\n getInitialState: 'DEFINE_MANY_MERGED',\n\n /**\n * @return {object}\n * @optional\n */\n getChildContext: 'DEFINE_MANY_MERGED',\n\n /**\n * Uses props from `this.props` and state from `this.state` to render the\n * structure of the component.\n *\n * No guarantees are made about when or how often this method is invoked, so\n * it must not have side effects.\n *\n * render: function() {\n * var name = this.props.name;\n * return
Hello, {name}!
;\n * }\n *\n * @return {ReactComponent}\n * @required\n */\n render: 'DEFINE_ONCE',\n\n // ==== Delegate methods ====\n\n /**\n * Invoked when the component is initially created and about to be mounted.\n * This may have side effects, but any external subscriptions or data created\n * by this method must be cleaned up in `componentWillUnmount`.\n *\n * @optional\n */\n componentWillMount: 'DEFINE_MANY',\n\n /**\n * Invoked when the component has been mounted and has a DOM representation.\n * However, there is no guarantee that the DOM node is in the document.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been mounted (initialized and rendered) for the first time.\n *\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidMount: 'DEFINE_MANY',\n\n /**\n * Invoked before the component receives new props.\n *\n * Use this as an opportunity to react to a prop transition by updating the\n * state using `this.setState`. Current props are accessed via `this.props`.\n *\n * componentWillReceiveProps: function(nextProps, nextContext) {\n * this.setState({\n * likesIncreasing: nextProps.likeCount > this.props.likeCount\n * });\n * }\n *\n * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop\n * transition may cause a state change, but the opposite is not true. If you\n * need it, you are probably looking for `componentWillUpdate`.\n *\n * @param {object} nextProps\n * @optional\n */\n componentWillReceiveProps: 'DEFINE_MANY',\n\n /**\n * Invoked while deciding if the component should be updated as a result of\n * receiving new props, state and/or context.\n *\n * Use this as an opportunity to `return false` when you're certain that the\n * transition to the new props/state/context will not require a component\n * update.\n *\n * shouldComponentUpdate: function(nextProps, nextState, nextContext) {\n * return !equal(nextProps, this.props) ||\n * !equal(nextState, this.state) ||\n * !equal(nextContext, this.context);\n * }\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @return {boolean} True if the component should update.\n * @optional\n */\n shouldComponentUpdate: 'DEFINE_ONCE',\n\n /**\n * Invoked when the component is about to update due to a transition from\n * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState`\n * and `nextContext`.\n *\n * Use this as an opportunity to perform preparation before an update occurs.\n *\n * NOTE: You **cannot** use `this.setState()` in this method.\n *\n * @param {object} nextProps\n * @param {?object} nextState\n * @param {?object} nextContext\n * @param {ReactReconcileTransaction} transaction\n * @optional\n */\n componentWillUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component's DOM representation has been updated.\n *\n * Use this as an opportunity to operate on the DOM when the component has\n * been updated.\n *\n * @param {object} prevProps\n * @param {?object} prevState\n * @param {?object} prevContext\n * @param {DOMElement} rootNode DOM element representing the component.\n * @optional\n */\n componentDidUpdate: 'DEFINE_MANY',\n\n /**\n * Invoked when the component is about to be removed from its parent and have\n * its DOM representation destroyed.\n *\n * Use this as an opportunity to deallocate any external resources.\n *\n * NOTE: There is no `componentDidUnmount` since your component will have been\n * destroyed by that point.\n *\n * @optional\n */\n componentWillUnmount: 'DEFINE_MANY',\n\n // ==== Advanced methods ====\n\n /**\n * Updates the component's currently mounted DOM representation.\n *\n * By default, this implements React's rendering and reconciliation algorithm.\n * Sophisticated clients may wish to override this.\n *\n * @param {ReactReconcileTransaction} transaction\n * @internal\n * @overridable\n */\n updateComponent: 'OVERRIDE_BASE'\n };\n\n /**\n * Mapping from class specification keys to special processing functions.\n *\n * Although these are declared like instance properties in the specification\n * when defining classes using `React.createClass`, they are actually static\n * and are accessible on the constructor instead of the prototype. Despite\n * being static, they must be defined outside of the \"statics\" key under\n * which all other static methods are defined.\n */\n var RESERVED_SPEC_KEYS = {\n displayName: function(Constructor, displayName) {\n Constructor.displayName = displayName;\n },\n mixins: function(Constructor, mixins) {\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n mixSpecIntoComponent(Constructor, mixins[i]);\n }\n }\n },\n childContextTypes: function(Constructor, childContextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, childContextTypes, 'childContext');\n }\n Constructor.childContextTypes = _assign(\n {},\n Constructor.childContextTypes,\n childContextTypes\n );\n },\n contextTypes: function(Constructor, contextTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, contextTypes, 'context');\n }\n Constructor.contextTypes = _assign(\n {},\n Constructor.contextTypes,\n contextTypes\n );\n },\n /**\n * Special case getDefaultProps which should move into statics but requires\n * automatic merging.\n */\n getDefaultProps: function(Constructor, getDefaultProps) {\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps = createMergedResultFunction(\n Constructor.getDefaultProps,\n getDefaultProps\n );\n } else {\n Constructor.getDefaultProps = getDefaultProps;\n }\n },\n propTypes: function(Constructor, propTypes) {\n if (process.env.NODE_ENV !== 'production') {\n validateTypeDef(Constructor, propTypes, 'prop');\n }\n Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes);\n },\n statics: function(Constructor, statics) {\n mixStaticSpecIntoComponent(Constructor, statics);\n },\n autobind: function() {}\n };\n\n function validateTypeDef(Constructor, typeDef, location) {\n for (var propName in typeDef) {\n if (typeDef.hasOwnProperty(propName)) {\n // use a warning instead of an _invariant so components\n // don't show up in prod but only in __DEV__\n if (process.env.NODE_ENV !== 'production') {\n warning(\n typeof typeDef[propName] === 'function',\n '%s: %s type `%s` is invalid; it must be a function, usually from ' +\n 'React.PropTypes.',\n Constructor.displayName || 'ReactClass',\n ReactPropTypeLocationNames[location],\n propName\n );\n }\n }\n }\n }\n\n function validateMethodOverride(isAlreadyDefined, name) {\n var specPolicy = ReactClassInterface.hasOwnProperty(name)\n ? ReactClassInterface[name]\n : null;\n\n // Disallow overriding of base class methods unless explicitly allowed.\n if (ReactClassMixin.hasOwnProperty(name)) {\n _invariant(\n specPolicy === 'OVERRIDE_BASE',\n 'ReactClassInterface: You are attempting to override ' +\n '`%s` from your class specification. Ensure that your method names ' +\n 'do not overlap with React methods.',\n name\n );\n }\n\n // Disallow defining methods more than once unless explicitly allowed.\n if (isAlreadyDefined) {\n _invariant(\n specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED',\n 'ReactClassInterface: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be due ' +\n 'to a mixin.',\n name\n );\n }\n }\n\n /**\n * Mixin helper which handles policy validation and reserved\n * specification keys when building React classes.\n */\n function mixSpecIntoComponent(Constructor, spec) {\n if (!spec) {\n if (process.env.NODE_ENV !== 'production') {\n var typeofSpec = typeof spec;\n var isMixinValid = typeofSpec === 'object' && spec !== null;\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n isMixinValid,\n \"%s: You're attempting to include a mixin that is either null \" +\n 'or not an object. Check the mixins included by the component, ' +\n 'as well as any mixins they include themselves. ' +\n 'Expected object but got %s.',\n Constructor.displayName || 'ReactClass',\n spec === null ? null : typeofSpec\n );\n }\n }\n\n return;\n }\n\n _invariant(\n typeof spec !== 'function',\n \"ReactClass: You're attempting to \" +\n 'use a component class or function as a mixin. Instead, just use a ' +\n 'regular object.'\n );\n _invariant(\n !isValidElement(spec),\n \"ReactClass: You're attempting to \" +\n 'use a component as a mixin. Instead, just use a regular object.'\n );\n\n var proto = Constructor.prototype;\n var autoBindPairs = proto.__reactAutoBindPairs;\n\n // By handling mixins before any other properties, we ensure the same\n // chaining order is applied to methods with DEFINE_MANY policy, whether\n // mixins are listed before or after these methods in the spec.\n if (spec.hasOwnProperty(MIXINS_KEY)) {\n RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins);\n }\n\n for (var name in spec) {\n if (!spec.hasOwnProperty(name)) {\n continue;\n }\n\n if (name === MIXINS_KEY) {\n // We have already handled mixins in a special case above.\n continue;\n }\n\n var property = spec[name];\n var isAlreadyDefined = proto.hasOwnProperty(name);\n validateMethodOverride(isAlreadyDefined, name);\n\n if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) {\n RESERVED_SPEC_KEYS[name](Constructor, property);\n } else {\n // Setup methods on prototype:\n // The following member methods should not be automatically bound:\n // 1. Expected ReactClass methods (in the \"interface\").\n // 2. Overridden methods (that were mixed in).\n var isReactClassMethod = ReactClassInterface.hasOwnProperty(name);\n var isFunction = typeof property === 'function';\n var shouldAutoBind =\n isFunction &&\n !isReactClassMethod &&\n !isAlreadyDefined &&\n spec.autobind !== false;\n\n if (shouldAutoBind) {\n autoBindPairs.push(name, property);\n proto[name] = property;\n } else {\n if (isAlreadyDefined) {\n var specPolicy = ReactClassInterface[name];\n\n // These cases should already be caught by validateMethodOverride.\n _invariant(\n isReactClassMethod &&\n (specPolicy === 'DEFINE_MANY_MERGED' ||\n specPolicy === 'DEFINE_MANY'),\n 'ReactClass: Unexpected spec policy %s for key %s ' +\n 'when mixing in component specs.',\n specPolicy,\n name\n );\n\n // For methods which are defined more than once, call the existing\n // methods before calling the new property, merging if appropriate.\n if (specPolicy === 'DEFINE_MANY_MERGED') {\n proto[name] = createMergedResultFunction(proto[name], property);\n } else if (specPolicy === 'DEFINE_MANY') {\n proto[name] = createChainedFunction(proto[name], property);\n }\n } else {\n proto[name] = property;\n if (process.env.NODE_ENV !== 'production') {\n // Add verbose displayName to the function, which helps when looking\n // at profiling tools.\n if (typeof property === 'function' && spec.displayName) {\n proto[name].displayName = spec.displayName + '_' + name;\n }\n }\n }\n }\n }\n }\n }\n\n function mixStaticSpecIntoComponent(Constructor, statics) {\n if (!statics) {\n return;\n }\n for (var name in statics) {\n var property = statics[name];\n if (!statics.hasOwnProperty(name)) {\n continue;\n }\n\n var isReserved = name in RESERVED_SPEC_KEYS;\n _invariant(\n !isReserved,\n 'ReactClass: You are attempting to define a reserved ' +\n 'property, `%s`, that shouldn\\'t be on the \"statics\" key. Define it ' +\n 'as an instance property instead; it will still be accessible on the ' +\n 'constructor.',\n name\n );\n\n var isInherited = name in Constructor;\n _invariant(\n !isInherited,\n 'ReactClass: You are attempting to define ' +\n '`%s` on your component more than once. This conflict may be ' +\n 'due to a mixin.',\n name\n );\n Constructor[name] = property;\n }\n }\n\n /**\n * Merge two objects, but throw if both contain the same key.\n *\n * @param {object} one The first object, which is mutated.\n * @param {object} two The second object\n * @return {object} one after it has been mutated to contain everything in two.\n */\n function mergeIntoWithNoDuplicateKeys(one, two) {\n _invariant(\n one && two && typeof one === 'object' && typeof two === 'object',\n 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'\n );\n\n for (var key in two) {\n if (two.hasOwnProperty(key)) {\n _invariant(\n one[key] === undefined,\n 'mergeIntoWithNoDuplicateKeys(): ' +\n 'Tried to merge two objects with the same key: `%s`. This conflict ' +\n 'may be due to a mixin; in particular, this may be caused by two ' +\n 'getInitialState() or getDefaultProps() methods returning objects ' +\n 'with clashing keys.',\n key\n );\n one[key] = two[key];\n }\n }\n return one;\n }\n\n /**\n * Creates a function that invokes two functions and merges their return values.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createMergedResultFunction(one, two) {\n return function mergedResult() {\n var a = one.apply(this, arguments);\n var b = two.apply(this, arguments);\n if (a == null) {\n return b;\n } else if (b == null) {\n return a;\n }\n var c = {};\n mergeIntoWithNoDuplicateKeys(c, a);\n mergeIntoWithNoDuplicateKeys(c, b);\n return c;\n };\n }\n\n /**\n * Creates a function that invokes two functions and ignores their return vales.\n *\n * @param {function} one Function to invoke first.\n * @param {function} two Function to invoke second.\n * @return {function} Function that invokes the two argument functions.\n * @private\n */\n function createChainedFunction(one, two) {\n return function chainedFunction() {\n one.apply(this, arguments);\n two.apply(this, arguments);\n };\n }\n\n /**\n * Binds a method to the component.\n *\n * @param {object} component Component whose method is going to be bound.\n * @param {function} method Method to be bound.\n * @return {function} The bound method.\n */\n function bindAutoBindMethod(component, method) {\n var boundMethod = method.bind(component);\n if (process.env.NODE_ENV !== 'production') {\n boundMethod.__reactBoundContext = component;\n boundMethod.__reactBoundMethod = method;\n boundMethod.__reactBoundArguments = null;\n var componentName = component.constructor.displayName;\n var _bind = boundMethod.bind;\n boundMethod.bind = function(newThis) {\n for (\n var _len = arguments.length,\n args = Array(_len > 1 ? _len - 1 : 0),\n _key = 1;\n _key < _len;\n _key++\n ) {\n args[_key - 1] = arguments[_key];\n }\n\n // User is trying to bind() an autobound method; we effectively will\n // ignore the value of \"this\" that the user is trying to use, so\n // let's warn.\n if (newThis !== component && newThis !== null) {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n false,\n 'bind(): React component methods may only be bound to the ' +\n 'component instance. See %s',\n componentName\n );\n }\n } else if (!args.length) {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n false,\n 'bind(): You are binding a component method to the component. ' +\n 'React does this for you automatically in a high-performance ' +\n 'way, so you can safely remove this call. See %s',\n componentName\n );\n }\n return boundMethod;\n }\n var reboundMethod = _bind.apply(boundMethod, arguments);\n reboundMethod.__reactBoundContext = component;\n reboundMethod.__reactBoundMethod = method;\n reboundMethod.__reactBoundArguments = args;\n return reboundMethod;\n };\n }\n return boundMethod;\n }\n\n /**\n * Binds all auto-bound methods in a component.\n *\n * @param {object} component Component whose method is going to be bound.\n */\n function bindAutoBindMethods(component) {\n var pairs = component.__reactAutoBindPairs;\n for (var i = 0; i < pairs.length; i += 2) {\n var autoBindKey = pairs[i];\n var method = pairs[i + 1];\n component[autoBindKey] = bindAutoBindMethod(component, method);\n }\n }\n\n var IsMountedPreMixin = {\n componentDidMount: function() {\n this.__isMounted = true;\n }\n };\n\n var IsMountedPostMixin = {\n componentWillUnmount: function() {\n this.__isMounted = false;\n }\n };\n\n /**\n * Add more to the ReactClass base class. These are all legacy features and\n * therefore not already part of the modern ReactComponent.\n */\n var ReactClassMixin = {\n /**\n * TODO: This will be deprecated because state should always keep a consistent\n * type signature and the only use case for this, is to avoid that.\n */\n replaceState: function(newState, callback) {\n this.updater.enqueueReplaceState(this, newState, callback);\n },\n\n /**\n * Checks whether or not this composite component is mounted.\n * @return {boolean} True if mounted, false otherwise.\n * @protected\n * @final\n */\n isMounted: function() {\n if (process.env.NODE_ENV !== 'production') {\n warning(\n this.__didWarnIsMounted,\n '%s: isMounted is deprecated. Instead, make sure to clean up ' +\n 'subscriptions and pending requests in componentWillUnmount to ' +\n 'prevent memory leaks.',\n (this.constructor && this.constructor.displayName) ||\n this.name ||\n 'Component'\n );\n this.__didWarnIsMounted = true;\n }\n return !!this.__isMounted;\n }\n };\n\n var ReactClassComponent = function() {};\n _assign(\n ReactClassComponent.prototype,\n ReactComponent.prototype,\n ReactClassMixin\n );\n\n /**\n * Creates a composite component class given a class specification.\n * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass\n *\n * @param {object} spec Class specification (which must define `render`).\n * @return {function} Component constructor function.\n * @public\n */\n function createClass(spec) {\n // To keep our warnings more understandable, we'll use a little hack here to\n // ensure that Constructor.name !== 'Constructor'. This makes sure we don't\n // unnecessarily identify a class without displayName as 'Constructor'.\n var Constructor = identity(function(props, context, updater) {\n // This constructor gets overridden by mocks. The argument is used\n // by mocks to assert on what gets mounted.\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n this instanceof Constructor,\n 'Something is calling a React component directly. Use a factory or ' +\n 'JSX instead. See: https://fb.me/react-legacyfactory'\n );\n }\n\n // Wire up auto-binding\n if (this.__reactAutoBindPairs.length) {\n bindAutoBindMethods(this);\n }\n\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n\n this.state = null;\n\n // ReactClasses doesn't have constructors. Instead, they use the\n // getInitialState and componentWillMount methods for initialization.\n\n var initialState = this.getInitialState ? this.getInitialState() : null;\n if (process.env.NODE_ENV !== 'production') {\n // We allow auto-mocks to proceed as if they're returning null.\n if (\n initialState === undefined &&\n this.getInitialState._isMockFunction\n ) {\n // This is probably bad practice. Consider warning here and\n // deprecating this convenience.\n initialState = null;\n }\n }\n _invariant(\n typeof initialState === 'object' && !Array.isArray(initialState),\n '%s.getInitialState(): must return an object or null',\n Constructor.displayName || 'ReactCompositeComponent'\n );\n\n this.state = initialState;\n });\n Constructor.prototype = new ReactClassComponent();\n Constructor.prototype.constructor = Constructor;\n Constructor.prototype.__reactAutoBindPairs = [];\n\n injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor));\n\n mixSpecIntoComponent(Constructor, IsMountedPreMixin);\n mixSpecIntoComponent(Constructor, spec);\n mixSpecIntoComponent(Constructor, IsMountedPostMixin);\n\n // Initialize the defaultProps property after all mixins have been merged.\n if (Constructor.getDefaultProps) {\n Constructor.defaultProps = Constructor.getDefaultProps();\n }\n\n if (process.env.NODE_ENV !== 'production') {\n // This is a tag to indicate that the use of these method names is ok,\n // since it's used with createClass. If it's not, then it's likely a\n // mistake so we'll warn you to use the static property, property\n // initializer or constructor respectively.\n if (Constructor.getDefaultProps) {\n Constructor.getDefaultProps.isReactClassApproved = {};\n }\n if (Constructor.prototype.getInitialState) {\n Constructor.prototype.getInitialState.isReactClassApproved = {};\n }\n }\n\n _invariant(\n Constructor.prototype.render,\n 'createClass(...): Class specification must implement a `render` method.'\n );\n\n if (process.env.NODE_ENV !== 'production') {\n warning(\n !Constructor.prototype.componentShouldUpdate,\n '%s has a method called ' +\n 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' +\n 'The name is phrased as a question because the function is ' +\n 'expected to return a value.',\n spec.displayName || 'A component'\n );\n warning(\n !Constructor.prototype.componentWillRecieveProps,\n '%s has a method called ' +\n 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?',\n spec.displayName || 'A component'\n );\n }\n\n // Reduce time spent doing lookups by setting these on the prototype.\n for (var methodName in ReactClassInterface) {\n if (!Constructor.prototype[methodName]) {\n Constructor.prototype[methodName] = null;\n }\n }\n\n return Constructor;\n }\n\n return createClass;\n}\n\nmodule.exports = factory;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/create-react-class/factory.js\n// module id = 8\n// module chunks = 0","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/object-assign/index.js\n// module id = 9\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar emptyObject = {};\n\nif (process.env.NODE_ENV !== 'production') {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../node_modules/fbjs/lib/emptyObject.js\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///react-countdown-clock.js","webpack:///webpack/bootstrap 72dd774d30e970c260e4","webpack:///./react-countdown-clock.coffee","webpack:///../~/process/browser.js","webpack:///../~/fbjs/lib/emptyFunction.js","webpack:///../~/fbjs/lib/invariant.js","webpack:///../~/prop-types/lib/ReactPropTypesSecret.js","webpack:///../~/fbjs/lib/warning.js","webpack:///../~/prop-types/checkPropTypes.js","webpack:///../~/prop-types/factoryWithThrowingShims.js","webpack:///../~/prop-types/factoryWithTypeCheckers.js","webpack:///../~/prop-types/index.js","webpack:///external {\"root\":\"React\",\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\"}"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_10__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","CreateReactClass","PropTypes","React","ReactCountdownClock","e","Error","code","_seconds","_radius","_fraction","_content","_canvas","_timeoutIds","displayName","componentDidUpdate","props","seconds","_setupTimer","color","_clearBackground","_drawBackground","_updateCanvas","paused","_startTimer","_pauseTimer","componentDidMount","componentWillUnmount","_cancelTimer","_setScale","_setupCanvases","_drawTimer","_clearTimer","size","_tickPeriod","_calculateTick","_innerRadius","weight","tick","tickScale","_background","refs","background","getContext","_timer","timer","textAlign","textBaseline","onClick","component","addEventListener","push","setTimeout","_this","_tick","_stopTimer","i","len","ref","results","timeout","length","clearTimeout","removeEventListener","start","Date","now","duration","_handleComplete","onComplete","clearRect","width","height","beginPath","globalAlpha","alpha","fillStyle","backgroundColor","arc","Math","PI","closePath","fill","_formattedTime","decimals","hours","hoursStr","minutes","minutesStr","secondsStr","timeParts","showMilliseconds","1","timeFormat","parseInt","toFixed","join","_fontSize","timeString","scale","fontSize","formattedTime","percent","text","pausedText","fontColor","font","fillText","render","createElement","className","style","position","propTypes","number","string","func","bool","defaultProps","defaultSetTimout","defaultClearTimeout","runTimeout","fun","cachedSetTimeout","runClearTimeout","marker","cachedClearTimeout","cleanUpNextTick","draining","currentQueue","queue","concat","queueIndex","drainQueue","run","Item","array","noop","process","nextTick","args","Array","arguments","prototype","apply","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","name","binding","cwd","chdir","dir","umask","makeEmptyFunction","arg","emptyFunction","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument","invariant","condition","format","a","b","d","f","validateFormat","error","undefined","argIndex","replace","framesToPop","NODE_ENV","ReactPropTypesSecret","warning","printWarning","_len","_key","message","console","x","indexOf","_len2","_key2","checkPropTypes","typeSpecs","values","location","componentName","getStack","typeSpecName","hasOwnProperty","ex","loggedTypeFailures","stack","shim","propName","propFullName","secret","getShim","isRequired","ReactPropTypes","object","symbol","any","arrayOf","element","instanceOf","node","objectOf","oneOf","oneOfType","shape","isValidElement","throwOnDirectAccess","getIteratorFn","maybeIterable","iteratorFn","ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","is","y","PropTypeError","createChainableTypeChecker","validate","checkType","ANONYMOUS","cacheKey","manualPropTypeCallCache","manualPropTypeWarningCount","chainedCheckType","bind","createPrimitiveTypeChecker","expectedType","propValue","propType","getPropType","preciseType","getPreciseType","createAnyTypeChecker","createArrayOfTypeChecker","typeChecker","isArray","createElementTypeChecker","createInstanceTypeChecker","expectedClass","expectedClassName","actualClassName","getClassName","createEnumTypeChecker","expectedValues","valuesString","JSON","stringify","createObjectOfTypeChecker","key","createUnionTypeChecker","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","createNodeChecker","isNode","createShapeTypeChecker","shapeTypes","every","step","iterator","entries","next","done","value","entry","isSymbol","Symbol","RegExp","type","constructor","REACT_ELEMENT_TYPE","for","$$typeof"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,UACA,kBAAAC,gBAAAC,IACAD,QAAA,SAAAJ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down-clock.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactCountdownClock\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"ReactCountdownClock\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_10__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactCountdownClock\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"ReactCountdownClock\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_10__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/Users/shanshanzhu/Projects/react-countdown-clock/build\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\tvar CreateReactClass, PropTypes, React, ReactCountdownClock;\n\t\n\tReact = __webpack_require__(10);\n\t\n\tPropTypes = __webpack_require__(9);\n\t\n\tCreateReactClass = __webpack_require__(!(function webpackMissingModule() { var e = new Error(\"Cannot find module \\\"create-react-class\\\"\"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));\n\t\n\tReactCountdownClock = CreateReactClass({\n\t _seconds: 0,\n\t _radius: null,\n\t _fraction: null,\n\t _content: null,\n\t _canvas: null,\n\t _timeoutIds: [],\n\t displayName: 'ReactCountdownClock',\n\t componentDidUpdate: function(props) {\n\t if (props.seconds !== this.props.seconds) {\n\t this._seconds = props.seconds;\n\t this._setupTimer();\n\t }\n\t if (props.color !== this.props.color) {\n\t this._clearBackground();\n\t this._drawBackground();\n\t this._updateCanvas();\n\t }\n\t if (props.paused !== this.props.paused) {\n\t if (!this.props.paused) {\n\t this._startTimer();\n\t }\n\t if (this.props.paused) {\n\t return this._pauseTimer();\n\t }\n\t }\n\t },\n\t componentDidMount: function() {\n\t this._seconds = this.props.seconds;\n\t return this._setupTimer();\n\t },\n\t componentWillUnmount: function() {\n\t return this._cancelTimer();\n\t },\n\t _setupTimer: function() {\n\t this._setScale();\n\t this._setupCanvases();\n\t this._drawBackground();\n\t this._drawTimer();\n\t if (!this.props.paused) {\n\t return this._startTimer();\n\t }\n\t },\n\t _updateCanvas: function() {\n\t this._clearTimer();\n\t return this._drawTimer();\n\t },\n\t _setScale: function() {\n\t this._radius = this.props.size / 2;\n\t this._fraction = 2 / this._seconds;\n\t this._tickPeriod = this._calculateTick();\n\t return this._innerRadius = this.props.weight ? this._radius - this.props.weight : this._radius / 1.8;\n\t },\n\t _calculateTick: function() {\n\t var tick, tickScale;\n\t tickScale = 1.8;\n\t tick = this._seconds * tickScale;\n\t if (tick > 1000) {\n\t return 1000;\n\t } else {\n\t return tick;\n\t }\n\t },\n\t _setupCanvases: function() {\n\t this._background = this.refs.background.getContext('2d');\n\t this._timer = this.refs.timer.getContext('2d');\n\t this._timer.textAlign = 'center';\n\t this._timer.textBaseline = 'middle';\n\t if (this.props.onClick != null) {\n\t return this.refs.component.addEventListener('click', this.props.onClick);\n\t }\n\t },\n\t _startTimer: function() {\n\t return this._timeoutIds.push(setTimeout(((function(_this) {\n\t return function() {\n\t return _this._tick();\n\t };\n\t })(this)), 200));\n\t },\n\t _pauseTimer: function() {\n\t this._stopTimer();\n\t return this._updateCanvas();\n\t },\n\t _stopTimer: function() {\n\t var i, len, ref, results, timeout;\n\t ref = this._timeoutIds;\n\t results = [];\n\t for (i = 0, len = ref.length; i < len; i++) {\n\t timeout = ref[i];\n\t results.push(clearTimeout(timeout));\n\t }\n\t return results;\n\t },\n\t _cancelTimer: function() {\n\t this._stopTimer();\n\t if (this.props.onClick != null) {\n\t return this.refs.component.removeEventListener('click', this.props.onClick);\n\t }\n\t },\n\t _tick: function() {\n\t var start;\n\t start = Date.now();\n\t return this._timeoutIds.push(setTimeout(((function(_this) {\n\t return function() {\n\t var duration;\n\t duration = (Date.now() - start) / 1000;\n\t _this._seconds -= duration;\n\t if (_this._seconds <= 0) {\n\t _this._seconds = 0;\n\t _this._handleComplete();\n\t return _this._clearTimer();\n\t } else {\n\t _this._updateCanvas();\n\t return _this._tick();\n\t }\n\t };\n\t })(this)), this._tickPeriod));\n\t },\n\t _handleComplete: function() {\n\t if (this.props.onComplete) {\n\t return this.props.onComplete();\n\t }\n\t },\n\t _clearBackground: function() {\n\t return this._background.clearRect(0, 0, this.refs.timer.width, this.refs.timer.height);\n\t },\n\t _clearTimer: function() {\n\t return this._timer.clearRect(0, 0, this.refs.timer.width, this.refs.timer.height);\n\t },\n\t _drawBackground: function() {\n\t this._background.beginPath();\n\t this._background.globalAlpha = this.props.alpha / 3;\n\t this._background.fillStyle = this.props.backgroundColor || this.props.color;\n\t this._background.arc(this._radius, this._radius, this._radius, 0, Math.PI * 2, false);\n\t this._background.arc(this._radius, this._radius, this._innerRadius, Math.PI * 2, 0, true);\n\t this._background.closePath();\n\t return this._background.fill();\n\t },\n\t _formattedTime: function() {\n\t var decimals, hours, hoursStr, minutes, minutesStr, ref, seconds, secondsStr, timeParts;\n\t decimals = (ref = this._seconds <= 9.9 && this.props.showMilliseconds) != null ? ref : {\n\t 1: 0\n\t };\n\t if (this.props.timeFormat === 'hms') {\n\t hours = parseInt(this._seconds / 3600) % 24;\n\t minutes = parseInt(this._seconds / 60) % 60;\n\t seconds = (this._seconds % 60).toFixed(decimals);\n\t hoursStr = \"\" + hours;\n\t minutesStr = \"\" + minutes;\n\t secondsStr = \"\" + seconds;\n\t if (hours < 10) {\n\t hoursStr = \"0\" + hours;\n\t }\n\t if (minutes < 10 && hours >= 1) {\n\t minutesStr = \"0\" + minutes;\n\t }\n\t if (seconds < 10 && (minutes >= 1 || hours >= 1)) {\n\t secondsStr = \"0\" + seconds;\n\t }\n\t timeParts = [];\n\t if (hours > 0) {\n\t timeParts.push(hoursStr);\n\t }\n\t if (minutes > 0 || hours > 0) {\n\t timeParts.push(minutesStr);\n\t }\n\t timeParts.push(secondsStr);\n\t return timeParts.join(':');\n\t } else {\n\t return this._seconds.toFixed(decimals);\n\t }\n\t },\n\t _fontSize: function(timeString) {\n\t var scale, size;\n\t if (this.props.fontSize === 'auto') {\n\t scale = (function() {\n\t switch (timeString.length) {\n\t case 8:\n\t return 4;\n\t case 5:\n\t return 3;\n\t default:\n\t return 2;\n\t }\n\t })();\n\t size = this._radius / scale;\n\t return size + \"px\";\n\t } else {\n\t return this.props.fontSize;\n\t }\n\t },\n\t _drawTimer: function() {\n\t var formattedTime, percent, text;\n\t percent = this._fraction * this._seconds + 1.5;\n\t formattedTime = this._formattedTime();\n\t text = (this.props.paused && (this.props.pausedText != null)) ? this.props.pausedText : formattedTime;\n\t this._timer.fillStyle = this.props.fontColor || this.props.color;\n\t this._timer.font = \"bold \" + (this._fontSize(formattedTime)) + \" \" + this.props.font;\n\t this._timer.fillText(text, this._radius, this._radius);\n\t this._timer.fill();\n\t this._timer.globalAlpha = this.props.alpha;\n\t this._timer.fillStyle = this.props.color;\n\t this._timer.beginPath();\n\t this._timer.arc(this._radius, this._radius, this._radius, Math.PI * 1.5, Math.PI * percent, false);\n\t this._timer.arc(this._radius, this._radius, this._innerRadius, Math.PI * percent, Math.PI * 1.5, true);\n\t this._timer.closePath();\n\t return this._timer.fill();\n\t },\n\t render: function() {\n\t return React.createElement(\"div\", {\n\t \"ref\": 'component',\n\t \"className\": \"react-countdown-clock\"\n\t }, React.createElement(\"canvas\", {\n\t \"ref\": 'background',\n\t \"style\": {\n\t position: 'absolute'\n\t },\n\t \"width\": this.props.size,\n\t \"height\": this.props.size\n\t }), React.createElement(\"canvas\", {\n\t \"ref\": 'timer',\n\t \"style\": {\n\t position: 'absolute'\n\t },\n\t \"width\": this.props.size,\n\t \"height\": this.props.size\n\t }));\n\t }\n\t});\n\t\n\tReactCountdownClock.propTypes = {\n\t seconds: PropTypes.number,\n\t size: PropTypes.number,\n\t weight: PropTypes.number,\n\t color: PropTypes.string,\n\t fontSize: PropTypes.string,\n\t font: PropTypes.string,\n\t alpha: PropTypes.number,\n\t timeFormat: PropTypes.string,\n\t onComplete: PropTypes.func,\n\t onClick: PropTypes.func,\n\t showMilliseconds: PropTypes.bool,\n\t paused: PropTypes.bool,\n\t pausedText: PropTypes.string,\n\t backgroundColor: React.PropTypes.string,\n\t fontColor: React.PropTypes.string\n\t};\n\t\n\tReactCountdownClock.defaultProps = {\n\t seconds: 60,\n\t size: 300,\n\t color: '#000',\n\t alpha: 1,\n\t timeFormat: 'hms',\n\t fontSize: 'auto',\n\t font: 'Arial',\n\t showMilliseconds: true,\n\t paused: false\n\t};\n\t\n\tmodule.exports = ReactCountdownClock;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\n\t// shim for using process in browser\n\tvar process = module.exports = {};\n\t\n\t// cached from whatever global is present so that test runners that stub it\n\t// don't break things. But we need to wrap it in a try catch in case it is\n\t// wrapped in strict mode code which doesn't define any globals. It's inside a\n\t// function because try/catches deoptimize in certain engines.\n\t\n\tvar cachedSetTimeout;\n\tvar cachedClearTimeout;\n\t\n\tfunction defaultSetTimout() {\n\t throw new Error('setTimeout has not been defined');\n\t}\n\tfunction defaultClearTimeout () {\n\t throw new Error('clearTimeout has not been defined');\n\t}\n\t(function () {\n\t try {\n\t if (typeof setTimeout === 'function') {\n\t cachedSetTimeout = setTimeout;\n\t } else {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t } catch (e) {\n\t cachedSetTimeout = defaultSetTimout;\n\t }\n\t try {\n\t if (typeof clearTimeout === 'function') {\n\t cachedClearTimeout = clearTimeout;\n\t } else {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t } catch (e) {\n\t cachedClearTimeout = defaultClearTimeout;\n\t }\n\t} ())\n\tfunction runTimeout(fun) {\n\t if (cachedSetTimeout === setTimeout) {\n\t //normal enviroments in sane situations\n\t return setTimeout(fun, 0);\n\t }\n\t // if setTimeout wasn't available but was latter defined\n\t if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n\t cachedSetTimeout = setTimeout;\n\t return setTimeout(fun, 0);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedSetTimeout(fun, 0);\n\t } catch(e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedSetTimeout.call(null, fun, 0);\n\t } catch(e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n\t return cachedSetTimeout.call(this, fun, 0);\n\t }\n\t }\n\t\n\t\n\t}\n\tfunction runClearTimeout(marker) {\n\t if (cachedClearTimeout === clearTimeout) {\n\t //normal enviroments in sane situations\n\t return clearTimeout(marker);\n\t }\n\t // if clearTimeout wasn't available but was latter defined\n\t if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n\t cachedClearTimeout = clearTimeout;\n\t return clearTimeout(marker);\n\t }\n\t try {\n\t // when when somebody has screwed with setTimeout but no I.E. maddness\n\t return cachedClearTimeout(marker);\n\t } catch (e){\n\t try {\n\t // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n\t return cachedClearTimeout.call(null, marker);\n\t } catch (e){\n\t // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n\t // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n\t return cachedClearTimeout.call(this, marker);\n\t }\n\t }\n\t\n\t\n\t\n\t}\n\tvar queue = [];\n\tvar draining = false;\n\tvar currentQueue;\n\tvar queueIndex = -1;\n\t\n\tfunction cleanUpNextTick() {\n\t if (!draining || !currentQueue) {\n\t return;\n\t }\n\t draining = false;\n\t if (currentQueue.length) {\n\t queue = currentQueue.concat(queue);\n\t } else {\n\t queueIndex = -1;\n\t }\n\t if (queue.length) {\n\t drainQueue();\n\t }\n\t}\n\t\n\tfunction drainQueue() {\n\t if (draining) {\n\t return;\n\t }\n\t var timeout = runTimeout(cleanUpNextTick);\n\t draining = true;\n\t\n\t var len = queue.length;\n\t while(len) {\n\t currentQueue = queue;\n\t queue = [];\n\t while (++queueIndex < len) {\n\t if (currentQueue) {\n\t currentQueue[queueIndex].run();\n\t }\n\t }\n\t queueIndex = -1;\n\t len = queue.length;\n\t }\n\t currentQueue = null;\n\t draining = false;\n\t runClearTimeout(timeout);\n\t}\n\t\n\tprocess.nextTick = function (fun) {\n\t var args = new Array(arguments.length - 1);\n\t if (arguments.length > 1) {\n\t for (var i = 1; i < arguments.length; i++) {\n\t args[i - 1] = arguments[i];\n\t }\n\t }\n\t queue.push(new Item(fun, args));\n\t if (queue.length === 1 && !draining) {\n\t runTimeout(drainQueue);\n\t }\n\t};\n\t\n\t// v8 likes predictible objects\n\tfunction Item(fun, array) {\n\t this.fun = fun;\n\t this.array = array;\n\t}\n\tItem.prototype.run = function () {\n\t this.fun.apply(null, this.array);\n\t};\n\tprocess.title = 'browser';\n\tprocess.browser = true;\n\tprocess.env = {};\n\tprocess.argv = [];\n\tprocess.version = ''; // empty string to avoid regexp issues\n\tprocess.versions = {};\n\t\n\tfunction noop() {}\n\t\n\tprocess.on = noop;\n\tprocess.addListener = noop;\n\tprocess.once = noop;\n\tprocess.off = noop;\n\tprocess.removeListener = noop;\n\tprocess.removeAllListeners = noop;\n\tprocess.emit = noop;\n\tprocess.prependListener = noop;\n\tprocess.prependOnceListener = noop;\n\t\n\tprocess.listeners = function (name) { return [] }\n\t\n\tprocess.binding = function (name) {\n\t throw new Error('process.binding is not supported');\n\t};\n\t\n\tprocess.cwd = function () { return '/' };\n\tprocess.chdir = function (dir) {\n\t throw new Error('process.chdir is not supported');\n\t};\n\tprocess.umask = function() { return 0; };\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n\t\"use strict\";\n\t\n\t/**\n\t * Copyright (c) 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t *\n\t * \n\t */\n\t\n\tfunction makeEmptyFunction(arg) {\n\t return function () {\n\t return arg;\n\t };\n\t}\n\t\n\t/**\n\t * This function accepts and discards inputs; it has no side effects. This is\n\t * primarily useful idiomatically for overridable function endpoints which\n\t * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n\t */\n\tvar emptyFunction = function emptyFunction() {};\n\t\n\temptyFunction.thatReturns = makeEmptyFunction;\n\temptyFunction.thatReturnsFalse = makeEmptyFunction(false);\n\temptyFunction.thatReturnsTrue = makeEmptyFunction(true);\n\temptyFunction.thatReturnsNull = makeEmptyFunction(null);\n\temptyFunction.thatReturnsThis = function () {\n\t return this;\n\t};\n\temptyFunction.thatReturnsArgument = function (arg) {\n\t return arg;\n\t};\n\t\n\tmodule.exports = emptyFunction;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Copyright (c) 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t *\n\t */\n\t\n\t'use strict';\n\t\n\t/**\n\t * Use invariant() to assert state which your program assumes to be true.\n\t *\n\t * Provide sprintf-style format (only %s is supported) and arguments\n\t * to provide information about what broke and what you were\n\t * expecting.\n\t *\n\t * The invariant message will be stripped in production, but the invariant\n\t * will remain to ensure logic does not differ in production.\n\t */\n\t\n\tvar validateFormat = function validateFormat(format) {};\n\t\n\tif (process.env.NODE_ENV !== 'production') {\n\t validateFormat = function validateFormat(format) {\n\t if (format === undefined) {\n\t throw new Error('invariant requires an error message argument');\n\t }\n\t };\n\t}\n\t\n\tfunction invariant(condition, format, a, b, c, d, e, f) {\n\t validateFormat(format);\n\t\n\t if (!condition) {\n\t var error;\n\t if (format === undefined) {\n\t error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n\t } else {\n\t var args = [a, b, c, d, e, f];\n\t var argIndex = 0;\n\t error = new Error(format.replace(/%s/g, function () {\n\t return args[argIndex++];\n\t }));\n\t error.name = 'Invariant Violation';\n\t }\n\t\n\t error.framesToPop = 1; // we don't care about invariant's own frame\n\t throw error;\n\t }\n\t}\n\t\n\tmodule.exports = invariant;\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports) {\n\n\t/**\n\t * Copyright 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t */\n\t\n\t'use strict';\n\t\n\tvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\t\n\tmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Copyright 2014-2015, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t *\n\t */\n\t\n\t'use strict';\n\t\n\tvar emptyFunction = __webpack_require__(2);\n\t\n\t/**\n\t * Similar to invariant but only logs a warning if the condition is not met.\n\t * This can be used to log issues in development environments in critical\n\t * paths. Removing the logging code for production environments will keep the\n\t * same logic and follow the same code paths.\n\t */\n\t\n\tvar warning = emptyFunction;\n\t\n\tif (process.env.NODE_ENV !== 'production') {\n\t (function () {\n\t var printWarning = function printWarning(format) {\n\t for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\t\n\t var argIndex = 0;\n\t var message = 'Warning: ' + format.replace(/%s/g, function () {\n\t return args[argIndex++];\n\t });\n\t if (typeof console !== 'undefined') {\n\t console.error(message);\n\t }\n\t try {\n\t // --- Welcome to debugging React ---\n\t // This error was thrown as a convenience so that you can use this stack\n\t // to find the callsite that caused this warning to fire.\n\t throw new Error(message);\n\t } catch (x) {}\n\t };\n\t\n\t warning = function warning(condition, format) {\n\t if (format === undefined) {\n\t throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n\t }\n\t\n\t if (format.indexOf('Failed Composite propType: ') === 0) {\n\t return; // Ignore CompositeComponent proptype check.\n\t }\n\t\n\t if (!condition) {\n\t for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n\t args[_key2 - 2] = arguments[_key2];\n\t }\n\t\n\t printWarning.apply(undefined, [format].concat(args));\n\t }\n\t };\n\t })();\n\t}\n\t\n\tmodule.exports = warning;\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Copyright 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t */\n\t\n\t'use strict';\n\t\n\tif (process.env.NODE_ENV !== 'production') {\n\t var invariant = __webpack_require__(3);\n\t var warning = __webpack_require__(5);\n\t var ReactPropTypesSecret = __webpack_require__(4);\n\t var loggedTypeFailures = {};\n\t}\n\t\n\t/**\n\t * Assert that the values match with the type specs.\n\t * Error messages are memorized and will only be shown once.\n\t *\n\t * @param {object} typeSpecs Map of name to a ReactPropType\n\t * @param {object} values Runtime values that need to be type-checked\n\t * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n\t * @param {string} componentName Name of the component for error messages.\n\t * @param {?Function} getStack Returns the component stack.\n\t * @private\n\t */\n\tfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t for (var typeSpecName in typeSpecs) {\n\t if (typeSpecs.hasOwnProperty(typeSpecName)) {\n\t var error;\n\t // Prop type validation may throw. In case they do, we don't want to\n\t // fail the render phase where it didn't fail before. So we log it.\n\t // After these have been cleaned up, we'll let them throw.\n\t try {\n\t // This is intentionally an invariant that gets caught. It's the same\n\t // behavior as without this statement except with a better message.\n\t invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);\n\t error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n\t } catch (ex) {\n\t error = ex;\n\t }\n\t warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n\t if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n\t // Only monitor this failure once because there tends to be a lot of the\n\t // same error.\n\t loggedTypeFailures[error.message] = true;\n\t\n\t var stack = getStack ? getStack() : '';\n\t\n\t warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n\t }\n\t }\n\t }\n\t }\n\t}\n\t\n\tmodule.exports = checkPropTypes;\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/**\n\t * Copyright 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t */\n\t\n\t'use strict';\n\t\n\tvar emptyFunction = __webpack_require__(2);\n\tvar invariant = __webpack_require__(3);\n\tvar ReactPropTypesSecret = __webpack_require__(4);\n\t\n\tmodule.exports = function() {\n\t function shim(props, propName, componentName, location, propFullName, secret) {\n\t if (secret === ReactPropTypesSecret) {\n\t // It is still safe when called from React.\n\t return;\n\t }\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use PropTypes.checkPropTypes() to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t };\n\t shim.isRequired = shim;\n\t function getShim() {\n\t return shim;\n\t };\n\t // Important!\n\t // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n\t var ReactPropTypes = {\n\t array: shim,\n\t bool: shim,\n\t func: shim,\n\t number: shim,\n\t object: shim,\n\t string: shim,\n\t symbol: shim,\n\t\n\t any: shim,\n\t arrayOf: getShim,\n\t element: shim,\n\t instanceOf: getShim,\n\t node: shim,\n\t objectOf: getShim,\n\t oneOf: getShim,\n\t oneOfType: getShim,\n\t shape: getShim\n\t };\n\t\n\t ReactPropTypes.checkPropTypes = emptyFunction;\n\t ReactPropTypes.PropTypes = ReactPropTypes;\n\t\n\t return ReactPropTypes;\n\t};\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Copyright 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t */\n\t\n\t'use strict';\n\t\n\tvar emptyFunction = __webpack_require__(2);\n\tvar invariant = __webpack_require__(3);\n\tvar warning = __webpack_require__(5);\n\t\n\tvar ReactPropTypesSecret = __webpack_require__(4);\n\tvar checkPropTypes = __webpack_require__(6);\n\t\n\tmodule.exports = function(isValidElement, throwOnDirectAccess) {\n\t /* global Symbol */\n\t var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n\t var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\t\n\t /**\n\t * Returns the iterator method function contained on the iterable object.\n\t *\n\t * Be sure to invoke the function with the iterable as context:\n\t *\n\t * var iteratorFn = getIteratorFn(myIterable);\n\t * if (iteratorFn) {\n\t * var iterator = iteratorFn.call(myIterable);\n\t * ...\n\t * }\n\t *\n\t * @param {?object} maybeIterable\n\t * @return {?function}\n\t */\n\t function getIteratorFn(maybeIterable) {\n\t var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n\t if (typeof iteratorFn === 'function') {\n\t return iteratorFn;\n\t }\n\t }\n\t\n\t /**\n\t * Collection of methods that allow declaration and validation of props that are\n\t * supplied to React components. Example usage:\n\t *\n\t * var Props = require('ReactPropTypes');\n\t * var MyArticle = React.createClass({\n\t * propTypes: {\n\t * // An optional string prop named \"description\".\n\t * description: Props.string,\n\t *\n\t * // A required enum prop named \"category\".\n\t * category: Props.oneOf(['News','Photos']).isRequired,\n\t *\n\t * // A prop named \"dialog\" that requires an instance of Dialog.\n\t * dialog: Props.instanceOf(Dialog).isRequired\n\t * },\n\t * render: function() { ... }\n\t * });\n\t *\n\t * A more formal specification of how these methods are used:\n\t *\n\t * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n\t * decl := ReactPropTypes.{type}(.isRequired)?\n\t *\n\t * Each and every declaration produces a function with the same signature. This\n\t * allows the creation of custom validation functions. For example:\n\t *\n\t * var MyLink = React.createClass({\n\t * propTypes: {\n\t * // An optional string or URI prop named \"href\".\n\t * href: function(props, propName, componentName) {\n\t * var propValue = props[propName];\n\t * if (propValue != null && typeof propValue !== 'string' &&\n\t * !(propValue instanceof URI)) {\n\t * return new Error(\n\t * 'Expected a string or an URI for ' + propName + ' in ' +\n\t * componentName\n\t * );\n\t * }\n\t * }\n\t * },\n\t * render: function() {...}\n\t * });\n\t *\n\t * @internal\n\t */\n\t\n\t var ANONYMOUS = '<>';\n\t\n\t // Important!\n\t // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n\t var ReactPropTypes = {\n\t array: createPrimitiveTypeChecker('array'),\n\t bool: createPrimitiveTypeChecker('boolean'),\n\t func: createPrimitiveTypeChecker('function'),\n\t number: createPrimitiveTypeChecker('number'),\n\t object: createPrimitiveTypeChecker('object'),\n\t string: createPrimitiveTypeChecker('string'),\n\t symbol: createPrimitiveTypeChecker('symbol'),\n\t\n\t any: createAnyTypeChecker(),\n\t arrayOf: createArrayOfTypeChecker,\n\t element: createElementTypeChecker(),\n\t instanceOf: createInstanceTypeChecker,\n\t node: createNodeChecker(),\n\t objectOf: createObjectOfTypeChecker,\n\t oneOf: createEnumTypeChecker,\n\t oneOfType: createUnionTypeChecker,\n\t shape: createShapeTypeChecker\n\t };\n\t\n\t /**\n\t * inlined Object.is polyfill to avoid requiring consumers ship their own\n\t * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n\t */\n\t /*eslint-disable no-self-compare*/\n\t function is(x, y) {\n\t // SameValue algorithm\n\t if (x === y) {\n\t // Steps 1-5, 7-10\n\t // Steps 6.b-6.e: +0 != -0\n\t return x !== 0 || 1 / x === 1 / y;\n\t } else {\n\t // Step 6.a: NaN == NaN\n\t return x !== x && y !== y;\n\t }\n\t }\n\t /*eslint-enable no-self-compare*/\n\t\n\t /**\n\t * We use an Error-like object for backward compatibility as people may call\n\t * PropTypes directly and inspect their output. However, we don't use real\n\t * Errors anymore. We don't inspect their stack anyway, and creating them\n\t * is prohibitively expensive if they are created too often, such as what\n\t * happens in oneOfType() for any type before the one that matched.\n\t */\n\t function PropTypeError(message) {\n\t this.message = message;\n\t this.stack = '';\n\t }\n\t // Make `instanceof Error` still work for returned errors.\n\t PropTypeError.prototype = Error.prototype;\n\t\n\t function createChainableTypeChecker(validate) {\n\t if (process.env.NODE_ENV !== 'production') {\n\t var manualPropTypeCallCache = {};\n\t var manualPropTypeWarningCount = 0;\n\t }\n\t function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n\t componentName = componentName || ANONYMOUS;\n\t propFullName = propFullName || propName;\n\t\n\t if (secret !== ReactPropTypesSecret) {\n\t if (throwOnDirectAccess) {\n\t // New behavior only for users of `prop-types` package\n\t invariant(\n\t false,\n\t 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n\t 'Use `PropTypes.checkPropTypes()` to call them. ' +\n\t 'Read more at http://fb.me/use-check-prop-types'\n\t );\n\t } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n\t // Old behavior for people using React.PropTypes\n\t var cacheKey = componentName + ':' + propName;\n\t if (\n\t !manualPropTypeCallCache[cacheKey] &&\n\t // Avoid spamming the console because they are often not actionable except for lib authors\n\t manualPropTypeWarningCount < 3\n\t ) {\n\t warning(\n\t false,\n\t 'You are manually calling a React.PropTypes validation ' +\n\t 'function for the `%s` prop on `%s`. This is deprecated ' +\n\t 'and will throw in the standalone `prop-types` package. ' +\n\t 'You may be seeing this warning due to a third-party PropTypes ' +\n\t 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n\t propFullName,\n\t componentName\n\t );\n\t manualPropTypeCallCache[cacheKey] = true;\n\t manualPropTypeWarningCount++;\n\t }\n\t }\n\t }\n\t if (props[propName] == null) {\n\t if (isRequired) {\n\t if (props[propName] === null) {\n\t return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n\t }\n\t return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n\t }\n\t return null;\n\t } else {\n\t return validate(props, propName, componentName, location, propFullName);\n\t }\n\t }\n\t\n\t var chainedCheckType = checkType.bind(null, false);\n\t chainedCheckType.isRequired = checkType.bind(null, true);\n\t\n\t return chainedCheckType;\n\t }\n\t\n\t function createPrimitiveTypeChecker(expectedType) {\n\t function validate(props, propName, componentName, location, propFullName, secret) {\n\t var propValue = props[propName];\n\t var propType = getPropType(propValue);\n\t if (propType !== expectedType) {\n\t // `propValue` being instance of, say, date/regexp, pass the 'object'\n\t // check, but we can offer a more precise error message here rather than\n\t // 'of type `object`'.\n\t var preciseType = getPreciseType(propValue);\n\t\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createAnyTypeChecker() {\n\t return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n\t }\n\t\n\t function createArrayOfTypeChecker(typeChecker) {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t if (typeof typeChecker !== 'function') {\n\t return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n\t }\n\t var propValue = props[propName];\n\t if (!Array.isArray(propValue)) {\n\t var propType = getPropType(propValue);\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n\t }\n\t for (var i = 0; i < propValue.length; i++) {\n\t var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n\t if (error instanceof Error) {\n\t return error;\n\t }\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createElementTypeChecker() {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t var propValue = props[propName];\n\t if (!isValidElement(propValue)) {\n\t var propType = getPropType(propValue);\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createInstanceTypeChecker(expectedClass) {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t if (!(props[propName] instanceof expectedClass)) {\n\t var expectedClassName = expectedClass.name || ANONYMOUS;\n\t var actualClassName = getClassName(props[propName]);\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createEnumTypeChecker(expectedValues) {\n\t if (!Array.isArray(expectedValues)) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n\t return emptyFunction.thatReturnsNull;\n\t }\n\t\n\t function validate(props, propName, componentName, location, propFullName) {\n\t var propValue = props[propName];\n\t for (var i = 0; i < expectedValues.length; i++) {\n\t if (is(propValue, expectedValues[i])) {\n\t return null;\n\t }\n\t }\n\t\n\t var valuesString = JSON.stringify(expectedValues);\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createObjectOfTypeChecker(typeChecker) {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t if (typeof typeChecker !== 'function') {\n\t return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n\t }\n\t var propValue = props[propName];\n\t var propType = getPropType(propValue);\n\t if (propType !== 'object') {\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n\t }\n\t for (var key in propValue) {\n\t if (propValue.hasOwnProperty(key)) {\n\t var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n\t if (error instanceof Error) {\n\t return error;\n\t }\n\t }\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createUnionTypeChecker(arrayOfTypeCheckers) {\n\t if (!Array.isArray(arrayOfTypeCheckers)) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n\t return emptyFunction.thatReturnsNull;\n\t }\n\t\n\t for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n\t var checker = arrayOfTypeCheckers[i];\n\t if (typeof checker !== 'function') {\n\t warning(\n\t false,\n\t 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +\n\t 'received %s at index %s.',\n\t getPostfixForTypeWarning(checker),\n\t i\n\t );\n\t return emptyFunction.thatReturnsNull;\n\t }\n\t }\n\t\n\t function validate(props, propName, componentName, location, propFullName) {\n\t for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n\t var checker = arrayOfTypeCheckers[i];\n\t if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n\t return null;\n\t }\n\t }\n\t\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createNodeChecker() {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t if (!isNode(props[propName])) {\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function createShapeTypeChecker(shapeTypes) {\n\t function validate(props, propName, componentName, location, propFullName) {\n\t var propValue = props[propName];\n\t var propType = getPropType(propValue);\n\t if (propType !== 'object') {\n\t return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n\t }\n\t for (var key in shapeTypes) {\n\t var checker = shapeTypes[key];\n\t if (!checker) {\n\t continue;\n\t }\n\t var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n\t if (error) {\n\t return error;\n\t }\n\t }\n\t return null;\n\t }\n\t return createChainableTypeChecker(validate);\n\t }\n\t\n\t function isNode(propValue) {\n\t switch (typeof propValue) {\n\t case 'number':\n\t case 'string':\n\t case 'undefined':\n\t return true;\n\t case 'boolean':\n\t return !propValue;\n\t case 'object':\n\t if (Array.isArray(propValue)) {\n\t return propValue.every(isNode);\n\t }\n\t if (propValue === null || isValidElement(propValue)) {\n\t return true;\n\t }\n\t\n\t var iteratorFn = getIteratorFn(propValue);\n\t if (iteratorFn) {\n\t var iterator = iteratorFn.call(propValue);\n\t var step;\n\t if (iteratorFn !== propValue.entries) {\n\t while (!(step = iterator.next()).done) {\n\t if (!isNode(step.value)) {\n\t return false;\n\t }\n\t }\n\t } else {\n\t // Iterator will provide entry [k,v] tuples rather than values.\n\t while (!(step = iterator.next()).done) {\n\t var entry = step.value;\n\t if (entry) {\n\t if (!isNode(entry[1])) {\n\t return false;\n\t }\n\t }\n\t }\n\t }\n\t } else {\n\t return false;\n\t }\n\t\n\t return true;\n\t default:\n\t return false;\n\t }\n\t }\n\t\n\t function isSymbol(propType, propValue) {\n\t // Native Symbol.\n\t if (propType === 'symbol') {\n\t return true;\n\t }\n\t\n\t // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n\t if (propValue['@@toStringTag'] === 'Symbol') {\n\t return true;\n\t }\n\t\n\t // Fallback for non-spec compliant Symbols which are polyfilled.\n\t if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n\t return true;\n\t }\n\t\n\t return false;\n\t }\n\t\n\t // Equivalent of `typeof` but with special handling for array and regexp.\n\t function getPropType(propValue) {\n\t var propType = typeof propValue;\n\t if (Array.isArray(propValue)) {\n\t return 'array';\n\t }\n\t if (propValue instanceof RegExp) {\n\t // Old webkits (at least until Android 4.0) return 'function' rather than\n\t // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n\t // passes PropTypes.object.\n\t return 'object';\n\t }\n\t if (isSymbol(propType, propValue)) {\n\t return 'symbol';\n\t }\n\t return propType;\n\t }\n\t\n\t // This handles more types than `getPropType`. Only used for error messages.\n\t // See `createPrimitiveTypeChecker`.\n\t function getPreciseType(propValue) {\n\t if (typeof propValue === 'undefined' || propValue === null) {\n\t return '' + propValue;\n\t }\n\t var propType = getPropType(propValue);\n\t if (propType === 'object') {\n\t if (propValue instanceof Date) {\n\t return 'date';\n\t } else if (propValue instanceof RegExp) {\n\t return 'regexp';\n\t }\n\t }\n\t return propType;\n\t }\n\t\n\t // Returns a string that is postfixed to a warning about an invalid type.\n\t // For example, \"undefined\" or \"of type array\"\n\t function getPostfixForTypeWarning(value) {\n\t var type = getPreciseType(value);\n\t switch (type) {\n\t case 'array':\n\t case 'object':\n\t return 'an ' + type;\n\t case 'boolean':\n\t case 'date':\n\t case 'regexp':\n\t return 'a ' + type;\n\t default:\n\t return type;\n\t }\n\t }\n\t\n\t // Returns class name of the object, if any.\n\t function getClassName(propValue) {\n\t if (!propValue.constructor || !propValue.constructor.name) {\n\t return ANONYMOUS;\n\t }\n\t return propValue.constructor.name;\n\t }\n\t\n\t ReactPropTypes.checkPropTypes = checkPropTypes;\n\t ReactPropTypes.PropTypes = ReactPropTypes;\n\t\n\t return ReactPropTypes;\n\t};\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(process) {/**\n\t * Copyright 2013-present, Facebook, Inc.\n\t * All rights reserved.\n\t *\n\t * This source code is licensed under the BSD-style license found in the\n\t * LICENSE file in the root directory of this source tree. An additional grant\n\t * of patent rights can be found in the PATENTS file in the same directory.\n\t */\n\t\n\tif (process.env.NODE_ENV !== 'production') {\n\t var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n\t Symbol.for &&\n\t Symbol.for('react.element')) ||\n\t 0xeac7;\n\t\n\t var isValidElement = function(object) {\n\t return typeof object === 'object' &&\n\t object !== null &&\n\t object.$$typeof === REACT_ELEMENT_TYPE;\n\t };\n\t\n\t // By explicitly using `prop-types` you are opting into new development behavior.\n\t // http://fb.me/prop-types-in-prod\n\t var throwOnDirectAccess = true;\n\t module.exports = __webpack_require__(8)(isValidElement, throwOnDirectAccess);\n\t} else {\n\t // By explicitly using `prop-types` you are opting into new production behavior.\n\t // http://fb.me/prop-types-in-prod\n\t module.exports = __webpack_require__(7)();\n\t}\n\t\n\t/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_10__;\n\n/***/ })\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// react-countdown-clock.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/Users/shanshanzhu/Projects/react-countdown-clock/build\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 72dd774d30e970c260e4","React = require 'react'\nPropTypes = require 'prop-types'\nCreateReactClass = require 'create-react-class'\n\nReactCountdownClock = CreateReactClass\n _seconds: 0\n _radius: null\n _fraction: null\n _content: null\n _canvas: null\n _timeoutIds: []\n\n displayName: 'ReactCountdownClock'\n\n componentDidUpdate: (props) ->\n if props.seconds != @props.seconds\n @_seconds = props.seconds\n @_setupTimer()\n\n if props.color != @props.color\n @_clearBackground()\n @_drawBackground()\n @_updateCanvas()\n\n if props.paused != @props.paused\n @_startTimer() if !@props.paused\n @_pauseTimer() if @props.paused\n\n componentDidMount: ->\n @_seconds = @props.seconds\n @_setupTimer()\n\n componentWillUnmount: ->\n @_cancelTimer()\n\n _setupTimer: ->\n @_setScale()\n @_setupCanvases()\n @_drawBackground()\n @_drawTimer()\n @_startTimer() unless @props.paused\n\n _updateCanvas: ->\n @_clearTimer()\n @_drawTimer()\n\n _setScale: ->\n @_radius = @props.size / 2\n @_fraction = 2 / @_seconds\n @_tickPeriod = @_calculateTick()\n @_innerRadius =\n if @props.weight\n @_radius - @props.weight\n else\n @_radius / 1.8\n\n _calculateTick: ->\n # Tick period (milleseconds) needs to be fast for smaller time periods and slower\n # for longer ones. This provides smoother rendering. It should never exceed 1 second.\n tickScale = 1.8\n tick = @_seconds * tickScale\n if tick > 1000 then 1000 else tick\n\n _setupCanvases: ->\n @_background = @refs.background.getContext '2d'\n @_timer = @refs.timer.getContext '2d'\n @_timer.textAlign = 'center'\n @_timer.textBaseline = 'middle'\n if @props.onClick?\n @refs.component.addEventListener 'click', @props.onClick\n\n _startTimer: ->\n # Give it a moment to collect it's thoughts for smoother render\n @_timeoutIds.push(setTimeout ( => @_tick() ), 200)\n\n _pauseTimer: ->\n @_stopTimer()\n @_updateCanvas()\n\n _stopTimer: ->\n for timeout in @_timeoutIds\n clearTimeout timeout\n\n _cancelTimer: ->\n @_stopTimer()\n\n if @props.onClick?\n @refs.component.removeEventListener 'click', @props.onClick\n\n _tick: ->\n start = Date.now()\n @_timeoutIds.push(setTimeout ( =>\n duration = (Date.now() - start) / 1000\n @_seconds -= duration\n\n if @_seconds <= 0\n @_seconds = 0\n @_handleComplete()\n @_clearTimer()\n else\n @_updateCanvas()\n @_tick()\n ), @_tickPeriod)\n\n _handleComplete: ->\n if @props.onComplete\n @props.onComplete()\n\n _clearBackground: ->\n @_background.clearRect 0, 0, @refs.timer.width, @refs.timer.height\n\n _clearTimer: ->\n @_timer.clearRect 0, 0, @refs.timer.width, @refs.timer.height\n\n _drawBackground: ->\n @_background.beginPath()\n @_background.globalAlpha = @props.alpha / 3\n @_background.fillStyle = @props.backgroundColor or @props.color\n @_background.arc @_radius, @_radius, @_radius, 0, Math.PI * 2, false\n @_background.arc @_radius, @_radius, @_innerRadius, Math.PI * 2, 0, true\n @_background.closePath()\n @_background.fill()\n\n _formattedTime: ->\n decimals = (@_seconds <= 9.9 && @props.showMilliseconds) ? 1 : 0\n\n if @props.timeFormat == 'hms'\n hours = parseInt( @_seconds / 3600 ) % 24\n minutes = parseInt( @_seconds / 60 ) % 60\n seconds = (@_seconds % 60).toFixed(decimals)\n\n hoursStr = \"#{hours}\"\n minutesStr = \"#{minutes}\"\n secondsStr = \"#{seconds}\"\n\n hoursStr = \"0#{hours}\" if hours < 10\n minutesStr = \"0#{minutes}\" if minutes < 10 && hours >= 1\n secondsStr = \"0#{seconds}\" if seconds < 10 && (minutes >= 1 || hours >= 1)\n\n timeParts = []\n timeParts.push hoursStr if hours > 0\n timeParts.push minutesStr if minutes > 0 || hours > 0\n timeParts.push secondsStr\n\n timeParts.join ':'\n else\n return @_seconds.toFixed(decimals)\n\n _fontSize: (timeString) ->\n if @props.fontSize == 'auto'\n scale = switch timeString.length\n when 8 then 4 # hh:mm:ss\n when 5 then 3 # mm:ss\n else 2 # ss or ss.s\n size = @_radius / scale\n \"#{size}px\"\n else\n @props.fontSize\n\n _drawTimer: ->\n percent = @_fraction * @_seconds + 1.5\n formattedTime = @_formattedTime()\n text = if (@props.paused && @props.pausedText?) then @props.pausedText else formattedTime\n\n # Timer Text\n @_timer.fillStyle = @props.fontColor or @props.color\n @_timer.font = \"bold #{@_fontSize(formattedTime)} #{@props.font}\"\n @_timer.fillText text, @_radius, @_radius\n @_timer.fill()\n\n # Timer\n @_timer.globalAlpha = @props.alpha\n @_timer.fillStyle = @props.color\n @_timer.beginPath()\n @_timer.arc @_radius, @_radius, @_radius, Math.PI * 1.5, Math.PI * percent, false\n @_timer.arc @_radius, @_radius, @_innerRadius, Math.PI * percent, Math.PI * 1.5, true\n @_timer.closePath()\n @_timer.fill()\n\n render: ->\n React.createElement(\"div\", {\"ref\": 'component', \"className\": \"react-countdown-clock\"},\n React.createElement(\"canvas\", {\"ref\": 'background', \"style\": ( position: 'absolute' ), \"width\": (@props.size), \"height\": (@props.size)}),\n React.createElement(\"canvas\", {\"ref\": 'timer', \"style\": ( position: 'absolute' ), \"width\": (@props.size), \"height\": (@props.size)})\n )\n\nReactCountdownClock.propTypes =\n seconds: PropTypes.number\n size: PropTypes.number\n weight: PropTypes.number\n color: PropTypes.string\n fontSize: PropTypes.string\n font: PropTypes.string\n alpha: PropTypes.number\n timeFormat: PropTypes.string\n onComplete: PropTypes.func\n onClick: PropTypes.func\n showMilliseconds: PropTypes.bool\n paused: PropTypes.bool\n pausedText: PropTypes.string\n backgroundColor: React.PropTypes.string\n fontColor: React.PropTypes.string\n\nReactCountdownClock.defaultProps =\n seconds: 60\n size: 300\n color: '#000'\n alpha: 1\n timeFormat: 'hms'\n fontSize: 'auto'\n font: 'Arial'\n showMilliseconds: true\n paused: false\n\nmodule.exports = ReactCountdownClock\n\n\n\n// WEBPACK FOOTER //\n// ../~/cjsx-loader!./react-countdown-clock.coffee","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/process/browser.js\n// module id = 1\n// module chunks = 0","\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/fbjs/lib/emptyFunction.js\n// module id = 2\n// module chunks = 0","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/fbjs/lib/invariant.js\n// module id = 3\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/prop-types/lib/ReactPropTypesSecret.js\n// module id = 4\n// module chunks = 0","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n */\n\n'use strict';\n\nvar emptyFunction = require('./emptyFunction');\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (process.env.NODE_ENV !== 'production') {\n (function () {\n var printWarning = function printWarning(format) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function () {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n\n warning = function warning(condition, format) {\n if (format === undefined) {\n throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {\n args[_key2 - 2] = arguments[_key2];\n }\n\n printWarning.apply(undefined, [format].concat(args));\n }\n };\n })();\n}\n\nmodule.exports = warning;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/fbjs/lib/warning.js\n// module id = 5\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== 'production') {\n var invariant = require('fbjs/lib/invariant');\n var warning = require('fbjs/lib/warning');\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (typeSpecs.hasOwnProperty(typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');\n }\n }\n }\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/prop-types/checkPropTypes.js\n// module id = 6\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/prop-types/factoryWithThrowingShims.js\n// module id = 7\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar warning = require('fbjs/lib/warning');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n warning(\n false,\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `%s` prop on `%s`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',\n propFullName,\n componentName\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunction.thatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (propValue.hasOwnProperty(key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunction.thatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n warning(\n false,\n 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +\n 'received %s at index %s.',\n getPostfixForTypeWarning(checker),\n i\n );\n return emptyFunction.thatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/prop-types/factoryWithTypeCheckers.js\n// module id = 8\n// module chunks = 0","/**\n * Copyright 2013-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../~/prop-types/index.js\n// module id = 9\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_10__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"React\",\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\"}\n// module id = 10\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/coffee/react-countdown-clock.coffee b/coffee/react-countdown-clock.coffee index 8e01220..68fe883 100644 --- a/coffee/react-countdown-clock.coffee +++ b/coffee/react-countdown-clock.coffee @@ -115,7 +115,7 @@ ReactCountdownClock = CreateReactClass _drawBackground: -> @_background.beginPath() @_background.globalAlpha = @props.alpha / 3 - @_background.fillStyle = @props.color + @_background.fillStyle = @props.backgroundColor or @props.color @_background.arc @_radius, @_radius, @_radius, 0, Math.PI * 2, false @_background.arc @_radius, @_radius, @_innerRadius, Math.PI * 2, 0, true @_background.closePath() @@ -162,11 +162,15 @@ ReactCountdownClock = CreateReactClass formattedTime = @_formattedTime() text = if (@props.paused && @props.pausedText?) then @props.pausedText else formattedTime + # Timer Text + @_timer.fillStyle = @props.fontColor or @props.color + @_timer.font = "bold #{@_fontSize(formattedTime)} #{@props.font}" + @_timer.fillText text, @_radius, @_radius + @_timer.fill() + # Timer @_timer.globalAlpha = @props.alpha @_timer.fillStyle = @props.color - @_timer.font = "bold #{@_fontSize(formattedTime)} #{@props.font}" - @_timer.fillText text, @_radius, @_radius @_timer.beginPath() @_timer.arc @_radius, @_radius, @_radius, Math.PI * 1.5, Math.PI * percent, false @_timer.arc @_radius, @_radius, @_innerRadius, Math.PI * percent, Math.PI * 1.5, true @@ -193,6 +197,8 @@ ReactCountdownClock.propTypes = showMilliseconds: PropTypes.bool paused: PropTypes.bool pausedText: PropTypes.string + backgroundColor: React.PropTypes.string + fontColor: React.PropTypes.string ReactCountdownClock.defaultProps = seconds: 60 diff --git a/index.html b/index.html index a4fb785..64c8b95 100644 --- a/index.html +++ b/index.html @@ -41,6 +41,8 @@ return { seconds: randomAmountOfSeconds(), color: randomColor(), + fontColor: '#aaa', + backgroundColor: '#fff', paused: false, fontSize: 'auto' } @@ -64,6 +66,8 @@ React.createElement(ReactCountdownClock, { seconds: this.state.seconds, color: this.state.color, + fontColor: this.state.fontColor, + backgroundColor: this.state.backgroundColor, paused: this.state.paused, pausedText: "▐▐ ", alpha: 0.9,