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