digital-rabbit-cl 1.3.12 → 1.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ResponsiveNav/ResponsiveNav.d.ts +1 -1
- package/dist/components/ResponsiveNav/ResponsiveNav.d.ts.map +1 -1
- package/dist/components/ResponsiveNav/useResponsiveNavStyles.d.ts.map +1 -1
- package/dist/digital-rabbit-cl.es.js +432 -430
- package/dist/digital-rabbit-cl.umd.js +3 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
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:relative;width:2em;z-index:11}.Hamburger-module__line___gybZM{background:currentColor;border-radius:var(--hamburger-border-radius, 10px);height:12.5%;position:relative;transform-origin:1px;transition:all .3s linear;width:100%}.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);position:relative}.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{flex-direction:column;font-size:2rem;height:100vh;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%);overflow-y:auto;overflow-x:hidden;padding-top:3.5em}.ResponsiveNav-module__navHeader___Me8bB{position:fixed;top:0;left:0;right:0;height:3.5em;background:inherit;z-index:11}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE{padding-top:3em}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE .ResponsiveNav-module__navHeader___Me8bB{height:3em}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__open___WDCAf{transform:translate(0)}.ResponsiveNav-module__navMobile___h795P>a{padding:.35em 2em;text-align:center;width:100%}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE>a{padding:.25em 1.5em}.ResponsiveNav-module__navMobile___h795P>a.active{background:var(--mobile-active-bg);color:var(--mobile-active-color)}.ResponsiveNav-module__navMobile___h795P>button{align-self:center;margin:.5em 1.4em}.ResponsiveNav-module__navMobile___h795P.ResponsiveNav-module__compact___UhuAE>button{margin:.35em 1em}.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:var(--desktop-hover-opacity)}.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,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],_):(N=typeof globalThis<"u"?globalThis:N||self,_(N.DigitalRabbitCL={},N.jsxRuntime,N.React))})(this,(function(N,_,C){"use strict";const we={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeLarge:"Button-module__sizeLarge___yeZSH"},Fr=({isActive:e,disabled:r,backgroundColor:t,color:s,hoverBackgroundColor:o,hoverTextColor:n,outline:a,theme:l})=>{const d=t||l.colors.primary;let f;a?f=s||d:s?f=s:f=t?l.buttons.textColor:l.buttons.primary.textColor;let y,h,m;a?(y="transparent",h=f,m=f,e&&(y=o||f,h=o||f,m=n||l.buttons.textColor)):(y=d,h=d,m=f,e&&(y=o||d,h=o||d,m=n||f));let w=1;return r?w=.3:e&&(w=o?1:.75),{backgroundColor:y,borderColor:h,color:m,opacity:w}};function dt(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]=dt(n,o):o!==void 0&&(t[s]=o)}),t}function Ve(e){return e&&typeof e=="object"&&!Array.isArray(e)}function _e(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 ft={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},He={colors:ft,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:ft.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"}},yt=C.createContext(He),Cr=({theme:e,children:r})=>{const t=e?dt(He,e):He;return _.jsx(yt.Provider,{value:t,children:r})},O=()=>C.useContext(yt),wr=({backgroundColor:e,color:r,hoverBackgroundColor:t,hoverTextColor:s,disabled:o=!1,size:n="large",outline:a=!1,type:l="button",className:d,style:f,buttonProps:y={},onClick:h,children:m})=>{const w=O(),[V,g]=C.useState(!1),k={...Fr({isActive:V,disabled:o,backgroundColor:e,color:r,hoverBackgroundColor:t,hoverTextColor:s,outline:a,theme:w}),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})`,...f},S=[we.button,n==="small"?we.sizeSmall:we.sizeLarge,a?we.outline:"",d].filter(Boolean).join(" ");return _.jsx("button",{...y,className:S,disabled:o,onClick:h,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),type:l,style:k,children:m})};var ht=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Vr=new Uint8Array(16);function kr(){if(!ht)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ht(Vr)}for(var mt=[],ke=0;ke<256;++ke)mt[ke]=(ke+256).toString(16).substr(1);function xr(e,r){var t=0,s=mt;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 gt(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||kr)();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||xr(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}},_t={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:a,labelProps:l})=>{const d=O(),f=d.colors.error,y=t?f:e||d.colors.primary,h=$r({color:y,disabled:r,fontSize:".85em"}),m={"--form-label-padding-bottom":`calc(${d.fonts.rhythm} * 0.17)`,color:h.color,fontSize:h.fontSize,opacity:h.opacity,cursor:h.cursor,...a},w=[_t.label,r?_t.disabled:"",n].filter(Boolean).join(" ");return _.jsx("label",{...l,className:w,htmlFor:s,style:m,children:o})},ze=({color:e,checkmarkColor:r,checked:t=!1,inverted:s=!1,disabled:o=!1,error:n=!1,name:a,id:l,onChange:d,label:f,labelStyle:y,className:h,style:m,divProps:w})=>{const V=O(),g=l||gt(),z=V.colors.error,k=n?z:e||V.colors.primary,S=zr({color:k,checkmarkColor:r,disabled:o,inverted:s}),E=q=>{o||d(q)},$={cursor:S.cursor,fontSize:V.fonts.size,opacity:S.opacity,...m},A={width:"1em"},M={fill:s&&t?S.checkboxColor:"transparent",strokeWidth:"25",stroke:S.checkboxColor},W={stroke:S.checkmarkColor,strokeWidth:"15",fill:"transparent"},oe=[Oe.container,h].filter(Boolean).join(" ");return _.jsxs("div",{...w,className:oe,style:$,children:[_.jsx("input",{id:g,checked:t,disabled:o,onChange:q=>E({target:{checked:q.target.checked,name:a,type:"checkbox"}}),name:a,style:{display:"none"},type:"checkbox"}),_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>E({target:{checked:!t,name:a,type:"checkbox"}}),style:A,className:Oe.svg,children:[_.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:M}),t&&_.jsx("path",{d:"M 25 45 L 45 65 L 75 30",style:W})]}),f&&_.jsx(xe,{htmlFor:g,className:Oe.label,style:{paddingBottom:0,...y},color:S.checkboxColor,disabled:o,error:n,children:f})]})},Er=()=>{const e=O();return C.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 ve=e=>e.type==="checkbox",de=e=>e instanceof Date,K=e=>e==null;const vt=e=>typeof e=="object";var j=e=>!K(e)&&!Array.isArray(e)&&vt(e)&&!de(e),pt=e=>j(e)&&e.target?ve(e.target)?e.target.checked:e.target.value:e,Ar=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,bt=(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 G(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]=G(e[o]));else return e;return r}var $e=e=>/^\w*$/.test(e),T=e=>e===void 0,Me=e=>Array.isArray(e)?e.filter(Boolean):[],Ie=e=>Me(e.replace(/["|']|\]/g,"").split(/\.|\[/)),b=(e,r,t)=>{if(!r||!j(e))return t;const s=($e(r)?[r]:Ie(r)).reduce((o,n)=>K(o)?o:o[n],e);return T(s)||s===e?T(e[r])?t:e[r]:s},Y=e=>typeof e=="boolean",P=(e,r,t)=>{let s=-1;const o=$e(r)?[r]:Ie(r),n=o.length,a=n-1;for(;++s<n;){const l=o[s];let d=t;if(s!==a){const f=e[l];d=j(f)||Array.isArray(f)?f:isNaN(+o[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const Ee={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},te={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ie={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},St=C.createContext(null);St.displayName="HookFormContext";const je=()=>C.useContext(St);var Ft=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const a=n;return r._proxyFormState[a]!==te.all&&(r._proxyFormState[a]=!s||te.all),t&&(t[a]=!0),e[a]}});return o};const Ue=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Dr(e){const r=je(),{control:t=r.control,disabled:s,name:o,exact:n}=e||{},[a,l]=C.useState(t._formState),d=C.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ue(()=>t._subscribe({name:o,formState:d.current,exact:n,callback:f=>{!s&&l({...t._formState,...f})}}),[o,s,n]),C.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),C.useMemo(()=>Ft(a,t,d.current,!1),[a,t])}var X=e=>typeof e=="string",We=(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),Ge=e=>K(e)||!vt(e);function re(e,r,t=new WeakSet){if(Ge(e)||Ge(r))return e===r;if(de(e)&&de(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 a=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const l=r[n];if(de(a)&&de(l)||j(a)&&j(l)||Array.isArray(a)&&Array.isArray(l)?!re(a,l,t):a!==l)return!1}}return!0}function Lr(e){const r=je(),{control:t=r.control,name:s,defaultValue:o,disabled:n,exact:a,compute:l}=e||{},d=C.useRef(o),f=C.useRef(l),y=C.useRef(void 0),h=C.useRef(t),m=C.useRef(s);f.current=l;const[w,V]=C.useState(()=>{const $=t._getWatch(s,d.current);return f.current?f.current($):$}),g=C.useCallback($=>{const A=We(s,t._names,$||t._formValues,!1,d.current);return f.current?f.current(A):A},[t._formValues,t._names,s]),z=C.useCallback($=>{if(!n){const A=We(s,t._names,$||t._formValues,!1,d.current);if(f.current){const M=f.current(A);re(M,y.current)||(V(M),y.current=M)}else V(A)}},[t._formValues,t._names,n,s]);Ue(()=>((h.current!==t||!re(m.current,s))&&(h.current=t,m.current=s,z()),t._subscribe({name:s,formState:{values:!0},exact:a,callback:$=>{z($.values)}})),[t,a,s,z]),C.useEffect(()=>t._removeUnmounted());const k=h.current!==t,S=m.current,E=C.useMemo(()=>{if(n)return null;const $=!k&&!re(S,s);return k||$?g():null},[n,k,s,S,g]);return E!==null?E:w}function Pr(e){const r=je(),{name:t,disabled:s,control:o=r.control,shouldUnregister:n,defaultValue:a}=e,l=bt(o._names.array,t),d=C.useMemo(()=>b(o._formValues,t,b(o._defaultValues,t,a)),[o,t,a]),f=Lr({control:o,name:t,defaultValue:d,exact:!0}),y=Dr({control:o,name:t,exact:!0}),h=C.useRef(e),m=C.useRef(void 0),w=C.useRef(o.register(t,{...e.rules,value:f,...Y(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const V=C.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]),g=C.useCallback(E=>w.current.onChange({target:{value:pt(E),name:t},type:Ee.CHANGE}),[t]),z=C.useCallback(()=>w.current.onBlur({target:{value:b(o._formValues,t),name:t},type:Ee.BLUR}),[t,o._formValues]),k=C.useCallback(E=>{const $=b(o._fields,t);$&&E&&($._f.ref={focus:()=>E.focus&&E.focus(),select:()=>E.select&&E.select(),setCustomValidity:A=>E.setCustomValidity(A),reportValidity:()=>E.reportValidity()})},[o._fields,t]),S=C.useMemo(()=>({name:t,value:f,...Y(s)||y.disabled?{disabled:y.disabled||s}:{},onChange:g,onBlur:z,ref:k}),[t,s,y.disabled,g,z,k,f]);return C.useEffect(()=>{const E=o._options.shouldUnregister||n,$=m.current;$&&$!==t&&!l&&o.unregister($),o.register(t,{...h.current.rules,...Y(h.current.disabled)?{disabled:h.current.disabled}:{}});const A=(M,W)=>{const oe=b(o._fields,M);oe&&oe._f&&(oe._f.mount=W)};if(A(t,!0),E){const M=G(b(o._options.defaultValues,t,h.current.defaultValue));P(o._defaultValues,t,M),T(b(o._formValues,t))&&P(o._formValues,t,M)}return!l&&o.register(t),m.current=t,()=>{(l?E&&!o._state.action:E)?o.unregister(t):A(t,!1)}},[t,o,l,n]),C.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),C.useMemo(()=>({field:S,formState:y,fieldState:V}),[S,y,V])}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],Ct=()=>{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 wt(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 a=wt(o,n);j(a)&&(t[s]=a)}else e[s]&&(t[s]=n)}return t}var Z=e=>j(e)&&!Object.keys(e).length,Ze=e=>e.type==="file",se=e=>typeof e=="function",Ae=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",Qe=e=>e.type==="radio",Br=e=>Qe(e)||ve(e),Ke=e=>Ae(e)&&e.isConnected;function Hr(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=T(e)?s++:e[r[s++]];return e}function Or(e){for(const r in e)if(e.hasOwnProperty(r)&&!T(e[r]))return!1;return!0}function U(e,r){const t=Array.isArray(r)?r:$e(r)?[r]:Ie(r),s=t.length===1?e:Hr(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(j(s)&&Z(s)||Array.isArray(s)&&Or(s))&&U(e,t.slice(0,-1)),e}var Tr=e=>{for(const r in e)if(se(e[r]))return!0;return!1};function kt(e){return Array.isArray(e)||j(e)&&!Tr(e)}function Je(e,r={}){for(const t in e)kt(e[t])?(r[t]=Array.isArray(e[t])?[]:{},Je(e[t],r[t])):T(e[t])||(r[t]=!0);return r}function fe(e,r,t){t||(t=Je(r));for(const s in e)kt(e[s])?T(r)||Ge(t[s])?t[s]=Je(e[s],Array.isArray(e[s])?[]:{}):fe(e[s],K(r)?{}:r[s],t[s]):t[s]=!re(e[s],r[s]);return t}const xt={value:!1,isValid:!1},zt={value:!0,isValid:!0};var $t=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&&!T(e[0].attributes.value)?T(e[0].value)||e[0].value===""?zt:{value:e[0].value,isValid:!0}:zt:xt}return xt},Et=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>T(e)?e:r?e===""?NaN:e&&+e:t&&X(e)?new Date(e):s?s(e):e;const At={isValid:!1,value:null};var Nt=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,At):At;function Dt(e){const r=e.ref;return Ze(r)?r.files:Qe(r)?Nt(e.refs).value:Vt(r)?[...r.selectedOptions].map(({value:t})=>t):ve(r)?$t(e.refs).value:Et(T(r.value)?e.ref.value:r.value,e)}var Mr=(e,r,t,s)=>{const o={};for(const n of e){const a=b(r,n);a&&P(o,n,a._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},Ne=e=>e instanceof RegExp,be=e=>T(e)?e:Ne(e)?e.source:j(e)?Ne(e.value)?e.value.source:e.value:e,Lt=e=>({isOnSubmit:!e||e===te.onSubmit,isOnBlur:e===te.onBlur,isOnChange:e===te.onChange,isOnAll:e===te.all,isOnTouch:e===te.onTouched});const Pt="AsyncFunction";var Ir=e=>!!e&&!!e.validate&&!!(se(e.validate)&&e.validate.constructor.name===Pt||j(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===Pt)),jr=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Bt=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const Se=(e,r,t,s)=>{for(const o of t||Object.keys(e)){const n=b(e,o);if(n){const{_f:a,...l}=n;if(a){if(a.refs&&a.refs[0]&&r(a.refs[0],o)&&!s)return!0;if(a.ref&&r(a.ref,a.name)&&!s)return!0;if(Se(l,r))break}else if(j(l)&&Se(l,r))break}}};function Ht(e,r,t){const s=b(e,t);if(s||$e(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),a=b(r,n),l=b(e,n);if(a&&!Array.isArray(a)&&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(a=>r[a]===(!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))),Gr=(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,qr=(e,r)=>!Me(b(e,r)).length&&U(e,r),Zr=(e,r,t)=>{const s=pe(b(e,t));return P(s,"root",r[t]),P(e,t,s),e};function Ot(e,r,t="validate"){if(X(e)||Array.isArray(e)&&e.every(X)||Y(e)&&!e)return{type:t,message:X(e)?e:"",ref:r}}var ye=e=>j(e)&&!Ne(e)?e:{value:e,message:""},Tt=async(e,r,t,s,o,n)=>{const{ref:a,refs:l,required:d,maxLength:f,minLength:y,min:h,max:m,pattern:w,validate:V,name:g,valueAsNumber:z,mount:k}=e._f,S=b(t,g);if(!k||r.has(g))return{};const E=l?l[0]:a,$=D=>{o&&E.reportValidity&&(E.setCustomValidity(Y(D)?"":D||""),E.reportValidity())},A={},M=Qe(a),W=ve(a),oe=M||W,q=(z||Ze(a))&&T(a.value)&&T(S)||Ae(a)&&a.value===""||S===""||Array.isArray(S)&&!S.length,le=qe.bind(null,g,s,A),R=(D,L,I,Q=ie.maxLength,J=ie.minLength)=>{const ae=D?L:I;A[g]={type:D?Q:J,message:ae,ref:a,...le(D?Q:J,ae)}};if(n?!Array.isArray(S)||!S.length:d&&(!oe&&(q||K(S))||Y(S)&&!S||W&&!$t(l).isValid||M&&!Nt(l).isValid)){const{value:D,message:L}=X(d)?{value:!!d,message:d}:ye(d);if(D&&(A[g]={type:ie.required,message:L,ref:E,...le(ie.required,L)},!s))return $(L),A}if(!q&&(!K(h)||!K(m))){let D,L;const I=ye(m),Q=ye(h);if(!K(S)&&!isNaN(S)){const J=a.valueAsNumber||S&&+S;K(I.value)||(D=J>I.value),K(Q.value)||(L=J<Q.value)}else{const J=a.valueAsDate||new Date(S),ae=Pe=>new Date(new Date().toDateString()+" "+Pe),Ce=a.type=="time",ge=a.type=="week";X(I.value)&&S&&(D=Ce?ae(S)>ae(I.value):ge?S>I.value:J>new Date(I.value)),X(Q.value)&&S&&(L=Ce?ae(S)<ae(Q.value):ge?S<Q.value:J<new Date(Q.value))}if((D||L)&&(R(!!D,I.message,Q.message,ie.max,ie.min),!s))return $(A[g].message),A}if((f||y)&&!q&&(X(S)||n&&Array.isArray(S))){const D=ye(f),L=ye(y),I=!K(D.value)&&S.length>+D.value,Q=!K(L.value)&&S.length<+L.value;if((I||Q)&&(R(I,D.message,L.message),!s))return $(A[g].message),A}if(w&&!q&&X(S)){const{value:D,message:L}=ye(w);if(Ne(D)&&!S.match(D)&&(A[g]={type:ie.pattern,message:L,ref:a,...le(ie.pattern,L)},!s))return $(L),A}if(V){if(se(V)){const D=await V(S,t),L=Ot(D,E);if(L&&(A[g]={...L,...le(ie.validate,L.message)},!s))return $(L.message),A}else if(j(V)){let D={};for(const L in V){if(!Z(D)&&!s)break;const I=Ot(await V[L](S,t),E,L);I&&(D={...I,...le(L,I.message)},$(I.message),s&&(A[g]=D))}if(!Z(D)&&(A[g]={ref:E,...D},!s))return A}}return $(!0),A};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)?G(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:G(o),a={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 h={...y};const m={array:Ct(),state:Ct()},w=r.criteriaMode===te.all,V=i=>c=>{clearTimeout(f),f=setTimeout(i,c)},g=async i=>{if(!r.disabled&&(y.isValid||h.isValid||i)){const c=r.resolver?Z((await W()).errors):await q(s,!0);c!==t.isValid&&m.state.next({isValid:c})}},z=(i,c)=>{!r.disabled&&(y.isValidating||y.validatingFields||h.isValidating||h.validatingFields)&&((i||Array.from(l.mount)).forEach(u=>{u&&(c?P(t.validatingFields,u,c):U(t.validatingFields,u))}),m.state.next({validatingFields:t.validatingFields,isValidating:!Z(t.validatingFields)}))},k=(i,c=[],u,F,p=!0,v=!0)=>{if(F&&u&&!r.disabled){if(a.action=!0,v&&Array.isArray(b(s,i))){const x=u(b(s,i),F.argA,F.argB);p&&P(s,i,x)}if(v&&Array.isArray(b(t.errors,i))){const x=u(b(t.errors,i),F.argA,F.argB);p&&P(t.errors,i,x),qr(t.errors,i)}if((y.touchedFields||h.touchedFields)&&v&&Array.isArray(b(t.touchedFields,i))){const x=u(b(t.touchedFields,i),F.argA,F.argB);p&&P(t.touchedFields,i,x)}(y.dirtyFields||h.dirtyFields)&&(t.dirtyFields=fe(o,n)),m.state.next({name:i,isDirty:R(i,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else P(n,i,c)},S=(i,c)=>{P(t.errors,i,c),m.state.next({errors:t.errors})},E=i=>{t.errors=i,m.state.next({errors:t.errors,isValid:!1})},$=(i,c,u,F)=>{const p=b(s,i);if(p){const v=b(n,i,T(u)?b(o,i):u);T(v)||F&&F.defaultChecked||c?P(n,i,c?v:Dt(p._f)):I(i,v),a.mount&&g()}},A=(i,c,u,F,p)=>{let v=!1,x=!1;const B={name:i};if(!r.disabled){if(!u||F){(y.isDirty||h.isDirty)&&(x=t.isDirty,t.isDirty=B.isDirty=R(),v=x!==B.isDirty);const H=re(b(o,i),c);x=!!b(t.dirtyFields,i),H?U(t.dirtyFields,i):P(t.dirtyFields,i,!0),B.dirtyFields=t.dirtyFields,v=v||(y.dirtyFields||h.dirtyFields)&&x!==!H}if(u){const H=b(t.touchedFields,i);H||(P(t.touchedFields,i,u),B.touchedFields=t.touchedFields,v=v||(y.touchedFields||h.touchedFields)&&H!==u)}v&&p&&m.state.next(B)}return v?B:{}},M=(i,c,u,F)=>{const p=b(t.errors,i),v=(y.isValid||h.isValid)&&Y(c)&&t.isValid!==c;if(r.delayError&&u?(d=V(()=>S(i,u)),d(r.delayError)):(clearTimeout(f),d=null,u?P(t.errors,i,u):U(t.errors,i)),(u?!re(p,u):p)||!Z(F)||v){const x={...F,...v&&Y(c)?{isValid:c}:{},errors:t.errors,name:i};t={...t,...x},m.state.next(x)}},W=async i=>{z(i,!0);const c=await r.resolver(n,r.context,Mr(i||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return z(i),c},oe=async i=>{const{errors:c}=await W(i);if(i)for(const u of i){const F=b(c,u);F?P(t.errors,u,F):U(t.errors,u)}else t.errors=c;return c},q=async(i,c,u={valid:!0})=>{for(const F in i){const p=i[F];if(p){const{_f:v,...x}=p;if(v){const B=l.array.has(v.name),H=p._f&&Ir(p._f);H&&y.validatingFields&&z([v.name],!0);const ee=await Tt(p,l.disabled,n,w,r.shouldUseNativeValidation&&!c,B);if(H&&y.validatingFields&&z([v.name]),ee[v.name]&&(u.valid=!1,c))break;!c&&(b(ee,v.name)?B?Zr(t.errors,ee,v.name):P(t.errors,v.name,ee[v.name]):U(t.errors,v.name))}!Z(x)&&await q(x,c,u)}}return u.valid},le=()=>{for(const i of l.unMount){const c=b(s,i);c&&(c._f.refs?c._f.refs.every(u=>!Ke(u)):!Ke(c._f.ref))&&at(i)}l.unMount=new Set},R=(i,c)=>!r.disabled&&(i&&c&&P(n,i,c),!re(Pe(),o)),D=(i,c,u)=>We(i,l,{...a.mount?n:T(c)?o:X(i)?{[i]:c}:c},u,c),L=i=>Me(b(a.mount?n:o,i,r.shouldUnregister?b(o,i,[]):[])),I=(i,c,u={})=>{const F=b(s,i);let p=c;if(F){const v=F._f;v&&(!v.disabled&&P(n,i,Et(c,v)),p=Ae(v.ref)&&K(c)?"":c,Vt(v.ref)?[...v.ref.options].forEach(x=>x.selected=p.includes(x.value)):v.refs?ve(v.ref)?v.refs.forEach(x=>{(!x.defaultChecked||!x.disabled)&&(Array.isArray(p)?x.checked=!!p.find(B=>B===x.value):x.checked=p===x.value||!!p)}):v.refs.forEach(x=>x.checked=x.value===p):Ze(v.ref)?v.ref.value="":(v.ref.value=p,v.ref.type||m.state.next({name:i,values:G(n)})))}(u.shouldDirty||u.shouldTouch)&&A(i,p,u.shouldTouch,u.shouldDirty,!0),u.shouldValidate&&ge(i)},Q=(i,c,u)=>{for(const F in c){if(!c.hasOwnProperty(F))return;const p=c[F],v=i+"."+F,x=b(s,v);(l.array.has(i)||j(p)||x&&!x._f)&&!de(p)?Q(v,p,u):I(v,p,u)}},J=(i,c,u={})=>{const F=b(s,i),p=l.array.has(i),v=G(c);P(n,i,v),p?(m.array.next({name:i,values:G(n)}),(y.isDirty||y.dirtyFields||h.isDirty||h.dirtyFields)&&u.shouldDirty&&m.state.next({name:i,dirtyFields:fe(o,n),isDirty:R(i,v)})):F&&!F._f&&!K(v)?Q(i,v,u):I(i,v,u),Bt(i,l)&&m.state.next({...t,name:i}),m.state.next({name:a.mount?i:void 0,values:G(n)})},ae=async i=>{a.mount=!0;const c=i.target;let u=c.name,F=!0;const p=b(s,u),v=H=>{F=Number.isNaN(H)||de(H)&&isNaN(H.getTime())||re(H,b(n,u,H))},x=Lt(r.mode),B=Lt(r.reValidateMode);if(p){let H,ee;const Be=c.type?Dt(p._f):pt(i),ue=i.type===Ee.BLUR||i.type===Ee.FOCUS_OUT,js=!jr(p._f)&&!r.resolver&&!b(t.errors,u)&&!p._f.deps||Gr(ue,b(t.touchedFields,u),t.isSubmitted,B,x),ct=Bt(u,l,ue);P(n,u,Be),ue?(!c||!c.readOnly)&&(p._f.onBlur&&p._f.onBlur(i),d&&d(0)):p._f.onChange&&p._f.onChange(i);const ut=A(u,Be,ue),Us=!Z(ut)||ct;if(!ue&&m.state.next({name:u,type:i.type,values:G(n)}),js)return(y.isValid||h.isValid)&&(r.mode==="onBlur"?ue&&g():ue||g()),Us&&m.state.next({name:u,...ct?{}:ut});if(!ue&&ct&&m.state.next({...t}),r.resolver){const{errors:br}=await W([u]);if(v(Be),F){const Ws=Ht(t.errors,s,u),Sr=Ht(br,s,Ws.name||u);H=Sr.error,u=Sr.name,ee=Z(br)}}else z([u],!0),H=(await Tt(p,l.disabled,n,w,r.shouldUseNativeValidation))[u],z([u]),v(Be),F&&(H?ee=!1:(y.isValid||h.isValid)&&(ee=await q(s,!0)));F&&(p._f.deps&&(!Array.isArray(p._f.deps)||p._f.deps.length>0)&&ge(p._f.deps),M(u,ee,H,ut))}},Ce=(i,c)=>{if(b(t.errors,c)&&i.focus)return i.focus(),1},ge=async(i,c={})=>{let u,F;const p=pe(i);if(r.resolver){const v=await oe(T(i)?i:p);u=Z(v),F=i?!p.some(x=>b(v,x)):u}else i?(F=(await Promise.all(p.map(async v=>{const x=b(s,v);return await q(x&&x._f?{[v]:x}:x)}))).every(Boolean),!(!F&&!t.isValid)&&g()):F=u=await q(s);return m.state.next({...!X(i)||(y.isValid||h.isValid)&&u!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:u}:{},errors:t.errors}),c.shouldFocus&&!F&&Se(s,Ce,i?p:l.mount),F},Pe=(i,c)=>{let u={...a.mount?n:o};return c&&(u=wt(c.dirtyFields?t.dirtyFields:t.touchedFields,u)),T(i)?u:X(i)?b(u,i):i.map(F=>b(u,F))},fr=(i,c)=>({invalid:!!b((c||t).errors,i),isDirty:!!b((c||t).dirtyFields,i),error:b((c||t).errors,i),isValidating:!!b(t.validatingFields,i),isTouched:!!b((c||t).touchedFields,i)}),Ps=i=>{i&&pe(i).forEach(c=>U(t.errors,c)),m.state.next({errors:i?t.errors:{}})},yr=(i,c,u)=>{const F=(b(s,i,{_f:{}})._f||{}).ref,p=b(t.errors,i)||{},{ref:v,message:x,type:B,...H}=p;P(t.errors,i,{...H,...c,ref:F}),m.state.next({name:i,errors:t.errors,isValid:!1}),u&&u.shouldFocus&&F&&F.focus&&F.focus()},Bs=(i,c)=>se(i)?m.state.subscribe({next:u=>"values"in u&&i(D(void 0,c),u)}):D(i,c,!0),hr=i=>m.state.subscribe({next:c=>{Wr(i.name,c.name,i.exact)&&Ur(c,i.formState||y,Is,i.reRenderRoot)&&i.callback({values:{...n},...t,...c,defaultValues:o})}}).unsubscribe,Hs=i=>(a.mount=!0,h={...h,...i.formState},hr({...i,formState:h})),at=(i,c={})=>{for(const u of i?pe(i):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);m.state.next({values:G(n)}),m.state.next({...t,...c.keepDirty?{isDirty:R()}:{}}),!c.keepIsValid&&g()},mr=({disabled:i,name:c})=>{(Y(i)&&a.mount||i||l.disabled.has(c))&&(i?l.disabled.add(c):l.disabled.delete(c))},it=(i,c={})=>{let u=b(s,i);const F=Y(c.disabled)||Y(r.disabled);return P(s,i,{...u||{},_f:{...u&&u._f?u._f:{ref:{name:i}},name:i,mount:!0,...c}}),l.mount.add(i),u?mr({disabled:Y(c.disabled)?c.disabled:r.disabled,name:i}):$(i,!0,c.value),{...F?{disabled:c.disabled||r.disabled}:{},...r.progressive?{required:!!c.required,min:be(c.min),max:be(c.max),minLength:be(c.minLength),maxLength:be(c.maxLength),pattern:be(c.pattern)}:{},name:i,onChange:ae,onBlur:ae,ref:p=>{if(p){it(i,c),u=b(s,i);const v=T(p.value)&&p.querySelectorAll&&p.querySelectorAll("input,select,textarea")[0]||p,x=Br(v),B=u._f.refs||[];if(x?B.find(H=>H===v):v===u._f.ref)return;P(s,i,{_f:{...u._f,...x?{refs:[...B.filter(Ke),v,...Array.isArray(b(o,i))?[{}]:[]],ref:{type:v.type,name:i}}:{ref:v}}}),$(i,!1,void 0,v)}else u=b(s,i,{}),u._f&&(u._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(bt(l.array,i)&&a.action)&&l.unMount.add(i)}}},lt=()=>r.shouldFocusError&&Se(s,Ce,l.mount),Os=i=>{Y(i)&&(m.state.next({disabled:i}),Se(s,(c,u)=>{const F=b(s,u);F&&(c.disabled=F._f.disabled||i,Array.isArray(F._f.refs)&&F._f.refs.forEach(p=>{p.disabled=F._f.disabled||i}))},0,!1))},gr=(i,c)=>async u=>{let F;u&&(u.preventDefault&&u.preventDefault(),u.persist&&u.persist());let p=G(n);if(m.state.next({isSubmitting:!0}),r.resolver){const{errors:v,values:x}=await W();t.errors=v,p=G(x)}else await q(s);if(l.disabled.size)for(const v of l.disabled)U(p,v);if(U(t.errors,"root"),Z(t.errors)){m.state.next({errors:{}});try{await i(p,u)}catch(v){F=v}}else c&&await c({...t.errors},u),lt(),setTimeout(lt);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Z(t.errors)&&!F,submitCount:t.submitCount+1,errors:t.errors}),F)throw F},Ts=(i,c={})=>{b(s,i)&&(T(c.defaultValue)?J(i,G(b(o,i))):(J(i,c.defaultValue),P(o,i,G(c.defaultValue))),c.keepTouched||U(t.touchedFields,i),c.keepDirty||(U(t.dirtyFields,i),t.isDirty=c.defaultValue?R(i,G(b(o,i))):R()),c.keepError||(U(t.errors,i),y.isValid&&g()),m.state.next({...t}))},_r=(i,c={})=>{const u=i?G(i):o,F=G(u),p=Z(i),v=p?o:F;if(c.keepDefaultValues||(o=u),!c.keepValues){if(c.keepDirtyValues){const x=new Set([...l.mount,...Object.keys(fe(o,n))]);for(const B of Array.from(x))b(t.dirtyFields,B)?P(v,B,b(n,B)):J(B,b(v,B))}else{if(Te&&T(i))for(const x of l.mount){const B=b(s,x);if(B&&B._f){const H=Array.isArray(B._f.refs)?B._f.refs[0]:B._f.ref;if(Ae(H)){const ee=H.closest("form");if(ee){ee.reset();break}}}}if(c.keepFieldsRef)for(const x of l.mount)J(x,b(v,x));else s={}}n=r.shouldUnregister?c.keepDefaultValues?G(o):{}:G(v),m.array.next({values:{...v}}),m.state.next({values:{...v}})}l={mount:c.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!y.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!Z(v),a.watch=!!r.shouldUnregister,m.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:p?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!re(i,o)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:p?{}:c.keepDirtyValues?c.keepDefaultValues&&n?fe(o,n):t.dirtyFields:c.keepDefaultValues&&i?fe(o,i):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=(i,c)=>_r(se(i)?i(n):i,c),Ms=(i,c={})=>{const u=b(s,i),F=u&&u._f;if(F){const p=F.refs?F.refs[0]:F.ref;p.focus&&(p.focus(),c.shouldSelect&&se(p.select)&&p.select())}},Is=i=>{t={...t,...i}},pr={control:{register:it,unregister:at,getFieldState:fr,handleSubmit:gr,setError:yr,_subscribe:hr,_runSchema:W,_focusError:lt,_getWatch:D,_getDirty:R,_setValid:g,_setFieldArray:k,_setDisabledField:mr,_setErrors:E,_getFieldArray:L,_reset:_r,_resetDefaultValues:()=>se(r.defaultValues)&&r.defaultValues().then(i=>{vr(i,r.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:le,_disableForm:Os,_subjects:m,_proxyFormState:y,get _fields(){return s},get _formValues(){return n},get _state(){return a},set _state(i){a=i},get _defaultValues(){return o},get _names(){return l},set _names(i){l=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:Hs,trigger:ge,register:it,handleSubmit:gr,watch:Bs,setValue:J,getValues:Pe,reset:vr,resetField:Ts,clearErrors:Ps,unregister:at,setError:yr,setFocus:Ms,getFieldState:fr};return{...pr,formControl:pr}}function Jr(e={}){const r=C.useRef(void 0),t=C.useRef(void 0),[s,o]=C.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:a,...l}=Kr(e);r.current={...l,formState:s}}const n=r.current.control;return n._options=e,Ue(()=>{const a=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(l=>({...l,isReady:!0})),n._formState.isReady=!0,a},[n]),C.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),C.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),C.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),C.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),C.useEffect(()=>{if(n._proxyFormState.isDirty){const a=n._getDirty();a!==s.isDirty&&n._subjects.state.next({isDirty:a})}},[n,s.isDirty]),C.useEffect(()=>{e.values&&!re(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,o(a=>({...a}))):n._resetDefaultValues()},[n,e.values]),C.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=Ft(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()}},Ye=(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))}},It=(e,r)=>{r.shouldUseNativeValidation&&Ye(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(Yr(r.names||Object.keys(e),s)){const a=Object.assign({},b(t,s));P(a,"root",n),P(t,s,a)}else P(t,s,n)}return t},Yr=(e,r)=>{const t=jt(r);return e.some(s=>jt(s).match(`^${t}\\.\\d+`))};function jt(e){return e.replace(/\]|\[/g,"")}function Ut(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 a.prototype)y in l||Object.defineProperty(l,y,{value:a.prototype[y].bind(l)});l._zod.constr=a,l._zod.def=d}const o=(t==null?void 0:t.Parent)??Object;class n extends o{}Object.defineProperty(n,"name",{value:e});function a(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(a,"init",{value:s}),Object.defineProperty(a,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(a,"name",{value:e}),a}class Xr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Rr={};function Wt(e){return Rr}function es(e,r){return typeof r=="bigint"?r.toString():r}const Gt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function De(e){return typeof e=="string"?e:e==null?void 0:e.message}function qt(e,r,t){var o,n,a,l,d,f;const s={...e,path:e.path??[]};if(!e.message){const y=De((a=(n=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:n.error)==null?void 0:a.call(n,e))??De((l=r==null?void 0:r.error)==null?void 0:l.call(r,e))??De((d=t.customError)==null?void 0:d.call(t,e))??De((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 Zt=(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=Ut("$ZodError",Zt),Qt=Ut("$ZodError",Zt,{Parent:Error}),rs=(e=>(r,t,s,o)=>{const n=s?Object.assign(s,{async:!1}):{async:!1},a=r._zod.run({value:t,issues:[]},n);if(a instanceof Promise)throw new Xr;if(a.issues.length){const l=new((o==null?void 0:o.Err)??e)(a.issues.map(d=>qt(d,n,Wt())));throw Gt(l,o==null?void 0:o.callee),l}return a.value})(Qt),ss=(e=>async(r,t,s,o)=>{const n=s?Object.assign(s,{async:!0}):{async:!0};let a=r._zod.run({value:t,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){const l=new((o==null?void 0:o.Err)??e)(a.issues.map(d=>qt(d,n,Wt())));throw Gt(l,o==null?void 0:o.callee),l}return a.value})(Qt);function Kt(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,a=s.path.join(".");if(!t[a])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];t[a]={message:l.message,type:l.code}}else t[a]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(y){return y.errors.forEach(function(h){return e.push(h)})}),r){var d=t[a].types,f=d&&d[s.code];t[a]=qe(a,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,a=s.path.join(".");if(!t[a])if(s.code==="invalid_union"&&s.errors.length>0){var l=s.errors[0][0];t[a]={message:l.message,type:l.code}}else t[a]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(y){return y.forEach(function(h){return e.push(h)})}),r){var d=t[a].types,f=d&&d[s.code];t[a]=qe(a,r,t,o,f?[].concat(f,s.message):s.message)}e.shift()}return t}function as(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(Kt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(a){return n.shouldUseNativeValidation&&Ye({},n),{errors:{},values:t.raw?Object.assign({},s):a}})},function(a){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(a))return{values:{},errors:It(os(a.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw a}))}catch(a){return Promise.reject(a)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(Kt(function(){return Promise.resolve((t.mode==="sync"?rs:ss)(e,s,r)).then(function(a){return n.shouldUseNativeValidation&&Ye({},n),{errors:{},values:t.raw?Object.assign({},s):a}})},function(a){if((function(l){return l instanceof ts})(a))return{values:{},errors:It(ns(a.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const Jt=C.createContext(null);function Yt(){const e=C.useContext(Jt);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function is({onSubmit:e,children:r,schema:t,defaultValues:s,mode:o="onSubmit",reValidateMode:n="onChange",className:a,style:l,formProps:d}){const f=Jr({resolver:t?as(t):void 0,defaultValues:s,mode:o,reValidateMode:n}),y=f.handleSubmit(e);return _.jsx(Jt.Provider,{value:f,children:_.jsx("form",{...d,className:a,style:l,onSubmit:y,children:typeof r=="function"?r(f):r})})}const ls=is,cs={formError:"FormError-module__formError___kaUBn"},Xt=({color:e,children:r,className:t,style:s,divProps:o})=>{const n=O(),a={"--form-error-margin-top":`calc(${n.fonts.rhythm} * 0.17)`,color:e||n.colors.error,...s},l=[cs.formError,t].filter(Boolean).join(" ");return _.jsx("div",{...o,className:l,style:a,role:"alert","aria-live":"polite",children:r})},he={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"},Rt=({disabled:e=!1,error:r=!1,required:t=!1,indent:s=!1,name:o,label:n,errorMessage:a,labelProps:l,children:d,className:f,style:y,divProps:h})=>{const m=O(),w=[he.formGroup,r?he.error:"",e?he.disabled:"",f].filter(Boolean).join(" "),V={"--form-group-margin-bottom":`calc(${m.fonts.rhythm} * 0.35)`,...y},g=C.Children.map(d,z=>{if(C.isValidElement(z)){const k={};if(e&&z.props.disabled===void 0&&(k.disabled=!0),r&&z.props.error===void 0&&(k.error=!0),o&&z.props.id===void 0&&(k.id=o),Object.keys(k).length>0)return C.cloneElement(z,k)}return z});return _.jsxs("div",{...h,className:w,style:V,children:[n&&_.jsxs(xe,{htmlFor:o,disabled:e,error:r,...l,children:[n,t&&_.jsxs("span",{className:he.required,"aria-label":"required",children:[" ","*"]})]}),_.jsx("div",{className:`${he.inputWrapper} ${s?he.indented:""}`,children:g}),r&&a&&_.jsx(Xt,{children:a})]})};function ce({name:e,label:r,required:t,children:s,rules:o,disabled:n,className:a,style:l,indent:d,labelProps:f}){const{control:y}=Yt(),{field:h,fieldState:{error:m}}=Pr({name:e,control:y,rules:o});return _.jsx(Rt,{label:r,name:e,error:!!m,errorMessage:m==null?void 0:m.message,disabled:n,required:t,className:a,style:l,indent:d,labelProps:f,children:s({value:h.value,onChange:h.onChange,onBlur:h.onBlur,name:h.name,error:!!m,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}),er=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:a,placeholderOpacity:l=.3,type:d="text",value:f="",onChange:y,onBlur:h,className:m,style:w,inputProps:V})=>{const g=O(),z=g.colors.error,k=r?z:t||g.colors.primary,S=us({color:k,disabled:e,fontSize:g.fonts.size,placeholderOpacity:l}),E={"--placeholder-opacity":S.placeholderOpacity,"--input-padding-small":`calc(${g.fonts.rhythm} * ${g.sizes.small.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,"--input-padding-large":`calc(${g.fonts.rhythm} * ${g.sizes.large.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,borderColor:S.borderColor,borderWidth:g.border.width,borderRadius:g.border.radius,color:S.color,fontSize:S.fontSize,opacity:S.opacity,...w},$=[Xe.input,s==="small"?Xe.sizeSmall:Xe.sizeLarge,m].filter(Boolean).join(" ");return _.jsx("input",{...V,className:$,disabled:e,id:o,name:n,onChange:y,onBlur:h,placeholder:a,type:d,value:f,style:E})};function ds({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,...l}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,children:({value:d,onChange:f,onBlur:y,name:h,error:m})=>_.jsx(er,{...l,name:h,value:d||"",onChange:w=>f(w.target.value),inputProps:{onBlur:y},error:m})})}const Re={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}),tr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:a,placeholderOpacity:l=.3,rows:d=3,value:f="",onChange:y,onBlur:h,className:m,style:w,textareaProps:V})=>{const g=O(),z=g.colors.error,k=r?z:t||g.colors.primary,S=fs({color:k,disabled:e,placeholderOpacity:l}),E={"--placeholder-opacity":S.placeholderOpacity,"--textarea-padding-small":`calc(${g.fonts.rhythm} * ${g.sizes.small.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,"--textarea-padding-large":`calc(${g.fonts.rhythm} * ${g.sizes.large.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,borderColor:S.borderColor,borderWidth:g.border.width,borderRadius:g.border.radius,color:S.color,fontSize:g.fonts.size,opacity:S.opacity,...w},$=[Re.textarea,s==="small"?Re.sizeSmall:Re.sizeLarge,m].filter(Boolean).join(" ");return _.jsx("textarea",{...V,className:$,disabled:e,id:o,name:n,onChange:y,onBlur:h,placeholder:a,rows:d,value:f,style:E})};function ys({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,...l}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,children:({value:d,onChange:f,onBlur:y,name:h,error:m})=>_.jsx(tr,{...l,name:h,value:d||"",onChange:w=>f(w.target.value),onBlur:y,error:m})})}const et={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeLarge:"Select-module__sizeLarge___eBA1T"},hs=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const a=`
|
|
2
|
+
(function(N,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],_):(N=typeof globalThis<"u"?globalThis:N||self,_(N.DigitalRabbitCL={},N.jsxRuntime,N.React))})(this,(function(N,_,C){"use strict";const we={button:"Button-module__button___2ZuB7",sizeSmall:"Button-module__sizeSmall___DRT8P",sizeLarge:"Button-module__sizeLarge___yeZSH"},Fr=({isActive:e,disabled:r,backgroundColor:t,color:s,hoverBackgroundColor:o,hoverTextColor:n,outline:a,theme:l})=>{const d=t||l.colors.primary;let u;a?u=s||d:s?u=s:u=t?l.buttons.textColor:l.buttons.primary.textColor;let y,h,m;a?(y="transparent",h=u,m=u,e&&(y=o||u,h=o||u,m=n||l.buttons.textColor)):(y=d,h=d,m=u,e&&(y=o||d,h=o||d,m=n||u));let w=1;return r?w=.3:e&&(w=o?1:.75),{backgroundColor:y,borderColor:h,color:m,opacity:w}};function dt(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]=dt(n,o):o!==void 0&&(t[s]=o)}),t}function Ve(e){return e&&typeof e=="object"&&!Array.isArray(e)}function _e(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 ft={primary:"#000",secondary:"#FFF",accent:"#4381C1",error:"#F00",success:"#008000",warning:"#FFEB3B"},He={colors:ft,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:ft.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"}},yt=C.createContext(He),Cr=({theme:e,children:r})=>{const t=e?dt(He,e):He;return _.jsx(yt.Provider,{value:t,children:r})},O=()=>C.useContext(yt),wr=({backgroundColor:e,color:r,hoverBackgroundColor:t,hoverTextColor:s,disabled:o=!1,size:n="large",outline:a=!1,type:l="button",className:d,style:u,buttonProps:y={},onClick:h,children:m})=>{const w=O(),[V,g]=C.useState(!1),x={...Fr({isActive:V,disabled:o,backgroundColor:e,color:r,hoverBackgroundColor:t,hoverTextColor:s,outline:a,theme:w}),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})`,...u},S=[we.button,n==="small"?we.sizeSmall:we.sizeLarge,a?we.outline:"",d].filter(Boolean).join(" ");return _.jsx("button",{...y,className:S,disabled:o,onClick:h,onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),type:l,style:x,children:m})};var ht=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Vr=new Uint8Array(16);function xr(){if(!ht)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ht(Vr)}for(var mt=[],xe=0;xe<256;++xe)mt[xe]=(xe+256).toString(16).substr(1);function kr(e,r){var t=0,s=mt;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 gt(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||kr(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}},_t={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=({color:e,disabled:r=!1,error:t=!1,htmlFor:s,children:o,className:n,style:a,labelProps:l})=>{const d=O(),u=d.colors.error,y=t?u:e||d.colors.primary,h=$r({color:y,disabled:r,fontSize:".85em"}),m={"--form-label-padding-bottom":`calc(${d.fonts.rhythm} * 0.17)`,color:h.color,fontSize:h.fontSize,opacity:h.opacity,cursor:h.cursor,...a},w=[_t.label,r?_t.disabled:"",n].filter(Boolean).join(" ");return _.jsx("label",{...l,className:w,htmlFor:s,style:m,children:o})},ze=({color:e,checkmarkColor:r,checked:t=!1,inverted:s=!1,disabled:o=!1,error:n=!1,name:a,id:l,onChange:d,label:u,labelStyle:y,className:h,style:m,divProps:w})=>{const V=O(),g=l||gt(),z=V.colors.error,x=n?z:e||V.colors.primary,S=zr({color:x,checkmarkColor:r,disabled:o,inverted:s}),E=q=>{o||d(q)},$={cursor:S.cursor,fontSize:V.fonts.size,opacity:S.opacity,...m},A={width:"1em"},M={fill:s&&t?S.checkboxColor:"transparent",strokeWidth:"25",stroke:S.checkboxColor},W={stroke:S.checkmarkColor,strokeWidth:"15",fill:"transparent"},oe=[Oe.container,h].filter(Boolean).join(" ");return _.jsxs("div",{...w,className:oe,style:$,children:[_.jsx("input",{id:g,checked:t,disabled:o,onChange:q=>E({target:{checked:q.target.checked,name:a,type:"checkbox"}}),name:a,style:{display:"none"},type:"checkbox"}),_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>E({target:{checked:!t,name:a,type:"checkbox"}}),style:A,className:Oe.svg,children:[_.jsx("rect",{x:"0",y:"0",height:"100",width:"100",style:M}),t&&_.jsx("path",{d:"M 25 45 L 45 65 L 75 30",style:W})]}),u&&_.jsx(ke,{htmlFor:g,className:Oe.label,style:{paddingBottom:0,...y},color:S.checkboxColor,disabled:o,error:n,children:u})]})},Er=()=>{const e=O();return C.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 ve=e=>e.type==="checkbox",de=e=>e instanceof Date,K=e=>e==null;const vt=e=>typeof e=="object";var j=e=>!K(e)&&!Array.isArray(e)&&vt(e)&&!de(e),pt=e=>j(e)&&e.target?ve(e.target)?e.target.checked:e.target.value:e,Ar=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,bt=(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 G(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]=G(e[o]));else return e;return r}var $e=e=>/^\w*$/.test(e),T=e=>e===void 0,Me=e=>Array.isArray(e)?e.filter(Boolean):[],Ie=e=>Me(e.replace(/["|']|\]/g,"").split(/\.|\[/)),b=(e,r,t)=>{if(!r||!j(e))return t;const s=($e(r)?[r]:Ie(r)).reduce((o,n)=>K(o)?o:o[n],e);return T(s)||s===e?T(e[r])?t:e[r]:s},Y=e=>typeof e=="boolean",L=(e,r,t)=>{let s=-1;const o=$e(r)?[r]:Ie(r),n=o.length,a=n-1;for(;++s<n;){const l=o[s];let d=t;if(s!==a){const u=e[l];d=j(u)||Array.isArray(u)?u:isNaN(+o[s+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const Ee={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},te={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ie={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},St=C.createContext(null);St.displayName="HookFormContext";const je=()=>C.useContext(St);var Ft=(e,r,t,s=!0)=>{const o={defaultValues:r._defaultValues};for(const n in e)Object.defineProperty(o,n,{get:()=>{const a=n;return r._proxyFormState[a]!==te.all&&(r._proxyFormState[a]=!s||te.all),t&&(t[a]=!0),e[a]}});return o};const Ue=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Br(e){const r=je(),{control:t=r.control,disabled:s,name:o,exact:n}=e||{},[a,l]=C.useState(t._formState),d=C.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Ue(()=>t._subscribe({name:o,formState:d.current,exact:n,callback:u=>{!s&&l({...t._formState,...u})}}),[o,s,n]),C.useEffect(()=>{d.current.isValid&&t._setValid(!0)},[t]),C.useMemo(()=>Ft(a,t,d.current,!1),[a,t])}var X=e=>typeof e=="string",We=(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),Ge=e=>K(e)||!vt(e);function re(e,r,t=new WeakSet){if(Ge(e)||Ge(r))return e===r;if(de(e)&&de(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 a=e[n];if(!o.includes(n))return!1;if(n!=="ref"){const l=r[n];if(de(a)&&de(l)||j(a)&&j(l)||Array.isArray(a)&&Array.isArray(l)?!re(a,l,t):a!==l)return!1}}return!0}function Dr(e){const r=je(),{control:t=r.control,name:s,defaultValue:o,disabled:n,exact:a,compute:l}=e||{},d=C.useRef(o),u=C.useRef(l),y=C.useRef(void 0),h=C.useRef(t),m=C.useRef(s);u.current=l;const[w,V]=C.useState(()=>{const $=t._getWatch(s,d.current);return u.current?u.current($):$}),g=C.useCallback($=>{const A=We(s,t._names,$||t._formValues,!1,d.current);return u.current?u.current(A):A},[t._formValues,t._names,s]),z=C.useCallback($=>{if(!n){const A=We(s,t._names,$||t._formValues,!1,d.current);if(u.current){const M=u.current(A);re(M,y.current)||(V(M),y.current=M)}else V(A)}},[t._formValues,t._names,n,s]);Ue(()=>((h.current!==t||!re(m.current,s))&&(h.current=t,m.current=s,z()),t._subscribe({name:s,formState:{values:!0},exact:a,callback:$=>{z($.values)}})),[t,a,s,z]),C.useEffect(()=>t._removeUnmounted());const x=h.current!==t,S=m.current,E=C.useMemo(()=>{if(n)return null;const $=!x&&!re(S,s);return x||$?g():null},[n,x,s,S,g]);return E!==null?E:w}function Lr(e){const r=je(),{name:t,disabled:s,control:o=r.control,shouldUnregister:n,defaultValue:a}=e,l=bt(o._names.array,t),d=C.useMemo(()=>b(o._formValues,t,b(o._defaultValues,t,a)),[o,t,a]),u=Dr({control:o,name:t,defaultValue:d,exact:!0}),y=Br({control:o,name:t,exact:!0}),h=C.useRef(e),m=C.useRef(void 0),w=C.useRef(o.register(t,{...e.rules,value:u,...Y(e.disabled)?{disabled:e.disabled}:{}}));h.current=e;const V=C.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]),g=C.useCallback(E=>w.current.onChange({target:{value:pt(E),name:t},type:Ee.CHANGE}),[t]),z=C.useCallback(()=>w.current.onBlur({target:{value:b(o._formValues,t),name:t},type:Ee.BLUR}),[t,o._formValues]),x=C.useCallback(E=>{const $=b(o._fields,t);$&&E&&($._f.ref={focus:()=>E.focus&&E.focus(),select:()=>E.select&&E.select(),setCustomValidity:A=>E.setCustomValidity(A),reportValidity:()=>E.reportValidity()})},[o._fields,t]),S=C.useMemo(()=>({name:t,value:u,...Y(s)||y.disabled?{disabled:y.disabled||s}:{},onChange:g,onBlur:z,ref:x}),[t,s,y.disabled,g,z,x,u]);return C.useEffect(()=>{const E=o._options.shouldUnregister||n,$=m.current;$&&$!==t&&!l&&o.unregister($),o.register(t,{...h.current.rules,...Y(h.current.disabled)?{disabled:h.current.disabled}:{}});const A=(M,W)=>{const oe=b(o._fields,M);oe&&oe._f&&(oe._f.mount=W)};if(A(t,!0),E){const M=G(b(o._options.defaultValues,t,h.current.defaultValue));L(o._defaultValues,t,M),T(b(o._formValues,t))&&L(o._formValues,t,M)}return!l&&o.register(t),m.current=t,()=>{(l?E&&!o._state.action:E)?o.unregister(t):A(t,!1)}},[t,o,l,n]),C.useEffect(()=>{o._setDisabledField({disabled:s,name:t})},[s,t,o]),C.useMemo(()=>({field:S,formState:y,fieldState:V}),[S,y,V])}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],Ct=()=>{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 wt(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 a=wt(o,n);j(a)&&(t[s]=a)}else e[s]&&(t[s]=n)}return t}var Z=e=>j(e)&&!Object.keys(e).length,Ze=e=>e.type==="file",se=e=>typeof e=="function",Ae=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",Qe=e=>e.type==="radio",Pr=e=>Qe(e)||ve(e),Ke=e=>Ae(e)&&e.isConnected;function Hr(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=T(e)?s++:e[r[s++]];return e}function Or(e){for(const r in e)if(e.hasOwnProperty(r)&&!T(e[r]))return!1;return!0}function U(e,r){const t=Array.isArray(r)?r:$e(r)?[r]:Ie(r),s=t.length===1?e:Hr(e,t),o=t.length-1,n=t[o];return s&&delete s[n],o!==0&&(j(s)&&Z(s)||Array.isArray(s)&&Or(s))&&U(e,t.slice(0,-1)),e}var Tr=e=>{for(const r in e)if(se(e[r]))return!0;return!1};function xt(e){return Array.isArray(e)||j(e)&&!Tr(e)}function Je(e,r={}){for(const t in e)xt(e[t])?(r[t]=Array.isArray(e[t])?[]:{},Je(e[t],r[t])):T(e[t])||(r[t]=!0);return r}function fe(e,r,t){t||(t=Je(r));for(const s in e)xt(e[s])?T(r)||Ge(t[s])?t[s]=Je(e[s],Array.isArray(e[s])?[]:{}):fe(e[s],K(r)?{}:r[s],t[s]):t[s]=!re(e[s],r[s]);return t}const kt={value:!1,isValid:!1},zt={value:!0,isValid:!0};var $t=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&&!T(e[0].attributes.value)?T(e[0].value)||e[0].value===""?zt:{value:e[0].value,isValid:!0}:zt:kt}return kt},Et=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>T(e)?e:r?e===""?NaN:e&&+e:t&&X(e)?new Date(e):s?s(e):e;const At={isValid:!1,value:null};var Nt=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,At):At;function Bt(e){const r=e.ref;return Ze(r)?r.files:Qe(r)?Nt(e.refs).value:Vt(r)?[...r.selectedOptions].map(({value:t})=>t):ve(r)?$t(e.refs).value:Et(T(r.value)?e.ref.value:r.value,e)}var Mr=(e,r,t,s)=>{const o={};for(const n of e){const a=b(r,n);a&&L(o,n,a._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:s}},Ne=e=>e instanceof RegExp,be=e=>T(e)?e:Ne(e)?e.source:j(e)?Ne(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 Ir=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)),jr=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 Se=(e,r,t,s)=>{for(const o of t||Object.keys(e)){const n=b(e,o);if(n){const{_f:a,...l}=n;if(a){if(a.refs&&a.refs[0]&&r(a.refs[0],o)&&!s)return!0;if(a.ref&&r(a.ref,a.name)&&!s)return!0;if(Se(l,r))break}else if(j(l)&&Se(l,r))break}}};function Ht(e,r,t){const s=b(e,t);if(s||$e(t))return{error:s,name:t};const o=t.split(".");for(;o.length;){const n=o.join("."),a=b(r,n),l=b(e,n);if(a&&!Array.isArray(a)&&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(a=>r[a]===(!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))),Gr=(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,qr=(e,r)=>!Me(b(e,r)).length&&U(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(X(e)||Array.isArray(e)&&e.every(X)||Y(e)&&!e)return{type:t,message:X(e)?e:"",ref:r}}var ye=e=>j(e)&&!Ne(e)?e:{value:e,message:""},Tt=async(e,r,t,s,o,n)=>{const{ref:a,refs:l,required:d,maxLength:u,minLength:y,min:h,max:m,pattern:w,validate:V,name:g,valueAsNumber:z,mount:x}=e._f,S=b(t,g);if(!x||r.has(g))return{};const E=l?l[0]:a,$=B=>{o&&E.reportValidity&&(E.setCustomValidity(Y(B)?"":B||""),E.reportValidity())},A={},M=Qe(a),W=ve(a),oe=M||W,q=(z||Ze(a))&&T(a.value)&&T(S)||Ae(a)&&a.value===""||S===""||Array.isArray(S)&&!S.length,le=qe.bind(null,g,s,A),R=(B,D,I,Q=ie.maxLength,J=ie.minLength)=>{const ae=B?D:I;A[g]={type:B?Q:J,message:ae,ref:a,...le(B?Q:J,ae)}};if(n?!Array.isArray(S)||!S.length:d&&(!oe&&(q||K(S))||Y(S)&&!S||W&&!$t(l).isValid||M&&!Nt(l).isValid)){const{value:B,message:D}=X(d)?{value:!!d,message:d}:ye(d);if(B&&(A[g]={type:ie.required,message:D,ref:E,...le(ie.required,D)},!s))return $(D),A}if(!q&&(!K(h)||!K(m))){let B,D;const I=ye(m),Q=ye(h);if(!K(S)&&!isNaN(S)){const J=a.valueAsNumber||S&&+S;K(I.value)||(B=J>I.value),K(Q.value)||(D=J<Q.value)}else{const J=a.valueAsDate||new Date(S),ae=Le=>new Date(new Date().toDateString()+" "+Le),Ce=a.type=="time",ge=a.type=="week";X(I.value)&&S&&(B=Ce?ae(S)>ae(I.value):ge?S>I.value:J>new Date(I.value)),X(Q.value)&&S&&(D=Ce?ae(S)<ae(Q.value):ge?S<Q.value:J<new Date(Q.value))}if((B||D)&&(R(!!B,I.message,Q.message,ie.max,ie.min),!s))return $(A[g].message),A}if((u||y)&&!q&&(X(S)||n&&Array.isArray(S))){const B=ye(u),D=ye(y),I=!K(B.value)&&S.length>+B.value,Q=!K(D.value)&&S.length<+D.value;if((I||Q)&&(R(I,B.message,D.message),!s))return $(A[g].message),A}if(w&&!q&&X(S)){const{value:B,message:D}=ye(w);if(Ne(B)&&!S.match(B)&&(A[g]={type:ie.pattern,message:D,ref:a,...le(ie.pattern,D)},!s))return $(D),A}if(V){if(se(V)){const B=await V(S,t),D=Ot(B,E);if(D&&(A[g]={...D,...le(ie.validate,D.message)},!s))return $(D.message),A}else if(j(V)){let B={};for(const D in V){if(!Z(B)&&!s)break;const I=Ot(await V[D](S,t),E,D);I&&(B={...I,...le(D,I.message)},$(I.message),s&&(A[g]=B))}if(!Z(B)&&(A[g]={ref:E,...B},!s))return A}}return $(!0),A};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)?G(r.defaultValues||r.values)||{}:{},n=r.shouldUnregister?{}:G(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,u=0;const y={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...y};const m={array:Ct(),state:Ct()},w=r.criteriaMode===te.all,V=i=>c=>{clearTimeout(u),u=setTimeout(i,c)},g=async i=>{if(!r.disabled&&(y.isValid||h.isValid||i)){const c=r.resolver?Z((await W()).errors):await q(s,!0);c!==t.isValid&&m.state.next({isValid:c})}},z=(i,c)=>{!r.disabled&&(y.isValidating||y.validatingFields||h.isValidating||h.validatingFields)&&((i||Array.from(l.mount)).forEach(f=>{f&&(c?L(t.validatingFields,f,c):U(t.validatingFields,f))}),m.state.next({validatingFields:t.validatingFields,isValidating:!Z(t.validatingFields)}))},x=(i,c=[],f,F,p=!0,v=!0)=>{if(F&&f&&!r.disabled){if(a.action=!0,v&&Array.isArray(b(s,i))){const k=f(b(s,i),F.argA,F.argB);p&&L(s,i,k)}if(v&&Array.isArray(b(t.errors,i))){const k=f(b(t.errors,i),F.argA,F.argB);p&&L(t.errors,i,k),qr(t.errors,i)}if((y.touchedFields||h.touchedFields)&&v&&Array.isArray(b(t.touchedFields,i))){const k=f(b(t.touchedFields,i),F.argA,F.argB);p&&L(t.touchedFields,i,k)}(y.dirtyFields||h.dirtyFields)&&(t.dirtyFields=fe(o,n)),m.state.next({name:i,isDirty:R(i,c),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else L(n,i,c)},S=(i,c)=>{L(t.errors,i,c),m.state.next({errors:t.errors})},E=i=>{t.errors=i,m.state.next({errors:t.errors,isValid:!1})},$=(i,c,f,F)=>{const p=b(s,i);if(p){const v=b(n,i,T(f)?b(o,i):f);T(v)||F&&F.defaultChecked||c?L(n,i,c?v:Bt(p._f)):I(i,v),a.mount&&g()}},A=(i,c,f,F,p)=>{let v=!1,k=!1;const P={name:i};if(!r.disabled){if(!f||F){(y.isDirty||h.isDirty)&&(k=t.isDirty,t.isDirty=P.isDirty=R(),v=k!==P.isDirty);const H=re(b(o,i),c);k=!!b(t.dirtyFields,i),H?U(t.dirtyFields,i):L(t.dirtyFields,i,!0),P.dirtyFields=t.dirtyFields,v=v||(y.dirtyFields||h.dirtyFields)&&k!==!H}if(f){const H=b(t.touchedFields,i);H||(L(t.touchedFields,i,f),P.touchedFields=t.touchedFields,v=v||(y.touchedFields||h.touchedFields)&&H!==f)}v&&p&&m.state.next(P)}return v?P:{}},M=(i,c,f,F)=>{const p=b(t.errors,i),v=(y.isValid||h.isValid)&&Y(c)&&t.isValid!==c;if(r.delayError&&f?(d=V(()=>S(i,f)),d(r.delayError)):(clearTimeout(u),d=null,f?L(t.errors,i,f):U(t.errors,i)),(f?!re(p,f):p)||!Z(F)||v){const k={...F,...v&&Y(c)?{isValid:c}:{},errors:t.errors,name:i};t={...t,...k},m.state.next(k)}},W=async i=>{z(i,!0);const c=await r.resolver(n,r.context,Mr(i||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return z(i),c},oe=async i=>{const{errors:c}=await W(i);if(i)for(const f of i){const F=b(c,f);F?L(t.errors,f,F):U(t.errors,f)}else t.errors=c;return c},q=async(i,c,f={valid:!0})=>{for(const F in i){const p=i[F];if(p){const{_f:v,...k}=p;if(v){const P=l.array.has(v.name),H=p._f&&Ir(p._f);H&&y.validatingFields&&z([v.name],!0);const ee=await Tt(p,l.disabled,n,w,r.shouldUseNativeValidation&&!c,P);if(H&&y.validatingFields&&z([v.name]),ee[v.name]&&(f.valid=!1,c))break;!c&&(b(ee,v.name)?P?Zr(t.errors,ee,v.name):L(t.errors,v.name,ee[v.name]):U(t.errors,v.name))}!Z(k)&&await q(k,c,f)}}return f.valid},le=()=>{for(const i of l.unMount){const c=b(s,i);c&&(c._f.refs?c._f.refs.every(f=>!Ke(f)):!Ke(c._f.ref))&&at(i)}l.unMount=new Set},R=(i,c)=>!r.disabled&&(i&&c&&L(n,i,c),!re(Le(),o)),B=(i,c,f)=>We(i,l,{...a.mount?n:T(c)?o:X(i)?{[i]:c}:c},f,c),D=i=>Me(b(a.mount?n:o,i,r.shouldUnregister?b(o,i,[]):[])),I=(i,c,f={})=>{const F=b(s,i);let p=c;if(F){const v=F._f;v&&(!v.disabled&&L(n,i,Et(c,v)),p=Ae(v.ref)&&K(c)?"":c,Vt(v.ref)?[...v.ref.options].forEach(k=>k.selected=p.includes(k.value)):v.refs?ve(v.ref)?v.refs.forEach(k=>{(!k.defaultChecked||!k.disabled)&&(Array.isArray(p)?k.checked=!!p.find(P=>P===k.value):k.checked=p===k.value||!!p)}):v.refs.forEach(k=>k.checked=k.value===p):Ze(v.ref)?v.ref.value="":(v.ref.value=p,v.ref.type||m.state.next({name:i,values:G(n)})))}(f.shouldDirty||f.shouldTouch)&&A(i,p,f.shouldTouch,f.shouldDirty,!0),f.shouldValidate&&ge(i)},Q=(i,c,f)=>{for(const F in c){if(!c.hasOwnProperty(F))return;const p=c[F],v=i+"."+F,k=b(s,v);(l.array.has(i)||j(p)||k&&!k._f)&&!de(p)?Q(v,p,f):I(v,p,f)}},J=(i,c,f={})=>{const F=b(s,i),p=l.array.has(i),v=G(c);L(n,i,v),p?(m.array.next({name:i,values:G(n)}),(y.isDirty||y.dirtyFields||h.isDirty||h.dirtyFields)&&f.shouldDirty&&m.state.next({name:i,dirtyFields:fe(o,n),isDirty:R(i,v)})):F&&!F._f&&!K(v)?Q(i,v,f):I(i,v,f),Pt(i,l)&&m.state.next({...t,name:i}),m.state.next({name:a.mount?i:void 0,values:G(n)})},ae=async i=>{a.mount=!0;const c=i.target;let f=c.name,F=!0;const p=b(s,f),v=H=>{F=Number.isNaN(H)||de(H)&&isNaN(H.getTime())||re(H,b(n,f,H))},k=Dt(r.mode),P=Dt(r.reValidateMode);if(p){let H,ee;const Pe=c.type?Bt(p._f):pt(i),ue=i.type===Ee.BLUR||i.type===Ee.FOCUS_OUT,js=!jr(p._f)&&!r.resolver&&!b(t.errors,f)&&!p._f.deps||Gr(ue,b(t.touchedFields,f),t.isSubmitted,P,k),ct=Pt(f,l,ue);L(n,f,Pe),ue?(!c||!c.readOnly)&&(p._f.onBlur&&p._f.onBlur(i),d&&d(0)):p._f.onChange&&p._f.onChange(i);const ut=A(f,Pe,ue),Us=!Z(ut)||ct;if(!ue&&m.state.next({name:f,type:i.type,values:G(n)}),js)return(y.isValid||h.isValid)&&(r.mode==="onBlur"?ue&&g():ue||g()),Us&&m.state.next({name:f,...ct?{}:ut});if(!ue&&ct&&m.state.next({...t}),r.resolver){const{errors:br}=await W([f]);if(v(Pe),F){const Ws=Ht(t.errors,s,f),Sr=Ht(br,s,Ws.name||f);H=Sr.error,f=Sr.name,ee=Z(br)}}else z([f],!0),H=(await Tt(p,l.disabled,n,w,r.shouldUseNativeValidation))[f],z([f]),v(Pe),F&&(H?ee=!1:(y.isValid||h.isValid)&&(ee=await q(s,!0)));F&&(p._f.deps&&(!Array.isArray(p._f.deps)||p._f.deps.length>0)&&ge(p._f.deps),M(f,ee,H,ut))}},Ce=(i,c)=>{if(b(t.errors,c)&&i.focus)return i.focus(),1},ge=async(i,c={})=>{let f,F;const p=pe(i);if(r.resolver){const v=await oe(T(i)?i:p);f=Z(v),F=i?!p.some(k=>b(v,k)):f}else i?(F=(await Promise.all(p.map(async v=>{const k=b(s,v);return await q(k&&k._f?{[v]:k}:k)}))).every(Boolean),!(!F&&!t.isValid)&&g()):F=f=await q(s);return m.state.next({...!X(i)||(y.isValid||h.isValid)&&f!==t.isValid?{}:{name:i},...r.resolver||!i?{isValid:f}:{},errors:t.errors}),c.shouldFocus&&!F&&Se(s,Ce,i?p:l.mount),F},Le=(i,c)=>{let f={...a.mount?n:o};return c&&(f=wt(c.dirtyFields?t.dirtyFields:t.touchedFields,f)),T(i)?f:X(i)?b(f,i):i.map(F=>b(f,F))},fr=(i,c)=>({invalid:!!b((c||t).errors,i),isDirty:!!b((c||t).dirtyFields,i),error:b((c||t).errors,i),isValidating:!!b(t.validatingFields,i),isTouched:!!b((c||t).touchedFields,i)}),Ls=i=>{i&&pe(i).forEach(c=>U(t.errors,c)),m.state.next({errors:i?t.errors:{}})},yr=(i,c,f)=>{const F=(b(s,i,{_f:{}})._f||{}).ref,p=b(t.errors,i)||{},{ref:v,message:k,type:P,...H}=p;L(t.errors,i,{...H,...c,ref:F}),m.state.next({name:i,errors:t.errors,isValid:!1}),f&&f.shouldFocus&&F&&F.focus&&F.focus()},Ps=(i,c)=>se(i)?m.state.subscribe({next:f=>"values"in f&&i(B(void 0,c),f)}):B(i,c,!0),hr=i=>m.state.subscribe({next:c=>{Wr(i.name,c.name,i.exact)&&Ur(c,i.formState||y,Is,i.reRenderRoot)&&i.callback({values:{...n},...t,...c,defaultValues:o})}}).unsubscribe,Hs=i=>(a.mount=!0,h={...h,...i.formState},hr({...i,formState:h})),at=(i,c={})=>{for(const f of i?pe(i):l.mount)l.mount.delete(f),l.array.delete(f),c.keepValue||(U(s,f),U(n,f)),!c.keepError&&U(t.errors,f),!c.keepDirty&&U(t.dirtyFields,f),!c.keepTouched&&U(t.touchedFields,f),!c.keepIsValidating&&U(t.validatingFields,f),!r.shouldUnregister&&!c.keepDefaultValue&&U(o,f);m.state.next({values:G(n)}),m.state.next({...t,...c.keepDirty?{isDirty:R()}:{}}),!c.keepIsValid&&g()},mr=({disabled:i,name:c})=>{(Y(i)&&a.mount||i||l.disabled.has(c))&&(i?l.disabled.add(c):l.disabled.delete(c))},it=(i,c={})=>{let f=b(s,i);const F=Y(c.disabled)||Y(r.disabled);return L(s,i,{...f||{},_f:{...f&&f._f?f._f:{ref:{name:i}},name:i,mount:!0,...c}}),l.mount.add(i),f?mr({disabled:Y(c.disabled)?c.disabled:r.disabled,name:i}):$(i,!0,c.value),{...F?{disabled:c.disabled||r.disabled}:{},...r.progressive?{required:!!c.required,min:be(c.min),max:be(c.max),minLength:be(c.minLength),maxLength:be(c.maxLength),pattern:be(c.pattern)}:{},name:i,onChange:ae,onBlur:ae,ref:p=>{if(p){it(i,c),f=b(s,i);const v=T(p.value)&&p.querySelectorAll&&p.querySelectorAll("input,select,textarea")[0]||p,k=Pr(v),P=f._f.refs||[];if(k?P.find(H=>H===v):v===f._f.ref)return;L(s,i,{_f:{...f._f,...k?{refs:[...P.filter(Ke),v,...Array.isArray(b(o,i))?[{}]:[]],ref:{type:v.type,name:i}}:{ref:v}}}),$(i,!1,void 0,v)}else f=b(s,i,{}),f._f&&(f._f.mount=!1),(r.shouldUnregister||c.shouldUnregister)&&!(bt(l.array,i)&&a.action)&&l.unMount.add(i)}}},lt=()=>r.shouldFocusError&&Se(s,Ce,l.mount),Os=i=>{Y(i)&&(m.state.next({disabled:i}),Se(s,(c,f)=>{const F=b(s,f);F&&(c.disabled=F._f.disabled||i,Array.isArray(F._f.refs)&&F._f.refs.forEach(p=>{p.disabled=F._f.disabled||i}))},0,!1))},gr=(i,c)=>async f=>{let F;f&&(f.preventDefault&&f.preventDefault(),f.persist&&f.persist());let p=G(n);if(m.state.next({isSubmitting:!0}),r.resolver){const{errors:v,values:k}=await W();t.errors=v,p=G(k)}else await q(s);if(l.disabled.size)for(const v of l.disabled)U(p,v);if(U(t.errors,"root"),Z(t.errors)){m.state.next({errors:{}});try{await i(p,f)}catch(v){F=v}}else c&&await c({...t.errors},f),lt(),setTimeout(lt);if(m.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Z(t.errors)&&!F,submitCount:t.submitCount+1,errors:t.errors}),F)throw F},Ts=(i,c={})=>{b(s,i)&&(T(c.defaultValue)?J(i,G(b(o,i))):(J(i,c.defaultValue),L(o,i,G(c.defaultValue))),c.keepTouched||U(t.touchedFields,i),c.keepDirty||(U(t.dirtyFields,i),t.isDirty=c.defaultValue?R(i,G(b(o,i))):R()),c.keepError||(U(t.errors,i),y.isValid&&g()),m.state.next({...t}))},_r=(i,c={})=>{const f=i?G(i):o,F=G(f),p=Z(i),v=p?o:F;if(c.keepDefaultValues||(o=f),!c.keepValues){if(c.keepDirtyValues){const k=new Set([...l.mount,...Object.keys(fe(o,n))]);for(const P of Array.from(k))b(t.dirtyFields,P)?L(v,P,b(n,P)):J(P,b(v,P))}else{if(Te&&T(i))for(const k of l.mount){const P=b(s,k);if(P&&P._f){const H=Array.isArray(P._f.refs)?P._f.refs[0]:P._f.ref;if(Ae(H)){const ee=H.closest("form");if(ee){ee.reset();break}}}}if(c.keepFieldsRef)for(const k of l.mount)J(k,b(v,k));else s={}}n=r.shouldUnregister?c.keepDefaultValues?G(o):{}:G(v),m.array.next({values:{...v}}),m.state.next({values:{...v}})}l={mount:c.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!y.isValid||!!c.keepIsValid||!!c.keepDirtyValues||!r.shouldUnregister&&!Z(v),a.watch=!!r.shouldUnregister,m.state.next({submitCount:c.keepSubmitCount?t.submitCount:0,isDirty:p?!1:c.keepDirty?t.isDirty:!!(c.keepDefaultValues&&!re(i,o)),isSubmitted:c.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:p?{}:c.keepDirtyValues?c.keepDefaultValues&&n?fe(o,n):t.dirtyFields:c.keepDefaultValues&&i?fe(o,i):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=(i,c)=>_r(se(i)?i(n):i,c),Ms=(i,c={})=>{const f=b(s,i),F=f&&f._f;if(F){const p=F.refs?F.refs[0]:F.ref;p.focus&&(p.focus(),c.shouldSelect&&se(p.select)&&p.select())}},Is=i=>{t={...t,...i}},pr={control:{register:it,unregister:at,getFieldState:fr,handleSubmit:gr,setError:yr,_subscribe:hr,_runSchema:W,_focusError:lt,_getWatch:B,_getDirty:R,_setValid:g,_setFieldArray:x,_setDisabledField:mr,_setErrors:E,_getFieldArray:D,_reset:_r,_resetDefaultValues:()=>se(r.defaultValues)&&r.defaultValues().then(i=>{vr(i,r.resetOptions),m.state.next({isLoading:!1})}),_removeUnmounted:le,_disableForm:Os,_subjects:m,_proxyFormState:y,get _fields(){return s},get _formValues(){return n},get _state(){return a},set _state(i){a=i},get _defaultValues(){return o},get _names(){return l},set _names(i){l=i},get _formState(){return t},get _options(){return r},set _options(i){r={...r,...i}}},subscribe:Hs,trigger:ge,register:it,handleSubmit:gr,watch:Ps,setValue:J,getValues:Le,reset:vr,resetField:Ts,clearErrors:Ls,unregister:at,setError:yr,setFocus:Ms,getFieldState:fr};return{...pr,formControl:pr}}function Jr(e={}){const r=C.useRef(void 0),t=C.useRef(void 0),[s,o]=C.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:a,...l}=Kr(e);r.current={...l,formState:s}}const n=r.current.control;return n._options=e,Ue(()=>{const a=n._subscribe({formState:n._proxyFormState,callback:()=>o({...n._formState}),reRenderRoot:!0});return o(l=>({...l,isReady:!0})),n._formState.isReady=!0,a},[n]),C.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),C.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),C.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),C.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),C.useEffect(()=>{if(n._proxyFormState.isDirty){const a=n._getDirty();a!==s.isDirty&&n._subjects.state.next({isDirty:a})}},[n,s.isDirty]),C.useEffect(()=>{e.values&&!re(e.values,t.current)?(n._reset(e.values,{keepFieldsRef:!0,...n._options.resetOptions}),t.current=e.values,o(a=>({...a}))):n._resetDefaultValues()},[n,e.values]),C.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=Ft(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()}},Ye=(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))}},It=(e,r)=>{r.shouldUseNativeValidation&&Ye(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(Yr(r.names||Object.keys(e),s)){const a=Object.assign({},b(t,s));L(a,"root",n),L(t,s,a)}else L(t,s,n)}return t},Yr=(e,r)=>{const t=jt(r);return e.some(s=>jt(s).match(`^${t}\\.\\d+`))};function jt(e){return e.replace(/\]|\[/g,"")}function Ut(e,r,t){function s(l,d){var u;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(u=l._zod).traits??(u.traits=new Set),l._zod.traits.add(e),r(l,d);for(const y in a.prototype)y in l||Object.defineProperty(l,y,{value:a.prototype[y].bind(l)});l._zod.constr=a,l._zod.def=d}const o=(t==null?void 0:t.Parent)??Object;class n extends o{}Object.defineProperty(n,"name",{value:e});function a(l){var d;const u=t!=null&&t.Parent?new n:this;s(u,l),(d=u._zod).deferred??(d.deferred=[]);for(const y of u._zod.deferred)y();return u}return Object.defineProperty(a,"init",{value:s}),Object.defineProperty(a,Symbol.hasInstance,{value:l=>{var d,u;return t!=null&&t.Parent&&l instanceof t.Parent?!0:(u=(d=l==null?void 0:l._zod)==null?void 0:d.traits)==null?void 0:u.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class Xr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const Rr={};function Wt(e){return Rr}function es(e,r){return typeof r=="bigint"?r.toString():r}const Gt="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Be(e){return typeof e=="string"?e:e==null?void 0:e.message}function qt(e,r,t){var o,n,a,l,d,u;const s={...e,path:e.path??[]};if(!e.message){const y=Be((a=(n=(o=e.inst)==null?void 0:o._zod.def)==null?void 0:n.error)==null?void 0:a.call(n,e))??Be((l=r==null?void 0:r.error)==null?void 0:l.call(r,e))??Be((d=t.customError)==null?void 0:d.call(t,e))??Be((u=t.localeError)==null?void 0:u.call(t,e))??"Invalid input";s.message=y}return delete s.inst,delete s.continue,r!=null&&r.reportInput||delete s.input,s}const Zt=(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=Ut("$ZodError",Zt),Qt=Ut("$ZodError",Zt,{Parent:Error}),rs=(e=>(r,t,s,o)=>{const n=s?Object.assign(s,{async:!1}):{async:!1},a=r._zod.run({value:t,issues:[]},n);if(a instanceof Promise)throw new Xr;if(a.issues.length){const l=new((o==null?void 0:o.Err)??e)(a.issues.map(d=>qt(d,n,Wt())));throw Gt(l,o==null?void 0:o.callee),l}return a.value})(Qt),ss=(e=>async(r,t,s,o)=>{const n=s?Object.assign(s,{async:!0}):{async:!0};let a=r._zod.run({value:t,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){const l=new((o==null?void 0:o.Err)??e)(a.issues.map(d=>qt(d,n,Wt())));throw Gt(l,o==null?void 0:o.callee),l}return a.value})(Qt);function Kt(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,a=s.path.join(".");if(!t[a])if("unionErrors"in s){var l=s.unionErrors[0].errors[0];t[a]={message:l.message,type:l.code}}else t[a]={message:n,type:o};if("unionErrors"in s&&s.unionErrors.forEach(function(y){return y.errors.forEach(function(h){return e.push(h)})}),r){var d=t[a].types,u=d&&d[s.code];t[a]=qe(a,r,t,o,u?[].concat(u,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,a=s.path.join(".");if(!t[a])if(s.code==="invalid_union"&&s.errors.length>0){var l=s.errors[0][0];t[a]={message:l.message,type:l.code}}else t[a]={message:n,type:o};if(s.code==="invalid_union"&&s.errors.forEach(function(y){return y.forEach(function(h){return e.push(h)})}),r){var d=t[a].types,u=d&&d[s.code];t[a]=qe(a,r,t,o,u?[].concat(u,s.message):s.message)}e.shift()}return t}function as(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(Kt(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](s,r)).then(function(a){return n.shouldUseNativeValidation&&Ye({},n),{errors:{},values:t.raw?Object.assign({},s):a}})},function(a){if((function(l){return Array.isArray(l==null?void 0:l.issues)})(a))return{values:{},errors:It(os(a.errors,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw a}))}catch(a){return Promise.reject(a)}};if((function(s){return"_zod"in s&&typeof s._zod=="object"})(e))return function(s,o,n){try{return Promise.resolve(Kt(function(){return Promise.resolve((t.mode==="sync"?rs:ss)(e,s,r)).then(function(a){return n.shouldUseNativeValidation&&Ye({},n),{errors:{},values:t.raw?Object.assign({},s):a}})},function(a){if((function(l){return l instanceof ts})(a))return{values:{},errors:It(ns(a.issues,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw a}))}catch(a){return Promise.reject(a)}};throw new Error("Invalid input: not a Zod schema")}const Jt=C.createContext(null);function Yt(){const e=C.useContext(Jt);if(!e)throw new Error("useFormContext must be used within a Form component");return e}function is({onSubmit:e,children:r,schema:t,defaultValues:s,mode:o="onSubmit",reValidateMode:n="onChange",className:a,style:l,formProps:d}){const u=Jr({resolver:t?as(t):void 0,defaultValues:s,mode:o,reValidateMode:n}),y=u.handleSubmit(e);return _.jsx(Jt.Provider,{value:u,children:_.jsx("form",{...d,className:a,style:l,onSubmit:y,children:typeof r=="function"?r(u):r})})}const ls=is,cs={formError:"FormError-module__formError___kaUBn"},Xt=({color:e,children:r,className:t,style:s,divProps:o})=>{const n=O(),a={"--form-error-margin-top":`calc(${n.fonts.rhythm} * 0.17)`,color:e||n.colors.error,...s},l=[cs.formError,t].filter(Boolean).join(" ");return _.jsx("div",{...o,className:l,style:a,role:"alert","aria-live":"polite",children:r})},he={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"},Rt=({disabled:e=!1,error:r=!1,required:t=!1,indent:s=!1,name:o,label:n,errorMessage:a,labelProps:l,children:d,className:u,style:y,divProps:h})=>{const m=O(),w=[he.formGroup,r?he.error:"",e?he.disabled:"",u].filter(Boolean).join(" "),V={"--form-group-margin-bottom":`calc(${m.fonts.rhythm} * 0.35)`,...y},g=C.Children.map(d,z=>{if(C.isValidElement(z)){const x={};if(e&&z.props.disabled===void 0&&(x.disabled=!0),r&&z.props.error===void 0&&(x.error=!0),o&&z.props.id===void 0&&(x.id=o),Object.keys(x).length>0)return C.cloneElement(z,x)}return z});return _.jsxs("div",{...h,className:w,style:V,children:[n&&_.jsxs(ke,{htmlFor:o,disabled:e,error:r,...l,children:[n,t&&_.jsxs("span",{className:he.required,"aria-label":"required",children:[" ","*"]})]}),_.jsx("div",{className:`${he.inputWrapper} ${s?he.indented:""}`,children:g}),r&&a&&_.jsx(Xt,{children:a})]})};function ce({name:e,label:r,required:t,children:s,rules:o,disabled:n,className:a,style:l,indent:d,labelProps:u}){const{control:y}=Yt(),{field:h,fieldState:{error:m}}=Lr({name:e,control:y,rules:o});return _.jsx(Rt,{label:r,name:e,error:!!m,errorMessage:m==null?void 0:m.message,disabled:n,required:t,className:a,style:l,indent:d,labelProps:u,children:s({value:h.value,onChange:h.onChange,onBlur:h.onBlur,name:h.name,error:!!m,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}),er=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:a,placeholderOpacity:l=.3,type:d="text",value:u="",onChange:y,onBlur:h,className:m,style:w,inputProps:V})=>{const g=O(),z=g.colors.error,x=r?z:t||g.colors.primary,S=us({color:x,disabled:e,fontSize:g.fonts.size,placeholderOpacity:l}),E={"--placeholder-opacity":S.placeholderOpacity,"--input-padding-small":`calc(${g.fonts.rhythm} * ${g.sizes.small.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,"--input-padding-large":`calc(${g.fonts.rhythm} * ${g.sizes.large.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,borderColor:S.borderColor,borderWidth:g.border.width,borderRadius:g.border.radius,color:S.color,fontSize:S.fontSize,opacity:S.opacity,...w},$=[Xe.input,s==="small"?Xe.sizeSmall:Xe.sizeLarge,m].filter(Boolean).join(" ");return _.jsx("input",{...V,className:$,disabled:e,id:o,name:n,onChange:y,onBlur:h,placeholder:a,type:d,value:u,style:E})};function ds({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,...l}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,children:({value:d,onChange:u,onBlur:y,name:h,error:m})=>_.jsx(er,{...l,name:h,value:d||"",onChange:w=>u(w.target.value),inputProps:{onBlur:y},error:m})})}const Re={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}),tr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:a,placeholderOpacity:l=.3,rows:d=3,value:u="",onChange:y,onBlur:h,className:m,style:w,textareaProps:V})=>{const g=O(),z=g.colors.error,x=r?z:t||g.colors.primary,S=fs({color:x,disabled:e,placeholderOpacity:l}),E={"--placeholder-opacity":S.placeholderOpacity,"--textarea-padding-small":`calc(${g.fonts.rhythm} * ${g.sizes.small.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,"--textarea-padding-large":`calc(${g.fonts.rhythm} * ${g.sizes.large.paddingVertical}) calc(${g.fonts.rhythm} * ${g.inputs.paddingHorizontal})`,borderColor:S.borderColor,borderWidth:g.border.width,borderRadius:g.border.radius,color:S.color,fontSize:g.fonts.size,opacity:S.opacity,...w},$=[Re.textarea,s==="small"?Re.sizeSmall:Re.sizeLarge,m].filter(Boolean).join(" ");return _.jsx("textarea",{...V,className:$,disabled:e,id:o,name:n,onChange:y,onBlur:h,placeholder:a,rows:d,value:u,style:E})};function ys({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,...l}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,children:({value:d,onChange:u,onBlur:y,name:h,error:m})=>_.jsx(tr,{...l,name:h,value:d||"",onChange:w=>u(w.target.value),onBlur:y,error:m})})}const et={select:"Select-module__select___cjdcr",sizeSmall:"Select-module__sizeSmall___i1quj",sizeLarge:"Select-module__sizeLarge___eBA1T"},hs=({color:e="#000",disabled:r=!1})=>({color:e,borderColor:e,cursor:r?"default":"pointer",opacity:r?.3:1,backgroundImage:(n=>{const a=`
|
|
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(a)}")`})(e)}),rr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:a="",value:l="",onChange:d,onBlur:f,children:y,className:h,style:m,selectProps:w})=>{const V=O(),g=V.colors.error,z=r?g:t||V.colors.primary,k=hs({color:z,disabled:e}),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:k.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:k.borderColor,borderWidth:V.border.width,borderRadius:V.border.radius,color:k.color,cursor:k.cursor,fontSize:V.fonts.size,opacity:k.opacity,...m},E=[et.select,s==="small"?et.sizeSmall:et.sizeLarge,h].filter(Boolean).join(" ");return _.jsxs("select",{...w,className:E,disabled:e,id:o,name:n,onChange:d,onBlur:f,value:l,style:S,children:[a!==""&&_.jsx("option",{disabled:!0,value:"",children:a}),y]})};function ms({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,children:l,...d}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,children:({value:f,onChange:y,onBlur:h,name:m,error:w})=>_.jsx(rr,{...d,name:m,value:f||"",onChange:V=>y(V.target.value),onBlur:h,error:w,children:l})})}function gs({name:e,required:r,rules:t,disabled:s,className:o,style:n,...a}){return _.jsx(ce,{name:e,required:r,rules:t,disabled:s,className:o,style:n,children:({value:l,onChange:d,name:f,error:y})=>_.jsx(ze,{...a,name:f,checked:!!l,onChange:h=>d(h.target.checked),error:y})})}const tt={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}),rt=({color:e,checked:r=!1,disabled:t=!1,error:s=!1,name:o,id:n,onChange:a,label:l,labelStyle:d,className:f,style:y,divProps:h})=>{const m=O(),w=n||gt(),V=m.colors.error,g=s?V:e||m.colors.primary,z=_s({color:g,disabled:t}),k=W=>{t||a(W)},S={cursor:z.cursor,fontSize:m.fonts.size,opacity:z.opacity,...y},E={width:"1em"},$={fill:"transparent",strokeWidth:"12.5",stroke:z.radioColor},A={fill:z.radioColor},M=[tt.container,f].filter(Boolean).join(" ");return _.jsxs("div",{...h,className:M,style:S,children:[_.jsx("input",{id:w,checked:r,disabled:t,name:o,onChange:W=>k({target:{checked:W.target.checked,name:o,type:"radio"}}),style:{display:"none"},type:"radio"}),_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>k({target:{checked:!r,name:o,type:"radio"}}),className:tt.svg,style:E,children:[_.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:$}),r&&_.jsx("circle",{cx:"50",cy:"50",r:"25",style:A})]}),l&&_.jsx(xe,{htmlFor:w,className:tt.label,style:{paddingBottom:0,...d},color:z.radioColor,disabled:t,error:s,children:l})]})};function vs({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,value:l,...d}){return _.jsx(ce,{name:e,required:t,rules:s,disabled:o,className:n,style:a,children:({value:f,onChange:y,name:h,error:m})=>_.jsx(rt,{...d,name:h,checked:f===l,onChange:()=>y(l),error:m,label:r})})}function ps({name:e,label:r,required:t,options:s,disabled:o,className:n,style:a,indent:l=!0}){return _.jsx(ce,{name:e,label:r,required:t,disabled:o,className:n,style:a,indent:l,labelProps:{style:{marginBottom:".25em"}},children:({value:d,onChange:f,name:y,error:h})=>_.jsx(_.Fragment,{children:s.map(m=>_.jsx(rt,{name:y,checked:d===m.value,onChange:()=>f(m.value),label:m.label,disabled:o||m.disabled,error:h},m.value))})})}function bs({name:e,label:r,required:t,options:s,children:o,disabled:n,className:a,style:l,indent:d=!0}){return _.jsx(ce,{name:e,label:r,required:t,disabled:n,className:a,style:l,indent:d,labelProps:{style:{marginBottom:".25em"}},children:({value:f,onChange:y,name:h,error:m})=>{const w=Array.isArray(f)?f:[],V=(g,z)=>{y(z?[...w,g]:w.filter(k=>k!==g))};return _.jsx(_.Fragment,{children:s?s.map(g=>_.jsx(ze,{name:`${h}[]`,checked:w.includes(g.value),onChange:z=>V(g.value,z.target.checked),label:g.label,disabled:n||g.disabled,error:m},g.value)):C.Children.map(o,g=>{if(C.isValidElement(g)&&g.type===ze){const z=g.props.value||g.props.name;return C.cloneElement(g,{name:`${h}[]`,checked:w.includes(z),onChange:k=>V(z,k.target.checked),error:m||g.props.error,disabled:n||g.props.disabled})}return g})})}})}const Fe={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},Ss=({compact:e,color:r,visible:t,border:s})=>{const o=O(),n=e?"1.5em":"2em";return{"--hamburger-border-radius":(s==null?void 0:s.radius)||o.border.radius,color:r||"inherit",display:t?"flex":"none",width:n,height:n}},sr=({color:e,visible:r,compact:t,hamburgerRef:s,open:o=!1,border:n,setOpen:a,className:l,style:d})=>{const f=Ss({compact:t,color:e,visible:r,border:n}),y=[Fe.hamburger,o?Fe.open:"",l].filter(Boolean).join(" ");return _.jsxs("button",{ref:s,className:y,onClick:()=>a(!o),style:{...f,...d},"aria-label":"Toggle menu","aria-expanded":o,children:[_.jsx("div",{className:Fe.line}),_.jsx("div",{className:Fe.line}),_.jsx("div",{className:Fe.line})]})},or={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},Fs=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:a,margin:l,gap:d,backgroundColor:f,color:y}={})=>{const h=O();return{"--header-max-width":r||h.layout.maxWidth,"--header-min-width":t,"--header-width":s,"--header-height":o,"--header-padding":e?n||h.layout.paddingSm:a||h.layout.padding,"--header-margin":l,"--header-gap":d,backgroundColor:f,color:y}},ne=e=>{const r=typeof window<"u"&&typeof window.matchMedia=="function",t=n=>{if(!r)return()=>{};const a=window.matchMedia(e);return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},s=()=>r?window.matchMedia(e).matches:!1,o=()=>!1;return C.useSyncExternalStore(t,s,o)},nr=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:a,paddingSm:l,margin:d,gap:f,breakpoint:y,fixed:h=!1,children:m,className:w,style:V,headerProps:g})=>{const z=O(),k=y||z.breakpoints.sm,{maxWidth:S,unit:E}=_e(k),$=ne(`(max-width: ${S}${E})`),A=Fs({isSmallScreen:$,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:a,margin:d,gap:f,backgroundColor:e,color:r}),M=[or.container,w].filter(Boolean).join(" "),W=h?{position:"fixed",top:0,left:0,right:0,zIndex:1e3}:{};return _.jsx("header",{...g,className:or.header,style:W,children:_.jsx("div",{className:M,style:{...A,...V},children:m})})},me={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",navHeader:"ResponsiveNav-module__navHeader___Me8bB",compact:"ResponsiveNav-module__compact___UhuAE",open:"ResponsiveNav-module__open___WDCAf",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},Cs=({isMobile:e,isCompact:r,mobile:t,desktop:s})=>{const o=O(),n=o.fonts.rhythm;return C.useMemo(()=>{if(e){const a=(t==null?void 0:t.backgroundColor)||o.colors.primary,l=(t==null?void 0:t.color)||o.colors.secondary,d=(t==null?void 0:t.activeBackgroundColor)||o.colors.accent,f=(t==null?void 0:t.activeColor)||o.colors.primary,y=r||t!=null&&t.compact?"1.5rem":"2rem";return{navStyles:{backgroundColor:a,color:l,fontSize:y,...t==null?void 0:t.style},linkActiveStyles:{backgroundColor:d,color:f},linkHoverStyles:{}}}else{const a=s==null?void 0:s.backgroundColor,l=(s==null?void 0:s.color)||o.fonts.color,d=(s==null?void 0:s.hoverOpacity)??.5;return{navStyles:{...a&&{backgroundColor:a},color:l,...s==null?void 0:s.style},linkActiveStyles:{opacity:d},linkHoverStyles:{opacity:d}}}},[e,r,t,s,o,n])},ws=({mobile:e,desktop:r,breakpoints:t,children:s,className:o,style:n,navProps:a})=>{var R;const[l,d]=C.useState(!1),f=C.useRef(null),y=C.useRef(null),h=O(),m={...h.breakpoints,...t},{maxWidth:w,unit:V}=_e(m.md),{maxWidth:g,unit:z}=_e(m.sm),k=ne(`(max-width: ${w}${V})`),S=ne(`(max-width: ${g}${z})`),{navStyles:E,linkActiveStyles:$,linkHoverStyles:A}=Cs({isMobile:k,isCompact:S,mobile:e,desktop:r}),M={...E,...$.backgroundColor&&{"--mobile-active-bg":$.backgroundColor},...$.color&&{"--mobile-active-color":$.color},...A.opacity!==void 0&&{"--desktop-hover-opacity":A.opacity}};C.useEffect(()=>{if(k&&l){const D=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${D}px`,document.body.style.width="100%",()=>{document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,D)}}},[k,l]),C.useEffect(()=>{const D=L=>{!y.current||y.current.contains(L.target)||f.current&&f.current.contains(L.target)||d(!1)};return document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[f,y,d]);const W=[me.nav,k?me.navMobile:me.navDesktop,k&&l?me.open:"",k&&(S||e!=null&&e.compact)?me.compact:"",o].filter(Boolean).join(" "),oe=D=>{if(!k)return;D.target.closest("a, button")&&d(!1)},q=k?(e==null?void 0:e.content)||s:(r==null?void 0:r.content)||s,le=l?(e==null?void 0:e.hamburgerColor)||(e==null?void 0:e.color)||h.colors.secondary:(R=e==null?void 0:e.hamburgerProps)==null?void 0:R.color;return _.jsxs(_.Fragment,{children:[_.jsx(sr,{hamburgerRef:f,visible:k,compact:S,open:l,setOpen:d,color:le,...e==null?void 0:e.hamburgerProps}),_.jsxs("nav",{...a,ref:y,className:W,style:{...M,...n},onClickCapture:oe,children:[k&&l&&_.jsx("div",{className:me.navHeader}),typeof q=="function"?q({setOpen:d}):q]})]})},ar=({color:e,backgroundColor:r,fullScreen:t=!0,className:s,style:o,divProps:n})=>{const a=O(),l=e||a.colors.primary,d=r||a.colors.secondary,f=_.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}`}}),y=_.jsxs(_.Fragment,{children:[f,_.jsx("style",{children:`
|
|
17
|
+
`.trim();return`url("data:image/svg+xml,${encodeURIComponent(a)}")`})(e)}),rr=({disabled:e=!1,error:r=!1,color:t,size:s="large",id:o,name:n="",placeholder:a="",value:l="",onChange:d,onBlur:u,children:y,className:h,style:m,selectProps:w})=>{const V=O(),g=V.colors.error,z=r?g:t||V.colors.primary,x=hs({color:z,disabled:e}),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:x.backgroundImage,backgroundPosition:"right center",backgroundRepeat:"no-repeat",backgroundSize:"auto 85%",backgroundColor:"transparent",borderColor:x.borderColor,borderWidth:V.border.width,borderRadius:V.border.radius,color:x.color,cursor:x.cursor,fontSize:V.fonts.size,opacity:x.opacity,...m},E=[et.select,s==="small"?et.sizeSmall:et.sizeLarge,h].filter(Boolean).join(" ");return _.jsxs("select",{...w,className:E,disabled:e,id:o,name:n,onChange:d,onBlur:u,value:l,style:S,children:[a!==""&&_.jsx("option",{disabled:!0,value:"",children:a}),y]})};function ms({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,children:l,...d}){return _.jsx(ce,{name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,children:({value:u,onChange:y,onBlur:h,name:m,error:w})=>_.jsx(rr,{...d,name:m,value:u||"",onChange:V=>y(V.target.value),onBlur:h,error:w,children:l})})}function gs({name:e,required:r,rules:t,disabled:s,className:o,style:n,...a}){return _.jsx(ce,{name:e,required:r,rules:t,disabled:s,className:o,style:n,children:({value:l,onChange:d,name:u,error:y})=>_.jsx(ze,{...a,name:u,checked:!!l,onChange:h=>d(h.target.checked),error:y})})}const tt={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}),rt=({color:e,checked:r=!1,disabled:t=!1,error:s=!1,name:o,id:n,onChange:a,label:l,labelStyle:d,className:u,style:y,divProps:h})=>{const m=O(),w=n||gt(),V=m.colors.error,g=s?V:e||m.colors.primary,z=_s({color:g,disabled:t}),x=W=>{t||a(W)},S={cursor:z.cursor,fontSize:m.fonts.size,opacity:z.opacity,...y},E={width:"1em"},$={fill:"transparent",strokeWidth:"12.5",stroke:z.radioColor},A={fill:z.radioColor},M=[tt.container,u].filter(Boolean).join(" ");return _.jsxs("div",{...h,className:M,style:S,children:[_.jsx("input",{id:w,checked:r,disabled:t,name:o,onChange:W=>x({target:{checked:W.target.checked,name:o,type:"radio"}}),style:{display:"none"},type:"radio"}),_.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",onClick:()=>x({target:{checked:!r,name:o,type:"radio"}}),className:tt.svg,style:E,children:[_.jsx("circle",{cx:"50",cy:"50",r:"42.5",width:"100%",style:$}),r&&_.jsx("circle",{cx:"50",cy:"50",r:"25",style:A})]}),l&&_.jsx(ke,{htmlFor:w,className:tt.label,style:{paddingBottom:0,...d},color:z.radioColor,disabled:t,error:s,children:l})]})};function vs({name:e,label:r,required:t,rules:s,disabled:o,className:n,style:a,value:l,...d}){return _.jsx(ce,{name:e,required:t,rules:s,disabled:o,className:n,style:a,children:({value:u,onChange:y,name:h,error:m})=>_.jsx(rt,{...d,name:h,checked:u===l,onChange:()=>y(l),error:m,label:r})})}function ps({name:e,label:r,required:t,options:s,disabled:o,className:n,style:a,indent:l=!0}){return _.jsx(ce,{name:e,label:r,required:t,disabled:o,className:n,style:a,indent:l,labelProps:{style:{marginBottom:".25em"}},children:({value:d,onChange:u,name:y,error:h})=>_.jsx(_.Fragment,{children:s.map(m=>_.jsx(rt,{name:y,checked:d===m.value,onChange:()=>u(m.value),label:m.label,disabled:o||m.disabled,error:h},m.value))})})}function bs({name:e,label:r,required:t,options:s,children:o,disabled:n,className:a,style:l,indent:d=!0}){return _.jsx(ce,{name:e,label:r,required:t,disabled:n,className:a,style:l,indent:d,labelProps:{style:{marginBottom:".25em"}},children:({value:u,onChange:y,name:h,error:m})=>{const w=Array.isArray(u)?u:[],V=(g,z)=>{y(z?[...w,g]:w.filter(x=>x!==g))};return _.jsx(_.Fragment,{children:s?s.map(g=>_.jsx(ze,{name:`${h}[]`,checked:w.includes(g.value),onChange:z=>V(g.value,z.target.checked),label:g.label,disabled:n||g.disabled,error:m},g.value)):C.Children.map(o,g=>{if(C.isValidElement(g)&&g.type===ze){const z=g.props.value||g.props.name;return C.cloneElement(g,{name:`${h}[]`,checked:w.includes(z),onChange:x=>V(z,x.target.checked),error:m||g.props.error,disabled:n||g.props.disabled})}return g})})}})}const Fe={hamburger:"Hamburger-module__hamburger___Tf4-t",line:"Hamburger-module__line___gybZM",open:"Hamburger-module__open___gRswh"},Ss=({compact:e,color:r,visible:t,border:s})=>{const o=O(),n=e?"1.5em":"2em";return{"--hamburger-border-radius":(s==null?void 0:s.radius)||o.border.radius,color:r||"inherit",display:t?"flex":"none",width:n,height:n}},sr=({color:e,visible:r,compact:t,hamburgerRef:s,open:o=!1,border:n,setOpen:a,className:l,style:d})=>{const u=Ss({compact:t,color:e,visible:r,border:n}),y=[Fe.hamburger,o?Fe.open:"",l].filter(Boolean).join(" ");return _.jsxs("button",{ref:s,className:y,onClick:()=>a(!o),style:{...u,...d},"aria-label":"Toggle menu","aria-expanded":o,children:[_.jsx("div",{className:Fe.line}),_.jsx("div",{className:Fe.line}),_.jsx("div",{className:Fe.line})]})},or={header:"Header-module__header___RUooH",container:"Header-module__container___t68M9"},Fs=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:a,margin:l,gap:d,backgroundColor:u,color:y}={})=>{const h=O();return{"--header-max-width":r||h.layout.maxWidth,"--header-min-width":t,"--header-width":s,"--header-height":o,"--header-padding":e?n||h.layout.paddingSm:a||h.layout.padding,"--header-margin":l,"--header-gap":d,backgroundColor:u,color:y}},ne=e=>{const r=typeof window<"u"&&typeof window.matchMedia=="function",t=n=>{if(!r)return()=>{};const a=window.matchMedia(e);return a.addEventListener("change",n),()=>a.removeEventListener("change",n)},s=()=>r?window.matchMedia(e).matches:!1,o=()=>!1;return C.useSyncExternalStore(t,s,o)},nr=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:a,paddingSm:l,margin:d,gap:u,breakpoint:y,fixed:h=!1,children:m,className:w,style:V,headerProps:g})=>{const z=O(),x=y||z.breakpoints.sm,{maxWidth:S,unit:E}=_e(x),$=ne(`(max-width: ${S}${E})`),A=Fs({isSmallScreen:$,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:a,margin:d,gap:u,backgroundColor:e,color:r}),M=[or.container,w].filter(Boolean).join(" "),W=h?{position:"fixed",top:0,left:0,right:0,zIndex:1e3}:{};return _.jsx("header",{...g,className:or.header,style:W,children:_.jsx("div",{className:M,style:{...A,...V},children:m})})},me={nav:"ResponsiveNav-module__nav___xOfv5",navMobile:"ResponsiveNav-module__navMobile___h795P",navHeader:"ResponsiveNav-module__navHeader___Me8bB",compact:"ResponsiveNav-module__compact___UhuAE",open:"ResponsiveNav-module__open___WDCAf",navDesktop:"ResponsiveNav-module__navDesktop___9wscZ"},Cs=({isMobile:e,isCompact:r,mobile:t,desktop:s})=>{const o=O();return C.useMemo(()=>{if(e){const n=(t==null?void 0:t.backgroundColor)||o.colors.primary,a=(t==null?void 0:t.color)||o.colors.secondary,l=(t==null?void 0:t.activeBackgroundColor)||o.colors.secondary,d=(t==null?void 0:t.activeColor)||o.colors.primary,u=r||t!=null&&t.compact?"1.5rem":"2rem";return{navStyles:{backgroundColor:n,color:a,fontSize:u,...t==null?void 0:t.style},linkActiveStyles:{backgroundColor:l,color:d},linkHoverStyles:{}}}else{const n=s==null?void 0:s.backgroundColor,a=(s==null?void 0:s.color)||o.fonts.color,l=(s==null?void 0:s.hoverOpacity)??.5,d=s==null?void 0:s.activeBackgroundColor,u=s==null?void 0:s.activeColor;return{navStyles:{...n&&{backgroundColor:n},color:a,...s==null?void 0:s.style},linkActiveStyles:{...d&&{backgroundColor:d},...u&&{color:u},opacity:d||u?1:l},linkHoverStyles:{opacity:l}}}},[e,r,t,s,o])},ws=({mobile:e,desktop:r,breakpoints:t,children:s,className:o,style:n,navProps:a})=>{var R;const[l,d]=C.useState(!1),u=C.useRef(null),y=C.useRef(null),h=O(),m={...h.breakpoints,...t},{maxWidth:w,unit:V}=_e(m.md),{maxWidth:g,unit:z}=_e(m.sm),x=ne(`(max-width: ${w}${V})`),S=ne(`(max-width: ${g}${z})`),{navStyles:E,linkActiveStyles:$,linkHoverStyles:A}=Cs({isMobile:x,isCompact:S,mobile:e,desktop:r}),M={...E,...$.backgroundColor&&{"--mobile-active-bg":$.backgroundColor},...$.color&&{"--mobile-active-color":$.color},...A.opacity!==void 0&&{"--desktop-hover-opacity":A.opacity}};C.useEffect(()=>{if(x&&l){const B=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${B}px`,document.body.style.width="100%",()=>{document.body.style.position="",document.body.style.top="",document.body.style.width="",window.scrollTo(0,B)}}},[x,l]),C.useEffect(()=>{const B=D=>{!y.current||y.current.contains(D.target)||u.current&&u.current.contains(D.target)||d(!1)};return document.addEventListener("mousedown",B),()=>{document.removeEventListener("mousedown",B)}},[u,y,d]);const W=[me.nav,x?me.navMobile:me.navDesktop,x&&l?me.open:"",x&&(S||e!=null&&e.compact)?me.compact:"",o].filter(Boolean).join(" "),oe=B=>{if(!x)return;B.target.closest("a, button")&&d(!1)},q=x?(e==null?void 0:e.content)||s:(r==null?void 0:r.content)||s,le=l?(e==null?void 0:e.hamburgerColor)||(e==null?void 0:e.color)||h.colors.secondary:(R=e==null?void 0:e.hamburgerProps)==null?void 0:R.color;return _.jsxs(_.Fragment,{children:[_.jsx(sr,{hamburgerRef:u,visible:x,compact:S,open:l,setOpen:d,color:le,...e==null?void 0:e.hamburgerProps}),_.jsxs("nav",{...a,ref:y,className:W,style:{...M,...n},onClickCapture:oe,children:[x&&l&&_.jsx("div",{className:me.navHeader}),typeof q=="function"?q({setOpen:d}):q]})]})},ar=({color:e,backgroundColor:r,fullScreen:t=!0,className:s,style:o,divProps:n})=>{const a=O(),l=e||a.colors.primary,d=r||a.colors.secondary,u=_.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}`}}),y=_.jsxs(_.Fragment,{children:[u,_.jsx("style",{children:`
|
|
18
18
|
@keyframes spin {
|
|
19
19
|
0% { transform: rotate(0deg); }
|
|
20
20
|
100% { transform: rotate(360deg); }
|
|
21
21
|
}
|
|
22
|
-
`})]});return t?_.jsx("div",{...n,className:s,style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw",...o},children:y}):y},Vs=({children:e,loadingComponent:r})=>{const[t,s]=C.useState(!1);return C.useEffect(()=>{requestAnimationFrame(()=>{s(!0)})},[]),t?_.jsx(_.Fragment,{children:e}):r||_.jsx(ar,{})},st={stack:"Stack-module__stack___yUU-B",vertical:"Stack-module__vertical___sKTyQ",horizontal:"Stack-module__horizontal___YsvtV"},
|
|
22
|
+
`})]});return t?_.jsx("div",{...n,className:s,style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",width:"100vw",...o},children:y}):y},Vs=({children:e,loadingComponent:r})=>{const[t,s]=C.useState(!1);return C.useEffect(()=>{requestAnimationFrame(()=>{s(!0)})},[]),t?_.jsx(_.Fragment,{children:e}):r||_.jsx(ar,{})},st={stack:"Stack-module__stack___yUU-B",vertical:"Stack-module__vertical___sKTyQ",horizontal:"Stack-module__horizontal___YsvtV"},xs=({direction:e="column",children:r,className:t,style:s,divProps:o})=>{const n=[st.stack,e==="row"?st.horizontal:st.vertical,t].filter(Boolean).join(" ");return _.jsx("div",{...o,className:n,style:s,children:r})},ir={section:"ResponsiveSection-module__section___gBESK",innerDiv:"ResponsiveSection-module__innerDiv___r1bky"},ot=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:a,paddingSm:l,margin:d,gap:u,verticalRhythm:y=3,children:h,className:m,style:w,sectionProps:V})=>{const g=O(),z=ne(`(min-width: ${g.breakpoints.sm})`),x={backgroundColor:e,color:r||g.fonts.color,margin:d,...w},S=`calc(${g.fonts.rhythm} * ${y})`,E=z?a||g.layout.padding:l||g.layout.paddingSm,$={"--max-width":t||g.layout.maxWidth,"--min-width":s,"--width":o,"--height":n,"--section-padding":`${S} ${E}`,"--gap":u},A=[ir.section,m].filter(Boolean).join(" ");return _.jsx("section",{...V,className:A,style:x,children:_.jsx("div",{className:ir.innerDiv,style:$,children:h})})},lr={hero:"Hero-module__hero___IB2tg",content:"Hero-module__content___rkkfQ"},ks=({isMd:e=!1,isLg:r=!1,theme:t})=>C.useMemo(()=>{const{rhythm:s}=t.fonts;let o=`calc(${s} * 2) 0`,n="2rem",a="1.125rem";return r?(o=`calc(${s} * 4) 0`,n="3.5rem",a="1.5rem"):e&&(o=`calc(${s} * 3.5) 0`,n="3rem",a="1.25rem"),{"--hero-padding":o,"--hero-h1-font-size":n,"--hero-p-font-size":a,"--hero-h1-margin-bottom":`calc(${s} * 0.7)`}},[e,r,t.fonts]),zs=({color:e,breakpoints:r,children:t,className:s,style:o,...n})=>{const a=O(),l=[lr.hero,s].filter(Boolean).join(" "),d=(r==null?void 0:r.md)||a.breakpoints.md,u=(r==null?void 0:r.lg)||a.breakpoints.lg,y=ne(`(min-width: ${d})`),h=ne(`(min-width: ${u})`),m=ks({isMd:y,isLg:h,theme:a});return _.jsx(ot,{className:l,color:e||a.fonts.color,style:{...m,...o},...n,children:_.jsx("div",{className:lr.content,children:t})})},cr={footer:"Footer-module__footer___A76NF",container:"Footer-module__container___QneNs"},$s=({isSmallScreen:e=!1,maxWidth:r,minWidth:t,width:s,height:o,paddingSm:n,padding:a,margin:l,gap:d,backgroundColor:u,color:y}={})=>{const h=O();return{maxWidth:r||h.layout.maxWidth,minWidth:t,width:s,height:o,padding:e?n||h.layout.paddingSm:a||h.layout.padding,margin:l,gap:d,backgroundColor:u,color:y||h.fonts.color}},ur=({backgroundColor:e,color:r,maxWidth:t,minWidth:s,width:o,height:n,padding:a,paddingSm:l,margin:d,gap:u,breakPoint:y,children:h,className:m,style:w,footerProps:V})=>{const g=O(),z=y||g.breakpoints.sm,{maxWidth:x,unit:S}=_e(z),E=ne(`(max-width: ${x}${S})`),$=$s({isSmallScreen:E,maxWidth:t,minWidth:s,width:o,height:n,paddingSm:l,padding:a,margin:d,gap:u,backgroundColor:e,color:r}),A=[cr.container,m].filter(Boolean).join(" ");return _.jsx("footer",{...V,className:cr.footer,children:_.jsx("div",{className:A,style:{...$,...w},children:h})})},De={card:"FeatureCard-module__card___XQt66",icon:"FeatureCard-module__icon___dXJ92",title:"FeatureCard-module__title___KxXyA",content:"FeatureCard-module__content___68xkw"},Es=({isMd:e=!1,theme:r})=>C.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]),As=({breakpoint:e,icon:r,title:t,children:s,className:o,style:n,divProps:a})=>{const l=O(),d=[De.card,o].filter(Boolean).join(" "),u=e||l.breakpoints.md,y=ne(`(min-width: ${u})`),h=Es({isMd:y,theme:l});return _.jsxs("div",{...a,className:d,style:{...h,...n},children:[r&&_.jsx("div",{className:De.icon,children:r}),_.jsx("h3",{className:De.title,children:t}),_.jsx("div",{className:De.content,children:s})]})},dr={section:"FeatureGridSection-module__section___wZrbC",grid:"FeatureGridSection-module__grid___iwPJv"},Ns=({columns:e,isMd:r=!1,isLg:t=!1})=>C.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]),Bs=({columns:e=3,breakpoints:r,gap:t,children:s,className:o,style:n,...a})=>{const l=O(),d=[dr.section,o].filter(Boolean).join(" "),u=(r==null?void 0:r.md)||l.breakpoints.md,y=(r==null?void 0:r.lg)||l.breakpoints.lg,h=ne(`(min-width: ${u})`),m=ne(`(min-width: ${y})`),w=Ns({columns:e,isMd:h,isLg:m}),V={"--section-padding-vertical":`calc(${l.fonts.rhythm} * 2)`},g={...w,gap:t,...n};return _.jsx(ot,{className:d,style:V,...a,children:_.jsx("div",{className:dr.grid,style:g,children:s})})},nt={layoutContainer:"PageLayout-module__layoutContainer___diLdT",content:"PageLayout-module__content___h2mBr",main:"PageLayout-module__main___Sw7Pv"},Ds=({header:e,footer:r,children:t,className:s,style:o,headerProps:n,footerProps:a,divProps:l,mainProps:d})=>{const u=[nt.layoutContainer,s].filter(Boolean).join(" ");return _.jsxs("div",{...l,className:u,style:o,children:[_.jsxs("div",{className:nt.content,children:[e&&_.jsx(nr,{...n,children:e}),_.jsx("main",{...d,className:nt.main,children:t})]}),r&&_.jsx(ur,{...a,children:r})]})};N.Button=wr,N.CSSReset=Er,N.Checkbox=ze,N.FeatureCard=As,N.FeatureGridSection=Bs,N.Footer=ur,N.Form=ls,N.FormCheckbox=gs,N.FormCheckboxGroup=bs,N.FormError=Xt,N.FormField=ce,N.FormGroup=Rt,N.FormInput=ds,N.FormLabel=ke,N.FormRadio=vs,N.FormRadioGroup=ps,N.FormSelect=ms,N.FormTextarea=ys,N.Hamburger=sr,N.Header=nr,N.Hero=zs,N.Input=er,N.LoadingSpinner=ar,N.PageLayout=Ds,N.Radio=rt,N.ResponsiveNav=ws,N.ResponsiveSection=ot,N.Select=rr,N.Stack=xs,N.StyleLoader=Vs,N.Textarea=tr,N.ThemeProvider=Cr,N.parseBreakpoint=_e,N.useFormContext=Yt,N.useTheme=O,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})}));
|