New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@welldone-software/why-did-you-render

Package Overview
Dependencies
Maintainers
2
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@welldone-software/why-did-you-render - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

26

dist/cjs/whyDidYouRender.js

@@ -180,4 +180,9 @@ 'use strict';

var diffTypesDescriptions = (_diffTypesDescription = {}, _defineProperty(_diffTypesDescription, diffTypes.different, 'different objects.'), _defineProperty(_diffTypesDescription, diffTypes.deepEquals, 'different objects that are equal by value.'), _defineProperty(_diffTypesDescription, diffTypes.date, 'different date objects with the same value.'), _defineProperty(_diffTypesDescription, diffTypes.regex, 'different regular expressions with the same value.'), _defineProperty(_diffTypesDescription, diffTypes.reactElement, 'different React elements with the same displayName.'), _defineProperty(_diffTypesDescription, diffTypes.function, 'different functions with the same name.'), _diffTypesDescription);
var inHotReload = false;
function shouldLog(reason, Component, options) {
if (inHotReload) {
return false;
}
if (options.logOnDifferentValues) {

@@ -256,3 +261,19 @@ return true;

}
function createDefaultNotifier(hotReloadBufferMs) {
if (hotReloadBufferMs) {
if (module && module.hot && module.hot.addStatusHandler) {
module.hot.addStatusHandler(function (status) {
if (status === 'idle') {
inHotReload = true;
setTimeout(function () {
inHotReload = false;
}, hotReloadBufferMs);
}
});
}
}
return defaultNotifier;
}
var emptyFn = function emptyFn() {};

@@ -272,6 +293,7 @@

var notifier = userOptions.notifier || createDefaultNotifier(userOptions.hasOwnProperty('hotReloadBufferMs') ? userOptions.hotReloadBufferMs : 500);
return _objectSpread({
include: null,
exclude: null,
notifier: defaultNotifier,
notifier: notifier,
onlyLogs: false,

@@ -286,3 +308,3 @@ consoleLog: console.log,

function getDisplayName(type) {
return _isString(type) ? type : type.displayName || type.name;
return type.displayName || type.name || (_isString(type) ? type : undefined);
}

@@ -289,0 +311,0 @@

2

dist/cjs/whyDidYouRender.min.js

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

"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var _isString=_interopDefault(require("lodash/isString")),_reduce=_interopDefault(require("lodash/reduce")),_has=_interopDefault(require("lodash/has")),_keys=_interopDefault(require("lodash/keys")),_isFunction=_interopDefault(require("lodash/isFunction")),_isRegExp=_interopDefault(require("lodash/isRegExp")),_isDate=_interopDefault(require("lodash/isDate")),_isPlainObject=_interopDefault(require("lodash/isPlainObject")),_isArray=_interopDefault(require("lodash/isArray"));function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_defineProperty(e,t,r[t])})}return e}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,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var _diffTypesDescription,diffTypes={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},moreInfoUrl="http://bit.ly/wdyr02",diffTypesDescriptions=(_defineProperty(_diffTypesDescription={},diffTypes.different,"different objects."),_defineProperty(_diffTypesDescription,diffTypes.deepEquals,"different objects that are equal by value."),_defineProperty(_diffTypesDescription,diffTypes.date,"different date objects with the same value."),_defineProperty(_diffTypesDescription,diffTypes.regex,"different regular expressions with the same value."),_defineProperty(_diffTypesDescription,diffTypes.reactElement,"different React elements with the same displayName."),_defineProperty(_diffTypesDescription,diffTypes.function,"different functions with the same name."),_diffTypesDescription);function shouldLog(e,t,r){return!!r.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some(function(e){return e.diffType===diffTypes.different})||e.stateDifferences&&e.stateDifferences.some(function(e){return e.diffType===diffTypes.different})))}function logDifference(e,t,r,n,o,i,f){o&&o.length>0?(f.consoleLog(_defineProperty({},t,e),"".concat(r," of ").concat(n," changes:")),o.forEach(function(e){var t=e.pathString,r=e.diffType,o=e.prevValue,i=e.nextValue;f.consoleGroup("%c".concat(n,".%c").concat(t,"%c"),"color:blue;","color:red;","color:black;"),f.consoleLog("".concat(diffTypesDescriptions[r]," (more info at ").concat(moreInfoUrl,")")),f.consoleLog(_defineProperty({},"prev ".concat(t),o),"!==",_defineProperty({},"next ".concat(t),i)),f.consoleGroupEnd()})):o&&(f.consoleLog(_defineProperty({},t,e),"".concat(r," the ").concat(n," object itself changed but it's values are all equal."),"props"===n?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(moreInfoUrl)),f.consoleLog("prev ".concat(n,":"),i.prev," !== ",i.next,":next ".concat(n)))}function defaultNotifier(e){var t=e.Component,r=e.displayName,n=e.prevProps,o=e.prevState,i=e.nextProps,f=e.nextState,a=e.reason,s=e.options;if(shouldLog(a,t,s)){s.consoleGroup("%c".concat(r),"color: #058;");var c="Re-rendered because";a.propsDifferences&&(logDifference(t,r,c,"props",a.propsDifferences,{prev:n,next:i},s),c="And because"),a.stateDifferences&&logDifference(t,r,c,"state",a.stateDifferences,{prev:o,next:f},s),a.propsDifferences||a.stateDifferences||s.consoleLog(_defineProperty({},r,t),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat(moreInfoUrl)),s.consoleGroupEnd()}}var emptyFn=function(){};function normalizeOptions(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,r=console.groupEnd;return e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,r=emptyFn),_objectSpread({include:null,exclude:null,notifier:defaultNotifier,onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:r,logOnDifferentValues:!1},e)}function getDisplayName(e){return _isString(e)?e:e.displayName||e.name}var hasElementType="undefined"!=typeof Element,hasSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE$1=hasSymbol?Symbol.for("react.element"):60103,isReactElement=function(e){return e.$$typeof===REACT_ELEMENT_TYPE$1};function trackDiff(e,t,r,n,o){return r.push({diffType:o,pathString:n,prevValue:e,nextValue:t}),o!==diffTypes.different}function accumulateDeepEqualDiffs(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===t)return!0;if(!e||!t)return trackDiff(e,t,r,n,diffTypes.different);if(_isArray(e)&&_isArray(t)){var o=e.length;if(o!==t.length)return trackDiff(e,t,r,n,diffTypes.different);for(var i=!0,f=o;0!=f--;)accumulateDeepEqualDiffs(e[f],t[f],r,"".concat(n,"[").concat(f,"]"))||(i=!1);return trackDiff(e,t,r,n,i?diffTypes.deepEquals:diffTypes.different)}if(_isDate(e)&&_isDate(t))return e.getTime()===t.getTime()?trackDiff(e,t,r,n,diffTypes.date):trackDiff(e,t,r,n,diffTypes.different);if(_isRegExp(e)&&_isRegExp(t))return e.toString()===t.toString()?trackDiff(e,t,r,n,diffTypes.regex):trackDiff(e,t,r,n,diffTypes.different);if(hasElementType&&e instanceof Element&&t instanceof Element)return trackDiff(e,t,r,n,diffTypes.different);if(isReactElement(e)&&isReactElement(t))return e.type===t.type?trackDiff(e,t,r,n,diffTypes.reactElement):trackDiff(e,t,r,n,diffTypes.different);if(_isFunction(e)&&_isFunction(t))return e.name===t.name?trackDiff(e,t,r,n,diffTypes.function):trackDiff(e,t,r,n,diffTypes.different);if(_isPlainObject(e)&&_isPlainObject(t)){var a=_keys(e),s=a.length;if(s!==_keys(t).length)return trackDiff(e,t,r,n,diffTypes.different);for(var c=s;0!=c--;)if(!_has(t,a[c]))return trackDiff(e,t,r,n,diffTypes.different);for(var p=!0,u=s;0!=u--;){var l=a[u];accumulateDeepEqualDiffs(e[l],t[l],r,"".concat(n,".").concat(l))||(p=!1)}return trackDiff(e,t,r,n,p?diffTypes.deepEquals:diffTypes.different)}return trackDiff(e,t,r,n,diffTypes.different)}function calculateDeepEqualDiffs(e,t,r){try{var n=[];return accumulateDeepEqualDiffs(e,t,n,r),n}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var emptyObject={};function findObjectsDifferences(e,t){if(e===t)return!1;var r=e||emptyObject,n=t||emptyObject,o=_keys(_objectSpread({},r,n));return _reduce(o,function(e,t){var o=calculateDeepEqualDiffs(r[t],n[t],t);return o&&(e=_toConsumableArray(e||[]).concat(_toConsumableArray(o))),e},[])}function getUpdateReason(e,t,r,n){return{propsDifferences:findObjectsDifferences(e,r,"props"),stateDifferences:findObjectsDifferences(t,n,"state")}}function getUpdateInfo(e){var t=e.Component,r=e.prevProps,n=e.prevState,o=e.nextProps,i=e.nextState,f=e.options;return{Component:t,displayName:getDisplayName(t),prevProps:r,prevState:n,nextProps:o,nextState:i,options:f,reason:getUpdateReason(r,n,o,i)}}function shouldInclude(e,t){return t.include&&t.include.length>0&&t.include.some(function(t){return t.test(e)})}function shouldExclude(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some(function(t){return t.test(e)})}function shouldTrack(e,t,r){return!shouldExclude(t,r)&&!(!e.whyDidYouRender&&!shouldInclude(t,r))}var patchClassComponent=function(e,t,r,n){var o=function(t){function r(){return _classCallCheck(this,r),_possibleConstructorReturn(this,_getPrototypeOf(r).apply(this,arguments))}return _inherits(r,e),_createClass(r,[{key:"render",value:function(){return n.notifier(getUpdateInfo({Component:e,prevProps:this._prevProps,prevState:this._prevState,nextProps:this.props,nextState:this.state,options:n})),this._prevProps=this.props,this._prevState=this.state,_get(_getPrototypeOf(r.prototype),"render",this).call(this)}}]),r}();return Object.assign(o,e,{displayName:t}),o},patchFunctionalComponent=function(e,t,r,n){var o=function(t){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,_getPrototypeOf(o).apply(this,arguments))}return _inherits(o,r.Component),_createClass(o,[{key:"componentDidUpdate",value:function(t){n.notifier(getUpdateInfo({Component:e,prevProps:t,nextProps:this.props,options:n}))}},{key:"render",value:function(){return e(this.props)}}]),o}();return Object.assign(o,e,{displayName:t}),o};function createPatchedComponent(e,t,r,n,o){return t.prototype&&"function"==typeof t.prototype.render?patchClassComponent(t,r,n,o):patchFunctionalComponent(t,r,n,o)}function getPatchedComponent(e,t,r,n,o){if(e.has(t))return e.get(t);var i=createPatchedComponent(e,t,r,n,o);return e.set(t,i),i}function whyDidYouRender(e,t){var r=normalizeOptions(t),n=e.createElement,o=new Map;return e.createElement=function(t){for(var i=getDisplayName(t),f="function"==typeof t&&shouldTrack(t,i,r),a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];if(!f)return n.apply(e,[t].concat(s));var p=getPatchedComponent(o,t,i,e,r);return n.apply(e,[p].concat(s))},e.__REVERT_WHY_DID_YOU_RENDER__=function(){e.createElement=n,delete e.__REVERT_WHY_DID_YOU_RENDER__,o.clear()},e}module.exports=whyDidYouRender;
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var _isString=_interopDefault(require("lodash/isString")),_reduce=_interopDefault(require("lodash/reduce")),_has=_interopDefault(require("lodash/has")),_keys=_interopDefault(require("lodash/keys")),_isFunction=_interopDefault(require("lodash/isFunction")),_isRegExp=_interopDefault(require("lodash/isRegExp")),_isDate=_interopDefault(require("lodash/isDate")),_isPlainObject=_interopDefault(require("lodash/isPlainObject")),_isArray=_interopDefault(require("lodash/isArray"));function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_defineProperty(e,t,r[t])})}return e}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,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var _diffTypesDescription,diffTypes={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},moreInfoUrl="http://bit.ly/wdyr02",diffTypesDescriptions=(_defineProperty(_diffTypesDescription={},diffTypes.different,"different objects."),_defineProperty(_diffTypesDescription,diffTypes.deepEquals,"different objects that are equal by value."),_defineProperty(_diffTypesDescription,diffTypes.date,"different date objects with the same value."),_defineProperty(_diffTypesDescription,diffTypes.regex,"different regular expressions with the same value."),_defineProperty(_diffTypesDescription,diffTypes.reactElement,"different React elements with the same displayName."),_defineProperty(_diffTypesDescription,diffTypes.function,"different functions with the same name."),_diffTypesDescription),inHotReload=!1;function shouldLog(e,t,r){return!inHotReload&&(!!r.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some(function(e){return e.diffType===diffTypes.different})||e.stateDifferences&&e.stateDifferences.some(function(e){return e.diffType===diffTypes.different}))))}function logDifference(e,t,r,n,o,i,f){o&&o.length>0?(f.consoleLog(_defineProperty({},t,e),"".concat(r," of ").concat(n," changes:")),o.forEach(function(e){var t=e.pathString,r=e.diffType,o=e.prevValue,i=e.nextValue;f.consoleGroup("%c".concat(n,".%c").concat(t,"%c"),"color:blue;","color:red;","color:black;"),f.consoleLog("".concat(diffTypesDescriptions[r]," (more info at ").concat(moreInfoUrl,")")),f.consoleLog(_defineProperty({},"prev ".concat(t),o),"!==",_defineProperty({},"next ".concat(t),i)),f.consoleGroupEnd()})):o&&(f.consoleLog(_defineProperty({},t,e),"".concat(r," the ").concat(n," object itself changed but it's values are all equal."),"props"===n?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(moreInfoUrl)),f.consoleLog("prev ".concat(n,":"),i.prev," !== ",i.next,":next ".concat(n)))}function defaultNotifier(e){var t=e.Component,r=e.displayName,n=e.prevProps,o=e.prevState,i=e.nextProps,f=e.nextState,a=e.reason,s=e.options;if(shouldLog(a,t,s)){s.consoleGroup("%c".concat(r),"color: #058;");var c="Re-rendered because";a.propsDifferences&&(logDifference(t,r,c,"props",a.propsDifferences,{prev:n,next:i},s),c="And because"),a.stateDifferences&&logDifference(t,r,c,"state",a.stateDifferences,{prev:o,next:f},s),a.propsDifferences||a.stateDifferences||s.consoleLog(_defineProperty({},r,t),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat(moreInfoUrl)),s.consoleGroupEnd()}}function createDefaultNotifier(e){return e&&module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler(function(t){"idle"===t&&(inHotReload=!0,setTimeout(function(){inHotReload=!1},e))}),defaultNotifier}var emptyFn=function(){};function normalizeOptions(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,r=console.groupEnd;return e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,r=emptyFn),_objectSpread({include:null,exclude:null,notifier:e.notifier||createDefaultNotifier(e.hasOwnProperty("hotReloadBufferMs")?e.hotReloadBufferMs:500),onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:r,logOnDifferentValues:!1},e)}function getDisplayName(e){return e.displayName||e.name||(_isString(e)?e:void 0)}var hasElementType="undefined"!=typeof Element,hasSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE$1=hasSymbol?Symbol.for("react.element"):60103,isReactElement=function(e){return e.$$typeof===REACT_ELEMENT_TYPE$1};function trackDiff(e,t,r,n,o){return r.push({diffType:o,pathString:n,prevValue:e,nextValue:t}),o!==diffTypes.different}function accumulateDeepEqualDiffs(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===t)return!0;if(!e||!t)return trackDiff(e,t,r,n,diffTypes.different);if(_isArray(e)&&_isArray(t)){var o=e.length;if(o!==t.length)return trackDiff(e,t,r,n,diffTypes.different);for(var i=!0,f=o;0!=f--;)accumulateDeepEqualDiffs(e[f],t[f],r,"".concat(n,"[").concat(f,"]"))||(i=!1);return trackDiff(e,t,r,n,i?diffTypes.deepEquals:diffTypes.different)}if(_isDate(e)&&_isDate(t))return e.getTime()===t.getTime()?trackDiff(e,t,r,n,diffTypes.date):trackDiff(e,t,r,n,diffTypes.different);if(_isRegExp(e)&&_isRegExp(t))return e.toString()===t.toString()?trackDiff(e,t,r,n,diffTypes.regex):trackDiff(e,t,r,n,diffTypes.different);if(hasElementType&&e instanceof Element&&t instanceof Element)return trackDiff(e,t,r,n,diffTypes.different);if(isReactElement(e)&&isReactElement(t))return e.type===t.type?trackDiff(e,t,r,n,diffTypes.reactElement):trackDiff(e,t,r,n,diffTypes.different);if(_isFunction(e)&&_isFunction(t))return e.name===t.name?trackDiff(e,t,r,n,diffTypes.function):trackDiff(e,t,r,n,diffTypes.different);if(_isPlainObject(e)&&_isPlainObject(t)){var a=_keys(e),s=a.length;if(s!==_keys(t).length)return trackDiff(e,t,r,n,diffTypes.different);for(var c=s;0!=c--;)if(!_has(t,a[c]))return trackDiff(e,t,r,n,diffTypes.different);for(var u=!0,p=s;0!=p--;){var l=a[p];accumulateDeepEqualDiffs(e[l],t[l],r,"".concat(n,".").concat(l))||(u=!1)}return trackDiff(e,t,r,n,u?diffTypes.deepEquals:diffTypes.different)}return trackDiff(e,t,r,n,diffTypes.different)}function calculateDeepEqualDiffs(e,t,r){try{var n=[];return accumulateDeepEqualDiffs(e,t,n,r),n}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var emptyObject={};function findObjectsDifferences(e,t){if(e===t)return!1;var r=e||emptyObject,n=t||emptyObject,o=_keys(_objectSpread({},r,n));return _reduce(o,function(e,t){var o=calculateDeepEqualDiffs(r[t],n[t],t);return o&&(e=_toConsumableArray(e||[]).concat(_toConsumableArray(o))),e},[])}function getUpdateReason(e,t,r,n){return{propsDifferences:findObjectsDifferences(e,r,"props"),stateDifferences:findObjectsDifferences(t,n,"state")}}function getUpdateInfo(e){var t=e.Component,r=e.prevProps,n=e.prevState,o=e.nextProps,i=e.nextState,f=e.options;return{Component:t,displayName:getDisplayName(t),prevProps:r,prevState:n,nextProps:o,nextState:i,options:f,reason:getUpdateReason(r,n,o,i)}}function shouldInclude(e,t){return t.include&&t.include.length>0&&t.include.some(function(t){return t.test(e)})}function shouldExclude(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some(function(t){return t.test(e)})}function shouldTrack(e,t,r){return!shouldExclude(t,r)&&!(!e.whyDidYouRender&&!shouldInclude(t,r))}var patchClassComponent=function(e,t,r,n){var o=function(t){function r(){return _classCallCheck(this,r),_possibleConstructorReturn(this,_getPrototypeOf(r).apply(this,arguments))}return _inherits(r,e),_createClass(r,[{key:"render",value:function(){return n.notifier(getUpdateInfo({Component:e,prevProps:this._prevProps,prevState:this._prevState,nextProps:this.props,nextState:this.state,options:n})),this._prevProps=this.props,this._prevState=this.state,_get(_getPrototypeOf(r.prototype),"render",this).call(this)}}]),r}();return Object.assign(o,e,{displayName:t}),o},patchFunctionalComponent=function(e,t,r,n){var o=function(t){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,_getPrototypeOf(o).apply(this,arguments))}return _inherits(o,r.Component),_createClass(o,[{key:"componentDidUpdate",value:function(t){n.notifier(getUpdateInfo({Component:e,prevProps:t,nextProps:this.props,options:n}))}},{key:"render",value:function(){return e(this.props)}}]),o}();return Object.assign(o,e,{displayName:t}),o};function createPatchedComponent(e,t,r,n,o){return t.prototype&&"function"==typeof t.prototype.render?patchClassComponent(t,r,n,o):patchFunctionalComponent(t,r,n,o)}function getPatchedComponent(e,t,r,n,o){if(e.has(t))return e.get(t);var i=createPatchedComponent(e,t,r,n,o);return e.set(t,i),i}function whyDidYouRender(e,t){var r=normalizeOptions(t),n=e.createElement,o=new Map;return e.createElement=function(t){for(var i=getDisplayName(t),f="function"==typeof t&&shouldTrack(t,i,r),a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];if(!f)return n.apply(e,[t].concat(s));var u=getPatchedComponent(o,t,i,e,r);return n.apply(e,[u].concat(s))},e.__REVERT_WHY_DID_YOU_RENDER__=function(){e.createElement=n,delete e.__REVERT_WHY_DID_YOU_RENDER__,o.clear()},e}module.exports=whyDidYouRender;
//# sourceMappingURL=whyDidYouRender.min.js.map

@@ -176,4 +176,9 @@ import _isString from 'lodash/isString';

var diffTypesDescriptions = (_diffTypesDescription = {}, _defineProperty(_diffTypesDescription, diffTypes.different, 'different objects.'), _defineProperty(_diffTypesDescription, diffTypes.deepEquals, 'different objects that are equal by value.'), _defineProperty(_diffTypesDescription, diffTypes.date, 'different date objects with the same value.'), _defineProperty(_diffTypesDescription, diffTypes.regex, 'different regular expressions with the same value.'), _defineProperty(_diffTypesDescription, diffTypes.reactElement, 'different React elements with the same displayName.'), _defineProperty(_diffTypesDescription, diffTypes.function, 'different functions with the same name.'), _diffTypesDescription);
var inHotReload = false;
function shouldLog(reason, Component, options) {
if (inHotReload) {
return false;
}
if (options.logOnDifferentValues) {

@@ -252,3 +257,19 @@ return true;

}
function createDefaultNotifier(hotReloadBufferMs) {
if (hotReloadBufferMs) {
if (module && module.hot && module.hot.addStatusHandler) {
module.hot.addStatusHandler(function (status) {
if (status === 'idle') {
inHotReload = true;
setTimeout(function () {
inHotReload = false;
}, hotReloadBufferMs);
}
});
}
}
return defaultNotifier;
}
var emptyFn = function emptyFn() {};

@@ -268,6 +289,7 @@

var notifier = userOptions.notifier || createDefaultNotifier(userOptions.hasOwnProperty('hotReloadBufferMs') ? userOptions.hotReloadBufferMs : 500);
return _objectSpread({
include: null,
exclude: null,
notifier: defaultNotifier,
notifier: notifier,
onlyLogs: false,

@@ -282,3 +304,3 @@ consoleLog: console.log,

function getDisplayName(type) {
return _isString(type) ? type : type.displayName || type.name;
return type.displayName || type.name || (_isString(type) ? type : undefined);
}

@@ -285,0 +307,0 @@

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

import _isString from"lodash/isString";import _reduce from"lodash/reduce";import _has from"lodash/has";import _keys from"lodash/keys";import _isFunction from"lodash/isFunction";import _isRegExp from"lodash/isRegExp";import _isDate from"lodash/isDate";import _isPlainObject from"lodash/isPlainObject";import _isArray from"lodash/isArray";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_defineProperty(e,t,r[t])})}return e}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,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var _diffTypesDescription,diffTypes={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},moreInfoUrl="http://bit.ly/wdyr02",diffTypesDescriptions=(_defineProperty(_diffTypesDescription={},diffTypes.different,"different objects."),_defineProperty(_diffTypesDescription,diffTypes.deepEquals,"different objects that are equal by value."),_defineProperty(_diffTypesDescription,diffTypes.date,"different date objects with the same value."),_defineProperty(_diffTypesDescription,diffTypes.regex,"different regular expressions with the same value."),_defineProperty(_diffTypesDescription,diffTypes.reactElement,"different React elements with the same displayName."),_defineProperty(_diffTypesDescription,diffTypes.function,"different functions with the same name."),_diffTypesDescription);function shouldLog(e,t,r){return!!r.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some(function(e){return e.diffType===diffTypes.different})||e.stateDifferences&&e.stateDifferences.some(function(e){return e.diffType===diffTypes.different})))}function logDifference(e,t,r,n,o,i,f){o&&o.length>0?(f.consoleLog(_defineProperty({},t,e),"".concat(r," of ").concat(n," changes:")),o.forEach(function(e){var t=e.pathString,r=e.diffType,o=e.prevValue,i=e.nextValue;f.consoleGroup("%c".concat(n,".%c").concat(t,"%c"),"color:blue;","color:red;","color:black;"),f.consoleLog("".concat(diffTypesDescriptions[r]," (more info at ").concat(moreInfoUrl,")")),f.consoleLog(_defineProperty({},"prev ".concat(t),o),"!==",_defineProperty({},"next ".concat(t),i)),f.consoleGroupEnd()})):o&&(f.consoleLog(_defineProperty({},t,e),"".concat(r," the ").concat(n," object itself changed but it's values are all equal."),"props"===n?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(moreInfoUrl)),f.consoleLog("prev ".concat(n,":"),i.prev," !== ",i.next,":next ".concat(n)))}function defaultNotifier(e){var t=e.Component,r=e.displayName,n=e.prevProps,o=e.prevState,i=e.nextProps,f=e.nextState,a=e.reason,s=e.options;if(shouldLog(a,t,s)){s.consoleGroup("%c".concat(r),"color: #058;");var c="Re-rendered because";a.propsDifferences&&(logDifference(t,r,c,"props",a.propsDifferences,{prev:n,next:i},s),c="And because"),a.stateDifferences&&logDifference(t,r,c,"state",a.stateDifferences,{prev:o,next:f},s),a.propsDifferences||a.stateDifferences||s.consoleLog(_defineProperty({},r,t),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat(moreInfoUrl)),s.consoleGroupEnd()}}var emptyFn=function(){};function normalizeOptions(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,r=console.groupEnd;return e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,r=emptyFn),_objectSpread({include:null,exclude:null,notifier:defaultNotifier,onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:r,logOnDifferentValues:!1},e)}function getDisplayName(e){return _isString(e)?e:e.displayName||e.name}var hasElementType="undefined"!=typeof Element,hasSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE$1=hasSymbol?Symbol.for("react.element"):60103,isReactElement=function(e){return e.$$typeof===REACT_ELEMENT_TYPE$1};function trackDiff(e,t,r,n,o){return r.push({diffType:o,pathString:n,prevValue:e,nextValue:t}),o!==diffTypes.different}function accumulateDeepEqualDiffs(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===t)return!0;if(!e||!t)return trackDiff(e,t,r,n,diffTypes.different);if(_isArray(e)&&_isArray(t)){var o=e.length;if(o!==t.length)return trackDiff(e,t,r,n,diffTypes.different);for(var i=!0,f=o;0!=f--;)accumulateDeepEqualDiffs(e[f],t[f],r,"".concat(n,"[").concat(f,"]"))||(i=!1);return trackDiff(e,t,r,n,i?diffTypes.deepEquals:diffTypes.different)}if(_isDate(e)&&_isDate(t))return e.getTime()===t.getTime()?trackDiff(e,t,r,n,diffTypes.date):trackDiff(e,t,r,n,diffTypes.different);if(_isRegExp(e)&&_isRegExp(t))return e.toString()===t.toString()?trackDiff(e,t,r,n,diffTypes.regex):trackDiff(e,t,r,n,diffTypes.different);if(hasElementType&&e instanceof Element&&t instanceof Element)return trackDiff(e,t,r,n,diffTypes.different);if(isReactElement(e)&&isReactElement(t))return e.type===t.type?trackDiff(e,t,r,n,diffTypes.reactElement):trackDiff(e,t,r,n,diffTypes.different);if(_isFunction(e)&&_isFunction(t))return e.name===t.name?trackDiff(e,t,r,n,diffTypes.function):trackDiff(e,t,r,n,diffTypes.different);if(_isPlainObject(e)&&_isPlainObject(t)){var a=_keys(e),s=a.length;if(s!==_keys(t).length)return trackDiff(e,t,r,n,diffTypes.different);for(var c=s;0!=c--;)if(!_has(t,a[c]))return trackDiff(e,t,r,n,diffTypes.different);for(var p=!0,u=s;0!=u--;){var l=a[u];accumulateDeepEqualDiffs(e[l],t[l],r,"".concat(n,".").concat(l))||(p=!1)}return trackDiff(e,t,r,n,p?diffTypes.deepEquals:diffTypes.different)}return trackDiff(e,t,r,n,diffTypes.different)}function calculateDeepEqualDiffs(e,t,r){try{var n=[];return accumulateDeepEqualDiffs(e,t,n,r),n}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var emptyObject={};function findObjectsDifferences(e,t){if(e===t)return!1;var r=e||emptyObject,n=t||emptyObject,o=_keys(_objectSpread({},r,n));return _reduce(o,function(e,t){var o=calculateDeepEqualDiffs(r[t],n[t],t);return o&&(e=_toConsumableArray(e||[]).concat(_toConsumableArray(o))),e},[])}function getUpdateReason(e,t,r,n){return{propsDifferences:findObjectsDifferences(e,r,"props"),stateDifferences:findObjectsDifferences(t,n,"state")}}function getUpdateInfo(e){var t=e.Component,r=e.prevProps,n=e.prevState,o=e.nextProps,i=e.nextState,f=e.options;return{Component:t,displayName:getDisplayName(t),prevProps:r,prevState:n,nextProps:o,nextState:i,options:f,reason:getUpdateReason(r,n,o,i)}}function shouldInclude(e,t){return t.include&&t.include.length>0&&t.include.some(function(t){return t.test(e)})}function shouldExclude(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some(function(t){return t.test(e)})}function shouldTrack(e,t,r){return!shouldExclude(t,r)&&!(!e.whyDidYouRender&&!shouldInclude(t,r))}var patchClassComponent=function(e,t,r,n){var o=function(t){function r(){return _classCallCheck(this,r),_possibleConstructorReturn(this,_getPrototypeOf(r).apply(this,arguments))}return _inherits(r,e),_createClass(r,[{key:"render",value:function(){return n.notifier(getUpdateInfo({Component:e,prevProps:this._prevProps,prevState:this._prevState,nextProps:this.props,nextState:this.state,options:n})),this._prevProps=this.props,this._prevState=this.state,_get(_getPrototypeOf(r.prototype),"render",this).call(this)}}]),r}();return Object.assign(o,e,{displayName:t}),o},patchFunctionalComponent=function(e,t,r,n){var o=function(t){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,_getPrototypeOf(o).apply(this,arguments))}return _inherits(o,r.Component),_createClass(o,[{key:"componentDidUpdate",value:function(t){n.notifier(getUpdateInfo({Component:e,prevProps:t,nextProps:this.props,options:n}))}},{key:"render",value:function(){return e(this.props)}}]),o}();return Object.assign(o,e,{displayName:t}),o};function createPatchedComponent(e,t,r,n,o){return t.prototype&&"function"==typeof t.prototype.render?patchClassComponent(t,r,n,o):patchFunctionalComponent(t,r,n,o)}function getPatchedComponent(e,t,r,n,o){if(e.has(t))return e.get(t);var i=createPatchedComponent(e,t,r,n,o);return e.set(t,i),i}function whyDidYouRender(e,t){var r=normalizeOptions(t),n=e.createElement,o=new Map;return e.createElement=function(t){for(var i=getDisplayName(t),f="function"==typeof t&&shouldTrack(t,i,r),a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];if(!f)return n.apply(e,[t].concat(s));var p=getPatchedComponent(o,t,i,e,r);return n.apply(e,[p].concat(s))},e.__REVERT_WHY_DID_YOU_RENDER__=function(){e.createElement=n,delete e.__REVERT_WHY_DID_YOU_RENDER__,o.clear()},e}export default whyDidYouRender;
import _isString from"lodash/isString";import _reduce from"lodash/reduce";import _has from"lodash/has";import _keys from"lodash/keys";import _isFunction from"lodash/isFunction";import _isRegExp from"lodash/isRegExp";import _isDate from"lodash/isDate";import _isPlainObject from"lodash/isPlainObject";import _isArray from"lodash/isArray";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_defineProperty(e,t,r[t])})}return e}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,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}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){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_nonIterableSpread()}function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var _diffTypesDescription,diffTypes={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},moreInfoUrl="http://bit.ly/wdyr02",diffTypesDescriptions=(_defineProperty(_diffTypesDescription={},diffTypes.different,"different objects."),_defineProperty(_diffTypesDescription,diffTypes.deepEquals,"different objects that are equal by value."),_defineProperty(_diffTypesDescription,diffTypes.date,"different date objects with the same value."),_defineProperty(_diffTypesDescription,diffTypes.regex,"different regular expressions with the same value."),_defineProperty(_diffTypesDescription,diffTypes.reactElement,"different React elements with the same displayName."),_defineProperty(_diffTypesDescription,diffTypes.function,"different functions with the same name."),_diffTypesDescription),inHotReload=!1;function shouldLog(e,t,r){return!inHotReload&&(!!r.logOnDifferentValues||(!(!t.whyDidYouRender||!t.whyDidYouRender.logOnDifferentValues)||!(e.propsDifferences&&e.propsDifferences.some(function(e){return e.diffType===diffTypes.different})||e.stateDifferences&&e.stateDifferences.some(function(e){return e.diffType===diffTypes.different}))))}function logDifference(e,t,r,n,o,i,f){o&&o.length>0?(f.consoleLog(_defineProperty({},t,e),"".concat(r," of ").concat(n," changes:")),o.forEach(function(e){var t=e.pathString,r=e.diffType,o=e.prevValue,i=e.nextValue;f.consoleGroup("%c".concat(n,".%c").concat(t,"%c"),"color:blue;","color:red;","color:black;"),f.consoleLog("".concat(diffTypesDescriptions[r]," (more info at ").concat(moreInfoUrl,")")),f.consoleLog(_defineProperty({},"prev ".concat(t),o),"!==",_defineProperty({},"next ".concat(t),i)),f.consoleGroupEnd()})):o&&(f.consoleLog(_defineProperty({},t,e),"".concat(r," the ").concat(n," object itself changed but it's values are all equal."),"props"===n?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(moreInfoUrl)),f.consoleLog("prev ".concat(n,":"),i.prev," !== ",i.next,":next ".concat(n)))}function defaultNotifier(e){var t=e.Component,r=e.displayName,n=e.prevProps,o=e.prevState,i=e.nextProps,f=e.nextState,a=e.reason,s=e.options;if(shouldLog(a,t,s)){s.consoleGroup("%c".concat(r),"color: #058;");var c="Re-rendered because";a.propsDifferences&&(logDifference(t,r,c,"props",a.propsDifferences,{prev:n,next:i},s),c="And because"),a.stateDifferences&&logDifference(t,r,c,"state",a.stateDifferences,{prev:o,next:f},s),a.propsDifferences||a.stateDifferences||s.consoleLog(_defineProperty({},r,t),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat(moreInfoUrl)),s.consoleGroupEnd()}}function createDefaultNotifier(e){return e&&module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler(function(t){"idle"===t&&(inHotReload=!0,setTimeout(function(){inHotReload=!1},e))}),defaultNotifier}var emptyFn=function(){};function normalizeOptions(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=console.group,r=console.groupEnd;return e.collapseGroups?t=console.groupCollapsed:e.onlyLogs&&(t=console.log,r=emptyFn),_objectSpread({include:null,exclude:null,notifier:e.notifier||createDefaultNotifier(e.hasOwnProperty("hotReloadBufferMs")?e.hotReloadBufferMs:500),onlyLogs:!1,consoleLog:console.log,consoleGroup:t,consoleGroupEnd:r,logOnDifferentValues:!1},e)}function getDisplayName(e){return e.displayName||e.name||(_isString(e)?e:void 0)}var hasElementType="undefined"!=typeof Element,hasSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE$1=hasSymbol?Symbol.for("react.element"):60103,isReactElement=function(e){return e.$$typeof===REACT_ELEMENT_TYPE$1};function trackDiff(e,t,r,n,o){return r.push({diffType:o,pathString:n,prevValue:e,nextValue:t}),o!==diffTypes.different}function accumulateDeepEqualDiffs(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===t)return!0;if(!e||!t)return trackDiff(e,t,r,n,diffTypes.different);if(_isArray(e)&&_isArray(t)){var o=e.length;if(o!==t.length)return trackDiff(e,t,r,n,diffTypes.different);for(var i=!0,f=o;0!=f--;)accumulateDeepEqualDiffs(e[f],t[f],r,"".concat(n,"[").concat(f,"]"))||(i=!1);return trackDiff(e,t,r,n,i?diffTypes.deepEquals:diffTypes.different)}if(_isDate(e)&&_isDate(t))return e.getTime()===t.getTime()?trackDiff(e,t,r,n,diffTypes.date):trackDiff(e,t,r,n,diffTypes.different);if(_isRegExp(e)&&_isRegExp(t))return e.toString()===t.toString()?trackDiff(e,t,r,n,diffTypes.regex):trackDiff(e,t,r,n,diffTypes.different);if(hasElementType&&e instanceof Element&&t instanceof Element)return trackDiff(e,t,r,n,diffTypes.different);if(isReactElement(e)&&isReactElement(t))return e.type===t.type?trackDiff(e,t,r,n,diffTypes.reactElement):trackDiff(e,t,r,n,diffTypes.different);if(_isFunction(e)&&_isFunction(t))return e.name===t.name?trackDiff(e,t,r,n,diffTypes.function):trackDiff(e,t,r,n,diffTypes.different);if(_isPlainObject(e)&&_isPlainObject(t)){var a=_keys(e),s=a.length;if(s!==_keys(t).length)return trackDiff(e,t,r,n,diffTypes.different);for(var c=s;0!=c--;)if(!_has(t,a[c]))return trackDiff(e,t,r,n,diffTypes.different);for(var p=!0,u=s;0!=u--;){var l=a[u];accumulateDeepEqualDiffs(e[l],t[l],r,"".concat(n,".").concat(l))||(p=!1)}return trackDiff(e,t,r,n,p?diffTypes.deepEquals:diffTypes.different)}return trackDiff(e,t,r,n,diffTypes.different)}function calculateDeepEqualDiffs(e,t,r){try{var n=[];return accumulateDeepEqualDiffs(e,t,n,r),n}catch(e){if(e.message&&e.message.match(/stack|recursion/i)||-2146828260===e.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",e.name,e.message),!1;throw e}}var emptyObject={};function findObjectsDifferences(e,t){if(e===t)return!1;var r=e||emptyObject,n=t||emptyObject,o=_keys(_objectSpread({},r,n));return _reduce(o,function(e,t){var o=calculateDeepEqualDiffs(r[t],n[t],t);return o&&(e=_toConsumableArray(e||[]).concat(_toConsumableArray(o))),e},[])}function getUpdateReason(e,t,r,n){return{propsDifferences:findObjectsDifferences(e,r,"props"),stateDifferences:findObjectsDifferences(t,n,"state")}}function getUpdateInfo(e){var t=e.Component,r=e.prevProps,n=e.prevState,o=e.nextProps,i=e.nextState,f=e.options;return{Component:t,displayName:getDisplayName(t),prevProps:r,prevState:n,nextProps:o,nextState:i,options:f,reason:getUpdateReason(r,n,o,i)}}function shouldInclude(e,t){return t.include&&t.include.length>0&&t.include.some(function(t){return t.test(e)})}function shouldExclude(e,t){return t.exclude&&t.exclude.length>0&&t.exclude.some(function(t){return t.test(e)})}function shouldTrack(e,t,r){return!shouldExclude(t,r)&&!(!e.whyDidYouRender&&!shouldInclude(t,r))}var patchClassComponent=function(e,t,r,n){var o=function(t){function r(){return _classCallCheck(this,r),_possibleConstructorReturn(this,_getPrototypeOf(r).apply(this,arguments))}return _inherits(r,e),_createClass(r,[{key:"render",value:function(){return n.notifier(getUpdateInfo({Component:e,prevProps:this._prevProps,prevState:this._prevState,nextProps:this.props,nextState:this.state,options:n})),this._prevProps=this.props,this._prevState=this.state,_get(_getPrototypeOf(r.prototype),"render",this).call(this)}}]),r}();return Object.assign(o,e,{displayName:t}),o},patchFunctionalComponent=function(e,t,r,n){var o=function(t){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,_getPrototypeOf(o).apply(this,arguments))}return _inherits(o,r.Component),_createClass(o,[{key:"componentDidUpdate",value:function(t){n.notifier(getUpdateInfo({Component:e,prevProps:t,nextProps:this.props,options:n}))}},{key:"render",value:function(){return e(this.props)}}]),o}();return Object.assign(o,e,{displayName:t}),o};function createPatchedComponent(e,t,r,n,o){return t.prototype&&"function"==typeof t.prototype.render?patchClassComponent(t,r,n,o):patchFunctionalComponent(t,r,n,o)}function getPatchedComponent(e,t,r,n,o){if(e.has(t))return e.get(t);var i=createPatchedComponent(e,t,r,n,o);return e.set(t,i),i}function whyDidYouRender(e,t){var r=normalizeOptions(t),n=e.createElement,o=new Map;return e.createElement=function(t){for(var i=getDisplayName(t),f="function"==typeof t&&shouldTrack(t,i,r),a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];if(!f)return n.apply(e,[t].concat(s));var p=getPatchedComponent(o,t,i,e,r);return n.apply(e,[p].concat(s))},e.__REVERT_WHY_DID_YOU_RENDER__=function(){e.createElement=n,delete e.__REVERT_WHY_DID_YOU_RENDER__,o.clear()},e}export default whyDidYouRender;
//# sourceMappingURL=whyDidYouRender.min.js.map

@@ -1,2 +0,9 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.whyDidYouRender=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(e){n(t,e,r[e])})}return t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t,e,r){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=i(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function s(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var l,p={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},v="http://bit.ly/wdyr02",h=(n(l={},p.different,"different objects."),n(l,p.deepEquals,"different objects that are equal by value."),n(l,p.date,"different date objects with the same value."),n(l,p.regex,"different regular expressions with the same value."),n(l,p.reactElement,"different React elements with the same displayName."),n(l,p.function,"different functions with the same name."),l);function y(t,e,r,o,a,i,u){a&&a.length>0?(u.consoleLog(n({},e,t),"".concat(r," of ").concat(o," changes:")),a.forEach(function(t){var e=t.pathString,r=t.diffType,a=t.prevValue,i=t.nextValue;u.consoleGroup("%c".concat(o,".%c").concat(e,"%c"),"color:blue;","color:red;","color:black;"),u.consoleLog("".concat(h[r]," (more info at ").concat(v,")")),u.consoleLog(n({},"prev ".concat(e),a),"!==",n({},"next ".concat(e),i)),u.consoleGroupEnd()})):a&&(u.consoleLog(n({},e,t),"".concat(r," the ").concat(o," object itself changed but it's values are all equal."),"props"===o?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(v)),u.consoleLog("prev ".concat(o,":"),i.prev," !== ",i.next,":next ".concat(o)))}function d(t){var e=t.Component,r=t.displayName,o=t.prevProps,a=t.prevState,i=t.nextProps,u=t.nextState,c=t.reason,f=t.options;if(function(t,e,r){return!!r.logOnDifferentValues||!(!e.whyDidYouRender||!e.whyDidYouRender.logOnDifferentValues)||!(t.propsDifferences&&t.propsDifferences.some(function(t){return t.diffType===p.different})||t.stateDifferences&&t.stateDifferences.some(function(t){return t.diffType===p.different}))}(c,e,f)){f.consoleGroup("%c".concat(r),"color: #058;");var s="Re-rendered because";c.propsDifferences&&(y(e,r,s,"props",c.propsDifferences,{prev:o,next:i},f),s="And because"),c.stateDifferences&&y(e,r,s,"state",c.stateDifferences,{prev:a,next:u},f),c.propsDifferences||c.stateDifferences||f.consoleLog(n({},r,e),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat(v)),f.consoleGroupEnd()}}var b=function(){};var g="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _(t,e){return t(e={exports:{}},e.exports),e.exports}var j="object"==typeof g&&g&&g.Object===Object&&g,m="object"==typeof self&&self&&self.Object===Object&&self,O=j||m||Function("return this")(),w=O.Symbol,E=Object.prototype,S=E.hasOwnProperty,x=E.toString,P=w?w.toStringTag:void 0;var D=function(t){var e=S.call(t,P),r=t[P];try{t[P]=void 0}catch(t){}var n=x.call(t);return e?t[P]=r:delete t[P],n},A=Object.prototype.toString;var z=function(t){return A.call(t)},R="[object Null]",T="[object Undefined]",k=w?w.toStringTag:void 0;var L=function(t){return null==t?void 0===t?T:R:k&&k in Object(t)?D(t):z(t)},V=Array.isArray;var C=function(t){return null!=t&&"object"==typeof t},$="[object String]";var N=function(t){return"string"==typeof t||!V(t)&&C(t)&&L(t)==$};function F(t){return N(t)?t:t.displayName||t.name}var M=function(t,e,r,n){var o=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++o]);++o<a;)r=e(r,t[o],o,t);return r};var U=function(t){return function(e,r,n){for(var o=-1,a=Object(e),i=n(e),u=i.length;u--;){var c=i[t?u:++o];if(!1===r(a[c],c,a))break}return e}}();var q=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n},I="[object Arguments]";var G=function(t){return C(t)&&L(t)==I},Y=Object.prototype,B=Y.hasOwnProperty,W=Y.propertyIsEnumerable,H=G(function(){return arguments}())?G:function(t){return C(t)&&B.call(t,"callee")&&!W.call(t,"callee")};var J=function(){return!1},K=_(function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?O.Buffer:void 0,a=(o?o.isBuffer:void 0)||J;t.exports=a}),Q=9007199254740991,X=/^(?:0|[1-9]\d*)$/;var Z=function(t,e){var r=typeof t;return!!(e=null==e?Q:e)&&("number"==r||"symbol"!=r&&X.test(t))&&t>-1&&t%1==0&&t<e},tt=9007199254740991;var et=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=tt},rt={};rt["[object Float32Array]"]=rt["[object Float64Array]"]=rt["[object Int8Array]"]=rt["[object Int16Array]"]=rt["[object Int32Array]"]=rt["[object Uint8Array]"]=rt["[object Uint8ClampedArray]"]=rt["[object Uint16Array]"]=rt["[object Uint32Array]"]=!0,rt["[object Arguments]"]=rt["[object Array]"]=rt["[object ArrayBuffer]"]=rt["[object Boolean]"]=rt["[object DataView]"]=rt["[object Date]"]=rt["[object Error]"]=rt["[object Function]"]=rt["[object Map]"]=rt["[object Number]"]=rt["[object Object]"]=rt["[object RegExp]"]=rt["[object Set]"]=rt["[object String]"]=rt["[object WeakMap]"]=!1;var nt=function(t){return C(t)&&et(t.length)&&!!rt[L(t)]};var ot=function(t){return function(e){return t(e)}},at=_(function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&j.process,a=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a}),it=at&&at.isTypedArray,ut=it?ot(it):nt,ct=Object.prototype.hasOwnProperty;var ft=function(t,e){var r=V(t),n=!r&&H(t),o=!r&&!n&&K(t),a=!r&&!n&&!o&&ut(t),i=r||n||o||a,u=i?q(t.length,String):[],c=u.length;for(var f in t)!e&&!ct.call(t,f)||i&&("length"==f||o&&("offset"==f||"parent"==f)||a&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Z(f,c))||u.push(f);return u},st=Object.prototype;var lt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||st)};var pt=function(t,e){return function(r){return t(e(r))}},vt=pt(Object.keys,Object),ht=Object.prototype.hasOwnProperty;var yt=function(t){if(!lt(t))return vt(t);var e=[];for(var r in Object(t))ht.call(t,r)&&"constructor"!=r&&e.push(r);return e};var dt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},bt="[object AsyncFunction]",gt="[object Function]",_t="[object GeneratorFunction]",jt="[object Proxy]";var mt=function(t){if(!dt(t))return!1;var e=L(t);return e==gt||e==_t||e==bt||e==jt};var Ot=function(t){return null!=t&&et(t.length)&&!mt(t)};var wt=function(t){return Ot(t)?ft(t):yt(t)};var Et=function(t,e){return function(r,n){if(null==r)return r;if(!Ot(r))return t(r,n);for(var o=r.length,a=e?o:-1,i=Object(r);(e?a--:++a<o)&&!1!==n(i[a],a,i););return r}}(function(t,e){return t&&U(t,e,wt)});var St=function(){this.__data__=[],this.size=0};var xt=function(t,e){return t===e||t!=t&&e!=e};var Pt=function(t,e){for(var r=t.length;r--;)if(xt(t[r][0],e))return r;return-1},Dt=Array.prototype.splice;var At=function(t){var e=this.__data__,r=Pt(e,t);return!(r<0||(r==e.length-1?e.pop():Dt.call(e,r,1),--this.size,0))};var zt=function(t){var e=this.__data__,r=Pt(e,t);return r<0?void 0:e[r][1]};var Rt=function(t){return Pt(this.__data__,t)>-1};var Tt=function(t,e){var r=this.__data__,n=Pt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function kt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}kt.prototype.clear=St,kt.prototype.delete=At,kt.prototype.get=zt,kt.prototype.has=Rt,kt.prototype.set=Tt;var Lt=kt;var Vt=function(){this.__data__=new Lt,this.size=0};var Ct=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var $t=function(t){return this.__data__.get(t)};var Nt,Ft=function(t){return this.__data__.has(t)},Mt=O["__core-js_shared__"],Ut=(Nt=/[^.]+$/.exec(Mt&&Mt.keys&&Mt.keys.IE_PROTO||""))?"Symbol(src)_1."+Nt:"";var qt=function(t){return!!Ut&&Ut in t},It=Function.prototype.toString;var Gt=function(t){if(null!=t){try{return It.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Yt=/^\[object .+?Constructor\]$/,Bt=Function.prototype,Wt=Object.prototype,Ht=Bt.toString,Jt=Wt.hasOwnProperty,Kt=RegExp("^"+Ht.call(Jt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Qt=function(t){return!(!dt(t)||qt(t))&&(mt(t)?Kt:Yt).test(Gt(t))};var Xt=function(t,e){return null==t?void 0:t[e]};var Zt=function(t,e){var r=Xt(t,e);return Qt(r)?r:void 0},te=Zt(O,"Map"),ee=Zt(Object,"create");var re=function(){this.__data__=ee?ee(null):{},this.size=0};var ne=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},oe="__lodash_hash_undefined__",ae=Object.prototype.hasOwnProperty;var ie=function(t){var e=this.__data__;if(ee){var r=e[t];return r===oe?void 0:r}return ae.call(e,t)?e[t]:void 0},ue=Object.prototype.hasOwnProperty;var ce=function(t){var e=this.__data__;return ee?void 0!==e[t]:ue.call(e,t)},fe="__lodash_hash_undefined__";var se=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ee&&void 0===e?fe:e,this};function le(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}le.prototype.clear=re,le.prototype.delete=ne,le.prototype.get=ie,le.prototype.has=ce,le.prototype.set=se;var pe=le;var ve=function(){this.size=0,this.__data__={hash:new pe,map:new(te||Lt),string:new pe}};var he=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ye=function(t,e){var r=t.__data__;return he(e)?r["string"==typeof e?"string":"hash"]:r.map};var de=function(t){var e=ye(this,t).delete(t);return this.size-=e?1:0,e};var be=function(t){return ye(this,t).get(t)};var ge=function(t){return ye(this,t).has(t)};var _e=function(t,e){var r=ye(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function je(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}je.prototype.clear=ve,je.prototype.delete=de,je.prototype.get=be,je.prototype.has=ge,je.prototype.set=_e;var me=je,Oe=200;var we=function(t,e){var r=this.__data__;if(r instanceof Lt){var n=r.__data__;if(!te||n.length<Oe-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new me(n)}return r.set(t,e),this.size=r.size,this};function Ee(t){var e=this.__data__=new Lt(t);this.size=e.size}Ee.prototype.clear=Vt,Ee.prototype.delete=Ct,Ee.prototype.get=$t,Ee.prototype.has=Ft,Ee.prototype.set=we;var Se=Ee,xe="__lodash_hash_undefined__";var Pe=function(t){return this.__data__.set(t,xe),this};var De=function(t){return this.__data__.has(t)};function Ae(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new me;++e<r;)this.add(t[e])}Ae.prototype.add=Ae.prototype.push=Pe,Ae.prototype.has=De;var ze=Ae;var Re=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var Te=function(t,e){return t.has(e)},ke=1,Le=2;var Ve=function(t,e,r,n,o,a){var i=r&ke,u=t.length,c=e.length;if(u!=c&&!(i&&c>u))return!1;var f=a.get(t);if(f&&a.get(e))return f==e;var s=-1,l=!0,p=r&Le?new ze:void 0;for(a.set(t,e),a.set(e,t);++s<u;){var v=t[s],h=e[s];if(n)var y=i?n(h,v,s,e,t,a):n(v,h,s,t,e,a);if(void 0!==y){if(y)continue;l=!1;break}if(p){if(!Re(e,function(t,e){if(!Te(p,e)&&(v===t||o(v,t,r,n,a)))return p.push(e)})){l=!1;break}}else if(v!==h&&!o(v,h,r,n,a)){l=!1;break}}return a.delete(t),a.delete(e),l},Ce=O.Uint8Array;var $e=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r};var Ne=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r},Fe=1,Me=2,Ue="[object Boolean]",qe="[object Date]",Ie="[object Error]",Ge="[object Map]",Ye="[object Number]",Be="[object RegExp]",We="[object Set]",He="[object String]",Je="[object Symbol]",Ke="[object ArrayBuffer]",Qe="[object DataView]",Xe=w?w.prototype:void 0,Ze=Xe?Xe.valueOf:void 0;var tr=function(t,e,r,n,o,a,i){switch(r){case Qe:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Ke:return!(t.byteLength!=e.byteLength||!a(new Ce(t),new Ce(e)));case Ue:case qe:case Ye:return xt(+t,+e);case Ie:return t.name==e.name&&t.message==e.message;case Be:case He:return t==e+"";case Ge:var u=$e;case We:var c=n&Fe;if(u||(u=Ne),t.size!=e.size&&!c)return!1;var f=i.get(t);if(f)return f==e;n|=Me,i.set(t,e);var s=Ve(u(t),u(e),n,o,a,i);return i.delete(t),s;case Je:if(Ze)return Ze.call(t)==Ze.call(e)}return!1};var er=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var rr=function(t,e,r){var n=e(t);return V(t)?n:er(n,r(t))};var nr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a};var or=function(){return[]},ar=Object.prototype.propertyIsEnumerable,ir=Object.getOwnPropertySymbols,ur=ir?function(t){return null==t?[]:(t=Object(t),nr(ir(t),function(e){return ar.call(t,e)}))}:or;var cr=function(t){return rr(t,wt,ur)},fr=1,sr=Object.prototype.hasOwnProperty;var lr=function(t,e,r,n,o,a){var i=r&fr,u=cr(t),c=u.length;if(c!=cr(e).length&&!i)return!1;for(var f=c;f--;){var s=u[f];if(!(i?s in e:sr.call(e,s)))return!1}var l=a.get(t);if(l&&a.get(e))return l==e;var p=!0;a.set(t,e),a.set(e,t);for(var v=i;++f<c;){var h=t[s=u[f]],y=e[s];if(n)var d=i?n(y,h,s,e,t,a):n(h,y,s,t,e,a);if(!(void 0===d?h===y||o(h,y,r,n,a):d)){p=!1;break}v||(v="constructor"==s)}if(p&&!v){var b=t.constructor,g=e.constructor;b!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g)&&(p=!1)}return a.delete(t),a.delete(e),p},pr=Zt(O,"DataView"),vr=Zt(O,"Promise"),hr=Zt(O,"Set"),yr=Zt(O,"WeakMap"),dr=Gt(pr),br=Gt(te),gr=Gt(vr),_r=Gt(hr),jr=Gt(yr),mr=L;(pr&&"[object DataView]"!=mr(new pr(new ArrayBuffer(1)))||te&&"[object Map]"!=mr(new te)||vr&&"[object Promise]"!=mr(vr.resolve())||hr&&"[object Set]"!=mr(new hr)||yr&&"[object WeakMap]"!=mr(new yr))&&(mr=function(t){var e=L(t),r="[object Object]"==e?t.constructor:void 0,n=r?Gt(r):"";if(n)switch(n){case dr:return"[object DataView]";case br:return"[object Map]";case gr:return"[object Promise]";case _r:return"[object Set]";case jr:return"[object WeakMap]"}return e});var Or=mr,wr=1,Er="[object Arguments]",Sr="[object Array]",xr="[object Object]",Pr=Object.prototype.hasOwnProperty;var Dr=function(t,e,r,n,o,a){var i=V(t),u=V(e),c=i?Sr:Or(t),f=u?Sr:Or(e),s=(c=c==Er?xr:c)==xr,l=(f=f==Er?xr:f)==xr,p=c==f;if(p&&K(t)){if(!K(e))return!1;i=!0,s=!1}if(p&&!s)return a||(a=new Se),i||ut(t)?Ve(t,e,r,n,o,a):tr(t,e,c,r,n,o,a);if(!(r&wr)){var v=s&&Pr.call(t,"__wrapped__"),h=l&&Pr.call(e,"__wrapped__");if(v||h){var y=v?t.value():t,d=h?e.value():e;return a||(a=new Se),o(y,d,r,n,a)}}return!!p&&(a||(a=new Se),lr(t,e,r,n,o,a))};var Ar=function t(e,r,n,o,a){return e===r||(null==e||null==r||!C(e)&&!C(r)?e!=e&&r!=r:Dr(e,r,n,o,t,a))},zr=1,Rr=2;var Tr=function(t,e,r,n){var o=r.length,a=o,i=!n;if(null==t)return!a;for(t=Object(t);o--;){var u=r[o];if(i&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=r[o])[0],f=t[c],s=u[1];if(i&&u[2]){if(void 0===f&&!(c in t))return!1}else{var l=new Se;if(n)var p=n(f,s,c,t,e,l);if(!(void 0===p?Ar(s,f,zr|Rr,n,l):p))return!1}}return!0};var kr=function(t){return t==t&&!dt(t)};var Lr=function(t){for(var e=wt(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,kr(o)]}return e};var Vr=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}};var Cr=function(t){var e=Lr(t);return 1==e.length&&e[0][2]?Vr(e[0][0],e[0][1]):function(r){return r===t||Tr(r,t,e)}},$r="[object Symbol]";var Nr=function(t){return"symbol"==typeof t||C(t)&&L(t)==$r},Fr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mr=/^\w*$/;var Ur=function(t,e){if(V(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Nr(t))||Mr.test(t)||!Fr.test(t)||null!=e&&t in Object(e)},qr="Expected a function";function Ir(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(qr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Ir.Cache||me),r}Ir.Cache=me;var Gr=Ir,Yr=500;var Br=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wr=/\\(\\)?/g,Hr=function(t){var e=Gr(t,function(t){return r.size===Yr&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Br,function(t,r,n,o){e.push(n?o.replace(Wr,"$1"):r||t)}),e});var Jr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Kr=1/0,Qr=w?w.prototype:void 0,Xr=Qr?Qr.toString:void 0;var Zr=function t(e){if("string"==typeof e)return e;if(V(e))return Jr(e,t)+"";if(Nr(e))return Xr?Xr.call(e):"";var r=e+"";return"0"==r&&1/e==-Kr?"-0":r};var tn=function(t){return null==t?"":Zr(t)};var en=function(t,e){return V(t)?t:Ur(t,e)?[t]:Hr(tn(t))},rn=1/0;var nn=function(t){if("string"==typeof t||Nr(t))return t;var e=t+"";return"0"==e&&1/t==-rn?"-0":e};var on=function(t,e){for(var r=0,n=(e=en(e,t)).length;null!=t&&r<n;)t=t[nn(e[r++])];return r&&r==n?t:void 0};var an=function(t,e,r){var n=null==t?void 0:on(t,e);return void 0===n?r:n};var un=function(t,e){return null!=t&&e in Object(t)};var cn=function(t,e,r){for(var n=-1,o=(e=en(e,t)).length,a=!1;++n<o;){var i=nn(e[n]);if(!(a=null!=t&&r(t,i)))break;t=t[i]}return a||++n!=o?a:!!(o=null==t?0:t.length)&&et(o)&&Z(i,o)&&(V(t)||H(t))};var fn=function(t,e){return null!=t&&cn(t,e,un)},sn=1,ln=2;var pn=function(t,e){return Ur(t)&&kr(e)?Vr(nn(t),e):function(r){var n=an(r,t);return void 0===n&&n===e?fn(r,t):Ar(e,n,sn|ln)}};var vn=function(t){return t};var hn=function(t){return function(e){return null==e?void 0:e[t]}};var yn=function(t){return function(e){return on(e,t)}};var dn=function(t){return Ur(t)?hn(nn(t)):yn(t)};var bn=function(t){return"function"==typeof t?t:null==t?vn:"object"==typeof t?V(t)?pn(t[0],t[1]):Cr(t):dn(t)};var gn=function(t,e,r,n,o){return o(t,function(t,o,a){r=n?(n=!1,t):e(r,t,o,a)}),r};var _n=function(t,e,r){var n=V(t)?M:gn,o=arguments.length<3;return n(t,bn(e,4),r,o,Et)},jn=Object.prototype.hasOwnProperty;var mn=function(t,e){return null!=t&&jn.call(t,e)};var On=function(t,e){return null!=t&&cn(t,e,mn)},wn="[object RegExp]";var En=function(t){return C(t)&&L(t)==wn},Sn=at&&at.isRegExp,xn=Sn?ot(Sn):En,Pn="[object Date]";var Dn=function(t){return C(t)&&L(t)==Pn},An=at&&at.isDate,zn=An?ot(An):Dn,Rn=pt(Object.getPrototypeOf,Object),Tn="[object Object]",kn=Function.prototype,Ln=Object.prototype,Vn=kn.toString,Cn=Ln.hasOwnProperty,$n=Vn.call(Object);var Nn=function(t){if(!C(t)||L(t)!=Tn)return!1;var e=Rn(t);if(null===e)return!0;var r=Cn.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Vn.call(r)==$n},Fn="undefined"!=typeof Element,Mn="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,Un=function(t){return t.$$typeof===Mn};function qn(t,e,r,n,o){return r.push({diffType:o,pathString:n,prevValue:t,nextValue:e}),o!==p.different}function In(t,e,r){try{var n=[];return function t(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===r)return!0;if(!e||!r)return qn(e,r,n,o,p.different);if(V(e)&&V(r)){var a=e.length;if(a!==r.length)return qn(e,r,n,o,p.different);for(var i=!0,u=a;0!=u--;)t(e[u],r[u],n,"".concat(o,"[").concat(u,"]"))||(i=!1);return qn(e,r,n,o,i?p.deepEquals:p.different)}if(zn(e)&&zn(r))return e.getTime()===r.getTime()?qn(e,r,n,o,p.date):qn(e,r,n,o,p.different);if(xn(e)&&xn(r))return e.toString()===r.toString()?qn(e,r,n,o,p.regex):qn(e,r,n,o,p.different);if(Fn&&e instanceof Element&&r instanceof Element)return qn(e,r,n,o,p.different);if(Un(e)&&Un(r))return e.type===r.type?qn(e,r,n,o,p.reactElement):qn(e,r,n,o,p.different);if(mt(e)&&mt(r))return e.name===r.name?qn(e,r,n,o,p.function):qn(e,r,n,o,p.different);if(Nn(e)&&Nn(r)){var c=wt(e),f=c.length;if(f!==wt(r).length)return qn(e,r,n,o,p.different);for(var s=f;0!=s--;)if(!On(r,c[s]))return qn(e,r,n,o,p.different);for(var l=!0,v=f;0!=v--;){var h=c[v];t(e[h],r[h],n,"".concat(o,".").concat(h))||(l=!1)}return qn(e,r,n,o,l?p.deepEquals:p.different)}return qn(e,r,n,o,p.different)}(t,e,n,r),n}catch(t){if(t.message&&t.message.match(/stack|recursion/i)||-2146828260===t.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",t.name,t.message),!1;throw t}}var Gn={};function Yn(t,e){if(t===e)return!1;var r=t||Gn,n=e||Gn,a=wt(o({},r,n));return _n(a,function(t,e){var o=In(r[e],n[e],e);return o&&(t=s(t||[]).concat(s(o))),t},[])}function Bn(t){var e=t.Component,r=t.prevProps,n=t.prevState,o=t.nextProps,a=t.nextState,i=t.options;return{Component:e,displayName:F(e),prevProps:r,prevState:n,nextProps:o,nextState:a,options:i,reason:function(t,e,r,n){return{propsDifferences:Yn(t,r),stateDifferences:Yn(e,n)}}(r,n,o,a)}}var Wn=function(e,n,o,u){var s=function(n){function o(){return t(this,o),c(this,i(o).apply(this,arguments))}return a(o,e),r(o,[{key:"render",value:function(){return u.notifier(Bn({Component:e,prevProps:this._prevProps,prevState:this._prevState,nextProps:this.props,nextState:this.state,options:u})),this._prevProps=this.props,this._prevState=this.state,f(i(o.prototype),"render",this).call(this)}}]),o}();return Object.assign(s,e,{displayName:n}),s},Hn=function(e,n,o,u){var f=function(n){function f(){return t(this,f),c(this,i(f).apply(this,arguments))}return a(f,o.Component),r(f,[{key:"componentDidUpdate",value:function(t){u.notifier(Bn({Component:e,prevProps:t,nextProps:this.props,options:u}))}},{key:"render",value:function(){return e(this.props)}}]),f}();return Object.assign(f,e,{displayName:n}),f};function Jn(t,e,r,n,o){if(t.has(e))return t.get(e);var a=function(t,e,r,n,o){return e.prototype&&"function"==typeof e.prototype.render?Wn(e,r,n,o):Hn(e,r,n,o)}(0,e,r,n,o);return t.set(e,a),a}return function(t,e){var r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=console.group,r=console.groupEnd;return t.collapseGroups?e=console.groupCollapsed:t.onlyLogs&&(e=console.log,r=b),o({include:null,exclude:null,notifier:d,onlyLogs:!1,consoleLog:console.log,consoleGroup:e,consoleGroupEnd:r,logOnDifferentValues:!1},t)}(e),n=t.createElement,a=new Map;return t.createElement=function(e){for(var o=F(e),i="function"==typeof e&&function(t,e,r){return!(function(t,e){return e.exclude&&e.exclude.length>0&&e.exclude.some(function(e){return e.test(t)})}(e,r)||!t.whyDidYouRender&&!function(t,e){return e.include&&e.include.length>0&&e.include.some(function(e){return e.test(t)})}(e,r))}(e,o,r),u=arguments.length,c=new Array(u>1?u-1:0),f=1;f<u;f++)c[f-1]=arguments[f];if(!i)return n.apply(t,[e].concat(c));var s=Jn(a,e,o,t,r);return n.apply(t,[s].concat(c))},t.__REVERT_WHY_DID_YOU_RENDER__=function(){t.createElement=n,delete t.__REVERT_WHY_DID_YOU_RENDER__,a.clear()},t}});
/**
* @welldone-software/why-did-you-render 2.2.0
* MIT Licensed
* Generated by Vitali Zaidman <vzaidman@gmail.com> (https://github.com/vzaidman)
* Generated at 2018-12-01
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.whyDidYouRender=e()}(this,function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function r(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),o.forEach(function(e){n(t,e,r[e])})}return t}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t,e,r){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=i(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}})(t,e,r||t)}function s(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var l,p={different:"different",deepEquals:"deepEquals",date:"date",regex:"regex",reactElement:"reactElement",function:"function"},v="http://bit.ly/wdyr02",h=(n(l={},p.different,"different objects."),n(l,p.deepEquals,"different objects that are equal by value."),n(l,p.date,"different date objects with the same value."),n(l,p.regex,"different regular expressions with the same value."),n(l,p.reactElement,"different React elements with the same displayName."),n(l,p.function,"different functions with the same name."),l),d=!1;function y(t,e,r,o,a,i,u){a&&a.length>0?(u.consoleLog(n({},e,t),"".concat(r," of ").concat(o," changes:")),a.forEach(function(t){var e=t.pathString,r=t.diffType,a=t.prevValue,i=t.nextValue;u.consoleGroup("%c".concat(o,".%c").concat(e,"%c"),"color:blue;","color:red;","color:black;"),u.consoleLog("".concat(h[r]," (more info at ").concat(v,")")),u.consoleLog(n({},"prev ".concat(e),a),"!==",n({},"next ".concat(e),i)),u.consoleGroupEnd()})):a&&(u.consoleLog(n({},e,t),"".concat(r," the ").concat(o," object itself changed but it's values are all equal."),"props"===o?"This could of been avoided by making the component pure, or by preventing it's father from re-rendering.":"This usually means this component called setState when no changes in it's state actually occurred.","more info at ".concat(v)),u.consoleLog("prev ".concat(o,":"),i.prev," !== ",i.next,":next ".concat(o)))}function b(t){var e=t.Component,r=t.displayName,o=t.prevProps,a=t.prevState,i=t.nextProps,u=t.nextState,c=t.reason,f=t.options;if(function(t,e,r){return!(d||!r.logOnDifferentValues&&(!e.whyDidYouRender||!e.whyDidYouRender.logOnDifferentValues)&&(t.propsDifferences&&t.propsDifferences.some(function(t){return t.diffType===p.different})||t.stateDifferences&&t.stateDifferences.some(function(t){return t.diffType===p.different})))}(c,e,f)){f.consoleGroup("%c".concat(r),"color: #058;");var s="Re-rendered because";c.propsDifferences&&(y(e,r,s,"props",c.propsDifferences,{prev:o,next:i},f),s="And because"),c.stateDifferences&&y(e,r,s,"state",c.stateDifferences,{prev:a,next:u},f),c.propsDifferences||c.stateDifferences||f.consoleLog(n({},r,e),"Re-rendered although props and state objects are the same.","This usually means there was a call to this.forceUpdate() inside the component.","more info at ".concat(v)),f.consoleGroupEnd()}}var g=function(){};function _(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=console.group,n=console.groupEnd;return e.collapseGroups?r=console.groupCollapsed:e.onlyLogs&&(r=console.log,n=g),o({include:null,exclude:null,notifier:e.notifier||((t=e.hasOwnProperty("hotReloadBufferMs")?e.hotReloadBufferMs:500)&&module&&module.hot&&module.hot.addStatusHandler&&module.hot.addStatusHandler(function(e){"idle"===e&&(d=!0,setTimeout(function(){d=!1},t))}),b),onlyLogs:!1,consoleLog:console.log,consoleGroup:r,consoleGroupEnd:n,logOnDifferentValues:!1},e)}var j="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function m(t,e){return t(e={exports:{}},e.exports),e.exports}var O="object"==typeof j&&j&&j.Object===Object&&j,w="object"==typeof self&&self&&self.Object===Object&&self,E=O||w||Function("return this")(),S=E.Symbol,x=Object.prototype,P=x.hasOwnProperty,D=x.toString,A=S?S.toStringTag:void 0;var R=function(t){var e=P.call(t,A),r=t[A];try{t[A]=void 0}catch(t){}var n=D.call(t);return e?t[A]=r:delete t[A],n},z=Object.prototype.toString;var T=function(t){return z.call(t)},k="[object Null]",L="[object Undefined]",V=S?S.toStringTag:void 0;var C=function(t){return null==t?void 0===t?L:k:V&&V in Object(t)?R(t):T(t)},M=Array.isArray;var $=function(t){return null!=t&&"object"==typeof t},N="[object String]";var F=function(t){return"string"==typeof t||!M(t)&&$(t)&&C(t)==N};function U(t){return t.displayName||t.name||(F(t)?t:void 0)}var q=function(t,e,r,n){var o=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++o]);++o<a;)r=e(r,t[o],o,t);return r};var B=function(t){return function(e,r,n){for(var o=-1,a=Object(e),i=n(e),u=i.length;u--;){var c=i[t?u:++o];if(!1===r(a[c],c,a))break}return e}}();var I=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n},G="[object Arguments]";var Y=function(t){return $(t)&&C(t)==G},W=Object.prototype,H=W.hasOwnProperty,J=W.propertyIsEnumerable,K=Y(function(){return arguments}())?Y:function(t){return $(t)&&H.call(t,"callee")&&!J.call(t,"callee")};var Q=function(){return!1},X=m(function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r?E.Buffer:void 0,a=(o?o.isBuffer:void 0)||Q;t.exports=a}),Z=9007199254740991,tt=/^(?:0|[1-9]\d*)$/;var et=function(t,e){var r=typeof t;return!!(e=null==e?Z:e)&&("number"==r||"symbol"!=r&&tt.test(t))&&t>-1&&t%1==0&&t<e},rt=9007199254740991;var nt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=rt},ot={};ot["[object Float32Array]"]=ot["[object Float64Array]"]=ot["[object Int8Array]"]=ot["[object Int16Array]"]=ot["[object Int32Array]"]=ot["[object Uint8Array]"]=ot["[object Uint8ClampedArray]"]=ot["[object Uint16Array]"]=ot["[object Uint32Array]"]=!0,ot["[object Arguments]"]=ot["[object Array]"]=ot["[object ArrayBuffer]"]=ot["[object Boolean]"]=ot["[object DataView]"]=ot["[object Date]"]=ot["[object Error]"]=ot["[object Function]"]=ot["[object Map]"]=ot["[object Number]"]=ot["[object Object]"]=ot["[object RegExp]"]=ot["[object Set]"]=ot["[object String]"]=ot["[object WeakMap]"]=!1;var at=function(t){return $(t)&&nt(t.length)&&!!ot[C(t)]};var it=function(t){return function(e){return t(e)}},ut=m(function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,o=n&&n.exports===r&&O.process,a=function(){try{var t=n&&n.require&&n.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a}),ct=ut&&ut.isTypedArray,ft=ct?it(ct):at,st=Object.prototype.hasOwnProperty;var lt=function(t,e){var r=M(t),n=!r&&K(t),o=!r&&!n&&X(t),a=!r&&!n&&!o&&ft(t),i=r||n||o||a,u=i?I(t.length,String):[],c=u.length;for(var f in t)!e&&!st.call(t,f)||i&&("length"==f||o&&("offset"==f||"parent"==f)||a&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||et(f,c))||u.push(f);return u},pt=Object.prototype;var vt=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||pt)};var ht=function(t,e){return function(r){return t(e(r))}},dt=ht(Object.keys,Object),yt=Object.prototype.hasOwnProperty;var bt=function(t){if(!vt(t))return dt(t);var e=[];for(var r in Object(t))yt.call(t,r)&&"constructor"!=r&&e.push(r);return e};var gt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},_t="[object AsyncFunction]",jt="[object Function]",mt="[object GeneratorFunction]",Ot="[object Proxy]";var wt=function(t){if(!gt(t))return!1;var e=C(t);return e==jt||e==mt||e==_t||e==Ot};var Et=function(t){return null!=t&&nt(t.length)&&!wt(t)};var St=function(t){return Et(t)?lt(t):bt(t)};var xt=function(t,e){return function(r,n){if(null==r)return r;if(!Et(r))return t(r,n);for(var o=r.length,a=e?o:-1,i=Object(r);(e?a--:++a<o)&&!1!==n(i[a],a,i););return r}}(function(t,e){return t&&B(t,e,St)});var Pt=function(){this.__data__=[],this.size=0};var Dt=function(t,e){return t===e||t!=t&&e!=e};var At=function(t,e){for(var r=t.length;r--;)if(Dt(t[r][0],e))return r;return-1},Rt=Array.prototype.splice;var zt=function(t){var e=this.__data__,r=At(e,t);return!(r<0||(r==e.length-1?e.pop():Rt.call(e,r,1),--this.size,0))};var Tt=function(t){var e=this.__data__,r=At(e,t);return r<0?void 0:e[r][1]};var kt=function(t){return At(this.__data__,t)>-1};var Lt=function(t,e){var r=this.__data__,n=At(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Vt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Vt.prototype.clear=Pt,Vt.prototype.delete=zt,Vt.prototype.get=Tt,Vt.prototype.has=kt,Vt.prototype.set=Lt;var Ct=Vt;var Mt=function(){this.__data__=new Ct,this.size=0};var $t=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var Nt=function(t){return this.__data__.get(t)};var Ft,Ut=function(t){return this.__data__.has(t)},qt=E["__core-js_shared__"],Bt=(Ft=/[^.]+$/.exec(qt&&qt.keys&&qt.keys.IE_PROTO||""))?"Symbol(src)_1."+Ft:"";var It=function(t){return!!Bt&&Bt in t},Gt=Function.prototype.toString;var Yt=function(t){if(null!=t){try{return Gt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Wt=/^\[object .+?Constructor\]$/,Ht=Function.prototype,Jt=Object.prototype,Kt=Ht.toString,Qt=Jt.hasOwnProperty,Xt=RegExp("^"+Kt.call(Qt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Zt=function(t){return!(!gt(t)||It(t))&&(wt(t)?Xt:Wt).test(Yt(t))};var te=function(t,e){return null==t?void 0:t[e]};var ee=function(t,e){var r=te(t,e);return Zt(r)?r:void 0},re=ee(E,"Map"),ne=ee(Object,"create");var oe=function(){this.__data__=ne?ne(null):{},this.size=0};var ae=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ie="__lodash_hash_undefined__",ue=Object.prototype.hasOwnProperty;var ce=function(t){var e=this.__data__;if(ne){var r=e[t];return r===ie?void 0:r}return ue.call(e,t)?e[t]:void 0},fe=Object.prototype.hasOwnProperty;var se=function(t){var e=this.__data__;return ne?void 0!==e[t]:fe.call(e,t)},le="__lodash_hash_undefined__";var pe=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ne&&void 0===e?le:e,this};function ve(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ve.prototype.clear=oe,ve.prototype.delete=ae,ve.prototype.get=ce,ve.prototype.has=se,ve.prototype.set=pe;var he=ve;var de=function(){this.size=0,this.__data__={hash:new he,map:new(re||Ct),string:new he}};var ye=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var be=function(t,e){var r=t.__data__;return ye(e)?r["string"==typeof e?"string":"hash"]:r.map};var ge=function(t){var e=be(this,t).delete(t);return this.size-=e?1:0,e};var _e=function(t){return be(this,t).get(t)};var je=function(t){return be(this,t).has(t)};var me=function(t,e){var r=be(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Oe(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Oe.prototype.clear=de,Oe.prototype.delete=ge,Oe.prototype.get=_e,Oe.prototype.has=je,Oe.prototype.set=me;var we=Oe,Ee=200;var Se=function(t,e){var r=this.__data__;if(r instanceof Ct){var n=r.__data__;if(!re||n.length<Ee-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new we(n)}return r.set(t,e),this.size=r.size,this};function xe(t){var e=this.__data__=new Ct(t);this.size=e.size}xe.prototype.clear=Mt,xe.prototype.delete=$t,xe.prototype.get=Nt,xe.prototype.has=Ut,xe.prototype.set=Se;var Pe=xe,De="__lodash_hash_undefined__";var Ae=function(t){return this.__data__.set(t,De),this};var Re=function(t){return this.__data__.has(t)};function ze(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new we;++e<r;)this.add(t[e])}ze.prototype.add=ze.prototype.push=Ae,ze.prototype.has=Re;var Te=ze;var ke=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var Le=function(t,e){return t.has(e)},Ve=1,Ce=2;var Me=function(t,e,r,n,o,a){var i=r&Ve,u=t.length,c=e.length;if(u!=c&&!(i&&c>u))return!1;var f=a.get(t);if(f&&a.get(e))return f==e;var s=-1,l=!0,p=r&Ce?new Te:void 0;for(a.set(t,e),a.set(e,t);++s<u;){var v=t[s],h=e[s];if(n)var d=i?n(h,v,s,e,t,a):n(v,h,s,t,e,a);if(void 0!==d){if(d)continue;l=!1;break}if(p){if(!ke(e,function(t,e){if(!Le(p,e)&&(v===t||o(v,t,r,n,a)))return p.push(e)})){l=!1;break}}else if(v!==h&&!o(v,h,r,n,a)){l=!1;break}}return a.delete(t),a.delete(e),l},$e=E.Uint8Array;var Ne=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r};var Fe=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r},Ue=1,qe=2,Be="[object Boolean]",Ie="[object Date]",Ge="[object Error]",Ye="[object Map]",We="[object Number]",He="[object RegExp]",Je="[object Set]",Ke="[object String]",Qe="[object Symbol]",Xe="[object ArrayBuffer]",Ze="[object DataView]",tr=S?S.prototype:void 0,er=tr?tr.valueOf:void 0;var rr=function(t,e,r,n,o,a,i){switch(r){case Ze:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Xe:return!(t.byteLength!=e.byteLength||!a(new $e(t),new $e(e)));case Be:case Ie:case We:return Dt(+t,+e);case Ge:return t.name==e.name&&t.message==e.message;case He:case Ke:return t==e+"";case Ye:var u=Ne;case Je:var c=n&Ue;if(u||(u=Fe),t.size!=e.size&&!c)return!1;var f=i.get(t);if(f)return f==e;n|=qe,i.set(t,e);var s=Me(u(t),u(e),n,o,a,i);return i.delete(t),s;case Qe:if(er)return er.call(t)==er.call(e)}return!1};var nr=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t};var or=function(t,e,r){var n=e(t);return M(t)?n:nr(n,r(t))};var ar=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a};var ir=function(){return[]},ur=Object.prototype.propertyIsEnumerable,cr=Object.getOwnPropertySymbols,fr=cr?function(t){return null==t?[]:(t=Object(t),ar(cr(t),function(e){return ur.call(t,e)}))}:ir;var sr=function(t){return or(t,St,fr)},lr=1,pr=Object.prototype.hasOwnProperty;var vr=function(t,e,r,n,o,a){var i=r&lr,u=sr(t),c=u.length;if(c!=sr(e).length&&!i)return!1;for(var f=c;f--;){var s=u[f];if(!(i?s in e:pr.call(e,s)))return!1}var l=a.get(t);if(l&&a.get(e))return l==e;var p=!0;a.set(t,e),a.set(e,t);for(var v=i;++f<c;){var h=t[s=u[f]],d=e[s];if(n)var y=i?n(d,h,s,e,t,a):n(h,d,s,t,e,a);if(!(void 0===y?h===d||o(h,d,r,n,a):y)){p=!1;break}v||(v="constructor"==s)}if(p&&!v){var b=t.constructor,g=e.constructor;b!=g&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof g&&g instanceof g)&&(p=!1)}return a.delete(t),a.delete(e),p},hr=ee(E,"DataView"),dr=ee(E,"Promise"),yr=ee(E,"Set"),br=ee(E,"WeakMap"),gr=Yt(hr),_r=Yt(re),jr=Yt(dr),mr=Yt(yr),Or=Yt(br),wr=C;(hr&&"[object DataView]"!=wr(new hr(new ArrayBuffer(1)))||re&&"[object Map]"!=wr(new re)||dr&&"[object Promise]"!=wr(dr.resolve())||yr&&"[object Set]"!=wr(new yr)||br&&"[object WeakMap]"!=wr(new br))&&(wr=function(t){var e=C(t),r="[object Object]"==e?t.constructor:void 0,n=r?Yt(r):"";if(n)switch(n){case gr:return"[object DataView]";case _r:return"[object Map]";case jr:return"[object Promise]";case mr:return"[object Set]";case Or:return"[object WeakMap]"}return e});var Er=wr,Sr=1,xr="[object Arguments]",Pr="[object Array]",Dr="[object Object]",Ar=Object.prototype.hasOwnProperty;var Rr=function(t,e,r,n,o,a){var i=M(t),u=M(e),c=i?Pr:Er(t),f=u?Pr:Er(e),s=(c=c==xr?Dr:c)==Dr,l=(f=f==xr?Dr:f)==Dr,p=c==f;if(p&&X(t)){if(!X(e))return!1;i=!0,s=!1}if(p&&!s)return a||(a=new Pe),i||ft(t)?Me(t,e,r,n,o,a):rr(t,e,c,r,n,o,a);if(!(r&Sr)){var v=s&&Ar.call(t,"__wrapped__"),h=l&&Ar.call(e,"__wrapped__");if(v||h){var d=v?t.value():t,y=h?e.value():e;return a||(a=new Pe),o(d,y,r,n,a)}}return!!p&&(a||(a=new Pe),vr(t,e,r,n,o,a))};var zr=function t(e,r,n,o,a){return e===r||(null==e||null==r||!$(e)&&!$(r)?e!=e&&r!=r:Rr(e,r,n,o,t,a))},Tr=1,kr=2;var Lr=function(t,e,r,n){var o=r.length,a=o,i=!n;if(null==t)return!a;for(t=Object(t);o--;){var u=r[o];if(i&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<a;){var c=(u=r[o])[0],f=t[c],s=u[1];if(i&&u[2]){if(void 0===f&&!(c in t))return!1}else{var l=new Pe;if(n)var p=n(f,s,c,t,e,l);if(!(void 0===p?zr(s,f,Tr|kr,n,l):p))return!1}}return!0};var Vr=function(t){return t==t&&!gt(t)};var Cr=function(t){for(var e=St(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Vr(o)]}return e};var Mr=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}};var $r=function(t){var e=Cr(t);return 1==e.length&&e[0][2]?Mr(e[0][0],e[0][1]):function(r){return r===t||Lr(r,t,e)}},Nr="[object Symbol]";var Fr=function(t){return"symbol"==typeof t||$(t)&&C(t)==Nr},Ur=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qr=/^\w*$/;var Br=function(t,e){if(M(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Fr(t))||qr.test(t)||!Ur.test(t)||null!=e&&t in Object(e)},Ir="Expected a function";function Gr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(Ir);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Gr.Cache||we),r}Gr.Cache=we;var Yr=Gr,Wr=500;var Hr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jr=/\\(\\)?/g,Kr=function(t){var e=Yr(t,function(t){return r.size===Wr&&r.clear(),t}),r=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Hr,function(t,r,n,o){e.push(n?o.replace(Jr,"$1"):r||t)}),e});var Qr=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Xr=1/0,Zr=S?S.prototype:void 0,tn=Zr?Zr.toString:void 0;var en=function t(e){if("string"==typeof e)return e;if(M(e))return Qr(e,t)+"";if(Fr(e))return tn?tn.call(e):"";var r=e+"";return"0"==r&&1/e==-Xr?"-0":r};var rn=function(t){return null==t?"":en(t)};var nn=function(t,e){return M(t)?t:Br(t,e)?[t]:Kr(rn(t))},on=1/0;var an=function(t){if("string"==typeof t||Fr(t))return t;var e=t+"";return"0"==e&&1/t==-on?"-0":e};var un=function(t,e){for(var r=0,n=(e=nn(e,t)).length;null!=t&&r<n;)t=t[an(e[r++])];return r&&r==n?t:void 0};var cn=function(t,e,r){var n=null==t?void 0:un(t,e);return void 0===n?r:n};var fn=function(t,e){return null!=t&&e in Object(t)};var sn=function(t,e,r){for(var n=-1,o=(e=nn(e,t)).length,a=!1;++n<o;){var i=an(e[n]);if(!(a=null!=t&&r(t,i)))break;t=t[i]}return a||++n!=o?a:!!(o=null==t?0:t.length)&&nt(o)&&et(i,o)&&(M(t)||K(t))};var ln=function(t,e){return null!=t&&sn(t,e,fn)},pn=1,vn=2;var hn=function(t,e){return Br(t)&&Vr(e)?Mr(an(t),e):function(r){var n=cn(r,t);return void 0===n&&n===e?ln(r,t):zr(e,n,pn|vn)}};var dn=function(t){return t};var yn=function(t){return function(e){return null==e?void 0:e[t]}};var bn=function(t){return function(e){return un(e,t)}};var gn=function(t){return Br(t)?yn(an(t)):bn(t)};var _n=function(t){return"function"==typeof t?t:null==t?dn:"object"==typeof t?M(t)?hn(t[0],t[1]):$r(t):gn(t)};var jn=function(t,e,r,n,o){return o(t,function(t,o,a){r=n?(n=!1,t):e(r,t,o,a)}),r};var mn=function(t,e,r){var n=M(t)?q:jn,o=arguments.length<3;return n(t,_n(e,4),r,o,xt)},On=Object.prototype.hasOwnProperty;var wn=function(t,e){return null!=t&&On.call(t,e)};var En=function(t,e){return null!=t&&sn(t,e,wn)},Sn="[object RegExp]";var xn=function(t){return $(t)&&C(t)==Sn},Pn=ut&&ut.isRegExp,Dn=Pn?it(Pn):xn,An="[object Date]";var Rn=function(t){return $(t)&&C(t)==An},zn=ut&&ut.isDate,Tn=zn?it(zn):Rn,kn=ht(Object.getPrototypeOf,Object),Ln="[object Object]",Vn=Function.prototype,Cn=Object.prototype,Mn=Vn.toString,$n=Cn.hasOwnProperty,Nn=Mn.call(Object);var Fn=function(t){if(!$(t)||C(t)!=Ln)return!1;var e=kn(t);if(null===e)return!0;var r=$n.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Mn.call(r)==Nn},Un="undefined"!=typeof Element,qn="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103,Bn=function(t){return t.$$typeof===qn};function In(t,e,r,n,o){return r.push({diffType:o,pathString:n,prevValue:t,nextValue:e}),o!==p.different}function Gn(t,e,r){try{var n=[];return function t(e,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(e===r)return!0;if(!e||!r)return In(e,r,n,o,p.different);if(M(e)&&M(r)){var a=e.length;if(a!==r.length)return In(e,r,n,o,p.different);for(var i=!0,u=a;0!=u--;)t(e[u],r[u],n,"".concat(o,"[").concat(u,"]"))||(i=!1);return In(e,r,n,o,i?p.deepEquals:p.different)}if(Tn(e)&&Tn(r))return e.getTime()===r.getTime()?In(e,r,n,o,p.date):In(e,r,n,o,p.different);if(Dn(e)&&Dn(r))return e.toString()===r.toString()?In(e,r,n,o,p.regex):In(e,r,n,o,p.different);if(Un&&e instanceof Element&&r instanceof Element)return In(e,r,n,o,p.different);if(Bn(e)&&Bn(r))return e.type===r.type?In(e,r,n,o,p.reactElement):In(e,r,n,o,p.different);if(wt(e)&&wt(r))return e.name===r.name?In(e,r,n,o,p.function):In(e,r,n,o,p.different);if(Fn(e)&&Fn(r)){var c=St(e),f=c.length;if(f!==St(r).length)return In(e,r,n,o,p.different);for(var s=f;0!=s--;)if(!En(r,c[s]))return In(e,r,n,o,p.different);for(var l=!0,v=f;0!=v--;){var h=c[v];t(e[h],r[h],n,"".concat(o,".").concat(h))||(l=!1)}return In(e,r,n,o,l?p.deepEquals:p.different)}return In(e,r,n,o,p.different)}(t,e,n,r),n}catch(t){if(t.message&&t.message.match(/stack|recursion/i)||-2146828260===t.number)return console.warn("Warning: why-did-you-render couldn't handle circular references in props.",t.name,t.message),!1;throw t}}var Yn={};function Wn(t,e){if(t===e)return!1;var r=t||Yn,n=e||Yn,a=St(o({},r,n));return mn(a,function(t,e){var o=Gn(r[e],n[e],e);return o&&(t=s(t||[]).concat(s(o))),t},[])}function Hn(t){var e=t.Component,r=t.prevProps,n=t.prevState,o=t.nextProps,a=t.nextState,i=t.options;return{Component:e,displayName:U(e),prevProps:r,prevState:n,nextProps:o,nextState:a,options:i,reason:function(t,e,r,n){return{propsDifferences:Wn(t,r),stateDifferences:Wn(e,n)}}(r,n,o,a)}}var Jn=function(e,n,o,u){var s=function(n){function o(){return t(this,o),c(this,i(o).apply(this,arguments))}return a(o,e),r(o,[{key:"render",value:function(){return u.notifier(Hn({Component:e,prevProps:this._prevProps,prevState:this._prevState,nextProps:this.props,nextState:this.state,options:u})),this._prevProps=this.props,this._prevState=this.state,f(i(o.prototype),"render",this).call(this)}}]),o}();return Object.assign(s,e,{displayName:n}),s},Kn=function(e,n,o,u){var f=function(n){function f(){return t(this,f),c(this,i(f).apply(this,arguments))}return a(f,o.Component),r(f,[{key:"componentDidUpdate",value:function(t){u.notifier(Hn({Component:e,prevProps:t,nextProps:this.props,options:u}))}},{key:"render",value:function(){return e(this.props)}}]),f}();return Object.assign(f,e,{displayName:n}),f};function Qn(t,e,r,n,o){if(t.has(e))return t.get(e);var a=function(t,e,r,n,o){return e.prototype&&"function"==typeof e.prototype.render?Jn(e,r,n,o):Kn(e,r,n,o)}(0,e,r,n,o);return t.set(e,a),a}return function(t,e){var r=_(e),n=t.createElement,o=new Map;return t.createElement=function(e){for(var a=U(e),i="function"==typeof e&&function(t,e,r){return!(function(t,e){return e.exclude&&e.exclude.length>0&&e.exclude.some(function(e){return e.test(t)})}(e,r)||!t.whyDidYouRender&&!function(t,e){return e.include&&e.include.length>0&&e.include.some(function(e){return e.test(t)})}(e,r))}(e,a,r),u=arguments.length,c=new Array(u>1?u-1:0),f=1;f<u;f++)c[f-1]=arguments[f];if(!i)return n.apply(t,[e].concat(c));var s=Qn(o,e,a,t,r);return n.apply(t,[s].concat(c))},t.__REVERT_WHY_DID_YOU_RENDER__=function(){t.createElement=n,delete t.__REVERT_WHY_DID_YOU_RENDER__,o.clear()},t}});
//# sourceMappingURL=whyDidYouRender.min.js.map
{
"name": "@welldone-software/why-did-you-render",
"version": "2.1.0",
"version": "2.2.0",
"description": "Monkey patches React to notify you about avoidable re-renders.",

@@ -13,5 +13,5 @@ "main": "dist/cjs/whyDidYouRender.min.js",

"scripts": {
"start": "cross-env NODE_ENV=demo rollup --config demo/rollup.config.js --watch",
"build": "rollup --config",
"test": "jest",
"start": "cross-env PORT=3003 NODE_ENV=development node demo/serve",
"build": "cross-env NODE_ENV=production rollup --config",
"test": "cross-env NODE_ENV=test jest",
"test:watch": "npm run test -- --watchAll",

@@ -46,2 +46,4 @@ "lint": "esw . --ext=js --cache --cache-location .temp/eslint-cache",

"@babel/preset-react": "^7.0.0",
"acorn-walk": "^6.1.1",
"astring": "^1.3.1",
"babel-core": "^7.0.0-bridge.0",

@@ -55,10 +57,15 @@ "babel-eslint": "^10.0.1",

"eslint": "^5.9.0",
"eslint-plugin-jest": "^21.27.2",
"eslint-plugin-jest": "^22.1.0",
"eslint-plugin-react": "^7.11.1",
"eslint-watch": "^4.0.2",
"express": "^4.16.4",
"express-history-api-fallback": "^2.2.1",
"husky": "^1.2.0",
"jest": "^23.6.0",
"jest-cli": "^23.6.0",
"magic-string": "^0.25.1",
"nollup": "^0.2.4",
"react": "^16.6.3",
"react-dom": "^16.6.3",
"react-hot-loader": "^4.3.12",
"react-test-renderer": "^16.6.3",

@@ -69,9 +76,5 @@ "rimraf": "^2.6.2",

"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-copy": "^0.2.3",
"rollup-plugin-livereload": "^0.6.0",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-license": "^0.7.0",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-serve": "^0.6.0",
"rollup-plugin-terser": "^3.0.0"

@@ -78,0 +81,0 @@ },

@@ -83,2 +83,3 @@ # Why Did You Render

- `collapseGroups: false`
- `hotReloadBufferMs: 500`
- `notifier: ({Component, displayName, prevProps, prevState, nextProps, nextState, reason, options}) => void`

@@ -112,2 +113,8 @@

#### hotReloadBufferMs
Time in milliseconds to ignore updates after a hot reload is detected.
We can't currently know exactly if a render was triggered by hot reload,
so instead, we ignore all updates for `hotReloadBufferMs` (default: 500) after a hot reload.
#### notifier

@@ -114,0 +121,0 @@ A notifier can be provided if the default one does not suite your needs.

@@ -14,3 +14,9 @@ import {diffTypes} from './consts'

let inHotReload = false
function shouldLog(reason, Component, options){
if(inHotReload){
return false
}
if(options.logOnDifferentValues){

@@ -89,1 +95,18 @@ return true

}
export function createDefaultNotifier(hotReloadBufferMs){
if(hotReloadBufferMs){
if(module && module.hot && module.hot.addStatusHandler){
module.hot.addStatusHandler(status => {
if(status === 'idle'){
inHotReload = true
setTimeout(() => {
inHotReload = false
}, hotReloadBufferMs)
}
})
}
}
return defaultNotifier
}
import {isString} from 'lodash'
export default function getDisplayName(type){
return isString(type) ? type : (type.displayName || type.name)
return type.displayName || type.name || (isString(type) ? type : undefined)
}
/* eslint-disable no-console */
import defaultNotifier from './defaultNotifier'
import {createDefaultNotifier} from './defaultNotifier'

@@ -18,6 +18,13 @@ const emptyFn = () => {}

const notifier = userOptions.notifier || (
createDefaultNotifier(
userOptions.hasOwnProperty('hotReloadBufferMs') ?
userOptions.hotReloadBufferMs : 500
)
)
return {
include: null,
exclude: null,
notifier: defaultNotifier,
notifier,
onlyLogs: false,

@@ -24,0 +31,0 @@ consoleLog: console.log,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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