digital-rabbit-cl 1.2.8 → 1.3.1

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 (72) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Button/Button.d.ts +6 -14
  3. package/dist/components/Button/Button.d.ts.map +1 -1
  4. package/dist/components/Button/useButtonStyles.d.ts +2 -2
  5. package/dist/components/Button/useButtonStyles.d.ts.map +1 -1
  6. package/dist/components/Checkbox/Checkbox.d.ts +8 -3
  7. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  8. package/dist/components/Checkbox/useCheckboxStyles.d.ts +1 -1
  9. package/dist/components/Checkbox/useCheckboxStyles.d.ts.map +1 -1
  10. package/dist/components/FeatureCard/FeatureCard.d.ts +3 -2
  11. package/dist/components/FeatureCard/FeatureCard.d.ts.map +1 -1
  12. package/dist/components/FeatureGridSection/FeatureGridSection.d.ts +2 -3
  13. package/dist/components/FeatureGridSection/FeatureGridSection.d.ts.map +1 -1
  14. package/dist/components/Footer/Footer.d.ts +4 -8
  15. package/dist/components/Footer/Footer.d.ts.map +1 -1
  16. package/dist/components/Footer/useFooterStyles.d.ts +10 -10
  17. package/dist/components/Footer/useFooterStyles.d.ts.map +1 -1
  18. package/dist/components/Form/Form.d.ts +3 -1
  19. package/dist/components/Form/Form.d.ts.map +1 -1
  20. package/dist/components/Form/FormField.d.ts +1 -1
  21. package/dist/components/Form/FormField.d.ts.map +1 -1
  22. package/dist/components/FormError/FormError.d.ts +1 -1
  23. package/dist/components/FormError/FormError.d.ts.map +1 -1
  24. package/dist/components/FormGroup/FormGroup.d.ts +6 -9
  25. package/dist/components/FormGroup/FormGroup.d.ts.map +1 -1
  26. package/dist/components/FormLabel/FormLabel.d.ts +3 -3
  27. package/dist/components/FormLabel/FormLabel.d.ts.map +1 -1
  28. package/dist/components/Hamburger/Hamburger.d.ts +4 -5
  29. package/dist/components/Hamburger/Hamburger.d.ts.map +1 -1
  30. package/dist/components/Hamburger/useHamburgerStyles.d.ts +1 -1
  31. package/dist/components/Hamburger/useHamburgerStyles.d.ts.map +1 -1
  32. package/dist/components/Header/Header.d.ts +4 -8
  33. package/dist/components/Header/Header.d.ts.map +1 -1
  34. package/dist/components/Header/useHeaderStyles.d.ts +3 -3
  35. package/dist/components/Header/useHeaderStyles.d.ts.map +1 -1
  36. package/dist/components/Hero/Hero.d.ts +1 -1
  37. package/dist/components/Hero/Hero.d.ts.map +1 -1
  38. package/dist/components/Input/Input.d.ts +3 -3
  39. package/dist/components/Input/Input.d.ts.map +1 -1
  40. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +7 -3
  41. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts.map +1 -1
  42. package/dist/components/PageLayout/PageLayout.d.ts +3 -2
  43. package/dist/components/PageLayout/PageLayout.d.ts.map +1 -1
  44. package/dist/components/Radio/Radio.d.ts +8 -3
  45. package/dist/components/Radio/Radio.d.ts.map +1 -1
  46. package/dist/components/ResponsiveNav/ResponsiveNav.d.ts +8 -7
  47. package/dist/components/ResponsiveNav/ResponsiveNav.d.ts.map +1 -1
  48. package/dist/components/ResponsiveSection/ResponsiveSection.d.ts +4 -4
  49. package/dist/components/ResponsiveSection/ResponsiveSection.d.ts.map +1 -1
  50. package/dist/components/Select/Select.d.ts +3 -3
  51. package/dist/components/Select/Select.d.ts.map +1 -1
  52. package/dist/components/Stack/Stack.d.ts +2 -2
  53. package/dist/components/Stack/Stack.d.ts.map +1 -1
  54. package/dist/components/Textarea/Textarea.d.ts +3 -3
  55. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  56. package/dist/digital-rabbit-cl.es.js +1177 -1066
  57. package/dist/digital-rabbit-cl.umd.js +4 -4
  58. package/dist/index.d.ts +4 -2
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/test-utils.d.ts +2 -1
  61. package/dist/test-utils.d.ts.map +1 -1
  62. package/dist/theme/ThemeContext.d.ts +2 -7
  63. package/dist/theme/ThemeContext.d.ts.map +1 -1
  64. package/dist/theme/index.d.ts +2 -2
  65. package/dist/theme/index.d.ts.map +1 -1
  66. package/dist/types/utils.d.ts +7 -0
  67. package/dist/types/utils.d.ts.map +1 -0
  68. package/dist/utils.d.ts +23 -0
  69. package/dist/utils.d.ts.map +1 -0
  70. package/package.json +1 -1
  71. package/dist/utils/componentProps.d.ts +0 -247
  72. package/dist/utils/componentProps.d.ts.map +0 -1
@@ -1,5 +1,5 @@
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
- (function(N,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],v):(N=typeof globalThis<"u"?globalThis:N||self,v(N.DigitalRabbitCL={},N.jsxRuntime,N.React))})(this,(function(N,v,w){"use strict";const Fe={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeLarge:"Button-module__sizeLarge___yeZSH"},Fr=({isActive:e,disabled:r,buttonColor:t="#FFF",textColor:s="#000",hoverColor:o,hoverTextColor:n,outline:i})=>{let l,d,f;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));let y=1;return r?y=.3:e&&(y=o||i?1:.75),{backgroundColor:l,borderColor:d,color:f,opacity:y}},lt={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},Be={colors:lt,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",rhythm:"1.45rem",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",paddingHorizontal:.35,primary:{textColor:lt.secondary}},inputs:{paddingHorizontal:.27},sizes:{small:{paddingVertical:.07},large:{paddingVertical:.17}},border:{radius:"5px",width:"0.15em"},breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",paddingSm:"0.5rem",padding:"1rem"}},ct=w.createContext(Be);function ut(e,r){const t={...e};return Ve(e)&&Ve(r)&&Object.keys(r).forEach(s=>{const o=r[s],n=e[s];Ve(o)&&Ve(n)?t[s]=ut(n,o):o!==void 0&&(t[s]=o)}),t}function Ve(e){return e&&typeof e=="object"&&!Array.isArray(e)}const Vr=({theme:e,children:r})=>{const t=e?ut(Be,e):Be;return v.jsx(ct.Provider,{value:t,children:r})},H=()=>w.useContext(ct),wr=({color:e,textColor:r,hoverColor:t,hoverTextColor:s,disabled:o=!1,size:n="large",outline:i=!1,type:l="button",className:d,style:f,buttonProps:y={},onClick:m,children:h})=>{const k=H(),[V,_]=w.useState(!1);let $;r?$=r:$=e?k.buttons.textColor:k.buttons.primary.textColor;const E=e||k.colors.primary,C={...Fr({isActive:V,disabled:o,buttonColor:E,textColor:$,hoverColor:t,hoverTextColor:s,outline:i}),fontSize:k.fonts.size,borderWidth:k.border.width,borderRadius:k.border.radius,"--button-padding-small":`calc(${k.fonts.rhythm} * ${k.sizes.small.paddingVertical}) calc(${k.fonts.rhythm} * ${k.buttons.paddingHorizontal})`,"--button-padding-large":`calc(${k.fonts.rhythm} * ${k.sizes.large.paddingVertical}) calc(${k.fonts.rhythm} * ${k.buttons.paddingHorizontal})`},z=[Fe.button,n==="small"?Fe.sizeSmall:Fe.sizeLarge,i?Fe.outline:"",d].filter(Boolean).join(" ");return v.jsx("button",{className:z,disabled:o,onClick:m,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),type:l,...y,style:{...C,...f,...y.style},children:h})};var dt=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),kr=new Uint8Array(16);function xr(){if(!dt)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dt(kr)}for(var ft=[],we=0;we<256;++we)ft[we]=(we+256).toString(16).substr(1);function Cr(e,r){var t=0,s=ft;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("")}function yt(e,r,t){var s=r&&t||0;typeof e=="string"&&(r=e==="binary"?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||xr)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,r)for(var n=0;n<16;++n)r[s+n]=o[n];return r||Cr(o)}const Oe={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},zr=({color:e="#000",checkmarkColor:r,disabled:t=!1,inverted:s=!1})=>{let o=e;return r?o=r:s&&(o="white"),{boxColor:e,checkmarkColor:o,cursor:t?"default":"pointer",opacity:t?.3:1}},mt={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},$r=({color:e="#000",disabled:r=!1,fontSize:t=".85em"})=>({color:e,fontSize:t,opacity:r?.5:1,cursor:r?"not-allowed":"default"}),ke=({children:e,color:r,disabled:t=!1,error:s=!1,htmlFor:o,className:n,style:i,labelProps:l})=>{const d=H(),f=d.colors.error,y=s?f:r||d.colors.primary,m=$r({color:y,disabled:t,fontSize:".85em"}),h={"--form-label-padding-bottom":`calc(${d.fonts.rhythm} * 0.17)`,color:m.color,fontSize:m.fontSize,opacity:m.opacity,cursor:m.cursor,...i,...l==null?void 0:l.style},k=[mt.label,t?mt.disabled:"",n].filter(Boolean).join(" ");return v.jsx("label",{className:k,htmlFor:o,style:h,...l,children:e})},ht=({checked:e=!1,checkmarkColor:r,color:t,disabled:s=!1,error:o=!1,id:n,inverted:i=!1,label:l,labelStyle:d,name:f,onChange:y,className:m,style:h})=>{const k=H(),V=n||yt(),_=k.colors.error,$=o?_:t||k.colors.primary,E=zr({color:$,checkmarkColor:r,disabled:s,inverted:i}),S=T=>{s||y(T)},C={cursor:E.cursor,fontSize:k.fonts.size,opacity:E.opacity,...h},z={width:"1rem"},A=[Oe.container,m].filter(Boolean).join(" ");return v.jsxs("div",{className:A,style:C,children:[v.jsx("input",{id:V,checked:e,disabled:s,onChange:T=>S({target:{checked:T.target.checked,name:f,type:"checkbox"}}),name:f,style:{display:"none"},type:"checkbox"}),v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>S({target:{checked:!e,name:f,type:"checkbox"}}),style:z,className:Oe.svg,children:[v.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:{fill:i&&e?E.boxColor:"transparent",strokeWidth:"25",stroke:E.boxColor}}),e&&v.jsx("path",{d:"M 25 45 L 45 65 L 75 30",stroke:E.checkmarkColor,strokeWidth:"15",fill:"transparent"})]}),l&&v.jsx(ke,{htmlFor:V,className:Oe.label,style:{paddingBottom:0,...d},color:E.boxColor,disabled:s,error:o,children:l})]})},Er=()=>{const e=H();return w.useLayoutEffect(()=>{const r=document.documentElement;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))},[e]),null};var ge=e=>e.type==="checkbox",ce=e=>e instanceof Date,Q=e=>e==null;const gt=e=>typeof e=="object";var P=e=>!Q(e)&&!Array.isArray(e)&&gt(e)&&!ce(e),_t=e=>P(e)&&e.target?ge(e.target)?e.target.checked:e.target.value:e,Ar=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vt=(e,r)=>e.has(Ar(r)),Nr=e=>{const r=e.constructor&&e.constructor.prototype;return P(r)&&r.hasOwnProperty("isPrototypeOf")},Te=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function W(e){let r;const t=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(Te&&(e instanceof Blob||s))&&(t||P(e)))if(r=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!Nr(e))r=e;else for(const o in e)e.hasOwnProperty(o)&&(r[o]=W(e[o]));else return e;return r}var xe=e=>/^\w*$/.test(e),j=e=>e===void 0,Me=e=>Array.isArray(e)?e.filter(Boolean):[],He=e=>Me(e.replace(/["|']|\]/g,"").split(/\.|\[/)),b=(e,r,t)=>{if(!r||!P(e))return t;const s=(xe(r)?[r]:He(r)).reduce((o,n)=>Q(o)?o:o[n],e);return j(s)||s===e?j(e[r])?t:e[r]:s},J=e=>typeof e=="boolean",L=(e,r,t)=>{let s=-1;const o=xe(r)?[r]:He(r),n=o.length,i=n-1;for(;++s<n;){const l=o[s];let d=t;if(s!==i){const f=e[l];d=P(f)||Array.isArray(f)?f:isNaN(+o[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const Ce={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},R={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ae={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},pt=w.createContext(null);pt.displayName="HookFormContext";const je=()=>w.useContext(pt);var bt=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const i=n;return r._proxyFormState[i]!==R.all&&(r._proxyFormState[i]=!s||R.all),t&&(t[i]=!0),e[i]}});return o};const Ie=typeof window<"u"?w.useLayoutEffect:w.useEffect;function Dr(e){const r=je(),{control:t=r.control,disabled:s,name:o,exact:n}=e||{},[i,l]=w.useState(t._formState),d=w.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ie(()=>t._subscribe({name:o,formState:d.current,exact:n,callback:f=>{!s&&l({...t._formState,...f})}}),[o,s,n]),w.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),w.useMemo(()=>bt(i,t,d.current,!1),[i,t])}var X=e=>typeof e=="string",Pe=(e,r,t,s,o)=>X(e)?(s&&r.watch.add(e),b(t,e,o)):Array.isArray(e)?e.map(n=>(s&&r.watch.add(n),b(t,n))):(s&&(r.watchAll=!0),t),Ue=e=>Q(e)||!gt(e);function ee(e,r,t=new WeakSet){if(Ue(e)||Ue(r))return e===r;if(ce(e)&&ce(r))return e.getTime()===r.getTime();const s=Object.keys(e),o=Object.keys(r);if(s.length!==o.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const n of s){const i=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const l=r[n];if(ce(i)&&ce(l)||P(i)&&P(l)||Array.isArray(i)&&Array.isArray(l)?!ee(i,l,t):i!==l)return!1}}return!0}function Lr(e){const r=je(),{control:t=r.control,name:s,defaultValue:o,disabled:n,exact:i,compute:l}=e||{},d=w.useRef(o),f=w.useRef(l),y=w.useRef(void 0),m=w.useRef(t),h=w.useRef(s);f.current=l;const[k,V]=w.useState(()=>{const z=t._getWatch(s,d.current);return f.current?f.current(z):z}),_=w.useCallback(z=>{const A=Pe(s,t._names,z||t._formValues,!1,d.current);return f.current?f.current(A):A},[t._formValues,t._names,s]),$=w.useCallback(z=>{if(!n){const A=Pe(s,t._names,z||t._formValues,!1,d.current);if(f.current){const T=f.current(A);ee(T,y.current)||(V(T),y.current=T)}else V(A)}},[t._formValues,t._names,n,s]);Ie(()=>((m.current!==t||!ee(h.current,s))&&(m.current=t,h.current=s,$()),t._subscribe({name:s,formState:{values:!0},exact:i,callback:z=>{$(z.values)}})),[t,i,s,$]),w.useEffect(()=>t._removeUnmounted());const E=m.current!==t,S=h.current,C=w.useMemo(()=>{if(n)return null;const z=!E&&!ee(S,s);return E||z?_():null},[n,E,s,S,_]);return C!==null?C:k}function Br(e){const r=je(),{name:t,disabled:s,control:o=r.control,shouldUnregister:n,defaultValue:i}=e,l=vt(o._names.array,t),d=w.useMemo(()=>b(o._formValues,t,b(o._defaultValues,t,i)),[o,t,i]),f=Lr({control:o,name:t,defaultValue:d,exact:!0}),y=Dr({control:o,name:t,exact:!0}),m=w.useRef(e),h=w.useRef(void 0),k=w.useRef(o.register(t,{...e.rules,value:f,...J(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const V=w.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!b(y.errors,t)},isDirty:{enumerable:!0,get:()=>!!b(y.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!b(y.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!b(y.validatingFields,t)},error:{enumerable:!0,get:()=>b(y.errors,t)}}),[y,t]),_=w.useCallback(C=>k.current.onChange({target:{value:_t(C),name:t},type:Ce.CHANGE}),[t]),$=w.useCallback(()=>k.current.onBlur({target:{value:b(o._formValues,t),name:t},type:Ce.BLUR}),[t,o._formValues]),E=w.useCallback(C=>{const z=b(o._fields,t);z&&C&&(z._f.ref={focus:()=>C.focus&&C.focus(),select:()=>C.select&&C.select(),setCustomValidity:A=>C.setCustomValidity(A),reportValidity:()=>C.reportValidity()})},[o._fields,t]),S=w.useMemo(()=>({name:t,value:f,...J(s)||y.disabled?{disabled:y.disabled||s}:{},onChange:_,onBlur:$,ref:E}),[t,s,y.disabled,_,$,E,f]);return w.useEffect(()=>{const C=o._options.shouldUnregister||n,z=h.current;z&&z!==t&&!l&&o.unregister(z),o.register(t,{...m.current.rules,...J(m.current.disabled)?{disabled:m.current.disabled}:{}});const A=(T,q)=>{const oe=b(o._fields,T);oe&&oe._f&&(oe._f.mount=q)};if(A(t,!0),C){const T=W(b(o._options.defaultValues,t,m.current.defaultValue));L(o._defaultValues,t,T),j(b(o._formValues,t))&&L(o._formValues,t,T)}return!l&&o.register(t),h.current=t,()=>{(l?C&&!o._state.action:C)?o.unregister(t):A(t,!1)}},[t,o,l,n]),w.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),w.useMemo(()=>({field:S,formState:y,fieldState:V}),[S,y,V])}var We=(e,r,t,s,o)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:o||!0}}:{},_e=e=>Array.isArray(e)?e:[e],St=()=>{let e=[];return{get observers(){return e},next:o=>{for(const n of e)n.next&&n.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(n=>n!==o)}}),unsubscribe:()=>{e=[]}}};function Ft(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const o=e[s],n=r[s];if(o&&P(o)&&n){const i=Ft(o,n);P(i)&&(t[s]=i)}else e[s]&&(t[s]=n)}return t}var G=e=>P(e)&&!Object.keys(e).length,qe=e=>e.type==="file",te=e=>typeof e=="function",ze=e=>{if(!Te)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Vt=e=>e.type==="select-multiple",Ge=e=>e.type==="radio",Or=e=>Ge(e)||ge(e),Ze=e=>ze(e)&&e.isConnected;function Tr(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=j(e)?s++:e[r[s++]];return e}function Mr(e){for(const r in e)if(e.hasOwnProperty(r)&&!j(e[r]))return!1;return!0}function U(e,r){const t=Array.isArray(r)?r:xe(r)?[r]:He(r),s=t.length===1?e:Tr(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(P(s)&&G(s)||Array.isArray(s)&&Mr(s))&&U(e,t.slice(0,-1)),e}var Hr=e=>{for(const r in e)if(te(e[r]))return!0;return!1};function wt(e){return Array.isArray(e)||P(e)&&!Hr(e)}function Qe(e,r={}){for(const t in e)wt(e[t])?(r[t]=Array.isArray(e[t])?[]:{},Qe(e[t],r[t])):j(e[t])||(r[t]=!0);return r}function de(e,r,t){t||(t=Qe(r));for(const s in e)wt(e[s])?j(r)||Ue(t[s])?t[s]=Qe(e[s],Array.isArray(e[s])?[]:{}):de(e[s],Q(r)?{}:r[s],t[s]):t[s]=!ee(e[s],r[s]);return t}const kt={value:!1,isValid:!1},xt={value:!0,isValid:!0};var Ct=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!j(e[0].attributes.value)?j(e[0].value)||e[0].value===""?xt:{value:e[0].value,isValid:!0}:xt:kt}return kt},zt=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>j(e)?e:r?e===""?NaN:e&&+e:t&&X(e)?new Date(e):s?s(e):e;const $t={isValid:!1,value:null};var Et=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,$t):$t;function At(e){const r=e.ref;return qe(r)?r.files:Ge(r)?Et(e.refs).value:Vt(r)?[...r.selectedOptions].map(({value:t})=>t):ge(r)?Ct(e.refs).value:zt(j(r.value)?e.ref.value:r.value,e)}var jr=(e,r,t,s)=>{const o={};for(const n of e){const i=b(r,n);i&&L(o,n,i._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},$e=e=>e instanceof RegExp,ve=e=>j(e)?e:$e(e)?e.source:P(e)?$e(e.value)?e.value.source:e.value:e,Nt=e=>({isOnSubmit:!e||e===R.onSubmit,isOnBlur:e===R.onBlur,isOnChange:e===R.onChange,isOnAll:e===R.all,isOnTouch:e===R.onTouched});const Dt="AsyncFunction";var Ir=e=>!!e&&!!e.validate&&!!(te(e.validate)&&e.validate.constructor.name===Dt||P(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Dt)),Pr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Lt=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const pe=(e,r,t,s)=>{for(const o of t||Object.keys(e)){const n=b(e,o);if(n){const{_f:i,...l}=n;if(i){if(i.refs&&i.refs[0]&&r(i.refs[0],o)&&!s)return!0;if(i.ref&&r(i.ref,i.name)&&!s)return!0;if(pe(l,r))break}else if(P(l)&&pe(l,r))break}}};function Bt(e,r,t){const s=b(e,t);if(s||xe(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),i=b(r,n),l=b(e,n);if(i&&!Array.isArray(i)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};if(l&&l.root&&l.root.type)return{name:`${n}.root`,error:l.root};o.pop()}return{name:t}}var Ur=(e,r,t,s)=>{t(e);const{name:o,...n}=e;return G(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(i=>r[i]===(!s||R.all))},Wr=(e,r,t)=>!e||!r||e===r||_e(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),qr=(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,Gr=(e,r)=>!Me(b(e,r)).length&&U(e,r),Zr=(e,r,t)=>{const s=_e(b(e,t));return L(s,"root",r[t]),L(e,t,s),e};function Ot(e,r,t="validate"){if(X(e)||Array.isArray(e)&&e.every(X)||J(e)&&!e)return{type:t,message:X(e)?e:"",ref:r}}var fe=e=>P(e)&&!$e(e)?e:{value:e,message:""},Tt=async(e,r,t,s,o,n)=>{const{ref:i,refs:l,required:d,maxLength:f,minLength:y,min:m,max:h,pattern:k,validate:V,name:_,valueAsNumber:$,mount:E}=e._f,S=b(t,_);if(!E||r.has(_))return{};const C=l?l[0]:i,z=D=>{o&&C.reportValidity&&(C.setCustomValidity(J(D)?"":D||""),C.reportValidity())},A={},T=Ge(i),q=ge(i),oe=T||q,re=($||qe(i))&&j(i.value)&&j(S)||ze(i)&&i.value===""||S===""||Array.isArray(S)&&!S.length,ue=We.bind(null,_,s,A),ne=(D,O,I,Z=ae.maxLength,K=ae.minLength)=>{const ie=D?O:I;A[_]={type:D?Z:K,message:ie,ref:i,...ue(D?Z:K,ie)}};if(n?!Array.isArray(S)||!S.length:d&&(!oe&&(re||Q(S))||J(S)&&!S||q&&!Ct(l).isValid||T&&!Et(l).isValid)){const{value:D,message:O}=X(d)?{value:!!d,message:d}:fe(d);if(D&&(A[_]={type:ae.required,message:O,ref:C,...ue(ae.required,O)},!s))return z(O),A}if(!re&&(!Q(m)||!Q(h))){let D,O;const I=fe(h),Z=fe(m);if(!Q(S)&&!isNaN(S)){const K=i.valueAsNumber||S&&+S;Q(I.value)||(D=K>I.value),Q(Z.value)||(O=K<Z.value)}else{const K=i.valueAsDate||new Date(S),ie=De=>new Date(new Date().toDateString()+" "+De),Se=i.type=="time",he=i.type=="week";X(I.value)&&S&&(D=Se?ie(S)>ie(I.value):he?S>I.value:K>new Date(I.value)),X(Z.value)&&S&&(O=Se?ie(S)<ie(Z.value):he?S<Z.value:K<new Date(Z.value))}if((D||O)&&(ne(!!D,I.message,Z.message,ae.max,ae.min),!s))return z(A[_].message),A}if((f||y)&&!re&&(X(S)||n&&Array.isArray(S))){const D=fe(f),O=fe(y),I=!Q(D.value)&&S.length>+D.value,Z=!Q(O.value)&&S.length<+O.value;if((I||Z)&&(ne(I,D.message,O.message),!s))return z(A[_].message),A}if(k&&!re&&X(S)){const{value:D,message:O}=fe(k);if($e(D)&&!S.match(D)&&(A[_]={type:ae.pattern,message:O,ref:i,...ue(ae.pattern,O)},!s))return z(O),A}if(V){if(te(V)){const D=await V(S,t),O=Ot(D,C);if(O&&(A[_]={...O,...ue(ae.validate,O.message)},!s))return z(O.message),A}else if(P(V)){let D={};for(const O in V){if(!G(D)&&!s)break;const I=Ot(await V[O](S,t),C,O);I&&(D={...I,...ue(O,I.message)},z(I.message),s&&(A[_]=D))}if(!G(D)&&(A[_]={ref:C,...D},!s))return A}}return z(!0),A};const Qr={mode:R.onSubmit,reValidateMode:R.onChange,shouldFocusError:!0};function Kr(e={}){let r={...Qr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:te(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},o=P(r.defaultValues)||P(r.values)?W(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:W(o),i={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...y};const h={array:St(),state:St()},k=r.criteriaMode===R.all,V=a=>c=>{clearTimeout(f),f=setTimeout(a,c)},_=async a=>{if(!r.disabled&&(y.isValid||m.isValid||a)){const c=r.resolver?G((await q()).errors):await re(s,!0);c!==t.isValid&&h.state.next({isValid:c})}},$=(a,c)=>{!r.disabled&&(y.isValidating||y.validatingFields||m.isValidating||m.validatingFields)&&((a||Array.from(l.mount)).forEach(u=>{u&&(c?L(t.validatingFields,u,c):U(t.validatingFields,u))}),h.state.next({validatingFields:t.validatingFields,isValidating:!G(t.validatingFields)}))},E=(a,c=[],u,F,p=!0,g=!0)=>{if(F&&u&&!r.disabled){if(i.action=!0,g&&Array.isArray(b(s,a))){const x=u(b(s,a),F.argA,F.argB);p&&L(s,a,x)}if(g&&Array.isArray(b(t.errors,a))){const x=u(b(t.errors,a),F.argA,F.argB);p&&L(t.errors,a,x),Gr(t.errors,a)}if((y.touchedFields||m.touchedFields)&&g&&Array.isArray(b(t.touchedFields,a))){const x=u(b(t.touchedFields,a),F.argA,F.argB);p&&L(t.touchedFields,a,x)}(y.dirtyFields||m.dirtyFields)&&(t.dirtyFields=de(o,n)),h.state.next({name:a,isDirty:ne(a,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else L(n,a,c)},S=(a,c)=>{L(t.errors,a,c),h.state.next({errors:t.errors})},C=a=>{t.errors=a,h.state.next({errors:t.errors,isValid:!1})},z=(a,c,u,F)=>{const p=b(s,a);if(p){const g=b(n,a,j(u)?b(o,a):u);j(g)||F&&F.defaultChecked||c?L(n,a,c?g:At(p._f)):I(a,g),i.mount&&_()}},A=(a,c,u,F,p)=>{let g=!1,x=!1;const B={name:a};if(!r.disabled){if(!u||F){(y.isDirty||m.isDirty)&&(x=t.isDirty,t.isDirty=B.isDirty=ne(),g=x!==B.isDirty);const M=ee(b(o,a),c);x=!!b(t.dirtyFields,a),M?U(t.dirtyFields,a):L(t.dirtyFields,a,!0),B.dirtyFields=t.dirtyFields,g=g||(y.dirtyFields||m.dirtyFields)&&x!==!M}if(u){const M=b(t.touchedFields,a);M||(L(t.touchedFields,a,u),B.touchedFields=t.touchedFields,g=g||(y.touchedFields||m.touchedFields)&&M!==u)}g&&p&&h.state.next(B)}return g?B:{}},T=(a,c,u,F)=>{const p=b(t.errors,a),g=(y.isValid||m.isValid)&&J(c)&&t.isValid!==c;if(r.delayError&&u?(d=V(()=>S(a,u)),d(r.delayError)):(clearTimeout(f),d=null,u?L(t.errors,a,u):U(t.errors,a)),(u?!ee(p,u):p)||!G(F)||g){const x={...F,...g&&J(c)?{isValid:c}:{},errors:t.errors,name:a};t={...t,...x},h.state.next(x)}},q=async a=>{$(a,!0);const c=await r.resolver(n,r.context,jr(a||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return $(a),c},oe=async a=>{const{errors:c}=await q(a);if(a)for(const u of a){const F=b(c,u);F?L(t.errors,u,F):U(t.errors,u)}else t.errors=c;return c},re=async(a,c,u={valid:!0})=>{for(const F in a){const p=a[F];if(p){const{_f:g,...x}=p;if(g){const B=l.array.has(g.name),M=p._f&&Ir(p._f);M&&y.validatingFields&&$([g.name],!0);const Y=await Tt(p,l.disabled,n,k,r.shouldUseNativeValidation&&!c,B);if(M&&y.validatingFields&&$([g.name]),Y[g.name]&&(u.valid=!1,c))break;!c&&(b(Y,g.name)?B?Zr(t.errors,Y,g.name):L(t.errors,g.name,Y[g.name]):U(t.errors,g.name))}!G(x)&&await re(x,c,u)}}return u.valid},ue=()=>{for(const a of l.unMount){const c=b(s,a);c&&(c._f.refs?c._f.refs.every(u=>!Ze(u)):!Ze(c._f.ref))&&st(a)}l.unMount=new Set},ne=(a,c)=>!r.disabled&&(a&&c&&L(n,a,c),!ee(De(),o)),D=(a,c,u)=>Pe(a,l,{...i.mount?n:j(c)?o:X(a)?{[a]:c}:c},u,c),O=a=>Me(b(i.mount?n:o,a,r.shouldUnregister?b(o,a,[]):[])),I=(a,c,u={})=>{const F=b(s,a);let p=c;if(F){const g=F._f;g&&(!g.disabled&&L(n,a,zt(c,g)),p=ze(g.ref)&&Q(c)?"":c,Vt(g.ref)?[...g.ref.options].forEach(x=>x.selected=p.includes(x.value)):g.refs?ge(g.ref)?g.refs.forEach(x=>{(!x.defaultChecked||!x.disabled)&&(Array.isArray(p)?x.checked=!!p.find(B=>B===x.value):x.checked=p===x.value||!!p)}):g.refs.forEach(x=>x.checked=x.value===p):qe(g.ref)?g.ref.value="":(g.ref.value=p,g.ref.type||h.state.next({name:a,values:W(n)})))}(u.shouldDirty||u.shouldTouch)&&A(a,p,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&he(a)},Z=(a,c,u)=>{for(const F in c){if(!c.hasOwnProperty(F))return;const p=c[F],g=a+"."+F,x=b(s,g);(l.array.has(a)||P(p)||x&&!x._f)&&!ce(p)?Z(g,p,u):I(g,p,u)}},K=(a,c,u={})=>{const F=b(s,a),p=l.array.has(a),g=W(c);L(n,a,g),p?(h.array.next({name:a,values:W(n)}),(y.isDirty||y.dirtyFields||m.isDirty||m.dirtyFields)&&u.shouldDirty&&h.state.next({name:a,dirtyFields:de(o,n),isDirty:ne(a,g)})):F&&!F._f&&!Q(g)?Z(a,g,u):I(a,g,u),Lt(a,l)&&h.state.next({...t,name:a}),h.state.next({name:i.mount?a:void 0,values:W(n)})},ie=async a=>{i.mount=!0;const c=a.target;let u=c.name,F=!0;const p=b(s,u),g=M=>{F=Number.isNaN(M)||ce(M)&&isNaN(M.getTime())||ee(M,b(n,u,M))},x=Nt(r.mode),B=Nt(r.reValidateMode);if(p){let M,Y;const Le=c.type?At(p._f):_t(a),le=a.type===Ce.BLUR||a.type===Ce.FOCUS_OUT,js=!Pr(p._f)&&!r.resolver&&!b(t.errors,u)&&!p._f.deps||qr(le,b(t.touchedFields,u),t.isSubmitted,B,x),it=Lt(u,l,le);L(n,u,Le),le?(!c||!c.readOnly)&&(p._f.onBlur&&p._f.onBlur(a),d&&d(0)):p._f.onChange&&p._f.onChange(a);const at=A(u,Le,le),Is=!G(at)||it;if(!le&&h.state.next({name:u,type:a.type,values:W(n)}),js)return(y.isValid||m.isValid)&&(r.mode==="onBlur"?le&&_():le||_()),Is&&h.state.next({name:u,...it?{}:at});if(!le&&it&&h.state.next({...t}),r.resolver){const{errors:br}=await q([u]);if(g(Le),F){const Ps=Bt(t.errors,s,u),Sr=Bt(br,s,Ps.name||u);M=Sr.error,u=Sr.name,Y=G(br)}}else $([u],!0),M=(await Tt(p,l.disabled,n,k,r.shouldUseNativeValidation))[u],$([u]),g(Le),F&&(M?Y=!1:(y.isValid||m.isValid)&&(Y=await re(s,!0)));F&&(p._f.deps&&(!Array.isArray(p._f.deps)||p._f.deps.length>0)&&he(p._f.deps),T(u,Y,M,at))}},Se=(a,c)=>{if(b(t.errors,c)&&a.focus)return a.focus(),1},he=async(a,c={})=>{let u,F;const p=_e(a);if(r.resolver){const g=await oe(j(a)?a:p);u=G(g),F=a?!p.some(x=>b(g,x)):u}else a?(F=(await Promise.all(p.map(async g=>{const x=b(s,g);return await re(x&&x._f?{[g]:x}:x)}))).every(Boolean),!(!F&&!t.isValid)&&_()):F=u=await re(s);return h.state.next({...!X(a)||(y.isValid||m.isValid)&&u!==t.isValid?{}:{name:a},...r.resolver||!a?{isValid:u}:{},errors:t.errors}),c.shouldFocus&&!F&&pe(s,Se,a?p:l.mount),F},De=(a,c)=>{let u={...i.mount?n:o};return c&&(u=Ft(c.dirtyFields?t.dirtyFields:t.touchedFields,u)),j(a)?u:X(a)?b(u,a):a.map(F=>b(u,F))},fr=(a,c)=>({invalid:!!b((c||t).errors,a),isDirty:!!b((c||t).dirtyFields,a),error:b((c||t).errors,a),isValidating:!!b(t.validatingFields,a),isTouched:!!b((c||t).touchedFields,a)}),Ds=a=>{a&&_e(a).forEach(c=>U(t.errors,c)),h.state.next({errors:a?t.errors:{}})},yr=(a,c,u)=>{const F=(b(s,a,{_f:{}})._f||{}).ref,p=b(t.errors,a)||{},{ref:g,message:x,type:B,...M}=p;L(t.errors,a,{...M,...c,ref:F}),h.state.next({name:a,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&F&&F.focus&&F.focus()},Ls=(a,c)=>te(a)?h.state.subscribe({next:u=>"values"in u&&a(D(void 0,c),u)}):D(a,c,!0),mr=a=>h.state.subscribe({next:c=>{Wr(a.name,c.name,a.exact)&&Ur(c,a.formState||y,Hs,a.reRenderRoot)&&a.callback({values:{...n},...t,...c,defaultValues:o})}}).unsubscribe,Bs=a=>(i.mount=!0,m={...m,...a.formState},mr({...a,formState:m})),st=(a,c={})=>{for(const u of a?_e(a):l.mount)l.mount.delete(u),l.array.delete(u),c.keepValue||(U(s,u),U(n,u)),!c.keepError&&U(t.errors,u),!c.keepDirty&&U(t.dirtyFields,u),!c.keepTouched&&U(t.touchedFields,u),!c.keepIsValidating&&U(t.validatingFields,u),!r.shouldUnregister&&!c.keepDefaultValue&&U(o,u);h.state.next({values:W(n)}),h.state.next({...t,...c.keepDirty?{isDirty:ne()}:{}}),!c.keepIsValid&&_()},hr=({disabled:a,name:c})=>{(J(a)&&i.mount||a||l.disabled.has(c))&&(a?l.disabled.add(c):l.disabled.delete(c))},ot=(a,c={})=>{let u=b(s,a);const F=J(c.disabled)||J(r.disabled);return L(s,a,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:a}},name:a,mount:!0,...c}}),l.mount.add(a),u?hr({disabled:J(c.disabled)?c.disabled:r.disabled,name:a}):z(a,!0,c.value),{...F?{disabled:c.disabled||r.disabled}:{},...r.progressive?{required:!!c.required,min:ve(c.min),max:ve(c.max),minLength:ve(c.minLength),maxLength:ve(c.maxLength),pattern:ve(c.pattern)}:{},name:a,onChange:ie,onBlur:ie,ref:p=>{if(p){ot(a,c),u=b(s,a);const g=j(p.value)&&p.querySelectorAll&&p.querySelectorAll("input,select,textarea")[0]||p,x=Or(g),B=u._f.refs||[];if(x?B.find(M=>M===g):g===u._f.ref)return;L(s,a,{_f:{...u._f,...x?{refs:[...B.filter(Ze),g,...Array.isArray(b(o,a))?[{}]:[]],ref:{type:g.type,name:a}}:{ref:g}}}),z(a,!1,void 0,g)}else u=b(s,a,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(vt(l.array,a)&&i.action)&&l.unMount.add(a)}}},nt=()=>r.shouldFocusError&&pe(s,Se,l.mount),Os=a=>{J(a)&&(h.state.next({disabled:a}),pe(s,(c,u)=>{const F=b(s,u);F&&(c.disabled=F._f.disabled||a,Array.isArray(F._f.refs)&&F._f.refs.forEach(p=>{p.disabled=F._f.disabled||a}))},0,!1))},gr=(a,c)=>async u=>{let F;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let p=W(n);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:g,values:x}=await q();t.errors=g,p=W(x)}else await re(s);if(l.disabled.size)for(const g of l.disabled)U(p,g);if(U(t.errors,"root"),G(t.errors)){h.state.next({errors:{}});try{await a(p,u)}catch(g){F=g}}else c&&await c({...t.errors},u),nt(),setTimeout(nt);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:G(t.errors)&&!F,submitCount:t.submitCount+1,errors:t.errors}),F)throw F},Ts=(a,c={})=>{b(s,a)&&(j(c.defaultValue)?K(a,W(b(o,a))):(K(a,c.defaultValue),L(o,a,W(c.defaultValue))),c.keepTouched||U(t.touchedFields,a),c.keepDirty||(U(t.dirtyFields,a),t.isDirty=c.defaultValue?ne(a,W(b(o,a))):ne()),c.keepError||(U(t.errors,a),y.isValid&&_()),h.state.next({...t}))},_r=(a,c={})=>{const u=a?W(a):o,F=W(u),p=G(a),g=p?o:F;if(c.keepDefaultValues||(o=u),!c.keepValues){if(c.keepDirtyValues){const x=new Set([...l.mount,...Object.keys(de(o,n))]);for(const B of Array.from(x))b(t.dirtyFields,B)?L(g,B,b(n,B)):K(B,b(g,B))}else{if(Te&&j(a))for(const x of l.mount){const B=b(s,x);if(B&&B._f){const M=Array.isArray(B._f.refs)?B._f.refs[0]:B._f.ref;if(ze(M)){const Y=M.closest("form");if(Y){Y.reset();break}}}}if(c.keepFieldsRef)for(const x of l.mount)K(x,b(g,x));else s={}}n=r.shouldUnregister?c.keepDefaultValues?W(o):{}:W(g),h.array.next({values:{...g}}),h.state.next({values:{...g}})}l={mount:c.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!y.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!G(g),i.watch=!!r.shouldUnregister,h.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:p?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!ee(a,o)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:p?{}:c.keepDirtyValues?c.keepDefaultValues&&n?de(o,n):t.dirtyFields:c.keepDefaultValues&&a?de(o,a):c.keepDirty?t.dirtyFields:{},touchedFields:c.keepTouched?t.touchedFields:{},errors:c.keepErrors?t.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},vr=(a,c)=>_r(te(a)?a(n):a,c),Ms=(a,c={})=>{const u=b(s,a),F=u&&u._f;if(F){const p=F.refs?F.refs[0]:F.ref;p.focus&&(p.focus(),c.shouldSelect&&te(p.select)&&p.select())}},Hs=a=>{t={...t,...a}},pr={control:{register:ot,unregister:st,getFieldState:fr,handleSubmit:gr,setError:yr,_subscribe:mr,_runSchema:q,_focusError:nt,_getWatch:D,_getDirty:ne,_setValid:_,_setFieldArray:E,_setDisabledField:hr,_setErrors:C,_getFieldArray:O,_reset:_r,_resetDefaultValues:()=>te(r.defaultValues)&&r.defaultValues().then(a=>{vr(a,r.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:ue,_disableForm:Os,_subjects:h,_proxyFormState:y,get _fields(){return s},get _formValues(){return n},get _state(){return i},set _state(a){i=a},get _defaultValues(){return o},get _names(){return l},set _names(a){l=a},get _formState(){return t},get _options(){return r},set _options(a){r={...r,...a}}},subscribe:Bs,trigger:he,register:ot,handleSubmit:gr,watch:Ls,setValue:K,getValues:De,reset:vr,resetField:Ts,clearErrors:Ds,unregister:st,setError:yr,setFocus:Ms,getFieldState:fr};return{...pr,formControl:pr}}function Jr(e={}){const r=w.useRef(void 0),t=w.useRef(void 0),[s,o]=w.useState({isDirty:!1,isValidating:!1,isLoading:te(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:te(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!te(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...l}=Kr(e);r.current={...l,formState:s}}const n=r.current.control;return n._options=e,Ie(()=>{const i=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(l=>({...l,isReady:!0})),n._formState.isReady=!0,i},[n]),w.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),w.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),w.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),w.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),w.useEffect(()=>{if(n._proxyFormState.isDirty){const i=n._getDirty();i!==s.isDirty&&n._subjects.state.next({isDirty:i})}},[n,s.isDirty]),w.useEffect(()=>{e.values&&!ee(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,o(i=>({...i}))):n._resetDefaultValues()},[n,e.values]),w.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),r.current.formState=bt(s,n),r.current}const Mt=(e,r,t)=>{if(e&&"reportValidity"in e){const s=b(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Ke=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?Mt(s.ref,t,e):s&&s.refs&&s.refs.forEach(o=>Mt(o,t,e))}},Ht=(e,r)=>{r.shouldUseNativeValidation&&Ke(e,r);const t={};for(const s in e){const o=b(r.fields,s),n=Object.assign(e[s]||{},{ref:o&&o.ref});if(Xr(r.names||Object.keys(e),s)){const i=Object.assign({},b(t,s));L(i,"root",n),L(t,s,i)}else L(t,s,n)}return t},Xr=(e,r)=>{const t=jt(r);return e.some(s=>jt(s).match(`^${t}\\.\\d+`))};function jt(e){return e.replace(/\]|\[/g,"")}function It(e,r,t){function s(l,d){var f;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(f=l._zod).traits??(f.traits=new Set),l._zod.traits.add(e),r(l,d);for(const y in i.prototype)y in l||Object.defineProperty(l,y,{value:i.prototype[y].bind(l)});l._zod.constr=i,l._zod.def=d}const o=(t==null?void 0:t.Parent)??Object;class n extends o{}Object.defineProperty(n,"name",{value:e});function i(l){var d;const f=t!=null&&t.Parent?new n:this;s(f,l),(d=f._zod).deferred??(d.deferred=[]);for(const y of f._zod.deferred)y();return f}return Object.defineProperty(i,"init",{value:s}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>{var d,f;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)}}),Object.defineProperty(i,"name",{value:e}),i}class Yr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Rr={};function Pt(e){return Rr}function es(e,r){return typeof r=="bigint"?r.toString():r}const Ut="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ee(e){return typeof e=="string"?e:e==null?void 0:e.message}function Wt(e,r,t){var o,n,i,l,d,f;const s={...e,path:e.path??[]};if(!e.message){const y=Ee((i=(n=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:n.error)==null?void 0:i.call(n,e))??Ee((l=r==null?void 0:r.error)==null?void 0:l.call(r,e))??Ee((d=t.customError)==null?void 0:d.call(t,e))??Ee((f=t.localeError)==null?void 0:f.call(t,e))??"Invalid input";s.message=y}return delete s.inst,delete s.continue,r!=null&&r.reportInput||delete s.input,s}const qt=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,es,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ts=It("$ZodError",qt),Gt=It("$ZodError",qt,{Parent:Error}),rs=(e=>(r,t,s,o)=>{const n=s?Object.assign(s,{async:!1}):{async:!1},i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise)throw new Yr;if(i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>Wt(d,n,Pt())));throw Ut(l,o==null?void 0:o.callee),l}return i.value})(Gt),ss=(e=>async(r,t,s,o)=>{const n=s?Object.assign(s,{async:!0}):{async:!0};let i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>Wt(d,n,Pt())));throw Ut(l,o==null?void 0:o.callee),l}return i.value})(Gt);function Zt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function os(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(y){return y.errors.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,f=d&&d[s.code];t[i]=We(i,r,t,o,f?[].concat(f,s.message):s.message)}e.shift()}return t}function ns(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if(s.code==="invalid_union"&&s.errors.length>0){var l=s.errors[0][0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(y){return y.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,f=d&&d[s.code];t[i]=We(i,r,t,o,f?[].concat(f,s.message):s.message)}e.shift()}return t}function is(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,o,n){try{return Promise.resolve(Zt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(i){return n.shouldUseNativeValidation&&Ke({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(i))return{values:{},errors:Ht(os(i.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(Zt(function(){return Promise.resolve((t.mode==="sync"?rs:ss)(e,s,r)).then(function(i){return n.shouldUseNativeValidation&&Ke({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return l instanceof ts})(i))return{values:{},errors:Ht(ns(i.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const Qt=w.createContext(null);function Kt(){const e=w.useContext(Qt);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function as({onSubmit:e,children:r,schema:t,defaultValues:s,mode:o="onSubmit",reValidateMode:n="onChange",...i}){const l=Jr({resolver:t?is(t):void 0,defaultValues:s,mode:o,reValidateMode:n}),d=l.handleSubmit(e);return v.jsx(Qt.Provider,{value:l,children:v.jsx("form",{onSubmit:d,...i,children:typeof r=="function"?r(l):r})})}const ls=as,cs={formError:"FormError-module__formError___kaUBn"},Jt=({children:e,className:r,style:t,color:s,divProps:o})=>{const n=H(),i={"--form-error-margin-top":`calc(${n.fonts.rhythm} * 0.17)`,color:s||n.colors.error,...t,...o==null?void 0:o.style},l=[cs.formError,r].filter(Boolean).join(" ");return v.jsx("div",{className:l,style:i,role:"alert","aria-live":"polite",...o,children:e})},ye={formGroup:"FormGroup-module__formGroup___aVI-B",inputWrapper:"FormGroup-module__inputWrapper___429QE",indented:"FormGroup-module__indented___t61iz",disabled:"FormGroup-module__disabled___W-tJ0",required:"FormGroup-module__required___mO3xA"},Xt=({children:e,label:r,name:t,error:s=!1,errorMessage:o,disabled:n=!1,required:i=!1,indent:l=!1,className:d,style:f,labelProps:y,divProps:m})=>{const h=H(),k=[ye.formGroup,s?ye.error:"",n?ye.disabled:"",d].filter(Boolean).join(" "),V={"--form-group-margin-bottom":`calc(${h.fonts.rhythm} * 0.35)`,...f,...m==null?void 0:m.style},_=w.Children.map(e,$=>{if(w.isValidElement($)){const E={};if(n&&$.props.disabled===void 0&&(E.disabled=!0),s&&$.props.error===void 0&&(E.error=!0),t&&$.props.id===void 0&&(E.id=t),Object.keys(E).length>0)return w.cloneElement($,E)}return $});return v.jsxs("div",{className:k,style:V,...m,children:[r&&v.jsxs(ke,{htmlFor:t,disabled:n,error:s,...y,children:[r,i&&v.jsxs("span",{className:ye.required,"aria-label":"required",children:[" ","*"]})]}),v.jsx("div",{className:`${ye.inputWrapper} ${l?ye.indented:""}`,children:_}),s&&o&&v.jsx(Jt,{children:o})]})};function me({name:e,label:r,required:t,children:s,rules:o,disabled:n,className:i,style:l,indent:d,labelProps:f}){const{control:y}=Kt(),{field:m,fieldState:{error:h}}=Br({name:e,control:y,rules:o});return v.jsx(Xt,{label:r,name:e,error:!!h,errorMessage:h==null?void 0:h.message,disabled:n,required:t,className:i,style:l,indent:d,labelProps:f,children:s({value:m.value,onChange:m.onChange,onBlur:m.onBlur,name:m.name,error:!!h,indent:d})})}const Je={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeLarge:"Input-module__sizeLarge___4Boj3"},us=({color:e="#000",disabled:r=!1,fontSize:t="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:t,opacity:r?.3:1,placeholderOpacity:s}),Yt=({color:e,disabled:r=!1,error:t=!1,id:s,name:o="",onChange:n,onBlur:i,placeholder:l,placeholderOpacity:d=.3,size:f="large",className:y,style:m,type:h="text",value:k="",inputProps:V})=>{const _=H(),$=_.colors.error,E=t?$:e||_.colors.primary,S=us({color:E,disabled:r,fontSize:_.fonts.size,placeholderOpacity:d}),C={"--placeholder-opacity":S.placeholderOpacity,"--input-padding-small":`calc(${_.fonts.rhythm} * ${_.sizes.small.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,"--input-padding-large":`calc(${_.fonts.rhythm} * ${_.sizes.large.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,borderColor:S.borderColor,borderWidth:_.border.width,borderRadius:_.border.radius,color:S.color,fontSize:S.fontSize,opacity:S.opacity,...m,...V==null?void 0:V.style},z=[Je.input,f==="small"?Je.sizeSmall:Je.sizeLarge,y].filter(Boolean).join(" ");return v.jsx("input",{className:z,disabled:r,id:s,name:o,onChange:n,onBlur:i,placeholder:l,type:h,value:k,...V,style:C})};function ds({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return v.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:f,onBlur:y,name:m,error:h})=>v.jsx(Yt,{...l,name:m,value:d||"",onChange:k=>f(k.target.value),inputProps:{onBlur:y},error:h})})}const Xe={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeLarge:"Textarea-module__sizeLarge___5a3sf"},fs=({color:e="#000",disabled:r=!1,placeholderOpacity:t=.3})=>({color:e,borderColor:e,opacity:r?.3:1,placeholderOpacity:t}),Rt=({color:e,disabled:r=!1,error:t=!1,id:s,name:o="",onChange:n,onBlur:i,placeholder:l,placeholderOpacity:d=.3,rows:f=3,size:y="large",className:m,style:h,value:k="",textareaProps:V})=>{const _=H(),$=_.colors.error,E=t?$:e||_.colors.primary,S=fs({color:E,disabled:r,placeholderOpacity:d}),C={"--placeholder-opacity":S.placeholderOpacity,"--textarea-padding-small":`calc(${_.fonts.rhythm} * ${_.sizes.small.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,"--textarea-padding-large":`calc(${_.fonts.rhythm} * ${_.sizes.large.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,borderColor:S.borderColor,borderWidth:_.border.width,borderRadius:_.border.radius,color:S.color,fontSize:_.fonts.size,opacity:S.opacity,...h,...V==null?void 0:V.style},z=[Xe.textarea,y==="small"?Xe.sizeSmall:Xe.sizeLarge,m].filter(Boolean).join(" ");return v.jsx("textarea",{className:z,disabled:r,id:s,name:o,onChange:n,onBlur:i,placeholder:l,rows:f,value:k,...V,style:C})};function ys({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return v.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:f,onBlur:y,name:m,error:h})=>v.jsx(Rt,{...l,name:m,value:d||"",onChange:k=>f(k.target.value),onBlur:y,error:h})})}const Ye={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeLarge:"Select-module__sizeLarge___eBA1T"},ms=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const i=`
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, var(--accent-color));color:var(--mobile-nav-color, var(--primary-color));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, var(--primary-color));color:var(--mobile-nav-active-color, var(--accent-color))}.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, var(--accent-color))!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}.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, var(--primary-color))}.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, var(--primary-color))}.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__main___Sw7Pv{flex:1}')),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ (function(N,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],p):(N=typeof globalThis<"u"?globalThis:N||self,p(N.DigitalRabbitCL={},N.jsxRuntime,N.React))})(this,(function(N,p,V){"use strict";const Ve={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeLarge:"Button-module__sizeLarge___yeZSH"},Fr=({isActive:e,disabled:r,buttonColor:t="#FFF",textColor:s="#000",hoverBackgroundColor:o,hoverTextColor:n,outline:i})=>{let l,d,y;i?(l="transparent",d=t,y=t,e&&(l=o||t,d=o||t,y=n||s)):(l=t,d=t,y=s,e&&(l=o||t,d=o||t,y=n||s));let f=1;return r?f=.3:e&&(f=o?1:.75),{backgroundColor:l,borderColor:d,color:y,opacity:f}};function ct(e,r){const t={...e};return we(e)&&we(r)&&Object.keys(r).forEach(s=>{const o=r[s],n=e[s];we(o)&&we(n)?t[s]=ct(n,o):o!==void 0&&(t[s]=o)}),t}function we(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ge(e){const r=e.match(/^(\d+(?:\.\d+)?)(px|em|rem)$/);if(!r){const o=parseInt(e,10),n=e.replace(/[0-9.]/g,"")||"px";return{maxWidth:isNaN(o)?768:o-1,unit:n}}const t=parseFloat(r[1]),s=r[2];return{maxWidth:t-1,unit:s}}const ut={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},Be={colors:ut,fonts:{color:"#000",lineHeight:1.5,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',fontWeightHeader:700,size:"22px",rhythm:"1.45rem",fontSizeH1:"2.5rem",fontSizeH2:"1.75rem",fontSizeH3:"1.38316rem",fontSizeH4:"1rem",fontSizeH5:"0.85028rem",fontSizeH6:"0.78405rem"},buttons:{textColor:"#FFF",paddingHorizontal:.35,primary:{textColor:ut.secondary}},inputs:{paddingHorizontal:.27},sizes:{small:{paddingVertical:.07},large:{paddingVertical:.17}},border:{radius:"5px",width:"0.15em"},breakpoints:{xs:"350px",sm:"475px",md:"769px",lg:"1025px"},layout:{maxWidth:"1280px",paddingSm:"0.5rem",padding:"1rem"}},dt=V.createContext(Be),Vr=({theme:e,children:r})=>{const t=e?ct(Be,e):Be;return p.jsx(dt.Provider,{value:t,children:r})},T=()=>V.useContext(dt),wr=({backgroundColor:e,color:r,hoverBackgroundColor:t,hoverTextColor:s,disabled:o=!1,size:n="large",outline:i=!1,type:l="button",className:d,style:y,buttonProps:f={},onClick:m,children:h})=>{const w=T(),[k,_]=V.useState(!1);let z;r?z=r:z=e?w.buttons.textColor:w.buttons.primary.textColor;const A=e||w.colors.primary,$={...Fr({isActive:k,disabled:o,buttonColor:A,textColor:z,hoverBackgroundColor:t,hoverTextColor:s,outline:i}),fontSize:w.fonts.size,borderWidth:w.border.width,borderRadius:w.border.radius,"--button-padding-small":`calc(${w.fonts.rhythm} * ${w.sizes.small.paddingVertical}) calc(${w.fonts.rhythm} * ${w.buttons.paddingHorizontal})`,"--button-padding-large":`calc(${w.fonts.rhythm} * ${w.sizes.large.paddingVertical}) calc(${w.fonts.rhythm} * ${w.buttons.paddingHorizontal})`,...y},C=[Ve.button,n==="small"?Ve.sizeSmall:Ve.sizeLarge,i?Ve.outline:"",d].filter(Boolean).join(" ");return p.jsx("button",{...f,className:C,disabled:o,onClick:m,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),type:l,style:$,children:h})};var ft=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),kr=new Uint8Array(16);function xr(){if(!ft)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ft(kr)}for(var yt=[],ke=0;ke<256;++ke)yt[ke]=(ke+256).toString(16).substr(1);function Cr(e,r){var t=0,s=yt;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("")}function mt(e,r,t){var s=r&&t||0;typeof e=="string"&&(r=e==="binary"?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||xr)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,r)for(var n=0;n<16;++n)r[s+n]=o[n];return r||Cr(o)}const Oe={container:"Checkbox-module__container___aV9qz",svg:"Checkbox-module__svg___kkluC",label:"Checkbox-module__label___cwRtI"},zr=({color:e="#000",checkmarkColor:r,disabled:t=!1,inverted:s=!1})=>{let o=e;return r?o=r:s&&(o="white"),{checkboxColor:e,checkmarkColor:o,cursor:t?"default":"pointer",opacity:t?.3:1}},ht={label:"FormLabel-module__label___0M-fo",disabled:"FormLabel-module__disabled___ktIFp"},$r=({color:e="#000",disabled:r=!1,fontSize:t=".85em"})=>({color:e,fontSize:t,opacity:r?.5:1,cursor:r?"not-allowed":"default"}),xe=({color:e,disabled:r=!1,error:t=!1,htmlFor:s,children:o,className:n,style:i,labelProps:l})=>{const d=T(),y=d.colors.error,f=t?y:e||d.colors.primary,m=$r({color:f,disabled:r,fontSize:".85em"}),h={"--form-label-padding-bottom":`calc(${d.fonts.rhythm} * 0.17)`,color:m.color,fontSize:m.fontSize,opacity:m.opacity,cursor:m.cursor,...i},w=[ht.label,r?ht.disabled:"",n].filter(Boolean).join(" ");return p.jsx("label",{...l,className:w,htmlFor:s,style:h,children:o})},gt=({color:e,checkmarkColor:r,checked:t=!1,inverted:s=!1,disabled:o=!1,error:n=!1,name:i,id:l,onChange:d,label:y,labelStyle:f,className:m,style:h,divProps:w})=>{const k=T(),_=l||mt(),z=k.colors.error,A=n?z:e||k.colors.primary,F=zr({color:A,checkmarkColor:r,disabled:o,inverted:s}),$=G=>{o||d(G)},C={cursor:F.cursor,fontSize:k.fonts.size,opacity:F.opacity,...h},E={width:"1em"},W={fill:s&&t?F.checkboxColor:"transparent",strokeWidth:"25",stroke:F.checkboxColor},q={stroke:F.checkmarkColor,strokeWidth:"15",fill:"transparent"},R=[Oe.container,m].filter(Boolean).join(" ");return p.jsxs("div",{...w,className:R,style:C,children:[p.jsx("input",{id:_,checked:t,disabled:o,onChange:G=>$({target:{checked:G.target.checked,name:i,type:"checkbox"}}),name:i,style:{display:"none"},type:"checkbox"}),p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>$({target:{checked:!t,name:i,type:"checkbox"}}),style:E,className:Oe.svg,children:[p.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:W}),t&&p.jsx("path",{d:"M 25 45 L 45 65 L 75 30",style:q})]}),y&&p.jsx(xe,{htmlFor:_,className:Oe.label,style:{paddingBottom:0,...f},color:F.checkboxColor,disabled:o,error:n,children:y})]})},Er=()=>{const e=T();return V.useLayoutEffect(()=>{const r=document.documentElement;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))},[e]),null};var _e=e=>e.type==="checkbox",ce=e=>e instanceof Date,K=e=>e==null;const _t=e=>typeof e=="object";var j=e=>!K(e)&&!Array.isArray(e)&&_t(e)&&!ce(e),pt=e=>j(e)&&e.target?_e(e.target)?e.target.checked:e.target.value:e,Ar=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,vt=(e,r)=>e.has(Ar(r)),Nr=e=>{const r=e.constructor&&e.constructor.prototype;return j(r)&&r.hasOwnProperty("isPrototypeOf")},Te=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function U(e){let r;const t=Array.isArray(e),s=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)r=new Date(e);else if(!(Te&&(e instanceof Blob||s))&&(t||j(e)))if(r=t?[]:Object.create(Object.getPrototypeOf(e)),!t&&!Nr(e))r=e;else for(const o in e)e.hasOwnProperty(o)&&(r[o]=U(e[o]));else return e;return r}var Ce=e=>/^\w*$/.test(e),H=e=>e===void 0,He=e=>Array.isArray(e)?e.filter(Boolean):[],Me=e=>He(e.replace(/["|']|\]/g,"").split(/\.|\[/)),b=(e,r,t)=>{if(!r||!j(e))return t;const s=(Ce(r)?[r]:Me(r)).reduce((o,n)=>K(o)?o:o[n],e);return H(s)||s===e?H(e[r])?t:e[r]:s},X=e=>typeof e=="boolean",L=(e,r,t)=>{let s=-1;const o=Ce(r)?[r]:Me(r),n=o.length,i=n-1;for(;++s<n;){const l=o[s];let d=t;if(s!==i){const y=e[l];d=j(y)||Array.isArray(y)?y:isNaN(+o[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const ze={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},te={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ae={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},bt=V.createContext(null);bt.displayName="HookFormContext";const je=()=>V.useContext(bt);var St=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const i=n;return r._proxyFormState[i]!==te.all&&(r._proxyFormState[i]=!s||te.all),t&&(t[i]=!0),e[i]}});return o};const Ie=typeof window<"u"?V.useLayoutEffect:V.useEffect;function Dr(e){const r=je(),{control:t=r.control,disabled:s,name:o,exact:n}=e||{},[i,l]=V.useState(t._formState),d=V.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ie(()=>t._subscribe({name:o,formState:d.current,exact:n,callback:y=>{!s&&l({...t._formState,...y})}}),[o,s,n]),V.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),V.useMemo(()=>St(i,t,d.current,!1),[i,t])}var Y=e=>typeof e=="string",Ue=(e,r,t,s,o)=>Y(e)?(s&&r.watch.add(e),b(t,e,o)):Array.isArray(e)?e.map(n=>(s&&r.watch.add(n),b(t,n))):(s&&(r.watchAll=!0),t),We=e=>K(e)||!_t(e);function re(e,r,t=new WeakSet){if(We(e)||We(r))return e===r;if(ce(e)&&ce(r))return e.getTime()===r.getTime();const s=Object.keys(e),o=Object.keys(r);if(s.length!==o.length)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);for(const n of s){const i=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const l=r[n];if(ce(i)&&ce(l)||j(i)&&j(l)||Array.isArray(i)&&Array.isArray(l)?!re(i,l,t):i!==l)return!1}}return!0}function Lr(e){const r=je(),{control:t=r.control,name:s,defaultValue:o,disabled:n,exact:i,compute:l}=e||{},d=V.useRef(o),y=V.useRef(l),f=V.useRef(void 0),m=V.useRef(t),h=V.useRef(s);y.current=l;const[w,k]=V.useState(()=>{const C=t._getWatch(s,d.current);return y.current?y.current(C):C}),_=V.useCallback(C=>{const E=Ue(s,t._names,C||t._formValues,!1,d.current);return y.current?y.current(E):E},[t._formValues,t._names,s]),z=V.useCallback(C=>{if(!n){const E=Ue(s,t._names,C||t._formValues,!1,d.current);if(y.current){const W=y.current(E);re(W,f.current)||(k(W),f.current=W)}else k(E)}},[t._formValues,t._names,n,s]);Ie(()=>((m.current!==t||!re(h.current,s))&&(m.current=t,h.current=s,z()),t._subscribe({name:s,formState:{values:!0},exact:i,callback:C=>{z(C.values)}})),[t,i,s,z]),V.useEffect(()=>t._removeUnmounted());const A=m.current!==t,F=h.current,$=V.useMemo(()=>{if(n)return null;const C=!A&&!re(F,s);return A||C?_():null},[n,A,s,F,_]);return $!==null?$:w}function Pr(e){const r=je(),{name:t,disabled:s,control:o=r.control,shouldUnregister:n,defaultValue:i}=e,l=vt(o._names.array,t),d=V.useMemo(()=>b(o._formValues,t,b(o._defaultValues,t,i)),[o,t,i]),y=Lr({control:o,name:t,defaultValue:d,exact:!0}),f=Dr({control:o,name:t,exact:!0}),m=V.useRef(e),h=V.useRef(void 0),w=V.useRef(o.register(t,{...e.rules,value:y,...X(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const k=V.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!b(f.errors,t)},isDirty:{enumerable:!0,get:()=>!!b(f.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!b(f.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!b(f.validatingFields,t)},error:{enumerable:!0,get:()=>b(f.errors,t)}}),[f,t]),_=V.useCallback($=>w.current.onChange({target:{value:pt($),name:t},type:ze.CHANGE}),[t]),z=V.useCallback(()=>w.current.onBlur({target:{value:b(o._formValues,t),name:t},type:ze.BLUR}),[t,o._formValues]),A=V.useCallback($=>{const C=b(o._fields,t);C&&$&&(C._f.ref={focus:()=>$.focus&&$.focus(),select:()=>$.select&&$.select(),setCustomValidity:E=>$.setCustomValidity(E),reportValidity:()=>$.reportValidity()})},[o._fields,t]),F=V.useMemo(()=>({name:t,value:y,...X(s)||f.disabled?{disabled:f.disabled||s}:{},onChange:_,onBlur:z,ref:A}),[t,s,f.disabled,_,z,A,y]);return V.useEffect(()=>{const $=o._options.shouldUnregister||n,C=h.current;C&&C!==t&&!l&&o.unregister(C),o.register(t,{...m.current.rules,...X(m.current.disabled)?{disabled:m.current.disabled}:{}});const E=(W,q)=>{const R=b(o._fields,W);R&&R._f&&(R._f.mount=q)};if(E(t,!0),$){const W=U(b(o._options.defaultValues,t,m.current.defaultValue));L(o._defaultValues,t,W),H(b(o._formValues,t))&&L(o._formValues,t,W)}return!l&&o.register(t),h.current=t,()=>{(l?$&&!o._state.action:$)?o.unregister(t):E(t,!1)}},[t,o,l,n]),V.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),V.useMemo(()=>({field:F,formState:f,fieldState:k}),[F,f,k])}var qe=(e,r,t,s,o)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:o||!0}}:{},pe=e=>Array.isArray(e)?e:[e],Ft=()=>{let e=[];return{get observers(){return e},next:o=>{for(const n of e)n.next&&n.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(n=>n!==o)}}),unsubscribe:()=>{e=[]}}};function Vt(e,r){const t={};for(const s in e)if(e.hasOwnProperty(s)){const o=e[s],n=r[s];if(o&&j(o)&&n){const i=Vt(o,n);j(i)&&(t[s]=i)}else e[s]&&(t[s]=n)}return t}var Z=e=>j(e)&&!Object.keys(e).length,Ge=e=>e.type==="file",se=e=>typeof e=="function",$e=e=>{if(!Te)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},wt=e=>e.type==="select-multiple",Ze=e=>e.type==="radio",Br=e=>Ze(e)||_e(e),Qe=e=>$e(e)&&e.isConnected;function Or(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=H(e)?s++:e[r[s++]];return e}function Tr(e){for(const r in e)if(e.hasOwnProperty(r)&&!H(e[r]))return!1;return!0}function I(e,r){const t=Array.isArray(r)?r:Ce(r)?[r]:Me(r),s=t.length===1?e:Or(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(j(s)&&Z(s)||Array.isArray(s)&&Tr(s))&&I(e,t.slice(0,-1)),e}var Hr=e=>{for(const r in e)if(se(e[r]))return!0;return!1};function kt(e){return Array.isArray(e)||j(e)&&!Hr(e)}function Ke(e,r={}){for(const t in e)kt(e[t])?(r[t]=Array.isArray(e[t])?[]:{},Ke(e[t],r[t])):H(e[t])||(r[t]=!0);return r}function de(e,r,t){t||(t=Ke(r));for(const s in e)kt(e[s])?H(r)||We(t[s])?t[s]=Ke(e[s],Array.isArray(e[s])?[]:{}):de(e[s],K(r)?{}:r[s],t[s]):t[s]=!re(e[s],r[s]);return t}const xt={value:!1,isValid:!1},Ct={value:!0,isValid:!0};var zt=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!H(e[0].attributes.value)?H(e[0].value)||e[0].value===""?Ct:{value:e[0].value,isValid:!0}:Ct:xt}return xt},$t=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>H(e)?e:r?e===""?NaN:e&&+e:t&&Y(e)?new Date(e):s?s(e):e;const Et={isValid:!1,value:null};var At=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,Et):Et;function Nt(e){const r=e.ref;return Ge(r)?r.files:Ze(r)?At(e.refs).value:wt(r)?[...r.selectedOptions].map(({value:t})=>t):_e(r)?zt(e.refs).value:$t(H(r.value)?e.ref.value:r.value,e)}var Mr=(e,r,t,s)=>{const o={};for(const n of e){const i=b(r,n);i&&L(o,n,i._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},Ee=e=>e instanceof RegExp,ve=e=>H(e)?e:Ee(e)?e.source:j(e)?Ee(e.value)?e.value.source:e.value:e,Dt=e=>({isOnSubmit:!e||e===te.onSubmit,isOnBlur:e===te.onBlur,isOnChange:e===te.onChange,isOnAll:e===te.all,isOnTouch:e===te.onTouched});const Lt="AsyncFunction";var jr=e=>!!e&&!!e.validate&&!!(se(e.validate)&&e.validate.constructor.name===Lt||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Lt)),Ir=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Pt=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const be=(e,r,t,s)=>{for(const o of t||Object.keys(e)){const n=b(e,o);if(n){const{_f:i,...l}=n;if(i){if(i.refs&&i.refs[0]&&r(i.refs[0],o)&&!s)return!0;if(i.ref&&r(i.ref,i.name)&&!s)return!0;if(be(l,r))break}else if(j(l)&&be(l,r))break}}};function Bt(e,r,t){const s=b(e,t);if(s||Ce(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),i=b(r,n),l=b(e,n);if(i&&!Array.isArray(i)&&t!==n)return{name:t};if(l&&l.type)return{name:n,error:l};if(l&&l.root&&l.root.type)return{name:`${n}.root`,error:l.root};o.pop()}return{name:t}}var Ur=(e,r,t,s)=>{t(e);const{name:o,...n}=e;return Z(n)||Object.keys(n).length>=Object.keys(r).length||Object.keys(n).find(i=>r[i]===(!s||te.all))},Wr=(e,r,t)=>!e||!r||e===r||pe(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s))),qr=(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,Gr=(e,r)=>!He(b(e,r)).length&&I(e,r),Zr=(e,r,t)=>{const s=pe(b(e,t));return L(s,"root",r[t]),L(e,t,s),e};function Ot(e,r,t="validate"){if(Y(e)||Array.isArray(e)&&e.every(Y)||X(e)&&!e)return{type:t,message:Y(e)?e:"",ref:r}}var fe=e=>j(e)&&!Ee(e)?e:{value:e,message:""},Tt=async(e,r,t,s,o,n)=>{const{ref:i,refs:l,required:d,maxLength:y,minLength:f,min:m,max:h,pattern:w,validate:k,name:_,valueAsNumber:z,mount:A}=e._f,F=b(t,_);if(!A||r.has(_))return{};const $=l?l[0]:i,C=D=>{o&&$.reportValidity&&($.setCustomValidity(X(D)?"":D||""),$.reportValidity())},E={},W=Ze(i),q=_e(i),R=W||q,G=(z||Ge(i))&&H(i.value)&&H(F)||$e(i)&&i.value===""||F===""||Array.isArray(F)&&!F.length,ue=qe.bind(null,_,s,E),ne=(D,B,M,Q=ae.maxLength,J=ae.minLength)=>{const ie=D?B:M;E[_]={type:D?Q:J,message:ie,ref:i,...ue(D?Q:J,ie)}};if(n?!Array.isArray(F)||!F.length:d&&(!R&&(G||K(F))||X(F)&&!F||q&&!zt(l).isValid||W&&!At(l).isValid)){const{value:D,message:B}=Y(d)?{value:!!d,message:d}:fe(d);if(D&&(E[_]={type:ae.required,message:B,ref:$,...ue(ae.required,B)},!s))return C(B),E}if(!G&&(!K(m)||!K(h))){let D,B;const M=fe(h),Q=fe(m);if(!K(F)&&!isNaN(F)){const J=i.valueAsNumber||F&&+F;K(M.value)||(D=J>M.value),K(Q.value)||(B=J<Q.value)}else{const J=i.valueAsDate||new Date(F),ie=Le=>new Date(new Date().toDateString()+" "+Le),Fe=i.type=="time",he=i.type=="week";Y(M.value)&&F&&(D=Fe?ie(F)>ie(M.value):he?F>M.value:J>new Date(M.value)),Y(Q.value)&&F&&(B=Fe?ie(F)<ie(Q.value):he?F<Q.value:J<new Date(Q.value))}if((D||B)&&(ne(!!D,M.message,Q.message,ae.max,ae.min),!s))return C(E[_].message),E}if((y||f)&&!G&&(Y(F)||n&&Array.isArray(F))){const D=fe(y),B=fe(f),M=!K(D.value)&&F.length>+D.value,Q=!K(B.value)&&F.length<+B.value;if((M||Q)&&(ne(M,D.message,B.message),!s))return C(E[_].message),E}if(w&&!G&&Y(F)){const{value:D,message:B}=fe(w);if(Ee(D)&&!F.match(D)&&(E[_]={type:ae.pattern,message:B,ref:i,...ue(ae.pattern,B)},!s))return C(B),E}if(k){if(se(k)){const D=await k(F,t),B=Ot(D,$);if(B&&(E[_]={...B,...ue(ae.validate,B.message)},!s))return C(B.message),E}else if(j(k)){let D={};for(const B in k){if(!Z(D)&&!s)break;const M=Ot(await k[B](F,t),$,B);M&&(D={...M,...ue(B,M.message)},C(M.message),s&&(E[_]=D))}if(!Z(D)&&(E[_]={ref:$,...D},!s))return E}}return C(!0),E};const Qr={mode:te.onSubmit,reValidateMode:te.onChange,shouldFocusError:!0};function Kr(e={}){let r={...Qr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:se(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},o=j(r.defaultValues)||j(r.values)?U(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:U(o),i={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,y=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let m={...f};const h={array:Ft(),state:Ft()},w=r.criteriaMode===te.all,k=a=>c=>{clearTimeout(y),y=setTimeout(a,c)},_=async a=>{if(!r.disabled&&(f.isValid||m.isValid||a)){const c=r.resolver?Z((await q()).errors):await G(s,!0);c!==t.isValid&&h.state.next({isValid:c})}},z=(a,c)=>{!r.disabled&&(f.isValidating||f.validatingFields||m.isValidating||m.validatingFields)&&((a||Array.from(l.mount)).forEach(u=>{u&&(c?L(t.validatingFields,u,c):I(t.validatingFields,u))}),h.state.next({validatingFields:t.validatingFields,isValidating:!Z(t.validatingFields)}))},A=(a,c=[],u,S,v=!0,g=!0)=>{if(S&&u&&!r.disabled){if(i.action=!0,g&&Array.isArray(b(s,a))){const x=u(b(s,a),S.argA,S.argB);v&&L(s,a,x)}if(g&&Array.isArray(b(t.errors,a))){const x=u(b(t.errors,a),S.argA,S.argB);v&&L(t.errors,a,x),Gr(t.errors,a)}if((f.touchedFields||m.touchedFields)&&g&&Array.isArray(b(t.touchedFields,a))){const x=u(b(t.touchedFields,a),S.argA,S.argB);v&&L(t.touchedFields,a,x)}(f.dirtyFields||m.dirtyFields)&&(t.dirtyFields=de(o,n)),h.state.next({name:a,isDirty:ne(a,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else L(n,a,c)},F=(a,c)=>{L(t.errors,a,c),h.state.next({errors:t.errors})},$=a=>{t.errors=a,h.state.next({errors:t.errors,isValid:!1})},C=(a,c,u,S)=>{const v=b(s,a);if(v){const g=b(n,a,H(u)?b(o,a):u);H(g)||S&&S.defaultChecked||c?L(n,a,c?g:Nt(v._f)):M(a,g),i.mount&&_()}},E=(a,c,u,S,v)=>{let g=!1,x=!1;const P={name:a};if(!r.disabled){if(!u||S){(f.isDirty||m.isDirty)&&(x=t.isDirty,t.isDirty=P.isDirty=ne(),g=x!==P.isDirty);const O=re(b(o,a),c);x=!!b(t.dirtyFields,a),O?I(t.dirtyFields,a):L(t.dirtyFields,a,!0),P.dirtyFields=t.dirtyFields,g=g||(f.dirtyFields||m.dirtyFields)&&x!==!O}if(u){const O=b(t.touchedFields,a);O||(L(t.touchedFields,a,u),P.touchedFields=t.touchedFields,g=g||(f.touchedFields||m.touchedFields)&&O!==u)}g&&v&&h.state.next(P)}return g?P:{}},W=(a,c,u,S)=>{const v=b(t.errors,a),g=(f.isValid||m.isValid)&&X(c)&&t.isValid!==c;if(r.delayError&&u?(d=k(()=>F(a,u)),d(r.delayError)):(clearTimeout(y),d=null,u?L(t.errors,a,u):I(t.errors,a)),(u?!re(v,u):v)||!Z(S)||g){const x={...S,...g&&X(c)?{isValid:c}:{},errors:t.errors,name:a};t={...t,...x},h.state.next(x)}},q=async a=>{z(a,!0);const c=await r.resolver(n,r.context,Mr(a||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return z(a),c},R=async a=>{const{errors:c}=await q(a);if(a)for(const u of a){const S=b(c,u);S?L(t.errors,u,S):I(t.errors,u)}else t.errors=c;return c},G=async(a,c,u={valid:!0})=>{for(const S in a){const v=a[S];if(v){const{_f:g,...x}=v;if(g){const P=l.array.has(g.name),O=v._f&&jr(v._f);O&&f.validatingFields&&z([g.name],!0);const ee=await Tt(v,l.disabled,n,w,r.shouldUseNativeValidation&&!c,P);if(O&&f.validatingFields&&z([g.name]),ee[g.name]&&(u.valid=!1,c))break;!c&&(b(ee,g.name)?P?Zr(t.errors,ee,g.name):L(t.errors,g.name,ee[g.name]):I(t.errors,g.name))}!Z(x)&&await G(x,c,u)}}return u.valid},ue=()=>{for(const a of l.unMount){const c=b(s,a);c&&(c._f.refs?c._f.refs.every(u=>!Qe(u)):!Qe(c._f.ref))&&ot(a)}l.unMount=new Set},ne=(a,c)=>!r.disabled&&(a&&c&&L(n,a,c),!re(Le(),o)),D=(a,c,u)=>Ue(a,l,{...i.mount?n:H(c)?o:Y(a)?{[a]:c}:c},u,c),B=a=>He(b(i.mount?n:o,a,r.shouldUnregister?b(o,a,[]):[])),M=(a,c,u={})=>{const S=b(s,a);let v=c;if(S){const g=S._f;g&&(!g.disabled&&L(n,a,$t(c,g)),v=$e(g.ref)&&K(c)?"":c,wt(g.ref)?[...g.ref.options].forEach(x=>x.selected=v.includes(x.value)):g.refs?_e(g.ref)?g.refs.forEach(x=>{(!x.defaultChecked||!x.disabled)&&(Array.isArray(v)?x.checked=!!v.find(P=>P===x.value):x.checked=v===x.value||!!v)}):g.refs.forEach(x=>x.checked=x.value===v):Ge(g.ref)?g.ref.value="":(g.ref.value=v,g.ref.type||h.state.next({name:a,values:U(n)})))}(u.shouldDirty||u.shouldTouch)&&E(a,v,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&he(a)},Q=(a,c,u)=>{for(const S in c){if(!c.hasOwnProperty(S))return;const v=c[S],g=a+"."+S,x=b(s,g);(l.array.has(a)||j(v)||x&&!x._f)&&!ce(v)?Q(g,v,u):M(g,v,u)}},J=(a,c,u={})=>{const S=b(s,a),v=l.array.has(a),g=U(c);L(n,a,g),v?(h.array.next({name:a,values:U(n)}),(f.isDirty||f.dirtyFields||m.isDirty||m.dirtyFields)&&u.shouldDirty&&h.state.next({name:a,dirtyFields:de(o,n),isDirty:ne(a,g)})):S&&!S._f&&!K(g)?Q(a,g,u):M(a,g,u),Pt(a,l)&&h.state.next({...t,name:a}),h.state.next({name:i.mount?a:void 0,values:U(n)})},ie=async a=>{i.mount=!0;const c=a.target;let u=c.name,S=!0;const v=b(s,u),g=O=>{S=Number.isNaN(O)||ce(O)&&isNaN(O.getTime())||re(O,b(n,u,O))},x=Dt(r.mode),P=Dt(r.reValidateMode);if(v){let O,ee;const Pe=c.type?Nt(v._f):pt(a),le=a.type===ze.BLUR||a.type===ze.FOCUS_OUT,Ms=!Ir(v._f)&&!r.resolver&&!b(t.errors,u)&&!v._f.deps||qr(le,b(t.touchedFields,u),t.isSubmitted,P,x),at=Pt(u,l,le);L(n,u,Pe),le?(!c||!c.readOnly)&&(v._f.onBlur&&v._f.onBlur(a),d&&d(0)):v._f.onChange&&v._f.onChange(a);const lt=E(u,Pe,le),js=!Z(lt)||at;if(!le&&h.state.next({name:u,type:a.type,values:U(n)}),Ms)return(f.isValid||m.isValid)&&(r.mode==="onBlur"?le&&_():le||_()),js&&h.state.next({name:u,...at?{}:lt});if(!le&&at&&h.state.next({...t}),r.resolver){const{errors:br}=await q([u]);if(g(Pe),S){const Is=Bt(t.errors,s,u),Sr=Bt(br,s,Is.name||u);O=Sr.error,u=Sr.name,ee=Z(br)}}else z([u],!0),O=(await Tt(v,l.disabled,n,w,r.shouldUseNativeValidation))[u],z([u]),g(Pe),S&&(O?ee=!1:(f.isValid||m.isValid)&&(ee=await G(s,!0)));S&&(v._f.deps&&(!Array.isArray(v._f.deps)||v._f.deps.length>0)&&he(v._f.deps),W(u,ee,O,lt))}},Fe=(a,c)=>{if(b(t.errors,c)&&a.focus)return a.focus(),1},he=async(a,c={})=>{let u,S;const v=pe(a);if(r.resolver){const g=await R(H(a)?a:v);u=Z(g),S=a?!v.some(x=>b(g,x)):u}else a?(S=(await Promise.all(v.map(async g=>{const x=b(s,g);return await G(x&&x._f?{[g]:x}:x)}))).every(Boolean),!(!S&&!t.isValid)&&_()):S=u=await G(s);return h.state.next({...!Y(a)||(f.isValid||m.isValid)&&u!==t.isValid?{}:{name:a},...r.resolver||!a?{isValid:u}:{},errors:t.errors}),c.shouldFocus&&!S&&be(s,Fe,a?v:l.mount),S},Le=(a,c)=>{let u={...i.mount?n:o};return c&&(u=Vt(c.dirtyFields?t.dirtyFields:t.touchedFields,u)),H(a)?u:Y(a)?b(u,a):a.map(S=>b(u,S))},fr=(a,c)=>({invalid:!!b((c||t).errors,a),isDirty:!!b((c||t).dirtyFields,a),error:b((c||t).errors,a),isValidating:!!b(t.validatingFields,a),isTouched:!!b((c||t).touchedFields,a)}),Ds=a=>{a&&pe(a).forEach(c=>I(t.errors,c)),h.state.next({errors:a?t.errors:{}})},yr=(a,c,u)=>{const S=(b(s,a,{_f:{}})._f||{}).ref,v=b(t.errors,a)||{},{ref:g,message:x,type:P,...O}=v;L(t.errors,a,{...O,...c,ref:S}),h.state.next({name:a,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&S&&S.focus&&S.focus()},Ls=(a,c)=>se(a)?h.state.subscribe({next:u=>"values"in u&&a(D(void 0,c),u)}):D(a,c,!0),mr=a=>h.state.subscribe({next:c=>{Wr(a.name,c.name,a.exact)&&Ur(c,a.formState||f,Hs,a.reRenderRoot)&&a.callback({values:{...n},...t,...c,defaultValues:o})}}).unsubscribe,Ps=a=>(i.mount=!0,m={...m,...a.formState},mr({...a,formState:m})),ot=(a,c={})=>{for(const u of a?pe(a):l.mount)l.mount.delete(u),l.array.delete(u),c.keepValue||(I(s,u),I(n,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(o,u);h.state.next({values:U(n)}),h.state.next({...t,...c.keepDirty?{isDirty:ne()}:{}}),!c.keepIsValid&&_()},hr=({disabled:a,name:c})=>{(X(a)&&i.mount||a||l.disabled.has(c))&&(a?l.disabled.add(c):l.disabled.delete(c))},nt=(a,c={})=>{let u=b(s,a);const S=X(c.disabled)||X(r.disabled);return L(s,a,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:a}},name:a,mount:!0,...c}}),l.mount.add(a),u?hr({disabled:X(c.disabled)?c.disabled:r.disabled,name:a}):C(a,!0,c.value),{...S?{disabled:c.disabled||r.disabled}:{},...r.progressive?{required:!!c.required,min:ve(c.min),max:ve(c.max),minLength:ve(c.minLength),maxLength:ve(c.maxLength),pattern:ve(c.pattern)}:{},name:a,onChange:ie,onBlur:ie,ref:v=>{if(v){nt(a,c),u=b(s,a);const g=H(v.value)&&v.querySelectorAll&&v.querySelectorAll("input,select,textarea")[0]||v,x=Br(g),P=u._f.refs||[];if(x?P.find(O=>O===g):g===u._f.ref)return;L(s,a,{_f:{...u._f,...x?{refs:[...P.filter(Qe),g,...Array.isArray(b(o,a))?[{}]:[]],ref:{type:g.type,name:a}}:{ref:g}}}),C(a,!1,void 0,g)}else u=b(s,a,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(vt(l.array,a)&&i.action)&&l.unMount.add(a)}}},it=()=>r.shouldFocusError&&be(s,Fe,l.mount),Bs=a=>{X(a)&&(h.state.next({disabled:a}),be(s,(c,u)=>{const S=b(s,u);S&&(c.disabled=S._f.disabled||a,Array.isArray(S._f.refs)&&S._f.refs.forEach(v=>{v.disabled=S._f.disabled||a}))},0,!1))},gr=(a,c)=>async u=>{let S;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let v=U(n);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:g,values:x}=await q();t.errors=g,v=U(x)}else await G(s);if(l.disabled.size)for(const g of l.disabled)I(v,g);if(I(t.errors,"root"),Z(t.errors)){h.state.next({errors:{}});try{await a(v,u)}catch(g){S=g}}else c&&await c({...t.errors},u),it(),setTimeout(it);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Z(t.errors)&&!S,submitCount:t.submitCount+1,errors:t.errors}),S)throw S},Os=(a,c={})=>{b(s,a)&&(H(c.defaultValue)?J(a,U(b(o,a))):(J(a,c.defaultValue),L(o,a,U(c.defaultValue))),c.keepTouched||I(t.touchedFields,a),c.keepDirty||(I(t.dirtyFields,a),t.isDirty=c.defaultValue?ne(a,U(b(o,a))):ne()),c.keepError||(I(t.errors,a),f.isValid&&_()),h.state.next({...t}))},_r=(a,c={})=>{const u=a?U(a):o,S=U(u),v=Z(a),g=v?o:S;if(c.keepDefaultValues||(o=u),!c.keepValues){if(c.keepDirtyValues){const x=new Set([...l.mount,...Object.keys(de(o,n))]);for(const P of Array.from(x))b(t.dirtyFields,P)?L(g,P,b(n,P)):J(P,b(g,P))}else{if(Te&&H(a))for(const x of l.mount){const P=b(s,x);if(P&&P._f){const O=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if($e(O)){const ee=O.closest("form");if(ee){ee.reset();break}}}}if(c.keepFieldsRef)for(const x of l.mount)J(x,b(g,x));else s={}}n=r.shouldUnregister?c.keepDefaultValues?U(o):{}:U(g),h.array.next({values:{...g}}),h.state.next({values:{...g}})}l={mount:c.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!f.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!Z(g),i.watch=!!r.shouldUnregister,h.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:v?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!re(a,o)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:v?{}:c.keepDirtyValues?c.keepDefaultValues&&n?de(o,n):t.dirtyFields:c.keepDefaultValues&&a?de(o,a):c.keepDirty?t.dirtyFields:{},touchedFields:c.keepTouched?t.touchedFields:{},errors:c.keepErrors?t.errors:{},isSubmitSuccessful:c.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},pr=(a,c)=>_r(se(a)?a(n):a,c),Ts=(a,c={})=>{const u=b(s,a),S=u&&u._f;if(S){const v=S.refs?S.refs[0]:S.ref;v.focus&&(v.focus(),c.shouldSelect&&se(v.select)&&v.select())}},Hs=a=>{t={...t,...a}},vr={control:{register:nt,unregister:ot,getFieldState:fr,handleSubmit:gr,setError:yr,_subscribe:mr,_runSchema:q,_focusError:it,_getWatch:D,_getDirty:ne,_setValid:_,_setFieldArray:A,_setDisabledField:hr,_setErrors:$,_getFieldArray:B,_reset:_r,_resetDefaultValues:()=>se(r.defaultValues)&&r.defaultValues().then(a=>{pr(a,r.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:ue,_disableForm:Bs,_subjects:h,_proxyFormState:f,get _fields(){return s},get _formValues(){return n},get _state(){return i},set _state(a){i=a},get _defaultValues(){return o},get _names(){return l},set _names(a){l=a},get _formState(){return t},get _options(){return r},set _options(a){r={...r,...a}}},subscribe:Ps,trigger:he,register:nt,handleSubmit:gr,watch:Ls,setValue:J,getValues:Le,reset:pr,resetField:Os,clearErrors:Ds,unregister:ot,setError:yr,setFocus:Ts,getFieldState:fr};return{...vr,formControl:vr}}function Jr(e={}){const r=V.useRef(void 0),t=V.useRef(void 0),[s,o]=V.useState({isDirty:!1,isValidating:!1,isLoading:se(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:se(e.defaultValues)?void 0:e.defaultValues});if(!r.current)if(e.formControl)r.current={...e.formControl,formState:s},e.defaultValues&&!se(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:i,...l}=Kr(e);r.current={...l,formState:s}}const n=r.current.control;return n._options=e,Ie(()=>{const i=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(l=>({...l,isReady:!0})),n._formState.isReady=!0,i},[n]),V.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),V.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),V.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),V.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),V.useEffect(()=>{if(n._proxyFormState.isDirty){const i=n._getDirty();i!==s.isDirty&&n._subjects.state.next({isDirty:i})}},[n,s.isDirty]),V.useEffect(()=>{e.values&&!re(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,o(i=>({...i}))):n._resetDefaultValues()},[n,e.values]),V.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),r.current.formState=St(s,n),r.current}const Ht=(e,r,t)=>{if(e&&"reportValidity"in e){const s=b(t,r);e.setCustomValidity(s&&s.message||""),e.reportValidity()}},Je=(e,r)=>{for(const t in r.fields){const s=r.fields[t];s&&s.ref&&"reportValidity"in s.ref?Ht(s.ref,t,e):s&&s.refs&&s.refs.forEach(o=>Ht(o,t,e))}},Mt=(e,r)=>{r.shouldUseNativeValidation&&Je(e,r);const t={};for(const s in e){const o=b(r.fields,s),n=Object.assign(e[s]||{},{ref:o&&o.ref});if(Xr(r.names||Object.keys(e),s)){const i=Object.assign({},b(t,s));L(i,"root",n),L(t,s,i)}else L(t,s,n)}return t},Xr=(e,r)=>{const t=jt(r);return e.some(s=>jt(s).match(`^${t}\\.\\d+`))};function jt(e){return e.replace(/\]|\[/g,"")}function It(e,r,t){function s(l,d){var y;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(y=l._zod).traits??(y.traits=new Set),l._zod.traits.add(e),r(l,d);for(const f in i.prototype)f in l||Object.defineProperty(l,f,{value:i.prototype[f].bind(l)});l._zod.constr=i,l._zod.def=d}const o=(t==null?void 0:t.Parent)??Object;class n extends o{}Object.defineProperty(n,"name",{value:e});function i(l){var d;const y=t!=null&&t.Parent?new n:this;s(y,l),(d=y._zod).deferred??(d.deferred=[]);for(const f of y._zod.deferred)f();return y}return Object.defineProperty(i,"init",{value:s}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>{var d,y;return t!=null&&t.Parent&&l instanceof t.Parent?!0:(y=(d=l==null?void 0:l._zod)==null?void 0:d.traits)==null?void 0:y.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}class Yr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Rr={};function Ut(e){return Rr}function es(e,r){return typeof r=="bigint"?r.toString():r}const Wt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ae(e){return typeof e=="string"?e:e==null?void 0:e.message}function qt(e,r,t){var o,n,i,l,d,y;const s={...e,path:e.path??[]};if(!e.message){const f=Ae((i=(n=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:n.error)==null?void 0:i.call(n,e))??Ae((l=r==null?void 0:r.error)==null?void 0:l.call(r,e))??Ae((d=t.customError)==null?void 0:d.call(t,e))??Ae((y=t.localeError)==null?void 0:y.call(t,e))??"Invalid input";s.message=f}return delete s.inst,delete s.continue,r!=null&&r.reportInput||delete s.input,s}const Gt=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,es,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ts=It("$ZodError",Gt),Zt=It("$ZodError",Gt,{Parent:Error}),rs=(e=>(r,t,s,o)=>{const n=s?Object.assign(s,{async:!1}):{async:!1},i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise)throw new Yr;if(i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>qt(d,n,Ut())));throw Wt(l,o==null?void 0:o.callee),l}return i.value})(Zt),ss=(e=>async(r,t,s,o)=>{const n=s?Object.assign(s,{async:!0}):{async:!0};let i=r._zod.run({value:t,issues:[]},n);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new((o==null?void 0:o.Err)??e)(i.issues.map(d=>qt(d,n,Ut())));throw Wt(l,o==null?void 0:o.callee),l}return i.value})(Zt);function Qt(e,r){try{var t=e()}catch(s){return r(s)}return t&&t.then?t.then(void 0,r):t}function os(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(f){return f.errors.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,y=d&&d[s.code];t[i]=qe(i,r,t,o,y?[].concat(y,s.message):s.message)}e.shift()}return t}function ns(e,r){for(var t={};e.length;){var s=e[0],o=s.code,n=s.message,i=s.path.join(".");if(!t[i])if(s.code==="invalid_union"&&s.errors.length>0){var l=s.errors[0][0];t[i]={message:l.message,type:l.code}}else t[i]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(f){return f.forEach(function(m){return e.push(m)})}),r){var d=t[i].types,y=d&&d[s.code];t[i]=qe(i,r,t,o,y?[].concat(y,s.message):s.message)}e.shift()}return t}function is(e,r,t){if(t===void 0&&(t={}),(function(s){return"_def"in s&&typeof s._def=="object"&&"typeName"in s._def})(e))return function(s,o,n){try{return Promise.resolve(Qt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(i){return n.shouldUseNativeValidation&&Je({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(i))return{values:{},errors:Mt(os(i.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(Qt(function(){return Promise.resolve((t.mode==="sync"?rs:ss)(e,s,r)).then(function(i){return n.shouldUseNativeValidation&&Je({},n),{errors:{},values:t.raw?Object.assign({},s):i}})},function(i){if((function(l){return l instanceof ts})(i))return{values:{},errors:Mt(ns(i.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}const Kt=V.createContext(null);function Jt(){const e=V.useContext(Kt);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function as({onSubmit:e,children:r,schema:t,defaultValues:s,mode:o="onSubmit",reValidateMode:n="onChange",className:i,style:l,formProps:d}){const y=Jr({resolver:t?is(t):void 0,defaultValues:s,mode:o,reValidateMode:n}),f=y.handleSubmit(e);return p.jsx(Kt.Provider,{value:y,children:p.jsx("form",{...d,className:i,style:l,onSubmit:f,children:typeof r=="function"?r(y):r})})}const ls=as,cs={formError:"FormError-module__formError___kaUBn"},Xt=({color:e,children:r,className:t,style:s,divProps:o})=>{const n=T(),i={"--form-error-margin-top":`calc(${n.fonts.rhythm} * 0.17)`,color:e||n.colors.error,...s},l=[cs.formError,t].filter(Boolean).join(" ");return p.jsx("div",{...o,className:l,style:i,role:"alert","aria-live":"polite",children:r})},ye={formGroup:"FormGroup-module__formGroup___aVI-B",inputWrapper:"FormGroup-module__inputWrapper___429QE",indented:"FormGroup-module__indented___t61iz",disabled:"FormGroup-module__disabled___W-tJ0",required:"FormGroup-module__required___mO3xA"},Yt=({disabled:e=!1,error:r=!1,required:t=!1,indent:s=!1,name:o,label:n,errorMessage:i,labelProps:l,children:d,className:y,style:f,divProps:m})=>{const h=T(),w=[ye.formGroup,r?ye.error:"",e?ye.disabled:"",y].filter(Boolean).join(" "),k={"--form-group-margin-bottom":`calc(${h.fonts.rhythm} * 0.35)`,...f},_=V.Children.map(d,z=>{if(V.isValidElement(z)){const A={};if(e&&z.props.disabled===void 0&&(A.disabled=!0),r&&z.props.error===void 0&&(A.error=!0),o&&z.props.id===void 0&&(A.id=o),Object.keys(A).length>0)return V.cloneElement(z,A)}return z});return p.jsxs("div",{...m,className:w,style:k,children:[n&&p.jsxs(xe,{htmlFor:o,disabled:e,error:r,...l,children:[n,t&&p.jsxs("span",{className:ye.required,"aria-label":"required",children:[" ","*"]})]}),p.jsx("div",{className:`${ye.inputWrapper} ${s?ye.indented:""}`,children:_}),r&&i&&p.jsx(Xt,{children:i})]})};function me({name:e,label:r,required:t,children:s,rules:o,disabled:n,className:i,style:l,indent:d,labelProps:y}){const{control:f}=Jt(),{field:m,fieldState:{error:h}}=Pr({name:e,control:f,rules:o});return p.jsx(Yt,{label:r,name:e,error:!!h,errorMessage:h==null?void 0:h.message,disabled:n,required:t,className:i,style:l,indent:d,labelProps:y,children:s({value:m.value,onChange:m.onChange,onBlur:m.onBlur,name:m.name,error:!!h,indent:d})})}const Xe={input:"Input-module__input___WjT81",sizeSmall:"Input-module__sizeSmall___NFvsi",sizeLarge:"Input-module__sizeLarge___4Boj3"},us=({color:e="#000",disabled:r=!1,fontSize:t="1em",placeholderOpacity:s=.3})=>({borderColor:e,color:e,fontSize:t,opacity:r?.3:1,placeholderOpacity:s}),Rt=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i,placeholderOpacity:l=.3,type:d="text",value:y="",onChange:f,onBlur:m,className:h,style:w,inputProps:k})=>{const _=T(),z=_.colors.error,A=r?z:t||_.colors.primary,F=us({color:A,disabled:e,fontSize:_.fonts.size,placeholderOpacity:l}),$={"--placeholder-opacity":F.placeholderOpacity,"--input-padding-small":`calc(${_.fonts.rhythm} * ${_.sizes.small.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,"--input-padding-large":`calc(${_.fonts.rhythm} * ${_.sizes.large.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,borderColor:F.borderColor,borderWidth:_.border.width,borderRadius:_.border.radius,color:F.color,fontSize:F.fontSize,opacity:F.opacity,...w},C=[Xe.input,s==="small"?Xe.sizeSmall:Xe.sizeLarge,h].filter(Boolean).join(" ");return p.jsx("input",{...k,className:C,disabled:e,id:o,name:n,onChange:f,onBlur:m,placeholder:i,type:d,value:y,style:$})};function ds({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return p.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:y,onBlur:f,name:m,error:h})=>p.jsx(Rt,{...l,name:m,value:d||"",onChange:w=>y(w.target.value),inputProps:{onBlur:f},error:h})})}const Ye={textarea:"Textarea-module__textarea___Z-y6g",sizeSmall:"Textarea-module__sizeSmall___HHFEM",sizeLarge:"Textarea-module__sizeLarge___5a3sf"},fs=({color:e="#000",disabled:r=!1,placeholderOpacity:t=.3})=>({color:e,borderColor:e,opacity:r?.3:1,placeholderOpacity:t}),er=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i,placeholderOpacity:l=.3,rows:d=3,value:y="",onChange:f,onBlur:m,className:h,style:w,textareaProps:k})=>{const _=T(),z=_.colors.error,A=r?z:t||_.colors.primary,F=fs({color:A,disabled:e,placeholderOpacity:l}),$={"--placeholder-opacity":F.placeholderOpacity,"--textarea-padding-small":`calc(${_.fonts.rhythm} * ${_.sizes.small.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,"--textarea-padding-large":`calc(${_.fonts.rhythm} * ${_.sizes.large.paddingVertical}) calc(${_.fonts.rhythm} * ${_.inputs.paddingHorizontal})`,borderColor:F.borderColor,borderWidth:_.border.width,borderRadius:_.border.radius,color:F.color,fontSize:_.fonts.size,opacity:F.opacity,...w},C=[Ye.textarea,s==="small"?Ye.sizeSmall:Ye.sizeLarge,h].filter(Boolean).join(" ");return p.jsx("textarea",{...k,className:C,disabled:e,id:o,name:n,onChange:f,onBlur:m,placeholder:i,rows:d,value:y,style:$})};function ys({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,...l}){return p.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:d,onChange:y,onBlur:f,name:m,error:h})=>p.jsx(er,{...l,name:m,value:d||"",onChange:w=>y(w.target.value),onBlur:f,error:h})})}const Re={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeLarge:"Select-module__sizeLarge___eBA1T"},ms=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const i=`
3
3
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
4
4
  <path
5
5
  d="M 30 42.5 L 50 22.5 L 70 42.5"
@@ -14,9 +14,9 @@
14
14
  fill="transparent"
15
15
  />
16
16
  </svg>
17
- `.trim();return`url("data:image/svg+xml,${encodeURIComponent(i)}")`})(e)}),er=({children:e,color:r,disabled:t=!1,error:s=!1,id:o,name:n="",onChange:i,onBlur:l,placeholder:d="",size:f="large",className:y,style:m,value:h="",selectProps:k})=>{const V=H(),_=V.colors.error,$=s?_:r||V.colors.primary,E=ms({color:$,disabled:t}),S={"--select-padding-small":`calc(${V.fonts.rhythm} * ${V.sizes.small.paddingVertical}) calc(${V.fonts.rhythm} * 1.2) calc(${V.fonts.rhythm} * ${V.sizes.small.paddingVertical}) calc(${V.fonts.rhythm} * ${V.inputs.paddingHorizontal})`,"--select-padding-large":`calc(${V.fonts.rhythm} * ${V.sizes.large.paddingVertical}) calc(${V.fonts.rhythm} * 1.4) calc(${V.fonts.rhythm} * ${V.sizes.large.paddingVertical}) calc(${V.fonts.rhythm} * ${V.inputs.paddingHorizontal})`,backgroundImage:E.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:E.borderColor,borderWidth:V.border.width,borderRadius:V.border.radius,color:E.color,cursor:E.cursor,fontSize:V.fonts.size,opacity:E.opacity,...m,...k==null?void 0:k.style},C=[Ye.select,f==="small"?Ye.sizeSmall:Ye.sizeLarge,y].filter(Boolean).join(" ");return v.jsxs("select",{className:C,disabled:t,id:o,name:n,onChange:i,onBlur:l,value:h,...k,style:S,children:[d!==""&&v.jsx("option",{disabled:!0,value:"",children:d}),e]})};function hs({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:l,...d}){return v.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:f,onChange:y,onBlur:m,name:h,error:k})=>v.jsx(er,{...d,name:h,value:f||"",onChange:V=>y(V.target.value),onBlur:m,error:k,children:l})})}function gs({name:e,required:r,rules:t,disabled:s,className:o,style:n,...i}){return v.jsx(me,{name:e,required:r,rules:t,disabled:s,className:o,style:n,children:({value:l,onChange:d,name:f,error:y})=>v.jsx(ht,{...i,name:f,checked:!!l,onChange:m=>d(m.target.checked),error:y})})}const Re={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},_s=({color:e="#000",disabled:r=!1})=>({radioColor:e,cursor:r?"default":"pointer",opacity:r?.3:1}),tr=({checked:e=!1,color:r,disabled:t=!1,error:s=!1,id:o,label:n,labelStyle:i,name:l,onChange:d,className:f,style:y})=>{const m=H(),h=o||yt(),k=m.colors.error,V=s?k:r||m.colors.primary,_=_s({color:V,disabled:t}),$=T=>{t||d(T)},E={cursor:_.cursor,fontSize:m.fonts.size,opacity:_.opacity,...y},S={width:m.fonts.size},C={fill:"transparent",strokeWidth:"12.5",stroke:_.radioColor},z={fill:_.radioColor},A=[Re.container,f].filter(Boolean).join(" ");return v.jsxs("div",{className:A,style:E,children:[v.jsx("input",{id:h,checked:e,disabled:t,name:l,onChange:T=>$({target:{checked:T.target.checked,name:l,type:"radio"}}),style:{display:"none"},type:"radio"}),v.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>$({target:{checked:!e,name:l,type:"radio"}}),className:Re.svg,style:S,children:[v.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:C}),e&&v.jsx("circle",{cx:"50",cy:"50",r:"25",style:z})]}),n&&v.jsx(ke,{htmlFor:h,className:Re.label,style:{paddingBottom:0,...i},color:_.radioColor,disabled:t,error:s,children:n})]})};function vs({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,value:l,...d}){return v.jsx(me,{name:e,required:t,rules:s,disabled:o,className:n,style:i,children:({value:f,onChange:y,name:m,error:h})=>v.jsx(tr,{...d,name:m,checked:f===l,onChange:()=>y(l),error:h,label:r})})}const be={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},ps=({compact:e,color:r,visible:t,border:s})=>{const o=H();return w.useMemo(()=>{const n=e?{right:".5em"}:{};return{"--hamburger-border-radius":(s==null?void 0:s.radius)||o.border.radius||"10px",color:r||"inherit",display:t?"flex":"none",...n}},[r,t,e,s==null?void 0:s.radius,o.border.radius])},rr=({visible:e,compact:r,color:t,hamburgerRef:s,open:o=!1,setOpen:n,buttonProps:i,border:l})=>{const d=ps({compact:r,color:t,visible:e,border:l}),f=[be.hamburger,o?be.open:""].filter(Boolean).join(" ");return v.jsxs("button",{ref:s,className:f,onClick:()=>n(!o),style:d,"aria-label":"Toggle menu","aria-expanded":o,...i,children:[v.jsx("div",{className:be.line}),v.jsx("div",{className:be.line}),v.jsx("div",{className:be.line})]})},sr={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},bs=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:i,margin:l,gap:d,background:f,color:y}={})=>{const m=H();return{"--header-max-width":r||m.layout.maxWidth,"--header-min-width":t,"--header-width":s,"--header-height":o,"--header-padding":e?n||m.layout.paddingSm:i||m.layout.padding,"--header-margin":l,"--header-gap":d,background:f,color:y}},se=e=>{const r=typeof window<"u"&&typeof window.matchMedia=="function",t=n=>{if(!r)return()=>{};const i=window.matchMedia(e);return i.addEventListener("change",n),()=>i.removeEventListener("change",n)},s=()=>r?window.matchMedia(e).matches:!1,o=()=>!1;return w.useSyncExternalStore(t,s,o)},or=({children:e,breakpoint:r,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:i,padding:l,margin:d,gap:f,background:y,color:m,className:h,style:k={},headerProps:V={},headerRef:_})=>{const $=H(),S=(r||$.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/),C=S?parseInt(S[1],10)-1:474,z=S?S[2]:"px",A=se(`(max-width: ${C}${z})`),T=bs({isSmallScreen:A,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:i,padding:l,margin:d,gap:f,background:y,color:m}),q=[sr.container,h].filter(Boolean).join(" ");return v.jsx("header",{ref:_,className:sr.header,...V,children:v.jsx("div",{className:q,style:{...T,...k},children:e})})},Ae={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",open:"ResponsiveNav-module__open___WDCAf",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},Ss=({isMobile:e,isCompact:r,mobileBackground:t,mobileColor:s,mobileActiveBackground:o,mobileActiveColor:n,mobileButtonHoverColor:i})=>{const l=H();return w.useMemo(()=>{const{rhythm:d}=l.fonts;return{...e?{"--mobile-nav-background":t||l.colors.accent,"--mobile-nav-color":s||l.colors.primary,"--mobile-nav-active-background":o||l.colors.primary,"--mobile-nav-active-color":n||l.colors.accent,"--mobile-nav-button-hover-text-color":i||t||l.colors.accent,"--nav-padding-top":`calc(${d} * 3)`,"--nav-link-padding":`calc(${d} * 0.35) calc(${d} * 2)`,"--nav-button-margin":`calc(${d} * 0.5) calc(${d} * 1.4)`}:{}}},[t,s,o,n,i,l.colors.accent,l.colors.primary,l.fonts,e,r])};function nr(e){const t=parseInt(e)-1,s=e.replace(/[0-9]/g,"");return{maxWidth:t,unit:s}}const Fs=({breakpoints:e,children:r,mobileBackground:t,mobileColor:s,mobileActiveBackground:o,mobileActiveColor:n,mobileButtonHoverColor:i,style:l,navProps:d})=>{const[f,y]=w.useState(!1),m=w.useRef(null),h=w.useRef(null),V={...H().breakpoints,...e},{maxWidth:_,unit:$}=nr(V.md),{maxWidth:E,unit:S}=nr(V.sm),C=se(`(max-width: ${_}${$})`),z=se(`(max-width: ${E}${S})`),A=Ss({isMobile:C,isCompact:z,mobileBackground:t,mobileColor:s,mobileActiveBackground:o,mobileActiveColor:n,mobileButtonHoverColor:i});w.useEffect(()=>{const q=oe=>{!h.current||h.current.contains(oe.target)||m.current&&m.current.contains(oe.target)||y(!1)};return document.addEventListener("mousedown",q),()=>{document.removeEventListener("mousedown",q)}},[m,h,y]);const T=[Ae.nav,C?Ae.navMobile:Ae.navDesktop,C&&f?Ae.open:""].filter(Boolean).join(" ");return v.jsxs(v.Fragment,{children:[v.jsx(rr,{hamburgerRef:m,visible:C,compact:z,open:f,setOpen:y}),v.jsx("nav",{ref:h,className:T,style:{...A,...l},...d,children:typeof r=="function"?r({setOpen:y}):r})]})},ir=({color:e,background:r,fullScreen:t=!0,className:s,style:o})=>{const n=H(),i=e||n.colors.primary,l=r||n.colors.secondary,d=v.jsx("div",{className:t?void 0:s,style:{fontSize:"2.5em",border:`0.1em solid ${i}`,borderTop:`0.1em solid ${l}`,borderRadius:"50%",width:"1em",height:"1em",animation:"spin 1s linear infinite",...!t&&o||{}}}),f=v.jsxs(v.Fragment,{children:[d,v.jsx("style",{children:`
17
+ `.trim();return`url("data:image/svg+xml,${encodeURIComponent(i)}")`})(e)}),tr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:i="",value:l="",onChange:d,onBlur:y,children:f,className:m,style:h,selectProps:w})=>{const k=T(),_=k.colors.error,z=r?_:t||k.colors.primary,A=ms({color:z,disabled:e}),F={"--select-padding-small":`calc(${k.fonts.rhythm} * ${k.sizes.small.paddingVertical}) calc(${k.fonts.rhythm} * 1.2) calc(${k.fonts.rhythm} * ${k.sizes.small.paddingVertical}) calc(${k.fonts.rhythm} * ${k.inputs.paddingHorizontal})`,"--select-padding-large":`calc(${k.fonts.rhythm} * ${k.sizes.large.paddingVertical}) calc(${k.fonts.rhythm} * 1.4) calc(${k.fonts.rhythm} * ${k.sizes.large.paddingVertical}) calc(${k.fonts.rhythm} * ${k.inputs.paddingHorizontal})`,backgroundImage:A.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:A.borderColor,borderWidth:k.border.width,borderRadius:k.border.radius,color:A.color,cursor:A.cursor,fontSize:k.fonts.size,opacity:A.opacity,...h},$=[Re.select,s==="small"?Re.sizeSmall:Re.sizeLarge,m].filter(Boolean).join(" ");return p.jsxs("select",{...w,className:$,disabled:e,id:o,name:n,onChange:d,onBlur:y,value:l,style:F,children:[i!==""&&p.jsx("option",{disabled:!0,value:"",children:i}),f]})};function hs({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:l,...d}){return p.jsx(me,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,children:({value:y,onChange:f,onBlur:m,name:h,error:w})=>p.jsx(tr,{...d,name:h,value:y||"",onChange:k=>f(k.target.value),onBlur:m,error:w,children:l})})}function gs({name:e,required:r,rules:t,disabled:s,className:o,style:n,...i}){return p.jsx(me,{name:e,required:r,rules:t,disabled:s,className:o,style:n,children:({value:l,onChange:d,name:y,error:f})=>p.jsx(gt,{...i,name:y,checked:!!l,onChange:m=>d(m.target.checked),error:f})})}const et={container:"Radio-module__container___AQxhk",svg:"Radio-module__svg___zl5kF",label:"Radio-module__label___vAFIP"},_s=({color:e="#000",disabled:r=!1})=>({radioColor:e,cursor:r?"default":"pointer",opacity:r?.3:1}),rr=({color:e,checked:r=!1,disabled:t=!1,error:s=!1,name:o,id:n,onChange:i,label:l,labelStyle:d,className:y,style:f,divProps:m})=>{const h=T(),w=n||mt(),k=h.colors.error,_=s?k:e||h.colors.primary,z=_s({color:_,disabled:t}),A=q=>{t||i(q)},F={cursor:z.cursor,fontSize:h.fonts.size,opacity:z.opacity,...f},$={width:"1em"},C={fill:"transparent",strokeWidth:"12.5",stroke:z.radioColor},E={fill:z.radioColor},W=[et.container,y].filter(Boolean).join(" ");return p.jsxs("div",{...m,className:W,style:F,children:[p.jsx("input",{id:w,checked:r,disabled:t,name:o,onChange:q=>A({target:{checked:q.target.checked,name:o,type:"radio"}}),style:{display:"none"},type:"radio"}),p.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>A({target:{checked:!r,name:o,type:"radio"}}),className:et.svg,style:$,children:[p.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:C}),r&&p.jsx("circle",{cx:"50",cy:"50",r:"25",style:E})]}),l&&p.jsx(xe,{htmlFor:w,className:et.label,style:{paddingBottom:0,...d},color:z.radioColor,disabled:t,error:s,children:l})]})};function ps({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:i,value:l,...d}){return p.jsx(me,{name:e,required:t,rules:s,disabled:o,className:n,style:i,children:({value:y,onChange:f,name:m,error:h})=>p.jsx(rr,{...d,name:m,checked:y===l,onChange:()=>f(l),error:h,label:r})})}const Se={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},vs=({compact:e,color:r,visible:t,border:s})=>{const o=T(),n=e?{right:".5em"}:{};return{"--hamburger-border-radius":(s==null?void 0:s.radius)||o.border.radius,color:r||"inherit",display:t?"flex":"none",...n}},sr=({color:e,visible:r,compact:t,hamburgerRef:s,open:o=!1,border:n,setOpen:i,className:l,style:d})=>{const y=vs({compact:t,color:e,visible:r,border:n}),f=[Se.hamburger,o?Se.open:"",l].filter(Boolean).join(" ");return p.jsxs("button",{ref:s,className:f,onClick:()=>i(!o),style:{...y,...d},"aria-label":"Toggle menu","aria-expanded":o,children:[p.jsx("div",{className:Se.line}),p.jsx("div",{className:Se.line}),p.jsx("div",{className:Se.line})]})},or={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},bs=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:i,margin:l,gap:d,backgroundColor:y,color:f}={})=>{const m=T();return{"--header-max-width":r||m.layout.maxWidth,"--header-min-width":t,"--header-width":s,"--header-height":o,"--header-padding":e?n||m.layout.paddingSm:i||m.layout.padding,"--header-margin":l,"--header-gap":d,backgroundColor:y,color:f}},oe=e=>{const r=typeof window<"u"&&typeof window.matchMedia=="function",t=n=>{if(!r)return()=>{};const i=window.matchMedia(e);return i.addEventListener("change",n),()=>i.removeEventListener("change",n)},s=()=>r?window.matchMedia(e).matches:!1,o=()=>!1;return V.useSyncExternalStore(t,s,o)},nr=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,breakpoint:f,children:m,className:h,style:w,headerProps:k})=>{const _=T(),z=f||_.breakpoints.sm,{maxWidth:A,unit:F}=ge(z),$=oe(`(max-width: ${A}${F})`),C=bs({isSmallScreen:$,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:i,margin:d,gap:y,backgroundColor:e,color:r}),E=[or.container,h].filter(Boolean).join(" ");return p.jsx("header",{...k,className:or.header,children:p.jsx("div",{className:E,style:{...C,...w},children:m})})},Ne={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",open:"ResponsiveNav-module__open___WDCAf",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},Ss=({isMobile:e,isCompact:r,mobileBackground:t,mobileColor:s,mobileActiveBackground:o,mobileActiveColor:n,mobileButtonHoverColor:i})=>{const l=T();return V.useMemo(()=>{const{rhythm:d}=l.fonts;return{...e?{"--mobile-nav-background":t||l.colors.accent,"--mobile-nav-color":s||l.colors.primary,"--mobile-nav-active-background":o||l.colors.primary,"--mobile-nav-active-color":n||l.colors.accent,"--mobile-nav-button-hover-text-color":i||t||l.colors.accent,"--nav-padding-top":`calc(${d} * 3)`,"--nav-link-padding":`calc(${d} * 0.35) calc(${d} * 2)`,"--nav-button-margin":`calc(${d} * 0.5) calc(${d} * 1.4)`}:{}}},[t,s,o,n,i,l.colors.accent,l.colors.primary,l.fonts,e,r])},Fs=({mobileBackground:e,mobileColor:r,mobileActiveBackground:t,mobileActiveColor:s,mobileButtonHoverColor:o,breakpoints:n,children:i,className:l,style:d,navProps:y})=>{const[f,m]=V.useState(!1),h=V.useRef(null),w=V.useRef(null),_={...T().breakpoints,...n},{maxWidth:z,unit:A}=ge(_.md),{maxWidth:F,unit:$}=ge(_.sm),C=oe(`(max-width: ${z}${A})`),E=oe(`(max-width: ${F}${$})`),W=Ss({isMobile:C,isCompact:E,mobileBackground:e,mobileColor:r,mobileActiveBackground:t,mobileActiveColor:s,mobileButtonHoverColor:o});V.useEffect(()=>{const R=G=>{!w.current||w.current.contains(G.target)||h.current&&h.current.contains(G.target)||m(!1)};return document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}},[h,w,m]);const q=[Ne.nav,C?Ne.navMobile:Ne.navDesktop,C&&f?Ne.open:"",l].filter(Boolean).join(" ");return p.jsxs(p.Fragment,{children:[p.jsx(sr,{hamburgerRef:h,visible:C,compact:E,open:f,setOpen:m}),p.jsx("nav",{...y,ref:w,className:q,style:{...W,...d},children:typeof i=="function"?i({setOpen:m}):i})]})},ir=({color:e,backgroundColor:r,fullScreen:t=!0,className:s,style:o,divProps:n})=>{const i=T(),l=e||i.colors.primary,d=r||i.colors.secondary,y=p.jsx("div",{...t?void 0:n,className:t?void 0:s,style:{fontSize:"2.5em",borderRadius:"50%",width:"1em",height:"1em",animation:"spin 1s linear infinite",...t?{}:o,border:`0.1em solid ${l}`,borderTop:`0.1em solid ${d}`}}),f=p.jsxs(p.Fragment,{children:[y,p.jsx("style",{children:`
18
18
  @keyframes spin {
19
19
  0% { transform: rotate(0deg); }
20
20
  100% { transform: rotate(360deg); }
21
21
  }
22
- `})]});return t?v.jsx("div",{className:s,style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw",...o},children:f}):f},Vs=({children:e,loadingComponent:r})=>{const[t,s]=w.useState(!1);return w.useEffect(()=>{requestAnimationFrame(()=>{s(!0)})},[]),t?v.jsx(v.Fragment,{children:e}):r||v.jsx(ir,{})},et={stack:"Stack-module__stack___yUU-B",vertical:"Stack-module__vertical___sKTyQ",horizontal:"Stack-module__horizontal___YsvtV"},ws=({children:e,direction:r="column",className:t,style:s,divProps:o})=>{const n=[et.stack,r==="row"?et.horizontal:et.vertical,t].filter(Boolean).join(" ");return v.jsx("div",{className:n,style:s,...o,children:e})},ar={section:"ResponsiveSection-module__section___gBESK",innerDiv:"ResponsiveSection-module__innerDiv___r1bky"},tt=({children:e,background:r,color:t,maxWidth:s,minWidth:o,width:n,height:i,padding:l,paddingSm:d,margin:f,gap:y,className:m,style:h,verticalRhythm:k=3,sectionProps:V={}})=>{const _=H(),$=se(`(min-width: ${_.breakpoints.sm})`),E={background:r,color:t||_.fonts.color,margin:f,...h,...V==null?void 0:V.style},S=`calc(${_.fonts.rhythm} * ${k})`,C=$?l||_.layout.padding:d||_.layout.paddingSm,z={"--max-width":s||_.layout.maxWidth,"--min-width":o,"--width":n,"--height":i,"--section-padding":`${S} ${C}`,"--gap":y},A=[ar.section,m].filter(Boolean).join(" ");return v.jsx("section",{className:A,style:E,...V,children:v.jsx("div",{className:ar.innerDiv,style:z,children:e})})},lr={hero:"Hero-module__hero___IB2tg",content:"Hero-module__content___rkkfQ"},ks=({isMd:e=!1,isLg:r=!1,theme:t})=>w.useMemo(()=>{const{rhythm:s}=t.fonts;let o=`calc(${s} * 2) 0`,n="2rem",i="1.125rem";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"),{"--hero-padding":o,"--hero-h1-font-size":n,"--hero-p-font-size":i,"--hero-h1-margin-bottom":`calc(${s} * 0.7)`}},[e,r,t.fonts]),xs=({children:e,className:r,color:t,breakpoints:s,style:o,...n})=>{const i=H(),l=[lr.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=se(`(min-width: ${d})`),m=se(`(min-width: ${f})`),h=ks({isMd:y,isLg:m,theme:i});return v.jsx(tt,{className:l,color:t||i.fonts.color,style:{...h,...o},...n,children:v.jsx("div",{className:lr.content,children:e})})},cr={footer:"Footer-module__footer___A76NF",container:"Footer-module__container___QneNs"},Cs=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:i,margin:l,gap:d,background:f,color:y}={})=>{const m=H();return{"--footer-max-width":r||m.layout.maxWidth,"--footer-min-width":t,"--footer-width":s,"--footer-height":o,"--footer-padding":e?n||m.layout.paddingSm:i||m.layout.padding,"--footer-margin":l,"--footer-gap":d,background:f,color:y||m.fonts.color}},ur=({children:e,breakPoint:r,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:i,padding:l,margin:d,gap:f,background:y,color:m,className:h,style:k={},footerProps:V={},footerRef:_})=>{const $=H(),S=(r||$.breakpoints.sm).match(/^(\d+(?:\.\d+)?)(px|em|rem)$/),C=S?parseInt(S[1],10)-1:474,z=S?S[2]:"px",A=se(`(max-width: ${C}${z})`),T=Cs({isSmallScreen:A,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:i,padding:l,margin:d,gap:f,background:y,color:m}),q=[cr.container,h].filter(Boolean).join(" ");return v.jsx("footer",{ref:_,className:cr.footer,...V,children:v.jsx("div",{className:q,style:{...T,...k},children:e})})},Ne={card:"FeatureCard-module__card___XQt66",icon:"FeatureCard-module__icon___dXJ92",title:"FeatureCard-module__title___KxXyA",content:"FeatureCard-module__content___68xkw"},zs=({isMd:e=!1,theme:r})=>w.useMemo(()=>{const{rhythm:t}=r.fonts;return{"--feature-icon-font-size":e?"3rem":"2.5rem","--feature-title-font-size":e?"1.5rem":"1.25rem","--feature-card-padding":`calc(${t} * 1)`,"--feature-icon-margin-bottom":`calc(${t} * 0.7)`,"--feature-title-margin-bottom":`calc(${t} * 0.5)`}},[e,r.fonts]),$s=({icon:e,title:r,children:t,className:s,style:o,breakpoint:n})=>{const i=H(),l=[Ne.card,s].filter(Boolean).join(" "),d=n||i.breakpoints.md,f=se(`(min-width: ${d})`),y=zs({isMd:f,theme:i});return v.jsxs("div",{className:l,style:{...y,...o},children:[e&&v.jsx("div",{className:Ne.icon,children:e}),v.jsx("h3",{className:Ne.title,children:r}),v.jsx("div",{className:Ne.content,children:t})]})},dr={section:"FeatureGridSection-module__section___wZrbC",grid:"FeatureGridSection-module__grid___iwPJv"},Es=({columns:e,isMd:r=!1,isLg:t=!1})=>w.useMemo(()=>r?r&&!t&&(e===3||e===4)?{"--grid-template-columns":"repeat(2, 1fr)"}:{"--grid-template-columns":{1:"1fr",2:"repeat(2, 1fr)",3:"repeat(3, 1fr)",4:"repeat(4, 1fr)"}[e]}:{"--grid-template-columns":"1fr"},[e,r,t]),As=({children:e,columns:r=3,className:t,breakpoints:s,style:o,...n})=>{const i=H(),l=[dr.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=se(`(min-width: ${d})`),m=se(`(min-width: ${f})`),h=Es({columns:r,isMd:y,isLg:m}),k={"--section-padding-vertical":`calc(${i.fonts.rhythm} * 2)`};return v.jsx(tt,{className:l,style:k,...n,children:v.jsx("div",{className:dr.grid,style:{...h,...o},children:e})})},rt={layoutContainer:"PageLayout-module__layoutContainer___diLdT",content:"PageLayout-module__content___h2mBr",main:"PageLayout-module__main___Sw7Pv"},Ns=({children:e,header:r,footer:t,className:s,style:o,mainStyle:n})=>{const i=[rt.layoutContainer,s].filter(Boolean).join(" ");return v.jsxs("div",{className:i,style:o,children:[v.jsxs("div",{className:rt.content,children:[r&&v.jsx(or,{children:r}),v.jsx("main",{className:rt.main,style:n,children:e})]}),t&&v.jsx(ur,{children:t})]})};N.Button=wr,N.CSSReset=Er,N.Checkbox=ht,N.FeatureCard=$s,N.FeatureGridSection=As,N.Footer=ur,N.Form=ls,N.FormCheckbox=gs,N.FormError=Jt,N.FormField=me,N.FormGroup=Xt,N.FormInput=ds,N.FormLabel=ke,N.FormRadio=vs,N.FormSelect=hs,N.FormTextarea=ys,N.Hamburger=rr,N.Header=or,N.Hero=xs,N.Input=Yt,N.LoadingSpinner=ir,N.PageLayout=Ns,N.Radio=tr,N.ResponsiveNav=Fs,N.ResponsiveSection=tt,N.Select=er,N.Stack=ws,N.StyleLoader=Vs,N.Textarea=Rt,N.ThemeProvider=Vr,N.useFormContext=Kt,N.useTheme=H,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})}));
22
+ `})]});return t?p.jsx("div",{...n,className:s,style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw",...o},children:f}):f},Vs=({children:e,loadingComponent:r})=>{const[t,s]=V.useState(!1);return V.useEffect(()=>{requestAnimationFrame(()=>{s(!0)})},[]),t?p.jsx(p.Fragment,{children:e}):r||p.jsx(ir,{})},tt={stack:"Stack-module__stack___yUU-B",vertical:"Stack-module__vertical___sKTyQ",horizontal:"Stack-module__horizontal___YsvtV"},ws=({direction:e="column",children:r,className:t,style:s,divProps:o})=>{const n=[tt.stack,e==="row"?tt.horizontal:tt.vertical,t].filter(Boolean).join(" ");return p.jsx("div",{...o,className:n,style:s,children:r})},ar={section:"ResponsiveSection-module__section___gBESK",innerDiv:"ResponsiveSection-module__innerDiv___r1bky"},rt=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,verticalRhythm:f=3,children:m,className:h,style:w,sectionProps:k})=>{const _=T(),z=oe(`(min-width: ${_.breakpoints.sm})`),A={backgroundColor:e,color:r||_.fonts.color,margin:d,...w},F=`calc(${_.fonts.rhythm} * ${f})`,$=z?i||_.layout.padding:l||_.layout.paddingSm,C={"--max-width":t||_.layout.maxWidth,"--min-width":s,"--width":o,"--height":n,"--section-padding":`${F} ${$}`,"--gap":y},E=[ar.section,h].filter(Boolean).join(" ");return p.jsx("section",{...k,className:E,style:A,children:p.jsx("div",{className:ar.innerDiv,style:C,children:m})})},lr={hero:"Hero-module__hero___IB2tg",content:"Hero-module__content___rkkfQ"},ks=({isMd:e=!1,isLg:r=!1,theme:t})=>V.useMemo(()=>{const{rhythm:s}=t.fonts;let o=`calc(${s} * 2) 0`,n="2rem",i="1.125rem";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"),{"--hero-padding":o,"--hero-h1-font-size":n,"--hero-p-font-size":i,"--hero-h1-margin-bottom":`calc(${s} * 0.7)`}},[e,r,t.fonts]),xs=({color:e,breakpoints:r,children:t,className:s,style:o,...n})=>{const i=T(),l=[lr.hero,s].filter(Boolean).join(" "),d=(r==null?void 0:r.md)||i.breakpoints.md,y=(r==null?void 0:r.lg)||i.breakpoints.lg,f=oe(`(min-width: ${d})`),m=oe(`(min-width: ${y})`),h=ks({isMd:f,isLg:m,theme:i});return p.jsx(rt,{className:l,color:e||i.fonts.color,style:{...h,...o},...n,children:p.jsx("div",{className:lr.content,children:t})})},cr={footer:"Footer-module__footer___A76NF",container:"Footer-module__container___QneNs"},Cs=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:i,margin:l,gap:d,backgroundColor:y,color:f}={})=>{const m=T();return{maxWidth:r||m.layout.maxWidth,minWidth:t,width:s,height:o,padding:e?n||m.layout.paddingSm:i||m.layout.padding,margin:l,gap:d,backgroundColor:y,color:f||m.fonts.color}},ur=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:i,paddingSm:l,margin:d,gap:y,breakPoint:f,children:m,className:h,style:w,footerProps:k})=>{const _=T(),z=f||_.breakpoints.sm,{maxWidth:A,unit:F}=ge(z),$=oe(`(max-width: ${A}${F})`),C=Cs({isSmallScreen:$,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:i,margin:d,gap:y,backgroundColor:e,color:r}),E=[cr.container,h].filter(Boolean).join(" ");return p.jsx("footer",{...k,className:cr.footer,children:p.jsx("div",{className:E,style:{...C,...w},children:m})})},De={card:"FeatureCard-module__card___XQt66",icon:"FeatureCard-module__icon___dXJ92",title:"FeatureCard-module__title___KxXyA",content:"FeatureCard-module__content___68xkw"},zs=({isMd:e=!1,theme:r})=>V.useMemo(()=>{const{rhythm:t}=r.fonts;return{"--feature-icon-font-size":e?"3rem":"2.5rem","--feature-title-font-size":e?"1.5rem":"1.25rem","--feature-card-padding":`calc(${t} * 1)`,"--feature-icon-margin-bottom":`calc(${t} * 0.7)`,"--feature-title-margin-bottom":`calc(${t} * 0.5)`}},[e,r.fonts]),$s=({breakpoint:e,icon:r,title:t,children:s,className:o,style:n,divProps:i})=>{const l=T(),d=[De.card,o].filter(Boolean).join(" "),y=e||l.breakpoints.md,f=oe(`(min-width: ${y})`),m=zs({isMd:f,theme:l});return p.jsxs("div",{...i,className:d,style:{...m,...n},children:[r&&p.jsx("div",{className:De.icon,children:r}),p.jsx("h3",{className:De.title,children:t}),p.jsx("div",{className:De.content,children:s})]})},dr={section:"FeatureGridSection-module__section___wZrbC",grid:"FeatureGridSection-module__grid___iwPJv"},Es=({columns:e,isMd:r=!1,isLg:t=!1})=>V.useMemo(()=>r?r&&!t&&(e===3||e===4)?{"--grid-template-columns":"repeat(2, 1fr)"}:{"--grid-template-columns":{1:"1fr",2:"repeat(2, 1fr)",3:"repeat(3, 1fr)",4:"repeat(4, 1fr)"}[e]}:{"--grid-template-columns":"1fr"},[e,r,t]),As=({columns:e=3,breakpoints:r,gap:t,children:s,className:o,style:n,...i})=>{const l=T(),d=[dr.section,o].filter(Boolean).join(" "),y=(r==null?void 0:r.md)||l.breakpoints.md,f=(r==null?void 0:r.lg)||l.breakpoints.lg,m=oe(`(min-width: ${y})`),h=oe(`(min-width: ${f})`),w=Es({columns:e,isMd:m,isLg:h}),k={"--section-padding-vertical":`calc(${l.fonts.rhythm} * 2)`},_={...w,gap:t,...n};return p.jsx(rt,{className:d,style:k,...i,children:p.jsx("div",{className:dr.grid,style:_,children:s})})},st={layoutContainer:"PageLayout-module__layoutContainer___diLdT",content:"PageLayout-module__content___h2mBr",main:"PageLayout-module__main___Sw7Pv"},Ns=({header:e,footer:r,children:t,className:s,style:o,divProps:n,mainProps:i})=>{const l=[st.layoutContainer,s].filter(Boolean).join(" ");return p.jsxs("div",{...n,className:l,style:o,children:[p.jsxs("div",{className:st.content,children:[e&&p.jsx(nr,{children:e}),p.jsx("main",{...i,className:st.main,children:t})]}),r&&p.jsx(ur,{children:r})]})};N.Button=wr,N.CSSReset=Er,N.Checkbox=gt,N.FeatureCard=$s,N.FeatureGridSection=As,N.Footer=ur,N.Form=ls,N.FormCheckbox=gs,N.FormError=Xt,N.FormField=me,N.FormGroup=Yt,N.FormInput=ds,N.FormLabel=xe,N.FormRadio=ps,N.FormSelect=hs,N.FormTextarea=ys,N.Hamburger=sr,N.Header=nr,N.Hero=xs,N.Input=Rt,N.LoadingSpinner=ir,N.PageLayout=Ns,N.Radio=rr,N.ResponsiveNav=Fs,N.ResponsiveSection=rt,N.Select=tr,N.Stack=ws,N.StyleLoader=Vs,N.Textarea=er,N.ThemeProvider=Vr,N.parseBreakpoint=ge,N.useFormContext=Jt,N.useTheme=T,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})}));
package/dist/index.d.ts CHANGED
@@ -22,8 +22,10 @@ export { default as FeatureCard } from './components/FeatureCard';
22
22
  export { default as FeatureGridSection } from './components/FeatureGridSection';
23
23
  export { default as PageLayout } from './components/PageLayout';
24
24
  export { ThemeProvider, useTheme } from './theme';
25
- export type { Theme, ThemeColors, ThemeFonts, ThemeButtons, ThemeBorder, ThemeBreakpoints, ThemeLayout, ThemeProviderProps, DeepPartial, } from './theme';
26
- export type { TypographyProps, ColorProps, BorderProps, LayoutProps, BreakpointProps, StateProps, HoverProps, BaseComponentProps, FormElementProps, TextInputProps, LayoutComponentStyleProps, ElementSpecificProps, SizeVariant, ColorVariant, } from './utils/componentProps';
25
+ export { parseBreakpoint } from './utils';
26
+ export type { Theme, ThemeColors, ThemeFonts, ThemeButtons, ThemeBorder, ThemeBreakpoints, ThemeLayout, ThemeProviderProps, } from './theme';
27
+ export type { DeepPartial } from './types/utils';
28
+ export type { TypographyProps, ColorProps, BorderProps, LayoutProps, BreakpointProps, StateProps, HoverProps, BaseComponentProps, FormElementProps, TextInputProps, LayoutComponentStyleProps, ElementSpecificProps, SizeVariant, ColorVariant, } from './types/component-props.d.ts';
27
29
  export type { ButtonProps } from './components/Button';
28
30
  export type { CheckboxProps } from './components/Checkbox';
29
31
  export type { FormProps, FormFieldProps, FormInputProps, FormTextareaProps, FormSelectProps, FormCheckboxProps, FormRadioProps, } from './components/Form';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,OAAO,IAAI,IAAI,EACf,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,SAAS,EACT,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGlD,YAAY,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,WAAW,GACZ,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,eAAe,EACf,UAAU,EACV,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,oBAAoB,EACpB,WAAW,EACX,YAAY,GACb,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EACV,SAAS,EACT,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,OAAO,IAAI,IAAI,EACf,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,SAAS,EACT,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG1C,YAAY,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,kBAAkB,GACnB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD,YAAY,EACV,eAAe,EACf,UAAU,EACV,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,oBAAoB,EACpB,WAAW,EACX,YAAY,GACb,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EACV,SAAS,EACT,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { RenderOptions } from '@testing-library/react';
3
- import { DeepPartial, Theme } from './theme';
3
+ import { Theme } from './theme';
4
+ import { DeepPartial } from './types/utils';
4
5
  interface RenderWithThemeOptions extends Omit<RenderOptions, 'wrapper'> {
5
6
  theme?: DeepPartial<Theme>;
6
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../src/test-utils.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAU,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAiB,WAAW,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA4D5D,UAAU,sBAAuB,SAAQ,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC;IACrE,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,YAAY,EAChB,EAAE,KAAU,EAAE,GAAG,aAAa,EAAE,GAAE,sBAA2B,gIAuD9D;AAGD,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["../src/test-utils.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAU,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAiB,KAAK,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,UAAU,sBAAuB,SAAQ,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC;IACrE,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAC5B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,YAAY,EAChB,EAAE,KAAU,EAAE,GAAG,aAAa,EAAE,GAAE,sBAA2B,gIAO9D;AAGD,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,6BAA6B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { default as React, ReactNode } from 'react';
2
+ import { DeepPartial } from '../types/utils';
2
3
  export interface ThemeColors {
3
4
  primary: string;
4
5
  secondary: string;
@@ -64,13 +65,7 @@ export interface Theme {
64
65
  breakpoints: ThemeBreakpoints;
65
66
  layout: ThemeLayout;
66
67
  }
67
- /**
68
- * Helper type to make all properties of an object (and nested objects) optional
69
- * Used for partial theme overrides
70
- */
71
- export type DeepPartial<T> = {
72
- [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
73
- };
68
+ export declare const defaultTheme: Theme;
74
69
  declare const ThemeContext: React.Context<Theme>;
75
70
  export interface ThemeProviderProps {
76
71
  theme?: DeepPartial<Theme>;
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpE,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,MAAM,EAAE,WAAW,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChE,CAAC;AA+DF,QAAA,MAAM,YAAY,sBAAqC,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB;AA+BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAGtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,QAAO,KAE3B,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeContext.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,WAAW;IAC1B,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QACL,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,KAAK;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,MAAM,EAAE,WAAW,CAAC;CACrB;AAWD,eAAO,MAAM,YAAY,EAAE,KAkD1B,CAAC;AAEF,QAAA,MAAM,YAAY,sBAAqC,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAGtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,QAAO,KAE3B,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,4 +1,4 @@
1
- export { ThemeProvider, useTheme } from './ThemeContext';
1
+ export { ThemeProvider, useTheme, defaultTheme } from './ThemeContext';
2
2
  export { default as ThemeContext } from './ThemeContext';
3
- export type { Theme, ThemeColors, ThemeFonts, ThemeButtons, ThemeBorder, ThemeBreakpoints, ThemeLayout, ThemeProviderProps, DeepPartial, } from './ThemeContext';
3
+ export type { Theme, ThemeColors, ThemeFonts, ThemeButtons, ThemeBorder, ThemeBreakpoints, ThemeLayout, ThemeProviderProps, } from './ThemeContext';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,YAAY,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,WAAW,GACZ,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,YAAY,EACV,KAAK,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,kBAAkB,GACnB,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Helper type to make nested properties optional (for theme overrides)
3
+ */
4
+ export type DeepPartial<T> = {
5
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
6
+ };
7
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAChE,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { DeepPartial } from './types/utils.ts';
2
+ /**
3
+ * Deep merge utility function to merge partial theme with default theme
4
+ */
5
+ export declare function deepMerge<T extends Record<string, any>>(target: T, source: DeepPartial<T>): T;
6
+ export declare function isObject(item: any): item is Record<string, any>;
7
+ /**
8
+ * Parses a breakpoint string and calculates the max-width value for media queries.
9
+ * Subtracts 1 from the breakpoint value because CSS media queries use inclusive ranges,
10
+ * so max-width: 768px means "768px and below", which complements min-width: 769px.
11
+ *
12
+ * @param breakpoint - Breakpoint string (e.g., "769px", "48em", "1024px")
13
+ * @returns Object with maxWidth number and unit string
14
+ *
15
+ * @example
16
+ * parseBreakpoint("769px") // { maxWidth: 768, unit: "px" }
17
+ * parseBreakpoint("48em") // { maxWidth: 47, unit: "em" }
18
+ */
19
+ export declare function parseBreakpoint(breakpoint: string): {
20
+ maxWidth: number;
21
+ unit: string;
22
+ };
23
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAoB7F;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAE/D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAqBtF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "digital-rabbit-cl",
3
- "version": "1.2.8",
3
+ "version": "1.3.1",
4
4
  "dependencies": {
5
5
  "@hookform/resolvers": "^5.2.2",
6
6
  "react-hook-form": "^7.66.0",