taro-form-react 0.1.2 → 0.1.3

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.
package/dist/index.esm.js CHANGED
@@ -12,7 +12,7 @@ import e,{useState as t,useCallback as r,useRef as n,useEffect as o,createContex
12
12
  Copyright (c) 2018 Jed Watson.
13
13
  Licensed under the MIT License (MIT), see
14
14
  http://jedwatson.github.io/classnames
15
- */var F=(w||(w=1,function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=o(e,n(r)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var n="";for(var a in e)t.call(e,a)&&e[a]&&(n=o(n,a));return n}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(O)),O.exports),S=p(F),A="object"==typeof global&&global&&global.Object===Object&&global,x="object"==typeof self&&self&&self.Object===Object&&self,E=A||x||Function("return this")(),k=E.Symbol,P=Object.prototype,$=P.hasOwnProperty,R=P.toString,T=k?k.toStringTag:void 0;var N=Object.prototype.toString;var C=k?k.toStringTag:void 0;function V(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":C&&C in Object(e)?function(e){var t=$.call(e,T),r=e[T];try{e[T]=void 0;var n=!0}catch(e){}var o=R.call(e);return n&&(t?e[T]=r:delete e[T]),o}(e):function(e){return N.call(e)}(e)}function z(e){return null!=e&&"object"==typeof e}function D(e){return"symbol"==typeof e||z(e)&&"[object Symbol]"==V(e)}var I=Array.isArray,M=k?k.prototype:void 0,U=M?M.toString:void 0;function B(e){if("string"==typeof e)return e;if(I(e))return function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}(e,B)+"";if(D(e))return U?U.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function q(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function L(e){return e}function W(e){if(!q(e))return!1;var t=V(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Y,K=E["__core-js_shared__"],J=(Y=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";var X=Function.prototype.toString;function G(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var H=/^\[object .+?Constructor\]$/,Q=Function.prototype,Z=Object.prototype,ee=Q.toString,te=Z.hasOwnProperty,re=RegExp("^"+ee.call(te).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ne(e){return!(!q(e)||(t=e,J&&J in t))&&(W(e)?re:H).test(G(e));var t}function oe(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ne(r)?r:void 0}var ae=oe(E,"WeakMap"),ie=Object.create,se=function(){function e(){}return function(t){if(!q(t))return{};if(ie)return ie(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var ce=Date.now;var ue,le,fe,pe=function(){try{var e=oe(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),de=pe?function(e,t){return pe(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:L,ve=(ue=de,le=0,fe=0,function(){var e=ce(),t=16-(e-fe);if(fe=e,t>0){if(++le>=800)return arguments[0]}else le=0;return ue.apply(void 0,arguments)});var ye=/^(?:0|[1-9]\d*)$/;function he(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&ye.test(e))&&e>-1&&e%1==0&&e<t}function be(e,t,r){"__proto__"==t&&pe?pe(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ge(e,t){return e===t||e!=e&&t!=t}var me=Object.prototype.hasOwnProperty;function je(e,t,r){var n=e[t];me.call(e,t)&&ge(n,r)&&(void 0!==r||t in e)||be(e,t,r)}var _e=Math.max;function we(e,t){return ve(function(e,t,r){return t=_e(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=_e(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,s)}}(e,t,L),e+"")}function Oe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Fe(e){return null!=e&&Oe(e.length)&&!W(e)}var Se=Object.prototype;function Ae(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Se)}function xe(e){return z(e)&&"[object Arguments]"==V(e)}var Ee=Object.prototype,ke=Ee.hasOwnProperty,Pe=Ee.propertyIsEnumerable,$e=xe(function(){return arguments}())?xe:function(e){return z(e)&&ke.call(e,"callee")&&!Pe.call(e,"callee")};var Re="object"==typeof exports&&exports&&!exports.nodeType&&exports,Te=Re&&"object"==typeof module&&module&&!module.nodeType&&module,Ne=Te&&Te.exports===Re?E.Buffer:void 0,Ce=(Ne?Ne.isBuffer:void 0)||function(){return!1},Ve={};function ze(e){return function(t){return e(t)}}Ve["[object Float32Array]"]=Ve["[object Float64Array]"]=Ve["[object Int8Array]"]=Ve["[object Int16Array]"]=Ve["[object Int32Array]"]=Ve["[object Uint8Array]"]=Ve["[object Uint8ClampedArray]"]=Ve["[object Uint16Array]"]=Ve["[object Uint32Array]"]=!0,Ve["[object Arguments]"]=Ve["[object Array]"]=Ve["[object ArrayBuffer]"]=Ve["[object Boolean]"]=Ve["[object DataView]"]=Ve["[object Date]"]=Ve["[object Error]"]=Ve["[object Function]"]=Ve["[object Map]"]=Ve["[object Number]"]=Ve["[object Object]"]=Ve["[object RegExp]"]=Ve["[object Set]"]=Ve["[object String]"]=Ve["[object WeakMap]"]=!1;var De="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ie=De&&"object"==typeof module&&module&&!module.nodeType&&module,Me=Ie&&Ie.exports===De&&A.process,Ue=function(){try{var e=Ie&&Ie.require&&Ie.require("util").types;return e||Me&&Me.binding&&Me.binding("util")}catch(e){}}(),Be=Ue&&Ue.isTypedArray,qe=Be?ze(Be):function(e){return z(e)&&Oe(e.length)&&!!Ve[V(e)]},Le=Object.prototype.hasOwnProperty;function We(e,t){var r=I(e),n=!r&&$e(e),o=!r&&!n&&Ce(e),a=!r&&!n&&!o&&qe(e),i=r||n||o||a,s=i?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=s.length;for(var u in e)!t&&!Le.call(e,u)||i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||he(u,c))||s.push(u);return s}function Ye(e,t){return function(r){return e(t(r))}}var Ke=Ye(Object.keys,Object),Je=Object.prototype.hasOwnProperty;function Xe(e){return Fe(e)?We(e):function(e){if(!Ae(e))return Ke(e);var t=[];for(var r in Object(e))Je.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}var Ge=Object.prototype.hasOwnProperty;function He(e){if(!q(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=Ae(e),r=[];for(var n in e)("constructor"!=n||!t&&Ge.call(e,n))&&r.push(n);return r}function Qe(e){return Fe(e)?We(e,!0):He(e)}var Ze=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/;var tt=oe(Object,"create");var rt=Object.prototype.hasOwnProperty;var nt=Object.prototype.hasOwnProperty;function ot(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function at(e,t){for(var r=e.length;r--;)if(ge(e[r][0],t))return r;return-1}ot.prototype.clear=function(){this.__data__=tt?tt(null):{},this.size=0},ot.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ot.prototype.get=function(e){var t=this.__data__;if(tt){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return rt.call(t,e)?t[e]:void 0},ot.prototype.has=function(e){var t=this.__data__;return tt?void 0!==t[e]:nt.call(t,e)},ot.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tt&&void 0===t?"__lodash_hash_undefined__":t,this};var it=Array.prototype.splice;function st(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}st.prototype.clear=function(){this.__data__=[],this.size=0},st.prototype.delete=function(e){var t=this.__data__,r=at(t,e);return!(r<0)&&(r==t.length-1?t.pop():it.call(t,r,1),--this.size,!0)},st.prototype.get=function(e){var t=this.__data__,r=at(t,e);return r<0?void 0:t[r][1]},st.prototype.has=function(e){return at(this.__data__,e)>-1},st.prototype.set=function(e,t){var r=this.__data__,n=at(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var ct=oe(E,"Map");function ut(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function lt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}lt.prototype.clear=function(){this.size=0,this.__data__={hash:new ot,map:new(ct||st),string:new ot}},lt.prototype.delete=function(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t},lt.prototype.get=function(e){return ut(this,e).get(e)},lt.prototype.has=function(e){return ut(this,e).has(e)},lt.prototype.set=function(e,t){var r=ut(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function ft(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(ft.Cache||lt),r}ft.Cache=lt;var pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dt=/\\(\\)?/g,vt=function(e){var t=ft(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(pt,(function(e,r,n,o){t.push(n?o.replace(dt,"$1"):r||e)})),t}));function yt(e,t){return I(e)?e:function(e,t){if(I(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!D(e))||et.test(e)||!Ze.test(e)||null!=t&&e in Object(t)}(e,t)?[e]:vt(function(e){return null==e?"":B(e)}(e))}function ht(e){if("string"==typeof e||D(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function bt(e,t){for(var r=0,n=(t=yt(t,e)).length;null!=e&&r<n;)e=e[ht(t[r++])];return r&&r==n?e:void 0}function gt(e,t,r){var n=null==e?void 0:bt(e,t);return void 0===n?r:n}var mt=Ye(Object.getPrototypeOf,Object),jt=Function.prototype,_t=Object.prototype,wt=jt.toString,Ot=_t.hasOwnProperty,Ft=wt.call(Object);function St(e){var t=this.__data__=new st(e);this.size=t.size}St.prototype.clear=function(){this.__data__=new st,this.size=0},St.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},St.prototype.get=function(e){return this.__data__.get(e)},St.prototype.has=function(e){return this.__data__.has(e)},St.prototype.set=function(e,t){var r=this.__data__;if(r instanceof st){var n=r.__data__;if(!ct||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new lt(n)}return r.set(e,t),this.size=r.size,this};var At="object"==typeof exports&&exports&&!exports.nodeType&&exports,xt=At&&"object"==typeof module&&module&&!module.nodeType&&module,Et=xt&&xt.exports===At?E.Buffer:void 0,kt=Et?Et.allocUnsafe:void 0;function Pt(e,t){if(t)return e.slice();var r=e.length,n=kt?kt(r):new e.constructor(r);return e.copy(n),n}var $t=Object.prototype.propertyIsEnumerable,Rt=Object.getOwnPropertySymbols,Tt=Rt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}(Rt(e),(function(t){return $t.call(e,t)})))}:function(){return[]};function Nt(e){return function(e,t,r){var n=t(e);return I(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Xe,Tt)}var Ct=oe(E,"DataView"),Vt=oe(E,"Promise"),zt=oe(E,"Set"),Dt="[object Map]",It="[object Promise]",Mt="[object Set]",Ut="[object WeakMap]",Bt="[object DataView]",qt=G(Ct),Lt=G(ct),Wt=G(Vt),Yt=G(zt),Kt=G(ae),Jt=V;(Ct&&Jt(new Ct(new ArrayBuffer(1)))!=Bt||ct&&Jt(new ct)!=Dt||Vt&&Jt(Vt.resolve())!=It||zt&&Jt(new zt)!=Mt||ae&&Jt(new ae)!=Ut)&&(Jt=function(e){var t=V(e),r="[object Object]"==t?e.constructor:void 0,n=r?G(r):"";if(n)switch(n){case qt:return Bt;case Lt:return Dt;case Wt:return It;case Yt:return Mt;case Kt:return Ut}return t});var Xt=Object.prototype.hasOwnProperty;var Gt=E.Uint8Array;function Ht(e){var t=new e.constructor(e.byteLength);return new Gt(t).set(new Gt(e)),t}var Qt=/\w*$/;var Zt=k?k.prototype:void 0,er=Zt?Zt.valueOf:void 0;function tr(e,t){var r=t?Ht(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function rr(e,t,r){var n,o,a,i,s,c=e.constructor;switch(t){case"[object ArrayBuffer]":return Ht(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return s=Ht((i=e).buffer),new i.constructor(s,i.byteOffset,i.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return tr(e,r);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return(a=new(o=e).constructor(o.source,Qt.exec(o))).lastIndex=o.lastIndex,a;case"[object Symbol]":return n=e,er?Object(er.call(n)):{}}}function nr(e){return"function"!=typeof e.constructor||Ae(e)?{}:se(mt(e))}var or=Ue&&Ue.isMap,ar=or?ze(or):function(e){return z(e)&&"[object Map]"==Jt(e)};var ir=Ue&&Ue.isSet,sr=ir?ze(ir):function(e){return z(e)&&"[object Set]"==Jt(e)},cr="[object Arguments]",ur="[object Function]",lr="[object Object]",fr={};function pr(e,t,r,n,o,a){var i,s=1&t;if(void 0!==i)return i;if(!q(e))return e;var c=I(e);if(c)i=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Xt.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e);else{var u=Jt(e),l=u==ur||"[object GeneratorFunction]"==u;if(Ce(e))return Pt(e,s);if(u==lr||u==cr||l&&!o)i=l?{}:nr(e);else{if(!fr[u])return o?e:{};i=rr(e,u,s)}}a||(a=new St);var f=a.get(e);if(f)return f;a.set(e,i),sr(e)?e.forEach((function(n){i.add(pr(n,t,r,n,e,a))})):ar(e)&&e.forEach((function(n,o){i.set(o,pr(n,t,r,o,e,a))}));var p=c?void 0:Nt(e);return function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););}(p||e,(function(n,o){p&&(n=e[o=n]),je(i,o,pr(n,t,r,o,e,a))})),i}fr[cr]=fr["[object Array]"]=fr["[object ArrayBuffer]"]=fr["[object DataView]"]=fr["[object Boolean]"]=fr["[object Date]"]=fr["[object Float32Array]"]=fr["[object Float64Array]"]=fr["[object Int8Array]"]=fr["[object Int16Array]"]=fr["[object Int32Array]"]=fr["[object Map]"]=fr["[object Number]"]=fr[lr]=fr["[object RegExp]"]=fr["[object Set]"]=fr["[object String]"]=fr["[object Symbol]"]=fr["[object Uint8Array]"]=fr["[object Uint8ClampedArray]"]=fr["[object Uint16Array]"]=fr["[object Uint32Array]"]=!0,fr["[object Error]"]=fr[ur]=fr["[object WeakMap]"]=!1;function dr(e){return pr(e,5)}var vr=function(e,t,r){for(var n=-1,o=Object(e),a=r(e),i=a.length;i--;){var s=a[++n];if(!1===t(o[s],s,o))break}return e};function yr(e,t,r){(void 0!==r&&!ge(e[t],r)||void 0===r&&!(t in e))&&be(e,t,r)}function hr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function br(e){return function(e,t,r){var n=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var i=t[o],s=void 0;void 0===s&&(s=e[i]),n?be(r,i,s):je(r,i,s)}return r}(e,Qe(e))}function gr(e,t,r,n,o,a,i){var s=hr(e,r),c=hr(t,r),u=i.get(c);if(u)yr(e,r,u);else{var l,f=a?a(s,c,r+"",e,t,i):void 0,p=void 0===f;if(p){var d=I(c),v=!d&&Ce(c),y=!d&&!v&&qe(c);f=c,d||v||y?I(s)?f=s:z(l=s)&&Fe(l)?f=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(s):v?(p=!1,f=Pt(c,!0)):y?(p=!1,f=tr(c,!0)):f=[]:function(e){if(!z(e)||"[object Object]"!=V(e))return!1;var t=mt(e);if(null===t)return!0;var r=Ot.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&wt.call(r)==Ft}(c)||$e(c)?(f=s,$e(s)?f=br(s):q(s)&&!W(s)||(f=nr(c))):p=!1}p&&(i.set(c,f),o(f,c,n,a,i),i.delete(c)),yr(e,r,f)}}function mr(e,t,r,n,o){e!==t&&vr(t,(function(a,i){if(o||(o=new St),q(a))gr(e,t,i,r,mr,n,o);else{var s=n?n(hr(e,i),a,i+"",e,t,o):void 0;void 0===s&&(s=a),yr(e,i,s)}}),Qe)}function jr(e,t){return t.length<2?e:bt(e,function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}(t,0,-1))}function _r(e){return null===e}var wr,Or=(wr=function(e,t,r){mr(e,t,r)},we((function(e,t){var r=-1,n=t.length,o=n>1?t[n-1]:void 0,a=n>2?t[2]:void 0;for(o=wr.length>3&&"function"==typeof o?(n--,o):void 0,a&&function(e,t,r){if(!q(r))return!1;var n=typeof t;return!!("number"==n?Fe(r)&&he(t,r.length):"string"==n&&t in r)&&ge(r[t],e)}(t[0],t[1],a)&&(o=n<3?void 0:o,n=1),e=Object(e);++r<n;){var i=t[r];i&&wr(e,i,r,o)}return e})));function Fr(e,t,r){return null==e?e:function(e,t,r){if(!q(e))return e;for(var n=-1,o=(t=yt(t,e)).length,a=o-1,i=e;null!=i&&++n<o;){var s=ht(t[n]),c=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(n!=a){var u=i[s];void 0===(c=void 0)&&(c=q(u)?u:he(t[n+1])?[]:{})}je(i,s,c),i=i[s]}return e}(e,t,r)}function Sr(e,t){return null==e||function(e,t){return null==(e=jr(e,t=yt(t,e)))||delete e[ht((r=t,n=null==r?0:r.length,n?r[n-1]:void 0))];var r,n}(e,t)}var Ar,xr,Er=function(){var e=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}(t({}),2)[1];return r((function(){return e({})}),[])};var kr,Pr=function(){if(xr)return Ar;xr=1;var e="undefined"!=typeof Element,t="function"==typeof Map,r="function"==typeof Set,n="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(a,i){if(a===i)return!0;if(a&&i&&"object"==typeof a&&"object"==typeof i){if(a.constructor!==i.constructor)return!1;var s,c,u,l;if(Array.isArray(a)){if((s=a.length)!=i.length)return!1;for(c=s;0!=c--;)if(!o(a[c],i[c]))return!1;return!0}if(t&&a instanceof Map&&i instanceof Map){if(a.size!==i.size)return!1;for(l=a.entries();!(c=l.next()).done;)if(!i.has(c.value[0]))return!1;for(l=a.entries();!(c=l.next()).done;)if(!o(c.value[1],i.get(c.value[0])))return!1;return!0}if(r&&a instanceof Set&&i instanceof Set){if(a.size!==i.size)return!1;for(l=a.entries();!(c=l.next()).done;)if(!i.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(i)){if((s=a.length)!=i.length)return!1;for(c=s;0!=c--;)if(a[c]!==i[c])return!1;return!0}if(a.constructor===RegExp)return a.source===i.source&&a.flags===i.flags;if(a.valueOf!==Object.prototype.valueOf&&"function"==typeof a.valueOf&&"function"==typeof i.valueOf)return a.valueOf()===i.valueOf();if(a.toString!==Object.prototype.toString&&"function"==typeof a.toString&&"function"==typeof i.toString)return a.toString()===i.toString();if((s=(u=Object.keys(a)).length)!==Object.keys(i).length)return!1;for(c=s;0!=c--;)if(!Object.prototype.hasOwnProperty.call(i,u[c]))return!1;if(e&&a instanceof Element)return!1;for(c=s;0!=c--;)if(("_owner"!==u[c]&&"__v"!==u[c]&&"__o"!==u[c]||!a.$$typeof)&&!o(a[u[c]],i[u[c]]))return!1;return!0}return a!=a&&i!=i}return Ar=function(e,t){try{return o(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}}(),$r=p(Pr),Rr=(kr=o,function(e,t){var r,o,a=n(),i=n(0);void 0!==t&&(r=t,o=a.current,void 0===r&&(r=[]),void 0===o&&(o=[]),$r(r,o))||(i.current+=1),a.current=t,kr(e,[i.current])});const Tr=e=>e.map((e=>"number"==typeof e?`[${e}]`:`.${e}`)).join(""),Nr=a(void 0),Cr=()=>{const e=i(Nr);if(!e)throw new Error("useFormContext must be used within a FormProvider");return e},Vr=e=>{var{initialValues:o,onFieldsChange:a,onValuesChange:i,children:s}=e,c=_(e,["initialValues","onFieldsChange","onValuesChange","children"]);const[u,{set:l,get:f,remove:p}]=function(){const e=n(new Map),t=Er(),o=r(((r,n)=>{e.current.set(r,n),t()}),[t]),a=r((r=>{e.current=new Map(r),t()}),[t]),i=r((r=>{e.current.delete(r),t()}),[t]),s=r((()=>{e.current.clear(),t()}),[t]),c=r((t=>e.current.get(t)),[]);return[e.current,{set:o,setAll:a,remove:i,reset:s,get:c}]}(),[d,v]=t({}),y=r(((e,t,r)=>{const n=Tr(e),i=null!=r?r:gt(o,e),s=dr(d);Fr(s,e,i),v(s);const c=f(n);c&&console.warn(`Field "${n}" is already registered, register multiple times may cause unexpected behavior.`);const p=c?Object.assign(Object.assign({},c),{refs:[...c.refs,t],initialValue:r,count:c.count+1}):{refs:[t],name:e,touched:!1,errors:[],initialValue:r,count:1};l(n,p),null==a||a([{name:e,value:i}],Array.from(u.values()).map((e=>({name:e.name,value:gt(d,e.name)}))).concat([{name:e,value:i}]))}),[d,u,f,o,a,l]),h=r(((e,t)=>{const r=Tr(e),n=f(r),o=dr(d);n?1===n.count?(p(r),Sr(o,e),v(o),null==a||a([{name:e,value:gt(d,e)}],Array.from(u.values()).map((e=>({name:e.name,value:gt(d,e.name)}))).filter((t=>t.name!==e)))):l(r,Object.assign(Object.assign({},n),{count:n.count-1,refs:n.refs.filter((e=>e!==t))})):console.warn(`Attempted to unregister field "${r}" that was never registered.`)}),[d,u,f,a,p,l]),b=r(((e,t)=>{const r=Tr(e),n=f(r);if(!n)return void console.warn(`Attempted to set value for field "${r}" that was never registered.`);const o=dr(d);if(Fr(o,e,t),v(o),l(r,Object.assign(Object.assign({},n),{touched:!0})),i){const r={};Fr(r,e,t),i(r,o)}}),[d,f,i,l]),g=r((e=>gt(d,e)),[d]),m=r((e=>{if(!e)return d;const t={};for(const r of e){Fr(t,r,gt(d,r))}return t}),[d]),w=r((async e=>{const t=null!=e?e:Array.from(u.values()).map((e=>e.name)),r={};for(const e of t){const t=f(Tr(e));if(!t){console.warn(`Attempted to get formatted value for field "${Tr(e)}" that was never registered.`);continue}if(t.refs.some((e=>!e.current))){console.warn(`Attempted to get formatted value for field "${Tr(e)}" that has no or missing ref.`);continue}const n=t.refs[t.refs.length-1].current.transform;if(n){const t=await n();t.__form_internals_should_merge?Or(r,t.value):Fr(r,e,t)}else Fr(r,e,gt(d,e))}return r}),[d,u,f]),O=r((e=>{const t={},r=dr(d);for(const n of e){const e=Tr(n.name),o=f(Tr(n.name));o?(void 0!==n.touched&&l(e,Object.assign(Object.assign({},o),{touched:n.touched})),Fr(r,n.name,n.value),Fr(t,n.name,n.value)):console.warn(`Attempted to set field "${e}" that was never registered.`)}v(r),null==i||i(t,r)}),[d,f,i,l]),F=r((e=>{if(!e)return Array.from(u.values()).map((e=>Object.assign(Object.assign({},e),{value:gt(d,e.name)})));const t=[];for(const r of e){const e=f(Tr(r));if(!e){console.warn(`Attempted to get field "${Tr(r)}" that was never registered.`);continue}const n=gt(d,r);t.push(Object.assign(Object.assign({},e),{value:n}))}return t}),[d,u,f]),S=r((e=>{var t,r;const n=null!==(t=null==e?void 0:e.map((e=>{const t=Tr(e),r=f(t);if(r)return r;console.warn(`Attempted to reset field "${t}" that was never registered.`)})).filter((e=>void 0!==e)))&&void 0!==t?t:Array.from(u.values()),a=dr(d);for(const e of n)Fr(a,e.name,null!==(r=e.initialValue)&&void 0!==r?r:gt(o,e.name)),l(Tr(e.name),Object.assign(Object.assign({},e),{touched:!1}));v(a)}),[d,u,f,o,l]),A=r(((e,t)=>{const r=Tr(e),n=f(r);n?l(r,Object.assign(Object.assign({},n),{errors:t})):console.warn(`Attempted to set errors for field "${r}" that was never registered.`)}),[f,l]),x=r((e=>{const t=f(Tr(e));return t?t.errors:(console.warn(`Attempted to get errors for field "${Tr(e)}" that was never registered.`),[])}),[f]),E=r((async e=>{var t;const r=null!==(t=null==e?void 0:e.map((e=>{const t=Tr(e),r=f(t);if(r)return r;console.warn(`Attempted to validate field "${t}" that was never registered.`)})).filter((e=>void 0!==e)))&&void 0!==t?t:Array.from(u.values()),n=[];for(const e of r){if(e.refs.some((e=>!e.current))){console.warn(`Attempted to validate field "${Tr(e.name)}" that has no or missing ref.`);continue}const t=await Promise.all(e.refs.map((e=>e.current.validate()))),r=Array.from(new Set(t.flat().filter(Boolean)));r.length>0&&n.push({name:e.name,errors:r})}return n.length>0?n:void 0}),[u,f]),k=r(((e,t)=>{var r;const{allTouched:n=!1}=null!=t?t:{},o=null!==(r=null==e?void 0:e.map((e=>{const t=Tr(e),r=f(t);if(r)return r;console.warn(`Attempted to check if field "${t}" is touched but it was never registered.`)})).filter((e=>void 0!==e)))&&void 0!==r?r:Array.from(u.values());return n?o.every((e=>e.touched)):o.some((e=>e.touched))}),[u,f]);return j.jsx(Nr.Provider,{value:Object.assign(Object.assign({initialValues:o},c),{data:d,setData:v,fields:u,registerField:y,unregisterField:h,setFieldValue:b,getFieldValue:g,getFieldsValue:m,getFieldsFormattedValue:w,setFields:O,getFields:F,resetFields:S,setFieldError:A,getFieldError:x,validateFields:E,isFieldsTouched:k}),children:s})},zr=(e,t)=>void 0===e?t:e;const Dr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length;var Ir,Mr={exports:{}};
15
+ */var F=(w||(w=1,function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=o(e,n(r)))}return e}function n(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var n="";for(var a in e)t.call(e,a)&&e[a]&&(n=o(n,a));return n}function o(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(O)),O.exports),S=p(F),A="object"==typeof global&&global&&global.Object===Object&&global,x="object"==typeof self&&self&&self.Object===Object&&self,E=A||x||Function("return this")(),k=E.Symbol,P=Object.prototype,$=P.hasOwnProperty,R=P.toString,T=k?k.toStringTag:void 0;var N=Object.prototype.toString;var C=k?k.toStringTag:void 0;function V(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":C&&C in Object(e)?function(e){var t=$.call(e,T),r=e[T];try{e[T]=void 0;var n=!0}catch(e){}var o=R.call(e);return n&&(t?e[T]=r:delete e[T]),o}(e):function(e){return N.call(e)}(e)}function z(e){return null!=e&&"object"==typeof e}function D(e){return"symbol"==typeof e||z(e)&&"[object Symbol]"==V(e)}var I=Array.isArray,M=k?k.prototype:void 0,U=M?M.toString:void 0;function B(e){if("string"==typeof e)return e;if(I(e))return function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}(e,B)+"";if(D(e))return U?U.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function q(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function L(e){return e}function W(e){if(!q(e))return!1;var t=V(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var Y,K=E["__core-js_shared__"],J=(Y=/[^.]+$/.exec(K&&K.keys&&K.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";var X=Function.prototype.toString;function G(e){if(null!=e){try{return X.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var H=/^\[object .+?Constructor\]$/,Q=Function.prototype,Z=Object.prototype,ee=Q.toString,te=Z.hasOwnProperty,re=RegExp("^"+ee.call(te).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ne(e){return!(!q(e)||(t=e,J&&J in t))&&(W(e)?re:H).test(G(e));var t}function oe(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ne(r)?r:void 0}var ae=oe(E,"WeakMap"),ie=Object.create,se=function(){function e(){}return function(t){if(!q(t))return{};if(ie)return ie(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();var ce=Date.now;var ue,le,fe,pe=function(){try{var e=oe(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),de=pe?function(e,t){return pe(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:L,ve=(ue=de,le=0,fe=0,function(){var e=ce(),t=16-(e-fe);if(fe=e,t>0){if(++le>=800)return arguments[0]}else le=0;return ue.apply(void 0,arguments)});var ye=/^(?:0|[1-9]\d*)$/;function he(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&ye.test(e))&&e>-1&&e%1==0&&e<t}function be(e,t,r){"__proto__"==t&&pe?pe(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ge(e,t){return e===t||e!=e&&t!=t}var me=Object.prototype.hasOwnProperty;function je(e,t,r){var n=e[t];me.call(e,t)&&ge(n,r)&&(void 0!==r||t in e)||be(e,t,r)}var _e=Math.max;function we(e,t){return ve(function(e,t,r){return t=_e(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=_e(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,s)}}(e,t,L),e+"")}function Oe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Fe(e){return null!=e&&Oe(e.length)&&!W(e)}var Se=Object.prototype;function Ae(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Se)}function xe(e){return z(e)&&"[object Arguments]"==V(e)}var Ee=Object.prototype,ke=Ee.hasOwnProperty,Pe=Ee.propertyIsEnumerable,$e=xe(function(){return arguments}())?xe:function(e){return z(e)&&ke.call(e,"callee")&&!Pe.call(e,"callee")};var Re="object"==typeof exports&&exports&&!exports.nodeType&&exports,Te=Re&&"object"==typeof module&&module&&!module.nodeType&&module,Ne=Te&&Te.exports===Re?E.Buffer:void 0,Ce=(Ne?Ne.isBuffer:void 0)||function(){return!1},Ve={};function ze(e){return function(t){return e(t)}}Ve["[object Float32Array]"]=Ve["[object Float64Array]"]=Ve["[object Int8Array]"]=Ve["[object Int16Array]"]=Ve["[object Int32Array]"]=Ve["[object Uint8Array]"]=Ve["[object Uint8ClampedArray]"]=Ve["[object Uint16Array]"]=Ve["[object Uint32Array]"]=!0,Ve["[object Arguments]"]=Ve["[object Array]"]=Ve["[object ArrayBuffer]"]=Ve["[object Boolean]"]=Ve["[object DataView]"]=Ve["[object Date]"]=Ve["[object Error]"]=Ve["[object Function]"]=Ve["[object Map]"]=Ve["[object Number]"]=Ve["[object Object]"]=Ve["[object RegExp]"]=Ve["[object Set]"]=Ve["[object String]"]=Ve["[object WeakMap]"]=!1;var De="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ie=De&&"object"==typeof module&&module&&!module.nodeType&&module,Me=Ie&&Ie.exports===De&&A.process,Ue=function(){try{var e=Ie&&Ie.require&&Ie.require("util").types;return e||Me&&Me.binding&&Me.binding("util")}catch(e){}}(),Be=Ue&&Ue.isTypedArray,qe=Be?ze(Be):function(e){return z(e)&&Oe(e.length)&&!!Ve[V(e)]},Le=Object.prototype.hasOwnProperty;function We(e,t){var r=I(e),n=!r&&$e(e),o=!r&&!n&&Ce(e),a=!r&&!n&&!o&&qe(e),i=r||n||o||a,s=i?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=s.length;for(var u in e)!t&&!Le.call(e,u)||i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||he(u,c))||s.push(u);return s}function Ye(e,t){return function(r){return e(t(r))}}var Ke=Ye(Object.keys,Object),Je=Object.prototype.hasOwnProperty;function Xe(e){return Fe(e)?We(e):function(e){if(!Ae(e))return Ke(e);var t=[];for(var r in Object(e))Je.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}var Ge=Object.prototype.hasOwnProperty;function He(e){if(!q(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=Ae(e),r=[];for(var n in e)("constructor"!=n||!t&&Ge.call(e,n))&&r.push(n);return r}function Qe(e){return Fe(e)?We(e,!0):He(e)}var Ze=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/;var tt=oe(Object,"create");var rt=Object.prototype.hasOwnProperty;var nt=Object.prototype.hasOwnProperty;function ot(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function at(e,t){for(var r=e.length;r--;)if(ge(e[r][0],t))return r;return-1}ot.prototype.clear=function(){this.__data__=tt?tt(null):{},this.size=0},ot.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ot.prototype.get=function(e){var t=this.__data__;if(tt){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return rt.call(t,e)?t[e]:void 0},ot.prototype.has=function(e){var t=this.__data__;return tt?void 0!==t[e]:nt.call(t,e)},ot.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=tt&&void 0===t?"__lodash_hash_undefined__":t,this};var it=Array.prototype.splice;function st(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}st.prototype.clear=function(){this.__data__=[],this.size=0},st.prototype.delete=function(e){var t=this.__data__,r=at(t,e);return!(r<0)&&(r==t.length-1?t.pop():it.call(t,r,1),--this.size,!0)},st.prototype.get=function(e){var t=this.__data__,r=at(t,e);return r<0?void 0:t[r][1]},st.prototype.has=function(e){return at(this.__data__,e)>-1},st.prototype.set=function(e,t){var r=this.__data__,n=at(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var ct=oe(E,"Map");function ut(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function lt(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}lt.prototype.clear=function(){this.size=0,this.__data__={hash:new ot,map:new(ct||st),string:new ot}},lt.prototype.delete=function(e){var t=ut(this,e).delete(e);return this.size-=t?1:0,t},lt.prototype.get=function(e){return ut(this,e).get(e)},lt.prototype.has=function(e){return ut(this,e).has(e)},lt.prototype.set=function(e,t){var r=ut(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function ft(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(ft.Cache||lt),r}ft.Cache=lt;var pt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dt=/\\(\\)?/g,vt=function(e){var t=ft(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(pt,(function(e,r,n,o){t.push(n?o.replace(dt,"$1"):r||e)})),t}));function yt(e,t){return I(e)?e:function(e,t){if(I(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!D(e))||et.test(e)||!Ze.test(e)||null!=t&&e in Object(t)}(e,t)?[e]:vt(function(e){return null==e?"":B(e)}(e))}function ht(e){if("string"==typeof e||D(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function bt(e,t){for(var r=0,n=(t=yt(t,e)).length;null!=e&&r<n;)e=e[ht(t[r++])];return r&&r==n?e:void 0}function gt(e,t,r){var n=null==e?void 0:bt(e,t);return void 0===n?r:n}var mt=Ye(Object.getPrototypeOf,Object),jt=Function.prototype,_t=Object.prototype,wt=jt.toString,Ot=_t.hasOwnProperty,Ft=wt.call(Object);function St(e){var t=this.__data__=new st(e);this.size=t.size}St.prototype.clear=function(){this.__data__=new st,this.size=0},St.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},St.prototype.get=function(e){return this.__data__.get(e)},St.prototype.has=function(e){return this.__data__.has(e)},St.prototype.set=function(e,t){var r=this.__data__;if(r instanceof st){var n=r.__data__;if(!ct||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new lt(n)}return r.set(e,t),this.size=r.size,this};var At="object"==typeof exports&&exports&&!exports.nodeType&&exports,xt=At&&"object"==typeof module&&module&&!module.nodeType&&module,Et=xt&&xt.exports===At?E.Buffer:void 0,kt=Et?Et.allocUnsafe:void 0;function Pt(e,t){if(t)return e.slice();var r=e.length,n=kt?kt(r):new e.constructor(r);return e.copy(n),n}var $t=Object.prototype.propertyIsEnumerable,Rt=Object.getOwnPropertySymbols,Tt=Rt?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}(Rt(e),(function(t){return $t.call(e,t)})))}:function(){return[]};function Nt(e){return function(e,t,r){var n=t(e);return I(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Xe,Tt)}var Ct=oe(E,"DataView"),Vt=oe(E,"Promise"),zt=oe(E,"Set"),Dt="[object Map]",It="[object Promise]",Mt="[object Set]",Ut="[object WeakMap]",Bt="[object DataView]",qt=G(Ct),Lt=G(ct),Wt=G(Vt),Yt=G(zt),Kt=G(ae),Jt=V;(Ct&&Jt(new Ct(new ArrayBuffer(1)))!=Bt||ct&&Jt(new ct)!=Dt||Vt&&Jt(Vt.resolve())!=It||zt&&Jt(new zt)!=Mt||ae&&Jt(new ae)!=Ut)&&(Jt=function(e){var t=V(e),r="[object Object]"==t?e.constructor:void 0,n=r?G(r):"";if(n)switch(n){case qt:return Bt;case Lt:return Dt;case Wt:return It;case Yt:return Mt;case Kt:return Ut}return t});var Xt=Object.prototype.hasOwnProperty;var Gt=E.Uint8Array;function Ht(e){var t=new e.constructor(e.byteLength);return new Gt(t).set(new Gt(e)),t}var Qt=/\w*$/;var Zt=k?k.prototype:void 0,er=Zt?Zt.valueOf:void 0;function tr(e,t){var r=t?Ht(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function rr(e,t,r){var n,o,a,i,s,c=e.constructor;switch(t){case"[object ArrayBuffer]":return Ht(e);case"[object Boolean]":case"[object Date]":return new c(+e);case"[object DataView]":return s=Ht((i=e).buffer),new i.constructor(s,i.byteOffset,i.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return tr(e,r);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(e);case"[object RegExp]":return(a=new(o=e).constructor(o.source,Qt.exec(o))).lastIndex=o.lastIndex,a;case"[object Symbol]":return n=e,er?Object(er.call(n)):{}}}function nr(e){return"function"!=typeof e.constructor||Ae(e)?{}:se(mt(e))}var or=Ue&&Ue.isMap,ar=or?ze(or):function(e){return z(e)&&"[object Map]"==Jt(e)};var ir=Ue&&Ue.isSet,sr=ir?ze(ir):function(e){return z(e)&&"[object Set]"==Jt(e)},cr="[object Arguments]",ur="[object Function]",lr="[object Object]",fr={};function pr(e,t,r,n,o,a){var i,s=1&t;if(void 0!==i)return i;if(!q(e))return e;var c=I(e);if(c)i=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Xt.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e);else{var u=Jt(e),l=u==ur||"[object GeneratorFunction]"==u;if(Ce(e))return Pt(e,s);if(u==lr||u==cr||l&&!o)i=l?{}:nr(e);else{if(!fr[u])return o?e:{};i=rr(e,u,s)}}a||(a=new St);var f=a.get(e);if(f)return f;a.set(e,i),sr(e)?e.forEach((function(n){i.add(pr(n,t,r,n,e,a))})):ar(e)&&e.forEach((function(n,o){i.set(o,pr(n,t,r,o,e,a))}));var p=c?void 0:Nt(e);return function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););}(p||e,(function(n,o){p&&(n=e[o=n]),je(i,o,pr(n,t,r,o,e,a))})),i}fr[cr]=fr["[object Array]"]=fr["[object ArrayBuffer]"]=fr["[object DataView]"]=fr["[object Boolean]"]=fr["[object Date]"]=fr["[object Float32Array]"]=fr["[object Float64Array]"]=fr["[object Int8Array]"]=fr["[object Int16Array]"]=fr["[object Int32Array]"]=fr["[object Map]"]=fr["[object Number]"]=fr[lr]=fr["[object RegExp]"]=fr["[object Set]"]=fr["[object String]"]=fr["[object Symbol]"]=fr["[object Uint8Array]"]=fr["[object Uint8ClampedArray]"]=fr["[object Uint16Array]"]=fr["[object Uint32Array]"]=!0,fr["[object Error]"]=fr[ur]=fr["[object WeakMap]"]=!1;function dr(e){return pr(e,5)}var vr=function(e,t,r){for(var n=-1,o=Object(e),a=r(e),i=a.length;i--;){var s=a[++n];if(!1===t(o[s],s,o))break}return e};function yr(e,t,r){(void 0!==r&&!ge(e[t],r)||void 0===r&&!(t in e))&&be(e,t,r)}function hr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function br(e){return function(e,t,r){var n=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var i=t[o],s=void 0;void 0===s&&(s=e[i]),n?be(r,i,s):je(r,i,s)}return r}(e,Qe(e))}function gr(e,t,r,n,o,a,i){var s=hr(e,r),c=hr(t,r),u=i.get(c);if(u)yr(e,r,u);else{var l,f=a?a(s,c,r+"",e,t,i):void 0,p=void 0===f;if(p){var d=I(c),v=!d&&Ce(c),y=!d&&!v&&qe(c);f=c,d||v||y?I(s)?f=s:z(l=s)&&Fe(l)?f=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(s):v?(p=!1,f=Pt(c,!0)):y?(p=!1,f=tr(c,!0)):f=[]:function(e){if(!z(e)||"[object Object]"!=V(e))return!1;var t=mt(e);if(null===t)return!0;var r=Ot.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&wt.call(r)==Ft}(c)||$e(c)?(f=s,$e(s)?f=br(s):q(s)&&!W(s)||(f=nr(c))):p=!1}p&&(i.set(c,f),o(f,c,n,a,i),i.delete(c)),yr(e,r,f)}}function mr(e,t,r,n,o){e!==t&&vr(t,(function(a,i){if(o||(o=new St),q(a))gr(e,t,i,r,mr,n,o);else{var s=n?n(hr(e,i),a,i+"",e,t,o):void 0;void 0===s&&(s=a),yr(e,i,s)}}),Qe)}function jr(e,t){return t.length<2?e:bt(e,function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}(t,0,-1))}function _r(e){return null===e}var wr,Or=(wr=function(e,t,r){mr(e,t,r)},we((function(e,t){var r=-1,n=t.length,o=n>1?t[n-1]:void 0,a=n>2?t[2]:void 0;for(o=wr.length>3&&"function"==typeof o?(n--,o):void 0,a&&function(e,t,r){if(!q(r))return!1;var n=typeof t;return!!("number"==n?Fe(r)&&he(t,r.length):"string"==n&&t in r)&&ge(r[t],e)}(t[0],t[1],a)&&(o=n<3?void 0:o,n=1),e=Object(e);++r<n;){var i=t[r];i&&wr(e,i,r,o)}return e})));function Fr(e,t,r){return null==e?e:function(e,t,r){if(!q(e))return e;for(var n=-1,o=(t=yt(t,e)).length,a=o-1,i=e;null!=i&&++n<o;){var s=ht(t[n]),c=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(n!=a){var u=i[s];void 0===(c=void 0)&&(c=q(u)?u:he(t[n+1])?[]:{})}je(i,s,c),i=i[s]}return e}(e,t,r)}function Sr(e,t){return null==e||function(e,t){return null==(e=jr(e,t=yt(t,e)))||delete e[ht((r=t,n=null==r?0:r.length,n?r[n-1]:void 0))];var r,n}(e,t)}var Ar,xr,Er=function(){var e=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}(t({}),2)[1];return r((function(){return e({})}),[])};var kr,Pr=function(){if(xr)return Ar;xr=1;var e="undefined"!=typeof Element,t="function"==typeof Map,r="function"==typeof Set,n="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(a,i){if(a===i)return!0;if(a&&i&&"object"==typeof a&&"object"==typeof i){if(a.constructor!==i.constructor)return!1;var s,c,u,l;if(Array.isArray(a)){if((s=a.length)!=i.length)return!1;for(c=s;0!=c--;)if(!o(a[c],i[c]))return!1;return!0}if(t&&a instanceof Map&&i instanceof Map){if(a.size!==i.size)return!1;for(l=a.entries();!(c=l.next()).done;)if(!i.has(c.value[0]))return!1;for(l=a.entries();!(c=l.next()).done;)if(!o(c.value[1],i.get(c.value[0])))return!1;return!0}if(r&&a instanceof Set&&i instanceof Set){if(a.size!==i.size)return!1;for(l=a.entries();!(c=l.next()).done;)if(!i.has(c.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(a)&&ArrayBuffer.isView(i)){if((s=a.length)!=i.length)return!1;for(c=s;0!=c--;)if(a[c]!==i[c])return!1;return!0}if(a.constructor===RegExp)return a.source===i.source&&a.flags===i.flags;if(a.valueOf!==Object.prototype.valueOf&&"function"==typeof a.valueOf&&"function"==typeof i.valueOf)return a.valueOf()===i.valueOf();if(a.toString!==Object.prototype.toString&&"function"==typeof a.toString&&"function"==typeof i.toString)return a.toString()===i.toString();if((s=(u=Object.keys(a)).length)!==Object.keys(i).length)return!1;for(c=s;0!=c--;)if(!Object.prototype.hasOwnProperty.call(i,u[c]))return!1;if(e&&a instanceof Element)return!1;for(c=s;0!=c--;)if(("_owner"!==u[c]&&"__v"!==u[c]&&"__o"!==u[c]||!a.$$typeof)&&!o(a[u[c]],i[u[c]]))return!1;return!0}return a!=a&&i!=i}return Ar=function(e,t){try{return o(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}}(),$r=p(Pr),Rr=(kr=o,function(e,t){var r,o,a=n(),i=n(0);void 0!==t&&(r=t,o=a.current,void 0===r&&(r=[]),void 0===o&&(o=[]),$r(r,o))||(i.current+=1),a.current=t,kr(e,[i.current])});const Tr=e=>e.map((e=>"number"==typeof e?`[${e}]`:`.${e}`)).join(""),Nr=a(void 0),Cr=()=>{const e=i(Nr);if(!e)throw new Error("useFormContext must be used within a FormProvider");return e},Vr=e=>{var{initialValues:t,onFieldsChange:o,onValuesChange:a,children:i}=e,s=_(e,["initialValues","onFieldsChange","onValuesChange","children"]);const[c,{set:u,get:l,remove:f}]=function(){const e=n(new Map),t=Er(),o=r(((r,n)=>{e.current.set(r,n),t()}),[t]),a=r((r=>{e.current=new Map(r),t()}),[t]),i=r((r=>{e.current.delete(r),t()}),[t]),s=r((()=>{e.current.clear(),t()}),[t]),c=r((t=>e.current.get(t)),[]);return[e.current,{set:o,setAll:a,remove:i,reset:s,get:c}]}(),[p,d]=function(e){const t=n(e),o=Er(),a=r((e=>{t.current=e,o()}),[o]);return[t.current,a]}({}),v=r(((e,r,n)=>{const a=Tr(e),i=null!=n?n:gt(t,e),s=dr(p);Fr(s,e,i),d(s);const f=l(a);f&&console.warn(`Field "${a}" is already registered, register multiple times may cause unexpected behavior.`);const v=f?Object.assign(Object.assign({},f),{refs:[...f.refs,r],initialValue:n,count:f.count+1}):{refs:[r],name:e,touched:!1,errors:[],initialValue:n,count:1};u(a,v),null==o||o([{name:e,value:i}],Array.from(c.values()).map((e=>({name:e.name,value:gt(p,e.name)}))).concat([{name:e,value:i}]))}),[p,c,l,t,o,d,u]),y=r(((e,t)=>{const r=Tr(e),n=l(r),a=dr(p);n?1===n.count?(f(r),Sr(a,e),d(a),null==o||o([{name:e,value:gt(p,e)}],Array.from(c.values()).map((e=>({name:e.name,value:gt(p,e.name)}))).filter((t=>t.name!==e)))):u(r,Object.assign(Object.assign({},n),{count:n.count-1,refs:n.refs.filter((e=>e!==t))})):console.warn(`Attempted to unregister field "${r}" that was never registered.`)}),[p,c,l,o,f,d,u]),h=r(((e,t)=>{const r=Tr(e),n=l(r);if(!n)return void console.warn(`Attempted to set value for field "${r}" that was never registered.`);const o=dr(p);if(Fr(o,e,t),d(o),u(r,Object.assign(Object.assign({},n),{touched:!0})),a){const r={};Fr(r,e,t),a(r,o)}}),[p,l,a,d,u]),b=r((e=>gt(p,e)),[p]),g=r((e=>{if(!e)return p;const t={};for(const r of e){Fr(t,r,gt(p,r))}return t}),[p]),m=r((async e=>{const t=null!=e?e:Array.from(c.values()).map((e=>e.name)),r={};for(const e of t){const t=l(Tr(e));if(!t){console.warn(`Attempted to get formatted value for field "${Tr(e)}" that was never registered.`);continue}if(t.refs.some((e=>!e.current))){console.warn(`Attempted to get formatted value for field "${Tr(e)}" that has no or missing ref.`);continue}const n=t.refs[t.refs.length-1].current.transform;if(n){const t=await n();t.__form_internals_should_merge?Or(r,t.value):Fr(r,e,t)}else Fr(r,e,gt(p,e))}return r}),[p,c,l]),w=r((e=>{const t={},r=dr(p);for(const n of e){const e=Tr(n.name),o=l(Tr(n.name));o?(void 0!==n.touched&&u(e,Object.assign(Object.assign({},o),{touched:n.touched})),Fr(r,n.name,n.value),Fr(t,n.name,n.value)):console.warn(`Attempted to set field "${e}" that was never registered.`)}d(r),null==a||a(t,r)}),[p,l,a,d,u]),O=r((e=>{if(!e)return Array.from(c.values()).map((e=>Object.assign(Object.assign({},e),{value:gt(p,e.name)})));const t=[];for(const r of e){const e=l(Tr(r));if(!e){console.warn(`Attempted to get field "${Tr(r)}" that was never registered.`);continue}const n=gt(p,r);t.push(Object.assign(Object.assign({},e),{value:n}))}return t}),[p,c,l]),F=r((e=>{var r,n;const o=null!==(r=null==e?void 0:e.map((e=>{const t=Tr(e),r=l(t);if(r)return r;console.warn(`Attempted to reset field "${t}" that was never registered.`)})).filter((e=>void 0!==e)))&&void 0!==r?r:Array.from(c.values()),a=dr(p);for(const e of o)Fr(a,e.name,null!==(n=e.initialValue)&&void 0!==n?n:gt(t,e.name)),u(Tr(e.name),Object.assign(Object.assign({},e),{touched:!1}));d(a)}),[p,c,l,t,d,u]),S=r(((e,t)=>{const r=Tr(e),n=l(r);n?u(r,Object.assign(Object.assign({},n),{errors:t})):console.warn(`Attempted to set errors for field "${r}" that was never registered.`)}),[l,u]),A=r((e=>{const t=l(Tr(e));return t?t.errors:(console.warn(`Attempted to get errors for field "${Tr(e)}" that was never registered.`),[])}),[l]),x=r((async e=>{var t;const r=null!==(t=null==e?void 0:e.map((e=>{const t=Tr(e),r=l(t);if(r)return r;console.warn(`Attempted to validate field "${t}" that was never registered.`)})).filter((e=>void 0!==e)))&&void 0!==t?t:Array.from(c.values()),n=[];for(const e of r){if(e.refs.some((e=>!e.current))){console.warn(`Attempted to validate field "${Tr(e.name)}" that has no or missing ref.`);continue}const t=await Promise.all(e.refs.map((e=>e.current.validate()))),r=Array.from(new Set(t.flat().filter(Boolean)));r.length>0&&n.push({name:e.name,errors:r})}return n.length>0?n:void 0}),[c,l]),E=r(((e,t)=>{var r;const{allTouched:n=!1}=null!=t?t:{},o=null!==(r=null==e?void 0:e.map((e=>{const t=Tr(e),r=l(t);if(r)return r;console.warn(`Attempted to check if field "${t}" is touched but it was never registered.`)})).filter((e=>void 0!==e)))&&void 0!==r?r:Array.from(c.values());return n?o.every((e=>e.touched)):o.some((e=>e.touched))}),[c,l]);return j.jsx(Nr.Provider,{value:Object.assign(Object.assign({initialValues:t},s),{data:p,setData:d,fields:c,registerField:v,unregisterField:y,setFieldValue:h,getFieldValue:b,getFieldsValue:g,getFieldsFormattedValue:m,setFields:w,getFields:O,resetFields:F,setFieldError:S,getFieldError:A,validateFields:x,isFieldsTouched:E}),children:i})},zr=(e,t)=>void 0===e?t:e;const Dr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length;var Ir,Mr={exports:{}};
16
16
  /*!
17
17
  Copyright (c) 2018 Jed Watson.
18
18
  Licensed under the MIT License (MIT), see