redux-freeform 5.2.0 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,25 +9,37 @@ const validatorToPredicate = (validatorFn, emptyCase) => (
9
9
 
10
10
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
11
11
 
12
- function createCommonjsModule(fn, module) {
13
- return module = { exports: {} }, fn(module, module.exports), module.exports;
14
- }
12
+ var dayjs_min = {exports: {}};
15
13
 
16
- var dayjs_min = createCommonjsModule(function (module, exports) {
17
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var i=t.name;v[i]=t,r=i;}return !n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
18
- });
14
+ (function (module, exports) {
15
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else {var i=t.name;v[i]=t,r=i;}return !n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
16
+ }(dayjs_min));
19
17
 
20
- var customParseFormat = createCommonjsModule(function (module, exports) {
21
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else{var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
22
- });
18
+ var dayjs = dayjs_min.exports;
19
+
20
+ var customParseFormat$1 = {exports: {}};
21
+
22
+ (function (module, exports) {
23
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
24
+ }(customParseFormat$1));
23
25
 
24
- var isSameOrBefore = createCommonjsModule(function (module, exports) {
26
+ var customParseFormat = customParseFormat$1.exports;
27
+
28
+ var isSameOrBefore$1 = {exports: {}};
29
+
30
+ (function (module, exports) {
25
31
  !function(e,i){module.exports=i();}(commonjsGlobal,(function(){return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)};}}));
26
- });
32
+ }(isSameOrBefore$1));
33
+
34
+ var isSameOrBefore = isSameOrBefore$1.exports;
27
35
 
28
- var isSameOrAfter = createCommonjsModule(function (module, exports) {
36
+ var isSameOrAfter$1 = {exports: {}};
37
+
38
+ (function (module, exports) {
29
39
  !function(e,t){module.exports=t();}(commonjsGlobal,(function(){return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)};}}));
30
- });
40
+ }(isSameOrAfter$1));
41
+
42
+ var isSameOrAfter = isSameOrAfter$1.exports;
31
43
 
32
44
  /* eslint-disable no-unused-vars */
33
45
 
@@ -37,9 +49,9 @@ const createValidator = (type, error) => {
37
49
  return validator;
38
50
  };
39
51
 
40
- dayjs_min.extend(customParseFormat);
41
- dayjs_min.extend(isSameOrBefore);
42
- dayjs_min.extend(isSameOrAfter);
52
+ dayjs.extend(customParseFormat);
53
+ dayjs.extend(isSameOrBefore);
54
+ dayjs.extend(isSameOrAfter);
43
55
 
44
56
  let validatorFns = {};
45
57
 
@@ -118,15 +130,14 @@ const MATCHES_FIELD = "validator/MATCHES_FIELD";
118
130
  const MATCHES_FIELD_ERROR = "error/MATCHES_FIELD";
119
131
  const matchesField = createValidator(MATCHES_FIELD, MATCHES_FIELD_ERROR);
120
132
  validatorFns[MATCHES_FIELD] = (value, args, form) => {
121
- if (value === "") {
122
- return true;
123
- }
124
- if (form[args[0]] === undefined) {
133
+ const dependentField = form[args[0]];
134
+ const dependentFieldValue = dependentField?.rawValue ?? "";
135
+ if (dependentField === undefined) {
125
136
  throw new Error(
126
137
  `${args[0]} was passed to matchesField, but that field does not exist in the form`
127
138
  );
128
139
  }
129
- return value === form[args[0]].rawValue;
140
+ return value === dependentFieldValue;
130
141
  };
131
142
 
132
143
  const validateWhenErrorMessage = type =>
@@ -269,8 +280,8 @@ validatorFns[DATE_BEFORE_TODAY] = (value, args, form) => {
269
280
  "Date format and unit need to be defined for dateBeforeToday, one or both are undefined"
270
281
  );
271
282
  }
272
- const now = dayjs_min();
273
- const dateValue = dayjs_min(value, dateFormat);
283
+ const now = dayjs();
284
+ const dateValue = dayjs(value, dateFormat);
274
285
 
275
286
  if (inclusive === true) {
276
287
  return dateValue.isSameOrBefore(now, unit);
@@ -297,8 +308,8 @@ validatorFns[DATE_AFTER_TODAY] = (value, args, form) => {
297
308
  "Date format and unit need to be defined for dateAfterToday, one or both are undefined"
298
309
  );
299
310
  }
300
- const now = dayjs_min();
301
- const dateValue = dayjs_min(value, dateFormat);
311
+ const now = dayjs();
312
+ const dateValue = dayjs(value, dateFormat);
302
313
 
303
314
  if (inclusive === true) {
304
315
  return dateValue.isSameOrAfter(now, unit);
@@ -682,7 +693,7 @@ function get(state, prop) {
682
693
  return value;
683
694
  }
684
695
 
685
- function set(state, prop, value) {
696
+ function set$1(state, prop, value) {
686
697
  assertUnrevoked(state);
687
698
  state.assigned[prop] = true;
688
699
 
@@ -733,8 +744,8 @@ function proxyProperty(draft, prop, enumerable) {
733
744
  return get(this[DRAFT_STATE], prop);
734
745
  },
735
746
 
736
- set: function set$1(value) {
737
- set(this[DRAFT_STATE], prop, value);
747
+ set: function set$1$1(value) {
748
+ set$1(this[DRAFT_STATE], prop, value);
738
749
  }
739
750
 
740
751
  };
@@ -915,7 +926,7 @@ var objectTraps = {
915
926
  return Reflect.ownKeys(source$1(target));
916
927
  },
917
928
 
918
- set: set$1,
929
+ set: set$1$1,
919
930
  deleteProperty: deleteProperty,
920
931
  getOwnPropertyDescriptor: getOwnPropertyDescriptor,
921
932
 
@@ -993,7 +1004,7 @@ function get$1(state, prop) {
993
1004
  return drafts[prop] = createProxy$1(value, state);
994
1005
  }
995
1006
 
996
- function set$1(state, prop, value) {
1007
+ function set$1$1(state, prop, value) {
997
1008
  if (!state.modified) {
998
1009
  var baseValue = peek$1(state.base, prop); // Optimize based on value's truthiness. Truthy values are guaranteed to
999
1010
  // never be undefined, so we can avoid the `in` operator. Lastly, truthy
@@ -1216,7 +1227,7 @@ var Immer = function Immer(config) {
1216
1227
  };
1217
1228
 
1218
1229
  Immer.prototype.produce = function produce (base, recipe, patchListener) {
1219
- var this$1 = this;
1230
+ var this$1$1 = this;
1220
1231
 
1221
1232
  // curried invocation
1222
1233
  if (typeof base === "function" && typeof recipe !== "function") {
@@ -1224,12 +1235,12 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
1224
1235
  recipe = base;
1225
1236
  var self = this;
1226
1237
  return function curriedProduce(base) {
1227
- var this$1 = this;
1238
+ var this$1$1 = this;
1228
1239
  if ( base === void 0 ) base = defaultBase;
1229
1240
  var args = [], len = arguments.length - 1;
1230
1241
  while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
1231
1242
 
1232
- return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1, draft ].concat( args )); }); // prettier-ignore
1243
+ return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1$1, draft ].concat( args )); }); // prettier-ignore
1233
1244
  };
1234
1245
  } // prettier-ignore
1235
1246
 
@@ -1261,7 +1272,7 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
1261
1272
  if (result instanceof Promise) {
1262
1273
  return result.then(function (result) {
1263
1274
  scope.usePatches(patchListener);
1264
- return this$1.processResult(result, scope);
1275
+ return this$1$1.processResult(result, scope);
1265
1276
  }, function (error) {
1266
1277
  scope.revoke();
1267
1278
  throw error;
@@ -1278,14 +1289,14 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
1278
1289
  };
1279
1290
 
1280
1291
  Immer.prototype.produceWithPatches = function produceWithPatches (arg1, arg2, arg3) {
1281
- var this$1 = this;
1292
+ var this$1$1 = this;
1282
1293
 
1283
1294
  if (typeof arg1 === "function") {
1284
1295
  return function (state) {
1285
1296
  var args = [], len = arguments.length - 1;
1286
1297
  while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
1287
1298
 
1288
- return this$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
1299
+ return this$1$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
1289
1300
  };
1290
1301
  } // non-curried form
1291
1302
 
@@ -1410,7 +1421,7 @@ Immer.prototype.processResult = function processResult (result, scope) {
1410
1421
 
1411
1422
 
1412
1423
  Immer.prototype.finalize = function finalize (draft, path, scope) {
1413
- var this$1 = this;
1424
+ var this$1$1 = this;
1414
1425
 
1415
1426
  var state = draft[DRAFT_STATE];
1416
1427
 
@@ -1444,7 +1455,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
1444
1455
  var base = state.base;
1445
1456
  var copy = state.copy;
1446
1457
  each(base, function (prop) {
1447
- if (!has(copy, prop)) { this$1.onDelete(state, prop); }
1458
+ if (!has(copy, prop)) { this$1$1.onDelete(state, prop); }
1448
1459
  });
1449
1460
  }
1450
1461
  }
@@ -1473,7 +1484,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
1473
1484
 
1474
1485
 
1475
1486
  Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
1476
- var this$1 = this;
1487
+ var this$1$1 = this;
1477
1488
 
1478
1489
  var state = root[DRAFT_STATE];
1479
1490
 
@@ -1499,7 +1510,7 @@ Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
1499
1510
  if (isDraft(value)) {
1500
1511
  var path = isDraftProp && needPatches && !state.assigned[prop] ? rootPath.concat(prop) : null; // Drafts owned by `scope` are finalized here.
1501
1512
 
1502
- value = this$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing.
1513
+ value = this$1$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing.
1503
1514
 
1504
1515
  if (isDraft(value)) {
1505
1516
  scope.canAutoFreeze = false;
@@ -1524,8 +1535,8 @@ Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
1524
1535
  each(value, finalizeProperty);
1525
1536
  }
1526
1537
 
1527
- if (isDraftProp && this$1.onAssign) {
1528
- this$1.onAssign(state, prop, value);
1538
+ if (isDraftProp && this$1$1.onAssign) {
1539
+ this$1$1.onAssign(state, prop, value);
1529
1540
  }
1530
1541
  };
1531
1542
 
@@ -1560,14 +1571,14 @@ var produce = immer.produce;
1560
1571
  * [nextState, patches, inversePatches] (instead of just the next state)
1561
1572
  */
1562
1573
 
1563
- var produceWithPatches = immer.produceWithPatches.bind(immer);
1574
+ immer.produceWithPatches.bind(immer);
1564
1575
  /**
1565
1576
  * Pass true to automatically freeze all copies created by Immer.
1566
1577
  *
1567
1578
  * By default, auto-freezing is disabled in production.
1568
1579
  */
1569
1580
 
1570
- var setAutoFreeze = immer.setAutoFreeze.bind(immer);
1581
+ immer.setAutoFreeze.bind(immer);
1571
1582
  /**
1572
1583
  * Pass true to use the ES2015 `Proxy` class when creating drafts, which is
1573
1584
  * always faster than using ES5 proxies.
@@ -1575,20 +1586,20 @@ var setAutoFreeze = immer.setAutoFreeze.bind(immer);
1575
1586
  * By default, feature detection is used, so calling this is rarely necessary.
1576
1587
  */
1577
1588
 
1578
- var setUseProxies = immer.setUseProxies.bind(immer);
1589
+ immer.setUseProxies.bind(immer);
1579
1590
  /**
1580
1591
  * Apply an array of Immer patches to the first argument.
1581
1592
  *
1582
1593
  * This function is a producer, which means copy-on-write is in effect.
1583
1594
  */
1584
1595
 
1585
- var applyPatches$1 = immer.applyPatches.bind(immer);
1596
+ immer.applyPatches.bind(immer);
1586
1597
  /**
1587
1598
  * Create an Immer draft from the given base state, which may be a draft itself.
1588
1599
  * The draft can be modified until you finalize it with the `finishDraft` function.
1589
1600
  */
1590
1601
 
1591
- var createDraft = immer.createDraft.bind(immer);
1602
+ immer.createDraft.bind(immer);
1592
1603
  /**
1593
1604
  * Finalize an Immer draft from a `createDraft` call, returning the base state
1594
1605
  * (if no changes were made) or a modified copy. The draft must *not* be
@@ -1598,7 +1609,7 @@ var createDraft = immer.createDraft.bind(immer);
1598
1609
  * changes that were made.
1599
1610
  */
1600
1611
 
1601
- var finishDraft = immer.finishDraft.bind(immer);
1612
+ immer.finishDraft.bind(immer);
1602
1613
 
1603
1614
  const createInitialState = formConfig => {
1604
1615
  let initialForm = {};
@@ -1623,7 +1634,7 @@ const createInitialState = formConfig => {
1623
1634
  };
1624
1635
 
1625
1636
  const SET = "field/SET";
1626
- const set$2 = fieldName => value => ({
1637
+ const set = fieldName => value => ({
1627
1638
  type: SET,
1628
1639
  payload: { fieldName, value }
1629
1640
  });
@@ -1703,7 +1714,7 @@ const createMapDispatchToProps = formConfig => {
1703
1714
  const keys = Object.keys(formConfig);
1704
1715
  for (let fieldName of keys) {
1705
1716
  dispatchObj.fields[fieldName] = {
1706
- set: value => dispatch(set$2(fieldName)(value)),
1717
+ set: value => dispatch(set(fieldName)(value)),
1707
1718
  addValidator: validator => dispatch(addValidator(fieldName)(validator))
1708
1719
  };
1709
1720
  }
@@ -5,25 +5,37 @@ const validatorToPredicate = (validatorFn, emptyCase) => (
5
5
 
6
6
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
7
7
 
8
- function createCommonjsModule(fn, module) {
9
- return module = { exports: {} }, fn(module, module.exports), module.exports;
10
- }
8
+ var dayjs_min = {exports: {}};
11
9
 
12
- var dayjs_min = createCommonjsModule(function (module, exports) {
13
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var i=t.name;v[i]=t,r=i;}return !n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
14
- });
10
+ (function (module, exports) {
11
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else {var i=t.name;v[i]=t,r=i;}return !n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
12
+ }(dayjs_min));
15
13
 
16
- var customParseFormat = createCommonjsModule(function (module, exports) {
17
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else{var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
18
- });
14
+ var dayjs = dayjs_min.exports;
15
+
16
+ var customParseFormat$1 = {exports: {}};
17
+
18
+ (function (module, exports) {
19
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
20
+ }(customParseFormat$1));
19
21
 
20
- var isSameOrBefore = createCommonjsModule(function (module, exports) {
22
+ var customParseFormat = customParseFormat$1.exports;
23
+
24
+ var isSameOrBefore$1 = {exports: {}};
25
+
26
+ (function (module, exports) {
21
27
  !function(e,i){module.exports=i();}(commonjsGlobal,(function(){return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)};}}));
22
- });
28
+ }(isSameOrBefore$1));
29
+
30
+ var isSameOrBefore = isSameOrBefore$1.exports;
23
31
 
24
- var isSameOrAfter = createCommonjsModule(function (module, exports) {
32
+ var isSameOrAfter$1 = {exports: {}};
33
+
34
+ (function (module, exports) {
25
35
  !function(e,t){module.exports=t();}(commonjsGlobal,(function(){return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)};}}));
26
- });
36
+ }(isSameOrAfter$1));
37
+
38
+ var isSameOrAfter = isSameOrAfter$1.exports;
27
39
 
28
40
  /* eslint-disable no-unused-vars */
29
41
 
@@ -33,9 +45,9 @@ const createValidator = (type, error) => {
33
45
  return validator;
34
46
  };
35
47
 
36
- dayjs_min.extend(customParseFormat);
37
- dayjs_min.extend(isSameOrBefore);
38
- dayjs_min.extend(isSameOrAfter);
48
+ dayjs.extend(customParseFormat);
49
+ dayjs.extend(isSameOrBefore);
50
+ dayjs.extend(isSameOrAfter);
39
51
 
40
52
  let validatorFns = {};
41
53
 
@@ -114,15 +126,14 @@ const MATCHES_FIELD = "validator/MATCHES_FIELD";
114
126
  const MATCHES_FIELD_ERROR = "error/MATCHES_FIELD";
115
127
  const matchesField = createValidator(MATCHES_FIELD, MATCHES_FIELD_ERROR);
116
128
  validatorFns[MATCHES_FIELD] = (value, args, form) => {
117
- if (value === "") {
118
- return true;
119
- }
120
- if (form[args[0]] === undefined) {
129
+ const dependentField = form[args[0]];
130
+ const dependentFieldValue = dependentField?.rawValue ?? "";
131
+ if (dependentField === undefined) {
121
132
  throw new Error(
122
133
  `${args[0]} was passed to matchesField, but that field does not exist in the form`
123
134
  );
124
135
  }
125
- return value === form[args[0]].rawValue;
136
+ return value === dependentFieldValue;
126
137
  };
127
138
 
128
139
  const validateWhenErrorMessage = type =>
@@ -265,8 +276,8 @@ validatorFns[DATE_BEFORE_TODAY] = (value, args, form) => {
265
276
  "Date format and unit need to be defined for dateBeforeToday, one or both are undefined"
266
277
  );
267
278
  }
268
- const now = dayjs_min();
269
- const dateValue = dayjs_min(value, dateFormat);
279
+ const now = dayjs();
280
+ const dateValue = dayjs(value, dateFormat);
270
281
 
271
282
  if (inclusive === true) {
272
283
  return dateValue.isSameOrBefore(now, unit);
@@ -293,8 +304,8 @@ validatorFns[DATE_AFTER_TODAY] = (value, args, form) => {
293
304
  "Date format and unit need to be defined for dateAfterToday, one or both are undefined"
294
305
  );
295
306
  }
296
- const now = dayjs_min();
297
- const dateValue = dayjs_min(value, dateFormat);
307
+ const now = dayjs();
308
+ const dateValue = dayjs(value, dateFormat);
298
309
 
299
310
  if (inclusive === true) {
300
311
  return dateValue.isSameOrAfter(now, unit);
@@ -678,7 +689,7 @@ function get(state, prop) {
678
689
  return value;
679
690
  }
680
691
 
681
- function set(state, prop, value) {
692
+ function set$1(state, prop, value) {
682
693
  assertUnrevoked(state);
683
694
  state.assigned[prop] = true;
684
695
 
@@ -729,8 +740,8 @@ function proxyProperty(draft, prop, enumerable) {
729
740
  return get(this[DRAFT_STATE], prop);
730
741
  },
731
742
 
732
- set: function set$1(value) {
733
- set(this[DRAFT_STATE], prop, value);
743
+ set: function set$1$1(value) {
744
+ set$1(this[DRAFT_STATE], prop, value);
734
745
  }
735
746
 
736
747
  };
@@ -911,7 +922,7 @@ var objectTraps = {
911
922
  return Reflect.ownKeys(source$1(target));
912
923
  },
913
924
 
914
- set: set$1,
925
+ set: set$1$1,
915
926
  deleteProperty: deleteProperty,
916
927
  getOwnPropertyDescriptor: getOwnPropertyDescriptor,
917
928
 
@@ -989,7 +1000,7 @@ function get$1(state, prop) {
989
1000
  return drafts[prop] = createProxy$1(value, state);
990
1001
  }
991
1002
 
992
- function set$1(state, prop, value) {
1003
+ function set$1$1(state, prop, value) {
993
1004
  if (!state.modified) {
994
1005
  var baseValue = peek$1(state.base, prop); // Optimize based on value's truthiness. Truthy values are guaranteed to
995
1006
  // never be undefined, so we can avoid the `in` operator. Lastly, truthy
@@ -1212,7 +1223,7 @@ var Immer = function Immer(config) {
1212
1223
  };
1213
1224
 
1214
1225
  Immer.prototype.produce = function produce (base, recipe, patchListener) {
1215
- var this$1 = this;
1226
+ var this$1$1 = this;
1216
1227
 
1217
1228
  // curried invocation
1218
1229
  if (typeof base === "function" && typeof recipe !== "function") {
@@ -1220,12 +1231,12 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
1220
1231
  recipe = base;
1221
1232
  var self = this;
1222
1233
  return function curriedProduce(base) {
1223
- var this$1 = this;
1234
+ var this$1$1 = this;
1224
1235
  if ( base === void 0 ) base = defaultBase;
1225
1236
  var args = [], len = arguments.length - 1;
1226
1237
  while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
1227
1238
 
1228
- return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1, draft ].concat( args )); }); // prettier-ignore
1239
+ return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1$1, draft ].concat( args )); }); // prettier-ignore
1229
1240
  };
1230
1241
  } // prettier-ignore
1231
1242
 
@@ -1257,7 +1268,7 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
1257
1268
  if (result instanceof Promise) {
1258
1269
  return result.then(function (result) {
1259
1270
  scope.usePatches(patchListener);
1260
- return this$1.processResult(result, scope);
1271
+ return this$1$1.processResult(result, scope);
1261
1272
  }, function (error) {
1262
1273
  scope.revoke();
1263
1274
  throw error;
@@ -1274,14 +1285,14 @@ Immer.prototype.produce = function produce (base, recipe, patchListener) {
1274
1285
  };
1275
1286
 
1276
1287
  Immer.prototype.produceWithPatches = function produceWithPatches (arg1, arg2, arg3) {
1277
- var this$1 = this;
1288
+ var this$1$1 = this;
1278
1289
 
1279
1290
  if (typeof arg1 === "function") {
1280
1291
  return function (state) {
1281
1292
  var args = [], len = arguments.length - 1;
1282
1293
  while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
1283
1294
 
1284
- return this$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
1295
+ return this$1$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
1285
1296
  };
1286
1297
  } // non-curried form
1287
1298
 
@@ -1406,7 +1417,7 @@ Immer.prototype.processResult = function processResult (result, scope) {
1406
1417
 
1407
1418
 
1408
1419
  Immer.prototype.finalize = function finalize (draft, path, scope) {
1409
- var this$1 = this;
1420
+ var this$1$1 = this;
1410
1421
 
1411
1422
  var state = draft[DRAFT_STATE];
1412
1423
 
@@ -1440,7 +1451,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
1440
1451
  var base = state.base;
1441
1452
  var copy = state.copy;
1442
1453
  each(base, function (prop) {
1443
- if (!has(copy, prop)) { this$1.onDelete(state, prop); }
1454
+ if (!has(copy, prop)) { this$1$1.onDelete(state, prop); }
1444
1455
  });
1445
1456
  }
1446
1457
  }
@@ -1469,7 +1480,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
1469
1480
 
1470
1481
 
1471
1482
  Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
1472
- var this$1 = this;
1483
+ var this$1$1 = this;
1473
1484
 
1474
1485
  var state = root[DRAFT_STATE];
1475
1486
 
@@ -1495,7 +1506,7 @@ Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
1495
1506
  if (isDraft(value)) {
1496
1507
  var path = isDraftProp && needPatches && !state.assigned[prop] ? rootPath.concat(prop) : null; // Drafts owned by `scope` are finalized here.
1497
1508
 
1498
- value = this$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing.
1509
+ value = this$1$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing.
1499
1510
 
1500
1511
  if (isDraft(value)) {
1501
1512
  scope.canAutoFreeze = false;
@@ -1520,8 +1531,8 @@ Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
1520
1531
  each(value, finalizeProperty);
1521
1532
  }
1522
1533
 
1523
- if (isDraftProp && this$1.onAssign) {
1524
- this$1.onAssign(state, prop, value);
1534
+ if (isDraftProp && this$1$1.onAssign) {
1535
+ this$1$1.onAssign(state, prop, value);
1525
1536
  }
1526
1537
  };
1527
1538
 
@@ -1556,14 +1567,14 @@ var produce = immer.produce;
1556
1567
  * [nextState, patches, inversePatches] (instead of just the next state)
1557
1568
  */
1558
1569
 
1559
- var produceWithPatches = immer.produceWithPatches.bind(immer);
1570
+ immer.produceWithPatches.bind(immer);
1560
1571
  /**
1561
1572
  * Pass true to automatically freeze all copies created by Immer.
1562
1573
  *
1563
1574
  * By default, auto-freezing is disabled in production.
1564
1575
  */
1565
1576
 
1566
- var setAutoFreeze = immer.setAutoFreeze.bind(immer);
1577
+ immer.setAutoFreeze.bind(immer);
1567
1578
  /**
1568
1579
  * Pass true to use the ES2015 `Proxy` class when creating drafts, which is
1569
1580
  * always faster than using ES5 proxies.
@@ -1571,20 +1582,20 @@ var setAutoFreeze = immer.setAutoFreeze.bind(immer);
1571
1582
  * By default, feature detection is used, so calling this is rarely necessary.
1572
1583
  */
1573
1584
 
1574
- var setUseProxies = immer.setUseProxies.bind(immer);
1585
+ immer.setUseProxies.bind(immer);
1575
1586
  /**
1576
1587
  * Apply an array of Immer patches to the first argument.
1577
1588
  *
1578
1589
  * This function is a producer, which means copy-on-write is in effect.
1579
1590
  */
1580
1591
 
1581
- var applyPatches$1 = immer.applyPatches.bind(immer);
1592
+ immer.applyPatches.bind(immer);
1582
1593
  /**
1583
1594
  * Create an Immer draft from the given base state, which may be a draft itself.
1584
1595
  * The draft can be modified until you finalize it with the `finishDraft` function.
1585
1596
  */
1586
1597
 
1587
- var createDraft = immer.createDraft.bind(immer);
1598
+ immer.createDraft.bind(immer);
1588
1599
  /**
1589
1600
  * Finalize an Immer draft from a `createDraft` call, returning the base state
1590
1601
  * (if no changes were made) or a modified copy. The draft must *not* be
@@ -1594,7 +1605,7 @@ var createDraft = immer.createDraft.bind(immer);
1594
1605
  * changes that were made.
1595
1606
  */
1596
1607
 
1597
- var finishDraft = immer.finishDraft.bind(immer);
1608
+ immer.finishDraft.bind(immer);
1598
1609
 
1599
1610
  const createInitialState = formConfig => {
1600
1611
  let initialForm = {};
@@ -1619,7 +1630,7 @@ const createInitialState = formConfig => {
1619
1630
  };
1620
1631
 
1621
1632
  const SET = "field/SET";
1622
- const set$2 = fieldName => value => ({
1633
+ const set = fieldName => value => ({
1623
1634
  type: SET,
1624
1635
  payload: { fieldName, value }
1625
1636
  });
@@ -1699,7 +1710,7 @@ const createMapDispatchToProps = formConfig => {
1699
1710
  const keys = Object.keys(formConfig);
1700
1711
  for (let fieldName of keys) {
1701
1712
  dispatchObj.fields[fieldName] = {
1702
- set: value => dispatch(set$2(fieldName)(value)),
1713
+ set: value => dispatch(set(fieldName)(value)),
1703
1714
  addValidator: validator => dispatch(addValidator(fieldName)(validator))
1704
1715
  };
1705
1716
  }
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
- (global = global || self, factory(global['redux-freeform'] = {}));
5
- }(this, (function (exports) { 'use strict';
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["redux-freeform"] = {}));
5
+ })(this, (function (exports) { 'use strict';
6
6
 
7
7
  const validatorToPredicate = (validatorFn, emptyCase) => (
8
8
  value,
@@ -11,25 +11,37 @@
11
11
 
12
12
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
13
13
 
14
- function createCommonjsModule(fn, module) {
15
- return module = { exports: {} }, fn(module, module.exports), module.exports;
16
- }
14
+ var dayjs_min = {exports: {}};
17
15
 
18
- var dayjs_min = createCommonjsModule(function (module, exports) {
19
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else{var i=t.name;v[i]=t,r=i;}return !n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
20
- });
16
+ (function (module, exports) {
17
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",f="month",h="quarter",c="year",d="date",$="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",v={};v[D]=M;var p=function(t){return t instanceof _},S=function(t,e,n){var r;if(!t)return D;if("string"==typeof t)v[t]&&(r=t),e&&(v[t]=e,r=t);else {var i=t.name;v[i]=t,r=i;}return !n&&r&&(D=r),r||!n&&D},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=g;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t);}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(l);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return O},m.isValid=function(){return !(this.$d.toString()===$)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),$=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},l=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(h){case c:return r?$(1,0):$(31,11);case f:return r?$(1,M):$(0,M+1);case o:var D=this.$locale().weekStart||0,v=(y<D?y+7:y)-D;return $(r?m-v:m+(6-v),M);case a:case d:return l(g+"Hours",0);case u:return l(g+"Minutes",1);case s:return l(g+"Seconds",2);case i:return l(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h="set"+(this.$u?"UTC":""),$=(n={},n[a]=h+"Date",n[d]=h+"Date",n[f]=h+"Month",n[c]=h+"FullYear",n[u]=h+"Hours",n[s]=h+"Minutes",n[i]=h+"Seconds",n[r]=h+"Milliseconds",n)[o],l=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[$](l),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else $&&this.$d[$](l);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,$=this;r=Number(r);var l=O.p(h),y=function(t){var e=w($);return O.w(e.date(e.date()+Math.round(t*r)),$)};if(l===f)return this.set(f,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===a)return y(1);if(l===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[l]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||$;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].substr(0,s)},c=function(t){return O.s(s%12||12,t,"0")},d=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},l={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,"0"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:i};return r.replace(y,(function(t,e){return e||l[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,$){var l,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,g=this-M,D=O.m(this,M);return D=(l={},l[c]=D/12,l[f]=D,l[h]=D/3,l[o]=(g-m)/6048e5,l[a]=(g-m)/864e5,l[u]=g/n,l[s]=g/e,l[i]=g/t,l)[y]||g,$?D:O.a(D)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return v[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),b=_.prototype;return w.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",f],["$y",c],["$D",d]].forEach((function(t){b[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=v[D],w.Ls=v,w.p={},w}));
18
+ }(dayjs_min));
21
19
 
22
- var customParseFormat = createCommonjsModule(function (module, exports) {
23
- !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else{var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
24
- });
20
+ var dayjs = dayjs_min.exports;
21
+
22
+ var customParseFormat$1 = {exports: {}};
23
+
24
+ (function (module, exports) {
25
+ !function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^\s\d-_:/()]+/,o={},s=function(t){return (t=+t)+(t>68?1900:2e3)};var a=function(t){return function(e){this[t]=+e;}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t);}],u=function(t){var e=o[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(t.indexOf(r(i,0,e))>-1){n=i>12;break}}else n=t===(e?"pm":"PM");return n},d={A:[i,function(t){this.afternoon=h(t,!1);}],a:[i,function(t){this.afternoon=h(t,!0);}],S:[/\d/,function(t){this.milliseconds=100*+t;}],SS:[n,function(t){this.milliseconds=10*+t;}],SSS:[/\d{3}/,function(t){this.milliseconds=+t;}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(t){var e=o.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var r=1;r<=31;r+=1)e(r).replace(/\[|\]/g,"")===t&&(this.day=r);}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(t){var e=u("months"),n=(u("monthsShort")||e.map((function(t){return t.substr(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n;}],MMMM:[i,function(t){var e=u("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e;}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(t){this.year=s(t);}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,r){var o=r&&r.toUpperCase();return n||i[r]||t[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),a=s.length,f=0;f<a;f+=1){var u=s[f],h=d[u],c=h&&h[0],l=h&&h[1];s[f]=l?{regex:c,parser:l}:u.replace(/^\[|\]$/g,"");}return function(t){for(var e={},n=0,r=0;n<a;n+=1){var i=s[n];if("string"==typeof i)r+=i.length;else {var o=i.regex,f=i.parser,u=t.substr(r),h=o.exec(u)[0];f.call(e,h),t=t.replace(h,"");}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon;}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(s=t.parseTwoDigitYear);var r=e.prototype,i=r.parse;r.parse=function(t){var e=t.date,r=t.utc,s=t.args;this.$u=r;var a=s[1];if("string"==typeof a){var f=!0===s[2],u=!0===s[3],h=f||u,d=s[2];u&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var r=c(e)(t),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,u=r.seconds,h=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=u||0,g=h||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(t){return new Date("")}}(e,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),h&&e!=this.format(a)&&(this.$d=new Date("")),o={};}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""));}else i.call(this,t);};}}));
26
+ }(customParseFormat$1));
25
27
 
26
- var isSameOrBefore = createCommonjsModule(function (module, exports) {
28
+ var customParseFormat = customParseFormat$1.exports;
29
+
30
+ var isSameOrBefore$1 = {exports: {}};
31
+
32
+ (function (module, exports) {
27
33
  !function(e,i){module.exports=i();}(commonjsGlobal,(function(){return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)};}}));
28
- });
34
+ }(isSameOrBefore$1));
35
+
36
+ var isSameOrBefore = isSameOrBefore$1.exports;
29
37
 
30
- var isSameOrAfter = createCommonjsModule(function (module, exports) {
38
+ var isSameOrAfter$1 = {exports: {}};
39
+
40
+ (function (module, exports) {
31
41
  !function(e,t){module.exports=t();}(commonjsGlobal,(function(){return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)};}}));
32
- });
42
+ }(isSameOrAfter$1));
43
+
44
+ var isSameOrAfter = isSameOrAfter$1.exports;
33
45
 
34
46
  /* eslint-disable no-unused-vars */
35
47
 
@@ -39,9 +51,9 @@
39
51
  return validator;
40
52
  };
41
53
 
42
- dayjs_min.extend(customParseFormat);
43
- dayjs_min.extend(isSameOrBefore);
44
- dayjs_min.extend(isSameOrAfter);
54
+ dayjs.extend(customParseFormat);
55
+ dayjs.extend(isSameOrBefore);
56
+ dayjs.extend(isSameOrAfter);
45
57
 
46
58
  let validatorFns = {};
47
59
 
@@ -120,15 +132,14 @@
120
132
  const MATCHES_FIELD_ERROR = "error/MATCHES_FIELD";
121
133
  const matchesField = createValidator(MATCHES_FIELD, MATCHES_FIELD_ERROR);
122
134
  validatorFns[MATCHES_FIELD] = (value, args, form) => {
123
- if (value === "") {
124
- return true;
125
- }
126
- if (form[args[0]] === undefined) {
135
+ const dependentField = form[args[0]];
136
+ const dependentFieldValue = dependentField?.rawValue ?? "";
137
+ if (dependentField === undefined) {
127
138
  throw new Error(
128
139
  `${args[0]} was passed to matchesField, but that field does not exist in the form`
129
140
  );
130
141
  }
131
- return value === form[args[0]].rawValue;
142
+ return value === dependentFieldValue;
132
143
  };
133
144
 
134
145
  const validateWhenErrorMessage = type =>
@@ -271,8 +282,8 @@
271
282
  "Date format and unit need to be defined for dateBeforeToday, one or both are undefined"
272
283
  );
273
284
  }
274
- const now = dayjs_min();
275
- const dateValue = dayjs_min(value, dateFormat);
285
+ const now = dayjs();
286
+ const dateValue = dayjs(value, dateFormat);
276
287
 
277
288
  if (inclusive === true) {
278
289
  return dateValue.isSameOrBefore(now, unit);
@@ -299,8 +310,8 @@
299
310
  "Date format and unit need to be defined for dateAfterToday, one or both are undefined"
300
311
  );
301
312
  }
302
- const now = dayjs_min();
303
- const dateValue = dayjs_min(value, dateFormat);
313
+ const now = dayjs();
314
+ const dateValue = dayjs(value, dateFormat);
304
315
 
305
316
  if (inclusive === true) {
306
317
  return dateValue.isSameOrAfter(now, unit);
@@ -684,7 +695,7 @@
684
695
  return value;
685
696
  }
686
697
 
687
- function set(state, prop, value) {
698
+ function set$1(state, prop, value) {
688
699
  assertUnrevoked(state);
689
700
  state.assigned[prop] = true;
690
701
 
@@ -735,8 +746,8 @@
735
746
  return get(this[DRAFT_STATE], prop);
736
747
  },
737
748
 
738
- set: function set$1(value) {
739
- set(this[DRAFT_STATE], prop, value);
749
+ set: function set$1$1(value) {
750
+ set$1(this[DRAFT_STATE], prop, value);
740
751
  }
741
752
 
742
753
  };
@@ -917,7 +928,7 @@
917
928
  return Reflect.ownKeys(source$1(target));
918
929
  },
919
930
 
920
- set: set$1,
931
+ set: set$1$1,
921
932
  deleteProperty: deleteProperty,
922
933
  getOwnPropertyDescriptor: getOwnPropertyDescriptor,
923
934
 
@@ -995,7 +1006,7 @@
995
1006
  return drafts[prop] = createProxy$1(value, state);
996
1007
  }
997
1008
 
998
- function set$1(state, prop, value) {
1009
+ function set$1$1(state, prop, value) {
999
1010
  if (!state.modified) {
1000
1011
  var baseValue = peek$1(state.base, prop); // Optimize based on value's truthiness. Truthy values are guaranteed to
1001
1012
  // never be undefined, so we can avoid the `in` operator. Lastly, truthy
@@ -1218,7 +1229,7 @@
1218
1229
  };
1219
1230
 
1220
1231
  Immer.prototype.produce = function produce (base, recipe, patchListener) {
1221
- var this$1 = this;
1232
+ var this$1$1 = this;
1222
1233
 
1223
1234
  // curried invocation
1224
1235
  if (typeof base === "function" && typeof recipe !== "function") {
@@ -1226,12 +1237,12 @@
1226
1237
  recipe = base;
1227
1238
  var self = this;
1228
1239
  return function curriedProduce(base) {
1229
- var this$1 = this;
1240
+ var this$1$1 = this;
1230
1241
  if ( base === void 0 ) base = defaultBase;
1231
1242
  var args = [], len = arguments.length - 1;
1232
1243
  while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
1233
1244
 
1234
- return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1, draft ].concat( args )); }); // prettier-ignore
1245
+ return self.produce(base, function (draft) { return recipe.call.apply(recipe, [ this$1$1, draft ].concat( args )); }); // prettier-ignore
1235
1246
  };
1236
1247
  } // prettier-ignore
1237
1248
 
@@ -1263,7 +1274,7 @@
1263
1274
  if (result instanceof Promise) {
1264
1275
  return result.then(function (result) {
1265
1276
  scope.usePatches(patchListener);
1266
- return this$1.processResult(result, scope);
1277
+ return this$1$1.processResult(result, scope);
1267
1278
  }, function (error) {
1268
1279
  scope.revoke();
1269
1280
  throw error;
@@ -1280,14 +1291,14 @@
1280
1291
  };
1281
1292
 
1282
1293
  Immer.prototype.produceWithPatches = function produceWithPatches (arg1, arg2, arg3) {
1283
- var this$1 = this;
1294
+ var this$1$1 = this;
1284
1295
 
1285
1296
  if (typeof arg1 === "function") {
1286
1297
  return function (state) {
1287
1298
  var args = [], len = arguments.length - 1;
1288
1299
  while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
1289
1300
 
1290
- return this$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
1301
+ return this$1$1.produceWithPatches(state, function (draft) { return arg1.apply(void 0, [ draft ].concat( args )); });
1291
1302
  };
1292
1303
  } // non-curried form
1293
1304
 
@@ -1412,7 +1423,7 @@
1412
1423
 
1413
1424
 
1414
1425
  Immer.prototype.finalize = function finalize (draft, path, scope) {
1415
- var this$1 = this;
1426
+ var this$1$1 = this;
1416
1427
 
1417
1428
  var state = draft[DRAFT_STATE];
1418
1429
 
@@ -1446,7 +1457,7 @@
1446
1457
  var base = state.base;
1447
1458
  var copy = state.copy;
1448
1459
  each(base, function (prop) {
1449
- if (!has(copy, prop)) { this$1.onDelete(state, prop); }
1460
+ if (!has(copy, prop)) { this$1$1.onDelete(state, prop); }
1450
1461
  });
1451
1462
  }
1452
1463
  }
@@ -1475,7 +1486,7 @@
1475
1486
 
1476
1487
 
1477
1488
  Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
1478
- var this$1 = this;
1489
+ var this$1$1 = this;
1479
1490
 
1480
1491
  var state = root[DRAFT_STATE];
1481
1492
 
@@ -1501,7 +1512,7 @@
1501
1512
  if (isDraft(value)) {
1502
1513
  var path = isDraftProp && needPatches && !state.assigned[prop] ? rootPath.concat(prop) : null; // Drafts owned by `scope` are finalized here.
1503
1514
 
1504
- value = this$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing.
1515
+ value = this$1$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing.
1505
1516
 
1506
1517
  if (isDraft(value)) {
1507
1518
  scope.canAutoFreeze = false;
@@ -1526,8 +1537,8 @@
1526
1537
  each(value, finalizeProperty);
1527
1538
  }
1528
1539
 
1529
- if (isDraftProp && this$1.onAssign) {
1530
- this$1.onAssign(state, prop, value);
1540
+ if (isDraftProp && this$1$1.onAssign) {
1541
+ this$1$1.onAssign(state, prop, value);
1531
1542
  }
1532
1543
  };
1533
1544
 
@@ -1562,14 +1573,14 @@
1562
1573
  * [nextState, patches, inversePatches] (instead of just the next state)
1563
1574
  */
1564
1575
 
1565
- var produceWithPatches = immer.produceWithPatches.bind(immer);
1576
+ immer.produceWithPatches.bind(immer);
1566
1577
  /**
1567
1578
  * Pass true to automatically freeze all copies created by Immer.
1568
1579
  *
1569
1580
  * By default, auto-freezing is disabled in production.
1570
1581
  */
1571
1582
 
1572
- var setAutoFreeze = immer.setAutoFreeze.bind(immer);
1583
+ immer.setAutoFreeze.bind(immer);
1573
1584
  /**
1574
1585
  * Pass true to use the ES2015 `Proxy` class when creating drafts, which is
1575
1586
  * always faster than using ES5 proxies.
@@ -1577,20 +1588,20 @@
1577
1588
  * By default, feature detection is used, so calling this is rarely necessary.
1578
1589
  */
1579
1590
 
1580
- var setUseProxies = immer.setUseProxies.bind(immer);
1591
+ immer.setUseProxies.bind(immer);
1581
1592
  /**
1582
1593
  * Apply an array of Immer patches to the first argument.
1583
1594
  *
1584
1595
  * This function is a producer, which means copy-on-write is in effect.
1585
1596
  */
1586
1597
 
1587
- var applyPatches$1 = immer.applyPatches.bind(immer);
1598
+ immer.applyPatches.bind(immer);
1588
1599
  /**
1589
1600
  * Create an Immer draft from the given base state, which may be a draft itself.
1590
1601
  * The draft can be modified until you finalize it with the `finishDraft` function.
1591
1602
  */
1592
1603
 
1593
- var createDraft = immer.createDraft.bind(immer);
1604
+ immer.createDraft.bind(immer);
1594
1605
  /**
1595
1606
  * Finalize an Immer draft from a `createDraft` call, returning the base state
1596
1607
  * (if no changes were made) or a modified copy. The draft must *not* be
@@ -1600,7 +1611,7 @@
1600
1611
  * changes that were made.
1601
1612
  */
1602
1613
 
1603
- var finishDraft = immer.finishDraft.bind(immer);
1614
+ immer.finishDraft.bind(immer);
1604
1615
 
1605
1616
  const createInitialState = formConfig => {
1606
1617
  let initialForm = {};
@@ -1625,7 +1636,7 @@
1625
1636
  };
1626
1637
 
1627
1638
  const SET = "field/SET";
1628
- const set$2 = fieldName => value => ({
1639
+ const set = fieldName => value => ({
1629
1640
  type: SET,
1630
1641
  payload: { fieldName, value }
1631
1642
  });
@@ -1705,7 +1716,7 @@
1705
1716
  const keys = Object.keys(formConfig);
1706
1717
  for (let fieldName of keys) {
1707
1718
  dispatchObj.fields[fieldName] = {
1708
- set: value => dispatch(set$2(fieldName)(value)),
1719
+ set: value => dispatch(set(fieldName)(value)),
1709
1720
  addValidator: validator => dispatch(addValidator(fieldName)(validator))
1710
1721
  };
1711
1722
  }
@@ -1749,4 +1760,4 @@
1749
1760
 
1750
1761
  Object.defineProperty(exports, '__esModule', { value: true });
1751
1762
 
1752
- })));
1763
+ }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redux-freeform",
3
- "version": "5.2.0",
3
+ "version": "5.3.0",
4
4
  "description": "A small Redux form library that supports purely functional apps, without magic",
5
5
  "main": "dist/redux-freeform.cjs.js",
6
6
  "module": "dist/redux-freeform.esm.js",
@@ -18,6 +18,8 @@
18
18
  "@babel/core": "^7.4.5",
19
19
  "@babel/preset-env": "^7.4.5",
20
20
  "@babel/register": "^7.4.4",
21
+ "@rollup/plugin-commonjs": "^21.0.2",
22
+ "@rollup/plugin-node-resolve": "^13.1.3",
21
23
  "ava": "^2.1.0",
22
24
  "ava-fast-check": "^1.1.1",
23
25
  "babel-eslint": "^10.0.2",
@@ -32,9 +34,7 @@
32
34
  "nyc": "^14.1.1",
33
35
  "prettier": "^1.19.1",
34
36
  "prettier-eslint": "^9.0.0",
35
- "rollup": "^1.16.2",
36
- "rollup-plugin-commonjs": "^10.0.0",
37
- "rollup-plugin-node-resolve": "^5.1.0"
37
+ "rollup": "2.69.1"
38
38
  },
39
39
  "resolutions": {
40
40
  "acorn": "^6.4.1",
@@ -67,6 +67,7 @@
67
67
  "instrument": false
68
68
  },
69
69
  "dependencies": {
70
+ "acorn": "^6.4.1",
70
71
  "dayjs": "^1.10.7",
71
72
  "immer": "^3.1.3"
72
73
  }