doct-ui-auth-kit 1.0.23 → 1.0.25

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