doct-ui-auth-kit 1.0.24 → 1.0.26

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.
@@ -0,0 +1,1919 @@
1
+ "use client";
2
+ import { jsx as d, jsxs as P, Fragment as Be } from "react/jsx-runtime";
3
+ import { DoctButton as j, DoctTypography as A, DoctOtpInput as ot, DoctCircularProgress as ge, DoctPhoneInput as rt, DoctLabeledInput as st } from "docthub-core-components";
4
+ import { MdArrowBack as at, MdChevronRight as ct } from "react-icons/md";
5
+ import K, { createContext as ut, useContext as dt, useState as Y, useEffect as J, useRef as ne } from "react";
6
+ import { useFormContext as le, Controller as de, useForm as xe, FormProvider as Ce } from "react-hook-form";
7
+ import { z as B } from "zod";
8
+ var ae = { exports: {} }, be = {};
9
+ var ke;
10
+ function ft() {
11
+ if (ke) return be;
12
+ ke = 1;
13
+ var n = K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
14
+ return be.c = function(e) {
15
+ return n.H.useMemoCache(e);
16
+ }, be;
17
+ }
18
+ var ye = {};
19
+ var Re;
20
+ function mt() {
21
+ return Re || (Re = 1, process.env.NODE_ENV !== "production" && (function() {
22
+ var n = K.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
23
+ ye.c = function(e) {
24
+ var t = n.H;
25
+ return t === null && console.error(
26
+ `Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
27
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
28
+ 2. You might be breaking the Rules of Hooks
29
+ 3. You might have more than one copy of React in the same app
30
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`
31
+ ), t.useMemoCache(e);
32
+ };
33
+ })()), ye;
34
+ }
35
+ var Ie;
36
+ function ht() {
37
+ return Ie || (Ie = 1, process.env.NODE_ENV === "production" ? ae.exports = ft() : ae.exports = mt()), ae.exports;
38
+ }
39
+ var _ = ht();
40
+ const ze = "/main-logo.svg", Ve = "/docthub.svg", Ge = ["/slider/slide-1.svg", "/slider/slide-2.svg", "/slider/slide-3.svg", "/slider/slide-4.svg", "/slider/slide-5.svg"], gt = 5e3, Se = "[&_main]:!justify-start [&_main]:!pt-5 md:[&_main]:!pt-[104px]";
41
+ function pe(n) {
42
+ const e = _.c(4), {
43
+ onClick: t,
44
+ ariaLabel: l
45
+ } = n, r = l === void 0 ? "Go back" : l;
46
+ let o;
47
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ d(at, { className: "h-5 w-5 text-neutral-black" }), e[0] = o) : o = e[0];
48
+ let i;
49
+ return e[1] !== r || e[2] !== t ? (i = /* @__PURE__ */ d(j, { icon: o, iconOnly: !0, onClick: t, size: "medium", variant: "outline", "aria-label": r, className: "mb-4 md:mb-6 h-10 w-10" }), e[1] = r, e[2] = t, e[3] = i) : i = e[3], i;
50
+ }
51
+ function pt() {
52
+ const n = typeof window < "u" ? window.location.hostname : "";
53
+ return n.endsWith(".com") || n.includes(".com:") ? "https://www.dochub.com" : "https://dev.dochub.in/";
54
+ }
55
+ function He() {
56
+ const n = _.c(4);
57
+ let e;
58
+ n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = pt(), n[0] = e) : e = n[0];
59
+ const t = e;
60
+ let l, r;
61
+ n[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ d("br", {}), r = /* @__PURE__ */ d("a", { href: `${t}/terms-conditions`, className: "font-semibold text-neutral-black underline", children: "Terms of Use" }), n[1] = l, n[2] = r) : (l = n[1], r = n[2]);
62
+ let o;
63
+ return n[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ P(A, { variant: "body3", align: "center", className: "opacity-60 text-neutral-black", children: [
64
+ "by continuing you agree to Docthub's",
65
+ l,
66
+ r,
67
+ " ",
68
+ "and",
69
+ " ",
70
+ /* @__PURE__ */ d("a", { href: `${t}/privacy-policy`, className: "font-semibold text-neutral-black underline", children: "Privacy Policy." })
71
+ ] }), n[3] = o) : o = n[3], o;
72
+ }
73
+ const bt = "https://docthub.com/";
74
+ function yt(n) {
75
+ const e = _.c(8);
76
+ let t;
77
+ e[0] !== n ? (t = n === void 0 ? {} : n, e[0] = n, e[1] = t) : t = e[1];
78
+ const {
79
+ onClick: l,
80
+ href: r
81
+ } = t, o = r === void 0 ? bt : r;
82
+ let i;
83
+ e[2] !== o || e[3] !== l ? (i = () => {
84
+ if (l) {
85
+ l();
86
+ return;
87
+ }
88
+ typeof window < "u" && window.location.assign(o);
89
+ }, e[2] = o, e[3] = l, e[4] = i) : i = e[4];
90
+ const s = i;
91
+ let a;
92
+ e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ d("div", { className: "flex items-center justify-center p-2 bg-primary rounded-[10px]", children: /* @__PURE__ */ d(ct, { color: "white", className: "h-5 w-5" }) }), e[5] = a) : a = e[5];
93
+ let c;
94
+ return e[6] !== s ? (c = /* @__PURE__ */ d(j, { icon: a, iconPosition: "right", size: "large", variant: "outline", "aria-label": "Go to Enterprise Login", className: "hidden sm:flex items-center gap-4 border border-neutral-12 px-[22px] py-[14px]", onClick: s, children: "Enterprise Login" }), e[6] = s, e[7] = c) : c = e[7], c;
95
+ }
96
+ function qe(n) {
97
+ var e, t, l = "";
98
+ if (typeof n == "string" || typeof n == "number") l += n;
99
+ else if (typeof n == "object") if (Array.isArray(n)) {
100
+ var r = n.length;
101
+ for (e = 0; e < r; e++) n[e] && (t = qe(n[e])) && (l && (l += " "), l += t);
102
+ } else for (t in n) n[t] && (l && (l += " "), l += t);
103
+ return l;
104
+ }
105
+ function D() {
106
+ for (var n, e, t = 0, l = "", r = arguments.length; t < r; t++) (n = arguments[t]) && (e = qe(n)) && (l && (l += " "), l += e);
107
+ return l;
108
+ }
109
+ const Ke = ut(null);
110
+ function Ne() {
111
+ const n = dt(Ke);
112
+ if (!n)
113
+ throw new Error("AuthLayout compound components must be used within AuthLayout.Root");
114
+ return n;
115
+ }
116
+ function vt(n, e) {
117
+ return e === "md" ? "max-w-md" : e === "lg" ? "max-w-lg" : n === "desktop" ? "max-w-[320px]" : "max-w-[360px]";
118
+ }
119
+ function we(n = "center") {
120
+ switch (n) {
121
+ case "left":
122
+ return {
123
+ flex: "justify-start",
124
+ text: "text-left"
125
+ };
126
+ case "right":
127
+ return {
128
+ flex: "justify-end",
129
+ text: "text-right"
130
+ };
131
+ default:
132
+ return {
133
+ flex: "justify-center",
134
+ text: "text-center"
135
+ };
136
+ }
137
+ }
138
+ const _e = "flex w-full mb-4 md:mb-4";
139
+ function xt(n) {
140
+ const e = _.c(15), {
141
+ children: t,
142
+ variant: l,
143
+ maxWidth: r,
144
+ className: o
145
+ } = n, i = l === void 0 ? "mobile" : l, s = r === void 0 ? "sm" : r;
146
+ let a;
147
+ e[0] !== s || e[1] !== i ? (a = vt(i, s), e[0] = s, e[1] = i, e[2] = a) : a = e[2];
148
+ const c = a;
149
+ let u;
150
+ e[3] !== s || e[4] !== c || e[5] !== i ? (u = {
151
+ variant: i,
152
+ maxWidth: s,
153
+ maxWidthClass: c
154
+ }, e[3] = s, e[4] = c, e[5] = i, e[6] = u) : u = e[6];
155
+ const h = u;
156
+ let f;
157
+ e[7] !== o ? (f = D("min-h-svh w-full bg-neutral-white flex flex-col", o), e[7] = o, e[8] = f) : f = e[8];
158
+ let m;
159
+ e[9] !== t || e[10] !== f ? (m = /* @__PURE__ */ d("div", { className: f, children: t }), e[9] = t, e[10] = f, e[11] = m) : m = e[11];
160
+ let p;
161
+ return e[12] !== h || e[13] !== m ? (p = /* @__PURE__ */ d(Ke.Provider, { value: h, children: m }), e[12] = h, e[13] = m, e[14] = p) : p = e[14], p;
162
+ }
163
+ function Ct(n) {
164
+ const e = _.c(12), {
165
+ children: t,
166
+ className: l
167
+ } = n, {
168
+ variant: r
169
+ } = Ne();
170
+ if (r === "desktop") {
171
+ let s;
172
+ e[0] !== l ? (s = D("flex justify-end px-5 pt-5", l), e[0] = l, e[1] = s) : s = e[1];
173
+ let a;
174
+ e[2] !== t ? (a = /* @__PURE__ */ d("div", { className: "w-auto", children: t }), e[2] = t, e[3] = a) : a = e[3];
175
+ let c;
176
+ return e[4] !== s || e[5] !== a ? (c = /* @__PURE__ */ d("div", { className: s, children: a }), e[4] = s, e[5] = a, e[6] = c) : c = e[6], c;
177
+ }
178
+ let o;
179
+ e[7] !== l ? (o = D("mb-4 w-full md:mb-6", l), e[7] = l, e[8] = o) : o = e[8];
180
+ let i;
181
+ return e[9] !== t || e[10] !== o ? (i = /* @__PURE__ */ d("div", { className: o, children: t }), e[9] = t, e[10] = o, e[11] = i) : i = e[11], i;
182
+ }
183
+ function St(n) {
184
+ const e = _.c(6), {
185
+ children: t,
186
+ align: l,
187
+ className: r
188
+ } = n, o = l === void 0 ? "center" : l;
189
+ let i;
190
+ if (e[0] !== o || e[1] !== r) {
191
+ const {
192
+ flex: a
193
+ } = we(o);
194
+ i = D(_e, a, r), e[0] = o, e[1] = r, e[2] = i;
195
+ } else
196
+ i = e[2];
197
+ let s;
198
+ return e[3] !== t || e[4] !== i ? (s = /* @__PURE__ */ d("div", { className: i, children: t }), e[3] = t, e[4] = i, e[5] = s) : s = e[5], s;
199
+ }
200
+ function Nt(n) {
201
+ const e = _.c(6), {
202
+ children: t,
203
+ align: l,
204
+ className: r
205
+ } = n, o = l === void 0 ? "center" : l;
206
+ let i;
207
+ if (e[0] !== o || e[1] !== r) {
208
+ const {
209
+ flex: a,
210
+ text: c
211
+ } = we(o);
212
+ i = D(_e, a, c, r), e[0] = o, e[1] = r, e[2] = i;
213
+ } else
214
+ i = e[2];
215
+ let s;
216
+ return e[3] !== t || e[4] !== i ? (s = /* @__PURE__ */ d("div", { className: i, children: t }), e[3] = t, e[4] = i, e[5] = s) : s = e[5], s;
217
+ }
218
+ function wt(n) {
219
+ const e = _.c(6), {
220
+ children: t,
221
+ align: l,
222
+ className: r
223
+ } = n, o = l === void 0 ? "center" : l;
224
+ let i;
225
+ if (e[0] !== o || e[1] !== r) {
226
+ const {
227
+ flex: a,
228
+ text: c
229
+ } = we(o);
230
+ i = D(_e, a, c, r), e[0] = o, e[1] = r, e[2] = i;
231
+ } else
232
+ i = e[2];
233
+ let s;
234
+ return e[3] !== t || e[4] !== i ? (s = /* @__PURE__ */ d("div", { className: i, children: t }), e[3] = t, e[4] = i, e[5] = s) : s = e[5], s;
235
+ }
236
+ function _t(n) {
237
+ const e = _.c(5), {
238
+ children: t,
239
+ className: l
240
+ } = n;
241
+ let r;
242
+ e[0] !== l ? (r = D("w-full flex flex-col space-y-4 mb-4 md:mb-6", l), e[0] = l, e[1] = r) : r = e[1];
243
+ let o;
244
+ return e[2] !== t || e[3] !== r ? (o = /* @__PURE__ */ d("div", { className: r, children: t }), e[2] = t, e[3] = r, e[4] = o) : o = e[4], o;
245
+ }
246
+ function Et(n) {
247
+ const e = _.c(10), {
248
+ children: t,
249
+ sm: l,
250
+ className: r
251
+ } = n, {
252
+ maxWidthClass: o
253
+ } = Ne();
254
+ let i;
255
+ e[0] !== r ? (i = D("flex-1 flex flex-col items-center justify-center", "px-5 py-8 md:py-12", "w-full", r), e[0] = r, e[1] = i) : i = e[1];
256
+ const s = l ? "max-w-[320px]" : o;
257
+ let a;
258
+ e[2] !== s ? (a = D("w-full flex flex-col items-center", s), e[2] = s, e[3] = a) : a = e[3];
259
+ let c;
260
+ e[4] !== t || e[5] !== a ? (c = /* @__PURE__ */ d("div", { className: a, children: t }), e[4] = t, e[5] = a, e[6] = c) : c = e[6];
261
+ let u;
262
+ return e[7] !== i || e[8] !== c ? (u = /* @__PURE__ */ d("main", { className: i, children: c }), e[7] = i, e[8] = c, e[9] = u) : u = e[9], u;
263
+ }
264
+ function Pt(n) {
265
+ const e = _.c(10), {
266
+ children: t,
267
+ className: l
268
+ } = n, {
269
+ maxWidthClass: r
270
+ } = Ne();
271
+ let o;
272
+ e[0] !== l ? (o = D("px-5 py-6 md:py-8 w-full flex justify-center", l), e[0] = l, e[1] = o) : o = e[1];
273
+ let i;
274
+ e[2] !== r ? (i = D("w-full text-center", r), e[2] = r, e[3] = i) : i = e[3];
275
+ let s;
276
+ e[4] !== t || e[5] !== i ? (s = /* @__PURE__ */ d("div", { className: i, children: t }), e[4] = t, e[5] = i, e[6] = s) : s = e[6];
277
+ let a;
278
+ return e[7] !== o || e[8] !== s ? (a = /* @__PURE__ */ d("footer", { className: o, children: s }), e[7] = o, e[8] = s, e[9] = a) : a = e[9], a;
279
+ }
280
+ const q = {
281
+ Root: xt,
282
+ Header: Ct,
283
+ Main: Et,
284
+ Logo: St,
285
+ Title: Nt,
286
+ Description: wt,
287
+ Body: _t,
288
+ Footer: Pt
289
+ };
290
+ function Ot(n) {
291
+ const e = _.c(38), {
292
+ images: t,
293
+ autoPlayInterval: l,
294
+ className: r,
295
+ hideIndicators: o,
296
+ onSlideChange: i,
297
+ activeIndex: s,
298
+ onNavigate: a
299
+ } = n, c = l === void 0 ? 5e3 : l, [u, h] = Y(0), f = s !== void 0, m = f ? s : u;
300
+ let p, b;
301
+ e[0] !== c || e[1] !== m || e[2] !== t.length || e[3] !== f || e[4] !== i ? (p = () => {
302
+ if (c > 0 && t.length > 1) {
303
+ const T = setInterval(() => {
304
+ const k = (m + 1) % t.length;
305
+ f || h(k), i?.(k);
306
+ }, c);
307
+ return () => clearInterval(T);
308
+ }
309
+ }, b = [c, t.length, m, f, i], e[0] = c, e[1] = m, e[2] = t.length, e[3] = f, e[4] = i, e[5] = p, e[6] = b) : (p = e[5], b = e[6]), J(p, b);
310
+ let g, y;
311
+ e[7] !== t.length || e[8] !== f || e[9] !== i ? (g = () => {
312
+ !f && t.length > 0 && i?.(0);
313
+ }, y = [t.length, f, i], e[7] = t.length, e[8] = f, e[9] = i, e[10] = g, e[11] = y) : (g = e[10], y = e[11]), J(g, y);
314
+ let v;
315
+ e[12] !== f || e[13] !== a || e[14] !== i ? (v = (T) => {
316
+ f ? (a?.(T), i?.(T)) : (h(T), i?.(T));
317
+ }, e[12] = f, e[13] = a, e[14] = i, e[15] = v) : v = e[15];
318
+ const x = v;
319
+ if (t.length === 0)
320
+ return null;
321
+ const N = t.length;
322
+ let C;
323
+ e[16] !== r ? (C = D("relative w-full h-full min-h-0", r), e[16] = r, e[17] = C) : C = e[17];
324
+ const S = `${N * 100}%`, E = `translateX(-${m * 100 / N}%)`;
325
+ let w;
326
+ e[18] !== S || e[19] !== E ? (w = {
327
+ width: S,
328
+ transform: E
329
+ }, e[18] = S, e[19] = E, e[20] = w) : w = e[20];
330
+ let O;
331
+ if (e[21] !== t || e[22] !== N) {
332
+ let T;
333
+ e[24] !== N ? (T = (k, I) => /* @__PURE__ */ d("div", { className: "relative flex-shrink-0 h-full", style: {
334
+ width: `${100 / N}%`
335
+ }, children: /* @__PURE__ */ d("img", { src: k, alt: `Slide ${I + 1}`, className: "h-full w-full object-cover object-center" }) }, `${k}-${I}`), e[24] = N, e[25] = T) : T = e[25], O = t.map(T), e[21] = t, e[22] = N, e[23] = O;
336
+ } else
337
+ O = e[23];
338
+ let L;
339
+ e[26] !== w || e[27] !== O ? (L = /* @__PURE__ */ d("div", { className: "relative w-full h-full overflow-hidden", children: /* @__PURE__ */ d("div", { className: "flex h-full transition-transform duration-500 ease-in-out", style: w, children: O }) }), e[26] = w, e[27] = O, e[28] = L) : L = e[28];
340
+ let F;
341
+ e[29] !== m || e[30] !== x || e[31] !== o || e[32] !== t ? (F = t.length > 1 && !o && /* @__PURE__ */ d("div", { className: "absolute -top-10 left-1/2 flex -translate-x-1/2 gap-2 z-20", children: t.map((T, k) => /* @__PURE__ */ d("button", { type: "button", onClick: () => x(k), className: D("h-1 rounded-[3px] transition-all duration-300", k === m ? "w-8 bg-neutral-white" : "w-2 bg-neutral-white/40"), "aria-label": `Go to slide ${k + 1}` }, `indicator-${T}-${k}`)) }), e[29] = m, e[30] = x, e[31] = o, e[32] = t, e[33] = F) : F = e[33];
342
+ let W;
343
+ return e[34] !== L || e[35] !== F || e[36] !== C ? (W = /* @__PURE__ */ P("div", { className: C, children: [
344
+ L,
345
+ F
346
+ ] }), e[34] = L, e[35] = F, e[36] = C, e[37] = W) : W = e[37], W;
347
+ }
348
+ function Tt(n) {
349
+ const e = _.c(15), {
350
+ sliderImages: t,
351
+ sliderAutoPlayInterval: l,
352
+ activeSlideIndex: r,
353
+ onSlideChange: o,
354
+ ctaText: i,
355
+ sliderTitles: s,
356
+ className: a
357
+ } = n, c = s?.[r];
358
+ let u = i ?? null;
359
+ if (c != null) {
360
+ let b;
361
+ e[0] !== c ? (b = typeof c == "string" ? /* @__PURE__ */ d(A, { variant: "h6", weight: "medium", align: "center", className: "whitespace-pre-line text-primary-170", children: c }) : c, e[0] = c, e[1] = b) : b = e[1], u = b;
362
+ }
363
+ let h;
364
+ e[2] !== a ? (h = D("relative w-full h-[100dvh] transition-colors duration-500", a), e[2] = a, e[3] = h) : h = e[3];
365
+ let f;
366
+ e[4] !== u ? (f = u != null && /* @__PURE__ */ d("div", { className: D("absolute left-1/2 top-[152.5px] z-10 flex w-[328px] -translate-x-1/2 items-center justify-center text-center transition-opacity duration-300"), children: u }), e[4] = u, e[5] = f) : f = e[5];
367
+ let m;
368
+ e[6] !== r || e[7] !== o || e[8] !== l || e[9] !== t ? (m = /* @__PURE__ */ d("div", { className: "absolute inset-0", children: t.length > 0 ? /* @__PURE__ */ d(Ot, { images: t, autoPlayInterval: l, className: "h-full w-full", hideIndicators: !0, activeIndex: r, onSlideChange: o, onNavigate: o }) : /* @__PURE__ */ d("div", { className: "flex h-full w-full items-center justify-center bg-neutral-white/50 p-8", children: /* @__PURE__ */ d(A, { variant: "h6", weight: "medium", align: "center", className: "opacity-40 text-primary-170", children: "No slides configured" }) }) }), e[6] = r, e[7] = o, e[8] = l, e[9] = t, e[10] = m) : m = e[10];
369
+ let p;
370
+ return e[11] !== h || e[12] !== f || e[13] !== m ? (p = /* @__PURE__ */ P("div", { className: h, children: [
371
+ f,
372
+ m
373
+ ] }), e[11] = h, e[12] = f, e[13] = m, e[14] = p) : p = e[14], p;
374
+ }
375
+ function At(n) {
376
+ const e = _.c(23), {
377
+ sliderImages: t,
378
+ sliderAutoPlayInterval: l,
379
+ ctaText: r,
380
+ sliderTitles: o,
381
+ className: i,
382
+ marketingClassName: s,
383
+ contentClassName: a,
384
+ children: c
385
+ } = n, u = l === void 0 ? 5e3 : l, [h, f] = Y(0), m = t ?? Ge;
386
+ let p;
387
+ e[0] !== i ? (p = D("min-h-svh w-full flex flex-1 flex-col bg-neutral-white transition-colors duration-500", i), e[0] = i, e[1] = p) : p = e[1];
388
+ let b;
389
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = {
390
+ width: "calc(100dvh * 432 / 731)"
391
+ }, e[2] = b) : b = e[2];
392
+ let g;
393
+ e[3] !== s ? (g = s && {
394
+ className: s
395
+ }, e[3] = s, e[4] = g) : g = e[4];
396
+ let y;
397
+ e[5] !== h || e[6] !== r || e[7] !== m || e[8] !== u || e[9] !== o || e[10] !== g ? (y = /* @__PURE__ */ d("div", { className: "hidden lg:block lg:h-[100dvh] lg:flex-shrink-0 lg:flex-grow-0", style: b, children: /* @__PURE__ */ d(Tt, { sliderImages: m, sliderAutoPlayInterval: u, activeSlideIndex: h, onSlideChange: f, ctaText: r, sliderTitles: o, ...g }) }), e[5] = h, e[6] = r, e[7] = m, e[8] = u, e[9] = o, e[10] = g, e[11] = y) : y = e[11];
398
+ let v;
399
+ e[12] !== a ? (v = D("flex-1 min-w-0 flex flex-col overflow-x-hidden", a), e[12] = a, e[13] = v) : v = e[13];
400
+ let x;
401
+ e[14] !== c || e[15] !== v ? (x = /* @__PURE__ */ d("div", { className: v, children: c }), e[14] = c, e[15] = v, e[16] = x) : x = e[16];
402
+ let N;
403
+ e[17] !== y || e[18] !== x ? (N = /* @__PURE__ */ P("div", { className: "flex w-full h-full min-h-svh flex-col lg:flex-row", children: [
404
+ y,
405
+ x
406
+ ] }), e[17] = y, e[18] = x, e[19] = N) : N = e[19];
407
+ let C;
408
+ return e[20] !== p || e[21] !== N ? (C = /* @__PURE__ */ d("div", { className: p, children: N }), e[20] = p, e[21] = N, e[22] = C) : C = e[22], C;
409
+ }
410
+ function ie(n) {
411
+ const e = _.c(58), {
412
+ children: t,
413
+ layoutType: l,
414
+ logo: r,
415
+ title: o,
416
+ description: i,
417
+ footer: s,
418
+ header: a,
419
+ onBack: c,
420
+ backButton: u,
421
+ sliderImages: h,
422
+ sliderAutoPlayInterval: f,
423
+ sliderTitles: m,
424
+ variant: p,
425
+ maxWidth: b,
426
+ contentWidth: g,
427
+ align: y,
428
+ className: v
429
+ } = n, x = l === void 0 ? "withSlider" : l, N = h === void 0 ? Ge : h, C = f === void 0 ? gt : f, S = b === void 0 ? "sm" : b, E = g === void 0 ? "default" : g, w = y === void 0 ? "center" : y, O = E === "sm", L = p ?? (x === "withSlider" ? "desktop" : "mobile");
430
+ let F;
431
+ e[0] !== u || e[1] !== r || e[2] !== c ? (F = () => u ?? (c != null ? /* @__PURE__ */ d(pe, { onClick: c }) : r ? typeof r == "string" ? /* @__PURE__ */ d("div", { className: "h-[30px] w-[140px]", children: /* @__PURE__ */ d("img", { src: r, alt: "Docthub", className: "block h-full w-full object-cover" }) }) : r : null), e[0] = u, e[1] = r, e[2] = c, e[3] = F) : F = e[3];
432
+ const W = F;
433
+ let T;
434
+ e[4] !== w || e[5] !== o ? (T = () => o ? typeof o == "string" ? /* @__PURE__ */ d(A, { variant: "h5", weight: "extraBold", align: w, className: "text-neutral-black", children: o }) : o : null, e[4] = w, e[5] = o, e[6] = T) : T = e[6];
435
+ const k = T;
436
+ let I;
437
+ e[7] !== w || e[8] !== i ? (I = () => i ? typeof i == "string" ? /* @__PURE__ */ d(A, { variant: "body1", align: w, className: "text-neutral-black", children: i }) : i : null, e[7] = w, e[8] = i, e[9] = I) : I = e[9];
438
+ const M = I;
439
+ let R;
440
+ e[10] !== a ? (R = a && /* @__PURE__ */ d(q.Header, { children: a }), e[10] = a, e[11] = R) : R = e[11];
441
+ let U;
442
+ e[12] !== W ? (U = W(), e[12] = W, e[13] = U) : U = e[13];
443
+ let V;
444
+ e[14] !== w || e[15] !== U ? (V = /* @__PURE__ */ d(q.Logo, { align: w, children: U }), e[14] = w, e[15] = U, e[16] = V) : V = e[16];
445
+ let G;
446
+ e[17] !== w || e[18] !== k || e[19] !== o ? (G = o && /* @__PURE__ */ d(q.Title, { align: w, children: k() }), e[17] = w, e[18] = k, e[19] = o, e[20] = G) : G = e[20];
447
+ let H;
448
+ e[21] !== w || e[22] !== i || e[23] !== M ? (H = i && /* @__PURE__ */ d(q.Description, { align: w, children: M() }), e[21] = w, e[22] = i, e[23] = M, e[24] = H) : H = e[24];
449
+ let $;
450
+ e[25] !== t ? ($ = /* @__PURE__ */ d(q.Body, { children: t }), e[25] = t, e[26] = $) : $ = e[26];
451
+ let z;
452
+ e[27] !== V || e[28] !== G || e[29] !== H || e[30] !== $ || e[31] !== O ? (z = /* @__PURE__ */ P(q.Main, { sm: O, children: [
453
+ V,
454
+ G,
455
+ H,
456
+ $
457
+ ] }), e[27] = V, e[28] = G, e[29] = H, e[30] = $, e[31] = O, e[32] = z) : z = e[32];
458
+ let X;
459
+ e[33] !== s ? (X = s && /* @__PURE__ */ d(q.Footer, { children: s }), e[33] = s, e[34] = X) : X = e[34];
460
+ let oe;
461
+ e[35] !== R || e[36] !== z || e[37] !== X ? (oe = /* @__PURE__ */ P(Be, { children: [
462
+ R,
463
+ z,
464
+ X
465
+ ] }), e[35] = R, e[36] = z, e[37] = X, e[38] = oe) : oe = e[38];
466
+ const Z = oe;
467
+ if (x === "withSlider") {
468
+ let ee;
469
+ e[39] !== v ? (ee = v && {
470
+ className: v
471
+ }, e[39] = v, e[40] = ee) : ee = e[40];
472
+ let te;
473
+ e[41] !== Z || e[42] !== S || e[43] !== L ? (te = /* @__PURE__ */ d(q.Root, { variant: L, maxWidth: S, className: "bg-transparent", children: Z }), e[41] = Z, e[42] = S, e[43] = L, e[44] = te) : te = e[44];
474
+ let se;
475
+ return e[45] !== C || e[46] !== N || e[47] !== m || e[48] !== ee || e[49] !== te ? (se = /* @__PURE__ */ d(At, { sliderImages: N, sliderAutoPlayInterval: C, sliderTitles: m, ...ee, children: te }), e[45] = C, e[46] = N, e[47] = m, e[48] = ee, e[49] = te, e[50] = se) : se = e[50], se;
476
+ }
477
+ let Q;
478
+ e[51] !== v ? (Q = v && {
479
+ className: v
480
+ }, e[51] = v, e[52] = Q) : Q = e[52];
481
+ let re;
482
+ return e[53] !== Z || e[54] !== S || e[55] !== L || e[56] !== Q ? (re = /* @__PURE__ */ d(q.Root, { variant: L, maxWidth: S, ...Q, children: Z }), e[53] = Z, e[54] = S, e[55] = L, e[56] = Q, e[57] = re) : re = e[57], re;
483
+ }
484
+ function Lt(n) {
485
+ return {
486
+ triggerSignIn() {
487
+ }
488
+ };
489
+ }
490
+ const Fe = "https://accounts.google.com/gsi/client";
491
+ function kt() {
492
+ return typeof window > "u" ? Promise.reject(new Error("GSI requires browser")) : window.google?.accounts?.id ? Promise.resolve() : new Promise((n, e) => {
493
+ if (document.querySelector(`script[src="${Fe}"]`)) {
494
+ const r = () => window.google?.accounts?.id ? n() : setTimeout(r, 50);
495
+ r();
496
+ return;
497
+ }
498
+ const l = document.createElement("script");
499
+ l.src = Fe, l.async = !0, l.defer = !0, l.onload = () => n(), l.onerror = () => e(new Error("Failed to load Google Identity Services script")), document.body.appendChild(l);
500
+ });
501
+ }
502
+ const Rt = "openid email profile", De = 2e3;
503
+ function It(n) {
504
+ const e = _.c(18), {
505
+ clientId: t,
506
+ onCredential: l,
507
+ enableOneTap: r
508
+ } = n, o = r === void 0 ? !1 : r, i = ne(!1), s = ne(null), a = ne(l), c = ne(0), u = ne(!1);
509
+ let h, f;
510
+ e[0] !== l ? (h = () => {
511
+ a.current = l;
512
+ }, f = [l], e[0] = l, e[1] = h, e[2] = f) : (h = e[1], f = e[2]), J(h, f);
513
+ let m;
514
+ e[3] !== t ? (m = async () => {
515
+ t && (await kt(), !(!window.google?.accounts?.id || !window.google?.accounts?.oauth2) && (i.current || (window.google.accounts.id.initialize({
516
+ client_id: t,
517
+ callback: (S) => {
518
+ a.current(S.credential);
519
+ },
520
+ auto_select: !1
521
+ }), s.current = window.google.accounts.oauth2.initCodeClient({
522
+ client_id: t,
523
+ scope: Rt,
524
+ ux_mode: "popup",
525
+ callback: (S) => {
526
+ a.current(S.code);
527
+ },
528
+ error_callback: Ft
529
+ }), i.current = !0)));
530
+ }, e[3] = t, e[4] = m) : m = e[4];
531
+ const p = m;
532
+ let b;
533
+ e[5] !== t ? (b = async () => {
534
+ if (!t)
535
+ return;
536
+ const S = Date.now();
537
+ S - c.current < De || (c.current = S, s.current?.requestCode());
538
+ }, e[5] = t, e[6] = b) : b = e[6];
539
+ const g = b;
540
+ let y, v;
541
+ e[7] !== t || e[8] !== p ? (y = () => {
542
+ t && p();
543
+ }, v = [t, p], e[7] = t, e[8] = p, e[9] = y, e[10] = v) : (y = e[9], v = e[10]), J(y, v);
544
+ let x, N;
545
+ e[11] !== t || e[12] !== o || e[13] !== p ? (x = () => {
546
+ !o || !t || u.current || (u.current = !0, p().then(() => {
547
+ if (!window.google?.accounts?.id)
548
+ return;
549
+ const S = Date.now();
550
+ S - c.current < De || (c.current = S, window.google.accounts.id.prompt());
551
+ }));
552
+ }, N = [o, t, p], e[11] = t, e[12] = o, e[13] = p, e[14] = x, e[15] = N) : (x = e[14], N = e[15]), J(x, N);
553
+ let C;
554
+ return e[16] !== g ? (C = {
555
+ loginWithGoogle: g
556
+ }, e[16] = g, e[17] = C) : C = e[17], C;
557
+ }
558
+ function Ft() {
559
+ }
560
+ function Dt(n) {
561
+ const e = _.c(10), {
562
+ name: t,
563
+ label: l,
564
+ className: r,
565
+ control: o,
566
+ length: i,
567
+ inputClassName: s,
568
+ autoFocus: a
569
+ } = n, c = i === void 0 ? 6 : i, u = le(), h = o || u.control;
570
+ let f;
571
+ e[0] !== a || e[1] !== r || e[2] !== s || e[3] !== l || e[4] !== c ? (f = (p) => {
572
+ const {
573
+ field: b,
574
+ fieldState: g
575
+ } = p;
576
+ return /* @__PURE__ */ P("div", { children: [
577
+ l && /* @__PURE__ */ d("label", { className: "block mb-1", children: l }),
578
+ /* @__PURE__ */ d(ot, { length: c, value: b.value || [], onChange: b.onChange, ...a !== void 0 && {
579
+ autoFocus: a
580
+ }, ...r && {
581
+ className: r
582
+ }, ...s && {
583
+ inputClassName: s
584
+ }, ...g.error?.message !== void 0 && g.error?.message !== "" && {
585
+ error: g.error.message
586
+ } })
587
+ ] });
588
+ }, e[0] = a, e[1] = r, e[2] = s, e[3] = l, e[4] = c, e[5] = f) : f = e[5];
589
+ let m;
590
+ return e[6] !== t || e[7] !== h || e[8] !== f ? (m = /* @__PURE__ */ d(de, { name: t, control: h, render: f }), e[6] = t, e[7] = h, e[8] = f, e[9] = m) : m = e[9], m;
591
+ }
592
+ function $t(n) {
593
+ return n.trim().replace(/\b\w/g, (e) => e.toUpperCase());
594
+ }
595
+ const Ee = B.string().trim().min(1, "Full name is required").refine((n) => n == null || n.length === 0 ? !0 : n.length >= 3, "Full name must be at least 3 characters").transform($t), Pe = B.string().trim().min(1, "Phone number is required").refine((n) => {
596
+ if (n == null || n.length === 0) return !0;
597
+ const [, e] = n.split("-"), l = (e ?? n).replaceAll(/\D/g, "");
598
+ return l.length >= 7 && l.length <= 15;
599
+ }, "Phone number must be between 7 and 15 digits"), Oe = B.string().trim().transform((n) => n.replaceAll(/\D/g, "")).optional(), Te = B.string().trim().min(1, "Email is required").refine((n) => n == null || n.length === 0 ? !0 : B.string().email().safeParse(n).success, "Enter a valid email address").transform((n) => n.toLowerCase()), Wt = B.object({
600
+ fullName: Ee,
601
+ phone: Pe,
602
+ countryCode: Oe
603
+ }), Mt = B.object({
604
+ fullName: Ee,
605
+ email: Te
606
+ }), Ut = B.object({
607
+ fullName: Ee,
608
+ email: Te,
609
+ phone: Pe,
610
+ countryCode: Oe
611
+ }), $e = {
612
+ phone: Wt,
613
+ email: Mt,
614
+ foreign: Ut
615
+ }, jt = B.object({
616
+ phone: Pe,
617
+ countryCode: Oe
618
+ }), Bt = B.object({
619
+ email: Te
620
+ }), We = {
621
+ phone: jt,
622
+ email: Bt
623
+ }, fe = 6, zt = 60, Vt = 120;
624
+ function Gt(n) {
625
+ return n === "phone" ? zt : Vt;
626
+ }
627
+ const Ye = B.object({
628
+ otp: B.array(B.string()).length(fe, "Enter all 6 digits").refine((n) => n.every((e) => /^\d$/.test(e)) && n.join("").length === fe, "Invalid OTP! Please use correct code and submit again.")
629
+ }), Ht = {
630
+ phone: "Kindly check your Mobile.",
631
+ email: "Kindly check your Email Inbox."
632
+ }, qt = {
633
+ phone: "6 digit OTP has been sent to your Mobile",
634
+ email: "6 digit OTP has been sent to your Email"
635
+ };
636
+ function Kt(n) {
637
+ const e = _.c(30), {
638
+ mode: t,
639
+ onSubmit: l,
640
+ onResendCode: r,
641
+ submitApi: o,
642
+ onSuccess: i,
643
+ onError: s,
644
+ validate: a
645
+ } = n, [c, u] = Y(!1);
646
+ let h;
647
+ e[0] !== t ? (h = Gt(t), e[0] = t, e[1] = h) : h = e[1];
648
+ const f = h, [m, p] = Y(f), b = m <= 0;
649
+ let g;
650
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = Array.from({
651
+ length: fe
652
+ }, Xt), e[2] = g) : g = e[2];
653
+ const y = g;
654
+ let v;
655
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = {
656
+ defaultValues: {
657
+ otp: y
658
+ },
659
+ mode: "onChange"
660
+ }, e[3] = v) : v = e[3];
661
+ const x = xe(v);
662
+ let N, C;
663
+ e[4] !== m ? (N = () => {
664
+ if (m <= 0)
665
+ return;
666
+ const V = setInterval(() => {
667
+ p(Jt);
668
+ }, 1e3);
669
+ return () => clearInterval(V);
670
+ }, C = [m], e[4] = m, e[5] = N, e[6] = C) : (N = e[5], C = e[6]), J(N, C);
671
+ let S;
672
+ e[7] !== x || e[8] !== s || e[9] !== l || e[10] !== i || e[11] !== o || e[12] !== a ? (S = async (V) => {
673
+ x.clearErrors("otp");
674
+ const G = Ye.safeParse(V);
675
+ if (!G.success) {
676
+ const $ = G.error.issues[0]?.message ?? "Invalid OTP";
677
+ x.setError("otp", {
678
+ message: $
679
+ });
680
+ return;
681
+ }
682
+ const H = G.data.otp.join("");
683
+ if (a) {
684
+ u(!0);
685
+ try {
686
+ const $ = await a(H);
687
+ if ($ !== !0) {
688
+ x.setError("otp", {
689
+ type: "validate",
690
+ message: $
691
+ }), u(!1);
692
+ return;
693
+ }
694
+ } catch ($) {
695
+ s?.($), u(!1);
696
+ return;
697
+ }
698
+ o || u(!1);
699
+ }
700
+ if (o) {
701
+ u(!0), o(H).then(() => {
702
+ i?.();
703
+ }).catch(($) => {
704
+ const z = $?.message;
705
+ x.setError("otp", {
706
+ type: "submit",
707
+ message: typeof z == "string" && z.length > 0 ? z : "OTP verification failed"
708
+ }), s?.($);
709
+ }).finally(() => {
710
+ u(!1);
711
+ });
712
+ return;
713
+ }
714
+ l?.(H);
715
+ }, e[7] = x, e[8] = s, e[9] = l, e[10] = i, e[11] = o, e[12] = a, e[13] = S) : S = e[13];
716
+ const E = S;
717
+ let w;
718
+ e[14] !== b || e[15] !== f || e[16] !== r ? (w = () => {
719
+ b && (r?.(), p(f));
720
+ }, e[14] = b, e[15] = f, e[16] = r, e[17] = w) : w = e[17];
721
+ const O = w, L = Yt, F = Math.floor(m / 60), W = m % 60, T = String(F);
722
+ let k;
723
+ e[18] !== T ? (k = T.padStart(2, "0"), e[18] = T, e[19] = k) : k = e[19];
724
+ const I = String(W);
725
+ let M;
726
+ e[20] !== I ? (M = I.padStart(2, "0"), e[20] = I, e[21] = M) : M = e[21];
727
+ const R = `Resend code in: ${k}:${M}`;
728
+ let U;
729
+ return e[22] !== b || e[23] !== O || e[24] !== E || e[25] !== c || e[26] !== x || e[27] !== m || e[28] !== R ? (U = {
730
+ methods: x,
731
+ handleSubmit: E,
732
+ isFormValid: L,
733
+ handleResend: O,
734
+ resendSecondsLeft: m,
735
+ canResend: b,
736
+ timerText: R,
737
+ isSubmitting: c
738
+ }, e[22] = b, e[23] = O, e[24] = E, e[25] = c, e[26] = x, e[27] = m, e[28] = R, e[29] = U) : U = e[29], U;
739
+ }
740
+ function Yt(n) {
741
+ return Ye.safeParse(n).success;
742
+ }
743
+ function Jt(n) {
744
+ return n <= 1 ? 0 : n - 1;
745
+ }
746
+ function Xt() {
747
+ return "";
748
+ }
749
+ function Zt(n) {
750
+ const e = _.c(28), {
751
+ mode: t,
752
+ title: l,
753
+ recipientDisplay: r,
754
+ isForeignUser: o,
755
+ handleSubmit: i,
756
+ handleResend: s,
757
+ canResend: a,
758
+ timerText: c,
759
+ isSubmitting: u
760
+ } = n, h = le();
761
+ let f;
762
+ e[0] !== i || e[1] !== h ? (f = h.handleSubmit(i), e[0] = i, e[1] = h, e[2] = f) : f = e[2];
763
+ let m;
764
+ e[3] !== l ? (m = /* @__PURE__ */ d(A, { variant: "h5", weight: "extraBold", align: "left", className: "mb-2 text-neutral-black", children: l }), e[3] = l, e[4] = m) : m = e[4];
765
+ const p = o ? "mb-2 text-neutral-black" : "mb-6 text-neutral-black";
766
+ let b;
767
+ e[5] !== r || e[6] !== p ? (b = /* @__PURE__ */ d(A, { variant: "title2", align: "left", className: p, children: r }), e[5] = r, e[6] = p, e[7] = b) : b = e[7];
768
+ let g;
769
+ e[8] !== o || e[9] !== t ? (g = o && /* @__PURE__ */ d(A, { variant: "textLabel1", weight: "semiBold", align: "left", className: "mb-6 text-neutral-black", children: Ht[t] }), e[8] = o, e[9] = t, e[10] = g) : g = e[10];
770
+ let y;
771
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ d("div", { className: "mb-4 flex w-full flex-col gap-[12px]", children: /* @__PURE__ */ d(Dt, { name: "otp", length: fe, autoFocus: !0, inputClassName: "!h-[44px] !w-[44px]" }) }), e[11] = y) : y = e[11];
772
+ let v;
773
+ e[12] !== a || e[13] !== s || e[14] !== c ? (v = /* @__PURE__ */ d("div", { className: "mb-6 font-medium flex items-center gap-2", children: a ? /* @__PURE__ */ d(j, { type: "button", variant: "outline", size: "small", onClick: s, className: "!h-[28px]", children: "Resend Code" }) : /* @__PURE__ */ d(A, { variant: "textLabel3", align: "left", className: "text-neutral-black", children: c }) }), e[12] = a, e[13] = s, e[14] = c, e[15] = v) : v = e[15];
774
+ let x;
775
+ e[16] !== u ? (x = u ? /* @__PURE__ */ d(ge, { size: 32, strokeWidth: 2 }) : "Submit", e[16] = u, e[17] = x) : x = e[17];
776
+ let N;
777
+ e[18] !== u || e[19] !== x ? (N = /* @__PURE__ */ d(j, { type: "submit", variant: "primary", size: "large", fullWidth: !0, disabled: u, children: x }), e[18] = u, e[19] = x, e[20] = N) : N = e[20];
778
+ let C;
779
+ return e[21] !== f || e[22] !== m || e[23] !== b || e[24] !== g || e[25] !== v || e[26] !== N ? (C = /* @__PURE__ */ P("form", { onSubmit: f, className: "flex w-full flex-col", noValidate: !0, children: [
780
+ m,
781
+ b,
782
+ g,
783
+ y,
784
+ v,
785
+ N
786
+ ] }), e[21] = f, e[22] = m, e[23] = b, e[24] = g, e[25] = v, e[26] = N, e[27] = C) : C = e[27], C;
787
+ }
788
+ function Je(n) {
789
+ const e = _.c(21), {
790
+ mode: t,
791
+ title: l,
792
+ recipientDisplay: r,
793
+ isForeignUser: o,
794
+ onSubmit: i,
795
+ onResendCode: s,
796
+ submitApi: a,
797
+ onSuccess: c,
798
+ onError: u,
799
+ validate: h
800
+ } = n, f = o === void 0 ? !1 : o;
801
+ let m;
802
+ e[0] !== t || e[1] !== u || e[2] !== s || e[3] !== i || e[4] !== c || e[5] !== a || e[6] !== h ? (m = {
803
+ mode: t,
804
+ onSubmit: i,
805
+ onResendCode: s,
806
+ submitApi: a,
807
+ onSuccess: c,
808
+ onError: u,
809
+ validate: h
810
+ }, e[0] = t, e[1] = u, e[2] = s, e[3] = i, e[4] = c, e[5] = a, e[6] = h, e[7] = m) : m = e[7];
811
+ const {
812
+ methods: p,
813
+ handleSubmit: b,
814
+ handleResend: g,
815
+ canResend: y,
816
+ timerText: v,
817
+ isSubmitting: x
818
+ } = Kt(m), N = l ?? qt[t];
819
+ let C;
820
+ e[8] !== y || e[9] !== N || e[10] !== g || e[11] !== b || e[12] !== f || e[13] !== x || e[14] !== t || e[15] !== r || e[16] !== v ? (C = /* @__PURE__ */ d(Zt, { mode: t, title: N, recipientDisplay: r, isForeignUser: f, handleSubmit: b, handleResend: g, canResend: y, timerText: v, isSubmitting: x }), e[8] = y, e[9] = N, e[10] = g, e[11] = b, e[12] = f, e[13] = x, e[14] = t, e[15] = r, e[16] = v, e[17] = C) : C = e[17];
821
+ let S;
822
+ return e[18] !== p || e[19] !== C ? (S = /* @__PURE__ */ d(Ce, { ...p, children: C }), e[18] = p, e[19] = C, e[20] = S) : S = e[20], S;
823
+ }
824
+ function Bn(n) {
825
+ const e = _.c(24);
826
+ let t, l, r, o;
827
+ e[0] !== n ? ({
828
+ layoutType: r,
829
+ variant: o,
830
+ onBack: l,
831
+ ...t
832
+ } = n, e[0] = n, e[1] = t, e[2] = l, e[3] = r, e[4] = o) : (t = e[1], l = e[2], r = e[3], o = e[4]);
833
+ const i = r === void 0 ? "withSlider" : r;
834
+ let s;
835
+ e[5] !== l ? (s = l != null ? /* @__PURE__ */ d(pe, { onClick: l }) : void 0, e[5] = l, e[6] = s) : s = e[6];
836
+ let a;
837
+ e[7] !== t.isForeignUser || e[8] !== t.mode || e[9] !== t.onError || e[10] !== t.onResendCode || e[11] !== t.onSubmit || e[12] !== t.onSuccess || e[13] !== t.recipientDisplay || e[14] !== t.submitApi || e[15] !== t.title || e[16] !== t.validate || e[17] !== l ? (a = /* @__PURE__ */ d(Je, { mode: t.mode, recipientDisplay: t.recipientDisplay, title: t.title, isForeignUser: t.isForeignUser, onBack: l, onSubmit: t.onSubmit, onResendCode: t.onResendCode, submitApi: t.submitApi, onSuccess: t.onSuccess, onError: t.onError, validate: t.validate }), e[7] = t.isForeignUser, e[8] = t.mode, e[9] = t.onError, e[10] = t.onResendCode, e[11] = t.onSubmit, e[12] = t.onSuccess, e[13] = t.recipientDisplay, e[14] = t.submitApi, e[15] = t.title, e[16] = t.validate, e[17] = l, e[18] = a) : a = e[18];
838
+ let c;
839
+ return e[19] !== i || e[20] !== s || e[21] !== a || e[22] !== o ? (c = /* @__PURE__ */ d(ie, { layoutType: i, variant: o, contentWidth: "sm", align: "left", backButton: s, className: Se, children: a }), e[19] = i, e[20] = s, e[21] = a, e[22] = o, e[23] = c) : c = e[23], c;
840
+ }
841
+ function Xe(n, e) {
842
+ if (e)
843
+ return `${n ? `+${n} ` : ""}${e}`;
844
+ }
845
+ function Qt(n) {
846
+ return n.conflictField === "phone" ? n.existingEmail : Xe(n.existingCountryCode, n.existingPhone);
847
+ }
848
+ function en(n) {
849
+ return n.conflictField === "phone" ? `Login with '${Xe(n.newCountryCode, n.newPhone) ?? ""}'` : `Login with '${n.newEmail}'`;
850
+ }
851
+ function Me(n) {
852
+ const e = Qt(n);
853
+ return n.conflictField === "phone" ? e ? `This number is already linked to a Docthub account (${e})` : "This number is already linked to a Docthub account" : e ? `This email is already linked to a Docthub account (${e})` : "This email is already linked to a Docthub account";
854
+ }
855
+ function tn(n) {
856
+ return /* @__PURE__ */ P(A, { variant: "body1", align: "center", className: "mb-4 text-[16px] font-normal leading-6 text-black md:mb-6", children: [
857
+ "Please tell us your ",
858
+ /* @__PURE__ */ d("span", { className: "font-bold", children: "Full Name" }),
859
+ " and",
860
+ " ",
861
+ /* @__PURE__ */ d("span", { className: "font-bold", children: n.conflictField === "phone" ? "Mobile Number" : "Email Address" }),
862
+ " ",
863
+ "for extended security of your account."
864
+ ] });
865
+ }
866
+ function nn(n) {
867
+ const e = _.c(7), {
868
+ label: t,
869
+ value: l
870
+ } = n;
871
+ let r;
872
+ e[0] !== t ? (r = /* @__PURE__ */ d("span", { className: "text-[8px] leading-[11px] text-black/60", children: t }), e[0] = t, e[1] = r) : r = e[1];
873
+ let o;
874
+ e[2] !== l ? (o = /* @__PURE__ */ d("span", { className: "truncate text-[14px] leading-5 text-black", children: l }), e[2] = l, e[3] = o) : o = e[3];
875
+ let i;
876
+ return e[4] !== r || e[5] !== o ? (i = /* @__PURE__ */ P("div", { className: "flex h-[44px] w-full flex-col justify-center gap-[6px] overflow-hidden rounded-lg border border-black/10 bg-white px-3 pb-3 pt-[9px]", children: [
877
+ r,
878
+ o
879
+ ] }), e[4] = r, e[5] = o, e[6] = i) : i = e[6], i;
880
+ }
881
+ function ln(n) {
882
+ const e = _.c(13), {
883
+ countryCode: t,
884
+ value: l,
885
+ error: r
886
+ } = n, o = t ?? "";
887
+ let i;
888
+ e[0] !== o ? (i = /* @__PURE__ */ P("span", { className: "w-[42px] shrink-0 text-center text-[14px] leading-5 text-black", children: [
889
+ "+",
890
+ o
891
+ ] }), e[0] = o, e[1] = i) : i = e[1];
892
+ let s;
893
+ e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ d("div", { className: "h-[42px] w-px shrink-0 bg-black/10" }), e[2] = s) : s = e[2];
894
+ let a;
895
+ e[3] !== l ? (a = /* @__PURE__ */ d("span", { className: "truncate text-[14px] leading-5 text-black", children: l }), e[3] = l, e[4] = a) : a = e[4];
896
+ let c;
897
+ e[5] !== i || e[6] !== a ? (c = /* @__PURE__ */ P("div", { className: "flex w-full items-center gap-3 overflow-hidden rounded-lg border border-black/10 bg-white px-3 py-px", children: [
898
+ i,
899
+ s,
900
+ a
901
+ ] }), e[5] = i, e[6] = a, e[7] = c) : c = e[7];
902
+ let u;
903
+ e[8] !== r ? (u = r ? /* @__PURE__ */ d("p", { className: "text-[11px] font-medium leading-4 text-[#EA4335]", children: r }) : null, e[8] = r, e[9] = u) : u = e[9];
904
+ let h;
905
+ return e[10] !== c || e[11] !== u ? (h = /* @__PURE__ */ P("div", { className: "flex w-full flex-col gap-[6px]", children: [
906
+ c,
907
+ u
908
+ ] }), e[10] = c, e[11] = u, e[12] = h) : h = e[12], h;
909
+ }
910
+ function on(n) {
911
+ const e = _.c(12), {
912
+ label: t,
913
+ value: l,
914
+ error: r
915
+ } = n;
916
+ let o;
917
+ e[0] !== t ? (o = /* @__PURE__ */ d("span", { className: "text-[8px] leading-[11px] text-black/60", children: t }), e[0] = t, e[1] = o) : o = e[1];
918
+ let i;
919
+ e[2] !== l ? (i = /* @__PURE__ */ d("span", { className: "truncate text-[14px] leading-5 text-black", children: l }), e[2] = l, e[3] = i) : i = e[3];
920
+ let s;
921
+ e[4] !== o || e[5] !== i ? (s = /* @__PURE__ */ P("div", { className: "flex h-[44px] w-full flex-col justify-center gap-[6px] overflow-hidden rounded-lg border border-black/10 bg-white px-3 pb-3 pt-[9px]", children: [
922
+ o,
923
+ i
924
+ ] }), e[4] = o, e[5] = i, e[6] = s) : s = e[6];
925
+ let a;
926
+ e[7] !== r ? (a = r ? /* @__PURE__ */ d("p", { className: "text-[11px] font-medium leading-4 text-[#EA4335]", children: r }) : null, e[7] = r, e[8] = a) : a = e[8];
927
+ let c;
928
+ return e[9] !== s || e[10] !== a ? (c = /* @__PURE__ */ P("div", { className: "flex w-full flex-col gap-[6px]", children: [
929
+ s,
930
+ a
931
+ ] }), e[9] = s, e[10] = a, e[11] = c) : c = e[11], c;
932
+ }
933
+ function rn(n) {
934
+ const e = _.c(10), {
935
+ ctaLabel: t,
936
+ isSubmitting: l,
937
+ onContinue: r
938
+ } = n;
939
+ let o;
940
+ e[0] !== t || e[1] !== l ? (o = l ? /* @__PURE__ */ d(ge, { size: 32, strokeWidth: 2 }) : t, e[0] = t, e[1] = l, e[2] = o) : o = e[2];
941
+ let i;
942
+ e[3] !== l || e[4] !== r || e[5] !== o ? (i = /* @__PURE__ */ d(j, { type: "button", variant: "outline", size: "large", fullWidth: !0, disabled: l, onClick: r, className: "!rounded-[10px] !border-2 !border-black/10 !bg-transparent !px-4 !py-[13px] !text-[14px] !font-semibold !leading-5 !text-black/80 hover:!bg-transparent", children: o }), e[3] = l, e[4] = r, e[5] = o, e[6] = i) : i = e[6];
943
+ let s;
944
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ d(A, { variant: "textLabel3", align: "center", className: "w-full text-center text-[8px] font-normal leading-[11px] text-black/45", children: "your accounts will be unified on login" }), e[7] = s) : s = e[7];
945
+ let a;
946
+ return e[8] !== i ? (a = /* @__PURE__ */ P("div", { className: "flex w-full flex-col gap-[6px] rounded-xl bg-black/[0.04] p-3", children: [
947
+ i,
948
+ s
949
+ ] }), e[8] = i, e[9] = a) : a = e[9], a;
950
+ }
951
+ function sn(n) {
952
+ const e = _.c(20), {
953
+ details: t,
954
+ isSubmitting: l,
955
+ errorMessage: r,
956
+ onContinue: o
957
+ } = n;
958
+ let i;
959
+ e[0] !== t.name ? (i = /* @__PURE__ */ d(nn, { label: "Full Name", value: t.name }), e[0] = t.name, e[1] = i) : i = e[1];
960
+ let s;
961
+ e[2] !== t ? (s = t.conflictField === "phone" ? /* @__PURE__ */ d(ln, { countryCode: t.newCountryCode, value: t.newPhone ?? "", error: Me(t) }) : /* @__PURE__ */ d(on, { label: "Email address", value: t.newEmail, error: Me(t) }), e[2] = t, e[3] = s) : s = e[3];
962
+ let a;
963
+ e[4] !== i || e[5] !== s ? (a = /* @__PURE__ */ P("div", { className: "flex w-full flex-col gap-3", children: [
964
+ i,
965
+ s
966
+ ] }), e[4] = i, e[5] = s, e[6] = a) : a = e[6];
967
+ let c;
968
+ e[7] !== t ? (c = en(t), e[7] = t, e[8] = c) : c = e[8];
969
+ let u;
970
+ e[9] !== l || e[10] !== o || e[11] !== c ? (u = /* @__PURE__ */ d(rn, { ctaLabel: c, isSubmitting: l, onContinue: o }), e[9] = l, e[10] = o, e[11] = c, e[12] = u) : u = e[12];
971
+ let h;
972
+ e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ d("div", { "aria-disabled": "true", className: "flex w-full items-center justify-center rounded-xl bg-black/[0.06] px-5 py-4 text-base font-semibold leading-[22px] text-black/20", children: "Continue" }), e[13] = h) : h = e[13];
973
+ let f;
974
+ e[14] !== r ? (f = r ? /* @__PURE__ */ d(A, { variant: "body5", align: "center", className: "mt-4 text-[11px] font-medium leading-4 text-[#EA4335]", children: r }) : null, e[14] = r, e[15] = f) : f = e[15];
975
+ let m;
976
+ return e[16] !== a || e[17] !== u || e[18] !== f ? (m = /* @__PURE__ */ P("div", { className: "flex w-full flex-col gap-4", children: [
977
+ a,
978
+ u,
979
+ h,
980
+ f
981
+ ] }), e[16] = a, e[17] = u, e[18] = f, e[19] = m) : m = e[19], m;
982
+ }
983
+ function an(n) {
984
+ return n.otpTarget?.type === "email" ? "6 digit OTP has been sent to your old Email" : "6 digit OTP has been sent to your old Mobile";
985
+ }
986
+ function cn(n) {
987
+ const e = n.otpTarget;
988
+ return e ? e.maskedValue ?? e.value : "";
989
+ }
990
+ function zn(n) {
991
+ const {
992
+ details: e,
993
+ onBack: t,
994
+ onContinue: l,
995
+ onVerify: r,
996
+ onResendCode: o
997
+ } = n, [i, s] = Y(!1), [a, c] = Y(""), u = e.stage === "otp", h = async () => {
998
+ c(""), s(!0);
999
+ try {
1000
+ await l();
1001
+ } catch (f) {
1002
+ c(f?.message ?? "Unable to continue right now");
1003
+ } finally {
1004
+ s(!1);
1005
+ }
1006
+ };
1007
+ return /* @__PURE__ */ d(ie, { layoutType: "standalone", variant: "mobile", contentWidth: "sm", backButton: u && t != null ? /* @__PURE__ */ d(pe, { onClick: t }) : void 0, logo: u ? void 0 : /* @__PURE__ */ d("img", { src: Ve, alt: "Docthub Logo", width: 46, height: 46 }), title: u ? void 0 : /* @__PURE__ */ d(A, { variant: "h5", weight: "bold", align: "center", className: "text-[14px] leading-[21px] text-black mt-4 md:mt-6", children: "Welcome to Docthub" }), description: u ? void 0 : tn(e), className: Se, children: u ? /* @__PURE__ */ d(Je, { mode: e.otpTarget?.type ?? e.conflictField, title: an(e), recipientDisplay: cn(e), submitApi: r, onResendCode: o }) : /* @__PURE__ */ d(sn, { details: e, isSubmitting: i, errorMessage: a, onContinue: () => {
1008
+ h();
1009
+ } }) });
1010
+ }
1011
+ function ve(n) {
1012
+ const e = _.c(43);
1013
+ let t, l, r, o, i, s, a, c, u, h, f, m, p, b, g, y, v, x;
1014
+ e[0] !== n ? ({
1015
+ name: u,
1016
+ label: y,
1017
+ countryCode: v,
1018
+ countryCodeName: o,
1019
+ phoneArrayName: p,
1020
+ selectedCountryName: g,
1021
+ countries: r,
1022
+ defaultCountry: i,
1023
+ onValuesChange: m,
1024
+ onCountryChange: h,
1025
+ onCountryCodeChange: f,
1026
+ placeholder: x,
1027
+ disabled: s,
1028
+ required: b,
1029
+ className: t,
1030
+ helperText: c,
1031
+ control: l,
1032
+ ...a
1033
+ } = n, e[0] = n, e[1] = t, e[2] = l, e[3] = r, e[4] = o, e[5] = i, e[6] = s, e[7] = a, e[8] = c, e[9] = u, e[10] = h, e[11] = f, e[12] = m, e[13] = p, e[14] = b, e[15] = g, e[16] = y, e[17] = v, e[18] = x) : (t = e[1], l = e[2], r = e[3], o = e[4], i = e[5], s = e[6], a = e[7], c = e[8], u = e[9], h = e[10], f = e[11], m = e[12], p = e[13], b = e[14], g = e[15], y = e[16], v = e[17], x = e[18]);
1034
+ const N = y === void 0 ? "Phone Number" : y, C = v === void 0 ? "91" : v, S = x === void 0 ? "Enter phone number" : x, E = le(), w = l || E.control;
1035
+ let O;
1036
+ e[19] !== t || e[20] !== r || e[21] !== C || e[22] !== o || e[23] !== i || e[24] !== s || e[25] !== a || e[26] !== c || e[27] !== N || e[28] !== E || e[29] !== u || e[30] !== h || e[31] !== f || e[32] !== m || e[33] !== p || e[34] !== S || e[35] !== b || e[36] !== w || e[37] !== g ? (O = (F) => {
1037
+ const {
1038
+ field: W,
1039
+ fieldState: T
1040
+ } = F, k = (I, M) => /* @__PURE__ */ d(rt, { ...a, id: u, value: String(W.value ?? ""), ...N !== void 0 && {
1041
+ label: N
1042
+ }, ...I ? {
1043
+ countryCode: I
1044
+ } : {}, ...S !== void 0 && {
1045
+ placeholder: S
1046
+ }, ...s !== void 0 && {
1047
+ disabled: s
1048
+ }, ...b !== void 0 && {
1049
+ required: b
1050
+ }, ...r !== void 0 && {
1051
+ countries: r
1052
+ }, ...i !== void 0 && {
1053
+ defaultCountry: i
1054
+ }, ...t !== void 0 && {
1055
+ className: t
1056
+ }, ...T.error?.message !== void 0 && {
1057
+ error: T.error?.message
1058
+ }, ...T.error === void 0 && c !== void 0 && {
1059
+ helperText: c
1060
+ }, onPhoneChange: (R) => {
1061
+ W.onChange(R.replaceAll(/\D/g, ""));
1062
+ }, onCountryCodeChange: (R) => {
1063
+ const U = String(R || "").replaceAll(/\D/g, "");
1064
+ M?.(U), f?.(R);
1065
+ }, onValuesChange: (R) => {
1066
+ p && E.setValue(p, R, {
1067
+ shouldDirty: !0
1068
+ }), m?.(R);
1069
+ }, onCountryChange: (R) => {
1070
+ g && E.setValue(g, JSON.stringify(R), {
1071
+ shouldDirty: !0
1072
+ }), h?.(R);
1073
+ }, onBlur: W.onBlur });
1074
+ if (!o) {
1075
+ const I = String(C || "").replaceAll(/\D/g, "");
1076
+ return k(I);
1077
+ }
1078
+ return /* @__PURE__ */ d(de, { name: o, control: w, render: (I) => {
1079
+ const {
1080
+ field: M
1081
+ } = I, R = String(M.value ?? C ?? "").replaceAll(/\D/g, "");
1082
+ return k(R, M.onChange);
1083
+ } });
1084
+ }, e[19] = t, e[20] = r, e[21] = C, e[22] = o, e[23] = i, e[24] = s, e[25] = a, e[26] = c, e[27] = N, e[28] = E, e[29] = u, e[30] = h, e[31] = f, e[32] = m, e[33] = p, e[34] = S, e[35] = b, e[36] = w, e[37] = g, e[38] = O) : O = e[38];
1085
+ let L;
1086
+ return e[39] !== u || e[40] !== w || e[41] !== O ? (L = /* @__PURE__ */ d(de, { name: u, control: w, render: O }), e[39] = u, e[40] = w, e[41] = O, e[42] = L) : L = e[42], L;
1087
+ }
1088
+ function ue(n) {
1089
+ const e = _.c(15), {
1090
+ name: t,
1091
+ label: l,
1092
+ placeholder: r,
1093
+ className: o,
1094
+ control: i,
1095
+ required: s,
1096
+ type: a,
1097
+ disabled: c,
1098
+ onKeyDown: u,
1099
+ maxLength: h,
1100
+ numericOnly: f,
1101
+ autoFocus: m
1102
+ } = n, p = le(), b = i || p.control;
1103
+ let g;
1104
+ e[0] !== m || e[1] !== o || e[2] !== c || e[3] !== l || e[4] !== h || e[5] !== f || e[6] !== u || e[7] !== r || e[8] !== s || e[9] !== a ? (g = (v) => {
1105
+ const {
1106
+ field: x,
1107
+ fieldState: N
1108
+ } = v;
1109
+ return /* @__PURE__ */ d(st, { ...x, value: x.value ?? "", ...m !== void 0 && {
1110
+ autoFocus: m
1111
+ }, ...l !== void 0 && {
1112
+ label: l
1113
+ }, ...r !== void 0 && {
1114
+ placeholder: r
1115
+ }, ...N.error?.message !== void 0 && {
1116
+ error: N.error.message
1117
+ }, ...o !== void 0 && {
1118
+ className: o
1119
+ }, ...s !== void 0 && {
1120
+ required: s
1121
+ }, type: a, ...c !== void 0 && {
1122
+ disabled: c
1123
+ }, onKeyDown: f ? (C) => {
1124
+ !/[0-9]/.test(C.key) && !["Backspace", "Tab", "Delete", "ArrowLeft", "ArrowRight", "Home", "End"].includes(C.key) && C.preventDefault(), u?.(C);
1125
+ } : u, ...h !== void 0 && {
1126
+ maxLength: h
1127
+ }, onChange: (C) => {
1128
+ const S = C?.target?.value;
1129
+ if (typeof S == "string") {
1130
+ let E = S.replace(/^\s+/, "");
1131
+ f && (E = E.replace(/\D/g, "")), x.onChange(E);
1132
+ } else
1133
+ x.onChange(S);
1134
+ }, onBlur: () => {
1135
+ const C = x.value;
1136
+ if (typeof C == "string") {
1137
+ const S = C.trim();
1138
+ S !== C && x.onChange(S);
1139
+ }
1140
+ x.onBlur();
1141
+ } });
1142
+ }, e[0] = m, e[1] = o, e[2] = c, e[3] = l, e[4] = h, e[5] = f, e[6] = u, e[7] = r, e[8] = s, e[9] = a, e[10] = g) : g = e[10];
1143
+ let y;
1144
+ return e[11] !== t || e[12] !== b || e[13] !== g ? (y = /* @__PURE__ */ d(de, { name: t, control: b, render: g }), e[11] = t, e[12] = b, e[13] = g, e[14] = y) : y = e[14], y;
1145
+ }
1146
+ function un(n, e) {
1147
+ const t = (n ?? "").trim();
1148
+ if (t.length === 0) return "";
1149
+ if (t.startsWith("+")) return t;
1150
+ const l = (e ?? "").replaceAll(/\D/g, "");
1151
+ return l.length > 0 ? `+${l}${t}` : t;
1152
+ }
1153
+ const Ae = "doct-auth-kit:form:";
1154
+ function Le() {
1155
+ if (typeof window > "u") return null;
1156
+ try {
1157
+ return window.sessionStorage;
1158
+ } catch {
1159
+ return null;
1160
+ }
1161
+ }
1162
+ function dn(n) {
1163
+ const e = Le();
1164
+ if (!e) return null;
1165
+ try {
1166
+ const t = e.getItem(Ae + n);
1167
+ return t ? JSON.parse(t) : null;
1168
+ } catch {
1169
+ return null;
1170
+ }
1171
+ }
1172
+ function fn(n, e) {
1173
+ const t = Le();
1174
+ if (t)
1175
+ try {
1176
+ t.setItem(Ae + n, JSON.stringify(e));
1177
+ } catch {
1178
+ }
1179
+ }
1180
+ function Vn() {
1181
+ const n = Le();
1182
+ if (n)
1183
+ try {
1184
+ const e = [];
1185
+ for (let t = 0; t < n.length; t++) {
1186
+ const l = n.key(t);
1187
+ l && l.startsWith(Ae) && e.push(l);
1188
+ }
1189
+ e.forEach((t) => n.removeItem(t));
1190
+ } catch {
1191
+ }
1192
+ }
1193
+ function Ze(n, e) {
1194
+ for (const t of n.issues) {
1195
+ const l = t.path[0];
1196
+ typeof l == "string" && e(l, {
1197
+ message: t.message
1198
+ });
1199
+ }
1200
+ }
1201
+ function Qe(n, e) {
1202
+ const t = ne(null);
1203
+ J(() => {
1204
+ if (t.current === n) return;
1205
+ t.current = n;
1206
+ const l = dn(n);
1207
+ l && e.reset(l);
1208
+ }, [n]), J(() => {
1209
+ const l = e.watch((r) => {
1210
+ fn(n, r);
1211
+ });
1212
+ return () => l.unsubscribe();
1213
+ }, [e, n]);
1214
+ }
1215
+ function mn(n) {
1216
+ const e = _.c(19), {
1217
+ mode: t,
1218
+ onSubmit: l,
1219
+ submitApi: r,
1220
+ onSuccess: o,
1221
+ onError: i
1222
+ } = n, [s, a] = Y(!1), c = t === "phone";
1223
+ let u;
1224
+ e[0] !== c ? (u = c ? {
1225
+ phone: "",
1226
+ countryCode: "91"
1227
+ } : {
1228
+ email: ""
1229
+ }, e[0] = c, e[1] = u) : u = e[1];
1230
+ const h = u;
1231
+ let f;
1232
+ e[2] !== h ? (f = {
1233
+ defaultValues: h,
1234
+ mode: "onChange"
1235
+ }, e[2] = h, e[3] = f) : f = e[3];
1236
+ const m = xe(f);
1237
+ Qe(`login-entry:${t}`, m);
1238
+ let p;
1239
+ e[4] !== m || e[5] !== t || e[6] !== i || e[7] !== l || e[8] !== o || e[9] !== r ? (p = (x) => {
1240
+ const C = We[t].safeParse(x);
1241
+ if (!C.success) {
1242
+ Ze(C.error, (E, w) => m.setError(E, w));
1243
+ return;
1244
+ }
1245
+ const S = C.data;
1246
+ if (r) {
1247
+ a(!0);
1248
+ const E = S.phone ? un(S.phone, S.countryCode) : S.email ?? "", w = {
1249
+ mode: t,
1250
+ recipient: E
1251
+ };
1252
+ r(S).then(() => {
1253
+ o?.(w);
1254
+ }).catch((O) => {
1255
+ i?.(O);
1256
+ }).finally(() => {
1257
+ a(!1);
1258
+ });
1259
+ return;
1260
+ }
1261
+ l?.(S);
1262
+ }, e[4] = m, e[5] = t, e[6] = i, e[7] = l, e[8] = o, e[9] = r, e[10] = p) : p = e[10];
1263
+ const b = p;
1264
+ let g;
1265
+ e[11] !== t ? (g = (x) => We[t].safeParse(x).success, e[11] = t, e[12] = g) : g = e[12];
1266
+ const y = g;
1267
+ let v;
1268
+ return e[13] !== b || e[14] !== y || e[15] !== c || e[16] !== s || e[17] !== m ? (v = {
1269
+ methods: m,
1270
+ handleSubmit: b,
1271
+ isPhone: c,
1272
+ isFormValid: y,
1273
+ isSubmitting: s
1274
+ }, e[13] = b, e[14] = y, e[15] = c, e[16] = s, e[17] = m, e[18] = v) : v = e[18], v;
1275
+ }
1276
+ function hn(n) {
1277
+ const e = _.c(14), {
1278
+ isPhone: t,
1279
+ handleSubmit: l,
1280
+ isSubmitting: r
1281
+ } = n, o = le();
1282
+ let i;
1283
+ e[0] !== l || e[1] !== o ? (i = o.handleSubmit(l), e[0] = l, e[1] = o, e[2] = i) : i = e[2];
1284
+ let s;
1285
+ e[3] !== t ? (s = /* @__PURE__ */ d("div", { className: "mb-6 flex w-full flex-col gap-[12px]", children: t ? /* @__PURE__ */ d(ve, { name: "phone", label: "", placeholder: "Phone number", countryCode: "+91", countryCodeName: "countryCode", defaultCountry: "IN", className: "[&_button]:!h-[44px] [&_input]:!h-[44px]", autoFocus: !0 }) : /* @__PURE__ */ d(ue, { name: "email", placeholder: "Enter email address", type: "email", className: "[&_input]:!h-[44px]", autoFocus: !0 }) }), e[3] = t, e[4] = s) : s = e[4];
1286
+ let a;
1287
+ e[5] !== r ? (a = r ? /* @__PURE__ */ d(ge, { size: 32, strokeWidth: 2 }) : "Continue", e[5] = r, e[6] = a) : a = e[6];
1288
+ let c;
1289
+ e[7] !== r || e[8] !== a ? (c = /* @__PURE__ */ d(j, { type: "submit", variant: "primary", size: "large", fullWidth: !0, disabled: r, children: a }), e[7] = r, e[8] = a, e[9] = c) : c = e[9];
1290
+ let u;
1291
+ return e[10] !== i || e[11] !== s || e[12] !== c ? (u = /* @__PURE__ */ P("form", { onSubmit: i, className: "w-full flex flex-col", noValidate: !0, children: [
1292
+ s,
1293
+ c
1294
+ ] }), e[10] = i, e[11] = s, e[12] = c, e[13] = u) : u = e[13], u;
1295
+ }
1296
+ function gn(n) {
1297
+ const e = _.c(13), {
1298
+ mode: t,
1299
+ onSubmit: l,
1300
+ submitApi: r,
1301
+ onSuccess: o,
1302
+ onError: i
1303
+ } = n;
1304
+ let s;
1305
+ e[0] !== t || e[1] !== i || e[2] !== l || e[3] !== o || e[4] !== r ? (s = {
1306
+ mode: t,
1307
+ onSubmit: l,
1308
+ submitApi: r,
1309
+ onSuccess: o,
1310
+ onError: i
1311
+ }, e[0] = t, e[1] = i, e[2] = l, e[3] = o, e[4] = r, e[5] = s) : s = e[5];
1312
+ const {
1313
+ methods: a,
1314
+ handleSubmit: c,
1315
+ isPhone: u,
1316
+ isSubmitting: h
1317
+ } = mn(s);
1318
+ let f;
1319
+ e[6] !== c || e[7] !== u || e[8] !== h ? (f = /* @__PURE__ */ d(hn, { isPhone: u, handleSubmit: c, isSubmitting: h }), e[6] = c, e[7] = u, e[8] = h, e[9] = f) : f = e[9];
1320
+ let m;
1321
+ return e[10] !== a || e[11] !== f ? (m = /* @__PURE__ */ d(Ce, { ...a, children: f }), e[10] = a, e[11] = f, e[12] = m) : m = e[12], m;
1322
+ }
1323
+ const pn = {
1324
+ phone: "Enter Phone Number",
1325
+ email: "Enter Email Address"
1326
+ }, bn = {
1327
+ phone: "We will send you 6 digit OTP on the given Phone Number.",
1328
+ email: "We will send you 6 digit OTP on the given Email Address."
1329
+ };
1330
+ function Gn(n) {
1331
+ const e = _.c(27), {
1332
+ mode: t,
1333
+ title: l,
1334
+ subtitle: r,
1335
+ onBack: o,
1336
+ onSubmit: i,
1337
+ submitApi: s,
1338
+ onSuccess: a,
1339
+ onError: c,
1340
+ layoutType: u,
1341
+ variant: h
1342
+ } = n, f = u === void 0 ? "withSlider" : u, m = h === void 0 ? "desktop" : h, p = l ?? pn[t], b = r ?? bn[t];
1343
+ let g;
1344
+ e[0] !== o ? (g = o != null ? /* @__PURE__ */ d(pe, { onClick: o }) : void 0, e[0] = o, e[1] = g) : g = e[1];
1345
+ let y;
1346
+ e[2] !== p ? (y = /* @__PURE__ */ d(A, { variant: "h5", weight: "extraBold", align: "left", className: "-mb-1.5", children: p }), e[2] = p, e[3] = y) : y = e[3];
1347
+ let v;
1348
+ e[4] !== b ? (v = /* @__PURE__ */ d(A, { variant: "body1", align: "left", className: "mb-4 md:mb-4", children: b }), e[4] = b, e[5] = v) : v = e[5];
1349
+ let x;
1350
+ e[6] !== i ? (x = i && {
1351
+ onSubmit: i
1352
+ }, e[6] = i, e[7] = x) : x = e[7];
1353
+ let N;
1354
+ e[8] !== s ? (N = s && {
1355
+ submitApi: s
1356
+ }, e[8] = s, e[9] = N) : N = e[9];
1357
+ let C;
1358
+ e[10] !== a ? (C = a && {
1359
+ onSuccess: a
1360
+ }, e[10] = a, e[11] = C) : C = e[11];
1361
+ let S;
1362
+ e[12] !== c ? (S = c && {
1363
+ onError: c
1364
+ }, e[12] = c, e[13] = S) : S = e[13];
1365
+ let E;
1366
+ e[14] !== t || e[15] !== x || e[16] !== N || e[17] !== C || e[18] !== S ? (E = /* @__PURE__ */ d(gn, { mode: t, ...x, ...N, ...C, ...S }), e[14] = t, e[15] = x, e[16] = N, e[17] = C, e[18] = S, e[19] = E) : E = e[19];
1367
+ let w;
1368
+ return e[20] !== f || e[21] !== g || e[22] !== y || e[23] !== v || e[24] !== E || e[25] !== m ? (w = /* @__PURE__ */ d(ie, { layoutType: f, variant: m, contentWidth: "sm", align: "left", backButton: g, title: y, description: v, className: Se, children: E }), e[20] = f, e[21] = g, e[22] = y, e[23] = v, e[24] = E, e[25] = m, e[26] = w) : w = e[26], w;
1369
+ }
1370
+ var et = {
1371
+ color: void 0,
1372
+ size: void 0,
1373
+ className: void 0,
1374
+ style: void 0,
1375
+ attr: void 0
1376
+ }, Ue = K.createContext && /* @__PURE__ */ K.createContext(et), yn = ["attr", "size", "title"];
1377
+ function vn(n, e) {
1378
+ if (n == null) return {};
1379
+ var t = xn(n, e), l, r;
1380
+ if (Object.getOwnPropertySymbols) {
1381
+ var o = Object.getOwnPropertySymbols(n);
1382
+ for (r = 0; r < o.length; r++)
1383
+ l = o[r], !(e.indexOf(l) >= 0) && Object.prototype.propertyIsEnumerable.call(n, l) && (t[l] = n[l]);
1384
+ }
1385
+ return t;
1386
+ }
1387
+ function xn(n, e) {
1388
+ if (n == null) return {};
1389
+ var t = {};
1390
+ for (var l in n)
1391
+ if (Object.prototype.hasOwnProperty.call(n, l)) {
1392
+ if (e.indexOf(l) >= 0) continue;
1393
+ t[l] = n[l];
1394
+ }
1395
+ return t;
1396
+ }
1397
+ function me() {
1398
+ return me = Object.assign ? Object.assign.bind() : function(n) {
1399
+ for (var e = 1; e < arguments.length; e++) {
1400
+ var t = arguments[e];
1401
+ for (var l in t)
1402
+ Object.prototype.hasOwnProperty.call(t, l) && (n[l] = t[l]);
1403
+ }
1404
+ return n;
1405
+ }, me.apply(this, arguments);
1406
+ }
1407
+ function je(n, e) {
1408
+ var t = Object.keys(n);
1409
+ if (Object.getOwnPropertySymbols) {
1410
+ var l = Object.getOwnPropertySymbols(n);
1411
+ e && (l = l.filter(function(r) {
1412
+ return Object.getOwnPropertyDescriptor(n, r).enumerable;
1413
+ })), t.push.apply(t, l);
1414
+ }
1415
+ return t;
1416
+ }
1417
+ function he(n) {
1418
+ for (var e = 1; e < arguments.length; e++) {
1419
+ var t = arguments[e] != null ? arguments[e] : {};
1420
+ e % 2 ? je(Object(t), !0).forEach(function(l) {
1421
+ Cn(n, l, t[l]);
1422
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : je(Object(t)).forEach(function(l) {
1423
+ Object.defineProperty(n, l, Object.getOwnPropertyDescriptor(t, l));
1424
+ });
1425
+ }
1426
+ return n;
1427
+ }
1428
+ function Cn(n, e, t) {
1429
+ return e = Sn(e), e in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
1430
+ }
1431
+ function Sn(n) {
1432
+ var e = Nn(n, "string");
1433
+ return typeof e == "symbol" ? e : e + "";
1434
+ }
1435
+ function Nn(n, e) {
1436
+ if (typeof n != "object" || !n) return n;
1437
+ var t = n[Symbol.toPrimitive];
1438
+ if (t !== void 0) {
1439
+ var l = t.call(n, e);
1440
+ if (typeof l != "object") return l;
1441
+ throw new TypeError("@@toPrimitive must return a primitive value.");
1442
+ }
1443
+ return (e === "string" ? String : Number)(n);
1444
+ }
1445
+ function tt(n) {
1446
+ return n && n.map((e, t) => /* @__PURE__ */ K.createElement(e.tag, he({
1447
+ key: t
1448
+ }, e.attr), tt(e.child)));
1449
+ }
1450
+ function nt(n) {
1451
+ return (e) => /* @__PURE__ */ K.createElement(wn, me({
1452
+ attr: he({}, n.attr)
1453
+ }, e), tt(n.child));
1454
+ }
1455
+ function wn(n) {
1456
+ var e = (t) => {
1457
+ var {
1458
+ attr: l,
1459
+ size: r,
1460
+ title: o
1461
+ } = n, i = vn(n, yn), s = r || t.size || "1em", a;
1462
+ return t.className && (a = t.className), n.className && (a = (a ? a + " " : "") + n.className), /* @__PURE__ */ K.createElement("svg", me({
1463
+ stroke: "currentColor",
1464
+ fill: "currentColor",
1465
+ strokeWidth: "0"
1466
+ }, t.attr, l, i, {
1467
+ className: a,
1468
+ style: he(he({
1469
+ color: n.color || t.color
1470
+ }, t.style), n.style),
1471
+ height: s,
1472
+ width: s,
1473
+ xmlns: "http://www.w3.org/2000/svg"
1474
+ }), o && /* @__PURE__ */ K.createElement("title", null, o), n.children);
1475
+ };
1476
+ return Ue !== void 0 ? /* @__PURE__ */ K.createElement(Ue.Consumer, null, (t) => e(t)) : e(et);
1477
+ }
1478
+ function _n(n) {
1479
+ return nt({ attr: { viewBox: "0 0 384 512" }, child: [{ tag: "path", attr: { d: "M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z" }, child: [] }] })(n);
1480
+ }
1481
+ function En(n) {
1482
+ return nt({ attr: { version: "1.1", x: "0px", y: "0px", viewBox: "0 0 48 48", enableBackground: "new 0 0 48 48" }, child: [{ tag: "path", attr: { fill: "#FFC107", d: `M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12\r
1483
+ c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24\r
1484
+ c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z` }, child: [] }, { tag: "path", attr: { fill: "#FF3D00", d: `M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657\r
1485
+ C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z` }, child: [] }, { tag: "path", attr: { fill: "#4CAF50", d: `M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36\r
1486
+ c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z` }, child: [] }, { tag: "path", attr: { fill: "#1976D2", d: `M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571\r
1487
+ c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z` }, child: [] }] })(n);
1488
+ }
1489
+ function lt(n) {
1490
+ const e = _.c(23);
1491
+ let t;
1492
+ e[0] !== n ? (t = n === void 0 ? {} : n, e[0] = n, e[1] = t) : t = e[1];
1493
+ const l = t, r = Tn, o = l.providers?.google?.clientId ?? "";
1494
+ let i;
1495
+ e[2] !== l.providers?.google?.onCredential ? (i = l.providers?.google?.onCredential ?? On, e[2] = l.providers?.google?.onCredential, e[3] = i) : i = e[3];
1496
+ const s = l.providers?.google?.enableOneTap ?? !1;
1497
+ let a;
1498
+ e[4] !== o || e[5] !== i || e[6] !== s ? (a = {
1499
+ clientId: o,
1500
+ onCredential: i,
1501
+ enableOneTap: s
1502
+ }, e[4] = o, e[5] = i, e[6] = s, e[7] = a) : a = e[7];
1503
+ const {
1504
+ loginWithGoogle: c
1505
+ } = It(a), u = l.providers?.apple?.clientId ?? "", h = l.providers?.apple?.redirectUri ?? "";
1506
+ let f;
1507
+ e[8] !== l.providers?.apple?.onCredential ? (f = l.providers?.apple?.onCredential ?? Pn, e[8] = l.providers?.apple?.onCredential, e[9] = f) : f = e[9];
1508
+ let m;
1509
+ e[10] !== u || e[11] !== h || e[12] !== f ? (m = {
1510
+ clientId: u,
1511
+ redirectUri: h,
1512
+ onCredential: f
1513
+ }, e[10] = u, e[11] = h, e[12] = f, e[13] = m) : m = e[13];
1514
+ const {
1515
+ triggerSignIn: p
1516
+ } = Lt(), b = l.onContinueWithMobile ?? r, g = l.onContinueWithEmail ?? r;
1517
+ let y;
1518
+ e[14] !== c || e[15] !== l.onContinueWithGoogle || e[16] !== l.providers?.google?.clientId ? (y = l.onContinueWithGoogle ?? (l.providers?.google?.clientId ? () => {
1519
+ c();
1520
+ } : r), e[14] = c, e[15] = l.onContinueWithGoogle, e[16] = l.providers?.google?.clientId, e[17] = y) : y = e[17];
1521
+ const v = l.onContinueWithApple ?? (l.providers?.apple?.clientId ? p : r);
1522
+ let x;
1523
+ return e[18] !== b || e[19] !== g || e[20] !== y || e[21] !== v ? (x = {
1524
+ onContinueWithMobile: b,
1525
+ onContinueWithEmail: g,
1526
+ onContinueWithGoogle: y,
1527
+ onContinueWithApple: v
1528
+ }, e[18] = b, e[19] = g, e[20] = y, e[21] = v, e[22] = x) : x = e[22], x;
1529
+ }
1530
+ function Pn() {
1531
+ }
1532
+ function On() {
1533
+ }
1534
+ function Tn() {
1535
+ }
1536
+ const An = "Mobile";
1537
+ function Ln(n) {
1538
+ const e = _.c(11);
1539
+ let t;
1540
+ e[0] !== n ? (t = n === void 0 ? {} : n, e[0] = n, e[1] = t) : t = e[1];
1541
+ const l = t, [r, o] = Y(!1), {
1542
+ lastUsedMethod: i,
1543
+ onContinueWithLastMethod: s,
1544
+ continueApi: a,
1545
+ onSuccess: c,
1546
+ onError: u
1547
+ } = l, h = i === void 0 ? An : i;
1548
+ let f;
1549
+ e[2] !== a || e[3] !== s || e[4] !== u || e[5] !== c ? (f = () => {
1550
+ if (a) {
1551
+ o(!0), a().then(() => {
1552
+ c?.();
1553
+ }).catch((b) => {
1554
+ u?.(b);
1555
+ }).finally(() => {
1556
+ o(!1);
1557
+ });
1558
+ return;
1559
+ }
1560
+ s?.();
1561
+ }, e[2] = a, e[3] = s, e[4] = u, e[5] = c, e[6] = f) : f = e[6];
1562
+ const m = f;
1563
+ let p;
1564
+ return e[7] !== m || e[8] !== r || e[9] !== h ? (p = {
1565
+ handleContinue: m,
1566
+ isSubmitting: r,
1567
+ lastUsedMethod: h
1568
+ }, e[7] = m, e[8] = r, e[9] = h, e[10] = p) : p = e[10], p;
1569
+ }
1570
+ function kn(n) {
1571
+ const e = _.c(22), {
1572
+ mode: t,
1573
+ defaultPhone: l,
1574
+ onSubmit: r,
1575
+ submitApi: o,
1576
+ onSuccess: i,
1577
+ onError: s
1578
+ } = n, a = l === void 0 ? "" : l, [c, u] = Y(!1), h = t === "phone", f = t === "foreign";
1579
+ let m;
1580
+ e[0] !== a || e[1] !== f || e[2] !== h ? (m = f ? {
1581
+ fullName: "",
1582
+ email: "",
1583
+ phone: a,
1584
+ countryCode: "91"
1585
+ } : h ? {
1586
+ fullName: "",
1587
+ phone: "",
1588
+ countryCode: "91"
1589
+ } : {
1590
+ fullName: "",
1591
+ email: ""
1592
+ }, e[0] = a, e[1] = f, e[2] = h, e[3] = m) : m = e[3];
1593
+ const p = m;
1594
+ let b;
1595
+ e[4] !== p ? (b = {
1596
+ defaultValues: p,
1597
+ mode: "onChange"
1598
+ }, e[4] = p, e[5] = b) : b = e[5];
1599
+ const g = xe(b);
1600
+ Qe(`signup:${t}`, g);
1601
+ let y;
1602
+ e[6] !== g || e[7] !== t || e[8] !== s || e[9] !== r || e[10] !== i || e[11] !== o ? (y = (S) => {
1603
+ const w = $e[t].safeParse(S);
1604
+ if (!w.success) {
1605
+ Ze(w.error, (L, F) => g.setError(L, F));
1606
+ return;
1607
+ }
1608
+ const O = {
1609
+ fullName: w.data.fullName,
1610
+ ..."phone" in w.data && w.data.phone && {
1611
+ phone: w.data.phone
1612
+ },
1613
+ ..."countryCode" in w.data && w.data.countryCode && {
1614
+ countryCode: w.data.countryCode
1615
+ },
1616
+ ..."email" in w.data && w.data.email && {
1617
+ email: w.data.email
1618
+ }
1619
+ };
1620
+ if (o) {
1621
+ u(!0), o(O).then(() => {
1622
+ i?.();
1623
+ }).catch((L) => {
1624
+ s?.(L);
1625
+ }).finally(() => {
1626
+ u(!1);
1627
+ });
1628
+ return;
1629
+ }
1630
+ r?.(O);
1631
+ }, e[6] = g, e[7] = t, e[8] = s, e[9] = r, e[10] = i, e[11] = o, e[12] = y) : y = e[12];
1632
+ const v = y;
1633
+ let x;
1634
+ e[13] !== t ? (x = (S) => $e[t].safeParse(S).success, e[13] = t, e[14] = x) : x = e[14];
1635
+ const N = x;
1636
+ let C;
1637
+ return e[15] !== v || e[16] !== f || e[17] !== N || e[18] !== h || e[19] !== c || e[20] !== g ? (C = {
1638
+ methods: g,
1639
+ handleSubmit: v,
1640
+ isPhone: h,
1641
+ isForeign: f,
1642
+ isFormValid: N,
1643
+ isSubmitting: c
1644
+ }, e[15] = v, e[16] = f, e[17] = N, e[18] = h, e[19] = c, e[20] = g, e[21] = C) : C = e[21], C;
1645
+ }
1646
+ const it = (n) => {
1647
+ const e = _.c(19), {
1648
+ handlers: t
1649
+ } = n, {
1650
+ onContinueWithMobile: l,
1651
+ onContinueWithEmail: r,
1652
+ onContinueWithGoogle: o,
1653
+ onContinueWithApple: i
1654
+ } = t;
1655
+ let s;
1656
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ d(ce, { children: "Continue with Mobile" }), e[0] = s) : s = e[0];
1657
+ let a;
1658
+ e[1] !== l ? (a = /* @__PURE__ */ d(j, { variant: "outline", size: "large", fullWidth: !0, onClick: l, children: s }), e[1] = l, e[2] = a) : a = e[2];
1659
+ let c;
1660
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ d(ce, { children: "Continue with Email" }), e[3] = c) : c = e[3];
1661
+ let u;
1662
+ e[4] !== r ? (u = /* @__PURE__ */ d(j, { variant: "outline", size: "large", fullWidth: !0, onClick: r, children: c }), e[4] = r, e[5] = u) : u = e[5];
1663
+ let h;
1664
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ d(En, { "aria-hidden": !0 }), e[6] = h) : h = e[6];
1665
+ let f;
1666
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ d(ce, { children: "Continue with Google" }), e[7] = f) : f = e[7];
1667
+ let m;
1668
+ e[8] !== o ? (m = /* @__PURE__ */ d(j, { variant: "outline", size: "large", fullWidth: !0, icon: h, iconPosition: "left", onClick: o, children: f }), e[8] = o, e[9] = m) : m = e[9];
1669
+ let p;
1670
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ d(_n, { "aria-hidden": !0 }), e[10] = p) : p = e[10];
1671
+ let b;
1672
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ d(ce, { children: "Continue with Apple" }), e[11] = b) : b = e[11];
1673
+ let g;
1674
+ e[12] !== i ? (g = /* @__PURE__ */ d(j, { variant: "outline", size: "large", fullWidth: !0, icon: p, iconPosition: "left", onClick: i, children: b }), e[12] = i, e[13] = g) : g = e[13];
1675
+ let y;
1676
+ return e[14] !== g || e[15] !== a || e[16] !== u || e[17] !== m ? (y = /* @__PURE__ */ P("div", { className: "w-full flex flex-col gap-2", children: [
1677
+ a,
1678
+ u,
1679
+ m,
1680
+ g
1681
+ ] }), e[14] = g, e[15] = a, e[16] = u, e[17] = m, e[18] = y) : y = e[18], y;
1682
+ }, ce = (n) => {
1683
+ const e = _.c(2), {
1684
+ children: t
1685
+ } = n;
1686
+ let l;
1687
+ return e[0] !== t ? (l = /* @__PURE__ */ d(A, { variant: "textLabel1", weight: "semiBold", align: "center", className: "opacity-80", children: t }), e[0] = t, e[1] = l) : l = e[1], l;
1688
+ };
1689
+ function Hn(n) {
1690
+ const e = _.c(2), t = lt(n);
1691
+ let l;
1692
+ return e[0] !== t ? (l = /* @__PURE__ */ d(it, { handlers: t }), e[0] = t, e[1] = l) : l = e[1], l;
1693
+ }
1694
+ const qn = (n) => {
1695
+ const e = _.c(17), t = lt(n);
1696
+ let l;
1697
+ e[0] !== n.onEnterpriseLogin ? (l = n.onEnterpriseLogin != null && {
1698
+ onClick: n.onEnterpriseLogin
1699
+ }, e[0] = n.onEnterpriseLogin, e[1] = l) : l = e[1];
1700
+ let r;
1701
+ e[2] !== n.enterpriseLoginUrl ? (r = n.enterpriseLoginUrl != null && {
1702
+ href: n.enterpriseLoginUrl
1703
+ }, e[2] = n.enterpriseLoginUrl, e[3] = r) : r = e[3];
1704
+ let o;
1705
+ e[4] !== l || e[5] !== r ? (o = {
1706
+ ...l,
1707
+ ...r
1708
+ }, e[4] = l, e[5] = r, e[6] = o) : o = e[6];
1709
+ const i = o;
1710
+ let s;
1711
+ e[7] !== i ? (s = /* @__PURE__ */ d(yt, { ...i }), e[7] = i, e[8] = s) : s = e[8];
1712
+ let a, c, u;
1713
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ d(A, { variant: "title1", weight: "bold", align: "center", className: "max-w-[250px] mx-auto mb-0 md:mb-2", children: "The Healthcare Career App" }), c = /* @__PURE__ */ d(A, { variant: "body1", align: "center", className: "mb-0 md:mb-2", children: "Continue to Signup, If you already have an account we'll log you in." }), u = /* @__PURE__ */ d(He, {}), e[9] = a, e[10] = c, e[11] = u) : (a = e[9], c = e[10], u = e[11]);
1714
+ let h;
1715
+ e[12] !== t ? (h = /* @__PURE__ */ d(it, { handlers: t }), e[12] = t, e[13] = h) : h = e[13];
1716
+ let f;
1717
+ return e[14] !== s || e[15] !== h ? (f = /* @__PURE__ */ d(ie, { layoutType: "withSlider", variant: "desktop", header: s, logo: ze, align: "center", title: a, description: c, footer: u, children: h }), e[14] = s, e[15] = h, e[16] = f) : f = e[16], f;
1718
+ };
1719
+ function Rn(n) {
1720
+ const e = _.c(21);
1721
+ let t, l;
1722
+ e[0] !== n ? ({
1723
+ onUseAnotherMethod: l,
1724
+ ...t
1725
+ } = n, e[0] = n, e[1] = t, e[2] = l) : (t = e[1], l = e[2]);
1726
+ let r;
1727
+ e[3] !== t.continueApi || e[4] !== t.lastUsedMethod || e[5] !== t.onContinueWithLastMethod || e[6] !== t.onError || e[7] !== t.onSuccess ? (r = {
1728
+ lastUsedMethod: t.lastUsedMethod,
1729
+ onContinueWithLastMethod: t.onContinueWithLastMethod,
1730
+ continueApi: t.continueApi,
1731
+ onSuccess: t.onSuccess,
1732
+ onError: t.onError
1733
+ }, e[3] = t.continueApi, e[4] = t.lastUsedMethod, e[5] = t.onContinueWithLastMethod, e[6] = t.onError, e[7] = t.onSuccess, e[8] = r) : r = e[8];
1734
+ const {
1735
+ handleContinue: o,
1736
+ isSubmitting: i,
1737
+ lastUsedMethod: s
1738
+ } = Ln(r), a = i ? "Continuing…" : `Continue with ${s}`;
1739
+ let c;
1740
+ e[9] !== a ? (c = /* @__PURE__ */ d(A, { variant: "textLabel1", weight: "semiBold", align: "center", className: "text-neutral-white", children: a }), e[9] = a, e[10] = c) : c = e[10];
1741
+ let u;
1742
+ e[11] !== o || e[12] !== i || e[13] !== c ? (u = /* @__PURE__ */ d(j, { variant: "primary", size: "large", fullWidth: !0, onClick: o, disabled: i, children: c }), e[11] = o, e[12] = i, e[13] = c, e[14] = u) : u = e[14];
1743
+ let h;
1744
+ e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ d(A, { variant: "textLabel1", weight: "semiBold", align: "center", className: "opacity-80", children: "Use another method" }), e[15] = h) : h = e[15];
1745
+ let f;
1746
+ e[16] !== l ? (f = /* @__PURE__ */ d(j, { variant: "outline", size: "large", fullWidth: !0, onClick: l, children: h }), e[16] = l, e[17] = f) : f = e[17];
1747
+ let m;
1748
+ return e[18] !== u || e[19] !== f ? (m = /* @__PURE__ */ P("div", { className: "w-full flex flex-col gap-[12px]", children: [
1749
+ u,
1750
+ f
1751
+ ] }), e[18] = u, e[19] = f, e[20] = m) : m = e[20], m;
1752
+ }
1753
+ function Kn(n) {
1754
+ const e = _.c(18), {
1755
+ lastUsedMethod: t,
1756
+ onContinueWithLastMethod: l,
1757
+ onUseAnotherMethod: r,
1758
+ continueApi: o,
1759
+ onSuccess: i,
1760
+ onError: s,
1761
+ layoutType: a,
1762
+ variant: c
1763
+ } = n, u = t === void 0 ? "Mobile" : t, h = a === void 0 ? "withSlider" : a, f = c === "mobile" || h === "standalone";
1764
+ let m;
1765
+ e[0] !== f ? (m = f ? /* @__PURE__ */ d(A, { variant: "h5", weight: "bold", align: "center", className: "text-primary -mb-2 mt-4", children: "Welcome Back!" }) : /* @__PURE__ */ P(A, { variant: "h6", weight: "extraBold", align: "left", className: "text-neutral-black -mb-2 mt-4", children: [
1766
+ " ",
1767
+ "Welcome Back!",
1768
+ " "
1769
+ ] }), e[0] = f, e[1] = m) : m = e[1];
1770
+ let p;
1771
+ e[2] !== u ? (p = /* @__PURE__ */ P(A, { variant: "body1", align: "center", className: "text-neutral-black mb-4 md:mb-4", children: [
1772
+ "Last time you used ",
1773
+ u,
1774
+ " to log in."
1775
+ ] }), e[2] = u, e[3] = p) : p = e[3];
1776
+ let b;
1777
+ e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ d(He, {}), e[4] = b) : b = e[4];
1778
+ let g;
1779
+ e[5] !== o || e[6] !== u || e[7] !== l || e[8] !== s || e[9] !== i || e[10] !== r ? (g = /* @__PURE__ */ d(Rn, { lastUsedMethod: u, onContinueWithLastMethod: l, onUseAnotherMethod: r, continueApi: o, onSuccess: i, onError: s }), e[5] = o, e[6] = u, e[7] = l, e[8] = s, e[9] = i, e[10] = r, e[11] = g) : g = e[11];
1780
+ let y;
1781
+ return e[12] !== h || e[13] !== m || e[14] !== p || e[15] !== g || e[16] !== c ? (y = /* @__PURE__ */ d(ie, { layoutType: h, variant: c, logo: ze, title: m, description: p, footer: b, children: g }), e[12] = h, e[13] = m, e[14] = p, e[15] = g, e[16] = c, e[17] = y) : y = e[17], y;
1782
+ }
1783
+ function In(n) {
1784
+ const e = _.c(16), {
1785
+ isPhone: t,
1786
+ isForeign: l,
1787
+ handleSubmit: r,
1788
+ isSubmitting: o
1789
+ } = n, i = le();
1790
+ let s;
1791
+ e[0] !== r || e[1] !== i ? (s = i.handleSubmit(r), e[0] = r, e[1] = i, e[2] = s) : s = e[2];
1792
+ let a;
1793
+ e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ d(ue, { name: "fullName", placeholder: "Full name", type: "text", className: "w-full", autoFocus: !0 }), e[3] = a) : a = e[3];
1794
+ let c;
1795
+ e[4] !== l || e[5] !== t ? (c = /* @__PURE__ */ P("div", { className: "mb-6 flex w-full flex-col gap-[12px]", children: [
1796
+ a,
1797
+ l ? /* @__PURE__ */ P(Be, { children: [
1798
+ /* @__PURE__ */ d(ue, { name: "email", placeholder: "Email address", type: "email", className: "w-full" }),
1799
+ /* @__PURE__ */ d(ve, { name: "phone", label: "", placeholder: "Phone number", countryCode: "+91", countryCodeName: "countryCode", defaultCountry: "IN" })
1800
+ ] }) : t ? /* @__PURE__ */ d(ve, { name: "phone", label: "", placeholder: "Phone number", countryCode: "+91", countryCodeName: "countryCode", defaultCountry: "IN" }) : /* @__PURE__ */ d(ue, { name: "email", placeholder: "Email address", type: "email", className: "w-full" })
1801
+ ] }), e[4] = l, e[5] = t, e[6] = c) : c = e[6];
1802
+ let u;
1803
+ e[7] !== o ? (u = o ? /* @__PURE__ */ d(ge, { size: 32, strokeWidth: 2 }) : "Continue", e[7] = o, e[8] = u) : u = e[8];
1804
+ let h;
1805
+ e[9] !== o || e[10] !== u ? (h = /* @__PURE__ */ d(j, { type: "submit", variant: "primary", size: "large", fullWidth: !0, disabled: o, children: u }), e[9] = o, e[10] = u, e[11] = h) : h = e[11];
1806
+ let f;
1807
+ return e[12] !== s || e[13] !== c || e[14] !== h ? (f = /* @__PURE__ */ P("form", { onSubmit: s, className: "w-full flex flex-col items-center", noValidate: !0, children: [
1808
+ c,
1809
+ h
1810
+ ] }), e[12] = s, e[13] = c, e[14] = h, e[15] = f) : f = e[15], f;
1811
+ }
1812
+ function Fn(n) {
1813
+ const e = _.c(15), {
1814
+ userType: t,
1815
+ signupCollectField: l,
1816
+ pendingPhone: r,
1817
+ onSubmit: o,
1818
+ submitApi: i,
1819
+ onSuccess: s,
1820
+ onError: a
1821
+ } = n, c = r === void 0 ? "" : r, u = t === "FOREIGN" ? "foreign" : l === "phone" ? "phone" : "email";
1822
+ let h;
1823
+ e[0] !== u || e[1] !== a || e[2] !== o || e[3] !== s || e[4] !== c || e[5] !== i ? (h = {
1824
+ mode: u,
1825
+ defaultPhone: c,
1826
+ onSubmit: o,
1827
+ submitApi: i,
1828
+ onSuccess: s,
1829
+ onError: a
1830
+ }, e[0] = u, e[1] = a, e[2] = o, e[3] = s, e[4] = c, e[5] = i, e[6] = h) : h = e[6];
1831
+ const {
1832
+ methods: f,
1833
+ handleSubmit: m,
1834
+ isPhone: p,
1835
+ isForeign: b,
1836
+ isSubmitting: g
1837
+ } = kn(h);
1838
+ let y;
1839
+ e[7] !== m || e[8] !== b || e[9] !== p || e[10] !== g ? (y = /* @__PURE__ */ d(In, { isPhone: p, isForeign: b, handleSubmit: m, isSubmitting: g }), e[7] = m, e[8] = b, e[9] = p, e[10] = g, e[11] = y) : y = e[11];
1840
+ let v;
1841
+ return e[12] !== f || e[13] !== y ? (v = /* @__PURE__ */ d(Ce, { ...f, children: y }), e[12] = f, e[13] = y, e[14] = v) : v = e[14], v;
1842
+ }
1843
+ function Yn(n) {
1844
+ const e = _.c(21), {
1845
+ layoutType: t,
1846
+ variant: l
1847
+ } = n, r = t === void 0 ? "standalone" : t, o = l === void 0 ? "mobile" : l;
1848
+ let i;
1849
+ e[0] !== n.loginMethod || e[1] !== n.onError || e[2] !== n.onSubmit || e[3] !== n.onSuccess || e[4] !== n.pendingPhone || e[5] !== n.signupCollectField || e[6] !== n.submitApi || e[7] !== n.userType ? (i = {
1850
+ userType: n.userType,
1851
+ loginMethod: n.loginMethod,
1852
+ signupCollectField: n.signupCollectField,
1853
+ pendingPhone: n.pendingPhone,
1854
+ onSubmit: n.onSubmit,
1855
+ submitApi: n.submitApi,
1856
+ onSuccess: n.onSuccess,
1857
+ onError: n.onError
1858
+ }, e[0] = n.loginMethod, e[1] = n.onError, e[2] = n.onSubmit, e[3] = n.onSuccess, e[4] = n.pendingPhone, e[5] = n.signupCollectField, e[6] = n.submitApi, e[7] = n.userType, e[8] = i) : i = e[8];
1859
+ const s = i;
1860
+ let a;
1861
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ d("img", { src: Ve, alt: "Docthub Logo", width: 46, height: 46 }), e[9] = a) : a = e[9];
1862
+ const c = a;
1863
+ let u;
1864
+ e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ d(A, { variant: "h5", weight: "extraBold", align: "center", className: "text-neutral-black mt-4 md:mt-6 -mb-1", children: "Welcome to Docthub" }), e[10] = u) : u = e[10];
1865
+ const h = u, f = n.userType === "FOREIGN" ? "email" : n.signupCollectField;
1866
+ let m;
1867
+ e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ d("span", { className: "font-bold", children: "Full Name" }), e[11] = m) : m = e[11];
1868
+ const p = f === "phone" ? "Phone Number" : "Email Address";
1869
+ let b;
1870
+ e[12] !== p ? (b = /* @__PURE__ */ P(A, { variant: "title2", align: "center", className: "mb-4 md:mb-6", children: [
1871
+ "Please tell us your ",
1872
+ m,
1873
+ " and",
1874
+ " ",
1875
+ /* @__PURE__ */ d("span", { className: "font-bold", children: p }),
1876
+ " ",
1877
+ "for extended security of your account."
1878
+ ] }), e[12] = p, e[13] = b) : b = e[13];
1879
+ const g = b;
1880
+ let y;
1881
+ e[14] !== s ? (y = /* @__PURE__ */ d(Fn, { ...s }), e[14] = s, e[15] = y) : y = e[15];
1882
+ let v;
1883
+ return e[16] !== g || e[17] !== r || e[18] !== y || e[19] !== o ? (v = /* @__PURE__ */ d(ie, { layoutType: r, variant: o, contentWidth: "sm", logo: c, title: h, description: g, children: y }), e[16] = g, e[17] = r, e[18] = y, e[19] = o, e[20] = v) : v = e[20], v;
1884
+ }
1885
+ export {
1886
+ ie as A,
1887
+ pe as B,
1888
+ qt as D,
1889
+ yt as E,
1890
+ Ot as I,
1891
+ zn as L,
1892
+ Hn as M,
1893
+ Je as O,
1894
+ Rn as R,
1895
+ Fn as S,
1896
+ gn as a,
1897
+ Gn as b,
1898
+ qn as c,
1899
+ Bn as d,
1900
+ Kn as e,
1901
+ Yn as f,
1902
+ _ as g,
1903
+ q as h,
1904
+ Lt as i,
1905
+ Vn as j,
1906
+ un as k,
1907
+ He as l,
1908
+ At as m,
1909
+ fe as n,
1910
+ Vt as o,
1911
+ zt as p,
1912
+ Qe as q,
1913
+ mn as r,
1914
+ lt as s,
1915
+ Kt as t,
1916
+ It as u,
1917
+ Ln as v,
1918
+ kn as w
1919
+ };