Socket
Socket
Sign inDemoInstall

react-spring

Package Overview
Dependencies
Maintainers
1
Versions
379
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-spring - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

dist/react-spring.es.js

@@ -1,1 +0,1 @@

import React from"react";import PropTypes from"prop-types";function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var REACT_ELEMENT_TYPE$1,NODE_ENV=process.env.NODE_ENV,invariant=function(e,t,n,r,i,o,a,s){if("production"!==NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,Animated=function(){function e(){}var t=e.prototype;return t.__attach=function(){},t.__detach=function(){},t.__getValue=function(){},t.__getAnimatedValue=function(){return this.__getValue()},t.__addChild=function(e){},t.__removeChild=function(e){},t.__getChildren=function(){return[]},e}(),Animated_1=Animated,commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _typeof$1(e){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _jsx$1(e,t,n,r){REACT_ELEMENT_TYPE$1||(REACT_ELEMENT_TYPE$1="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),t&&i)for(var a in i)void 0===t[a]&&(t[a]=i[a]);else t||(t=i||{});if(1===o)t.children=r;else if(o>1){for(var s=new Array(o),l=0;l<o;l++)s[l]=arguments[l+3];t.children=s}return{$$typeof:REACT_ELEMENT_TYPE$1,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _asyncIterator$1(e){if("function"==typeof Symbol){if(Symbol.asyncIterator){var t=e[Symbol.asyncIterator];if(null!=t)return t.call(e)}if(Symbol.iterator)return e[Symbol.iterator]()}throw new TypeError("Object is not async iterable")}function _AwaitValue$1(e){this.wrapped=e}function _AsyncGenerator$1(e){var t,n;function r(t,n){try{var o=e[t](n),a=o.value,s=a instanceof _AwaitValue$1;Promise.resolve(s?a.wrapped:a).then(function(e){s?r("next",e):i(o.done?"return":"normal",e)},function(e){r("throw",e)})}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},"function"!=typeof e.return&&(this.return=void 0)}function _wrapAsyncGenerator$1(e){return function(){return new _AsyncGenerator$1(e.apply(this,arguments))}}function _awaitAsyncGenerator$1(e){return new _AwaitValue$1(e)}function _asyncGeneratorDelegate$1(e,t){var n={},r=!1;function i(n,i){return r=!0,i=new Promise(function(t){t(e[n](i))}),{done:!1,value:t(i)}}return"function"==typeof Symbol&&Symbol.iterator&&(n[Symbol.iterator]=function(){return this}),n.next=function(e){return r?(r=!1,e):i("next",e)},"function"==typeof e.throw&&(n.throw=function(e){if(r)throw r=!1,e;return i("throw",e)}),"function"==typeof e.return&&(n.return=function(e){return i("return",e)}),n}function _asyncToGenerator$1(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e,t){try{var n=o[e](t),a=n.value}catch(e){return void i(e)}n.done?r(a):Promise.resolve(a).then(s,l)}function s(e){a("next",e)}function l(e){a("throw",e)}s()})}}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$1(e,t,n){return t&&_defineProperties$1(e.prototype,t),n&&_defineProperties$1(e,n),e}function _defineEnumerableProperties$1(e,t){for(var n in t)(o=t[n]).configurable=o.enumerable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n,o);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),i=0;i<r.length;i++){var o,a=r[i];(o=t[a]).configurable=o.enumerable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a,o)}return e}function _defaults$1(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function _defineProperty$1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _extends$1(){return(_extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _get$1(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:_get$1(i,t,n)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(n):void 0}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _inheritsLoose$1(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}"function"==typeof Symbol&&Symbol.asyncIterator&&(_AsyncGenerator$1.prototype[Symbol.asyncIterator]=function(){return this}),_AsyncGenerator$1.prototype.next=function(e){return this._invoke("next",e)},_AsyncGenerator$1.prototype.throw=function(e){return this._invoke("throw",e)},_AsyncGenerator$1.prototype.return=function(e){return this._invoke("return",e)};var _gPO$1=Object.getPrototypeOf||function(e){return e.__proto__},_sPO$1=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_construct$1="object"==typeof Reflect&&Reflect.construct||function(e,t,n){var r,i=[null];return i.push.apply(i,t),r=e.bind.apply(e,i),_sPO$1(new r,n.prototype)},_cache$1="function"==typeof Map&&new Map;function _wrapNativeSuper$1(e){if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==_cache$1){if(_cache$1.has(e))return _cache$1.get(e);_cache$1.set(e,t)}function t(){}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writeable:!0,configurable:!0}}),_sPO$1(t,_sPO$1(function(){return _construct$1(e,arguments,_gPO$1(this).constructor)},e))}function _instanceof$1(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function _interopRequireDefault$1(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard$1(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function _newArrowCheck$1(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}function _objectDestructuringEmpty$1(e){if(null==e)throw new TypeError("Cannot destructure undefined")}function _objectWithoutProperties$1(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$1(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _set$1(e,t,n,r){var i=Object.getOwnPropertyDescriptor(e,t);if(void 0===i){var o=Object.getPrototypeOf(e);null!==o&&_set$1(o,t,n,r)}else if("value"in i&&i.writable)i.value=n;else{var a=i.set;void 0!==a&&a.call(r,n)}return n}function _sliceIterator$1(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}function _slicedToArray$1(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return _sliceIterator$1(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _slicedToArrayLoose$1(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){for(var n,r=[],i=e[Symbol.iterator]();!(n=i.next()).done&&(r.push(n.value),!t||r.length!==t););return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _taggedTemplateLiteral$1(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _taggedTemplateLiteralLoose$1(e,t){return e.raw=t,e}function _temporalRef$1(e,t){if(e===_temporalUndefined$1)throw new ReferenceError(t+" is not defined - temporal dead zone");return e}function _readOnlyError$1(e){throw new Error('"'+e+'" is read-only')}function _classNameTDZError$1(e){throw new Error('Class "'+e+'" cannot be referenced in computed property keys.')}var _temporalUndefined$1={};function _toArray$1(e){return Array.isArray(e)?e:Array.from(e)}function _toConsumableArray$1(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function _skipFirstGeneratorNext$1(e){return function(){var t=e.apply(this,arguments);return t.next(),t}}function _toPropertyKey$1(e){return"symbol"==typeof e?e:String(e)}function _initializerWarningHelper$1(e,t){throw new Error("Decorating class property failed. Please ensure that proposal-class-properties is enabled and set to use loose mode. To use proposal-class-properties in spec mode with decorators, wait for the next major version of decorators in stage 2.")}function _initializerDefineProperty$1(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function _applyDecoratedDescriptor$1(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}var rollupPluginBabelHelpers=Object.freeze({get typeof(){return _typeof$1},jsx:_jsx$1,asyncIterator:_asyncIterator$1,AwaitValue:_AwaitValue$1,AsyncGenerator:_AsyncGenerator$1,wrapAsyncGenerator:_wrapAsyncGenerator$1,awaitAsyncGenerator:_awaitAsyncGenerator$1,asyncGeneratorDelegate:_asyncGeneratorDelegate$1,asyncToGenerator:_asyncToGenerator$1,classCallCheck:_classCallCheck$1,createClass:_createClass$1,defineEnumerableProperties:_defineEnumerableProperties$1,defaults:_defaults$1,defineProperty:_defineProperty$1,get extends(){return _extends$1},get:_get$1,inherits:_inherits$1,inheritsLoose:_inheritsLoose$1,wrapNativeSuper:_wrapNativeSuper$1,instanceof:_instanceof$1,interopRequireDefault:_interopRequireDefault$1,interopRequireWildcard:_interopRequireWildcard$1,newArrowCheck:_newArrowCheck$1,objectDestructuringEmpty:_objectDestructuringEmpty$1,objectWithoutProperties:_objectWithoutProperties$1,assertThisInitialized:_assertThisInitialized$1,possibleConstructorReturn:_possibleConstructorReturn$1,set:_set$1,slicedToArray:_slicedToArray$1,slicedToArrayLoose:_slicedToArrayLoose$1,taggedTemplateLiteral:_taggedTemplateLiteral$1,taggedTemplateLiteralLoose:_taggedTemplateLiteralLoose$1,temporalRef:_temporalRef$1,readOnlyError:_readOnlyError$1,classNameTDZError:_classNameTDZError$1,temporalUndefined:_temporalUndefined$1,toArray:_toArray$1,toConsumableArray:_toConsumableArray$1,skipFirstGeneratorNext:_skipFirstGeneratorNext$1,toPropertyKey:_toPropertyKey$1,initializerWarningHelper:_initializerWarningHelper$1,initializerDefineProperty:_initializerDefineProperty$1,applyDecoratedDescriptor:_applyDecoratedDescriptor$1}),require$$0=rollupPluginBabelHelpers,_inheritsLoose$1$1=require$$0.inheritsLoose,AnimatedWithChildren=function(e){function t(){var t;return(t=e.call(this)||this)._children=[],t}_inheritsLoose$1$1(t,e);var n=t.prototype;return n.__addChild=function(e){0===this._children.length&&this.__attach(),this._children.push(e)},n.__removeChild=function(e){var t=this._children.indexOf(e);-1!==t?(this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},t}(Animated_1),AnimatedWithChildren_1=AnimatedWithChildren,InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(e){InteractionManager.current=e}},InteractionManager_1=InteractionManager;function normalizeColor(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=matchers.hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:names.hasOwnProperty(e)?names[e]:(t=matchers.rgb.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|255)>>>0:(t=matchers.rgba.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|parse1(t[4]))>>>0:(t=matchers.hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=matchers.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=matchers.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=matchers.hsl.exec(e))?(255|hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3])))>>>0:(t=matchers.hsla.exec(e))?(hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3]))|parse1(t[4]))>>>0:null}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=hue2rgb(i,r,e+1/3),a=hue2rgb(i,r,e),s=hue2rgb(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}var NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function toArray(e){return Array.prototype.slice.call(e,0)}function call(){return"\\(\\s*("+toArray(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var matchers={rgb:new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),rgba:new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl:new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla:new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function parse255(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function parse360(e){return(parseFloat(e)%360+360)%360/360}function parse1(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function parsePercentage(e){var t=parseFloat(e,10);return t<0?0:t>100?1:t/100}var names={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function rgba(e){return{r:Math.round((4278190080&e)>>>24),g:Math.round((16711680&e)>>>16),b:Math.round((65280&e)>>>8),a:((255&e)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,_extends$1$1=require$$0.extends,linear=function(e){return e},Interpolation=function(){function e(){}return e.create=function(e){if(e.outputRange&&"string"==typeof e.outputRange[0])return createInterpolationFromStringOutputRange(e);var t=e.outputRange;checkInfiniteRange("outputRange",t);var n=e.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===t.length,"inputRange ("+n.length+") and outputRange ("+t.length+") must have the same length");var r=e.easing||linear,i="extend";void 0!==e.extrapolateLeft?i=e.extrapolateLeft:void 0!==e.extrapolate&&(i=e.extrapolate);var o="extend";return void 0!==e.extrapolateRight?o=e.extrapolateRight:void 0!==e.extrapolate&&(o=e.extrapolate),function(e){invariant_1("number"==typeof e,"Cannot interpolation an input which is not a number");var a=findRange(e,n);return interpolate(e,n[a],n[a+1],t[a],t[a+1],r,i,o)}},e}();function interpolate(e,t,n,r,i,o,a,s){var l=e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=o(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function colorToRgba(e){var t=normalizeCssColor(e);return null===t?e:"rgba("+((4278190080&(t=t||0))>>>24)+", "+((16711680&t)>>>16)+", "+((65280&t)>>>8)+", "+(255&t)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(e){var t=e.outputRange;invariant_1(t.length>=2,"Bad output range"),checkPattern(t=t.map(colorToRgba));var n=t[0].match(stringShapeRegex).map(function(){return[]});t.forEach(function(e){e.match(stringShapeRegex).forEach(function(e,t){n[t].push(+e)})});var r=t[0].match(stringShapeRegex).map(function(t,r){return Interpolation.create(_extends$1$1({},e,{outputRange:n[r]}))}),i=/^rgb/.test(t[0]);return function(e){var n=0;return t[0].replace(stringShapeRegex,function(){var t=r[n++](e);return String(i&&n<4?Math.round(t):t)})}}function checkPattern(e){for(var t=e[0].replace(stringShapeRegex,""),n=1;n<e.length;++n)invariant_1(t===e[n].replace(stringShapeRegex,""),"invalid pattern "+e[0]+" and "+e[n])}function findRange(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}function checkValidInputRange(e){invariant_1(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t<e.length;++t)invariant_1(e[t]>=e[t-1],"inputRange must be monotonically increasing "+e)}function checkInfiniteRange(e,t){invariant_1(t.length>=2,e+" must have at least 2 elements"),invariant_1(2!==t.length||t[0]!==-1/0||t[1]!==1/0,e+"cannot be ]-infinity;+infinity[ "+t)}var Interpolation_1=Interpolation,_uniqueId=0,guid=function(){return String(_uniqueId++)},_inheritsLoose$2=require$$0.inheritsLoose,AnimatedInterpolation=function(e){function t(t,n){var r;return(r=e.call(this)||this)._parent=t,r._interpolation=n,r._listeners={},r}_inheritsLoose$2(t,e);var n=t.prototype;return n.__getValue=function(){var e=this._parent.__getValue();return invariant_1("number"==typeof e,"Cannot interpolate an input which is not a number."),this._interpolation(e)},n.addListener=function(e){var t=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n},n.removeListener=function(e){delete this._listeners[e]},n.interpolate=function(e){return new t(this,Interpolation_1.create(e))},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)},t}(AnimatedWithChildren_1),AnimatedInterpolation_1=AnimatedInterpolation,Animation=function(){function e(){}var t=e.prototype;return t.start=function(e,t,n,r){},t.stop=function(){},t.__debouncedOnEnd=function(e){var t=this.__onEnd;this.__onEnd=null,t&&t(e)},e}(),Animation_1=Animation;function SetPolyfill(){this._cache=[]}SetPolyfill.prototype.add=function(e){-1===this._cache.indexOf(e)&&this._cache.push(e)},SetPolyfill.prototype.forEach=function(e){this._cache.forEach(e)};var SetPolyfill_1=SetPolyfill,_inheritsLoose$3=require$$0.inheritsLoose,Set=commonjsGlobal.Set||SetPolyfill_1;function _flush(e){var t=new Set;!function e(n){"function"==typeof n.update?t.add(n):n.__getChildren().forEach(e)}(e),t.forEach(function(e){return e.update()})}var AnimatedValue=function(e){function t(t){var n;return(n=e.call(this)||this)._value=t,n._offset=0,n._animation=null,n._listeners={},n}_inheritsLoose$3(t,e);var n=t.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value+this._offset},n.setValue=function(e){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(e)},n.setOffset=function(e){this._offset=e},n.flattenOffset=function(){this._value+=this._offset,this._offset=0},n.addListener=function(e){var t=guid();return this._listeners[t]=e,t},n.removeListener=function(e){delete this._listeners[e]},n.removeAllListeners=function(){this._listeners={}},n.stopAnimation=function(e){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,e&&e(this.__getValue())},n.interpolate=function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))},n.animate=function(e,t){var n=this,r=null;e.__isInteraction&&(r=InteractionManager_1.current.createInteractionHandle());var i=this._animation;this._animation&&this._animation.stop(),this._animation=e,e.start(this._value,function(e){n._updateValue(e)},function(e){n._animation=null,null!==r&&InteractionManager_1.current.clearInteractionHandle(r),t&&t(e)},i)},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(e){this.stopTracking(),this._tracking=e},n._updateValue=function(e){for(var t in this._value=e,_flush(this),this._listeners)this._listeners[t]({value:this.__getValue()})},t}(AnimatedWithChildren_1),AnimatedValue_1=AnimatedValue,_extends$2=require$$0.extends,_inheritsLoose$4=require$$0.inheritsLoose,AnimatedTracking=function(e){function t(t,n,r,i,o){var a;return(a=e.call(this)||this)._value=t,a._parent=n,a._animationClass=r,a._animationConfig=i,a._callback=o,a.__attach(),a}_inheritsLoose$4(t,e);var n=t.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(_extends$2({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},t}(Animated_1),AnimatedTracking_1=AnimatedTracking,RequestAnimationFrame={current:function(e){return commonjsGlobal.requestAnimationFrame(e)},inject:function(e){RequestAnimationFrame.current=e}},RequestAnimationFrame_1=RequestAnimationFrame,CancelAnimationFrame={current:function(e){return commonjsGlobal.cancelAnimationFrame(e)},inject:function(e){CancelAnimationFrame.current=e}},CancelAnimationFrame_1=CancelAnimationFrame;function tensionFromOrigamiValue(e){return 3.62*(e-30)+194}function frictionFromOrigamiValue(e){return 3*(e-8)+25}function fromOrigamiTensionAndFriction(e,t){return{tension:tensionFromOrigamiValue(e),friction:frictionFromOrigamiValue(t)}}function fromBouncinessAndSpeed(e,t){function n(e,t,n){return(e-t)/(n-t)}function r(e,t,n){return t+e*(n-t)}var i=n(e/1.7,0,20);i=r(i,0,.8);var o,a,s,l,u=r(n(t/1.7,0,20),.5,200),c=(o=i,a=(s=u)<=18?(l=s,7e-4*Math.pow(l,3)-.031*Math.pow(l,2)+.64*l+1.28):s>18&&s<=44?function(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}(s):function(e){return 4.5e-7*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(s),function(e,t,n){return.01*e+(1-e)*a}(2*o-o*o));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed},_inheritsLoose$5=require$$0.inheritsLoose;function withDefault(e,t){return void 0===e||null===e?t:e}var SpringAnimation=function(e){function t(t){var n,r;return(n=e.call(this)||this)._overshootClamping=withDefault(t.overshootClamping,!1),n._restDisplacementThreshold=withDefault(t.restDisplacementThreshold,.001),n._restSpeedThreshold=withDefault(t.restSpeedThreshold,.001),n._initialVelocity=t.velocity,n._lastVelocity=withDefault(t.velocity,0),n._toValue=t.toValue,n.__isInteraction=void 0===t.isInteraction||t.isInteraction,void 0!==t.bounciness||void 0!==t.speed?(invariant_1(void 0===t.tension&&void 0===t.friction,"You can only define bounciness/speed or tension/friction but not both"),r=SpringConfig.fromBouncinessAndSpeed(withDefault(t.bounciness,8),withDefault(t.speed,12))):r=SpringConfig.fromOrigamiTensionAndFriction(withDefault(t.tension,40),withDefault(t.friction,7)),n._tension=r.tension,n._friction=r.friction,n}_inheritsLoose$5(t,e);var n=t.prototype;return n.start=function(e,n,r,i){if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=r,this._lastTime=Date.now(),i instanceof t){var o=i.getInternalState();this._lastPosition=o.lastPosition,this._lastVelocity=o.lastVelocity,this._lastTime=o.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.onUpdate=function(){var e=this._lastPosition,t=this._lastVelocity,n=this._lastPosition,r=this._lastVelocity,i=Date.now();i>this._lastTime+64&&(i=this._lastTime+64);for(var o=Math.floor((i-this._lastTime)/1),a=0;a<o;++a){var s=t,l=this._tension*(this._toValue-n)-this._friction*r,u=(n=e+.001*s/2,r=t+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*u/2;var f=r=t+.001*c/2,p=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2;var _=r=t+.001*p/2,h=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2,r=t+.001*p/2,e+=(s+2*(u+f)+_)/6*.001,t+=(l+2*(c+p)+h)/6*.001}if(this._lastTime=i,this._lastPosition=e,this._lastVelocity=t,this._onUpdate(e),this.__active){var d=!1;this._overshootClamping&&0!==this._tension&&(d=this._startPosition<this._toValue?e>this._toValue:e<this._toValue);var m=Math.abs(t)<=this._restSpeedThreshold,y=!0;if(0!==this._tension&&(y=Math.abs(this._toValue-e)<=this._restDisplacementThreshold),d||m&&y)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}},n.stop=function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})},t}(Animation_1),SpringAnimation_1=SpringAnimation,_inheritsLoose$6=require$$0.inheritsLoose,AnimatedTransform=function(e){function t(t){var n;return(n=e.call(this)||this)._transforms=t,n}_inheritsLoose$6(t,e);var n=t.prototype;return n.__getValue=function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getValue():r}return t})},n.__getAnimatedValue=function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getAnimatedValue():r}return t})},n.__attach=function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__addChild(e)}})},n.__detach=function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__removeChild(e)}})},t}(AnimatedWithChildren_1),AnimatedTransform_1=AnimatedTransform,FlattenStyle={current:function(e){return e},inject:function(e){FlattenStyle.current=e}},FlattenStyle_1=FlattenStyle,_extends$3=require$$0.extends,_inheritsLoose$7=require$$0.inheritsLoose,AnimatedStyle=function(e){function t(t){var n;return n=e.call(this)||this,!(t=FlattenStyle_1.current(t)||{}).transform||t.transform instanceof Animated_1||(t=_extends$3({},t,{transform:new AnimatedTransform_1(t.transform)})),n._style=t,n}_inheritsLoose$7(t,e);var n=t.prototype;return n.__getValue=function(){var e={};for(var t in this._style){var n=this._style[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e},n.__getAnimatedValue=function(){var e={};for(var t in this._style){var n=this._style[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e},n.__attach=function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__addChild(this)}},n.__detach=function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__removeChild(this)}},t}(AnimatedWithChildren_1),AnimatedStyle_1=AnimatedStyle,_extends$4=require$$0.extends,_inheritsLoose$8=require$$0.inheritsLoose,AnimatedProps=function(e){function t(t,n){var r;return r=e.call(this)||this,t.style&&(t=_extends$4({},t,{style:new AnimatedStyle_1(t.style)})),r._props=t,r._callback=n,r.__attach(),r}_inheritsLoose$8(t,e);var n=t.prototype;return n.__getValue=function(){var e={};for(var t in this._props){var n=this._props[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e},n.__getAnimatedValue=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e},n.__attach=function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__addChild(this)}},n.__detach=function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__removeChild(this)}},n.update=function(){this._callback()},t}(Animated_1),AnimatedProps_1=AnimatedProps,ApplyAnimatedValues={current:function(e,t){if(!e.setNativeProps)return!1;e.setNativeProps(t)},transformStyles:function(e){return e},inject:function(e,t){ApplyAnimatedValues.current=e,ApplyAnimatedValues.transformStyles=t}},ApplyAnimatedValues_1=ApplyAnimatedValues,_extends$5=require$$0.extends,_objectWithoutProperties$1$1=require$$0.objectWithoutProperties,_inheritsLoose$9=require$$0.inheritsLoose;function createAnimatedComponent(e){var t=function(t){function n(){return t.apply(this,arguments)||this}_inheritsLoose$9(n,t);var r=n.prototype;return r.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},r.setNativeProps=function(e){this.refName&&ApplyAnimatedValues_1.current(this.refName,e,this)||this.forceUpdate()},r.componentWillMount=function(){this.attachProps(this.props)},r.attachProps=function(e){var t=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps_1(e,function(){t.refName&&ApplyAnimatedValues_1.current(t.refName,t._propsAnimated.__getAnimatedValue(),t)||t.forceUpdate()}),n&&n.__detach()},r.componentWillReceiveProps=function(e){this.attachProps(e)},r.render=function(){var t=this,n=this._propsAnimated.__getValue(),r=n.style,i=_objectWithoutProperties$1$1(n,["style"]);return React.createElement(e,_extends$5({},i,{style:ApplyAnimatedValues_1.transformStyles(r),ref:function(e){return t.refName=e}}))},n}(React.Component);return"production"!==process.env.NODE_ENV&&(t.propTypes={style:function(t,n,r){e.propTypes}}),t}var createAnimatedComponent_1=createAnimatedComponent,spring=function(e,t){return{start:function(n){var r=e,i=t;r.stopTracking(),t.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,t.toValue,SpringAnimation_1,i,n)):r.animate(new SpringAnimation_1(i),n)},stop:function(){e.stopAnimation()}}},src={Value:AnimatedValue_1,spring:spring,createAnimatedComponent:createAnimatedComponent_1,inject:{ApplyAnimatedValues:ApplyAnimatedValues_1.inject,InteractionManager:InteractionManager_1.inject,FlattenStyle:FlattenStyle_1.inject,RequestAnimationFrame:RequestAnimationFrame_1.inject,CancelAnimationFrame:CancelAnimationFrame_1.inject},__PropsOnlyForTests:AnimatedProps_1};function createInterpolator(e){var t,n,r;return n=t=function(t){function n(e){var n;n=t.call(this)||this,r.call(_assertThisInitialized(n));var i=e.children,o=e.to,a=e.from;return n.animation=new src.Value(0),n.component=src.createAnimatedComponent(i),n.animations=Object.entries(o).map(function(e){var t=e[0],r=e[1];return{name:t,interpolate:n.animation.interpolate({inputRange:[0,1],outputRange:[void 0!==a[t]?a[t]:r,r]})}}),n.to=n.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{}),n}_inheritsLoose(n,t);var i=n.prototype;return i.componentWillReceiveProps=function(e){this.update(e)},i.componentDidMount=function(){e(this.animation,_extends({toValue:1},this.props.config)).start()},i.render=function(){var e=this.props,t=(e.children,e.to,e.config,_objectWithoutProperties(e,["children","to","config"]));return React.createElement(this.component,_extends({},this.to,t))},n}(React.PureComponent),t.propTypes={to:PropTypes.object,from:PropTypes.object,config:PropTypes.object},t.defaultProps={to:{},from:{}},r=function(){var t=this;this.update=function(n){var r=t.animation._value;t.animation.stopAnimation(),t.animation.setValue(0);var i=n.to,o=(n.from,n.config),a=t.animations,s=Array.isArray(a),l=0;for(a=s?a:a[Symbol.iterator]();;){var u;if(s){if(l>=a.length)break;u=a[l++]}else{if((l=a.next()).done)break;u=l.value}var c=u;i[c.name]!==c.to&&(c.interpolate=t.animation.interpolate({inputRange:[0,1],outputRange:[c.interpolate._interpolation(r),i[c.name]]}))}t.to=t.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{}),e(t.animation,_extends({toValue:1},o)).start()}},n}var Spring=createInterpolator(src.spring);export{createInterpolator,Spring};
import React from"react";import PropTypes from"prop-types";function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function _objectWithoutProperties(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function unwrapExports(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function createCommonjsModule(t,e){return t(e={exports:{}},e.exports),e.exports}var animated=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(React),i=process.env.NODE_ENV,r=function(t,e,n,r,a,o,s,u){if("production"!==i&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,o,s,u],h=0;(l=new Error(e.replace(/%s/g,function(){return c[h++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},a=function(){function t(){}var e=t.prototype;return e.__attach=function(){},e.__detach=function(){},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(t){},e.__removeChild=function(t){},e.__getChildren=function(){return[]},t}(),o="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{};function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var u=Object.freeze({classCallCheck:function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},get extends(){return s},inheritsLoose:function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e},objectWithoutProperties:function(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r},possibleConstructorReturn:function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}}),l=u.inheritsLoose,c=function(t){function e(){var e;return(e=t.call(this)||this)._children=[],e}l(e,t);var n=e.prototype;return n.__addChild=function(t){0===this._children.length&&this.__attach(),this._children.push(t)},n.__removeChild=function(t){var e=this._children.indexOf(t);-1!==e?(this._children.splice(e,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},e}(a),h={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(t){h.current=t}},f=h;function p(t){var e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=y.hex6.exec(t))?parseInt(e[1]+"ff",16)>>>0:k.hasOwnProperty(t)?k[t]:(e=y.rgb.exec(t))?(b(e[1])<<24|b(e[2])<<16|b(e[3])<<8|255)>>>0:(e=y.rgba.exec(t))?(b(e[1])<<24|b(e[2])<<16|b(e[3])<<8|V(e[4]))>>>0:(e=y.hex3.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=y.hex8.exec(t))?parseInt(e[1],16)>>>0:(e=y.hex4.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=y.hsl.exec(t))?(255|d(w(e[1]),x(e[2]),x(e[3])))>>>0:(e=y.hsla.exec(t))?(d(w(e[1]),x(e[2]),x(e[3]))|V(e[4]))>>>0:null}function _(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function d(t,e,n){var i=n<.5?n*(1+e):n+e-n*e,r=2*n-i,a=_(r,i,t+1/3),o=_(r,i,t),s=_(r,i,t-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*s)<<8}var m="[-+]?\\d*\\.?\\d+",v=m+"%";function g(){return"\\(\\s*("+(t=arguments,Array.prototype.slice.call(t,0)).join(")\\s*,\\s*(")+")\\s*\\)";var t}var y={rgb:new RegExp("rgb"+g(m,m,m)),rgba:new RegExp("rgba"+g(m,m,m,m)),hsl:new RegExp("hsl"+g(m,v,v)),hsla:new RegExp("hsla"+g(m,v,v,m)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function b(t){var e=parseInt(t,10);return e<0?0:e>255?255:e}function w(t){return(parseFloat(t)%360+360)%360/360}function V(t){var e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function x(t){var e=parseFloat(t,10);return e<0?0:e>100?1:e/100}var k={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};p.rgba=function(t){return{r:Math.round((4278190080&t)>>>24),g:Math.round((16711680&t)>>>16),b:Math.round((65280&t)>>>8),a:((255&t)>>>0)/255}};var A=p,j=u.extends,O=function(t){return t},P=function(){function t(){}return t.create=function(t){if(t.outputRange&&"string"==typeof t.outputRange[0])return function(t){var e=t.outputRange;r(e.length>=2,"Bad output range"),function(t){for(var e=t[0].replace(T,""),n=1;n<t.length;++n)r(e===t[n].replace(T,""),"invalid pattern "+t[0]+" and "+t[n])}(e=e.map(C));var n=e[0].match(T).map(function(){return[]});e.forEach(function(t){t.match(T).forEach(function(t,e){n[e].push(+t)})});var i=e[0].match(T).map(function(e,i){return P.create(j({},t,{outputRange:n[i]}))}),a=/^rgb/.test(e[0]);return function(t){var n=0;return e[0].replace(T,function(){var e=i[n++](t);return String(a&&n<4?Math.round(e):e)})}}(t);var e=t.outputRange;E("outputRange",e);var n=t.inputRange;E("inputRange",n),function(t){r(t.length>=2,"inputRange must have at least 2 elements");for(var e=1;e<t.length;++e)r(t[e]>=t[e-1],"inputRange must be monotonically increasing "+t)}(n),r(n.length===e.length,"inputRange ("+n.length+") and outputRange ("+e.length+") must have the same length");var i=t.easing||O,a="extend";void 0!==t.extrapolateLeft?a=t.extrapolateLeft:void 0!==t.extrapolate&&(a=t.extrapolate);var o="extend";return void 0!==t.extrapolateRight?o=t.extrapolateRight:void 0!==t.extrapolate&&(o=t.extrapolate),function(t){r("number"==typeof t,"Cannot interpolation an input which is not a number");var s=function(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}(t,n);return function(t,e,n,i,r,a,o,s){var u=t;if(u<e){if("identity"===o)return u;"clamp"===o&&(u=e)}if(u>n){if("identity"===s)return u;"clamp"===s&&(u=n)}return i===r?i:e===n?t<=e?i:r:(e===-1/0?u=-u:n===1/0?u-=e:u=(u-e)/(n-e),u=a(u),i===-1/0?u=-u:r===1/0?u+=i:u=u*(r-i)+i,u)}(t,n[s],n[s+1],e[s],e[s+1],i,a,o)}},t}();function C(t){var e=A(t);return null===e?t:"rgba("+((4278190080&(e=e||0))>>>24)+", "+((16711680&e)>>>16)+", "+((65280&e)>>>8)+", "+(255&e)/255+")"}var T=/[0-9\.-]+/g;function E(t,e){r(e.length>=2,t+" must have at least 2 elements"),r(2!==e.length||e[0]!==-1/0||e[1]!==1/0,t+"cannot be ]-infinity;+infinity[ "+e)}var R=P,F=0,L=function(){return String(F++)},M=u.inheritsLoose,I=function(t){function e(e,n){var i;return(i=t.call(this)||this)._parent=e,i._interpolation=n,i._listeners={},i}M(e,t);var n=e.prototype;return n.__getValue=function(){var t=this._parent.__getValue();return r("number"==typeof t,"Cannot interpolate an input which is not a number."),this._interpolation(t)},n.addListener=function(t){var e=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var t in e._listeners)e._listeners[t]({value:e.__getValue()})}));var n=L();return this._listeners[n]=t,n},n.removeListener=function(t){delete this._listeners[t]},n.interpolate=function(t){return new e(this,R.create(t))},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)},e}(c),S=function(){function t(){}var e=t.prototype;return e.start=function(t,e,n,i){},e.stop=function(){},e.__debouncedOnEnd=function(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)},t}();function q(){this._cache=[]}q.prototype.add=function(t){-1===this._cache.indexOf(t)&&this._cache.push(t)},q.prototype.forEach=function(t){this._cache.forEach(t)};var N=q,U=u.inheritsLoose,D=o.Set||N;var W=function(t){function e(e){var n;return(n=t.call(this)||this)._value=e,n._offset=0,n._animation=null,n._listeners={},n}U(e,t);var n=e.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value+this._offset},n.setValue=function(t){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(t)},n.setOffset=function(t){this._offset=t},n.flattenOffset=function(){this._value+=this._offset,this._offset=0},n.addListener=function(t){var e=L();return this._listeners[e]=t,e},n.removeListener=function(t){delete this._listeners[t]},n.removeAllListeners=function(){this._listeners={}},n.stopAnimation=function(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&t(this.__getValue())},n.interpolate=function(t){return new I(this,R.create(t))},n.animate=function(t,e){var n=this,i=null;t.__isInteraction&&(i=f.current.createInteractionHandle());var r=this._animation;this._animation&&this._animation.stop(),this._animation=t,t.start(this._value,function(t){n._updateValue(t)},function(t){n._animation=null,null!==i&&f.current.clearInteractionHandle(i),e&&e(t)},r)},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(t){this.stopTracking(),this._tracking=t},n._updateValue=function(t){for(var e in this._value=t,function(t){var e=new D;!function t(n){"function"==typeof n.update?e.add(n):n.__getChildren().forEach(t)}(t),e.forEach(function(t){return t.update()})}(this),this._listeners)this._listeners[e]({value:this.__getValue()})},e}(c),z=u.extends,H=u.inheritsLoose,$=function(t){function e(e,n,i,r,a){var o;return(o=t.call(this)||this)._value=e,o._parent=n,o._animationClass=i,o._animationConfig=r,o._callback=a,o.__attach(),o}H(e,t);var n=e.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(z({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},e}(a),B={current:function(t){return o.requestAnimationFrame(t)},inject:function(t){B.current=t}},G=B,Y={current:function(t){return o.cancelAnimationFrame(t)},inject:function(t){Y.current=t}},J=Y;function K(t){return 3.62*(t-30)+194}function Q(t){return 3*(t-8)+25}var X={fromOrigamiTensionAndFriction:function(t,e){return{tension:K(t),friction:Q(e)}},fromBouncinessAndSpeed:function(t,e){function n(t,e,n){return(t-e)/(n-e)}function i(t,e,n){return e+t*(n-e)}var r=n(t/1.7,0,20);r=i(r,0,.8);var a,o,s,u,l=i(n(e/1.7,0,20),.5,200),c=(a=r,o=(s=l)<=18?(u=s,7e-4*Math.pow(u,3)-.031*Math.pow(u,2)+.64*u+1.28):s>18&&s<=44?function(t){return 44e-6*Math.pow(t,3)-.006*Math.pow(t,2)+.36*t+2}(s):function(t){return 4.5e-7*Math.pow(t,3)-332e-6*Math.pow(t,2)+.1078*t+5.84}(s),function(t,e,n){return.01*t+(1-t)*o}(2*a-a*a));return{tension:K(l),friction:Q(c)}}},Z=u.inheritsLoose;function tt(t,e){return void 0===t||null===t?e:t}var et=function(t){function e(e){var n,i;return(n=t.call(this)||this)._overshootClamping=tt(e.overshootClamping,!1),n._restDisplacementThreshold=tt(e.restDisplacementThreshold,.001),n._restSpeedThreshold=tt(e.restSpeedThreshold,.001),n._initialVelocity=e.velocity,n._lastVelocity=tt(e.velocity,0),n._toValue=e.toValue,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,void 0!==e.bounciness||void 0!==e.speed?(r(void 0===e.tension&&void 0===e.friction,"You can only define bounciness/speed or tension/friction but not both"),i=X.fromBouncinessAndSpeed(tt(e.bounciness,8),tt(e.speed,12))):i=X.fromOrigamiTensionAndFriction(tt(e.tension,40),tt(e.friction,7)),n._tension=i.tension,n._friction=i.friction,n}Z(e,t);var n=e.prototype;return n.start=function(t,n,i,r){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=i,this._lastTime=Date.now(),r instanceof e){var a=r.getInternalState();this._lastPosition=a.lastPosition,this._lastVelocity=a.lastVelocity,this._lastTime=a.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.onUpdate=function(){var t=this._lastPosition,e=this._lastVelocity,n=this._lastPosition,i=this._lastVelocity,r=Date.now();r>this._lastTime+64&&(r=this._lastTime+64);for(var a=Math.floor((r-this._lastTime)/1),o=0;o<a;++o){var s=e,u=this._tension*(this._toValue-n)-this._friction*i,l=(n=t+.001*s/2,i=e+.001*u/2),c=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*l/2;var h=i=e+.001*c/2,f=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*h/2;var p=i=e+.001*f/2,_=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*h/2,i=e+.001*f/2,t+=(s+2*(l+h)+p)/6*.001,e+=(u+2*(c+f)+_)/6*.001}if(this._lastTime=r,this._lastPosition=t,this._lastVelocity=e,this._onUpdate(t),this.__active){var d=!1;this._overshootClamping&&0!==this._tension&&(d=this._startPosition<this._toValue?t>this._toValue:t<this._toValue);var m=Math.abs(e)<=this._restSpeedThreshold,v=!0;if(0!==this._tension&&(v=Math.abs(this._toValue-t)<=this._restDisplacementThreshold),d||m&&v)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=G.current(this.onUpdate.bind(this))}},n.stop=function(){this.__active=!1,J.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})},e}(S),nt=u.inheritsLoose,it=function(t){function e(e){var n;return(n=t.call(this)||this)._transforms=e,n}nt(e,t);var n=e.prototype;return n.__getValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof a?i.__getValue():i}return e})},n.__getAnimatedValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof a?i.__getAnimatedValue():i}return e})},n.__attach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof a&&i.__addChild(t)}})},n.__detach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof a&&i.__removeChild(t)}})},e}(c),rt={current:function(t){return t},inject:function(t){rt.current=t}},at=rt,ot=u.extends,st=u.inheritsLoose,ut=function(t){function e(e){var n;return n=t.call(this)||this,!(e=at.current(e)||{}).transform||e.transform instanceof a||(e=ot({},e,{transform:new it(e.transform)})),n._style=e,n}st(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._style){var n=this._style[e];t[e]=n instanceof a?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._style){var n=this._style[e];n instanceof a&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._style){var e=this._style[t];e instanceof a&&e.__addChild(this)}},n.__detach=function(){for(var t in this._style){var e=this._style[t];e instanceof a&&e.__removeChild(this)}},e}(c),lt=u.extends,ct=u.inheritsLoose,ht=function(t){function e(e,n){var i;return i=t.call(this)||this,e.style&&(e=lt({},e,{style:new ut(e.style)})),i._props=e,i._callback=n,i.__attach(),i}ct(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._props){var n=this._props[e];t[e]=n instanceof a?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._props){var n=this._props[e];n instanceof a&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._props){var e=this._props[t];e instanceof a&&e.__addChild(this)}},n.__detach=function(){for(var t in this._props){var e=this._props[t];e instanceof a&&e.__removeChild(this)}},n.update=function(){this._callback()},e}(a),ft={current:function(t,e){if(!t.setNativeProps)return!1;t.setNativeProps(e)},transformStyles:function(t){return t},inject:function(t,e){ft.current=t,ft.transformStyles=e}},pt=ft,_t=u.extends,dt=u.objectWithoutProperties,mt=u.inheritsLoose;var vt={Value:W,spring:function(t,e){return{start:function(n){var i=t,r=e;i.stopTracking(),e.toValue instanceof a?i.track(new $(i,e.toValue,et,r,n)):i.animate(new et(r),n)},stop:function(){t.stopAnimation()}}},createAnimatedComponent:function(t){var e=function(e){function i(){return e.apply(this,arguments)||this}mt(i,e);var r=i.prototype;return r.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},r.setNativeProps=function(t){this.refName&&pt.current(this.refName,t,this)||this.forceUpdate()},r.componentWillMount=function(){this.attachProps(this.props)},r.attachProps=function(t){var e=this,n=this._propsAnimated;this._propsAnimated=new ht(t,function(){e.refName&&pt.current(e.refName,e._propsAnimated.__getAnimatedValue(),e)||e.forceUpdate()}),n&&n.__detach()},r.componentWillReceiveProps=function(t){this.attachProps(t)},r.render=function(){var e=this,i=this._propsAnimated.__getValue(),r=i.style,a=dt(i,["style"]);return n.createElement(t,_t({},a,{style:pt.transformStyles(r),ref:function(t){return e.refName=t}}))},i}(n.Component);return"production"!==process.env.NODE_ENV&&(e.propTypes={style:function(e,n,i){t.propTypes}}),e},inject:{ApplyAnimatedValues:pt.inject,InteractionManager:f.inject,FlattenStyle:at.inject,RequestAnimationFrame:G.inject,CancelAnimationFrame:J.inject},__PropsOnlyForTests:ht},gt=vt.Value,yt=vt.spring,bt=vt.createAnimatedComponent,wt=vt.inject,Vt=vt.__PropsOnlyForTests;e.default=vt,e.Value=gt,e.spring=yt,e.createAnimatedComponent=bt,e.inject=wt,e.__PropsOnlyForTests=Vt}),Animated=unwrapExports(animated),animated_1=animated.Value,animated_2=animated.spring,animated_3=animated.createAnimatedComponent,animated_4=animated.inject,animated_5=animated.__PropsOnlyForTests;function createInterpolator(t){var e,n,i;return n=e=function(e){function n(t){var n;n=e.call(this)||this,i.call(_assertThisInitialized(n));var r=t.children,a=t.to,o=t.from;return n.animation=new Animated.Value(0),n.component=Animated.createAnimatedComponent(r),n.animations=Object.entries(a).map(function(t){var e=t[0],i=t[1];return{name:e,interpolate:n.animation.interpolate({inputRange:[0,1],outputRange:[void 0!==o[e]?o[e]:i,i]})}}),n.to=n.animations.reduce(function(t,e){var n;return _extends({},t,((n={})[e.name]=e.interpolate,n))},{}),n}_inheritsLoose(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){this.update(t)},r.componentDidMount=function(){t(this.animation,_extends({toValue:1},this.props.config)).start()},r.render=function(){var t=this.props,e=(t.children,t.to,t.config,_objectWithoutProperties(t,["children","to","config"]));return React.createElement(this.component,_extends({},this.to,e))},n}(React.PureComponent),e.propTypes={to:PropTypes.object,from:PropTypes.object,config:PropTypes.object},e.defaultProps={to:{},from:{}},i=function(){var e=this;this.update=function(n){var i=e.animation._value;e.animation.stopAnimation(),e.animation.setValue(0);var r=n.to,a=(n.from,n.config),o=e.animations,s=Array.isArray(o),u=0;for(o=s?o:o[Symbol.iterator]();;){var l;if(s){if(u>=o.length)break;l=o[u++]}else{if((u=o.next()).done)break;l=u.value}var c=l;r[c.name]!==c.to&&(c.interpolate=e.animation.interpolate({inputRange:[0,1],outputRange:[c.interpolate._interpolation(i),r[c.name]]}))}e.to=e.animations.reduce(function(t,e){var n;return _extends({},t,((n={})[e.name]=e.interpolate,n))},{}),t(e.animation,_extends({toValue:1},a)).start()}},n}var Spring=createInterpolator(Animated.spring);export{createInterpolator,Spring};

@@ -1,1 +0,1 @@

"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var React=_interopDefault(require("react")),PropTypes=_interopDefault(require("prop-types"));function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var REACT_ELEMENT_TYPE$1,NODE_ENV=process.env.NODE_ENV,invariant=function(e,t,n,r,i,o,a,s){if("production"!==NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,o,a,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,Animated=function(){function e(){}var t=e.prototype;return t.__attach=function(){},t.__detach=function(){},t.__getValue=function(){},t.__getAnimatedValue=function(){return this.__getValue()},t.__addChild=function(e){},t.__removeChild=function(e){},t.__getChildren=function(){return[]},e}(),Animated_1=Animated,commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _typeof$1(e){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _jsx$1(e,t,n,r){REACT_ELEMENT_TYPE$1||(REACT_ELEMENT_TYPE$1="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,o=arguments.length-3;if(t||0===o||(t={children:void 0}),t&&i)for(var a in i)void 0===t[a]&&(t[a]=i[a]);else t||(t=i||{});if(1===o)t.children=r;else if(o>1){for(var s=new Array(o),l=0;l<o;l++)s[l]=arguments[l+3];t.children=s}return{$$typeof:REACT_ELEMENT_TYPE$1,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _asyncIterator$1(e){if("function"==typeof Symbol){if(Symbol.asyncIterator){var t=e[Symbol.asyncIterator];if(null!=t)return t.call(e)}if(Symbol.iterator)return e[Symbol.iterator]()}throw new TypeError("Object is not async iterable")}function _AwaitValue$1(e){this.wrapped=e}function _AsyncGenerator$1(e){var t,n;function r(t,n){try{var o=e[t](n),a=o.value,s=a instanceof _AwaitValue$1;Promise.resolve(s?a.wrapped:a).then(function(e){s?r("next",e):i(o.done?"return":"normal",e)},function(e){r("throw",e)})}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},"function"!=typeof e.return&&(this.return=void 0)}function _wrapAsyncGenerator$1(e){return function(){return new _AsyncGenerator$1(e.apply(this,arguments))}}function _awaitAsyncGenerator$1(e){return new _AwaitValue$1(e)}function _asyncGeneratorDelegate$1(e,t){var n={},r=!1;function i(n,i){return r=!0,i=new Promise(function(t){t(e[n](i))}),{done:!1,value:t(i)}}return"function"==typeof Symbol&&Symbol.iterator&&(n[Symbol.iterator]=function(){return this}),n.next=function(e){return r?(r=!1,e):i("next",e)},"function"==typeof e.throw&&(n.throw=function(e){if(r)throw r=!1,e;return i("throw",e)}),"function"==typeof e.return&&(n.return=function(e){return i("return",e)}),n}function _asyncToGenerator$1(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e,t){try{var n=o[e](t),a=n.value}catch(e){return void i(e)}n.done?r(a):Promise.resolve(a).then(s,l)}function s(e){a("next",e)}function l(e){a("throw",e)}s()})}}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass$1(e,t,n){return t&&_defineProperties$1(e.prototype,t),n&&_defineProperties$1(e,n),e}function _defineEnumerableProperties$1(e,t){for(var n in t)(o=t[n]).configurable=o.enumerable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n,o);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),i=0;i<r.length;i++){var o,a=r[i];(o=t[a]).configurable=o.enumerable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,a,o)}return e}function _defaults$1(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],o=Object.getOwnPropertyDescriptor(t,i);o&&o.configurable&&void 0===e[i]&&Object.defineProperty(e,i,o)}return e}function _defineProperty$1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _extends$1(){return(_extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _get$1(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:_get$1(i,t,n)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(n):void 0}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _inheritsLoose$1(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}"function"==typeof Symbol&&Symbol.asyncIterator&&(_AsyncGenerator$1.prototype[Symbol.asyncIterator]=function(){return this}),_AsyncGenerator$1.prototype.next=function(e){return this._invoke("next",e)},_AsyncGenerator$1.prototype.throw=function(e){return this._invoke("throw",e)},_AsyncGenerator$1.prototype.return=function(e){return this._invoke("return",e)};var _gPO$1=Object.getPrototypeOf||function(e){return e.__proto__},_sPO$1=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_construct$1="object"==typeof Reflect&&Reflect.construct||function(e,t,n){var r,i=[null];return i.push.apply(i,t),r=e.bind.apply(e,i),_sPO$1(new r,n.prototype)},_cache$1="function"==typeof Map&&new Map;function _wrapNativeSuper$1(e){if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==_cache$1){if(_cache$1.has(e))return _cache$1.get(e);_cache$1.set(e,t)}function t(){}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writeable:!0,configurable:!0}}),_sPO$1(t,_sPO$1(function(){return _construct$1(e,arguments,_gPO$1(this).constructor)},e))}function _instanceof$1(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function _interopRequireDefault$1(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard$1(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function _newArrowCheck$1(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}function _objectDestructuringEmpty$1(e){if(null==e)throw new TypeError("Cannot destructure undefined")}function _objectWithoutProperties$1(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn$1(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _set$1(e,t,n,r){var i=Object.getOwnPropertyDescriptor(e,t);if(void 0===i){var o=Object.getPrototypeOf(e);null!==o&&_set$1(o,t,n,r)}else if("value"in i&&i.writable)i.value=n;else{var a=i.set;void 0!==a&&a.call(r,n)}return n}function _sliceIterator$1(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}function _slicedToArray$1(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return _sliceIterator$1(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _slicedToArrayLoose$1(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){for(var n,r=[],i=e[Symbol.iterator]();!(n=i.next()).done&&(r.push(n.value),!t||r.length!==t););return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _taggedTemplateLiteral$1(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _taggedTemplateLiteralLoose$1(e,t){return e.raw=t,e}function _temporalRef$1(e,t){if(e===_temporalUndefined$1)throw new ReferenceError(t+" is not defined - temporal dead zone");return e}function _readOnlyError$1(e){throw new Error('"'+e+'" is read-only')}function _classNameTDZError$1(e){throw new Error('Class "'+e+'" cannot be referenced in computed property keys.')}var _temporalUndefined$1={};function _toArray$1(e){return Array.isArray(e)?e:Array.from(e)}function _toConsumableArray$1(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function _skipFirstGeneratorNext$1(e){return function(){var t=e.apply(this,arguments);return t.next(),t}}function _toPropertyKey$1(e){return"symbol"==typeof e?e:String(e)}function _initializerWarningHelper$1(e,t){throw new Error("Decorating class property failed. Please ensure that proposal-class-properties is enabled and set to use loose mode. To use proposal-class-properties in spec mode with decorators, wait for the next major version of decorators in stage 2.")}function _initializerDefineProperty$1(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function _applyDecoratedDescriptor$1(e,t,n,r,i){var o={};return Object.keys(r).forEach(function(e){o[e]=r[e]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},o),i&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(i):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(e,t,o),o=null),o}var rollupPluginBabelHelpers=Object.freeze({get typeof(){return _typeof$1},jsx:_jsx$1,asyncIterator:_asyncIterator$1,AwaitValue:_AwaitValue$1,AsyncGenerator:_AsyncGenerator$1,wrapAsyncGenerator:_wrapAsyncGenerator$1,awaitAsyncGenerator:_awaitAsyncGenerator$1,asyncGeneratorDelegate:_asyncGeneratorDelegate$1,asyncToGenerator:_asyncToGenerator$1,classCallCheck:_classCallCheck$1,createClass:_createClass$1,defineEnumerableProperties:_defineEnumerableProperties$1,defaults:_defaults$1,defineProperty:_defineProperty$1,get extends(){return _extends$1},get:_get$1,inherits:_inherits$1,inheritsLoose:_inheritsLoose$1,wrapNativeSuper:_wrapNativeSuper$1,instanceof:_instanceof$1,interopRequireDefault:_interopRequireDefault$1,interopRequireWildcard:_interopRequireWildcard$1,newArrowCheck:_newArrowCheck$1,objectDestructuringEmpty:_objectDestructuringEmpty$1,objectWithoutProperties:_objectWithoutProperties$1,assertThisInitialized:_assertThisInitialized$1,possibleConstructorReturn:_possibleConstructorReturn$1,set:_set$1,slicedToArray:_slicedToArray$1,slicedToArrayLoose:_slicedToArrayLoose$1,taggedTemplateLiteral:_taggedTemplateLiteral$1,taggedTemplateLiteralLoose:_taggedTemplateLiteralLoose$1,temporalRef:_temporalRef$1,readOnlyError:_readOnlyError$1,classNameTDZError:_classNameTDZError$1,temporalUndefined:_temporalUndefined$1,toArray:_toArray$1,toConsumableArray:_toConsumableArray$1,skipFirstGeneratorNext:_skipFirstGeneratorNext$1,toPropertyKey:_toPropertyKey$1,initializerWarningHelper:_initializerWarningHelper$1,initializerDefineProperty:_initializerDefineProperty$1,applyDecoratedDescriptor:_applyDecoratedDescriptor$1}),require$$0=rollupPluginBabelHelpers,_inheritsLoose$1$1=require$$0.inheritsLoose,AnimatedWithChildren=function(e){function t(){var t;return(t=e.call(this)||this)._children=[],t}_inheritsLoose$1$1(t,e);var n=t.prototype;return n.__addChild=function(e){0===this._children.length&&this.__attach(),this._children.push(e)},n.__removeChild=function(e){var t=this._children.indexOf(e);-1!==t?(this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},t}(Animated_1),AnimatedWithChildren_1=AnimatedWithChildren,InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(e){InteractionManager.current=e}},InteractionManager_1=InteractionManager;function normalizeColor(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=matchers.hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:names.hasOwnProperty(e)?names[e]:(t=matchers.rgb.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|255)>>>0:(t=matchers.rgba.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|parse1(t[4]))>>>0:(t=matchers.hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=matchers.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=matchers.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=matchers.hsl.exec(e))?(255|hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3])))>>>0:(t=matchers.hsla.exec(e))?(hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3]))|parse1(t[4]))>>>0:null}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=hue2rgb(i,r,e+1/3),a=hue2rgb(i,r,e),s=hue2rgb(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}var NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function toArray(e){return Array.prototype.slice.call(e,0)}function call(){return"\\(\\s*("+toArray(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var matchers={rgb:new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),rgba:new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl:new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla:new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function parse255(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function parse360(e){return(parseFloat(e)%360+360)%360/360}function parse1(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function parsePercentage(e){var t=parseFloat(e,10);return t<0?0:t>100?1:t/100}var names={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function rgba(e){return{r:Math.round((4278190080&e)>>>24),g:Math.round((16711680&e)>>>16),b:Math.round((65280&e)>>>8),a:((255&e)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,_extends$1$1=require$$0.extends,linear=function(e){return e},Interpolation=function(){function e(){}return e.create=function(e){if(e.outputRange&&"string"==typeof e.outputRange[0])return createInterpolationFromStringOutputRange(e);var t=e.outputRange;checkInfiniteRange("outputRange",t);var n=e.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===t.length,"inputRange ("+n.length+") and outputRange ("+t.length+") must have the same length");var r=e.easing||linear,i="extend";void 0!==e.extrapolateLeft?i=e.extrapolateLeft:void 0!==e.extrapolate&&(i=e.extrapolate);var o="extend";return void 0!==e.extrapolateRight?o=e.extrapolateRight:void 0!==e.extrapolate&&(o=e.extrapolate),function(e){invariant_1("number"==typeof e,"Cannot interpolation an input which is not a number");var a=findRange(e,n);return interpolate(e,n[a],n[a+1],t[a],t[a+1],r,i,o)}},e}();function interpolate(e,t,n,r,i,o,a,s){var l=e;if(l<t){if("identity"===a)return l;"clamp"===a&&(l=t)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=o(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function colorToRgba(e){var t=normalizeCssColor(e);return null===t?e:"rgba("+((4278190080&(t=t||0))>>>24)+", "+((16711680&t)>>>16)+", "+((65280&t)>>>8)+", "+(255&t)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(e){var t=e.outputRange;invariant_1(t.length>=2,"Bad output range"),checkPattern(t=t.map(colorToRgba));var n=t[0].match(stringShapeRegex).map(function(){return[]});t.forEach(function(e){e.match(stringShapeRegex).forEach(function(e,t){n[t].push(+e)})});var r=t[0].match(stringShapeRegex).map(function(t,r){return Interpolation.create(_extends$1$1({},e,{outputRange:n[r]}))}),i=/^rgb/.test(t[0]);return function(e){var n=0;return t[0].replace(stringShapeRegex,function(){var t=r[n++](e);return String(i&&n<4?Math.round(t):t)})}}function checkPattern(e){for(var t=e[0].replace(stringShapeRegex,""),n=1;n<e.length;++n)invariant_1(t===e[n].replace(stringShapeRegex,""),"invalid pattern "+e[0]+" and "+e[n])}function findRange(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}function checkValidInputRange(e){invariant_1(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t<e.length;++t)invariant_1(e[t]>=e[t-1],"inputRange must be monotonically increasing "+e)}function checkInfiniteRange(e,t){invariant_1(t.length>=2,e+" must have at least 2 elements"),invariant_1(2!==t.length||t[0]!==-1/0||t[1]!==1/0,e+"cannot be ]-infinity;+infinity[ "+t)}var Interpolation_1=Interpolation,_uniqueId=0,guid=function(){return String(_uniqueId++)},_inheritsLoose$2=require$$0.inheritsLoose,AnimatedInterpolation=function(e){function t(t,n){var r;return(r=e.call(this)||this)._parent=t,r._interpolation=n,r._listeners={},r}_inheritsLoose$2(t,e);var n=t.prototype;return n.__getValue=function(){var e=this._parent.__getValue();return invariant_1("number"==typeof e,"Cannot interpolate an input which is not a number."),this._interpolation(e)},n.addListener=function(e){var t=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n},n.removeListener=function(e){delete this._listeners[e]},n.interpolate=function(e){return new t(this,Interpolation_1.create(e))},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)},t}(AnimatedWithChildren_1),AnimatedInterpolation_1=AnimatedInterpolation,Animation=function(){function e(){}var t=e.prototype;return t.start=function(e,t,n,r){},t.stop=function(){},t.__debouncedOnEnd=function(e){var t=this.__onEnd;this.__onEnd=null,t&&t(e)},e}(),Animation_1=Animation;function SetPolyfill(){this._cache=[]}SetPolyfill.prototype.add=function(e){-1===this._cache.indexOf(e)&&this._cache.push(e)},SetPolyfill.prototype.forEach=function(e){this._cache.forEach(e)};var SetPolyfill_1=SetPolyfill,_inheritsLoose$3=require$$0.inheritsLoose,Set=commonjsGlobal.Set||SetPolyfill_1;function _flush(e){var t=new Set;!function e(n){"function"==typeof n.update?t.add(n):n.__getChildren().forEach(e)}(e),t.forEach(function(e){return e.update()})}var AnimatedValue=function(e){function t(t){var n;return(n=e.call(this)||this)._value=t,n._offset=0,n._animation=null,n._listeners={},n}_inheritsLoose$3(t,e);var n=t.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value+this._offset},n.setValue=function(e){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(e)},n.setOffset=function(e){this._offset=e},n.flattenOffset=function(){this._value+=this._offset,this._offset=0},n.addListener=function(e){var t=guid();return this._listeners[t]=e,t},n.removeListener=function(e){delete this._listeners[e]},n.removeAllListeners=function(){this._listeners={}},n.stopAnimation=function(e){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,e&&e(this.__getValue())},n.interpolate=function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))},n.animate=function(e,t){var n=this,r=null;e.__isInteraction&&(r=InteractionManager_1.current.createInteractionHandle());var i=this._animation;this._animation&&this._animation.stop(),this._animation=e,e.start(this._value,function(e){n._updateValue(e)},function(e){n._animation=null,null!==r&&InteractionManager_1.current.clearInteractionHandle(r),t&&t(e)},i)},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(e){this.stopTracking(),this._tracking=e},n._updateValue=function(e){for(var t in this._value=e,_flush(this),this._listeners)this._listeners[t]({value:this.__getValue()})},t}(AnimatedWithChildren_1),AnimatedValue_1=AnimatedValue,_extends$2=require$$0.extends,_inheritsLoose$4=require$$0.inheritsLoose,AnimatedTracking=function(e){function t(t,n,r,i,o){var a;return(a=e.call(this)||this)._value=t,a._parent=n,a._animationClass=r,a._animationConfig=i,a._callback=o,a.__attach(),a}_inheritsLoose$4(t,e);var n=t.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(_extends$2({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},t}(Animated_1),AnimatedTracking_1=AnimatedTracking,RequestAnimationFrame={current:function(e){return commonjsGlobal.requestAnimationFrame(e)},inject:function(e){RequestAnimationFrame.current=e}},RequestAnimationFrame_1=RequestAnimationFrame,CancelAnimationFrame={current:function(e){return commonjsGlobal.cancelAnimationFrame(e)},inject:function(e){CancelAnimationFrame.current=e}},CancelAnimationFrame_1=CancelAnimationFrame;function tensionFromOrigamiValue(e){return 3.62*(e-30)+194}function frictionFromOrigamiValue(e){return 3*(e-8)+25}function fromOrigamiTensionAndFriction(e,t){return{tension:tensionFromOrigamiValue(e),friction:frictionFromOrigamiValue(t)}}function fromBouncinessAndSpeed(e,t){function n(e,t,n){return(e-t)/(n-t)}function r(e,t,n){return t+e*(n-t)}var i=n(e/1.7,0,20);i=r(i,0,.8);var o,a,s,l,u=r(n(t/1.7,0,20),.5,200),c=(o=i,a=(s=u)<=18?(l=s,7e-4*Math.pow(l,3)-.031*Math.pow(l,2)+.64*l+1.28):s>18&&s<=44?function(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}(s):function(e){return 4.5e-7*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(s),function(e,t,n){return.01*e+(1-e)*a}(2*o-o*o));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed},_inheritsLoose$5=require$$0.inheritsLoose;function withDefault(e,t){return void 0===e||null===e?t:e}var SpringAnimation=function(e){function t(t){var n,r;return(n=e.call(this)||this)._overshootClamping=withDefault(t.overshootClamping,!1),n._restDisplacementThreshold=withDefault(t.restDisplacementThreshold,.001),n._restSpeedThreshold=withDefault(t.restSpeedThreshold,.001),n._initialVelocity=t.velocity,n._lastVelocity=withDefault(t.velocity,0),n._toValue=t.toValue,n.__isInteraction=void 0===t.isInteraction||t.isInteraction,void 0!==t.bounciness||void 0!==t.speed?(invariant_1(void 0===t.tension&&void 0===t.friction,"You can only define bounciness/speed or tension/friction but not both"),r=SpringConfig.fromBouncinessAndSpeed(withDefault(t.bounciness,8),withDefault(t.speed,12))):r=SpringConfig.fromOrigamiTensionAndFriction(withDefault(t.tension,40),withDefault(t.friction,7)),n._tension=r.tension,n._friction=r.friction,n}_inheritsLoose$5(t,e);var n=t.prototype;return n.start=function(e,n,r,i){if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=r,this._lastTime=Date.now(),i instanceof t){var o=i.getInternalState();this._lastPosition=o.lastPosition,this._lastVelocity=o.lastVelocity,this._lastTime=o.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.onUpdate=function(){var e=this._lastPosition,t=this._lastVelocity,n=this._lastPosition,r=this._lastVelocity,i=Date.now();i>this._lastTime+64&&(i=this._lastTime+64);for(var o=Math.floor((i-this._lastTime)/1),a=0;a<o;++a){var s=t,l=this._tension*(this._toValue-n)-this._friction*r,u=(n=e+.001*s/2,r=t+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*u/2;var f=r=t+.001*c/2,p=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2;var _=r=t+.001*p/2,h=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2,r=t+.001*p/2,e+=(s+2*(u+f)+_)/6*.001,t+=(l+2*(c+p)+h)/6*.001}if(this._lastTime=i,this._lastPosition=e,this._lastVelocity=t,this._onUpdate(e),this.__active){var d=!1;this._overshootClamping&&0!==this._tension&&(d=this._startPosition<this._toValue?e>this._toValue:e<this._toValue);var m=Math.abs(t)<=this._restSpeedThreshold,y=!0;if(0!==this._tension&&(y=Math.abs(this._toValue-e)<=this._restDisplacementThreshold),d||m&&y)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}},n.stop=function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})},t}(Animation_1),SpringAnimation_1=SpringAnimation,_inheritsLoose$6=require$$0.inheritsLoose,AnimatedTransform=function(e){function t(t){var n;return(n=e.call(this)||this)._transforms=t,n}_inheritsLoose$6(t,e);var n=t.prototype;return n.__getValue=function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getValue():r}return t})},n.__getAnimatedValue=function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getAnimatedValue():r}return t})},n.__attach=function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__addChild(e)}})},n.__detach=function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__removeChild(e)}})},t}(AnimatedWithChildren_1),AnimatedTransform_1=AnimatedTransform,FlattenStyle={current:function(e){return e},inject:function(e){FlattenStyle.current=e}},FlattenStyle_1=FlattenStyle,_extends$3=require$$0.extends,_inheritsLoose$7=require$$0.inheritsLoose,AnimatedStyle=function(e){function t(t){var n;return n=e.call(this)||this,!(t=FlattenStyle_1.current(t)||{}).transform||t.transform instanceof Animated_1||(t=_extends$3({},t,{transform:new AnimatedTransform_1(t.transform)})),n._style=t,n}_inheritsLoose$7(t,e);var n=t.prototype;return n.__getValue=function(){var e={};for(var t in this._style){var n=this._style[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e},n.__getAnimatedValue=function(){var e={};for(var t in this._style){var n=this._style[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e},n.__attach=function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__addChild(this)}},n.__detach=function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__removeChild(this)}},t}(AnimatedWithChildren_1),AnimatedStyle_1=AnimatedStyle,_extends$4=require$$0.extends,_inheritsLoose$8=require$$0.inheritsLoose,AnimatedProps=function(e){function t(t,n){var r;return r=e.call(this)||this,t.style&&(t=_extends$4({},t,{style:new AnimatedStyle_1(t.style)})),r._props=t,r._callback=n,r.__attach(),r}_inheritsLoose$8(t,e);var n=t.prototype;return n.__getValue=function(){var e={};for(var t in this._props){var n=this._props[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e},n.__getAnimatedValue=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e},n.__attach=function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__addChild(this)}},n.__detach=function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__removeChild(this)}},n.update=function(){this._callback()},t}(Animated_1),AnimatedProps_1=AnimatedProps,ApplyAnimatedValues={current:function(e,t){if(!e.setNativeProps)return!1;e.setNativeProps(t)},transformStyles:function(e){return e},inject:function(e,t){ApplyAnimatedValues.current=e,ApplyAnimatedValues.transformStyles=t}},ApplyAnimatedValues_1=ApplyAnimatedValues,_extends$5=require$$0.extends,_objectWithoutProperties$1$1=require$$0.objectWithoutProperties,_inheritsLoose$9=require$$0.inheritsLoose;function createAnimatedComponent(e){var t=function(t){function n(){return t.apply(this,arguments)||this}_inheritsLoose$9(n,t);var r=n.prototype;return r.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},r.setNativeProps=function(e){this.refName&&ApplyAnimatedValues_1.current(this.refName,e,this)||this.forceUpdate()},r.componentWillMount=function(){this.attachProps(this.props)},r.attachProps=function(e){var t=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps_1(e,function(){t.refName&&ApplyAnimatedValues_1.current(t.refName,t._propsAnimated.__getAnimatedValue(),t)||t.forceUpdate()}),n&&n.__detach()},r.componentWillReceiveProps=function(e){this.attachProps(e)},r.render=function(){var t=this,n=this._propsAnimated.__getValue(),r=n.style,i=_objectWithoutProperties$1$1(n,["style"]);return React.createElement(e,_extends$5({},i,{style:ApplyAnimatedValues_1.transformStyles(r),ref:function(e){return t.refName=e}}))},n}(React.Component);return"production"!==process.env.NODE_ENV&&(t.propTypes={style:function(t,n,r){e.propTypes}}),t}var createAnimatedComponent_1=createAnimatedComponent,spring=function(e,t){return{start:function(n){var r=e,i=t;r.stopTracking(),t.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,t.toValue,SpringAnimation_1,i,n)):r.animate(new SpringAnimation_1(i),n)},stop:function(){e.stopAnimation()}}},src={Value:AnimatedValue_1,spring:spring,createAnimatedComponent:createAnimatedComponent_1,inject:{ApplyAnimatedValues:ApplyAnimatedValues_1.inject,InteractionManager:InteractionManager_1.inject,FlattenStyle:FlattenStyle_1.inject,RequestAnimationFrame:RequestAnimationFrame_1.inject,CancelAnimationFrame:CancelAnimationFrame_1.inject},__PropsOnlyForTests:AnimatedProps_1};function createInterpolator(e){var t,n,r;return n=t=function(t){function n(e){var n;n=t.call(this)||this,r.call(_assertThisInitialized(n));var i=e.children,o=e.to,a=e.from;return n.animation=new src.Value(0),n.component=src.createAnimatedComponent(i),n.animations=Object.entries(o).map(function(e){var t=e[0],r=e[1];return{name:t,interpolate:n.animation.interpolate({inputRange:[0,1],outputRange:[void 0!==a[t]?a[t]:r,r]})}}),n.to=n.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{}),n}_inheritsLoose(n,t);var i=n.prototype;return i.componentWillReceiveProps=function(e){this.update(e)},i.componentDidMount=function(){e(this.animation,_extends({toValue:1},this.props.config)).start()},i.render=function(){var e=this.props,t=(e.children,e.to,e.config,_objectWithoutProperties(e,["children","to","config"]));return React.createElement(this.component,_extends({},this.to,t))},n}(React.PureComponent),t.propTypes={to:PropTypes.object,from:PropTypes.object,config:PropTypes.object},t.defaultProps={to:{},from:{}},r=function(){var t=this;this.update=function(n){var r=t.animation._value;t.animation.stopAnimation(),t.animation.setValue(0);var i=n.to,o=(n.from,n.config),a=t.animations,s=Array.isArray(a),l=0;for(a=s?a:a[Symbol.iterator]();;){var u;if(s){if(l>=a.length)break;u=a[l++]}else{if((l=a.next()).done)break;u=l.value}var c=u;i[c.name]!==c.to&&(c.interpolate=t.animation.interpolate({inputRange:[0,1],outputRange:[c.interpolate._interpolation(r),i[c.name]]}))}t.to=t.animations.reduce(function(e,t){var n;return _extends({},e,((n={})[t.name]=t.interpolate,n))},{}),e(t.animation,_extends({toValue:1},o)).start()}},n}var Spring=createInterpolator(src.spring);exports.createInterpolator=createInterpolator,exports.Spring=Spring;
"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var React=_interopDefault(require("react")),PropTypes=_interopDefault(require("prop-types"));function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function _objectWithoutProperties(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function unwrapExports(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function createCommonjsModule(t,e){return t(e={exports:{}},e.exports),e.exports}var animated=createCommonjsModule(function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return t&&"object"==typeof t&&"default"in t?t.default:t}(React),i=process.env.NODE_ENV,r=function(t,e,n,r,a,o,s,u){if("production"!==i&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,a,o,s,u],h=0;(l=new Error(e.replace(/%s/g,function(){return c[h++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},a=function(){function t(){}var e=t.prototype;return e.__attach=function(){},e.__detach=function(){},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(t){},e.__removeChild=function(t){},e.__getChildren=function(){return[]},t}(),o="undefined"!=typeof window?window:void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{};function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}var u=Object.freeze({classCallCheck:function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},get extends(){return s},inheritsLoose:function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e},objectWithoutProperties:function(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r},possibleConstructorReturn:function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}}),l=u.inheritsLoose,c=function(t){function e(){var e;return(e=t.call(this)||this)._children=[],e}l(e,t);var n=e.prototype;return n.__addChild=function(t){0===this._children.length&&this.__attach(),this._children.push(t)},n.__removeChild=function(t){var e=this._children.indexOf(t);-1!==e?(this._children.splice(e,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},e}(a),h={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(t){h.current=t}},f=h;function p(t){var e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=y.hex6.exec(t))?parseInt(e[1]+"ff",16)>>>0:k.hasOwnProperty(t)?k[t]:(e=y.rgb.exec(t))?(b(e[1])<<24|b(e[2])<<16|b(e[3])<<8|255)>>>0:(e=y.rgba.exec(t))?(b(e[1])<<24|b(e[2])<<16|b(e[3])<<8|V(e[4]))>>>0:(e=y.hex3.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=y.hex8.exec(t))?parseInt(e[1],16)>>>0:(e=y.hex4.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=y.hsl.exec(t))?(255|d(w(e[1]),x(e[2]),x(e[3])))>>>0:(e=y.hsla.exec(t))?(d(w(e[1]),x(e[2]),x(e[3]))|V(e[4]))>>>0:null}function _(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function d(t,e,n){var i=n<.5?n*(1+e):n+e-n*e,r=2*n-i,a=_(r,i,t+1/3),o=_(r,i,t),s=_(r,i,t-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*s)<<8}var m="[-+]?\\d*\\.?\\d+",v=m+"%";function g(){return"\\(\\s*("+(t=arguments,Array.prototype.slice.call(t,0)).join(")\\s*,\\s*(")+")\\s*\\)";var t}var y={rgb:new RegExp("rgb"+g(m,m,m)),rgba:new RegExp("rgba"+g(m,m,m,m)),hsl:new RegExp("hsl"+g(m,v,v)),hsla:new RegExp("hsla"+g(m,v,v,m)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function b(t){var e=parseInt(t,10);return e<0?0:e>255?255:e}function w(t){return(parseFloat(t)%360+360)%360/360}function V(t){var e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function x(t){var e=parseFloat(t,10);return e<0?0:e>100?1:e/100}var k={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};p.rgba=function(t){return{r:Math.round((4278190080&t)>>>24),g:Math.round((16711680&t)>>>16),b:Math.round((65280&t)>>>8),a:((255&t)>>>0)/255}};var j=p,A=u.extends,O=function(t){return t},P=function(){function t(){}return t.create=function(t){if(t.outputRange&&"string"==typeof t.outputRange[0])return function(t){var e=t.outputRange;r(e.length>=2,"Bad output range"),function(t){for(var e=t[0].replace(T,""),n=1;n<t.length;++n)r(e===t[n].replace(T,""),"invalid pattern "+t[0]+" and "+t[n])}(e=e.map(C));var n=e[0].match(T).map(function(){return[]});e.forEach(function(t){t.match(T).forEach(function(t,e){n[e].push(+t)})});var i=e[0].match(T).map(function(e,i){return P.create(A({},t,{outputRange:n[i]}))}),a=/^rgb/.test(e[0]);return function(t){var n=0;return e[0].replace(T,function(){var e=i[n++](t);return String(a&&n<4?Math.round(e):e)})}}(t);var e=t.outputRange;E("outputRange",e);var n=t.inputRange;E("inputRange",n),function(t){r(t.length>=2,"inputRange must have at least 2 elements");for(var e=1;e<t.length;++e)r(t[e]>=t[e-1],"inputRange must be monotonically increasing "+t)}(n),r(n.length===e.length,"inputRange ("+n.length+") and outputRange ("+e.length+") must have the same length");var i=t.easing||O,a="extend";void 0!==t.extrapolateLeft?a=t.extrapolateLeft:void 0!==t.extrapolate&&(a=t.extrapolate);var o="extend";return void 0!==t.extrapolateRight?o=t.extrapolateRight:void 0!==t.extrapolate&&(o=t.extrapolate),function(t){r("number"==typeof t,"Cannot interpolation an input which is not a number");var s=function(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}(t,n);return function(t,e,n,i,r,a,o,s){var u=t;if(u<e){if("identity"===o)return u;"clamp"===o&&(u=e)}if(u>n){if("identity"===s)return u;"clamp"===s&&(u=n)}return i===r?i:e===n?t<=e?i:r:(e===-1/0?u=-u:n===1/0?u-=e:u=(u-e)/(n-e),u=a(u),i===-1/0?u=-u:r===1/0?u+=i:u=u*(r-i)+i,u)}(t,n[s],n[s+1],e[s],e[s+1],i,a,o)}},t}();function C(t){var e=j(t);return null===e?t:"rgba("+((4278190080&(e=e||0))>>>24)+", "+((16711680&e)>>>16)+", "+((65280&e)>>>8)+", "+(255&e)/255+")"}var T=/[0-9\.-]+/g;function E(t,e){r(e.length>=2,t+" must have at least 2 elements"),r(2!==e.length||e[0]!==-1/0||e[1]!==1/0,t+"cannot be ]-infinity;+infinity[ "+e)}var R=P,M=0,F=function(){return String(M++)},I=u.inheritsLoose,L=function(t){function e(e,n){var i;return(i=t.call(this)||this)._parent=e,i._interpolation=n,i._listeners={},i}I(e,t);var n=e.prototype;return n.__getValue=function(){var t=this._parent.__getValue();return r("number"==typeof t,"Cannot interpolate an input which is not a number."),this._interpolation(t)},n.addListener=function(t){var e=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var t in e._listeners)e._listeners[t]({value:e.__getValue()})}));var n=F();return this._listeners[n]=t,n},n.removeListener=function(t){delete this._listeners[t]},n.interpolate=function(t){return new e(this,R.create(t))},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)},e}(c),S=function(){function t(){}var e=t.prototype;return e.start=function(t,e,n,i){},e.stop=function(){},e.__debouncedOnEnd=function(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)},t}();function q(){this._cache=[]}q.prototype.add=function(t){-1===this._cache.indexOf(t)&&this._cache.push(t)},q.prototype.forEach=function(t){this._cache.forEach(t)};var N=q,D=u.inheritsLoose,U=o.Set||N;var W=function(t){function e(e){var n;return(n=t.call(this)||this)._value=e,n._offset=0,n._animation=null,n._listeners={},n}D(e,t);var n=e.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value+this._offset},n.setValue=function(t){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(t)},n.setOffset=function(t){this._offset=t},n.flattenOffset=function(){this._value+=this._offset,this._offset=0},n.addListener=function(t){var e=F();return this._listeners[e]=t,e},n.removeListener=function(t){delete this._listeners[t]},n.removeAllListeners=function(){this._listeners={}},n.stopAnimation=function(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&t(this.__getValue())},n.interpolate=function(t){return new L(this,R.create(t))},n.animate=function(t,e){var n=this,i=null;t.__isInteraction&&(i=f.current.createInteractionHandle());var r=this._animation;this._animation&&this._animation.stop(),this._animation=t,t.start(this._value,function(t){n._updateValue(t)},function(t){n._animation=null,null!==i&&f.current.clearInteractionHandle(i),e&&e(t)},r)},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(t){this.stopTracking(),this._tracking=t},n._updateValue=function(t){for(var e in this._value=t,function(t){var e=new U;!function t(n){"function"==typeof n.update?e.add(n):n.__getChildren().forEach(t)}(t),e.forEach(function(t){return t.update()})}(this),this._listeners)this._listeners[e]({value:this.__getValue()})},e}(c),z=u.extends,H=u.inheritsLoose,$=function(t){function e(e,n,i,r,a){var o;return(o=t.call(this)||this)._value=e,o._parent=n,o._animationClass=i,o._animationConfig=r,o._callback=a,o.__attach(),o}H(e,t);var n=e.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(z({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},e}(a),B={current:function(t){return o.requestAnimationFrame(t)},inject:function(t){B.current=t}},G=B,Y={current:function(t){return o.cancelAnimationFrame(t)},inject:function(t){Y.current=t}},J=Y;function K(t){return 3.62*(t-30)+194}function Q(t){return 3*(t-8)+25}var X={fromOrigamiTensionAndFriction:function(t,e){return{tension:K(t),friction:Q(e)}},fromBouncinessAndSpeed:function(t,e){function n(t,e,n){return(t-e)/(n-e)}function i(t,e,n){return e+t*(n-e)}var r=n(t/1.7,0,20);r=i(r,0,.8);var a,o,s,u,l=i(n(e/1.7,0,20),.5,200),c=(a=r,o=(s=l)<=18?(u=s,7e-4*Math.pow(u,3)-.031*Math.pow(u,2)+.64*u+1.28):s>18&&s<=44?function(t){return 44e-6*Math.pow(t,3)-.006*Math.pow(t,2)+.36*t+2}(s):function(t){return 4.5e-7*Math.pow(t,3)-332e-6*Math.pow(t,2)+.1078*t+5.84}(s),function(t,e,n){return.01*t+(1-t)*o}(2*a-a*a));return{tension:K(l),friction:Q(c)}}},Z=u.inheritsLoose;function tt(t,e){return void 0===t||null===t?e:t}var et=function(t){function e(e){var n,i;return(n=t.call(this)||this)._overshootClamping=tt(e.overshootClamping,!1),n._restDisplacementThreshold=tt(e.restDisplacementThreshold,.001),n._restSpeedThreshold=tt(e.restSpeedThreshold,.001),n._initialVelocity=e.velocity,n._lastVelocity=tt(e.velocity,0),n._toValue=e.toValue,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,void 0!==e.bounciness||void 0!==e.speed?(r(void 0===e.tension&&void 0===e.friction,"You can only define bounciness/speed or tension/friction but not both"),i=X.fromBouncinessAndSpeed(tt(e.bounciness,8),tt(e.speed,12))):i=X.fromOrigamiTensionAndFriction(tt(e.tension,40),tt(e.friction,7)),n._tension=i.tension,n._friction=i.friction,n}Z(e,t);var n=e.prototype;return n.start=function(t,n,i,r){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=i,this._lastTime=Date.now(),r instanceof e){var a=r.getInternalState();this._lastPosition=a.lastPosition,this._lastVelocity=a.lastVelocity,this._lastTime=a.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.onUpdate=function(){var t=this._lastPosition,e=this._lastVelocity,n=this._lastPosition,i=this._lastVelocity,r=Date.now();r>this._lastTime+64&&(r=this._lastTime+64);for(var a=Math.floor((r-this._lastTime)/1),o=0;o<a;++o){var s=e,u=this._tension*(this._toValue-n)-this._friction*i,l=(n=t+.001*s/2,i=e+.001*u/2),c=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*l/2;var h=i=e+.001*c/2,f=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*h/2;var p=i=e+.001*f/2,_=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*h/2,i=e+.001*f/2,t+=(s+2*(l+h)+p)/6*.001,e+=(u+2*(c+f)+_)/6*.001}if(this._lastTime=r,this._lastPosition=t,this._lastVelocity=e,this._onUpdate(t),this.__active){var d=!1;this._overshootClamping&&0!==this._tension&&(d=this._startPosition<this._toValue?t>this._toValue:t<this._toValue);var m=Math.abs(e)<=this._restSpeedThreshold,v=!0;if(0!==this._tension&&(v=Math.abs(this._toValue-t)<=this._restDisplacementThreshold),d||m&&v)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=G.current(this.onUpdate.bind(this))}},n.stop=function(){this.__active=!1,J.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})},e}(S),nt=u.inheritsLoose,it=function(t){function e(e){var n;return(n=t.call(this)||this)._transforms=e,n}nt(e,t);var n=e.prototype;return n.__getValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof a?i.__getValue():i}return e})},n.__getAnimatedValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof a?i.__getAnimatedValue():i}return e})},n.__attach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof a&&i.__addChild(t)}})},n.__detach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof a&&i.__removeChild(t)}})},e}(c),rt={current:function(t){return t},inject:function(t){rt.current=t}},at=rt,ot=u.extends,st=u.inheritsLoose,ut=function(t){function e(e){var n;return n=t.call(this)||this,!(e=at.current(e)||{}).transform||e.transform instanceof a||(e=ot({},e,{transform:new it(e.transform)})),n._style=e,n}st(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._style){var n=this._style[e];t[e]=n instanceof a?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._style){var n=this._style[e];n instanceof a&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._style){var e=this._style[t];e instanceof a&&e.__addChild(this)}},n.__detach=function(){for(var t in this._style){var e=this._style[t];e instanceof a&&e.__removeChild(this)}},e}(c),lt=u.extends,ct=u.inheritsLoose,ht=function(t){function e(e,n){var i;return i=t.call(this)||this,e.style&&(e=lt({},e,{style:new ut(e.style)})),i._props=e,i._callback=n,i.__attach(),i}ct(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._props){var n=this._props[e];t[e]=n instanceof a?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._props){var n=this._props[e];n instanceof a&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._props){var e=this._props[t];e instanceof a&&e.__addChild(this)}},n.__detach=function(){for(var t in this._props){var e=this._props[t];e instanceof a&&e.__removeChild(this)}},n.update=function(){this._callback()},e}(a),ft={current:function(t,e){if(!t.setNativeProps)return!1;t.setNativeProps(e)},transformStyles:function(t){return t},inject:function(t,e){ft.current=t,ft.transformStyles=e}},pt=ft,_t=u.extends,dt=u.objectWithoutProperties,mt=u.inheritsLoose;var vt={Value:W,spring:function(t,e){return{start:function(n){var i=t,r=e;i.stopTracking(),e.toValue instanceof a?i.track(new $(i,e.toValue,et,r,n)):i.animate(new et(r),n)},stop:function(){t.stopAnimation()}}},createAnimatedComponent:function(t){var e=function(e){function i(){return e.apply(this,arguments)||this}mt(i,e);var r=i.prototype;return r.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},r.setNativeProps=function(t){this.refName&&pt.current(this.refName,t,this)||this.forceUpdate()},r.componentWillMount=function(){this.attachProps(this.props)},r.attachProps=function(t){var e=this,n=this._propsAnimated;this._propsAnimated=new ht(t,function(){e.refName&&pt.current(e.refName,e._propsAnimated.__getAnimatedValue(),e)||e.forceUpdate()}),n&&n.__detach()},r.componentWillReceiveProps=function(t){this.attachProps(t)},r.render=function(){var e=this,i=this._propsAnimated.__getValue(),r=i.style,a=dt(i,["style"]);return n.createElement(t,_t({},a,{style:pt.transformStyles(r),ref:function(t){return e.refName=t}}))},i}(n.Component);return"production"!==process.env.NODE_ENV&&(e.propTypes={style:function(e,n,i){t.propTypes}}),e},inject:{ApplyAnimatedValues:pt.inject,InteractionManager:f.inject,FlattenStyle:at.inject,RequestAnimationFrame:G.inject,CancelAnimationFrame:J.inject},__PropsOnlyForTests:ht},gt=vt.Value,yt=vt.spring,bt=vt.createAnimatedComponent,wt=vt.inject,Vt=vt.__PropsOnlyForTests;e.default=vt,e.Value=gt,e.spring=yt,e.createAnimatedComponent=bt,e.inject=wt,e.__PropsOnlyForTests=Vt}),Animated=unwrapExports(animated),animated_1=animated.Value,animated_2=animated.spring,animated_3=animated.createAnimatedComponent,animated_4=animated.inject,animated_5=animated.__PropsOnlyForTests;function createInterpolator(t){var e,n,i;return n=e=function(e){function n(t){var n;n=e.call(this)||this,i.call(_assertThisInitialized(n));var r=t.children,a=t.to,o=t.from;return n.animation=new Animated.Value(0),n.component=Animated.createAnimatedComponent(r),n.animations=Object.entries(a).map(function(t){var e=t[0],i=t[1];return{name:e,interpolate:n.animation.interpolate({inputRange:[0,1],outputRange:[void 0!==o[e]?o[e]:i,i]})}}),n.to=n.animations.reduce(function(t,e){var n;return _extends({},t,((n={})[e.name]=e.interpolate,n))},{}),n}_inheritsLoose(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){this.update(t)},r.componentDidMount=function(){t(this.animation,_extends({toValue:1},this.props.config)).start()},r.render=function(){var t=this.props,e=(t.children,t.to,t.config,_objectWithoutProperties(t,["children","to","config"]));return React.createElement(this.component,_extends({},this.to,e))},n}(React.PureComponent),e.propTypes={to:PropTypes.object,from:PropTypes.object,config:PropTypes.object},e.defaultProps={to:{},from:{}},i=function(){var e=this;this.update=function(n){var i=e.animation._value;e.animation.stopAnimation(),e.animation.setValue(0);var r=n.to,a=(n.from,n.config),o=e.animations,s=Array.isArray(o),u=0;for(o=s?o:o[Symbol.iterator]();;){var l;if(s){if(u>=o.length)break;l=o[u++]}else{if((u=o.next()).done)break;l=u.value}var c=l;r[c.name]!==c.to&&(c.interpolate=e.animation.interpolate({inputRange:[0,1],outputRange:[c.interpolate._interpolation(i),r[c.name]]}))}e.to=e.animations.reduce(function(t,e){var n;return _extends({},t,((n={})[e.name]=e.interpolate,n))},{}),t(e.animation,_extends({toValue:1},a)).start()}},n}var Spring=createInterpolator(Animated.spring);exports.createInterpolator=createInterpolator,exports.Spring=Spring;
{
"name": "react-spring",
"version": "1.1.1",
"version": "1.1.2",
"description": "Animate React with ease",

@@ -5,0 +5,0 @@ "main": "dist/react-spring",

@@ -36,3 +36,2 @@ npm install react-spring

const toggle = this.state.toggle
const color = toggle ? RED : GREEN
return (

@@ -44,13 +43,11 @@ <Spring

to={{
// Can be numbers, colors, paths, patterns, percentages ...
color,
// Can be numbers, colors, paths, degrees, percentages, ...
opacity: 1,
start: toggle ? color : 'black',
color: toggle ? RED : GREEN,
start: toggle ? RED : 'black',
end: toggle ? 'black' : GREEN,
stop: toggle ? '0%' : '50%',
end: toggle ? 'black' : color,
scale: toggle ? 1 : 2,
path: toggle ? TRIANGLE : RECTANGLE,
}}
// Content is rendered by prop
children={Content}
// You can finetune spring settings

@@ -60,2 +57,4 @@ config={{ friction: 1, tension: 10 }}

toggle={this.toggle}
// Child as function/render-prop, receives interpolated values
children={Content}
/>

@@ -62,0 +61,0 @@ )

@@ -1,1 +0,1 @@

import react from"react";var REACT_ELEMENT_TYPE,NODE_ENV=process.env.NODE_ENV,invariant=function(e,t,n,r,i,a,o,s){if("production"!==NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,a,o,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,Animated=function(){function e(){}var t=e.prototype;return t.__attach=function(){},t.__detach=function(){},t.__getValue=function(){},t.__getAnimatedValue=function(){return this.__getValue()},t.__addChild=function(e){},t.__removeChild=function(e){},t.__getChildren=function(){return[]},e}(),Animated_1=Animated,commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _jsx(e,t,n,r){REACT_ELEMENT_TYPE||(REACT_ELEMENT_TYPE="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103);var i=e&&e.defaultProps,a=arguments.length-3;if(t||0===a||(t={children:void 0}),t&&i)for(var o in i)void 0===t[o]&&(t[o]=i[o]);else t||(t=i||{});if(1===a)t.children=r;else if(a>1){for(var s=new Array(a),l=0;l<a;l++)s[l]=arguments[l+3];t.children=s}return{$$typeof:REACT_ELEMENT_TYPE,type:e,key:void 0===n?null:""+n,ref:null,props:t,_owner:null}}function _asyncIterator(e){if("function"==typeof Symbol){if(Symbol.asyncIterator){var t=e[Symbol.asyncIterator];if(null!=t)return t.call(e)}if(Symbol.iterator)return e[Symbol.iterator]()}throw new TypeError("Object is not async iterable")}function _AwaitValue(e){this.wrapped=e}function _AsyncGenerator(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof _AwaitValue;Promise.resolve(s?o.wrapped:o).then(function(e){s?r("next",e):i(a.done?"return":"normal",e)},function(e){r("throw",e)})}catch(e){i("throw",e)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},"function"!=typeof e.return&&(this.return=void 0)}function _wrapAsyncGenerator(e){return function(){return new _AsyncGenerator(e.apply(this,arguments))}}function _awaitAsyncGenerator(e){return new _AwaitValue(e)}function _asyncGeneratorDelegate(e,t){var n={},r=!1;function i(n,i){return r=!0,i=new Promise(function(t){t(e[n](i))}),{done:!1,value:t(i)}}return"function"==typeof Symbol&&Symbol.iterator&&(n[Symbol.iterator]=function(){return this}),n.next=function(e){return r?(r=!1,e):i("next",e)},"function"==typeof e.throw&&(n.throw=function(e){if(r)throw r=!1,e;return i("throw",e)}),"function"==typeof e.return&&(n.return=function(e){return i("return",e)}),n}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e,t){try{var n=a[e](t),o=n.value}catch(e){return void i(e)}n.done?r(o):Promise.resolve(o).then(s,l)}function s(e){o("next",e)}function l(e){o("throw",e)}s()})}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineEnumerableProperties(e,t){for(var n in t){(a=t[n]).configurable=a.enumerable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,n,a)}if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(t),i=0;i<r.length;i++){var a,o=r[i];(a=t[o]).configurable=a.enumerable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,o,a)}return e}function _defaults(e,t){for(var n=Object.getOwnPropertyNames(t),r=0;r<n.length;r++){var i=n[r],a=Object.getOwnPropertyDescriptor(t,i);a&&a.configurable&&void 0===e[i]&&Object.defineProperty(e,i,a)}return e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _get(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:_get(i,t,n)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(n):void 0}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}"function"==typeof Symbol&&Symbol.asyncIterator&&(_AsyncGenerator.prototype[Symbol.asyncIterator]=function(){return this}),_AsyncGenerator.prototype.next=function(e){return this._invoke("next",e)},_AsyncGenerator.prototype.throw=function(e){return this._invoke("throw",e)},_AsyncGenerator.prototype.return=function(e){return this._invoke("return",e)};var _gPO=Object.getPrototypeOf||function(e){return e.__proto__},_sPO=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_construct="object"==typeof Reflect&&Reflect.construct||function(e,t,n){var r,i=[null];return i.push.apply(i,t),r=e.bind.apply(e,i),_sPO(new r,n.prototype)},_cache="function"==typeof Map&&new Map;function _wrapNativeSuper(e){if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==_cache){if(_cache.has(e))return _cache.get(e);_cache.set(e,t)}function t(){}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writeable:!0,configurable:!0}}),_sPO(t,_sPO(function(){return _construct(e,arguments,_gPO(this).constructor)},e))}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?t[Symbol.hasInstance](e):e instanceof t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}function _newArrowCheck(e,t){if(e!==t)throw new TypeError("Cannot instantiate an arrow function")}function _objectDestructuringEmpty(e){if(null==e)throw new TypeError("Cannot destructure undefined")}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _set(e,t,n,r){var i=Object.getOwnPropertyDescriptor(e,t);if(void 0===i){var a=Object.getPrototypeOf(e);null!==a&&_set(a,t,n,r)}else if("value"in i&&i.writable)i.value=n;else{var o=i.set;void 0!==o&&o.call(r,n)}return n}function _sliceIterator(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw a}}return n}function _slicedToArray(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return _sliceIterator(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _slicedToArrayLoose(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){for(var n,r=[],i=e[Symbol.iterator]();!(n=i.next()).done&&(r.push(n.value),!t||r.length!==t););return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")}function _taggedTemplateLiteral(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _taggedTemplateLiteralLoose(e,t){return e.raw=t,e}function _temporalRef(e,t){if(e===_temporalUndefined)throw new ReferenceError(t+" is not defined - temporal dead zone");return e}function _readOnlyError(e){throw new Error('"'+e+'" is read-only')}function _classNameTDZError(e){throw new Error('Class "'+e+'" cannot be referenced in computed property keys.')}var _temporalUndefined={};function _toArray(e){return Array.isArray(e)?e:Array.from(e)}function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function _skipFirstGeneratorNext(e){return function(){var t=e.apply(this,arguments);return t.next(),t}}function _toPropertyKey(e){return"symbol"==typeof e?e:String(e)}function _initializerWarningHelper(e,t){throw new Error("Decorating class property failed. Please ensure that proposal-class-properties is enabled and set to use loose mode. To use proposal-class-properties in spec mode with decorators, wait for the next major version of decorators in stage 2.")}function _initializerDefineProperty(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function _applyDecoratedDescriptor(e,t,n,r,i){var a={};return Object.keys(r).forEach(function(e){a[e]=r[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=n.slice().reverse().reduce(function(n,r){return r(e,t,n)||n},a),i&&void 0!==a.initializer&&(a.value=a.initializer?a.initializer.call(i):void 0,a.initializer=void 0),void 0===a.initializer&&(Object.defineProperty(e,t,a),a=null),a}var rollupPluginBabelHelpers=Object.freeze({get typeof(){return _typeof},jsx:_jsx,asyncIterator:_asyncIterator,AwaitValue:_AwaitValue,AsyncGenerator:_AsyncGenerator,wrapAsyncGenerator:_wrapAsyncGenerator,awaitAsyncGenerator:_awaitAsyncGenerator,asyncGeneratorDelegate:_asyncGeneratorDelegate,asyncToGenerator:_asyncToGenerator,classCallCheck:_classCallCheck,createClass:_createClass,defineEnumerableProperties:_defineEnumerableProperties,defaults:_defaults,defineProperty:_defineProperty,get extends(){return _extends},get:_get,inherits:_inherits,inheritsLoose:_inheritsLoose,wrapNativeSuper:_wrapNativeSuper,instanceof:_instanceof,interopRequireDefault:_interopRequireDefault,interopRequireWildcard:_interopRequireWildcard,newArrowCheck:_newArrowCheck,objectDestructuringEmpty:_objectDestructuringEmpty,objectWithoutProperties:_objectWithoutProperties,assertThisInitialized:_assertThisInitialized,possibleConstructorReturn:_possibleConstructorReturn,set:_set,slicedToArray:_slicedToArray,slicedToArrayLoose:_slicedToArrayLoose,taggedTemplateLiteral:_taggedTemplateLiteral,taggedTemplateLiteralLoose:_taggedTemplateLiteralLoose,temporalRef:_temporalRef,readOnlyError:_readOnlyError,classNameTDZError:_classNameTDZError,temporalUndefined:_temporalUndefined,toArray:_toArray,toConsumableArray:_toConsumableArray,skipFirstGeneratorNext:_skipFirstGeneratorNext,toPropertyKey:_toPropertyKey,initializerWarningHelper:_initializerWarningHelper,initializerDefineProperty:_initializerDefineProperty,applyDecoratedDescriptor:_applyDecoratedDescriptor}),require$$0=rollupPluginBabelHelpers,_inheritsLoose$1=require$$0.inheritsLoose,AnimatedWithChildren=function(e){function t(){var t;return(t=e.call(this)||this)._children=[],t}_inheritsLoose$1(t,e);var n=t.prototype;return n.__addChild=function(e){0===this._children.length&&this.__attach(),this._children.push(e)},n.__removeChild=function(e){var t=this._children.indexOf(e);-1!==t?(this._children.splice(t,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},t}(Animated_1),AnimatedWithChildren_1=AnimatedWithChildren,InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(e){InteractionManager.current=e}},InteractionManager_1=InteractionManager;function normalizeColor(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=matchers.hex6.exec(e))?parseInt(t[1]+"ff",16)>>>0:names.hasOwnProperty(e)?names[e]:(t=matchers.rgb.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|255)>>>0:(t=matchers.rgba.exec(e))?(parse255(t[1])<<24|parse255(t[2])<<16|parse255(t[3])<<8|parse1(t[4]))>>>0:(t=matchers.hex3.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=matchers.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=matchers.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=matchers.hsl.exec(e))?(255|hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3])))>>>0:(t=matchers.hsla.exec(e))?(hslToRgb(parse360(t[1]),parsePercentage(t[2]),parsePercentage(t[3]))|parse1(t[4]))>>>0:null}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=hue2rgb(i,r,e+1/3),o=hue2rgb(i,r,e),s=hue2rgb(i,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*s)<<8}var NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function toArray(e){return Array.prototype.slice.call(e,0)}function call(){return"\\(\\s*("+toArray(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var matchers={rgb:new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),rgba:new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl:new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla:new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function parse255(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function parse360(e){return(parseFloat(e)%360+360)%360/360}function parse1(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function parsePercentage(e){var t=parseFloat(e,10);return t<0?0:t>100?1:t/100}var names={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function rgba(e){return{r:Math.round((4278190080&e)>>>24),g:Math.round((16711680&e)>>>16),b:Math.round((65280&e)>>>8),a:((255&e)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,_extends$1=require$$0.extends,linear=function(e){return e},Interpolation=function(){function e(){}return e.create=function(e){if(e.outputRange&&"string"==typeof e.outputRange[0])return createInterpolationFromStringOutputRange(e);var t=e.outputRange;checkInfiniteRange("outputRange",t);var n=e.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===t.length,"inputRange ("+n.length+") and outputRange ("+t.length+") must have the same length");var r=e.easing||linear,i="extend";void 0!==e.extrapolateLeft?i=e.extrapolateLeft:void 0!==e.extrapolate&&(i=e.extrapolate);var a="extend";return void 0!==e.extrapolateRight?a=e.extrapolateRight:void 0!==e.extrapolate&&(a=e.extrapolate),function(e){invariant_1("number"==typeof e,"Cannot interpolation an input which is not a number");var o=findRange(e,n);return interpolate(e,n[o],n[o+1],t[o],t[o+1],r,i,a)}},e}();function interpolate(e,t,n,r,i,a,o,s){var l=e;if(l<t){if("identity"===o)return l;"clamp"===o&&(l=t)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l-=t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l+=r:l=l*(i-r)+r,l)}function colorToRgba(e){var t=normalizeCssColor(e);return null===t?e:"rgba("+((4278190080&(t=t||0))>>>24)+", "+((16711680&t)>>>16)+", "+((65280&t)>>>8)+", "+(255&t)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(e){var t=e.outputRange;invariant_1(t.length>=2,"Bad output range"),checkPattern(t=t.map(colorToRgba));var n=t[0].match(stringShapeRegex).map(function(){return[]});t.forEach(function(e){e.match(stringShapeRegex).forEach(function(e,t){n[t].push(+e)})});var r=t[0].match(stringShapeRegex).map(function(t,r){return Interpolation.create(_extends$1({},e,{outputRange:n[r]}))}),i=/^rgb/.test(t[0]);return function(e){var n=0;return t[0].replace(stringShapeRegex,function(){var t=r[n++](e);return String(i&&n<4?Math.round(t):t)})}}function checkPattern(e){for(var t=e[0].replace(stringShapeRegex,""),n=1;n<e.length;++n)invariant_1(t===e[n].replace(stringShapeRegex,""),"invalid pattern "+e[0]+" and "+e[n])}function findRange(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}function checkValidInputRange(e){invariant_1(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t<e.length;++t)invariant_1(e[t]>=e[t-1],"inputRange must be monotonically increasing "+e)}function checkInfiniteRange(e,t){invariant_1(t.length>=2,e+" must have at least 2 elements"),invariant_1(2!==t.length||t[0]!==-1/0||t[1]!==1/0,e+"cannot be ]-infinity;+infinity[ "+t)}var Interpolation_1=Interpolation,_uniqueId=0,guid=function(){return String(_uniqueId++)},_inheritsLoose$2=require$$0.inheritsLoose,AnimatedInterpolation=function(e){function t(t,n){var r;return(r=e.call(this)||this)._parent=t,r._interpolation=n,r._listeners={},r}_inheritsLoose$2(t,e);var n=t.prototype;return n.__getValue=function(){var e=this._parent.__getValue();return invariant_1("number"==typeof e,"Cannot interpolate an input which is not a number."),this._interpolation(e)},n.addListener=function(e){var t=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var e in t._listeners)t._listeners[e]({value:t.__getValue()})}));var n=guid();return this._listeners[n]=e,n},n.removeListener=function(e){delete this._listeners[e]},n.interpolate=function(e){return new t(this,Interpolation_1.create(e))},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)},t}(AnimatedWithChildren_1),AnimatedInterpolation_1=AnimatedInterpolation,Animation=function(){function e(){}var t=e.prototype;return t.start=function(e,t,n,r){},t.stop=function(){},t.__debouncedOnEnd=function(e){var t=this.__onEnd;this.__onEnd=null,t&&t(e)},e}(),Animation_1=Animation;function SetPolyfill(){this._cache=[]}SetPolyfill.prototype.add=function(e){-1===this._cache.indexOf(e)&&this._cache.push(e)},SetPolyfill.prototype.forEach=function(e){this._cache.forEach(e)};var SetPolyfill_1=SetPolyfill,_inheritsLoose$3=require$$0.inheritsLoose,Set=commonjsGlobal.Set||SetPolyfill_1;function _flush(e){var t=new Set;!function e(n){"function"==typeof n.update?t.add(n):n.__getChildren().forEach(e)}(e),t.forEach(function(e){return e.update()})}var AnimatedValue=function(e){function t(t){var n;return(n=e.call(this)||this)._value=t,n._offset=0,n._animation=null,n._listeners={},n}_inheritsLoose$3(t,e);var n=t.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value+this._offset},n.setValue=function(e){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(e)},n.setOffset=function(e){this._offset=e},n.flattenOffset=function(){this._value+=this._offset,this._offset=0},n.addListener=function(e){var t=guid();return this._listeners[t]=e,t},n.removeListener=function(e){delete this._listeners[e]},n.removeAllListeners=function(){this._listeners={}},n.stopAnimation=function(e){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,e&&e(this.__getValue())},n.interpolate=function(e){return new AnimatedInterpolation_1(this,Interpolation_1.create(e))},n.animate=function(e,t){var n=this,r=null;e.__isInteraction&&(r=InteractionManager_1.current.createInteractionHandle());var i=this._animation;this._animation&&this._animation.stop(),this._animation=e,e.start(this._value,function(e){n._updateValue(e)},function(e){n._animation=null,null!==r&&InteractionManager_1.current.clearInteractionHandle(r),t&&t(e)},i)},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(e){this.stopTracking(),this._tracking=e},n._updateValue=function(e){for(var t in this._value=e,_flush(this),this._listeners)this._listeners[t]({value:this.__getValue()})},t}(AnimatedWithChildren_1),AnimatedValue_1=AnimatedValue,_extends$2=require$$0.extends,_inheritsLoose$4=require$$0.inheritsLoose,AnimatedTracking=function(e){function t(t,n,r,i,a){var o;return(o=e.call(this)||this)._value=t,o._parent=n,o._animationClass=r,o._animationConfig=i,o._callback=a,o.__attach(),o}_inheritsLoose$4(t,e);var n=t.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(_extends$2({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},t}(Animated_1),AnimatedTracking_1=AnimatedTracking,RequestAnimationFrame={current:function(e){return commonjsGlobal.requestAnimationFrame(e)},inject:function(e){RequestAnimationFrame.current=e}},RequestAnimationFrame_1=RequestAnimationFrame,CancelAnimationFrame={current:function(e){return commonjsGlobal.cancelAnimationFrame(e)},inject:function(e){CancelAnimationFrame.current=e}},CancelAnimationFrame_1=CancelAnimationFrame;function tensionFromOrigamiValue(e){return 3.62*(e-30)+194}function frictionFromOrigamiValue(e){return 3*(e-8)+25}function fromOrigamiTensionAndFriction(e,t){return{tension:tensionFromOrigamiValue(e),friction:frictionFromOrigamiValue(t)}}function fromBouncinessAndSpeed(e,t){function n(e,t,n){return(e-t)/(n-t)}function r(e,t,n){return t+e*(n-t)}var i=n(e/1.7,0,20);i=r(i,0,.8);var a,o,s,l,u=r(n(t/1.7,0,20),.5,200),c=(a=i,o=(s=u)<=18?(l=s,7e-4*Math.pow(l,3)-.031*Math.pow(l,2)+.64*l+1.28):s>18&&s<=44?function(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}(s):function(e){return 4.5e-7*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}(s),function(e,t,n){return e*n+(1-e)*t}(2*a-a*a,o,.01));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed},_inheritsLoose$5=require$$0.inheritsLoose;function withDefault(e,t){return void 0===e||null===e?t:e}var SpringAnimation=function(e){function t(t){var n,r;return(n=e.call(this)||this)._overshootClamping=withDefault(t.overshootClamping,!1),n._restDisplacementThreshold=withDefault(t.restDisplacementThreshold,.001),n._restSpeedThreshold=withDefault(t.restSpeedThreshold,.001),n._initialVelocity=t.velocity,n._lastVelocity=withDefault(t.velocity,0),n._toValue=t.toValue,n.__isInteraction=void 0===t.isInteraction||t.isInteraction,void 0!==t.bounciness||void 0!==t.speed?(invariant_1(void 0===t.tension&&void 0===t.friction,"You can only define bounciness/speed or tension/friction but not both"),r=SpringConfig.fromBouncinessAndSpeed(withDefault(t.bounciness,8),withDefault(t.speed,12))):r=SpringConfig.fromOrigamiTensionAndFriction(withDefault(t.tension,40),withDefault(t.friction,7)),n._tension=r.tension,n._friction=r.friction,n}_inheritsLoose$5(t,e);var n=t.prototype;return n.start=function(e,n,r,i){if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=r,this._lastTime=Date.now(),i instanceof t){var a=i.getInternalState();this._lastPosition=a.lastPosition,this._lastVelocity=a.lastVelocity,this._lastTime=a.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.onUpdate=function(){var e=this._lastPosition,t=this._lastVelocity,n=this._lastPosition,r=this._lastVelocity,i=Date.now();i>this._lastTime+64&&(i=this._lastTime+64);for(var a=Math.floor((i-this._lastTime)/1),o=0;o<a;++o){var s=t,l=this._tension*(this._toValue-n)-this._friction*r,u=(n=e+.001*s/2,r=t+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*u/2;var f=r=t+.001*c/2,_=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2;var h=r=t+.001*_/2,p=this._tension*(this._toValue-n)-this._friction*r;n=e+.001*f/2,r=t+.001*_/2,e+=.001*((s+2*(u+f)+h)/6),t+=.001*((l+2*(c+_)+p)/6)}if(this._lastTime=i,this._lastPosition=e,this._lastVelocity=t,this._onUpdate(e),this.__active){var d=!1;this._overshootClamping&&0!==this._tension&&(d=this._startPosition<this._toValue?e>this._toValue:e<this._toValue);var m=Math.abs(t)<=this._restSpeedThreshold,y=!0;if(0!==this._tension&&(y=Math.abs(this._toValue-e)<=this._restDisplacementThreshold),d||m&&y)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}},n.stop=function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})},t}(Animation_1),SpringAnimation_1=SpringAnimation,_inheritsLoose$6=require$$0.inheritsLoose,AnimatedTransform=function(e){function t(t){var n;return(n=e.call(this)||this)._transforms=t,n}_inheritsLoose$6(t,e);var n=t.prototype;return n.__getValue=function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getValue():r}return t})},n.__getAnimatedValue=function(){return this._transforms.map(function(e){var t={};for(var n in e){var r=e[n];t[n]=r instanceof Animated_1?r.__getAnimatedValue():r}return t})},n.__attach=function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__addChild(e)}})},n.__detach=function(){var e=this;this._transforms.forEach(function(t){for(var n in t){var r=t[n];r instanceof Animated_1&&r.__removeChild(e)}})},t}(AnimatedWithChildren_1),AnimatedTransform_1=AnimatedTransform,FlattenStyle={current:function(e){return e},inject:function(e){FlattenStyle.current=e}},FlattenStyle_1=FlattenStyle,_extends$3=require$$0.extends,_inheritsLoose$7=require$$0.inheritsLoose,AnimatedStyle=function(e){function t(t){var n;return n=e.call(this)||this,!(t=FlattenStyle_1.current(t)||{}).transform||t.transform instanceof Animated_1||(t=_extends$3({},t,{transform:new AnimatedTransform_1(t.transform)})),n._style=t,n}_inheritsLoose$7(t,e);var n=t.prototype;return n.__getValue=function(){var e={};for(var t in this._style){var n=this._style[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e},n.__getAnimatedValue=function(){var e={};for(var t in this._style){var n=this._style[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e},n.__attach=function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__addChild(this)}},n.__detach=function(){for(var e in this._style){var t=this._style[e];t instanceof Animated_1&&t.__removeChild(this)}},t}(AnimatedWithChildren_1),AnimatedStyle_1=AnimatedStyle,_extends$4=require$$0.extends,_inheritsLoose$8=require$$0.inheritsLoose,AnimatedProps=function(e){function t(t,n){var r;return r=e.call(this)||this,t.style&&(t=_extends$4({},t,{style:new AnimatedStyle_1(t.style)})),r._props=t,r._callback=n,r.__attach(),r}_inheritsLoose$8(t,e);var n=t.prototype;return n.__getValue=function(){var e={};for(var t in this._props){var n=this._props[t];e[t]=n instanceof Animated_1?n.__getValue():n}return e},n.__getAnimatedValue=function(){var e={};for(var t in this._props){var n=this._props[t];n instanceof Animated_1&&(e[t]=n.__getAnimatedValue())}return e},n.__attach=function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__addChild(this)}},n.__detach=function(){for(var e in this._props){var t=this._props[e];t instanceof Animated_1&&t.__removeChild(this)}},n.update=function(){this._callback()},t}(Animated_1),AnimatedProps_1=AnimatedProps,ApplyAnimatedValues={current:function(e,t){if(!e.setNativeProps)return!1;e.setNativeProps(t)},transformStyles:function(e){return e},inject:function(e,t){ApplyAnimatedValues.current=e,ApplyAnimatedValues.transformStyles=t}},ApplyAnimatedValues_1=ApplyAnimatedValues,_extends$5=require$$0.extends,_objectWithoutProperties$1=require$$0.objectWithoutProperties,_inheritsLoose$9=require$$0.inheritsLoose;function createAnimatedComponent(e){var t=function(t){function n(){return t.apply(this,arguments)||this}_inheritsLoose$9(n,t);var r=n.prototype;return r.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},r.setNativeProps=function(e){this.refName&&ApplyAnimatedValues_1.current(this.refName,e,this)||this.forceUpdate()},r.componentWillMount=function(){this.attachProps(this.props)},r.attachProps=function(e){var t=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps_1(e,function(){t.refName&&ApplyAnimatedValues_1.current(t.refName,t._propsAnimated.__getAnimatedValue(),t)||t.forceUpdate()}),n&&n.__detach()},r.componentWillReceiveProps=function(e){this.attachProps(e)},r.render=function(){var t=this,n=this._propsAnimated.__getValue(),r=n.style,i=_objectWithoutProperties$1(n,["style"]);return react.createElement(e,_extends$5({},i,{style:ApplyAnimatedValues_1.transformStyles(r),ref:function(e){return t.refName=e}}))},n}(react.Component);return"production"!==process.env.NODE_ENV&&(t.propTypes={style:function(t,n,r){e.propTypes}}),t}var createAnimatedComponent_1=createAnimatedComponent,spring=function(e,t){return{start:function(n){var r=e,i=t;r.stopTracking(),t.toValue instanceof Animated_1?r.track(new AnimatedTracking_1(r,t.toValue,SpringAnimation_1,i,n)):r.animate(new SpringAnimation_1(i),n)},stop:function(){e.stopAnimation()}}},src={Value:AnimatedValue_1,spring:spring,createAnimatedComponent:createAnimatedComponent_1,inject:{ApplyAnimatedValues:ApplyAnimatedValues_1.inject,InteractionManager:InteractionManager_1.inject,FlattenStyle:FlattenStyle_1.inject,RequestAnimationFrame:RequestAnimationFrame_1.inject,CancelAnimationFrame:CancelAnimationFrame_1.inject},__PropsOnlyForTests:AnimatedProps_1},src_1=src.Value,src_2=src.spring,src_3=src.createAnimatedComponent,src_4=src.inject,src_5=src.__PropsOnlyForTests;export default src;export{src_1 as Value,src_2 as spring,src_3 as createAnimatedComponent,src_4 as inject,src_5 as __PropsOnlyForTests};
"use strict";function _interopDefault(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var react=_interopDefault(require("react")),NODE_ENV=process.env.NODE_ENV,invariant=function(t,e,n,i,r,a,o,s){if("production"!==NODE_ENV&&void 0===e)throw new Error("invariant requires an error message argument");if(!t){var l;if(void 0===e)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,i,r,a,o,s],c=0;(l=new Error(e.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}},invariant_1=invariant,Animated=function(){function t(){}var e=t.prototype;return e.__attach=function(){},e.__detach=function(){},e.__getValue=function(){},e.__getAnimatedValue=function(){return this.__getValue()},e.__addChild=function(t){},e.__removeChild=function(t){},e.__getChildren=function(){return[]},t}(),Animated_1=Animated,commonjsGlobal="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _extends(){return(_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function _objectWithoutProperties(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function _possibleConstructorReturn(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var rollupPluginBabelHelpers=Object.freeze({classCallCheck:_classCallCheck,get extends(){return _extends},inheritsLoose:_inheritsLoose,objectWithoutProperties:_objectWithoutProperties,possibleConstructorReturn:_possibleConstructorReturn}),require$$0=rollupPluginBabelHelpers,_inheritsLoose$1=require$$0.inheritsLoose,AnimatedWithChildren=function(t){function e(){var e;return(e=t.call(this)||this)._children=[],e}_inheritsLoose$1(e,t);var n=e.prototype;return n.__addChild=function(t){0===this._children.length&&this.__attach(),this._children.push(t)},n.__removeChild=function(t){var e=this._children.indexOf(t);-1!==e?(this._children.splice(e,1),0===this._children.length&&this.__detach()):console.warn("Trying to remove a child that doesn't exist")},n.__getChildren=function(){return this._children},e}(Animated_1),AnimatedWithChildren_1=AnimatedWithChildren,InteractionManager={current:{createInteractionHandle:function(){},clearInteractionHandle:function(){}},inject:function(t){InteractionManager.current=t}},InteractionManager_1=InteractionManager;function normalizeColor(t){var e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=matchers.hex6.exec(t))?parseInt(e[1]+"ff",16)>>>0:names.hasOwnProperty(t)?names[t]:(e=matchers.rgb.exec(t))?(parse255(e[1])<<24|parse255(e[2])<<16|parse255(e[3])<<8|255)>>>0:(e=matchers.rgba.exec(t))?(parse255(e[1])<<24|parse255(e[2])<<16|parse255(e[3])<<8|parse1(e[4]))>>>0:(e=matchers.hex3.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=matchers.hex8.exec(t))?parseInt(e[1],16)>>>0:(e=matchers.hex4.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=matchers.hsl.exec(t))?(255|hslToRgb(parse360(e[1]),parsePercentage(e[2]),parsePercentage(e[3])))>>>0:(e=matchers.hsla.exec(t))?(hslToRgb(parse360(e[1]),parsePercentage(e[2]),parsePercentage(e[3]))|parse1(e[4]))>>>0:null}function hue2rgb(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function hslToRgb(t,e,n){var i=n<.5?n*(1+e):n+e-n*e,r=2*n-i,a=hue2rgb(r,i,t+1/3),o=hue2rgb(r,i,t),s=hue2rgb(r,i,t-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*s)<<8}var NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function toArray(t){return Array.prototype.slice.call(t,0)}function call(){return"\\(\\s*("+toArray(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var matchers={rgb:new RegExp("rgb"+call(NUMBER,NUMBER,NUMBER)),rgba:new RegExp("rgba"+call(NUMBER,NUMBER,NUMBER,NUMBER)),hsl:new RegExp("hsl"+call(NUMBER,PERCENTAGE,PERCENTAGE)),hsla:new RegExp("hsla"+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/};function parse255(t){var e=parseInt(t,10);return e<0?0:e>255?255:e}function parse360(t){return(parseFloat(t)%360+360)%360/360}function parse1(t){var e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function parsePercentage(t){var e=parseFloat(t,10);return e<0?0:e>100?1:e/100}var names={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};function rgba(t){return{r:Math.round((4278190080&t)>>>24),g:Math.round((16711680&t)>>>16),b:Math.round((65280&t)>>>8),a:((255&t)>>>0)/255}}normalizeColor.rgba=rgba;var normalizeCssColor=normalizeColor,_extends$1=require$$0.extends,linear=function(t){return t},Interpolation=function(){function t(){}return t.create=function(t){if(t.outputRange&&"string"==typeof t.outputRange[0])return createInterpolationFromStringOutputRange(t);var e=t.outputRange;checkInfiniteRange("outputRange",e);var n=t.inputRange;checkInfiniteRange("inputRange",n),checkValidInputRange(n),invariant_1(n.length===e.length,"inputRange ("+n.length+") and outputRange ("+e.length+") must have the same length");var i=t.easing||linear,r="extend";void 0!==t.extrapolateLeft?r=t.extrapolateLeft:void 0!==t.extrapolate&&(r=t.extrapolate);var a="extend";return void 0!==t.extrapolateRight?a=t.extrapolateRight:void 0!==t.extrapolate&&(a=t.extrapolate),function(t){invariant_1("number"==typeof t,"Cannot interpolation an input which is not a number");var o=findRange(t,n);return interpolate(t,n[o],n[o+1],e[o],e[o+1],i,r,a)}},t}();function interpolate(t,e,n,i,r,a,o,s){var l=t;if(l<e){if("identity"===o)return l;"clamp"===o&&(l=e)}if(l>n){if("identity"===s)return l;"clamp"===s&&(l=n)}return i===r?i:e===n?t<=e?i:r:(e===-1/0?l=-l:n===1/0?l-=e:l=(l-e)/(n-e),l=a(l),i===-1/0?l=-l:r===1/0?l+=i:l=l*(r-i)+i,l)}function colorToRgba(t){var e=normalizeCssColor(t);return null===e?t:"rgba("+((4278190080&(e=e||0))>>>24)+", "+((16711680&e)>>>16)+", "+((65280&e)>>>8)+", "+(255&e)/255+")"}var stringShapeRegex=/[0-9\.-]+/g;function createInterpolationFromStringOutputRange(t){var e=t.outputRange;invariant_1(e.length>=2,"Bad output range"),checkPattern(e=e.map(colorToRgba));var n=e[0].match(stringShapeRegex).map(function(){return[]});e.forEach(function(t){t.match(stringShapeRegex).forEach(function(t,e){n[e].push(+t)})});var i=e[0].match(stringShapeRegex).map(function(e,i){return Interpolation.create(_extends$1({},t,{outputRange:n[i]}))}),r=/^rgb/.test(e[0]);return function(t){var n=0;return e[0].replace(stringShapeRegex,function(){var e=i[n++](t);return String(r&&n<4?Math.round(e):e)})}}function checkPattern(t){for(var e=t[0].replace(stringShapeRegex,""),n=1;n<t.length;++n)invariant_1(e===t[n].replace(stringShapeRegex,""),"invalid pattern "+t[0]+" and "+t[n])}function findRange(t,e){for(var n=1;n<e.length-1&&!(e[n]>=t);++n);return n-1}function checkValidInputRange(t){invariant_1(t.length>=2,"inputRange must have at least 2 elements");for(var e=1;e<t.length;++e)invariant_1(t[e]>=t[e-1],"inputRange must be monotonically increasing "+t)}function checkInfiniteRange(t,e){invariant_1(e.length>=2,t+" must have at least 2 elements"),invariant_1(2!==e.length||e[0]!==-1/0||e[1]!==1/0,t+"cannot be ]-infinity;+infinity[ "+e)}var Interpolation_1=Interpolation,_uniqueId=0,guid=function(){return String(_uniqueId++)},_inheritsLoose$2=require$$0.inheritsLoose,AnimatedInterpolation=function(t){function e(e,n){var i;return(i=t.call(this)||this)._parent=e,i._interpolation=n,i._listeners={},i}_inheritsLoose$2(e,t);var n=e.prototype;return n.__getValue=function(){var t=this._parent.__getValue();return invariant_1("number"==typeof t,"Cannot interpolate an input which is not a number."),this._interpolation(t)},n.addListener=function(t){var e=this;this._parentListener||(this._parentListener=this._parent.addListener(function(){for(var t in e._listeners)e._listeners[t]({value:e.__getValue()})}));var n=guid();return this._listeners[n]=t,n},n.removeListener=function(t){delete this._listeners[t]},n.interpolate=function(t){return new e(this,Interpolation_1.create(t))},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this),this._parentListener=this._parent.removeListener(this._parentListener)},e}(AnimatedWithChildren_1),AnimatedInterpolation_1=AnimatedInterpolation,Animation=function(){function t(){}var e=t.prototype;return e.start=function(t,e,n,i){},e.stop=function(){},e.__debouncedOnEnd=function(t){var e=this.__onEnd;this.__onEnd=null,e&&e(t)},t}(),Animation_1=Animation;function SetPolyfill(){this._cache=[]}SetPolyfill.prototype.add=function(t){-1===this._cache.indexOf(t)&&this._cache.push(t)},SetPolyfill.prototype.forEach=function(t){this._cache.forEach(t)};var SetPolyfill_1=SetPolyfill,_inheritsLoose$3=require$$0.inheritsLoose,Set=commonjsGlobal.Set||SetPolyfill_1;function _flush(t){var e=new Set;!function t(n){"function"==typeof n.update?e.add(n):n.__getChildren().forEach(t)}(t),e.forEach(function(t){return t.update()})}var AnimatedValue=function(t){function e(e){var n;return(n=t.call(this)||this)._value=e,n._offset=0,n._animation=null,n._listeners={},n}_inheritsLoose$3(e,t);var n=e.prototype;return n.__detach=function(){this.stopAnimation()},n.__getValue=function(){return this._value+this._offset},n.setValue=function(t){this._animation&&(this._animation.stop(),this._animation=null),this._updateValue(t)},n.setOffset=function(t){this._offset=t},n.flattenOffset=function(){this._value+=this._offset,this._offset=0},n.addListener=function(t){var e=guid();return this._listeners[e]=t,e},n.removeListener=function(t){delete this._listeners[t]},n.removeAllListeners=function(){this._listeners={}},n.stopAnimation=function(t){this.stopTracking(),this._animation&&this._animation.stop(),this._animation=null,t&&t(this.__getValue())},n.interpolate=function(t){return new AnimatedInterpolation_1(this,Interpolation_1.create(t))},n.animate=function(t,e){var n=this,i=null;t.__isInteraction&&(i=InteractionManager_1.current.createInteractionHandle());var r=this._animation;this._animation&&this._animation.stop(),this._animation=t,t.start(this._value,function(t){n._updateValue(t)},function(t){n._animation=null,null!==i&&InteractionManager_1.current.clearInteractionHandle(i),e&&e(t)},r)},n.stopTracking=function(){this._tracking&&this._tracking.__detach(),this._tracking=null},n.track=function(t){this.stopTracking(),this._tracking=t},n._updateValue=function(t){for(var e in this._value=t,_flush(this),this._listeners)this._listeners[e]({value:this.__getValue()})},e}(AnimatedWithChildren_1),AnimatedValue_1=AnimatedValue,_extends$2=require$$0.extends,_inheritsLoose$4=require$$0.inheritsLoose,AnimatedTracking=function(t){function e(e,n,i,r,a){var o;return(o=t.call(this)||this)._value=e,o._parent=n,o._animationClass=i,o._animationConfig=r,o._callback=a,o.__attach(),o}_inheritsLoose$4(e,t);var n=e.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},n.update=function(){this._value.animate(new this._animationClass(_extends$2({},this._animationConfig,{toValue:this._animationConfig.toValue.__getValue()})),this._callback)},e}(Animated_1),AnimatedTracking_1=AnimatedTracking,RequestAnimationFrame={current:function(t){return commonjsGlobal.requestAnimationFrame(t)},inject:function(t){RequestAnimationFrame.current=t}},RequestAnimationFrame_1=RequestAnimationFrame,CancelAnimationFrame={current:function(t){return commonjsGlobal.cancelAnimationFrame(t)},inject:function(t){CancelAnimationFrame.current=t}},CancelAnimationFrame_1=CancelAnimationFrame;function tensionFromOrigamiValue(t){return 3.62*(t-30)+194}function frictionFromOrigamiValue(t){return 3*(t-8)+25}function fromOrigamiTensionAndFriction(t,e){return{tension:tensionFromOrigamiValue(t),friction:frictionFromOrigamiValue(e)}}function fromBouncinessAndSpeed(t,e){function n(t,e,n){return(t-e)/(n-e)}function i(t,e,n){return e+t*(n-e)}var r=n(t/1.7,0,20);r=i(r,0,.8);var a,o,s,l,u=i(n(e/1.7,0,20),.5,200),c=(a=r,o=(s=u)<=18?(l=s,7e-4*Math.pow(l,3)-.031*Math.pow(l,2)+.64*l+1.28):s>18&&s<=44?function(t){return 44e-6*Math.pow(t,3)-.006*Math.pow(t,2)+.36*t+2}(s):function(t){return 4.5e-7*Math.pow(t,3)-332e-6*Math.pow(t,2)+.1078*t+5.84}(s),function(t,e,n){return t*n+(1-t)*e}(2*a-a*a,o,.01));return{tension:tensionFromOrigamiValue(u),friction:frictionFromOrigamiValue(c)}}var SpringConfig={fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction,fromBouncinessAndSpeed:fromBouncinessAndSpeed},_inheritsLoose$5=require$$0.inheritsLoose;function withDefault(t,e){return void 0===t||null===t?e:t}var SpringAnimation=function(t){function e(e){var n,i;return(n=t.call(this)||this)._overshootClamping=withDefault(e.overshootClamping,!1),n._restDisplacementThreshold=withDefault(e.restDisplacementThreshold,.001),n._restSpeedThreshold=withDefault(e.restSpeedThreshold,.001),n._initialVelocity=e.velocity,n._lastVelocity=withDefault(e.velocity,0),n._toValue=e.toValue,n.__isInteraction=void 0===e.isInteraction||e.isInteraction,void 0!==e.bounciness||void 0!==e.speed?(invariant_1(void 0===e.tension&&void 0===e.friction,"You can only define bounciness/speed or tension/friction but not both"),i=SpringConfig.fromBouncinessAndSpeed(withDefault(e.bounciness,8),withDefault(e.speed,12))):i=SpringConfig.fromOrigamiTensionAndFriction(withDefault(e.tension,40),withDefault(e.friction,7)),n._tension=i.tension,n._friction=i.friction,n}_inheritsLoose$5(e,t);var n=e.prototype;return n.start=function(t,n,i,r){if(this.__active=!0,this._startPosition=t,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=i,this._lastTime=Date.now(),r instanceof e){var a=r.getInternalState();this._lastPosition=a.lastPosition,this._lastVelocity=a.lastVelocity,this._lastTime=a.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.onUpdate=function(){var t=this._lastPosition,e=this._lastVelocity,n=this._lastPosition,i=this._lastVelocity,r=Date.now();r>this._lastTime+64&&(r=this._lastTime+64);for(var a=Math.floor((r-this._lastTime)/1),o=0;o<a;++o){var s=e,l=this._tension*(this._toValue-n)-this._friction*i,u=(n=t+.001*s/2,i=e+.001*l/2),c=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*u/2;var h=i=e+.001*c/2,_=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*h/2;var f=i=e+.001*_/2,p=this._tension*(this._toValue-n)-this._friction*i;n=t+.001*h/2,i=e+.001*_/2,t+=.001*((s+2*(u+h)+f)/6),e+=.001*((l+2*(c+_)+p)/6)}if(this._lastTime=r,this._lastPosition=t,this._lastVelocity=e,this._onUpdate(t),this.__active){var d=!1;this._overshootClamping&&0!==this._tension&&(d=this._startPosition<this._toValue?t>this._toValue:t<this._toValue);var m=Math.abs(e)<=this._restSpeedThreshold,g=!0;if(0!==this._tension&&(g=Math.abs(this._toValue-t)<=this._restDisplacementThreshold),d||m&&g)return 0!==this._tension&&this._onUpdate(this._toValue),void this.__debouncedOnEnd({finished:!0});this._animationFrame=RequestAnimationFrame_1.current(this.onUpdate.bind(this))}},n.stop=function(){this.__active=!1,CancelAnimationFrame_1.current(this._animationFrame),this.__debouncedOnEnd({finished:!1})},e}(Animation_1),SpringAnimation_1=SpringAnimation,_inheritsLoose$6=require$$0.inheritsLoose,AnimatedTransform=function(t){function e(e){var n;return(n=t.call(this)||this)._transforms=e,n}_inheritsLoose$6(e,t);var n=e.prototype;return n.__getValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof Animated_1?i.__getValue():i}return e})},n.__getAnimatedValue=function(){return this._transforms.map(function(t){var e={};for(var n in t){var i=t[n];e[n]=i instanceof Animated_1?i.__getAnimatedValue():i}return e})},n.__attach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof Animated_1&&i.__addChild(t)}})},n.__detach=function(){var t=this;this._transforms.forEach(function(e){for(var n in e){var i=e[n];i instanceof Animated_1&&i.__removeChild(t)}})},e}(AnimatedWithChildren_1),AnimatedTransform_1=AnimatedTransform,FlattenStyle={current:function(t){return t},inject:function(t){FlattenStyle.current=t}},FlattenStyle_1=FlattenStyle,_extends$3=require$$0.extends,_inheritsLoose$7=require$$0.inheritsLoose,AnimatedStyle=function(t){function e(e){var n;return n=t.call(this)||this,!(e=FlattenStyle_1.current(e)||{}).transform||e.transform instanceof Animated_1||(e=_extends$3({},e,{transform:new AnimatedTransform_1(e.transform)})),n._style=e,n}_inheritsLoose$7(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._style){var n=this._style[e];t[e]=n instanceof Animated_1?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._style){var n=this._style[e];n instanceof Animated_1&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._style){var e=this._style[t];e instanceof Animated_1&&e.__addChild(this)}},n.__detach=function(){for(var t in this._style){var e=this._style[t];e instanceof Animated_1&&e.__removeChild(this)}},e}(AnimatedWithChildren_1),AnimatedStyle_1=AnimatedStyle,_extends$4=require$$0.extends,_inheritsLoose$8=require$$0.inheritsLoose,AnimatedProps=function(t){function e(e,n){var i;return i=t.call(this)||this,e.style&&(e=_extends$4({},e,{style:new AnimatedStyle_1(e.style)})),i._props=e,i._callback=n,i.__attach(),i}_inheritsLoose$8(e,t);var n=e.prototype;return n.__getValue=function(){var t={};for(var e in this._props){var n=this._props[e];t[e]=n instanceof Animated_1?n.__getValue():n}return t},n.__getAnimatedValue=function(){var t={};for(var e in this._props){var n=this._props[e];n instanceof Animated_1&&(t[e]=n.__getAnimatedValue())}return t},n.__attach=function(){for(var t in this._props){var e=this._props[t];e instanceof Animated_1&&e.__addChild(this)}},n.__detach=function(){for(var t in this._props){var e=this._props[t];e instanceof Animated_1&&e.__removeChild(this)}},n.update=function(){this._callback()},e}(Animated_1),AnimatedProps_1=AnimatedProps,ApplyAnimatedValues={current:function(t,e){if(!t.setNativeProps)return!1;t.setNativeProps(e)},transformStyles:function(t){return t},inject:function(t,e){ApplyAnimatedValues.current=t,ApplyAnimatedValues.transformStyles=e}},ApplyAnimatedValues_1=ApplyAnimatedValues,_extends$5=require$$0.extends,_objectWithoutProperties$1=require$$0.objectWithoutProperties,_inheritsLoose$9=require$$0.inheritsLoose;function createAnimatedComponent(t){var e=function(e){function n(){return e.apply(this,arguments)||this}_inheritsLoose$9(n,e);var i=n.prototype;return i.componentWillUnmount=function(){this._propsAnimated&&this._propsAnimated.__detach()},i.setNativeProps=function(t){this.refName&&ApplyAnimatedValues_1.current(this.refName,t,this)||this.forceUpdate()},i.componentWillMount=function(){this.attachProps(this.props)},i.attachProps=function(t){var e=this,n=this._propsAnimated;this._propsAnimated=new AnimatedProps_1(t,function(){e.refName&&ApplyAnimatedValues_1.current(e.refName,e._propsAnimated.__getAnimatedValue(),e)||e.forceUpdate()}),n&&n.__detach()},i.componentWillReceiveProps=function(t){this.attachProps(t)},i.render=function(){var e=this,n=this._propsAnimated.__getValue(),i=n.style,r=_objectWithoutProperties$1(n,["style"]);return react.createElement(t,_extends$5({},r,{style:ApplyAnimatedValues_1.transformStyles(i),ref:function(t){return e.refName=t}}))},n}(react.Component);return"production"!==process.env.NODE_ENV&&(e.propTypes={style:function(e,n,i){t.propTypes}}),e}var createAnimatedComponent_1=createAnimatedComponent,spring=function(t,e){return{start:function(n){var i=t,r=e;i.stopTracking(),e.toValue instanceof Animated_1?i.track(new AnimatedTracking_1(i,e.toValue,SpringAnimation_1,r,n)):i.animate(new SpringAnimation_1(r),n)},stop:function(){t.stopAnimation()}}},src={Value:AnimatedValue_1,spring:spring,createAnimatedComponent:createAnimatedComponent_1,inject:{ApplyAnimatedValues:ApplyAnimatedValues_1.inject,InteractionManager:InteractionManager_1.inject,FlattenStyle:FlattenStyle_1.inject,RequestAnimationFrame:RequestAnimationFrame_1.inject,CancelAnimationFrame:CancelAnimationFrame_1.inject},__PropsOnlyForTests:AnimatedProps_1},src_1=src.Value,src_2=src.spring,src_3=src.createAnimatedComponent,src_4=src.inject,src_5=src.__PropsOnlyForTests;exports.default=src,exports.Value=src_1,exports.spring=src_2,exports.createAnimatedComponent=src_3,exports.inject=src_4,exports.__PropsOnlyForTests=src_5;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc