index.js 65 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // identity function for calling harmony imports with the correct context
  38. /******/ __webpack_require__.i = function(value) { return value; };
  39. /******/
  40. /******/ // define getter function for harmony exports
  41. /******/ __webpack_require__.d = function(exports, name, getter) {
  42. /******/ if(!__webpack_require__.o(exports, name)) {
  43. /******/ Object.defineProperty(exports, name, {
  44. /******/ configurable: false,
  45. /******/ enumerable: true,
  46. /******/ get: getter
  47. /******/ });
  48. /******/ }
  49. /******/ };
  50. /******/
  51. /******/ // getDefaultExport function for compatibility with non-harmony modules
  52. /******/ __webpack_require__.n = function(module) {
  53. /******/ var getter = module && module.__esModule ?
  54. /******/ function getDefault() { return module['default']; } :
  55. /******/ function getModuleExports() { return module; };
  56. /******/ __webpack_require__.d(getter, 'a', getter);
  57. /******/ return getter;
  58. /******/ };
  59. /******/
  60. /******/ // Object.prototype.hasOwnProperty.call
  61. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  62. /******/
  63. /******/ // __webpack_public_path__
  64. /******/ __webpack_require__.p = "";
  65. /******/
  66. /******/ // Load entry module and return exports
  67. /******/ return __webpack_require__(__webpack_require__.s = 8);
  68. /******/ })
  69. /************************************************************************/
  70. /******/ ([
  71. /* 0 */
  72. /***/ (function(module, exports) {
  73. // shim for using process in browser
  74. var process = module.exports = {};
  75. // cached from whatever global is present so that test runners that stub it
  76. // don't break things. But we need to wrap it in a try catch in case it is
  77. // wrapped in strict mode code which doesn't define any globals. It's inside a
  78. // function because try/catches deoptimize in certain engines.
  79. var cachedSetTimeout;
  80. var cachedClearTimeout;
  81. function defaultSetTimout() {
  82. throw new Error('setTimeout has not been defined');
  83. }
  84. function defaultClearTimeout () {
  85. throw new Error('clearTimeout has not been defined');
  86. }
  87. (function () {
  88. try {
  89. if (typeof setTimeout === 'function') {
  90. cachedSetTimeout = setTimeout;
  91. } else {
  92. cachedSetTimeout = defaultSetTimout;
  93. }
  94. } catch (e) {
  95. cachedSetTimeout = defaultSetTimout;
  96. }
  97. try {
  98. if (typeof clearTimeout === 'function') {
  99. cachedClearTimeout = clearTimeout;
  100. } else {
  101. cachedClearTimeout = defaultClearTimeout;
  102. }
  103. } catch (e) {
  104. cachedClearTimeout = defaultClearTimeout;
  105. }
  106. } ())
  107. function runTimeout(fun) {
  108. if (cachedSetTimeout === setTimeout) {
  109. //normal enviroments in sane situations
  110. return setTimeout(fun, 0);
  111. }
  112. // if setTimeout wasn't available but was latter defined
  113. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  114. cachedSetTimeout = setTimeout;
  115. return setTimeout(fun, 0);
  116. }
  117. try {
  118. // when when somebody has screwed with setTimeout but no I.E. maddness
  119. return cachedSetTimeout(fun, 0);
  120. } catch(e){
  121. try {
  122. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  123. return cachedSetTimeout.call(null, fun, 0);
  124. } catch(e){
  125. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  126. return cachedSetTimeout.call(this, fun, 0);
  127. }
  128. }
  129. }
  130. function runClearTimeout(marker) {
  131. if (cachedClearTimeout === clearTimeout) {
  132. //normal enviroments in sane situations
  133. return clearTimeout(marker);
  134. }
  135. // if clearTimeout wasn't available but was latter defined
  136. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  137. cachedClearTimeout = clearTimeout;
  138. return clearTimeout(marker);
  139. }
  140. try {
  141. // when when somebody has screwed with setTimeout but no I.E. maddness
  142. return cachedClearTimeout(marker);
  143. } catch (e){
  144. try {
  145. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  146. return cachedClearTimeout.call(null, marker);
  147. } catch (e){
  148. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  149. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  150. return cachedClearTimeout.call(this, marker);
  151. }
  152. }
  153. }
  154. var queue = [];
  155. var draining = false;
  156. var currentQueue;
  157. var queueIndex = -1;
  158. function cleanUpNextTick() {
  159. if (!draining || !currentQueue) {
  160. return;
  161. }
  162. draining = false;
  163. if (currentQueue.length) {
  164. queue = currentQueue.concat(queue);
  165. } else {
  166. queueIndex = -1;
  167. }
  168. if (queue.length) {
  169. drainQueue();
  170. }
  171. }
  172. function drainQueue() {
  173. if (draining) {
  174. return;
  175. }
  176. var timeout = runTimeout(cleanUpNextTick);
  177. draining = true;
  178. var len = queue.length;
  179. while(len) {
  180. currentQueue = queue;
  181. queue = [];
  182. while (++queueIndex < len) {
  183. if (currentQueue) {
  184. currentQueue[queueIndex].run();
  185. }
  186. }
  187. queueIndex = -1;
  188. len = queue.length;
  189. }
  190. currentQueue = null;
  191. draining = false;
  192. runClearTimeout(timeout);
  193. }
  194. process.nextTick = function (fun) {
  195. var args = new Array(arguments.length - 1);
  196. if (arguments.length > 1) {
  197. for (var i = 1; i < arguments.length; i++) {
  198. args[i - 1] = arguments[i];
  199. }
  200. }
  201. queue.push(new Item(fun, args));
  202. if (queue.length === 1 && !draining) {
  203. runTimeout(drainQueue);
  204. }
  205. };
  206. // v8 likes predictible objects
  207. function Item(fun, array) {
  208. this.fun = fun;
  209. this.array = array;
  210. }
  211. Item.prototype.run = function () {
  212. this.fun.apply(null, this.array);
  213. };
  214. process.title = 'browser';
  215. process.browser = true;
  216. process.env = {};
  217. process.argv = [];
  218. process.version = ''; // empty string to avoid regexp issues
  219. process.versions = {};
  220. function noop() {}
  221. process.on = noop;
  222. process.addListener = noop;
  223. process.once = noop;
  224. process.off = noop;
  225. process.removeListener = noop;
  226. process.removeAllListeners = noop;
  227. process.emit = noop;
  228. process.prependListener = noop;
  229. process.prependOnceListener = noop;
  230. process.listeners = function (name) { return [] }
  231. process.binding = function (name) {
  232. throw new Error('process.binding is not supported');
  233. };
  234. process.cwd = function () { return '/' };
  235. process.chdir = function (dir) {
  236. throw new Error('process.chdir is not supported');
  237. };
  238. process.umask = function() { return 0; };
  239. /***/ }),
  240. /* 1 */
  241. /***/ (function(module, exports, __webpack_require__) {
  242. "use strict";
  243. /**
  244. * Copyright (c) 2013-present, Facebook, Inc.
  245. *
  246. * This source code is licensed under the MIT license found in the
  247. * LICENSE file in the root directory of this source tree.
  248. */
  249. var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
  250. module.exports = ReactPropTypesSecret;
  251. /***/ }),
  252. /* 2 */
  253. /***/ (function(module, exports, __webpack_require__) {
  254. "use strict";
  255. /* WEBPACK VAR INJECTION */(function(process) {
  256. if (process.env.NODE_ENV === 'production') {
  257. module.exports = __webpack_require__(17);
  258. } else {
  259. module.exports = __webpack_require__(16);
  260. }
  261. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  262. /***/ }),
  263. /* 3 */
  264. /***/ (function(module, exports, __webpack_require__) {
  265. "use strict";
  266. Object.defineProperty(exports, "__esModule", {
  267. value: true
  268. });
  269. var defaultColors = exports.defaultColors = ['#e25f51', // A
  270. '#f26091', // B
  271. '#bb65ca', // C
  272. '#9572cf', // D
  273. '#7884cd', // E
  274. '#5b95f9', // F
  275. '#48c2f9', // G
  276. '#45d0e2', // H
  277. '#48b6ac', // I
  278. '#52bc89', // J
  279. '#9bce5f', // K
  280. '#d4e34a', // L
  281. '#feda10', // M
  282. '#f7c000', // N
  283. '#ffa800', // O
  284. '#ff8a60', // P
  285. '#c2c2c2', // Q
  286. '#8fa4af', // R
  287. '#a2887e', // S
  288. '#a3a3a3', // T
  289. '#afb5e2', // U
  290. '#b39bdd', // V
  291. '#c2c2c2', // W
  292. '#7cdeeb', // X
  293. '#bcaaa4', // Y
  294. '#add67d' // Z
  295. ];
  296. /***/ }),
  297. /* 4 */
  298. /***/ (function(module, exports, __webpack_require__) {
  299. var hexToRgb = __webpack_require__(11);
  300. module.exports = function contrast (hex) {
  301. var rgb = hexToRgb(hex);
  302. var o = Math.round(((parseInt(rgb[0]) * 299) + (parseInt(rgb[1]) * 587) + (parseInt(rgb[2]) * 114)) /1000);
  303. return (o <= 180) ? 'dark' : 'light';
  304. };
  305. /***/ }),
  306. /* 5 */
  307. /***/ (function(module, exports, __webpack_require__) {
  308. /* WEBPACK VAR INJECTION */(function(process) {/**
  309. * Copyright (c) 2013-present, Facebook, Inc.
  310. *
  311. * This source code is licensed under the MIT license found in the
  312. * LICENSE file in the root directory of this source tree.
  313. */
  314. if (process.env.NODE_ENV !== 'production') {
  315. var ReactIs = __webpack_require__(2);
  316. // By explicitly using `prop-types` you are opting into new development behavior.
  317. // http://fb.me/prop-types-in-prod
  318. var throwOnDirectAccess = true;
  319. module.exports = __webpack_require__(15)(ReactIs.isElement, throwOnDirectAccess);
  320. } else {
  321. // By explicitly using `prop-types` you are opting into new production behavior.
  322. // http://fb.me/prop-types-in-prod
  323. module.exports = __webpack_require__(14)();
  324. }
  325. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  326. /***/ }),
  327. /* 6 */
  328. /***/ (function(module, exports, __webpack_require__) {
  329. var api = __webpack_require__(18);
  330. var content = __webpack_require__(9);
  331. content = content.__esModule ? content.default : content;
  332. if (typeof content === 'string') {
  333. content = [[module.i, content, '']];
  334. }
  335. var options = {};
  336. options.insert = "head";
  337. options.singleton = false;
  338. var update = api(content, options);
  339. var exported = content.locals ? content.locals : {};
  340. module.exports = exported;
  341. /***/ }),
  342. /* 7 */
  343. /***/ (function(module, exports) {
  344. module.exports = require("react");
  345. /***/ }),
  346. /* 8 */
  347. /***/ (function(module, exports, __webpack_require__) {
  348. "use strict";
  349. Object.defineProperty(exports, "__esModule", {
  350. value: true
  351. });
  352. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  353. var _react = __webpack_require__(7);
  354. var _react2 = _interopRequireDefault(_react);
  355. var _propTypes = __webpack_require__(5);
  356. var _propTypes2 = _interopRequireDefault(_propTypes);
  357. var _colors = __webpack_require__(3);
  358. var _contrast = __webpack_require__(4);
  359. var _contrast2 = _interopRequireDefault(_contrast);
  360. __webpack_require__(6);
  361. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  362. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  363. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  364. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  365. var LetteredAvatar = function (_Component) {
  366. _inherits(LetteredAvatar, _Component);
  367. function LetteredAvatar() {
  368. _classCallCheck(this, LetteredAvatar);
  369. return _possibleConstructorReturn(this, (LetteredAvatar.__proto__ || Object.getPrototypeOf(LetteredAvatar)).apply(this, arguments));
  370. }
  371. _createClass(LetteredAvatar, [{
  372. key: "render",
  373. value: function render() {
  374. var _props = this.props,
  375. name = _props.name,
  376. color = _props.color,
  377. backgroundColors = _props.backgroundColors,
  378. backgroundColor = _props.backgroundColor,
  379. radius = _props.radius,
  380. size = _props.size;
  381. var initials = "",
  382. defaultBackground = "";
  383. var sumChars = function sumChars(str) {
  384. var sum = 0;
  385. for (var i = 0; i < str.length; i++) {
  386. sum += str.charCodeAt(i);
  387. }
  388. return sum;
  389. };
  390. // GET AND SET INITIALS
  391. var names = name.split(" ");
  392. if (names.length === 1) {
  393. initials = names[0].substring(0, 1).toUpperCase();
  394. } else if (names.length > 1) {
  395. names.forEach(function (n, i) {
  396. initials += names[i].substring(0, 1).toUpperCase();
  397. });
  398. }
  399. // SET BACKGROUND COLOR
  400. if (/[A-Z]/.test(initials)) {
  401. var index = initials.charCodeAt() - 65;
  402. if (backgroundColor) {
  403. defaultBackground = backgroundColor;
  404. } else if (backgroundColors && backgroundColors.length) {
  405. var i = sumChars(name) % backgroundColors.length;
  406. defaultBackground = backgroundColors[i];
  407. } else {
  408. defaultBackground = _colors.defaultColors[index];
  409. }
  410. } else if (/[\d]/.test(initials)) {
  411. defaultBackground = _colors.defaultColors[parseInt(initials)];
  412. } else {
  413. defaultBackground = "#051923";
  414. }
  415. var styles = {
  416. color: color,
  417. backgroundColor: "" + defaultBackground,
  418. width: size,
  419. height: size,
  420. lineHeight: size + "px",
  421. borderRadius: (radius || radius === 0 ? radius : size) + "px",
  422. fontSize: "100%"
  423. };
  424. return _react2.default.createElement(
  425. "div",
  426. {
  427. className: "lettered-avatar-wrapper " + (0, _contrast2.default)(styles.backgroundColor),
  428. style: styles,
  429. "aria-label": name
  430. },
  431. _react2.default.createElement(
  432. "div",
  433. { className: "lettered-avatar" },
  434. initials
  435. )
  436. );
  437. }
  438. }]);
  439. return LetteredAvatar;
  440. }(_react.Component);
  441. LetteredAvatar.propTypes = {
  442. name: _propTypes2.default.string.isRequired,
  443. color: _propTypes2.default.string,
  444. backgroundColor: _propTypes2.default.string,
  445. radius: _propTypes2.default.number,
  446. size: _propTypes2.default.number
  447. };
  448. LetteredAvatar.defaultProps = {
  449. name: "Lettered Avatar",
  450. color: "",
  451. size: 48
  452. };
  453. exports.default = LetteredAvatar;
  454. /***/ }),
  455. /* 9 */
  456. /***/ (function(module, exports, __webpack_require__) {
  457. // Imports
  458. var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(10);
  459. exports = ___CSS_LOADER_API_IMPORT___(false);
  460. // Module
  461. exports.push([module.i, ".lettered-avatar-wrapper {\r\n text-align: center;\r\n}\r\n\r\n.lettered-avatar-wrapper.light {\r\n color: #000;\r\n}\r\n\r\n.lettered-avatar-wrapper.dark {\r\n color: #fff;\r\n}\r\n\r\n.lettered-avatar {\r\n white-space: nowrap;\r\n overflow: hidden;\r\n font-size: 24px;\r\n}", ""]);
  462. // Exports
  463. module.exports = exports;
  464. /***/ }),
  465. /* 10 */
  466. /***/ (function(module, exports, __webpack_require__) {
  467. "use strict";
  468. /*
  469. MIT License http://www.opensource.org/licenses/mit-license.php
  470. Author Tobias Koppers @sokra
  471. */
  472. // css base code, injected by the css-loader
  473. // eslint-disable-next-line func-names
  474. module.exports = function (useSourceMap) {
  475. var list = []; // return the list of modules as css string
  476. list.toString = function toString() {
  477. return this.map(function (item) {
  478. var content = cssWithMappingToString(item, useSourceMap);
  479. if (item[2]) {
  480. return "@media ".concat(item[2], " {").concat(content, "}");
  481. }
  482. return content;
  483. }).join('');
  484. }; // import a list of modules into the list
  485. // eslint-disable-next-line func-names
  486. list.i = function (modules, mediaQuery, dedupe) {
  487. if (typeof modules === 'string') {
  488. // eslint-disable-next-line no-param-reassign
  489. modules = [[null, modules, '']];
  490. }
  491. var alreadyImportedModules = {};
  492. if (dedupe) {
  493. for (var i = 0; i < this.length; i++) {
  494. // eslint-disable-next-line prefer-destructuring
  495. var id = this[i][0];
  496. if (id != null) {
  497. alreadyImportedModules[id] = true;
  498. }
  499. }
  500. }
  501. for (var _i = 0; _i < modules.length; _i++) {
  502. var item = [].concat(modules[_i]);
  503. if (dedupe && alreadyImportedModules[item[0]]) {
  504. // eslint-disable-next-line no-continue
  505. continue;
  506. }
  507. if (mediaQuery) {
  508. if (!item[2]) {
  509. item[2] = mediaQuery;
  510. } else {
  511. item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
  512. }
  513. }
  514. list.push(item);
  515. }
  516. };
  517. return list;
  518. };
  519. function cssWithMappingToString(item, useSourceMap) {
  520. var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
  521. var cssMapping = item[3];
  522. if (!cssMapping) {
  523. return content;
  524. }
  525. if (useSourceMap && typeof btoa === 'function') {
  526. var sourceMapping = toComment(cssMapping);
  527. var sourceURLs = cssMapping.sources.map(function (source) {
  528. return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */");
  529. });
  530. return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
  531. }
  532. return [content].join('\n');
  533. } // Adapted from convert-source-map (MIT)
  534. function toComment(sourceMap) {
  535. // eslint-disable-next-line no-undef
  536. var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
  537. var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
  538. return "/*# ".concat(data, " */");
  539. }
  540. /***/ }),
  541. /* 11 */
  542. /***/ (function(module, exports) {
  543. module.exports = function hexToRgb (hex) {
  544. if (hex.charAt && hex.charAt(0) === '#') {
  545. hex = removeHash(hex)
  546. }
  547. if (hex.length === 3) {
  548. hex = expand(hex)
  549. }
  550. var bigint = parseInt(hex, 16)
  551. var r = (bigint >> 16) & 255
  552. var g = (bigint >> 8) & 255
  553. var b = bigint & 255
  554. return [r, g, b]
  555. }
  556. function removeHash (hex) {
  557. var arr = hex.split('')
  558. arr.shift()
  559. return arr.join('')
  560. }
  561. function expand (hex) {
  562. return hex
  563. .split('')
  564. .reduce(function (accum, value) {
  565. return accum.concat([value, value])
  566. }, [])
  567. .join('')
  568. }
  569. /***/ }),
  570. /* 12 */
  571. /***/ (function(module, exports, __webpack_require__) {
  572. "use strict";
  573. /*
  574. object-assign
  575. (c) Sindre Sorhus
  576. @license MIT
  577. */
  578. /* eslint-disable no-unused-vars */
  579. var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  580. var hasOwnProperty = Object.prototype.hasOwnProperty;
  581. var propIsEnumerable = Object.prototype.propertyIsEnumerable;
  582. function toObject(val) {
  583. if (val === null || val === undefined) {
  584. throw new TypeError('Object.assign cannot be called with null or undefined');
  585. }
  586. return Object(val);
  587. }
  588. function shouldUseNative() {
  589. try {
  590. if (!Object.assign) {
  591. return false;
  592. }
  593. // Detect buggy property enumeration order in older V8 versions.
  594. // https://bugs.chromium.org/p/v8/issues/detail?id=4118
  595. var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
  596. test1[5] = 'de';
  597. if (Object.getOwnPropertyNames(test1)[0] === '5') {
  598. return false;
  599. }
  600. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  601. var test2 = {};
  602. for (var i = 0; i < 10; i++) {
  603. test2['_' + String.fromCharCode(i)] = i;
  604. }
  605. var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
  606. return test2[n];
  607. });
  608. if (order2.join('') !== '0123456789') {
  609. return false;
  610. }
  611. // https://bugs.chromium.org/p/v8/issues/detail?id=3056
  612. var test3 = {};
  613. 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
  614. test3[letter] = letter;
  615. });
  616. if (Object.keys(Object.assign({}, test3)).join('') !==
  617. 'abcdefghijklmnopqrst') {
  618. return false;
  619. }
  620. return true;
  621. } catch (err) {
  622. // We don't expect any of the above to throw, but better to be safe.
  623. return false;
  624. }
  625. }
  626. module.exports = shouldUseNative() ? Object.assign : function (target, source) {
  627. var from;
  628. var to = toObject(target);
  629. var symbols;
  630. for (var s = 1; s < arguments.length; s++) {
  631. from = Object(arguments[s]);
  632. for (var key in from) {
  633. if (hasOwnProperty.call(from, key)) {
  634. to[key] = from[key];
  635. }
  636. }
  637. if (getOwnPropertySymbols) {
  638. symbols = getOwnPropertySymbols(from);
  639. for (var i = 0; i < symbols.length; i++) {
  640. if (propIsEnumerable.call(from, symbols[i])) {
  641. to[symbols[i]] = from[symbols[i]];
  642. }
  643. }
  644. }
  645. }
  646. return to;
  647. };
  648. /***/ }),
  649. /* 13 */
  650. /***/ (function(module, exports, __webpack_require__) {
  651. "use strict";
  652. /* WEBPACK VAR INJECTION */(function(process) {/**
  653. * Copyright (c) 2013-present, Facebook, Inc.
  654. *
  655. * This source code is licensed under the MIT license found in the
  656. * LICENSE file in the root directory of this source tree.
  657. */
  658. var printWarning = function() {};
  659. if (process.env.NODE_ENV !== 'production') {
  660. var ReactPropTypesSecret = __webpack_require__(1);
  661. var loggedTypeFailures = {};
  662. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  663. printWarning = function(text) {
  664. var message = 'Warning: ' + text;
  665. if (typeof console !== 'undefined') {
  666. console.error(message);
  667. }
  668. try {
  669. // --- Welcome to debugging React ---
  670. // This error was thrown as a convenience so that you can use this stack
  671. // to find the callsite that caused this warning to fire.
  672. throw new Error(message);
  673. } catch (x) {}
  674. };
  675. }
  676. /**
  677. * Assert that the values match with the type specs.
  678. * Error messages are memorized and will only be shown once.
  679. *
  680. * @param {object} typeSpecs Map of name to a ReactPropType
  681. * @param {object} values Runtime values that need to be type-checked
  682. * @param {string} location e.g. "prop", "context", "child context"
  683. * @param {string} componentName Name of the component for error messages.
  684. * @param {?Function} getStack Returns the component stack.
  685. * @private
  686. */
  687. function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
  688. if (process.env.NODE_ENV !== 'production') {
  689. for (var typeSpecName in typeSpecs) {
  690. if (has(typeSpecs, typeSpecName)) {
  691. var error;
  692. // Prop type validation may throw. In case they do, we don't want to
  693. // fail the render phase where it didn't fail before. So we log it.
  694. // After these have been cleaned up, we'll let them throw.
  695. try {
  696. // This is intentionally an invariant that gets caught. It's the same
  697. // behavior as without this statement except with a better message.
  698. if (typeof typeSpecs[typeSpecName] !== 'function') {
  699. var err = Error(
  700. (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
  701. 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
  702. );
  703. err.name = 'Invariant Violation';
  704. throw err;
  705. }
  706. error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
  707. } catch (ex) {
  708. error = ex;
  709. }
  710. if (error && !(error instanceof Error)) {
  711. printWarning(
  712. (componentName || 'React class') + ': type specification of ' +
  713. location + ' `' + typeSpecName + '` is invalid; the type checker ' +
  714. 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
  715. 'You may have forgotten to pass an argument to the type checker ' +
  716. 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
  717. 'shape all require an argument).'
  718. );
  719. }
  720. if (error instanceof Error && !(error.message in loggedTypeFailures)) {
  721. // Only monitor this failure once because there tends to be a lot of the
  722. // same error.
  723. loggedTypeFailures[error.message] = true;
  724. var stack = getStack ? getStack() : '';
  725. printWarning(
  726. 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
  727. );
  728. }
  729. }
  730. }
  731. }
  732. }
  733. /**
  734. * Resets warning cache when testing.
  735. *
  736. * @private
  737. */
  738. checkPropTypes.resetWarningCache = function() {
  739. if (process.env.NODE_ENV !== 'production') {
  740. loggedTypeFailures = {};
  741. }
  742. }
  743. module.exports = checkPropTypes;
  744. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  745. /***/ }),
  746. /* 14 */
  747. /***/ (function(module, exports, __webpack_require__) {
  748. "use strict";
  749. /**
  750. * Copyright (c) 2013-present, Facebook, Inc.
  751. *
  752. * This source code is licensed under the MIT license found in the
  753. * LICENSE file in the root directory of this source tree.
  754. */
  755. var ReactPropTypesSecret = __webpack_require__(1);
  756. function emptyFunction() {}
  757. function emptyFunctionWithReset() {}
  758. emptyFunctionWithReset.resetWarningCache = emptyFunction;
  759. module.exports = function() {
  760. function shim(props, propName, componentName, location, propFullName, secret) {
  761. if (secret === ReactPropTypesSecret) {
  762. // It is still safe when called from React.
  763. return;
  764. }
  765. var err = new Error(
  766. 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
  767. 'Use PropTypes.checkPropTypes() to call them. ' +
  768. 'Read more at http://fb.me/use-check-prop-types'
  769. );
  770. err.name = 'Invariant Violation';
  771. throw err;
  772. };
  773. shim.isRequired = shim;
  774. function getShim() {
  775. return shim;
  776. };
  777. // Important!
  778. // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
  779. var ReactPropTypes = {
  780. array: shim,
  781. bool: shim,
  782. func: shim,
  783. number: shim,
  784. object: shim,
  785. string: shim,
  786. symbol: shim,
  787. any: shim,
  788. arrayOf: getShim,
  789. element: shim,
  790. elementType: shim,
  791. instanceOf: getShim,
  792. node: shim,
  793. objectOf: getShim,
  794. oneOf: getShim,
  795. oneOfType: getShim,
  796. shape: getShim,
  797. exact: getShim,
  798. checkPropTypes: emptyFunctionWithReset,
  799. resetWarningCache: emptyFunction
  800. };
  801. ReactPropTypes.PropTypes = ReactPropTypes;
  802. return ReactPropTypes;
  803. };
  804. /***/ }),
  805. /* 15 */
  806. /***/ (function(module, exports, __webpack_require__) {
  807. "use strict";
  808. /* WEBPACK VAR INJECTION */(function(process) {/**
  809. * Copyright (c) 2013-present, Facebook, Inc.
  810. *
  811. * This source code is licensed under the MIT license found in the
  812. * LICENSE file in the root directory of this source tree.
  813. */
  814. var ReactIs = __webpack_require__(2);
  815. var assign = __webpack_require__(12);
  816. var ReactPropTypesSecret = __webpack_require__(1);
  817. var checkPropTypes = __webpack_require__(13);
  818. var has = Function.call.bind(Object.prototype.hasOwnProperty);
  819. var printWarning = function() {};
  820. if (process.env.NODE_ENV !== 'production') {
  821. printWarning = function(text) {
  822. var message = 'Warning: ' + text;
  823. if (typeof console !== 'undefined') {
  824. console.error(message);
  825. }
  826. try {
  827. // --- Welcome to debugging React ---
  828. // This error was thrown as a convenience so that you can use this stack
  829. // to find the callsite that caused this warning to fire.
  830. throw new Error(message);
  831. } catch (x) {}
  832. };
  833. }
  834. function emptyFunctionThatReturnsNull() {
  835. return null;
  836. }
  837. module.exports = function(isValidElement, throwOnDirectAccess) {
  838. /* global Symbol */
  839. var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
  840. var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
  841. /**
  842. * Returns the iterator method function contained on the iterable object.
  843. *
  844. * Be sure to invoke the function with the iterable as context:
  845. *
  846. * var iteratorFn = getIteratorFn(myIterable);
  847. * if (iteratorFn) {
  848. * var iterator = iteratorFn.call(myIterable);
  849. * ...
  850. * }
  851. *
  852. * @param {?object} maybeIterable
  853. * @return {?function}
  854. */
  855. function getIteratorFn(maybeIterable) {
  856. var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
  857. if (typeof iteratorFn === 'function') {
  858. return iteratorFn;
  859. }
  860. }
  861. /**
  862. * Collection of methods that allow declaration and validation of props that are
  863. * supplied to React components. Example usage:
  864. *
  865. * var Props = require('ReactPropTypes');
  866. * var MyArticle = React.createClass({
  867. * propTypes: {
  868. * // An optional string prop named "description".
  869. * description: Props.string,
  870. *
  871. * // A required enum prop named "category".
  872. * category: Props.oneOf(['News','Photos']).isRequired,
  873. *
  874. * // A prop named "dialog" that requires an instance of Dialog.
  875. * dialog: Props.instanceOf(Dialog).isRequired
  876. * },
  877. * render: function() { ... }
  878. * });
  879. *
  880. * A more formal specification of how these methods are used:
  881. *
  882. * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
  883. * decl := ReactPropTypes.{type}(.isRequired)?
  884. *
  885. * Each and every declaration produces a function with the same signature. This
  886. * allows the creation of custom validation functions. For example:
  887. *
  888. * var MyLink = React.createClass({
  889. * propTypes: {
  890. * // An optional string or URI prop named "href".
  891. * href: function(props, propName, componentName) {
  892. * var propValue = props[propName];
  893. * if (propValue != null && typeof propValue !== 'string' &&
  894. * !(propValue instanceof URI)) {
  895. * return new Error(
  896. * 'Expected a string or an URI for ' + propName + ' in ' +
  897. * componentName
  898. * );
  899. * }
  900. * }
  901. * },
  902. * render: function() {...}
  903. * });
  904. *
  905. * @internal
  906. */
  907. var ANONYMOUS = '<<anonymous>>';
  908. // Important!
  909. // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
  910. var ReactPropTypes = {
  911. array: createPrimitiveTypeChecker('array'),
  912. bool: createPrimitiveTypeChecker('boolean'),
  913. func: createPrimitiveTypeChecker('function'),
  914. number: createPrimitiveTypeChecker('number'),
  915. object: createPrimitiveTypeChecker('object'),
  916. string: createPrimitiveTypeChecker('string'),
  917. symbol: createPrimitiveTypeChecker('symbol'),
  918. any: createAnyTypeChecker(),
  919. arrayOf: createArrayOfTypeChecker,
  920. element: createElementTypeChecker(),
  921. elementType: createElementTypeTypeChecker(),
  922. instanceOf: createInstanceTypeChecker,
  923. node: createNodeChecker(),
  924. objectOf: createObjectOfTypeChecker,
  925. oneOf: createEnumTypeChecker,
  926. oneOfType: createUnionTypeChecker,
  927. shape: createShapeTypeChecker,
  928. exact: createStrictShapeTypeChecker,
  929. };
  930. /**
  931. * inlined Object.is polyfill to avoid requiring consumers ship their own
  932. * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
  933. */
  934. /*eslint-disable no-self-compare*/
  935. function is(x, y) {
  936. // SameValue algorithm
  937. if (x === y) {
  938. // Steps 1-5, 7-10
  939. // Steps 6.b-6.e: +0 != -0
  940. return x !== 0 || 1 / x === 1 / y;
  941. } else {
  942. // Step 6.a: NaN == NaN
  943. return x !== x && y !== y;
  944. }
  945. }
  946. /*eslint-enable no-self-compare*/
  947. /**
  948. * We use an Error-like object for backward compatibility as people may call
  949. * PropTypes directly and inspect their output. However, we don't use real
  950. * Errors anymore. We don't inspect their stack anyway, and creating them
  951. * is prohibitively expensive if they are created too often, such as what
  952. * happens in oneOfType() for any type before the one that matched.
  953. */
  954. function PropTypeError(message) {
  955. this.message = message;
  956. this.stack = '';
  957. }
  958. // Make `instanceof Error` still work for returned errors.
  959. PropTypeError.prototype = Error.prototype;
  960. function createChainableTypeChecker(validate) {
  961. if (process.env.NODE_ENV !== 'production') {
  962. var manualPropTypeCallCache = {};
  963. var manualPropTypeWarningCount = 0;
  964. }
  965. function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
  966. componentName = componentName || ANONYMOUS;
  967. propFullName = propFullName || propName;
  968. if (secret !== ReactPropTypesSecret) {
  969. if (throwOnDirectAccess) {
  970. // New behavior only for users of `prop-types` package
  971. var err = new Error(
  972. 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
  973. 'Use `PropTypes.checkPropTypes()` to call them. ' +
  974. 'Read more at http://fb.me/use-check-prop-types'
  975. );
  976. err.name = 'Invariant Violation';
  977. throw err;
  978. } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
  979. // Old behavior for people using React.PropTypes
  980. var cacheKey = componentName + ':' + propName;
  981. if (
  982. !manualPropTypeCallCache[cacheKey] &&
  983. // Avoid spamming the console because they are often not actionable except for lib authors
  984. manualPropTypeWarningCount < 3
  985. ) {
  986. printWarning(
  987. 'You are manually calling a React.PropTypes validation ' +
  988. 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
  989. 'and will throw in the standalone `prop-types` package. ' +
  990. 'You may be seeing this warning due to a third-party PropTypes ' +
  991. 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
  992. );
  993. manualPropTypeCallCache[cacheKey] = true;
  994. manualPropTypeWarningCount++;
  995. }
  996. }
  997. }
  998. if (props[propName] == null) {
  999. if (isRequired) {
  1000. if (props[propName] === null) {
  1001. return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
  1002. }
  1003. return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
  1004. }
  1005. return null;
  1006. } else {
  1007. return validate(props, propName, componentName, location, propFullName);
  1008. }
  1009. }
  1010. var chainedCheckType = checkType.bind(null, false);
  1011. chainedCheckType.isRequired = checkType.bind(null, true);
  1012. return chainedCheckType;
  1013. }
  1014. function createPrimitiveTypeChecker(expectedType) {
  1015. function validate(props, propName, componentName, location, propFullName, secret) {
  1016. var propValue = props[propName];
  1017. var propType = getPropType(propValue);
  1018. if (propType !== expectedType) {
  1019. // `propValue` being instance of, say, date/regexp, pass the 'object'
  1020. // check, but we can offer a more precise error message here rather than
  1021. // 'of type `object`'.
  1022. var preciseType = getPreciseType(propValue);
  1023. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
  1024. }
  1025. return null;
  1026. }
  1027. return createChainableTypeChecker(validate);
  1028. }
  1029. function createAnyTypeChecker() {
  1030. return createChainableTypeChecker(emptyFunctionThatReturnsNull);
  1031. }
  1032. function createArrayOfTypeChecker(typeChecker) {
  1033. function validate(props, propName, componentName, location, propFullName) {
  1034. if (typeof typeChecker !== 'function') {
  1035. return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
  1036. }
  1037. var propValue = props[propName];
  1038. if (!Array.isArray(propValue)) {
  1039. var propType = getPropType(propValue);
  1040. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
  1041. }
  1042. for (var i = 0; i < propValue.length; i++) {
  1043. var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
  1044. if (error instanceof Error) {
  1045. return error;
  1046. }
  1047. }
  1048. return null;
  1049. }
  1050. return createChainableTypeChecker(validate);
  1051. }
  1052. function createElementTypeChecker() {
  1053. function validate(props, propName, componentName, location, propFullName) {
  1054. var propValue = props[propName];
  1055. if (!isValidElement(propValue)) {
  1056. var propType = getPropType(propValue);
  1057. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
  1058. }
  1059. return null;
  1060. }
  1061. return createChainableTypeChecker(validate);
  1062. }
  1063. function createElementTypeTypeChecker() {
  1064. function validate(props, propName, componentName, location, propFullName) {
  1065. var propValue = props[propName];
  1066. if (!ReactIs.isValidElementType(propValue)) {
  1067. var propType = getPropType(propValue);
  1068. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
  1069. }
  1070. return null;
  1071. }
  1072. return createChainableTypeChecker(validate);
  1073. }
  1074. function createInstanceTypeChecker(expectedClass) {
  1075. function validate(props, propName, componentName, location, propFullName) {
  1076. if (!(props[propName] instanceof expectedClass)) {
  1077. var expectedClassName = expectedClass.name || ANONYMOUS;
  1078. var actualClassName = getClassName(props[propName]);
  1079. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
  1080. }
  1081. return null;
  1082. }
  1083. return createChainableTypeChecker(validate);
  1084. }
  1085. function createEnumTypeChecker(expectedValues) {
  1086. if (!Array.isArray(expectedValues)) {
  1087. if (process.env.NODE_ENV !== 'production') {
  1088. if (arguments.length > 1) {
  1089. printWarning(
  1090. 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
  1091. 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
  1092. );
  1093. } else {
  1094. printWarning('Invalid argument supplied to oneOf, expected an array.');
  1095. }
  1096. }
  1097. return emptyFunctionThatReturnsNull;
  1098. }
  1099. function validate(props, propName, componentName, location, propFullName) {
  1100. var propValue = props[propName];
  1101. for (var i = 0; i < expectedValues.length; i++) {
  1102. if (is(propValue, expectedValues[i])) {
  1103. return null;
  1104. }
  1105. }
  1106. var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
  1107. var type = getPreciseType(value);
  1108. if (type === 'symbol') {
  1109. return String(value);
  1110. }
  1111. return value;
  1112. });
  1113. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
  1114. }
  1115. return createChainableTypeChecker(validate);
  1116. }
  1117. function createObjectOfTypeChecker(typeChecker) {
  1118. function validate(props, propName, componentName, location, propFullName) {
  1119. if (typeof typeChecker !== 'function') {
  1120. return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
  1121. }
  1122. var propValue = props[propName];
  1123. var propType = getPropType(propValue);
  1124. if (propType !== 'object') {
  1125. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
  1126. }
  1127. for (var key in propValue) {
  1128. if (has(propValue, key)) {
  1129. var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  1130. if (error instanceof Error) {
  1131. return error;
  1132. }
  1133. }
  1134. }
  1135. return null;
  1136. }
  1137. return createChainableTypeChecker(validate);
  1138. }
  1139. function createUnionTypeChecker(arrayOfTypeCheckers) {
  1140. if (!Array.isArray(arrayOfTypeCheckers)) {
  1141. process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
  1142. return emptyFunctionThatReturnsNull;
  1143. }
  1144. for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
  1145. var checker = arrayOfTypeCheckers[i];
  1146. if (typeof checker !== 'function') {
  1147. printWarning(
  1148. 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
  1149. 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
  1150. );
  1151. return emptyFunctionThatReturnsNull;
  1152. }
  1153. }
  1154. function validate(props, propName, componentName, location, propFullName) {
  1155. for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
  1156. var checker = arrayOfTypeCheckers[i];
  1157. if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
  1158. return null;
  1159. }
  1160. }
  1161. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
  1162. }
  1163. return createChainableTypeChecker(validate);
  1164. }
  1165. function createNodeChecker() {
  1166. function validate(props, propName, componentName, location, propFullName) {
  1167. if (!isNode(props[propName])) {
  1168. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
  1169. }
  1170. return null;
  1171. }
  1172. return createChainableTypeChecker(validate);
  1173. }
  1174. function createShapeTypeChecker(shapeTypes) {
  1175. function validate(props, propName, componentName, location, propFullName) {
  1176. var propValue = props[propName];
  1177. var propType = getPropType(propValue);
  1178. if (propType !== 'object') {
  1179. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
  1180. }
  1181. for (var key in shapeTypes) {
  1182. var checker = shapeTypes[key];
  1183. if (!checker) {
  1184. continue;
  1185. }
  1186. var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  1187. if (error) {
  1188. return error;
  1189. }
  1190. }
  1191. return null;
  1192. }
  1193. return createChainableTypeChecker(validate);
  1194. }
  1195. function createStrictShapeTypeChecker(shapeTypes) {
  1196. function validate(props, propName, componentName, location, propFullName) {
  1197. var propValue = props[propName];
  1198. var propType = getPropType(propValue);
  1199. if (propType !== 'object') {
  1200. return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
  1201. }
  1202. // We need to check all keys in case some are required but missing from
  1203. // props.
  1204. var allKeys = assign({}, props[propName], shapeTypes);
  1205. for (var key in allKeys) {
  1206. var checker = shapeTypes[key];
  1207. if (!checker) {
  1208. return new PropTypeError(
  1209. 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
  1210. '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
  1211. '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
  1212. );
  1213. }
  1214. var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
  1215. if (error) {
  1216. return error;
  1217. }
  1218. }
  1219. return null;
  1220. }
  1221. return createChainableTypeChecker(validate);
  1222. }
  1223. function isNode(propValue) {
  1224. switch (typeof propValue) {
  1225. case 'number':
  1226. case 'string':
  1227. case 'undefined':
  1228. return true;
  1229. case 'boolean':
  1230. return !propValue;
  1231. case 'object':
  1232. if (Array.isArray(propValue)) {
  1233. return propValue.every(isNode);
  1234. }
  1235. if (propValue === null || isValidElement(propValue)) {
  1236. return true;
  1237. }
  1238. var iteratorFn = getIteratorFn(propValue);
  1239. if (iteratorFn) {
  1240. var iterator = iteratorFn.call(propValue);
  1241. var step;
  1242. if (iteratorFn !== propValue.entries) {
  1243. while (!(step = iterator.next()).done) {
  1244. if (!isNode(step.value)) {
  1245. return false;
  1246. }
  1247. }
  1248. } else {
  1249. // Iterator will provide entry [k,v] tuples rather than values.
  1250. while (!(step = iterator.next()).done) {
  1251. var entry = step.value;
  1252. if (entry) {
  1253. if (!isNode(entry[1])) {
  1254. return false;
  1255. }
  1256. }
  1257. }
  1258. }
  1259. } else {
  1260. return false;
  1261. }
  1262. return true;
  1263. default:
  1264. return false;
  1265. }
  1266. }
  1267. function isSymbol(propType, propValue) {
  1268. // Native Symbol.
  1269. if (propType === 'symbol') {
  1270. return true;
  1271. }
  1272. // falsy value can't be a Symbol
  1273. if (!propValue) {
  1274. return false;
  1275. }
  1276. // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
  1277. if (propValue['@@toStringTag'] === 'Symbol') {
  1278. return true;
  1279. }
  1280. // Fallback for non-spec compliant Symbols which are polyfilled.
  1281. if (typeof Symbol === 'function' && propValue instanceof Symbol) {
  1282. return true;
  1283. }
  1284. return false;
  1285. }
  1286. // Equivalent of `typeof` but with special handling for array and regexp.
  1287. function getPropType(propValue) {
  1288. var propType = typeof propValue;
  1289. if (Array.isArray(propValue)) {
  1290. return 'array';
  1291. }
  1292. if (propValue instanceof RegExp) {
  1293. // Old webkits (at least until Android 4.0) return 'function' rather than
  1294. // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
  1295. // passes PropTypes.object.
  1296. return 'object';
  1297. }
  1298. if (isSymbol(propType, propValue)) {
  1299. return 'symbol';
  1300. }
  1301. return propType;
  1302. }
  1303. // This handles more types than `getPropType`. Only used for error messages.
  1304. // See `createPrimitiveTypeChecker`.
  1305. function getPreciseType(propValue) {
  1306. if (typeof propValue === 'undefined' || propValue === null) {
  1307. return '' + propValue;
  1308. }
  1309. var propType = getPropType(propValue);
  1310. if (propType === 'object') {
  1311. if (propValue instanceof Date) {
  1312. return 'date';
  1313. } else if (propValue instanceof RegExp) {
  1314. return 'regexp';
  1315. }
  1316. }
  1317. return propType;
  1318. }
  1319. // Returns a string that is postfixed to a warning about an invalid type.
  1320. // For example, "undefined" or "of type array"
  1321. function getPostfixForTypeWarning(value) {
  1322. var type = getPreciseType(value);
  1323. switch (type) {
  1324. case 'array':
  1325. case 'object':
  1326. return 'an ' + type;
  1327. case 'boolean':
  1328. case 'date':
  1329. case 'regexp':
  1330. return 'a ' + type;
  1331. default:
  1332. return type;
  1333. }
  1334. }
  1335. // Returns class name of the object, if any.
  1336. function getClassName(propValue) {
  1337. if (!propValue.constructor || !propValue.constructor.name) {
  1338. return ANONYMOUS;
  1339. }
  1340. return propValue.constructor.name;
  1341. }
  1342. ReactPropTypes.checkPropTypes = checkPropTypes;
  1343. ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
  1344. ReactPropTypes.PropTypes = ReactPropTypes;
  1345. return ReactPropTypes;
  1346. };
  1347. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  1348. /***/ }),
  1349. /* 16 */
  1350. /***/ (function(module, exports, __webpack_require__) {
  1351. "use strict";
  1352. /* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.13.1
  1353. * react-is.development.js
  1354. *
  1355. * Copyright (c) Facebook, Inc. and its affiliates.
  1356. *
  1357. * This source code is licensed under the MIT license found in the
  1358. * LICENSE file in the root directory of this source tree.
  1359. */
  1360. if (process.env.NODE_ENV !== "production") {
  1361. (function() {
  1362. 'use strict';
  1363. // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  1364. // nor polyfill, then a plain number is used for performance.
  1365. var hasSymbol = typeof Symbol === 'function' && Symbol.for;
  1366. var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
  1367. var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
  1368. var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
  1369. var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
  1370. var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
  1371. var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
  1372. var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
  1373. // (unstable) APIs that have been removed. Can we remove the symbols?
  1374. var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
  1375. var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
  1376. var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
  1377. var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
  1378. var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
  1379. var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
  1380. var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
  1381. var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
  1382. var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
  1383. var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
  1384. var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
  1385. function isValidElementType(type) {
  1386. return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
  1387. 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 || type.$$typeof === REACT_BLOCK_TYPE);
  1388. }
  1389. function typeOf(object) {
  1390. if (typeof object === 'object' && object !== null) {
  1391. var $$typeof = object.$$typeof;
  1392. switch ($$typeof) {
  1393. case REACT_ELEMENT_TYPE:
  1394. var type = object.type;
  1395. switch (type) {
  1396. case REACT_ASYNC_MODE_TYPE:
  1397. case REACT_CONCURRENT_MODE_TYPE:
  1398. case REACT_FRAGMENT_TYPE:
  1399. case REACT_PROFILER_TYPE:
  1400. case REACT_STRICT_MODE_TYPE:
  1401. case REACT_SUSPENSE_TYPE:
  1402. return type;
  1403. default:
  1404. var $$typeofType = type && type.$$typeof;
  1405. switch ($$typeofType) {
  1406. case REACT_CONTEXT_TYPE:
  1407. case REACT_FORWARD_REF_TYPE:
  1408. case REACT_LAZY_TYPE:
  1409. case REACT_MEMO_TYPE:
  1410. case REACT_PROVIDER_TYPE:
  1411. return $$typeofType;
  1412. default:
  1413. return $$typeof;
  1414. }
  1415. }
  1416. case REACT_PORTAL_TYPE:
  1417. return $$typeof;
  1418. }
  1419. }
  1420. return undefined;
  1421. } // AsyncMode is deprecated along with isAsyncMode
  1422. var AsyncMode = REACT_ASYNC_MODE_TYPE;
  1423. var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
  1424. var ContextConsumer = REACT_CONTEXT_TYPE;
  1425. var ContextProvider = REACT_PROVIDER_TYPE;
  1426. var Element = REACT_ELEMENT_TYPE;
  1427. var ForwardRef = REACT_FORWARD_REF_TYPE;
  1428. var Fragment = REACT_FRAGMENT_TYPE;
  1429. var Lazy = REACT_LAZY_TYPE;
  1430. var Memo = REACT_MEMO_TYPE;
  1431. var Portal = REACT_PORTAL_TYPE;
  1432. var Profiler = REACT_PROFILER_TYPE;
  1433. var StrictMode = REACT_STRICT_MODE_TYPE;
  1434. var Suspense = REACT_SUSPENSE_TYPE;
  1435. var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
  1436. function isAsyncMode(object) {
  1437. {
  1438. if (!hasWarnedAboutDeprecatedIsAsyncMode) {
  1439. hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
  1440. console['warn']('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.');
  1441. }
  1442. }
  1443. return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
  1444. }
  1445. function isConcurrentMode(object) {
  1446. return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
  1447. }
  1448. function isContextConsumer(object) {
  1449. return typeOf(object) === REACT_CONTEXT_TYPE;
  1450. }
  1451. function isContextProvider(object) {
  1452. return typeOf(object) === REACT_PROVIDER_TYPE;
  1453. }
  1454. function isElement(object) {
  1455. return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  1456. }
  1457. function isForwardRef(object) {
  1458. return typeOf(object) === REACT_FORWARD_REF_TYPE;
  1459. }
  1460. function isFragment(object) {
  1461. return typeOf(object) === REACT_FRAGMENT_TYPE;
  1462. }
  1463. function isLazy(object) {
  1464. return typeOf(object) === REACT_LAZY_TYPE;
  1465. }
  1466. function isMemo(object) {
  1467. return typeOf(object) === REACT_MEMO_TYPE;
  1468. }
  1469. function isPortal(object) {
  1470. return typeOf(object) === REACT_PORTAL_TYPE;
  1471. }
  1472. function isProfiler(object) {
  1473. return typeOf(object) === REACT_PROFILER_TYPE;
  1474. }
  1475. function isStrictMode(object) {
  1476. return typeOf(object) === REACT_STRICT_MODE_TYPE;
  1477. }
  1478. function isSuspense(object) {
  1479. return typeOf(object) === REACT_SUSPENSE_TYPE;
  1480. }
  1481. exports.AsyncMode = AsyncMode;
  1482. exports.ConcurrentMode = ConcurrentMode;
  1483. exports.ContextConsumer = ContextConsumer;
  1484. exports.ContextProvider = ContextProvider;
  1485. exports.Element = Element;
  1486. exports.ForwardRef = ForwardRef;
  1487. exports.Fragment = Fragment;
  1488. exports.Lazy = Lazy;
  1489. exports.Memo = Memo;
  1490. exports.Portal = Portal;
  1491. exports.Profiler = Profiler;
  1492. exports.StrictMode = StrictMode;
  1493. exports.Suspense = Suspense;
  1494. exports.isAsyncMode = isAsyncMode;
  1495. exports.isConcurrentMode = isConcurrentMode;
  1496. exports.isContextConsumer = isContextConsumer;
  1497. exports.isContextProvider = isContextProvider;
  1498. exports.isElement = isElement;
  1499. exports.isForwardRef = isForwardRef;
  1500. exports.isFragment = isFragment;
  1501. exports.isLazy = isLazy;
  1502. exports.isMemo = isMemo;
  1503. exports.isPortal = isPortal;
  1504. exports.isProfiler = isProfiler;
  1505. exports.isStrictMode = isStrictMode;
  1506. exports.isSuspense = isSuspense;
  1507. exports.isValidElementType = isValidElementType;
  1508. exports.typeOf = typeOf;
  1509. })();
  1510. }
  1511. /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))
  1512. /***/ }),
  1513. /* 17 */
  1514. /***/ (function(module, exports, __webpack_require__) {
  1515. "use strict";
  1516. /** @license React v16.13.1
  1517. * react-is.production.min.js
  1518. *
  1519. * Copyright (c) Facebook, Inc. and its affiliates.
  1520. *
  1521. * This source code is licensed under the MIT license found in the
  1522. * LICENSE file in the root directory of this source tree.
  1523. */
  1524. 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?
  1525. Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
  1526. function z(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 A(a){return z(a)===m}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;
  1527. exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
  1528. exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
  1529. 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===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
  1530. /***/ }),
  1531. /* 18 */
  1532. /***/ (function(module, exports, __webpack_require__) {
  1533. "use strict";
  1534. var isOldIE = function isOldIE() {
  1535. var memo;
  1536. return function memorize() {
  1537. if (typeof memo === 'undefined') {
  1538. // Test for IE <= 9 as proposed by Browserhacks
  1539. // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805
  1540. // Tests for existence of standard globals is to allow style-loader
  1541. // to operate correctly into non-standard environments
  1542. // @see https://github.com/webpack-contrib/style-loader/issues/177
  1543. memo = Boolean(window && document && document.all && !window.atob);
  1544. }
  1545. return memo;
  1546. };
  1547. }();
  1548. var getTarget = function getTarget() {
  1549. var memo = {};
  1550. return function memorize(target) {
  1551. if (typeof memo[target] === 'undefined') {
  1552. var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself
  1553. if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
  1554. try {
  1555. // This will throw an exception if access to iframe is blocked
  1556. // due to cross-origin restrictions
  1557. styleTarget = styleTarget.contentDocument.head;
  1558. } catch (e) {
  1559. // istanbul ignore next
  1560. styleTarget = null;
  1561. }
  1562. }
  1563. memo[target] = styleTarget;
  1564. }
  1565. return memo[target];
  1566. };
  1567. }();
  1568. var stylesInDom = [];
  1569. function getIndexByIdentifier(identifier) {
  1570. var result = -1;
  1571. for (var i = 0; i < stylesInDom.length; i++) {
  1572. if (stylesInDom[i].identifier === identifier) {
  1573. result = i;
  1574. break;
  1575. }
  1576. }
  1577. return result;
  1578. }
  1579. function modulesToDom(list, options) {
  1580. var idCountMap = {};
  1581. var identifiers = [];
  1582. for (var i = 0; i < list.length; i++) {
  1583. var item = list[i];
  1584. var id = options.base ? item[0] + options.base : item[0];
  1585. var count = idCountMap[id] || 0;
  1586. var identifier = "".concat(id, " ").concat(count);
  1587. idCountMap[id] = count + 1;
  1588. var index = getIndexByIdentifier(identifier);
  1589. var obj = {
  1590. css: item[1],
  1591. media: item[2],
  1592. sourceMap: item[3]
  1593. };
  1594. if (index !== -1) {
  1595. stylesInDom[index].references++;
  1596. stylesInDom[index].updater(obj);
  1597. } else {
  1598. stylesInDom.push({
  1599. identifier: identifier,
  1600. updater: addStyle(obj, options),
  1601. references: 1
  1602. });
  1603. }
  1604. identifiers.push(identifier);
  1605. }
  1606. return identifiers;
  1607. }
  1608. function insertStyleElement(options) {
  1609. var style = document.createElement('style');
  1610. var attributes = options.attributes || {};
  1611. if (typeof attributes.nonce === 'undefined') {
  1612. var nonce = true ? __webpack_require__.nc : null;
  1613. if (nonce) {
  1614. attributes.nonce = nonce;
  1615. }
  1616. }
  1617. Object.keys(attributes).forEach(function (key) {
  1618. style.setAttribute(key, attributes[key]);
  1619. });
  1620. if (typeof options.insert === 'function') {
  1621. options.insert(style);
  1622. } else {
  1623. var target = getTarget(options.insert || 'head');
  1624. if (!target) {
  1625. throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
  1626. }
  1627. target.appendChild(style);
  1628. }
  1629. return style;
  1630. }
  1631. function removeStyleElement(style) {
  1632. // istanbul ignore if
  1633. if (style.parentNode === null) {
  1634. return false;
  1635. }
  1636. style.parentNode.removeChild(style);
  1637. }
  1638. /* istanbul ignore next */
  1639. var replaceText = function replaceText() {
  1640. var textStore = [];
  1641. return function replace(index, replacement) {
  1642. textStore[index] = replacement;
  1643. return textStore.filter(Boolean).join('\n');
  1644. };
  1645. }();
  1646. function applyToSingletonTag(style, index, remove, obj) {
  1647. var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE
  1648. /* istanbul ignore if */
  1649. if (style.styleSheet) {
  1650. style.styleSheet.cssText = replaceText(index, css);
  1651. } else {
  1652. var cssNode = document.createTextNode(css);
  1653. var childNodes = style.childNodes;
  1654. if (childNodes[index]) {
  1655. style.removeChild(childNodes[index]);
  1656. }
  1657. if (childNodes.length) {
  1658. style.insertBefore(cssNode, childNodes[index]);
  1659. } else {
  1660. style.appendChild(cssNode);
  1661. }
  1662. }
  1663. }
  1664. function applyToTag(style, options, obj) {
  1665. var css = obj.css;
  1666. var media = obj.media;
  1667. var sourceMap = obj.sourceMap;
  1668. if (media) {
  1669. style.setAttribute('media', media);
  1670. } else {
  1671. style.removeAttribute('media');
  1672. }
  1673. if (sourceMap && btoa) {
  1674. css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
  1675. } // For old IE
  1676. /* istanbul ignore if */
  1677. if (style.styleSheet) {
  1678. style.styleSheet.cssText = css;
  1679. } else {
  1680. while (style.firstChild) {
  1681. style.removeChild(style.firstChild);
  1682. }
  1683. style.appendChild(document.createTextNode(css));
  1684. }
  1685. }
  1686. var singleton = null;
  1687. var singletonCounter = 0;
  1688. function addStyle(obj, options) {
  1689. var style;
  1690. var update;
  1691. var remove;
  1692. if (options.singleton) {
  1693. var styleIndex = singletonCounter++;
  1694. style = singleton || (singleton = insertStyleElement(options));
  1695. update = applyToSingletonTag.bind(null, style, styleIndex, false);
  1696. remove = applyToSingletonTag.bind(null, style, styleIndex, true);
  1697. } else {
  1698. style = insertStyleElement(options);
  1699. update = applyToTag.bind(null, style, options);
  1700. remove = function remove() {
  1701. removeStyleElement(style);
  1702. };
  1703. }
  1704. update(obj);
  1705. return function updateStyle(newObj) {
  1706. if (newObj) {
  1707. if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {
  1708. return;
  1709. }
  1710. update(obj = newObj);
  1711. } else {
  1712. remove();
  1713. }
  1714. };
  1715. }
  1716. module.exports = function (list, options) {
  1717. options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
  1718. // tags it will allow on a page
  1719. if (!options.singleton && typeof options.singleton !== 'boolean') {
  1720. options.singleton = isOldIE();
  1721. }
  1722. list = list || [];
  1723. var lastIdentifiers = modulesToDom(list, options);
  1724. return function update(newList) {
  1725. newList = newList || [];
  1726. if (Object.prototype.toString.call(newList) !== '[object Array]') {
  1727. return;
  1728. }
  1729. for (var i = 0; i < lastIdentifiers.length; i++) {
  1730. var identifier = lastIdentifiers[i];
  1731. var index = getIndexByIdentifier(identifier);
  1732. stylesInDom[index].references--;
  1733. }
  1734. var newLastIdentifiers = modulesToDom(newList, options);
  1735. for (var _i = 0; _i < lastIdentifiers.length; _i++) {
  1736. var _identifier = lastIdentifiers[_i];
  1737. var _index = getIndexByIdentifier(_identifier);
  1738. if (stylesInDom[_index].references === 0) {
  1739. stylesInDom[_index].updater();
  1740. stylesInDom.splice(_index, 1);
  1741. }
  1742. }
  1743. lastIdentifiers = newLastIdentifiers;
  1744. };
  1745. };
  1746. /***/ })
  1747. /******/ ]);