UNPKG

next-gravity-forms

Version:

A component to take GraphQl Gravity Forms query data from WordPress and return a usable form.

14 lines 427 kB
import*as e from"react";import n,{createContext as a,useContext as i,forwardRef as t,Suspense as o,lazy as r,useCallback as s,useRef as c,useMemo as l,useState as u,createElement as p,Component as d,useImperativeHandle as m,useEffect as f,useLayoutEffect as v,Fragment as b}from"react";import{unstable_batchedUpdates as g,createPortal as h}from"react-dom";import{jsx as x}from"react/jsx-runtime";import y from"path";function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var a=0,i=Array(n);a<n;a++)i[a]=e[a];return i}function w(e,n,a,i,t,o,r){try{var s=e[o](r),c=s.value}catch(e){return void a(e)}s.done?n(c):Promise.resolve(c).then(i,t)}function C(e){return function(){var n=this,a=arguments;return new Promise((function(i,t){var o=e.apply(n,a);function r(e){w(o,i,t,r,s,"next",e)}function s(e){w(o,i,t,r,s,"throw",e)}r(void 0)}))}}function A(e,n,a){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var i=a.call(e,n||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function k(){return k=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];for(var i in a)({}).hasOwnProperty.call(a,i)&&(e[i]=a[i])}return e},k.apply(null,arguments)}function E(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,i)}return a}function N(e){for(var n=1;n<arguments.length;n++){var a=null!=arguments[n]?arguments[n]:{};n%2?E(Object(a),!0).forEach((function(n){A(e,n,a[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):E(Object(a)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(a,n))}))}return e}function T(e,n){if(null==e)return{};var a,i,t=function(e,n){if(null==e)return{};var a={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(n.indexOf(i)>=0)continue;a[i]=e[i]}return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)a=o[i],n.indexOf(a)>=0||{}.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}return t}function V(){V=function(){return n};var e,n={},a=Object.prototype,i=a.hasOwnProperty,t=Object.defineProperty||function(e,n,a){e[n]=a.value},o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,n,a){return Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[n]}try{l({},"")}catch(e){l=function(e,n,a){return e[n]=a}}function u(e,n,a,i){var o=n&&n.prototype instanceof g?n:g,r=Object.create(o.prototype),s=new G(i||[]);return t(r,"_invoke",{value:E(e,a,s)}),r}function p(e,n,a){try{return{type:"normal",arg:e.call(n,a)}}catch(e){return{type:"throw",arg:e}}}n.wrap=u;var d="suspendedStart",m="suspendedYield",f="executing",v="completed",b={};function g(){}function h(){}function x(){}var y={};l(y,r,(function(){return this}));var I=Object.getPrototypeOf,w=I&&I(I(S([])));w&&w!==a&&i.call(w,r)&&(y=w);var C=x.prototype=g.prototype=Object.create(y);function A(e){["next","throw","return"].forEach((function(n){l(e,n,(function(e){return this._invoke(n,e)}))}))}function k(e,n){function a(t,o,r,s){var c=p(e[t],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==typeof u&&i.call(u,"__await")?n.resolve(u.__await).then((function(e){a("next",e,r,s)}),(function(e){a("throw",e,r,s)})):n.resolve(u).then((function(e){l.value=e,r(l)}),(function(e){return a("throw",e,r,s)}))}s(c.arg)}var o;t(this,"_invoke",{value:function(e,i){function t(){return new n((function(n,t){a(e,i,n,t)}))}return o=o?o.then(t,t):t()}})}function E(n,a,i){var t=d;return function(o,r){if(t===f)throw Error("Generator is already running");if(t===v){if("throw"===o)throw r;return{value:e,done:!0}}for(i.method=o,i.arg=r;;){var s=i.delegate;if(s){var c=N(s,i);if(c){if(c===b)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(t===d)throw t=v,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);t=f;var l=p(n,a,i);if("normal"===l.type){if(t=i.done?v:m,l.arg===b)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(t=v,i.method="throw",i.arg=l.arg)}}}function N(n,a){var i=a.method,t=n.iterator[i];if(t===e)return a.delegate=null,"throw"===i&&n.iterator.return&&(a.method="return",a.arg=e,N(n,a),"throw"===a.method)||"return"!==i&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+i+"' method")),b;var o=p(t,n.iterator,a.arg);if("throw"===o.type)return a.method="throw",a.arg=o.arg,a.delegate=null,b;var r=o.arg;return r?r.done?(a[n.resultName]=r.value,a.next=n.nextLoc,"return"!==a.method&&(a.method="next",a.arg=e),a.delegate=null,b):r:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,b)}function T(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function F(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function G(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(n){if(n||""===n){var a=n[r];if(a)return a.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length)){var t=-1,o=function a(){for(;++t<n.length;)if(i.call(n,t))return a.value=n[t],a.done=!1,a;return a.value=e,a.done=!0,a};return o.next=o}}throw new TypeError(typeof n+" is not iterable")}return h.prototype=x,t(C,"constructor",{value:x,configurable:!0}),t(x,"constructor",{value:h,configurable:!0}),h.displayName=l(x,c,"GeneratorFunction"),n.isGeneratorFunction=function(e){var n="function"==typeof e&&e.constructor;return!!n&&(n===h||"GeneratorFunction"===(n.displayName||n.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,l(e,c,"GeneratorFunction")),e.prototype=Object.create(C),e},n.awrap=function(e){return{__await:e}},A(k.prototype),l(k.prototype,s,(function(){return this})),n.AsyncIterator=k,n.async=function(e,a,i,t,o){void 0===o&&(o=Promise);var r=new k(u(e,a,i,t),o);return n.isGeneratorFunction(a)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},A(C),l(C,c,"Generator"),l(C,r,(function(){return this})),l(C,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var n=Object(e),a=[];for(var i in n)a.push(i);return a.reverse(),function e(){for(;a.length;){var i=a.pop();if(i in n)return e.value=i,e.done=!1,e}return e.done=!0,e}},n.values=S,G.prototype={constructor:G,reset:function(n){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(F),!n)for(var a in this)"t"===a.charAt(0)&&i.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var a=this;function t(i,t){return s.type="throw",s.arg=n,a.next=i,t&&(a.method="next",a.arg=e),!!t}for(var o=this.tryEntries.length-1;o>=0;--o){var r=this.tryEntries[o],s=r.completion;if("root"===r.tryLoc)return t("end");if(r.tryLoc<=this.prev){var c=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(c&&l){if(this.prev<r.catchLoc)return t(r.catchLoc,!0);if(this.prev<r.finallyLoc)return t(r.finallyLoc)}else if(c){if(this.prev<r.catchLoc)return t(r.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return t(r.finallyLoc)}}}},abrupt:function(e,n){for(var a=this.tryEntries.length-1;a>=0;--a){var t=this.tryEntries[a];if(t.tryLoc<=this.prev&&i.call(t,"finallyLoc")&&this.prev<t.finallyLoc){var o=t;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var r=o?o.completion:{};return r.type=e,r.arg=n,o?(this.method="next",this.next=o.finallyLoc,b):this.complete(r)},complete:function(e,n){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&n&&(this.next=n),b},finish:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),F(a),b}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc===e){var i=a.completion;if("throw"===i.type){var t=i.arg;F(a)}return t}}throw Error("illegal catch attempt")},delegateYield:function(n,a,i){return this.delegate={iterator:S(n),resultName:a,nextLoc:i},"next"===this.method&&(this.arg=e),b}},n}function F(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var i,t,o,r,s=[],c=!0,l=!1;try{if(o=(a=a.call(e)).next,0===n){if(Object(a)!==a)return;c=!1}else for(;!(c=(i=o.call(a)).done)&&(s.push(i.value),s.length!==n);c=!0);}catch(e){l=!0,t=e}finally{try{if(!c&&null!=a.return&&(r=a.return(),Object(r)!==r))return}finally{if(l)throw t}}return s}}(e,n)||j(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||j(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function j(e,n){if(e){if("string"==typeof e)return I(e,n);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?I(e,n):void 0}}function O(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var R,_={exports:{}},P={exports:{}},W={};var B,D,L,M,X,Z,H,z,Y,J,U,q,Q,$,K={}; /** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */function ee(){return D||(D=1,"production"===process.env.NODE_ENV?P.exports=function(){if(R)return W;R=1;var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,a=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,t=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,r=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,h=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case n:switch(e=e.type){case c:case l:case i:case o:case t:case p:return e;default:switch(e=e&&e.$$typeof){case s:case u:case f:case m:case r:return e;default:return d}}case a:return d}}}function y(e){return x(e)===l}return W.AsyncMode=c,W.ConcurrentMode=l,W.ContextConsumer=s,W.ContextProvider=r,W.Element=n,W.ForwardRef=u,W.Fragment=i,W.Lazy=f,W.Memo=m,W.Portal=a,W.Profiler=o,W.StrictMode=t,W.Suspense=p,W.isAsyncMode=function(e){return y(e)||x(e)===c},W.isConcurrentMode=y,W.isContextConsumer=function(e){return x(e)===s},W.isContextProvider=function(e){return x(e)===r},W.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},W.isForwardRef=function(e){return x(e)===u},W.isFragment=function(e){return x(e)===i},W.isLazy=function(e){return x(e)===f},W.isMemo=function(e){return x(e)===m},W.isPortal=function(e){return x(e)===a},W.isProfiler=function(e){return x(e)===o},W.isStrictMode=function(e){return x(e)===t},W.isSuspense=function(e){return x(e)===p},W.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===o||e===t||e===p||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===m||e.$$typeof===r||e.$$typeof===s||e.$$typeof===u||e.$$typeof===b||e.$$typeof===g||e.$$typeof===h||e.$$typeof===v)},W.typeOf=x,W}():P.exports=(B||(B=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,a=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,t=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,r=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,h=e?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case n:var v=e.type;switch(v){case c:case l:case i:case o:case t:case p:return v;default:var b=v&&v.$$typeof;switch(b){case s:case u:case f:case m:case r:return b;default:return d}}case a:return d}}}var y=c,I=l,w=s,C=r,A=n,k=u,E=i,N=f,T=m,V=a,F=o,G=t,S=p,j=!1;function O(e){return x(e)===l}K.AsyncMode=y,K.ConcurrentMode=I,K.ContextConsumer=w,K.ContextProvider=C,K.Element=A,K.ForwardRef=k,K.Fragment=E,K.Lazy=N,K.Memo=T,K.Portal=V,K.Profiler=F,K.StrictMode=G,K.Suspense=S,K.isAsyncMode=function(e){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(e)||x(e)===c},K.isConcurrentMode=O,K.isContextConsumer=function(e){return x(e)===s},K.isContextProvider=function(e){return x(e)===r},K.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},K.isForwardRef=function(e){return x(e)===u},K.isFragment=function(e){return x(e)===i},K.isLazy=function(e){return x(e)===f},K.isMemo=function(e){return x(e)===m},K.isPortal=function(e){return x(e)===a},K.isProfiler=function(e){return x(e)===o},K.isStrictMode=function(e){return x(e)===t},K.isSuspense=function(e){return x(e)===p},K.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===l||e===o||e===t||e===p||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===m||e.$$typeof===r||e.$$typeof===s||e.$$typeof===u||e.$$typeof===b||e.$$typeof===g||e.$$typeof===h||e.$$typeof===v)},K.typeOf=x}()),K)),P.exports} /* object-assign (c) Sindre Sorhus @license MIT */function ne(){if(M)return L;M=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;return L=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},a=0;a<10;a++)n["_"+String.fromCharCode(a)]=a;var i=Object.getOwnPropertyNames(n).map((function(e){return n[e]}));if("0123456789"!==i.join(""))return!1;var t={};return"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},t)).join("")}catch(e){return!1}}()?Object.assign:function(i,t){for(var o,r,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(i),c=1;c<arguments.length;c++){for(var l in o=Object(arguments[c]))n.call(o,l)&&(s[l]=o[l]);if(e){r=e(o);for(var u=0;u<r.length;u++)a.call(o,r[u])&&(s[r[u]]=o[r[u]])}}return s},L}function ae(){if(Z)return X;Z=1;return X="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function ie(){return z?H:(z=1,H=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var te=ee();_.exports=function(){if(q)return U;q=1;var e=ee(),n=ne(),a=ae(),i=ie(),t=function(){if(J)return Y;J=1;var e=function(){};if("production"!==process.env.NODE_ENV){var n=ae(),a={},i=ie();e=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function t(t,o,r,s,c){if("production"!==process.env.NODE_ENV)for(var l in t)if(i(t,l)){var u;try{if("function"!=typeof t[l]){var p=Error((s||"React class")+": "+r+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}u=t[l](o,l,s,r,null,n)}catch(e){u=e}if(!u||u instanceof Error||e((s||"React class")+": type specification of "+r+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in a)){a[u.message]=!0;var d=c?c():"";e("Failed "+r+" type: "+u.message+(null!=d?d:""))}}}return t.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(a={})},Y=t}(),o=function(){};function r(){return null}return"production"!==process.env.NODE_ENV&&(o=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}),U=function(s,c){var l="function"==typeof Symbol&&Symbol.iterator,u="@@iterator",p="<<anonymous>>",d={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:v(r),arrayOf:function(e){return v((function(n,i,t,o,r){if("function"!=typeof e)return new f("Property `"+r+"` of component `"+t+"` has invalid PropType notation inside arrayOf.");var s=n[i];if(!Array.isArray(s))return new f("Invalid "+o+" `"+r+"` of type `"+x(s)+"` supplied to `"+t+"`, expected an array.");for(var c=0;c<s.length;c++){var l=e(s,c,t,o,r+"["+c+"]",a);if(l instanceof Error)return l}return null}))},element:v((function(e,n,a,i,t){var o=e[n];return s(o)?null:new f("Invalid "+i+" `"+t+"` of type `"+x(o)+"` supplied to `"+a+"`, expected a single ReactElement.")})),elementType:v((function(n,a,i,t,o){var r=n[a];return e.isValidElementType(r)?null:new f("Invalid "+t+" `"+o+"` of type `"+x(r)+"` supplied to `"+i+"`, expected a single ReactElement type.")})),instanceOf:function(e){return v((function(n,a,i,t,o){if(!(n[a]instanceof e)){var r=e.name||p;return new f("Invalid "+t+" `"+o+"` of type `"+((s=n[a]).constructor&&s.constructor.name?s.constructor.name:p)+"` supplied to `"+i+"`, expected instance of `"+r+"`.")}var s;return null}))},node:v((function(e,n,a,i,t){return h(e[n])?null:new f("Invalid "+i+" `"+t+"` supplied to `"+a+"`, expected a ReactNode.")})),objectOf:function(e){return v((function(n,t,o,r,s){if("function"!=typeof e)return new f("Property `"+s+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var c=n[t],l=x(c);if("object"!==l)return new f("Invalid "+r+" `"+s+"` of type `"+l+"` supplied to `"+o+"`, expected an object.");for(var u in c)if(i(c,u)){var p=e(c,u,o,r,s+"."+u,a);if(p instanceof Error)return p}return null}))},oneOf:function(e){return Array.isArray(e)?v((function(n,a,i,t,o){for(var r=n[a],s=0;s<e.length;s++)if(m(r,e[s]))return null;var c=JSON.stringify(e,(function(e,n){return"symbol"===y(n)?String(n):n}));return new f("Invalid "+t+" `"+o+"` of value `"+String(r)+"` supplied to `"+i+"`, expected one of "+c+".")})):("production"!==process.env.NODE_ENV&&o(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),r)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),r;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(t)+" at index "+n+"."),r}return v((function(n,t,o,r,s){for(var c=[],l=0;l<e.length;l++){var u=(0,e[l])(n,t,o,r,s,a);if(null==u)return null;u.data&&i(u.data,"expectedType")&&c.push(u.data.expectedType)}return new f("Invalid "+r+" `"+s+"` supplied to `"+o+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")}))},shape:function(e){return v((function(n,i,t,o,r){var s=n[i],c=x(s);if("object"!==c)return new f("Invalid "+o+" `"+r+"` of type `"+c+"` supplied to `"+t+"`, expected `object`.");for(var l in e){var u=e[l];if("function"!=typeof u)return g(t,o,r,l,y(u));var p=u(s,l,t,o,r+"."+l,a);if(p)return p}return null}))},exact:function(e){return v((function(t,o,r,s,c){var l=t[o],u=x(l);if("object"!==u)return new f("Invalid "+s+" `"+c+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");var p=n({},t[o],e);for(var d in p){var m=e[d];if(i(e,d)&&"function"!=typeof m)return g(r,s,c,d,y(m));if(!m)return new f("Invalid "+s+" `"+c+"` key `"+d+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var v=m(l,d,r,s,c+"."+d,a);if(v)return v}return null}))}};function m(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function f(e,n){this.message=e,this.data=n&&"object"==typeof n?n:{},this.stack=""}function v(e){if("production"!==process.env.NODE_ENV)var n={},i=0;function t(t,r,s,l,u,d,m){if(l=l||p,d=d||s,m!==a){if(c){var v=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var b=l+":"+s;!n[b]&&i<3&&(o("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[b]=!0,i++)}}return null==r[s]?t?null===r[s]?new f("The "+u+" `"+d+"` is marked as required in `"+l+"`, but its value is `null`."):new f("The "+u+" `"+d+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(r,s,l,u,d)}var r=t.bind(null,!1);return r.isRequired=t.bind(null,!0),r}function b(e){return v((function(n,a,i,t,o,r){var s=n[a];return x(s)!==e?new f("Invalid "+t+" `"+o+"` of type `"+y(s)+"` supplied to `"+i+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,n,a,i,t){return new f((e||"React class")+": "+n+" type `"+a+"."+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+t+"`.")}function h(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(h);if(null===e||s(e))return!0;var n=function(e){var n=e&&(l&&e[l]||e[u]);if("function"==typeof n)return n}(e);if(!n)return!1;var a,i=n.call(e);if(n!==e.entries){for(;!(a=i.next()).done;)if(!h(a.value))return!1}else for(;!(a=i.next()).done;){var t=a.value;if(t&&!h(t[1]))return!1}return!0;default:return!1}}function x(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function y(e){if(null==e)return""+e;var n=x(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function I(e){var n=y(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return f.prototype=Error.prototype,d.checkPropTypes=t,d.resetWarningCache=t.resetWarningCache,d.PropTypes=d,d},U}()(te.isElement,!0)}else _.exports=function(){if($)return Q;$=1;var e=ae();function n(){}function a(){}return a.resetWarningCache=n,Q=function(){function i(n,a,i,t,o,r){if(r!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return i}i.isRequired=i;var o={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:t,element:i,elementType:i,instanceOf:t,node:i,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:n};return o.PropTypes=o,o}}()();var oe=_.exports,re=O(oe),se=e=>"checkbox"===e.type,ce=e=>e instanceof Date,le=e=>null==e;const ue=e=>"object"==typeof e;var pe=e=>!le(e)&&!Array.isArray(e)&&ue(e)&&!ce(e),de=e=>pe(e)&&e.target?se(e.target)?e.target.checked:e.target.value:e,me=(e,n)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(n)),fe=e=>{const n=e.constructor&&e.constructor.prototype;return pe(n)&&n.hasOwnProperty("isPrototypeOf")},ve="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function be(e){let n;const a=Array.isArray(e);if(e instanceof Date)n=new Date(e);else if(e instanceof Set)n=new Set(e);else{if(ve&&(e instanceof Blob||e instanceof FileList)||!a&&!pe(e))return e;if(n=a?[]:{},a||fe(e))for(const a in e)e.hasOwnProperty(a)&&(n[a]=be(e[a]));else n=e}return n}var ge=e=>Array.isArray(e)?e.filter(Boolean):[],he=e=>void 0===e,xe=(e,n,a)=>{if(!n||!pe(e))return a;const i=ge(n.split(/[,[\].]+?/)).reduce(((e,n)=>le(e)?e:e[n]),e);return he(i)||i===e?he(e[n])?a:e[n]:i},ye=e=>"boolean"==typeof e,Ie=e=>/^\w*$/.test(e),we=e=>ge(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ce=(e,n,a)=>{let i=-1;const t=Ie(n)?[n]:we(n),o=t.length,r=o-1;for(;++i<o;){const n=t[i];let o=a;if(i!==r){const a=e[n];o=pe(a)||Array.isArray(a)?a:isNaN(+t[i+1])?{}:[]}if("__proto__"===n)return;e[n]=o,e=e[n]}return e};const Ae={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ke={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ee="max",Ne="min",Te="maxLength",Ve="minLength",Fe="pattern",Ge="required",Se="validate",je=n.createContext(null),Oe=()=>n.useContext(je),Re=e=>{const{children:a,...i}=e;return n.createElement(je.Provider,{value:i},a)};var _e=(e,n,a,i=!0)=>{const t={defaultValues:n._defaultValues};for(const o in e)Object.defineProperty(t,o,{get:()=>{const t=o;return n._proxyFormState[t]!==ke.all&&(n._proxyFormState[t]=!i||ke.all),a&&(a[t]=!0),e[t]}});return t},Pe=e=>pe(e)&&!Object.keys(e).length,We=(e,n,a,i)=>{a(e);const{name:t,...o}=e;return Pe(o)||Object.keys(o).length>=Object.keys(n).length||Object.keys(o).find((e=>n[e]===(!i||ke.all)))},Be=e=>Array.isArray(e)?e:[e],De=(e,n,a)=>!e||!n||e===n||Be(e).some((e=>e&&(a?e===n:e.startsWith(n)||n.startsWith(e))));function Le(e){const a=n.useRef(e);a.current=e,n.useEffect((()=>{const n=!e.disabled&&a.current.subject&&a.current.subject.subscribe({next:a.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var Me=e=>"string"==typeof e,Xe=(e,n,a,i,t)=>Me(e)?(i&&n.watch.add(e),xe(a,e,t)):Array.isArray(e)?e.map((e=>(i&&n.watch.add(e),xe(a,e)))):(i&&(n.watchAll=!0),a);function Ze(e){const a=Oe(),{name:i,disabled:t,control:o=a.control,shouldUnregister:r}=e,s=me(o._names.array,i),c=function(e){const a=Oe(),{control:i=a.control,name:t,defaultValue:o,disabled:r,exact:s}=e||{},c=n.useRef(t);c.current=t,Le({disabled:r,subject:i._subjects.values,next:e=>{De(c.current,e.name,s)&&u(be(Xe(c.current,i._names,e.values||i._formValues,!1,o)))}});const[l,u]=n.useState(i._getWatch(t,o));return n.useEffect((()=>i._removeUnmounted())),l}({control:o,name:i,defaultValue:xe(o._formValues,i,xe(o._defaultValues,i,e.defaultValue)),exact:!0}),l=function(e){const a=Oe(),{control:i=a.control,disabled:t,name:o,exact:r}=e||{},[s,c]=n.useState(i._formState),l=n.useRef(!0),u=n.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),p=n.useRef(o);return p.current=o,Le({disabled:t,next:e=>l.current&&De(p.current,e.name,r)&&We(e,u.current,i._updateFormState)&&c({...i._formState,...e}),subject:i._subjects.state}),n.useEffect((()=>(l.current=!0,u.current.isValid&&i._updateValid(!0),()=>{l.current=!1})),[i]),_e(s,i,u.current,!1)}({control:o,name:i}),u=n.useRef(o.register(i,{...e.rules,value:c,...ye(e.disabled)?{disabled:e.disabled}:{}}));return n.useEffect((()=>{const e=o._options.shouldUnregister||r,n=(e,n)=>{const a=xe(o._fields,e);a&&a._f&&(a._f.mount=n)};if(n(i,!0),e){const e=be(xe(o._options.defaultValues,i));Ce(o._defaultValues,i,e),he(xe(o._formValues,i))&&Ce(o._formValues,i,e)}return()=>{(s?e&&!o._state.action:e)?o.unregister(i):n(i,!1)}}),[i,o,s,r]),n.useEffect((()=>{xe(o._fields,i)&&o._updateDisabledField({disabled:t,fields:o._fields,name:i,value:xe(o._fields,i)._f.value})}),[t,i,o]),{field:{name:i,value:c,...ye(t)||l.disabled?{disabled:l.disabled||t}:{},onChange:n.useCallback((e=>u.current.onChange({target:{value:de(e),name:i},type:Ae.CHANGE})),[i]),onBlur:n.useCallback((()=>u.current.onBlur({target:{value:xe(o._formValues,i),name:i},type:Ae.BLUR})),[i,o]),ref:e=>{const n=xe(o._fields,i);n&&e&&(n._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:n=>e.setCustomValidity(n),reportValidity:()=>e.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!xe(l.errors,i)},isDirty:{enumerable:!0,get:()=>!!xe(l.dirtyFields,i)},isTouched:{enumerable:!0,get:()=>!!xe(l.touchedFields,i)},isValidating:{enumerable:!0,get:()=>!!xe(l.validatingFields,i)},error:{enumerable:!0,get:()=>xe(l.errors,i)}})}}const He=e=>e.render(Ze(e));var ze=(e,n,a,i,t)=>n?{...a[e],types:{...a[e]&&a[e].types?a[e].types:{},[i]:t||!0}}:{},Ye=e=>({isOnSubmit:!e||e===ke.onSubmit,isOnBlur:e===ke.onBlur,isOnChange:e===ke.onChange,isOnAll:e===ke.all,isOnTouch:e===ke.onTouched}),Je=(e,n,a)=>!a&&(n.watchAll||n.watch.has(e)||[...n.watch].some((n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length)))));const Ue=(e,n,a,i)=>{for(const t of a||Object.keys(e)){const a=xe(e,t);if(a){const{_f:e,...o}=a;if(e){if(e.refs&&e.refs[0]&&n(e.refs[0],t)&&!i)break;if(e.ref&&n(e.ref,e.name)&&!i)break;Ue(o,n)}else pe(o)&&Ue(o,n)}}};var qe=(e,n,a)=>{const i=Be(xe(e,a));return Ce(i,"root",n[a]),Ce(e,a,i),e},Qe=e=>"file"===e.type,$e=e=>"function"==typeof e,Ke=e=>{if(!ve)return!1;const n=e?e.ownerDocument:0;return e instanceof(n&&n.defaultView?n.defaultView.HTMLElement:HTMLElement)},en=e=>Me(e),nn=e=>"radio"===e.type,an=e=>e instanceof RegExp;const tn={value:!1,isValid:!1},on={value:!0,isValid:!0};var rn=e=>{if(Array.isArray(e)){if(e.length>1){const n=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:n,isValid:!!n.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!he(e[0].attributes.value)?he(e[0].value)||""===e[0].value?on:{value:e[0].value,isValid:!0}:on:tn}return tn};const sn={isValid:!1,value:null};var cn=e=>Array.isArray(e)?e.reduce(((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e),sn):sn;function ln(e,n,a="validate"){if(en(e)||Array.isArray(e)&&e.every(en)||ye(e)&&!e)return{type:a,message:en(e)?e:"",ref:n}}var un=e=>pe(e)&&!an(e)?e:{value:e,message:""},pn=async(e,n,a,i,t)=>{const{ref:o,refs:r,required:s,maxLength:c,minLength:l,min:u,max:p,pattern:d,validate:m,name:f,valueAsNumber:v,mount:b,disabled:g}=e._f,h=xe(n,f);if(!b||g)return{};const x=r?r[0]:o,y=e=>{i&&x.reportValidity&&(x.setCustomValidity(ye(e)?"":e||""),x.reportValidity())},I={},w=nn(o),C=se(o),A=w||C,k=(v||Qe(o))&&he(o.value)&&he(h)||Ke(o)&&""===o.value||""===h||Array.isArray(h)&&!h.length,E=ze.bind(null,f,a,I),N=(e,n,a,i=Te,t=Ve)=>{const r=e?n:a;I[f]={type:e?i:t,message:r,ref:o,...E(e?i:t,r)}};if(t?!Array.isArray(h)||!h.length:s&&(!A&&(k||le(h))||ye(h)&&!h||C&&!rn(r).isValid||w&&!cn(r).isValid)){const{value:e,message:n}=en(s)?{value:!!s,message:s}:un(s);if(e&&(I[f]={type:Ge,message:n,ref:x,...E(Ge,n)},!a))return y(n),I}if(!(k||le(u)&&le(p))){let e,n;const i=un(p),t=un(u);if(le(h)||isNaN(h)){const a=o.valueAsDate||new Date(h),r=e=>new Date((new Date).toDateString()+" "+e),s="time"==o.type,c="week"==o.type;Me(i.value)&&h&&(e=s?r(h)>r(i.value):c?h>i.value:a>new Date(i.value)),Me(t.value)&&h&&(n=s?r(h)<r(t.value):c?h<t.value:a<new Date(t.value))}else{const a=o.valueAsNumber||(h?+h:h);le(i.value)||(e=a>i.value),le(t.value)||(n=a<t.value)}if((e||n)&&(N(!!e,i.message,t.message,Ee,Ne),!a))return y(I[f].message),I}if((c||l)&&!k&&(Me(h)||t&&Array.isArray(h))){const e=un(c),n=un(l),i=!le(e.value)&&h.length>+e.value,t=!le(n.value)&&h.length<+n.value;if((i||t)&&(N(i,e.message,n.message),!a))return y(I[f].message),I}if(d&&!k&&Me(h)){const{value:e,message:n}=un(d);if(an(e)&&!h.match(e)&&(I[f]={type:Fe,message:n,ref:o,...E(Fe,n)},!a))return y(n),I}if(m)if($e(m)){const e=ln(await m(h,n),x);if(e&&(I[f]={...e,...E(Se,e.message)},!a))return y(e.message),I}else if(pe(m)){let e={};for(const i in m){if(!Pe(e)&&!a)break;const t=ln(await m[i](h,n),x,i);t&&(e={...t,...E(i,t.message)},y(t.message),a&&(I[f]=e))}if(!Pe(e)&&(I[f]={ref:x,...e},!a))return I}return y(!0),I};function dn(e,n){const a=Array.isArray(n)?n:Ie(n)?[n]:we(n),i=1===a.length?e:function(e,n){const a=n.slice(0,-1).length;let i=0;for(;i<a;)e=he(e)?i++:e[n[i++]];return e}(e,a),t=a.length-1,o=a[t];return i&&delete i[o],0!==t&&(pe(i)&&Pe(i)||Array.isArray(i)&&function(e){for(const n in e)if(e.hasOwnProperty(n)&&!he(e[n]))return!1;return!0}(i))&&dn(e,a.slice(0,-1)),e}var mn=()=>{let e=[];return{get observers(){return e},next:n=>{for(const a of e)a.next&&a.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter((e=>e!==n))}}),unsubscribe:()=>{e=[]}}},fn=e=>le(e)||!ue(e);function vn(e,n){if(fn(e)||fn(n))return e===n;if(ce(e)&&ce(n))return e.getTime()===n.getTime();const a=Object.keys(e),i=Object.keys(n);if(a.length!==i.length)return!1;for(const t of a){const a=e[t];if(!i.includes(t))return!1;if("ref"!==t){const e=n[t];if(ce(a)&&ce(e)||pe(a)&&pe(e)||Array.isArray(a)&&Array.isArray(e)?!vn(a,e):a!==e)return!1}}return!0}var bn=e=>"select-multiple"===e.type,gn=e=>nn(e)||se(e),hn=e=>Ke(e)&&e.isConnected,xn=e=>{for(const n in e)if($e(e[n]))return!0;return!1};function yn(e,n={}){const a=Array.isArray(e);if(pe(e)||a)for(const a in e)Array.isArray(e[a])||pe(e[a])&&!xn(e[a])?(n[a]=Array.isArray(e[a])?[]:{},yn(e[a],n[a])):le(e[a])||(n[a]=!0);return n}function In(e,n,a){const i=Array.isArray(e);if(pe(e)||i)for(const i in e)Array.isArray(e[i])||pe(e[i])&&!xn(e[i])?he(n)||fn(a[i])?a[i]=Array.isArray(e[i])?yn(e[i],[]):{...yn(e[i])}:In(e[i],le(n)?{}:n[i],a[i]):a[i]=!vn(e[i],n[i]);return a}var wn=(e,n)=>In(e,n,yn(n)),Cn=(e,{valueAsNumber:n,valueAsDate:a,setValueAs:i})=>he(e)?e:n?""===e?NaN:e?+e:e:a&&Me(e)?new Date(e):i?i(e):e;function An(e){const n=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):n.disabled))return Qe(n)?n.files:nn(n)?cn(e.refs).value:bn(n)?[...n.selectedOptions].map((({value:e})=>e)):se(n)?rn(e.refs).value:Cn(he(n.value)?e.ref.value:n.value,e)}var kn=(e,n,a,i)=>{const t={};for(const a of e){const e=xe(n,a);e&&Ce(t,a,e._f)}return{criteriaMode:a,names:[...e],fields:t,shouldUseNativeValidation:i}},En=e=>he(e)?e:an(e)?e.source:pe(e)?an(e.value)?e.value.source:e.value:e,Nn=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Tn(e,n,a){const i=xe(e,a);if(i||Ie(a))return{error:i,name:a};const t=a.split(".");for(;t.length;){const i=t.join("."),o=xe(n,i),r=xe(e,i);if(o&&!Array.isArray(o)&&a!==i)return{name:a};if(r&&r.type)return{name:i,error:r};t.pop()}return{name:a}}var Vn=(e,n,a,i,t)=>!t.isOnAll&&(!a&&t.isOnTouch?!(n||e):(a?i.isOnBlur:t.isOnBlur)?!e:!(a?i.isOnChange:t.isOnChange)||e),Fn=(e,n)=>!ge(xe(e,n)).length&&dn(e,n);const Gn={mode:ke.onSubmit,reValidateMode:ke.onChange,shouldFocusError:!0};function Sn(e={}){let n,a={...Gn,...e},i={submitCount:0,isDirty:!1,isLoading:$e(a.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:a.errors||{},disabled:a.disabled||!1},t={},o=(pe(a.defaultValues)||pe(a.values))&&be(a.defaultValues||a.values)||{},r=a.shouldUnregister?{}:be(o),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:mn(),array:mn(),state:mn()},d=Ye(a.mode),m=Ye(a.reValidateMode),f=a.criteriaMode===ke.all,v=async e=>{if(u.isValid||e){const e=a.resolver?Pe((await y()).errors):await I(t,!0);e!==i.isValid&&p.state.next({isValid:e})}},b=(e,n)=>{(u.isValidating||u.validatingFields)&&((e||Array.from(c.mount)).forEach((e=>{e&&(n?Ce(i.validatingFields,e,n):dn(i.validatingFields,e))})),p.state.next({validatingFields:i.validatingFields,isValidating:!Pe(i.validatingFields)}))},g=(e,n,a,i)=>{const c=xe(t,e);if(c){const t=xe(r,e,he(a)?xe(o,e):a);he(t)||i&&i.defaultChecked||n?Ce(r,e,n?t:An(c._f)):A(e,t),s.mount&&v()}},h=(e,n,a,r,s)=>{let c=!1,l=!1;const d={name:e},m=!!(xe(t,e)&&xe(t,e)._f&&xe(t,e)._f.disabled);if(!a||r){u.isDirty&&(l=i.isDirty,i.isDirty=d.isDirty=w(),c=l!==d.isDirty);const a=m||vn(xe(o,e),n);l=!(m||!xe(i.dirtyFields,e)),a||m?dn(i.dirtyFields,e):Ce(i.dirtyFields,e,!0),d.dirtyFields=i.dirtyFields,c=c||u.dirtyFields&&l!==!a}if(a){const n=xe(i.touchedFields,e);n||(Ce(i.touchedFields,e,a),d.touchedFields=i.touchedFields,c=c||u.touchedFields&&n!==a)}return c&&s&&p.state.next(d),c?d:{}},x=(a,t,o,r)=>{const s=xe(i.errors,a),c=u.isValid&&ye(t)&&i.isValid!==t;var d;if(e.delayError&&o?(d=()=>((e,n)=>{Ce(i.errors,e,n),p.state.next({errors:i.errors})})(a,o),n=e=>{clearTimeout(l),l=setTimeout(d,e)},n(e.delayError)):(clearTimeout(l),n=null,o?Ce(i.errors,a,o):dn(i.errors,a)),(o?!vn(s,o):s)||!Pe(r)||c){const e={...r,...c&&ye(t)?{isValid:t}:{},errors:i.errors,name:a};i={...i,...e},p.state.next(e)}},y=async e=>{b(e,!0);const n=await a.resolver(r,a.context,kn(e||c.mount,t,a.criteriaMode,a.shouldUseNativeValidation));return b(e),n},I=async(e,n,t={valid:!0})=>{for(const o in e){const s=e[o];if(s){const{_f:e,...l}=s;if(e){const l=c.array.has(e.name);b([o],!0);const u=await pn(s,r,f,a.shouldUseNativeValidation&&!n,l);if(b([o]),u[e.name]&&(t.valid=!1,n))break;!n&&(xe(u,e.name)?l?qe(i.errors,u,e.name):Ce(i.errors,e.name,u[e.name]):dn(i.errors,e.name))}l&&await I(l,n,t)}}return t.valid},w=(e,n)=>(e&&n&&Ce(r,e,n),!vn(F(),o)),C=(e,n,a)=>Xe(e,c,{...s.mount?r:he(n)?o:Me(e)?{[e]:n}:n},a,n),A=(e,n,a={})=>{const i=xe(t,e);let o=n;if(i){const a=i._f;a&&(!a.disabled&&Ce(r,e,Cn(n,a)),o=Ke(a.ref)&&le(n)?"":n,bn(a.ref)?[...a.ref.options].forEach((e=>e.selected=o.includes(e.value))):a.refs?se(a.ref)?a.refs.length>1?a.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((n=>n===e.value)):o===e.value))):a.refs[0]&&(a.refs[0].checked=!!o):a.refs.forEach((e=>e.checked=e.value===o)):Qe(a.ref)?a.ref.value="":(a.ref.value=o,a.ref.type||p.values.next({name:e,values:{...r}})))}(a.shouldDirty||a.shouldTouch)&&h(e,o,a.shouldTouch,a.shouldDirty,!0),a.shouldValidate&&V(e)},k=(e,n,a)=>{for(const i in n){const o=n[i],r=`${e}.${i}`,s=xe(t,r);!c.array.has(e)&&fn(o)&&(!s||s._f)||ce(o)?A(r,o,a):k(r,o,a)}},E=(e,n,a={})=>{const l=xe(t,e),d=c.array.has(e),m=be(n);Ce(r,e,m),d?(p.array.next({name:e,values:{...r}}),(u.isDirty||u.dirtyFields)&&a.shouldDirty&&p.state.next({name:e,dirtyFields:wn(o,r),isDirty:w(e,m)})):!l||l._f||le(m)?A(e,m,a):k(e,m,a),Je(e,c)&&p.state.next({...i}),p.values.next({name:s.mount?e:void 0,values:{...r}})},N=async e=>{s.mount=!0;const o=e.target;let l=o.name,g=!0;const w=xe(t,l),C=e=>{g=Number.isNaN(e)||e===xe(r,l,e)};if(w){let s,A;const k=o.type?An(w._f):de(e),E=e.type===Ae.BLUR||e.type===Ae.FOCUS_OUT,N=!Nn(w._f)&&!a.resolver&&!xe(i.errors,l)&&!w._f.deps||Vn(E,xe(i.touchedFields,l),i.isSubmitted,m,d),T=Je(l,c,E);Ce(r,l,k),E?(w._f.onBlur&&w._f.onBlur(e),n&&n(0)):w._f.onChange&&w._f.onChange(e);const F=h(l,k,E,!1),G=!Pe(F)||T;if(!E&&p.values.next({name:l,type:e.type,values:{...r}}),N)return u.isValid&&v(),G&&p.state.next({name:l,...T?{}:F});if(!E&&T&&p.state.next({...i}),a.resolver){const{errors:e}=await y([l]);if(C(k),g){const n=Tn(i.errors,t,l),a=Tn(e,t,n.name||l);s=a.error,l=a.name,A=Pe(e)}}else b([l],!0),s=(await pn(w,r,f,a.shouldUseNativeValidation))[l],b([l]),C(k),g&&(s?A=!1:u.isValid&&(A=await I(t,!0)));g&&(w._f.deps&&V(w._f.deps),x(l,A,s,F))}},T=(e,n)=>{if(xe(i.errors,n)&&e.focus)return e.focus(),1},V=async(e,n={})=>{let o,r;const s=Be(e);if(a.resolver){const n=await(async e=>{const{errors:n}=await y(e);if(e)for(const a of e){const e=xe(n,a);e?Ce(i.errors,a,e):dn(i.errors,a)}else i.errors=n;return n})(he(e)?e:s);o=Pe(n),r=e?!s.some((e=>xe(n,e))):o}else e?(r=(await Promise.all(s.map((async e=>{const n=xe(t,e);return await I(n&&n._f?{[e]:n}:n)})))).every(Boolean),(r||i.isValid)&&v()):r=o=await I(t);return p.state.next({...!Me(e)||u.isValid&&o!==i.isValid?{}:{name:e},...a.resolver||!e?{isValid:o}:{},errors:i.errors}),n.shouldFocus&&!r&&Ue(t,T,e?s:c.mount),r},F=e=>{const n={...s.mount?r:o};return he(e)?n:Me(e)?xe(n,e):e.map((e=>xe(n,e)))},G=(e,n)=>({invalid:!!xe((n||i).errors,e),isDirty:!!xe((n||i).dirtyFields,e),error:xe((n||i).errors,e),isValidating:!!xe(i.validatingFields,e),isTouched:!!xe((n||i).touchedFields,e)}),S=(e,n,a)=>{const o=(xe(t,e,{_f:{}})._f||{}).ref,r=xe(i.errors,e)||{},{ref:s,message:c,type:l,...u}=r;Ce(i.errors,e,{...u,...n,ref:o}),p.state.next({name:e,errors:i.errors,isValid:!1}),a&&a.shouldFocus&&o&&o.focus&&o.focus()},j=(e,n={})=>{for(const s of e?Be(e):c.mount)c.mount.delete(s),c.array.delete(s),n.keepValue||(dn(t,s),dn(r,s)),!n.keepError&&dn(i.errors,s),!n.keepDirty&&dn(i.dirtyFields,s),!n.keepTouched&&dn(i.touchedFields,s),!n.keepIsValidating&&dn(i.validatingFields,s),!a.shouldUnregister&&!n.keepDefaultValue&&dn(o,s);p.values.next({values:{...r}}),p.state.next({...i,...n.keepDirty?{isDirty:w()}:{}}),!n.keepIsValid&&v()},O=({disabled:e,name:n,field:a,fields:i,value:t})=>{if(ye(e)&&s.mount||e){const o=e?void 0:he(t)?An(a?a._f:xe(i,n)._f):t;Ce(r,n,o),h(n,o,!1,!1,!0)}},R=(e,n={})=>{let i=xe(t,e);const r=ye(n.disabled);return Ce(t,e,{...i||{},_f:{...i&&i._f?i._f:{ref:{name:e}},name:e,mount:!0,...n}}),c.mount.add(e),i?O({field:i,disabled:n.disabled,name:e,value:n.value}):g(e,!0,n.value),{...r?{disabled:n.disabled}:{},...a.progressive?{required:!!n.required,min:En(n.min),max:En(n.max),minLength:En(n.minLength),maxLength:En(n.maxLength),pattern:En(n.pattern)}:{},name:e,onChange:N,onBlur:N,ref:r=>{if(r){R(e,n),i=xe(t,e);const a=he(r.value)&&r.querySelectorAll&&r.querySelectorAll("input,select,textarea")[0]||r,s=gn(a),c=i._f.refs||[];if(s?c.find((e=>e===a)):a===i._f.ref)return;Ce(t,e,{_f:{...i._f,...s?{refs:[...c.filter(hn),a,...Array.isArray(xe(o,e))?[{}]:[]],ref:{type:a.type,name:e}}:{ref:a}}}),g(e,!1,void 0,a)}else i=xe(t,e,{}),i._f&&(i._f.mount=!1),(a.shouldUnregister||n.shouldUnregister)&&(!me(c.array,e)||!s.action)&&c.unMount.add(e)}}},_=()=>a.shouldFocusError&&Ue(t,T,c.mount),P=(e,n)=>async o=>{let s;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let c=be(r);if(p.state.next({isSubmitting:!0}),a.resolver){const{errors:e,values:n}=await y();i.errors=e,c=n}else await I(t);if(dn(i.errors,"root"),Pe(i.errors)){p.state.next({errors:{}});try{await e(c,o)}catch(e){s=e}}else n&&await n({...i.errors},o),_(),setTimeout(_);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Pe(i.errors)&&!s,submitCount:i.submitCount+1,errors:i.errors}),s)throw s},W=(n,a={})=>{const l=n?be(n):o,d=be(l),m=Pe(n),f=m?o:d;if(a.keepDefaultValues||(o=l),!a.keepValues){if(a.keepDirtyValues)for(const e of c.mount)xe(i.dirtyFields,e)?Ce(f,e,xe(r,e)):E(e,xe(f,e));else{if(ve&&he(n))for(const e of c.mount){const n=xe(t,e);if(n&&n._f){const e=Array.isArray(n._f.refs)?n._f.refs[0]:n._f.ref;if(Ke(e)){const n=e.closest("form");if(n){n.reset();break}}}}t={}}r=e.shouldUnregister?a.keepDefaultValues?be(o):{}:be(f),p.array.next({values:{...f}}),p.values.next({values:{...f}})}c={mount:a.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!u.isValid||!!a.keepIsValid||!!a.keepDirtyValues,s.watch=!!e.shouldUnregister,p.state.next({submitCount:a.keepSubmitCount?i.submitCount:0,isDirty:!m&&(a.keepDirty?i.isDirty:!(!a.keepDefaultValues||vn(n,o))),isSubmitted:!!a.keepIsSubmitted&&i.isSubmitted,dirtyFields:m?{}:a.keepDirtyValues?a.keepDefaultValues&&r?wn(o,r):i.dirtyFields:a.keepDefaultValues&&n?wn(o,n):a.keepDirty?i.dirtyFields:{},touchedFields:a.keepTouched?i.touchedFields:{},errors:a.keepErrors?i.errors:{},isSubmitSuccessful:!!a.keepIsSubmitSuccessful&&i.isSubmitSuccessful,isSubmitting:!1})},B=(e,n)=>W($e(e)?e(r):e,n);return{control:{register:R,unregister:j,getFieldState:G,handleSubmit:P,setError:S,_executeSchema:y,_getWatch:C,_getDirty:w,_updateValid:v,_removeUnmounted:()=>{for(const e of c.unMount){const n=xe(t,e);n&&(n._f.refs?n._f.refs.every((e=>!hn(e))):!hn(n._f.ref))&&j(e)}c.unMount=new Set},_updateFieldArray:(e,n=[],a,c,l=!0,d=!0)=>{if(c&&a){if(s.action=!0,d&&Array.isArray(xe(t,e))){const n=a(xe(t,e),c.argA,c.argB);l&&Ce(t,e,n)}if(d&&Array.isArray(xe(i.errors,e))){const n=a(xe(i.errors,e),c.argA,c.argB);l&&Ce(i.errors,e,n),Fn(i.errors,e)}if(u.touchedFields&&d&&Array.isArray(xe(i.touchedFields,e))){const n=a(xe(i.touchedFields,e),c.argA,c.argB);l&&Ce(i.touchedFields,e,n)}u.dirtyFields&&(i.dirtyFields=wn(o,r)),p.state.next({name:e,isDirty:w(e,n),dirtyFields:i.dirtyFields,errors:i.errors,isValid:i.isValid})}else Ce(r,e,n)},_updateDisabledField:O,_getFieldArray:n=>ge(xe(s.mount?r:o,n,e.shouldUnregister?xe(o,n,[]):[])),_reset:W,_resetDefaultValues:()=>$e(a.defaultValues)&&a.defaultValues().then((e=>{B(e,a.resetOptions),p.state.next({isLoading:!1})})),_updateFormState:e=>{i={...i,...e}},_disableForm:e=>{ye(e)&&(p.state.next({disabled:e}),Ue(t,((n,a)=>{const i=xe(t,a);i&&(n.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach((n=>{n.disabled=i._f.disabled||e})))}),0,!1))},_subjects:p,_proxyFormState:u,_setErrors:e=>{i.errors=e,p.state.next({errors:i.errors,isValid:!1})},get _fields(){return t},get _formValues(){return r},get _state(){return s},set _state(e){s=e},get _defaultValues(){return o},get _names(){return c},set _names(e){c=e},get _formState(){return i},set _formState(e){i=e},get _options(){return a},set _options(e){a={...a,...e}}},trigger:V,register:R,handleSubmit:P,watch:(e,n)=>$e(e)?p.values.subscribe({next:a=>e(C(void 0,n),a)}):C(e,n,!0),setValue:E,getValues:F,reset:B,resetField:(e,n={})=>{xe(t,e)&&(he(n.defaultValue)?E(e,be(xe(o,e))):(E(e,n.defaultValue),Ce(o,e,be(n.defaultValue))),n.keepTouched||dn(i.touchedFields,e),n.keepDirty||(dn(i.dirtyFields,e),i.isDirty=n.defaultValue?w(e,be(xe(o,e))):w()),n.keepError||(dn(i.errors,e),u.isValid&&v()),p.state.next({...i}))},clearErrors:e=>{e&&Be(e).forEach((e=>dn(i.errors,e))),p.state.next({errors:e?i.errors:{}})},unregister:j,setError:S,setFocus:(e,n={})=>{const a=xe(t,e),i=a&&a._f;if(i){const e=i.refs?i.refs[0]:i.ref;e.focus&&(e.focus(),n.shouldSelect&&e.select())}},getFieldState:G}}var jn={errors:{general:"There was a problem with your submission. Please review the fields below.",leastOneField:"At least one field must be filled out.",unknownError:"An unknown error occured.",required:"This field is required.",emailsDontmatch:"Your emails do not match.",passwordsDontmatch:"Your passwords do not match.",wrongRangeMin:"Please enter a number greater than or equal to {{min}}.",wrongRangeMax:"Please enter a number less than or equal to {{max}}.",wrongRangeBoth:"Please enter a number from {{min}} to {{max}}.",pattern:{email:"The email address entered is invalid, please check the formatting (e.g. email@domain.com).",phone:"This is an invalid phone number.",default:"The format seems to be wrong."},maxChar:{front:"Need more than",back:"characters."},name:"Please complete the following fields: {{fields}}",date:{required:"Please complete the following fields: {{fields}}",invalid:"Please enter a valid date.",picker:{invalid:"Please enter a valid date in the format ({{format}})."}},fileupload:{exceedsSizeLimit:"File exceeds size limit. Maximum file size: {{max}}MB",typeNotAllowed:"The uploaded file type is not allowed. Must be one of the following: {{types}}"},multiFileUpload:{exceedsSizeLimit:"{{name}} - File exceeds size limit",typeNotAllowed:"{{name}} - This type of file is not allowed. Must be one of the following: {{types}}",maxFiles:"Maximum number of files reached"},number:{invalid:"Please enter a valid number",wrongRangeMin:"Please enter a number greater than or equal to {{min}}.",wrongRangeMax:"Please enter a number less than or equal to {{max}}.",wrongRangeBoth:"Please enter a number from {{min}} to {{max}}."},url:"Please enter a valid Website URL (e.g. https://gravityforms.com).",time:"Please enter a valid time."},counter:"{{value}} of {{max}} max characters",datepicker:{days:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","Sep