@alfadocs/ui-kit-debug 1.119.0 → 1.121.0
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/assets/map-pin@2x.png +0 -0
- package/assets/map-pin@2x.source.json +5 -0
- package/dist/_chunks/{address-autocomplete-zLygkxFc.js → address-autocomplete-D2uNpxcE.js} +2 -2
- package/dist/_chunks/{address-autocomplete-zLygkxFc.js.map → address-autocomplete-D2uNpxcE.js.map} +1 -1
- package/dist/_chunks/{address-fields-Dl1ALKhP.js → address-fields-BU65pA-V.js} +2 -2
- package/dist/_chunks/{address-fields-Dl1ALKhP.js.map → address-fields-BU65pA-V.js.map} +1 -1
- package/dist/_chunks/map-view-h6ngp2xi.js +1578 -0
- package/dist/_chunks/map-view-h6ngp2xi.js.map +1 -0
- package/dist/_chunks/maps-core-gate-DKx96CC_.js +1492 -0
- package/dist/_chunks/{maps-core-gate-C4dyo1ic.js.map → maps-core-gate-DKx96CC_.js.map} +1 -1
- package/dist/_chunks/{practice-results-b3uchdBn.js → practice-results-yCresv86.js} +759 -750
- package/dist/_chunks/practice-results-yCresv86.js.map +1 -0
- package/dist/_chunks/{registration-form-CMXefBnC.js → registration-form-CwbhtKcy.js} +180 -165
- package/dist/_chunks/registration-form-CwbhtKcy.js.map +1 -0
- package/dist/_chunks/{reserved.agent-V2Eqoabh.js → reserved.agent-DRSZ8UcL.js} +2 -2
- package/dist/_chunks/{reserved.agent-V2Eqoabh.js.map → reserved.agent-DRSZ8UcL.js.map} +1 -1
- package/dist/_chunks/{workflow-webhook-action-dgUjv9T7.js → workflow-webhook-action-Cae02r_4.js} +264 -289
- package/dist/_chunks/workflow-webhook-action-Cae02r_4.js.map +1 -0
- package/dist/agent-catalog.json +1 -9
- package/dist/agent-i18n/en.json +0 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view-pin-geometry.d.ts +39 -0
- package/dist/components/map-view/map-view-pin-geometry.d.ts.map +1 -0
- package/dist/components/map-view/map-view-pin.d.ts +15 -0
- package/dist/components/map-view/map-view-pin.d.ts.map +1 -0
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +8 -0
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/i18n/locales/ar.d.ts +2 -5
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +2 -5
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +2 -5
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +2 -5
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +2 -5
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +2 -5
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +2 -5
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +2 -5
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +2 -5
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +2 -5
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +2 -5
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +2 -5
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +2 -5
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +2 -5
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +2 -5
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +2 -5
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +2 -5
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +2 -5
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +2 -5
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +2 -5
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +2 -5
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +2 -5
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +2 -5
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +2 -5
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +2 -5
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +2 -5
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +2 -5
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +2 -5
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +2 -5
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +2 -5
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +2 -5
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +2 -5
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +2 -5
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +2 -5
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +2 -5
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +2 -5
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/locales/ar.json +2 -5
- package/dist/locales/de.json +2 -5
- package/dist/locales/el.json +2 -5
- package/dist/locales/en.json +2 -5
- package/dist/locales/es.json +2 -5
- package/dist/locales/fr.json +2 -5
- package/dist/locales/hi.json +2 -5
- package/dist/locales/it.json +2 -5
- package/dist/locales/ja.json +2 -5
- package/dist/locales/nl.json +2 -5
- package/dist/locales/pl.json +2 -5
- package/dist/locales/pt.json +2 -5
- package/dist/locales/ro.json +2 -5
- package/dist/locales/ru.json +2 -5
- package/dist/locales/sq.json +2 -5
- package/dist/locales/sv.json +2 -5
- package/dist/locales/tr.json +2 -5
- package/dist/locales/zh.json +2 -5
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/workflow-webhook-action.d.ts.map +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +4 -1
- package/dist/_chunks/key-round-DIgsnJSg.js +0 -21
- package/dist/_chunks/key-round-DIgsnJSg.js.map +0 -1
- package/dist/_chunks/map-view-CHeGd94F.js +0 -1443
- package/dist/_chunks/map-view-CHeGd94F.js.map +0 -1
- package/dist/_chunks/maps-core-gate-C4dyo1ic.js +0 -1571
- package/dist/_chunks/practice-results-b3uchdBn.js.map +0 -1
- package/dist/_chunks/registration-form-CMXefBnC.js.map +0 -1
- package/dist/_chunks/workflow-webhook-action-dgUjv9T7.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsx as n, jsxs as g, Fragment as Ae } from "react/jsx-runtime";
|
|
2
|
-
import { useState as v, useRef as L, useEffect as
|
|
2
|
+
import { useState as v, useRef as L, useEffect as k, useCallback as be, forwardRef as yn, useId as Ne, useMemo as Fn, Fragment as xn } from "react";
|
|
3
3
|
import { useTranslation as fe, Trans as Lr } from "react-i18next";
|
|
4
4
|
import { c as ne } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { parsePhoneNumberFromString as Sn } from "libphonenumber-js/min";
|
|
6
6
|
import { i as tr } from "./isEmail-BfVspSvV.js";
|
|
7
7
|
import { A as le } from "./alert-C4WKViaS.js";
|
|
8
|
-
import { B as
|
|
8
|
+
import { B as G } from "./button-DohK_Ak_.js";
|
|
9
9
|
import { C as Ar } from "./card-n6W6LW-N.js";
|
|
10
|
-
import { C as
|
|
11
|
-
import { D as
|
|
10
|
+
import { C as kn } from "./checkbox-DV4sNDeB.js";
|
|
11
|
+
import { D as En } from "./dev-bypass-button-B7ePcJcg.js";
|
|
12
12
|
import { E as Pr } from "./email-input-DxwbREpx.js";
|
|
13
13
|
import { E as In } from "./error-summary-DxNhwf_G.js";
|
|
14
14
|
import { F as W } from "./form-field-CyHfOVKF.js";
|
|
@@ -22,34 +22,49 @@ import { S as Dr } from "./state-backed-text-input-DVETOhSS.js";
|
|
|
22
22
|
import { i as Zr } from "./is-development-CLUAnsU7.js";
|
|
23
23
|
import { u as Br } from "./use-state-backed-input-DhRQo6gM.js";
|
|
24
24
|
import { a as Vr, i as qn } from "./safe-href-5dbsfbQn.js";
|
|
25
|
-
import { u as
|
|
25
|
+
import { u as Mr } from "./use-field-match-C8ug3sdQ.js";
|
|
26
26
|
import { B as Tn } from "./brand-mark-DLk9kD8g.js";
|
|
27
|
-
import { u as Dn, b as Bn, a as
|
|
28
|
-
import { O as
|
|
27
|
+
import { u as Dn, b as Bn, a as Mn } from "./use-registration-submit-CLGHxwoT.js";
|
|
28
|
+
import { O as On } from "./otp-input-gV1446Dw.js";
|
|
29
29
|
import { C as _n } from "./circle-check-BN6rz4NV.js";
|
|
30
30
|
import { P as en } from "./pencil-B1sKKyuT.js";
|
|
31
31
|
import { L as jn } from "./log-in-OQUEoGhX.js";
|
|
32
|
-
import {
|
|
33
|
-
import { C as
|
|
34
|
-
import { C as
|
|
32
|
+
import { c as Hn } from "./createLucideIcon-DhHxpK9K.js";
|
|
33
|
+
import { C as zn } from "./check-DrFSN__t.js";
|
|
34
|
+
import { C as $n } from "./circle-alert-rGDZ73Wh.js";
|
|
35
|
+
/**
|
|
36
|
+
* @license lucide-react v1.22.0 - ISC
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the ISC license.
|
|
39
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
40
|
+
*/
|
|
35
41
|
const Un = [
|
|
42
|
+
[
|
|
43
|
+
"path",
|
|
44
|
+
{
|
|
45
|
+
d: "M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",
|
|
46
|
+
key: "1s6t7t"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
["circle", { cx: "16.5", cy: "7.5", r: ".5", fill: "currentColor", key: "w0ekpg" }]
|
|
50
|
+
], Wn = Hn("key-round", Un), Gn = [
|
|
36
51
|
"invalid",
|
|
37
52
|
"expired",
|
|
38
53
|
"rate_limited",
|
|
39
54
|
"error"
|
|
40
|
-
], ye = { ok: !1, reason: "error" },
|
|
41
|
-
function
|
|
55
|
+
], ye = { ok: !1, reason: "error" }, Or = (s) => typeof s == "number" && Number.isFinite(s) && s >= 0 ? s : void 0;
|
|
56
|
+
function Kn(s) {
|
|
42
57
|
if (typeof s != "object" || s === null) return null;
|
|
43
58
|
const r = s;
|
|
44
59
|
if (typeof r.ok != "boolean") return null;
|
|
45
60
|
const c = { ok: r.ok };
|
|
46
|
-
typeof r.message == "string" && (c.message = r.message),
|
|
47
|
-
const t =
|
|
61
|
+
typeof r.message == "string" && (c.message = r.message), Gn.includes(r.reason) && (c.reason = r.reason);
|
|
62
|
+
const t = Or(r.retryAfterSeconds);
|
|
48
63
|
t !== void 0 && (c.retryAfterSeconds = t);
|
|
49
|
-
const d =
|
|
64
|
+
const d = Or(r.resendAfterSeconds);
|
|
50
65
|
return d !== void 0 && (c.resendAfterSeconds = d), typeof r.devCode == "string" && (c.devCode = r.devCode), typeof r.value == "string" && (c.value = r.value), c;
|
|
51
66
|
}
|
|
52
|
-
function
|
|
67
|
+
function Xn(s) {
|
|
53
68
|
const r = s.headers.get("Retry-After");
|
|
54
69
|
if (!(!r || !/^\d+$/.test(r.trim())))
|
|
55
70
|
return Number(r.trim());
|
|
@@ -78,9 +93,9 @@ async function _r(s, r) {
|
|
|
78
93
|
} catch {
|
|
79
94
|
d = null;
|
|
80
95
|
}
|
|
81
|
-
const w =
|
|
96
|
+
const w = Kn(d);
|
|
82
97
|
if (t) {
|
|
83
|
-
const m = w ?? { ok: !1 }, i = m.retryAfterSeconds ??
|
|
98
|
+
const m = w ?? { ok: !1 }, i = m.retryAfterSeconds ?? Xn(c) ?? void 0;
|
|
84
99
|
return {
|
|
85
100
|
...m,
|
|
86
101
|
ok: !1,
|
|
@@ -106,57 +121,57 @@ function jr(s) {
|
|
|
106
121
|
onVerifyCode: s.onVerifyCode
|
|
107
122
|
};
|
|
108
123
|
}
|
|
109
|
-
const Hr = 6,
|
|
124
|
+
const Hr = 6, Jn = 30, zr = (s) => ({
|
|
110
125
|
reason: s.reason ?? "error",
|
|
111
126
|
message: s.message
|
|
112
127
|
});
|
|
113
|
-
function
|
|
128
|
+
function $r({
|
|
114
129
|
config: s,
|
|
115
130
|
value: r
|
|
116
131
|
}) {
|
|
117
132
|
const c = (s == null ? void 0 : s.codeLength) ?? Hr, [t, d] = v("idle"), [w, m] = v(""), [i, b] = v(
|
|
118
133
|
null
|
|
119
|
-
), [se, N] = v(0), [
|
|
134
|
+
), [se, N] = v(0), [K, E] = v(), [q, O] = v(""), X = L({ config: s, value: r });
|
|
120
135
|
X.current = { config: s, value: r };
|
|
121
136
|
const A = L(0), [I] = v(
|
|
122
137
|
() => (s == null ? void 0 : s.verified) === !0 ? r : null
|
|
123
138
|
), [J, _] = v(!1), Y = (s == null ? void 0 : s.verified) === !0 && !J, Q = Y || t === "verified", Z = L(!1);
|
|
124
|
-
|
|
139
|
+
k(() => {
|
|
125
140
|
var u, C;
|
|
126
141
|
t === "verified" && !Z.current && (Z.current = !0, (C = (u = X.current.config) == null ? void 0 : u.onVerifiedChange) == null || C.call(u, !0));
|
|
127
|
-
}, [t]),
|
|
142
|
+
}, [t]), k(() => {
|
|
128
143
|
if (se <= 0) return;
|
|
129
144
|
const u = setTimeout(() => N((C) => C - 1), 1e3);
|
|
130
145
|
return () => clearTimeout(u);
|
|
131
146
|
}, [se]);
|
|
132
147
|
const R = (u, C) => u.trim().toLowerCase() === C.trim().toLowerCase();
|
|
133
|
-
|
|
148
|
+
k(() => {
|
|
134
149
|
J && I !== null && R(r, I) && _(!1);
|
|
135
150
|
}, [r]);
|
|
136
151
|
const y = be(() => {
|
|
137
|
-
A.current += 1, d((u) => u === "verified" ? u : "idle"), m(""), b(null),
|
|
152
|
+
A.current += 1, d((u) => u === "verified" ? u : "idle"), m(""), b(null), E(void 0), O(""), N(0);
|
|
138
153
|
}, []);
|
|
139
|
-
|
|
154
|
+
k(() => {
|
|
140
155
|
t !== "verified" && (t === "sent" || t === "verifying" || t === "sending") && r !== q && y();
|
|
141
156
|
}, [r, q, t, y]);
|
|
142
157
|
const ae = L(r);
|
|
143
|
-
|
|
158
|
+
k(() => {
|
|
144
159
|
ae.current !== r && (ae.current = r, t === "idle" && b(null));
|
|
145
160
|
}, [r, t]);
|
|
146
161
|
const Pe = be(() => {
|
|
147
162
|
const { config: u, value: C } = X.current;
|
|
148
163
|
if (!u) return;
|
|
149
164
|
const T = A.current += 1;
|
|
150
|
-
d("sending"), b(null), m(""),
|
|
165
|
+
d("sending"), b(null), m(""), O(C), jr(u).onSendCode(C).then(
|
|
151
166
|
(x) => x,
|
|
152
167
|
() => ({ ok: !1, reason: "error" })
|
|
153
168
|
).then((x) => {
|
|
154
169
|
if (T === A.current) {
|
|
155
170
|
if (x.ok) {
|
|
156
|
-
d("sent"),
|
|
171
|
+
d("sent"), E(x.devCode), N(x.resendAfterSeconds ?? Jn);
|
|
157
172
|
return;
|
|
158
173
|
}
|
|
159
|
-
d("idle"),
|
|
174
|
+
d("idle"), O(""), b(zr(x)), x.reason === "rate_limited" && x.retryAfterSeconds && N(x.retryAfterSeconds);
|
|
160
175
|
}
|
|
161
176
|
});
|
|
162
177
|
}, []), qe = be(
|
|
@@ -172,16 +187,16 @@ function zr({
|
|
|
172
187
|
).then((D) => {
|
|
173
188
|
if (Te === A.current) {
|
|
174
189
|
if (D.ok) {
|
|
175
|
-
d("verified"), m(""),
|
|
190
|
+
d("verified"), m(""), E(void 0), N(0);
|
|
176
191
|
return;
|
|
177
192
|
}
|
|
178
|
-
d("sent"), m(""), b(
|
|
193
|
+
d("sent"), m(""), b(zr(D)), D.reason === "rate_limited" && D.retryAfterSeconds && N(D.retryAfterSeconds), D.reason === "expired" && N(0);
|
|
179
194
|
}
|
|
180
195
|
});
|
|
181
196
|
},
|
|
182
197
|
[w]
|
|
183
198
|
), F = Y && (s == null ? void 0 : s.allowChange) === !0, ue = be(() => {
|
|
184
|
-
A.current += 1, _(!0), d("idle"), m(""), b(null),
|
|
199
|
+
A.current += 1, _(!0), d("idle"), m(""), b(null), E(void 0), O(""), N(0);
|
|
185
200
|
}, []), j = be((u) => {
|
|
186
201
|
m(u), b((C) => C && null);
|
|
187
202
|
}, []);
|
|
@@ -194,7 +209,7 @@ function zr({
|
|
|
194
209
|
setCode: j,
|
|
195
210
|
failure: i,
|
|
196
211
|
cooldown: se,
|
|
197
|
-
devCode:
|
|
212
|
+
devCode: K,
|
|
198
213
|
sentTo: q,
|
|
199
214
|
send: Pe,
|
|
200
215
|
verify: qe,
|
|
@@ -231,7 +246,7 @@ function Wr({
|
|
|
231
246
|
if (s.status !== "idle" && !t) return null;
|
|
232
247
|
const d = s.cooldown > 0;
|
|
233
248
|
return /* @__PURE__ */ n(
|
|
234
|
-
|
|
249
|
+
G,
|
|
235
250
|
{
|
|
236
251
|
type: "button",
|
|
237
252
|
intent: "secondary",
|
|
@@ -249,7 +264,7 @@ function Wr({
|
|
|
249
264
|
}
|
|
250
265
|
);
|
|
251
266
|
}
|
|
252
|
-
function
|
|
267
|
+
function Gr({
|
|
253
268
|
field: s,
|
|
254
269
|
state: r,
|
|
255
270
|
canChange: c = !0,
|
|
@@ -257,18 +272,18 @@ function Kr({
|
|
|
257
272
|
onUnlocked: d,
|
|
258
273
|
onVerified: w
|
|
259
274
|
}) {
|
|
260
|
-
const { t: m } = fe("ui"), i = L(null), b = rn(r.failure), se = r.status === "sent" || r.status === "verifying", N = r.status === "verifying",
|
|
275
|
+
const { t: m } = fe("ui"), i = L(null), b = rn(r.failure), se = r.status === "sent" || r.status === "verifying", N = r.status === "verifying", K = r.code.length === r.codeLength, E = () => {
|
|
261
276
|
var R, y;
|
|
262
277
|
return (y = (R = i.current) == null ? void 0 : R.querySelector("input")) == null ? void 0 : y.focus();
|
|
263
|
-
}, q = L(r.status),
|
|
264
|
-
|
|
278
|
+
}, q = L(r.status), O = L(r.failure);
|
|
279
|
+
k(() => {
|
|
265
280
|
const R = q.current;
|
|
266
|
-
q.current = r.status, r.status === "sent" && R === "sending" &&
|
|
267
|
-
}, [r.status]),
|
|
268
|
-
r.failure && r.failure !==
|
|
281
|
+
q.current = r.status, r.status === "sent" && R === "sending" && E(), r.status === "sent" && R === "verifying" && r.failure && E(), r.status === "verified" && R === "verifying" && w();
|
|
282
|
+
}, [r.status]), k(() => {
|
|
283
|
+
r.failure && r.failure !== O.current && r.status === "sent" && E(), O.current = r.failure;
|
|
269
284
|
}, [r.failure, r.status]);
|
|
270
285
|
const [X, A] = v(""), I = r.cooldown > 0, J = L(!1);
|
|
271
|
-
|
|
286
|
+
k(() => {
|
|
272
287
|
I && !J.current ? A(
|
|
273
288
|
m("registrationForm.verification.resendIn", {
|
|
274
289
|
seconds: r.cooldown
|
|
@@ -292,7 +307,7 @@ function Kr({
|
|
|
292
307
|
/* @__PURE__ */ n("span", { children: Z })
|
|
293
308
|
] }) : X }),
|
|
294
309
|
t && r.changeable && /* @__PURE__ */ n(
|
|
295
|
-
|
|
310
|
+
G,
|
|
296
311
|
{
|
|
297
312
|
type: "button",
|
|
298
313
|
intent: "secondary",
|
|
@@ -316,7 +331,7 @@ function Kr({
|
|
|
316
331
|
label: m("registrationForm.verification.codeLabel"),
|
|
317
332
|
error: b,
|
|
318
333
|
children: /* @__PURE__ */ n(
|
|
319
|
-
|
|
334
|
+
On,
|
|
320
335
|
{
|
|
321
336
|
length: r.codeLength,
|
|
322
337
|
mode: "numeric",
|
|
@@ -331,22 +346,22 @@ function Kr({
|
|
|
331
346
|
),
|
|
332
347
|
/* @__PURE__ */ g("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
333
348
|
/* @__PURE__ */ n(
|
|
334
|
-
|
|
349
|
+
G,
|
|
335
350
|
{
|
|
336
351
|
type: "button",
|
|
337
352
|
intent: "primary",
|
|
338
353
|
size: "md",
|
|
339
354
|
loading: N,
|
|
340
|
-
"aria-disabled": !
|
|
355
|
+
"aria-disabled": !K || void 0,
|
|
341
356
|
"data-action": "verify-code",
|
|
342
357
|
onClick: () => {
|
|
343
|
-
|
|
358
|
+
K && r.verify();
|
|
344
359
|
},
|
|
345
360
|
children: m(N ? "registrationForm.verification.verifying" : "registrationForm.verification.verify")
|
|
346
361
|
}
|
|
347
362
|
),
|
|
348
363
|
/* @__PURE__ */ n(
|
|
349
|
-
|
|
364
|
+
G,
|
|
350
365
|
{
|
|
351
366
|
type: "button",
|
|
352
367
|
intent: "outline",
|
|
@@ -363,7 +378,7 @@ function Kr({
|
|
|
363
378
|
}
|
|
364
379
|
),
|
|
365
380
|
c && /* @__PURE__ */ n(
|
|
366
|
-
|
|
381
|
+
G,
|
|
367
382
|
{
|
|
368
383
|
type: "button",
|
|
369
384
|
intent: "link",
|
|
@@ -380,7 +395,7 @@ function Kr({
|
|
|
380
395
|
}
|
|
381
396
|
);
|
|
382
397
|
}
|
|
383
|
-
function
|
|
398
|
+
function Yn({
|
|
384
399
|
field: s,
|
|
385
400
|
state: r,
|
|
386
401
|
onUnlocked: c
|
|
@@ -401,7 +416,7 @@ function Xn({
|
|
|
401
416
|
}
|
|
402
417
|
),
|
|
403
418
|
/* @__PURE__ */ n(
|
|
404
|
-
|
|
419
|
+
G,
|
|
405
420
|
{
|
|
406
421
|
type: "button",
|
|
407
422
|
intent: "secondary",
|
|
@@ -418,7 +433,7 @@ function Xn({
|
|
|
418
433
|
}
|
|
419
434
|
);
|
|
420
435
|
}
|
|
421
|
-
const
|
|
436
|
+
const Kr = [
|
|
422
437
|
"firstName",
|
|
423
438
|
"lastName",
|
|
424
439
|
"email",
|
|
@@ -428,9 +443,9 @@ const Gr = [
|
|
|
428
443
|
"phone",
|
|
429
444
|
"branch",
|
|
430
445
|
"terms"
|
|
431
|
-
],
|
|
446
|
+
], Qn = ne(
|
|
432
447
|
"ds:@container/registration ds:w-full ds:text-start ds:text-[var(--foreground)]"
|
|
433
|
-
),
|
|
448
|
+
), Zn = ne(
|
|
434
449
|
"ds:grid ds:grid-cols-1 ds:items-start ds:gap-[var(--spacing-md)]",
|
|
435
450
|
{
|
|
436
451
|
variants: {
|
|
@@ -443,7 +458,7 @@ const Gr = [
|
|
|
443
458
|
},
|
|
444
459
|
defaultVariants: { columns: "two" }
|
|
445
460
|
}
|
|
446
|
-
),
|
|
461
|
+
), Vn = ne("ds:relative ds:flex ds:gap-[var(--spacing-sm)]", {
|
|
447
462
|
variants: {
|
|
448
463
|
logo: {
|
|
449
464
|
/** A centred column under the mark. */
|
|
@@ -453,7 +468,7 @@ const Gr = [
|
|
|
453
468
|
}
|
|
454
469
|
},
|
|
455
470
|
defaultVariants: { logo: !0 }
|
|
456
|
-
}),
|
|
471
|
+
}), es = ne(
|
|
457
472
|
"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
458
473
|
{
|
|
459
474
|
variants: {
|
|
@@ -461,12 +476,12 @@ const Gr = [
|
|
|
461
476
|
},
|
|
462
477
|
defaultVariants: { centred: !0 }
|
|
463
478
|
}
|
|
464
|
-
),
|
|
479
|
+
), rs = ne("ds:shrink-0", {
|
|
465
480
|
variants: {
|
|
466
481
|
corner: { true: "ds:absolute ds:top-0 ds:end-0", false: "" }
|
|
467
482
|
},
|
|
468
483
|
defaultVariants: { corner: !0 }
|
|
469
|
-
}),
|
|
484
|
+
}), ns = ne(
|
|
470
485
|
"ds:rounded-[var(--radius-sm)] ds:underline ds:underline-offset-4 ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
471
486
|
{
|
|
472
487
|
variants: {
|
|
@@ -474,17 +489,17 @@ const Gr = [
|
|
|
474
489
|
},
|
|
475
490
|
defaultVariants: { weight: "normal" }
|
|
476
491
|
}
|
|
477
|
-
),
|
|
492
|
+
), ss = ne(
|
|
478
493
|
"ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
479
|
-
),
|
|
494
|
+
), os = ne(
|
|
480
495
|
"ds:text-destructive ds:ms-[var(--spacing-xs)]"
|
|
481
|
-
),
|
|
496
|
+
), ts = {
|
|
482
497
|
minLength: 12,
|
|
483
498
|
uppercase: !0,
|
|
484
499
|
lowercase: !0,
|
|
485
500
|
digit: !0,
|
|
486
501
|
charset: "ascii"
|
|
487
|
-
},
|
|
502
|
+
}, is = "Alfadocs", as = /<(terms|privacy)>([\s\S]*?)<\/\1>/, ds = /<\/?(?!(?:terms|privacy)\b)[a-z][^>]*>/gi, Fe = (s) => s && qn(s) ? s : void 0, Xr = (s) => Object.values(s).some(Boolean), Jr = (s) => {
|
|
488
503
|
var r;
|
|
489
504
|
return ((r = Sn(s)) == null ? void 0 : r.isPossible()) ?? !1;
|
|
490
505
|
};
|
|
@@ -503,7 +518,7 @@ function Le({
|
|
|
503
518
|
target: r ? "_blank" : void 0,
|
|
504
519
|
rel: r ? "noopener noreferrer" : void 0,
|
|
505
520
|
"data-action": t,
|
|
506
|
-
className:
|
|
521
|
+
className: ns({ weight: c }),
|
|
507
522
|
children: [
|
|
508
523
|
d,
|
|
509
524
|
r && /* @__PURE__ */ n("span", { className: "ds:sr-only", children: w("link.opensInNewTab") })
|
|
@@ -518,15 +533,15 @@ function Qr(s) {
|
|
|
518
533
|
if (s.enabled)
|
|
519
534
|
return s.verified ? "verified" : s.status === "sent" || s.status === "verifying" ? "sent" : "idle";
|
|
520
535
|
}
|
|
521
|
-
const
|
|
536
|
+
const cs = [
|
|
522
537
|
["firstName", "lastName"],
|
|
523
538
|
["email", "emailConfirm"],
|
|
524
539
|
["password", "passwordConfirm"],
|
|
525
540
|
["phone", "branch"]
|
|
526
541
|
];
|
|
527
|
-
function
|
|
542
|
+
function ms(s) {
|
|
528
543
|
const r = [];
|
|
529
|
-
for (const c of
|
|
544
|
+
for (const c of cs) {
|
|
530
545
|
const t = c.filter(s);
|
|
531
546
|
if (t.length === 0) continue;
|
|
532
547
|
const d = r[r.length - 1];
|
|
@@ -534,7 +549,7 @@ function ds(s) {
|
|
|
534
549
|
}
|
|
535
550
|
return r;
|
|
536
551
|
}
|
|
537
|
-
const
|
|
552
|
+
const ls = yn(
|
|
538
553
|
({
|
|
539
554
|
title: s,
|
|
540
555
|
description: r,
|
|
@@ -547,10 +562,10 @@ const cs = yn(
|
|
|
547
562
|
errors: b,
|
|
548
563
|
emailReadOnly: se = !1,
|
|
549
564
|
emailDescription: N,
|
|
550
|
-
blockPaste:
|
|
551
|
-
blockCopy:
|
|
565
|
+
blockPaste: K,
|
|
566
|
+
blockCopy: E,
|
|
552
567
|
branches: q,
|
|
553
|
-
passwordPolicy:
|
|
568
|
+
passwordPolicy: O = ts,
|
|
554
569
|
termsHref: X,
|
|
555
570
|
privacyHref: A,
|
|
556
571
|
termsLabel: I,
|
|
@@ -584,43 +599,43 @@ const cs = yn(
|
|
|
584
599
|
phone: (i == null ? void 0 : i.phone) ?? "",
|
|
585
600
|
branch: (i == null ? void 0 : i.branch) ?? "",
|
|
586
601
|
terms: (i == null ? void 0 : i.terms) ?? !1
|
|
587
|
-
})), [
|
|
602
|
+
})), [Me, lr] = v(
|
|
588
603
|
() => Jr((i == null ? void 0 : i.phone) ?? "")
|
|
589
|
-
), [on,
|
|
604
|
+
), [on, Oe] = v(() => ({
|
|
590
605
|
email: !!(i != null && i.email)
|
|
591
606
|
})), [pe, fr] = v(!1), [_e, je] = v(
|
|
592
607
|
() => b ?? {}
|
|
593
|
-
), H =
|
|
608
|
+
), H = $r({
|
|
594
609
|
config: T == null ? void 0 : T.email,
|
|
595
610
|
value: a.email
|
|
596
|
-
}), oe =
|
|
611
|
+
}), oe = $r({
|
|
597
612
|
config: l("phone") ? T == null ? void 0 : T.phone : void 0,
|
|
598
613
|
value: a.phone
|
|
599
|
-
}), he = H.verified, He = oe.verified, Se =
|
|
614
|
+
}), he = H.verified, He = oe.verified, Se = Kr.filter(l), ur = !ee && he && H.changeable, ze = x && H.enabled && !he, $e = x && oe.enabled && !He, tn = Ur(H), an = Ur(oe), M = (e, o) => {
|
|
600
615
|
Be((f) => ({ ...f, [e]: o })), je(
|
|
601
616
|
(f) => f[e] ? { ...f, [e]: void 0 } : f
|
|
602
617
|
);
|
|
603
|
-
}, de = (e) =>
|
|
618
|
+
}, de = (e) => Oe(
|
|
604
619
|
(o) => o[e] ? o : { ...o, [e]: !0 }
|
|
605
620
|
), pr = () => {
|
|
606
621
|
Be((e) => ({
|
|
607
622
|
...e,
|
|
608
623
|
password: "",
|
|
609
624
|
passwordConfirm: ""
|
|
610
|
-
})),
|
|
625
|
+
})), Oe((e) => ({
|
|
611
626
|
...e,
|
|
612
627
|
password: !1,
|
|
613
628
|
passwordConfirm: !1
|
|
614
629
|
}));
|
|
615
630
|
}, ce = (e) => ({
|
|
616
|
-
blockPaste: (
|
|
617
|
-
blockCopy: (
|
|
618
|
-
}), hr = Rn(
|
|
631
|
+
blockPaste: (K == null ? void 0 : K.includes(e)) ?? !1,
|
|
632
|
+
blockCopy: (E == null ? void 0 : E.includes(e)) ?? !1
|
|
633
|
+
}), hr = Rn(O), Ue = Mr({
|
|
619
634
|
value: a.email,
|
|
620
635
|
confirmValue: a.emailConfirm,
|
|
621
636
|
kind: "email",
|
|
622
637
|
submitted: pe
|
|
623
|
-
}), We =
|
|
638
|
+
}), We = Mr({
|
|
624
639
|
value: a.password,
|
|
625
640
|
confirmValue: a.passwordConfirm,
|
|
626
641
|
kind: "password",
|
|
@@ -629,14 +644,14 @@ const cs = yn(
|
|
|
629
644
|
firstName: l("firstName") && a.firstName.trim() === "",
|
|
630
645
|
lastName: l("lastName") && a.lastName.trim() === "",
|
|
631
646
|
// The user cannot fix a locked address, so the server judges it.
|
|
632
|
-
email: !ee && !tr(a.email) ||
|
|
647
|
+
email: !ee && !tr(a.email) || ze,
|
|
633
648
|
emailConfirm: l("emailConfirm") && (a.emailConfirm === "" || !Ue.matches),
|
|
634
649
|
password: a.password === "" || !hr.every((e) => e.test(a.password)),
|
|
635
650
|
passwordConfirm: l("passwordConfirm") && (a.passwordConfirm === "" || !We.matches),
|
|
636
|
-
phone: l("phone") && (a.phone === "" || !
|
|
651
|
+
phone: l("phone") && (a.phone === "" || !Me || $e),
|
|
637
652
|
branch: l("branch") && a.branch === "",
|
|
638
653
|
terms: l("terms") && !a.terms
|
|
639
|
-
},
|
|
654
|
+
}, Ge = (e) => pe || e !== "terms" && on[e] === !0, z = p("registrationForm.required"), $ = {
|
|
640
655
|
firstName: p("registrationForm.firstName"),
|
|
641
656
|
lastName: p("registrationForm.lastName"),
|
|
642
657
|
email: p("registrationForm.email"),
|
|
@@ -645,25 +660,25 @@ const cs = yn(
|
|
|
645
660
|
passwordConfirm: p("registrationForm.passwordConfirm"),
|
|
646
661
|
phone: p("registrationForm.phone"),
|
|
647
662
|
branch: p("registrationForm.branch")
|
|
648
|
-
}, te = (e, o) =>
|
|
649
|
-
firstName: te("firstName",
|
|
650
|
-
lastName: te("lastName",
|
|
651
|
-
email:
|
|
652
|
-
emailConfirm: a.emailConfirm === "" ? te("emailConfirm",
|
|
663
|
+
}, te = (e, o) => Ge(e) && gr[e] ? o : void 0, dn = {
|
|
664
|
+
firstName: te("firstName", z),
|
|
665
|
+
lastName: te("lastName", z),
|
|
666
|
+
email: Ge("email") && !ee && !tr(a.email) ? a.email === "" ? z : p("inputs.email.invalid") : pe && ze ? p("registrationForm.verification.emailRequired") : void 0,
|
|
667
|
+
emailConfirm: a.emailConfirm === "" ? te("emailConfirm", z) : Ue.error,
|
|
653
668
|
password: te(
|
|
654
669
|
"password",
|
|
655
|
-
a.password === "" ?
|
|
670
|
+
a.password === "" ? z : p("registrationForm.passwordInvalid")
|
|
656
671
|
),
|
|
657
|
-
passwordConfirm: a.passwordConfirm === "" ? te("passwordConfirm",
|
|
658
|
-
phone:
|
|
659
|
-
branch: te("branch",
|
|
672
|
+
passwordConfirm: a.passwordConfirm === "" ? te("passwordConfirm", z) : We.error,
|
|
673
|
+
phone: Ge("phone") && l("phone") && (a.phone === "" || !Me) ? a.phone === "" ? z : p("registrationForm.phoneInvalid") : pe && $e ? p("registrationForm.verification.phoneRequired") : void 0,
|
|
674
|
+
branch: te("branch", z),
|
|
660
675
|
terms: te("terms", p("registrationForm.termsRequired"))
|
|
661
676
|
}, cn = {
|
|
662
677
|
email: tn,
|
|
663
678
|
phone: an
|
|
664
|
-
}, [mn] = v(() => (i == null ? void 0 : i.email) ?? ""),
|
|
679
|
+
}, [mn] = v(() => (i == null ? void 0 : i.email) ?? ""), Ke = !!y && De && a.email === mn, ge = Fe(y == null ? void 0 : y.loginHref), ve = Fe(y == null ? void 0 : y.resetPasswordHref), ln = p(
|
|
665
680
|
ge && ve ? "registrationForm.existingAccount.messageSignInOrReset" : ge ? "registrationForm.existingAccount.messageSignIn" : ve ? "registrationForm.existingAccount.messageReset" : "registrationForm.existingAccount.message"
|
|
666
|
-
), P = (e) => e === "email" &&
|
|
681
|
+
), P = (e) => e === "email" && Ke ? ln : _e[e] ?? cn[e] ?? dn[e], ie = L({}), U = Fn(() => {
|
|
667
682
|
const e = (o) => (f) => {
|
|
668
683
|
ie.current[o] = f;
|
|
669
684
|
};
|
|
@@ -683,25 +698,25 @@ const cs = yn(
|
|
|
683
698
|
U.emailConfirm
|
|
684
699
|
), wr = L(null), br = (e) => Se.find((o) => e[o]) ?? (Xr(e) ? "form" : void 0), [Nr] = v(
|
|
685
700
|
() => Se.some((e) => !!(b != null && b[e])) || !!y && De
|
|
686
|
-
), S = Dn(Se, P, Nr), [
|
|
701
|
+
), S = Dn(Se, P, Nr), [ke, Xe] = v(() => {
|
|
687
702
|
const e = Nr ? void 0 : br(b ?? {});
|
|
688
703
|
return e ? { target: e } : null;
|
|
689
704
|
});
|
|
690
|
-
|
|
705
|
+
k(() => {
|
|
691
706
|
var e, o;
|
|
692
|
-
|
|
693
|
-
}, [
|
|
707
|
+
ke && (ke.target === "form" ? (e = wr.current) == null || e.focus() : (o = ie.current[ke.target]) == null || o.focus());
|
|
708
|
+
}, [ke]);
|
|
694
709
|
const Je = l("phone");
|
|
695
|
-
|
|
710
|
+
k(() => {
|
|
696
711
|
const e = ie.current.phone;
|
|
697
712
|
if (!Je || !e) return;
|
|
698
|
-
const o = () =>
|
|
713
|
+
const o = () => Oe(
|
|
699
714
|
(f) => f.phone ? f : { ...f, phone: !0 }
|
|
700
715
|
);
|
|
701
716
|
return e.addEventListener("blur", o), () => e.removeEventListener("blur", o);
|
|
702
717
|
}, [Je]);
|
|
703
718
|
const Ye = L(null), Qe = L(null), [yr, fn] = v(null);
|
|
704
|
-
|
|
719
|
+
k(() => {
|
|
705
720
|
var e;
|
|
706
721
|
yr && ((e = Ye.current) == null || e.requestSubmit());
|
|
707
722
|
}, [yr]);
|
|
@@ -758,12 +773,12 @@ const cs = yn(
|
|
|
758
773
|
// the passwords must not come back with it.
|
|
759
774
|
onRestore: pr
|
|
760
775
|
}), { busy: Ze, captchaFailed: Ve } = Ce;
|
|
761
|
-
|
|
776
|
+
k(() => {
|
|
762
777
|
Ve && Xe({ target: "form" });
|
|
763
778
|
}, [Ve]);
|
|
764
|
-
const re = (e) => V ? j[e] : e, pn = `h${c}`, er = Fe(X), rr = Fe(A), Fr = Fe(R), hn =
|
|
779
|
+
const re = (e) => V ? j[e] : e, pn = `h${c}`, er = Fe(X), rr = Fe(A), Fr = Fe(R), hn = Ke && (ge || ve) ? /* @__PURE__ */ g(Ae, { children: [
|
|
765
780
|
ge && /* @__PURE__ */ n(
|
|
766
|
-
|
|
781
|
+
G,
|
|
767
782
|
{
|
|
768
783
|
asChild: !0,
|
|
769
784
|
intent: "secondary",
|
|
@@ -773,17 +788,17 @@ const cs = yn(
|
|
|
773
788
|
}
|
|
774
789
|
),
|
|
775
790
|
ve && /* @__PURE__ */ n(
|
|
776
|
-
|
|
791
|
+
G,
|
|
777
792
|
{
|
|
778
793
|
asChild: !0,
|
|
779
794
|
intent: "secondary",
|
|
780
|
-
startIcon: /* @__PURE__ */ n(
|
|
795
|
+
startIcon: /* @__PURE__ */ n(Wn, {}),
|
|
781
796
|
"data-action": "reset-password",
|
|
782
797
|
children: /* @__PURE__ */ n("a", { href: ve, children: p("loginForm.forgot") })
|
|
783
798
|
}
|
|
784
799
|
)
|
|
785
800
|
] }) : void 0, xr = (e) => {
|
|
786
|
-
const o = e.replace(
|
|
801
|
+
const o = e.replace(ds, "").split(as);
|
|
787
802
|
return o.map((f, h) => {
|
|
788
803
|
if (h % 3 !== 0) return null;
|
|
789
804
|
const me = o[h + 1], we = o[h + 2], Re = me === "terms" ? er : rr;
|
|
@@ -792,33 +807,33 @@ const cs = yn(
|
|
|
792
807
|
me === void 0 ? null : Re ? /* @__PURE__ */ n(Le, { href: Re, newTab: !0, children: we }) : we
|
|
793
808
|
] }, h);
|
|
794
809
|
});
|
|
795
|
-
}, gn = I ?? (_ ? xr(_) : void 0), nr = J ?? (Y ? xr(Y) : void 0), sr = (Z == null ? void 0 : Z.filter(Boolean)) ?? [], vn = !!Q || sr.length > 0 || !!w, Cn = V && u && Vr(u) ? u : void 0,
|
|
810
|
+
}, gn = I ?? (_ ? xr(_) : void 0), nr = J ?? (Y ? xr(Y) : void 0), sr = (Z == null ? void 0 : Z.filter(Boolean)) ?? [], vn = !!Q || sr.length > 0 || !!w, Cn = V && u && Vr(u) ? u : void 0, Ee = [
|
|
796
811
|
_e.form,
|
|
797
|
-
...
|
|
812
|
+
...Kr.filter((e) => !l(e)).map(
|
|
798
813
|
(e) => _e[e]
|
|
799
814
|
),
|
|
800
815
|
Ve ? p("inputs.recaptcha.error") : void 0
|
|
801
|
-
].filter(Boolean).join(" ") || void 0, wn =
|
|
802
|
-
|
|
816
|
+
].filter(Boolean).join(" ") || void 0, wn = Mn(
|
|
817
|
+
Ee,
|
|
803
818
|
S.listed.length > 0
|
|
804
819
|
), Ie = P("terms"), bn = [
|
|
805
820
|
nr ? cr : void 0,
|
|
806
821
|
Ie ? dr : void 0
|
|
807
|
-
].filter(Boolean).join(" ") || void 0, Sr = new Set(Object.values(j ?? {})),
|
|
808
|
-
|
|
822
|
+
].filter(Boolean).join(" ") || void 0, Sr = new Set(Object.values(j ?? {})), kr = V ? Object.entries(C ?? {}) : [], or = kr.filter(([e]) => Sr.has(e)).map(([e]) => e).join(", ");
|
|
823
|
+
k(() => {
|
|
809
824
|
or && Zr() && console.warn(
|
|
810
825
|
`RegistrationForm: hiddenFields "${or}" is also named in fieldNames and was left out. The form's own field wins.`
|
|
811
826
|
);
|
|
812
827
|
}, [or]);
|
|
813
|
-
const
|
|
828
|
+
const Er = ee || he, Ir = /* @__PURE__ */ n(
|
|
814
829
|
Pr,
|
|
815
830
|
{
|
|
816
831
|
ref: vr.ref,
|
|
817
832
|
name: re("email"),
|
|
818
833
|
errorMessage: null,
|
|
819
|
-
disableBuiltInValidation:
|
|
820
|
-
readOnly:
|
|
821
|
-
onChange: vr.quiet((e) =>
|
|
834
|
+
disableBuiltInValidation: Er,
|
|
835
|
+
readOnly: Er,
|
|
836
|
+
onChange: vr.quiet((e) => M("email", e.target.value)),
|
|
822
837
|
onBlur: () => de("email"),
|
|
823
838
|
...ce("email")
|
|
824
839
|
}
|
|
@@ -830,7 +845,7 @@ const cs = yn(
|
|
|
830
845
|
value: a.phone,
|
|
831
846
|
readOnly: He,
|
|
832
847
|
onChange: (e, o) => {
|
|
833
|
-
|
|
848
|
+
M("phone", e), lr(o.isPossible);
|
|
834
849
|
}
|
|
835
850
|
}
|
|
836
851
|
), Nn = (e) => {
|
|
@@ -840,7 +855,7 @@ const cs = yn(
|
|
|
840
855
|
W,
|
|
841
856
|
{
|
|
842
857
|
id: B(e),
|
|
843
|
-
label:
|
|
858
|
+
label: $.firstName,
|
|
844
859
|
required: !0,
|
|
845
860
|
error: P("firstName"),
|
|
846
861
|
announceError: !S.lists("firstName"),
|
|
@@ -852,7 +867,7 @@ const cs = yn(
|
|
|
852
867
|
name: re("firstName"),
|
|
853
868
|
autoComplete: "given-name",
|
|
854
869
|
value: a.firstName,
|
|
855
|
-
onChange: (o) =>
|
|
870
|
+
onChange: (o) => M("firstName", o.target.value),
|
|
856
871
|
onBlur: () => de("firstName"),
|
|
857
872
|
...ce("firstName")
|
|
858
873
|
}
|
|
@@ -865,7 +880,7 @@ const cs = yn(
|
|
|
865
880
|
W,
|
|
866
881
|
{
|
|
867
882
|
id: B(e),
|
|
868
|
-
label:
|
|
883
|
+
label: $.lastName,
|
|
869
884
|
required: !0,
|
|
870
885
|
error: P("lastName"),
|
|
871
886
|
announceError: !S.lists("lastName"),
|
|
@@ -877,7 +892,7 @@ const cs = yn(
|
|
|
877
892
|
name: re("lastName"),
|
|
878
893
|
autoComplete: "family-name",
|
|
879
894
|
value: a.lastName,
|
|
880
|
-
onChange: (o) =>
|
|
895
|
+
onChange: (o) => M("lastName", o.target.value),
|
|
881
896
|
onBlur: () => de("lastName"),
|
|
882
897
|
...ce("lastName")
|
|
883
898
|
}
|
|
@@ -890,7 +905,7 @@ const cs = yn(
|
|
|
890
905
|
W,
|
|
891
906
|
{
|
|
892
907
|
id: B(e),
|
|
893
|
-
label:
|
|
908
|
+
label: $.email,
|
|
894
909
|
required: !ee,
|
|
895
910
|
description: N,
|
|
896
911
|
error: P("email"),
|
|
@@ -910,7 +925,7 @@ const cs = yn(
|
|
|
910
925
|
)
|
|
911
926
|
] }),
|
|
912
927
|
/* @__PURE__ */ n(
|
|
913
|
-
|
|
928
|
+
Gr,
|
|
914
929
|
{
|
|
915
930
|
field: "email",
|
|
916
931
|
state: H,
|
|
@@ -927,13 +942,13 @@ const cs = yn(
|
|
|
927
942
|
);
|
|
928
943
|
case "emailConfirm":
|
|
929
944
|
return ur ? /* @__PURE__ */ n(
|
|
930
|
-
|
|
945
|
+
Yn,
|
|
931
946
|
{
|
|
932
947
|
field: "email",
|
|
933
948
|
state: H,
|
|
934
949
|
onUnlocked: () => {
|
|
935
950
|
var o;
|
|
936
|
-
|
|
951
|
+
M("emailConfirm", ""), (o = ie.current.email) == null || o.focus();
|
|
937
952
|
}
|
|
938
953
|
},
|
|
939
954
|
e
|
|
@@ -941,7 +956,7 @@ const cs = yn(
|
|
|
941
956
|
W,
|
|
942
957
|
{
|
|
943
958
|
id: B(e),
|
|
944
|
-
label:
|
|
959
|
+
label: $.emailConfirm,
|
|
945
960
|
required: !0,
|
|
946
961
|
error: P("emailConfirm"),
|
|
947
962
|
announceError: !S.lists("emailConfirm"),
|
|
@@ -953,7 +968,7 @@ const cs = yn(
|
|
|
953
968
|
name: re("emailConfirm"),
|
|
954
969
|
disableBuiltInValidation: !0,
|
|
955
970
|
onChange: Cr.quiet(
|
|
956
|
-
(o) =>
|
|
971
|
+
(o) => M("emailConfirm", o.target.value)
|
|
957
972
|
),
|
|
958
973
|
onBlur: () => {
|
|
959
974
|
de("emailConfirm"), Ue.confirmProps.onBlur();
|
|
@@ -969,7 +984,7 @@ const cs = yn(
|
|
|
969
984
|
W,
|
|
970
985
|
{
|
|
971
986
|
id: B(e),
|
|
972
|
-
label:
|
|
987
|
+
label: $.password,
|
|
973
988
|
required: !0,
|
|
974
989
|
error: P("password"),
|
|
975
990
|
announceError: !S.lists("password"),
|
|
@@ -982,7 +997,7 @@ const cs = yn(
|
|
|
982
997
|
autoComplete: "new-password",
|
|
983
998
|
requirements: hr,
|
|
984
999
|
value: a.password,
|
|
985
|
-
onChange: (o) =>
|
|
1000
|
+
onChange: (o) => M("password", o.target.value),
|
|
986
1001
|
onBlur: () => de("password"),
|
|
987
1002
|
...ce("password")
|
|
988
1003
|
}
|
|
@@ -995,7 +1010,7 @@ const cs = yn(
|
|
|
995
1010
|
W,
|
|
996
1011
|
{
|
|
997
1012
|
id: B(e),
|
|
998
|
-
label:
|
|
1013
|
+
label: $.passwordConfirm,
|
|
999
1014
|
required: !0,
|
|
1000
1015
|
error: P("passwordConfirm"),
|
|
1001
1016
|
announceError: !S.lists("passwordConfirm"),
|
|
@@ -1007,7 +1022,7 @@ const cs = yn(
|
|
|
1007
1022
|
name: re("passwordConfirm") ?? "",
|
|
1008
1023
|
autoComplete: "new-password",
|
|
1009
1024
|
value: a.passwordConfirm,
|
|
1010
|
-
onChange: (o) =>
|
|
1025
|
+
onChange: (o) => M("passwordConfirm", o.target.value),
|
|
1011
1026
|
onBlur: () => {
|
|
1012
1027
|
de("passwordConfirm"), We.confirmProps.onBlur();
|
|
1013
1028
|
},
|
|
@@ -1022,7 +1037,7 @@ const cs = yn(
|
|
|
1022
1037
|
W,
|
|
1023
1038
|
{
|
|
1024
1039
|
id: B(e),
|
|
1025
|
-
label:
|
|
1040
|
+
label: $.phone,
|
|
1026
1041
|
required: !0,
|
|
1027
1042
|
error: P("phone"),
|
|
1028
1043
|
announceError: !S.lists("phone"),
|
|
@@ -1035,12 +1050,12 @@ const cs = yn(
|
|
|
1035
1050
|
Wr,
|
|
1036
1051
|
{
|
|
1037
1052
|
state: oe,
|
|
1038
|
-
canSend: a.phone !== "" &&
|
|
1053
|
+
canSend: a.phone !== "" && Me
|
|
1039
1054
|
}
|
|
1040
1055
|
)
|
|
1041
1056
|
] }),
|
|
1042
1057
|
/* @__PURE__ */ n(
|
|
1043
|
-
|
|
1058
|
+
Gr,
|
|
1044
1059
|
{
|
|
1045
1060
|
field: "phone",
|
|
1046
1061
|
state: oe,
|
|
@@ -1064,7 +1079,7 @@ const cs = yn(
|
|
|
1064
1079
|
W,
|
|
1065
1080
|
{
|
|
1066
1081
|
id: B(e),
|
|
1067
|
-
label:
|
|
1082
|
+
label: $.branch,
|
|
1068
1083
|
required: !0,
|
|
1069
1084
|
error: P("branch"),
|
|
1070
1085
|
announceError: !S.lists("branch"),
|
|
@@ -1076,7 +1091,7 @@ const cs = yn(
|
|
|
1076
1091
|
name: re("branch"),
|
|
1077
1092
|
options: q ?? [],
|
|
1078
1093
|
value: a.branch,
|
|
1079
|
-
onValueChange: (o) =>
|
|
1094
|
+
onValueChange: (o) => M("branch", o)
|
|
1080
1095
|
}
|
|
1081
1096
|
)
|
|
1082
1097
|
},
|
|
@@ -1090,16 +1105,16 @@ const cs = yn(
|
|
|
1090
1105
|
ref: D,
|
|
1091
1106
|
...Te,
|
|
1092
1107
|
"data-component": "registration-form",
|
|
1093
|
-
className:
|
|
1108
|
+
className: Qn({ className: xe }),
|
|
1094
1109
|
children: /* @__PURE__ */ n(Ar, { variant: "elevated", children: /* @__PURE__ */ g(Ar.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
|
|
1095
|
-
/* @__PURE__ */ g("div", { className:
|
|
1096
|
-
/* @__PURE__ */ g("div", { className:
|
|
1097
|
-
t && /* @__PURE__ */ n(Tn, { motion: d, label:
|
|
1110
|
+
/* @__PURE__ */ g("div", { className: Vn({ logo: t }), children: [
|
|
1111
|
+
/* @__PURE__ */ g("div", { className: es({ centred: t }), children: [
|
|
1112
|
+
t && /* @__PURE__ */ n(Tn, { motion: d, label: is }),
|
|
1098
1113
|
/* @__PURE__ */ n(pn, { id: ar, className: "type-title-card", children: s ?? p("registrationForm.title") }),
|
|
1099
1114
|
r && /* @__PURE__ */ n("p", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: r })
|
|
1100
1115
|
] }),
|
|
1101
|
-
F && (F.values || F.onClick) && /* @__PURE__ */ n("div", { className:
|
|
1102
|
-
|
|
1116
|
+
F && (F.values || F.onClick) && /* @__PURE__ */ n("div", { className: rs({ corner: t }), children: /* @__PURE__ */ n(
|
|
1117
|
+
En,
|
|
1103
1118
|
{
|
|
1104
1119
|
label: F.label,
|
|
1105
1120
|
onClick: un
|
|
@@ -1116,7 +1131,7 @@ const cs = yn(
|
|
|
1116
1131
|
sr.length > 0 ? /* @__PURE__ */ n(qr, { density: "compact", children: sr.map((e, o) => /* @__PURE__ */ n(
|
|
1117
1132
|
qr.Item,
|
|
1118
1133
|
{
|
|
1119
|
-
leading: /* @__PURE__ */ n(
|
|
1134
|
+
leading: /* @__PURE__ */ n(zn, { "aria-hidden": "true" }),
|
|
1120
1135
|
title: e
|
|
1121
1136
|
},
|
|
1122
1137
|
`${o}-${e}`
|
|
@@ -1142,7 +1157,7 @@ const cs = yn(
|
|
|
1142
1157
|
{
|
|
1143
1158
|
ref: S.ref,
|
|
1144
1159
|
headingLevel: c + 1,
|
|
1145
|
-
"aria-describedby":
|
|
1160
|
+
"aria-describedby": Ee ? mr : void 0,
|
|
1146
1161
|
errors: S.listed.map((e) => {
|
|
1147
1162
|
const o = P(e) ?? "";
|
|
1148
1163
|
return {
|
|
@@ -1150,13 +1165,13 @@ const cs = yn(
|
|
|
1150
1165
|
message: o,
|
|
1151
1166
|
// "This field is required." does not say which field:
|
|
1152
1167
|
// the summary names it.
|
|
1153
|
-
label: o ===
|
|
1168
|
+
label: o === z && e !== "terms" ? $[e] : void 0,
|
|
1154
1169
|
targetId: B(e)
|
|
1155
1170
|
};
|
|
1156
1171
|
})
|
|
1157
1172
|
}
|
|
1158
1173
|
),
|
|
1159
|
-
|
|
1174
|
+
Ee && /* @__PURE__ */ n(
|
|
1160
1175
|
le,
|
|
1161
1176
|
{
|
|
1162
1177
|
ref: wr,
|
|
@@ -1165,16 +1180,16 @@ const cs = yn(
|
|
|
1165
1180
|
announce: wn,
|
|
1166
1181
|
tabIndex: -1,
|
|
1167
1182
|
"data-field": "form",
|
|
1168
|
-
className:
|
|
1169
|
-
children: /* @__PURE__ */ n(le.Description, { children:
|
|
1183
|
+
className: ss(),
|
|
1184
|
+
children: /* @__PURE__ */ n(le.Description, { children: Ee })
|
|
1170
1185
|
}
|
|
1171
1186
|
),
|
|
1172
|
-
|
|
1187
|
+
ms(
|
|
1173
1188
|
(e) => e === "emailConfirm" ? l(e) || ur : l(e)
|
|
1174
1189
|
).map((e) => /* @__PURE__ */ n(
|
|
1175
1190
|
"div",
|
|
1176
1191
|
{
|
|
1177
|
-
className:
|
|
1192
|
+
className: Zn({
|
|
1178
1193
|
columns: e.length === 2 ? "two" : "one"
|
|
1179
1194
|
}),
|
|
1180
1195
|
children: e.map(Nn)
|
|
@@ -1198,7 +1213,7 @@ const cs = yn(
|
|
|
1198
1213
|
defaultValue: ""
|
|
1199
1214
|
}
|
|
1200
1215
|
),
|
|
1201
|
-
|
|
1216
|
+
kr.filter(([e]) => !Sr.has(e)).map(([e, o]) => /* @__PURE__ */ n(
|
|
1202
1217
|
"input",
|
|
1203
1218
|
{
|
|
1204
1219
|
type: "hidden",
|
|
@@ -1223,13 +1238,13 @@ const cs = yn(
|
|
|
1223
1238
|
}
|
|
1224
1239
|
),
|
|
1225
1240
|
/* @__PURE__ */ n(
|
|
1226
|
-
|
|
1241
|
+
kn,
|
|
1227
1242
|
{
|
|
1228
1243
|
ref: U.terms,
|
|
1229
1244
|
name: re("terms"),
|
|
1230
1245
|
value: "1",
|
|
1231
1246
|
checked: a.terms,
|
|
1232
|
-
onCheckedChange: (e) =>
|
|
1247
|
+
onCheckedChange: (e) => M("terms", e === !0),
|
|
1233
1248
|
"aria-required": "true",
|
|
1234
1249
|
"aria-invalid": Ie ? !0 : void 0,
|
|
1235
1250
|
"aria-describedby": bn,
|
|
@@ -1250,7 +1265,7 @@ const cs = yn(
|
|
|
1250
1265
|
"span",
|
|
1251
1266
|
{
|
|
1252
1267
|
"aria-hidden": "true",
|
|
1253
|
-
className:
|
|
1268
|
+
className: os(),
|
|
1254
1269
|
children: "*"
|
|
1255
1270
|
}
|
|
1256
1271
|
)
|
|
@@ -1266,7 +1281,7 @@ const cs = yn(
|
|
|
1266
1281
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-destructive",
|
|
1267
1282
|
children: [
|
|
1268
1283
|
/* @__PURE__ */ n(
|
|
1269
|
-
|
|
1284
|
+
$n,
|
|
1270
1285
|
{
|
|
1271
1286
|
"aria-hidden": "true",
|
|
1272
1287
|
className: "ds:size-4 ds:shrink-0"
|
|
@@ -1280,7 +1295,7 @@ const cs = yn(
|
|
|
1280
1295
|
}
|
|
1281
1296
|
),
|
|
1282
1297
|
/* @__PURE__ */ n(
|
|
1283
|
-
|
|
1298
|
+
G,
|
|
1284
1299
|
{
|
|
1285
1300
|
type: "submit",
|
|
1286
1301
|
intent: "primary",
|
|
@@ -1288,12 +1303,12 @@ const cs = yn(
|
|
|
1288
1303
|
loading: Ze,
|
|
1289
1304
|
className: "ds:w-full",
|
|
1290
1305
|
"data-action": "submit",
|
|
1291
|
-
"aria-disabled":
|
|
1306
|
+
"aria-disabled": ze || $e || void 0,
|
|
1292
1307
|
children: Pe ?? p("registrationForm.submit")
|
|
1293
1308
|
}
|
|
1294
1309
|
),
|
|
1295
1310
|
/* @__PURE__ */ n("p", { role: "status", className: "ds:sr-only", children: Ze ? p("chat.message.status.sending") : "" }),
|
|
1296
|
-
Fr && !
|
|
1311
|
+
Fr && !Ke && /* @__PURE__ */ n("p", { className: "type-body-sm ds:text-center ds:text-[var(--muted-foreground)]", children: /* @__PURE__ */ n(
|
|
1297
1312
|
Lr,
|
|
1298
1313
|
{
|
|
1299
1314
|
i18n: ir,
|
|
@@ -1330,9 +1345,9 @@ const cs = yn(
|
|
|
1330
1345
|
);
|
|
1331
1346
|
}
|
|
1332
1347
|
);
|
|
1333
|
-
|
|
1348
|
+
ls.displayName = "RegistrationForm";
|
|
1334
1349
|
export {
|
|
1335
|
-
|
|
1336
|
-
|
|
1350
|
+
Kr as R,
|
|
1351
|
+
ls as a
|
|
1337
1352
|
};
|
|
1338
|
-
//# sourceMappingURL=registration-form-
|
|
1353
|
+
//# sourceMappingURL=registration-form-CwbhtKcy.js.map
|