hoist-non-react-statics.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  3. typeof define === 'function' && define.amd ? define(factory) :
  4. (global = global || self, global.hoistNonReactStatics = factory());
  5. }(this, (function () { 'use strict';
  6. function unwrapExports (x) {
  7. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
  8. }
  9. function createCommonjsModule(fn, module) {
  10. return module = { exports: {} }, fn(module, module.exports), module.exports;
  11. }
  12. var reactIs_production_min = createCommonjsModule(function (module, exports) {
  13. Object.defineProperty(exports,"__esModule",{value:!0});
  14. var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.suspense_list"):
  15. 60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.fundamental"):60117,w=b?Symbol.for("react.responder"):60118,x=b?Symbol.for("react.scope"):60119;function y(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function z(a){return y(a)===m}
  16. exports.typeOf=y;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;
  17. exports.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===v||a.$$typeof===w||a.$$typeof===x)};exports.isAsyncMode=function(a){return z(a)||y(a)===l};exports.isConcurrentMode=z;exports.isContextConsumer=function(a){return y(a)===k};exports.isContextProvider=function(a){return y(a)===h};
  18. exports.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return y(a)===n};exports.isFragment=function(a){return y(a)===e};exports.isLazy=function(a){return y(a)===t};exports.isMemo=function(a){return y(a)===r};exports.isPortal=function(a){return y(a)===d};exports.isProfiler=function(a){return y(a)===g};exports.isStrictMode=function(a){return y(a)===f};exports.isSuspense=function(a){return y(a)===p};
  19. });
  20. unwrapExports(reactIs_production_min);
  21. var reactIs_production_min_1 = reactIs_production_min.typeOf;
  22. var reactIs_production_min_2 = reactIs_production_min.AsyncMode;
  23. var reactIs_production_min_3 = reactIs_production_min.ConcurrentMode;
  24. var reactIs_production_min_4 = reactIs_production_min.ContextConsumer;
  25. var reactIs_production_min_5 = reactIs_production_min.ContextProvider;
  26. var reactIs_production_min_6 = reactIs_production_min.Element;
  27. var reactIs_production_min_7 = reactIs_production_min.ForwardRef;
  28. var reactIs_production_min_8 = reactIs_production_min.Fragment;
  29. var reactIs_production_min_9 = reactIs_production_min.Lazy;
  30. var reactIs_production_min_10 = reactIs_production_min.Memo;
  31. var reactIs_production_min_11 = reactIs_production_min.Portal;
  32. var reactIs_production_min_12 = reactIs_production_min.Profiler;
  33. var reactIs_production_min_13 = reactIs_production_min.StrictMode;
  34. var reactIs_production_min_14 = reactIs_production_min.Suspense;
  35. var reactIs_production_min_15 = reactIs_production_min.isValidElementType;
  36. var reactIs_production_min_16 = reactIs_production_min.isAsyncMode;
  37. var reactIs_production_min_17 = reactIs_production_min.isConcurrentMode;
  38. var reactIs_production_min_18 = reactIs_production_min.isContextConsumer;
  39. var reactIs_production_min_19 = reactIs_production_min.isContextProvider;
  40. var reactIs_production_min_20 = reactIs_production_min.isElement;
  41. var reactIs_production_min_21 = reactIs_production_min.isForwardRef;
  42. var reactIs_production_min_22 = reactIs_production_min.isFragment;
  43. var reactIs_production_min_23 = reactIs_production_min.isLazy;
  44. var reactIs_production_min_24 = reactIs_production_min.isMemo;
  45. var reactIs_production_min_25 = reactIs_production_min.isPortal;
  46. var reactIs_production_min_26 = reactIs_production_min.isProfiler;
  47. var reactIs_production_min_27 = reactIs_production_min.isStrictMode;
  48. var reactIs_production_min_28 = reactIs_production_min.isSuspense;
  49. var reactIs_development = createCommonjsModule(function (module, exports) {
  50. if (process.env.NODE_ENV !== "production") {
  51. (function() {
  52. Object.defineProperty(exports, '__esModule', { value: true });
  53. // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  54. // nor polyfill, then a plain number is used for performance.
  55. var hasSymbol = typeof Symbol === 'function' && Symbol.for;
  56. var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
  57. var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
  58. var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
  59. var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
  60. var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
  61. var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
  62. var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
  63. // (unstable) APIs that have been removed. Can we remove the symbols?
  64. var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
  65. var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
  66. var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
  67. var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
  68. var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
  69. var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
  70. var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
  71. var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
  72. var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
  73. var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
  74. function isValidElementType(type) {
  75. return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
  76. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE);
  77. }
  78. /**
  79. * Forked from fbjs/warning:
  80. * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
  81. *
  82. * Only change is we use console.warn instead of console.error,
  83. * and do nothing when 'console' is not supported.
  84. * This really simplifies the code.
  85. * ---
  86. * Similar to invariant but only logs a warning if the condition is not met.
  87. * This can be used to log issues in development environments in critical
  88. * paths. Removing the logging code for production environments will keep the
  89. * same logic and follow the same code paths.
  90. */
  91. var lowPriorityWarningWithoutStack = function () {};
  92. {
  93. var printWarning = function (format) {
  94. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  95. args[_key - 1] = arguments[_key];
  96. }
  97. var argIndex = 0;
  98. var message = 'Warning: ' + format.replace(/%s/g, function () {
  99. return args[argIndex++];
  100. });
  101. if (typeof console !== 'undefined') {
  102. console.warn(message);
  103. }
  104. try {
  105. // --- Welcome to debugging React ---
  106. // This error was thrown as a convenience so that you can use this stack
  107. // to find the callsite that caused this warning to fire.
  108. throw new Error(message);
  109. } catch (x) {}
  110. };
  111. lowPriorityWarningWithoutStack = function (condition, format) {
  112. if (format === undefined) {
  113. throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
  114. }
  115. if (!condition) {
  116. for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
  117. args[_key2 - 2] = arguments[_key2];
  118. }
  119. printWarning.apply(void 0, [format].concat(args));
  120. }
  121. };
  122. }
  123. var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;
  124. function typeOf(object) {
  125. if (typeof object === 'object' && object !== null) {
  126. var $$typeof = object.$$typeof;
  127. switch ($$typeof) {
  128. case REACT_ELEMENT_TYPE:
  129. var type = object.type;
  130. switch (type) {
  131. case REACT_ASYNC_MODE_TYPE:
  132. case REACT_CONCURRENT_MODE_TYPE:
  133. case REACT_FRAGMENT_TYPE:
  134. case REACT_PROFILER_TYPE:
  135. case REACT_STRICT_MODE_TYPE:
  136. case REACT_SUSPENSE_TYPE:
  137. return type;
  138. default:
  139. var $$typeofType = type && type.$$typeof;
  140. switch ($$typeofType) {
  141. case REACT_CONTEXT_TYPE:
  142. case REACT_FORWARD_REF_TYPE:
  143. case REACT_LAZY_TYPE:
  144. case REACT_MEMO_TYPE:
  145. case REACT_PROVIDER_TYPE:
  146. return $$typeofType;
  147. default:
  148. return $$typeof;
  149. }
  150. }
  151. case REACT_PORTAL_TYPE:
  152. return $$typeof;
  153. }
  154. }
  155. return undefined;
  156. } // AsyncMode is deprecated along with isAsyncMode
  157. var AsyncMode = REACT_ASYNC_MODE_TYPE;
  158. var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
  159. var ContextConsumer = REACT_CONTEXT_TYPE;
  160. var ContextProvider = REACT_PROVIDER_TYPE;
  161. var Element = REACT_ELEMENT_TYPE;
  162. var ForwardRef = REACT_FORWARD_REF_TYPE;
  163. var Fragment = REACT_FRAGMENT_TYPE;
  164. var Lazy = REACT_LAZY_TYPE;
  165. var Memo = REACT_MEMO_TYPE;
  166. var Portal = REACT_PORTAL_TYPE;
  167. var Profiler = REACT_PROFILER_TYPE;
  168. var StrictMode = REACT_STRICT_MODE_TYPE;
  169. var Suspense = REACT_SUSPENSE_TYPE;
  170. var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
  171. function isAsyncMode(object) {
  172. {
  173. if (!hasWarnedAboutDeprecatedIsAsyncMode) {
  174. hasWarnedAboutDeprecatedIsAsyncMode = true;
  175. lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
  176. }
  177. }
  178. return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
  179. }
  180. function isConcurrentMode(object) {
  181. return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
  182. }
  183. function isContextConsumer(object) {
  184. return typeOf(object) === REACT_CONTEXT_TYPE;
  185. }
  186. function isContextProvider(object) {
  187. return typeOf(object) === REACT_PROVIDER_TYPE;
  188. }
  189. function isElement(object) {
  190. return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  191. }
  192. function isForwardRef(object) {
  193. return typeOf(object) === REACT_FORWARD_REF_TYPE;
  194. }
  195. function isFragment(object) {
  196. return typeOf(object) === REACT_FRAGMENT_TYPE;
  197. }
  198. function isLazy(object) {
  199. return typeOf(object) === REACT_LAZY_TYPE;
  200. }
  201. function isMemo(object) {
  202. return typeOf(object) === REACT_MEMO_TYPE;
  203. }
  204. function isPortal(object) {
  205. return typeOf(object) === REACT_PORTAL_TYPE;
  206. }
  207. function isProfiler(object) {
  208. return typeOf(object) === REACT_PROFILER_TYPE;
  209. }
  210. function isStrictMode(object) {
  211. return typeOf(object) === REACT_STRICT_MODE_TYPE;
  212. }
  213. function isSuspense(object) {
  214. return typeOf(object) === REACT_SUSPENSE_TYPE;
  215. }
  216. exports.typeOf = typeOf;
  217. exports.AsyncMode = AsyncMode;
  218. exports.ConcurrentMode = ConcurrentMode;
  219. exports.ContextConsumer = ContextConsumer;
  220. exports.ContextProvider = ContextProvider;
  221. exports.Element = Element;
  222. exports.ForwardRef = ForwardRef;
  223. exports.Fragment = Fragment;
  224. exports.Lazy = Lazy;
  225. exports.Memo = Memo;
  226. exports.Portal = Portal;
  227. exports.Profiler = Profiler;
  228. exports.StrictMode = StrictMode;
  229. exports.Suspense = Suspense;
  230. exports.isValidElementType = isValidElementType;
  231. exports.isAsyncMode = isAsyncMode;
  232. exports.isConcurrentMode = isConcurrentMode;
  233. exports.isContextConsumer = isContextConsumer;
  234. exports.isContextProvider = isContextProvider;
  235. exports.isElement = isElement;
  236. exports.isForwardRef = isForwardRef;
  237. exports.isFragment = isFragment;
  238. exports.isLazy = isLazy;
  239. exports.isMemo = isMemo;
  240. exports.isPortal = isPortal;
  241. exports.isProfiler = isProfiler;
  242. exports.isStrictMode = isStrictMode;
  243. exports.isSuspense = isSuspense;
  244. })();
  245. }
  246. });
  247. unwrapExports(reactIs_development);
  248. var reactIs_development_1 = reactIs_development.typeOf;
  249. var reactIs_development_2 = reactIs_development.AsyncMode;
  250. var reactIs_development_3 = reactIs_development.ConcurrentMode;
  251. var reactIs_development_4 = reactIs_development.ContextConsumer;
  252. var reactIs_development_5 = reactIs_development.ContextProvider;
  253. var reactIs_development_6 = reactIs_development.Element;
  254. var reactIs_development_7 = reactIs_development.ForwardRef;
  255. var reactIs_development_8 = reactIs_development.Fragment;
  256. var reactIs_development_9 = reactIs_development.Lazy;
  257. var reactIs_development_10 = reactIs_development.Memo;
  258. var reactIs_development_11 = reactIs_development.Portal;
  259. var reactIs_development_12 = reactIs_development.Profiler;
  260. var reactIs_development_13 = reactIs_development.StrictMode;
  261. var reactIs_development_14 = reactIs_development.Suspense;
  262. var reactIs_development_15 = reactIs_development.isValidElementType;
  263. var reactIs_development_16 = reactIs_development.isAsyncMode;
  264. var reactIs_development_17 = reactIs_development.isConcurrentMode;
  265. var reactIs_development_18 = reactIs_development.isContextConsumer;
  266. var reactIs_development_19 = reactIs_development.isContextProvider;
  267. var reactIs_development_20 = reactIs_development.isElement;
  268. var reactIs_development_21 = reactIs_development.isForwardRef;
  269. var reactIs_development_22 = reactIs_development.isFragment;
  270. var reactIs_development_23 = reactIs_development.isLazy;
  271. var reactIs_development_24 = reactIs_development.isMemo;
  272. var reactIs_development_25 = reactIs_development.isPortal;
  273. var reactIs_development_26 = reactIs_development.isProfiler;
  274. var reactIs_development_27 = reactIs_development.isStrictMode;
  275. var reactIs_development_28 = reactIs_development.isSuspense;
  276. var reactIs = createCommonjsModule(function (module) {
  277. if (process.env.NODE_ENV === 'production') {
  278. module.exports = reactIs_production_min;
  279. } else {
  280. module.exports = reactIs_development;
  281. }
  282. });
  283. var reactIs_1 = reactIs.typeOf;
  284. var reactIs_2 = reactIs.AsyncMode;
  285. var reactIs_3 = reactIs.ConcurrentMode;
  286. var reactIs_4 = reactIs.ContextConsumer;
  287. var reactIs_5 = reactIs.ContextProvider;
  288. var reactIs_6 = reactIs.Element;
  289. var reactIs_7 = reactIs.ForwardRef;
  290. var reactIs_8 = reactIs.Fragment;
  291. var reactIs_9 = reactIs.Lazy;
  292. var reactIs_10 = reactIs.Memo;
  293. var reactIs_11 = reactIs.Portal;
  294. var reactIs_12 = reactIs.Profiler;
  295. var reactIs_13 = reactIs.StrictMode;
  296. var reactIs_14 = reactIs.Suspense;
  297. var reactIs_15 = reactIs.isValidElementType;
  298. var reactIs_16 = reactIs.isAsyncMode;
  299. var reactIs_17 = reactIs.isConcurrentMode;
  300. var reactIs_18 = reactIs.isContextConsumer;
  301. var reactIs_19 = reactIs.isContextProvider;
  302. var reactIs_20 = reactIs.isElement;
  303. var reactIs_21 = reactIs.isForwardRef;
  304. var reactIs_22 = reactIs.isFragment;
  305. var reactIs_23 = reactIs.isLazy;
  306. var reactIs_24 = reactIs.isMemo;
  307. var reactIs_25 = reactIs.isPortal;
  308. var reactIs_26 = reactIs.isProfiler;
  309. var reactIs_27 = reactIs.isStrictMode;
  310. var reactIs_28 = reactIs.isSuspense;
  311. /**
  312. * Copyright 2015, Yahoo! Inc.
  313. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
  314. */
  315. var REACT_STATICS = {
  316. childContextTypes: true,
  317. contextType: true,
  318. contextTypes: true,
  319. defaultProps: true,
  320. displayName: true,
  321. getDefaultProps: true,
  322. getDerivedStateFromError: true,
  323. getDerivedStateFromProps: true,
  324. mixins: true,
  325. propTypes: true,
  326. type: true
  327. };
  328. var KNOWN_STATICS = {
  329. name: true,
  330. length: true,
  331. prototype: true,
  332. caller: true,
  333. callee: true,
  334. arguments: true,
  335. arity: true
  336. };
  337. var FORWARD_REF_STATICS = {
  338. '$$typeof': true,
  339. render: true,
  340. defaultProps: true,
  341. displayName: true,
  342. propTypes: true
  343. };
  344. var MEMO_STATICS = {
  345. '$$typeof': true,
  346. compare: true,
  347. defaultProps: true,
  348. displayName: true,
  349. propTypes: true,
  350. type: true
  351. };
  352. var TYPE_STATICS = {};
  353. TYPE_STATICS[reactIs_7] = FORWARD_REF_STATICS;
  354. TYPE_STATICS[reactIs_10] = MEMO_STATICS;
  355. function getStatics(component) {
  356. // React v16.11 and below
  357. if (reactIs_24(component)) {
  358. return MEMO_STATICS;
  359. } // React v16.12 and above
  360. return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
  361. }
  362. var defineProperty = Object.defineProperty;
  363. var getOwnPropertyNames = Object.getOwnPropertyNames;
  364. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  365. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  366. var getPrototypeOf = Object.getPrototypeOf;
  367. var objectPrototype = Object.prototype;
  368. function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
  369. if (typeof sourceComponent !== 'string') {
  370. // don't hoist over string (html) components
  371. if (objectPrototype) {
  372. var inheritedComponent = getPrototypeOf(sourceComponent);
  373. if (inheritedComponent && inheritedComponent !== objectPrototype) {
  374. hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
  375. }
  376. }
  377. var keys = getOwnPropertyNames(sourceComponent);
  378. if (getOwnPropertySymbols) {
  379. keys = keys.concat(getOwnPropertySymbols(sourceComponent));
  380. }
  381. var targetStatics = getStatics(targetComponent);
  382. var sourceStatics = getStatics(sourceComponent);
  383. for (var i = 0; i < keys.length; ++i) {
  384. var key = keys[i];
  385. if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
  386. var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
  387. try {
  388. // Avoid failures from read-only properties
  389. defineProperty(targetComponent, key, descriptor);
  390. } catch (e) {}
  391. }
  392. }
  393. }
  394. return targetComponent;
  395. }
  396. return hoistNonReactStatics;
  397. })));