digital-rabbit-cl 1.2.6 → 1.2.8

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.
Files changed (61) hide show
  1. package/dist/components/Button/Button.d.ts +26 -9
  2. package/dist/components/Button/Button.d.ts.map +1 -1
  3. package/dist/components/CSSReset/CSSReset.d.ts +2 -2
  4. package/dist/components/CSSReset/CSSReset.d.ts.map +1 -1
  5. package/dist/components/Checkbox/Checkbox.d.ts +20 -8
  6. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  7. package/dist/components/FeatureCard/FeatureCard.d.ts +3 -5
  8. package/dist/components/FeatureCard/FeatureCard.d.ts.map +1 -1
  9. package/dist/components/FeatureGridSection/FeatureGridSection.d.ts +2 -2
  10. package/dist/components/FeatureGridSection/FeatureGridSection.d.ts.map +1 -1
  11. package/dist/components/Footer/Footer.d.ts +12 -10
  12. package/dist/components/Footer/Footer.d.ts.map +1 -1
  13. package/dist/components/Footer/useFooterStyles.d.ts +11 -3
  14. package/dist/components/Footer/useFooterStyles.d.ts.map +1 -1
  15. package/dist/components/FormError/FormError.d.ts +6 -4
  16. package/dist/components/FormError/FormError.d.ts.map +1 -1
  17. package/dist/components/FormGroup/FormGroup.d.ts +21 -7
  18. package/dist/components/FormGroup/FormGroup.d.ts.map +1 -1
  19. package/dist/components/FormLabel/FormLabel.d.ts +9 -7
  20. package/dist/components/FormLabel/FormLabel.d.ts.map +1 -1
  21. package/dist/components/Hamburger/Hamburger.d.ts +3 -2
  22. package/dist/components/Hamburger/Hamburger.d.ts.map +1 -1
  23. package/dist/components/Hamburger/useHamburgerStyles.d.ts +3 -2
  24. package/dist/components/Hamburger/useHamburgerStyles.d.ts.map +1 -1
  25. package/dist/components/Header/Header.d.ts +13 -9
  26. package/dist/components/Header/Header.d.ts.map +1 -1
  27. package/dist/components/Header/useHeaderStyles.d.ts +15 -3
  28. package/dist/components/Header/useHeaderStyles.d.ts.map +1 -1
  29. package/dist/components/Hero/Hero.d.ts +2 -2
  30. package/dist/components/Hero/Hero.d.ts.map +1 -1
  31. package/dist/components/Input/Input.d.ts +20 -11
  32. package/dist/components/Input/Input.d.ts.map +1 -1
  33. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +8 -16
  34. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts.map +1 -1
  35. package/dist/components/PageLayout/PageLayout.d.ts +3 -5
  36. package/dist/components/PageLayout/PageLayout.d.ts.map +1 -1
  37. package/dist/components/Radio/Radio.d.ts +14 -8
  38. package/dist/components/Radio/Radio.d.ts.map +1 -1
  39. package/dist/components/ResponsiveNav/ResponsiveNav.d.ts +8 -3
  40. package/dist/components/ResponsiveNav/ResponsiveNav.d.ts.map +1 -1
  41. package/dist/components/ResponsiveSection/ResponsiveSection.d.ts +9 -6
  42. package/dist/components/ResponsiveSection/ResponsiveSection.d.ts.map +1 -1
  43. package/dist/components/Select/Select.d.ts +20 -10
  44. package/dist/components/Select/Select.d.ts.map +1 -1
  45. package/dist/components/Stack/Stack.d.ts +3 -5
  46. package/dist/components/Stack/Stack.d.ts.map +1 -1
  47. package/dist/components/StyleLoader/StyleLoader.d.ts.map +1 -1
  48. package/dist/components/Textarea/Textarea.d.ts +20 -11
  49. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  50. package/dist/digital-rabbit-cl.es.js +1642 -1533
  51. package/dist/digital-rabbit-cl.umd.js +4 -4
  52. package/dist/index.d.ts +2 -1
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/test-utils.d.ts.map +1 -1
  55. package/dist/theme/ThemeContext.d.ts +29 -8
  56. package/dist/theme/ThemeContext.d.ts.map +1 -1
  57. package/dist/theme/index.d.ts +1 -1
  58. package/dist/theme/index.d.ts.map +1 -1
  59. package/dist/utils/componentProps.d.ts +247 -0
  60. package/dist/utils/componentProps.d.ts.map +1 -0
  61. package/package.json +3 -1
@@ -1,37 +1,37 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{border-width:var(--border-width, .15em);border-radius:var(--border-radius, 0px);border-style:solid;cursor:pointer;font-weight:700;line-height:1.25;outline:none}.Button-module__button___2ZuB7:disabled{cursor:default}.Button-module__sizeSmall___DRT8P{padding:var(--button-padding-small)}.Button-module__sizeDefault___iwWOV{padding:var(--button-padding-default)}.Checkbox-module__container___aV9qz{display:flex;align-items:center;line-height:1.2}.Checkbox-module__svg___kkluC{flex-shrink:0}.Checkbox-module__label___cwRtI{font-weight:700;margin-left:.25em;-webkit-user-select:none;user-select:none}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:var(--form-label-padding-bottom)}.FormLabel-module__label___0M-fo.FormLabel-module__disabled___ktIFp{opacity:.5;cursor:not-allowed}.FormLabel-module__label___0M-fo:not(.FormLabel-module__disabled___ktIFp){cursor:default}:root{--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size: 16px;--line-height: 1.5;--font-weight-header: 700;--primary-color: #000;--background-color: #fff;--accent-color: #0066cc;--font-size-h1: 2.5rem;--font-size-h2: 1.75rem;--font-size-h3: 1.38316rem;--font-size-h4: 1rem;--font-size-h5: .85028rem;--font-size-h6: .78405rem;--breakpoint-xs: 350px;--breakpoint-sm: 475px;--breakpoint-md: 769px;--breakpoint-lg: 1025px;--layout-max-width: 1280px;--layout-wrapper-padding-sm: .5rem;--layout-wrapper-padding: 1rem}html{line-height:var(--line-height);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:var(--font-size);font-family:var(--font-family);box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--line-height);color:var(--primary-color);background-color:var(--background-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:var(--font-weight-header)}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}hr{box-sizing:content-box;height:0;overflow:visible;border:0;border-top:1px solid rgba(0,0,0,.1);margin:1em 0}pre{font-family:monospace,monospace;font-size:1em;overflow:auto}a{background-color:transparent;text-decoration:none}a:link{color:var(--accent-color)}a:hover{text-decoration:underline}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none;max-width:100%;height:auto;vertical-align:middle}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--line-height);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto;resize:vertical}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item;cursor:pointer}template,[hidden]{display:none}table{border-collapse:collapse;width:100%}ul,ol{padding-left:1.5em}p{margin-top:0;margin-bottom:1em}.FormError-module__formError___kaUBn{font-size:.875em;margin-top:var(--form-error-margin-top);font-weight:400}.FormGroup-module__formGroup___aVI-B{display:flex;flex-direction:column;margin-bottom:var(--form-group-margin-bottom)}.FormGroup-module__inputWrapper___429QE{display:flex;flex-direction:column;gap:.5em}.FormGroup-module__indented___t61iz{padding-left:.5em}.FormGroup-module__formGroup___aVI-B.FormGroup-module__disabled___W-tJ0{opacity:.6;pointer-events:none}.FormGroup-module__required___mO3xA{color:inherit;margin-left:.125em}.FormGroup-module__errorMessage___SHzl3{font-size:.875em;margin-top:.25rem;font-weight:400}.Input-module__input___WjT81{background-color:transparent;border-width:var(--border-width, .15em);border-radius:var(--border-radius, 0px);border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Input-module__input___WjT81::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Input-module__input___WjT81:disabled{opacity:.3}.Input-module__sizeSmall___NFvsi{padding:var(--input-padding-small)}.Input-module__sizeDefault___AxPA0{padding:var(--input-padding-default)}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-width:var(--border-width, .15em);border-radius:var(--border-radius, 0px);border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Textarea-module__textarea___Z-y6g::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:var(--textarea-padding-small)}.Textarea-module__sizeDefault___LL2Uc{padding:var(--textarea-padding-default)}.Select-module__select___cjdcr{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:auto 85%;border-width:var(--border-width, .15em);border-style:solid;border-radius:var(--border-radius, 0px);box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Select-module__select___cjdcr:disabled{cursor:default;opacity:.3}.Select-module__select___cjdcr:not(:disabled){cursor:pointer}.Select-module__sizeSmall___i1quj{padding:var(--select-padding-small)}.Select-module__sizeDefault___EiWvW{padding:var(--select-padding-default)}.Radio-module__container___AQxhk{display:flex;align-items:center;line-height:1.25}.Radio-module__svg___zl5kF{flex-shrink:0}.Radio-module__label___vAFIP{font-weight:700;margin-left:.25em;-webkit-user-select:none;user-select:none}.Hamburger-module__hamburger___Tf4-t{background:transparent;border:none;cursor:pointer;display:none;flex-direction:column;justify-content:space-around;height:2em;outline:none;padding:0;position:fixed;right:1em;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:.25em;position:relative;transform-origin:1px;transition:all .3s linear;width:2em}.Hamburger-module__line___gybZM:first-child{transform:rotate(0)}.Hamburger-module__line___gybZM:nth-child(2){opacity:1;transform:translate(0)}.Hamburger-module__line___gybZM:nth-child(3){transform:rotate(0)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:first-child{transform:rotate(45deg)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(2){opacity:0;transform:translate(20px)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(3){transform:rotate(-45deg)}.Header-module__header___RUooH{width:100%}.Header-module__container___t68M9{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--header-font-size);max-width:var(--header-max-width);padding:var(--header-padding)}.ResponsiveNav-module__nav___xOfv5{display:flex}.ResponsiveNav-module__nav___xOfv5>*,.ResponsiveNav-module__nav___xOfv5>a{color:inherit;font-weight:700;text-decoration:none}.ResponsiveNav-module__navMobile___h795P{background:var(--mobile-nav-background, #0066cc);color:var(--mobile-nav-color, #000);flex-direction:column;font-size:2rem;height:100vh;padding-top:var(--nav-padding-top);position:fixed;top:0;right:0;text-align:left;text-transform:uppercase;transition:transform .3s ease-in-out;width:100%;z-index:10;transform:translate(100%)}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__open___WDCAf{transform:translate(0)}.ResponsiveNav-module__navMobile___h795P>a{padding:var(--nav-link-padding);text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P>a.active,.ResponsiveNav-module__navMobile___h795P>a:hover{background:var(--mobile-nav-active-background, #000);color:var(--mobile-nav-active-color, #0066cc)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:var(--nav-button-margin)}.ResponsiveNav-module__navMobile___h795P>button:hover{color:var(--mobile-nav-button-hover-text-color, #4381c1)!important}.ResponsiveNav-module__navDesktop___9wscZ{align-items:center;flex-direction:row;height:auto}.ResponsiveNav-module__navDesktop___9wscZ>*{margin-left:1.25rem}.ResponsiveNav-module__navDesktop___9wscZ>a.active,.ResponsiveNav-module__navDesktop___9wscZ>a:hover{opacity:.5}.Stack-module__stack___yUU-B{display:flex;gap:.5em}.Stack-module__vertical___sKTyQ{flex-direction:column;margin-bottom:.5em}.Stack-module__horizontal___YsvtV{flex-direction:row;align-items:center}.ResponsiveSection-module__section___gBESK{width:100%;padding:0}.ResponsiveSection-module__innerDiv___r1bky{max-width:var(--max-width);margin:0 auto;padding:var(--section-padding)}.Hero-module__hero___IB2tg{padding:var(--hero-padding, 3rem 0)}.Hero-module__content___rkkfQ h1{font-size:var(--hero-h1-font-size, 2rem);margin-bottom:var(--hero-h1-margin-bottom)}.Hero-module__content___rkkfQ p{font-size:var(--hero-p-font-size, 1.125rem);line-height:1.6}.Footer-module__footer___A76NF{width:100%;margin-top:auto}.Footer-module__container___QneNs{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--footer-font-size);max-width:var(--footer-max-width);padding:var(--footer-padding)}.FeatureCard-module__card___XQt66{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--feature-card-padding)}.FeatureCard-module__icon___dXJ92{font-size:var(--feature-icon-font-size, 2.5rem);margin-bottom:var(--feature-icon-margin-bottom);color:var(--feature-icon-color, #0066cc)}.FeatureCard-module__title___KxXyA{font-size:var(--feature-title-font-size, 1.25rem);font-weight:600;margin-bottom:var(--feature-title-margin-bottom);color:var(--feature-title-color, inherit)}.FeatureCard-module__content___68xkw{font-size:1rem;line-height:1.6;color:var(--feature-content-color, #666)}.FeatureGridSection-module__section___wZrbC{padding:var(--section-padding-vertical) 0}.FeatureGridSection-module__grid___iwPJv{display:grid;gap:2rem;grid-template-columns:var(--grid-template-columns, 1fr)}.PageLayout-module__layoutContainer___diLdT{display:flex;flex-direction:column;min-height:100vh}.PageLayout-module__content___h2mBr{flex:1 0 auto;display:flex;flex-direction:column}.PageLayout-module__header___ChdTF{flex-shrink:0}.PageLayout-module__main___Sw7Pv{flex:1}.PageLayout-module__mainPadded___ZKio3{padding:var(--main-padding-vertical) 0}.PageLayout-module__footer___DUw6m{flex-shrink:0}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { jsx as w, jsxs as Q, Fragment as Je } from "react/jsx-runtime";
3
- import V, { createContext as Fr, useContext as xr, useState as Xe, useEffect as Ye, useMemo as be, useSyncExternalStore as kr, useRef as vt } from "react";
4
- const Vr = "Button-module__button___2ZuB7", Cr = "Button-module__sizeSmall___DRT8P", Er = "Button-module__sizeDefault___iwWOV", ke = {
5
- button: Vr,
6
- sizeSmall: Cr,
7
- sizeDefault: Er
8
- }, zr = ({
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.Button-module__button___2ZuB7{border-style:solid;cursor:pointer;font-weight:700;line-height:1.25;outline:none}.Button-module__button___2ZuB7:disabled{cursor:default}.Button-module__sizeSmall___DRT8P{padding:var(--button-padding-small)}.Button-module__sizeLarge___yeZSH{padding:var(--button-padding-large)}.Checkbox-module__container___aV9qz{display:flex;align-items:center;line-height:1.2}.Checkbox-module__svg___kkluC{flex-shrink:0}.Checkbox-module__label___cwRtI{font-weight:700;margin-left:.25em;-webkit-user-select:none;user-select:none}.FormLabel-module__label___0M-fo{display:inline-block;font-weight:700;padding-bottom:var(--form-label-padding-bottom)}.FormLabel-module__label___0M-fo.FormLabel-module__disabled___ktIFp{opacity:.5;cursor:not-allowed}.FormLabel-module__label___0M-fo:not(.FormLabel-module__disabled___ktIFp){cursor:default}:root{--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-size: 16px;--line-height: 1.5;--font-weight-header: 700;--primary-color: #000;--background-color: #fff;--accent-color: #0066cc;--font-size-h1: 2.5rem;--font-size-h2: 1.75rem;--font-size-h3: 1.38316rem;--font-size-h4: 1rem;--font-size-h5: .85028rem;--font-size-h6: .78405rem;--breakpoint-xs: 350px;--breakpoint-sm: 475px;--breakpoint-md: 769px;--breakpoint-lg: 1025px;--layout-max-width: 1280px;--layout-wrapper-padding-sm: .5rem;--layout-wrapper-padding: 1rem}html{line-height:var(--line-height);-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;font-size:var(--font-size);font-family:var(--font-family);box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}body{margin:0;font-family:var(--font-family);font-size:var(--font-size);line-height:var(--line-height);color:var(--primary-color);background-color:var(--background-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:var(--font-weight-header)}h1{font-size:var(--font-size-h1)}h2{font-size:var(--font-size-h2)}h3{font-size:var(--font-size-h3)}h4{font-size:var(--font-size-h4)}h5{font-size:var(--font-size-h5)}h6{font-size:var(--font-size-h6)}hr{box-sizing:content-box;height:0;overflow:visible;border:0;border-top:1px solid rgba(0,0,0,.1);margin:1em 0}pre{font-family:monospace,monospace;font-size:1em;overflow:auto}a{background-color:transparent;text-decoration:none}a:link{color:var(--accent-color)}a:hover{text-decoration:underline}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none;max-width:100%;height:auto;vertical-align:middle}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:var(--line-height);margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;cursor:pointer}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto;resize:vertical}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item;cursor:pointer}template,[hidden]{display:none}table{border-collapse:collapse;width:100%}ul,ol{padding-left:1.5em}p{margin-top:0;margin-bottom:1em}.FormError-module__formError___kaUBn{font-size:.875em;margin-top:var(--form-error-margin-top);font-weight:400}.FormGroup-module__formGroup___aVI-B{display:flex;flex-direction:column;margin-bottom:var(--form-group-margin-bottom)}.FormGroup-module__inputWrapper___429QE{display:flex;flex-direction:column;gap:.5em}.FormGroup-module__indented___t61iz{padding-left:.5em}.FormGroup-module__formGroup___aVI-B.FormGroup-module__disabled___W-tJ0{opacity:.6;pointer-events:none}.FormGroup-module__required___mO3xA{color:inherit;margin-left:.125em}.FormGroup-module__errorMessage___SHzl3{font-size:.875em;margin-top:.25rem;font-weight:400}.Input-module__input___WjT81{background-color:transparent;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Input-module__input___WjT81::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Input-module__input___WjT81:disabled{opacity:.3}.Input-module__sizeSmall___NFvsi{padding:var(--input-padding-small)}.Input-module__sizeLarge___4Boj3{padding:var(--input-padding-large)}.Textarea-module__textarea___Z-y6g{background-color:transparent;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Textarea-module__textarea___Z-y6g::placeholder{color:inherit;opacity:var(--placeholder-opacity, .3)}.Textarea-module__textarea___Z-y6g:disabled{opacity:.3}.Textarea-module__sizeSmall___HHFEM{padding:var(--textarea-padding-small)}.Textarea-module__sizeLarge___5a3sf{padding:var(--textarea-padding-large)}.Select-module__select___cjdcr{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;background-position:right center;background-repeat:no-repeat;background-size:auto 85%;border-style:solid;box-sizing:border-box;display:block;font-weight:700;line-height:1.25;outline:none;width:100%}.Select-module__select___cjdcr:disabled{cursor:default;opacity:.3}.Select-module__select___cjdcr:not(:disabled){cursor:pointer}.Select-module__sizeSmall___i1quj{padding:var(--select-padding-small)}.Select-module__sizeLarge___eBA1T{padding:var(--select-padding-large)}.Radio-module__container___AQxhk{display:flex;align-items:center;line-height:1.25}.Radio-module__svg___zl5kF{flex-shrink:0}.Radio-module__label___vAFIP{font-weight:700;margin-left:.25em;-webkit-user-select:none;user-select:none}.Hamburger-module__hamburger___Tf4-t{background:transparent;border:none;cursor:pointer;display:none;flex-direction:column;justify-content:space-around;height:2em;outline:none;padding:0;position:fixed;right:1em;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:.25em;position:relative;transform-origin:1px;transition:all .3s linear;width:2em}.Hamburger-module__line___gybZM:first-child{transform:rotate(0)}.Hamburger-module__line___gybZM:nth-child(2){opacity:1;transform:translate(0)}.Hamburger-module__line___gybZM:nth-child(3){transform:rotate(0)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:first-child{transform:rotate(45deg)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(2){opacity:0;transform:translate(20px)}.Hamburger-module__hamburger___Tf4-t.Hamburger-module__open___gRswh .Hamburger-module__line___gybZM:nth-child(3){transform:rotate(-45deg)}.Header-module__header___RUooH{width:100%}.Header-module__container___t68M9{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--header-font-size);max-width:var(--header-max-width);padding:var(--header-padding)}.ResponsiveNav-module__nav___xOfv5{display:flex}.ResponsiveNav-module__nav___xOfv5>*,.ResponsiveNav-module__nav___xOfv5>a{color:inherit;font-weight:700;text-decoration:none}.ResponsiveNav-module__navMobile___h795P{background:var(--mobile-nav-background, #0066cc);color:var(--mobile-nav-color, #000);flex-direction:column;font-size:2rem;height:100vh;padding-top:var(--nav-padding-top);position:fixed;top:0;right:0;text-align:left;text-transform:uppercase;transition:transform .3s ease-in-out;width:100%;z-index:10;transform:translate(100%)}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__open___WDCAf{transform:translate(0)}.ResponsiveNav-module__navMobile___h795P>a{padding:var(--nav-link-padding);text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P>a.active,.ResponsiveNav-module__navMobile___h795P>a:hover{background:var(--mobile-nav-active-background, #000);color:var(--mobile-nav-active-color, #0066cc)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:var(--nav-button-margin)}.ResponsiveNav-module__navMobile___h795P>button:hover{color:var(--mobile-nav-button-hover-text-color, #4381c1)!important}.ResponsiveNav-module__navDesktop___9wscZ{align-items:center;flex-direction:row;height:auto}.ResponsiveNav-module__navDesktop___9wscZ>*{margin-left:1.25rem}.ResponsiveNav-module__navDesktop___9wscZ>a.active,.ResponsiveNav-module__navDesktop___9wscZ>a:hover{opacity:.5}.Stack-module__stack___yUU-B{display:flex;gap:.5em}.Stack-module__vertical___sKTyQ{flex-direction:column;margin-bottom:.5em}.Stack-module__horizontal___YsvtV{flex-direction:row;align-items:center}.ResponsiveSection-module__section___gBESK{width:100%;padding:0}.ResponsiveSection-module__innerDiv___r1bky{max-width:var(--max-width);margin:0 auto;padding:var(--section-padding)}.Hero-module__hero___IB2tg{padding:var(--hero-padding, 3rem 0)}.Hero-module__content___rkkfQ h1{font-size:var(--hero-h1-font-size, 2rem);margin-bottom:var(--hero-h1-margin-bottom)}.Hero-module__content___rkkfQ p{font-size:var(--hero-p-font-size, 1.125rem);line-height:1.6}.Footer-module__footer___A76NF{width:100%;margin-top:auto}.Footer-module__container___QneNs{display:flex;align-items:center;justify-content:space-between;margin:0 auto;font-size:var(--footer-font-size);max-width:var(--footer-max-width);padding:var(--footer-padding)}.FeatureCard-module__card___XQt66{display:flex;flex-direction:column;align-items:center;text-align:center;padding:var(--feature-card-padding)}.FeatureCard-module__icon___dXJ92{font-size:var(--feature-icon-font-size, 2.5rem);margin-bottom:var(--feature-icon-margin-bottom);color:var(--feature-icon-color, #0066cc)}.FeatureCard-module__title___KxXyA{font-size:var(--feature-title-font-size, 1.25rem);font-weight:600;margin-bottom:var(--feature-title-margin-bottom);color:var(--feature-title-color, inherit)}.FeatureCard-module__content___68xkw{font-size:1rem;line-height:1.6;color:var(--feature-content-color, #666)}.FeatureGridSection-module__section___wZrbC{padding:var(--section-padding-vertical) 0}.FeatureGridSection-module__grid___iwPJv{display:grid;gap:2rem;grid-template-columns:var(--grid-template-columns, 1fr)}.PageLayout-module__layoutContainer___diLdT{display:flex;flex-direction:column;min-height:100vh}.PageLayout-module__content___h2mBr{flex:1 0 auto;display:flex;flex-direction:column}.PageLayout-module__header___ChdTF{flex-shrink:0}.PageLayout-module__main___Sw7Pv{flex:1}.PageLayout-module__footer___DUw6m{flex-shrink:0}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { jsx as V, jsxs as Q, Fragment as Ye } from "react/jsx-runtime";
3
+ import $, { createContext as wr, useContext as kr, useState as et, useLayoutEffect as Cr, useMemo as be, useSyncExternalStore as zr, useRef as bt, useEffect as Wt } from "react";
4
+ const $r = "Button-module__button___2ZuB7", Er = "Button-module__sizeSmall___DRT8P", Ar = "Button-module__sizeLarge___yeZSH", we = {
5
+ button: $r,
6
+ sizeSmall: Er,
7
+ sizeLarge: Ar
8
+ }, Nr = ({
9
9
  isActive: e,
10
10
  disabled: r,
11
11
  buttonColor: t = "#FFF",
12
12
  textColor: s = "#000",
13
- hoverColor: n,
14
- hoverTextColor: o,
15
- outline: l
13
+ hoverColor: o,
14
+ hoverTextColor: n,
15
+ outline: i
16
16
  }) => {
17
- let a, d, m;
18
- l ? (a = "transparent", d = t, m = t, e && (a = n || t, d = n || t, m = o || s)) : (a = t, d = t, m = s, e && (a = n || t, d = n || t, m = o || s));
17
+ let l, d, f;
18
+ i ? (l = "transparent", d = t, f = t, e && (l = o || t, d = o || t, f = n || s)) : (l = t, d = t, f = s, e && (l = o || t, d = o || t, f = n || s));
19
19
  let y = 1;
20
- return r ? y = 0.3 : e && (y = n || l ? 1 : 0.75), {
21
- backgroundColor: a,
20
+ return r ? y = 0.3 : e && (y = o || i ? 1 : 0.75), {
21
+ backgroundColor: l,
22
22
  borderColor: d,
23
- color: m,
23
+ color: f,
24
24
  opacity: y
25
25
  };
26
- }, bt = {
26
+ }, St = {
27
27
  primary: "#000",
28
28
  secondary: "#FFF",
29
29
  accent: "#4381C1",
30
30
  error: "#F00",
31
31
  success: "#008000",
32
32
  warning: "#FFEB3B"
33
- }, jt = {
34
- colors: bt,
33
+ }, Ze = {
34
+ colors: St,
35
35
  fonts: {
36
36
  color: "#000",
37
37
  lineHeight: 1.5,
@@ -48,8 +48,20 @@ const Vr = "Button-module__button___2ZuB7", Cr = "Button-module__sizeSmall___DRT
48
48
  },
49
49
  buttons: {
50
50
  textColor: "#FFF",
51
+ paddingHorizontal: 0.35,
51
52
  primary: {
52
- textColor: bt.secondary
53
+ textColor: St.secondary
54
+ }
55
+ },
56
+ inputs: {
57
+ paddingHorizontal: 0.27
58
+ },
59
+ sizes: {
60
+ small: {
61
+ paddingVertical: 0.07
62
+ },
63
+ large: {
64
+ paddingVertical: 0.17
53
65
  }
54
66
  },
55
67
  border: {
@@ -64,107 +76,130 @@ const Vr = "Button-module__button___2ZuB7", Cr = "Button-module__sizeSmall___DRT
64
76
  },
65
77
  layout: {
66
78
  maxWidth: "1280px",
67
- wrapperPaddingSm: "0.5rem",
68
- wrapperPadding: "1rem"
79
+ paddingSm: "0.5rem",
80
+ padding: "1rem"
69
81
  }
70
- }, Wt = Fr(jt), Mo = ({ theme: e = jt, children: r }) => /* @__PURE__ */ w(Wt.Provider, { value: e, children: r }), L = () => xr(Wt), To = ({
82
+ }, qt = wr(Ze);
83
+ function Gt(e, r) {
84
+ const t = { ...e };
85
+ return ke(e) && ke(r) && Object.keys(r).forEach((s) => {
86
+ const o = r[s], n = e[s];
87
+ ke(o) && ke(n) ? t[s] = Gt(
88
+ n,
89
+ o
90
+ ) : o !== void 0 && (t[s] = o);
91
+ }), t;
92
+ }
93
+ function ke(e) {
94
+ return e && typeof e == "object" && !Array.isArray(e);
95
+ }
96
+ const jo = ({ theme: e, children: r }) => {
97
+ const t = e ? Gt(Ze, e) : Ze;
98
+ return /* @__PURE__ */ V(qt.Provider, { value: t, children: r });
99
+ }, H = () => kr(qt), Io = ({
100
+ // Color props
71
101
  color: e,
72
- hoverColor: r,
73
- hoverTextColor: t,
74
- textColor: s,
75
- outline: n = !1,
76
- size: o,
102
+ textColor: r,
103
+ hoverColor: t,
104
+ hoverTextColor: s,
105
+ // Semantic props
106
+ disabled: o = !1,
107
+ size: n = "large",
108
+ outline: i = !1,
77
109
  type: l = "button",
78
- buttonProps: a = {},
79
- children: d,
80
- disabled: m = !1,
81
- onClick: y,
82
- fontSize: h
110
+ // Standard React props
111
+ className: d,
112
+ style: f,
113
+ buttonProps: y = {},
114
+ onClick: m,
115
+ children: h
83
116
  }) => {
84
- const f = L(), [b, C] = Xe(!1);
85
- let S;
86
- s ? S = s : S = e ? f.buttons.textColor : f.buttons.primary.textColor;
87
- const R = {
88
- ...zr({
89
- isActive: b,
90
- disabled: m,
91
- buttonColor: e || f.colors.primary,
92
- textColor: S,
93
- hoverColor: r,
94
- hoverTextColor: t,
95
- outline: n
117
+ const x = H(), [F, _] = et(!1);
118
+ let z;
119
+ r ? z = r : z = e ? x.buttons.textColor : x.buttons.primary.textColor;
120
+ const E = e || x.colors.primary, k = {
121
+ ...Nr({
122
+ isActive: F,
123
+ disabled: o,
124
+ buttonColor: E,
125
+ textColor: z,
126
+ hoverColor: t,
127
+ hoverTextColor: s,
128
+ outline: i
96
129
  }),
97
- fontSize: h || f.fonts.size,
98
- "--border-width": f.border.width,
99
- "--border-radius": f.border.radius,
100
- "--button-padding-small": `calc(${f.fonts.rhythm} * 0.07) calc(${f.fonts.rhythm} * 0.35)`,
101
- "--button-padding-default": `calc(${f.fonts.rhythm} * 0.17) calc(${f.fonts.rhythm} * 0.35)`
102
- }, F = [
103
- ke.button,
104
- o === "small" ? ke.sizeSmall : ke.sizeDefault,
105
- n ? ke.outline : ""
130
+ fontSize: x.fonts.size,
131
+ borderWidth: x.border.width,
132
+ borderRadius: x.border.radius,
133
+ "--button-padding-small": `calc(${x.fonts.rhythm} * ${x.sizes.small.paddingVertical}) calc(${x.fonts.rhythm} * ${x.buttons.paddingHorizontal})`,
134
+ "--button-padding-large": `calc(${x.fonts.rhythm} * ${x.sizes.large.paddingVertical}) calc(${x.fonts.rhythm} * ${x.buttons.paddingHorizontal})`
135
+ }, C = [
136
+ we.button,
137
+ n === "small" ? we.sizeSmall : we.sizeLarge,
138
+ i ? we.outline : "",
139
+ d
106
140
  ].filter(Boolean).join(" ");
107
- return /* @__PURE__ */ w(
141
+ return /* @__PURE__ */ V(
108
142
  "button",
109
143
  {
110
- className: F,
111
- disabled: m,
112
- onClick: y,
113
- onMouseEnter: () => C(!0),
114
- onMouseLeave: () => C(!1),
144
+ className: C,
145
+ disabled: o,
146
+ onClick: m,
147
+ onMouseEnter: () => _(!0),
148
+ onMouseLeave: () => _(!1),
115
149
  type: l,
116
- ...a,
150
+ ...y,
117
151
  style: {
118
- ...R,
119
- ...a.style
152
+ ...k,
153
+ ...f,
154
+ ...y.style
120
155
  },
121
- children: d
156
+ children: h
122
157
  }
123
158
  );
124
159
  };
125
- var St = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), $r = new Uint8Array(16);
126
- function Ar() {
127
- if (!St)
160
+ var Ft = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto < "u" && typeof msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto), Rr = new Uint8Array(16);
161
+ function Dr() {
162
+ if (!Ft)
128
163
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
129
- return St($r);
164
+ return Ft(Rr);
130
165
  }
131
- var qt = [];
132
- for (var Ve = 0; Ve < 256; ++Ve)
133
- qt[Ve] = (Ve + 256).toString(16).substr(1);
134
- function Pr(e, r) {
135
- var t = 0, s = qt;
166
+ var Zt = [];
167
+ for (var Ce = 0; Ce < 256; ++Ce)
168
+ Zt[Ce] = (Ce + 256).toString(16).substr(1);
169
+ function Br(e, r) {
170
+ var t = 0, s = Zt;
136
171
  return [s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], "-", s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]], s[e[t++]]].join("");
137
172
  }
138
- function Gt(e, r, t) {
173
+ function Qt(e, r, t) {
139
174
  var s = r && t || 0;
140
175
  typeof e == "string" && (r = e === "binary" ? new Array(16) : null, e = null), e = e || {};
141
- var n = e.random || (e.rng || Ar)();
142
- if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, r)
143
- for (var o = 0; o < 16; ++o)
144
- r[s + o] = n[o];
145
- return r || Pr(n);
176
+ var o = e.random || (e.rng || Dr)();
177
+ if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, r)
178
+ for (var n = 0; n < 16; ++n)
179
+ r[s + n] = o[n];
180
+ return r || Br(o);
146
181
  }
147
- const Dr = "Checkbox-module__container___aV9qz", Nr = "Checkbox-module__svg___kkluC", Rr = "Checkbox-module__label___cwRtI", Te = {
148
- container: Dr,
149
- svg: Nr,
150
- label: Rr
151
- }, Br = ({
182
+ const Lr = "Checkbox-module__container___aV9qz", Or = "Checkbox-module__svg___kkluC", Tr = "Checkbox-module__label___cwRtI", Me = {
183
+ container: Lr,
184
+ svg: Or,
185
+ label: Tr
186
+ }, Hr = ({
152
187
  color: e = "#000",
153
188
  checkmarkColor: r,
154
189
  disabled: t = !1,
155
190
  inverted: s = !1
156
191
  }) => {
157
- let n = e;
158
- return r ? n = r : s && (n = "white"), {
192
+ let o = e;
193
+ return r ? o = r : s && (o = "white"), {
159
194
  boxColor: e,
160
- checkmarkColor: n,
195
+ checkmarkColor: o,
161
196
  cursor: t ? "default" : "pointer",
162
197
  opacity: t ? 0.3 : 1
163
198
  };
164
- }, Or = "FormLabel-module__label___0M-fo", Lr = "FormLabel-module__disabled___ktIFp", wt = {
165
- label: Or,
166
- disabled: Lr
167
- }, Mr = ({
199
+ }, Mr = "FormLabel-module__label___0M-fo", jr = "FormLabel-module__disabled___ktIFp", xt = {
200
+ label: Mr,
201
+ disabled: jr
202
+ }, Ir = ({
168
203
  color: e = "#000",
169
204
  disabled: r = !1,
170
205
  fontSize: t = ".85em"
@@ -173,69 +208,69 @@ const Dr = "Checkbox-module__container___aV9qz", Nr = "Checkbox-module__svg___kk
173
208
  fontSize: t,
174
209
  opacity: r ? 0.5 : 1,
175
210
  cursor: r ? "not-allowed" : "default"
176
- }), et = ({
211
+ }), tt = ({
177
212
  children: e,
178
213
  color: r,
179
214
  disabled: t = !1,
180
215
  error: s = !1,
181
- fontSize: n,
182
216
  htmlFor: o,
183
- style: l,
184
- ...a
217
+ className: n,
218
+ style: i,
219
+ labelProps: l
185
220
  }) => {
186
- const d = L(), m = d.colors.error, y = s ? m : r || d.colors.primary, h = Mr({
221
+ const d = H(), f = d.colors.error, y = s ? f : r || d.colors.primary, m = Ir({
187
222
  color: y,
188
223
  disabled: t,
189
- fontSize: n || ".85em"
190
- }), f = {
224
+ fontSize: ".85em"
225
+ }), h = {
191
226
  "--form-label-padding-bottom": `calc(${d.fonts.rhythm} * 0.17)`,
192
- color: h.color,
193
- fontSize: h.fontSize,
194
- opacity: h.opacity,
195
- cursor: h.cursor,
196
- ...l
197
- }, b = [wt.label, t ? wt.disabled : ""].filter(Boolean).join(" ");
198
- return /* @__PURE__ */ w("label", { className: b, htmlFor: o, style: f, ...a, children: e });
199
- }, Tr = ({
227
+ color: m.color,
228
+ fontSize: m.fontSize,
229
+ opacity: m.opacity,
230
+ cursor: m.cursor,
231
+ ...i,
232
+ ...l == null ? void 0 : l.style
233
+ }, x = [xt.label, t ? xt.disabled : "", n].filter(Boolean).join(" ");
234
+ return /* @__PURE__ */ V("label", { className: x, htmlFor: o, style: h, ...l, children: e });
235
+ }, Ur = ({
200
236
  checked: e = !1,
201
237
  checkmarkColor: r,
202
238
  color: t,
203
239
  disabled: s = !1,
204
- error: n = !1,
205
- fontSize: o,
206
- id: l,
207
- inverted: a = !1,
208
- label: d,
209
- labelStyle: m,
210
- name: y,
211
- onChange: h,
212
- style: f,
213
- ...b
240
+ error: o = !1,
241
+ id: n,
242
+ inverted: i = !1,
243
+ label: l,
244
+ labelStyle: d,
245
+ name: f,
246
+ onChange: y,
247
+ className: m,
248
+ style: h
214
249
  }) => {
215
- const C = L(), S = l || Gt(), k = C.colors.error, R = n ? k : t || C.colors.primary, F = Br({
216
- color: R,
250
+ const x = H(), F = n || Qt(), _ = x.colors.error, z = o ? _ : t || x.colors.primary, E = Hr({
251
+ color: z,
217
252
  checkmarkColor: r,
218
253
  disabled: s,
219
- inverted: a
220
- }), $ = (O) => {
221
- s || h(O);
222
- }, z = {
223
- cursor: F.cursor,
224
- fontSize: o || C.fonts.size,
225
- opacity: F.opacity,
226
- ...f
227
- }, E = {
228
- width: o || "1rem"
229
- };
230
- return /* @__PURE__ */ Q("div", { className: Te.container, style: z, ...b, children: [
231
- /* @__PURE__ */ w(
254
+ inverted: i
255
+ }), b = (L) => {
256
+ s || y(L);
257
+ }, k = {
258
+ cursor: E.cursor,
259
+ fontSize: x.fonts.size,
260
+ opacity: E.opacity,
261
+ ...h
262
+ }, C = {
263
+ width: "1rem"
264
+ }, A = [Me.container, m].filter(Boolean).join(" ");
265
+ return /* @__PURE__ */ Q("div", { className: A, style: k, children: [
266
+ /* @__PURE__ */ V(
232
267
  "input",
233
268
  {
234
- id: S,
269
+ id: F,
235
270
  checked: e,
236
271
  disabled: s,
237
- onChange: (O) => $({ target: { checked: O.target.checked, name: y, type: "checkbox" } }),
238
- name: y,
272
+ onChange: (L) => b({ target: { checked: L.target.checked, name: f, type: "checkbox" } }),
273
+ name: f,
239
274
  style: { display: "none" },
240
275
  type: "checkbox"
241
276
  }
@@ -245,11 +280,11 @@ const Dr = "Checkbox-module__container___aV9qz", Nr = "Checkbox-module__svg___kk
245
280
  {
246
281
  xmlns: "http://www.w3.org/2000/svg",
247
282
  viewBox: "0 0 100 100",
248
- onClick: () => $({ target: { checked: !e, name: y, type: "checkbox" } }),
249
- style: E,
250
- className: Te.svg,
283
+ onClick: () => b({ target: { checked: !e, name: f, type: "checkbox" } }),
284
+ style: C,
285
+ className: Me.svg,
251
286
  children: [
252
- /* @__PURE__ */ w(
287
+ /* @__PURE__ */ V(
253
288
  "rect",
254
289
  {
255
290
  x: "0",
@@ -257,17 +292,17 @@ const Dr = "Checkbox-module__container___aV9qz", Nr = "Checkbox-module__svg___kk
257
292
  height: "100",
258
293
  width: "100",
259
294
  style: {
260
- fill: a && e ? F.boxColor : "transparent",
295
+ fill: i && e ? E.boxColor : "transparent",
261
296
  strokeWidth: "25",
262
- stroke: F.boxColor
297
+ stroke: E.boxColor
263
298
  }
264
299
  }
265
300
  ),
266
- e && /* @__PURE__ */ w(
301
+ e && /* @__PURE__ */ V(
267
302
  "path",
268
303
  {
269
304
  d: "M 25 45 L 45 65 L 75 30",
270
- stroke: F.checkmarkColor,
305
+ stroke: E.checkmarkColor,
271
306
  strokeWidth: "15",
272
307
  fill: "transparent"
273
308
  }
@@ -275,67 +310,65 @@ const Dr = "Checkbox-module__container___aV9qz", Nr = "Checkbox-module__svg___kk
275
310
  ]
276
311
  }
277
312
  ),
278
- d && /* @__PURE__ */ w(
279
- et,
313
+ l && /* @__PURE__ */ V(
314
+ tt,
280
315
  {
281
- htmlFor: S,
282
- className: Te.label,
283
- style: m,
284
- color: F.boxColor,
316
+ htmlFor: F,
317
+ className: Me.label,
318
+ style: { paddingBottom: 0, ...d },
319
+ color: E.boxColor,
285
320
  disabled: s,
286
- error: n,
287
- fontSize: o,
288
- children: d
321
+ error: o,
322
+ children: l
289
323
  }
290
324
  )
291
325
  ] });
292
- }, Io = () => {
293
- const e = L();
294
- return Ye(() => {
295
- if (typeof document > "u") return;
326
+ }, Uo = () => {
327
+ const e = H();
328
+ return Cr(() => {
296
329
  const r = document.documentElement;
297
- e.fonts && (e.fonts.fontFamily && r.style.setProperty("--font-family", e.fonts.fontFamily), e.fonts.size && r.style.setProperty("--font-size", e.fonts.size), e.fonts.lineHeight !== void 0 && r.style.setProperty("--line-height", e.fonts.lineHeight.toString()), e.fonts.fontWeightHeader !== void 0 && r.style.setProperty("--font-weight-header", e.fonts.fontWeightHeader.toString()), e.fonts.fontSizeH1 && r.style.setProperty("--font-size-h1", e.fonts.fontSizeH1), e.fonts.fontSizeH2 && r.style.setProperty("--font-size-h2", e.fonts.fontSizeH2), e.fonts.fontSizeH3 && r.style.setProperty("--font-size-h3", e.fonts.fontSizeH3), e.fonts.fontSizeH4 && r.style.setProperty("--font-size-h4", e.fonts.fontSizeH4), e.fonts.fontSizeH5 && r.style.setProperty("--font-size-h5", e.fonts.fontSizeH5), e.fonts.fontSizeH6 && r.style.setProperty("--font-size-h6", e.fonts.fontSizeH6)), e.colors && (e.colors.primary && r.style.setProperty("--primary-color", e.colors.primary), e.colors.secondary && r.style.setProperty("--background-color", e.colors.secondary), e.colors.accent && r.style.setProperty("--accent-color", e.colors.accent)), e.breakpoints && (e.breakpoints.xs && r.style.setProperty("--breakpoint-xs", e.breakpoints.xs), e.breakpoints.sm && r.style.setProperty("--breakpoint-sm", e.breakpoints.sm), e.breakpoints.md && r.style.setProperty("--breakpoint-md", e.breakpoints.md), e.breakpoints.lg && r.style.setProperty("--breakpoint-lg", e.breakpoints.lg)), e.layout && (e.layout.maxWidth && r.style.setProperty("--layout-max-width", e.layout.maxWidth), e.layout.wrapperPaddingSm && r.style.setProperty("--layout-wrapper-padding-sm", e.layout.wrapperPaddingSm), e.layout.wrapperPadding && r.style.setProperty("--layout-wrapper-padding", e.layout.wrapperPadding));
330
+ e.fonts && (e.fonts.fontFamily && r.style.setProperty("--font-family", e.fonts.fontFamily), e.fonts.size && r.style.setProperty("--font-size", e.fonts.size), e.fonts.lineHeight !== void 0 && r.style.setProperty("--line-height", e.fonts.lineHeight.toString()), e.fonts.fontWeightHeader !== void 0 && r.style.setProperty("--font-weight-header", e.fonts.fontWeightHeader.toString()), e.fonts.fontSizeH1 && r.style.setProperty("--font-size-h1", e.fonts.fontSizeH1), e.fonts.fontSizeH2 && r.style.setProperty("--font-size-h2", e.fonts.fontSizeH2), e.fonts.fontSizeH3 && r.style.setProperty("--font-size-h3", e.fonts.fontSizeH3), e.fonts.fontSizeH4 && r.style.setProperty("--font-size-h4", e.fonts.fontSizeH4), e.fonts.fontSizeH5 && r.style.setProperty("--font-size-h5", e.fonts.fontSizeH5), e.fonts.fontSizeH6 && r.style.setProperty("--font-size-h6", e.fonts.fontSizeH6)), e.colors && (e.colors.primary && r.style.setProperty("--primary-color", e.colors.primary), e.colors.secondary && r.style.setProperty("--background-color", e.colors.secondary), e.colors.accent && r.style.setProperty("--accent-color", e.colors.accent)), e.breakpoints && (e.breakpoints.xs && r.style.setProperty("--breakpoint-xs", e.breakpoints.xs), e.breakpoints.sm && r.style.setProperty("--breakpoint-sm", e.breakpoints.sm), e.breakpoints.md && r.style.setProperty("--breakpoint-md", e.breakpoints.md), e.breakpoints.lg && r.style.setProperty("--breakpoint-lg", e.breakpoints.lg)), e.layout && (e.layout.maxWidth && r.style.setProperty("--layout-max-width", e.layout.maxWidth), e.layout.paddingSm && r.style.setProperty("--layout-wrapper-padding-sm", e.layout.paddingSm), e.layout.padding && r.style.setProperty("--layout-wrapper-padding", e.layout.padding));
298
331
  }, [e]), null;
299
332
  };
300
333
  var Se = (e) => e.type === "checkbox", ue = (e) => e instanceof Date, Z = (e) => e == null;
301
- const Zt = (e) => typeof e == "object";
302
- var H = (e) => !Z(e) && !Array.isArray(e) && Zt(e) && !ue(e), Qt = (e) => H(e) && e.target ? Se(e.target) ? e.target.checked : e.target.value : e, Ir = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Kt = (e, r) => e.has(Ir(r)), Hr = (e) => {
334
+ const Kt = (e) => typeof e == "object";
335
+ var I = (e) => !Z(e) && !Array.isArray(e) && Kt(e) && !ue(e), Jt = (e) => I(e) && e.target ? Se(e.target) ? e.target.checked : e.target.value : e, Pr = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Xt = (e, r) => e.has(Pr(r)), Wr = (e) => {
303
336
  const r = e.constructor && e.constructor.prototype;
304
- return H(r) && r.hasOwnProperty("isPrototypeOf");
305
- }, tt = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
337
+ return I(r) && r.hasOwnProperty("isPrototypeOf");
338
+ }, rt = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
306
339
  function U(e) {
307
340
  let r;
308
341
  const t = Array.isArray(e), s = typeof FileList < "u" ? e instanceof FileList : !1;
309
342
  if (e instanceof Date)
310
343
  r = new Date(e);
311
- else if (!(tt && (e instanceof Blob || s)) && (t || H(e)))
312
- if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !Hr(e))
344
+ else if (!(rt && (e instanceof Blob || s)) && (t || I(e)))
345
+ if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !Wr(e))
313
346
  r = e;
314
347
  else
315
- for (const n in e)
316
- e.hasOwnProperty(n) && (r[n] = U(e[n]));
348
+ for (const o in e)
349
+ e.hasOwnProperty(o) && (r[o] = U(e[o]));
317
350
  else
318
351
  return e;
319
352
  return r;
320
353
  }
321
- var Ne = (e) => /^\w*$/.test(e), M = (e) => e === void 0, rt = (e) => Array.isArray(e) ? e.filter(Boolean) : [], st = (e) => rt(e.replace(/["|']|\]/g, "").split(/\.|\[/)), p = (e, r, t) => {
322
- if (!r || !H(e))
354
+ var De = (e) => /^\w*$/.test(e), T = (e) => e === void 0, st = (e) => Array.isArray(e) ? e.filter(Boolean) : [], ot = (e) => st(e.replace(/["|']|\]/g, "").split(/\.|\[/)), v = (e, r, t) => {
355
+ if (!r || !I(e))
323
356
  return t;
324
- const s = (Ne(r) ? [r] : st(r)).reduce((n, o) => Z(n) ? n : n[o], e);
325
- return M(s) || s === e ? M(e[r]) ? t : e[r] : s;
357
+ const s = (De(r) ? [r] : ot(r)).reduce((o, n) => Z(o) ? o : o[n], e);
358
+ return T(s) || s === e ? T(e[r]) ? t : e[r] : s;
326
359
  }, K = (e) => typeof e == "boolean", D = (e, r, t) => {
327
360
  let s = -1;
328
- const n = Ne(r) ? [r] : st(r), o = n.length, l = o - 1;
329
- for (; ++s < o; ) {
330
- const a = n[s];
361
+ const o = De(r) ? [r] : ot(r), n = o.length, i = n - 1;
362
+ for (; ++s < n; ) {
363
+ const l = o[s];
331
364
  let d = t;
332
- if (s !== l) {
333
- const m = e[a];
334
- d = H(m) || Array.isArray(m) ? m : isNaN(+n[s + 1]) ? {} : [];
365
+ if (s !== i) {
366
+ const f = e[l];
367
+ d = I(f) || Array.isArray(f) ? f : isNaN(+o[s + 1]) ? {} : [];
335
368
  }
336
- if (a === "__proto__" || a === "constructor" || a === "prototype")
369
+ if (l === "__proto__" || l === "constructor" || l === "prototype")
337
370
  return;
338
- e[a] = d, e = e[a];
371
+ e[l] = d, e = e[l];
339
372
  }
340
373
  };
341
374
  const Ae = {
@@ -348,7 +381,7 @@ const Ae = {
348
381
  onSubmit: "onSubmit",
349
382
  onTouched: "onTouched",
350
383
  all: "all"
351
- }, le = {
384
+ }, ae = {
352
385
  max: "max",
353
386
  min: "min",
354
387
  maxLength: "maxLength",
@@ -356,25 +389,25 @@ const Ae = {
356
389
  pattern: "pattern",
357
390
  required: "required",
358
391
  validate: "validate"
359
- }, Jt = V.createContext(null);
360
- Jt.displayName = "HookFormContext";
361
- const ot = () => V.useContext(Jt);
362
- var Xt = (e, r, t, s = !0) => {
363
- const n = {
392
+ }, Yt = $.createContext(null);
393
+ Yt.displayName = "HookFormContext";
394
+ const nt = () => $.useContext(Yt);
395
+ var er = (e, r, t, s = !0) => {
396
+ const o = {
364
397
  defaultValues: r._defaultValues
365
398
  };
366
- for (const o in e)
367
- Object.defineProperty(n, o, {
399
+ for (const n in e)
400
+ Object.defineProperty(o, n, {
368
401
  get: () => {
369
- const l = o;
370
- return r._proxyFormState[l] !== ee.all && (r._proxyFormState[l] = !s || ee.all), t && (t[l] = !0), e[l];
402
+ const i = n;
403
+ return r._proxyFormState[i] !== ee.all && (r._proxyFormState[i] = !s || ee.all), t && (t[i] = !0), e[i];
371
404
  }
372
405
  });
373
- return n;
406
+ return o;
374
407
  };
375
- const nt = typeof window < "u" ? V.useLayoutEffect : V.useEffect;
376
- function Ur(e) {
377
- const r = ot(), { control: t = r.control, disabled: s, name: n, exact: o } = e || {}, [l, a] = V.useState(t._formState), d = V.useRef({
408
+ const it = typeof window < "u" ? $.useLayoutEffect : $.useEffect;
409
+ function qr(e) {
410
+ const r = nt(), { control: t = r.control, disabled: s, name: o, exact: n } = e || {}, [i, l] = $.useState(t._formState), d = $.useRef({
378
411
  isDirty: !1,
379
412
  isLoading: !1,
380
413
  dirtyFields: !1,
@@ -384,193 +417,193 @@ function Ur(e) {
384
417
  isValid: !1,
385
418
  errors: !1
386
419
  });
387
- return nt(() => t._subscribe({
388
- name: n,
420
+ return it(() => t._subscribe({
421
+ name: o,
389
422
  formState: d.current,
390
- exact: o,
391
- callback: (m) => {
392
- !s && a({
423
+ exact: n,
424
+ callback: (f) => {
425
+ !s && l({
393
426
  ...t._formState,
394
- ...m
427
+ ...f
395
428
  });
396
429
  }
397
- }), [n, s, o]), V.useEffect(() => {
430
+ }), [o, s, n]), $.useEffect(() => {
398
431
  d.current.isValid && t._setValid(!0);
399
- }, [t]), V.useMemo(() => Xt(l, t, d.current, !1), [l, t]);
432
+ }, [t]), $.useMemo(() => er(i, t, d.current, !1), [i, t]);
400
433
  }
401
- var J = (e) => typeof e == "string", Ge = (e, r, t, s, n) => J(e) ? (s && r.watch.add(e), p(t, e, n)) : Array.isArray(e) ? e.map((o) => (s && r.watch.add(o), p(t, o))) : (s && (r.watchAll = !0), t), Ze = (e) => Z(e) || !Zt(e);
434
+ var J = (e) => typeof e == "string", Qe = (e, r, t, s, o) => J(e) ? (s && r.watch.add(e), v(t, e, o)) : Array.isArray(e) ? e.map((n) => (s && r.watch.add(n), v(t, n))) : (s && (r.watchAll = !0), t), Ke = (e) => Z(e) || !Kt(e);
402
435
  function te(e, r, t = /* @__PURE__ */ new WeakSet()) {
403
- if (Ze(e) || Ze(r))
436
+ if (Ke(e) || Ke(r))
404
437
  return e === r;
405
438
  if (ue(e) && ue(r))
406
439
  return e.getTime() === r.getTime();
407
- const s = Object.keys(e), n = Object.keys(r);
408
- if (s.length !== n.length)
440
+ const s = Object.keys(e), o = Object.keys(r);
441
+ if (s.length !== o.length)
409
442
  return !1;
410
443
  if (t.has(e) || t.has(r))
411
444
  return !0;
412
445
  t.add(e), t.add(r);
413
- for (const o of s) {
414
- const l = e[o];
415
- if (!n.includes(o))
446
+ for (const n of s) {
447
+ const i = e[n];
448
+ if (!o.includes(n))
416
449
  return !1;
417
- if (o !== "ref") {
418
- const a = r[o];
419
- if (ue(l) && ue(a) || H(l) && H(a) || Array.isArray(l) && Array.isArray(a) ? !te(l, a, t) : l !== a)
450
+ if (n !== "ref") {
451
+ const l = r[n];
452
+ if (ue(i) && ue(l) || I(i) && I(l) || Array.isArray(i) && Array.isArray(l) ? !te(i, l, t) : i !== l)
420
453
  return !1;
421
454
  }
422
455
  }
423
456
  return !0;
424
457
  }
425
- function jr(e) {
426
- const r = ot(), { control: t = r.control, name: s, defaultValue: n, disabled: o, exact: l, compute: a } = e || {}, d = V.useRef(n), m = V.useRef(a), y = V.useRef(void 0), h = V.useRef(t), f = V.useRef(s);
427
- m.current = a;
428
- const [b, C] = V.useState(() => {
429
- const z = t._getWatch(s, d.current);
430
- return m.current ? m.current(z) : z;
431
- }), S = V.useCallback((z) => {
432
- const E = Ge(s, t._names, z || t._formValues, !1, d.current);
433
- return m.current ? m.current(E) : E;
434
- }, [t._formValues, t._names, s]), k = V.useCallback((z) => {
435
- if (!o) {
436
- const E = Ge(s, t._names, z || t._formValues, !1, d.current);
437
- if (m.current) {
438
- const O = m.current(E);
439
- te(O, y.current) || (C(O), y.current = O);
458
+ function Gr(e) {
459
+ const r = nt(), { control: t = r.control, name: s, defaultValue: o, disabled: n, exact: i, compute: l } = e || {}, d = $.useRef(o), f = $.useRef(l), y = $.useRef(void 0), m = $.useRef(t), h = $.useRef(s);
460
+ f.current = l;
461
+ const [x, F] = $.useState(() => {
462
+ const C = t._getWatch(s, d.current);
463
+ return f.current ? f.current(C) : C;
464
+ }), _ = $.useCallback((C) => {
465
+ const A = Qe(s, t._names, C || t._formValues, !1, d.current);
466
+ return f.current ? f.current(A) : A;
467
+ }, [t._formValues, t._names, s]), z = $.useCallback((C) => {
468
+ if (!n) {
469
+ const A = Qe(s, t._names, C || t._formValues, !1, d.current);
470
+ if (f.current) {
471
+ const L = f.current(A);
472
+ te(L, y.current) || (F(L), y.current = L);
440
473
  } else
441
- C(E);
474
+ F(A);
442
475
  }
443
- }, [t._formValues, t._names, o, s]);
444
- nt(() => ((h.current !== t || !te(f.current, s)) && (h.current = t, f.current = s, k()), t._subscribe({
476
+ }, [t._formValues, t._names, n, s]);
477
+ it(() => ((m.current !== t || !te(h.current, s)) && (m.current = t, h.current = s, z()), t._subscribe({
445
478
  name: s,
446
479
  formState: {
447
480
  values: !0
448
481
  },
449
- exact: l,
450
- callback: (z) => {
451
- k(z.values);
482
+ exact: i,
483
+ callback: (C) => {
484
+ z(C.values);
452
485
  }
453
- })), [t, l, s, k]), V.useEffect(() => t._removeUnmounted());
454
- const R = h.current !== t, F = f.current, $ = V.useMemo(() => {
455
- if (o)
486
+ })), [t, i, s, z]), $.useEffect(() => t._removeUnmounted());
487
+ const E = m.current !== t, b = h.current, k = $.useMemo(() => {
488
+ if (n)
456
489
  return null;
457
- const z = !R && !te(F, s);
458
- return R || z ? S() : null;
459
- }, [o, R, s, F, S]);
460
- return $ !== null ? $ : b;
490
+ const C = !E && !te(b, s);
491
+ return E || C ? _() : null;
492
+ }, [n, E, s, b, _]);
493
+ return k !== null ? k : x;
461
494
  }
462
- function Wr(e) {
463
- const r = ot(), { name: t, disabled: s, control: n = r.control, shouldUnregister: o, defaultValue: l } = e, a = Kt(n._names.array, t), d = V.useMemo(() => p(n._formValues, t, p(n._defaultValues, t, l)), [n, t, l]), m = jr({
464
- control: n,
495
+ function Zr(e) {
496
+ const r = nt(), { name: t, disabled: s, control: o = r.control, shouldUnregister: n, defaultValue: i } = e, l = Xt(o._names.array, t), d = $.useMemo(() => v(o._formValues, t, v(o._defaultValues, t, i)), [o, t, i]), f = Gr({
497
+ control: o,
465
498
  name: t,
466
499
  defaultValue: d,
467
500
  exact: !0
468
- }), y = Ur({
469
- control: n,
501
+ }), y = qr({
502
+ control: o,
470
503
  name: t,
471
504
  exact: !0
472
- }), h = V.useRef(e), f = V.useRef(void 0), b = V.useRef(n.register(t, {
505
+ }), m = $.useRef(e), h = $.useRef(void 0), x = $.useRef(o.register(t, {
473
506
  ...e.rules,
474
- value: m,
507
+ value: f,
475
508
  ...K(e.disabled) ? { disabled: e.disabled } : {}
476
509
  }));
477
- h.current = e;
478
- const C = V.useMemo(() => Object.defineProperties({}, {
510
+ m.current = e;
511
+ const F = $.useMemo(() => Object.defineProperties({}, {
479
512
  invalid: {
480
513
  enumerable: !0,
481
- get: () => !!p(y.errors, t)
514
+ get: () => !!v(y.errors, t)
482
515
  },
483
516
  isDirty: {
484
517
  enumerable: !0,
485
- get: () => !!p(y.dirtyFields, t)
518
+ get: () => !!v(y.dirtyFields, t)
486
519
  },
487
520
  isTouched: {
488
521
  enumerable: !0,
489
- get: () => !!p(y.touchedFields, t)
522
+ get: () => !!v(y.touchedFields, t)
490
523
  },
491
524
  isValidating: {
492
525
  enumerable: !0,
493
- get: () => !!p(y.validatingFields, t)
526
+ get: () => !!v(y.validatingFields, t)
494
527
  },
495
528
  error: {
496
529
  enumerable: !0,
497
- get: () => p(y.errors, t)
530
+ get: () => v(y.errors, t)
498
531
  }
499
- }), [y, t]), S = V.useCallback(($) => b.current.onChange({
532
+ }), [y, t]), _ = $.useCallback((k) => x.current.onChange({
500
533
  target: {
501
- value: Qt($),
534
+ value: Jt(k),
502
535
  name: t
503
536
  },
504
537
  type: Ae.CHANGE
505
- }), [t]), k = V.useCallback(() => b.current.onBlur({
538
+ }), [t]), z = $.useCallback(() => x.current.onBlur({
506
539
  target: {
507
- value: p(n._formValues, t),
540
+ value: v(o._formValues, t),
508
541
  name: t
509
542
  },
510
543
  type: Ae.BLUR
511
- }), [t, n._formValues]), R = V.useCallback(($) => {
512
- const z = p(n._fields, t);
513
- z && $ && (z._f.ref = {
514
- focus: () => $.focus && $.focus(),
515
- select: () => $.select && $.select(),
516
- setCustomValidity: (E) => $.setCustomValidity(E),
517
- reportValidity: () => $.reportValidity()
544
+ }), [t, o._formValues]), E = $.useCallback((k) => {
545
+ const C = v(o._fields, t);
546
+ C && k && (C._f.ref = {
547
+ focus: () => k.focus && k.focus(),
548
+ select: () => k.select && k.select(),
549
+ setCustomValidity: (A) => k.setCustomValidity(A),
550
+ reportValidity: () => k.reportValidity()
518
551
  });
519
- }, [n._fields, t]), F = V.useMemo(() => ({
552
+ }, [o._fields, t]), b = $.useMemo(() => ({
520
553
  name: t,
521
- value: m,
554
+ value: f,
522
555
  ...K(s) || y.disabled ? { disabled: y.disabled || s } : {},
523
- onChange: S,
524
- onBlur: k,
525
- ref: R
526
- }), [t, s, y.disabled, S, k, R, m]);
527
- return V.useEffect(() => {
528
- const $ = n._options.shouldUnregister || o, z = f.current;
529
- z && z !== t && !a && n.unregister(z), n.register(t, {
530
- ...h.current.rules,
531
- ...K(h.current.disabled) ? { disabled: h.current.disabled } : {}
556
+ onChange: _,
557
+ onBlur: z,
558
+ ref: E
559
+ }), [t, s, y.disabled, _, z, E, f]);
560
+ return $.useEffect(() => {
561
+ const k = o._options.shouldUnregister || n, C = h.current;
562
+ C && C !== t && !l && o.unregister(C), o.register(t, {
563
+ ...m.current.rules,
564
+ ...K(m.current.disabled) ? { disabled: m.current.disabled } : {}
532
565
  });
533
- const E = (O, X) => {
534
- const ae = p(n._fields, O);
535
- ae && ae._f && (ae._f.mount = X);
566
+ const A = (L, P) => {
567
+ const se = v(o._fields, L);
568
+ se && se._f && (se._f.mount = P);
536
569
  };
537
- if (E(t, !0), $) {
538
- const O = U(p(n._options.defaultValues, t, h.current.defaultValue));
539
- D(n._defaultValues, t, O), M(p(n._formValues, t)) && D(n._formValues, t, O);
570
+ if (A(t, !0), k) {
571
+ const L = U(v(o._options.defaultValues, t, m.current.defaultValue));
572
+ D(o._defaultValues, t, L), T(v(o._formValues, t)) && D(o._formValues, t, L);
540
573
  }
541
- return !a && n.register(t), f.current = t, () => {
542
- (a ? $ && !n._state.action : $) ? n.unregister(t) : E(t, !1);
574
+ return !l && o.register(t), h.current = t, () => {
575
+ (l ? k && !o._state.action : k) ? o.unregister(t) : A(t, !1);
543
576
  };
544
- }, [t, n, a, o]), V.useEffect(() => {
545
- n._setDisabledField({
577
+ }, [t, o, l, n]), $.useEffect(() => {
578
+ o._setDisabledField({
546
579
  disabled: s,
547
580
  name: t
548
581
  });
549
- }, [s, t, n]), V.useMemo(() => ({
550
- field: F,
582
+ }, [s, t, o]), $.useMemo(() => ({
583
+ field: b,
551
584
  formState: y,
552
- fieldState: C
553
- }), [F, y, C]);
585
+ fieldState: F
586
+ }), [b, y, F]);
554
587
  }
555
- var it = (e, r, t, s, n) => r ? {
588
+ var at = (e, r, t, s, o) => r ? {
556
589
  ...t[e],
557
590
  types: {
558
591
  ...t[e] && t[e].types ? t[e].types : {},
559
- [s]: n || !0
592
+ [s]: o || !0
560
593
  }
561
- } : {}, pe = (e) => Array.isArray(e) ? e : [e], Ft = () => {
594
+ } : {}, pe = (e) => Array.isArray(e) ? e : [e], Vt = () => {
562
595
  let e = [];
563
596
  return {
564
597
  get observers() {
565
598
  return e;
566
599
  },
567
- next: (n) => {
568
- for (const o of e)
569
- o.next && o.next(n);
600
+ next: (o) => {
601
+ for (const n of e)
602
+ n.next && n.next(o);
570
603
  },
571
- subscribe: (n) => (e.push(n), {
604
+ subscribe: (o) => (e.push(o), {
572
605
  unsubscribe: () => {
573
- e = e.filter((o) => o !== n);
606
+ e = e.filter((n) => n !== o);
574
607
  }
575
608
  }),
576
609
  unsubscribe: () => {
@@ -578,66 +611,66 @@ var it = (e, r, t, s, n) => r ? {
578
611
  }
579
612
  };
580
613
  };
581
- function Yt(e, r) {
614
+ function tr(e, r) {
582
615
  const t = {};
583
616
  for (const s in e)
584
617
  if (e.hasOwnProperty(s)) {
585
- const n = e[s], o = r[s];
586
- if (n && H(n) && o) {
587
- const l = Yt(n, o);
588
- H(l) && (t[s] = l);
589
- } else e[s] && (t[s] = o);
618
+ const o = e[s], n = r[s];
619
+ if (o && I(o) && n) {
620
+ const i = tr(o, n);
621
+ I(i) && (t[s] = i);
622
+ } else e[s] && (t[s] = n);
590
623
  }
591
624
  return t;
592
625
  }
593
- var W = (e) => H(e) && !Object.keys(e).length, at = (e) => e.type === "file", re = (e) => typeof e == "function", Pe = (e) => {
594
- if (!tt)
626
+ var q = (e) => I(e) && !Object.keys(e).length, lt = (e) => e.type === "file", re = (e) => typeof e == "function", Ne = (e) => {
627
+ if (!rt)
595
628
  return !1;
596
629
  const r = e ? e.ownerDocument : 0;
597
630
  return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
598
- }, er = (e) => e.type === "select-multiple", lt = (e) => e.type === "radio", qr = (e) => lt(e) || Se(e), Ie = (e) => Pe(e) && e.isConnected;
599
- function Gr(e, r) {
631
+ }, rr = (e) => e.type === "select-multiple", ct = (e) => e.type === "radio", Qr = (e) => ct(e) || Se(e), je = (e) => Ne(e) && e.isConnected;
632
+ function Kr(e, r) {
600
633
  const t = r.slice(0, -1).length;
601
634
  let s = 0;
602
635
  for (; s < t; )
603
- e = M(e) ? s++ : e[r[s++]];
636
+ e = T(e) ? s++ : e[r[s++]];
604
637
  return e;
605
638
  }
606
- function Zr(e) {
639
+ function Jr(e) {
607
640
  for (const r in e)
608
- if (e.hasOwnProperty(r) && !M(e[r]))
641
+ if (e.hasOwnProperty(r) && !T(e[r]))
609
642
  return !1;
610
643
  return !0;
611
644
  }
612
- function I(e, r) {
613
- const t = Array.isArray(r) ? r : Ne(r) ? [r] : st(r), s = t.length === 1 ? e : Gr(e, t), n = t.length - 1, o = t[n];
614
- return s && delete s[o], n !== 0 && (H(s) && W(s) || Array.isArray(s) && Zr(s)) && I(e, t.slice(0, -1)), e;
645
+ function j(e, r) {
646
+ const t = Array.isArray(r) ? r : De(r) ? [r] : ot(r), s = t.length === 1 ? e : Kr(e, t), o = t.length - 1, n = t[o];
647
+ return s && delete s[n], o !== 0 && (I(s) && q(s) || Array.isArray(s) && Jr(s)) && j(e, t.slice(0, -1)), e;
615
648
  }
616
- var Qr = (e) => {
649
+ var Xr = (e) => {
617
650
  for (const r in e)
618
651
  if (re(e[r]))
619
652
  return !0;
620
653
  return !1;
621
654
  };
622
- function tr(e) {
623
- return Array.isArray(e) || H(e) && !Qr(e);
655
+ function sr(e) {
656
+ return Array.isArray(e) || I(e) && !Xr(e);
624
657
  }
625
- function Qe(e, r = {}) {
658
+ function Je(e, r = {}) {
626
659
  for (const t in e)
627
- tr(e[t]) ? (r[t] = Array.isArray(e[t]) ? [] : {}, Qe(e[t], r[t])) : M(e[t]) || (r[t] = !0);
660
+ sr(e[t]) ? (r[t] = Array.isArray(e[t]) ? [] : {}, Je(e[t], r[t])) : T(e[t]) || (r[t] = !0);
628
661
  return r;
629
662
  }
630
663
  function me(e, r, t) {
631
- t || (t = Qe(r));
664
+ t || (t = Je(r));
632
665
  for (const s in e)
633
- tr(e[s]) ? M(r) || Ze(t[s]) ? t[s] = Qe(e[s], Array.isArray(e[s]) ? [] : {}) : me(e[s], Z(r) ? {} : r[s], t[s]) : t[s] = !te(e[s], r[s]);
666
+ sr(e[s]) ? T(r) || Ke(t[s]) ? t[s] = Je(e[s], Array.isArray(e[s]) ? [] : {}) : me(e[s], Z(r) ? {} : r[s], t[s]) : t[s] = !te(e[s], r[s]);
634
667
  return t;
635
668
  }
636
- const xt = {
669
+ const wt = {
637
670
  value: !1,
638
671
  isValid: !1
639
672
  }, kt = { value: !0, isValid: !0 };
640
- var rr = (e) => {
673
+ var or = (e) => {
641
674
  if (Array.isArray(e)) {
642
675
  if (e.length > 1) {
643
676
  const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
@@ -645,98 +678,98 @@ var rr = (e) => {
645
678
  }
646
679
  return e[0].checked && !e[0].disabled ? (
647
680
  // @ts-expect-error expected to work in the browser
648
- e[0].attributes && !M(e[0].attributes.value) ? M(e[0].value) || e[0].value === "" ? kt : { value: e[0].value, isValid: !0 } : kt
649
- ) : xt;
681
+ e[0].attributes && !T(e[0].attributes.value) ? T(e[0].value) || e[0].value === "" ? kt : { value: e[0].value, isValid: !0 } : kt
682
+ ) : wt;
650
683
  }
651
- return xt;
652
- }, sr = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: s }) => M(e) ? e : r ? e === "" ? NaN : e && +e : t && J(e) ? new Date(e) : s ? s(e) : e;
653
- const Vt = {
684
+ return wt;
685
+ }, nr = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: s }) => T(e) ? e : r ? e === "" ? NaN : e && +e : t && J(e) ? new Date(e) : s ? s(e) : e;
686
+ const Ct = {
654
687
  isValid: !1,
655
688
  value: null
656
689
  };
657
- var or = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
690
+ var ir = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
658
691
  isValid: !0,
659
692
  value: t.value
660
- } : r, Vt) : Vt;
661
- function Ct(e) {
693
+ } : r, Ct) : Ct;
694
+ function zt(e) {
662
695
  const r = e.ref;
663
- return at(r) ? r.files : lt(r) ? or(e.refs).value : er(r) ? [...r.selectedOptions].map(({ value: t }) => t) : Se(r) ? rr(e.refs).value : sr(M(r.value) ? e.ref.value : r.value, e);
696
+ return lt(r) ? r.files : ct(r) ? ir(e.refs).value : rr(r) ? [...r.selectedOptions].map(({ value: t }) => t) : Se(r) ? or(e.refs).value : nr(T(r.value) ? e.ref.value : r.value, e);
664
697
  }
665
- var Kr = (e, r, t, s) => {
666
- const n = {};
667
- for (const o of e) {
668
- const l = p(r, o);
669
- l && D(n, o, l._f);
698
+ var Yr = (e, r, t, s) => {
699
+ const o = {};
700
+ for (const n of e) {
701
+ const i = v(r, n);
702
+ i && D(o, n, i._f);
670
703
  }
671
704
  return {
672
705
  criteriaMode: t,
673
706
  names: [...e],
674
- fields: n,
707
+ fields: o,
675
708
  shouldUseNativeValidation: s
676
709
  };
677
- }, De = (e) => e instanceof RegExp, _e = (e) => M(e) ? e : De(e) ? e.source : H(e) ? De(e.value) ? e.value.source : e.value : e, Et = (e) => ({
710
+ }, Re = (e) => e instanceof RegExp, ge = (e) => T(e) ? e : Re(e) ? e.source : I(e) ? Re(e.value) ? e.value.source : e.value : e, $t = (e) => ({
678
711
  isOnSubmit: !e || e === ee.onSubmit,
679
712
  isOnBlur: e === ee.onBlur,
680
713
  isOnChange: e === ee.onChange,
681
714
  isOnAll: e === ee.all,
682
715
  isOnTouch: e === ee.onTouched
683
716
  });
684
- const zt = "AsyncFunction";
685
- var Jr = (e) => !!e && !!e.validate && !!(re(e.validate) && e.validate.constructor.name === zt || H(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === zt)), Xr = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), $t = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((s) => e.startsWith(s) && /^\.\w+/.test(e.slice(s.length))));
717
+ const Et = "AsyncFunction";
718
+ var es = (e) => !!e && !!e.validate && !!(re(e.validate) && e.validate.constructor.name === Et || I(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === Et)), ts = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), At = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((s) => e.startsWith(s) && /^\.\w+/.test(e.slice(s.length))));
686
719
  const ve = (e, r, t, s) => {
687
- for (const n of t || Object.keys(e)) {
688
- const o = p(e, n);
689
- if (o) {
690
- const { _f: l, ...a } = o;
691
- if (l) {
692
- if (l.refs && l.refs[0] && r(l.refs[0], n) && !s)
720
+ for (const o of t || Object.keys(e)) {
721
+ const n = v(e, o);
722
+ if (n) {
723
+ const { _f: i, ...l } = n;
724
+ if (i) {
725
+ if (i.refs && i.refs[0] && r(i.refs[0], o) && !s)
693
726
  return !0;
694
- if (l.ref && r(l.ref, l.name) && !s)
727
+ if (i.ref && r(i.ref, i.name) && !s)
695
728
  return !0;
696
- if (ve(a, r))
729
+ if (ve(l, r))
697
730
  break;
698
- } else if (H(a) && ve(a, r))
731
+ } else if (I(l) && ve(l, r))
699
732
  break;
700
733
  }
701
734
  }
702
735
  };
703
- function At(e, r, t) {
704
- const s = p(e, t);
705
- if (s || Ne(t))
736
+ function Nt(e, r, t) {
737
+ const s = v(e, t);
738
+ if (s || De(t))
706
739
  return {
707
740
  error: s,
708
741
  name: t
709
742
  };
710
- const n = t.split(".");
711
- for (; n.length; ) {
712
- const o = n.join("."), l = p(r, o), a = p(e, o);
713
- if (l && !Array.isArray(l) && t !== o)
743
+ const o = t.split(".");
744
+ for (; o.length; ) {
745
+ const n = o.join("."), i = v(r, n), l = v(e, n);
746
+ if (i && !Array.isArray(i) && t !== n)
714
747
  return { name: t };
715
- if (a && a.type)
748
+ if (l && l.type)
716
749
  return {
717
- name: o,
718
- error: a
750
+ name: n,
751
+ error: l
719
752
  };
720
- if (a && a.root && a.root.type)
753
+ if (l && l.root && l.root.type)
721
754
  return {
722
- name: `${o}.root`,
723
- error: a.root
755
+ name: `${n}.root`,
756
+ error: l.root
724
757
  };
725
- n.pop();
758
+ o.pop();
726
759
  }
727
760
  return {
728
761
  name: t
729
762
  };
730
763
  }
731
- var Yr = (e, r, t, s) => {
764
+ var rs = (e, r, t, s) => {
732
765
  t(e);
733
- const { name: n, ...o } = e;
734
- return W(o) || Object.keys(o).length >= Object.keys(r).length || Object.keys(o).find((l) => r[l] === (!s || ee.all));
735
- }, es = (e, r, t) => !e || !r || e === r || pe(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s))), ts = (e, r, t, s, n) => n.isOnAll ? !1 : !t && n.isOnTouch ? !(r || e) : (t ? s.isOnBlur : n.isOnBlur) ? !e : (t ? s.isOnChange : n.isOnChange) ? e : !0, rs = (e, r) => !rt(p(e, r)).length && I(e, r), ss = (e, r, t) => {
736
- const s = pe(p(e, t));
766
+ const { name: o, ...n } = e;
767
+ return q(n) || Object.keys(n).length >= Object.keys(r).length || Object.keys(n).find((i) => r[i] === (!s || ee.all));
768
+ }, ss = (e, r, t) => !e || !r || e === r || pe(e).some((s) => s && (t ? s === r : s.startsWith(r) || r.startsWith(s))), os = (e, r, t, s, o) => o.isOnAll ? !1 : !t && o.isOnTouch ? !(r || e) : (t ? s.isOnBlur : o.isOnBlur) ? !e : (t ? s.isOnChange : o.isOnChange) ? e : !0, ns = (e, r) => !st(v(e, r)).length && j(e, r), is = (e, r, t) => {
769
+ const s = pe(v(e, t));
737
770
  return D(s, "root", r[t]), D(e, t, s), e;
738
771
  };
739
- function Pt(e, r, t = "validate") {
772
+ function Rt(e, r, t = "validate") {
740
773
  if (J(e) || Array.isArray(e) && e.every(J) || K(e) && !e)
741
774
  return {
742
775
  type: t,
@@ -744,98 +777,98 @@ function Pt(e, r, t = "validate") {
744
777
  ref: r
745
778
  };
746
779
  }
747
- var fe = (e) => H(e) && !De(e) ? e : {
780
+ var fe = (e) => I(e) && !Re(e) ? e : {
748
781
  value: e,
749
782
  message: ""
750
- }, Dt = async (e, r, t, s, n, o) => {
751
- const { ref: l, refs: a, required: d, maxLength: m, minLength: y, min: h, max: f, pattern: b, validate: C, name: S, valueAsNumber: k, mount: R } = e._f, F = p(t, S);
752
- if (!R || r.has(S))
783
+ }, Dt = async (e, r, t, s, o, n) => {
784
+ const { ref: i, refs: l, required: d, maxLength: f, minLength: y, min: m, max: h, pattern: x, validate: F, name: _, valueAsNumber: z, mount: E } = e._f, b = v(t, _);
785
+ if (!E || r.has(_))
753
786
  return {};
754
- const $ = a ? a[0] : l, z = (A) => {
755
- n && $.reportValidity && ($.setCustomValidity(K(A) ? "" : A || ""), $.reportValidity());
756
- }, E = {}, O = lt(l), X = Se(l), ae = O || X, q = (k || at(l)) && M(l.value) && M(F) || Pe(l) && l.value === "" || F === "" || Array.isArray(F) && !F.length, se = it.bind(null, S, s, E), oe = (A, N, T, j = le.maxLength, G = le.minLength) => {
757
- const ne = A ? N : T;
758
- E[S] = {
759
- type: A ? j : G,
787
+ const k = l ? l[0] : i, C = (N) => {
788
+ o && k.reportValidity && (k.setCustomValidity(K(N) ? "" : N || ""), k.reportValidity());
789
+ }, A = {}, L = ct(i), P = Se(i), se = L || P, Y = (z || lt(i)) && T(i.value) && T(b) || Ne(i) && i.value === "" || b === "" || Array.isArray(b) && !b.length, ce = at.bind(null, _, s, A), oe = (N, B, M, W = ae.maxLength, G = ae.minLength) => {
790
+ const ne = N ? B : M;
791
+ A[_] = {
792
+ type: N ? W : G,
760
793
  message: ne,
761
- ref: l,
762
- ...se(A ? j : G, ne)
794
+ ref: i,
795
+ ...ce(N ? W : G, ne)
763
796
  };
764
797
  };
765
- if (o ? !Array.isArray(F) || !F.length : d && (!ae && (q || Z(F)) || K(F) && !F || X && !rr(a).isValid || O && !or(a).isValid)) {
766
- const { value: A, message: N } = J(d) ? { value: !!d, message: d } : fe(d);
767
- if (A && (E[S] = {
768
- type: le.required,
769
- message: N,
770
- ref: $,
771
- ...se(le.required, N)
798
+ if (n ? !Array.isArray(b) || !b.length : d && (!se && (Y || Z(b)) || K(b) && !b || P && !or(l).isValid || L && !ir(l).isValid)) {
799
+ const { value: N, message: B } = J(d) ? { value: !!d, message: d } : fe(d);
800
+ if (N && (A[_] = {
801
+ type: ae.required,
802
+ message: B,
803
+ ref: k,
804
+ ...ce(ae.required, B)
772
805
  }, !s))
773
- return z(N), E;
806
+ return C(B), A;
774
807
  }
775
- if (!q && (!Z(h) || !Z(f))) {
776
- let A, N;
777
- const T = fe(f), j = fe(h);
778
- if (!Z(F) && !isNaN(F)) {
779
- const G = l.valueAsNumber || F && +F;
780
- Z(T.value) || (A = G > T.value), Z(j.value) || (N = G < j.value);
808
+ if (!Y && (!Z(m) || !Z(h))) {
809
+ let N, B;
810
+ const M = fe(h), W = fe(m);
811
+ if (!Z(b) && !isNaN(b)) {
812
+ const G = i.valueAsNumber || b && +b;
813
+ Z(M.value) || (N = G > M.value), Z(W.value) || (B = G < W.value);
781
814
  } else {
782
- const G = l.valueAsDate || new Date(F), ne = (Fe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + Fe), he = l.type == "time", de = l.type == "week";
783
- J(T.value) && F && (A = he ? ne(F) > ne(T.value) : de ? F > T.value : G > new Date(T.value)), J(j.value) && F && (N = he ? ne(F) < ne(j.value) : de ? F < j.value : G < new Date(j.value));
815
+ const G = i.valueAsDate || new Date(b), ne = (xe) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + xe), he = i.type == "time", de = i.type == "week";
816
+ J(M.value) && b && (N = he ? ne(b) > ne(M.value) : de ? b > M.value : G > new Date(M.value)), J(W.value) && b && (B = he ? ne(b) < ne(W.value) : de ? b < W.value : G < new Date(W.value));
784
817
  }
785
- if ((A || N) && (oe(!!A, T.message, j.message, le.max, le.min), !s))
786
- return z(E[S].message), E;
818
+ if ((N || B) && (oe(!!N, M.message, W.message, ae.max, ae.min), !s))
819
+ return C(A[_].message), A;
787
820
  }
788
- if ((m || y) && !q && (J(F) || o && Array.isArray(F))) {
789
- const A = fe(m), N = fe(y), T = !Z(A.value) && F.length > +A.value, j = !Z(N.value) && F.length < +N.value;
790
- if ((T || j) && (oe(T, A.message, N.message), !s))
791
- return z(E[S].message), E;
821
+ if ((f || y) && !Y && (J(b) || n && Array.isArray(b))) {
822
+ const N = fe(f), B = fe(y), M = !Z(N.value) && b.length > +N.value, W = !Z(B.value) && b.length < +B.value;
823
+ if ((M || W) && (oe(M, N.message, B.message), !s))
824
+ return C(A[_].message), A;
792
825
  }
793
- if (b && !q && J(F)) {
794
- const { value: A, message: N } = fe(b);
795
- if (De(A) && !F.match(A) && (E[S] = {
796
- type: le.pattern,
797
- message: N,
798
- ref: l,
799
- ...se(le.pattern, N)
826
+ if (x && !Y && J(b)) {
827
+ const { value: N, message: B } = fe(x);
828
+ if (Re(N) && !b.match(N) && (A[_] = {
829
+ type: ae.pattern,
830
+ message: B,
831
+ ref: i,
832
+ ...ce(ae.pattern, B)
800
833
  }, !s))
801
- return z(N), E;
834
+ return C(B), A;
802
835
  }
803
- if (C) {
804
- if (re(C)) {
805
- const A = await C(F, t), N = Pt(A, $);
806
- if (N && (E[S] = {
807
- ...N,
808
- ...se(le.validate, N.message)
836
+ if (F) {
837
+ if (re(F)) {
838
+ const N = await F(b, t), B = Rt(N, k);
839
+ if (B && (A[_] = {
840
+ ...B,
841
+ ...ce(ae.validate, B.message)
809
842
  }, !s))
810
- return z(N.message), E;
811
- } else if (H(C)) {
812
- let A = {};
813
- for (const N in C) {
814
- if (!W(A) && !s)
843
+ return C(B.message), A;
844
+ } else if (I(F)) {
845
+ let N = {};
846
+ for (const B in F) {
847
+ if (!q(N) && !s)
815
848
  break;
816
- const T = Pt(await C[N](F, t), $, N);
817
- T && (A = {
818
- ...T,
819
- ...se(N, T.message)
820
- }, z(T.message), s && (E[S] = A));
849
+ const M = Rt(await F[B](b, t), k, B);
850
+ M && (N = {
851
+ ...M,
852
+ ...ce(B, M.message)
853
+ }, C(M.message), s && (A[_] = N));
821
854
  }
822
- if (!W(A) && (E[S] = {
823
- ref: $,
824
- ...A
855
+ if (!q(N) && (A[_] = {
856
+ ref: k,
857
+ ...N
825
858
  }, !s))
826
- return E;
859
+ return A;
827
860
  }
828
861
  }
829
- return z(!0), E;
862
+ return C(!0), A;
830
863
  };
831
- const os = {
864
+ const as = {
832
865
  mode: ee.onSubmit,
833
866
  reValidateMode: ee.onChange,
834
867
  shouldFocusError: !0
835
868
  };
836
- function ns(e = {}) {
869
+ function ls(e = {}) {
837
870
  let r = {
838
- ...os,
871
+ ...as,
839
872
  ...e
840
873
  }, t = {
841
874
  submitCount: 0,
@@ -852,17 +885,17 @@ function ns(e = {}) {
852
885
  validatingFields: {},
853
886
  errors: r.errors || {},
854
887
  disabled: r.disabled || !1
855
- }, s = {}, n = H(r.defaultValues) || H(r.values) ? U(r.defaultValues || r.values) || {} : {}, o = r.shouldUnregister ? {} : U(n), l = {
888
+ }, s = {}, o = I(r.defaultValues) || I(r.values) ? U(r.defaultValues || r.values) || {} : {}, n = r.shouldUnregister ? {} : U(o), i = {
856
889
  action: !1,
857
890
  mount: !1,
858
891
  watch: !1
859
- }, a = {
892
+ }, l = {
860
893
  mount: /* @__PURE__ */ new Set(),
861
894
  disabled: /* @__PURE__ */ new Set(),
862
895
  unMount: /* @__PURE__ */ new Set(),
863
896
  array: /* @__PURE__ */ new Set(),
864
897
  watch: /* @__PURE__ */ new Set()
865
- }, d, m = 0;
898
+ }, d, f = 0;
866
899
  const y = {
867
900
  isDirty: !1,
868
901
  dirtyFields: !1,
@@ -872,478 +905,478 @@ function ns(e = {}) {
872
905
  isValid: !1,
873
906
  errors: !1
874
907
  };
875
- let h = {
908
+ let m = {
876
909
  ...y
877
910
  };
878
- const f = {
879
- array: Ft(),
880
- state: Ft()
881
- }, b = r.criteriaMode === ee.all, C = (i) => (c) => {
882
- clearTimeout(m), m = setTimeout(i, c);
883
- }, S = async (i) => {
884
- if (!r.disabled && (y.isValid || h.isValid || i)) {
885
- const c = r.resolver ? W((await X()).errors) : await q(s, !0);
886
- c !== t.isValid && f.state.next({
911
+ const h = {
912
+ array: Vt(),
913
+ state: Vt()
914
+ }, x = r.criteriaMode === ee.all, F = (a) => (c) => {
915
+ clearTimeout(f), f = setTimeout(a, c);
916
+ }, _ = async (a) => {
917
+ if (!r.disabled && (y.isValid || m.isValid || a)) {
918
+ const c = r.resolver ? q((await P()).errors) : await Y(s, !0);
919
+ c !== t.isValid && h.state.next({
887
920
  isValid: c
888
921
  });
889
922
  }
890
- }, k = (i, c) => {
891
- !r.disabled && (y.isValidating || y.validatingFields || h.isValidating || h.validatingFields) && ((i || Array.from(a.mount)).forEach((u) => {
892
- u && (c ? D(t.validatingFields, u, c) : I(t.validatingFields, u));
893
- }), f.state.next({
923
+ }, z = (a, c) => {
924
+ !r.disabled && (y.isValidating || y.validatingFields || m.isValidating || m.validatingFields) && ((a || Array.from(l.mount)).forEach((u) => {
925
+ u && (c ? D(t.validatingFields, u, c) : j(t.validatingFields, u));
926
+ }), h.state.next({
894
927
  validatingFields: t.validatingFields,
895
- isValidating: !W(t.validatingFields)
928
+ isValidating: !q(t.validatingFields)
896
929
  }));
897
- }, R = (i, c = [], u, v, g = !0, _ = !0) => {
898
- if (v && u && !r.disabled) {
899
- if (l.action = !0, _ && Array.isArray(p(s, i))) {
900
- const x = u(p(s, i), v.argA, v.argB);
901
- g && D(s, i, x);
930
+ }, E = (a, c = [], u, S, p = !0, g = !0) => {
931
+ if (S && u && !r.disabled) {
932
+ if (i.action = !0, g && Array.isArray(v(s, a))) {
933
+ const w = u(v(s, a), S.argA, S.argB);
934
+ p && D(s, a, w);
902
935
  }
903
- if (_ && Array.isArray(p(t.errors, i))) {
904
- const x = u(p(t.errors, i), v.argA, v.argB);
905
- g && D(t.errors, i, x), rs(t.errors, i);
936
+ if (g && Array.isArray(v(t.errors, a))) {
937
+ const w = u(v(t.errors, a), S.argA, S.argB);
938
+ p && D(t.errors, a, w), ns(t.errors, a);
906
939
  }
907
- if ((y.touchedFields || h.touchedFields) && _ && Array.isArray(p(t.touchedFields, i))) {
908
- const x = u(p(t.touchedFields, i), v.argA, v.argB);
909
- g && D(t.touchedFields, i, x);
940
+ if ((y.touchedFields || m.touchedFields) && g && Array.isArray(v(t.touchedFields, a))) {
941
+ const w = u(v(t.touchedFields, a), S.argA, S.argB);
942
+ p && D(t.touchedFields, a, w);
910
943
  }
911
- (y.dirtyFields || h.dirtyFields) && (t.dirtyFields = me(n, o)), f.state.next({
912
- name: i,
913
- isDirty: oe(i, c),
944
+ (y.dirtyFields || m.dirtyFields) && (t.dirtyFields = me(o, n)), h.state.next({
945
+ name: a,
946
+ isDirty: oe(a, c),
914
947
  dirtyFields: t.dirtyFields,
915
948
  errors: t.errors,
916
949
  isValid: t.isValid
917
950
  });
918
951
  } else
919
- D(o, i, c);
920
- }, F = (i, c) => {
921
- D(t.errors, i, c), f.state.next({
952
+ D(n, a, c);
953
+ }, b = (a, c) => {
954
+ D(t.errors, a, c), h.state.next({
922
955
  errors: t.errors
923
956
  });
924
- }, $ = (i) => {
925
- t.errors = i, f.state.next({
957
+ }, k = (a) => {
958
+ t.errors = a, h.state.next({
926
959
  errors: t.errors,
927
960
  isValid: !1
928
961
  });
929
- }, z = (i, c, u, v) => {
930
- const g = p(s, i);
931
- if (g) {
932
- const _ = p(o, i, M(u) ? p(n, i) : u);
933
- M(_) || v && v.defaultChecked || c ? D(o, i, c ? _ : Ct(g._f)) : T(i, _), l.mount && S();
962
+ }, C = (a, c, u, S) => {
963
+ const p = v(s, a);
964
+ if (p) {
965
+ const g = v(n, a, T(u) ? v(o, a) : u);
966
+ T(g) || S && S.defaultChecked || c ? D(n, a, c ? g : zt(p._f)) : M(a, g), i.mount && _();
934
967
  }
935
- }, E = (i, c, u, v, g) => {
936
- let _ = !1, x = !1;
937
- const P = {
938
- name: i
968
+ }, A = (a, c, u, S, p) => {
969
+ let g = !1, w = !1;
970
+ const R = {
971
+ name: a
939
972
  };
940
973
  if (!r.disabled) {
941
- if (!u || v) {
942
- (y.isDirty || h.isDirty) && (x = t.isDirty, t.isDirty = P.isDirty = oe(), _ = x !== P.isDirty);
943
- const B = te(p(n, i), c);
944
- x = !!p(t.dirtyFields, i), B ? I(t.dirtyFields, i) : D(t.dirtyFields, i, !0), P.dirtyFields = t.dirtyFields, _ = _ || (y.dirtyFields || h.dirtyFields) && x !== !B;
974
+ if (!u || S) {
975
+ (y.isDirty || m.isDirty) && (w = t.isDirty, t.isDirty = R.isDirty = oe(), g = w !== R.isDirty);
976
+ const O = te(v(o, a), c);
977
+ w = !!v(t.dirtyFields, a), O ? j(t.dirtyFields, a) : D(t.dirtyFields, a, !0), R.dirtyFields = t.dirtyFields, g = g || (y.dirtyFields || m.dirtyFields) && w !== !O;
945
978
  }
946
979
  if (u) {
947
- const B = p(t.touchedFields, i);
948
- B || (D(t.touchedFields, i, u), P.touchedFields = t.touchedFields, _ = _ || (y.touchedFields || h.touchedFields) && B !== u);
980
+ const O = v(t.touchedFields, a);
981
+ O || (D(t.touchedFields, a, u), R.touchedFields = t.touchedFields, g = g || (y.touchedFields || m.touchedFields) && O !== u);
949
982
  }
950
- _ && g && f.state.next(P);
983
+ g && p && h.state.next(R);
951
984
  }
952
- return _ ? P : {};
953
- }, O = (i, c, u, v) => {
954
- const g = p(t.errors, i), _ = (y.isValid || h.isValid) && K(c) && t.isValid !== c;
955
- if (r.delayError && u ? (d = C(() => F(i, u)), d(r.delayError)) : (clearTimeout(m), d = null, u ? D(t.errors, i, u) : I(t.errors, i)), (u ? !te(g, u) : g) || !W(v) || _) {
956
- const x = {
957
- ...v,
958
- ..._ && K(c) ? { isValid: c } : {},
985
+ return g ? R : {};
986
+ }, L = (a, c, u, S) => {
987
+ const p = v(t.errors, a), g = (y.isValid || m.isValid) && K(c) && t.isValid !== c;
988
+ if (r.delayError && u ? (d = F(() => b(a, u)), d(r.delayError)) : (clearTimeout(f), d = null, u ? D(t.errors, a, u) : j(t.errors, a)), (u ? !te(p, u) : p) || !q(S) || g) {
989
+ const w = {
990
+ ...S,
991
+ ...g && K(c) ? { isValid: c } : {},
959
992
  errors: t.errors,
960
- name: i
993
+ name: a
961
994
  };
962
995
  t = {
963
996
  ...t,
964
- ...x
965
- }, f.state.next(x);
997
+ ...w
998
+ }, h.state.next(w);
966
999
  }
967
- }, X = async (i) => {
968
- k(i, !0);
969
- const c = await r.resolver(o, r.context, Kr(i || a.mount, s, r.criteriaMode, r.shouldUseNativeValidation));
970
- return k(i), c;
971
- }, ae = async (i) => {
972
- const { errors: c } = await X(i);
973
- if (i)
974
- for (const u of i) {
975
- const v = p(c, u);
976
- v ? D(t.errors, u, v) : I(t.errors, u);
1000
+ }, P = async (a) => {
1001
+ z(a, !0);
1002
+ const c = await r.resolver(n, r.context, Yr(a || l.mount, s, r.criteriaMode, r.shouldUseNativeValidation));
1003
+ return z(a), c;
1004
+ }, se = async (a) => {
1005
+ const { errors: c } = await P(a);
1006
+ if (a)
1007
+ for (const u of a) {
1008
+ const S = v(c, u);
1009
+ S ? D(t.errors, u, S) : j(t.errors, u);
977
1010
  }
978
1011
  else
979
1012
  t.errors = c;
980
1013
  return c;
981
- }, q = async (i, c, u = {
1014
+ }, Y = async (a, c, u = {
982
1015
  valid: !0
983
1016
  }) => {
984
- for (const v in i) {
985
- const g = i[v];
986
- if (g) {
987
- const { _f: _, ...x } = g;
988
- if (_) {
989
- const P = a.array.has(_.name), B = g._f && Jr(g._f);
990
- B && y.validatingFields && k([_.name], !0);
991
- const Y = await Dt(g, a.disabled, o, b, r.shouldUseNativeValidation && !c, P);
992
- if (B && y.validatingFields && k([_.name]), Y[_.name] && (u.valid = !1, c))
1017
+ for (const S in a) {
1018
+ const p = a[S];
1019
+ if (p) {
1020
+ const { _f: g, ...w } = p;
1021
+ if (g) {
1022
+ const R = l.array.has(g.name), O = p._f && es(p._f);
1023
+ O && y.validatingFields && z([g.name], !0);
1024
+ const X = await Dt(p, l.disabled, n, x, r.shouldUseNativeValidation && !c, R);
1025
+ if (O && y.validatingFields && z([g.name]), X[g.name] && (u.valid = !1, c))
993
1026
  break;
994
- !c && (p(Y, _.name) ? P ? ss(t.errors, Y, _.name) : D(t.errors, _.name, Y[_.name]) : I(t.errors, _.name));
1027
+ !c && (v(X, g.name) ? R ? is(t.errors, X, g.name) : D(t.errors, g.name, X[g.name]) : j(t.errors, g.name));
995
1028
  }
996
- !W(x) && await q(x, c, u);
1029
+ !q(w) && await Y(w, c, u);
997
1030
  }
998
1031
  }
999
1032
  return u.valid;
1000
- }, se = () => {
1001
- for (const i of a.unMount) {
1002
- const c = p(s, i);
1003
- c && (c._f.refs ? c._f.refs.every((u) => !Ie(u)) : !Ie(c._f.ref)) && Re(i);
1033
+ }, ce = () => {
1034
+ for (const a of l.unMount) {
1035
+ const c = v(s, a);
1036
+ c && (c._f.refs ? c._f.refs.every((u) => !je(u)) : !je(c._f.ref)) && Be(a);
1004
1037
  }
1005
- a.unMount = /* @__PURE__ */ new Set();
1006
- }, oe = (i, c) => !r.disabled && (i && c && D(o, i, c), !te(Fe(), n)), A = (i, c, u) => Ge(i, a, {
1007
- ...l.mount ? o : M(c) ? n : J(i) ? { [i]: c } : c
1008
- }, u, c), N = (i) => rt(p(l.mount ? o : n, i, r.shouldUnregister ? p(n, i, []) : [])), T = (i, c, u = {}) => {
1009
- const v = p(s, i);
1010
- let g = c;
1011
- if (v) {
1012
- const _ = v._f;
1013
- _ && (!_.disabled && D(o, i, sr(c, _)), g = Pe(_.ref) && Z(c) ? "" : c, er(_.ref) ? [..._.ref.options].forEach((x) => x.selected = g.includes(x.value)) : _.refs ? Se(_.ref) ? _.refs.forEach((x) => {
1014
- (!x.defaultChecked || !x.disabled) && (Array.isArray(g) ? x.checked = !!g.find((P) => P === x.value) : x.checked = g === x.value || !!g);
1015
- }) : _.refs.forEach((x) => x.checked = x.value === g) : at(_.ref) ? _.ref.value = "" : (_.ref.value = g, _.ref.type || f.state.next({
1016
- name: i,
1017
- values: U(o)
1038
+ l.unMount = /* @__PURE__ */ new Set();
1039
+ }, oe = (a, c) => !r.disabled && (a && c && D(n, a, c), !te(xe(), o)), N = (a, c, u) => Qe(a, l, {
1040
+ ...i.mount ? n : T(c) ? o : J(a) ? { [a]: c } : c
1041
+ }, u, c), B = (a) => st(v(i.mount ? n : o, a, r.shouldUnregister ? v(o, a, []) : [])), M = (a, c, u = {}) => {
1042
+ const S = v(s, a);
1043
+ let p = c;
1044
+ if (S) {
1045
+ const g = S._f;
1046
+ g && (!g.disabled && D(n, a, nr(c, g)), p = Ne(g.ref) && Z(c) ? "" : c, rr(g.ref) ? [...g.ref.options].forEach((w) => w.selected = p.includes(w.value)) : g.refs ? Se(g.ref) ? g.refs.forEach((w) => {
1047
+ (!w.defaultChecked || !w.disabled) && (Array.isArray(p) ? w.checked = !!p.find((R) => R === w.value) : w.checked = p === w.value || !!p);
1048
+ }) : g.refs.forEach((w) => w.checked = w.value === p) : lt(g.ref) ? g.ref.value = "" : (g.ref.value = p, g.ref.type || h.state.next({
1049
+ name: a,
1050
+ values: U(n)
1018
1051
  })));
1019
1052
  }
1020
- (u.shouldDirty || u.shouldTouch) && E(i, g, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && de(i);
1021
- }, j = (i, c, u) => {
1022
- for (const v in c) {
1023
- if (!c.hasOwnProperty(v))
1053
+ (u.shouldDirty || u.shouldTouch) && A(a, p, u.shouldTouch, u.shouldDirty, !0), u.shouldValidate && de(a);
1054
+ }, W = (a, c, u) => {
1055
+ for (const S in c) {
1056
+ if (!c.hasOwnProperty(S))
1024
1057
  return;
1025
- const g = c[v], _ = i + "." + v, x = p(s, _);
1026
- (a.array.has(i) || H(g) || x && !x._f) && !ue(g) ? j(_, g, u) : T(_, g, u);
1058
+ const p = c[S], g = a + "." + S, w = v(s, g);
1059
+ (l.array.has(a) || I(p) || w && !w._f) && !ue(p) ? W(g, p, u) : M(g, p, u);
1027
1060
  }
1028
- }, G = (i, c, u = {}) => {
1029
- const v = p(s, i), g = a.array.has(i), _ = U(c);
1030
- D(o, i, _), g ? (f.array.next({
1031
- name: i,
1032
- values: U(o)
1033
- }), (y.isDirty || y.dirtyFields || h.isDirty || h.dirtyFields) && u.shouldDirty && f.state.next({
1034
- name: i,
1035
- dirtyFields: me(n, o),
1036
- isDirty: oe(i, _)
1037
- })) : v && !v._f && !Z(_) ? j(i, _, u) : T(i, _, u), $t(i, a) && f.state.next({ ...t, name: i }), f.state.next({
1038
- name: l.mount ? i : void 0,
1039
- values: U(o)
1061
+ }, G = (a, c, u = {}) => {
1062
+ const S = v(s, a), p = l.array.has(a), g = U(c);
1063
+ D(n, a, g), p ? (h.array.next({
1064
+ name: a,
1065
+ values: U(n)
1066
+ }), (y.isDirty || y.dirtyFields || m.isDirty || m.dirtyFields) && u.shouldDirty && h.state.next({
1067
+ name: a,
1068
+ dirtyFields: me(o, n),
1069
+ isDirty: oe(a, g)
1070
+ })) : S && !S._f && !Z(g) ? W(a, g, u) : M(a, g, u), At(a, l) && h.state.next({ ...t, name: a }), h.state.next({
1071
+ name: i.mount ? a : void 0,
1072
+ values: U(n)
1040
1073
  });
1041
- }, ne = async (i) => {
1042
- l.mount = !0;
1043
- const c = i.target;
1044
- let u = c.name, v = !0;
1045
- const g = p(s, u), _ = (B) => {
1046
- v = Number.isNaN(B) || ue(B) && isNaN(B.getTime()) || te(B, p(o, u, B));
1047
- }, x = Et(r.mode), P = Et(r.reValidateMode);
1048
- if (g) {
1049
- let B, Y;
1050
- const xe = c.type ? Ct(g._f) : Qt(i), ce = i.type === Ae.BLUR || i.type === Ae.FOCUS_OUT, br = !Xr(g._f) && !r.resolver && !p(t.errors, u) && !g._f.deps || ts(ce, p(t.touchedFields, u), t.isSubmitted, P, x), Le = $t(u, a, ce);
1051
- D(o, u, xe), ce ? (!c || !c.readOnly) && (g._f.onBlur && g._f.onBlur(i), d && d(0)) : g._f.onChange && g._f.onChange(i);
1052
- const Me = E(u, xe, ce), Sr = !W(Me) || Le;
1053
- if (!ce && f.state.next({
1074
+ }, ne = async (a) => {
1075
+ i.mount = !0;
1076
+ const c = a.target;
1077
+ let u = c.name, S = !0;
1078
+ const p = v(s, u), g = (O) => {
1079
+ S = Number.isNaN(O) || ue(O) && isNaN(O.getTime()) || te(O, v(n, u, O));
1080
+ }, w = $t(r.mode), R = $t(r.reValidateMode);
1081
+ if (p) {
1082
+ let O, X;
1083
+ const Ve = c.type ? zt(p._f) : Jt(a), le = a.type === Ae.BLUR || a.type === Ae.FOCUS_OUT, Fr = !ts(p._f) && !r.resolver && !v(t.errors, u) && !p._f.deps || os(le, v(t.touchedFields, u), t.isSubmitted, R, w), Te = At(u, l, le);
1084
+ D(n, u, Ve), le ? (!c || !c.readOnly) && (p._f.onBlur && p._f.onBlur(a), d && d(0)) : p._f.onChange && p._f.onChange(a);
1085
+ const He = A(u, Ve, le), xr = !q(He) || Te;
1086
+ if (!le && h.state.next({
1054
1087
  name: u,
1055
- type: i.type,
1056
- values: U(o)
1057
- }), br)
1058
- return (y.isValid || h.isValid) && (r.mode === "onBlur" ? ce && S() : ce || S()), Sr && f.state.next({ name: u, ...Le ? {} : Me });
1059
- if (!ce && Le && f.state.next({ ...t }), r.resolver) {
1060
- const { errors: gt } = await X([u]);
1061
- if (_(xe), v) {
1062
- const wr = At(t.errors, s, u), pt = At(gt, s, wr.name || u);
1063
- B = pt.error, u = pt.name, Y = W(gt);
1088
+ type: a.type,
1089
+ values: U(n)
1090
+ }), Fr)
1091
+ return (y.isValid || m.isValid) && (r.mode === "onBlur" ? le && _() : le || _()), xr && h.state.next({ name: u, ...Te ? {} : He });
1092
+ if (!le && Te && h.state.next({ ...t }), r.resolver) {
1093
+ const { errors: pt } = await P([u]);
1094
+ if (g(Ve), S) {
1095
+ const Vr = Nt(t.errors, s, u), vt = Nt(pt, s, Vr.name || u);
1096
+ O = vt.error, u = vt.name, X = q(pt);
1064
1097
  }
1065
1098
  } else
1066
- k([u], !0), B = (await Dt(g, a.disabled, o, b, r.shouldUseNativeValidation))[u], k([u]), _(xe), v && (B ? Y = !1 : (y.isValid || h.isValid) && (Y = await q(s, !0)));
1067
- v && (g._f.deps && (!Array.isArray(g._f.deps) || g._f.deps.length > 0) && de(g._f.deps), O(u, Y, B, Me));
1099
+ z([u], !0), O = (await Dt(p, l.disabled, n, x, r.shouldUseNativeValidation))[u], z([u]), g(Ve), S && (O ? X = !1 : (y.isValid || m.isValid) && (X = await Y(s, !0)));
1100
+ S && (p._f.deps && (!Array.isArray(p._f.deps) || p._f.deps.length > 0) && de(p._f.deps), L(u, X, O, He));
1068
1101
  }
1069
- }, he = (i, c) => {
1070
- if (p(t.errors, c) && i.focus)
1071
- return i.focus(), 1;
1072
- }, de = async (i, c = {}) => {
1073
- let u, v;
1074
- const g = pe(i);
1102
+ }, he = (a, c) => {
1103
+ if (v(t.errors, c) && a.focus)
1104
+ return a.focus(), 1;
1105
+ }, de = async (a, c = {}) => {
1106
+ let u, S;
1107
+ const p = pe(a);
1075
1108
  if (r.resolver) {
1076
- const _ = await ae(M(i) ? i : g);
1077
- u = W(_), v = i ? !g.some((x) => p(_, x)) : u;
1078
- } else i ? (v = (await Promise.all(g.map(async (_) => {
1079
- const x = p(s, _);
1080
- return await q(x && x._f ? { [_]: x } : x);
1081
- }))).every(Boolean), !(!v && !t.isValid) && S()) : v = u = await q(s);
1082
- return f.state.next({
1083
- ...!J(i) || (y.isValid || h.isValid) && u !== t.isValid ? {} : { name: i },
1084
- ...r.resolver || !i ? { isValid: u } : {},
1109
+ const g = await se(T(a) ? a : p);
1110
+ u = q(g), S = a ? !p.some((w) => v(g, w)) : u;
1111
+ } else a ? (S = (await Promise.all(p.map(async (g) => {
1112
+ const w = v(s, g);
1113
+ return await Y(w && w._f ? { [g]: w } : w);
1114
+ }))).every(Boolean), !(!S && !t.isValid) && _()) : S = u = await Y(s);
1115
+ return h.state.next({
1116
+ ...!J(a) || (y.isValid || m.isValid) && u !== t.isValid ? {} : { name: a },
1117
+ ...r.resolver || !a ? { isValid: u } : {},
1085
1118
  errors: t.errors
1086
- }), c.shouldFocus && !v && ve(s, he, i ? g : a.mount), v;
1087
- }, Fe = (i, c) => {
1119
+ }), c.shouldFocus && !S && ve(s, he, a ? p : l.mount), S;
1120
+ }, xe = (a, c) => {
1088
1121
  let u = {
1089
- ...l.mount ? o : n
1122
+ ...i.mount ? n : o
1090
1123
  };
1091
- return c && (u = Yt(c.dirtyFields ? t.dirtyFields : t.touchedFields, u)), M(i) ? u : J(i) ? p(u, i) : i.map((v) => p(u, v));
1092
- }, ct = (i, c) => ({
1093
- invalid: !!p((c || t).errors, i),
1094
- isDirty: !!p((c || t).dirtyFields, i),
1095
- error: p((c || t).errors, i),
1096
- isValidating: !!p(t.validatingFields, i),
1097
- isTouched: !!p((c || t).touchedFields, i)
1098
- }), yr = (i) => {
1099
- i && pe(i).forEach((c) => I(t.errors, c)), f.state.next({
1100
- errors: i ? t.errors : {}
1124
+ return c && (u = tr(c.dirtyFields ? t.dirtyFields : t.touchedFields, u)), T(a) ? u : J(a) ? v(u, a) : a.map((S) => v(u, S));
1125
+ }, ut = (a, c) => ({
1126
+ invalid: !!v((c || t).errors, a),
1127
+ isDirty: !!v((c || t).dirtyFields, a),
1128
+ error: v((c || t).errors, a),
1129
+ isValidating: !!v(t.validatingFields, a),
1130
+ isTouched: !!v((c || t).touchedFields, a)
1131
+ }), hr = (a) => {
1132
+ a && pe(a).forEach((c) => j(t.errors, c)), h.state.next({
1133
+ errors: a ? t.errors : {}
1101
1134
  });
1102
- }, ut = (i, c, u) => {
1103
- const v = (p(s, i, { _f: {} })._f || {}).ref, g = p(t.errors, i) || {}, { ref: _, message: x, type: P, ...B } = g;
1104
- D(t.errors, i, {
1105
- ...B,
1135
+ }, dt = (a, c, u) => {
1136
+ const S = (v(s, a, { _f: {} })._f || {}).ref, p = v(t.errors, a) || {}, { ref: g, message: w, type: R, ...O } = p;
1137
+ D(t.errors, a, {
1138
+ ...O,
1106
1139
  ...c,
1107
- ref: v
1108
- }), f.state.next({
1109
- name: i,
1140
+ ref: S
1141
+ }), h.state.next({
1142
+ name: a,
1110
1143
  errors: t.errors,
1111
1144
  isValid: !1
1112
- }), u && u.shouldFocus && v && v.focus && v.focus();
1113
- }, mr = (i, c) => re(i) ? f.state.subscribe({
1114
- next: (u) => "values" in u && i(A(void 0, c), u)
1115
- }) : A(i, c, !0), dt = (i) => f.state.subscribe({
1145
+ }), u && u.shouldFocus && S && S.focus && S.focus();
1146
+ }, gr = (a, c) => re(a) ? h.state.subscribe({
1147
+ next: (u) => "values" in u && a(N(void 0, c), u)
1148
+ }) : N(a, c, !0), ft = (a) => h.state.subscribe({
1116
1149
  next: (c) => {
1117
- es(i.name, c.name, i.exact) && Yr(c, i.formState || y, vr, i.reRenderRoot) && i.callback({
1118
- values: { ...o },
1150
+ ss(a.name, c.name, a.exact) && rs(c, a.formState || y, Sr, a.reRenderRoot) && a.callback({
1151
+ values: { ...n },
1119
1152
  ...t,
1120
1153
  ...c,
1121
- defaultValues: n
1154
+ defaultValues: o
1122
1155
  });
1123
1156
  }
1124
- }).unsubscribe, hr = (i) => (l.mount = !0, h = {
1125
- ...h,
1126
- ...i.formState
1127
- }, dt({
1128
- ...i,
1129
- formState: h
1130
- })), Re = (i, c = {}) => {
1131
- for (const u of i ? pe(i) : a.mount)
1132
- a.mount.delete(u), a.array.delete(u), c.keepValue || (I(s, u), I(o, u)), !c.keepError && I(t.errors, u), !c.keepDirty && I(t.dirtyFields, u), !c.keepTouched && I(t.touchedFields, u), !c.keepIsValidating && I(t.validatingFields, u), !r.shouldUnregister && !c.keepDefaultValue && I(n, u);
1133
- f.state.next({
1134
- values: U(o)
1135
- }), f.state.next({
1157
+ }).unsubscribe, _r = (a) => (i.mount = !0, m = {
1158
+ ...m,
1159
+ ...a.formState
1160
+ }, ft({
1161
+ ...a,
1162
+ formState: m
1163
+ })), Be = (a, c = {}) => {
1164
+ for (const u of a ? pe(a) : l.mount)
1165
+ l.mount.delete(u), l.array.delete(u), c.keepValue || (j(s, u), j(n, u)), !c.keepError && j(t.errors, u), !c.keepDirty && j(t.dirtyFields, u), !c.keepTouched && j(t.touchedFields, u), !c.keepIsValidating && j(t.validatingFields, u), !r.shouldUnregister && !c.keepDefaultValue && j(o, u);
1166
+ h.state.next({
1167
+ values: U(n)
1168
+ }), h.state.next({
1136
1169
  ...t,
1137
1170
  ...c.keepDirty ? { isDirty: oe() } : {}
1138
- }), !c.keepIsValid && S();
1139
- }, ft = ({ disabled: i, name: c }) => {
1140
- (K(i) && l.mount || i || a.disabled.has(c)) && (i ? a.disabled.add(c) : a.disabled.delete(c));
1141
- }, Be = (i, c = {}) => {
1142
- let u = p(s, i);
1143
- const v = K(c.disabled) || K(r.disabled);
1144
- return D(s, i, {
1171
+ }), !c.keepIsValid && _();
1172
+ }, yt = ({ disabled: a, name: c }) => {
1173
+ (K(a) && i.mount || a || l.disabled.has(c)) && (a ? l.disabled.add(c) : l.disabled.delete(c));
1174
+ }, Le = (a, c = {}) => {
1175
+ let u = v(s, a);
1176
+ const S = K(c.disabled) || K(r.disabled);
1177
+ return D(s, a, {
1145
1178
  ...u || {},
1146
1179
  _f: {
1147
- ...u && u._f ? u._f : { ref: { name: i } },
1148
- name: i,
1180
+ ...u && u._f ? u._f : { ref: { name: a } },
1181
+ name: a,
1149
1182
  mount: !0,
1150
1183
  ...c
1151
1184
  }
1152
- }), a.mount.add(i), u ? ft({
1185
+ }), l.mount.add(a), u ? yt({
1153
1186
  disabled: K(c.disabled) ? c.disabled : r.disabled,
1154
- name: i
1155
- }) : z(i, !0, c.value), {
1156
- ...v ? { disabled: c.disabled || r.disabled } : {},
1187
+ name: a
1188
+ }) : C(a, !0, c.value), {
1189
+ ...S ? { disabled: c.disabled || r.disabled } : {},
1157
1190
  ...r.progressive ? {
1158
1191
  required: !!c.required,
1159
- min: _e(c.min),
1160
- max: _e(c.max),
1161
- minLength: _e(c.minLength),
1162
- maxLength: _e(c.maxLength),
1163
- pattern: _e(c.pattern)
1192
+ min: ge(c.min),
1193
+ max: ge(c.max),
1194
+ minLength: ge(c.minLength),
1195
+ maxLength: ge(c.maxLength),
1196
+ pattern: ge(c.pattern)
1164
1197
  } : {},
1165
- name: i,
1198
+ name: a,
1166
1199
  onChange: ne,
1167
1200
  onBlur: ne,
1168
- ref: (g) => {
1169
- if (g) {
1170
- Be(i, c), u = p(s, i);
1171
- const _ = M(g.value) && g.querySelectorAll && g.querySelectorAll("input,select,textarea")[0] || g, x = qr(_), P = u._f.refs || [];
1172
- if (x ? P.find((B) => B === _) : _ === u._f.ref)
1201
+ ref: (p) => {
1202
+ if (p) {
1203
+ Le(a, c), u = v(s, a);
1204
+ const g = T(p.value) && p.querySelectorAll && p.querySelectorAll("input,select,textarea")[0] || p, w = Qr(g), R = u._f.refs || [];
1205
+ if (w ? R.find((O) => O === g) : g === u._f.ref)
1173
1206
  return;
1174
- D(s, i, {
1207
+ D(s, a, {
1175
1208
  _f: {
1176
1209
  ...u._f,
1177
- ...x ? {
1210
+ ...w ? {
1178
1211
  refs: [
1179
- ...P.filter(Ie),
1180
- _,
1181
- ...Array.isArray(p(n, i)) ? [{}] : []
1212
+ ...R.filter(je),
1213
+ g,
1214
+ ...Array.isArray(v(o, a)) ? [{}] : []
1182
1215
  ],
1183
- ref: { type: _.type, name: i }
1184
- } : { ref: _ }
1216
+ ref: { type: g.type, name: a }
1217
+ } : { ref: g }
1185
1218
  }
1186
- }), z(i, !1, void 0, _);
1219
+ }), C(a, !1, void 0, g);
1187
1220
  } else
1188
- u = p(s, i, {}), u._f && (u._f.mount = !1), (r.shouldUnregister || c.shouldUnregister) && !(Kt(a.array, i) && l.action) && a.unMount.add(i);
1221
+ u = v(s, a, {}), u._f && (u._f.mount = !1), (r.shouldUnregister || c.shouldUnregister) && !(Xt(l.array, a) && i.action) && l.unMount.add(a);
1189
1222
  }
1190
1223
  };
1191
- }, Oe = () => r.shouldFocusError && ve(s, he, a.mount), _r = (i) => {
1192
- K(i) && (f.state.next({ disabled: i }), ve(s, (c, u) => {
1193
- const v = p(s, u);
1194
- v && (c.disabled = v._f.disabled || i, Array.isArray(v._f.refs) && v._f.refs.forEach((g) => {
1195
- g.disabled = v._f.disabled || i;
1224
+ }, Oe = () => r.shouldFocusError && ve(s, he, l.mount), pr = (a) => {
1225
+ K(a) && (h.state.next({ disabled: a }), ve(s, (c, u) => {
1226
+ const S = v(s, u);
1227
+ S && (c.disabled = S._f.disabled || a, Array.isArray(S._f.refs) && S._f.refs.forEach((p) => {
1228
+ p.disabled = S._f.disabled || a;
1196
1229
  }));
1197
1230
  }, 0, !1));
1198
- }, yt = (i, c) => async (u) => {
1199
- let v;
1231
+ }, mt = (a, c) => async (u) => {
1232
+ let S;
1200
1233
  u && (u.preventDefault && u.preventDefault(), u.persist && u.persist());
1201
- let g = U(o);
1202
- if (f.state.next({
1234
+ let p = U(n);
1235
+ if (h.state.next({
1203
1236
  isSubmitting: !0
1204
1237
  }), r.resolver) {
1205
- const { errors: _, values: x } = await X();
1206
- t.errors = _, g = U(x);
1238
+ const { errors: g, values: w } = await P();
1239
+ t.errors = g, p = U(w);
1207
1240
  } else
1208
- await q(s);
1209
- if (a.disabled.size)
1210
- for (const _ of a.disabled)
1211
- I(g, _);
1212
- if (I(t.errors, "root"), W(t.errors)) {
1213
- f.state.next({
1241
+ await Y(s);
1242
+ if (l.disabled.size)
1243
+ for (const g of l.disabled)
1244
+ j(p, g);
1245
+ if (j(t.errors, "root"), q(t.errors)) {
1246
+ h.state.next({
1214
1247
  errors: {}
1215
1248
  });
1216
1249
  try {
1217
- await i(g, u);
1218
- } catch (_) {
1219
- v = _;
1250
+ await a(p, u);
1251
+ } catch (g) {
1252
+ S = g;
1220
1253
  }
1221
1254
  } else
1222
1255
  c && await c({ ...t.errors }, u), Oe(), setTimeout(Oe);
1223
- if (f.state.next({
1256
+ if (h.state.next({
1224
1257
  isSubmitted: !0,
1225
1258
  isSubmitting: !1,
1226
- isSubmitSuccessful: W(t.errors) && !v,
1259
+ isSubmitSuccessful: q(t.errors) && !S,
1227
1260
  submitCount: t.submitCount + 1,
1228
1261
  errors: t.errors
1229
- }), v)
1230
- throw v;
1231
- }, gr = (i, c = {}) => {
1232
- p(s, i) && (M(c.defaultValue) ? G(i, U(p(n, i))) : (G(i, c.defaultValue), D(n, i, U(c.defaultValue))), c.keepTouched || I(t.touchedFields, i), c.keepDirty || (I(t.dirtyFields, i), t.isDirty = c.defaultValue ? oe(i, U(p(n, i))) : oe()), c.keepError || (I(t.errors, i), y.isValid && S()), f.state.next({ ...t }));
1233
- }, mt = (i, c = {}) => {
1234
- const u = i ? U(i) : n, v = U(u), g = W(i), _ = g ? n : v;
1235
- if (c.keepDefaultValues || (n = u), !c.keepValues) {
1262
+ }), S)
1263
+ throw S;
1264
+ }, vr = (a, c = {}) => {
1265
+ v(s, a) && (T(c.defaultValue) ? G(a, U(v(o, a))) : (G(a, c.defaultValue), D(o, a, U(c.defaultValue))), c.keepTouched || j(t.touchedFields, a), c.keepDirty || (j(t.dirtyFields, a), t.isDirty = c.defaultValue ? oe(a, U(v(o, a))) : oe()), c.keepError || (j(t.errors, a), y.isValid && _()), h.state.next({ ...t }));
1266
+ }, ht = (a, c = {}) => {
1267
+ const u = a ? U(a) : o, S = U(u), p = q(a), g = p ? o : S;
1268
+ if (c.keepDefaultValues || (o = u), !c.keepValues) {
1236
1269
  if (c.keepDirtyValues) {
1237
- const x = /* @__PURE__ */ new Set([
1238
- ...a.mount,
1239
- ...Object.keys(me(n, o))
1270
+ const w = /* @__PURE__ */ new Set([
1271
+ ...l.mount,
1272
+ ...Object.keys(me(o, n))
1240
1273
  ]);
1241
- for (const P of Array.from(x))
1242
- p(t.dirtyFields, P) ? D(_, P, p(o, P)) : G(P, p(_, P));
1274
+ for (const R of Array.from(w))
1275
+ v(t.dirtyFields, R) ? D(g, R, v(n, R)) : G(R, v(g, R));
1243
1276
  } else {
1244
- if (tt && M(i))
1245
- for (const x of a.mount) {
1246
- const P = p(s, x);
1247
- if (P && P._f) {
1248
- const B = Array.isArray(P._f.refs) ? P._f.refs[0] : P._f.ref;
1249
- if (Pe(B)) {
1250
- const Y = B.closest("form");
1251
- if (Y) {
1252
- Y.reset();
1277
+ if (rt && T(a))
1278
+ for (const w of l.mount) {
1279
+ const R = v(s, w);
1280
+ if (R && R._f) {
1281
+ const O = Array.isArray(R._f.refs) ? R._f.refs[0] : R._f.ref;
1282
+ if (Ne(O)) {
1283
+ const X = O.closest("form");
1284
+ if (X) {
1285
+ X.reset();
1253
1286
  break;
1254
1287
  }
1255
1288
  }
1256
1289
  }
1257
1290
  }
1258
1291
  if (c.keepFieldsRef)
1259
- for (const x of a.mount)
1260
- G(x, p(_, x));
1292
+ for (const w of l.mount)
1293
+ G(w, v(g, w));
1261
1294
  else
1262
1295
  s = {};
1263
1296
  }
1264
- o = r.shouldUnregister ? c.keepDefaultValues ? U(n) : {} : U(_), f.array.next({
1265
- values: { ..._ }
1266
- }), f.state.next({
1267
- values: { ..._ }
1297
+ n = r.shouldUnregister ? c.keepDefaultValues ? U(o) : {} : U(g), h.array.next({
1298
+ values: { ...g }
1299
+ }), h.state.next({
1300
+ values: { ...g }
1268
1301
  });
1269
1302
  }
1270
- a = {
1271
- mount: c.keepDirtyValues ? a.mount : /* @__PURE__ */ new Set(),
1303
+ l = {
1304
+ mount: c.keepDirtyValues ? l.mount : /* @__PURE__ */ new Set(),
1272
1305
  unMount: /* @__PURE__ */ new Set(),
1273
1306
  array: /* @__PURE__ */ new Set(),
1274
1307
  disabled: /* @__PURE__ */ new Set(),
1275
1308
  watch: /* @__PURE__ */ new Set(),
1276
1309
  watchAll: !1,
1277
1310
  focus: ""
1278
- }, l.mount = !y.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !r.shouldUnregister && !W(_), l.watch = !!r.shouldUnregister, f.state.next({
1311
+ }, i.mount = !y.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !r.shouldUnregister && !q(g), i.watch = !!r.shouldUnregister, h.state.next({
1279
1312
  submitCount: c.keepSubmitCount ? t.submitCount : 0,
1280
- isDirty: g ? !1 : c.keepDirty ? t.isDirty : !!(c.keepDefaultValues && !te(i, n)),
1313
+ isDirty: p ? !1 : c.keepDirty ? t.isDirty : !!(c.keepDefaultValues && !te(a, o)),
1281
1314
  isSubmitted: c.keepIsSubmitted ? t.isSubmitted : !1,
1282
- dirtyFields: g ? {} : c.keepDirtyValues ? c.keepDefaultValues && o ? me(n, o) : t.dirtyFields : c.keepDefaultValues && i ? me(n, i) : c.keepDirty ? t.dirtyFields : {},
1315
+ dirtyFields: p ? {} : c.keepDirtyValues ? c.keepDefaultValues && n ? me(o, n) : t.dirtyFields : c.keepDefaultValues && a ? me(o, a) : c.keepDirty ? t.dirtyFields : {},
1283
1316
  touchedFields: c.keepTouched ? t.touchedFields : {},
1284
1317
  errors: c.keepErrors ? t.errors : {},
1285
1318
  isSubmitSuccessful: c.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
1286
1319
  isSubmitting: !1,
1287
- defaultValues: n
1320
+ defaultValues: o
1288
1321
  });
1289
- }, ht = (i, c) => mt(re(i) ? i(o) : i, c), pr = (i, c = {}) => {
1290
- const u = p(s, i), v = u && u._f;
1291
- if (v) {
1292
- const g = v.refs ? v.refs[0] : v.ref;
1293
- g.focus && (g.focus(), c.shouldSelect && re(g.select) && g.select());
1322
+ }, gt = (a, c) => ht(re(a) ? a(n) : a, c), br = (a, c = {}) => {
1323
+ const u = v(s, a), S = u && u._f;
1324
+ if (S) {
1325
+ const p = S.refs ? S.refs[0] : S.ref;
1326
+ p.focus && (p.focus(), c.shouldSelect && re(p.select) && p.select());
1294
1327
  }
1295
- }, vr = (i) => {
1328
+ }, Sr = (a) => {
1296
1329
  t = {
1297
1330
  ...t,
1298
- ...i
1331
+ ...a
1299
1332
  };
1300
1333
  }, _t = {
1301
1334
  control: {
1302
- register: Be,
1303
- unregister: Re,
1304
- getFieldState: ct,
1305
- handleSubmit: yt,
1306
- setError: ut,
1307
- _subscribe: dt,
1308
- _runSchema: X,
1335
+ register: Le,
1336
+ unregister: Be,
1337
+ getFieldState: ut,
1338
+ handleSubmit: mt,
1339
+ setError: dt,
1340
+ _subscribe: ft,
1341
+ _runSchema: P,
1309
1342
  _focusError: Oe,
1310
- _getWatch: A,
1343
+ _getWatch: N,
1311
1344
  _getDirty: oe,
1312
- _setValid: S,
1313
- _setFieldArray: R,
1314
- _setDisabledField: ft,
1315
- _setErrors: $,
1316
- _getFieldArray: N,
1317
- _reset: mt,
1318
- _resetDefaultValues: () => re(r.defaultValues) && r.defaultValues().then((i) => {
1319
- ht(i, r.resetOptions), f.state.next({
1345
+ _setValid: _,
1346
+ _setFieldArray: E,
1347
+ _setDisabledField: yt,
1348
+ _setErrors: k,
1349
+ _getFieldArray: B,
1350
+ _reset: ht,
1351
+ _resetDefaultValues: () => re(r.defaultValues) && r.defaultValues().then((a) => {
1352
+ gt(a, r.resetOptions), h.state.next({
1320
1353
  isLoading: !1
1321
1354
  });
1322
1355
  }),
1323
- _removeUnmounted: se,
1324
- _disableForm: _r,
1325
- _subjects: f,
1356
+ _removeUnmounted: ce,
1357
+ _disableForm: pr,
1358
+ _subjects: h,
1326
1359
  _proxyFormState: y,
1327
1360
  get _fields() {
1328
1361
  return s;
1329
1362
  },
1330
1363
  get _formValues() {
1331
- return o;
1364
+ return n;
1332
1365
  },
1333
1366
  get _state() {
1334
- return l;
1367
+ return i;
1335
1368
  },
1336
- set _state(i) {
1337
- l = i;
1369
+ set _state(a) {
1370
+ i = a;
1338
1371
  },
1339
1372
  get _defaultValues() {
1340
- return n;
1373
+ return o;
1341
1374
  },
1342
1375
  get _names() {
1343
- return a;
1376
+ return l;
1344
1377
  },
1345
- set _names(i) {
1346
- a = i;
1378
+ set _names(a) {
1379
+ l = a;
1347
1380
  },
1348
1381
  get _formState() {
1349
1382
  return t;
@@ -1351,35 +1384,35 @@ function ns(e = {}) {
1351
1384
  get _options() {
1352
1385
  return r;
1353
1386
  },
1354
- set _options(i) {
1387
+ set _options(a) {
1355
1388
  r = {
1356
1389
  ...r,
1357
- ...i
1390
+ ...a
1358
1391
  };
1359
1392
  }
1360
1393
  },
1361
- subscribe: hr,
1394
+ subscribe: _r,
1362
1395
  trigger: de,
1363
- register: Be,
1364
- handleSubmit: yt,
1365
- watch: mr,
1396
+ register: Le,
1397
+ handleSubmit: mt,
1398
+ watch: gr,
1366
1399
  setValue: G,
1367
- getValues: Fe,
1368
- reset: ht,
1369
- resetField: gr,
1370
- clearErrors: yr,
1371
- unregister: Re,
1372
- setError: ut,
1373
- setFocus: pr,
1374
- getFieldState: ct
1400
+ getValues: xe,
1401
+ reset: gt,
1402
+ resetField: vr,
1403
+ clearErrors: hr,
1404
+ unregister: Be,
1405
+ setError: dt,
1406
+ setFocus: br,
1407
+ getFieldState: ut
1375
1408
  };
1376
1409
  return {
1377
1410
  ..._t,
1378
1411
  formControl: _t
1379
1412
  };
1380
1413
  }
1381
- function is(e = {}) {
1382
- const r = V.useRef(void 0), t = V.useRef(void 0), [s, n] = V.useState({
1414
+ function cs(e = {}) {
1415
+ const r = $.useRef(void 0), t = $.useRef(void 0), [s, o] = $.useState({
1383
1416
  isDirty: !1,
1384
1417
  isValidating: !1,
1385
1418
  isLoading: re(e.defaultValues),
@@ -1403,161 +1436,161 @@ function is(e = {}) {
1403
1436
  formState: s
1404
1437
  }, e.defaultValues && !re(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
1405
1438
  else {
1406
- const { formControl: l, ...a } = ns(e);
1439
+ const { formControl: i, ...l } = ls(e);
1407
1440
  r.current = {
1408
- ...a,
1441
+ ...l,
1409
1442
  formState: s
1410
1443
  };
1411
1444
  }
1412
- const o = r.current.control;
1413
- return o._options = e, nt(() => {
1414
- const l = o._subscribe({
1415
- formState: o._proxyFormState,
1416
- callback: () => n({ ...o._formState }),
1445
+ const n = r.current.control;
1446
+ return n._options = e, it(() => {
1447
+ const i = n._subscribe({
1448
+ formState: n._proxyFormState,
1449
+ callback: () => o({ ...n._formState }),
1417
1450
  reRenderRoot: !0
1418
1451
  });
1419
- return n((a) => ({
1420
- ...a,
1452
+ return o((l) => ({
1453
+ ...l,
1421
1454
  isReady: !0
1422
- })), o._formState.isReady = !0, l;
1423
- }, [o]), V.useEffect(() => o._disableForm(e.disabled), [o, e.disabled]), V.useEffect(() => {
1424
- e.mode && (o._options.mode = e.mode), e.reValidateMode && (o._options.reValidateMode = e.reValidateMode);
1425
- }, [o, e.mode, e.reValidateMode]), V.useEffect(() => {
1426
- e.errors && (o._setErrors(e.errors), o._focusError());
1427
- }, [o, e.errors]), V.useEffect(() => {
1428
- e.shouldUnregister && o._subjects.state.next({
1429
- values: o._getWatch()
1455
+ })), n._formState.isReady = !0, i;
1456
+ }, [n]), $.useEffect(() => n._disableForm(e.disabled), [n, e.disabled]), $.useEffect(() => {
1457
+ e.mode && (n._options.mode = e.mode), e.reValidateMode && (n._options.reValidateMode = e.reValidateMode);
1458
+ }, [n, e.mode, e.reValidateMode]), $.useEffect(() => {
1459
+ e.errors && (n._setErrors(e.errors), n._focusError());
1460
+ }, [n, e.errors]), $.useEffect(() => {
1461
+ e.shouldUnregister && n._subjects.state.next({
1462
+ values: n._getWatch()
1430
1463
  });
1431
- }, [o, e.shouldUnregister]), V.useEffect(() => {
1432
- if (o._proxyFormState.isDirty) {
1433
- const l = o._getDirty();
1434
- l !== s.isDirty && o._subjects.state.next({
1435
- isDirty: l
1464
+ }, [n, e.shouldUnregister]), $.useEffect(() => {
1465
+ if (n._proxyFormState.isDirty) {
1466
+ const i = n._getDirty();
1467
+ i !== s.isDirty && n._subjects.state.next({
1468
+ isDirty: i
1436
1469
  });
1437
1470
  }
1438
- }, [o, s.isDirty]), V.useEffect(() => {
1439
- e.values && !te(e.values, t.current) ? (o._reset(e.values, {
1471
+ }, [n, s.isDirty]), $.useEffect(() => {
1472
+ e.values && !te(e.values, t.current) ? (n._reset(e.values, {
1440
1473
  keepFieldsRef: !0,
1441
- ...o._options.resetOptions
1442
- }), t.current = e.values, n((l) => ({ ...l }))) : o._resetDefaultValues();
1443
- }, [o, e.values]), V.useEffect(() => {
1444
- o._state.mount || (o._setValid(), o._state.mount = !0), o._state.watch && (o._state.watch = !1, o._subjects.state.next({ ...o._formState })), o._removeUnmounted();
1445
- }), r.current.formState = Xt(s, o), r.current;
1474
+ ...n._options.resetOptions
1475
+ }), t.current = e.values, o((i) => ({ ...i }))) : n._resetDefaultValues();
1476
+ }, [n, e.values]), $.useEffect(() => {
1477
+ n._state.mount || (n._setValid(), n._state.mount = !0), n._state.watch && (n._state.watch = !1, n._subjects.state.next({ ...n._formState })), n._removeUnmounted();
1478
+ }), r.current.formState = er(s, n), r.current;
1446
1479
  }
1447
- const Nt = (e, r, t) => {
1480
+ const Bt = (e, r, t) => {
1448
1481
  if (e && "reportValidity" in e) {
1449
- const s = p(t, r);
1482
+ const s = v(t, r);
1450
1483
  e.setCustomValidity(s && s.message || ""), e.reportValidity();
1451
1484
  }
1452
- }, Ke = (e, r) => {
1485
+ }, Xe = (e, r) => {
1453
1486
  for (const t in r.fields) {
1454
1487
  const s = r.fields[t];
1455
- s && s.ref && "reportValidity" in s.ref ? Nt(s.ref, t, e) : s && s.refs && s.refs.forEach((n) => Nt(n, t, e));
1488
+ s && s.ref && "reportValidity" in s.ref ? Bt(s.ref, t, e) : s && s.refs && s.refs.forEach((o) => Bt(o, t, e));
1456
1489
  }
1457
- }, Rt = (e, r) => {
1458
- r.shouldUseNativeValidation && Ke(e, r);
1490
+ }, Lt = (e, r) => {
1491
+ r.shouldUseNativeValidation && Xe(e, r);
1459
1492
  const t = {};
1460
1493
  for (const s in e) {
1461
- const n = p(r.fields, s), o = Object.assign(e[s] || {}, { ref: n && n.ref });
1462
- if (as(r.names || Object.keys(e), s)) {
1463
- const l = Object.assign({}, p(t, s));
1464
- D(l, "root", o), D(t, s, l);
1465
- } else D(t, s, o);
1494
+ const o = v(r.fields, s), n = Object.assign(e[s] || {}, { ref: o && o.ref });
1495
+ if (us(r.names || Object.keys(e), s)) {
1496
+ const i = Object.assign({}, v(t, s));
1497
+ D(i, "root", n), D(t, s, i);
1498
+ } else D(t, s, n);
1466
1499
  }
1467
1500
  return t;
1468
- }, as = (e, r) => {
1469
- const t = Bt(r);
1470
- return e.some((s) => Bt(s).match(`^${t}\\.\\d+`));
1501
+ }, us = (e, r) => {
1502
+ const t = Ot(r);
1503
+ return e.some((s) => Ot(s).match(`^${t}\\.\\d+`));
1471
1504
  };
1472
- function Bt(e) {
1505
+ function Ot(e) {
1473
1506
  return e.replace(/\]|\[/g, "");
1474
1507
  }
1475
- function nr(e, r, t) {
1476
- function s(a, d) {
1477
- var m;
1478
- Object.defineProperty(a, "_zod", {
1479
- value: a._zod ?? {},
1508
+ function ar(e, r, t) {
1509
+ function s(l, d) {
1510
+ var f;
1511
+ Object.defineProperty(l, "_zod", {
1512
+ value: l._zod ?? {},
1480
1513
  enumerable: !1
1481
- }), (m = a._zod).traits ?? (m.traits = /* @__PURE__ */ new Set()), a._zod.traits.add(e), r(a, d);
1482
- for (const y in l.prototype)
1483
- y in a || Object.defineProperty(a, y, { value: l.prototype[y].bind(a) });
1484
- a._zod.constr = l, a._zod.def = d;
1514
+ }), (f = l._zod).traits ?? (f.traits = /* @__PURE__ */ new Set()), l._zod.traits.add(e), r(l, d);
1515
+ for (const y in i.prototype)
1516
+ y in l || Object.defineProperty(l, y, { value: i.prototype[y].bind(l) });
1517
+ l._zod.constr = i, l._zod.def = d;
1485
1518
  }
1486
- const n = (t == null ? void 0 : t.Parent) ?? Object;
1487
- class o extends n {
1519
+ const o = (t == null ? void 0 : t.Parent) ?? Object;
1520
+ class n extends o {
1488
1521
  }
1489
- Object.defineProperty(o, "name", { value: e });
1490
- function l(a) {
1522
+ Object.defineProperty(n, "name", { value: e });
1523
+ function i(l) {
1491
1524
  var d;
1492
- const m = t != null && t.Parent ? new o() : this;
1493
- s(m, a), (d = m._zod).deferred ?? (d.deferred = []);
1494
- for (const y of m._zod.deferred)
1525
+ const f = t != null && t.Parent ? new n() : this;
1526
+ s(f, l), (d = f._zod).deferred ?? (d.deferred = []);
1527
+ for (const y of f._zod.deferred)
1495
1528
  y();
1496
- return m;
1529
+ return f;
1497
1530
  }
1498
- return Object.defineProperty(l, "init", { value: s }), Object.defineProperty(l, Symbol.hasInstance, {
1499
- value: (a) => {
1500
- var d, m;
1501
- return t != null && t.Parent && a instanceof t.Parent ? !0 : (m = (d = a == null ? void 0 : a._zod) == null ? void 0 : d.traits) == null ? void 0 : m.has(e);
1531
+ return Object.defineProperty(i, "init", { value: s }), Object.defineProperty(i, Symbol.hasInstance, {
1532
+ value: (l) => {
1533
+ var d, f;
1534
+ return t != null && t.Parent && l instanceof t.Parent ? !0 : (f = (d = l == null ? void 0 : l._zod) == null ? void 0 : d.traits) == null ? void 0 : f.has(e);
1502
1535
  }
1503
- }), Object.defineProperty(l, "name", { value: e }), l;
1536
+ }), Object.defineProperty(i, "name", { value: e }), i;
1504
1537
  }
1505
- class ls extends Error {
1538
+ class ds extends Error {
1506
1539
  constructor() {
1507
1540
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
1508
1541
  }
1509
1542
  }
1510
- const cs = {};
1511
- function ir(e) {
1512
- return cs;
1543
+ const fs = {};
1544
+ function lr(e) {
1545
+ return fs;
1513
1546
  }
1514
- function us(e, r) {
1547
+ function ys(e, r) {
1515
1548
  return typeof r == "bigint" ? r.toString() : r;
1516
1549
  }
1517
- const ar = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1550
+ const cr = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1518
1551
  };
1519
- function Ce(e) {
1552
+ function ze(e) {
1520
1553
  return typeof e == "string" ? e : e == null ? void 0 : e.message;
1521
1554
  }
1522
- function lr(e, r, t) {
1523
- var n, o, l, a, d, m;
1555
+ function ur(e, r, t) {
1556
+ var o, n, i, l, d, f;
1524
1557
  const s = { ...e, path: e.path ?? [] };
1525
1558
  if (!e.message) {
1526
- const y = Ce((l = (o = (n = e.inst) == null ? void 0 : n._zod.def) == null ? void 0 : o.error) == null ? void 0 : l.call(o, e)) ?? Ce((a = r == null ? void 0 : r.error) == null ? void 0 : a.call(r, e)) ?? Ce((d = t.customError) == null ? void 0 : d.call(t, e)) ?? Ce((m = t.localeError) == null ? void 0 : m.call(t, e)) ?? "Invalid input";
1559
+ const y = ze((i = (n = (o = e.inst) == null ? void 0 : o._zod.def) == null ? void 0 : n.error) == null ? void 0 : i.call(n, e)) ?? ze((l = r == null ? void 0 : r.error) == null ? void 0 : l.call(r, e)) ?? ze((d = t.customError) == null ? void 0 : d.call(t, e)) ?? ze((f = t.localeError) == null ? void 0 : f.call(t, e)) ?? "Invalid input";
1527
1560
  s.message = y;
1528
1561
  }
1529
1562
  return delete s.inst, delete s.continue, r != null && r.reportInput || delete s.input, s;
1530
1563
  }
1531
- const cr = (e, r) => {
1564
+ const dr = (e, r) => {
1532
1565
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
1533
1566
  value: e._zod,
1534
1567
  enumerable: !1
1535
1568
  }), Object.defineProperty(e, "issues", {
1536
1569
  value: r,
1537
1570
  enumerable: !1
1538
- }), e.message = JSON.stringify(r, us, 2), Object.defineProperty(e, "toString", {
1571
+ }), e.message = JSON.stringify(r, ys, 2), Object.defineProperty(e, "toString", {
1539
1572
  value: () => e.message,
1540
1573
  enumerable: !1
1541
1574
  });
1542
- }, ds = nr("$ZodError", cr), ur = nr("$ZodError", cr, { Parent: Error }), fs = (e) => (r, t, s, n) => {
1543
- const o = s ? Object.assign(s, { async: !1 }) : { async: !1 }, l = r._zod.run({ value: t, issues: [] }, o);
1544
- if (l instanceof Promise)
1545
- throw new ls();
1546
- if (l.issues.length) {
1547
- const a = new ((n == null ? void 0 : n.Err) ?? e)(l.issues.map((d) => lr(d, o, ir())));
1548
- throw ar(a, n == null ? void 0 : n.callee), a;
1575
+ }, ms = ar("$ZodError", dr), fr = ar("$ZodError", dr, { Parent: Error }), hs = (e) => (r, t, s, o) => {
1576
+ const n = s ? Object.assign(s, { async: !1 }) : { async: !1 }, i = r._zod.run({ value: t, issues: [] }, n);
1577
+ if (i instanceof Promise)
1578
+ throw new ds();
1579
+ if (i.issues.length) {
1580
+ const l = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((d) => ur(d, n, lr())));
1581
+ throw cr(l, o == null ? void 0 : o.callee), l;
1549
1582
  }
1550
- return l.value;
1551
- }, ys = /* @__PURE__ */ fs(ur), ms = (e) => async (r, t, s, n) => {
1552
- const o = s ? Object.assign(s, { async: !0 }) : { async: !0 };
1553
- let l = r._zod.run({ value: t, issues: [] }, o);
1554
- if (l instanceof Promise && (l = await l), l.issues.length) {
1555
- const a = new ((n == null ? void 0 : n.Err) ?? e)(l.issues.map((d) => lr(d, o, ir())));
1556
- throw ar(a, n == null ? void 0 : n.callee), a;
1583
+ return i.value;
1584
+ }, gs = /* @__PURE__ */ hs(fr), _s = (e) => async (r, t, s, o) => {
1585
+ const n = s ? Object.assign(s, { async: !0 }) : { async: !0 };
1586
+ let i = r._zod.run({ value: t, issues: [] }, n);
1587
+ if (i instanceof Promise && (i = await i), i.issues.length) {
1588
+ const l = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((d) => ur(d, n, lr())));
1589
+ throw cr(l, o == null ? void 0 : o.callee), l;
1557
1590
  }
1558
- return l.value;
1559
- }, hs = /* @__PURE__ */ ms(ur);
1560
- function Ot(e, r) {
1591
+ return i.value;
1592
+ }, ps = /* @__PURE__ */ _s(fr);
1593
+ function Tt(e, r) {
1561
1594
  try {
1562
1595
  var t = e();
1563
1596
  } catch (s) {
@@ -1565,221 +1598,215 @@ function Ot(e, r) {
1565
1598
  }
1566
1599
  return t && t.then ? t.then(void 0, r) : t;
1567
1600
  }
1568
- function _s(e, r) {
1601
+ function vs(e, r) {
1569
1602
  for (var t = {}; e.length; ) {
1570
- var s = e[0], n = s.code, o = s.message, l = s.path.join(".");
1571
- if (!t[l]) if ("unionErrors" in s) {
1572
- var a = s.unionErrors[0].errors[0];
1573
- t[l] = { message: a.message, type: a.code };
1574
- } else t[l] = { message: o, type: n };
1603
+ var s = e[0], o = s.code, n = s.message, i = s.path.join(".");
1604
+ if (!t[i]) if ("unionErrors" in s) {
1605
+ var l = s.unionErrors[0].errors[0];
1606
+ t[i] = { message: l.message, type: l.code };
1607
+ } else t[i] = { message: n, type: o };
1575
1608
  if ("unionErrors" in s && s.unionErrors.forEach(function(y) {
1576
- return y.errors.forEach(function(h) {
1577
- return e.push(h);
1609
+ return y.errors.forEach(function(m) {
1610
+ return e.push(m);
1578
1611
  });
1579
1612
  }), r) {
1580
- var d = t[l].types, m = d && d[s.code];
1581
- t[l] = it(l, r, t, n, m ? [].concat(m, s.message) : s.message);
1613
+ var d = t[i].types, f = d && d[s.code];
1614
+ t[i] = at(i, r, t, o, f ? [].concat(f, s.message) : s.message);
1582
1615
  }
1583
1616
  e.shift();
1584
1617
  }
1585
1618
  return t;
1586
1619
  }
1587
- function gs(e, r) {
1620
+ function bs(e, r) {
1588
1621
  for (var t = {}; e.length; ) {
1589
- var s = e[0], n = s.code, o = s.message, l = s.path.join(".");
1590
- if (!t[l]) if (s.code === "invalid_union" && s.errors.length > 0) {
1591
- var a = s.errors[0][0];
1592
- t[l] = { message: a.message, type: a.code };
1593
- } else t[l] = { message: o, type: n };
1622
+ var s = e[0], o = s.code, n = s.message, i = s.path.join(".");
1623
+ if (!t[i]) if (s.code === "invalid_union" && s.errors.length > 0) {
1624
+ var l = s.errors[0][0];
1625
+ t[i] = { message: l.message, type: l.code };
1626
+ } else t[i] = { message: n, type: o };
1594
1627
  if (s.code === "invalid_union" && s.errors.forEach(function(y) {
1595
- return y.forEach(function(h) {
1596
- return e.push(h);
1628
+ return y.forEach(function(m) {
1629
+ return e.push(m);
1597
1630
  });
1598
1631
  }), r) {
1599
- var d = t[l].types, m = d && d[s.code];
1600
- t[l] = it(l, r, t, n, m ? [].concat(m, s.message) : s.message);
1632
+ var d = t[i].types, f = d && d[s.code];
1633
+ t[i] = at(i, r, t, o, f ? [].concat(f, s.message) : s.message);
1601
1634
  }
1602
1635
  e.shift();
1603
1636
  }
1604
1637
  return t;
1605
1638
  }
1606
- function ps(e, r, t) {
1639
+ function Ss(e, r, t) {
1607
1640
  if (t === void 0 && (t = {}), (function(s) {
1608
1641
  return "_def" in s && typeof s._def == "object" && "typeName" in s._def;
1609
- })(e)) return function(s, n, o) {
1642
+ })(e)) return function(s, o, n) {
1610
1643
  try {
1611
- return Promise.resolve(Ot(function() {
1612
- return Promise.resolve(e[t.mode === "sync" ? "parse" : "parseAsync"](s, r)).then(function(l) {
1613
- return o.shouldUseNativeValidation && Ke({}, o), { errors: {}, values: t.raw ? Object.assign({}, s) : l };
1644
+ return Promise.resolve(Tt(function() {
1645
+ return Promise.resolve(e[t.mode === "sync" ? "parse" : "parseAsync"](s, r)).then(function(i) {
1646
+ return n.shouldUseNativeValidation && Xe({}, n), { errors: {}, values: t.raw ? Object.assign({}, s) : i };
1614
1647
  });
1615
- }, function(l) {
1616
- if ((function(a) {
1617
- return Array.isArray(a == null ? void 0 : a.issues);
1618
- })(l)) return { values: {}, errors: Rt(_s(l.errors, !o.shouldUseNativeValidation && o.criteriaMode === "all"), o) };
1619
- throw l;
1648
+ }, function(i) {
1649
+ if ((function(l) {
1650
+ return Array.isArray(l == null ? void 0 : l.issues);
1651
+ })(i)) return { values: {}, errors: Lt(vs(i.errors, !n.shouldUseNativeValidation && n.criteriaMode === "all"), n) };
1652
+ throw i;
1620
1653
  }));
1621
- } catch (l) {
1622
- return Promise.reject(l);
1654
+ } catch (i) {
1655
+ return Promise.reject(i);
1623
1656
  }
1624
1657
  };
1625
1658
  if ((function(s) {
1626
1659
  return "_zod" in s && typeof s._zod == "object";
1627
- })(e)) return function(s, n, o) {
1660
+ })(e)) return function(s, o, n) {
1628
1661
  try {
1629
- return Promise.resolve(Ot(function() {
1630
- return Promise.resolve((t.mode === "sync" ? ys : hs)(e, s, r)).then(function(l) {
1631
- return o.shouldUseNativeValidation && Ke({}, o), { errors: {}, values: t.raw ? Object.assign({}, s) : l };
1662
+ return Promise.resolve(Tt(function() {
1663
+ return Promise.resolve((t.mode === "sync" ? gs : ps)(e, s, r)).then(function(i) {
1664
+ return n.shouldUseNativeValidation && Xe({}, n), { errors: {}, values: t.raw ? Object.assign({}, s) : i };
1632
1665
  });
1633
- }, function(l) {
1634
- if ((function(a) {
1635
- return a instanceof ds;
1636
- })(l)) return { values: {}, errors: Rt(gs(l.issues, !o.shouldUseNativeValidation && o.criteriaMode === "all"), o) };
1637
- throw l;
1666
+ }, function(i) {
1667
+ if ((function(l) {
1668
+ return l instanceof ms;
1669
+ })(i)) return { values: {}, errors: Lt(bs(i.issues, !n.shouldUseNativeValidation && n.criteriaMode === "all"), n) };
1670
+ throw i;
1638
1671
  }));
1639
- } catch (l) {
1640
- return Promise.reject(l);
1672
+ } catch (i) {
1673
+ return Promise.reject(i);
1641
1674
  }
1642
1675
  };
1643
1676
  throw new Error("Invalid input: not a Zod schema");
1644
1677
  }
1645
- const dr = V.createContext(null);
1646
- function vs() {
1647
- const e = V.useContext(dr);
1678
+ const yr = $.createContext(null);
1679
+ function Fs() {
1680
+ const e = $.useContext(yr);
1648
1681
  if (!e)
1649
1682
  throw new Error("useFormContext must be used within a Form component");
1650
1683
  return e;
1651
1684
  }
1652
- function bs({
1685
+ function xs({
1653
1686
  onSubmit: e,
1654
1687
  children: r,
1655
1688
  schema: t,
1656
1689
  defaultValues: s,
1657
- mode: n = "onSubmit",
1658
- reValidateMode: o = "onChange",
1659
- ...l
1690
+ mode: o = "onSubmit",
1691
+ reValidateMode: n = "onChange",
1692
+ ...i
1660
1693
  }) {
1661
- const a = is({
1662
- resolver: t ? ps(t) : void 0,
1694
+ const l = cs({
1695
+ resolver: t ? Ss(t) : void 0,
1663
1696
  defaultValues: s,
1664
- mode: n,
1665
- reValidateMode: o
1666
- }), d = a.handleSubmit(e);
1667
- return /* @__PURE__ */ w(dr.Provider, { value: a, children: /* @__PURE__ */ w("form", { onSubmit: d, ...l, children: typeof r == "function" ? r(a) : r }) });
1697
+ mode: o,
1698
+ reValidateMode: n
1699
+ }), d = l.handleSubmit(e);
1700
+ return /* @__PURE__ */ V(yr.Provider, { value: l, children: /* @__PURE__ */ V("form", { onSubmit: d, ...i, children: typeof r == "function" ? r(l) : r }) });
1668
1701
  }
1669
- const Ho = bs, Ss = "FormError-module__formError___kaUBn", ws = {
1670
- formError: Ss
1671
- }, Fs = ({ children: e, className: r, style: t }) => {
1672
- const s = L(), n = {
1673
- "--form-error-margin-top": `calc(${s.fonts.rhythm} * 0.17)`,
1674
- color: s.colors.error,
1675
- ...t
1676
- };
1677
- return /* @__PURE__ */ w(
1678
- "div",
1679
- {
1680
- className: `${ws.formError} ${r || ""}`.trim(),
1681
- style: n,
1682
- role: "alert",
1683
- "aria-live": "polite",
1684
- children: e
1685
- }
1686
- );
1687
- }, xs = "FormGroup-module__formGroup___aVI-B", ks = "FormGroup-module__inputWrapper___429QE", Vs = "FormGroup-module__indented___t61iz", Cs = "FormGroup-module__disabled___W-tJ0", Es = "FormGroup-module__required___mO3xA", ye = {
1688
- formGroup: xs,
1689
- inputWrapper: ks,
1690
- indented: Vs,
1691
- disabled: Cs,
1692
- required: Es
1693
- }, zs = ({
1702
+ const Po = xs, Vs = "FormError-module__formError___kaUBn", ws = {
1703
+ formError: Vs
1704
+ }, ks = ({ children: e, className: r, style: t, color: s, divProps: o }) => {
1705
+ const n = H(), i = {
1706
+ "--form-error-margin-top": `calc(${n.fonts.rhythm} * 0.17)`,
1707
+ color: s || n.colors.error,
1708
+ ...t,
1709
+ ...o == null ? void 0 : o.style
1710
+ }, l = [ws.formError, r].filter(Boolean).join(" ");
1711
+ return /* @__PURE__ */ V("div", { className: l, style: i, role: "alert", "aria-live": "polite", ...o, children: e });
1712
+ }, Cs = "FormGroup-module__formGroup___aVI-B", zs = "FormGroup-module__inputWrapper___429QE", $s = "FormGroup-module__indented___t61iz", Es = "FormGroup-module__disabled___W-tJ0", As = "FormGroup-module__required___mO3xA", ye = {
1713
+ formGroup: Cs,
1714
+ inputWrapper: zs,
1715
+ indented: $s,
1716
+ disabled: Es,
1717
+ required: As
1718
+ }, Ns = ({
1694
1719
  children: e,
1695
1720
  label: r,
1696
1721
  name: t,
1697
1722
  error: s = !1,
1698
- errorMessage: n,
1699
- disabled: o = !1,
1700
- required: l = !1,
1701
- indent: a = !1,
1723
+ errorMessage: o,
1724
+ disabled: n = !1,
1725
+ required: i = !1,
1726
+ indent: l = !1,
1702
1727
  className: d,
1703
- style: m,
1704
- labelProps: y
1728
+ style: f,
1729
+ labelProps: y,
1730
+ divProps: m
1705
1731
  }) => {
1706
- const h = L(), f = [
1732
+ const h = H(), x = [
1707
1733
  ye.formGroup,
1708
1734
  s ? ye.error : "",
1709
- o ? ye.disabled : "",
1735
+ n ? ye.disabled : "",
1710
1736
  d
1711
- ].filter(Boolean).join(" "), b = {
1737
+ ].filter(Boolean).join(" "), F = {
1712
1738
  "--form-group-margin-bottom": `calc(${h.fonts.rhythm} * 0.35)`,
1713
- ...m
1714
- }, C = V.Children.map(e, (S) => {
1715
- if (V.isValidElement(S)) {
1716
- const k = {};
1717
- if (o && S.props.disabled === void 0 && (k.disabled = !0), s && S.props.error === void 0 && (k.error = !0), t && S.props.id === void 0 && (k.id = t), Object.keys(k).length > 0)
1718
- return V.cloneElement(S, k);
1739
+ ...f,
1740
+ ...m == null ? void 0 : m.style
1741
+ }, _ = $.Children.map(e, (z) => {
1742
+ if ($.isValidElement(z)) {
1743
+ const E = {};
1744
+ if (n && z.props.disabled === void 0 && (E.disabled = !0), s && z.props.error === void 0 && (E.error = !0), t && z.props.id === void 0 && (E.id = t), Object.keys(E).length > 0)
1745
+ return $.cloneElement(z, E);
1719
1746
  }
1720
- return S;
1747
+ return z;
1721
1748
  });
1722
- return /* @__PURE__ */ Q("div", { className: f, style: b, children: [
1723
- r && /* @__PURE__ */ Q(et, { htmlFor: t, disabled: o, error: s, ...y, children: [
1749
+ return /* @__PURE__ */ Q("div", { className: x, style: F, ...m, children: [
1750
+ r && /* @__PURE__ */ Q(tt, { htmlFor: t, disabled: n, error: s, ...y, children: [
1724
1751
  r,
1725
- l && /* @__PURE__ */ Q("span", { className: ye.required, "aria-label": "required", children: [
1752
+ i && /* @__PURE__ */ Q("span", { className: ye.required, "aria-label": "required", children: [
1726
1753
  " ",
1727
1754
  "*"
1728
1755
  ] })
1729
1756
  ] }),
1730
- /* @__PURE__ */ w("div", { className: `${ye.inputWrapper} ${a ? ye.indented : ""}`, children: C }),
1731
- s && n && /* @__PURE__ */ w(Fs, { children: n })
1757
+ /* @__PURE__ */ V("div", { className: `${ye.inputWrapper} ${l ? ye.indented : ""}`, children: _ }),
1758
+ s && o && /* @__PURE__ */ V(ks, { children: o })
1732
1759
  ] });
1733
1760
  };
1734
- function we({
1761
+ function Fe({
1735
1762
  name: e,
1736
1763
  label: r,
1737
1764
  required: t,
1738
1765
  children: s,
1739
- rules: n,
1740
- disabled: o,
1741
- className: l,
1742
- style: a,
1766
+ rules: o,
1767
+ disabled: n,
1768
+ className: i,
1769
+ style: l,
1743
1770
  indent: d,
1744
- labelProps: m
1771
+ labelProps: f
1745
1772
  }) {
1746
- const { control: y } = vs(), {
1747
- field: h,
1748
- fieldState: { error: f }
1749
- } = Wr({
1773
+ const { control: y } = Fs(), {
1774
+ field: m,
1775
+ fieldState: { error: h }
1776
+ } = Zr({
1750
1777
  name: e,
1751
1778
  control: y,
1752
- rules: n
1779
+ rules: o
1753
1780
  });
1754
- return /* @__PURE__ */ w(
1755
- zs,
1781
+ return /* @__PURE__ */ V(
1782
+ Ns,
1756
1783
  {
1757
1784
  label: r,
1758
1785
  name: e,
1759
- error: !!f,
1760
- errorMessage: f == null ? void 0 : f.message,
1761
- disabled: o,
1786
+ error: !!h,
1787
+ errorMessage: h == null ? void 0 : h.message,
1788
+ disabled: n,
1762
1789
  required: t,
1763
- className: l,
1764
- style: a,
1790
+ className: i,
1791
+ style: l,
1765
1792
  indent: d,
1766
- labelProps: m,
1793
+ labelProps: f,
1767
1794
  children: s({
1768
- value: h.value,
1769
- onChange: h.onChange,
1770
- onBlur: h.onBlur,
1771
- name: h.name,
1772
- error: !!f,
1795
+ value: m.value,
1796
+ onChange: m.onChange,
1797
+ onBlur: m.onBlur,
1798
+ name: m.name,
1799
+ error: !!h,
1773
1800
  indent: d
1774
1801
  })
1775
1802
  }
1776
1803
  );
1777
1804
  }
1778
- const $s = "Input-module__input___WjT81", As = "Input-module__sizeSmall___NFvsi", Ps = "Input-module__sizeDefault___AxPA0", He = {
1779
- input: $s,
1780
- sizeSmall: As,
1781
- sizeDefault: Ps
1782
- }, Ds = ({
1805
+ const Rs = "Input-module__input___WjT81", Ds = "Input-module__sizeSmall___NFvsi", Bs = "Input-module__sizeLarge___4Boj3", Ie = {
1806
+ input: Rs,
1807
+ sizeSmall: Ds,
1808
+ sizeLarge: Bs
1809
+ }, Ls = ({
1783
1810
  color: e = "#000",
1784
1811
  disabled: r = !1,
1785
1812
  fontSize: t = "1em",
@@ -1790,92 +1817,101 @@ const $s = "Input-module__input___WjT81", As = "Input-module__sizeSmall___NFvsi"
1790
1817
  fontSize: t,
1791
1818
  opacity: r ? 0.3 : 1,
1792
1819
  placeholderOpacity: s
1793
- }), Ns = ({
1820
+ }), Os = ({
1794
1821
  color: e,
1795
1822
  disabled: r = !1,
1796
1823
  error: t = !1,
1797
- fontSize: s,
1798
- name: n = "",
1799
- onChange: o,
1824
+ id: s,
1825
+ name: o = "",
1826
+ onChange: n,
1827
+ onBlur: i,
1800
1828
  placeholder: l,
1801
- placeholderOpacity: a = 0.3,
1802
- size: d,
1829
+ placeholderOpacity: d = 0.3,
1830
+ size: f = "large",
1831
+ className: y,
1803
1832
  style: m,
1804
- type: y = "text",
1805
- value: h = "",
1806
- ...f
1833
+ type: h = "text",
1834
+ value: x = "",
1835
+ inputProps: F
1807
1836
  }) => {
1808
- const b = L(), C = b.colors.error, S = t ? C : e || b.colors.primary, k = Ds({
1809
- color: S,
1837
+ const _ = H(), z = _.colors.error, E = t ? z : e || _.colors.primary, b = Ls({
1838
+ color: E,
1810
1839
  disabled: r,
1811
- fontSize: s || b.fonts.size,
1812
- placeholderOpacity: a
1813
- }), R = {
1814
- "--placeholder-opacity": k.placeholderOpacity,
1815
- "--border-width": b.border.width,
1816
- "--border-radius": b.border.radius,
1817
- "--input-padding-small": `calc(${b.fonts.rhythm} * 0.07) calc(${b.fonts.rhythm} * 0.17)`,
1818
- "--input-padding-default": `calc(${b.fonts.rhythm} * 0.17) calc(${b.fonts.rhythm} * 0.35)`,
1819
- borderColor: k.borderColor,
1820
- color: k.color,
1821
- fontSize: k.fontSize,
1822
- opacity: k.opacity,
1823
- ...m
1824
- }, F = [He.input, d === "small" ? He.sizeSmall : He.sizeDefault].filter(Boolean).join(" ");
1825
- return /* @__PURE__ */ w(
1840
+ fontSize: _.fonts.size,
1841
+ placeholderOpacity: d
1842
+ }), k = {
1843
+ "--placeholder-opacity": b.placeholderOpacity,
1844
+ "--input-padding-small": `calc(${_.fonts.rhythm} * ${_.sizes.small.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,
1845
+ "--input-padding-large": `calc(${_.fonts.rhythm} * ${_.sizes.large.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,
1846
+ borderColor: b.borderColor,
1847
+ borderWidth: _.border.width,
1848
+ borderRadius: _.border.radius,
1849
+ color: b.color,
1850
+ fontSize: b.fontSize,
1851
+ opacity: b.opacity,
1852
+ ...m,
1853
+ ...F == null ? void 0 : F.style
1854
+ }, C = [
1855
+ Ie.input,
1856
+ f === "small" ? Ie.sizeSmall : Ie.sizeLarge,
1857
+ y
1858
+ ].filter(Boolean).join(" ");
1859
+ return /* @__PURE__ */ V(
1826
1860
  "input",
1827
1861
  {
1828
- className: F,
1862
+ className: C,
1829
1863
  disabled: r,
1830
- name: n,
1831
- onChange: o,
1864
+ id: s,
1865
+ name: o,
1866
+ onChange: n,
1867
+ onBlur: i,
1832
1868
  placeholder: l,
1833
- style: R,
1834
- type: y,
1835
- value: h,
1836
- ...f
1869
+ type: h,
1870
+ value: x,
1871
+ ...F,
1872
+ style: k
1837
1873
  }
1838
1874
  );
1839
1875
  };
1840
- function Uo({
1876
+ function Wo({
1841
1877
  name: e,
1842
1878
  label: r,
1843
1879
  required: t,
1844
1880
  rules: s,
1845
- disabled: n,
1846
- className: o,
1847
- style: l,
1848
- ...a
1881
+ disabled: o,
1882
+ className: n,
1883
+ style: i,
1884
+ ...l
1849
1885
  }) {
1850
- return /* @__PURE__ */ w(
1851
- we,
1886
+ return /* @__PURE__ */ V(
1887
+ Fe,
1852
1888
  {
1853
1889
  name: e,
1854
1890
  label: r,
1855
1891
  required: t,
1856
1892
  rules: s,
1857
- disabled: n,
1858
- className: o,
1859
- style: l,
1860
- children: ({ value: d, onChange: m, onBlur: y, name: h, error: f }) => /* @__PURE__ */ w(
1861
- Ns,
1893
+ disabled: o,
1894
+ className: n,
1895
+ style: i,
1896
+ children: ({ value: d, onChange: f, onBlur: y, name: m, error: h }) => /* @__PURE__ */ V(
1897
+ Os,
1862
1898
  {
1863
- ...a,
1864
- name: h,
1899
+ ...l,
1900
+ name: m,
1865
1901
  value: d || "",
1866
- onChange: (b) => m(b.target.value),
1867
- onBlur: y,
1868
- error: f
1902
+ onChange: (x) => f(x.target.value),
1903
+ inputProps: { onBlur: y },
1904
+ error: h
1869
1905
  }
1870
1906
  )
1871
1907
  }
1872
1908
  );
1873
1909
  }
1874
- const Rs = "Textarea-module__textarea___Z-y6g", Bs = "Textarea-module__sizeSmall___HHFEM", Os = "Textarea-module__sizeDefault___LL2Uc", Ue = {
1875
- textarea: Rs,
1876
- sizeSmall: Bs,
1877
- sizeDefault: Os
1878
- }, Ls = ({
1910
+ const Ts = "Textarea-module__textarea___Z-y6g", Hs = "Textarea-module__sizeSmall___HHFEM", Ms = "Textarea-module__sizeLarge___5a3sf", Ue = {
1911
+ textarea: Ts,
1912
+ sizeSmall: Hs,
1913
+ sizeLarge: Ms
1914
+ }, js = ({
1879
1915
  color: e = "#000",
1880
1916
  disabled: r = !1,
1881
1917
  placeholderOpacity: t = 0.3
@@ -1884,91 +1920,100 @@ const Rs = "Textarea-module__textarea___Z-y6g", Bs = "Textarea-module__sizeSmall
1884
1920
  borderColor: e,
1885
1921
  opacity: r ? 0.3 : 1,
1886
1922
  placeholderOpacity: t
1887
- }), Ms = ({
1923
+ }), Is = ({
1888
1924
  color: e,
1889
1925
  disabled: r = !1,
1890
1926
  error: t = !1,
1891
- fontSize: s,
1892
- name: n = "",
1893
- onChange: o,
1927
+ id: s,
1928
+ name: o = "",
1929
+ onChange: n,
1930
+ onBlur: i,
1894
1931
  placeholder: l,
1895
- placeholderOpacity: a = 0.3,
1896
- rows: d = 3,
1897
- size: m,
1898
- style: y,
1899
- value: h = "",
1900
- ...f
1932
+ placeholderOpacity: d = 0.3,
1933
+ rows: f = 3,
1934
+ size: y = "large",
1935
+ className: m,
1936
+ style: h,
1937
+ value: x = "",
1938
+ textareaProps: F
1901
1939
  }) => {
1902
- const b = L(), C = b.colors.error, S = t ? C : e || b.colors.primary, k = Ls({
1903
- color: S,
1940
+ const _ = H(), z = _.colors.error, E = t ? z : e || _.colors.primary, b = js({
1941
+ color: E,
1904
1942
  disabled: r,
1905
- placeholderOpacity: a
1906
- }), R = {
1907
- "--placeholder-opacity": k.placeholderOpacity,
1908
- "--border-width": b.border.width,
1909
- "--border-radius": b.border.radius,
1910
- "--textarea-padding-small": `calc(${b.fonts.rhythm} * 0.07) calc(${b.fonts.rhythm} * 0.17)`,
1911
- "--textarea-padding-default": `calc(${b.fonts.rhythm} * 0.17) calc(${b.fonts.rhythm} * 0.35)`,
1912
- borderColor: k.borderColor,
1913
- color: k.color,
1914
- fontSize: s || b.fonts.size,
1915
- opacity: k.opacity,
1916
- ...y
1917
- }, F = [Ue.textarea, m === "small" ? Ue.sizeSmall : Ue.sizeDefault].filter(Boolean).join(" ");
1918
- return /* @__PURE__ */ w(
1943
+ placeholderOpacity: d
1944
+ }), k = {
1945
+ "--placeholder-opacity": b.placeholderOpacity,
1946
+ "--textarea-padding-small": `calc(${_.fonts.rhythm} * ${_.sizes.small.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,
1947
+ "--textarea-padding-large": `calc(${_.fonts.rhythm} * ${_.sizes.large.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,
1948
+ borderColor: b.borderColor,
1949
+ borderWidth: _.border.width,
1950
+ borderRadius: _.border.radius,
1951
+ color: b.color,
1952
+ fontSize: _.fonts.size,
1953
+ opacity: b.opacity,
1954
+ ...h,
1955
+ ...F == null ? void 0 : F.style
1956
+ }, C = [
1957
+ Ue.textarea,
1958
+ y === "small" ? Ue.sizeSmall : Ue.sizeLarge,
1959
+ m
1960
+ ].filter(Boolean).join(" ");
1961
+ return /* @__PURE__ */ V(
1919
1962
  "textarea",
1920
1963
  {
1921
- className: F,
1964
+ className: C,
1922
1965
  disabled: r,
1923
- name: n,
1924
- onChange: o,
1966
+ id: s,
1967
+ name: o,
1968
+ onChange: n,
1969
+ onBlur: i,
1925
1970
  placeholder: l,
1926
- rows: d,
1927
- style: R,
1928
- value: h,
1929
- ...f
1971
+ rows: f,
1972
+ value: x,
1973
+ ...F,
1974
+ style: k
1930
1975
  }
1931
1976
  );
1932
1977
  };
1933
- function jo({
1978
+ function qo({
1934
1979
  name: e,
1935
1980
  label: r,
1936
1981
  required: t,
1937
1982
  rules: s,
1938
- disabled: n,
1939
- className: o,
1940
- style: l,
1941
- ...a
1983
+ disabled: o,
1984
+ className: n,
1985
+ style: i,
1986
+ ...l
1942
1987
  }) {
1943
- return /* @__PURE__ */ w(
1944
- we,
1988
+ return /* @__PURE__ */ V(
1989
+ Fe,
1945
1990
  {
1946
1991
  name: e,
1947
1992
  label: r,
1948
1993
  required: t,
1949
1994
  rules: s,
1950
- disabled: n,
1951
- className: o,
1952
- style: l,
1953
- children: ({ value: d, onChange: m, onBlur: y, name: h, error: f }) => /* @__PURE__ */ w(
1954
- Ms,
1995
+ disabled: o,
1996
+ className: n,
1997
+ style: i,
1998
+ children: ({ value: d, onChange: f, onBlur: y, name: m, error: h }) => /* @__PURE__ */ V(
1999
+ Is,
1955
2000
  {
1956
- ...a,
1957
- name: h,
2001
+ ...l,
2002
+ name: m,
1958
2003
  value: d || "",
1959
- onChange: (b) => m(b.target.value),
2004
+ onChange: (x) => f(x.target.value),
1960
2005
  onBlur: y,
1961
- error: f
2006
+ error: h
1962
2007
  }
1963
2008
  )
1964
2009
  }
1965
2010
  );
1966
2011
  }
1967
- const Ts = "Select-module__select___cjdcr", Is = "Select-module__sizeSmall___i1quj", Hs = "Select-module__sizeDefault___EiWvW", je = {
1968
- select: Ts,
1969
- sizeSmall: Is,
1970
- sizeDefault: Hs
1971
- }, Us = ({
2012
+ const Us = "Select-module__select___cjdcr", Ps = "Select-module__sizeSmall___i1quj", Ws = "Select-module__sizeLarge___eBA1T", Pe = {
2013
+ select: Us,
2014
+ sizeSmall: Ps,
2015
+ sizeLarge: Ws
2016
+ }, qs = ({
1972
2017
  color: e = "#000",
1973
2018
  disabled: r = !1
1974
2019
  }) => ({
@@ -1976,196 +2021,204 @@ const Ts = "Select-module__select___cjdcr", Is = "Select-module__sizeSmall___i1q
1976
2021
  borderColor: e,
1977
2022
  cursor: r ? "default" : "pointer",
1978
2023
  opacity: r ? 0.3 : 1,
1979
- backgroundImage: ((o) => {
1980
- const l = `
2024
+ backgroundImage: ((n) => {
2025
+ const i = `
1981
2026
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
1982
2027
  <path
1983
2028
  d="M 30 42.5 L 50 22.5 L 70 42.5"
1984
- stroke="${o}"
2029
+ stroke="${n}"
1985
2030
  stroke-width="11"
1986
2031
  fill="transparent"
1987
2032
  />
1988
2033
  <path
1989
2034
  d="M 30 58.5 L 50 78.5 L 70 58.5"
1990
- stroke="${o}"
2035
+ stroke="${n}"
1991
2036
  stroke-width="11"
1992
2037
  fill="transparent"
1993
2038
  />
1994
2039
  </svg>
1995
2040
  `.trim();
1996
- return `url("data:image/svg+xml,${encodeURIComponent(l)}")`;
2041
+ return `url("data:image/svg+xml,${encodeURIComponent(i)}")`;
1997
2042
  })(e)
1998
- }), js = ({
2043
+ }), Gs = ({
1999
2044
  children: e,
2000
2045
  color: r,
2001
2046
  disabled: t = !1,
2002
2047
  error: s = !1,
2003
- fontSize: n,
2004
- name: o = "",
2005
- onChange: l,
2006
- placeholder: a = "",
2007
- size: d,
2048
+ id: o,
2049
+ name: n = "",
2050
+ onChange: i,
2051
+ onBlur: l,
2052
+ placeholder: d = "",
2053
+ size: f = "large",
2054
+ className: y,
2008
2055
  style: m,
2009
- value: y = "",
2010
- ...h
2056
+ value: h = "",
2057
+ selectProps: x
2011
2058
  }) => {
2012
- const f = L(), b = f.colors.error, C = s ? b : r || f.colors.primary, S = Us({
2013
- color: C,
2059
+ const F = H(), _ = F.colors.error, z = s ? _ : r || F.colors.primary, E = qs({
2060
+ color: z,
2014
2061
  disabled: t
2015
- }), k = {
2016
- "--border-width": f.border.width,
2017
- "--border-radius": f.border.radius,
2018
- "--select-padding-small": `calc(${f.fonts.rhythm} * 0.07) calc(${f.fonts.rhythm} * 1.2) calc(${f.fonts.rhythm} * 0.07) calc(${f.fonts.rhythm} * 0.17)`,
2019
- "--select-padding-default": `calc(${f.fonts.rhythm} * 0.17) calc(${f.fonts.rhythm} * 1.4) calc(${f.fonts.rhythm} * 0.17) calc(${f.fonts.rhythm} * 0.35)`,
2020
- backgroundImage: S.backgroundImage,
2062
+ }), b = {
2063
+ "--select-padding-small": `calc(${F.fonts.rhythm} * ${F.sizes.small.paddingVertical}) calc(${F.fonts.rhythm} * 1.2) calc(${F.fonts.rhythm} * ${F.sizes.small.paddingVertical}) calc(${F.fonts.rhythm} * ${F.inputs.paddingHorizontal})`,
2064
+ "--select-padding-large": `calc(${F.fonts.rhythm} * ${F.sizes.large.paddingVertical}) calc(${F.fonts.rhythm} * 1.4) calc(${F.fonts.rhythm} * ${F.sizes.large.paddingVertical}) calc(${F.fonts.rhythm} * ${F.inputs.paddingHorizontal})`,
2065
+ backgroundImage: E.backgroundImage,
2021
2066
  backgroundPosition: "right center",
2022
2067
  backgroundRepeat: "no-repeat",
2023
2068
  backgroundSize: "auto 85%",
2024
2069
  backgroundColor: "transparent",
2025
- borderColor: S.borderColor,
2026
- color: S.color,
2027
- cursor: S.cursor,
2028
- fontSize: n || f.fonts.size,
2029
- opacity: S.opacity,
2030
- ...m
2031
- }, R = [je.select, d === "small" ? je.sizeSmall : je.sizeDefault].filter(Boolean).join(" ");
2070
+ borderColor: E.borderColor,
2071
+ borderWidth: F.border.width,
2072
+ borderRadius: F.border.radius,
2073
+ color: E.color,
2074
+ cursor: E.cursor,
2075
+ fontSize: F.fonts.size,
2076
+ opacity: E.opacity,
2077
+ ...m,
2078
+ ...x == null ? void 0 : x.style
2079
+ }, k = [
2080
+ Pe.select,
2081
+ f === "small" ? Pe.sizeSmall : Pe.sizeLarge,
2082
+ y
2083
+ ].filter(Boolean).join(" ");
2032
2084
  return /* @__PURE__ */ Q(
2033
2085
  "select",
2034
2086
  {
2035
- className: R,
2087
+ className: k,
2036
2088
  disabled: t,
2037
- name: o,
2038
- onChange: l,
2039
- style: k,
2040
- value: y,
2041
- ...h,
2089
+ id: o,
2090
+ name: n,
2091
+ onChange: i,
2092
+ onBlur: l,
2093
+ value: h,
2094
+ ...x,
2095
+ style: b,
2042
2096
  children: [
2043
- a !== "" && /* @__PURE__ */ w("option", { disabled: !0, value: "", children: a }),
2097
+ d !== "" && /* @__PURE__ */ V("option", { disabled: !0, value: "", children: d }),
2044
2098
  e
2045
2099
  ]
2046
2100
  }
2047
2101
  );
2048
2102
  };
2049
- function Wo({
2103
+ function Go({
2050
2104
  name: e,
2051
2105
  label: r,
2052
2106
  required: t,
2053
2107
  rules: s,
2054
- disabled: n,
2055
- className: o,
2056
- style: l,
2057
- children: a,
2108
+ disabled: o,
2109
+ className: n,
2110
+ style: i,
2111
+ children: l,
2058
2112
  ...d
2059
2113
  }) {
2060
- return /* @__PURE__ */ w(
2061
- we,
2114
+ return /* @__PURE__ */ V(
2115
+ Fe,
2062
2116
  {
2063
2117
  name: e,
2064
2118
  label: r,
2065
2119
  required: t,
2066
2120
  rules: s,
2067
- disabled: n,
2068
- className: o,
2069
- style: l,
2070
- children: ({ value: m, onChange: y, onBlur: h, name: f, error: b }) => /* @__PURE__ */ w(
2071
- js,
2121
+ disabled: o,
2122
+ className: n,
2123
+ style: i,
2124
+ children: ({ value: f, onChange: y, onBlur: m, name: h, error: x }) => /* @__PURE__ */ V(
2125
+ Gs,
2072
2126
  {
2073
2127
  ...d,
2074
- name: f,
2075
- value: m || "",
2076
- onChange: (C) => y(C.target.value),
2077
- onBlur: h,
2078
- error: b,
2079
- children: a
2128
+ name: h,
2129
+ value: f || "",
2130
+ onChange: (F) => y(F.target.value),
2131
+ onBlur: m,
2132
+ error: x,
2133
+ children: l
2080
2134
  }
2081
2135
  )
2082
2136
  }
2083
2137
  );
2084
2138
  }
2085
- function qo({
2139
+ function Zo({
2086
2140
  name: e,
2087
2141
  required: r,
2088
2142
  rules: t,
2089
2143
  disabled: s,
2090
- className: n,
2091
- style: o,
2092
- ...l
2144
+ className: o,
2145
+ style: n,
2146
+ ...i
2093
2147
  }) {
2094
- return /* @__PURE__ */ w(
2095
- we,
2148
+ return /* @__PURE__ */ V(
2149
+ Fe,
2096
2150
  {
2097
2151
  name: e,
2098
2152
  required: r,
2099
2153
  rules: t,
2100
2154
  disabled: s,
2101
- className: n,
2102
- style: o,
2103
- children: ({ value: a, onChange: d, name: m, error: y }) => /* @__PURE__ */ w(
2104
- Tr,
2155
+ className: o,
2156
+ style: n,
2157
+ children: ({ value: l, onChange: d, name: f, error: y }) => /* @__PURE__ */ V(
2158
+ Ur,
2105
2159
  {
2106
- ...l,
2107
- name: m,
2108
- checked: !!a,
2109
- onChange: (h) => d(h.target.checked),
2160
+ ...i,
2161
+ name: f,
2162
+ checked: !!l,
2163
+ onChange: (m) => d(m.target.checked),
2110
2164
  error: y
2111
2165
  }
2112
2166
  )
2113
2167
  }
2114
2168
  );
2115
2169
  }
2116
- const Ws = "Radio-module__container___AQxhk", qs = "Radio-module__svg___zl5kF", Gs = "Radio-module__label___vAFIP", We = {
2117
- container: Ws,
2118
- svg: qs,
2119
- label: Gs
2120
- }, Zs = ({
2170
+ const Zs = "Radio-module__container___AQxhk", Qs = "Radio-module__svg___zl5kF", Ks = "Radio-module__label___vAFIP", We = {
2171
+ container: Zs,
2172
+ svg: Qs,
2173
+ label: Ks
2174
+ }, Js = ({
2121
2175
  color: e = "#000",
2122
2176
  disabled: r = !1
2123
2177
  }) => ({
2124
2178
  radioColor: e,
2125
2179
  cursor: r ? "default" : "pointer",
2126
2180
  opacity: r ? 0.3 : 1
2127
- }), Qs = ({
2181
+ }), Xs = ({
2128
2182
  checked: e = !1,
2129
2183
  color: r,
2130
2184
  disabled: t = !1,
2131
2185
  error: s = !1,
2132
- fontSize: n,
2133
2186
  id: o,
2134
- label: l,
2135
- labelStyle: a,
2136
- name: d,
2137
- onChange: m,
2138
- style: y,
2139
- ...h
2187
+ label: n,
2188
+ labelStyle: i,
2189
+ name: l,
2190
+ onChange: d,
2191
+ className: f,
2192
+ style: y
2140
2193
  }) => {
2141
- const f = L(), b = o || Gt(), C = f.colors.error, S = s ? C : r || f.colors.primary, k = Zs({
2142
- color: S,
2194
+ const m = H(), h = o || Qt(), x = m.colors.error, F = s ? x : r || m.colors.primary, _ = Js({
2195
+ color: F,
2143
2196
  disabled: t
2144
- }), R = (O) => {
2145
- t || m(O);
2146
- }, F = {
2147
- cursor: k.cursor,
2148
- fontSize: n || f.fonts.size,
2149
- opacity: k.opacity,
2197
+ }), z = (L) => {
2198
+ t || d(L);
2199
+ }, E = {
2200
+ cursor: _.cursor,
2201
+ fontSize: m.fonts.size,
2202
+ opacity: _.opacity,
2150
2203
  ...y
2151
- }, $ = {
2152
- width: n || f.fonts.size
2153
- }, z = {
2204
+ }, b = {
2205
+ width: m.fonts.size
2206
+ }, k = {
2154
2207
  fill: "transparent",
2155
2208
  strokeWidth: "12.5",
2156
- stroke: k.radioColor
2157
- }, E = {
2158
- fill: k.radioColor
2159
- };
2160
- return /* @__PURE__ */ Q("div", { className: We.container, style: F, ...h, children: [
2161
- /* @__PURE__ */ w(
2209
+ stroke: _.radioColor
2210
+ }, C = {
2211
+ fill: _.radioColor
2212
+ }, A = [We.container, f].filter(Boolean).join(" ");
2213
+ return /* @__PURE__ */ Q("div", { className: A, style: E, children: [
2214
+ /* @__PURE__ */ V(
2162
2215
  "input",
2163
2216
  {
2164
- id: b,
2217
+ id: h,
2165
2218
  checked: e,
2166
2219
  disabled: t,
2167
- name: d,
2168
- onChange: (O) => R({ target: { checked: O.target.checked, name: d, type: "radio" } }),
2220
+ name: l,
2221
+ onChange: (L) => z({ target: { checked: L.target.checked, name: l, type: "radio" } }),
2169
2222
  style: { display: "none" },
2170
2223
  type: "radio"
2171
2224
  }
@@ -2175,191 +2228,215 @@ const Ws = "Radio-module__container___AQxhk", qs = "Radio-module__svg___zl5kF",
2175
2228
  {
2176
2229
  xmlns: "http://www.w3.org/2000/svg",
2177
2230
  viewBox: "0 0 100 100",
2178
- onClick: () => R({ target: { checked: !e, name: d, type: "radio" } }),
2231
+ onClick: () => z({ target: { checked: !e, name: l, type: "radio" } }),
2179
2232
  className: We.svg,
2180
- style: $,
2233
+ style: b,
2181
2234
  children: [
2182
- /* @__PURE__ */ w("circle", { cx: "50", cy: "50", r: "42.5", width: "100%", style: z }),
2183
- e && /* @__PURE__ */ w("circle", { cx: "50", cy: "50", r: "25", style: E })
2235
+ /* @__PURE__ */ V("circle", { cx: "50", cy: "50", r: "42.5", width: "100%", style: k }),
2236
+ e && /* @__PURE__ */ V("circle", { cx: "50", cy: "50", r: "25", style: C })
2184
2237
  ]
2185
2238
  }
2186
2239
  ),
2187
- l && /* @__PURE__ */ w(
2188
- et,
2240
+ n && /* @__PURE__ */ V(
2241
+ tt,
2189
2242
  {
2190
- htmlFor: b,
2243
+ htmlFor: h,
2191
2244
  className: We.label,
2192
- style: a,
2193
- color: k.radioColor,
2245
+ style: { paddingBottom: 0, ...i },
2246
+ color: _.radioColor,
2194
2247
  disabled: t,
2195
2248
  error: s,
2196
- fontSize: n,
2197
- children: l
2249
+ children: n
2198
2250
  }
2199
2251
  )
2200
2252
  ] });
2201
2253
  };
2202
- function Go({
2254
+ function Qo({
2203
2255
  name: e,
2204
2256
  label: r,
2205
2257
  required: t,
2206
2258
  rules: s,
2207
- disabled: n,
2208
- className: o,
2209
- style: l,
2210
- value: a,
2259
+ disabled: o,
2260
+ className: n,
2261
+ style: i,
2262
+ value: l,
2211
2263
  ...d
2212
2264
  }) {
2213
- return /* @__PURE__ */ w(
2214
- we,
2265
+ return /* @__PURE__ */ V(
2266
+ Fe,
2215
2267
  {
2216
2268
  name: e,
2217
2269
  required: t,
2218
2270
  rules: s,
2219
- disabled: n,
2220
- className: o,
2221
- style: l,
2222
- children: ({ value: m, onChange: y, name: h, error: f }) => /* @__PURE__ */ w(
2223
- Qs,
2271
+ disabled: o,
2272
+ className: n,
2273
+ style: i,
2274
+ children: ({ value: f, onChange: y, name: m, error: h }) => /* @__PURE__ */ V(
2275
+ Xs,
2224
2276
  {
2225
2277
  ...d,
2226
- name: h,
2227
- checked: m === a,
2228
- onChange: () => y(a),
2229
- error: f,
2278
+ name: m,
2279
+ checked: f === l,
2280
+ onChange: () => y(l),
2281
+ error: h,
2230
2282
  label: r
2231
2283
  }
2232
2284
  )
2233
2285
  }
2234
2286
  );
2235
2287
  }
2236
- const Ks = "Hamburger-module__hamburger___Tf4-t", Js = "Hamburger-module__line___gybZM", Xs = "Hamburger-module__open___gRswh", ge = {
2237
- hamburger: Ks,
2238
- line: Js,
2239
- open: Xs
2240
- }, Ys = ({
2288
+ const Ys = "Hamburger-module__hamburger___Tf4-t", eo = "Hamburger-module__line___gybZM", to = "Hamburger-module__open___gRswh", _e = {
2289
+ hamburger: Ys,
2290
+ line: eo,
2291
+ open: to
2292
+ }, ro = ({
2241
2293
  compact: e,
2242
2294
  color: r,
2243
2295
  visible: t,
2244
- borderRadius: s
2296
+ border: s
2245
2297
  }) => {
2246
- const n = L();
2298
+ const o = H();
2247
2299
  return be(() => {
2248
- const o = e ? { right: ".5em" } : {};
2300
+ const n = e ? { right: ".5em" } : {};
2249
2301
  return {
2250
- "--hamburger-border-radius": s || n.borderRadius || "10px",
2302
+ "--hamburger-border-radius": (s == null ? void 0 : s.radius) || o.border.radius || "10px",
2251
2303
  color: r || "inherit",
2252
2304
  display: t ? "flex" : "none",
2253
- ...o
2305
+ ...n
2254
2306
  };
2255
- }, [r, t, e, s, n.borderRadius]);
2256
- }, eo = ({
2307
+ }, [r, t, e, s == null ? void 0 : s.radius, o.border.radius]);
2308
+ }, so = ({
2257
2309
  visible: e,
2258
2310
  compact: r,
2259
2311
  color: t,
2260
2312
  hamburgerRef: s,
2261
- open: n = !1,
2262
- setOpen: o,
2263
- buttonProps: l,
2264
- borderRadius: a
2313
+ open: o = !1,
2314
+ setOpen: n,
2315
+ buttonProps: i,
2316
+ border: l
2265
2317
  }) => {
2266
- const d = Ys({
2318
+ const d = ro({
2267
2319
  compact: r,
2268
2320
  color: t,
2269
2321
  visible: e,
2270
- borderRadius: a
2271
- }), m = [ge.hamburger, n ? ge.open : ""].filter(Boolean).join(" ");
2322
+ border: l
2323
+ }), f = [_e.hamburger, o ? _e.open : ""].filter(Boolean).join(" ");
2272
2324
  return /* @__PURE__ */ Q(
2273
2325
  "button",
2274
2326
  {
2275
2327
  ref: s,
2276
- className: m,
2277
- onClick: () => o(!n),
2328
+ className: f,
2329
+ onClick: () => n(!o),
2278
2330
  style: d,
2279
2331
  "aria-label": "Toggle menu",
2280
- "aria-expanded": n,
2281
- ...l,
2332
+ "aria-expanded": o,
2333
+ ...i,
2282
2334
  children: [
2283
- /* @__PURE__ */ w("div", { className: ge.line }),
2284
- /* @__PURE__ */ w("div", { className: ge.line }),
2285
- /* @__PURE__ */ w("div", { className: ge.line })
2335
+ /* @__PURE__ */ V("div", { className: _e.line }),
2336
+ /* @__PURE__ */ V("div", { className: _e.line }),
2337
+ /* @__PURE__ */ V("div", { className: _e.line })
2286
2338
  ]
2287
2339
  }
2288
2340
  );
2289
- }, to = "Header-module__header___RUooH", ro = "Header-module__container___t68M9", Lt = {
2290
- header: to,
2291
- container: ro
2292
- }, so = ({
2341
+ }, oo = "Header-module__header___RUooH", no = "Header-module__container___t68M9", Ht = {
2342
+ header: oo,
2343
+ container: no
2344
+ }, io = ({
2293
2345
  isSmallScreen: e = !1,
2294
2346
  maxWidth: r,
2295
- paddingSm: t,
2296
- padding: s,
2297
- fontSize: n
2347
+ minWidth: t,
2348
+ width: s,
2349
+ height: o,
2350
+ paddingSm: n,
2351
+ padding: i,
2352
+ margin: l,
2353
+ gap: d,
2354
+ background: f,
2355
+ color: y
2298
2356
  } = {}) => {
2299
- const o = L();
2357
+ const m = H();
2300
2358
  return {
2301
- "--header-max-width": r || o.layout.maxWidth,
2302
- "--header-padding": e ? t || o.layout.wrapperPaddingSm : s || o.layout.wrapperPadding,
2303
- "--header-font-size": e ? "0.75rem" : n || o.fonts.size
2359
+ "--header-max-width": r || m.layout.maxWidth,
2360
+ "--header-min-width": t,
2361
+ "--header-width": s,
2362
+ "--header-height": o,
2363
+ "--header-padding": e ? n || m.layout.paddingSm : i || m.layout.padding,
2364
+ "--header-margin": l,
2365
+ "--header-gap": d,
2366
+ background: f,
2367
+ color: y
2304
2368
  };
2305
2369
  }, ie = (e) => {
2306
2370
  const r = typeof window < "u" && typeof window.matchMedia == "function";
2307
- return kr((o) => {
2371
+ return zr((n) => {
2308
2372
  if (!r) return () => {
2309
2373
  };
2310
- const l = window.matchMedia(e);
2311
- return l.addEventListener("change", o), () => l.removeEventListener("change", o);
2374
+ const i = window.matchMedia(e);
2375
+ return i.addEventListener("change", n), () => i.removeEventListener("change", n);
2312
2376
  }, () => r ? window.matchMedia(e).matches : !1, () => !1);
2313
- }, oo = ({
2377
+ }, ao = ({
2314
2378
  children: e,
2315
- breakPointSm: r,
2379
+ breakpoint: r,
2316
2380
  maxWidth: t,
2317
- paddingSm: s,
2318
- padding: n,
2319
- fontSize: o,
2320
- style: l = {},
2321
- headerProps: a = {},
2322
- headerRef: d
2381
+ minWidth: s,
2382
+ width: o,
2383
+ height: n,
2384
+ paddingSm: i,
2385
+ padding: l,
2386
+ margin: d,
2387
+ gap: f,
2388
+ background: y,
2389
+ color: m,
2390
+ className: h,
2391
+ style: x = {},
2392
+ headerProps: F = {},
2393
+ headerRef: _
2323
2394
  }) => {
2324
- const m = L(), h = (r || m.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/), f = h ? parseInt(h[1], 10) - 1 : 474, b = h ? h[2] : "px", C = ie(`(max-width: ${f}${b})`), S = so({
2325
- isSmallScreen: C,
2395
+ const z = H(), b = (r || z.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/), k = b ? parseInt(b[1], 10) - 1 : 474, C = b ? b[2] : "px", A = ie(`(max-width: ${k}${C})`), L = io({
2396
+ isSmallScreen: A,
2326
2397
  maxWidth: t,
2327
- paddingSm: s,
2328
- padding: n,
2329
- fontSize: o
2330
- });
2331
- return /* @__PURE__ */ w("header", { ref: d, className: Lt.header, ...a, children: /* @__PURE__ */ w(
2398
+ minWidth: s,
2399
+ width: o,
2400
+ height: n,
2401
+ paddingSm: i,
2402
+ padding: l,
2403
+ margin: d,
2404
+ gap: f,
2405
+ background: y,
2406
+ color: m
2407
+ }), P = [Ht.container, h].filter(Boolean).join(" ");
2408
+ return /* @__PURE__ */ V("header", { ref: _, className: Ht.header, ...F, children: /* @__PURE__ */ V(
2332
2409
  "div",
2333
2410
  {
2334
- className: Lt.container,
2335
- style: { ...S, ...l },
2411
+ className: P,
2412
+ style: { ...L, ...x },
2336
2413
  children: e
2337
2414
  }
2338
2415
  ) });
2339
- }, no = "ResponsiveNav-module__nav___xOfv5", io = "ResponsiveNav-module__navMobile___h795P", ao = "ResponsiveNav-module__open___WDCAf", lo = "ResponsiveNav-module__navDesktop___9wscZ", Ee = {
2340
- nav: no,
2341
- navMobile: io,
2342
- open: ao,
2343
- navDesktop: lo
2344
- }, co = ({
2416
+ }, lo = "ResponsiveNav-module__nav___xOfv5", co = "ResponsiveNav-module__navMobile___h795P", uo = "ResponsiveNav-module__open___WDCAf", fo = "ResponsiveNav-module__navDesktop___9wscZ", $e = {
2417
+ nav: lo,
2418
+ navMobile: co,
2419
+ open: uo,
2420
+ navDesktop: fo
2421
+ }, yo = ({
2345
2422
  isMobile: e,
2346
2423
  isCompact: r,
2347
2424
  mobileBackground: t,
2348
2425
  mobileColor: s,
2349
- mobileActiveBackground: n,
2350
- mobileActiveColor: o,
2351
- mobileButtonHoverColor: l
2426
+ mobileActiveBackground: o,
2427
+ mobileActiveColor: n,
2428
+ mobileButtonHoverColor: i
2352
2429
  }) => {
2353
- const a = L();
2430
+ const l = H();
2354
2431
  return be(() => {
2355
- const { rhythm: d } = a.fonts;
2432
+ const { rhythm: d } = l.fonts;
2356
2433
  return {
2357
2434
  ...e ? {
2358
- "--mobile-nav-background": t || a.colors.accent,
2359
- "--mobile-nav-color": s || a.colors.primary,
2360
- "--mobile-nav-active-background": n || a.colors.primary,
2361
- "--mobile-nav-active-color": o || a.colors.accent,
2362
- "--mobile-nav-button-hover-text-color": l || t || a.colors.accent,
2435
+ "--mobile-nav-background": t || l.colors.accent,
2436
+ "--mobile-nav-color": s || l.colors.primary,
2437
+ "--mobile-nav-active-background": o || l.colors.primary,
2438
+ "--mobile-nav-active-color": n || l.colors.accent,
2439
+ "--mobile-nav-button-hover-text-color": i || t || l.colors.accent,
2363
2440
  "--nav-padding-top": `calc(${d} * 3)`,
2364
2441
  "--nav-link-padding": `calc(${d} * 0.35) calc(${d} * 2)`,
2365
2442
  "--nav-button-margin": `calc(${d} * 0.5) calc(${d} * 1.4)`
@@ -2368,12 +2445,12 @@ const Ks = "Hamburger-module__hamburger___Tf4-t", Js = "Hamburger-module__line__
2368
2445
  }, [
2369
2446
  t,
2370
2447
  s,
2371
- n,
2372
2448
  o,
2373
- l,
2374
- a.colors.accent,
2375
- a.colors.primary,
2376
- a.fonts,
2449
+ n,
2450
+ i,
2451
+ l.colors.accent,
2452
+ l.colors.primary,
2453
+ l.fonts,
2377
2454
  e,
2378
2455
  r
2379
2456
  ]);
@@ -2382,240 +2459,276 @@ function Mt(e) {
2382
2459
  const t = parseInt(e) - 1, s = e.replace(/[0-9]/g, "");
2383
2460
  return { maxWidth: t, unit: s };
2384
2461
  }
2385
- const Zo = ({
2386
- breakPointMd: e,
2387
- breakPointSm: r,
2388
- children: t,
2389
- mobileBackground: s,
2390
- mobileColor: n,
2462
+ const Ko = ({
2463
+ breakpoints: e,
2464
+ children: r,
2465
+ mobileBackground: t,
2466
+ mobileColor: s,
2391
2467
  mobileActiveBackground: o,
2392
- mobileActiveColor: l,
2393
- mobileButtonHoverColor: a,
2394
- style: d,
2395
- navProps: m
2468
+ mobileActiveColor: n,
2469
+ mobileButtonHoverColor: i,
2470
+ style: l,
2471
+ navProps: d
2396
2472
  }) => {
2397
- const [y, h] = Xe(!1), f = vt(null), b = vt(null), C = L(), S = e || C.breakpoints.md, k = r || C.breakpoints.sm, { maxWidth: R, unit: F } = Mt(S), { maxWidth: $, unit: z } = Mt(k), E = ie(`(max-width: ${R}${F})`), O = ie(`(max-width: ${$}${z})`), X = co({
2398
- isMobile: E,
2399
- isCompact: O,
2400
- mobileBackground: s,
2401
- mobileColor: n,
2473
+ const [f, y] = et(!1), m = bt(null), h = bt(null), F = { ...H().breakpoints, ...e }, { maxWidth: _, unit: z } = Mt(F.md), { maxWidth: E, unit: b } = Mt(F.sm), k = ie(`(max-width: ${_}${z})`), C = ie(`(max-width: ${E}${b})`), A = yo({
2474
+ isMobile: k,
2475
+ isCompact: C,
2476
+ mobileBackground: t,
2477
+ mobileColor: s,
2402
2478
  mobileActiveBackground: o,
2403
- mobileActiveColor: l,
2404
- mobileButtonHoverColor: a
2479
+ mobileActiveColor: n,
2480
+ mobileButtonHoverColor: i
2405
2481
  });
2406
- Ye(() => {
2407
- if (typeof document > "u") return;
2408
- const q = (se) => {
2409
- !b.current || b.current.contains(se.target) || f.current && f.current.contains(se.target) || h(!1);
2482
+ Wt(() => {
2483
+ const P = (se) => {
2484
+ !h.current || h.current.contains(se.target) || m.current && m.current.contains(se.target) || y(!1);
2410
2485
  };
2411
- return document.addEventListener("mousedown", q), () => {
2412
- document.removeEventListener("mousedown", q);
2486
+ return document.addEventListener("mousedown", P), () => {
2487
+ document.removeEventListener("mousedown", P);
2413
2488
  };
2414
- }, [f, b, h]);
2415
- const ae = [
2416
- Ee.nav,
2417
- E ? Ee.navMobile : Ee.navDesktop,
2418
- E && y ? Ee.open : ""
2489
+ }, [m, h, y]);
2490
+ const L = [
2491
+ $e.nav,
2492
+ k ? $e.navMobile : $e.navDesktop,
2493
+ k && f ? $e.open : ""
2419
2494
  ].filter(Boolean).join(" ");
2420
- return /* @__PURE__ */ Q(Je, { children: [
2421
- /* @__PURE__ */ w(
2422
- eo,
2495
+ return /* @__PURE__ */ Q(Ye, { children: [
2496
+ /* @__PURE__ */ V(
2497
+ so,
2423
2498
  {
2424
- hamburgerRef: f,
2425
- visible: E,
2426
- compact: O,
2427
- open: y,
2428
- setOpen: h
2499
+ hamburgerRef: m,
2500
+ visible: k,
2501
+ compact: C,
2502
+ open: f,
2503
+ setOpen: y
2429
2504
  }
2430
2505
  ),
2431
- /* @__PURE__ */ w(
2506
+ /* @__PURE__ */ V(
2432
2507
  "nav",
2433
2508
  {
2434
- ref: b,
2435
- className: ae,
2436
- style: { ...X, ...d },
2437
- ...m,
2438
- children: typeof t == "function" ? t({ setOpen: h }) : t
2509
+ ref: h,
2510
+ className: L,
2511
+ style: { ...A, ...l },
2512
+ ...d,
2513
+ children: typeof r == "function" ? r({ setOpen: y }) : r
2439
2514
  }
2440
2515
  )
2441
2516
  ] });
2442
- }, uo = ({
2443
- size: e = 2.5,
2444
- color: r,
2445
- innerColor: t,
2446
- fullScreen: s = !0
2517
+ }, mo = ({
2518
+ color: e,
2519
+ background: r,
2520
+ fullScreen: t = !0,
2521
+ className: s,
2522
+ style: o
2447
2523
  }) => {
2448
- const n = L(), o = r || n.colors.primary, l = t || n.colors.secondary, a = /* @__PURE__ */ Q(Je, { children: [
2449
- /* @__PURE__ */ w(
2450
- "div",
2451
- {
2452
- style: {
2453
- border: `0.25em solid ${o}`,
2454
- borderTop: `0.25em solid ${l}`,
2455
- borderRadius: "50%",
2456
- width: `${e}em`,
2457
- height: `${e}em`,
2458
- animation: "spin 1s linear infinite"
2459
- }
2524
+ const n = H(), i = e || n.colors.primary, l = r || n.colors.secondary, d = /* @__PURE__ */ V(
2525
+ "div",
2526
+ {
2527
+ className: t ? void 0 : s,
2528
+ style: {
2529
+ fontSize: "2.5em",
2530
+ // Default size, can be overridden via style prop
2531
+ border: `0.1em solid ${i}`,
2532
+ // 0.1em because it's relative to the 2.5em fontSize
2533
+ borderTop: `0.1em solid ${l}`,
2534
+ borderRadius: "50%",
2535
+ width: "1em",
2536
+ height: "1em",
2537
+ animation: "spin 1s linear infinite",
2538
+ ...!t && o || {}
2460
2539
  }
2461
- ),
2462
- /* @__PURE__ */ w("style", { children: `
2540
+ }
2541
+ ), f = /* @__PURE__ */ Q(Ye, { children: [
2542
+ d,
2543
+ /* @__PURE__ */ V("style", { children: `
2463
2544
  @keyframes spin {
2464
2545
  0% { transform: rotate(0deg); }
2465
2546
  100% { transform: rotate(360deg); }
2466
2547
  }
2467
2548
  ` })
2468
2549
  ] });
2469
- return s ? /* @__PURE__ */ w(
2550
+ return t ? /* @__PURE__ */ V(
2470
2551
  "div",
2471
2552
  {
2553
+ className: s,
2472
2554
  style: {
2473
2555
  display: "flex",
2474
2556
  justifyContent: "center",
2475
2557
  alignItems: "center",
2476
2558
  height: "100vh",
2477
- width: "100vw"
2559
+ width: "100vw",
2560
+ ...o
2478
2561
  },
2479
- children: a
2562
+ children: f
2480
2563
  }
2481
- ) : a;
2482
- }, Qo = ({ children: e, loadingComponent: r }) => {
2483
- const [t, s] = Xe(!1);
2484
- return Ye(() => {
2485
- typeof requestAnimationFrame < "u" ? requestAnimationFrame(() => {
2564
+ ) : f;
2565
+ }, Jo = ({ children: e, loadingComponent: r }) => {
2566
+ const [t, s] = et(!1);
2567
+ return Wt(() => {
2568
+ requestAnimationFrame(() => {
2486
2569
  s(!0);
2487
- }) : s(!0);
2488
- }, []), t ? /* @__PURE__ */ w(Je, { children: e }) : r || /* @__PURE__ */ w(uo, {});
2489
- }, fo = "Stack-module__stack___yUU-B", yo = "Stack-module__vertical___sKTyQ", mo = "Stack-module__horizontal___YsvtV", qe = {
2490
- stack: fo,
2491
- vertical: yo,
2492
- horizontal: mo
2493
- }, Ko = ({
2570
+ });
2571
+ }, []), t ? /* @__PURE__ */ V(Ye, { children: e }) : r || /* @__PURE__ */ V(mo, {});
2572
+ }, ho = "Stack-module__stack___yUU-B", go = "Stack-module__vertical___sKTyQ", _o = "Stack-module__horizontal___YsvtV", qe = {
2573
+ stack: ho,
2574
+ vertical: go,
2575
+ horizontal: _o
2576
+ }, Xo = ({
2494
2577
  children: e,
2495
2578
  direction: r = "column",
2496
2579
  className: t,
2497
2580
  style: s,
2498
- ...n
2581
+ divProps: o
2499
2582
  }) => {
2500
- const o = [
2583
+ const n = [
2501
2584
  qe.stack,
2502
2585
  r === "row" ? qe.horizontal : qe.vertical,
2503
2586
  t
2504
2587
  ].filter(Boolean).join(" ");
2505
- return /* @__PURE__ */ w("div", { className: o, style: s, ...n, children: e });
2506
- }, ho = "ResponsiveSection-module__section___gBESK", _o = "ResponsiveSection-module__innerDiv___r1bky", Tt = {
2507
- section: ho,
2508
- innerDiv: _o
2509
- }, fr = ({
2588
+ return /* @__PURE__ */ V("div", { className: n, style: s, ...o, children: e });
2589
+ }, po = "ResponsiveSection-module__section___gBESK", vo = "ResponsiveSection-module__innerDiv___r1bky", jt = {
2590
+ section: po,
2591
+ innerDiv: vo
2592
+ }, mr = ({
2510
2593
  children: e,
2511
2594
  background: r,
2512
2595
  color: t,
2513
- className: s,
2514
- style: n,
2515
- verticalRhythm: o = 3,
2516
- ...l
2596
+ maxWidth: s,
2597
+ minWidth: o,
2598
+ width: n,
2599
+ height: i,
2600
+ padding: l,
2601
+ paddingSm: d,
2602
+ margin: f,
2603
+ gap: y,
2604
+ className: m,
2605
+ style: h,
2606
+ verticalRhythm: x = 3,
2607
+ sectionProps: F = {}
2517
2608
  }) => {
2518
- const a = L(), d = ie(`(min-width: ${a.breakpoints.sm})`), m = {
2609
+ const _ = H(), z = ie(`(min-width: ${_.breakpoints.sm})`), E = {
2519
2610
  background: r,
2520
- color: t || a.fonts.color,
2521
- ...n
2522
- }, y = `calc(${a.fonts.rhythm} * ${o})`, h = d ? a.layout.wrapperPadding : a.layout.wrapperPaddingSm, f = {
2523
- "--max-width": a.layout.maxWidth,
2524
- "--section-padding": `${y} ${h}`
2525
- }, b = [Tt.section, s].filter(Boolean).join(" ");
2526
- return /* @__PURE__ */ w("section", { className: b, style: m, ...l, children: /* @__PURE__ */ w("div", { className: Tt.innerDiv, style: f, children: e }) });
2527
- }, go = "Hero-module__hero___IB2tg", po = "Hero-module__content___rkkfQ", It = {
2528
- hero: go,
2529
- content: po
2530
- }, vo = ({
2611
+ color: t || _.fonts.color,
2612
+ margin: f,
2613
+ ...h,
2614
+ ...F == null ? void 0 : F.style
2615
+ }, b = `calc(${_.fonts.rhythm} * ${x})`, k = z ? l || _.layout.padding : d || _.layout.paddingSm, C = {
2616
+ "--max-width": s || _.layout.maxWidth,
2617
+ "--min-width": o,
2618
+ "--width": n,
2619
+ "--height": i,
2620
+ "--section-padding": `${b} ${k}`,
2621
+ "--gap": y
2622
+ }, A = [jt.section, m].filter(Boolean).join(" ");
2623
+ return /* @__PURE__ */ V("section", { className: A, style: E, ...F, children: /* @__PURE__ */ V("div", { className: jt.innerDiv, style: C, children: e }) });
2624
+ }, bo = "Hero-module__hero___IB2tg", So = "Hero-module__content___rkkfQ", It = {
2625
+ hero: bo,
2626
+ content: So
2627
+ }, Fo = ({
2531
2628
  isMd: e = !1,
2532
2629
  isLg: r = !1,
2533
2630
  theme: t
2534
2631
  }) => be(() => {
2535
2632
  const { rhythm: s } = t.fonts;
2536
- let n = `calc(${s} * 2) 0`, o = "2rem", l = "1.125rem";
2537
- return r ? (n = `calc(${s} * 4) 0`, o = "3.5rem", l = "1.5rem") : e && (n = `calc(${s} * 3.5) 0`, o = "3rem", l = "1.25rem"), {
2538
- "--hero-padding": n,
2539
- "--hero-h1-font-size": o,
2540
- "--hero-p-font-size": l,
2633
+ let o = `calc(${s} * 2) 0`, n = "2rem", i = "1.125rem";
2634
+ return r ? (o = `calc(${s} * 4) 0`, n = "3.5rem", i = "1.5rem") : e && (o = `calc(${s} * 3.5) 0`, n = "3rem", i = "1.25rem"), {
2635
+ "--hero-padding": o,
2636
+ "--hero-h1-font-size": n,
2637
+ "--hero-p-font-size": i,
2541
2638
  "--hero-h1-margin-bottom": `calc(${s} * 0.7)`
2542
2639
  };
2543
- }, [e, r, t.fonts]), Jo = ({
2640
+ }, [e, r, t.fonts]), Yo = ({
2544
2641
  children: e,
2545
2642
  className: r,
2546
2643
  color: t,
2547
- breakPointMd: s,
2548
- breakPointLg: n,
2644
+ breakpoints: s,
2549
2645
  style: o,
2550
- ...l
2646
+ ...n
2551
2647
  }) => {
2552
- const a = L(), d = [It.hero, r].filter(Boolean).join(" "), m = s || a.breakpoints.md, y = n || a.breakpoints.lg, h = ie(`(min-width: ${m})`), f = ie(`(min-width: ${y})`), b = vo({ isMd: h, isLg: f, theme: a });
2553
- return /* @__PURE__ */ w(
2554
- fr,
2648
+ const i = H(), l = [It.hero, r].filter(Boolean).join(" "), d = (s == null ? void 0 : s.md) || i.breakpoints.md, f = (s == null ? void 0 : s.lg) || i.breakpoints.lg, y = ie(`(min-width: ${d})`), m = ie(`(min-width: ${f})`), h = Fo({ isMd: y, isLg: m, theme: i });
2649
+ return /* @__PURE__ */ V(
2650
+ mr,
2555
2651
  {
2556
- className: d,
2557
- color: t || a.fonts.color,
2558
- style: { ...b, ...o },
2559
- ...l,
2560
- children: /* @__PURE__ */ w("div", { className: It.content, children: e })
2652
+ className: l,
2653
+ color: t || i.fonts.color,
2654
+ style: { ...h, ...o },
2655
+ ...n,
2656
+ children: /* @__PURE__ */ V("div", { className: It.content, children: e })
2561
2657
  }
2562
2658
  );
2563
- }, bo = "Footer-module__footer___A76NF", So = "Footer-module__container___QneNs", Ht = {
2564
- footer: bo,
2565
- container: So
2659
+ }, xo = "Footer-module__footer___A76NF", Vo = "Footer-module__container___QneNs", Ut = {
2660
+ footer: xo,
2661
+ container: Vo
2566
2662
  }, wo = ({
2567
2663
  isSmallScreen: e = !1,
2568
2664
  maxWidth: r,
2569
- paddingSm: t,
2570
- padding: s,
2571
- fontSize: n,
2572
- background: o,
2573
- color: l
2665
+ minWidth: t,
2666
+ width: s,
2667
+ height: o,
2668
+ paddingSm: n,
2669
+ padding: i,
2670
+ margin: l,
2671
+ gap: d,
2672
+ background: f,
2673
+ color: y
2574
2674
  } = {}) => {
2575
- const a = L();
2675
+ const m = H();
2576
2676
  return {
2577
- "--footer-max-width": r || a.layout.maxWidth,
2578
- "--footer-padding": e ? t || a.layout.wrapperPaddingSm : s || a.layout.wrapperPadding,
2579
- "--footer-font-size": e ? "0.75rem" : n || a.fonts.size,
2580
- background: o,
2581
- color: l || a.fonts.color
2677
+ "--footer-max-width": r || m.layout.maxWidth,
2678
+ "--footer-min-width": t,
2679
+ "--footer-width": s,
2680
+ "--footer-height": o,
2681
+ "--footer-padding": e ? n || m.layout.paddingSm : i || m.layout.padding,
2682
+ "--footer-margin": l,
2683
+ "--footer-gap": d,
2684
+ background: f,
2685
+ color: y || m.fonts.color
2582
2686
  };
2583
- }, Fo = ({
2687
+ }, ko = ({
2584
2688
  children: e,
2585
- breakPointSm: r,
2689
+ breakPoint: r,
2586
2690
  maxWidth: t,
2587
- paddingSm: s,
2588
- padding: n,
2589
- fontSize: o,
2590
- background: l,
2591
- color: a,
2592
- style: d = {},
2593
- footerProps: m = {},
2594
- footerRef: y
2691
+ minWidth: s,
2692
+ width: o,
2693
+ height: n,
2694
+ paddingSm: i,
2695
+ padding: l,
2696
+ margin: d,
2697
+ gap: f,
2698
+ background: y,
2699
+ color: m,
2700
+ className: h,
2701
+ style: x = {},
2702
+ footerProps: F = {},
2703
+ footerRef: _
2595
2704
  }) => {
2596
- const h = L(), b = (r || h.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/), C = b ? parseInt(b[1], 10) - 1 : 474, S = b ? b[2] : "px", k = ie(`(max-width: ${C}${S})`), R = wo({
2597
- isSmallScreen: k,
2705
+ const z = H(), b = (r || z.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/), k = b ? parseInt(b[1], 10) - 1 : 474, C = b ? b[2] : "px", A = ie(`(max-width: ${k}${C})`), L = wo({
2706
+ isSmallScreen: A,
2598
2707
  maxWidth: t,
2599
- paddingSm: s,
2600
- padding: n,
2601
- fontSize: o,
2602
- background: l,
2603
- color: a
2604
- });
2605
- return /* @__PURE__ */ w("footer", { ref: y, className: Ht.footer, ...m, children: /* @__PURE__ */ w(
2708
+ minWidth: s,
2709
+ width: o,
2710
+ height: n,
2711
+ paddingSm: i,
2712
+ padding: l,
2713
+ margin: d,
2714
+ gap: f,
2715
+ background: y,
2716
+ color: m
2717
+ }), P = [Ut.container, h].filter(Boolean).join(" ");
2718
+ return /* @__PURE__ */ V("footer", { ref: _, className: Ut.footer, ...F, children: /* @__PURE__ */ V(
2606
2719
  "div",
2607
2720
  {
2608
- className: Ht.container,
2609
- style: { ...R, ...d },
2721
+ className: P,
2722
+ style: { ...L, ...x },
2610
2723
  children: e
2611
2724
  }
2612
2725
  ) });
2613
- }, xo = "FeatureCard-module__card___XQt66", ko = "FeatureCard-module__icon___dXJ92", Vo = "FeatureCard-module__title___KxXyA", Co = "FeatureCard-module__content___68xkw", ze = {
2614
- card: xo,
2615
- icon: ko,
2616
- title: Vo,
2617
- content: Co
2618
- }, Eo = ({
2726
+ }, Co = "FeatureCard-module__card___XQt66", zo = "FeatureCard-module__icon___dXJ92", $o = "FeatureCard-module__title___KxXyA", Eo = "FeatureCard-module__content___68xkw", Ee = {
2727
+ card: Co,
2728
+ icon: zo,
2729
+ title: $o,
2730
+ content: Eo
2731
+ }, Ao = ({
2619
2732
  isMd: e = !1,
2620
2733
  theme: r
2621
2734
  }) => be(() => {
@@ -2627,24 +2740,24 @@ const Zo = ({
2627
2740
  "--feature-icon-margin-bottom": `calc(${t} * 0.7)`,
2628
2741
  "--feature-title-margin-bottom": `calc(${t} * 0.5)`
2629
2742
  };
2630
- }, [e, r.fonts]), Xo = ({
2743
+ }, [e, r.fonts]), en = ({
2631
2744
  icon: e,
2632
2745
  title: r,
2633
2746
  children: t,
2634
2747
  className: s,
2635
- style: n,
2636
- breakPointMd: o
2748
+ style: o,
2749
+ breakpoint: n
2637
2750
  }) => {
2638
- const l = L(), a = [ze.card, s].filter(Boolean).join(" "), d = o || l.breakpoints.md, m = ie(`(min-width: ${d})`), y = Eo({ isMd: m, theme: l });
2639
- return /* @__PURE__ */ Q("div", { className: a, style: { ...y, ...n }, children: [
2640
- e && /* @__PURE__ */ w("div", { className: ze.icon, children: e }),
2641
- /* @__PURE__ */ w("h3", { className: ze.title, children: r }),
2642
- /* @__PURE__ */ w("div", { className: ze.content, children: t })
2751
+ const i = H(), l = [Ee.card, s].filter(Boolean).join(" "), d = n || i.breakpoints.md, f = ie(`(min-width: ${d})`), y = Ao({ isMd: f, theme: i });
2752
+ return /* @__PURE__ */ Q("div", { className: l, style: { ...y, ...o }, children: [
2753
+ e && /* @__PURE__ */ V("div", { className: Ee.icon, children: e }),
2754
+ /* @__PURE__ */ V("h3", { className: Ee.title, children: r }),
2755
+ /* @__PURE__ */ V("div", { className: Ee.content, children: t })
2643
2756
  ] });
2644
- }, zo = "FeatureGridSection-module__section___wZrbC", $o = "FeatureGridSection-module__grid___iwPJv", Ut = {
2645
- section: zo,
2646
- grid: $o
2647
- }, Ao = ({
2757
+ }, No = "FeatureGridSection-module__section___wZrbC", Ro = "FeatureGridSection-module__grid___iwPJv", Pt = {
2758
+ section: No,
2759
+ grid: Ro
2760
+ }, Do = ({
2648
2761
  columns: e,
2649
2762
  isMd: r = !1,
2650
2763
  isLg: t = !1
@@ -2659,74 +2772,70 @@ const Zo = ({
2659
2772
  }[e]
2660
2773
  } : {
2661
2774
  "--grid-template-columns": "1fr"
2662
- }, [e, r, t]), Yo = ({
2775
+ }, [e, r, t]), tn = ({
2663
2776
  children: e,
2664
2777
  columns: r = 3,
2665
2778
  className: t,
2666
- breakPointMd: s,
2667
- breakPointLg: n,
2779
+ breakpoints: s,
2668
2780
  style: o,
2669
- ...l
2781
+ ...n
2670
2782
  }) => {
2671
- const a = L(), d = [Ut.section, t].filter(Boolean).join(" "), m = s || a.breakpoints.md, y = n || a.breakpoints.lg, h = ie(`(min-width: ${m})`), f = ie(`(min-width: ${y})`), b = Ao({ columns: r, isMd: h, isLg: f }), C = {
2672
- "--section-padding-vertical": `calc(${a.fonts.rhythm} * 2)`
2783
+ const i = H(), l = [Pt.section, t].filter(Boolean).join(" "), d = (s == null ? void 0 : s.md) || i.breakpoints.md, f = (s == null ? void 0 : s.lg) || i.breakpoints.lg, y = ie(`(min-width: ${d})`), m = ie(`(min-width: ${f})`), h = Do({ columns: r, isMd: y, isLg: m }), x = {
2784
+ "--section-padding-vertical": `calc(${i.fonts.rhythm} * 2)`
2673
2785
  };
2674
- return /* @__PURE__ */ w(fr, { className: d, style: C, ...l, children: /* @__PURE__ */ w("div", { className: Ut.grid, style: { ...b, ...o }, children: e }) });
2675
- }, Po = "PageLayout-module__layoutContainer___diLdT", Do = "PageLayout-module__content___h2mBr", No = "PageLayout-module__main___Sw7Pv", Ro = "PageLayout-module__mainPadded___ZKio3", $e = {
2676
- layoutContainer: Po,
2677
- content: Do,
2678
- main: No,
2679
- mainPadded: Ro
2680
- }, en = ({
2786
+ return /* @__PURE__ */ V(mr, { className: l, style: x, ...n, children: /* @__PURE__ */ V("div", { className: Pt.grid, style: { ...h, ...o }, children: e }) });
2787
+ }, Bo = "PageLayout-module__layoutContainer___diLdT", Lo = "PageLayout-module__content___h2mBr", Oo = "PageLayout-module__main___Sw7Pv", Ge = {
2788
+ layoutContainer: Bo,
2789
+ content: Lo,
2790
+ main: Oo
2791
+ }, rn = ({
2681
2792
  children: e,
2682
2793
  header: r,
2683
2794
  footer: t,
2684
- pagePadding: s = !1,
2685
- className: n,
2686
- style: o
2795
+ className: s,
2796
+ style: o,
2797
+ mainStyle: n
2687
2798
  }) => {
2688
- const l = L(), a = [$e.layoutContainer, n].filter(Boolean).join(" "), d = [$e.main, s ? $e.mainPadded : ""].filter(Boolean).join(" "), m = s ? {
2689
- "--main-padding-vertical": `calc(${l.fonts.rhythm} * 1.4)`
2690
- } : void 0;
2691
- return /* @__PURE__ */ Q("div", { className: a, style: o, children: [
2692
- /* @__PURE__ */ Q("div", { className: $e.content, children: [
2693
- r && /* @__PURE__ */ w(oo, { children: r }),
2694
- /* @__PURE__ */ w("main", { className: d, style: m, children: e })
2799
+ const i = [Ge.layoutContainer, s].filter(Boolean).join(" ");
2800
+ return /* @__PURE__ */ Q("div", { className: i, style: o, children: [
2801
+ /* @__PURE__ */ Q("div", { className: Ge.content, children: [
2802
+ r && /* @__PURE__ */ V(ao, { children: r }),
2803
+ /* @__PURE__ */ V("main", { className: Ge.main, style: n, children: e })
2695
2804
  ] }),
2696
- t && /* @__PURE__ */ w(Fo, { children: t })
2805
+ t && /* @__PURE__ */ V(ko, { children: t })
2697
2806
  ] });
2698
2807
  };
2699
2808
  export {
2700
- To as Button,
2701
- Io as CSSReset,
2702
- Tr as Checkbox,
2703
- Xo as FeatureCard,
2704
- Yo as FeatureGridSection,
2705
- Fo as Footer,
2706
- Ho as Form,
2707
- qo as FormCheckbox,
2708
- Fs as FormError,
2709
- we as FormField,
2710
- zs as FormGroup,
2711
- Uo as FormInput,
2712
- et as FormLabel,
2713
- Go as FormRadio,
2714
- Wo as FormSelect,
2715
- jo as FormTextarea,
2716
- eo as Hamburger,
2717
- oo as Header,
2718
- Jo as Hero,
2719
- Ns as Input,
2720
- uo as LoadingSpinner,
2721
- en as PageLayout,
2722
- Qs as Radio,
2723
- Zo as ResponsiveNav,
2724
- fr as ResponsiveSection,
2725
- js as Select,
2726
- Ko as Stack,
2727
- Qo as StyleLoader,
2728
- Ms as Textarea,
2729
- Mo as ThemeProvider,
2730
- vs as useFormContext,
2731
- L as useTheme
2809
+ Io as Button,
2810
+ Uo as CSSReset,
2811
+ Ur as Checkbox,
2812
+ en as FeatureCard,
2813
+ tn as FeatureGridSection,
2814
+ ko as Footer,
2815
+ Po as Form,
2816
+ Zo as FormCheckbox,
2817
+ ks as FormError,
2818
+ Fe as FormField,
2819
+ Ns as FormGroup,
2820
+ Wo as FormInput,
2821
+ tt as FormLabel,
2822
+ Qo as FormRadio,
2823
+ Go as FormSelect,
2824
+ qo as FormTextarea,
2825
+ so as Hamburger,
2826
+ ao as Header,
2827
+ Yo as Hero,
2828
+ Os as Input,
2829
+ mo as LoadingSpinner,
2830
+ rn as PageLayout,
2831
+ Xs as Radio,
2832
+ Ko as ResponsiveNav,
2833
+ mr as ResponsiveSection,
2834
+ Gs as Select,
2835
+ Xo as Stack,
2836
+ Jo as StyleLoader,
2837
+ Is as Textarea,
2838
+ jo as ThemeProvider,
2839
+ Fs as useFormContext,
2840
+ H as useTheme
2732
2841
  };