UNPKG

181 kBJavaScriptView Raw
1(function webpackUniversalModuleDefinition(root, factory) {
2 if(typeof exports === 'object' && typeof module === 'object')
3 module.exports = factory(require("react"), require("react-redux"));
4 else if(typeof define === 'function' && define.amd)
5 define(["react", "react-redux"], factory);
6 else if(typeof exports === 'object')
7 exports["ReduxFormsReact"] = factory(require("react"), require("react-redux"));
8 else
9 root["ReduxFormsReact"] = factory(root["React"], root["ReactRedux"]);
10})(this, function(__WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_21__) {
11return /******/ (function(modules) { // webpackBootstrap
12/******/ // The module cache
13/******/ var installedModules = {};
14/******/
15/******/ // The require function
16/******/ function __webpack_require__(moduleId) {
17/******/
18/******/ // Check if module is in cache
19/******/ if(installedModules[moduleId]) {
20/******/ return installedModules[moduleId].exports;
21/******/ }
22/******/ // Create a new module (and put it into the cache)
23/******/ var module = installedModules[moduleId] = {
24/******/ i: moduleId,
25/******/ l: false,
26/******/ exports: {}
27/******/ };
28/******/
29/******/ // Execute the module function
30/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31/******/
32/******/ // Flag the module as loaded
33/******/ module.l = true;
34/******/
35/******/ // Return the exports of the module
36/******/ return module.exports;
37/******/ }
38/******/
39/******/
40/******/ // expose the modules object (__webpack_modules__)
41/******/ __webpack_require__.m = modules;
42/******/
43/******/ // expose the module cache
44/******/ __webpack_require__.c = installedModules;
45/******/
46/******/ // define getter function for harmony exports
47/******/ __webpack_require__.d = function(exports, name, getter) {
48/******/ if(!__webpack_require__.o(exports, name)) {
49/******/ Object.defineProperty(exports, name, {
50/******/ configurable: false,
51/******/ enumerable: true,
52/******/ get: getter
53/******/ });
54/******/ }
55/******/ };
56/******/
57/******/ // getDefaultExport function for compatibility with non-harmony modules
58/******/ __webpack_require__.n = function(module) {
59/******/ var getter = module && module.__esModule ?
60/******/ function getDefault() { return module['default']; } :
61/******/ function getModuleExports() { return module; };
62/******/ __webpack_require__.d(getter, 'a', getter);
63/******/ return getter;
64/******/ };
65/******/
66/******/ // Object.prototype.hasOwnProperty.call
67/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
68/******/
69/******/ // __webpack_public_path__
70/******/ __webpack_require__.p = "";
71/******/
72/******/ // Load entry module and return exports
73/******/ return __webpack_require__(__webpack_require__.s = 50);
74/******/ })
75/************************************************************************/
76/******/ ([
77/* 0 */
78/***/ (function(module, exports, __webpack_require__) {
79
80var _curry1 = __webpack_require__(2);
81var _isPlaceholder = __webpack_require__(13);
82
83
84/**
85 * Optimized internal two-arity curry function.
86 *
87 * @private
88 * @category Function
89 * @param {Function} fn The function to curry.
90 * @return {Function} The curried function.
91 */
92module.exports = function _curry2(fn) {
93 return function f2(a, b) {
94 switch (arguments.length) {
95 case 0:
96 return f2;
97 case 1:
98 return _isPlaceholder(a) ? f2
99 : _curry1(function(_b) { return fn(a, _b); });
100 default:
101 return _isPlaceholder(a) && _isPlaceholder(b) ? f2
102 : _isPlaceholder(a) ? _curry1(function(_a) { return fn(_a, b); })
103 : _isPlaceholder(b) ? _curry1(function(_b) { return fn(a, _b); })
104 : fn(a, b);
105 }
106 };
107};
108
109
110/***/ }),
111/* 1 */
112/***/ (function(module, exports, __webpack_require__) {
113
114var _isPlaceholder = __webpack_require__(9);
115
116
117/**
118 * Optimized internal one-arity curry function.
119 *
120 * @private
121 * @category Function
122 * @param {Function} fn The function to curry.
123 * @return {Function} The curried function.
124 */
125module.exports = function _curry1(fn) {
126 return function f1(a) {
127 if (arguments.length === 0 || _isPlaceholder(a)) {
128 return f1;
129 } else {
130 return fn.apply(this, arguments);
131 }
132 };
133};
134
135
136/***/ }),
137/* 2 */
138/***/ (function(module, exports, __webpack_require__) {
139
140var _isPlaceholder = __webpack_require__(13);
141
142
143/**
144 * Optimized internal one-arity curry function.
145 *
146 * @private
147 * @category Function
148 * @param {Function} fn The function to curry.
149 * @return {Function} The curried function.
150 */
151module.exports = function _curry1(fn) {
152 return function f1(a) {
153 if (arguments.length === 0 || _isPlaceholder(a)) {
154 return f1;
155 } else {
156 return fn.apply(this, arguments);
157 }
158 };
159};
160
161
162/***/ }),
163/* 3 */
164/***/ (function(module, exports, __webpack_require__) {
165
166var _curry1 = __webpack_require__(1);
167var _isPlaceholder = __webpack_require__(9);
168
169
170/**
171 * Optimized internal two-arity curry function.
172 *
173 * @private
174 * @category Function
175 * @param {Function} fn The function to curry.
176 * @return {Function} The curried function.
177 */
178module.exports = function _curry2(fn) {
179 return function f2(a, b) {
180 switch (arguments.length) {
181 case 0:
182 return f2;
183 case 1:
184 return _isPlaceholder(a) ? f2
185 : _curry1(function(_b) { return fn(a, _b); });
186 default:
187 return _isPlaceholder(a) && _isPlaceholder(b) ? f2
188 : _isPlaceholder(a) ? _curry1(function(_a) { return fn(_a, b); })
189 : _isPlaceholder(b) ? _curry1(function(_b) { return fn(a, _b); })
190 : fn(a, b);
191 }
192 };
193};
194
195
196/***/ }),
197/* 4 */
198/***/ (function(module, exports, __webpack_require__) {
199
200"use strict";
201
202
203exports.__esModule = true;
204
205var _prop = __webpack_require__(22);
206
207var _prop2 = _interopRequireDefault(_prop);
208
209var _reduce = __webpack_require__(32);
210
211var _reduce2 = _interopRequireDefault(_reduce);
212
213var _keys = __webpack_require__(5);
214
215var _keys2 = _interopRequireDefault(_keys);
216
217var _length = __webpack_require__(62);
218
219var _length2 = _interopRequireDefault(_length);
220
221var _compose = __webpack_require__(34);
222
223var _compose2 = _interopRequireDefault(_compose);
224
225var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
226
227exports.isString = isString;
228exports.isNumber = isNumber;
229exports.isPromise = isPromise;
230exports.isFunction = isFunction;
231exports.isEvent = isEvent;
232exports.shallowCompare = shallowCompare;
233exports.unflatten = unflatten;
234exports.invariant = invariant;
235
236function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
237
238function isString(cand) {
239 return typeof cand === 'string';
240}
241function isNumber(cand) {
242 return typeof cand === 'number';
243}
244function isPromise(cand) {
245 return Boolean(cand) && (typeof cand === 'undefined' ? 'undefined' : _typeof(cand)) === 'object' && typeof cand.then === 'function';
246}
247function isFunction(cand) {
248 return typeof cand === 'function';
249}
250function isEvent(cand) {
251 return Boolean(cand && (typeof cand === 'undefined' ? 'undefined' : _typeof(cand)) === 'object' && isFunction(cand.preventDefault) && isFunction(cand.stopPropagation));
252}
253var keyCount = (0, _compose2.default)(_length2.default, _keys2.default);
254function shallowCompare(props1, props2) {
255 if (props1 === props2) {
256 return true;
257 }
258 if (keyCount(props1) !== keyCount(props2)) {
259 return false;
260 }
261 return (0, _reduce2.default)(function (acc, key) {
262 return acc && (0, _prop2.default)(key, props1) === (0, _prop2.default)(key, props2);
263 }, true, (0, _keys2.default)(props1));
264}
265// FIXME: ugly code
266// A rewrite would be welcome.
267function unflatten(obj) {
268 var result = {};
269 Object.keys(obj).forEach(function (propp) {
270 return propp.split('.').reduce(function (acc, key, index, array) {
271 var k = isNaN(Number(key)) ? key : Number(key);
272 if (index === array.length - 1) {
273 return acc[k] = obj[propp];
274 }
275 if (acc[k]) {
276 return acc[k] = acc[k];
277 }
278 if (!isNaN(Number(array[index + 1]))) {
279 return acc[k] = [];
280 }
281 return acc[k] = {};
282 }, result);
283 });
284 return result;
285}
286function invariant(cond, msg) {
287 if (cond) {
288 return;
289 }
290 var error = new Error(msg);
291 error.name = 'Invariant violation';
292 throw error;
293}
294
295/***/ }),
296/* 5 */
297/***/ (function(module, exports, __webpack_require__) {
298
299var _curry1 = __webpack_require__(2);
300var _has = __webpack_require__(7);
301var _isArguments = __webpack_require__(61);
302
303
304/**
305 * Returns a list containing the names of all the enumerable own properties of
306 * the supplied object.
307 * Note that the order of the output array is not guaranteed to be consistent
308 * across different JS platforms.
309 *
310 * @func
311 * @memberOf R
312 * @since v0.1.0
313 * @category Object
314 * @sig {k: v} -> [k]
315 * @param {Object} obj The object to extract properties from
316 * @return {Array} An array of the object's own properties.
317 * @see R.keysIn, R.values
318 * @example
319 *
320 * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
321 */
322module.exports = (function() {
323 // cover IE < 9 keys issues
324 var hasEnumBug = !({toString: null}).propertyIsEnumerable('toString');
325 var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString',
326 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
327 // Safari bug
328 var hasArgsEnumBug = (function() {
329 'use strict';
330 return arguments.propertyIsEnumerable('length');
331 }());
332
333 var contains = function contains(list, item) {
334 var idx = 0;
335 while (idx < list.length) {
336 if (list[idx] === item) {
337 return true;
338 }
339 idx += 1;
340 }
341 return false;
342 };
343
344 return typeof Object.keys === 'function' && !hasArgsEnumBug ?
345 _curry1(function keys(obj) {
346 return Object(obj) !== obj ? [] : Object.keys(obj);
347 }) :
348 _curry1(function keys(obj) {
349 if (Object(obj) !== obj) {
350 return [];
351 }
352 var prop, nIdx;
353 var ks = [];
354 var checkArgsLength = hasArgsEnumBug && _isArguments(obj);
355 for (prop in obj) {
356 if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {
357 ks[ks.length] = prop;
358 }
359 }
360 if (hasEnumBug) {
361 nIdx = nonEnumerableProps.length - 1;
362 while (nIdx >= 0) {
363 prop = nonEnumerableProps[nIdx];
364 if (_has(prop, obj) && !contains(ks, prop)) {
365 ks[ks.length] = prop;
366 }
367 nIdx -= 1;
368 }
369 }
370 return ks;
371 });
372}());
373
374
375/***/ }),
376/* 6 */
377/***/ (function(module, exports) {
378
379module.exports = function _arity(n, fn) {
380 /* eslint-disable no-unused-vars */
381 switch (n) {
382 case 0: return function() { return fn.apply(this, arguments); };
383 case 1: return function(a0) { return fn.apply(this, arguments); };
384 case 2: return function(a0, a1) { return fn.apply(this, arguments); };
385 case 3: return function(a0, a1, a2) { return fn.apply(this, arguments); };
386 case 4: return function(a0, a1, a2, a3) { return fn.apply(this, arguments); };
387 case 5: return function(a0, a1, a2, a3, a4) { return fn.apply(this, arguments); };
388 case 6: return function(a0, a1, a2, a3, a4, a5) { return fn.apply(this, arguments); };
389 case 7: return function(a0, a1, a2, a3, a4, a5, a6) { return fn.apply(this, arguments); };
390 case 8: return function(a0, a1, a2, a3, a4, a5, a6, a7) { return fn.apply(this, arguments); };
391 case 9: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.apply(this, arguments); };
392 case 10: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.apply(this, arguments); };
393 default: throw new Error('First argument to _arity must be a non-negative integer no greater than ten');
394 }
395};
396
397
398/***/ }),
399/* 7 */
400/***/ (function(module, exports) {
401
402module.exports = function _has(prop, obj) {
403 return Object.prototype.hasOwnProperty.call(obj, prop);
404};
405
406
407/***/ }),
408/* 8 */
409/***/ (function(module, exports, __webpack_require__) {
410
411var _curry1 = __webpack_require__(1);
412var _curry2 = __webpack_require__(3);
413var _isPlaceholder = __webpack_require__(9);
414
415
416/**
417 * Optimized internal three-arity curry function.
418 *
419 * @private
420 * @category Function
421 * @param {Function} fn The function to curry.
422 * @return {Function} The curried function.
423 */
424module.exports = function _curry3(fn) {
425 return function f3(a, b, c) {
426 switch (arguments.length) {
427 case 0:
428 return f3;
429 case 1:
430 return _isPlaceholder(a) ? f3
431 : _curry2(function(_b, _c) { return fn(a, _b, _c); });
432 case 2:
433 return _isPlaceholder(a) && _isPlaceholder(b) ? f3
434 : _isPlaceholder(a) ? _curry2(function(_a, _c) { return fn(_a, b, _c); })
435 : _isPlaceholder(b) ? _curry2(function(_b, _c) { return fn(a, _b, _c); })
436 : _curry1(function(_c) { return fn(a, b, _c); });
437 default:
438 return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3
439 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function(_a, _b) { return fn(_a, _b, c); })
440 : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function(_a, _c) { return fn(_a, b, _c); })
441 : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function(_b, _c) { return fn(a, _b, _c); })
442 : _isPlaceholder(a) ? _curry1(function(_a) { return fn(_a, b, c); })
443 : _isPlaceholder(b) ? _curry1(function(_b) { return fn(a, _b, c); })
444 : _isPlaceholder(c) ? _curry1(function(_c) { return fn(a, b, _c); })
445 : fn(a, b, c);
446 }
447 };
448};
449
450
451/***/ }),
452/* 9 */
453/***/ (function(module, exports) {
454
455module.exports = function _isPlaceholder(a) {
456 return a != null &&
457 typeof a === 'object' &&
458 a['@@functional/placeholder'] === true;
459};
460
461
462/***/ }),
463/* 10 */
464/***/ (function(module, exports, __webpack_require__) {
465
466var _assign = __webpack_require__(53);
467var _curry2 = __webpack_require__(3);
468
469
470/**
471 * Create a new object with the own properties of the first object merged with
472 * the own properties of the second object. If a key exists in both objects,
473 * the value from the second object will be used.
474 *
475 * @func
476 * @memberOf R
477 * @since v0.1.0
478 * @category Object
479 * @sig {k: v} -> {k: v} -> {k: v}
480 * @param {Object} l
481 * @param {Object} r
482 * @return {Object}
483 * @see R.mergeDeepRight, R.mergeWith, R.mergeWithKey
484 * @example
485 *
486 * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 });
487 * //=> { 'name': 'fred', 'age': 40 }
488 *
489 * var resetToDefault = R.merge(R.__, {x: 0});
490 * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2}
491 * @symb R.merge({ x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: 5, z: 3 }
492 */
493module.exports = _curry2(function merge(l, r) {
494 return _assign({}, l, r);
495});
496
497
498/***/ }),
499/* 11 */
500/***/ (function(module, exports) {
501
502module.exports = __WEBPACK_EXTERNAL_MODULE_11__;
503
504/***/ }),
505/* 12 */
506/***/ (function(module, exports, __webpack_require__) {
507
508/**
509 * Copyright 2013-present, Facebook, Inc.
510 * All rights reserved.
511 *
512 * This source code is licensed under the BSD-style license found in the
513 * LICENSE file in the root directory of this source tree. An additional grant
514 * of patent rights can be found in the PATENTS file in the same directory.
515 */
516
517if (undefined !== 'production') {
518 var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
519 Symbol.for &&
520 Symbol.for('react.element')) ||
521 0xeac7;
522
523 var isValidElement = function(object) {
524 return typeof object === 'object' &&
525 object !== null &&
526 object.$$typeof === REACT_ELEMENT_TYPE;
527 };
528
529 // By explicitly using `prop-types` you are opting into new development behavior.
530 // http://fb.me/prop-types-in-prod
531 var throwOnDirectAccess = true;
532 module.exports = __webpack_require__(55)(isValidElement, throwOnDirectAccess);
533} else {
534 // By explicitly using `prop-types` you are opting into new production behavior.
535 // http://fb.me/prop-types-in-prod
536 module.exports = __webpack_require__(57)();
537}
538
539
540/***/ }),
541/* 13 */
542/***/ (function(module, exports) {
543
544module.exports = function _isPlaceholder(a) {
545 return a != null &&
546 typeof a === 'object' &&
547 a['@@functional/placeholder'] === true;
548};
549
550
551/***/ }),
552/* 14 */
553/***/ (function(module, exports, __webpack_require__) {
554
555var _curry1 = __webpack_require__(2);
556var _curry2 = __webpack_require__(0);
557var _isPlaceholder = __webpack_require__(13);
558
559
560/**
561 * Optimized internal three-arity curry function.
562 *
563 * @private
564 * @category Function
565 * @param {Function} fn The function to curry.
566 * @return {Function} The curried function.
567 */
568module.exports = function _curry3(fn) {
569 return function f3(a, b, c) {
570 switch (arguments.length) {
571 case 0:
572 return f3;
573 case 1:
574 return _isPlaceholder(a) ? f3
575 : _curry2(function(_b, _c) { return fn(a, _b, _c); });
576 case 2:
577 return _isPlaceholder(a) && _isPlaceholder(b) ? f3
578 : _isPlaceholder(a) ? _curry2(function(_a, _c) { return fn(_a, b, _c); })
579 : _isPlaceholder(b) ? _curry2(function(_b, _c) { return fn(a, _b, _c); })
580 : _curry1(function(_c) { return fn(a, b, _c); });
581 default:
582 return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3
583 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function(_a, _b) { return fn(_a, _b, c); })
584 : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function(_a, _c) { return fn(_a, b, _c); })
585 : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function(_b, _c) { return fn(a, _b, _c); })
586 : _isPlaceholder(a) ? _curry1(function(_a) { return fn(_a, b, c); })
587 : _isPlaceholder(b) ? _curry1(function(_b) { return fn(a, _b, c); })
588 : _isPlaceholder(c) ? _curry1(function(_c) { return fn(a, b, _c); })
589 : fn(a, b, c);
590 }
591 };
592};
593
594
595/***/ }),
596/* 15 */
597/***/ (function(module, exports, __webpack_require__) {
598
599var _isArray = __webpack_require__(24);
600var _isTransformer = __webpack_require__(80);
601
602
603/**
604 * Returns a function that dispatches with different strategies based on the
605 * object in list position (last argument). If it is an array, executes [fn].
606 * Otherwise, if it has a function with one of the given method names, it will
607 * execute that function (functor case). Otherwise, if it is a transformer,
608 * uses transducer [xf] to return a new transformer (transducer case).
609 * Otherwise, it will default to executing [fn].
610 *
611 * @private
612 * @param {Array} methodNames properties to check for a custom implementation
613 * @param {Function} xf transducer to initialize if object is transformer
614 * @param {Function} fn default ramda implementation
615 * @return {Function} A function that dispatches on object in list position
616 */
617module.exports = function _dispatchable(methodNames, xf, fn) {
618 return function() {
619 if (arguments.length === 0) {
620 return fn();
621 }
622 var args = Array.prototype.slice.call(arguments, 0);
623 var obj = args.pop();
624 if (!_isArray(obj)) {
625 var idx = 0;
626 while (idx < methodNames.length) {
627 if (typeof obj[methodNames[idx]] === 'function') {
628 return obj[methodNames[idx]].apply(obj, args);
629 }
630 idx += 1;
631 }
632 if (_isTransformer(obj)) {
633 var transducer = xf.apply(null, args);
634 return transducer(obj);
635 }
636 }
637 return fn.apply(this, arguments);
638 };
639};
640
641
642/***/ }),
643/* 16 */
644/***/ (function(module, exports) {
645
646module.exports = function _arity(n, fn) {
647 /* eslint-disable no-unused-vars */
648 switch (n) {
649 case 0: return function() { return fn.apply(this, arguments); };
650 case 1: return function(a0) { return fn.apply(this, arguments); };
651 case 2: return function(a0, a1) { return fn.apply(this, arguments); };
652 case 3: return function(a0, a1, a2) { return fn.apply(this, arguments); };
653 case 4: return function(a0, a1, a2, a3) { return fn.apply(this, arguments); };
654 case 5: return function(a0, a1, a2, a3, a4) { return fn.apply(this, arguments); };
655 case 6: return function(a0, a1, a2, a3, a4, a5) { return fn.apply(this, arguments); };
656 case 7: return function(a0, a1, a2, a3, a4, a5, a6) { return fn.apply(this, arguments); };
657 case 8: return function(a0, a1, a2, a3, a4, a5, a6, a7) { return fn.apply(this, arguments); };
658 case 9: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.apply(this, arguments); };
659 case 10: return function(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.apply(this, arguments); };
660 default: throw new Error('First argument to _arity must be a non-negative integer no greater than ten');
661 }
662};
663
664
665/***/ }),
666/* 17 */
667/***/ (function(module, exports) {
668
669module.exports = function _has(prop, obj) {
670 return Object.prototype.hasOwnProperty.call(obj, prop);
671};
672
673
674/***/ }),
675/* 18 */
676/***/ (function(module, exports, __webpack_require__) {
677
678"use strict";
679
680
681/**
682 * Copyright (c) 2013-present, Facebook, Inc.
683 * All rights reserved.
684 *
685 * This source code is licensed under the BSD-style license found in the
686 * LICENSE file in the root directory of this source tree. An additional grant
687 * of patent rights can be found in the PATENTS file in the same directory.
688 *
689 *
690 */
691
692function makeEmptyFunction(arg) {
693 return function () {
694 return arg;
695 };
696}
697
698/**
699 * This function accepts and discards inputs; it has no side effects. This is
700 * primarily useful idiomatically for overridable function endpoints which
701 * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
702 */
703var emptyFunction = function emptyFunction() {};
704
705emptyFunction.thatReturns = makeEmptyFunction;
706emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
707emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
708emptyFunction.thatReturnsNull = makeEmptyFunction(null);
709emptyFunction.thatReturnsThis = function () {
710 return this;
711};
712emptyFunction.thatReturnsArgument = function (arg) {
713 return arg;
714};
715
716module.exports = emptyFunction;
717
718/***/ }),
719/* 19 */
720/***/ (function(module, exports, __webpack_require__) {
721
722"use strict";
723/**
724 * Copyright (c) 2013-present, Facebook, Inc.
725 * All rights reserved.
726 *
727 * This source code is licensed under the BSD-style license found in the
728 * LICENSE file in the root directory of this source tree. An additional grant
729 * of patent rights can be found in the PATENTS file in the same directory.
730 *
731 */
732
733
734
735/**
736 * Use invariant() to assert state which your program assumes to be true.
737 *
738 * Provide sprintf-style format (only %s is supported) and arguments
739 * to provide information about what broke and what you were
740 * expecting.
741 *
742 * The invariant message will be stripped in production, but the invariant
743 * will remain to ensure logic does not differ in production.
744 */
745
746var validateFormat = function validateFormat(format) {};
747
748if (undefined !== 'production') {
749 validateFormat = function validateFormat(format) {
750 if (format === undefined) {
751 throw new Error('invariant requires an error message argument');
752 }
753 };
754}
755
756function invariant(condition, format, a, b, c, d, e, f) {
757 validateFormat(format);
758
759 if (!condition) {
760 var error;
761 if (format === undefined) {
762 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
763 } else {
764 var args = [a, b, c, d, e, f];
765 var argIndex = 0;
766 error = new Error(format.replace(/%s/g, function () {
767 return args[argIndex++];
768 }));
769 error.name = 'Invariant Violation';
770 }
771
772 error.framesToPop = 1; // we don't care about invariant's own frame
773 throw error;
774 }
775}
776
777module.exports = invariant;
778
779/***/ }),
780/* 20 */
781/***/ (function(module, exports, __webpack_require__) {
782
783"use strict";
784/**
785 * Copyright 2013-present, Facebook, Inc.
786 * All rights reserved.
787 *
788 * This source code is licensed under the BSD-style license found in the
789 * LICENSE file in the root directory of this source tree. An additional grant
790 * of patent rights can be found in the PATENTS file in the same directory.
791 */
792
793
794
795var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
796
797module.exports = ReactPropTypesSecret;
798
799
800/***/ }),
801/* 21 */
802/***/ (function(module, exports) {
803
804module.exports = __WEBPACK_EXTERNAL_MODULE_21__;
805
806/***/ }),
807/* 22 */
808/***/ (function(module, exports, __webpack_require__) {
809
810var _curry2 = __webpack_require__(0);
811
812
813/**
814 * Returns a function that when supplied an object returns the indicated
815 * property of that object, if it exists.
816 *
817 * @func
818 * @memberOf R
819 * @since v0.1.0
820 * @category Object
821 * @sig s -> {s: a} -> a | Undefined
822 * @param {String} p The property name
823 * @param {Object} obj The object to query
824 * @return {*} The value at `obj.p`.
825 * @see R.path
826 * @example
827 *
828 * R.prop('x', {x: 100}); //=> 100
829 * R.prop('x', {}); //=> undefined
830 */
831module.exports = _curry2(function prop(p, obj) { return obj[p]; });
832
833
834/***/ }),
835/* 23 */
836/***/ (function(module, exports, __webpack_require__) {
837
838var _isArrayLike = __webpack_require__(58);
839var _xwrap = __webpack_require__(59);
840var bind = __webpack_require__(60);
841
842
843module.exports = (function() {
844 function _arrayReduce(xf, acc, list) {
845 var idx = 0;
846 var len = list.length;
847 while (idx < len) {
848 acc = xf['@@transducer/step'](acc, list[idx]);
849 if (acc && acc['@@transducer/reduced']) {
850 acc = acc['@@transducer/value'];
851 break;
852 }
853 idx += 1;
854 }
855 return xf['@@transducer/result'](acc);
856 }
857
858 function _iterableReduce(xf, acc, iter) {
859 var step = iter.next();
860 while (!step.done) {
861 acc = xf['@@transducer/step'](acc, step.value);
862 if (acc && acc['@@transducer/reduced']) {
863 acc = acc['@@transducer/value'];
864 break;
865 }
866 step = iter.next();
867 }
868 return xf['@@transducer/result'](acc);
869 }
870
871 function _methodReduce(xf, acc, obj, methodName) {
872 return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));
873 }
874
875 var symIterator = (typeof Symbol !== 'undefined') ? Symbol.iterator : '@@iterator';
876 return function _reduce(fn, acc, list) {
877 if (typeof fn === 'function') {
878 fn = _xwrap(fn);
879 }
880 if (_isArrayLike(list)) {
881 return _arrayReduce(fn, acc, list);
882 }
883 if (typeof list['fantasy-land/reduce'] === 'function') {
884 return _methodReduce(fn, acc, list, 'fantasy-land/reduce');
885 }
886 if (list[symIterator] != null) {
887 return _iterableReduce(fn, acc, list[symIterator]());
888 }
889 if (typeof list.next === 'function') {
890 return _iterableReduce(fn, acc, list);
891 }
892 if (typeof list.reduce === 'function') {
893 return _methodReduce(fn, acc, list, 'reduce');
894 }
895
896 throw new TypeError('reduce: list must be array or iterable');
897 };
898}());
899
900
901/***/ }),
902/* 24 */
903/***/ (function(module, exports) {
904
905/**
906 * Tests whether or not an object is an array.
907 *
908 * @private
909 * @param {*} val The object to test.
910 * @return {Boolean} `true` if `val` is an array, `false` otherwise.
911 * @example
912 *
913 * _isArray([]); //=> true
914 * _isArray(null); //=> false
915 * _isArray({}); //=> false
916 */
917module.exports = Array.isArray || function _isArray(val) {
918 return (val != null &&
919 val.length >= 0 &&
920 Object.prototype.toString.call(val) === '[object Array]');
921};
922
923
924/***/ }),
925/* 25 */
926/***/ (function(module, exports, __webpack_require__) {
927
928var _contains = __webpack_require__(36);
929var _curry2 = __webpack_require__(0);
930
931
932/**
933 * Returns a partial copy of an object omitting the keys specified.
934 *
935 * @func
936 * @memberOf R
937 * @since v0.1.0
938 * @category Object
939 * @sig [String] -> {String: *} -> {String: *}
940 * @param {Array} names an array of String property names to omit from the new object
941 * @param {Object} obj The object to copy from
942 * @return {Object} A new object with properties from `names` not on it.
943 * @see R.pick
944 * @example
945 *
946 * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}
947 */
948module.exports = _curry2(function omit(names, obj) {
949 var result = {};
950 for (var prop in obj) {
951 if (!_contains(prop, names)) {
952 result[prop] = obj[prop];
953 }
954 }
955 return result;
956});
957
958
959/***/ }),
960/* 26 */
961/***/ (function(module, exports, __webpack_require__) {
962
963module.exports = __webpack_require__(77);
964
965
966/***/ }),
967/* 27 */
968/***/ (function(module, exports) {
969
970module.exports = {
971 init: function() {
972 return this.xf['@@transducer/init']();
973 },
974 result: function(result) {
975 return this.xf['@@transducer/result'](result);
976 }
977};
978
979
980/***/ }),
981/* 28 */
982/***/ (function(module, exports) {
983
984/**
985 * Tests whether or not an object is an array.
986 *
987 * @private
988 * @param {*} val The object to test.
989 * @return {Boolean} `true` if `val` is an array, `false` otherwise.
990 * @example
991 *
992 * _isArray([]); //=> true
993 * _isArray(null); //=> false
994 * _isArray({}); //=> false
995 */
996module.exports = Array.isArray || function _isArray(val) {
997 return (val != null &&
998 val.length >= 0 &&
999 Object.prototype.toString.call(val) === '[object Array]');
1000};
1001
1002
1003/***/ }),
1004/* 29 */
1005/***/ (function(module, exports, __webpack_require__) {
1006
1007var _curry2 = __webpack_require__(3);
1008
1009
1010/**
1011 * Returns a function that when supplied an object returns the indicated
1012 * property of that object, if it exists.
1013 *
1014 * @func
1015 * @memberOf R
1016 * @since v0.1.0
1017 * @category Object
1018 * @sig s -> {s: a} -> a | Undefined
1019 * @param {String} p The property name
1020 * @param {Object} obj The object to query
1021 * @return {*} The value at `obj.p`.
1022 * @see R.path
1023 * @example
1024 *
1025 * R.prop('x', {x: 100}); //=> 100
1026 * R.prop('x', {}); //=> undefined
1027 */
1028module.exports = _curry2(function prop(p, obj) { return obj[p]; });
1029
1030
1031/***/ }),
1032/* 30 */
1033/***/ (function(module, exports, __webpack_require__) {
1034
1035var _curry1 = __webpack_require__(1);
1036var _identity = __webpack_require__(52);
1037
1038
1039/**
1040 * A function that does nothing but return the parameter supplied to it. Good
1041 * as a default or placeholder function.
1042 *
1043 * @func
1044 * @memberOf R
1045 * @since v0.1.0
1046 * @category Function
1047 * @sig a -> a
1048 * @param {*} x The value to return.
1049 * @return {*} The input value, `x`.
1050 * @example
1051 *
1052 * R.identity(1); //=> 1
1053 *
1054 * var obj = {};
1055 * R.identity(obj) === obj; //=> true
1056 * @symb R.identity(a) = a
1057 */
1058module.exports = _curry1(_identity);
1059
1060
1061/***/ }),
1062/* 31 */
1063/***/ (function(module, exports, __webpack_require__) {
1064
1065"use strict";
1066/**
1067 * Copyright 2014-2015, Facebook, Inc.
1068 * All rights reserved.
1069 *
1070 * This source code is licensed under the BSD-style license found in the
1071 * LICENSE file in the root directory of this source tree. An additional grant
1072 * of patent rights can be found in the PATENTS file in the same directory.
1073 *
1074 */
1075
1076
1077
1078var emptyFunction = __webpack_require__(18);
1079
1080/**
1081 * Similar to invariant but only logs a warning if the condition is not met.
1082 * This can be used to log issues in development environments in critical
1083 * paths. Removing the logging code for production environments will keep the
1084 * same logic and follow the same code paths.
1085 */
1086
1087var warning = emptyFunction;
1088
1089if (undefined !== 'production') {
1090 (function () {
1091 var printWarning = function printWarning(format) {
1092 for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1093 args[_key - 1] = arguments[_key];
1094 }
1095
1096 var argIndex = 0;
1097 var message = 'Warning: ' + format.replace(/%s/g, function () {
1098 return args[argIndex++];
1099 });
1100 if (typeof console !== 'undefined') {
1101 console.error(message);
1102 }
1103 try {
1104 // --- Welcome to debugging React ---
1105 // This error was thrown as a convenience so that you can use this stack
1106 // to find the callsite that caused this warning to fire.
1107 throw new Error(message);
1108 } catch (x) {}
1109 };
1110
1111 warning = function warning(condition, format) {
1112 if (format === undefined) {
1113 throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
1114 }
1115
1116 if (format.indexOf('Failed Composite propType: ') === 0) {
1117 return; // Ignore CompositeComponent proptype check.
1118 }
1119
1120 if (!condition) {
1121 for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
1122 args[_key2 - 2] = arguments[_key2];
1123 }
1124
1125 printWarning.apply(undefined, [format].concat(args));
1126 }
1127 };
1128 })();
1129}
1130
1131module.exports = warning;
1132
1133/***/ }),
1134/* 32 */
1135/***/ (function(module, exports, __webpack_require__) {
1136
1137var _curry3 = __webpack_require__(14);
1138var _reduce = __webpack_require__(23);
1139
1140
1141/**
1142 * Returns a single item by iterating through the list, successively calling
1143 * the iterator function and passing it an accumulator value and the current
1144 * value from the array, and then passing the result to the next call.
1145 *
1146 * The iterator function receives two values: *(acc, value)*. It may use
1147 * [`R.reduced`](#reduced) to shortcut the iteration.
1148 *
1149 * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function
1150 * is *(value, acc)*.
1151 *
1152 * Note: `R.reduce` does not skip deleted or unassigned indices (sparse
1153 * arrays), unlike the native `Array.prototype.reduce` method. For more details
1154 * on this behavior, see:
1155 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description
1156 *
1157 * Dispatches to the `reduce` method of the third argument, if present. When
1158 * doing so, it is up to the user to handle the [`R.reduced`](#reduced)
1159 * shortcuting, as this is not implemented by `reduce`.
1160 *
1161 * @func
1162 * @memberOf R
1163 * @since v0.1.0
1164 * @category List
1165 * @sig ((a, b) -> a) -> a -> [b] -> a
1166 * @param {Function} fn The iterator function. Receives two values, the accumulator and the
1167 * current element from the array.
1168 * @param {*} acc The accumulator value.
1169 * @param {Array} list The list to iterate over.
1170 * @return {*} The final, accumulated value.
1171 * @see R.reduced, R.addIndex, R.reduceRight
1172 * @example
1173 *
1174 * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10
1175 * - -10
1176 * / \ / \
1177 * - 4 -6 4
1178 * / \ / \
1179 * - 3 ==> -3 3
1180 * / \ / \
1181 * - 2 -1 2
1182 * / \ / \
1183 * 0 1 0 1
1184 *
1185 * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)
1186 */
1187module.exports = _curry3(_reduce);
1188
1189
1190/***/ }),
1191/* 33 */
1192/***/ (function(module, exports) {
1193
1194module.exports = function _isString(x) {
1195 return Object.prototype.toString.call(x) === '[object String]';
1196};
1197
1198
1199/***/ }),
1200/* 34 */
1201/***/ (function(module, exports, __webpack_require__) {
1202
1203var pipe = __webpack_require__(64);
1204var reverse = __webpack_require__(68);
1205
1206
1207/**
1208 * Performs right-to-left function composition. The rightmost function may have
1209 * any arity; the remaining functions must be unary.
1210 *
1211 * **Note:** The result of compose is not automatically curried.
1212 *
1213 * @func
1214 * @memberOf R
1215 * @since v0.1.0
1216 * @category Function
1217 * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z)
1218 * @param {...Function} ...functions The functions to compose
1219 * @return {Function}
1220 * @see R.pipe
1221 * @example
1222 *
1223 * var classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName
1224 * var yellGreeting = R.compose(R.toUpper, classyGreeting);
1225 * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND"
1226 *
1227 * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7
1228 *
1229 * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b)))
1230 */
1231module.exports = function compose() {
1232 if (arguments.length === 0) {
1233 throw new Error('compose requires at least one argument');
1234 }
1235 return pipe.apply(this, reverse(arguments));
1236};
1237
1238
1239/***/ }),
1240/* 35 */
1241/***/ (function(module, exports, __webpack_require__) {
1242
1243var _isArray = __webpack_require__(24);
1244
1245
1246/**
1247 * This checks whether a function has a [methodname] function. If it isn't an
1248 * array it will execute that function otherwise it will default to the ramda
1249 * implementation.
1250 *
1251 * @private
1252 * @param {Function} fn ramda implemtation
1253 * @param {String} methodname property to check for a custom implementation
1254 * @return {Object} Whatever the return value of the method is.
1255 */
1256module.exports = function _checkForMethod(methodname, fn) {
1257 return function() {
1258 var length = arguments.length;
1259 if (length === 0) {
1260 return fn();
1261 }
1262 var obj = arguments[length - 1];
1263 return (_isArray(obj) || typeof obj[methodname] !== 'function') ?
1264 fn.apply(this, arguments) :
1265 obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));
1266 };
1267};
1268
1269
1270/***/ }),
1271/* 36 */
1272/***/ (function(module, exports, __webpack_require__) {
1273
1274var _indexOf = __webpack_require__(70);
1275
1276
1277module.exports = function _contains(a, list) {
1278 return _indexOf(list, a, 0) >= 0;
1279};
1280
1281
1282/***/ }),
1283/* 37 */
1284/***/ (function(module, exports, __webpack_require__) {
1285
1286var _curry2 = __webpack_require__(0);
1287var _dispatchable = __webpack_require__(15);
1288var _xany = __webpack_require__(38);
1289
1290
1291/**
1292 * Returns `true` if at least one of elements of the list match the predicate,
1293 * `false` otherwise.
1294 *
1295 * Dispatches to the `any` method of the second argument, if present.
1296 *
1297 * Acts as a transducer if a transformer is given in list position.
1298 *
1299 * @func
1300 * @memberOf R
1301 * @since v0.1.0
1302 * @category List
1303 * @sig (a -> Boolean) -> [a] -> Boolean
1304 * @param {Function} fn The predicate function.
1305 * @param {Array} list The array to consider.
1306 * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false`
1307 * otherwise.
1308 * @see R.all, R.none, R.transduce
1309 * @example
1310 *
1311 * var lessThan0 = R.flip(R.lt)(0);
1312 * var lessThan2 = R.flip(R.lt)(2);
1313 * R.any(lessThan0)([1, 2]); //=> false
1314 * R.any(lessThan2)([1, 2]); //=> true
1315 */
1316module.exports = _curry2(_dispatchable(['any'], _xany, function any(fn, list) {
1317 var idx = 0;
1318 while (idx < list.length) {
1319 if (fn(list[idx])) {
1320 return true;
1321 }
1322 idx += 1;
1323 }
1324 return false;
1325}));
1326
1327
1328/***/ }),
1329/* 38 */
1330/***/ (function(module, exports, __webpack_require__) {
1331
1332var _curry2 = __webpack_require__(0);
1333var _reduced = __webpack_require__(81);
1334var _xfBase = __webpack_require__(27);
1335
1336
1337module.exports = (function() {
1338 function XAny(f, xf) {
1339 this.xf = xf;
1340 this.f = f;
1341 this.any = false;
1342 }
1343 XAny.prototype['@@transducer/init'] = _xfBase.init;
1344 XAny.prototype['@@transducer/result'] = function(result) {
1345 if (!this.any) {
1346 result = this.xf['@@transducer/step'](result, false);
1347 }
1348 return this.xf['@@transducer/result'](result);
1349 };
1350 XAny.prototype['@@transducer/step'] = function(result, input) {
1351 if (this.f(input)) {
1352 this.any = true;
1353 result = _reduced(this.xf['@@transducer/step'](result, true));
1354 }
1355 return result;
1356 };
1357
1358 return _curry2(function _xany(f, xf) { return new XAny(f, xf); });
1359}());
1360
1361
1362/***/ }),
1363/* 39 */
1364/***/ (function(module, exports) {
1365
1366module.exports = function _complement(f) {
1367 return function() {
1368 return !f.apply(this, arguments);
1369 };
1370};
1371
1372
1373/***/ }),
1374/* 40 */
1375/***/ (function(module, exports, __webpack_require__) {
1376
1377var _curry2 = __webpack_require__(0);
1378var _dispatchable = __webpack_require__(15);
1379var _map = __webpack_require__(41);
1380var _reduce = __webpack_require__(23);
1381var _xmap = __webpack_require__(85);
1382var curryN = __webpack_require__(86);
1383var keys = __webpack_require__(5);
1384
1385
1386/**
1387 * Takes a function and
1388 * a [functor](https://github.com/fantasyland/fantasy-land#functor),
1389 * applies the function to each of the functor's values, and returns
1390 * a functor of the same shape.
1391 *
1392 * Ramda provides suitable `map` implementations for `Array` and `Object`,
1393 * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.
1394 *
1395 * Dispatches to the `map` method of the second argument, if present.
1396 *
1397 * Acts as a transducer if a transformer is given in list position.
1398 *
1399 * Also treats functions as functors and will compose them together.
1400 *
1401 * @func
1402 * @memberOf R
1403 * @since v0.1.0
1404 * @category List
1405 * @sig Functor f => (a -> b) -> f a -> f b
1406 * @param {Function} fn The function to be called on every element of the input `list`.
1407 * @param {Array} list The list to be iterated over.
1408 * @return {Array} The new list.
1409 * @see R.transduce, R.addIndex
1410 * @example
1411 *
1412 * var double = x => x * 2;
1413 *
1414 * R.map(double, [1, 2, 3]); //=> [2, 4, 6]
1415 *
1416 * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}
1417 * @symb R.map(f, [a, b]) = [f(a), f(b)]
1418 * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }
1419 * @symb R.map(f, functor_o) = functor_o.map(f)
1420 */
1421module.exports = _curry2(_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {
1422 switch (Object.prototype.toString.call(functor)) {
1423 case '[object Function]':
1424 return curryN(functor.length, function() {
1425 return fn.call(this, functor.apply(this, arguments));
1426 });
1427 case '[object Object]':
1428 return _reduce(function(acc, key) {
1429 acc[key] = fn(functor[key]);
1430 return acc;
1431 }, {}, keys(functor));
1432 default:
1433 return _map(fn, functor);
1434 }
1435}));
1436
1437
1438/***/ }),
1439/* 41 */
1440/***/ (function(module, exports) {
1441
1442module.exports = function _map(fn, functor) {
1443 var idx = 0;
1444 var len = functor.length;
1445 var result = Array(len);
1446 while (idx < len) {
1447 result[idx] = fn(functor[idx]);
1448 idx += 1;
1449 }
1450 return result;
1451};
1452
1453
1454/***/ }),
1455/* 42 */
1456/***/ (function(module, exports, __webpack_require__) {
1457
1458var _curry2 = __webpack_require__(3);
1459
1460
1461/**
1462 * Retrieve the value at a given path.
1463 *
1464 * @func
1465 * @memberOf R
1466 * @since v0.2.0
1467 * @category Object
1468 * @typedefn Idx = String | Int
1469 * @sig [Idx] -> {a} -> a | Undefined
1470 * @param {Array} path The path to use.
1471 * @param {Object} obj The object to retrieve the nested property from.
1472 * @return {*} The data at `path`.
1473 * @see R.prop
1474 * @example
1475 *
1476 * R.path(['a', 'b'], {a: {b: 2}}); //=> 2
1477 * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined
1478 */
1479module.exports = _curry2(function path(paths, obj) {
1480 var val = obj;
1481 var idx = 0;
1482 while (idx < paths.length) {
1483 if (val == null) {
1484 return;
1485 }
1486 val = val[paths[idx]];
1487 idx += 1;
1488 }
1489 return val;
1490});
1491
1492
1493/***/ }),
1494/* 43 */
1495/***/ (function(module, exports, __webpack_require__) {
1496
1497var _curry2 = __webpack_require__(3);
1498var _dispatchable = __webpack_require__(103);
1499var _map = __webpack_require__(105);
1500var _reduce = __webpack_require__(44);
1501var _xmap = __webpack_require__(109);
1502var curryN = __webpack_require__(46);
1503var keys = __webpack_require__(112);
1504
1505
1506/**
1507 * Takes a function and
1508 * a [functor](https://github.com/fantasyland/fantasy-land#functor),
1509 * applies the function to each of the functor's values, and returns
1510 * a functor of the same shape.
1511 *
1512 * Ramda provides suitable `map` implementations for `Array` and `Object`,
1513 * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.
1514 *
1515 * Dispatches to the `map` method of the second argument, if present.
1516 *
1517 * Acts as a transducer if a transformer is given in list position.
1518 *
1519 * Also treats functions as functors and will compose them together.
1520 *
1521 * @func
1522 * @memberOf R
1523 * @since v0.1.0
1524 * @category List
1525 * @sig Functor f => (a -> b) -> f a -> f b
1526 * @param {Function} fn The function to be called on every element of the input `list`.
1527 * @param {Array} list The list to be iterated over.
1528 * @return {Array} The new list.
1529 * @see R.transduce, R.addIndex
1530 * @example
1531 *
1532 * var double = x => x * 2;
1533 *
1534 * R.map(double, [1, 2, 3]); //=> [2, 4, 6]
1535 *
1536 * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}
1537 * @symb R.map(f, [a, b]) = [f(a), f(b)]
1538 * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }
1539 * @symb R.map(f, functor_o) = functor_o.map(f)
1540 */
1541module.exports = _curry2(_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {
1542 switch (Object.prototype.toString.call(functor)) {
1543 case '[object Function]':
1544 return curryN(functor.length, function() {
1545 return fn.call(this, functor.apply(this, arguments));
1546 });
1547 case '[object Object]':
1548 return _reduce(function(acc, key) {
1549 acc[key] = fn(functor[key]);
1550 return acc;
1551 }, {}, keys(functor));
1552 default:
1553 return _map(fn, functor);
1554 }
1555}));
1556
1557
1558/***/ }),
1559/* 44 */
1560/***/ (function(module, exports, __webpack_require__) {
1561
1562var _isArrayLike = __webpack_require__(106);
1563var _xwrap = __webpack_require__(107);
1564var bind = __webpack_require__(108);
1565
1566
1567module.exports = (function() {
1568 function _arrayReduce(xf, acc, list) {
1569 var idx = 0;
1570 var len = list.length;
1571 while (idx < len) {
1572 acc = xf['@@transducer/step'](acc, list[idx]);
1573 if (acc && acc['@@transducer/reduced']) {
1574 acc = acc['@@transducer/value'];
1575 break;
1576 }
1577 idx += 1;
1578 }
1579 return xf['@@transducer/result'](acc);
1580 }
1581
1582 function _iterableReduce(xf, acc, iter) {
1583 var step = iter.next();
1584 while (!step.done) {
1585 acc = xf['@@transducer/step'](acc, step.value);
1586 if (acc && acc['@@transducer/reduced']) {
1587 acc = acc['@@transducer/value'];
1588 break;
1589 }
1590 step = iter.next();
1591 }
1592 return xf['@@transducer/result'](acc);
1593 }
1594
1595 function _methodReduce(xf, acc, obj, methodName) {
1596 return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));
1597 }
1598
1599 var symIterator = (typeof Symbol !== 'undefined') ? Symbol.iterator : '@@iterator';
1600 return function _reduce(fn, acc, list) {
1601 if (typeof fn === 'function') {
1602 fn = _xwrap(fn);
1603 }
1604 if (_isArrayLike(list)) {
1605 return _arrayReduce(fn, acc, list);
1606 }
1607 if (typeof list['fantasy-land/reduce'] === 'function') {
1608 return _methodReduce(fn, acc, list, 'fantasy-land/reduce');
1609 }
1610 if (list[symIterator] != null) {
1611 return _iterableReduce(fn, acc, list[symIterator]());
1612 }
1613 if (typeof list.next === 'function') {
1614 return _iterableReduce(fn, acc, list);
1615 }
1616 if (typeof list.reduce === 'function') {
1617 return _methodReduce(fn, acc, list, 'reduce');
1618 }
1619
1620 throw new TypeError('reduce: list must be array or iterable');
1621 };
1622}());
1623
1624
1625/***/ }),
1626/* 45 */
1627/***/ (function(module, exports) {
1628
1629module.exports = function _isString(x) {
1630 return Object.prototype.toString.call(x) === '[object String]';
1631};
1632
1633
1634/***/ }),
1635/* 46 */
1636/***/ (function(module, exports, __webpack_require__) {
1637
1638var _arity = __webpack_require__(16);
1639var _curry1 = __webpack_require__(1);
1640var _curry2 = __webpack_require__(3);
1641var _curryN = __webpack_require__(111);
1642
1643
1644/**
1645 * Returns a curried equivalent of the provided function, with the specified
1646 * arity. The curried function has two unusual capabilities. First, its
1647 * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the
1648 * following are equivalent:
1649 *
1650 * - `g(1)(2)(3)`
1651 * - `g(1)(2, 3)`
1652 * - `g(1, 2)(3)`
1653 * - `g(1, 2, 3)`
1654 *
1655 * Secondly, the special placeholder value [`R.__`](#__) may be used to specify
1656 * "gaps", allowing partial application of any combination of arguments,
1657 * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),
1658 * the following are equivalent:
1659 *
1660 * - `g(1, 2, 3)`
1661 * - `g(_, 2, 3)(1)`
1662 * - `g(_, _, 3)(1)(2)`
1663 * - `g(_, _, 3)(1, 2)`
1664 * - `g(_, 2)(1)(3)`
1665 * - `g(_, 2)(1, 3)`
1666 * - `g(_, 2)(_, 3)(1)`
1667 *
1668 * @func
1669 * @memberOf R
1670 * @since v0.5.0
1671 * @category Function
1672 * @sig Number -> (* -> a) -> (* -> a)
1673 * @param {Number} length The arity for the returned function.
1674 * @param {Function} fn The function to curry.
1675 * @return {Function} A new, curried function.
1676 * @see R.curry
1677 * @example
1678 *
1679 * var sumArgs = (...args) => R.sum(args);
1680 *
1681 * var curriedAddFourNumbers = R.curryN(4, sumArgs);
1682 * var f = curriedAddFourNumbers(1, 2);
1683 * var g = f(3);
1684 * g(4); //=> 10
1685 */
1686module.exports = _curry2(function curryN(length, fn) {
1687 if (length === 1) {
1688 return _curry1(fn);
1689 }
1690 return _arity(length, _curryN(length, [], fn));
1691});
1692
1693
1694/***/ }),
1695/* 47 */
1696/***/ (function(module, exports, __webpack_require__) {
1697
1698var _curry1 = __webpack_require__(1);
1699
1700
1701/**
1702 * Returns a function that always returns the given value. Note that for
1703 * non-primitives the value returned is a reference to the original value.
1704 *
1705 * This function is known as `const`, `constant`, or `K` (for K combinator) in
1706 * other languages and libraries.
1707 *
1708 * @func
1709 * @memberOf R
1710 * @since v0.1.0
1711 * @category Function
1712 * @sig a -> (* -> a)
1713 * @param {*} val The value to wrap in a function
1714 * @return {Function} A Function :: * -> val.
1715 * @example
1716 *
1717 * var t = R.always('Tee');
1718 * t(); //=> 'Tee'
1719 */
1720module.exports = _curry1(function always(val) {
1721 return function() {
1722 return val;
1723 };
1724});
1725
1726
1727/***/ }),
1728/* 48 */
1729/***/ (function(module, exports, __webpack_require__) {
1730
1731var _isArray = __webpack_require__(28);
1732
1733
1734/**
1735 * This checks whether a function has a [methodname] function. If it isn't an
1736 * array it will execute that function otherwise it will default to the ramda
1737 * implementation.
1738 *
1739 * @private
1740 * @param {Function} fn ramda implemtation
1741 * @param {String} methodname property to check for a custom implementation
1742 * @return {Object} Whatever the return value of the method is.
1743 */
1744module.exports = function _checkForMethod(methodname, fn) {
1745 return function() {
1746 var length = arguments.length;
1747 if (length === 0) {
1748 return fn();
1749 }
1750 var obj = arguments[length - 1];
1751 return (_isArray(obj) || typeof obj[methodname] !== 'function') ?
1752 fn.apply(this, arguments) :
1753 obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));
1754 };
1755};
1756
1757
1758/***/ }),
1759/* 49 */
1760/***/ (function(module, exports, __webpack_require__) {
1761
1762"use strict";
1763
1764
1765exports.__esModule = true;
1766
1767var _merge = __webpack_require__(10);
1768
1769var _merge2 = _interopRequireDefault(_merge);
1770
1771exports.default = connectField;
1772
1773var _react = __webpack_require__(11);
1774
1775var React = _interopRequireWildcard(_react);
1776
1777var _propTypes = __webpack_require__(12);
1778
1779var PropTypes = _interopRequireWildcard(_propTypes);
1780
1781var _helpers = __webpack_require__(4);
1782
1783function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
1784
1785function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1786
1787function connectField(Wrapped) {
1788 var ConnectedField = function ConnectedField(props, _ref) {
1789 var reduxForms = _ref.reduxForms;
1790
1791 var contextForm = (0, _helpers.isString)(reduxForms) ? reduxForms : null;
1792 var form = (0, _helpers.isString)(props.form) ? props.form : contextForm;
1793 (0, _helpers.invariant)((0, _helpers.isString)(form), '[redux-forms] "field(...)" and "fieldArray(...)" must be a child of the Form ' + 'component or an explicit "form" prop must be supplied.');
1794 return React.createElement(Wrapped, (0, _merge2.default)(props, {
1795 _form: form
1796 }));
1797 };
1798 ConnectedField.contextTypes = {
1799 reduxForms: PropTypes.string
1800 };
1801 ConnectedField.displayName = Wrapped.displayName;
1802 ConnectedField.WrappedComponent = Wrapped;
1803 return ConnectedField;
1804}
1805
1806/***/ }),
1807/* 50 */
1808/***/ (function(module, exports, __webpack_require__) {
1809
1810"use strict";
1811
1812
1813exports.__esModule = true;
1814exports.fieldArray = exports.field = exports.Form = undefined;
1815
1816var _Form = __webpack_require__(51);
1817
1818var _Form2 = _interopRequireDefault(_Form);
1819
1820var _field = __webpack_require__(99);
1821
1822var _field2 = _interopRequireDefault(_field);
1823
1824var _fieldArray = __webpack_require__(135);
1825
1826var _fieldArray2 = _interopRequireDefault(_fieldArray);
1827
1828function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1829
1830exports.Form = _Form2.default;
1831exports.field = _field2.default;
1832exports.fieldArray = _fieldArray2.default;
1833
1834/***/ }),
1835/* 51 */
1836/***/ (function(module, exports, __webpack_require__) {
1837
1838"use strict";
1839
1840
1841exports.__esModule = true;
1842
1843var _prop = __webpack_require__(29);
1844
1845var _prop2 = _interopRequireDefault(_prop);
1846
1847var _identity = __webpack_require__(30);
1848
1849var _identity2 = _interopRequireDefault(_identity);
1850
1851var _merge = __webpack_require__(10);
1852
1853var _merge2 = _interopRequireDefault(_merge);
1854
1855var _react = __webpack_require__(11);
1856
1857var React = _interopRequireWildcard(_react);
1858
1859var _propTypes = __webpack_require__(12);
1860
1861var PropTypes = _interopRequireWildcard(_propTypes);
1862
1863var _reactRedux = __webpack_require__(21);
1864
1865var _helpers = __webpack_require__(4);
1866
1867var _formProps = __webpack_require__(69);
1868
1869var _formProps2 = _interopRequireDefault(_formProps);
1870
1871var _actions = __webpack_require__(26);
1872
1873var actions = _interopRequireWildcard(_actions);
1874
1875var _selectors = __webpack_require__(78);
1876
1877var selectors = _interopRequireWildcard(_selectors);
1878
1879function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
1880
1881function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1882
1883function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1884
1885function _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; }
1886
1887function _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; }
1888
1889var Form = function (_React$Component) {
1890 _inherits(Form, _React$Component);
1891
1892 function Form(props) {
1893 _classCallCheck(this, Form);
1894
1895 var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
1896
1897 _this.handleSubmit = _this.handleSubmit.bind(_this);
1898 return _this;
1899 }
1900
1901 Form.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
1902 return !(0, _helpers.shallowCompare)((0, _formProps.toUpdate)(this.props), (0, _formProps.toUpdate)(nextProps));
1903 };
1904
1905 Form.prototype.componentWillMount = function componentWillMount() {
1906 var _props = this.props,
1907 name = _props.name,
1908 _form = _props._form,
1909 _addForm = _props._addForm;
1910
1911 if (!_form) {
1912 _addForm(name);
1913 }
1914 };
1915
1916 Form.prototype.componentWillUnmount = function componentWillUnmount() {
1917 var _props2 = this.props,
1918 name = _props2.name,
1919 persistent = _props2.persistent,
1920 _removeForm = _props2._removeForm;
1921
1922 if (!persistent) {
1923 _removeForm(name);
1924 }
1925 };
1926
1927 Form.prototype.getChildContext = function getChildContext() {
1928 var name = this.props.name;
1929
1930 return {
1931 reduxForms: name
1932 };
1933 };
1934
1935 Form.prototype.handleSubmit = function handleSubmit(ev) {
1936 var _props3 = this.props,
1937 name = _props3.name,
1938 onSubmit = _props3.onSubmit,
1939 _valid = _props3._valid,
1940 _values = _props3._values,
1941 _touchAll = _props3._touchAll,
1942 _submitting = _props3._submitting,
1943 _submitStart = _props3._submitStart,
1944 _submitStop = _props3._submitStop;
1945
1946 ev.preventDefault();
1947 _touchAll(name);
1948 if (_submitting) {
1949 return;
1950 }
1951 if (!_valid || !(0, _helpers.isFunction)(onSubmit)) {
1952 return;
1953 }
1954 var maybePromise = onSubmit(_values);
1955 if ((0, _helpers.isPromise)(maybePromise)) {
1956 _submitStart(name);
1957 maybePromise.then(function () {
1958 return _submitStop(name);
1959 });
1960 }
1961 };
1962
1963 Form.prototype.render = function render() {
1964 var _props4 = this.props,
1965 children = _props4.children,
1966 withRef = _props4.withRef,
1967 _form = _props4._form;
1968 // Wait until form is initialized
1969
1970 if (!_form) {
1971 return null;
1972 }
1973 return React.createElement('form', (0, _formProps2.default)((0, _merge2.default)(this.props, {
1974 ref: withRef,
1975 onSubmit: this.handleSubmit
1976 })), children);
1977 };
1978
1979 return Form;
1980}(React.Component);
1981
1982Form.defaultProps = {
1983 persistent: false,
1984 onSubmit: function onSubmit() {
1985 return null;
1986 },
1987 withRef: function withRef() {
1988 return null;
1989 },
1990 // state
1991 _form: false,
1992 _values: {},
1993 _valid: false,
1994 _submitting: false,
1995 // actions
1996 _addForm: _identity2.default,
1997 _removeForm: _identity2.default,
1998 _touchAll: _identity2.default,
1999 _submitStart: _identity2.default,
2000 _submitStop: _identity2.default
2001};
2002Form.childContextTypes = {
2003 reduxForms: PropTypes.string.isRequired
2004};
2005Form.propTypes = {
2006 name: PropTypes.string.isRequired,
2007 persistent: PropTypes.bool.isRequired,
2008 onSubmit: PropTypes.func.isRequired,
2009 withRef: PropTypes.func.isRequired
2010};
2011var Connected = (0, _reactRedux.connect)(function (state, props) {
2012 return {
2013 _form: Boolean((0, _prop2.default)(props.name, state.reduxForms)),
2014 _values: selectors.getValues(props.name, state),
2015 _valid: selectors.isValid(props.name, state),
2016 _submitting: selectors.isSubmitting(props.name, state)
2017 };
2018}, {
2019 _addForm: actions.addForm,
2020 _removeForm: actions.removeForm,
2021 _touchAll: actions.touchAll,
2022 _submitStart: actions.submitStart,
2023 _submitStop: actions.submitStop
2024})(Form);
2025Connected.displayName = 'Form';
2026exports.default = Connected;
2027
2028/***/ }),
2029/* 52 */
2030/***/ (function(module, exports) {
2031
2032module.exports = function _identity(x) { return x; };
2033
2034
2035/***/ }),
2036/* 53 */
2037/***/ (function(module, exports, __webpack_require__) {
2038
2039var _objectAssign = __webpack_require__(54);
2040
2041module.exports =
2042 typeof Object.assign === 'function' ? Object.assign : _objectAssign;
2043
2044
2045/***/ }),
2046/* 54 */
2047/***/ (function(module, exports, __webpack_require__) {
2048
2049var _has = __webpack_require__(17);
2050
2051// Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
2052module.exports = function _objectAssign(target) {
2053 if (target == null) {
2054 throw new TypeError('Cannot convert undefined or null to object');
2055 }
2056
2057 var output = Object(target);
2058 var idx = 1;
2059 var length = arguments.length;
2060 while (idx < length) {
2061 var source = arguments[idx];
2062 if (source != null) {
2063 for (var nextKey in source) {
2064 if (_has(nextKey, source)) {
2065 output[nextKey] = source[nextKey];
2066 }
2067 }
2068 }
2069 idx += 1;
2070 }
2071 return output;
2072};
2073
2074
2075/***/ }),
2076/* 55 */
2077/***/ (function(module, exports, __webpack_require__) {
2078
2079"use strict";
2080/**
2081 * Copyright 2013-present, Facebook, Inc.
2082 * All rights reserved.
2083 *
2084 * This source code is licensed under the BSD-style license found in the
2085 * LICENSE file in the root directory of this source tree. An additional grant
2086 * of patent rights can be found in the PATENTS file in the same directory.
2087 */
2088
2089
2090
2091var emptyFunction = __webpack_require__(18);
2092var invariant = __webpack_require__(19);
2093var warning = __webpack_require__(31);
2094
2095var ReactPropTypesSecret = __webpack_require__(20);
2096var checkPropTypes = __webpack_require__(56);
2097
2098module.exports = function(isValidElement, throwOnDirectAccess) {
2099 /* global Symbol */
2100 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
2101 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
2102
2103 /**
2104 * Returns the iterator method function contained on the iterable object.
2105 *
2106 * Be sure to invoke the function with the iterable as context:
2107 *
2108 * var iteratorFn = getIteratorFn(myIterable);
2109 * if (iteratorFn) {
2110 * var iterator = iteratorFn.call(myIterable);
2111 * ...
2112 * }
2113 *
2114 * @param {?object} maybeIterable
2115 * @return {?function}
2116 */
2117 function getIteratorFn(maybeIterable) {
2118 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
2119 if (typeof iteratorFn === 'function') {
2120 return iteratorFn;
2121 }
2122 }
2123
2124 /**
2125 * Collection of methods that allow declaration and validation of props that are
2126 * supplied to React components. Example usage:
2127 *
2128 * var Props = require('ReactPropTypes');
2129 * var MyArticle = React.createClass({
2130 * propTypes: {
2131 * // An optional string prop named "description".
2132 * description: Props.string,
2133 *
2134 * // A required enum prop named "category".
2135 * category: Props.oneOf(['News','Photos']).isRequired,
2136 *
2137 * // A prop named "dialog" that requires an instance of Dialog.
2138 * dialog: Props.instanceOf(Dialog).isRequired
2139 * },
2140 * render: function() { ... }
2141 * });
2142 *
2143 * A more formal specification of how these methods are used:
2144 *
2145 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
2146 * decl := ReactPropTypes.{type}(.isRequired)?
2147 *
2148 * Each and every declaration produces a function with the same signature. This
2149 * allows the creation of custom validation functions. For example:
2150 *
2151 * var MyLink = React.createClass({
2152 * propTypes: {
2153 * // An optional string or URI prop named "href".
2154 * href: function(props, propName, componentName) {
2155 * var propValue = props[propName];
2156 * if (propValue != null && typeof propValue !== 'string' &&
2157 * !(propValue instanceof URI)) {
2158 * return new Error(
2159 * 'Expected a string or an URI for ' + propName + ' in ' +
2160 * componentName
2161 * );
2162 * }
2163 * }
2164 * },
2165 * render: function() {...}
2166 * });
2167 *
2168 * @internal
2169 */
2170
2171 var ANONYMOUS = '<<anonymous>>';
2172
2173 // Important!
2174 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
2175 var ReactPropTypes = {
2176 array: createPrimitiveTypeChecker('array'),
2177 bool: createPrimitiveTypeChecker('boolean'),
2178 func: createPrimitiveTypeChecker('function'),
2179 number: createPrimitiveTypeChecker('number'),
2180 object: createPrimitiveTypeChecker('object'),
2181 string: createPrimitiveTypeChecker('string'),
2182 symbol: createPrimitiveTypeChecker('symbol'),
2183
2184 any: createAnyTypeChecker(),
2185 arrayOf: createArrayOfTypeChecker,
2186 element: createElementTypeChecker(),
2187 instanceOf: createInstanceTypeChecker,
2188 node: createNodeChecker(),
2189 objectOf: createObjectOfTypeChecker,
2190 oneOf: createEnumTypeChecker,
2191 oneOfType: createUnionTypeChecker,
2192 shape: createShapeTypeChecker
2193 };
2194
2195 /**
2196 * inlined Object.is polyfill to avoid requiring consumers ship their own
2197 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
2198 */
2199 /*eslint-disable no-self-compare*/
2200 function is(x, y) {
2201 // SameValue algorithm
2202 if (x === y) {
2203 // Steps 1-5, 7-10
2204 // Steps 6.b-6.e: +0 != -0
2205 return x !== 0 || 1 / x === 1 / y;
2206 } else {
2207 // Step 6.a: NaN == NaN
2208 return x !== x && y !== y;
2209 }
2210 }
2211 /*eslint-enable no-self-compare*/
2212
2213 /**
2214 * We use an Error-like object for backward compatibility as people may call
2215 * PropTypes directly and inspect their output. However, we don't use real
2216 * Errors anymore. We don't inspect their stack anyway, and creating them
2217 * is prohibitively expensive if they are created too often, such as what
2218 * happens in oneOfType() for any type before the one that matched.
2219 */
2220 function PropTypeError(message) {
2221 this.message = message;
2222 this.stack = '';
2223 }
2224 // Make `instanceof Error` still work for returned errors.
2225 PropTypeError.prototype = Error.prototype;
2226
2227 function createChainableTypeChecker(validate) {
2228 if (undefined !== 'production') {
2229 var manualPropTypeCallCache = {};
2230 var manualPropTypeWarningCount = 0;
2231 }
2232 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
2233 componentName = componentName || ANONYMOUS;
2234 propFullName = propFullName || propName;
2235
2236 if (secret !== ReactPropTypesSecret) {
2237 if (throwOnDirectAccess) {
2238 // New behavior only for users of `prop-types` package
2239 invariant(
2240 false,
2241 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
2242 'Use `PropTypes.checkPropTypes()` to call them. ' +
2243 'Read more at http://fb.me/use-check-prop-types'
2244 );
2245 } else if (undefined !== 'production' && typeof console !== 'undefined') {
2246 // Old behavior for people using React.PropTypes
2247 var cacheKey = componentName + ':' + propName;
2248 if (
2249 !manualPropTypeCallCache[cacheKey] &&
2250 // Avoid spamming the console because they are often not actionable except for lib authors
2251 manualPropTypeWarningCount < 3
2252 ) {
2253 warning(
2254 false,
2255 'You are manually calling a React.PropTypes validation ' +
2256 'function for the `%s` prop on `%s`. This is deprecated ' +
2257 'and will throw in the standalone `prop-types` package. ' +
2258 'You may be seeing this warning due to a third-party PropTypes ' +
2259 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
2260 propFullName,
2261 componentName
2262 );
2263 manualPropTypeCallCache[cacheKey] = true;
2264 manualPropTypeWarningCount++;
2265 }
2266 }
2267 }
2268 if (props[propName] == null) {
2269 if (isRequired) {
2270 if (props[propName] === null) {
2271 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
2272 }
2273 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
2274 }
2275 return null;
2276 } else {
2277 return validate(props, propName, componentName, location, propFullName);
2278 }
2279 }
2280
2281 var chainedCheckType = checkType.bind(null, false);
2282 chainedCheckType.isRequired = checkType.bind(null, true);
2283
2284 return chainedCheckType;
2285 }
2286
2287 function createPrimitiveTypeChecker(expectedType) {
2288 function validate(props, propName, componentName, location, propFullName, secret) {
2289 var propValue = props[propName];
2290 var propType = getPropType(propValue);
2291 if (propType !== expectedType) {
2292 // `propValue` being instance of, say, date/regexp, pass the 'object'
2293 // check, but we can offer a more precise error message here rather than
2294 // 'of type `object`'.
2295 var preciseType = getPreciseType(propValue);
2296
2297 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
2298 }
2299 return null;
2300 }
2301 return createChainableTypeChecker(validate);
2302 }
2303
2304 function createAnyTypeChecker() {
2305 return createChainableTypeChecker(emptyFunction.thatReturnsNull);
2306 }
2307
2308 function createArrayOfTypeChecker(typeChecker) {
2309 function validate(props, propName, componentName, location, propFullName) {
2310 if (typeof typeChecker !== 'function') {
2311 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
2312 }
2313 var propValue = props[propName];
2314 if (!Array.isArray(propValue)) {
2315 var propType = getPropType(propValue);
2316 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
2317 }
2318 for (var i = 0; i < propValue.length; i++) {
2319 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
2320 if (error instanceof Error) {
2321 return error;
2322 }
2323 }
2324 return null;
2325 }
2326 return createChainableTypeChecker(validate);
2327 }
2328
2329 function createElementTypeChecker() {
2330 function validate(props, propName, componentName, location, propFullName) {
2331 var propValue = props[propName];
2332 if (!isValidElement(propValue)) {
2333 var propType = getPropType(propValue);
2334 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
2335 }
2336 return null;
2337 }
2338 return createChainableTypeChecker(validate);
2339 }
2340
2341 function createInstanceTypeChecker(expectedClass) {
2342 function validate(props, propName, componentName, location, propFullName) {
2343 if (!(props[propName] instanceof expectedClass)) {
2344 var expectedClassName = expectedClass.name || ANONYMOUS;
2345 var actualClassName = getClassName(props[propName]);
2346 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
2347 }
2348 return null;
2349 }
2350 return createChainableTypeChecker(validate);
2351 }
2352
2353 function createEnumTypeChecker(expectedValues) {
2354 if (!Array.isArray(expectedValues)) {
2355 undefined !== 'production' ? warning(false, 'Invalid argument supplied to oneOf, expected an instance of array.') : void 0;
2356 return emptyFunction.thatReturnsNull;
2357 }
2358
2359 function validate(props, propName, componentName, location, propFullName) {
2360 var propValue = props[propName];
2361 for (var i = 0; i < expectedValues.length; i++) {
2362 if (is(propValue, expectedValues[i])) {
2363 return null;
2364 }
2365 }
2366
2367 var valuesString = JSON.stringify(expectedValues);
2368 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
2369 }
2370 return createChainableTypeChecker(validate);
2371 }
2372
2373 function createObjectOfTypeChecker(typeChecker) {
2374 function validate(props, propName, componentName, location, propFullName) {
2375 if (typeof typeChecker !== 'function') {
2376 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
2377 }
2378 var propValue = props[propName];
2379 var propType = getPropType(propValue);
2380 if (propType !== 'object') {
2381 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
2382 }
2383 for (var key in propValue) {
2384 if (propValue.hasOwnProperty(key)) {
2385 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2386 if (error instanceof Error) {
2387 return error;
2388 }
2389 }
2390 }
2391 return null;
2392 }
2393 return createChainableTypeChecker(validate);
2394 }
2395
2396 function createUnionTypeChecker(arrayOfTypeCheckers) {
2397 if (!Array.isArray(arrayOfTypeCheckers)) {
2398 undefined !== 'production' ? warning(false, 'Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
2399 return emptyFunction.thatReturnsNull;
2400 }
2401
2402 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2403 var checker = arrayOfTypeCheckers[i];
2404 if (typeof checker !== 'function') {
2405 warning(
2406 false,
2407 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
2408 'received %s at index %s.',
2409 getPostfixForTypeWarning(checker),
2410 i
2411 );
2412 return emptyFunction.thatReturnsNull;
2413 }
2414 }
2415
2416 function validate(props, propName, componentName, location, propFullName) {
2417 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
2418 var checker = arrayOfTypeCheckers[i];
2419 if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
2420 return null;
2421 }
2422 }
2423
2424 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
2425 }
2426 return createChainableTypeChecker(validate);
2427 }
2428
2429 function createNodeChecker() {
2430 function validate(props, propName, componentName, location, propFullName) {
2431 if (!isNode(props[propName])) {
2432 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
2433 }
2434 return null;
2435 }
2436 return createChainableTypeChecker(validate);
2437 }
2438
2439 function createShapeTypeChecker(shapeTypes) {
2440 function validate(props, propName, componentName, location, propFullName) {
2441 var propValue = props[propName];
2442 var propType = getPropType(propValue);
2443 if (propType !== 'object') {
2444 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
2445 }
2446 for (var key in shapeTypes) {
2447 var checker = shapeTypes[key];
2448 if (!checker) {
2449 continue;
2450 }
2451 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
2452 if (error) {
2453 return error;
2454 }
2455 }
2456 return null;
2457 }
2458 return createChainableTypeChecker(validate);
2459 }
2460
2461 function isNode(propValue) {
2462 switch (typeof propValue) {
2463 case 'number':
2464 case 'string':
2465 case 'undefined':
2466 return true;
2467 case 'boolean':
2468 return !propValue;
2469 case 'object':
2470 if (Array.isArray(propValue)) {
2471 return propValue.every(isNode);
2472 }
2473 if (propValue === null || isValidElement(propValue)) {
2474 return true;
2475 }
2476
2477 var iteratorFn = getIteratorFn(propValue);
2478 if (iteratorFn) {
2479 var iterator = iteratorFn.call(propValue);
2480 var step;
2481 if (iteratorFn !== propValue.entries) {
2482 while (!(step = iterator.next()).done) {
2483 if (!isNode(step.value)) {
2484 return false;
2485 }
2486 }
2487 } else {
2488 // Iterator will provide entry [k,v] tuples rather than values.
2489 while (!(step = iterator.next()).done) {
2490 var entry = step.value;
2491 if (entry) {
2492 if (!isNode(entry[1])) {
2493 return false;
2494 }
2495 }
2496 }
2497 }
2498 } else {
2499 return false;
2500 }
2501
2502 return true;
2503 default:
2504 return false;
2505 }
2506 }
2507
2508 function isSymbol(propType, propValue) {
2509 // Native Symbol.
2510 if (propType === 'symbol') {
2511 return true;
2512 }
2513
2514 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
2515 if (propValue['@@toStringTag'] === 'Symbol') {
2516 return true;
2517 }
2518
2519 // Fallback for non-spec compliant Symbols which are polyfilled.
2520 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
2521 return true;
2522 }
2523
2524 return false;
2525 }
2526
2527 // Equivalent of `typeof` but with special handling for array and regexp.
2528 function getPropType(propValue) {
2529 var propType = typeof propValue;
2530 if (Array.isArray(propValue)) {
2531 return 'array';
2532 }
2533 if (propValue instanceof RegExp) {
2534 // Old webkits (at least until Android 4.0) return 'function' rather than
2535 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
2536 // passes PropTypes.object.
2537 return 'object';
2538 }
2539 if (isSymbol(propType, propValue)) {
2540 return 'symbol';
2541 }
2542 return propType;
2543 }
2544
2545 // This handles more types than `getPropType`. Only used for error messages.
2546 // See `createPrimitiveTypeChecker`.
2547 function getPreciseType(propValue) {
2548 if (typeof propValue === 'undefined' || propValue === null) {
2549 return '' + propValue;
2550 }
2551 var propType = getPropType(propValue);
2552 if (propType === 'object') {
2553 if (propValue instanceof Date) {
2554 return 'date';
2555 } else if (propValue instanceof RegExp) {
2556 return 'regexp';
2557 }
2558 }
2559 return propType;
2560 }
2561
2562 // Returns a string that is postfixed to a warning about an invalid type.
2563 // For example, "undefined" or "of type array"
2564 function getPostfixForTypeWarning(value) {
2565 var type = getPreciseType(value);
2566 switch (type) {
2567 case 'array':
2568 case 'object':
2569 return 'an ' + type;
2570 case 'boolean':
2571 case 'date':
2572 case 'regexp':
2573 return 'a ' + type;
2574 default:
2575 return type;
2576 }
2577 }
2578
2579 // Returns class name of the object, if any.
2580 function getClassName(propValue) {
2581 if (!propValue.constructor || !propValue.constructor.name) {
2582 return ANONYMOUS;
2583 }
2584 return propValue.constructor.name;
2585 }
2586
2587 ReactPropTypes.checkPropTypes = checkPropTypes;
2588 ReactPropTypes.PropTypes = ReactPropTypes;
2589
2590 return ReactPropTypes;
2591};
2592
2593
2594/***/ }),
2595/* 56 */
2596/***/ (function(module, exports, __webpack_require__) {
2597
2598"use strict";
2599/**
2600 * Copyright 2013-present, Facebook, Inc.
2601 * All rights reserved.
2602 *
2603 * This source code is licensed under the BSD-style license found in the
2604 * LICENSE file in the root directory of this source tree. An additional grant
2605 * of patent rights can be found in the PATENTS file in the same directory.
2606 */
2607
2608
2609
2610if (undefined !== 'production') {
2611 var invariant = __webpack_require__(19);
2612 var warning = __webpack_require__(31);
2613 var ReactPropTypesSecret = __webpack_require__(20);
2614 var loggedTypeFailures = {};
2615}
2616
2617/**
2618 * Assert that the values match with the type specs.
2619 * Error messages are memorized and will only be shown once.
2620 *
2621 * @param {object} typeSpecs Map of name to a ReactPropType
2622 * @param {object} values Runtime values that need to be type-checked
2623 * @param {string} location e.g. "prop", "context", "child context"
2624 * @param {string} componentName Name of the component for error messages.
2625 * @param {?Function} getStack Returns the component stack.
2626 * @private
2627 */
2628function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
2629 if (undefined !== 'production') {
2630 for (var typeSpecName in typeSpecs) {
2631 if (typeSpecs.hasOwnProperty(typeSpecName)) {
2632 var error;
2633 // Prop type validation may throw. In case they do, we don't want to
2634 // fail the render phase where it didn't fail before. So we log it.
2635 // After these have been cleaned up, we'll let them throw.
2636 try {
2637 // This is intentionally an invariant that gets caught. It's the same
2638 // behavior as without this statement except with a better message.
2639 invariant(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', componentName || 'React class', location, typeSpecName);
2640 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
2641 } catch (ex) {
2642 error = ex;
2643 }
2644 warning(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
2645 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
2646 // Only monitor this failure once because there tends to be a lot of the
2647 // same error.
2648 loggedTypeFailures[error.message] = true;
2649
2650 var stack = getStack ? getStack() : '';
2651
2652 warning(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
2653 }
2654 }
2655 }
2656 }
2657}
2658
2659module.exports = checkPropTypes;
2660
2661
2662/***/ }),
2663/* 57 */
2664/***/ (function(module, exports, __webpack_require__) {
2665
2666"use strict";
2667/**
2668 * Copyright 2013-present, Facebook, Inc.
2669 * All rights reserved.
2670 *
2671 * This source code is licensed under the BSD-style license found in the
2672 * LICENSE file in the root directory of this source tree. An additional grant
2673 * of patent rights can be found in the PATENTS file in the same directory.
2674 */
2675
2676
2677
2678var emptyFunction = __webpack_require__(18);
2679var invariant = __webpack_require__(19);
2680var ReactPropTypesSecret = __webpack_require__(20);
2681
2682module.exports = function() {
2683 function shim(props, propName, componentName, location, propFullName, secret) {
2684 if (secret === ReactPropTypesSecret) {
2685 // It is still safe when called from React.
2686 return;
2687 }
2688 invariant(
2689 false,
2690 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
2691 'Use PropTypes.checkPropTypes() to call them. ' +
2692 'Read more at http://fb.me/use-check-prop-types'
2693 );
2694 };
2695 shim.isRequired = shim;
2696 function getShim() {
2697 return shim;
2698 };
2699 // Important!
2700 // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
2701 var ReactPropTypes = {
2702 array: shim,
2703 bool: shim,
2704 func: shim,
2705 number: shim,
2706 object: shim,
2707 string: shim,
2708 symbol: shim,
2709
2710 any: shim,
2711 arrayOf: getShim,
2712 element: shim,
2713 instanceOf: getShim,
2714 node: shim,
2715 objectOf: getShim,
2716 oneOf: getShim,
2717 oneOfType: getShim,
2718 shape: getShim
2719 };
2720
2721 ReactPropTypes.checkPropTypes = emptyFunction;
2722 ReactPropTypes.PropTypes = ReactPropTypes;
2723
2724 return ReactPropTypes;
2725};
2726
2727
2728/***/ }),
2729/* 58 */
2730/***/ (function(module, exports, __webpack_require__) {
2731
2732var _curry1 = __webpack_require__(2);
2733var _isArray = __webpack_require__(24);
2734var _isString = __webpack_require__(33);
2735
2736
2737/**
2738 * Tests whether or not an object is similar to an array.
2739 *
2740 * @private
2741 * @category Type
2742 * @category List
2743 * @sig * -> Boolean
2744 * @param {*} x The object to test.
2745 * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.
2746 * @example
2747 *
2748 * _isArrayLike([]); //=> true
2749 * _isArrayLike(true); //=> false
2750 * _isArrayLike({}); //=> false
2751 * _isArrayLike({length: 10}); //=> false
2752 * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true
2753 */
2754module.exports = _curry1(function isArrayLike(x) {
2755 if (_isArray(x)) { return true; }
2756 if (!x) { return false; }
2757 if (typeof x !== 'object') { return false; }
2758 if (_isString(x)) { return false; }
2759 if (x.nodeType === 1) { return !!x.length; }
2760 if (x.length === 0) { return true; }
2761 if (x.length > 0) {
2762 return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);
2763 }
2764 return false;
2765});
2766
2767
2768/***/ }),
2769/* 59 */
2770/***/ (function(module, exports) {
2771
2772module.exports = (function() {
2773 function XWrap(fn) {
2774 this.f = fn;
2775 }
2776 XWrap.prototype['@@transducer/init'] = function() {
2777 throw new Error('init not implemented on XWrap');
2778 };
2779 XWrap.prototype['@@transducer/result'] = function(acc) { return acc; };
2780 XWrap.prototype['@@transducer/step'] = function(acc, x) {
2781 return this.f(acc, x);
2782 };
2783
2784 return function _xwrap(fn) { return new XWrap(fn); };
2785}());
2786
2787
2788/***/ }),
2789/* 60 */
2790/***/ (function(module, exports, __webpack_require__) {
2791
2792var _arity = __webpack_require__(6);
2793var _curry2 = __webpack_require__(0);
2794
2795
2796/**
2797 * Creates a function that is bound to a context.
2798 * Note: `R.bind` does not provide the additional argument-binding capabilities of
2799 * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).
2800 *
2801 * @func
2802 * @memberOf R
2803 * @since v0.6.0
2804 * @category Function
2805 * @category Object
2806 * @sig (* -> *) -> {*} -> (* -> *)
2807 * @param {Function} fn The function to bind to context
2808 * @param {Object} thisObj The context to bind `fn` to
2809 * @return {Function} A function that will execute in the context of `thisObj`.
2810 * @see R.partial
2811 * @example
2812 *
2813 * var log = R.bind(console.log, console);
2814 * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}
2815 * // logs {a: 2}
2816 * @symb R.bind(f, o)(a, b) = f.call(o, a, b)
2817 */
2818module.exports = _curry2(function bind(fn, thisObj) {
2819 return _arity(fn.length, function() {
2820 return fn.apply(thisObj, arguments);
2821 });
2822});
2823
2824
2825/***/ }),
2826/* 61 */
2827/***/ (function(module, exports, __webpack_require__) {
2828
2829var _has = __webpack_require__(7);
2830
2831
2832module.exports = (function() {
2833 var toString = Object.prototype.toString;
2834 return toString.call(arguments) === '[object Arguments]' ?
2835 function _isArguments(x) { return toString.call(x) === '[object Arguments]'; } :
2836 function _isArguments(x) { return _has('callee', x); };
2837}());
2838
2839
2840/***/ }),
2841/* 62 */
2842/***/ (function(module, exports, __webpack_require__) {
2843
2844var _curry1 = __webpack_require__(2);
2845var _isNumber = __webpack_require__(63);
2846
2847
2848/**
2849 * Returns the number of elements in the array by returning `list.length`.
2850 *
2851 * @func
2852 * @memberOf R
2853 * @since v0.3.0
2854 * @category List
2855 * @sig [a] -> Number
2856 * @param {Array} list The array to inspect.
2857 * @return {Number} The length of the array.
2858 * @example
2859 *
2860 * R.length([]); //=> 0
2861 * R.length([1, 2, 3]); //=> 3
2862 */
2863module.exports = _curry1(function length(list) {
2864 return list != null && _isNumber(list.length) ? list.length : NaN;
2865});
2866
2867
2868/***/ }),
2869/* 63 */
2870/***/ (function(module, exports) {
2871
2872module.exports = function _isNumber(x) {
2873 return Object.prototype.toString.call(x) === '[object Number]';
2874};
2875
2876
2877/***/ }),
2878/* 64 */
2879/***/ (function(module, exports, __webpack_require__) {
2880
2881var _arity = __webpack_require__(6);
2882var _pipe = __webpack_require__(65);
2883var reduce = __webpack_require__(32);
2884var tail = __webpack_require__(66);
2885
2886
2887/**
2888 * Performs left-to-right function composition. The leftmost function may have
2889 * any arity; the remaining functions must be unary.
2890 *
2891 * In some libraries this function is named `sequence`.
2892 *
2893 * **Note:** The result of pipe is not automatically curried.
2894 *
2895 * @func
2896 * @memberOf R
2897 * @since v0.1.0
2898 * @category Function
2899 * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z)
2900 * @param {...Function} functions
2901 * @return {Function}
2902 * @see R.compose
2903 * @example
2904 *
2905 * var f = R.pipe(Math.pow, R.negate, R.inc);
2906 *
2907 * f(3, 4); // -(3^4) + 1
2908 * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b)))
2909 */
2910module.exports = function pipe() {
2911 if (arguments.length === 0) {
2912 throw new Error('pipe requires at least one argument');
2913 }
2914 return _arity(arguments[0].length,
2915 reduce(_pipe, arguments[0], tail(arguments)));
2916};
2917
2918
2919/***/ }),
2920/* 65 */
2921/***/ (function(module, exports) {
2922
2923module.exports = function _pipe(f, g) {
2924 return function() {
2925 return g.call(this, f.apply(this, arguments));
2926 };
2927};
2928
2929
2930/***/ }),
2931/* 66 */
2932/***/ (function(module, exports, __webpack_require__) {
2933
2934var _checkForMethod = __webpack_require__(35);
2935var _curry1 = __webpack_require__(2);
2936var slice = __webpack_require__(67);
2937
2938
2939/**
2940 * Returns all but the first element of the given list or string (or object
2941 * with a `tail` method).
2942 *
2943 * Dispatches to the `slice` method of the first argument, if present.
2944 *
2945 * @func
2946 * @memberOf R
2947 * @since v0.1.0
2948 * @category List
2949 * @sig [a] -> [a]
2950 * @sig String -> String
2951 * @param {*} list
2952 * @return {*}
2953 * @see R.head, R.init, R.last
2954 * @example
2955 *
2956 * R.tail([1, 2, 3]); //=> [2, 3]
2957 * R.tail([1, 2]); //=> [2]
2958 * R.tail([1]); //=> []
2959 * R.tail([]); //=> []
2960 *
2961 * R.tail('abc'); //=> 'bc'
2962 * R.tail('ab'); //=> 'b'
2963 * R.tail('a'); //=> ''
2964 * R.tail(''); //=> ''
2965 */
2966module.exports = _curry1(_checkForMethod('tail', slice(1, Infinity)));
2967
2968
2969/***/ }),
2970/* 67 */
2971/***/ (function(module, exports, __webpack_require__) {
2972
2973var _checkForMethod = __webpack_require__(35);
2974var _curry3 = __webpack_require__(14);
2975
2976
2977/**
2978 * Returns the elements of the given list or string (or object with a `slice`
2979 * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).
2980 *
2981 * Dispatches to the `slice` method of the third argument, if present.
2982 *
2983 * @func
2984 * @memberOf R
2985 * @since v0.1.4
2986 * @category List
2987 * @sig Number -> Number -> [a] -> [a]
2988 * @sig Number -> Number -> String -> String
2989 * @param {Number} fromIndex The start index (inclusive).
2990 * @param {Number} toIndex The end index (exclusive).
2991 * @param {*} list
2992 * @return {*}
2993 * @example
2994 *
2995 * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c']
2996 * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']
2997 * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c']
2998 * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c']
2999 * R.slice(0, 3, 'ramda'); //=> 'ram'
3000 */
3001module.exports = _curry3(_checkForMethod('slice', function slice(fromIndex, toIndex, list) {
3002 return Array.prototype.slice.call(list, fromIndex, toIndex);
3003}));
3004
3005
3006/***/ }),
3007/* 68 */
3008/***/ (function(module, exports, __webpack_require__) {
3009
3010var _curry1 = __webpack_require__(2);
3011var _isString = __webpack_require__(33);
3012
3013
3014/**
3015 * Returns a new list or string with the elements or characters in reverse
3016 * order.
3017 *
3018 * @func
3019 * @memberOf R
3020 * @since v0.1.0
3021 * @category List
3022 * @sig [a] -> [a]
3023 * @sig String -> String
3024 * @param {Array|String} list
3025 * @return {Array|String}
3026 * @example
3027 *
3028 * R.reverse([1, 2, 3]); //=> [3, 2, 1]
3029 * R.reverse([1, 2]); //=> [2, 1]
3030 * R.reverse([1]); //=> [1]
3031 * R.reverse([]); //=> []
3032 *
3033 * R.reverse('abc'); //=> 'cba'
3034 * R.reverse('ab'); //=> 'ba'
3035 * R.reverse('a'); //=> 'a'
3036 * R.reverse(''); //=> ''
3037 */
3038module.exports = _curry1(function reverse(list) {
3039 return _isString(list) ? list.split('').reverse().join('') :
3040 Array.prototype.slice.call(list, 0).reverse();
3041});
3042
3043
3044/***/ }),
3045/* 69 */
3046/***/ (function(module, exports, __webpack_require__) {
3047
3048"use strict";
3049
3050
3051exports.__esModule = true;
3052exports.toUpdate = undefined;
3053
3054var _omit = __webpack_require__(25);
3055
3056var _omit2 = _interopRequireDefault(_omit);
3057
3058function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3059
3060var FORM_PROPS = ['name', 'persistent', 'withRef',
3061// state
3062'_form', '_values', '_valid', '_submitting',
3063// actions
3064'_addForm', '_removeForm', '_touchAll', '_submitStart', '_submitStop'];
3065var formProps = function formProps(props) {
3066 return (0, _omit2.default)(FORM_PROPS, props);
3067};
3068exports.default = formProps;
3069
3070var NOT_TO_UPDATE = ['_values', '_valid', '_submitting'];
3071var toUpdate = exports.toUpdate = function toUpdate(all) {
3072 return (0, _omit2.default)(NOT_TO_UPDATE, all);
3073};
3074
3075/***/ }),
3076/* 70 */
3077/***/ (function(module, exports, __webpack_require__) {
3078
3079var equals = __webpack_require__(71);
3080
3081
3082module.exports = function _indexOf(list, a, idx) {
3083 var inf, item;
3084 // Array.prototype.indexOf doesn't exist below IE9
3085 if (typeof list.indexOf === 'function') {
3086 switch (typeof a) {
3087 case 'number':
3088 if (a === 0) {
3089 // manually crawl the list to distinguish between +0 and -0
3090 inf = 1 / a;
3091 while (idx < list.length) {
3092 item = list[idx];
3093 if (item === 0 && 1 / item === inf) {
3094 return idx;
3095 }
3096 idx += 1;
3097 }
3098 return -1;
3099 } else if (a !== a) {
3100 // NaN
3101 while (idx < list.length) {
3102 item = list[idx];
3103 if (typeof item === 'number' && item !== item) {
3104 return idx;
3105 }
3106 idx += 1;
3107 }
3108 return -1;
3109 }
3110 // non-zero numbers can utilise Set
3111 return list.indexOf(a, idx);
3112
3113 // all these types can utilise Set
3114 case 'string':
3115 case 'boolean':
3116 case 'function':
3117 case 'undefined':
3118 return list.indexOf(a, idx);
3119
3120 case 'object':
3121 if (a === null) {
3122 // null can utilise Set
3123 return list.indexOf(a, idx);
3124 }
3125 }
3126 }
3127 // anything else not covered above, defer to R.equals
3128 while (idx < list.length) {
3129 if (equals(list[idx], a)) {
3130 return idx;
3131 }
3132 idx += 1;
3133 }
3134 return -1;
3135};
3136
3137
3138/***/ }),
3139/* 71 */
3140/***/ (function(module, exports, __webpack_require__) {
3141
3142var _curry2 = __webpack_require__(0);
3143var _equals = __webpack_require__(72);
3144
3145
3146/**
3147 * Returns `true` if its arguments are equivalent, `false` otherwise. Handles
3148 * cyclical data structures.
3149 *
3150 * Dispatches symmetrically to the `equals` methods of both arguments, if
3151 * present.
3152 *
3153 * @func
3154 * @memberOf R
3155 * @since v0.15.0
3156 * @category Relation
3157 * @sig a -> b -> Boolean
3158 * @param {*} a
3159 * @param {*} b
3160 * @return {Boolean}
3161 * @example
3162 *
3163 * R.equals(1, 1); //=> true
3164 * R.equals(1, '1'); //=> false
3165 * R.equals([1, 2, 3], [1, 2, 3]); //=> true
3166 *
3167 * var a = {}; a.v = a;
3168 * var b = {}; b.v = b;
3169 * R.equals(a, b); //=> true
3170 */
3171module.exports = _curry2(function equals(a, b) {
3172 return _equals(a, b, [], []);
3173});
3174
3175
3176/***/ }),
3177/* 72 */
3178/***/ (function(module, exports, __webpack_require__) {
3179
3180var _arrayFromIterator = __webpack_require__(73);
3181var _functionName = __webpack_require__(74);
3182var _has = __webpack_require__(7);
3183var identical = __webpack_require__(75);
3184var keys = __webpack_require__(5);
3185var type = __webpack_require__(76);
3186
3187
3188module.exports = function _equals(a, b, stackA, stackB) {
3189 if (identical(a, b)) {
3190 return true;
3191 }
3192
3193 if (type(a) !== type(b)) {
3194 return false;
3195 }
3196
3197 if (a == null || b == null) {
3198 return false;
3199 }
3200
3201 if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {
3202 return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) &&
3203 typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);
3204 }
3205
3206 if (typeof a.equals === 'function' || typeof b.equals === 'function') {
3207 return typeof a.equals === 'function' && a.equals(b) &&
3208 typeof b.equals === 'function' && b.equals(a);
3209 }
3210
3211 switch (type(a)) {
3212 case 'Arguments':
3213 case 'Array':
3214 case 'Object':
3215 if (typeof a.constructor === 'function' &&
3216 _functionName(a.constructor) === 'Promise') {
3217 return a === b;
3218 }
3219 break;
3220 case 'Boolean':
3221 case 'Number':
3222 case 'String':
3223 if (!(typeof a === typeof b && identical(a.valueOf(), b.valueOf()))) {
3224 return false;
3225 }
3226 break;
3227 case 'Date':
3228 if (!identical(a.valueOf(), b.valueOf())) {
3229 return false;
3230 }
3231 break;
3232 case 'Error':
3233 return a.name === b.name && a.message === b.message;
3234 case 'RegExp':
3235 if (!(a.source === b.source &&
3236 a.global === b.global &&
3237 a.ignoreCase === b.ignoreCase &&
3238 a.multiline === b.multiline &&
3239 a.sticky === b.sticky &&
3240 a.unicode === b.unicode)) {
3241 return false;
3242 }
3243 break;
3244 case 'Map':
3245 case 'Set':
3246 if (!_equals(_arrayFromIterator(a.entries()), _arrayFromIterator(b.entries()), stackA, stackB)) {
3247 return false;
3248 }
3249 break;
3250 case 'Int8Array':
3251 case 'Uint8Array':
3252 case 'Uint8ClampedArray':
3253 case 'Int16Array':
3254 case 'Uint16Array':
3255 case 'Int32Array':
3256 case 'Uint32Array':
3257 case 'Float32Array':
3258 case 'Float64Array':
3259 break;
3260 case 'ArrayBuffer':
3261 break;
3262 default:
3263 // Values of other types are only equal if identical.
3264 return false;
3265 }
3266
3267 var keysA = keys(a);
3268 if (keysA.length !== keys(b).length) {
3269 return false;
3270 }
3271
3272 var idx = stackA.length - 1;
3273 while (idx >= 0) {
3274 if (stackA[idx] === a) {
3275 return stackB[idx] === b;
3276 }
3277 idx -= 1;
3278 }
3279
3280 stackA.push(a);
3281 stackB.push(b);
3282 idx = keysA.length - 1;
3283 while (idx >= 0) {
3284 var key = keysA[idx];
3285 if (!(_has(key, b) && _equals(b[key], a[key], stackA, stackB))) {
3286 return false;
3287 }
3288 idx -= 1;
3289 }
3290 stackA.pop();
3291 stackB.pop();
3292 return true;
3293};
3294
3295
3296/***/ }),
3297/* 73 */
3298/***/ (function(module, exports) {
3299
3300module.exports = function _arrayFromIterator(iter) {
3301 var list = [];
3302 var next;
3303 while (!(next = iter.next()).done) {
3304 list.push(next.value);
3305 }
3306 return list;
3307};
3308
3309
3310/***/ }),
3311/* 74 */
3312/***/ (function(module, exports) {
3313
3314module.exports = function _functionName(f) {
3315 // String(x => x) evaluates to "x => x", so the pattern may not match.
3316 var match = String(f).match(/^function (\w*)/);
3317 return match == null ? '' : match[1];
3318};
3319
3320
3321/***/ }),
3322/* 75 */
3323/***/ (function(module, exports, __webpack_require__) {
3324
3325var _curry2 = __webpack_require__(0);
3326
3327
3328/**
3329 * Returns true if its arguments are identical, false otherwise. Values are
3330 * identical if they reference the same memory. `NaN` is identical to `NaN`;
3331 * `0` and `-0` are not identical.
3332 *
3333 * @func
3334 * @memberOf R
3335 * @since v0.15.0
3336 * @category Relation
3337 * @sig a -> a -> Boolean
3338 * @param {*} a
3339 * @param {*} b
3340 * @return {Boolean}
3341 * @example
3342 *
3343 * var o = {};
3344 * R.identical(o, o); //=> true
3345 * R.identical(1, 1); //=> true
3346 * R.identical(1, '1'); //=> false
3347 * R.identical([], []); //=> false
3348 * R.identical(0, -0); //=> false
3349 * R.identical(NaN, NaN); //=> true
3350 */
3351module.exports = _curry2(function identical(a, b) {
3352 // SameValue algorithm
3353 if (a === b) { // Steps 1-5, 7-10
3354 // Steps 6.b-6.e: +0 != -0
3355 return a !== 0 || 1 / a === 1 / b;
3356 } else {
3357 // Step 6.a: NaN == NaN
3358 return a !== a && b !== b;
3359 }
3360});
3361
3362
3363/***/ }),
3364/* 76 */
3365/***/ (function(module, exports, __webpack_require__) {
3366
3367var _curry1 = __webpack_require__(2);
3368
3369
3370/**
3371 * Gives a single-word string description of the (native) type of a value,
3372 * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not
3373 * attempt to distinguish user Object types any further, reporting them all as
3374 * 'Object'.
3375 *
3376 * @func
3377 * @memberOf R
3378 * @since v0.8.0
3379 * @category Type
3380 * @sig (* -> {*}) -> String
3381 * @param {*} val The value to test
3382 * @return {String}
3383 * @example
3384 *
3385 * R.type({}); //=> "Object"
3386 * R.type(1); //=> "Number"
3387 * R.type(false); //=> "Boolean"
3388 * R.type('s'); //=> "String"
3389 * R.type(null); //=> "Null"
3390 * R.type([]); //=> "Array"
3391 * R.type(/[A-z]/); //=> "RegExp"
3392 * R.type(() => {}); //=> "Function"
3393 */
3394module.exports = _curry1(function type(val) {
3395 return val === null ? 'Null' :
3396 val === undefined ? 'Undefined' :
3397 Object.prototype.toString.call(val).slice(8, -1);
3398});
3399
3400
3401/***/ }),
3402/* 77 */
3403/***/ (function(module, exports, __webpack_require__) {
3404
3405"use strict";
3406
3407
3408exports.__esModule = true;
3409var ADD_FORM = exports.ADD_FORM = '@@redux-forms/ADD_FORM';
3410var REMOVE_FORM = exports.REMOVE_FORM = '@@redux-forms/REMOVE_FORM';
3411var ADD_FIELD = exports.ADD_FIELD = '@@redux-forms/ADD_FIELD';
3412var REMOVE_FIELD = exports.REMOVE_FIELD = '@@redux-forms/REMOVE_FIELD';
3413var TOUCH_ALL = exports.TOUCH_ALL = '@@redux-forms/TOUCH_ALL';
3414var SUBMIT_START = exports.SUBMIT_START = '@@redux-forms/SUBMIT_START';
3415var SUBMIT_STOP = exports.SUBMIT_STOP = '@@redux-forms/SUBMIT_STOP';
3416var ADD_ARRAY = exports.ADD_ARRAY = '@@redux-forms/ADD_ARRAY';
3417var REMOVE_ARRAY = exports.REMOVE_ARRAY = '@@redux-forms/REMOVE_ARRAY';
3418var ARRAY_PUSH = exports.ARRAY_PUSH = '@@redux-forms/ARRAY_PUSH';
3419var ARRAY_POP = exports.ARRAY_POP = '@@redux-forms/ARRAY_POP';
3420var ARRAY_UNSHIFT = exports.ARRAY_UNSHIFT = '@@redux-forms/ARRAY_UNSHIFT';
3421var ARRAY_SHIFT = exports.ARRAY_SHIFT = '@@redux-forms/ARRAY_SHIFT';
3422var ARRAY_INSERT = exports.ARRAY_INSERT = '@@redux-forms/ARRAY_INSERT';
3423var ARRAY_REMOVE = exports.ARRAY_REMOVE = '@@redux-forms/ARRAY_REMOVE';
3424var ARRAY_SWAP = exports.ARRAY_SWAP = '@@redux-forms/ARRAY_SWAP';
3425var ARRAY_MOVE = exports.ARRAY_MOVE = '@@redux-forms/ARRAY_MOVE';
3426var FIELD_CHANGE = exports.FIELD_CHANGE = '@@redux-forms/FIELD_CHANGE';
3427var FIELD_FOCUS = exports.FIELD_FOCUS = '@@redux-forms/FIELD_FOCUS';
3428var FIELD_BLUR = exports.FIELD_BLUR = '@@redux-forms/FIELD_BLUR';
3429var FIELD_VALUE = exports.FIELD_VALUE = '@@redux-forms/FIELD_VALUE';
3430var FIELD_ERROR = exports.FIELD_ERROR = '@@redux-forms/FIELD_ERROR';
3431var FIELD_DIRTY = exports.FIELD_DIRTY = '@@redux-forms/FIELD_DIRTY';
3432var addForm = exports.addForm = function addForm(name) {
3433 return {
3434 type: ADD_FORM,
3435 payload: { name: name }
3436 };
3437};
3438var removeForm = exports.removeForm = function removeForm(name) {
3439 return {
3440 type: REMOVE_FORM,
3441 payload: { name: name }
3442 };
3443};
3444var addField = exports.addField = function addField(form, id, field) {
3445 return {
3446 type: ADD_FIELD,
3447 payload: { form: form, id: id, field: field }
3448 };
3449};
3450var removeField = exports.removeField = function removeField(form, id) {
3451 return {
3452 type: REMOVE_FIELD,
3453 payload: { form: form, id: id }
3454 };
3455};
3456var touchAll = exports.touchAll = function touchAll(form) {
3457 return {
3458 type: TOUCH_ALL,
3459 payload: { form: form }
3460 };
3461};
3462var submitStart = exports.submitStart = function submitStart(form) {
3463 return {
3464 type: SUBMIT_START,
3465 payload: { form: form }
3466 };
3467};
3468var submitStop = exports.submitStop = function submitStop(form) {
3469 return {
3470 type: SUBMIT_STOP,
3471 payload: { form: form }
3472 };
3473};
3474var addArray = exports.addArray = function addArray(form, id) {
3475 return {
3476 type: ADD_ARRAY,
3477 payload: { form: form, id: id }
3478 };
3479};
3480var removeArray = exports.removeArray = function removeArray(form, id) {
3481 return {
3482 type: REMOVE_ARRAY,
3483 payload: { form: form, id: id }
3484 };
3485};
3486var arrayPush = exports.arrayPush = function arrayPush(form, id) {
3487 return {
3488 type: ARRAY_PUSH,
3489 payload: { form: form, id: id }
3490 };
3491};
3492var arrayPop = exports.arrayPop = function arrayPop(form, id) {
3493 return {
3494 type: ARRAY_POP,
3495 payload: { form: form, id: id }
3496 };
3497};
3498var arrayUnshift = exports.arrayUnshift = function arrayUnshift(form, id) {
3499 return {
3500 type: ARRAY_UNSHIFT,
3501 payload: { form: form, id: id }
3502 };
3503};
3504var arrayShift = exports.arrayShift = function arrayShift(form, id) {
3505 return {
3506 type: ARRAY_SHIFT,
3507 payload: { form: form, id: id }
3508 };
3509};
3510var arrayInsert = exports.arrayInsert = function arrayInsert(form, id, index) {
3511 return {
3512 type: ARRAY_INSERT,
3513 payload: { form: form, id: id, index: index }
3514 };
3515};
3516var arrayRemove = exports.arrayRemove = function arrayRemove(form, id, index) {
3517 return {
3518 type: ARRAY_REMOVE,
3519 payload: { form: form, id: id, index: index }
3520 };
3521};
3522var arraySwap = exports.arraySwap = function arraySwap(form, id, index1, index2) {
3523 return {
3524 type: ARRAY_SWAP,
3525 payload: { form: form, id: id, index1: index1, index2: index2 }
3526 };
3527};
3528var arrayMove = exports.arrayMove = function arrayMove(form, id, from, to) {
3529 return {
3530 type: ARRAY_MOVE,
3531 payload: { form: form, id: id, from: from, to: to }
3532 };
3533};
3534var fieldChange = exports.fieldChange = function fieldChange(form, field, value, error, dirty) {
3535 return {
3536 type: FIELD_CHANGE,
3537 payload: { form: form, field: field, value: value, error: error, dirty: dirty }
3538 };
3539};
3540var fieldFocus = exports.fieldFocus = function fieldFocus(form, field) {
3541 return {
3542 type: FIELD_FOCUS,
3543 payload: { form: form, field: field }
3544 };
3545};
3546var fieldBlur = exports.fieldBlur = function fieldBlur(form, field, value, error, dirty) {
3547 return {
3548 type: FIELD_BLUR,
3549 payload: { form: form, field: field, value: value, error: error, dirty: dirty }
3550 };
3551};
3552var fieldValue = exports.fieldValue = function fieldValue(form, field, value) {
3553 return {
3554 type: FIELD_VALUE,
3555 payload: { form: form, field: field, value: value }
3556 };
3557};
3558var fieldError = exports.fieldError = function fieldError(form, field, error) {
3559 return {
3560 type: FIELD_ERROR,
3561 payload: { form: form, field: field, error: error }
3562 };
3563};
3564var fieldDirty = exports.fieldDirty = function fieldDirty(form, field, dirty) {
3565 return {
3566 type: FIELD_DIRTY,
3567 payload: { form: form, field: field, dirty: dirty }
3568 };
3569};
3570
3571/***/ }),
3572/* 78 */
3573/***/ (function(module, exports, __webpack_require__) {
3574
3575module.exports = __webpack_require__(79);
3576
3577
3578/***/ }),
3579/* 79 */
3580/***/ (function(module, exports, __webpack_require__) {
3581
3582"use strict";
3583
3584
3585exports.__esModule = true;
3586
3587var _any = __webpack_require__(37);
3588
3589var _any2 = _interopRequireDefault(_any);
3590
3591var _none = __webpack_require__(82);
3592
3593var _none2 = _interopRequireDefault(_none);
3594
3595var _values = __webpack_require__(83);
3596
3597var _values2 = _interopRequireDefault(_values);
3598
3599var _path = __webpack_require__(84);
3600
3601var _path2 = _interopRequireDefault(_path);
3602
3603var _prop = __webpack_require__(22);
3604
3605var _prop2 = _interopRequireDefault(_prop);
3606
3607var _map = __webpack_require__(40);
3608
3609var _map2 = _interopRequireDefault(_map);
3610
3611var _compose = __webpack_require__(34);
3612
3613var _compose2 = _interopRequireDefault(_compose);
3614
3615var _memoize = __webpack_require__(88);
3616
3617var _memoize2 = _interopRequireDefault(_memoize);
3618
3619exports.getValues = getValues;
3620exports.getErrors = getErrors;
3621exports.isValid = isValid;
3622exports.isTouched = isTouched;
3623exports.isDirty = isDirty;
3624exports.isSubmitting = isSubmitting;
3625
3626var _helpers = __webpack_require__(4);
3627
3628function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3629
3630var EMPTY = {};
3631var memUnflatten = (0, _memoize2.default)(_helpers.unflatten);
3632var memValue = (0, _memoize2.default)((0, _compose2.default)(memUnflatten, (0, _map2.default)((0, _prop2.default)('value'))));
3633function getValues(name, state) {
3634 var form = (0, _path2.default)(['reduxForms', name], state);
3635 if (!form) {
3636 return EMPTY;
3637 }
3638 return memValue(form.fields);
3639}
3640var memError = (0, _memoize2.default)((0, _compose2.default)(memUnflatten, (0, _map2.default)((0, _prop2.default)('error'))));
3641function getErrors(name, state) {
3642 var form = (0, _path2.default)(['reduxForms', name], state);
3643 if (!form) {
3644 return EMPTY;
3645 }
3646 return memError(form.fields);
3647}
3648var memValues = (0, _memoize2.default)(_values2.default);
3649var memValid = (0, _memoize2.default)((0, _compose2.default)((0, _none2.default)(Boolean), memValues, (0, _map2.default)((0, _prop2.default)('error'))));
3650function isValid(name, state) {
3651 var form = (0, _path2.default)(['reduxForms', name], state);
3652 if (!form) {
3653 return false;
3654 }
3655 return memValid(form.fields);
3656}
3657var memTouched = (0, _memoize2.default)((0, _compose2.default)((0, _any2.default)(Boolean), memValues, (0, _map2.default)((0, _prop2.default)('touched'))));
3658function isTouched(name, state) {
3659 var form = (0, _path2.default)(['reduxForms', name], state);
3660 if (!form) {
3661 return false;
3662 }
3663 return memTouched(form.fields);
3664}
3665var memDirty = (0, _memoize2.default)((0, _compose2.default)((0, _any2.default)(Boolean), memValues, (0, _map2.default)((0, _prop2.default)('dirty'))));
3666function isDirty(name, state) {
3667 var form = (0, _path2.default)(['reduxForms', name], state);
3668 if (!form) {
3669 return false;
3670 }
3671 return memDirty(form.fields);
3672}
3673function isSubmitting(name, state) {
3674 var form = (0, _path2.default)(['reduxForms', name], state);
3675 if (!form) {
3676 return false;
3677 }
3678 return form.submitting;
3679}
3680
3681/***/ }),
3682/* 80 */
3683/***/ (function(module, exports) {
3684
3685module.exports = function _isTransformer(obj) {
3686 return typeof obj['@@transducer/step'] === 'function';
3687};
3688
3689
3690/***/ }),
3691/* 81 */
3692/***/ (function(module, exports) {
3693
3694module.exports = function _reduced(x) {
3695 return x && x['@@transducer/reduced'] ? x :
3696 {
3697 '@@transducer/value': x,
3698 '@@transducer/reduced': true
3699 };
3700};
3701
3702
3703/***/ }),
3704/* 82 */
3705/***/ (function(module, exports, __webpack_require__) {
3706
3707var _complement = __webpack_require__(39);
3708var _curry2 = __webpack_require__(0);
3709var _dispatchable = __webpack_require__(15);
3710var _xany = __webpack_require__(38);
3711var any = __webpack_require__(37);
3712
3713
3714/**
3715 * Returns `true` if no elements of the list match the predicate, `false`
3716 * otherwise.
3717 *
3718 * Dispatches to the `any` method of the second argument, if present.
3719 *
3720 * @func
3721 * @memberOf R
3722 * @since v0.12.0
3723 * @category List
3724 * @sig (a -> Boolean) -> [a] -> Boolean
3725 * @param {Function} fn The predicate function.
3726 * @param {Array} list The array to consider.
3727 * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise.
3728 * @see R.all, R.any
3729 * @example
3730 *
3731 * var isEven = n => n % 2 === 0;
3732 *
3733 * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true
3734 * R.none(isEven, [1, 3, 5, 7, 8, 11]); //=> false
3735 */
3736module.exports = _curry2(_complement(_dispatchable(['any'], _xany, any)));
3737
3738
3739/***/ }),
3740/* 83 */
3741/***/ (function(module, exports, __webpack_require__) {
3742
3743var _curry1 = __webpack_require__(2);
3744var keys = __webpack_require__(5);
3745
3746
3747/**
3748 * Returns a list of all the enumerable own properties of the supplied object.
3749 * Note that the order of the output array is not guaranteed across different
3750 * JS platforms.
3751 *
3752 * @func
3753 * @memberOf R
3754 * @since v0.1.0
3755 * @category Object
3756 * @sig {k: v} -> [v]
3757 * @param {Object} obj The object to extract values from
3758 * @return {Array} An array of the values of the object's own properties.
3759 * @see R.valuesIn, R.keys
3760 * @example
3761 *
3762 * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3]
3763 */
3764module.exports = _curry1(function values(obj) {
3765 var props = keys(obj);
3766 var len = props.length;
3767 var vals = [];
3768 var idx = 0;
3769 while (idx < len) {
3770 vals[idx] = obj[props[idx]];
3771 idx += 1;
3772 }
3773 return vals;
3774});
3775
3776
3777/***/ }),
3778/* 84 */
3779/***/ (function(module, exports, __webpack_require__) {
3780
3781var _curry2 = __webpack_require__(0);
3782
3783
3784/**
3785 * Retrieve the value at a given path.
3786 *
3787 * @func
3788 * @memberOf R
3789 * @since v0.2.0
3790 * @category Object
3791 * @typedefn Idx = String | Int
3792 * @sig [Idx] -> {a} -> a | Undefined
3793 * @param {Array} path The path to use.
3794 * @param {Object} obj The object to retrieve the nested property from.
3795 * @return {*} The data at `path`.
3796 * @see R.prop
3797 * @example
3798 *
3799 * R.path(['a', 'b'], {a: {b: 2}}); //=> 2
3800 * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined
3801 */
3802module.exports = _curry2(function path(paths, obj) {
3803 var val = obj;
3804 var idx = 0;
3805 while (idx < paths.length) {
3806 if (val == null) {
3807 return;
3808 }
3809 val = val[paths[idx]];
3810 idx += 1;
3811 }
3812 return val;
3813});
3814
3815
3816/***/ }),
3817/* 85 */
3818/***/ (function(module, exports, __webpack_require__) {
3819
3820var _curry2 = __webpack_require__(0);
3821var _xfBase = __webpack_require__(27);
3822
3823
3824module.exports = (function() {
3825 function XMap(f, xf) {
3826 this.xf = xf;
3827 this.f = f;
3828 }
3829 XMap.prototype['@@transducer/init'] = _xfBase.init;
3830 XMap.prototype['@@transducer/result'] = _xfBase.result;
3831 XMap.prototype['@@transducer/step'] = function(result, input) {
3832 return this.xf['@@transducer/step'](result, this.f(input));
3833 };
3834
3835 return _curry2(function _xmap(f, xf) { return new XMap(f, xf); });
3836}());
3837
3838
3839/***/ }),
3840/* 86 */
3841/***/ (function(module, exports, __webpack_require__) {
3842
3843var _arity = __webpack_require__(6);
3844var _curry1 = __webpack_require__(2);
3845var _curry2 = __webpack_require__(0);
3846var _curryN = __webpack_require__(87);
3847
3848
3849/**
3850 * Returns a curried equivalent of the provided function, with the specified
3851 * arity. The curried function has two unusual capabilities. First, its
3852 * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the
3853 * following are equivalent:
3854 *
3855 * - `g(1)(2)(3)`
3856 * - `g(1)(2, 3)`
3857 * - `g(1, 2)(3)`
3858 * - `g(1, 2, 3)`
3859 *
3860 * Secondly, the special placeholder value [`R.__`](#__) may be used to specify
3861 * "gaps", allowing partial application of any combination of arguments,
3862 * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),
3863 * the following are equivalent:
3864 *
3865 * - `g(1, 2, 3)`
3866 * - `g(_, 2, 3)(1)`
3867 * - `g(_, _, 3)(1)(2)`
3868 * - `g(_, _, 3)(1, 2)`
3869 * - `g(_, 2)(1)(3)`
3870 * - `g(_, 2)(1, 3)`
3871 * - `g(_, 2)(_, 3)(1)`
3872 *
3873 * @func
3874 * @memberOf R
3875 * @since v0.5.0
3876 * @category Function
3877 * @sig Number -> (* -> a) -> (* -> a)
3878 * @param {Number} length The arity for the returned function.
3879 * @param {Function} fn The function to curry.
3880 * @return {Function} A new, curried function.
3881 * @see R.curry
3882 * @example
3883 *
3884 * var sumArgs = (...args) => R.sum(args);
3885 *
3886 * var curriedAddFourNumbers = R.curryN(4, sumArgs);
3887 * var f = curriedAddFourNumbers(1, 2);
3888 * var g = f(3);
3889 * g(4); //=> 10
3890 */
3891module.exports = _curry2(function curryN(length, fn) {
3892 if (length === 1) {
3893 return _curry1(fn);
3894 }
3895 return _arity(length, _curryN(length, [], fn));
3896});
3897
3898
3899/***/ }),
3900/* 87 */
3901/***/ (function(module, exports, __webpack_require__) {
3902
3903var _arity = __webpack_require__(6);
3904var _isPlaceholder = __webpack_require__(13);
3905
3906
3907/**
3908 * Internal curryN function.
3909 *
3910 * @private
3911 * @category Function
3912 * @param {Number} length The arity of the curried function.
3913 * @param {Array} received An array of arguments received thus far.
3914 * @param {Function} fn The function to curry.
3915 * @return {Function} The curried function.
3916 */
3917module.exports = function _curryN(length, received, fn) {
3918 return function() {
3919 var combined = [];
3920 var argsIdx = 0;
3921 var left = length;
3922 var combinedIdx = 0;
3923 while (combinedIdx < received.length || argsIdx < arguments.length) {
3924 var result;
3925 if (combinedIdx < received.length &&
3926 (!_isPlaceholder(received[combinedIdx]) ||
3927 argsIdx >= arguments.length)) {
3928 result = received[combinedIdx];
3929 } else {
3930 result = arguments[argsIdx];
3931 argsIdx += 1;
3932 }
3933 combined[combinedIdx] = result;
3934 if (!_isPlaceholder(result)) {
3935 left -= 1;
3936 }
3937 combinedIdx += 1;
3938 }
3939 return left <= 0 ? fn.apply(this, combined)
3940 : _arity(left, _curryN(length, combined, fn));
3941 };
3942};
3943
3944
3945/***/ }),
3946/* 88 */
3947/***/ (function(module, exports, __webpack_require__) {
3948
3949var memoizeWith = __webpack_require__(89);
3950var toString = __webpack_require__(90);
3951
3952
3953/**
3954 * Creates a new function that, when invoked, caches the result of calling `fn`
3955 * for a given argument set and returns the result. Subsequent calls to the
3956 * memoized `fn` with the same argument set will not result in an additional
3957 * call to `fn`; instead, the cached result for that set of arguments will be
3958 * returned.
3959 *
3960 * @func
3961 * @memberOf R
3962 * @since v0.1.0
3963 * @category Function
3964 * @sig (*... -> a) -> (*... -> a)
3965 * @param {Function} fn The function to memoize.
3966 * @return {Function} Memoized version of `fn`.
3967 * @see R.memoizeWith
3968 * @example
3969 *
3970 * let count = 0;
3971 * const factorial = R.memoize(n => {
3972 * count += 1;
3973 * return R.product(R.range(1, n + 1));
3974 * });
3975 * factorial(5); //=> 120
3976 * factorial(5); //=> 120
3977 * factorial(5); //=> 120
3978 * count; //=> 1
3979 */
3980module.exports = memoizeWith(function() {
3981 return toString(arguments);
3982});
3983
3984
3985/***/ }),
3986/* 89 */
3987/***/ (function(module, exports, __webpack_require__) {
3988
3989var _arity = __webpack_require__(6);
3990var _curry2 = __webpack_require__(0);
3991var _has = __webpack_require__(7);
3992
3993
3994/**
3995 * A customisable version of [`R.memoize`](#memoize). `memoizeWith` takes an
3996 * additional function that will be applied to a given argument set and used to
3997 * create the cache key under which the results of the function to be memoized
3998 * will be stored. Care must be taken when implementing key generation to avoid
3999 * clashes that may overwrite previous entries erroneously.
4000 *
4001 *
4002 * @func
4003 * @memberOf R
4004 * @since v0.24.0
4005 * @category Function
4006 * @sig (*... -> String) -> (*... -> a) -> (*... -> a)
4007 * @param {Function} fn The function to generate the cache key.
4008 * @param {Function} fn The function to memoize.
4009 * @return {Function} Memoized version of `fn`.
4010 * @see R.memoize
4011 * @example
4012 *
4013 * let count = 0;
4014 * const factorial = R.memoizeWith(R.identity, n => {
4015 * count += 1;
4016 * return R.product(R.range(1, n + 1));
4017 * });
4018 * factorial(5); //=> 120
4019 * factorial(5); //=> 120
4020 * factorial(5); //=> 120
4021 * count; //=> 1
4022 */
4023module.exports = _curry2(function memoizeWith(mFn, fn) {
4024 var cache = {};
4025 return _arity(fn.length, function() {
4026 var key = mFn.apply(this, arguments);
4027 if (!_has(key, cache)) {
4028 cache[key] = fn.apply(this, arguments);
4029 }
4030 return cache[key];
4031 });
4032});
4033
4034
4035/***/ }),
4036/* 90 */
4037/***/ (function(module, exports, __webpack_require__) {
4038
4039var _curry1 = __webpack_require__(2);
4040var _toString = __webpack_require__(91);
4041
4042
4043/**
4044 * Returns the string representation of the given value. `eval`'ing the output
4045 * should result in a value equivalent to the input value. Many of the built-in
4046 * `toString` methods do not satisfy this requirement.
4047 *
4048 * If the given value is an `[object Object]` with a `toString` method other
4049 * than `Object.prototype.toString`, this method is invoked with no arguments
4050 * to produce the return value. This means user-defined constructor functions
4051 * can provide a suitable `toString` method. For example:
4052 *
4053 * function Point(x, y) {
4054 * this.x = x;
4055 * this.y = y;
4056 * }
4057 *
4058 * Point.prototype.toString = function() {
4059 * return 'new Point(' + this.x + ', ' + this.y + ')';
4060 * };
4061 *
4062 * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)'
4063 *
4064 * @func
4065 * @memberOf R
4066 * @since v0.14.0
4067 * @category String
4068 * @sig * -> String
4069 * @param {*} val
4070 * @return {String}
4071 * @example
4072 *
4073 * R.toString(42); //=> '42'
4074 * R.toString('abc'); //=> '"abc"'
4075 * R.toString([1, 2, 3]); //=> '[1, 2, 3]'
4076 * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}'
4077 * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")'
4078 */
4079module.exports = _curry1(function toString(val) { return _toString(val, []); });
4080
4081
4082/***/ }),
4083/* 91 */
4084/***/ (function(module, exports, __webpack_require__) {
4085
4086var _contains = __webpack_require__(36);
4087var _map = __webpack_require__(41);
4088var _quote = __webpack_require__(92);
4089var _toISOString = __webpack_require__(93);
4090var keys = __webpack_require__(5);
4091var reject = __webpack_require__(94);
4092
4093
4094module.exports = function _toString(x, seen) {
4095 var recur = function recur(y) {
4096 var xs = seen.concat([x]);
4097 return _contains(y, xs) ? '<Circular>' : _toString(y, xs);
4098 };
4099
4100 // mapPairs :: (Object, [String]) -> [String]
4101 var mapPairs = function(obj, keys) {
4102 return _map(function(k) { return _quote(k) + ': ' + recur(obj[k]); }, keys.slice().sort());
4103 };
4104
4105 switch (Object.prototype.toString.call(x)) {
4106 case '[object Arguments]':
4107 return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';
4108 case '[object Array]':
4109 return '[' + _map(recur, x).concat(mapPairs(x, reject(function(k) { return /^\d+$/.test(k); }, keys(x)))).join(', ') + ']';
4110 case '[object Boolean]':
4111 return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();
4112 case '[object Date]':
4113 return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')';
4114 case '[object Null]':
4115 return 'null';
4116 case '[object Number]':
4117 return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10);
4118 case '[object String]':
4119 return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x);
4120 case '[object Undefined]':
4121 return 'undefined';
4122 default:
4123 if (typeof x.toString === 'function') {
4124 var repr = x.toString();
4125 if (repr !== '[object Object]') {
4126 return repr;
4127 }
4128 }
4129 return '{' + mapPairs(x, keys(x)).join(', ') + '}';
4130 }
4131};
4132
4133
4134/***/ }),
4135/* 92 */
4136/***/ (function(module, exports) {
4137
4138module.exports = function _quote(s) {
4139 var escaped = s
4140 .replace(/\\/g, '\\\\')
4141 .replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace
4142 .replace(/\f/g, '\\f')
4143 .replace(/\n/g, '\\n')
4144 .replace(/\r/g, '\\r')
4145 .replace(/\t/g, '\\t')
4146 .replace(/\v/g, '\\v')
4147 .replace(/\0/g, '\\0');
4148
4149 return '"' + escaped.replace(/"/g, '\\"') + '"';
4150};
4151
4152
4153/***/ }),
4154/* 93 */
4155/***/ (function(module, exports) {
4156
4157/**
4158 * Polyfill from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>.
4159 */
4160module.exports = (function() {
4161 var pad = function pad(n) { return (n < 10 ? '0' : '') + n; };
4162
4163 return typeof Date.prototype.toISOString === 'function' ?
4164 function _toISOString(d) {
4165 return d.toISOString();
4166 } :
4167 function _toISOString(d) {
4168 return (
4169 d.getUTCFullYear() + '-' +
4170 pad(d.getUTCMonth() + 1) + '-' +
4171 pad(d.getUTCDate()) + 'T' +
4172 pad(d.getUTCHours()) + ':' +
4173 pad(d.getUTCMinutes()) + ':' +
4174 pad(d.getUTCSeconds()) + '.' +
4175 (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'
4176 );
4177 };
4178}());
4179
4180
4181/***/ }),
4182/* 94 */
4183/***/ (function(module, exports, __webpack_require__) {
4184
4185var _complement = __webpack_require__(39);
4186var _curry2 = __webpack_require__(0);
4187var filter = __webpack_require__(95);
4188
4189
4190/**
4191 * The complement of [`filter`](#filter).
4192 *
4193 * Acts as a transducer if a transformer is given in list position. Filterable
4194 * objects include plain objects or any object that has a filter method such
4195 * as `Array`.
4196 *
4197 * @func
4198 * @memberOf R
4199 * @since v0.1.0
4200 * @category List
4201 * @sig Filterable f => (a -> Boolean) -> f a -> f a
4202 * @param {Function} pred
4203 * @param {Array} filterable
4204 * @return {Array}
4205 * @see R.filter, R.transduce, R.addIndex
4206 * @example
4207 *
4208 * var isOdd = (n) => n % 2 === 1;
4209 *
4210 * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4]
4211 *
4212 * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}
4213 */
4214module.exports = _curry2(function reject(pred, filterable) {
4215 return filter(_complement(pred), filterable);
4216});
4217
4218
4219/***/ }),
4220/* 95 */
4221/***/ (function(module, exports, __webpack_require__) {
4222
4223var _curry2 = __webpack_require__(0);
4224var _dispatchable = __webpack_require__(15);
4225var _filter = __webpack_require__(96);
4226var _isObject = __webpack_require__(97);
4227var _reduce = __webpack_require__(23);
4228var _xfilter = __webpack_require__(98);
4229var keys = __webpack_require__(5);
4230
4231
4232/**
4233 * Takes a predicate and a `Filterable`, and returns a new filterable of the
4234 * same type containing the members of the given filterable which satisfy the
4235 * given predicate. Filterable objects include plain objects or any object
4236 * that has a filter method such as `Array`.
4237 *
4238 * Dispatches to the `filter` method of the second argument, if present.
4239 *
4240 * Acts as a transducer if a transformer is given in list position.
4241 *
4242 * @func
4243 * @memberOf R
4244 * @since v0.1.0
4245 * @category List
4246 * @sig Filterable f => (a -> Boolean) -> f a -> f a
4247 * @param {Function} pred
4248 * @param {Array} filterable
4249 * @return {Array} Filterable
4250 * @see R.reject, R.transduce, R.addIndex
4251 * @example
4252 *
4253 * var isEven = n => n % 2 === 0;
4254 *
4255 * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]
4256 *
4257 * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}
4258 */
4259module.exports = _curry2(_dispatchable(['filter'], _xfilter, function(pred, filterable) {
4260 return (
4261 _isObject(filterable) ?
4262 _reduce(function(acc, key) {
4263 if (pred(filterable[key])) {
4264 acc[key] = filterable[key];
4265 }
4266 return acc;
4267 }, {}, keys(filterable)) :
4268 // else
4269 _filter(pred, filterable)
4270 );
4271}));
4272
4273
4274/***/ }),
4275/* 96 */
4276/***/ (function(module, exports) {
4277
4278module.exports = function _filter(fn, list) {
4279 var idx = 0;
4280 var len = list.length;
4281 var result = [];
4282
4283 while (idx < len) {
4284 if (fn(list[idx])) {
4285 result[result.length] = list[idx];
4286 }
4287 idx += 1;
4288 }
4289 return result;
4290};
4291
4292
4293/***/ }),
4294/* 97 */
4295/***/ (function(module, exports) {
4296
4297module.exports = function _isObject(x) {
4298 return Object.prototype.toString.call(x) === '[object Object]';
4299};
4300
4301
4302/***/ }),
4303/* 98 */
4304/***/ (function(module, exports, __webpack_require__) {
4305
4306var _curry2 = __webpack_require__(0);
4307var _xfBase = __webpack_require__(27);
4308
4309
4310module.exports = (function() {
4311 function XFilter(f, xf) {
4312 this.xf = xf;
4313 this.f = f;
4314 }
4315 XFilter.prototype['@@transducer/init'] = _xfBase.init;
4316 XFilter.prototype['@@transducer/result'] = _xfBase.result;
4317 XFilter.prototype['@@transducer/step'] = function(result, input) {
4318 return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;
4319 };
4320
4321 return _curry2(function _xfilter(f, xf) { return new XFilter(f, xf); });
4322}());
4323
4324
4325/***/ }),
4326/* 99 */
4327/***/ (function(module, exports, __webpack_require__) {
4328
4329"use strict";
4330
4331
4332exports.__esModule = true;
4333
4334var _path = __webpack_require__(42);
4335
4336var _path2 = _interopRequireDefault(_path);
4337
4338var _identity = __webpack_require__(30);
4339
4340var _identity2 = _interopRequireDefault(_identity);
4341
4342var _merge = __webpack_require__(10);
4343
4344var _merge2 = _interopRequireDefault(_merge);
4345
4346var _lensProp = __webpack_require__(100);
4347
4348var _lensProp2 = _interopRequireDefault(_lensProp);
4349
4350var _set = __webpack_require__(114);
4351
4352var _set2 = _interopRequireDefault(_set);
4353
4354var _compose = __webpack_require__(116);
4355
4356var _compose2 = _interopRequireDefault(_compose);
4357
4358var _not = __webpack_require__(123);
4359
4360var _not2 = _interopRequireDefault(_not);
4361
4362var _react = __webpack_require__(11);
4363
4364var React = _interopRequireWildcard(_react);
4365
4366var _propTypes = __webpack_require__(12);
4367
4368var PropTypes = _interopRequireWildcard(_propTypes);
4369
4370var _reactRedux = __webpack_require__(21);
4371
4372var _containers = __webpack_require__(124);
4373
4374var containers = _interopRequireWildcard(_containers);
4375
4376var _fieldProps2 = __webpack_require__(125);
4377
4378var _fieldProps3 = _interopRequireDefault(_fieldProps2);
4379
4380var _getValue = __webpack_require__(134);
4381
4382var _getValue2 = _interopRequireDefault(_getValue);
4383
4384var _helpers = __webpack_require__(4);
4385
4386var _actions = __webpack_require__(26);
4387
4388var actions = _interopRequireWildcard(_actions);
4389
4390var _connectField = __webpack_require__(49);
4391
4392var _connectField2 = _interopRequireDefault(_connectField);
4393
4394function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
4395
4396function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4397
4398function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4399
4400function _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; }
4401
4402function _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; }
4403
4404function field(Component) {
4405 var Field = function (_React$Component) {
4406 _inherits(Field, _React$Component);
4407
4408 function Field(props) {
4409 _classCallCheck(this, Field);
4410
4411 var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
4412
4413 _this.handleChange = _this.handleChange.bind(_this);
4414 _this.handleFocus = _this.handleFocus.bind(_this);
4415 _this.handleBlur = _this.handleBlur.bind(_this);
4416 return _this;
4417 }
4418
4419 Field.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
4420 var _field = this.props._field;
4421
4422 if (!(0, _helpers.shallowCompare)((0, _fieldProps2.boolField)(this.props), (0, _fieldProps2.boolField)(nextProps))) {
4423 return true;
4424 }
4425 return (0, _not2.default)(_field && nextProps._field && (0, _helpers.shallowCompare)(_field, nextProps._field));
4426 };
4427
4428 Field.prototype.componentWillMount = function componentWillMount() {
4429 if (!this.props._field) {
4430 this.newField(this.props);
4431 }
4432 };
4433
4434 Field.prototype.componentWillReceiveProps = function componentWillReceiveProps(next) {
4435 var _props = this.props,
4436 _fieldChange = _props._fieldChange,
4437 _form = _props._form,
4438 name = _props.name,
4439 defaultValue = _props.defaultValue;
4440
4441 if (!next._field) {
4442 this.newField(next);
4443 return;
4444 }
4445 if (defaultValue !== next.defaultValue) {
4446 var value = next.normalize(next._field.value);
4447 var error = next.validate ? next.validate(value) : next._field.error;
4448 var dirty = next.defaultValue !== value;
4449 _fieldChange(_form, name, value, error, dirty);
4450 }
4451 };
4452
4453 Field.prototype.newField = function newField(props) {
4454 var value = props.normalize(props.defaultValue);
4455 var newField = (0, _compose2.default)((0, _set2.default)((0, _lensProp2.default)('value'), value), (0, _set2.default)((0, _lensProp2.default)('error'), props.validate ? props.validate(value) : null))(containers.field);
4456 props._addField(props._form, props.name, newField);
4457 };
4458
4459 Field.prototype.handleChange = function handleChange(ev) {
4460 var _props2 = this.props,
4461 _fieldChange = _props2._fieldChange,
4462 _form = _props2._form,
4463 _field = _props2._field,
4464 name = _props2.name,
4465 normalize = _props2.normalize,
4466 validate = _props2.validate,
4467 defaultValue = _props2.defaultValue;
4468
4469 if (!_field) {
4470 return;
4471 }
4472 var value = normalize((0, _getValue2.default)(ev));
4473 var error = validate ? validate(value) : _field.error;
4474 var dirty = value !== defaultValue;
4475 _fieldChange(_form, name, value, error, dirty);
4476 };
4477
4478 Field.prototype.handleFocus = function handleFocus() {
4479 var _props3 = this.props,
4480 _fieldFocus = _props3._fieldFocus,
4481 _form = _props3._form,
4482 name = _props3.name;
4483
4484 _fieldFocus(_form, name);
4485 };
4486
4487 Field.prototype.handleBlur = function handleBlur(ev) {
4488 var _props4 = this.props,
4489 _fieldBlur = _props4._fieldBlur,
4490 _form = _props4._form,
4491 _field = _props4._field,
4492 name = _props4.name,
4493 normalize = _props4.normalize,
4494 validate = _props4.validate,
4495 defaultValue = _props4.defaultValue;
4496
4497 if (!_field) {
4498 return;
4499 }
4500 var value = normalize((0, _getValue2.default)(ev));
4501 var error = validate ? validate(value) : _field.error;
4502 var dirty = value !== defaultValue;
4503 _fieldBlur(_form, name, value, error, dirty);
4504 };
4505
4506 Field.prototype.render = function render() {
4507 var _props5 = this.props,
4508 name = _props5.name,
4509 _field = _props5._field;
4510 // Wait until field is initialized
4511
4512 if (!_field) {
4513 return null;
4514 }
4515 var props = (0, _merge2.default)(_field, {
4516 name: name,
4517 onChange: this.handleChange,
4518 onFocus: this.handleFocus,
4519 onBlur: this.handleBlur
4520 });
4521
4522 var _fieldProps = (0, _fieldProps3.default)(props),
4523 input = _fieldProps.input,
4524 meta = _fieldProps.meta,
4525 rest = _fieldProps.rest;
4526 // TODO SFC not compatibile with class... wtf TS
4527
4528
4529 return React.createElement(Component, (0, _merge2.default)(rest, {
4530 input: input,
4531 meta: meta
4532 }));
4533 };
4534
4535 return Field;
4536 }(React.Component);
4537
4538 Field.defaultProps = {
4539 normalize: _identity2.default,
4540 defaultValue: ''
4541 };
4542 Field.propTypes = {
4543 name: PropTypes.string.isRequired,
4544 normalize: PropTypes.func.isRequired,
4545 defaultValue: PropTypes.any.isRequired,
4546 validate: PropTypes.func
4547 };
4548 var connector = (0, _reactRedux.connect)(function (state, props) {
4549 return {
4550 _field: (0, _path2.default)([props._form, 'fields', props.name], state.reduxForms)
4551 };
4552 }, {
4553 _addField: actions.addField,
4554 _fieldChange: actions.fieldChange,
4555 _fieldFocus: actions.fieldFocus,
4556 _fieldBlur: actions.fieldBlur
4557 });
4558 // TODO SFC not compatibile with class... wtf TS
4559 var Connected = connector(Field);
4560 var Contexted = (0, _connectField2.default)(Connected);
4561 Contexted.displayName = 'field(' + (Component.displayName || 'Component') + ')';
4562 return Contexted;
4563}
4564exports.default = field;
4565
4566/***/ }),
4567/* 100 */
4568/***/ (function(module, exports, __webpack_require__) {
4569
4570var _curry1 = __webpack_require__(1);
4571var assoc = __webpack_require__(101);
4572var lens = __webpack_require__(102);
4573var prop = __webpack_require__(29);
4574
4575
4576/**
4577 * Returns a lens whose focus is the specified property.
4578 *
4579 * @func
4580 * @memberOf R
4581 * @since v0.14.0
4582 * @category Object
4583 * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s
4584 * @sig String -> Lens s a
4585 * @param {String} k
4586 * @return {Lens}
4587 * @see R.view, R.set, R.over
4588 * @example
4589 *
4590 * var xLens = R.lensProp('x');
4591 *
4592 * R.view(xLens, {x: 1, y: 2}); //=> 1
4593 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}
4594 * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2}
4595 */
4596module.exports = _curry1(function lensProp(k) {
4597 return lens(prop(k), assoc(k));
4598});
4599
4600
4601/***/ }),
4602/* 101 */
4603/***/ (function(module, exports, __webpack_require__) {
4604
4605var _curry3 = __webpack_require__(8);
4606
4607
4608/**
4609 * Makes a shallow clone of an object, setting or overriding the specified
4610 * property with the given value. Note that this copies and flattens prototype
4611 * properties onto the new object as well. All non-primitive properties are
4612 * copied by reference.
4613 *
4614 * @func
4615 * @memberOf R
4616 * @since v0.8.0
4617 * @category Object
4618 * @sig String -> a -> {k: v} -> {k: v}
4619 * @param {String} prop The property name to set
4620 * @param {*} val The new value
4621 * @param {Object} obj The object to clone
4622 * @return {Object} A new object equivalent to the original except for the changed property.
4623 * @see R.dissoc
4624 * @example
4625 *
4626 * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}
4627 */
4628module.exports = _curry3(function assoc(prop, val, obj) {
4629 var result = {};
4630 for (var p in obj) {
4631 result[p] = obj[p];
4632 }
4633 result[prop] = val;
4634 return result;
4635});
4636
4637
4638/***/ }),
4639/* 102 */
4640/***/ (function(module, exports, __webpack_require__) {
4641
4642var _curry2 = __webpack_require__(3);
4643var map = __webpack_require__(43);
4644
4645
4646/**
4647 * Returns a lens for the given getter and setter functions. The getter "gets"
4648 * the value of the focus; the setter "sets" the value of the focus. The setter
4649 * should not mutate the data structure.
4650 *
4651 * @func
4652 * @memberOf R
4653 * @since v0.8.0
4654 * @category Object
4655 * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s
4656 * @sig (s -> a) -> ((a, s) -> s) -> Lens s a
4657 * @param {Function} getter
4658 * @param {Function} setter
4659 * @return {Lens}
4660 * @see R.view, R.set, R.over, R.lensIndex, R.lensProp
4661 * @example
4662 *
4663 * var xLens = R.lens(R.prop('x'), R.assoc('x'));
4664 *
4665 * R.view(xLens, {x: 1, y: 2}); //=> 1
4666 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}
4667 * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2}
4668 */
4669module.exports = _curry2(function lens(getter, setter) {
4670 return function(toFunctorFn) {
4671 return function(target) {
4672 return map(
4673 function(focus) {
4674 return setter(focus, target);
4675 },
4676 toFunctorFn(getter(target))
4677 );
4678 };
4679 };
4680});
4681
4682
4683/***/ }),
4684/* 103 */
4685/***/ (function(module, exports, __webpack_require__) {
4686
4687var _isArray = __webpack_require__(28);
4688var _isTransformer = __webpack_require__(104);
4689
4690
4691/**
4692 * Returns a function that dispatches with different strategies based on the
4693 * object in list position (last argument). If it is an array, executes [fn].
4694 * Otherwise, if it has a function with one of the given method names, it will
4695 * execute that function (functor case). Otherwise, if it is a transformer,
4696 * uses transducer [xf] to return a new transformer (transducer case).
4697 * Otherwise, it will default to executing [fn].
4698 *
4699 * @private
4700 * @param {Array} methodNames properties to check for a custom implementation
4701 * @param {Function} xf transducer to initialize if object is transformer
4702 * @param {Function} fn default ramda implementation
4703 * @return {Function} A function that dispatches on object in list position
4704 */
4705module.exports = function _dispatchable(methodNames, xf, fn) {
4706 return function() {
4707 if (arguments.length === 0) {
4708 return fn();
4709 }
4710 var args = Array.prototype.slice.call(arguments, 0);
4711 var obj = args.pop();
4712 if (!_isArray(obj)) {
4713 var idx = 0;
4714 while (idx < methodNames.length) {
4715 if (typeof obj[methodNames[idx]] === 'function') {
4716 return obj[methodNames[idx]].apply(obj, args);
4717 }
4718 idx += 1;
4719 }
4720 if (_isTransformer(obj)) {
4721 var transducer = xf.apply(null, args);
4722 return transducer(obj);
4723 }
4724 }
4725 return fn.apply(this, arguments);
4726 };
4727};
4728
4729
4730/***/ }),
4731/* 104 */
4732/***/ (function(module, exports) {
4733
4734module.exports = function _isTransformer(obj) {
4735 return typeof obj['@@transducer/step'] === 'function';
4736};
4737
4738
4739/***/ }),
4740/* 105 */
4741/***/ (function(module, exports) {
4742
4743module.exports = function _map(fn, functor) {
4744 var idx = 0;
4745 var len = functor.length;
4746 var result = Array(len);
4747 while (idx < len) {
4748 result[idx] = fn(functor[idx]);
4749 idx += 1;
4750 }
4751 return result;
4752};
4753
4754
4755/***/ }),
4756/* 106 */
4757/***/ (function(module, exports, __webpack_require__) {
4758
4759var _curry1 = __webpack_require__(1);
4760var _isArray = __webpack_require__(28);
4761var _isString = __webpack_require__(45);
4762
4763
4764/**
4765 * Tests whether or not an object is similar to an array.
4766 *
4767 * @private
4768 * @category Type
4769 * @category List
4770 * @sig * -> Boolean
4771 * @param {*} x The object to test.
4772 * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.
4773 * @example
4774 *
4775 * _isArrayLike([]); //=> true
4776 * _isArrayLike(true); //=> false
4777 * _isArrayLike({}); //=> false
4778 * _isArrayLike({length: 10}); //=> false
4779 * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true
4780 */
4781module.exports = _curry1(function isArrayLike(x) {
4782 if (_isArray(x)) { return true; }
4783 if (!x) { return false; }
4784 if (typeof x !== 'object') { return false; }
4785 if (_isString(x)) { return false; }
4786 if (x.nodeType === 1) { return !!x.length; }
4787 if (x.length === 0) { return true; }
4788 if (x.length > 0) {
4789 return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);
4790 }
4791 return false;
4792});
4793
4794
4795/***/ }),
4796/* 107 */
4797/***/ (function(module, exports) {
4798
4799module.exports = (function() {
4800 function XWrap(fn) {
4801 this.f = fn;
4802 }
4803 XWrap.prototype['@@transducer/init'] = function() {
4804 throw new Error('init not implemented on XWrap');
4805 };
4806 XWrap.prototype['@@transducer/result'] = function(acc) { return acc; };
4807 XWrap.prototype['@@transducer/step'] = function(acc, x) {
4808 return this.f(acc, x);
4809 };
4810
4811 return function _xwrap(fn) { return new XWrap(fn); };
4812}());
4813
4814
4815/***/ }),
4816/* 108 */
4817/***/ (function(module, exports, __webpack_require__) {
4818
4819var _arity = __webpack_require__(16);
4820var _curry2 = __webpack_require__(3);
4821
4822
4823/**
4824 * Creates a function that is bound to a context.
4825 * Note: `R.bind` does not provide the additional argument-binding capabilities of
4826 * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).
4827 *
4828 * @func
4829 * @memberOf R
4830 * @since v0.6.0
4831 * @category Function
4832 * @category Object
4833 * @sig (* -> *) -> {*} -> (* -> *)
4834 * @param {Function} fn The function to bind to context
4835 * @param {Object} thisObj The context to bind `fn` to
4836 * @return {Function} A function that will execute in the context of `thisObj`.
4837 * @see R.partial
4838 * @example
4839 *
4840 * var log = R.bind(console.log, console);
4841 * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}
4842 * // logs {a: 2}
4843 * @symb R.bind(f, o)(a, b) = f.call(o, a, b)
4844 */
4845module.exports = _curry2(function bind(fn, thisObj) {
4846 return _arity(fn.length, function() {
4847 return fn.apply(thisObj, arguments);
4848 });
4849});
4850
4851
4852/***/ }),
4853/* 109 */
4854/***/ (function(module, exports, __webpack_require__) {
4855
4856var _curry2 = __webpack_require__(3);
4857var _xfBase = __webpack_require__(110);
4858
4859
4860module.exports = (function() {
4861 function XMap(f, xf) {
4862 this.xf = xf;
4863 this.f = f;
4864 }
4865 XMap.prototype['@@transducer/init'] = _xfBase.init;
4866 XMap.prototype['@@transducer/result'] = _xfBase.result;
4867 XMap.prototype['@@transducer/step'] = function(result, input) {
4868 return this.xf['@@transducer/step'](result, this.f(input));
4869 };
4870
4871 return _curry2(function _xmap(f, xf) { return new XMap(f, xf); });
4872}());
4873
4874
4875/***/ }),
4876/* 110 */
4877/***/ (function(module, exports) {
4878
4879module.exports = {
4880 init: function() {
4881 return this.xf['@@transducer/init']();
4882 },
4883 result: function(result) {
4884 return this.xf['@@transducer/result'](result);
4885 }
4886};
4887
4888
4889/***/ }),
4890/* 111 */
4891/***/ (function(module, exports, __webpack_require__) {
4892
4893var _arity = __webpack_require__(16);
4894var _isPlaceholder = __webpack_require__(9);
4895
4896
4897/**
4898 * Internal curryN function.
4899 *
4900 * @private
4901 * @category Function
4902 * @param {Number} length The arity of the curried function.
4903 * @param {Array} received An array of arguments received thus far.
4904 * @param {Function} fn The function to curry.
4905 * @return {Function} The curried function.
4906 */
4907module.exports = function _curryN(length, received, fn) {
4908 return function() {
4909 var combined = [];
4910 var argsIdx = 0;
4911 var left = length;
4912 var combinedIdx = 0;
4913 while (combinedIdx < received.length || argsIdx < arguments.length) {
4914 var result;
4915 if (combinedIdx < received.length &&
4916 (!_isPlaceholder(received[combinedIdx]) ||
4917 argsIdx >= arguments.length)) {
4918 result = received[combinedIdx];
4919 } else {
4920 result = arguments[argsIdx];
4921 argsIdx += 1;
4922 }
4923 combined[combinedIdx] = result;
4924 if (!_isPlaceholder(result)) {
4925 left -= 1;
4926 }
4927 combinedIdx += 1;
4928 }
4929 return left <= 0 ? fn.apply(this, combined)
4930 : _arity(left, _curryN(length, combined, fn));
4931 };
4932};
4933
4934
4935/***/ }),
4936/* 112 */
4937/***/ (function(module, exports, __webpack_require__) {
4938
4939var _curry1 = __webpack_require__(1);
4940var _has = __webpack_require__(17);
4941var _isArguments = __webpack_require__(113);
4942
4943
4944/**
4945 * Returns a list containing the names of all the enumerable own properties of
4946 * the supplied object.
4947 * Note that the order of the output array is not guaranteed to be consistent
4948 * across different JS platforms.
4949 *
4950 * @func
4951 * @memberOf R
4952 * @since v0.1.0
4953 * @category Object
4954 * @sig {k: v} -> [k]
4955 * @param {Object} obj The object to extract properties from
4956 * @return {Array} An array of the object's own properties.
4957 * @see R.keysIn, R.values
4958 * @example
4959 *
4960 * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']
4961 */
4962module.exports = (function() {
4963 // cover IE < 9 keys issues
4964 var hasEnumBug = !({toString: null}).propertyIsEnumerable('toString');
4965 var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString',
4966 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
4967 // Safari bug
4968 var hasArgsEnumBug = (function() {
4969 'use strict';
4970 return arguments.propertyIsEnumerable('length');
4971 }());
4972
4973 var contains = function contains(list, item) {
4974 var idx = 0;
4975 while (idx < list.length) {
4976 if (list[idx] === item) {
4977 return true;
4978 }
4979 idx += 1;
4980 }
4981 return false;
4982 };
4983
4984 return typeof Object.keys === 'function' && !hasArgsEnumBug ?
4985 _curry1(function keys(obj) {
4986 return Object(obj) !== obj ? [] : Object.keys(obj);
4987 }) :
4988 _curry1(function keys(obj) {
4989 if (Object(obj) !== obj) {
4990 return [];
4991 }
4992 var prop, nIdx;
4993 var ks = [];
4994 var checkArgsLength = hasArgsEnumBug && _isArguments(obj);
4995 for (prop in obj) {
4996 if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {
4997 ks[ks.length] = prop;
4998 }
4999 }
5000 if (hasEnumBug) {
5001 nIdx = nonEnumerableProps.length - 1;
5002 while (nIdx >= 0) {
5003 prop = nonEnumerableProps[nIdx];
5004 if (_has(prop, obj) && !contains(ks, prop)) {
5005 ks[ks.length] = prop;
5006 }
5007 nIdx -= 1;
5008 }
5009 }
5010 return ks;
5011 });
5012}());
5013
5014
5015/***/ }),
5016/* 113 */
5017/***/ (function(module, exports, __webpack_require__) {
5018
5019var _has = __webpack_require__(17);
5020
5021
5022module.exports = (function() {
5023 var toString = Object.prototype.toString;
5024 return toString.call(arguments) === '[object Arguments]' ?
5025 function _isArguments(x) { return toString.call(x) === '[object Arguments]'; } :
5026 function _isArguments(x) { return _has('callee', x); };
5027}());
5028
5029
5030/***/ }),
5031/* 114 */
5032/***/ (function(module, exports, __webpack_require__) {
5033
5034var _curry3 = __webpack_require__(8);
5035var always = __webpack_require__(47);
5036var over = __webpack_require__(115);
5037
5038
5039/**
5040 * Returns the result of "setting" the portion of the given data structure
5041 * focused by the given lens to the given value.
5042 *
5043 * @func
5044 * @memberOf R
5045 * @since v0.16.0
5046 * @category Object
5047 * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s
5048 * @sig Lens s a -> a -> s -> s
5049 * @param {Lens} lens
5050 * @param {*} v
5051 * @param {*} x
5052 * @return {*}
5053 * @see R.prop, R.lensIndex, R.lensProp
5054 * @example
5055 *
5056 * var xLens = R.lensProp('x');
5057 *
5058 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}
5059 * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2}
5060 */
5061module.exports = _curry3(function set(lens, v, x) {
5062 return over(lens, always(v), x);
5063});
5064
5065
5066/***/ }),
5067/* 115 */
5068/***/ (function(module, exports, __webpack_require__) {
5069
5070var _curry3 = __webpack_require__(8);
5071
5072
5073/**
5074 * Returns the result of "setting" the portion of the given data structure
5075 * focused by the given lens to the result of applying the given function to
5076 * the focused value.
5077 *
5078 * @func
5079 * @memberOf R
5080 * @since v0.16.0
5081 * @category Object
5082 * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s
5083 * @sig Lens s a -> (a -> a) -> s -> s
5084 * @param {Lens} lens
5085 * @param {*} v
5086 * @param {*} x
5087 * @return {*}
5088 * @see R.prop, R.lensIndex, R.lensProp
5089 * @example
5090 *
5091 * var headLens = R.lensIndex(0);
5092 *
5093 * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz']
5094 */
5095module.exports = (function() {
5096 // `Identity` is a functor that holds a single value, where `map` simply
5097 // transforms the held value with the provided function.
5098 var Identity = function(x) {
5099 return {value: x, map: function(f) { return Identity(f(x)); }};
5100 };
5101
5102 return _curry3(function over(lens, f, x) {
5103 // The value returned by the getter function is first transformed with `f`,
5104 // then set as the value of an `Identity`. This is then mapped over with the
5105 // setter function of the lens.
5106 return lens(function(y) { return Identity(f(y)); })(x).value;
5107 });
5108}());
5109
5110
5111/***/ }),
5112/* 116 */
5113/***/ (function(module, exports, __webpack_require__) {
5114
5115var pipe = __webpack_require__(117);
5116var reverse = __webpack_require__(122);
5117
5118
5119/**
5120 * Performs right-to-left function composition. The rightmost function may have
5121 * any arity; the remaining functions must be unary.
5122 *
5123 * **Note:** The result of compose is not automatically curried.
5124 *
5125 * @func
5126 * @memberOf R
5127 * @since v0.1.0
5128 * @category Function
5129 * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z)
5130 * @param {...Function} ...functions The functions to compose
5131 * @return {Function}
5132 * @see R.pipe
5133 * @example
5134 *
5135 * var classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName
5136 * var yellGreeting = R.compose(R.toUpper, classyGreeting);
5137 * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND"
5138 *
5139 * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7
5140 *
5141 * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b)))
5142 */
5143module.exports = function compose() {
5144 if (arguments.length === 0) {
5145 throw new Error('compose requires at least one argument');
5146 }
5147 return pipe.apply(this, reverse(arguments));
5148};
5149
5150
5151/***/ }),
5152/* 117 */
5153/***/ (function(module, exports, __webpack_require__) {
5154
5155var _arity = __webpack_require__(16);
5156var _pipe = __webpack_require__(118);
5157var reduce = __webpack_require__(119);
5158var tail = __webpack_require__(120);
5159
5160
5161/**
5162 * Performs left-to-right function composition. The leftmost function may have
5163 * any arity; the remaining functions must be unary.
5164 *
5165 * In some libraries this function is named `sequence`.
5166 *
5167 * **Note:** The result of pipe is not automatically curried.
5168 *
5169 * @func
5170 * @memberOf R
5171 * @since v0.1.0
5172 * @category Function
5173 * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z)
5174 * @param {...Function} functions
5175 * @return {Function}
5176 * @see R.compose
5177 * @example
5178 *
5179 * var f = R.pipe(Math.pow, R.negate, R.inc);
5180 *
5181 * f(3, 4); // -(3^4) + 1
5182 * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b)))
5183 */
5184module.exports = function pipe() {
5185 if (arguments.length === 0) {
5186 throw new Error('pipe requires at least one argument');
5187 }
5188 return _arity(arguments[0].length,
5189 reduce(_pipe, arguments[0], tail(arguments)));
5190};
5191
5192
5193/***/ }),
5194/* 118 */
5195/***/ (function(module, exports) {
5196
5197module.exports = function _pipe(f, g) {
5198 return function() {
5199 return g.call(this, f.apply(this, arguments));
5200 };
5201};
5202
5203
5204/***/ }),
5205/* 119 */
5206/***/ (function(module, exports, __webpack_require__) {
5207
5208var _curry3 = __webpack_require__(8);
5209var _reduce = __webpack_require__(44);
5210
5211
5212/**
5213 * Returns a single item by iterating through the list, successively calling
5214 * the iterator function and passing it an accumulator value and the current
5215 * value from the array, and then passing the result to the next call.
5216 *
5217 * The iterator function receives two values: *(acc, value)*. It may use
5218 * [`R.reduced`](#reduced) to shortcut the iteration.
5219 *
5220 * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function
5221 * is *(value, acc)*.
5222 *
5223 * Note: `R.reduce` does not skip deleted or unassigned indices (sparse
5224 * arrays), unlike the native `Array.prototype.reduce` method. For more details
5225 * on this behavior, see:
5226 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description
5227 *
5228 * Dispatches to the `reduce` method of the third argument, if present. When
5229 * doing so, it is up to the user to handle the [`R.reduced`](#reduced)
5230 * shortcuting, as this is not implemented by `reduce`.
5231 *
5232 * @func
5233 * @memberOf R
5234 * @since v0.1.0
5235 * @category List
5236 * @sig ((a, b) -> a) -> a -> [b] -> a
5237 * @param {Function} fn The iterator function. Receives two values, the accumulator and the
5238 * current element from the array.
5239 * @param {*} acc The accumulator value.
5240 * @param {Array} list The list to iterate over.
5241 * @return {*} The final, accumulated value.
5242 * @see R.reduced, R.addIndex, R.reduceRight
5243 * @example
5244 *
5245 * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10
5246 * - -10
5247 * / \ / \
5248 * - 4 -6 4
5249 * / \ / \
5250 * - 3 ==> -3 3
5251 * / \ / \
5252 * - 2 -1 2
5253 * / \ / \
5254 * 0 1 0 1
5255 *
5256 * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)
5257 */
5258module.exports = _curry3(_reduce);
5259
5260
5261/***/ }),
5262/* 120 */
5263/***/ (function(module, exports, __webpack_require__) {
5264
5265var _checkForMethod = __webpack_require__(48);
5266var _curry1 = __webpack_require__(1);
5267var slice = __webpack_require__(121);
5268
5269
5270/**
5271 * Returns all but the first element of the given list or string (or object
5272 * with a `tail` method).
5273 *
5274 * Dispatches to the `slice` method of the first argument, if present.
5275 *
5276 * @func
5277 * @memberOf R
5278 * @since v0.1.0
5279 * @category List
5280 * @sig [a] -> [a]
5281 * @sig String -> String
5282 * @param {*} list
5283 * @return {*}
5284 * @see R.head, R.init, R.last
5285 * @example
5286 *
5287 * R.tail([1, 2, 3]); //=> [2, 3]
5288 * R.tail([1, 2]); //=> [2]
5289 * R.tail([1]); //=> []
5290 * R.tail([]); //=> []
5291 *
5292 * R.tail('abc'); //=> 'bc'
5293 * R.tail('ab'); //=> 'b'
5294 * R.tail('a'); //=> ''
5295 * R.tail(''); //=> ''
5296 */
5297module.exports = _curry1(_checkForMethod('tail', slice(1, Infinity)));
5298
5299
5300/***/ }),
5301/* 121 */
5302/***/ (function(module, exports, __webpack_require__) {
5303
5304var _checkForMethod = __webpack_require__(48);
5305var _curry3 = __webpack_require__(8);
5306
5307
5308/**
5309 * Returns the elements of the given list or string (or object with a `slice`
5310 * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).
5311 *
5312 * Dispatches to the `slice` method of the third argument, if present.
5313 *
5314 * @func
5315 * @memberOf R
5316 * @since v0.1.4
5317 * @category List
5318 * @sig Number -> Number -> [a] -> [a]
5319 * @sig Number -> Number -> String -> String
5320 * @param {Number} fromIndex The start index (inclusive).
5321 * @param {Number} toIndex The end index (exclusive).
5322 * @param {*} list
5323 * @return {*}
5324 * @example
5325 *
5326 * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c']
5327 * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']
5328 * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c']
5329 * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c']
5330 * R.slice(0, 3, 'ramda'); //=> 'ram'
5331 */
5332module.exports = _curry3(_checkForMethod('slice', function slice(fromIndex, toIndex, list) {
5333 return Array.prototype.slice.call(list, fromIndex, toIndex);
5334}));
5335
5336
5337/***/ }),
5338/* 122 */
5339/***/ (function(module, exports, __webpack_require__) {
5340
5341var _curry1 = __webpack_require__(1);
5342var _isString = __webpack_require__(45);
5343
5344
5345/**
5346 * Returns a new list or string with the elements or characters in reverse
5347 * order.
5348 *
5349 * @func
5350 * @memberOf R
5351 * @since v0.1.0
5352 * @category List
5353 * @sig [a] -> [a]
5354 * @sig String -> String
5355 * @param {Array|String} list
5356 * @return {Array|String}
5357 * @example
5358 *
5359 * R.reverse([1, 2, 3]); //=> [3, 2, 1]
5360 * R.reverse([1, 2]); //=> [2, 1]
5361 * R.reverse([1]); //=> [1]
5362 * R.reverse([]); //=> []
5363 *
5364 * R.reverse('abc'); //=> 'cba'
5365 * R.reverse('ab'); //=> 'ba'
5366 * R.reverse('a'); //=> 'a'
5367 * R.reverse(''); //=> ''
5368 */
5369module.exports = _curry1(function reverse(list) {
5370 return _isString(list) ? list.split('').reverse().join('') :
5371 Array.prototype.slice.call(list, 0).reverse();
5372});
5373
5374
5375/***/ }),
5376/* 123 */
5377/***/ (function(module, exports, __webpack_require__) {
5378
5379var _curry1 = __webpack_require__(1);
5380
5381
5382/**
5383 * A function that returns the `!` of its argument. It will return `true` when
5384 * passed false-y value, and `false` when passed a truth-y one.
5385 *
5386 * @func
5387 * @memberOf R
5388 * @since v0.1.0
5389 * @category Logic
5390 * @sig * -> Boolean
5391 * @param {*} a any value
5392 * @return {Boolean} the logical inverse of passed argument.
5393 * @see R.complement
5394 * @example
5395 *
5396 * R.not(true); //=> false
5397 * R.not(false); //=> true
5398 * R.not(0); //=> true
5399 * R.not(1); //=> false
5400 */
5401module.exports = _curry1(function not(a) {
5402 return !a;
5403});
5404
5405
5406/***/ }),
5407/* 124 */
5408/***/ (function(module, exports, __webpack_require__) {
5409
5410"use strict";
5411
5412
5413exports.__esModule = true;
5414var form = exports.form = {
5415 fields: {},
5416 arrays: {},
5417 submitting: false
5418};
5419var field = exports.field = {
5420 value: '',
5421 error: null,
5422 visited: false,
5423 touched: false,
5424 active: false,
5425 dirty: false
5426};
5427
5428/***/ }),
5429/* 125 */
5430/***/ (function(module, exports, __webpack_require__) {
5431
5432"use strict";
5433
5434
5435exports.__esModule = true;
5436exports.boolField = undefined;
5437
5438var _lensProp = __webpack_require__(126);
5439
5440var _lensProp2 = _interopRequireDefault(_lensProp);
5441
5442var _over = __webpack_require__(129);
5443
5444var _over2 = _interopRequireDefault(_over);
5445
5446var _omit = __webpack_require__(25);
5447
5448var _omit2 = _interopRequireDefault(_omit);
5449
5450var _pick = __webpack_require__(130);
5451
5452var _pick2 = _interopRequireDefault(_pick);
5453
5454var _merge = __webpack_require__(131);
5455
5456var _merge2 = _interopRequireDefault(_merge);
5457
5458function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5459
5460var INPUT_PROPS = ['checked', 'name', 'value', 'onChange', 'onFocus', 'onBlur'];
5461var META_PROPS = ['active', 'dirty', 'error', 'touched', 'visited'];
5462var IGNORE_PROPS = [].concat(INPUT_PROPS, META_PROPS, ['validate', 'normalize', 'defaultValue', '_form', '_addField', '_fieldChange', '_fieldFocus', '_fieldBlur']);
5463var maybeCheckProps = function maybeCheckProps(all) {
5464 if (typeof all.value === 'boolean') {
5465 return (0, _merge2.default)(all, { checked: all.value });
5466 }
5467 return all;
5468};
5469var separateProps = function separateProps(all) {
5470 return {
5471 input: (0, _pick2.default)(INPUT_PROPS, all),
5472 meta: (0, _pick2.default)(META_PROPS, all),
5473 rest: (0, _omit2.default)(IGNORE_PROPS, all)
5474 };
5475};
5476
5477exports.default = function (all) {
5478 return separateProps(maybeCheckProps(all));
5479};
5480
5481var boolField = exports.boolField = (0, _over2.default)((0, _lensProp2.default)('_field'), Boolean);
5482
5483/***/ }),
5484/* 126 */
5485/***/ (function(module, exports, __webpack_require__) {
5486
5487var _curry1 = __webpack_require__(2);
5488var assoc = __webpack_require__(127);
5489var lens = __webpack_require__(128);
5490var prop = __webpack_require__(22);
5491
5492
5493/**
5494 * Returns a lens whose focus is the specified property.
5495 *
5496 * @func
5497 * @memberOf R
5498 * @since v0.14.0
5499 * @category Object
5500 * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s
5501 * @sig String -> Lens s a
5502 * @param {String} k
5503 * @return {Lens}
5504 * @see R.view, R.set, R.over
5505 * @example
5506 *
5507 * var xLens = R.lensProp('x');
5508 *
5509 * R.view(xLens, {x: 1, y: 2}); //=> 1
5510 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}
5511 * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2}
5512 */
5513module.exports = _curry1(function lensProp(k) {
5514 return lens(prop(k), assoc(k));
5515});
5516
5517
5518/***/ }),
5519/* 127 */
5520/***/ (function(module, exports, __webpack_require__) {
5521
5522var _curry3 = __webpack_require__(14);
5523
5524
5525/**
5526 * Makes a shallow clone of an object, setting or overriding the specified
5527 * property with the given value. Note that this copies and flattens prototype
5528 * properties onto the new object as well. All non-primitive properties are
5529 * copied by reference.
5530 *
5531 * @func
5532 * @memberOf R
5533 * @since v0.8.0
5534 * @category Object
5535 * @sig String -> a -> {k: v} -> {k: v}
5536 * @param {String} prop The property name to set
5537 * @param {*} val The new value
5538 * @param {Object} obj The object to clone
5539 * @return {Object} A new object equivalent to the original except for the changed property.
5540 * @see R.dissoc
5541 * @example
5542 *
5543 * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}
5544 */
5545module.exports = _curry3(function assoc(prop, val, obj) {
5546 var result = {};
5547 for (var p in obj) {
5548 result[p] = obj[p];
5549 }
5550 result[prop] = val;
5551 return result;
5552});
5553
5554
5555/***/ }),
5556/* 128 */
5557/***/ (function(module, exports, __webpack_require__) {
5558
5559var _curry2 = __webpack_require__(0);
5560var map = __webpack_require__(40);
5561
5562
5563/**
5564 * Returns a lens for the given getter and setter functions. The getter "gets"
5565 * the value of the focus; the setter "sets" the value of the focus. The setter
5566 * should not mutate the data structure.
5567 *
5568 * @func
5569 * @memberOf R
5570 * @since v0.8.0
5571 * @category Object
5572 * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s
5573 * @sig (s -> a) -> ((a, s) -> s) -> Lens s a
5574 * @param {Function} getter
5575 * @param {Function} setter
5576 * @return {Lens}
5577 * @see R.view, R.set, R.over, R.lensIndex, R.lensProp
5578 * @example
5579 *
5580 * var xLens = R.lens(R.prop('x'), R.assoc('x'));
5581 *
5582 * R.view(xLens, {x: 1, y: 2}); //=> 1
5583 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}
5584 * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2}
5585 */
5586module.exports = _curry2(function lens(getter, setter) {
5587 return function(toFunctorFn) {
5588 return function(target) {
5589 return map(
5590 function(focus) {
5591 return setter(focus, target);
5592 },
5593 toFunctorFn(getter(target))
5594 );
5595 };
5596 };
5597});
5598
5599
5600/***/ }),
5601/* 129 */
5602/***/ (function(module, exports, __webpack_require__) {
5603
5604var _curry3 = __webpack_require__(14);
5605
5606
5607/**
5608 * Returns the result of "setting" the portion of the given data structure
5609 * focused by the given lens to the result of applying the given function to
5610 * the focused value.
5611 *
5612 * @func
5613 * @memberOf R
5614 * @since v0.16.0
5615 * @category Object
5616 * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s
5617 * @sig Lens s a -> (a -> a) -> s -> s
5618 * @param {Lens} lens
5619 * @param {*} v
5620 * @param {*} x
5621 * @return {*}
5622 * @see R.prop, R.lensIndex, R.lensProp
5623 * @example
5624 *
5625 * var headLens = R.lensIndex(0);
5626 *
5627 * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz']
5628 */
5629module.exports = (function() {
5630 // `Identity` is a functor that holds a single value, where `map` simply
5631 // transforms the held value with the provided function.
5632 var Identity = function(x) {
5633 return {value: x, map: function(f) { return Identity(f(x)); }};
5634 };
5635
5636 return _curry3(function over(lens, f, x) {
5637 // The value returned by the getter function is first transformed with `f`,
5638 // then set as the value of an `Identity`. This is then mapped over with the
5639 // setter function of the lens.
5640 return lens(function(y) { return Identity(f(y)); })(x).value;
5641 });
5642}());
5643
5644
5645/***/ }),
5646/* 130 */
5647/***/ (function(module, exports, __webpack_require__) {
5648
5649var _curry2 = __webpack_require__(0);
5650
5651
5652/**
5653 * Returns a partial copy of an object containing only the keys specified. If
5654 * the key does not exist, the property is ignored.
5655 *
5656 * @func
5657 * @memberOf R
5658 * @since v0.1.0
5659 * @category Object
5660 * @sig [k] -> {k: v} -> {k: v}
5661 * @param {Array} names an array of String property names to copy onto a new object
5662 * @param {Object} obj The object to copy from
5663 * @return {Object} A new object with only properties from `names` on it.
5664 * @see R.omit, R.props
5665 * @example
5666 *
5667 * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}
5668 * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}
5669 */
5670module.exports = _curry2(function pick(names, obj) {
5671 var result = {};
5672 var idx = 0;
5673 while (idx < names.length) {
5674 if (names[idx] in obj) {
5675 result[names[idx]] = obj[names[idx]];
5676 }
5677 idx += 1;
5678 }
5679 return result;
5680});
5681
5682
5683/***/ }),
5684/* 131 */
5685/***/ (function(module, exports, __webpack_require__) {
5686
5687var _assign = __webpack_require__(132);
5688var _curry2 = __webpack_require__(0);
5689
5690
5691/**
5692 * Create a new object with the own properties of the first object merged with
5693 * the own properties of the second object. If a key exists in both objects,
5694 * the value from the second object will be used.
5695 *
5696 * @func
5697 * @memberOf R
5698 * @since v0.1.0
5699 * @category Object
5700 * @sig {k: v} -> {k: v} -> {k: v}
5701 * @param {Object} l
5702 * @param {Object} r
5703 * @return {Object}
5704 * @see R.mergeDeepRight, R.mergeWith, R.mergeWithKey
5705 * @example
5706 *
5707 * R.merge({ 'name': 'fred', 'age': 10 }, { 'age': 40 });
5708 * //=> { 'name': 'fred', 'age': 40 }
5709 *
5710 * var resetToDefault = R.merge(R.__, {x: 0});
5711 * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2}
5712 * @symb R.merge({ x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: 5, z: 3 }
5713 */
5714module.exports = _curry2(function merge(l, r) {
5715 return _assign({}, l, r);
5716});
5717
5718
5719/***/ }),
5720/* 132 */
5721/***/ (function(module, exports, __webpack_require__) {
5722
5723var _objectAssign = __webpack_require__(133);
5724
5725module.exports =
5726 typeof Object.assign === 'function' ? Object.assign : _objectAssign;
5727
5728
5729/***/ }),
5730/* 133 */
5731/***/ (function(module, exports, __webpack_require__) {
5732
5733var _has = __webpack_require__(7);
5734
5735// Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
5736module.exports = function _objectAssign(target) {
5737 if (target == null) {
5738 throw new TypeError('Cannot convert undefined or null to object');
5739 }
5740
5741 var output = Object(target);
5742 var idx = 1;
5743 var length = arguments.length;
5744 while (idx < length) {
5745 var source = arguments[idx];
5746 if (source != null) {
5747 for (var nextKey in source) {
5748 if (_has(nextKey, source)) {
5749 output[nextKey] = source[nextKey];
5750 }
5751 }
5752 }
5753 idx += 1;
5754 }
5755 return output;
5756};
5757
5758
5759/***/ }),
5760/* 134 */
5761/***/ (function(module, exports, __webpack_require__) {
5762
5763"use strict";
5764
5765
5766exports.__esModule = true;
5767
5768var _helpers = __webpack_require__(4);
5769
5770var getSelectedValues = function getSelectedValues(options) {
5771 return Array.from(options).filter(function (option) {
5772 return option.selected;
5773 }).map(function (option) {
5774 return option.value;
5775 });
5776};
5777var getValue = function getValue(ev) {
5778 if (!(0, _helpers.isEvent)(ev)) {
5779 return ev;
5780 }
5781 var target = ev.target;
5782 switch (target.type) {
5783 case 'checkbox':
5784 return target.checked;
5785 case 'file':
5786 return target.files;
5787 case 'select-multiple':
5788 return getSelectedValues(target.options);
5789 default:
5790 return target.value;
5791 }
5792};
5793exports.default = getValue;
5794
5795/***/ }),
5796/* 135 */
5797/***/ (function(module, exports, __webpack_require__) {
5798
5799"use strict";
5800
5801
5802exports.__esModule = true;
5803
5804var _path = __webpack_require__(42);
5805
5806var _path2 = _interopRequireDefault(_path);
5807
5808var _merge = __webpack_require__(10);
5809
5810var _merge2 = _interopRequireDefault(_merge);
5811
5812var _repeat = __webpack_require__(136);
5813
5814var _repeat2 = _interopRequireDefault(_repeat);
5815
5816var _map = __webpack_require__(43);
5817
5818var _map2 = _interopRequireDefault(_map);
5819
5820var _addIndex = __webpack_require__(138);
5821
5822var _addIndex2 = _interopRequireDefault(_addIndex);
5823
5824var _react = __webpack_require__(11);
5825
5826var React = _interopRequireWildcard(_react);
5827
5828var _propTypes = __webpack_require__(12);
5829
5830var PropTypes = _interopRequireWildcard(_propTypes);
5831
5832var _reactRedux = __webpack_require__(21);
5833
5834var _fieldArrayProps = __webpack_require__(140);
5835
5836var _fieldArrayProps2 = _interopRequireDefault(_fieldArrayProps);
5837
5838var _helpers = __webpack_require__(4);
5839
5840var _actions = __webpack_require__(26);
5841
5842var actions = _interopRequireWildcard(_actions);
5843
5844var _connectField = __webpack_require__(49);
5845
5846var _connectField2 = _interopRequireDefault(_connectField);
5847
5848function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
5849
5850function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
5851
5852function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5853
5854function _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; }
5855
5856function _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; }
5857
5858var RindexMap = (0, _addIndex2.default)(_map2.default);
5859function fieldArray(Component) {
5860 var FieldArray = function (_React$PureComponent) {
5861 _inherits(FieldArray, _React$PureComponent);
5862
5863 function FieldArray(props) {
5864 _classCallCheck(this, FieldArray);
5865
5866 var _this = _possibleConstructorReturn(this, _React$PureComponent.call(this, props));
5867
5868 _this.handleMap = _this.handleMap.bind(_this);
5869 _this.handlePush = _this.handlePush.bind(_this);
5870 _this.handlePop = _this.handlePop.bind(_this);
5871 _this.handleUnshift = _this.handleUnshift.bind(_this);
5872 _this.handleShift = _this.handleShift.bind(_this);
5873 _this.handleInsert = _this.handleInsert.bind(_this);
5874 _this.handleRemove = _this.handleRemove.bind(_this);
5875 _this.handleSwap = _this.handleSwap.bind(_this);
5876 _this.handleMove = _this.handleMove.bind(_this);
5877 return _this;
5878 }
5879
5880 FieldArray.prototype.componentWillMount = function componentWillMount() {
5881 var _props = this.props,
5882 _form = _props._form,
5883 name = _props.name,
5884 _array = _props._array,
5885 _addArray = _props._addArray;
5886
5887 if (!_array) {
5888 _addArray(_form, name);
5889 }
5890 };
5891
5892 FieldArray.prototype.handleMap = function handleMap(fn) {
5893 var _props2 = this.props,
5894 name = _props2.name,
5895 _array = _props2._array;
5896
5897 if (!(0, _helpers.isNumber)(_array)) {
5898 return [];
5899 }
5900 var array = (0, _repeat2.default)(null, _array);
5901 return RindexMap(fn, RindexMap(function (_, i) {
5902 return name + '.' + i;
5903 }, array));
5904 };
5905
5906 FieldArray.prototype.handlePush = function handlePush() {
5907 var _props3 = this.props,
5908 _form = _props3._form,
5909 name = _props3.name,
5910 _arrayPush = _props3._arrayPush;
5911
5912 _arrayPush(_form, name);
5913 };
5914
5915 FieldArray.prototype.handlePop = function handlePop() {
5916 var _props4 = this.props,
5917 _form = _props4._form,
5918 name = _props4.name,
5919 _array = _props4._array,
5920 _arrayPop = _props4._arrayPop;
5921
5922 if ((0, _helpers.isNumber)(_array) && _array > 0) {
5923 _arrayPop(_form, name);
5924 }
5925 };
5926
5927 FieldArray.prototype.handleUnshift = function handleUnshift() {
5928 var _props5 = this.props,
5929 _form = _props5._form,
5930 name = _props5.name,
5931 _arrayUnshift = _props5._arrayUnshift;
5932
5933 _arrayUnshift(_form, name);
5934 };
5935
5936 FieldArray.prototype.handleShift = function handleShift() {
5937 var _props6 = this.props,
5938 _form = _props6._form,
5939 name = _props6.name,
5940 _array = _props6._array,
5941 _arrayShift = _props6._arrayShift;
5942
5943 if ((0, _helpers.isNumber)(_array) && _array > 0) {
5944 _arrayShift(_form, name);
5945 }
5946 };
5947
5948 FieldArray.prototype.handleInsert = function handleInsert(index) {
5949 var _props7 = this.props,
5950 _form = _props7._form,
5951 name = _props7.name,
5952 _arrayInsert = _props7._arrayInsert;
5953
5954 _arrayInsert(_form, name, index);
5955 };
5956
5957 FieldArray.prototype.handleRemove = function handleRemove(index) {
5958 var _props8 = this.props,
5959 _form = _props8._form,
5960 name = _props8.name,
5961 _arrayRemove = _props8._arrayRemove;
5962
5963 _arrayRemove(_form, name, index);
5964 };
5965
5966 FieldArray.prototype.handleSwap = function handleSwap(index1, index2) {
5967 var _props9 = this.props,
5968 _form = _props9._form,
5969 name = _props9.name,
5970 _arraySwap = _props9._arraySwap;
5971
5972 _arraySwap(_form, name, index1, index2);
5973 };
5974
5975 FieldArray.prototype.handleMove = function handleMove(from, to) {
5976 var _props10 = this.props,
5977 _form = _props10._form,
5978 name = _props10.name,
5979 _arrayMove = _props10._arrayMove;
5980
5981 _arrayMove(_form, name, from, to);
5982 };
5983
5984 FieldArray.prototype.render = function render() {
5985 var _array = this.props._array;
5986
5987 if (!(0, _helpers.isNumber)(_array)) {
5988 return null;
5989 }
5990 // TODO SFC not compatibile with class... wtf TS
5991 return React.createElement(Component, (0, _merge2.default)((0, _fieldArrayProps2.default)(this.props), {
5992 fields: {
5993 length: _array,
5994 map: this.handleMap,
5995 push: this.handlePush,
5996 pop: this.handlePop,
5997 unshift: this.handleUnshift,
5998 shift: this.handleShift,
5999 insert: this.handleInsert,
6000 remove: this.handleRemove,
6001 swap: this.handleSwap,
6002 move: this.handleMove
6003 }
6004 }));
6005 };
6006
6007 return FieldArray;
6008 }(React.PureComponent);
6009
6010 FieldArray.propTypes = {
6011 name: PropTypes.string.isRequired
6012 };
6013 var connector = (0, _reactRedux.connect)(function (state, props) {
6014 return {
6015 _array: (0, _path2.default)([props._form, 'arrays', props.name], state.reduxForms)
6016 };
6017 }, {
6018 _addArray: actions.addArray,
6019 _arrayPush: actions.arrayPush,
6020 _arrayPop: actions.arrayPop,
6021 _arrayUnshift: actions.arrayUnshift,
6022 _arrayShift: actions.arrayShift,
6023 _arrayInsert: actions.arrayInsert,
6024 _arrayRemove: actions.arrayRemove,
6025 _arraySwap: actions.arraySwap,
6026 _arrayMove: actions.arrayMove
6027 });
6028 // TODO SFC not compatibile with class... wtf TS
6029 var Connected = connector(FieldArray);
6030 var Contexted = (0, _connectField2.default)(Connected);
6031 Contexted.displayName = 'fieldArray(' + (Component.displayName || 'Component') + ')';
6032 return Contexted;
6033}
6034exports.default = fieldArray;
6035
6036/***/ }),
6037/* 136 */
6038/***/ (function(module, exports, __webpack_require__) {
6039
6040var _curry2 = __webpack_require__(3);
6041var always = __webpack_require__(47);
6042var times = __webpack_require__(137);
6043
6044
6045/**
6046 * Returns a fixed list of size `n` containing a specified identical value.
6047 *
6048 * @func
6049 * @memberOf R
6050 * @since v0.1.1
6051 * @category List
6052 * @sig a -> n -> [a]
6053 * @param {*} value The value to repeat.
6054 * @param {Number} n The desired size of the output list.
6055 * @return {Array} A new array containing `n` `value`s.
6056 * @see R.times
6057 * @example
6058 *
6059 * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi']
6060 *
6061 * var obj = {};
6062 * var repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}]
6063 * repeatedObjs[0] === repeatedObjs[1]; //=> true
6064 * @symb R.repeat(a, 0) = []
6065 * @symb R.repeat(a, 1) = [a]
6066 * @symb R.repeat(a, 2) = [a, a]
6067 */
6068module.exports = _curry2(function repeat(value, n) {
6069 return times(always(value), n);
6070});
6071
6072
6073/***/ }),
6074/* 137 */
6075/***/ (function(module, exports, __webpack_require__) {
6076
6077var _curry2 = __webpack_require__(3);
6078
6079
6080/**
6081 * Calls an input function `n` times, returning an array containing the results
6082 * of those function calls.
6083 *
6084 * `fn` is passed one argument: The current value of `n`, which begins at `0`
6085 * and is gradually incremented to `n - 1`.
6086 *
6087 * @func
6088 * @memberOf R
6089 * @since v0.2.3
6090 * @category List
6091 * @sig (Number -> a) -> Number -> [a]
6092 * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`.
6093 * @param {Number} n A value between `0` and `n - 1`. Increments after each function call.
6094 * @return {Array} An array containing the return values of all calls to `fn`.
6095 * @see R.repeat
6096 * @example
6097 *
6098 * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4]
6099 * @symb R.times(f, 0) = []
6100 * @symb R.times(f, 1) = [f(0)]
6101 * @symb R.times(f, 2) = [f(0), f(1)]
6102 */
6103module.exports = _curry2(function times(fn, n) {
6104 var len = Number(n);
6105 var idx = 0;
6106 var list;
6107
6108 if (len < 0 || isNaN(len)) {
6109 throw new RangeError('n must be a non-negative number');
6110 }
6111 list = new Array(len);
6112 while (idx < len) {
6113 list[idx] = fn(idx);
6114 idx += 1;
6115 }
6116 return list;
6117});
6118
6119
6120/***/ }),
6121/* 138 */
6122/***/ (function(module, exports, __webpack_require__) {
6123
6124var _concat = __webpack_require__(139);
6125var _curry1 = __webpack_require__(1);
6126var curryN = __webpack_require__(46);
6127
6128
6129/**
6130 * Creates a new list iteration function from an existing one by adding two new
6131 * parameters to its callback function: the current index, and the entire list.
6132 *
6133 * This would turn, for instance, [`R.map`](#map) function into one that
6134 * more closely resembles `Array.prototype.map`. Note that this will only work
6135 * for functions in which the iteration callback function is the first
6136 * parameter, and where the list is the last parameter. (This latter might be
6137 * unimportant if the list parameter is not used.)
6138 *
6139 * @func
6140 * @memberOf R
6141 * @since v0.15.0
6142 * @category Function
6143 * @category List
6144 * @sig ((a ... -> b) ... -> [a] -> *) -> (a ..., Int, [a] -> b) ... -> [a] -> *)
6145 * @param {Function} fn A list iteration function that does not pass index or list to its callback
6146 * @return {Function} An altered list iteration function that passes (item, index, list) to its callback
6147 * @example
6148 *
6149 * var mapIndexed = R.addIndex(R.map);
6150 * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']);
6151 * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r']
6152 */
6153module.exports = _curry1(function addIndex(fn) {
6154 return curryN(fn.length, function() {
6155 var idx = 0;
6156 var origFn = arguments[0];
6157 var list = arguments[arguments.length - 1];
6158 var args = Array.prototype.slice.call(arguments, 0);
6159 args[0] = function() {
6160 var result = origFn.apply(this, _concat(arguments, [idx, list]));
6161 idx += 1;
6162 return result;
6163 };
6164 return fn.apply(this, args);
6165 });
6166});
6167
6168
6169/***/ }),
6170/* 139 */
6171/***/ (function(module, exports) {
6172
6173/**
6174 * Private `concat` function to merge two array-like objects.
6175 *
6176 * @private
6177 * @param {Array|Arguments} [set1=[]] An array-like object.
6178 * @param {Array|Arguments} [set2=[]] An array-like object.
6179 * @return {Array} A new, merged array.
6180 * @example
6181 *
6182 * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]
6183 */
6184module.exports = function _concat(set1, set2) {
6185 set1 = set1 || [];
6186 set2 = set2 || [];
6187 var idx;
6188 var len1 = set1.length;
6189 var len2 = set2.length;
6190 var result = [];
6191
6192 idx = 0;
6193 while (idx < len1) {
6194 result[result.length] = set1[idx];
6195 idx += 1;
6196 }
6197 idx = 0;
6198 while (idx < len2) {
6199 result[result.length] = set2[idx];
6200 idx += 1;
6201 }
6202 return result;
6203};
6204
6205
6206/***/ }),
6207/* 140 */
6208/***/ (function(module, exports, __webpack_require__) {
6209
6210"use strict";
6211
6212
6213exports.__esModule = true;
6214
6215var _omit = __webpack_require__(25);
6216
6217var _omit2 = _interopRequireDefault(_omit);
6218
6219function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6220
6221var IGNORE_PROPS = ['_form', '_array', '_addArray', '_arrayPush', '_arrayPop', '_arrayUnshift', '_arrayShift', '_arrayInsert', '_arrayRemove', '_arraySwap', '_arrayMove'];
6222var clearProps = function clearProps(all) {
6223 return (0, _omit2.default)(IGNORE_PROPS, all);
6224};
6225exports.default = clearProps;
6226
6227/***/ })
6228/******/ ]);
6229});
\No newline at end of file