redux-form
Advanced tools
Comparing version 3.0.12 to 3.1.0
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReduxForm=e(require("react")):t.ReduxForm=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(22),u=n(o),i=r(24),a=n(i),s=a.default(!1,u.default),c=s.actionTypes,f=s.blur,l=s.change,d=s.destroy,p=s.focus,h=s.reducer,y=s.reduxForm,v=s.initialize,m=s.initializeWithKey,b=s.reset,g=s.startAsyncValidation,_=s.startSubmit,O=s.stopAsyncValidation,S=s.stopSubmit,x=s.touch,T=s.untouch;e.actionTypes=c,e.blur=f,e.change=l,e.destroy=d,e.focus=p,e.reducer=h,e.reduxForm=y,e.initialize=v,e.initializeWithKey=m,e.reset=b,e.startAsyncValidation=g,e.startSubmit=_,e.stopAsyncValidation=O,e.stopSubmit=S,e.touch=x,e.untouch=T},function(t,e){"use strict";function r(t){return Array.isArray(t)?t.reduce(function(t,e){return t&&r(e)},!0):t&&"object"==typeof t?Object.keys(t).reduce(function(e,n){return e&&r(t[n])},!0):!t}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r="redux-form/BLUR";e.BLUR=r;var n="redux-form/CHANGE";e.CHANGE=n;var o="redux-form/DESTROY";e.DESTROY=o;var u="redux-form/FOCUS";e.FOCUS=u;var i="redux-form/INITIALIZE";e.INITIALIZE=i;var a="redux-form/RESET";e.RESET=a;var s="redux-form/START_ASYNC_VALIDATION";e.START_ASYNC_VALIDATION=s;var c="redux-form/START_SUBMIT";e.START_SUBMIT=c;var f="redux-form/STOP_ASYNC_VALIDATION";e.STOP_ASYNC_VALIDATION=f;var l="redux-form/STOP_SUBMIT";e.STOP_SUBMIT=l;var d="redux-form/SUBMIT_FAILED";e.SUBMIT_FAILED=d;var p="redux-form/TOUCH";e.TOUCH=p;var h="redux-form/UNTOUCH";e.UNTOUCH=h},function(t,e){"use strict";function r(t,e){return t?Object.keys(t).reduce(function(r,o){var u;return n({},r,(u={},u[o]=e(t[o],o),u))},{}):t}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=r,t.exports=e.default},function(t,e){function r(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then}t.exports=r},function(t,e,r){"use strict";function n(t,e){return{type:v.BLUR,field:t,value:e}}function o(t,e){return{type:v.CHANGE,field:t,value:e}}function u(){return{type:v.DESTROY}}function i(t){return{type:v.FOCUS,field:t}}function a(t){return{type:v.INITIALIZE,data:t}}function s(){return{type:v.RESET}}function c(){return{type:v.START_ASYNC_VALIDATION}}function f(){return{type:v.START_SUBMIT}}function l(t){return{type:v.STOP_ASYNC_VALIDATION,errors:t}}function d(t){return{type:v.STOP_SUBMIT,errors:t}}function p(){return{type:v.SUBMIT_FAILED}}function h(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:v.TOUCH,fields:e}}function y(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:v.UNTOUCH,fields:e}}e.__esModule=!0,e.blur=n,e.change=o,e.destroy=u,e.focus=i,e.initialize=a,e.reset=s,e.startAsyncValidation=c,e.startSubmit=f,e.stopAsyncValidation=l,e.stopSubmit=d,e.submitFailed=p,e.touch=h,e.untouch=y;var v=r(2)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return"function"==typeof t?function(){return u({},t.apply(void 0,arguments),e)}:"object"==typeof t?a.default(t,function(t){return o(t,e)}):t}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=o;var i=r(3),a=n(i);t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r="value";e.dataKey=r;var n=function(t,e){return function(t){t.dataTransfer.setData(r,e())}};e.default=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(9),u=n(o),i=function(t){var e=[];if(t)for(var r=0;r<t.length;r++){var n=t[r];n.selected&&e.push(n.value)}return e},a=function(t,e){if(u.default(t)){if(!e&&t.nativeEvent&&void 0!==t.nativeEvent.text)return t.nativeEvent.text;if(e&&void 0!==t.nativeEvent)return t.nativeEvent.text;var r=t.target,n=r.type,o=r.value,a=r.checked,s=r.files,c=t.dataTransfer;return"checkbox"===n?a:"file"===n?s||c&&c.files:"select-multiple"===n?i(t.target.options):o}return t&&"object"==typeof t&&void 0!==t.value?t.value:t};e.default=a,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t){return!!(t&&t.stopPropagation&&t.preventDefault)};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(9),u=n(o),i=function(t){var e=u.default(t);return e&&t.preventDefault(),e};e.default=i,t.exports=e.default},function(t,e){"use strict";function r(t){return t.displayName||t.name||"Component"}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t,e){return t.reduce(function(t,r){return t[r]=e[r]?e[r].value:void 0,t},{})};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function u(){var t,e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r.form,u=r.key,i=o(r,["form","key"]);if(!n)return e;if(u){var c,f;if(r.type===s.DESTROY){var l;return a({},e,(l={},l[n]=e[n]&&Object.keys(e[n]).reduce(function(t,r){var o;return r===u?t:a({},t,(o={},o[r]=e[n][r],o))},{}),l))}return a({},e,(f={},f[n]=a({},e[n],(c={},c[u]=p((e[n]||{})[u],i),c)),f))}return r.type===s.DESTROY?Object.keys(e).reduce(function(t,r){var o;return r===n?t:a({},t,(o={},o[r]=e[r],o))},{}):a({},e,(t={},t[n]=p(e[n],i),t))}function i(t){return t.plugin=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=e(r,n);return a({},o,f.default(t,function(t,e){return t(o[e]||l,n)}))})},t.normalize=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=e(r,n);return a({},o,f.default(t,function(t,e){var n=d(a({},l,r[e])),u=a({},l,o[e]);return a({},u,f.default(t,function(t,o){return a({},u[o],{value:t(u[o]?u[o].value:void 0,r[e]&&r[e][o]?r[e][o].value:void 0,d(u),n)})}))}))})},t}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},s=r(2),c=r(3),f=n(c),l={_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1,_submitFailed:!1};e.initialState=l;var d=function(t){return Object.keys(t).reduce(function(e,r){return"_"!==r[0]&&(e[r]=t[r].value),e},{})};e.getValues=d;var p=function(){var t,e,r,n=arguments.length<=0||void 0===arguments[0]?l:arguments[0],o=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];switch(o.type){case s.BLUR:return a({},n,(t={},t[o.field]=a({},n[o.field],{value:void 0===o.value?(n[o.field]||{}).value:o.value,touched:!(!o.touch&&!(n[o.field]||{}).touched)}),t._active=void 0,t));case s.CHANGE:return a({},n,(e={},e[o.field]=a({},n[o.field],{value:o.value,touched:!(!o.touch&&!(n[o.field]||{}).touched),asyncError:void 0,submitError:void 0}),e));case s.DESTROY:return void 0;case s.FOCUS:return a({},n,(r={},r[o.field]=a({},n[o.field],{visited:!0}),r._active=o.field,r));case s.INITIALIZE:return a({},f.default(o.data,function(t){return{initial:t,value:t}}),{_asyncValidating:!1,_active:void 0,_error:void 0,_submitting:!1,_submitFailed:!1});case s.RESET:return a({},f.default(n,function(t,e){return"_"===e[0]?t:{initial:t.initial,value:t.initial}}),{_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1,_submitFailed:!1});case s.START_ASYNC_VALIDATION:return a({},n,{_asyncValidating:!0});case s.START_SUBMIT:return a({},n,{_submitting:!0});case s.STOP_ASYNC_VALIDATION:return a({},f.default(n,function(t){return t&&t.asyncError?a({},t,{asyncError:void 0}):t}),f.default(o.errors,function(t,e){return a({},n[e],{asyncError:t})}),{_asyncValidating:!1,_error:o.errors&&o.errors._error});case s.STOP_SUBMIT:return a({},n,o.errors?f.default(o.errors,function(t,e){return a({},n[e],{submitError:t})}):{},{_error:o.errors&&o.errors._error,_submitting:!1,_submitFailed:!(!o.errors||!Object.keys(o.errors).length)});case s.SUBMIT_FAILED:return a({},n,{_submitFailed:!0});case s.TOUCH:return a({},n,o.fields.reduce(function(t,e){return t[e]=a({},n[e],{touched:!0}),t},{}));case s.UNTOUCH:return a({},n,o.fields.reduce(function(t,e){return t[e]=a({},n[e],{touched:!1}),t},{}));default:return n}};e.default=i(u)},function(t,e,r){function n(t){return null===t||void 0===t}function o(t){return t&&"object"==typeof t&&"number"==typeof t.length?"function"!=typeof t.copy||"function"!=typeof t.slice?!1:t.length>0&&"number"!=typeof t[0]?!1:!0:!1}function u(t,e,r){var u,f;if(n(t)||n(e))return!1;if(t.prototype!==e.prototype)return!1;if(s(t))return s(e)?(t=i.call(t),e=i.call(e),c(t,e,r)):!1;if(o(t)){if(!o(e))return!1;if(t.length!==e.length)return!1;for(u=0;u<t.length;u++)if(t[u]!==e[u])return!1;return!0}try{var l=a(t),d=a(e)}catch(p){return!1}if(l.length!=d.length)return!1;for(l.sort(),d.sort(),u=l.length-1;u>=0;u--)if(l[u]!=d[u])return!1;for(u=l.length-1;u>=0;u--)if(f=l[u],!c(t[f],e[f],r))return!1;return typeof t==typeof e}var i=Array.prototype.slice,a=r(40),s=r(39),c=t.exports=function(t,e,r){return r||(r={}),t===e?!0:t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?r.strict?t===e:t==e:u(t,e,r)}},function(t,e){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};t.exports=function(t,e){for(var o=Object.getOwnPropertyNames(e),u=0;u<o.length;++u)r[o[u]]||n[o[u]]||(t[o[u]]=e[o[u]]);return t}},function(t,e){"use strict";function r(t){return t.shape({subscribe:t.func.isRequired,dispatch:t.func.isRequired,getState:t.func.isRequired})}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){function r(){return c}function n(t){f.push(t);var e=!0;return function(){if(e){e=!1;var r=f.indexOf(t);f.splice(r,1)}}}function o(t){if(!i.default(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,c=s(c,t)}finally{l=!1}return f.slice().forEach(function(t){return t()}),t}function u(t){s=t,o({type:a.INIT})}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var s=t,c=e,f=[],l=!1;return o({type:a.INIT}),{dispatch:o,subscribe:n,getState:r,replaceReducer:u}}e.__esModule=!0,e.default=o;var u=r(20),i=n(u),a={INIT:"@@redux/INIT"};e.ActionTypes=a},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(17),u=n(o),i=r(53),a=n(i),s=r(52),c=n(s),f=r(51),l=n(f),d=r(19),p=n(d);e.createStore=u.default,e.combineReducers=a.default,e.bindActionCreators=c.default,e.applyMiddleware=l.default,e.compose=p.default},function(t,e){"use strict";function r(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return e.reduceRight(function(t,e){return e(t)},t)}}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return r[n]=e(t[n],n),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default},function(e,r){e.exports=t},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(4),u=n(o),i=r(1),a=n(i),s=function(t,e,r){e();var n=t();if(!u.default(n))throw new Error("asyncValidate function passed to reduxForm must return a promise");var o=function(t){return function(e){if(!a.default(e))return r(e),Promise.reject();if(t)throw r(),new Error("Asynchronous validation promise was rejected without errors.");return r(),Promise.resolve()}};return n.then(o(!1),o(!0))};e.default=s,t.exports=e.default},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){return{actionTypes:b,blur:_,change:O,destroy:S,focus:x,reducer:s.default,initialize:T,initializeWithKey:j,reduxForm:f.default(t,e),reset:M,startAsyncValidation:P,startSubmit:w,stopAsyncValidation:A,stopSubmit:E,submitFailed:R,touch:I,untouch:C}}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=u;var a=r(13),s=o(a),c=r(26),f=o(c),l=r(3),d=o(l),p=r(6),h=o(p),y=r(5),v=n(y),m=r(2),b=n(m),g=i({},d.default(i({},v,{initializeWithKey:function(t,e){return h.default(v.initialize,{key:t})(e)},destroy:function(t){return h.default(v.destroy,{key:t})()}}),function(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];return h.default(t,{form:e}).apply(void 0,n)}})),_=g.blur,O=g.change,S=g.destroy,x=g.focus,T=g.initialize,j=g.initializeWithKey,M=g.reset,P=g.startAsyncValidation,w=g.startSubmit,A=g.stopAsyncValidation,E=g.stopSubmit,R=g.submitFailed,I=g.touch,C=g.untouch;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function u(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},c=r(47),f=r(5),l=o(f),d=r(11),p=n(d),h=r(13),y=r(14),v=n(y),m=r(6),b=n(m),g=r(12),_=n(g),O=r(1),S=n(O),x=r(35),T=n(x),j=r(33),M=n(j),P=r(23),w=n(P),A=r(32),E=n(A),R=r(10),I=n(R),C=r(37),V=n(C),N=r(38),F=n(N),U=function(t,e,r,n,o,f){var d=r.Component,y=r.PropTypes;return function(m,g,O,x){var j=function(o){function c(t){i(this,c),o.call(this,t),this.asyncValidate=this.asyncValidate.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.fields=T.default(t,{},this.asyncValidate,e)}return a(c,o),c.prototype.componentWillMount=function(){var t=this.props,e=t.initialize,r=t.initialValues;r&&e(r)},c.prototype.componentWillReceiveProps=function(t){v.default(this.props.fields,t.fields)&&v.default(this.props.form,t.form)||(this.fields=T.default(t,this.fields,this.asyncValidate,e)),v.default(this.props.initialValues,t.initialValues)||this.props.initialize(t.initialValues)},c.prototype.componentWillUnmount=function(){t.destroyOnUnmount&&this.props.destroy()},c.prototype.asyncValidate=function f(t,e){var r=this,n=this.props,f=n.asyncValidate,o=n.dispatch,u=n.fields,i=n.form,a=n.startAsyncValidation,s=n.stopAsyncValidation,c=n.validate;if(f){var l=function(){var n=_.default(u,i);t&&(n[t]=e);var l=c(n,r.props);return!t||S.default(l[t])?{v:w.default(function(){return f(n,o,r.props)},a,s)}:void 0}();if("object"==typeof l)return l.v}},c.prototype.handleSubmit=function(t){var e=this,r=this.props,n=r.onSubmit,o=r.fields,u=r.form,i=function(t){if(!t||"function"!=typeof t)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return t},a=_.default(o,u);return!t||I.default(t)?M.default(i(n),a,this.props,this.asyncValidate):E.default(function(r){I.default(r),M.default(i(t),a,e.props,e.asyncValidate)})},c.prototype.render=function(){var t=this,e=this.fields,o=this.props,i=(o.asyncBlurFields,o.blur,o.change,o.destroy),a=(o.focus,o.fields),c=o.form,f=(o.initialValues,o.initialize),l=(o.onSubmit,o.reset),d=(o.returnRejectedSubmitPromise,o.startAsyncValidation,o.startSubmit,o.stopAsyncValidation,o.stopSubmit,o.submitFailed,o.touch),p=o.untouch,h=(o.validate,u(o,["asyncBlurFields","blur","change","destroy","focus","fields","form","initialValues","initialize","onSubmit","reset","returnRejectedSubmitPromise","startAsyncValidation","startSubmit","stopAsyncValidation","stopSubmit","submitFailed","touch","untouch","validate"])),y=e._meta,v=y.allPristine,m=y.allValid,b=y.errors,g=y.formError,_=y.values;return r.createElement(n,s({},h,{active:c._active,asyncValidating:c._asyncValidating,dirty:!v,error:g,errors:b,fields:e,formKey:O,invalid:!m,pristine:v,submitting:c._submitting,submitFailed:c._submitFailed,valid:m,values:_,asyncValidate:E.default(function(){return t.asyncValidate()}),destroyForm:E.default(i),handleSubmit:this.handleSubmit,initializeForm:E.default(f),resetForm:E.default(l),touch:E.default(function(){return d.apply(void 0,arguments)}),touchAll:E.default(function(){return d.apply(void 0,a)}),untouch:E.default(function(){return p.apply(void 0,arguments)}),untouchAll:E.default(function(){return p.apply(void 0,a)})}))},c}(d);j.displayName="ReduxForm("+p.default(n)+")",j.WrappedComponent=n,j.propTypes={asyncBlurFields:y.arrayOf(y.string),asyncValidate:y.func,dispatch:y.func.isRequired,fields:y.arrayOf(y.string).isRequired,form:y.object,initialValues:y.any,onSubmit:y.func,validate:y.func,readonly:y.bool,returnRejectedSubmitPromise:y.bool,blur:y.func.isRequired,change:y.func.isRequired,destroy:y.func.isRequired,focus:y.func.isRequired,initialize:y.func.isRequired,reset:y.func.isRequired,startAsyncValidation:y.func.isRequired,startSubmit:y.func.isRequired,stopAsyncValidation:y.func.isRequired,stopSubmit:y.func.isRequired,submitFailed:y.func.isRequired,touch:y.func.isRequired,untouch:y.func.isRequired},j.defaultProps={asyncBlurFields:[],form:h.initialState,readonly:!1,returnRejectedSubmitPromise:!1,validate:function(){return{}}};var P=s({},l,{blur:b.default(l.blur,{touch:!!t.touchOnBlur}),change:b.default(l.change,{touch:!!t.touchOnChange})}),A=void 0!==O&&null!==O?c.connect(F.default(o,function(t){var e=x(t,m);if(!e)throw new Error('You need to mount the redux-form reducer at "'+m+'"');return e&&e[g]&&e[g][O]}),V.default(f,b.default(P,{form:g,key:O}))):c.connect(F.default(o,function(t){var e=x(t,m);if(!e)throw new Error('You need to mount the redux-form reducer at "'+m+'"');return e&&e[g]}),V.default(f,b.default(P,{form:g})));return A(j)}};e.default=U,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a=r(27),s=n(a),c=r(15),f=n(c),l=function(t,e){var r=e.Component,n=s.default(t,e);return function(t,a,s){return function(c){var l=n(c,a,s),d=i({touchOnBlur:!0,touchOnChange:!1,destroyOnUnmount:!0},t),p=function(t){function r(){o(this,r),t.apply(this,arguments)}return u(r,t),r.prototype.render=function(){return e.createElement(l,i({},d,this.props))},r}(r);return f.default(p,c)}}};e.default=l,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=r(42),s=n(a),c=r(11),f=n(c),l=r(25),d=n(l),p=function(t,e){return function(r,n,a){var c=e.Component,l=e.PropTypes,p=function(c){function f(o){u(this,f),c.call(this,o),this.cache=s.default(this,{ReduxForm:{params:["reduxMountPoint","form","formKey","getFormState"],fn:d.default(o,t,e,r,n,a)}})}return i(f,c),f.prototype.componentWillReceiveProps=function(t){this.cache.componentWillReceiveProps(t)},f.prototype.render=function(){var t=this.cache.ReduxForm,r=this.props,n=(r.reduxMountPoint,r.destroyOnUnmount,r.form,r.getFormState,r.touchOnBlur,r.touchOnChange,o(r,["reduxMountPoint","destroyOnUnmount","form","getFormState","touchOnBlur","touchOnChange"]));return e.createElement(t,n)},f}(c);return p.displayName="ReduxFormConnector("+f.default(r)+")",p.WrappedComponent=r,p.propTypes={destroyOnUnmount:l.bool,reduxMountPoint:l.string,form:l.string.isRequired,formKey:l.string,getFormState:l.func,touchOnBlur:l.bool,touchOnChange:l.bool},p.defaultProps={reduxMountPoint:"form",getFormState:function(t,e){return t[e]}},p}};e.default=p,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(8),u=n(o),i=function(t,e,r,n){return function(o){var i=u.default(o,r);e(t,i),n&&n(t,i)}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(8),u=n(o),i=function(t,e,r){return function(n){return e(t,u.default(n,r))}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=r(7),o=function(t,e){return function(r){e(t,r.dataTransfer.getData(n.dataKey))}};e.default=o,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t,e){return function(){return e(t)}};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(10),u=n(o),i=function(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;r>o;o++)n[o-1]=arguments[o];return u.default(e)?t.apply(void 0,n):t.apply(void 0,[e].concat(n))}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(4),u=n(o),i=r(1),a=n(i),s=function(t,e,r,n){var o=r.dispatch,i=r.fields,s=r.startSubmit,c=r.stopSubmit,f=r.submitFailed,l=r.returnRejectedSubmitPromise,d=r.touch,p=r.validate,h=p(e,r);if(d.apply(void 0,i),a.default(h)){var y=function(){var r=t(e,o);return u.default(r)?(s(),r.then(function(t){return c(),t},function(t){return c(t),l?Promise.reject(t):void 0})):r},v=n();return u.default(v)?v.then(y,function(){return f(),l?Promise.reject():Promise.resolve()}):y()}f()};e.default=s,t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;if("boolean"==typeof t||"boolean"==typeof e)return t===e;if(t instanceof Date&&e instanceof Date)return t.getDate()===e.getDate();if(t&&"object"==typeof t){if(!e||"object"!=typeof e)return!1;var n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;for(var u=0;u<o.length;u++){var i=o[u];if(!r(t[i],e[i]))return!1}}else if(t||e)return t===e;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},u=r(28),i=n(u),a=r(29),s=n(a),c=r(7),f=n(c),l=r(30),d=n(l),p=r(31),h=n(p),y=r(34),v=n(y),m=r(1),b=n(m),g=r(12),_=n(g),O=r(36),S=n(O),x=function(t,e,r,n){var u=t.asyncBlurFields,a=t.blur,c=t.change,l=t.fields,p=t.focus,y=t.form,m=t.initialValues,g=t.readonly,O=t.validate,x=_.default(l,y),T=O(x,t),j={},M=T._error||y._error,P=!M,w=!0,A=l.reduce(function(t,l){var _=e[l]||{},O={};if(_.name!==l){var x=s.default(l,c,n),M=m&&m[l];_.name=l,_.defaultChecked=M===!0,_.defaultValue=M,g||(_.onBlur=i.default(l,a,n,~u.indexOf(l)&&function(t,e){return S.default(r(t,e))}),_.onChange=x,_.onDragStart=f.default(l,function(){return _.value}),_.onDrop=d.default(l,c),_.onFocus=h.default(l,p),_.onUpdate=x),_.valid=!0,_.invalid=!1}var A=y[l]||{};_.value!==A.value&&(O.value=A.value,O.checked="boolean"==typeof A.value?A.value:void 0);var E=v.default(A.value,A.initial);_.pristine!==E&&(O.dirty=!E,O.pristine=E);var R=T[l]||A.submitError||A.asyncError;R!==_.error&&(O.error=R);var I=b.default(R);_.valid!==I&&(O.invalid=!I,O.valid=I),R&&(j[l]=R);var C=y._active===l;C!==_.active&&(O.active=C);var V=!!A.touched;V!==_.touched&&(O.touched=V);var N=!!A.visited;N!==_.visited&&(O.visited=N);var F=Object.keys(O).length?o({},_,O):_;return F.invalid&&(P=!1),F.dirty&&(w=!1),t[l]=F,t},{});return Object.defineProperty(A,"_meta",{value:{allPristine:w,allValid:P,values:x,errors:j,formError:M}}),A};e.default=x,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(4),u=n(o),i=function(){return void 0},a=function(t){return u.default(t)?t.then(i,i):t};e.default=a,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=r(18),u=function(t,e){return t?"function"==typeof t?t.length>1?function(r,u){return n({},t(r,u),o.bindActionCreators(e,r),{dispatch:r})}:function(r){return n({},t(r),o.bindActionCreators(e,r),{dispatch:r})}:function(r){return n({},o.bindActionCreators(t,r),o.bindActionCreators(e,r),{dispatch:r})}:function(t){return n({},o.bindActionCreators(e,t),{dispatch:t})}};e.default=u,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=function(t,e){if(t){if("function"!=typeof t)throw new Error("mapStateToProps must be a function");return t.length>1?function(n,o){return r({},t(n,o),{form:e(n)})}:function(n){return r({},t(n),{form:e(n)})}}return function(t){return{form:e(t)}}};e.default=n,t.exports=e.default},function(t,e){function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function n(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();e=t.exports=o?r:n,e.supported=r,e.unsupported=n},function(t,e){function r(t){var e=[];for(var r in t)e.push(r);return e}e=t.exports="function"==typeof Object.keys?Object.keys:r,e.shim=r},function(t,e,r){"use strict";var n=function(t,e,r,n,o,u,i,a){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,u,i,a],f=0;s=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return c[f++]}))}throw s.framesToPop=1,s}};t.exports=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(43),u=n(o);e.default=u.default,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var r=[],n={},o={},u=function a(t){Object.keys(n).forEach(function(e){~n[e].props.indexOf(t)&&(delete n[e].value,a(e))})};return Object.keys(e).forEach(function(u){var i=e[u].fn,a=e[u].params;a.forEach(function(t){~r.indexOf(t)||r.push(t)}),n[u]={props:a},Object.defineProperty(o,u,{get:function(){var e=n[u];if(e&&void 0!==e.value)return e.value;var r=a.map(function(e){return t.props[e]||o[e]}),s=i.apply(void 0,r);return n[u]={props:a,value:s},s}})}),o.componentWillReceiveProps=function(e){var n=[];r.forEach(function(r){i.default(t.props[r],e[r])||n.push(r)}),n.forEach(u)},o}e.__esModule=!0,e.default=o;var u=r(14),i=n(u);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=i.default(t),r=s.default(t);return{Provider:e,connect:r}}e.__esModule=!0,e.default=o;var u=r(46),i=n(u),a=r(45),s=n(a);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return t.displayName||t.name||"Component"}function a(t){var e=t.Component,r=t.PropTypes,n=f.default(r);return function(r,a,c){function f(t,e){var r=t.getState(),n=P?g(r,e):g(r);return _.default(h.default(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function l(t,e){var r=t.dispatch,n=w?j(r,e):j(r);return _.default(h.default(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function p(t,e,r){var n=M(t,e,r);return _.default(h.default(n),"`mergeProps` must return an object. Instead received %s.",n),n}var y=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],m=Boolean(r),g=r||O,j=h.default(a)?v.default(a):a||S,M=c||x,P=g.length>1,w=j.length>1,A=y.pure,E=void 0===A?!0:A,R=T++;return function(r){var a=function(e){function n(t,r){o(this,n),e.call(this,t,r),this.version=R,this.store=t.store||r.store,_.default(this.store,'Could not find "store" in either the context or '+('props of "'+this.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+this.constructor.displayName+'".')),this.stateProps=f(this.store,t),this.dispatchProps=l(this.store,t),this.state={storeState:null},this.updateState()}return u(n,e),n.prototype.shouldComponentUpdate=function(t,e){if(!E)return this.updateStateProps(t),this.updateDispatchProps(t),this.updateState(t),!0;var r=e.storeState!==this.state.storeState,n=!d.default(t,this.props),o=!1,u=!1;return(r||n&&P)&&(o=this.updateStateProps(t)),n&&w&&(u=this.updateDispatchProps(t)),n||o||u?(this.updateState(t),!0):!1; | ||
},n.prototype.computeNextState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];return p(this.stateProps,this.dispatchProps,t)},n.prototype.updateStateProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=f(this.store,t);return d.default(e,this.stateProps)?!1:(this.stateProps=e,!0)},n.prototype.updateDispatchProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=l(this.store,t);return d.default(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},n.prototype.updateState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];this.nextState=this.computeNextState(t)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){m&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},n.prototype.handleChange=function(){this.unsubscribe&&this.setState({storeState:this.store.getState()})},n.prototype.getWrappedInstance=function(){return this.refs.wrappedInstance},n.prototype.render=function(){return t.createElement(r,s({ref:"wrappedInstance"},this.nextState))},n}(e);return a.displayName="Connect("+i(r)+")",a.WrappedComponent=r,a.contextTypes={store:n},a.propTypes={store:n},b.default(a,r)}}}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=a;var c=r(16),f=n(c),l=r(49),d=n(l),p=r(48),h=n(p),y=r(50),v=n(y),m=r(15),b=n(m),g=r(41),_=n(g),O=function(){return{}},S=function(t){return{dispatch:t}},x=function(t,e,r){return s({},r,t,e)},T=0;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){var e=t.version;if("string"!=typeof e)return!0;var r=e.split("."),n=parseInt(r[0],10),o=parseInt(r[1],10);return 0===n&&13===o}function a(t){function e(){p||d||(p=!0,console.error("With React 0.14 and later versions, you no longer need to wrap <Provider> child into a function."))}function r(){!p&&d&&(p=!0,console.error("With React 0.13, you need to wrap <Provider> child into a function. This restriction will be removed with React 0.14."))}function n(){h||(h=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}var a=t.Component,s=t.PropTypes,f=t.Children,l=c.default(s),d=i(t),p=!1,h=!1,y=function(t){function i(e,r){o(this,i),t.call(this,e,r),this.store=e.store}return u(i,t),i.prototype.getChildContext=function(){return{store:this.store}},i.prototype.componentWillReceiveProps=function(t){var e=this.store,r=t.store;e!==r&&n()},i.prototype.render=function(){var t=this.props.children;return"function"==typeof t?(e(),t=t()):r(),f.only(t)},i}(a);return y.childContextTypes={store:l.isRequired},y.propTypes={store:l.isRequired,children:(d?s.func:s.element).isRequired},y}e.__esModule=!0,e.default=a;var s=r(16),c=n(s);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=r(22),u=n(o),i=r(44),a=n(i),s=a.default(u.default),c=s.Provider,f=s.connect;e.Provider=c,e.connect=f},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=Object.prototype.hasOwnProperty,u=0;u<r.length;u++)if(!o.call(e,r[u])||t[r[u]]!==e[r[u]])return!1;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return function(e){return o.bindActionCreators(t,e)}}e.__esModule=!0,e.default=n;var o=r(18);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return function(r,n){var o=t(r,n),i=o.dispatch,s=[],c={getState:o.getState,dispatch:function(t){return i(t)}};return s=e.map(function(t){return t(c)}),i=a.default.apply(void 0,s)(o.dispatch),u({},o,{dispatch:i})}}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=o;var i=r(19),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return function(){return e(t.apply(void 0,arguments))}}function u(t,e){if("function"==typeof t)return o(t,e);if("object"!=typeof t||null===t||void 0===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');return a.default(t,function(t){return o(t,e)})}e.__esModule=!0,e.default=u;var i=r(21),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var r=e&&e.type,n=r&&'"'+r.toString()+'"'||"an action";return'Reducer "'+t+'" returned undefined handling '+n+". To ignore an action, you must explicitly return the previous state."}function u(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:a.ActionTypes.INIT});if("undefined"==typeof n)throw new Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof r(void 0,{type:o}))throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+a.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function i(t){var e,r=d.default(t,function(t){return"function"==typeof t});try{u(r)}catch(n){e=n}var i=f.default(r,function(){return void 0});return function(t,n){if(void 0===t&&(t=i),e)throw e;var u=!1,a=f.default(r,function(e,r){var i=t[r],a=e(i,n);if("undefined"==typeof a){var s=o(r,n);throw new Error(s)}return u=u||a!==i,a});return u?a:t}}e.__esModule=!0,e.default=i;var a=r(17),s=r(20),c=(n(s),r(21)),f=n(c),l=r(54),d=n(l);t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReduxForm=e(require("react")):t.ReduxForm=e(t.React)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var u=r[n]={exports:{},id:n,loaded:!1};return t[n].call(u.exports,u,u.exports,e),u.loaded=!0,u.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(24),o=n(u),i=r(26),a=n(i),s=a.default(!1,o.default),f=s.actionTypes,c=s.blur,l=s.change,d=s.destroy,p=s.focus,v=s.reducer,h=s.reduxForm,y=s.initialize,m=s.initializeWithKey,b=s.reset,g=s.startAsyncValidation,_=s.startSubmit,O=s.stopAsyncValidation,x=s.stopSubmit,S=s.touch,A=s.untouch;e.actionTypes=f,e.blur=c,e.change=l,e.destroy=d,e.focus=p,e.reducer=v,e.reduxForm=h,e.initialize=y,e.initializeWithKey=m,e.reset=b,e.startAsyncValidation=g,e.startSubmit=_,e.stopAsyncValidation=O,e.stopSubmit=x,e.touch=S,e.untouch=A},function(t,e){"use strict";function r(t){return Array.isArray(t)?t.reduce(function(t,e){return t&&r(e)},!0):t&&"object"==typeof t?Object.keys(t).reduce(function(e,n){return e&&r(t[n])},!0):!t}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r="redux-form/ADD_ARRAY_VALUE";e.ADD_ARRAY_VALUE=r;var n="redux-form/BLUR";e.BLUR=n;var u="redux-form/CHANGE";e.CHANGE=u;var o="redux-form/DESTROY";e.DESTROY=o;var i="redux-form/FOCUS";e.FOCUS=i;var a="redux-form/INITIALIZE";e.INITIALIZE=a;var s="redux-form/REMOVE_ARRAY_VALUE";e.REMOVE_ARRAY_VALUE=s;var f="redux-form/RESET";e.RESET=f;var c="redux-form/START_ASYNC_VALIDATION";e.START_ASYNC_VALIDATION=c;var l="redux-form/START_SUBMIT";e.START_SUBMIT=l;var d="redux-form/STOP_ASYNC_VALIDATION";e.STOP_ASYNC_VALIDATION=d;var p="redux-form/STOP_SUBMIT";e.STOP_SUBMIT=p;var v="redux-form/SUBMIT_FAILED";e.SUBMIT_FAILED=v;var h="redux-form/TOUCH";e.TOUCH=h;var y="redux-form/UNTOUCH";e.UNTOUCH=y},function(t,e){"use strict";function r(t,e){return t?Object.keys(t).reduce(function(r,u){var o;return n({},r,(o={},o[u]=e(t[u],u),o))},{}):t}e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=r,t.exports=e.default},function(t,e){function r(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then}t.exports=r},function(t,e,r){"use strict";function n(t,e,r){return{type:b.ADD_ARRAY_VALUE,path:t,value:e,index:r}}function u(t,e){return{type:b.BLUR,field:t,value:e}}function o(t,e){return{type:b.CHANGE,field:t,value:e}}function i(){return{type:b.DESTROY}}function a(t){return{type:b.FOCUS,field:t}}function s(t){return{type:b.INITIALIZE,data:t}}function f(t,e){return{type:b.REMOVE_ARRAY_VALUE,path:t,index:e}}function c(){return{type:b.RESET}}function l(){return{type:b.START_ASYNC_VALIDATION}}function d(){return{type:b.START_SUBMIT}}function p(t){return{type:b.STOP_ASYNC_VALIDATION,errors:t}}function v(t){return{type:b.STOP_SUBMIT,errors:t}}function h(){return{type:b.SUBMIT_FAILED}}function y(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:b.TOUCH,fields:e}}function m(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return{type:b.UNTOUCH,fields:e}}e.__esModule=!0,e.addArrayValue=n,e.blur=u,e.change=o,e.destroy=i,e.focus=a,e.initialize=s,e.removeArrayValue=f,e.reset=c,e.startAsyncValidation=l,e.startSubmit=d,e.stopAsyncValidation=p,e.stopSubmit=v,e.submitFailed=h,e.touch=y,e.untouch=m;var b=r(2)},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){return"function"==typeof t?function(){return o({},t.apply(void 0,arguments),e)}:"object"==typeof t?a.default(t,function(t){return u(t,e)}):t}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=u;var i=r(3),a=n(i);t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r="value";e.dataKey=r;var n=function(t,e){return function(t){t.dataTransfer.setData(r,e())}};e.default=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(9),o=n(u),i=function(t){var e=[];if(t)for(var r=0;r<t.length;r++){var n=t[r];n.selected&&e.push(n.value)}return e},a=function(t,e){if(o.default(t)){if(!e&&t.nativeEvent&&void 0!==t.nativeEvent.text)return t.nativeEvent.text;if(e&&void 0!==t.nativeEvent)return t.nativeEvent.text;var r=t.target,n=r.type,u=r.value,a=r.checked,s=r.files,f=t.dataTransfer;return"checkbox"===n?a:"file"===n?s||f&&f.files:"select-multiple"===n?i(t.target.options):u}return t&&"object"==typeof t&&void 0!==t.value?t.value:t};e.default=a,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t){return!!(t&&t.stopPropagation&&t.preventDefault)};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(9),o=n(u),i=function(t){var e=o.default(t);return e&&t.preventDefault(),e};e.default=i,t.exports=e.default},function(t,e){"use strict";function r(t){return t.displayName||t.name||"Component"}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function u(t,e,r){var n=t.indexOf("."),o=t.indexOf("["),i=t.indexOf("]");if(o>0&&i!==o+1)throw new Error("found [ not followed by ]");if(o>0&&(0>n||n>o))!function(){var n=t.substring(0,o),a=t.substring(i+1);"."===a[0]&&(a=a.substring(1));var s=e&&e[n]||[];a?(r[n]||(r[n]=[]),s.forEach(function(t,e){r[n][e]||(r[n][e]={}),u(a,t,r[n][e])})):r[n]=s.map(function(t){return t.value})}();else if(n>0){var a=t.substring(0,n),s=t.substring(n+1);r[a]||(r[a]={}),u(s,e&&e[a]||{},r[a])}else r[t]=e[t]&&e[t].value},n=function(t,e){return t.reduce(function(t,n){return r(n,e,t),t},{})};e.default=n,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t,e){var r=!0;t:for(;r;){var n=t,u=e;if(r=!1,!n||!u)return u;var o=n.indexOf(".");if(0!==o){var i=n.indexOf("["),a=n.indexOf("]");if(o>=0&&(0>i||i>o))t=n.substring(o+1),e=u[n.substring(0,o)],r=!0,o=i=a=void 0;else{if(!(i>=0&&(0>o||o>i)))return u[n];if(0>a)throw new Error("found [ but no ]");var s=n.substring(0,i),f=n.substring(i+1,a);if(0===i){t=n.substring(a+1),e=u[f],r=!0,o=i=a=s=f=void 0;continue t}if(!u[s])return void 0;t=n.substring(a+1),e=u[s][f],r=!0,o=i=a=s=f=void 0}}else t=n.substring(1),e=u,r=!0,o=void 0}};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function o(){var t,e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=r.form,o=r.key,i=u(r,["form","key"]);if(!n)return e;if(o){var a,c;if(r.type===f.DESTROY){var l;return s({},e,(l={},l[n]=e[n]&&Object.keys(e[n]).reduce(function(t,r){var u;return r===o?t:s({},t,(u={},u[r]=e[n][r],u))},{}),l))}return s({},e,(c={},c[n]=s({},e[n],(a={},a[o]=g((e[n]||{})[o],i),a)),c))}return r.type===f.DESTROY?Object.keys(e).reduce(function(t,r){var u;return r===n?t:s({},t,(u={},u[r]=e[r],u))},{}):s({},e,(t={},t[n]=g(e[n],i),t))}function i(t){return t.plugin=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=e(r,n);return s({},u,l.default(t,function(t,e){return t(u[e]||y,n)}))})},t.normalize=function(t){var e=this;return i(function(){var r=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],u=e(r,n);return s({},u,l.default(t,function(t,e){var n=m(s({},y,r[e])),o=s({},y,u[e]);return s({},o,l.default(t,function(t,u){return s({},o[u],{value:t(o[u]?o[u].value:void 0,r[e]&&r[e][u]?r[e][u].value:void 0,m(o),n)})}))}))})},t}e.__esModule=!0;var a,s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f=r(2),c=r(3),l=n(c),d=r(13),p=n(d),v=r(15),h=n(v),y={_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1,_submitFailed:!1};e.initialState=y;var m=function(t){return Object.keys(t).reduce(function(e,r){return"_"!==r[0]&&(e[r]=t[r].value),e},{})};e.getValues=m;var b=(a={},a[f.ADD_ARRAY_VALUE]=function(t,e){var r=e.path,n=e.index,u=e.value,o=p.default(r,t),i=s({},t),a=o?[].concat(o):[],f={value:u};return void 0===n?a.push(f):a.splice(n,0,f),h.default(r,a,i)},a[f.BLUR]=function(t,e){var r=e.field,n=e.value,o=e.touch,i=(t._active,u(t,["_active"]));return void 0!==n&&(i=h.default(r+".value",n,i)),o&&(i=h.default(r+".touched",!0,i)),i},a[f.CHANGE]=function(t,e){var r=e.field,n=e.value,u=e.touch,o=s({},t);return o=h.default(r+".value",n,o),u&&(o=h.default(r+".touched",!0,o)),delete o.asyncError,delete o.submitError,o},a[f.DESTROY]=function(){return void 0},a[f.FOCUS]=function(t,e){var r=e.field,n=s({},t);return n=h.default(r+".visited",!0,n),n._active=r,n},a[f.INITIALIZE]=function(t,e){var r=e.data;return s({},l.default(r,function(t){return{initial:t,value:t}}),{_asyncValidating:!1,_active:void 0,_error:void 0,_submitting:!1,_submitFailed:!1})},a[f.REMOVE_ARRAY_VALUE]=function(t,e){var r=e.path,n=e.index,u=p.default(r,t),o=s({},t),i=u?[].concat(u):[];return void 0===n?i.pop():isNaN(n)?delete i[n]:i.splice(n,1),h.default(r,i,o)},a[f.RESET]=function(t){return s({},l.default(t,function(t,e){return"_"===e[0]?t:{initial:t.initial,value:t.initial}}),{_active:void 0,_asyncValidating:!1,_error:void 0,_submitting:!1,_submitFailed:!1})},a[f.START_ASYNC_VALIDATION]=function(t){return s({},t,{_asyncValidating:!0})},a[f.START_SUBMIT]=function(t){return s({},t,{_submitting:!0})},a[f.STOP_ASYNC_VALIDATION]=function(t,e){var r=e.errors;return s({},l.default(t,function(t){return t&&t.asyncError?s({},t,{asyncError:void 0}):t}),l.default(r,function(e,r){return s({},t[r],{asyncError:e})}),{_asyncValidating:!1,_error:r&&r._error})},a[f.STOP_SUBMIT]=function(t,e){var r=e.errors;return s({},t,r?l.default(r,function(e,r){return s({},t[r],{submitError:e})}):{},{_error:r&&r._error,_submitting:!1,_submitFailed:!(!r||!Object.keys(r).length)})},a[f.SUBMIT_FAILED]=function(t){return s({},t,{_submitFailed:!0})},a[f.TOUCH]=function(t,e){var r=e.fields;return s({},t,r.reduce(function(e,r){return e[r]=s({},t[r],{touched:!0}),e},{}))},a[f.UNTOUCH]=function(t,e){var r=e.fields;return s({},t,r.reduce(function(e,r){return e[r]=s({},t[r],{touched:!1}),e},{}))},a),g=function(){var t=arguments.length<=0||void 0===arguments[0]?y:arguments[0],e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=b[e.type];return r?r(t,e):t};e.default=i(o)},function(t,e){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=function u(t,e,n){for(var o=!0;o;){var i,a=t,s=e,f=n;o=!1;var c=a.indexOf(".");if(0!==c){var l=a.indexOf("["),d=a.indexOf("]");if(c>=0&&(0>l||l>c)){var p,v=a.substring(0,c);return f[v]||(f[v]={}),r({},f,(p={},p[v]=u(a.substring(c+1),s,f[v]),p))}if(l>=0&&(0>c||c>l)){var h;if(0>d)throw new Error("found [ but no ]");var v=a.substring(0,l),y=a.substring(l+1,d),m=f[v]||[],b=a.substring(d+1);if(b.length){var g,_=m[y]||{},O=[].concat(m);return O[y]=u(b,s,_),r({},f||{},(g={},g[v]=O,g))}if(0===l){var x=[].concat(f);return x[y]=u(b,s,f[y]),x}var S=[].concat(f[v]||[]);return S[y]=s,r({},f||{},(h={},h[v]=S,h))}return r({},f,(i={},i[a]=s,i))}t=a.substring(1),e=s,n=f,o=!0,i=c=void 0}};e.default=n,t.exports=e.default},function(t,e,r){function n(t){return null===t||void 0===t}function u(t){return t&&"object"==typeof t&&"number"==typeof t.length?"function"!=typeof t.copy||"function"!=typeof t.slice?!1:t.length>0&&"number"!=typeof t[0]?!1:!0:!1}function o(t,e,r){var o,c;if(n(t)||n(e))return!1;if(t.prototype!==e.prototype)return!1;if(s(t))return s(e)?(t=i.call(t),e=i.call(e),f(t,e,r)):!1;if(u(t)){if(!u(e))return!1;if(t.length!==e.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0}try{var l=a(t),d=a(e)}catch(p){return!1}if(l.length!=d.length)return!1;for(l.sort(),d.sort(),o=l.length-1;o>=0;o--)if(l[o]!=d[o])return!1;for(o=l.length-1;o>=0;o--)if(c=l[o],!f(t[c],e[c],r))return!1;return typeof t==typeof e}var i=Array.prototype.slice,a=r(44),s=r(43),f=t.exports=function(t,e,r){return r||(r={}),t===e?!0:t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?r.strict?t===e:t==e:o(t,e,r)}},function(t,e){"use strict";var r={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};t.exports=function(t,e){for(var u=Object.getOwnPropertyNames(e),o=0;o<u.length;++o)r[u[o]]||n[u[o]]||(t[u[o]]=e[u[o]]);return t}},function(t,e){"use strict";function r(t){return t.shape({subscribe:t.func.isRequired,dispatch:t.func.isRequired,getState:t.func.isRequired})}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){function r(){return f}function n(t){c.push(t);var e=!0;return function(){if(e){e=!1;var r=c.indexOf(t);c.splice(r,1)}}}function u(t){if(!i.default(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,f=s(f,t)}finally{l=!1}return c.slice().forEach(function(t){return t()}),t}function o(t){s=t,u({type:a.INIT})}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var s=t,f=e,c=[],l=!1;return u({type:a.INIT}),{dispatch:u,subscribe:n,getState:r,replaceReducer:o}}e.__esModule=!0,e.default=u;var o=r(22),i=n(o),a={INIT:"@@redux/INIT"};e.ActionTypes=a},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(19),o=n(u),i=r(57),a=n(i),s=r(56),f=n(s),c=r(55),l=n(c),d=r(21),p=n(d);e.createStore=o.default,e.combineReducers=a.default,e.bindActionCreators=f.default,e.applyMiddleware=l.default,e.compose=p.default},function(t,e){"use strict";function r(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return e.reduceRight(function(t,e){return e(t)},t)}}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return r[n]=e(t[n],n),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default},function(e,r){e.exports=t},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(4),o=n(u),i=r(1),a=n(i),s=function(t,e,r){e();var n=t();if(!o.default(n))throw new Error("asyncValidate function passed to reduxForm must return a promise");var u=function(t){return function(e){if(!a.default(e))return r(e),Promise.reject();if(t)throw r(),new Error("Asynchronous validation promise was rejected without errors.");return r(),Promise.resolve()}};return n.then(u(!1),u(!0))};e.default=s,t.exports=e.default},function(t,e,r){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function u(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return{actionTypes:b,blur:_,change:O,destroy:x,focus:S,reducer:s.default,initialize:A,initializeWithKey:T,reduxForm:c.default(t,e),reset:j,startAsyncValidation:M,startSubmit:w,stopAsyncValidation:E,stopSubmit:P,submitFailed:R,touch:V,untouch:I}}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=o;var a=r(14),s=u(a),f=r(28),c=u(f),l=r(3),d=u(l),p=r(6),v=u(p),h=r(5),y=n(h),m=r(2),b=n(m),g=i({},d.default(i({},y,{initializeWithKey:function(t,e){return v.default(y.initialize,{key:t})(e)},destroy:function(t){return v.default(y.destroy,{key:t})()}}),function(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),u=1;r>u;u++)n[u-1]=arguments[u];return v.default(t,{form:e}).apply(void 0,n)}})),_=g.blur,O=g.change,x=g.destroy,S=g.focus,A=g.initialize,T=g.initializeWithKey,j=g.reset,M=g.startAsyncValidation,w=g.startSubmit,E=g.stopAsyncValidation,P=g.stopSubmit,R=g.submitFailed,V=g.touch,I=g.untouch;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function o(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},f=r(51),c=r(5),l=u(c),d=r(11),p=n(d),v=r(14),h=r(16),y=n(h),m=r(6),b=n(m),g=r(12),_=n(g),O=r(1),x=n(O),S=r(38),A=n(S),T=r(35),j=n(T),M=r(25),w=n(M),E=r(34),P=n(E),R=r(10),V=n(R),I=r(41),C=n(I),U=r(42),N=n(U),F=function(t,e,r,n,u,c){var d=r.Component,h=r.PropTypes;return function(m,g,O,S){var T=function(u){function f(t){i(this,f),u.call(this,t),this.asyncValidate=this.asyncValidate.bind(this),this.handleSubmit=this.handleSubmit.bind(this),this.fields=A.default(t,{},this.asyncValidate,e)}return a(f,u),f.prototype.componentWillMount=function(){var t=this.props,e=t.initialize,r=t.initialValues;r&&e(r)},f.prototype.componentWillReceiveProps=function(t){y.default(this.props.fields,t.fields)&&y.default(this.props.form,t.form)||(this.fields=A.default(t,this.fields,this.asyncValidate,e)),y.default(this.props.initialValues,t.initialValues)||this.props.initialize(t.initialValues)},f.prototype.componentWillUnmount=function(){t.destroyOnUnmount&&this.props.destroy()},f.prototype.asyncValidate=function c(t,e){var r=this,n=this.props,c=n.asyncValidate,u=n.dispatch,o=n.fields,i=n.form,a=n.startAsyncValidation,s=n.stopAsyncValidation,f=n.validate;if(c){var l=function(){var n=_.default(o,i);t&&(n[t]=e);var l=f(n,r.props);return!t||x.default(l[t])?{v:w.default(function(){return c(n,u,r.props)},a,s)}:void 0}();if("object"==typeof l)return l.v}},f.prototype.handleSubmit=function(t){var e=this,r=this.props,n=r.onSubmit,u=r.fields,o=r.form,i=function(t){if(!t||"function"!=typeof t)throw new Error("You must either pass handleSubmit() an onSubmit function or pass onSubmit as a prop");return t},a=_.default(u,o);return!t||V.default(t)?j.default(i(n),a,this.props,this.asyncValidate):P.default(function(r){V.default(r),j.default(i(t),a,e.props,e.asyncValidate)})},f.prototype.render=function(){var t=this,e=this.fields,u=this.props,i=(u.addArrayValue,u.asyncBlurFields,u.blur,u.change,u.destroy),a=(u.focus,u.fields),f=u.form,c=(u.initialValues,u.initialize),l=(u.onSubmit,u.reset),d=(u.removeArrayValue,u.returnRejectedSubmitPromise,u.startAsyncValidation,u.startSubmit,u.stopAsyncValidation,u.stopSubmit,u.submitFailed,u.touch),p=u.untouch,v=(u.validate,o(u,["addArrayValue","asyncBlurFields","blur","change","destroy","focus","fields","form","initialValues","initialize","onSubmit","reset","removeArrayValue","returnRejectedSubmitPromise","startAsyncValidation","startSubmit","stopAsyncValidation","stopSubmit","submitFailed","touch","untouch","validate"])),h=e._meta,y=h.allPristine,m=h.allValid,b=h.errors,g=h.formError,_=h.values;return r.createElement(n,s({},v,{active:f._active,asyncValidating:f._asyncValidating,dirty:!y,error:g,errors:b,fields:e,formKey:O,invalid:!m,pristine:y,submitting:f._submitting,submitFailed:f._submitFailed,valid:m,values:_,asyncValidate:P.default(function(){return t.asyncValidate()}),destroyForm:P.default(i),handleSubmit:this.handleSubmit,initializeForm:P.default(c),resetForm:P.default(l),touch:P.default(function(){return d.apply(void 0,arguments)}),touchAll:P.default(function(){return d.apply(void 0,a)}),untouch:P.default(function(){return p.apply(void 0,arguments)}),untouchAll:P.default(function(){return p.apply(void 0,a)})}))},f}(d);T.displayName="ReduxForm("+p.default(n)+")",T.WrappedComponent=n,T.propTypes={asyncBlurFields:h.arrayOf(h.string),asyncValidate:h.func,dispatch:h.func.isRequired,fields:h.arrayOf(h.string).isRequired,form:h.object,initialValues:h.any,onSubmit:h.func,validate:h.func,readonly:h.bool,returnRejectedSubmitPromise:h.bool,addArrayValue:h.func.isRequired,blur:h.func.isRequired,change:h.func.isRequired,destroy:h.func.isRequired,focus:h.func.isRequired,initialize:h.func.isRequired,removeArrayValue:h.func.isRequired,reset:h.func.isRequired,startAsyncValidation:h.func.isRequired,startSubmit:h.func.isRequired,stopAsyncValidation:h.func.isRequired,stopSubmit:h.func.isRequired,submitFailed:h.func.isRequired,touch:h.func.isRequired,untouch:h.func.isRequired},T.defaultProps={asyncBlurFields:[],form:v.initialState,readonly:!1,returnRejectedSubmitPromise:!1,validate:function(){return{}}};var M=s({},l,{blur:b.default(l.blur,{touch:!!t.touchOnBlur}),change:b.default(l.change,{touch:!!t.touchOnChange})}),E=void 0!==O&&null!==O?f.connect(N.default(u,function(t){var e=S(t,m);if(!e)throw new Error('You need to mount the redux-form reducer at "'+m+'"');return e&&e[g]&&e[g][O]}),C.default(c,b.default(M,{form:g,key:O}))):f.connect(N.default(u,function(t){var e=S(t,m);if(!e)throw new Error('You need to mount the redux-form reducer at "'+m+'"');return e&&e[g]}),C.default(c,b.default(M,{form:g})));return E(T)}};e.default=F,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},a=r(29),s=n(a),f=r(17),c=n(f),l=function(t,e){var r=e.Component,n=s.default(t,e);return function(t,a,s){return function(f){var l=n(f,a,s),d=i({touchOnBlur:!0,touchOnChange:!1,destroyOnUnmount:!0},t),p=function(t){function r(){u(this,r),t.apply(this,arguments)}return o(r,t),r.prototype.render=function(){return e.createElement(l,i({},d,this.props))},r}(r);return c.default(p,f)}}};e.default=l,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=r(46),s=n(a),f=r(11),c=n(f),l=r(27),d=n(l),p=function(t,e){return function(r,n,a){var f=e.Component,l=e.PropTypes,p=function(f){function c(u){o(this,c),f.call(this,u),this.cache=s.default(this,{ReduxForm:{params:["reduxMountPoint","form","formKey","getFormState"],fn:d.default(u,t,e,r,n,a)}})}return i(c,f),c.prototype.componentWillReceiveProps=function(t){this.cache.componentWillReceiveProps(t)},c.prototype.render=function(){var t=this.cache.ReduxForm,r=this.props,n=(r.reduxMountPoint,r.destroyOnUnmount,r.form,r.getFormState,r.touchOnBlur,r.touchOnChange,u(r,["reduxMountPoint","destroyOnUnmount","form","getFormState","touchOnBlur","touchOnChange"]));return e.createElement(t,n)},c}(f);return p.displayName="ReduxFormConnector("+c.default(r)+")",p.WrappedComponent=r,p.propTypes={destroyOnUnmount:l.bool,reduxMountPoint:l.string,form:l.string.isRequired,formKey:l.string,getFormState:l.func,touchOnBlur:l.bool,touchOnChange:l.bool},p.defaultProps={reduxMountPoint:"form",getFormState:function(t,e){return t[e]}},p}};e.default=p,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(8),o=n(u),i=function(t,e,r,n){return function(u){var i=o.default(u,r);e(t,i),n&&n(t,i)}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(8),o=n(u),i=function(t,e,r){return function(n){return e(t,o.default(n,r))}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=r(7),u=function(t,e){return function(r){e(t,r.dataTransfer.getData(n.dataKey))}};e.default=u,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=function(t,e){return function(){return e(t)}};e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(10),o=n(u),i=function(t){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),u=1;r>u;u++)n[u-1]=arguments[u];return o.default(e)?t.apply(void 0,n):t.apply(void 0,[e].concat(n))}};e.default=i,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(4),o=n(u),i=r(1),a=n(i),s=function(t,e,r,n){var u=r.dispatch,i=r.fields,s=r.startSubmit,f=r.stopSubmit,c=r.submitFailed,l=r.returnRejectedSubmitPromise,d=r.touch,p=r.validate,v=p(e,r);if(d.apply(void 0,i),a.default(v)){var h=function(){var r=t(e,u);return o.default(r)?(s(),r.then(function(t){return f(),t},function(t){return f(t),l?Promise.reject(t):void 0})):r},y=n();return o.default(y)?y.then(h,function(){return c(),l?Promise.reject():Promise.resolve()}):h()}c()};e.default=s,t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;if("boolean"==typeof t||"boolean"==typeof e)return t===e;if(t instanceof Date&&e instanceof Date)return t.getDate()===e.getDate();if(t&&"object"==typeof t){if(!e||"object"!=typeof e)return!1;var n=Object.keys(t),u=Object.keys(e);if(n.length!==u.length)return!1;for(var o=0;o<u.length;o++){var i=u[o];if(!r(t[i],e[i]))return!1}}else if(t||e)return t===e;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(30),o=n(u),i=r(31),a=n(i),s=r(7),f=n(s),c=r(32),l=n(c),d=r(33),p=n(d),v=r(39),h=n(v),y=r(13),m=n(y),b=r(40),g=n(b),_=function O(t,e,r,n,u,i,s,c){for(var d=!0;d;){var v=t,y=e,b=r,_=n,x=u,S=i,A=s,T=c;void 0===b&&(b=""),d=!1;var j=T.asyncBlurFields,M=T.blur,w=T.change,E=T.focus,P=T.form,R=T.initialValues,V=T.readonly,I=T.addArrayValue,C=T.removeArrayValue,U=y.indexOf("."),N=y.indexOf("["),F=y.indexOf("]");if(N>0&&F!==N+1)throw new Error("found [ not followed by ]");if(N>0&&(0>U||U>N)){var D=function(){var t=y.substring(0,N),e=y.substring(F+1);"."===e[0]&&(e=e.substring(1));var r=v&&v[t]||[];_[t]||(_[t]=[],_[t].addField=function(e,r){I(b+t,e,r)},_[t].removeField=function(e){C(b+t,e)});var n=_[t];return r.forEach(function(r,u){e&&!n[u]&&(n[u]={});var o=e?n[u]:{},i=O(r,e,""+b+t+"["+u+"]"+(e?".":""),o,x,S,A,T);e||(n[u]=i)}),n.length>r.length&&n.splice(r.length,n.length-r.length),{v:n}}();if("object"==typeof D)return D.v}if(!(U>0)){var k=b+y,B=_[y]||{};if(B.name!==k){var L=a.default(k,w,A),q=m.default(k,R);B.name=k,B.defaultChecked=q===!0,B.defaultValue=q,B.initialValue=q,V||(B.onBlur=o.default(k,M,A,~j.indexOf(k)&&function(t,e){return h.default(S(t,e))}),B.onChange=L,B.onDragStart=f.default(k,function(){return B.value}),B.onDrop=l.default(k,w),B.onFocus=p.default(k,E),B.onUpdate=L),B.valid=!0,B.invalid=!1}var Y=(y?v[y]:v)||{},W=m.default(k,x),z=g.default(B,Y,k===P._active,W);return(y||_[y]!==z)&&(_[y]=z),z}var H=y.substring(0,U),K=y.substring(U+1);_[H]||(_[H]={}),t=v[H]||{},e=K,r=b+H+".",n=_[H],u=x,i=S,s=A,c=T,d=!0,j=M=w=E=P=R=V=I=C=U=N=F=D=H=K=void 0}};e.default=_,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=r(37),i=n(o),a=r(15),s=n(a),f=r(12),c=n(f),l=function(t,e,r,n){var o=t.fields,a=t.form,f=t.validate,l=c.default(o,a),d=f(l,t),p={},v=d._error||a._error,h=!v,y=!0,m=u({},e);return o.forEach(function(e){var u=i.default(a,e,void 0,m,d,r,n,t);u.invalid&&(h=!1),u.dirty&&(y=!1),u.error&&(p=s.default(e,u.error,p))}),Object.defineProperty(m,"_meta",{value:{allPristine:y,allValid:h,values:l,errors:p,formError:v}}),m};e.default=l,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(4),o=n(u),i=function(){return void 0},a=function(t){return o.default(t)?t.then(i,i):t};e.default=a,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o=r(36),i=n(o),a=r(1),s=n(a),f=function(t,e,r,n){var o={};t.value!==e.value&&(o.value=e.value,o.checked="boolean"==typeof e.value?e.value:void 0);var a=i.default(e.value,e.initial);t.pristine!==a&&(o.dirty=!a,o.pristine=a);var f=n||e.submitError||e.asyncError;f!==t.error&&(o.error=f);var c=s.default(f);t.valid!==c&&(o.invalid=!c,o.valid=c),r!==t.active&&(o.active=r);var l=!!e.touched;l!==t.touched&&(o.touched=l);var d=!!e.visited;return d!==t.visited&&(o.visited=d),Object.keys(o).length?u({},t,o):t};e.default=f,t.exports=e.default},function(t,e,r){"use strict";e.__esModule=!0;var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},u=r(20),o=function(t,e){return t?"function"==typeof t?t.length>1?function(r,o){return n({},t(r,o),u.bindActionCreators(e,r),{dispatch:r})}:function(r){return n({},t(r),u.bindActionCreators(e,r),{dispatch:r})}:function(r){return n({},u.bindActionCreators(t,r),u.bindActionCreators(e,r),{dispatch:r})}:function(t){return n({},u.bindActionCreators(e,t),{dispatch:t})}};e.default=o,t.exports=e.default},function(t,e){"use strict";e.__esModule=!0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){ | ||
var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},n=function(t,e){if(t){if("function"!=typeof t)throw new Error("mapStateToProps must be a function");return t.length>1?function(n,u){return r({},t(n,u),{form:e(n)})}:function(n){return r({},t(n),{form:e(n)})}}return function(t){return{form:e(t)}}};e.default=n,t.exports=e.default},function(t,e){function r(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function n(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}var u="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();e=t.exports=u?r:n,e.supported=r,e.unsupported=n},function(t,e){function r(t){var e=[];for(var r in t)e.push(r);return e}e=t.exports="function"==typeof Object.keys?Object.keys:r,e.shim=r},function(t,e,r){"use strict";var n=function(t,e,r,n,u,o,i,a){if(!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[r,n,u,o,i,a],c=0;s=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return f[c++]}))}throw s.framesToPop=1,s}};t.exports=n},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(47),o=n(u);e.default=o.default,t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r=[],n={},u={},o=function a(t){Object.keys(n).forEach(function(e){~n[e].props.indexOf(t)&&(delete n[e].value,a(e))})};return Object.keys(e).forEach(function(o){var i=e[o].fn,a=e[o].params;a.forEach(function(t){~r.indexOf(t)||r.push(t)}),n[o]={props:a},Object.defineProperty(u,o,{get:function(){var e=n[o];if(e&&void 0!==e.value)return e.value;var r=a.map(function(e){return t.props[e]||u[e]}),s=i.apply(void 0,r);return n[o]={props:a,value:s},s}})}),u.componentWillReceiveProps=function(e){var n=[];r.forEach(function(r){i.default(t.props[r],e[r])||n.push(r)}),n.forEach(o)},u}e.__esModule=!0,e.default=u;var o=r(16),i=n(o);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t){var e=i.default(t),r=s.default(t);return{Provider:e,connect:r}}e.__esModule=!0,e.default=u;var o=r(50),i=n(o),a=r(49),s=n(a);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){return t.displayName||t.name||"Component"}function a(t){var e=t.Component,r=t.PropTypes,n=c.default(r);return function(r,a,f){function c(t,e){var r=t.getState(),n=M?g(r,e):g(r);return _.default(v.default(n),"`mapStateToProps` must return an object. Instead received %s.",n),n}function l(t,e){var r=t.dispatch,n=w?T(r,e):T(r);return _.default(v.default(n),"`mapDispatchToProps` must return an object. Instead received %s.",n),n}function p(t,e,r){var n=j(t,e,r);return _.default(v.default(n),"`mergeProps` must return an object. Instead received %s.",n),n}var h=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],m=Boolean(r),g=r||O,T=v.default(a)?y.default(a):a||x,j=f||S,M=g.length>1,w=T.length>1,E=h.pure,P=void 0===E?!0:E,R=A++;return function(r){var a=function(e){function n(t,r){u(this,n),e.call(this,t,r),this.version=R,this.store=t.store||r.store,_.default(this.store,'Could not find "store" in either the context or '+('props of "'+this.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+this.constructor.displayName+'".')),this.stateProps=c(this.store,t),this.dispatchProps=l(this.store,t),this.state={storeState:null},this.updateState()}return o(n,e),n.prototype.shouldComponentUpdate=function(t,e){if(!P)return this.updateStateProps(t),this.updateDispatchProps(t),this.updateState(t),!0;var r=e.storeState!==this.state.storeState,n=!d.default(t,this.props),u=!1,o=!1;return(r||n&&M)&&(u=this.updateStateProps(t)),n&&w&&(o=this.updateDispatchProps(t)),n||u||o?(this.updateState(t),!0):!1},n.prototype.computeNextState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];return p(this.stateProps,this.dispatchProps,t)},n.prototype.updateStateProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=c(this.store,t);return d.default(e,this.stateProps)?!1:(this.stateProps=e,!0)},n.prototype.updateDispatchProps=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],e=l(this.store,t);return d.default(e,this.dispatchProps)?!1:(this.dispatchProps=e,!0)},n.prototype.updateState=function(){var t=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];this.nextState=this.computeNextState(t)},n.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},n.prototype.trySubscribe=function(){m&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},n.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},n.prototype.componentDidMount=function(){this.trySubscribe()},n.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},n.prototype.handleChange=function(){this.unsubscribe&&this.setState({storeState:this.store.getState()})},n.prototype.getWrappedInstance=function(){return this.refs.wrappedInstance},n.prototype.render=function(){return t.createElement(r,s({ref:"wrappedInstance"},this.nextState))},n}(e);return a.displayName="Connect("+i(r)+")",a.WrappedComponent=r,a.contextTypes={store:n},a.propTypes={store:n},b.default(a,r)}}}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=a;var f=r(18),c=n(f),l=r(53),d=n(l),p=r(52),v=n(p),h=r(54),y=n(h),m=r(17),b=n(m),g=r(45),_=n(g),O=function(){return{}},x=function(t){return{dispatch:t}},S=function(t,e,r){return s({},r,t,e)},A=0;t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t){var e=t.version;if("string"!=typeof e)return!0;var r=e.split("."),n=parseInt(r[0],10),u=parseInt(r[1],10);return 0===n&&13===u}function a(t){function e(){p||d||(p=!0,console.error("With React 0.14 and later versions, you no longer need to wrap <Provider> child into a function."))}function r(){!p&&d&&(p=!0,console.error("With React 0.13, you need to wrap <Provider> child into a function. This restriction will be removed with React 0.14."))}function n(){v||(v=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}var a=t.Component,s=t.PropTypes,c=t.Children,l=f.default(s),d=i(t),p=!1,v=!1,h=function(t){function i(e,r){u(this,i),t.call(this,e,r),this.store=e.store}return o(i,t),i.prototype.getChildContext=function(){return{store:this.store}},i.prototype.componentWillReceiveProps=function(t){var e=this.store,r=t.store;e!==r&&n()},i.prototype.render=function(){var t=this.props.children;return"function"==typeof t?(e(),t=t()):r(),c.only(t)},i}(a);return h.childContextTypes={store:l.isRequired},h.propTypes={store:l.isRequired,children:(d?s.func:s.element).isRequired},h}e.__esModule=!0,e.default=a;var s=r(18),f=n(s);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var u=r(24),o=n(u),i=r(48),a=n(i),s=a.default(o.default),f=s.Provider,c=s.connect;e.Provider=f,e.connect=c},function(t,e){"use strict";function r(t){if(!t||"object"!=typeof t)return!1;var e="function"==typeof t.constructor?Object.getPrototypeOf(t):Object.prototype;if(null===e)return!0;var r=e.constructor;return"function"==typeof r&&r instanceof r&&n(r)===n(Object)}e.__esModule=!0,e.default=r;var n=function(t){return Function.prototype.toString.call(t)};t.exports=e.default},function(t,e){"use strict";function r(t,e){if(t===e)return!0;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var u=Object.prototype.hasOwnProperty,o=0;o<r.length;o++)if(!u.call(e,r[o])||t[r[o]]!==e[r[o]])return!1;return!0}e.__esModule=!0,e.default=r,t.exports=e.default},function(t,e,r){"use strict";function n(t){return function(e){return u.bindActionCreators(t,e)}}e.__esModule=!0,e.default=n;var u=r(20);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(){for(var t=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];return function(t){return function(r,n){var u=t(r,n),i=u.dispatch,s=[],f={getState:u.getState,dispatch:function(t){return i(t)}};return s=e.map(function(t){return t(f)}),i=a.default.apply(void 0,s)(u.dispatch),o({},u,{dispatch:i})}}}e.__esModule=!0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};e.default=u;var i=r(21),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){return function(){return e(t.apply(void 0,arguments))}}function o(t,e){if("function"==typeof t)return u(t,e);if("object"!=typeof t||null===t||void 0===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');return a.default(t,function(t){return u(t,e)})}e.__esModule=!0,e.default=o;var i=r(23),a=n(i);t.exports=e.default},function(t,e,r){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function u(t,e){var r=e&&e.type,n=r&&'"'+r.toString()+'"'||"an action";return'Reducer "'+t+'" returned undefined handling '+n+". To ignore an action, you must explicitly return the previous state."}function o(t){Object.keys(t).forEach(function(e){var r=t[e],n=r(void 0,{type:a.ActionTypes.INIT});if("undefined"==typeof n)throw new Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var u="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof r(void 0,{type:u}))throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+a.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function i(t){var e,r=d.default(t,function(t){return"function"==typeof t});try{o(r)}catch(n){e=n}var i=c.default(r,function(){return void 0});return function(t,n){if(void 0===t&&(t=i),e)throw e;var o=!1,a=c.default(r,function(e,r){var i=t[r],a=e(i,n);if("undefined"==typeof a){var s=u(r,n);throw new Error(s)}return o=o||a!==i,a});return o?a:t}}e.__esModule=!0,e.default=i;var a=r(19),s=r(22),f=(n(s),r(23)),c=n(f),l=r(58),d=n(l);t.exports=e.default},function(t,e){"use strict";function r(t,e){return Object.keys(t).reduce(function(r,n){return e(t[n])&&(r[n]=t[n]),r},{})}e.__esModule=!0,e.default=r,t.exports=e.default}])}); |
@@ -14,2 +14,23 @@ 'use strict'; | ||
describe('actions', function () { | ||
it('should create add array value action', function () { | ||
_expect2['default'](_actions.addArrayValue('foo', undefined, 1)).toEqual({ | ||
type: _actionTypes.ADD_ARRAY_VALUE, | ||
path: 'foo', | ||
index: 1, | ||
value: undefined | ||
}); | ||
_expect2['default'](_actions.addArrayValue('bar.baz')).toEqual({ | ||
type: _actionTypes.ADD_ARRAY_VALUE, | ||
path: 'bar.baz', | ||
index: undefined, | ||
value: undefined | ||
}); | ||
_expect2['default'](_actions.addArrayValue('bar.baz', 'foo', 2)).toEqual({ | ||
type: _actionTypes.ADD_ARRAY_VALUE, | ||
path: 'bar.baz', | ||
index: 2, | ||
value: 'foo' | ||
}); | ||
}); | ||
it('should create blur action', function () { | ||
@@ -53,2 +74,15 @@ _expect2['default'](_actions.blur('foo', 'bar')).toEqual({ | ||
it('should create remove array value action', function () { | ||
_expect2['default'](_actions.removeArrayValue('foo', 3)).toEqual({ | ||
type: _actionTypes.REMOVE_ARRAY_VALUE, | ||
path: 'foo', | ||
index: 3 | ||
}); | ||
_expect2['default'](_actions.removeArrayValue('bar.baz')).toEqual({ | ||
type: _actionTypes.REMOVE_ARRAY_VALUE, | ||
path: 'bar.baz', | ||
index: undefined | ||
}); | ||
}); | ||
it('should create reset action', function () { | ||
@@ -55,0 +89,0 @@ _expect2['default'](_actions.reset()).toEqual({ type: _actionTypes.RESET }); |
@@ -27,2 +27,75 @@ 'use strict'; | ||
}); | ||
it('should allow undefined values', function () { | ||
var form = { | ||
foo: { value: 'bar' } | ||
}; | ||
var fields = ['foo', 'missing']; | ||
_expect2['default'](_getValues2['default'](fields, form)).toBeA('object').toEqual({ | ||
foo: 'bar', | ||
missing: undefined | ||
}); | ||
}); | ||
it('should get values from deep form', function () { | ||
var form = { | ||
foo: { | ||
bar: { value: 'baz' } | ||
}, | ||
lives: { | ||
cat: { value: 9 } | ||
}, | ||
alive: { value: true } | ||
}; | ||
var fields = ['foo.bar', 'lives.cat', 'alive']; | ||
_expect2['default'](_getValues2['default'](fields, form)).toBeA('object').toEqual({ | ||
foo: { | ||
bar: 'baz' | ||
}, | ||
lives: { | ||
cat: 9 | ||
}, | ||
alive: true | ||
}); | ||
}); | ||
it('should get values from array form', function () { | ||
var form = { | ||
foo: [{ value: 'bar' }, { value: 'baz' }, {}], | ||
alive: { value: true } | ||
}; | ||
var fields = ['foo[]', 'alive']; | ||
_expect2['default'](_getValues2['default'](fields, form)).toBeA('object').toEqual({ | ||
foo: ['bar', 'baz', undefined], | ||
alive: true | ||
}); | ||
}); | ||
it('should allow an array to be empty', function () { | ||
var form = { | ||
foo: [] | ||
}; | ||
var fields = ['foo[]']; | ||
_expect2['default'](_getValues2['default'](fields, form)).toBeA('object').toEqual({ foo: [] }); | ||
}); | ||
it('should get values from deep array form', function () { | ||
var form = { | ||
foo: { | ||
animals: [{ value: 'cat' }, { value: 'dog' }, { value: 'rat' }] | ||
}, | ||
bar: [{ | ||
deeper: { | ||
value: 42 | ||
} | ||
}] | ||
}; | ||
var fields = ['foo.animals[]', 'bar[].deeper']; | ||
_expect2['default'](_getValues2['default'](fields, form)).toBeA('object').toEqual({ | ||
foo: { | ||
animals: ['cat', 'dog', 'rat'] | ||
}, | ||
bar: [{ deeper: 42 }] | ||
}); | ||
}); | ||
}); |
@@ -1063,3 +1063,4 @@ 'use strict'; | ||
}, {}); | ||
_expect2['default'](result1.foo.value).toBe('fooValue'); | ||
var foo1 = result1.foo; | ||
_expect2['default'](foo1.value).toBe('fooValue'); | ||
var result2 = _readFields2['default']({ | ||
@@ -1081,5 +1082,62 @@ asyncBlurFields: [], | ||
}, result1); | ||
_expect2['default'](result1.foo.value).toBe('fooValue'); | ||
_expect2['default'](result2.foo.value).toBe('newValue'); | ||
var foo2 = result2.foo; | ||
_expect2['default'](foo1.value).toBe('fooValue'); | ||
_expect2['default'](foo2.value).toBe('newValue'); | ||
}); | ||
it('should init deep fields', function () { | ||
var result = _readFields2['default']({ | ||
asyncBlurFields: [], | ||
blur: blur, | ||
change: change, | ||
fields: ['foo.dog', 'foo.cat', 'bar.rat', 'bar.ram'], | ||
focus: focus, | ||
form: {}, | ||
validate: noValidation | ||
}, {}); | ||
expectField({ | ||
field: result.foo.dog, | ||
name: 'foo.dog', | ||
value: undefined, | ||
dirty: false, | ||
touched: false, | ||
visited: false, | ||
error: undefined, | ||
initialValue: undefined, | ||
readonly: false | ||
}); | ||
expectField({ | ||
field: result.foo.cat, | ||
name: 'foo.cat', | ||
value: undefined, | ||
dirty: false, | ||
touched: false, | ||
visited: false, | ||
error: undefined, | ||
initialValue: undefined, | ||
readonly: false | ||
}); | ||
expectField({ | ||
field: result.bar.rat, | ||
name: 'bar.rat', | ||
value: undefined, | ||
dirty: false, | ||
touched: false, | ||
visited: false, | ||
error: undefined, | ||
initialValue: undefined, | ||
readonly: false | ||
}); | ||
expectField({ | ||
field: result.bar.ram, | ||
name: 'bar.ram', | ||
value: undefined, | ||
dirty: false, | ||
touched: false, | ||
visited: false, | ||
error: undefined, | ||
initialValue: undefined, | ||
readonly: false | ||
}); | ||
}); | ||
}); |
@@ -46,2 +46,120 @@ 'use strict'; | ||
it('should add an empty array value with empty state', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.addArrayValue('myField'), { | ||
form: 'foo' | ||
})); | ||
_expect2['default'](state.foo).toEqual({ | ||
myField: [{ | ||
value: undefined | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should add an empty deep array value with empty state', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.addArrayValue('myField.myArray'), { | ||
form: 'foo' | ||
})); | ||
_expect2['default'](state.foo).toEqual({ | ||
myField: { | ||
myArray: [{ | ||
value: undefined | ||
}] | ||
}, | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should add a deep array value with empty state', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.addArrayValue('myField.myArray', 20, undefined), { | ||
form: 'foo' | ||
})); | ||
_expect2['default'](state.foo).toEqual({ | ||
myField: { | ||
myArray: [{ | ||
value: 20 | ||
}] | ||
}, | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should push an array value', function () { | ||
var state = _reducer2['default']({ | ||
testForm: { | ||
myField: [{ | ||
value: 'foo' | ||
}, { | ||
value: 'bar' | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
} | ||
}, _extends({}, _actions.addArrayValue('myField', 'baz'), { | ||
form: 'testForm' | ||
})); | ||
_expect2['default'](state.testForm).toEqual({ | ||
myField: [{ | ||
value: 'foo' | ||
}, { | ||
value: 'bar' | ||
}, { | ||
value: 'baz' | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should insert an array value', function () { | ||
var state = _reducer2['default']({ | ||
testForm: { | ||
myField: [{ | ||
value: 'foo' | ||
}, { | ||
value: 'bar' | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
} | ||
}, _extends({}, _actions.addArrayValue('myField', 'baz', 1), { | ||
form: 'testForm' | ||
})); | ||
_expect2['default'](state.testForm).toEqual({ | ||
myField: [{ | ||
value: 'foo' | ||
}, { | ||
value: 'baz' | ||
}, { | ||
value: 'bar' | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should set value on blur with empty state', function () { | ||
@@ -53,6 +171,4 @@ var state = _reducer2['default']({}, _extends({}, _actions.blur('myField', 'myValue'), { | ||
myField: { | ||
value: 'myValue', | ||
touched: false | ||
value: 'myValue' | ||
}, | ||
_active: undefined, | ||
_asyncValidating: false, | ||
@@ -75,3 +191,2 @@ _error: undefined, | ||
}, | ||
_active: undefined, | ||
_asyncValidating: false, | ||
@@ -92,3 +207,2 @@ _error: undefined, | ||
}, | ||
_active: 'myField', | ||
_asyncValidating: false, | ||
@@ -109,3 +223,2 @@ _error: undefined, | ||
}, | ||
_active: undefined, | ||
_asyncValidating: false, | ||
@@ -142,3 +255,2 @@ _error: undefined, | ||
}, | ||
_active: undefined, | ||
_asyncValidating: false, | ||
@@ -172,3 +284,2 @@ _error: undefined, | ||
}, | ||
_active: undefined, | ||
_asyncValidating: false, | ||
@@ -181,2 +292,60 @@ _error: undefined, | ||
it('should set nested value on blur', function () { | ||
var state = _reducer2['default']({ | ||
foo: { | ||
myField: { | ||
mySubField: { | ||
value: undefined | ||
} | ||
}, | ||
_active: 'myField', | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
} | ||
}, _extends({}, _actions.blur('myField.mySubField', 'hello'), { | ||
form: 'foo', | ||
touch: true | ||
})); | ||
_expect2['default'](state.foo).toEqual({ | ||
myField: { | ||
mySubField: { | ||
value: 'hello', | ||
touched: true | ||
} | ||
}, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should set array value on blur', function () { | ||
var state = _reducer2['default']({ | ||
foo: { | ||
myArray: [{ value: undefined }], | ||
_active: 'myField', | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
} | ||
}, _extends({}, _actions.blur('myArray[0]', 'hello'), { | ||
form: 'foo', | ||
touch: true | ||
})); | ||
_expect2['default'](state.foo).toEqual({ | ||
myArray: [{ | ||
value: 'hello', | ||
touched: true | ||
}], | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should set value on change with empty state', function () { | ||
@@ -188,6 +357,3 @@ var state = _reducer2['default']({}, _extends({}, _actions.change('myField', 'myValue'), { | ||
myField: { | ||
value: 'myValue', | ||
touched: false, | ||
asyncError: undefined, | ||
submitError: undefined | ||
value: 'myValue' | ||
}, | ||
@@ -210,5 +376,3 @@ _active: undefined, // CHANGE doesn't touch _active | ||
value: 'myValue', | ||
touched: true, | ||
asyncError: null, | ||
submitError: null | ||
touched: true | ||
}, | ||
@@ -245,5 +409,3 @@ _active: undefined, // CHANGE doesn't touch _active | ||
value: 'myValue', | ||
touched: true, | ||
asyncError: null, | ||
submitError: null | ||
touched: true | ||
}, | ||
@@ -258,3 +420,21 @@ _active: 'myField', | ||
it('should set visited on focus and update current with no previous state', function () { | ||
it('should set nested value on change with empty state', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.change('myField.mySubField', 'myValue'), { | ||
form: 'foo' | ||
})); | ||
_expect2['default'](state.foo).toEqual({ | ||
myField: { | ||
mySubField: { | ||
value: 'myValue' | ||
} | ||
}, | ||
_active: undefined, // CHANGE doesn't touch _active | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should set visited on focus and update active with no previous state', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.focus('myField'), { | ||
@@ -275,2 +455,20 @@ form: 'foo' | ||
it('should set visited on focus and update active on deep field with no previous state', function () { | ||
var state = _reducer2['default']({}, _extends({}, _actions.focus('myField.subField'), { | ||
form: 'foo' | ||
})); | ||
_expect2['default'](state.foo).toEqual({ | ||
myField: { | ||
subField: { | ||
visited: true | ||
} | ||
}, | ||
_active: 'myField.subField', | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should set visited on focus and update current with previous state', function () { | ||
@@ -354,2 +552,120 @@ var state = _reducer2['default']({ | ||
it('should pop an array value', function () { | ||
var state = _reducer2['default']({ | ||
testForm: { | ||
myField: [{ | ||
value: 'foo' | ||
}, { | ||
value: 'bar' | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
} | ||
}, _extends({}, _actions.removeArrayValue('myField'), { | ||
form: 'testForm' | ||
})); | ||
_expect2['default'](state.testForm).toEqual({ | ||
myField: [{ | ||
value: 'foo' | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should not change empty array value on remove', function () { | ||
var state = _reducer2['default']({ | ||
testForm: { | ||
myField: [], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
} | ||
}, _extends({}, _actions.removeArrayValue('myField'), { | ||
form: 'testForm' | ||
})); | ||
_expect2['default'](state.testForm).toEqual({ | ||
myField: [], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should remove an array value from start of array', function () { | ||
var state = _reducer2['default']({ | ||
testForm: { | ||
myField: [{ | ||
value: 'foo' | ||
}, { | ||
value: 'bar' | ||
}, { | ||
value: 'baz' | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
} | ||
}, _extends({}, _actions.removeArrayValue('myField', 0), { | ||
form: 'testForm' | ||
})); | ||
_expect2['default'](state.testForm).toEqual({ | ||
myField: [{ | ||
value: 'bar' | ||
}, { | ||
value: 'baz' | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should remove an array value from middle of array', function () { | ||
var state = _reducer2['default']({ | ||
testForm: { | ||
myField: [{ | ||
value: 'foo' | ||
}, { | ||
value: 'bar' | ||
}, { | ||
value: 'baz' | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
} | ||
}, _extends({}, _actions.removeArrayValue('myField', 1), { | ||
form: 'testForm' | ||
})); | ||
_expect2['default'](state.testForm).toEqual({ | ||
myField: [{ | ||
value: 'foo' | ||
}, { | ||
value: 'baz' | ||
}], | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}); | ||
it('should reset values on reset on with previous state', function () { | ||
@@ -356,0 +672,0 @@ var state = _reducer2['default']({ |
'use strict'; | ||
exports.__esModule = true; | ||
exports.addArrayValue = addArrayValue; | ||
exports.blur = blur; | ||
@@ -9,2 +10,3 @@ exports.change = change; | ||
exports.initialize = initialize; | ||
exports.removeArrayValue = removeArrayValue; | ||
exports.reset = reset; | ||
@@ -21,2 +23,6 @@ exports.startAsyncValidation = startAsyncValidation; | ||
function addArrayValue(path, value, index) { | ||
return { type: _actionTypes.ADD_ARRAY_VALUE, path: path, value: value, index: index }; | ||
} | ||
function blur(field, value) { | ||
@@ -42,2 +48,6 @@ return { type: _actionTypes.BLUR, field: field, value: value }; | ||
function removeArrayValue(path, index) { | ||
return { type: _actionTypes.REMOVE_ARRAY_VALUE, path: path, index: index }; | ||
} | ||
function reset() { | ||
@@ -44,0 +54,0 @@ return { type: _actionTypes.RESET }; |
'use strict'; | ||
exports.__esModule = true; | ||
var ADD_ARRAY_VALUE = 'redux-form/ADD_ARRAY_VALUE'; | ||
exports.ADD_ARRAY_VALUE = ADD_ARRAY_VALUE; | ||
var BLUR = 'redux-form/BLUR'; | ||
@@ -14,2 +16,4 @@ exports.BLUR = BLUR; | ||
exports.INITIALIZE = INITIALIZE; | ||
var REMOVE_ARRAY_VALUE = 'redux-form/REMOVE_ARRAY_VALUE'; | ||
exports.REMOVE_ARRAY_VALUE = REMOVE_ARRAY_VALUE; | ||
var RESET = 'redux-form/RESET'; | ||
@@ -16,0 +20,0 @@ exports.RESET = RESET; |
@@ -183,2 +183,3 @@ 'use strict'; | ||
var _props4 = this.props; | ||
var addArrayValue = _props4.addArrayValue; | ||
var asyncBlurFields = _props4.asyncBlurFields; | ||
@@ -195,2 +196,3 @@ var blur = _props4.blur; | ||
var reset = _props4.reset; | ||
var removeArrayValue = _props4.removeArrayValue; | ||
var returnRejectedSubmitPromise = _props4.returnRejectedSubmitPromise; | ||
@@ -206,4 +208,5 @@ var startAsyncValidation = _props4.startAsyncValidation; | ||
var passableProps = _objectWithoutProperties(_props4, ['asyncBlurFields', 'blur', 'change', 'destroy', 'focus', 'fields', 'form', 'initialValues', 'initialize', 'onSubmit', 'reset', 'returnRejectedSubmitPromise', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitFailed', 'touch', 'untouch', 'validate']); | ||
var passableProps = _objectWithoutProperties(_props4, ['addArrayValue', 'asyncBlurFields', 'blur', 'change', 'destroy', 'focus', 'fields', 'form', 'initialValues', 'initialize', 'onSubmit', 'reset', 'removeArrayValue', 'returnRejectedSubmitPromise', 'startAsyncValidation', 'startSubmit', 'stopAsyncValidation', 'stopSubmit', 'submitFailed', 'touch', 'untouch', 'validate']); | ||
// eslint-disable-line no-redeclare | ||
var _allFields$_meta = allFields._meta; | ||
@@ -276,2 +279,3 @@ var allPristine = _allFields$_meta.allPristine; | ||
// actions: | ||
addArrayValue: PropTypes.func.isRequired, | ||
blur: PropTypes.func.isRequired, | ||
@@ -282,2 +286,3 @@ change: PropTypes.func.isRequired, | ||
initialize: PropTypes.func.isRequired, | ||
removeArrayValue: PropTypes.func.isRequired, | ||
reset: PropTypes.func.isRequired, | ||
@@ -284,0 +289,0 @@ startAsyncValidation: PropTypes.func.isRequired, |
@@ -69,2 +69,3 @@ 'use strict'; | ||
// eslint-disable-line no-redeclare | ||
return React.createElement(ReduxForm, passableProps); | ||
@@ -71,0 +72,0 @@ }; |
@@ -1,7 +0,52 @@ | ||
"use strict"; | ||
'use strict'; | ||
exports.__esModule = true; | ||
var getValues = function getValues(fields, form) { | ||
var getValue = function getValue(field, state, dest) { | ||
var dotIndex = field.indexOf('.'); | ||
var openIndex = field.indexOf('['); | ||
var closeIndex = field.indexOf(']'); | ||
if (openIndex > 0 && closeIndex !== openIndex + 1) { | ||
throw new Error('found [ not followed by ]'); | ||
} | ||
if (openIndex > 0 && (dotIndex < 0 || openIndex < dotIndex)) { | ||
(function () { | ||
// array field | ||
var key = field.substring(0, openIndex); | ||
var rest = field.substring(closeIndex + 1); | ||
if (rest[0] === '.') { | ||
rest = rest.substring(1); | ||
} | ||
var array = state && state[key] || []; | ||
if (rest) { | ||
if (!dest[key]) { | ||
dest[key] = []; | ||
} | ||
array.forEach(function (item, index) { | ||
if (!dest[key][index]) { | ||
dest[key][index] = {}; | ||
} | ||
getValue(rest, item, dest[key][index]); | ||
}); | ||
} else { | ||
dest[key] = array.map(function (item) { | ||
return item.value; | ||
}); | ||
} | ||
})(); | ||
} else if (dotIndex > 0) { | ||
// subobject field | ||
var key = field.substring(0, dotIndex); | ||
var rest = field.substring(dotIndex + 1); | ||
if (!dest[key]) { | ||
dest[key] = {}; | ||
} | ||
getValue(rest, state && state[key] || {}, dest[key]); | ||
} else { | ||
dest[field] = state[field] && state[field].value; | ||
} | ||
}; | ||
var getValues = function getValues(fields, state) { | ||
return fields.reduce(function (accumulator, field) { | ||
accumulator[field] = form[field] ? form[field].value : undefined; | ||
getValue(field, state, accumulator); | ||
return accumulator; | ||
@@ -11,3 +56,3 @@ }, {}); | ||
exports["default"] = getValues; | ||
module.exports = exports["default"]; | ||
exports['default'] = getValues; | ||
module.exports = exports['default']; |
@@ -9,30 +9,10 @@ 'use strict'; | ||
var _eventsCreateOnBlur = require('./events/createOnBlur'); | ||
var _readField = require('./readField'); | ||
var _eventsCreateOnBlur2 = _interopRequireDefault(_eventsCreateOnBlur); | ||
var _readField2 = _interopRequireDefault(_readField); | ||
var _eventsCreateOnChange = require('./events/createOnChange'); | ||
var _write = require('./write'); | ||
var _eventsCreateOnChange2 = _interopRequireDefault(_eventsCreateOnChange); | ||
var _write2 = _interopRequireDefault(_write); | ||
var _eventsCreateOnDragStart = require('./events/createOnDragStart'); | ||
var _eventsCreateOnDragStart2 = _interopRequireDefault(_eventsCreateOnDragStart); | ||
var _eventsCreateOnDrop = require('./events/createOnDrop'); | ||
var _eventsCreateOnDrop2 = _interopRequireDefault(_eventsCreateOnDrop); | ||
var _eventsCreateOnFocus = require('./events/createOnFocus'); | ||
var _eventsCreateOnFocus2 = _interopRequireDefault(_eventsCreateOnFocus); | ||
var _isPristine = require('./isPristine'); | ||
var _isPristine2 = _interopRequireDefault(_isPristine); | ||
var _isValid = require('./isValid'); | ||
var _isValid2 = _interopRequireDefault(_isValid); | ||
var _getValues = require('./getValues'); | ||
@@ -42,6 +22,2 @@ | ||
var _silencePromise = require('./silencePromise'); | ||
var _silencePromise2 = _interopRequireDefault(_silencePromise); | ||
/** | ||
@@ -51,10 +27,4 @@ * Reads props and generates (or updates) field structure | ||
var readFields = function readFields(props, myFields, asyncValidate, isReactNative) { | ||
var asyncBlurFields = props.asyncBlurFields; | ||
var blur = props.blur; | ||
var change = props.change; | ||
var fields = props.fields; | ||
var focus = props.focus; | ||
var form = props.form; | ||
var initialValues = props.initialValues; | ||
var readonly = props.readonly; | ||
var validate = props.validate; | ||
@@ -68,72 +38,5 @@ | ||
var allPristine = true; | ||
var fieldObjects = fields.reduce(function (accumulator, name) { | ||
var field = myFields[name] || {}; | ||
var diff = {}; | ||
// create field if it does not exist | ||
if (field.name !== name) { | ||
var onChange = _eventsCreateOnChange2['default'](name, change, isReactNative); | ||
var initialValue = initialValues && initialValues[name]; | ||
field.name = name; | ||
field.defaultChecked = initialValue === true; | ||
field.defaultValue = initialValue; | ||
if (!readonly) { | ||
field.onBlur = _eventsCreateOnBlur2['default'](name, blur, isReactNative, ~asyncBlurFields.indexOf(name) && function (blurName, blurValue) { | ||
return _silencePromise2['default'](asyncValidate(blurName, blurValue)); | ||
}); | ||
field.onChange = onChange; | ||
field.onDragStart = _eventsCreateOnDragStart2['default'](name, function () { | ||
return field.value; | ||
}); | ||
field.onDrop = _eventsCreateOnDrop2['default'](name, change); | ||
field.onFocus = _eventsCreateOnFocus2['default'](name, focus); | ||
field.onUpdate = onChange; // alias to support belle. https://github.com/nikgraf/belle/issues/58 | ||
} | ||
field.valid = true; | ||
field.invalid = false; | ||
} | ||
// update field value | ||
var formField = form[name] || {}; | ||
if (field.value !== formField.value) { | ||
diff.value = formField.value; | ||
diff.checked = typeof formField.value === 'boolean' ? formField.value : undefined; | ||
} | ||
// update dirty/pristine | ||
var pristine = _isPristine2['default'](formField.value, formField.initial); | ||
if (field.pristine !== pristine) { | ||
diff.dirty = !pristine; | ||
diff.pristine = pristine; | ||
} | ||
// update field error | ||
var error = syncErrors[name] || formField.submitError || formField.asyncError; | ||
if (error !== field.error) { | ||
diff.error = error; | ||
} | ||
var valid = _isValid2['default'](error); | ||
if (field.valid !== valid) { | ||
diff.invalid = !valid; | ||
diff.valid = valid; | ||
} | ||
if (error) { | ||
errors[name] = error; | ||
} | ||
var active = form._active === name; | ||
if (active !== field.active) { | ||
diff.active = active; | ||
} | ||
var touched = !!formField.touched; | ||
if (touched !== field.touched) { | ||
diff.touched = touched; | ||
} | ||
var visited = !!formField.visited; | ||
if (visited !== field.visited) { | ||
diff.visited = visited; | ||
} | ||
var result = Object.keys(diff).length ? _extends({}, field, diff) : field; | ||
var fieldObjects = _extends({}, myFields); | ||
fields.forEach(function (name) { | ||
var result = _readField2['default'](form, name, undefined, fieldObjects, syncErrors, asyncValidate, isReactNative, props); | ||
if (result.invalid) { | ||
@@ -145,5 +48,6 @@ allValid = false; | ||
} | ||
accumulator[name] = result; | ||
return accumulator; | ||
}, {}); | ||
if (result.error) { | ||
errors = _write2['default'](name, result.error, errors); | ||
} | ||
}); | ||
Object.defineProperty(fieldObjects, '_meta', { | ||
@@ -150,0 +54,0 @@ value: { |
@@ -5,2 +5,4 @@ 'use strict'; | ||
var _behaviors; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
@@ -18,2 +20,10 @@ | ||
var _read = require('./read'); | ||
var _read2 = _interopRequireDefault(_read); | ||
var _write = require('./write'); | ||
var _write2 = _interopRequireDefault(_write); | ||
var initialState = { | ||
@@ -38,104 +48,163 @@ _active: undefined, | ||
exports.getValues = getValues; | ||
var behaviors = (_behaviors = {}, _behaviors[_actionTypes.ADD_ARRAY_VALUE] = function (state, _ref) { | ||
var path = _ref.path; | ||
var index = _ref.index; | ||
var value = _ref.value; | ||
var array = _read2['default'](path, state); | ||
var stateCopy = _extends({}, state); | ||
var arrayCopy = array ? [].concat(array) : []; | ||
var newValue = { value: value }; | ||
if (index === undefined) { | ||
arrayCopy.push(newValue); | ||
} else { | ||
arrayCopy.splice(index, 0, newValue); | ||
} | ||
return _write2['default'](path, arrayCopy, stateCopy); | ||
}, _behaviors[_actionTypes.BLUR] = function (state, _ref2) { | ||
var field = _ref2.field; | ||
var value = _ref2.value; | ||
var touch = _ref2.touch; | ||
// remove _active from state | ||
var _active = state._active; | ||
var stateCopy = _objectWithoutProperties(state, ['_active']); | ||
// eslint-disable-line prefer-const | ||
if (value !== undefined) { | ||
stateCopy = _write2['default'](field + '.value', value, stateCopy); | ||
} | ||
if (touch) { | ||
stateCopy = _write2['default'](field + '.touched', true, stateCopy); | ||
} | ||
return stateCopy; | ||
}, _behaviors[_actionTypes.CHANGE] = function (state, _ref3) { | ||
var field = _ref3.field; | ||
var value = _ref3.value; | ||
var touch = _ref3.touch; | ||
var stateCopy = _extends({}, state); | ||
stateCopy = _write2['default'](field + '.value', value, stateCopy); | ||
if (touch) { | ||
stateCopy = _write2['default'](field + '.touched', true, stateCopy); | ||
} | ||
delete stateCopy.asyncError; | ||
delete stateCopy.submitError; | ||
return stateCopy; | ||
}, _behaviors[_actionTypes.DESTROY] = function () { | ||
return undefined; | ||
}, _behaviors[_actionTypes.FOCUS] = function (state, _ref4) { | ||
var field = _ref4.field; | ||
var stateCopy = _extends({}, state); | ||
stateCopy = _write2['default'](field + '.visited', true, stateCopy); | ||
stateCopy._active = field; | ||
return stateCopy; | ||
}, _behaviors[_actionTypes.INITIALIZE] = function (state, _ref5) { | ||
var data = _ref5.data; | ||
return _extends({}, _mapValues2['default'](data, function (value) { | ||
return { | ||
initial: value, | ||
value: value | ||
}; | ||
}), { | ||
_asyncValidating: false, | ||
_active: undefined, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}, _behaviors[_actionTypes.REMOVE_ARRAY_VALUE] = function (state, _ref6) { | ||
var path = _ref6.path; | ||
var index = _ref6.index; | ||
var array = _read2['default'](path, state); | ||
var stateCopy = _extends({}, state); | ||
var arrayCopy = array ? [].concat(array) : []; | ||
if (index === undefined) { | ||
arrayCopy.pop(); | ||
} else if (isNaN(index)) { | ||
delete arrayCopy[index]; | ||
} else { | ||
arrayCopy.splice(index, 1); | ||
} | ||
return _write2['default'](path, arrayCopy, stateCopy); | ||
}, _behaviors[_actionTypes.RESET] = function (state) { | ||
return _extends({}, _mapValues2['default'](state, function (field, name) { | ||
return name[0] === '_' ? field : { | ||
initial: field.initial, | ||
value: field.initial | ||
}; | ||
}), { | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
}, _behaviors[_actionTypes.START_ASYNC_VALIDATION] = function (state) { | ||
return _extends({}, state, { | ||
_asyncValidating: true | ||
}); | ||
}, _behaviors[_actionTypes.START_SUBMIT] = function (state) { | ||
return _extends({}, state, { | ||
_submitting: true | ||
}); | ||
}, _behaviors[_actionTypes.STOP_ASYNC_VALIDATION] = function (state, _ref7) { | ||
var errors = _ref7.errors; | ||
return _extends({}, _mapValues2['default'](state, function (value) { | ||
return value && value.asyncError ? _extends({}, value, { asyncError: undefined }) : value; | ||
}), _mapValues2['default'](errors, function (error, key) { | ||
return _extends({}, state[key], { | ||
asyncError: error | ||
}); | ||
}), { | ||
_asyncValidating: false, | ||
_error: errors && errors._error | ||
}); | ||
}, _behaviors[_actionTypes.STOP_SUBMIT] = function (state, _ref8) { | ||
var errors = _ref8.errors; | ||
return _extends({}, state, errors ? _mapValues2['default'](errors, function (error, key) { | ||
return _extends({}, state[key], { | ||
submitError: error | ||
}); | ||
}) : {}, { | ||
_error: errors && errors._error, | ||
_submitting: false, | ||
_submitFailed: !!(errors && Object.keys(errors).length) | ||
}); | ||
}, _behaviors[_actionTypes.SUBMIT_FAILED] = function (state) { | ||
return _extends({}, state, { | ||
_submitFailed: true | ||
}); | ||
}, _behaviors[_actionTypes.TOUCH] = function (state, _ref9) { | ||
var fields = _ref9.fields; | ||
return _extends({}, state, fields.reduce(function (accumulator, field) { | ||
accumulator[field] = _extends({}, state[field], { | ||
touched: true | ||
}); | ||
return accumulator; | ||
}, {})); | ||
}, _behaviors[_actionTypes.UNTOUCH] = function (state, _ref10) { | ||
var fields = _ref10.fields; | ||
return _extends({}, state, fields.reduce(function (accumulator, field) { | ||
accumulator[field] = _extends({}, state[field], { | ||
touched: false | ||
}); | ||
return accumulator; | ||
}, {})); | ||
}, _behaviors); | ||
var reducer = function reducer() { | ||
var state = arguments.length <= 0 || arguments[0] === undefined ? initialState : arguments[0]; | ||
var _extends2, _extends3, _extends4; | ||
var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
switch (action.type) { | ||
case _actionTypes.BLUR: | ||
return _extends({}, state, (_extends2 = {}, _extends2[action.field] = _extends({}, state[action.field], { | ||
value: action.value === undefined ? (state[action.field] || {}).value : action.value, | ||
touched: !!(action.touch || (state[action.field] || {}).touched) | ||
}), _extends2._active = undefined, _extends2)); | ||
case _actionTypes.CHANGE: | ||
return _extends({}, state, (_extends3 = {}, _extends3[action.field] = _extends({}, state[action.field], { | ||
value: action.value, | ||
touched: !!(action.touch || (state[action.field] || {}).touched), | ||
asyncError: undefined, | ||
submitError: undefined | ||
}), _extends3)); | ||
case _actionTypes.DESTROY: | ||
return undefined; | ||
case _actionTypes.FOCUS: | ||
return _extends({}, state, (_extends4 = {}, _extends4[action.field] = _extends({}, state[action.field], { | ||
visited: true | ||
}), _extends4._active = action.field, _extends4)); | ||
case _actionTypes.INITIALIZE: | ||
return _extends({}, _mapValues2['default'](action.data, function (value) { | ||
return { | ||
initial: value, | ||
value: value | ||
}; | ||
}), { | ||
_asyncValidating: false, | ||
_active: undefined, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
case _actionTypes.RESET: | ||
return _extends({}, _mapValues2['default'](state, function (field, name) { | ||
return name[0] === '_' ? field : { | ||
initial: field.initial, | ||
value: field.initial | ||
}; | ||
}), { | ||
_active: undefined, | ||
_asyncValidating: false, | ||
_error: undefined, | ||
_submitting: false, | ||
_submitFailed: false | ||
}); | ||
case _actionTypes.START_ASYNC_VALIDATION: | ||
return _extends({}, state, { | ||
_asyncValidating: true | ||
}); | ||
case _actionTypes.START_SUBMIT: | ||
return _extends({}, state, { | ||
_submitting: true | ||
}); | ||
case _actionTypes.STOP_ASYNC_VALIDATION: | ||
return _extends({}, _mapValues2['default'](state, function (value) { | ||
return value && value.asyncError ? _extends({}, value, { asyncError: undefined }) : value; | ||
}), _mapValues2['default'](action.errors, function (error, key) { | ||
return _extends({}, state[key], { | ||
asyncError: error | ||
}); | ||
}), { | ||
_asyncValidating: false, | ||
_error: action.errors && action.errors._error | ||
}); | ||
case _actionTypes.STOP_SUBMIT: | ||
return _extends({}, state, action.errors ? _mapValues2['default'](action.errors, function (error, key) { | ||
return _extends({}, state[key], { | ||
submitError: error | ||
}); | ||
}) : {}, { | ||
_error: action.errors && action.errors._error, | ||
_submitting: false, | ||
_submitFailed: !!(action.errors && Object.keys(action.errors).length) | ||
}); | ||
case _actionTypes.SUBMIT_FAILED: | ||
return _extends({}, state, { | ||
_submitFailed: true | ||
}); | ||
case _actionTypes.TOUCH: | ||
return _extends({}, state, action.fields.reduce(function (accumulator, field) { | ||
accumulator[field] = _extends({}, state[field], { | ||
touched: true | ||
}); | ||
return accumulator; | ||
}, {})); | ||
case _actionTypes.UNTOUCH: | ||
return _extends({}, state, action.fields.reduce(function (accumulator, field) { | ||
accumulator[field] = _extends({}, state[field], { | ||
touched: false | ||
}); | ||
return accumulator; | ||
}, {})); | ||
default: | ||
return state; | ||
} | ||
var behavior = behaviors[action.type]; | ||
return behavior ? behavior(state, action) : state; | ||
}; | ||
@@ -146,3 +215,3 @@ | ||
var _extends10; | ||
var _extends7; | ||
@@ -155,2 +224,3 @@ var action = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
// eslint-disable-line no-redeclare | ||
if (!form) { | ||
@@ -160,23 +230,23 @@ return state; | ||
if (key) { | ||
var _extends7, _extends8; | ||
var _extends4, _extends5; | ||
if (action.type === _actionTypes.DESTROY) { | ||
var _extends6; | ||
var _extends3; | ||
return _extends({}, state, (_extends6 = {}, _extends6[form] = state[form] && Object.keys(state[form]).reduce(function (accumulator, stateKey) { | ||
var _extends5; | ||
return _extends({}, state, (_extends3 = {}, _extends3[form] = state[form] && Object.keys(state[form]).reduce(function (accumulator, stateKey) { | ||
var _extends2; | ||
return stateKey === key ? accumulator : _extends({}, accumulator, (_extends5 = {}, _extends5[stateKey] = state[form][stateKey], _extends5)); | ||
}, {}), _extends6)); | ||
return stateKey === key ? accumulator : _extends({}, accumulator, (_extends2 = {}, _extends2[stateKey] = state[form][stateKey], _extends2)); | ||
}, {}), _extends3)); | ||
} | ||
return _extends({}, state, (_extends8 = {}, _extends8[form] = _extends({}, state[form], (_extends7 = {}, _extends7[key] = reducer((state[form] || {})[key], rest), _extends7)), _extends8)); | ||
return _extends({}, state, (_extends5 = {}, _extends5[form] = _extends({}, state[form], (_extends4 = {}, _extends4[key] = reducer((state[form] || {})[key], rest), _extends4)), _extends5)); | ||
} | ||
if (action.type === _actionTypes.DESTROY) { | ||
return Object.keys(state).reduce(function (accumulator, formName) { | ||
var _extends9; | ||
var _extends6; | ||
return formName === form ? accumulator : _extends({}, accumulator, (_extends9 = {}, _extends9[formName] = state[formName], _extends9)); | ||
return formName === form ? accumulator : _extends({}, accumulator, (_extends6 = {}, _extends6[formName] = state[formName], _extends6)); | ||
}, {}); | ||
} | ||
return _extends({}, state, (_extends10 = {}, _extends10[form] = reducer(state[form], rest), _extends10)); | ||
return _extends({}, state, (_extends7 = {}, _extends7[form] = reducer(state[form], rest), _extends7)); | ||
} | ||
@@ -183,0 +253,0 @@ |
{ | ||
"name": "redux-form", | ||
"version": "3.0.12", | ||
"version": "3.1.0", | ||
"description": "A higher order component decorator for forms using Redux and React", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
438676
71
10135
155264