doct-ui-auth-kit 1.0.22 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +645 -620
- package/dist/pages.js +1 -1
- package/dist/signup-page-26HKuY80.js +1936 -0
- package/dist/types/auth/auth-api-adapter.d.ts +3 -6
- package/dist/types/auth/flow.d.ts +34 -5
- package/dist/types/pages/pages.d.ts +3 -2
- package/package.json +1 -1
- package/dist/signup-page-7_oiaTGe.js +0 -1799
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as H, Fragment as Xt } from "react/jsx-runtime";
|
|
3
|
-
import { g as fe, A as ii, h as ai, u as oi, i as di, e as ui, L as li, f as si, d as ci, c as fi, b as Jt, j as $i, k as at, O as pi, S as yi } from "./signup-page-
|
|
4
|
-
import { B as A1, D as _1, l as w1, E as R1, I as x1, a as F1, m as M1, M as L1, n as D1, o as k1, p as j1, R as G1, q as U1, r as B1, s as W1, t as H1, v as V1, w as K1 } from "./signup-page-
|
|
5
|
-
import
|
|
6
|
-
import { DoctCircularProgress as
|
|
3
|
+
import { g as fe, A as ii, h as ai, u as oi, i as di, e as ui, L as li, f as si, d as ci, c as fi, b as Jt, j as $i, k as at, O as pi, S as yi } from "./signup-page-26HKuY80.js";
|
|
4
|
+
import { B as A1, D as _1, l as w1, E as R1, I as x1, a as F1, m as M1, M as L1, n as D1, o as k1, p as j1, R as G1, q as U1, r as B1, s as W1, t as H1, v as V1, w as K1 } from "./signup-page-26HKuY80.js";
|
|
5
|
+
import O, { createContext as hi, useContext as ur, useRef as se, useEffect as Ee, useCallback as ue, useMemo as Ve, useReducer as gi } from "react";
|
|
6
|
+
import { DoctCircularProgress as mi } from "docthub-core-components";
|
|
7
7
|
import "react-icons/md";
|
|
8
8
|
import "react-hook-form";
|
|
9
9
|
function Lt(e) {
|
|
@@ -117,15 +117,15 @@ function Pi(e) {
|
|
|
117
117
|
className: c
|
|
118
118
|
} = e;
|
|
119
119
|
if (n === "") {
|
|
120
|
-
let
|
|
121
|
-
return t[0] !== r ? (
|
|
120
|
+
let m;
|
|
121
|
+
return t[0] !== r ? (m = /* @__PURE__ */ H(Xt, { children: r }), t[0] = r, t[1] = m) : m = t[1], m;
|
|
122
122
|
}
|
|
123
|
-
let
|
|
124
|
-
t[2] !== n ? (
|
|
125
|
-
const s =
|
|
123
|
+
let p;
|
|
124
|
+
t[2] !== n ? (p = Ci(n), t[2] = n, t[3] = p) : p = t[3];
|
|
125
|
+
const s = p;
|
|
126
126
|
if (!s) {
|
|
127
|
-
let
|
|
128
|
-
return t[4] !== r ? (
|
|
127
|
+
let m;
|
|
128
|
+
return t[4] !== r ? (m = /* @__PURE__ */ H(Xt, { children: r }), t[4] = r, t[5] = m) : m = t[5], m;
|
|
129
129
|
}
|
|
130
130
|
let f;
|
|
131
131
|
t[6] !== c ? (f = c != null && {
|
|
@@ -232,23 +232,34 @@ function Si(e, t) {
|
|
|
232
232
|
step: "LINK_OR_MERGE",
|
|
233
233
|
lastStep: e.step,
|
|
234
234
|
linkOrMerge: t.conflictField === "email" ? {
|
|
235
|
+
stage: t.stage ?? "summary",
|
|
235
236
|
conflictField: "email",
|
|
236
237
|
name: t.name,
|
|
237
|
-
...t.
|
|
238
|
-
|
|
238
|
+
...t.existingEmail && {
|
|
239
|
+
existingEmail: t.existingEmail
|
|
239
240
|
},
|
|
240
|
-
...t.
|
|
241
|
-
|
|
241
|
+
...t.existingCountryCode && {
|
|
242
|
+
existingCountryCode: t.existingCountryCode
|
|
242
243
|
},
|
|
243
|
-
...t.
|
|
244
|
-
|
|
244
|
+
...t.existingPhone && {
|
|
245
|
+
existingPhone: t.existingPhone
|
|
246
|
+
},
|
|
247
|
+
...t.oldEmail && {
|
|
248
|
+
oldEmail: t.oldEmail
|
|
245
249
|
},
|
|
246
250
|
newEmail: t.newEmail
|
|
247
251
|
} : {
|
|
252
|
+
stage: t.stage ?? "summary",
|
|
248
253
|
conflictField: "phone",
|
|
249
254
|
name: t.name,
|
|
250
|
-
...t.
|
|
251
|
-
|
|
255
|
+
...t.existingEmail && {
|
|
256
|
+
existingEmail: t.existingEmail
|
|
257
|
+
},
|
|
258
|
+
...t.existingCountryCode && {
|
|
259
|
+
existingCountryCode: t.existingCountryCode
|
|
260
|
+
},
|
|
261
|
+
...t.existingPhone && {
|
|
262
|
+
existingPhone: t.existingPhone
|
|
252
263
|
},
|
|
253
264
|
...t.oldCountryCode && {
|
|
254
265
|
oldCountryCode: t.oldCountryCode
|
|
@@ -260,6 +271,14 @@ function Si(e, t) {
|
|
|
260
271
|
newPhone: t.newPhone
|
|
261
272
|
}
|
|
262
273
|
};
|
|
274
|
+
case "SET_LINK_OR_MERGE_VERIFICATION_STAGE":
|
|
275
|
+
return {
|
|
276
|
+
...e,
|
|
277
|
+
linkOrMerge: e.linkOrMerge ? {
|
|
278
|
+
...e.linkOrMerge,
|
|
279
|
+
stage: "verification"
|
|
280
|
+
} : null
|
|
281
|
+
};
|
|
263
282
|
case "SET_STEP_PROVIDER_PENDING":
|
|
264
283
|
return {
|
|
265
284
|
...e,
|
|
@@ -273,7 +292,13 @@ function Si(e, t) {
|
|
|
273
292
|
session: t.session
|
|
274
293
|
};
|
|
275
294
|
case "GO_BACK":
|
|
276
|
-
return {
|
|
295
|
+
return e.step === "LINK_OR_MERGE" && e.linkOrMerge?.stage === "verification" ? {
|
|
296
|
+
...e,
|
|
297
|
+
linkOrMerge: {
|
|
298
|
+
...e.linkOrMerge,
|
|
299
|
+
stage: "summary"
|
|
300
|
+
}
|
|
301
|
+
} : {
|
|
277
302
|
...e,
|
|
278
303
|
step: e.lastStep,
|
|
279
304
|
lastStep: e.step === "METHOD_SELECT" ? "METHOD_SELECT" : e.lastStep
|
|
@@ -294,7 +319,7 @@ function Si(e, t) {
|
|
|
294
319
|
return e;
|
|
295
320
|
}
|
|
296
321
|
}
|
|
297
|
-
const Dt = "doct-auth-kit:flow-state",
|
|
322
|
+
const Dt = "doct-auth-kit:flow-state", Oi = /* @__PURE__ */ new Set(["CHECKING_SESSION", "METHOD_SELECT", "PHONE_ENTRY", "EMAIL_ENTRY", "OTP_VERIFICATION", "SIGNUP_DETAILS", "REPEAT_LOGIN", "PROVIDER_PENDING", "AUTHENTICATED"]);
|
|
298
323
|
function kt() {
|
|
299
324
|
if (typeof window > "u") return null;
|
|
300
325
|
try {
|
|
@@ -303,10 +328,10 @@ function kt() {
|
|
|
303
328
|
return null;
|
|
304
329
|
}
|
|
305
330
|
}
|
|
306
|
-
function
|
|
331
|
+
function Ti(e) {
|
|
307
332
|
if (!e || typeof e != "object") return !1;
|
|
308
333
|
const t = e.step;
|
|
309
|
-
return typeof t == "string" &&
|
|
334
|
+
return typeof t == "string" && Oi.has(t);
|
|
310
335
|
}
|
|
311
336
|
function Ii() {
|
|
312
337
|
const e = kt();
|
|
@@ -315,7 +340,7 @@ function Ii() {
|
|
|
315
340
|
const t = e.getItem(Dt);
|
|
316
341
|
if (!t) return null;
|
|
317
342
|
const n = JSON.parse(t);
|
|
318
|
-
return
|
|
343
|
+
return Ti(n) ? {
|
|
319
344
|
...he(n.step),
|
|
320
345
|
...n
|
|
321
346
|
} : null;
|
|
@@ -418,21 +443,21 @@ function xi(e, t) {
|
|
|
418
443
|
u.current = !1, d.current = n.step;
|
|
419
444
|
return;
|
|
420
445
|
}
|
|
421
|
-
const
|
|
422
|
-
|
|
446
|
+
const p = d.current;
|
|
447
|
+
p != null && Ri(p, n.step) ? e.replace(l) : e.push(l), d.current = n.step;
|
|
423
448
|
}, [e, t, n.step]), Ee(() => {
|
|
424
449
|
if (!(!e || !t))
|
|
425
450
|
return e.subscribe((l) => {
|
|
426
451
|
const c = i.current;
|
|
427
452
|
if (t[c.step] === l) return;
|
|
428
|
-
const
|
|
429
|
-
if (
|
|
430
|
-
if (!zt.has(
|
|
453
|
+
const p = Qt(t, l);
|
|
454
|
+
if (p && p !== c.step) {
|
|
455
|
+
if (!zt.has(p)) {
|
|
431
456
|
const s = t[c.step];
|
|
432
457
|
s && s !== l && e.replace(s);
|
|
433
458
|
return;
|
|
434
459
|
}
|
|
435
|
-
u.current = !0, en(a.current,
|
|
460
|
+
u.current = !0, en(a.current, p);
|
|
436
461
|
}
|
|
437
462
|
});
|
|
438
463
|
}, [e, t]);
|
|
@@ -440,7 +465,7 @@ function xi(e, t) {
|
|
|
440
465
|
function tn() {
|
|
441
466
|
const e = fe.c(1);
|
|
442
467
|
let t;
|
|
443
|
-
return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ H("div", { className: "flex min-h-svh w-full items-center justify-center", children: /* @__PURE__ */ H(
|
|
468
|
+
return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ H("div", { className: "flex min-h-svh w-full items-center justify-center", children: /* @__PURE__ */ H(mi, { size: 32 }) }), e[0] = t) : t = e[0], t;
|
|
444
469
|
}
|
|
445
470
|
function Fi(e) {
|
|
446
471
|
const t = fe.c(69);
|
|
@@ -457,34 +482,34 @@ function Fi(e) {
|
|
|
457
482
|
providerConfig: l
|
|
458
483
|
} = cr();
|
|
459
484
|
xi(r, i);
|
|
460
|
-
const c = l?.google,
|
|
485
|
+
const c = l?.google, p = l?.apple, s = d.step === "METHOD_SELECT" && !!c?.clientId && c.enableOneTap !== !1, f = c?.clientId ?? "";
|
|
461
486
|
let y;
|
|
462
487
|
t[2] !== u ? (y = (v) => u.providerCallback({
|
|
463
488
|
provider: "google",
|
|
464
489
|
credential: v
|
|
465
490
|
}), t[2] = u, t[3] = y) : y = t[3];
|
|
466
|
-
let
|
|
467
|
-
t[4] !== s || t[5] !== f || t[6] !== y ? (
|
|
491
|
+
let m;
|
|
492
|
+
t[4] !== s || t[5] !== f || t[6] !== y ? (m = {
|
|
468
493
|
clientId: f,
|
|
469
494
|
onCredential: y,
|
|
470
495
|
enableOneTap: s
|
|
471
|
-
}, t[4] = s, t[5] = f, t[6] = y, t[7] =
|
|
496
|
+
}, t[4] = s, t[5] = f, t[6] = y, t[7] = m) : m = t[7];
|
|
472
497
|
const {
|
|
473
|
-
loginWithGoogle:
|
|
474
|
-
} = oi(
|
|
498
|
+
loginWithGoogle: $
|
|
499
|
+
} = oi(m), C = p?.clientId ?? "", T = p?.redirectUri ?? "";
|
|
475
500
|
let N;
|
|
476
501
|
t[8] !== u ? (N = (v) => u.providerCallback({
|
|
477
502
|
provider: "apple",
|
|
478
503
|
credential: v
|
|
479
504
|
}), t[8] = u, t[9] = N) : N = t[9];
|
|
480
|
-
let
|
|
481
|
-
t[10] !==
|
|
482
|
-
clientId:
|
|
483
|
-
redirectUri:
|
|
505
|
+
let S;
|
|
506
|
+
t[10] !== C || t[11] !== T || t[12] !== N ? (S = {
|
|
507
|
+
clientId: C,
|
|
508
|
+
redirectUri: T,
|
|
484
509
|
onCredential: N
|
|
485
|
-
}, t[10] =
|
|
510
|
+
}, t[10] = C, t[11] = T, t[12] = N, t[13] = S) : S = t[13];
|
|
486
511
|
const {
|
|
487
|
-
triggerSignIn:
|
|
512
|
+
triggerSignIn: h
|
|
488
513
|
} = di();
|
|
489
514
|
switch (d.step) {
|
|
490
515
|
case "CHECKING_SESSION": {
|
|
@@ -492,13 +517,13 @@ function Fi(e) {
|
|
|
492
517
|
return t[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ H(tn, {}), t[14] = v) : v = t[14], v;
|
|
493
518
|
}
|
|
494
519
|
case "METHOD_SELECT": {
|
|
495
|
-
const v = l?.google?.clientId,
|
|
520
|
+
const v = l?.google?.clientId, I = l?.apple?.clientId;
|
|
496
521
|
let F, G;
|
|
497
522
|
t[15] !== u ? (G = () => u.selectMethod("phone"), F = () => u.selectMethod("email"), t[15] = u, t[16] = F, t[17] = G) : (F = t[16], G = t[17]);
|
|
498
523
|
let B;
|
|
499
|
-
t[18] !== v || t[19] !==
|
|
524
|
+
t[18] !== v || t[19] !== $ ? (B = v ? $ : Li, t[18] = v, t[19] = $, t[20] = B) : B = t[20];
|
|
500
525
|
let W;
|
|
501
|
-
t[21] !==
|
|
526
|
+
t[21] !== I || t[22] !== h ? (W = I ? h : Mi, t[21] = I, t[22] = h, t[23] = W) : W = t[23];
|
|
502
527
|
let K;
|
|
503
528
|
t[24] !== o ? (K = o != null && {
|
|
504
529
|
onEnterpriseLogin: o
|
|
@@ -508,34 +533,34 @@ function Fi(e) {
|
|
|
508
533
|
}
|
|
509
534
|
case "PHONE_ENTRY": {
|
|
510
535
|
let v;
|
|
511
|
-
return t[32] !== u ? (v = /* @__PURE__ */ H(Jt, { mode: "phone", layoutType: "withSlider", variant: "desktop", onBack: () => u.goBack(), onSubmit: (
|
|
536
|
+
return t[32] !== u ? (v = /* @__PURE__ */ H(Jt, { mode: "phone", layoutType: "withSlider", variant: "desktop", onBack: () => u.goBack(), onSubmit: (I) => u.submitIdentifier(I) }), t[32] = u, t[33] = v) : v = t[33], v;
|
|
512
537
|
}
|
|
513
538
|
case "EMAIL_ENTRY": {
|
|
514
539
|
let v;
|
|
515
|
-
return t[34] !== u ? (v = /* @__PURE__ */ H(Jt, { mode: "email", layoutType: "withSlider", variant: "desktop", onBack: () => u.goBack(), onSubmit: (
|
|
540
|
+
return t[34] !== u ? (v = /* @__PURE__ */ H(Jt, { mode: "email", layoutType: "withSlider", variant: "desktop", onBack: () => u.goBack(), onSubmit: (I) => u.submitIdentifier(I) }), t[34] = u, t[35] = v) : v = t[35], v;
|
|
516
541
|
}
|
|
517
542
|
case "OTP_VERIFICATION": {
|
|
518
|
-
const v = d.userType === "FOREIGN",
|
|
543
|
+
const v = d.userType === "FOREIGN", I = v ? "standalone" : "withSlider", F = v ? "mobile" : "desktop";
|
|
519
544
|
let G, B, W;
|
|
520
545
|
t[36] !== u ? (W = () => u.goBack(), G = (q) => u.verifyOtp(q), B = () => u.resendOtp(), t[36] = u, t[37] = G, t[38] = B, t[39] = W) : (G = t[37], B = t[38], W = t[39]);
|
|
521
546
|
let K;
|
|
522
|
-
return t[40] !== v || t[41] !==
|
|
547
|
+
return t[40] !== v || t[41] !== I || t[42] !== d.identifierType || t[43] !== d.maskedRecipient || t[44] !== G || t[45] !== B || t[46] !== W || t[47] !== a || t[48] !== F ? (K = /* @__PURE__ */ H(ci, { mode: d.identifierType, recipientDisplay: d.maskedRecipient, isForeignUser: v, layoutType: I, variant: F, onBack: W, submitApi: G, onResendCode: B, validate: a }), t[40] = v, t[41] = I, t[42] = d.identifierType, t[43] = d.maskedRecipient, t[44] = G, t[45] = B, t[46] = W, t[47] = a, t[48] = F, t[49] = K) : K = t[49], K;
|
|
523
548
|
}
|
|
524
549
|
case "SIGNUP_DETAILS": {
|
|
525
550
|
let v;
|
|
526
551
|
t[50] !== u ? (v = (F) => u.submitSignupDetails(F), t[50] = u, t[51] = v) : v = t[51];
|
|
527
|
-
let
|
|
528
|
-
return t[52] !== d.identifierType || t[53] !== d.pendingPhone || t[54] !== d.signupCollectField || t[55] !== d.userType || t[56] !== v ? (
|
|
552
|
+
let I;
|
|
553
|
+
return t[52] !== d.identifierType || t[53] !== d.pendingPhone || t[54] !== d.signupCollectField || t[55] !== d.userType || t[56] !== v ? (I = /* @__PURE__ */ H(si, { userType: d.userType, loginMethod: d.identifierType, signupCollectField: d.signupCollectField, pendingPhone: d.pendingPhone, layoutType: "standalone", variant: "mobile", onSubmit: v }), t[52] = d.identifierType, t[53] = d.pendingPhone, t[54] = d.signupCollectField, t[55] = d.userType, t[56] = v, t[57] = I) : I = t[57], I;
|
|
529
554
|
}
|
|
530
555
|
case "LINK_OR_MERGE": {
|
|
531
556
|
let v;
|
|
532
|
-
return t[58] !== u || t[59] !== d.linkOrMerge ? (v = d.linkOrMerge ? /* @__PURE__ */ H(li, { details: d.linkOrMerge, onBack: () => u.goBack(), onVerify: () => u.verifyLinkOrMerge() }) : null, t[58] = u, t[59] = d.linkOrMerge, t[60] = v) : v = t[60], v;
|
|
557
|
+
return t[58] !== u || t[59] !== d.linkOrMerge ? (v = d.linkOrMerge ? /* @__PURE__ */ H(li, { details: d.linkOrMerge, onBack: () => u.goBack(), onContinue: () => u.continueLinkOrMerge(), onVerify: (I) => u.verifyLinkOrMerge(I) }) : null, t[58] = u, t[59] = d.linkOrMerge, t[60] = v) : v = t[60], v;
|
|
533
558
|
}
|
|
534
559
|
case "REPEAT_LOGIN": {
|
|
535
|
-
let v,
|
|
536
|
-
t[61] !== u ? (
|
|
560
|
+
let v, I;
|
|
561
|
+
t[61] !== u ? (I = () => u.continueWithLastMethod(), v = () => u.reset(), t[61] = u, t[62] = v, t[63] = I) : (v = t[62], I = t[63]);
|
|
537
562
|
let F;
|
|
538
|
-
return t[64] !== d.lastMethod || t[65] !== v || t[66] !==
|
|
563
|
+
return t[64] !== d.lastMethod || t[65] !== v || t[66] !== I ? (F = /* @__PURE__ */ H(ui, { lastUsedMethod: d.lastMethod, layoutType: "withSlider", variant: "desktop", onContinueWithLastMethod: I, onUseAnotherMethod: v }), t[64] = d.lastMethod, t[65] = v, t[66] = I, t[67] = F) : F = t[67], F;
|
|
539
564
|
}
|
|
540
565
|
case "PROVIDER_PENDING": {
|
|
541
566
|
let v;
|
|
@@ -557,28 +582,28 @@ var nn;
|
|
|
557
582
|
function Di() {
|
|
558
583
|
if (nn) return k;
|
|
559
584
|
nn = 1;
|
|
560
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, n = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, a = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, o = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, u = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112,
|
|
561
|
-
function N(
|
|
562
|
-
if (typeof
|
|
563
|
-
var v =
|
|
585
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, n = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, a = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, o = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, u = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, s = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, f = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, y = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, m = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, $ = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
586
|
+
function N(h) {
|
|
587
|
+
if (typeof h == "object" && h !== null) {
|
|
588
|
+
var v = h.$$typeof;
|
|
564
589
|
switch (v) {
|
|
565
590
|
case t:
|
|
566
|
-
switch (
|
|
591
|
+
switch (h = h.type, h) {
|
|
567
592
|
case u:
|
|
568
593
|
case l:
|
|
569
594
|
case r:
|
|
570
595
|
case a:
|
|
571
596
|
case i:
|
|
572
|
-
case
|
|
573
|
-
return
|
|
597
|
+
case p:
|
|
598
|
+
return h;
|
|
574
599
|
default:
|
|
575
|
-
switch (
|
|
600
|
+
switch (h = h && h.$$typeof, h) {
|
|
576
601
|
case d:
|
|
577
602
|
case c:
|
|
578
603
|
case y:
|
|
579
604
|
case f:
|
|
580
605
|
case o:
|
|
581
|
-
return
|
|
606
|
+
return h;
|
|
582
607
|
default:
|
|
583
608
|
return v;
|
|
584
609
|
}
|
|
@@ -588,59 +613,59 @@ function Di() {
|
|
|
588
613
|
}
|
|
589
614
|
}
|
|
590
615
|
}
|
|
591
|
-
function
|
|
592
|
-
return N(
|
|
593
|
-
}
|
|
594
|
-
return k.AsyncMode = u, k.ConcurrentMode = l, k.ContextConsumer = d, k.ContextProvider = o, k.Element = t, k.ForwardRef = c, k.Fragment = r, k.Lazy = y, k.Memo = f, k.Portal = n, k.Profiler = a, k.StrictMode = i, k.Suspense =
|
|
595
|
-
return
|
|
596
|
-
}, k.isConcurrentMode =
|
|
597
|
-
return N(
|
|
598
|
-
}, k.isContextProvider = function(
|
|
599
|
-
return N(
|
|
600
|
-
}, k.isElement = function(
|
|
601
|
-
return typeof
|
|
602
|
-
}, k.isForwardRef = function(
|
|
603
|
-
return N(
|
|
604
|
-
}, k.isFragment = function(
|
|
605
|
-
return N(
|
|
606
|
-
}, k.isLazy = function(
|
|
607
|
-
return N(
|
|
608
|
-
}, k.isMemo = function(
|
|
609
|
-
return N(
|
|
610
|
-
}, k.isPortal = function(
|
|
611
|
-
return N(
|
|
612
|
-
}, k.isProfiler = function(
|
|
613
|
-
return N(
|
|
614
|
-
}, k.isStrictMode = function(
|
|
615
|
-
return N(
|
|
616
|
-
}, k.isSuspense = function(
|
|
617
|
-
return N(
|
|
618
|
-
}, k.isValidElementType = function(
|
|
619
|
-
return typeof
|
|
616
|
+
function S(h) {
|
|
617
|
+
return N(h) === l;
|
|
618
|
+
}
|
|
619
|
+
return k.AsyncMode = u, k.ConcurrentMode = l, k.ContextConsumer = d, k.ContextProvider = o, k.Element = t, k.ForwardRef = c, k.Fragment = r, k.Lazy = y, k.Memo = f, k.Portal = n, k.Profiler = a, k.StrictMode = i, k.Suspense = p, k.isAsyncMode = function(h) {
|
|
620
|
+
return S(h) || N(h) === u;
|
|
621
|
+
}, k.isConcurrentMode = S, k.isContextConsumer = function(h) {
|
|
622
|
+
return N(h) === d;
|
|
623
|
+
}, k.isContextProvider = function(h) {
|
|
624
|
+
return N(h) === o;
|
|
625
|
+
}, k.isElement = function(h) {
|
|
626
|
+
return typeof h == "object" && h !== null && h.$$typeof === t;
|
|
627
|
+
}, k.isForwardRef = function(h) {
|
|
628
|
+
return N(h) === c;
|
|
629
|
+
}, k.isFragment = function(h) {
|
|
630
|
+
return N(h) === r;
|
|
631
|
+
}, k.isLazy = function(h) {
|
|
632
|
+
return N(h) === y;
|
|
633
|
+
}, k.isMemo = function(h) {
|
|
634
|
+
return N(h) === f;
|
|
635
|
+
}, k.isPortal = function(h) {
|
|
636
|
+
return N(h) === n;
|
|
637
|
+
}, k.isProfiler = function(h) {
|
|
638
|
+
return N(h) === a;
|
|
639
|
+
}, k.isStrictMode = function(h) {
|
|
640
|
+
return N(h) === i;
|
|
641
|
+
}, k.isSuspense = function(h) {
|
|
642
|
+
return N(h) === p;
|
|
643
|
+
}, k.isValidElementType = function(h) {
|
|
644
|
+
return typeof h == "string" || typeof h == "function" || h === r || h === l || h === a || h === i || h === p || h === s || typeof h == "object" && h !== null && (h.$$typeof === y || h.$$typeof === f || h.$$typeof === o || h.$$typeof === d || h.$$typeof === c || h.$$typeof === $ || h.$$typeof === C || h.$$typeof === T || h.$$typeof === m);
|
|
620
645
|
}, k.typeOf = N, k;
|
|
621
646
|
}
|
|
622
647
|
var j = {};
|
|
623
648
|
var rn;
|
|
624
649
|
function ki() {
|
|
625
650
|
return rn || (rn = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
626
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, n = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, a = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, o = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, u = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112,
|
|
627
|
-
function N(
|
|
628
|
-
return typeof
|
|
629
|
-
|
|
630
|
-
}
|
|
631
|
-
function
|
|
632
|
-
if (typeof
|
|
633
|
-
var ne =
|
|
651
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, n = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, a = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, o = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, u = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, l = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, c = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, p = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, s = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, f = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, y = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, m = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, $ = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
652
|
+
function N(P) {
|
|
653
|
+
return typeof P == "string" || typeof P == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
654
|
+
P === r || P === l || P === a || P === i || P === p || P === s || typeof P == "object" && P !== null && (P.$$typeof === y || P.$$typeof === f || P.$$typeof === o || P.$$typeof === d || P.$$typeof === c || P.$$typeof === $ || P.$$typeof === C || P.$$typeof === T || P.$$typeof === m);
|
|
655
|
+
}
|
|
656
|
+
function S(P) {
|
|
657
|
+
if (typeof P == "object" && P !== null) {
|
|
658
|
+
var ne = P.$$typeof;
|
|
634
659
|
switch (ne) {
|
|
635
660
|
case t:
|
|
636
|
-
var ke =
|
|
661
|
+
var ke = P.type;
|
|
637
662
|
switch (ke) {
|
|
638
663
|
case u:
|
|
639
664
|
case l:
|
|
640
665
|
case r:
|
|
641
666
|
case a:
|
|
642
667
|
case i:
|
|
643
|
-
case
|
|
668
|
+
case p:
|
|
644
669
|
return ke;
|
|
645
670
|
default:
|
|
646
671
|
var Zt = ke && ke.$$typeof;
|
|
@@ -660,47 +685,47 @@ function ki() {
|
|
|
660
685
|
}
|
|
661
686
|
}
|
|
662
687
|
}
|
|
663
|
-
var
|
|
664
|
-
function De(
|
|
665
|
-
return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), b(
|
|
688
|
+
var h = u, v = l, I = d, F = o, G = t, B = c, W = r, K = y, q = f, te = n, $e = a, J = i, X = p, oe = !1;
|
|
689
|
+
function De(P) {
|
|
690
|
+
return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), b(P) || S(P) === u;
|
|
666
691
|
}
|
|
667
|
-
function b(
|
|
668
|
-
return
|
|
692
|
+
function b(P) {
|
|
693
|
+
return S(P) === l;
|
|
669
694
|
}
|
|
670
|
-
function E(
|
|
671
|
-
return
|
|
695
|
+
function E(P) {
|
|
696
|
+
return S(P) === d;
|
|
672
697
|
}
|
|
673
|
-
function x(
|
|
674
|
-
return
|
|
698
|
+
function x(P) {
|
|
699
|
+
return S(P) === o;
|
|
675
700
|
}
|
|
676
|
-
function w(
|
|
677
|
-
return typeof
|
|
701
|
+
function w(P) {
|
|
702
|
+
return typeof P == "object" && P !== null && P.$$typeof === t;
|
|
678
703
|
}
|
|
679
|
-
function
|
|
680
|
-
return
|
|
704
|
+
function A(P) {
|
|
705
|
+
return S(P) === c;
|
|
681
706
|
}
|
|
682
|
-
function M(
|
|
683
|
-
return
|
|
707
|
+
function M(P) {
|
|
708
|
+
return S(P) === r;
|
|
684
709
|
}
|
|
685
|
-
function _(
|
|
686
|
-
return
|
|
710
|
+
function _(P) {
|
|
711
|
+
return S(P) === y;
|
|
687
712
|
}
|
|
688
|
-
function R(
|
|
689
|
-
return
|
|
713
|
+
function R(P) {
|
|
714
|
+
return S(P) === f;
|
|
690
715
|
}
|
|
691
|
-
function L(
|
|
692
|
-
return
|
|
716
|
+
function L(P) {
|
|
717
|
+
return S(P) === n;
|
|
693
718
|
}
|
|
694
|
-
function U(
|
|
695
|
-
return
|
|
719
|
+
function U(P) {
|
|
720
|
+
return S(P) === a;
|
|
696
721
|
}
|
|
697
|
-
function D(
|
|
698
|
-
return
|
|
722
|
+
function D(P) {
|
|
723
|
+
return S(P) === i;
|
|
699
724
|
}
|
|
700
|
-
function Z(
|
|
701
|
-
return
|
|
725
|
+
function Z(P) {
|
|
726
|
+
return S(P) === p;
|
|
702
727
|
}
|
|
703
|
-
j.AsyncMode =
|
|
728
|
+
j.AsyncMode = h, j.ConcurrentMode = v, j.ContextConsumer = I, j.ContextProvider = F, j.Element = G, j.ForwardRef = B, j.Fragment = W, j.Lazy = K, j.Memo = q, j.Portal = te, j.Profiler = $e, j.StrictMode = J, j.Suspense = X, j.isAsyncMode = De, j.isConcurrentMode = b, j.isContextConsumer = E, j.isContextProvider = x, j.isElement = w, j.isForwardRef = A, j.isFragment = M, j.isLazy = _, j.isMemo = R, j.isPortal = L, j.isProfiler = U, j.isStrictMode = D, j.isSuspense = Z, j.isValidElementType = N, j.typeOf = S;
|
|
704
729
|
})()), j;
|
|
705
730
|
}
|
|
706
731
|
var an;
|
|
@@ -742,8 +767,8 @@ function ji() {
|
|
|
742
767
|
return ot = i() ? Object.assign : function(a, o) {
|
|
743
768
|
for (var d, u = r(a), l, c = 1; c < arguments.length; c++) {
|
|
744
769
|
d = Object(arguments[c]);
|
|
745
|
-
for (var
|
|
746
|
-
t.call(d,
|
|
770
|
+
for (var p in d)
|
|
771
|
+
t.call(d, p) && (u[p] = d[p]);
|
|
747
772
|
if (e) {
|
|
748
773
|
l = e(d);
|
|
749
774
|
for (var s = 0; s < l.length; s++)
|
|
@@ -785,7 +810,7 @@ function Gi() {
|
|
|
785
810
|
if (process.env.NODE_ENV !== "production") {
|
|
786
811
|
for (var c in a)
|
|
787
812
|
if (r(a, c)) {
|
|
788
|
-
var
|
|
813
|
+
var p;
|
|
789
814
|
try {
|
|
790
815
|
if (typeof a[c] != "function") {
|
|
791
816
|
var s = Error(
|
|
@@ -793,17 +818,17 @@ function Gi() {
|
|
|
793
818
|
);
|
|
794
819
|
throw s.name = "Invariant Violation", s;
|
|
795
820
|
}
|
|
796
|
-
|
|
821
|
+
p = a[c](o, c, u, d, null, t);
|
|
797
822
|
} catch (y) {
|
|
798
|
-
|
|
823
|
+
p = y;
|
|
799
824
|
}
|
|
800
|
-
if (
|
|
801
|
-
(u || "React class") + ": type specification of " + d + " `" + c + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof
|
|
802
|
-
),
|
|
803
|
-
n[
|
|
825
|
+
if (p && !(p instanceof Error) && e(
|
|
826
|
+
(u || "React class") + ": type specification of " + d + " `" + c + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
827
|
+
), p instanceof Error && !(p.message in n)) {
|
|
828
|
+
n[p.message] = !0;
|
|
804
829
|
var f = l ? l() : "";
|
|
805
830
|
e(
|
|
806
|
-
"Failed " + d + " type: " +
|
|
831
|
+
"Failed " + d + " type: " + p.message + (f ?? "")
|
|
807
832
|
);
|
|
808
833
|
}
|
|
809
834
|
}
|
|
@@ -832,28 +857,28 @@ function Ui() {
|
|
|
832
857
|
}
|
|
833
858
|
return st = function(d, u) {
|
|
834
859
|
var l = typeof Symbol == "function" && Symbol.iterator, c = "@@iterator";
|
|
835
|
-
function
|
|
860
|
+
function p(b) {
|
|
836
861
|
var E = b && (l && b[l] || b[c]);
|
|
837
862
|
if (typeof E == "function")
|
|
838
863
|
return E;
|
|
839
864
|
}
|
|
840
865
|
var s = "<<anonymous>>", f = {
|
|
841
|
-
array:
|
|
842
|
-
bigint:
|
|
843
|
-
bool:
|
|
844
|
-
func:
|
|
845
|
-
number:
|
|
846
|
-
object:
|
|
847
|
-
string:
|
|
848
|
-
symbol:
|
|
849
|
-
any:
|
|
866
|
+
array: C("array"),
|
|
867
|
+
bigint: C("bigint"),
|
|
868
|
+
bool: C("boolean"),
|
|
869
|
+
func: C("function"),
|
|
870
|
+
number: C("number"),
|
|
871
|
+
object: C("object"),
|
|
872
|
+
string: C("string"),
|
|
873
|
+
symbol: C("symbol"),
|
|
874
|
+
any: T(),
|
|
850
875
|
arrayOf: N,
|
|
851
|
-
element:
|
|
852
|
-
elementType:
|
|
876
|
+
element: S(),
|
|
877
|
+
elementType: h(),
|
|
853
878
|
instanceOf: v,
|
|
854
879
|
node: B(),
|
|
855
880
|
objectOf: F,
|
|
856
|
-
oneOf:
|
|
881
|
+
oneOf: I,
|
|
857
882
|
oneOfType: G,
|
|
858
883
|
shape: K,
|
|
859
884
|
exact: q
|
|
@@ -861,20 +886,20 @@ function Ui() {
|
|
|
861
886
|
function y(b, E) {
|
|
862
887
|
return b === E ? b !== 0 || 1 / b === 1 / E : b !== b && E !== E;
|
|
863
888
|
}
|
|
864
|
-
function
|
|
889
|
+
function m(b, E) {
|
|
865
890
|
this.message = b, this.data = E && typeof E == "object" ? E : {}, this.stack = "";
|
|
866
891
|
}
|
|
867
|
-
|
|
868
|
-
function
|
|
892
|
+
m.prototype = Error.prototype;
|
|
893
|
+
function $(b) {
|
|
869
894
|
if (process.env.NODE_ENV !== "production")
|
|
870
895
|
var E = {}, x = 0;
|
|
871
896
|
function w(M, _, R, L, U, D, Z) {
|
|
872
897
|
if (L = L || s, D = D || R, Z !== n) {
|
|
873
898
|
if (u) {
|
|
874
|
-
var
|
|
899
|
+
var P = new Error(
|
|
875
900
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
876
901
|
);
|
|
877
|
-
throw
|
|
902
|
+
throw P.name = "Invariant Violation", P;
|
|
878
903
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
879
904
|
var ne = L + ":" + R;
|
|
880
905
|
!E[ne] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
@@ -883,111 +908,111 @@ function Ui() {
|
|
|
883
908
|
), E[ne] = !0, x++);
|
|
884
909
|
}
|
|
885
910
|
}
|
|
886
|
-
return _[R] == null ? M ? _[R] === null ? new
|
|
911
|
+
return _[R] == null ? M ? _[R] === null ? new m("The " + U + " `" + D + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new m("The " + U + " `" + D + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : b(_, R, L, U, D);
|
|
887
912
|
}
|
|
888
|
-
var
|
|
889
|
-
return
|
|
913
|
+
var A = w.bind(null, !1);
|
|
914
|
+
return A.isRequired = w.bind(null, !0), A;
|
|
890
915
|
}
|
|
891
|
-
function
|
|
892
|
-
function E(x, w,
|
|
916
|
+
function C(b) {
|
|
917
|
+
function E(x, w, A, M, _, R) {
|
|
893
918
|
var L = x[w], U = J(L);
|
|
894
919
|
if (U !== b) {
|
|
895
920
|
var D = X(L);
|
|
896
|
-
return new
|
|
897
|
-
"Invalid " + M + " `" + _ + "` of type " + ("`" + D + "` supplied to `" +
|
|
921
|
+
return new m(
|
|
922
|
+
"Invalid " + M + " `" + _ + "` of type " + ("`" + D + "` supplied to `" + A + "`, expected ") + ("`" + b + "`."),
|
|
898
923
|
{ expectedType: b }
|
|
899
924
|
);
|
|
900
925
|
}
|
|
901
926
|
return null;
|
|
902
927
|
}
|
|
903
|
-
return
|
|
928
|
+
return $(E);
|
|
904
929
|
}
|
|
905
|
-
function
|
|
906
|
-
return
|
|
930
|
+
function T() {
|
|
931
|
+
return $(o);
|
|
907
932
|
}
|
|
908
933
|
function N(b) {
|
|
909
|
-
function E(x, w,
|
|
934
|
+
function E(x, w, A, M, _) {
|
|
910
935
|
if (typeof b != "function")
|
|
911
|
-
return new
|
|
936
|
+
return new m("Property `" + _ + "` of component `" + A + "` has invalid PropType notation inside arrayOf.");
|
|
912
937
|
var R = x[w];
|
|
913
938
|
if (!Array.isArray(R)) {
|
|
914
939
|
var L = J(R);
|
|
915
|
-
return new
|
|
940
|
+
return new m("Invalid " + M + " `" + _ + "` of type " + ("`" + L + "` supplied to `" + A + "`, expected an array."));
|
|
916
941
|
}
|
|
917
942
|
for (var U = 0; U < R.length; U++) {
|
|
918
|
-
var D = b(R, U,
|
|
943
|
+
var D = b(R, U, A, M, _ + "[" + U + "]", n);
|
|
919
944
|
if (D instanceof Error)
|
|
920
945
|
return D;
|
|
921
946
|
}
|
|
922
947
|
return null;
|
|
923
948
|
}
|
|
924
|
-
return
|
|
949
|
+
return $(E);
|
|
925
950
|
}
|
|
926
|
-
function
|
|
927
|
-
function b(E, x, w,
|
|
951
|
+
function S() {
|
|
952
|
+
function b(E, x, w, A, M) {
|
|
928
953
|
var _ = E[x];
|
|
929
954
|
if (!d(_)) {
|
|
930
955
|
var R = J(_);
|
|
931
|
-
return new
|
|
956
|
+
return new m("Invalid " + A + " `" + M + "` of type " + ("`" + R + "` supplied to `" + w + "`, expected a single ReactElement."));
|
|
932
957
|
}
|
|
933
958
|
return null;
|
|
934
959
|
}
|
|
935
|
-
return
|
|
960
|
+
return $(b);
|
|
936
961
|
}
|
|
937
|
-
function
|
|
938
|
-
function b(E, x, w,
|
|
962
|
+
function h() {
|
|
963
|
+
function b(E, x, w, A, M) {
|
|
939
964
|
var _ = E[x];
|
|
940
965
|
if (!e.isValidElementType(_)) {
|
|
941
966
|
var R = J(_);
|
|
942
|
-
return new
|
|
967
|
+
return new m("Invalid " + A + " `" + M + "` of type " + ("`" + R + "` supplied to `" + w + "`, expected a single ReactElement type."));
|
|
943
968
|
}
|
|
944
969
|
return null;
|
|
945
970
|
}
|
|
946
|
-
return
|
|
971
|
+
return $(b);
|
|
947
972
|
}
|
|
948
973
|
function v(b) {
|
|
949
|
-
function E(x, w,
|
|
974
|
+
function E(x, w, A, M, _) {
|
|
950
975
|
if (!(x[w] instanceof b)) {
|
|
951
976
|
var R = b.name || s, L = De(x[w]);
|
|
952
|
-
return new
|
|
977
|
+
return new m("Invalid " + M + " `" + _ + "` of type " + ("`" + L + "` supplied to `" + A + "`, expected ") + ("instance of `" + R + "`."));
|
|
953
978
|
}
|
|
954
979
|
return null;
|
|
955
980
|
}
|
|
956
|
-
return
|
|
981
|
+
return $(E);
|
|
957
982
|
}
|
|
958
|
-
function
|
|
983
|
+
function I(b) {
|
|
959
984
|
if (!Array.isArray(b))
|
|
960
985
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
961
986
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
962
987
|
) : a("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
963
|
-
function E(x, w,
|
|
988
|
+
function E(x, w, A, M, _) {
|
|
964
989
|
for (var R = x[w], L = 0; L < b.length; L++)
|
|
965
990
|
if (y(R, b[L]))
|
|
966
991
|
return null;
|
|
967
|
-
var U = JSON.stringify(b, function(Z,
|
|
968
|
-
var ne = X(
|
|
969
|
-
return ne === "symbol" ? String(
|
|
992
|
+
var U = JSON.stringify(b, function(Z, P) {
|
|
993
|
+
var ne = X(P);
|
|
994
|
+
return ne === "symbol" ? String(P) : P;
|
|
970
995
|
});
|
|
971
|
-
return new
|
|
996
|
+
return new m("Invalid " + M + " `" + _ + "` of value `" + String(R) + "` " + ("supplied to `" + A + "`, expected one of " + U + "."));
|
|
972
997
|
}
|
|
973
|
-
return
|
|
998
|
+
return $(E);
|
|
974
999
|
}
|
|
975
1000
|
function F(b) {
|
|
976
|
-
function E(x, w,
|
|
1001
|
+
function E(x, w, A, M, _) {
|
|
977
1002
|
if (typeof b != "function")
|
|
978
|
-
return new
|
|
1003
|
+
return new m("Property `" + _ + "` of component `" + A + "` has invalid PropType notation inside objectOf.");
|
|
979
1004
|
var R = x[w], L = J(R);
|
|
980
1005
|
if (L !== "object")
|
|
981
|
-
return new
|
|
1006
|
+
return new m("Invalid " + M + " `" + _ + "` of type " + ("`" + L + "` supplied to `" + A + "`, expected an object."));
|
|
982
1007
|
for (var U in R)
|
|
983
1008
|
if (r(R, U)) {
|
|
984
|
-
var D = b(R, U,
|
|
1009
|
+
var D = b(R, U, A, M, _ + "." + U, n);
|
|
985
1010
|
if (D instanceof Error)
|
|
986
1011
|
return D;
|
|
987
1012
|
}
|
|
988
1013
|
return null;
|
|
989
1014
|
}
|
|
990
|
-
return
|
|
1015
|
+
return $(E);
|
|
991
1016
|
}
|
|
992
1017
|
function G(b) {
|
|
993
1018
|
if (!Array.isArray(b))
|
|
@@ -999,68 +1024,68 @@ function Ui() {
|
|
|
999
1024
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + oe(x) + " at index " + E + "."
|
|
1000
1025
|
), o;
|
|
1001
1026
|
}
|
|
1002
|
-
function w(
|
|
1027
|
+
function w(A, M, _, R, L) {
|
|
1003
1028
|
for (var U = [], D = 0; D < b.length; D++) {
|
|
1004
|
-
var Z = b[D],
|
|
1005
|
-
if (
|
|
1029
|
+
var Z = b[D], P = Z(A, M, _, R, L, n);
|
|
1030
|
+
if (P == null)
|
|
1006
1031
|
return null;
|
|
1007
|
-
|
|
1032
|
+
P.data && r(P.data, "expectedType") && U.push(P.data.expectedType);
|
|
1008
1033
|
}
|
|
1009
1034
|
var ne = U.length > 0 ? ", expected one of type [" + U.join(", ") + "]" : "";
|
|
1010
|
-
return new
|
|
1035
|
+
return new m("Invalid " + R + " `" + L + "` supplied to " + ("`" + _ + "`" + ne + "."));
|
|
1011
1036
|
}
|
|
1012
|
-
return
|
|
1037
|
+
return $(w);
|
|
1013
1038
|
}
|
|
1014
1039
|
function B() {
|
|
1015
|
-
function b(E, x, w,
|
|
1016
|
-
return te(E[x]) ? null : new
|
|
1040
|
+
function b(E, x, w, A, M) {
|
|
1041
|
+
return te(E[x]) ? null : new m("Invalid " + A + " `" + M + "` supplied to " + ("`" + w + "`, expected a ReactNode."));
|
|
1017
1042
|
}
|
|
1018
|
-
return
|
|
1043
|
+
return $(b);
|
|
1019
1044
|
}
|
|
1020
|
-
function W(b, E, x, w,
|
|
1021
|
-
return new
|
|
1022
|
-
(b || "React class") + ": " + E + " type `" + x + "." + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" +
|
|
1045
|
+
function W(b, E, x, w, A) {
|
|
1046
|
+
return new m(
|
|
1047
|
+
(b || "React class") + ": " + E + " type `" + x + "." + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + A + "`."
|
|
1023
1048
|
);
|
|
1024
1049
|
}
|
|
1025
1050
|
function K(b) {
|
|
1026
|
-
function E(x, w,
|
|
1051
|
+
function E(x, w, A, M, _) {
|
|
1027
1052
|
var R = x[w], L = J(R);
|
|
1028
1053
|
if (L !== "object")
|
|
1029
|
-
return new
|
|
1054
|
+
return new m("Invalid " + M + " `" + _ + "` of type `" + L + "` " + ("supplied to `" + A + "`, expected `object`."));
|
|
1030
1055
|
for (var U in b) {
|
|
1031
1056
|
var D = b[U];
|
|
1032
1057
|
if (typeof D != "function")
|
|
1033
|
-
return W(
|
|
1034
|
-
var Z = D(R, U,
|
|
1058
|
+
return W(A, M, _, U, X(D));
|
|
1059
|
+
var Z = D(R, U, A, M, _ + "." + U, n);
|
|
1035
1060
|
if (Z)
|
|
1036
1061
|
return Z;
|
|
1037
1062
|
}
|
|
1038
1063
|
return null;
|
|
1039
1064
|
}
|
|
1040
|
-
return
|
|
1065
|
+
return $(E);
|
|
1041
1066
|
}
|
|
1042
1067
|
function q(b) {
|
|
1043
|
-
function E(x, w,
|
|
1068
|
+
function E(x, w, A, M, _) {
|
|
1044
1069
|
var R = x[w], L = J(R);
|
|
1045
1070
|
if (L !== "object")
|
|
1046
|
-
return new
|
|
1071
|
+
return new m("Invalid " + M + " `" + _ + "` of type `" + L + "` " + ("supplied to `" + A + "`, expected `object`."));
|
|
1047
1072
|
var U = t({}, x[w], b);
|
|
1048
1073
|
for (var D in U) {
|
|
1049
1074
|
var Z = b[D];
|
|
1050
1075
|
if (r(b, D) && typeof Z != "function")
|
|
1051
|
-
return W(
|
|
1076
|
+
return W(A, M, _, D, X(Z));
|
|
1052
1077
|
if (!Z)
|
|
1053
|
-
return new
|
|
1054
|
-
"Invalid " + M + " `" + _ + "` key `" + D + "` supplied to `" +
|
|
1078
|
+
return new m(
|
|
1079
|
+
"Invalid " + M + " `" + _ + "` key `" + D + "` supplied to `" + A + "`.\nBad object: " + JSON.stringify(x[w], null, " ") + `
|
|
1055
1080
|
Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
|
|
1056
1081
|
);
|
|
1057
|
-
var
|
|
1058
|
-
if (
|
|
1059
|
-
return
|
|
1082
|
+
var P = Z(R, D, A, M, _ + "." + D, n);
|
|
1083
|
+
if (P)
|
|
1084
|
+
return P;
|
|
1060
1085
|
}
|
|
1061
1086
|
return null;
|
|
1062
1087
|
}
|
|
1063
|
-
return
|
|
1088
|
+
return $(E);
|
|
1064
1089
|
}
|
|
1065
1090
|
function te(b) {
|
|
1066
1091
|
switch (typeof b) {
|
|
@@ -1075,7 +1100,7 @@ Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
|
|
|
1075
1100
|
return b.every(te);
|
|
1076
1101
|
if (b === null || d(b))
|
|
1077
1102
|
return !0;
|
|
1078
|
-
var E =
|
|
1103
|
+
var E = p(b);
|
|
1079
1104
|
if (E) {
|
|
1080
1105
|
var x = E.call(b), w;
|
|
1081
1106
|
if (E !== b.entries) {
|
|
@@ -1084,8 +1109,8 @@ Valid keys: ` + JSON.stringify(Object.keys(b), null, " ")
|
|
|
1084
1109
|
return !1;
|
|
1085
1110
|
} else
|
|
1086
1111
|
for (; !(w = x.next()).done; ) {
|
|
1087
|
-
var
|
|
1088
|
-
if (
|
|
1112
|
+
var A = w.value;
|
|
1113
|
+
if (A && !te(A[1]))
|
|
1089
1114
|
return !1;
|
|
1090
1115
|
}
|
|
1091
1116
|
} else
|
|
@@ -1144,8 +1169,8 @@ function Bi() {
|
|
|
1144
1169
|
function n() {
|
|
1145
1170
|
}
|
|
1146
1171
|
return n.resetWarningCache = t, ct = function() {
|
|
1147
|
-
function r(o, d, u, l, c,
|
|
1148
|
-
if (
|
|
1172
|
+
function r(o, d, u, l, c, p) {
|
|
1173
|
+
if (p !== e) {
|
|
1149
1174
|
var s = new Error(
|
|
1150
1175
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1151
1176
|
);
|
|
@@ -1283,7 +1308,7 @@ function pn(e, t) {
|
|
|
1283
1308
|
r[n] = e[n];
|
|
1284
1309
|
return r;
|
|
1285
1310
|
}
|
|
1286
|
-
function
|
|
1311
|
+
function mt(e, t) {
|
|
1287
1312
|
for (var n = 0, r = Zi(t.split("")), i; !(i = r()).done; ) {
|
|
1288
1313
|
var a = i.value;
|
|
1289
1314
|
a === e && n++;
|
|
@@ -1291,7 +1316,7 @@ function gt(e, t) {
|
|
|
1291
1316
|
return n;
|
|
1292
1317
|
}
|
|
1293
1318
|
function Ji(e, t) {
|
|
1294
|
-
for (var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "x", r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : " ", i = e.length, a =
|
|
1319
|
+
for (var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "x", r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : " ", i = e.length, a = mt("(", e), o = mt(")", e), d = a - o; d > 0 && i < t.length; )
|
|
1295
1320
|
e += t[i].replace(n, r), t[i] === ")" && d--, i++;
|
|
1296
1321
|
return e;
|
|
1297
1322
|
}
|
|
@@ -1330,7 +1355,7 @@ function ea(e) {
|
|
|
1330
1355
|
text: i
|
|
1331
1356
|
};
|
|
1332
1357
|
};
|
|
1333
|
-
var r =
|
|
1358
|
+
var r = mt(t, e);
|
|
1334
1359
|
return function(i) {
|
|
1335
1360
|
if (!i)
|
|
1336
1361
|
return {
|
|
@@ -1440,7 +1465,7 @@ function vt(e, t, n, r, i) {
|
|
|
1440
1465
|
d = l.caret, e.value = c, yr(e, d), i && i(o);
|
|
1441
1466
|
}
|
|
1442
1467
|
var ca = ["ref", "parse", "format", "value", "defaultValue", "controlled", "onChange", "onKeyDown"];
|
|
1443
|
-
function
|
|
1468
|
+
function gn(e, t) {
|
|
1444
1469
|
var n = Object.keys(e);
|
|
1445
1470
|
if (Object.getOwnPropertySymbols) {
|
|
1446
1471
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -1453,9 +1478,9 @@ function mn(e, t) {
|
|
|
1453
1478
|
function pe(e) {
|
|
1454
1479
|
for (var t = 1; t < arguments.length; t++) {
|
|
1455
1480
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
1456
|
-
t % 2 ?
|
|
1481
|
+
t % 2 ? gn(Object(n), !0).forEach(function(r) {
|
|
1457
1482
|
fa(e, r, n[r]);
|
|
1458
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
1483
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : gn(Object(n)).forEach(function(r) {
|
|
1459
1484
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
|
1460
1485
|
});
|
|
1461
1486
|
}
|
|
@@ -1482,25 +1507,25 @@ function pa(e, t) {
|
|
|
1482
1507
|
return n;
|
|
1483
1508
|
}
|
|
1484
1509
|
function ya(e) {
|
|
1485
|
-
var t = e.ref, n = e.parse, r = e.format, i = e.value, a = e.defaultValue, o = e.controlled, d = o === void 0 ? !0 : o, u = e.onChange, l = e.onKeyDown, c = $a(e, ca),
|
|
1486
|
-
|
|
1487
|
-
}, [t]), f = ue(function(
|
|
1488
|
-
return ua(p
|
|
1489
|
-
}, [
|
|
1490
|
-
if (l && l(
|
|
1491
|
-
return la(p
|
|
1492
|
-
}, [
|
|
1510
|
+
var t = e.ref, n = e.parse, r = e.format, i = e.value, a = e.defaultValue, o = e.controlled, d = o === void 0 ? !0 : o, u = e.onChange, l = e.onKeyDown, c = $a(e, ca), p = se(), s = ue(function($) {
|
|
1511
|
+
p.current = $, t && (typeof t == "function" ? t($) : t.current = $);
|
|
1512
|
+
}, [t]), f = ue(function($) {
|
|
1513
|
+
return ua($, p.current, n, r, u);
|
|
1514
|
+
}, [p, n, r, u]), y = ue(function($) {
|
|
1515
|
+
if (l && l($), !$.defaultPrevented)
|
|
1516
|
+
return la($, p.current, n, r, u);
|
|
1517
|
+
}, [p, n, r, u, l]), m = pe(pe({}, c), {}, {
|
|
1493
1518
|
ref: s,
|
|
1494
1519
|
onChange: f,
|
|
1495
1520
|
onKeyDown: y
|
|
1496
1521
|
});
|
|
1497
|
-
return d ? pe(pe({},
|
|
1498
|
-
value: r(
|
|
1499
|
-
}) : pe(pe({},
|
|
1500
|
-
defaultValue: r(
|
|
1522
|
+
return d ? pe(pe({}, m), {}, {
|
|
1523
|
+
value: r(mn(i) ? "" : i).text
|
|
1524
|
+
}) : pe(pe({}, m), {}, {
|
|
1525
|
+
defaultValue: r(mn(a) ? "" : a).text
|
|
1501
1526
|
});
|
|
1502
1527
|
}
|
|
1503
|
-
function
|
|
1528
|
+
function mn(e) {
|
|
1504
1529
|
return e == null;
|
|
1505
1530
|
}
|
|
1506
1531
|
var ha = ["inputComponent", "parse", "format", "value", "defaultValue", "onChange", "controlled", "onKeyDown", "type"];
|
|
@@ -1514,18 +1539,18 @@ function vn(e, t) {
|
|
|
1514
1539
|
}
|
|
1515
1540
|
return n;
|
|
1516
1541
|
}
|
|
1517
|
-
function
|
|
1542
|
+
function ga(e) {
|
|
1518
1543
|
for (var t = 1; t < arguments.length; t++) {
|
|
1519
1544
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
1520
1545
|
t % 2 ? vn(Object(n), !0).forEach(function(r) {
|
|
1521
|
-
|
|
1546
|
+
ma(e, r, n[r]);
|
|
1522
1547
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : vn(Object(n)).forEach(function(r) {
|
|
1523
1548
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
|
1524
1549
|
});
|
|
1525
1550
|
}
|
|
1526
1551
|
return e;
|
|
1527
1552
|
}
|
|
1528
|
-
function
|
|
1553
|
+
function ma(e, t, n) {
|
|
1529
1554
|
return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
|
1530
1555
|
}
|
|
1531
1556
|
function va(e, t) {
|
|
@@ -1546,7 +1571,7 @@ function ba(e, t) {
|
|
|
1546
1571
|
return n;
|
|
1547
1572
|
}
|
|
1548
1573
|
function Ye(e, t) {
|
|
1549
|
-
var n = e.inputComponent, r = n === void 0 ? "input" : n, i = e.parse, a = e.format, o = e.value, d = e.defaultValue, u = e.onChange, l = e.controlled, c = e.onKeyDown,
|
|
1574
|
+
var n = e.inputComponent, r = n === void 0 ? "input" : n, i = e.parse, a = e.format, o = e.value, d = e.defaultValue, u = e.onChange, l = e.controlled, c = e.onKeyDown, p = e.type, s = p === void 0 ? "text" : p, f = va(e, ha), y = ya(ga({
|
|
1550
1575
|
ref: t,
|
|
1551
1576
|
parse: i,
|
|
1552
1577
|
format: a,
|
|
@@ -1557,9 +1582,9 @@ function Ye(e, t) {
|
|
|
1557
1582
|
onKeyDown: c,
|
|
1558
1583
|
type: s
|
|
1559
1584
|
}, f));
|
|
1560
|
-
return /* @__PURE__ */
|
|
1585
|
+
return /* @__PURE__ */ O.createElement(r, y);
|
|
1561
1586
|
}
|
|
1562
|
-
Ye = /* @__PURE__ */
|
|
1587
|
+
Ye = /* @__PURE__ */ O.forwardRef(Ye);
|
|
1563
1588
|
Ye.propTypes = {
|
|
1564
1589
|
// Parses a single characher of `<input/>` text.
|
|
1565
1590
|
parse: g.func.isRequired,
|
|
@@ -1632,9 +1657,9 @@ function Na(e, t) {
|
|
|
1632
1657
|
}
|
|
1633
1658
|
return String(e);
|
|
1634
1659
|
}
|
|
1635
|
-
var Sa = "1.2.0",
|
|
1660
|
+
var Sa = "1.2.0", Oa = "1.7.35", Cn = " ext. ", Ta = /^\d+$/, V = /* @__PURE__ */ (function() {
|
|
1636
1661
|
function e(t) {
|
|
1637
|
-
Qe(this, e), hr(t), this.metadata = t,
|
|
1662
|
+
Qe(this, e), hr(t), this.metadata = t, mr.call(this, t);
|
|
1638
1663
|
}
|
|
1639
1664
|
return et(e, [{
|
|
1640
1665
|
key: "getCountries",
|
|
@@ -1687,7 +1712,7 @@ var Sa = "1.2.0", Ta = "1.7.35", Cn = " ext. ", Oa = /^\d+$/, V = /* @__PURE__ *
|
|
|
1687
1712
|
}, {
|
|
1688
1713
|
key: "selectNumberingPlan",
|
|
1689
1714
|
value: function(n, r) {
|
|
1690
|
-
if (n &&
|
|
1715
|
+
if (n && Ta.test(n) && (r = n, n = null), n && n !== "001") {
|
|
1691
1716
|
if (!this.hasCountry(n))
|
|
1692
1717
|
throw new Error("Unknown country: ".concat(n));
|
|
1693
1718
|
this.numberingPlan = new Pn(this.getCountryMetadata(n), this);
|
|
@@ -1820,7 +1845,7 @@ var Sa = "1.2.0", Ta = "1.7.35", Cn = " ext. ", Oa = /^\d+$/, V = /* @__PURE__ *
|
|
|
1820
1845
|
}]);
|
|
1821
1846
|
})(), Pn = /* @__PURE__ */ (function() {
|
|
1822
1847
|
function e(t, n) {
|
|
1823
|
-
Qe(this, e), this.globalMetadataObject = n, this.metadata = t,
|
|
1848
|
+
Qe(this, e), this.globalMetadataObject = n, this.metadata = t, mr.call(this, n.metadata);
|
|
1824
1849
|
}
|
|
1825
1850
|
return et(e, [{
|
|
1826
1851
|
key: "callingCode",
|
|
@@ -2056,12 +2081,12 @@ function le(e, t) {
|
|
|
2056
2081
|
return t.selectNumberingPlan(e).countryCallingCode();
|
|
2057
2082
|
throw new Error("Unknown country: ".concat(e));
|
|
2058
2083
|
}
|
|
2059
|
-
function
|
|
2084
|
+
function gr(e, t) {
|
|
2060
2085
|
return t.countries.hasOwnProperty(e);
|
|
2061
2086
|
}
|
|
2062
|
-
function
|
|
2087
|
+
function mr(e) {
|
|
2063
2088
|
var t = e.version;
|
|
2064
|
-
typeof t == "number" ? (this.v1 = t === 1, this.v2 = t === 2, this.v3 = t === 3, this.v4 = t === 4) : t ? bn(t, Sa) === -1 ? this.v2 = !0 : bn(t,
|
|
2089
|
+
typeof t == "number" ? (this.v1 = t === 1, this.v2 = t === 2, this.v3 = t === 3, this.v4 = t === 4) : t ? bn(t, Sa) === -1 ? this.v2 = !0 : bn(t, Oa) === -1 ? this.v3 = !0 : this.v4 = !0 : this.v1 = !0;
|
|
2065
2090
|
}
|
|
2066
2091
|
function tt(e, t, n) {
|
|
2067
2092
|
return Ra(e, t, void 0, n);
|
|
@@ -2191,8 +2216,8 @@ function bt(e, t) {
|
|
|
2191
2216
|
}
|
|
2192
2217
|
var l;
|
|
2193
2218
|
if (d) {
|
|
2194
|
-
var c = e.indexOf(r[1]),
|
|
2195
|
-
|
|
2219
|
+
var c = e.indexOf(r[1]), p = e.slice(0, c);
|
|
2220
|
+
p === t.numberingPlan.nationalPrefix() && (l = t.numberingPlan.nationalPrefix());
|
|
2196
2221
|
} else
|
|
2197
2222
|
l = r[0];
|
|
2198
2223
|
return {
|
|
@@ -2330,11 +2355,11 @@ function Ht(e, t, n, r, i) {
|
|
|
2330
2355
|
return {};
|
|
2331
2356
|
i = new V(i);
|
|
2332
2357
|
for (var c = 2; c - 1 <= Ua && c <= e.length; ) {
|
|
2333
|
-
var
|
|
2334
|
-
if (i.hasCallingCode(
|
|
2335
|
-
return i.selectNumberingPlan(
|
|
2358
|
+
var p = e.slice(1, c);
|
|
2359
|
+
if (i.hasCallingCode(p))
|
|
2360
|
+
return i.selectNumberingPlan(p), {
|
|
2336
2361
|
countryCallingCodeSource: a ? "FROM_NUMBER_WITH_IDD" : "FROM_NUMBER_WITH_PLUS_SIGN",
|
|
2337
|
-
countryCallingCode:
|
|
2362
|
+
countryCallingCode: p,
|
|
2338
2363
|
number: e.slice(c)
|
|
2339
2364
|
};
|
|
2340
2365
|
c++;
|
|
@@ -2377,12 +2402,12 @@ function eo(e, t, n) {
|
|
|
2377
2402
|
var to = ";ext=", ye = function(t) {
|
|
2378
2403
|
return "([".concat(Y, "]{1,").concat(t, "})");
|
|
2379
2404
|
};
|
|
2380
|
-
function
|
|
2381
|
-
var t = "20", n = "15", r = "9", i = "6", a = "[ \\t,]*", o = "[:\\..]?[ \\t,-]*", d = "#?", u = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", l = "(?:[xx##~~]|int|int)", c = "[- ]+",
|
|
2382
|
-
return f + "|" + y + "|" +
|
|
2405
|
+
function Or(e) {
|
|
2406
|
+
var t = "20", n = "15", r = "9", i = "6", a = "[ \\t,]*", o = "[:\\..]?[ \\t,-]*", d = "#?", u = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", l = "(?:[xx##~~]|int|int)", c = "[- ]+", p = "[ \\t]*", s = "(?:,{2}|;)", f = to + ye(t), y = a + u + o + ye(t) + d, m = a + l + o + ye(r) + d, $ = c + ye(i) + "#", C = p + s + o + ye(n) + d, T = p + "(?:,)+" + o + ye(r) + d;
|
|
2407
|
+
return f + "|" + y + "|" + m + "|" + $ + "|" + C + "|" + T;
|
|
2383
2408
|
}
|
|
2384
2409
|
var no = "[" + Y + "]{" + Bt + "}", ro = "[" + nt + "]{0,1}(?:[" + ee + "]*[" + Y + "]){3,}[" + ee + Y + "]*", io = new RegExp("^[" + nt + "]{0,1}(?:[" + ee + "]*[" + Y + "]){1,2}$", "i"), ao = ro + // Phone number extensions
|
|
2385
|
-
"(?:" +
|
|
2410
|
+
"(?:" + Or() + ")?", oo = new RegExp(
|
|
2386
2411
|
// Either a short two-digit-only phone number
|
|
2387
2412
|
"^" + no + "$|^" + ao + "$",
|
|
2388
2413
|
"i"
|
|
@@ -2401,13 +2426,13 @@ function so(e) {
|
|
|
2401
2426
|
throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');
|
|
2402
2427
|
return "tel:".concat(t).concat(n ? ";ext=" + n : "");
|
|
2403
2428
|
}
|
|
2404
|
-
var
|
|
2429
|
+
var On = {
|
|
2405
2430
|
formatExtension: function(t, n, r) {
|
|
2406
2431
|
return "".concat(t).concat(r.ext()).concat(n);
|
|
2407
2432
|
}
|
|
2408
2433
|
};
|
|
2409
2434
|
function co(e, t, n, r) {
|
|
2410
|
-
if (n ? n = po({},
|
|
2435
|
+
if (n ? n = po({}, On, n) : n = On, r = new V(r), e.country && e.country !== "001") {
|
|
2411
2436
|
if (!r.hasCountry(e.country))
|
|
2412
2437
|
throw new Error("Unknown country: ".concat(e.country));
|
|
2413
2438
|
r.selectNumberingPlan(e.country);
|
|
@@ -2498,7 +2523,7 @@ function Ne(e) {
|
|
|
2498
2523
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2499
2524
|
}, Ne(e);
|
|
2500
2525
|
}
|
|
2501
|
-
function
|
|
2526
|
+
function Tn(e, t) {
|
|
2502
2527
|
var n = Object.keys(e);
|
|
2503
2528
|
if (Object.getOwnPropertySymbols) {
|
|
2504
2529
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2511,30 +2536,30 @@ function On(e, t) {
|
|
|
2511
2536
|
function In(e) {
|
|
2512
2537
|
for (var t = 1; t < arguments.length; t++) {
|
|
2513
2538
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
2514
|
-
t % 2 ?
|
|
2539
|
+
t % 2 ? Tn(Object(n), !0).forEach(function(r) {
|
|
2515
2540
|
ho(e, r, n[r]);
|
|
2516
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2541
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Tn(Object(n)).forEach(function(r) {
|
|
2517
2542
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
|
2518
2543
|
});
|
|
2519
2544
|
}
|
|
2520
2545
|
return e;
|
|
2521
2546
|
}
|
|
2522
2547
|
function ho(e, t, n) {
|
|
2523
|
-
return (t =
|
|
2548
|
+
return (t = Tr(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
|
2524
2549
|
}
|
|
2525
|
-
function
|
|
2550
|
+
function go(e, t) {
|
|
2526
2551
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
2527
2552
|
}
|
|
2528
|
-
function
|
|
2553
|
+
function mo(e, t) {
|
|
2529
2554
|
for (var n = 0; n < t.length; n++) {
|
|
2530
2555
|
var r = t[n];
|
|
2531
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
2556
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, Tr(r.key), r);
|
|
2532
2557
|
}
|
|
2533
2558
|
}
|
|
2534
2559
|
function vo(e, t, n) {
|
|
2535
|
-
return t &&
|
|
2560
|
+
return t && mo(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
2536
2561
|
}
|
|
2537
|
-
function
|
|
2562
|
+
function Tr(e) {
|
|
2538
2563
|
var t = bo(e, "string");
|
|
2539
2564
|
return Ne(t) == "symbol" ? t : t + "";
|
|
2540
2565
|
}
|
|
@@ -2550,7 +2575,7 @@ function bo(e, t) {
|
|
|
2550
2575
|
}
|
|
2551
2576
|
var Ir = /* @__PURE__ */ (function() {
|
|
2552
2577
|
function e(t, n, r) {
|
|
2553
|
-
if (
|
|
2578
|
+
if (go(this, e), !t)
|
|
2554
2579
|
throw new TypeError("First argument is required");
|
|
2555
2580
|
if (typeof t != "string")
|
|
2556
2581
|
throw new TypeError("First argument must be a string");
|
|
@@ -2681,10 +2706,10 @@ function No(e, t, n) {
|
|
|
2681
2706
|
function So(e, t) {
|
|
2682
2707
|
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
2683
2708
|
}
|
|
2684
|
-
function
|
|
2685
|
-
return t =
|
|
2709
|
+
function Oo(e, t, n) {
|
|
2710
|
+
return t = Oe(t), To(e, Vt() ? Reflect.construct(t, n || [], Oe(e).constructor) : t.apply(e, n));
|
|
2686
2711
|
}
|
|
2687
|
-
function
|
|
2712
|
+
function To(e, t) {
|
|
2688
2713
|
if (t && (Pt(t) == "object" || typeof t == "function")) return t;
|
|
2689
2714
|
if (t !== void 0) throw new TypeError("Derived constructors may only return object or undefined");
|
|
2690
2715
|
return Io(e);
|
|
@@ -2707,7 +2732,7 @@ function Et(e) {
|
|
|
2707
2732
|
t.set(r, i);
|
|
2708
2733
|
}
|
|
2709
2734
|
function i() {
|
|
2710
|
-
return _o(r, arguments,
|
|
2735
|
+
return _o(r, arguments, Oe(this).constructor);
|
|
2711
2736
|
}
|
|
2712
2737
|
return i.prototype = Object.create(r.prototype, { constructor: { value: i, enumerable: !1, writable: !0, configurable: !0 } }), Se(i, r);
|
|
2713
2738
|
}, Et(e);
|
|
@@ -2741,18 +2766,18 @@ function Se(e, t) {
|
|
|
2741
2766
|
return n.__proto__ = r, n;
|
|
2742
2767
|
}, Se(e, t);
|
|
2743
2768
|
}
|
|
2744
|
-
function
|
|
2745
|
-
return
|
|
2769
|
+
function Oe(e) {
|
|
2770
|
+
return Oe = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
|
|
2746
2771
|
return t.__proto__ || Object.getPrototypeOf(t);
|
|
2747
|
-
},
|
|
2772
|
+
}, Oe(e);
|
|
2748
2773
|
}
|
|
2749
2774
|
var re = /* @__PURE__ */ (function(e) {
|
|
2750
2775
|
function t(n) {
|
|
2751
2776
|
var r;
|
|
2752
|
-
return So(this, t), r =
|
|
2777
|
+
return So(this, t), r = Oo(this, t, [n]), Object.setPrototypeOf(r, t.prototype), r.name = r.constructor.name, r;
|
|
2753
2778
|
}
|
|
2754
2779
|
return Ao(t, e), No(t);
|
|
2755
|
-
})(/* @__PURE__ */ Et(Error)), An = new RegExp("(?:" +
|
|
2780
|
+
})(/* @__PURE__ */ Et(Error)), An = new RegExp("(?:" + Or() + ")$", "i");
|
|
2756
2781
|
function Ro(e) {
|
|
2757
2782
|
var t = e.search(An);
|
|
2758
2783
|
if (t < 0)
|
|
@@ -2915,12 +2940,12 @@ function _r(e, t, n) {
|
|
|
2915
2940
|
}
|
|
2916
2941
|
return Ar(e);
|
|
2917
2942
|
}
|
|
2918
|
-
var wr = "+", ko = "[\\-\\.\\(\\)]?", Rn = "([" + Y + "]|" + ko + ")", jo = "^\\" + wr + Rn + "*[" + Y + "]" + Rn + "*$", Go = new RegExp(jo, "g"), St = Y, Uo = "[" + St + "]+((\\-)*[" + St + "])*", Bo = "a-zA-Z", Wo = "[" + Bo + "]+((\\-)*[" + St + "])*", Ho = "^(" + Uo + "\\.)*" + Wo + "\\.?$", Vo = new RegExp(Ho, "g"), xn = "tel:",
|
|
2943
|
+
var wr = "+", ko = "[\\-\\.\\(\\)]?", Rn = "([" + Y + "]|" + ko + ")", jo = "^\\" + wr + Rn + "*[" + Y + "]" + Rn + "*$", Go = new RegExp(jo, "g"), St = Y, Uo = "[" + St + "]+((\\-)*[" + St + "])*", Bo = "a-zA-Z", Wo = "[" + Bo + "]+((\\-)*[" + St + "])*", Ho = "^(" + Uo + "\\.)*" + Wo + "\\.?$", Vo = new RegExp(Ho, "g"), xn = "tel:", Ot = ";phone-context=", Ko = ";isub=";
|
|
2919
2944
|
function Yo(e) {
|
|
2920
|
-
var t = e.indexOf(
|
|
2945
|
+
var t = e.indexOf(Ot);
|
|
2921
2946
|
if (t < 0)
|
|
2922
2947
|
return null;
|
|
2923
|
-
var n = t +
|
|
2948
|
+
var n = t + Ot.length;
|
|
2924
2949
|
if (n >= e.length)
|
|
2925
2950
|
return "";
|
|
2926
2951
|
var r = e.indexOf(";", n);
|
|
@@ -2940,7 +2965,7 @@ function Zo(e, t) {
|
|
|
2940
2965
|
i = "", r.charAt(0) === wr && (i += r);
|
|
2941
2966
|
var a = e.indexOf(xn), o;
|
|
2942
2967
|
a >= 0 ? o = a + xn.length : o = 0;
|
|
2943
|
-
var d = e.indexOf(
|
|
2968
|
+
var d = e.indexOf(Ot);
|
|
2944
2969
|
i += e.substring(o, d);
|
|
2945
2970
|
}
|
|
2946
2971
|
var u = i.indexOf(Ko);
|
|
@@ -2957,7 +2982,7 @@ function Qo(e, t, n) {
|
|
|
2957
2982
|
throw o === "TOO_SHORT" ? new re("TOO_SHORT") : new re("NOT_A_NUMBER");
|
|
2958
2983
|
return {};
|
|
2959
2984
|
}
|
|
2960
|
-
var d = rd(i, t.defaultCountry, t.defaultCallingCode, n), u = d.country, l = d.nationalNumber, c = d.countryCallingCode,
|
|
2985
|
+
var d = rd(i, t.defaultCountry, t.defaultCallingCode, n), u = d.country, l = d.nationalNumber, c = d.countryCallingCode, p = d.countryCallingCodeSource, s = d.carrierCode;
|
|
2961
2986
|
if (!n.hasSelectedNumberingPlan()) {
|
|
2962
2987
|
if (t.v2)
|
|
2963
2988
|
throw new re("INVALID_COUNTRY");
|
|
@@ -2975,7 +3000,7 @@ function Qo(e, t, n) {
|
|
|
2975
3000
|
}
|
|
2976
3001
|
if (t.v2) {
|
|
2977
3002
|
var f = new Ir(c, l, n.metadata);
|
|
2978
|
-
return u && (f.country = u), s && (f.carrierCode = s), a && (f.ext = a), f.__countryCallingCodeSource =
|
|
3003
|
+
return u && (f.country = u), s && (f.carrierCode = s), a && (f.ext = a), f.__countryCallingCodeSource = p, f;
|
|
2979
3004
|
}
|
|
2980
3005
|
var y = (t.extended ? n.hasSelectedNumberingPlan() : u) ? ae(l, n.nationalNumberPattern()) : !1;
|
|
2981
3006
|
return t.extended ? {
|
|
@@ -3038,7 +3063,7 @@ function rd(e, t, n, r) {
|
|
|
3038
3063
|
countryCallingCodeSource: a,
|
|
3039
3064
|
countryCallingCode: o
|
|
3040
3065
|
};
|
|
3041
|
-
var l = Ct(Nt(d), u, r), c = l.nationalNumber,
|
|
3066
|
+
var l = Ct(Nt(d), u, r), c = l.nationalNumber, p = l.carrierCode, s = Wt(o, {
|
|
3042
3067
|
nationalNumber: c,
|
|
3043
3068
|
metadata: r
|
|
3044
3069
|
});
|
|
@@ -3047,16 +3072,16 @@ function rd(e, t, n, r) {
|
|
|
3047
3072
|
countryCallingCode: o,
|
|
3048
3073
|
countryCallingCodeSource: a,
|
|
3049
3074
|
nationalNumber: c,
|
|
3050
|
-
carrierCode:
|
|
3075
|
+
carrierCode: p
|
|
3051
3076
|
};
|
|
3052
3077
|
}
|
|
3053
|
-
function
|
|
3078
|
+
function Te(e) {
|
|
3054
3079
|
"@babel/helpers - typeof";
|
|
3055
|
-
return
|
|
3080
|
+
return Te = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
3056
3081
|
return typeof t;
|
|
3057
3082
|
} : function(t) {
|
|
3058
3083
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
3059
|
-
},
|
|
3084
|
+
}, Te(e);
|
|
3060
3085
|
}
|
|
3061
3086
|
function Fn(e, t) {
|
|
3062
3087
|
var n = Object.keys(e);
|
|
@@ -3084,14 +3109,14 @@ function id(e, t, n) {
|
|
|
3084
3109
|
}
|
|
3085
3110
|
function ad(e) {
|
|
3086
3111
|
var t = od(e, "string");
|
|
3087
|
-
return
|
|
3112
|
+
return Te(t) == "symbol" ? t : t + "";
|
|
3088
3113
|
}
|
|
3089
3114
|
function od(e, t) {
|
|
3090
|
-
if (
|
|
3115
|
+
if (Te(e) != "object" || !e) return e;
|
|
3091
3116
|
var n = e[Symbol.toPrimitive];
|
|
3092
3117
|
if (n !== void 0) {
|
|
3093
3118
|
var r = n.call(e, t);
|
|
3094
|
-
if (
|
|
3119
|
+
if (Te(r) != "object") return r;
|
|
3095
3120
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3096
3121
|
}
|
|
3097
3122
|
return (t === "string" ? String : Number)(e);
|
|
@@ -3187,7 +3212,7 @@ function yd(e, t) {
|
|
|
3187
3212
|
function hd(e) {
|
|
3188
3213
|
if (Array.isArray(e)) return e;
|
|
3189
3214
|
}
|
|
3190
|
-
function
|
|
3215
|
+
function gd(e) {
|
|
3191
3216
|
var t = Array.prototype.slice.call(e), n = fd(t, 4), r = n[0], i = n[1], a = n[2], o = n[3], d, u, l;
|
|
3192
3217
|
if (typeof r == "string")
|
|
3193
3218
|
d = r;
|
|
@@ -3227,14 +3252,14 @@ function jn(e) {
|
|
|
3227
3252
|
for (var t = 1; t < arguments.length; t++) {
|
|
3228
3253
|
var n = arguments[t] != null ? arguments[t] : {};
|
|
3229
3254
|
t % 2 ? kn(Object(n), !0).forEach(function(r) {
|
|
3230
|
-
|
|
3255
|
+
md(e, r, n[r]);
|
|
3231
3256
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : kn(Object(n)).forEach(function(r) {
|
|
3232
3257
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
|
|
3233
3258
|
});
|
|
3234
3259
|
}
|
|
3235
3260
|
return e;
|
|
3236
3261
|
}
|
|
3237
|
-
function
|
|
3262
|
+
function md(e, t, n) {
|
|
3238
3263
|
return (t = vd(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
|
3239
3264
|
}
|
|
3240
3265
|
function vd(e) {
|
|
@@ -3252,7 +3277,7 @@ function bd(e, t) {
|
|
|
3252
3277
|
return (t === "string" ? String : Number)(e);
|
|
3253
3278
|
}
|
|
3254
3279
|
function Cd(e, t, n) {
|
|
3255
|
-
t && t.defaultCountry && !
|
|
3280
|
+
t && t.defaultCountry && !gr(t.defaultCountry, n) && (t = jn(jn({}, t), {}, {
|
|
3256
3281
|
defaultCountry: void 0
|
|
3257
3282
|
}));
|
|
3258
3283
|
try {
|
|
@@ -3262,7 +3287,7 @@ function Cd(e, t, n) {
|
|
|
3262
3287
|
}
|
|
3263
3288
|
}
|
|
3264
3289
|
function Rr() {
|
|
3265
|
-
var e =
|
|
3290
|
+
var e = gd(arguments), t = e.text, n = e.options, r = e.metadata;
|
|
3266
3291
|
return Cd(t, n, r);
|
|
3267
3292
|
}
|
|
3268
3293
|
function _e(e) {
|
|
@@ -3286,10 +3311,10 @@ function Nd(e, t, n) {
|
|
|
3286
3311
|
return t && Ed(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
3287
3312
|
}
|
|
3288
3313
|
function Sd(e) {
|
|
3289
|
-
var t =
|
|
3314
|
+
var t = Od(e, "string");
|
|
3290
3315
|
return _e(t) == "symbol" ? t : t + "";
|
|
3291
3316
|
}
|
|
3292
|
-
function
|
|
3317
|
+
function Od(e, t) {
|
|
3293
3318
|
if (_e(e) != "object" || !e) return e;
|
|
3294
3319
|
var n = e[Symbol.toPrimitive];
|
|
3295
3320
|
if (n !== void 0) {
|
|
@@ -3299,7 +3324,7 @@ function Td(e, t) {
|
|
|
3299
3324
|
}
|
|
3300
3325
|
return String(e);
|
|
3301
3326
|
}
|
|
3302
|
-
var
|
|
3327
|
+
var Td = /* @__PURE__ */ (function() {
|
|
3303
3328
|
function e(t) {
|
|
3304
3329
|
var n = t.onCountryChange, r = t.onCallingCodeChange;
|
|
3305
3330
|
Pd(this, e), this.onCountryChange = n, this.onCallingCodeChange = r;
|
|
@@ -3693,13 +3718,13 @@ var Jd = /* @__PURE__ */ (function() {
|
|
|
3693
3718
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = r.allowOverflow;
|
|
3694
3719
|
if (!n)
|
|
3695
3720
|
throw new Error("String is required");
|
|
3696
|
-
var a =
|
|
3721
|
+
var a = Tt(n.split(""), this.matchTree, !0);
|
|
3697
3722
|
if (a && a.match && delete a.matchedChars, !(a && a.overflow && !i))
|
|
3698
3723
|
return a;
|
|
3699
3724
|
}
|
|
3700
3725
|
}]);
|
|
3701
3726
|
})();
|
|
3702
|
-
function
|
|
3727
|
+
function Tt(e, t, n) {
|
|
3703
3728
|
if (typeof t == "string") {
|
|
3704
3729
|
var r = e.join("");
|
|
3705
3730
|
return t.indexOf(r) === 0 ? e.length === t.length ? {
|
|
@@ -3717,7 +3742,7 @@ function Ot(e, t, n) {
|
|
|
3717
3742
|
}
|
|
3718
3743
|
if (Array.isArray(t)) {
|
|
3719
3744
|
for (var i = e.slice(), a = 0; a < t.length; ) {
|
|
3720
|
-
var o = t[a], d =
|
|
3745
|
+
var o = t[a], d = Tt(i, o, n && a === t.length - 1);
|
|
3721
3746
|
if (d) {
|
|
3722
3747
|
if (d.overflow)
|
|
3723
3748
|
return d;
|
|
@@ -3752,7 +3777,7 @@ function Ot(e, t, n) {
|
|
|
3752
3777
|
switch (t.op) {
|
|
3753
3778
|
case "|":
|
|
3754
3779
|
for (var u, l = Wn(t.args), c; !(c = l()).done; ) {
|
|
3755
|
-
var
|
|
3780
|
+
var p = c.value, s = Tt(e, p, n);
|
|
3756
3781
|
if (s) {
|
|
3757
3782
|
if (s.overflow)
|
|
3758
3783
|
return s;
|
|
@@ -3774,8 +3799,8 @@ function Ot(e, t, n) {
|
|
|
3774
3799
|
} : void 0;
|
|
3775
3800
|
case "[]":
|
|
3776
3801
|
for (var f = Wn(t.args), y; !(y = f()).done; ) {
|
|
3777
|
-
var
|
|
3778
|
-
if (e[0] ===
|
|
3802
|
+
var m = y.value;
|
|
3803
|
+
if (e[0] === m)
|
|
3779
3804
|
return e.length === 1 ? {
|
|
3780
3805
|
match: !0,
|
|
3781
3806
|
matchedChars: e
|
|
@@ -3783,7 +3808,7 @@ function Ot(e, t, n) {
|
|
|
3783
3808
|
overflow: !0
|
|
3784
3809
|
} : {
|
|
3785
3810
|
match: !0,
|
|
3786
|
-
matchedChars: [
|
|
3811
|
+
matchedChars: [m]
|
|
3787
3812
|
};
|
|
3788
3813
|
}
|
|
3789
3814
|
return;
|
|
@@ -4007,8 +4032,8 @@ var It = "9", iu = 15, au = He(It, iu), ou = /[- ]/, du = function() {
|
|
|
4007
4032
|
u = u.replace(du(), "\\d").replace(uu(), "\\d");
|
|
4008
4033
|
var l = au.match(u)[0];
|
|
4009
4034
|
if (!(i.length > l.length)) {
|
|
4010
|
-
var c = new RegExp("^" + u + "$"),
|
|
4011
|
-
c.test(
|
|
4035
|
+
var c = new RegExp("^" + u + "$"), p = i.replace(/\d/g, It);
|
|
4036
|
+
c.test(p) && (l = p);
|
|
4012
4037
|
var s = this.getFormatFormat(n, a), f;
|
|
4013
4038
|
if (this.shouldTryNationalPrefixFormattingRule(n, {
|
|
4014
4039
|
international: a,
|
|
@@ -4016,11 +4041,11 @@ var It = "9", iu = 15, au = He(It, iu), ou = /[- ]/, du = function() {
|
|
|
4016
4041
|
})) {
|
|
4017
4042
|
var y = s.replace(Nr, n.nationalPrefixFormattingRule());
|
|
4018
4043
|
if (Ze(n.nationalPrefixFormattingRule()) === (o || "") + Ze("$1") && (s = y, f = !0, o))
|
|
4019
|
-
for (var
|
|
4020
|
-
s = s.replace(/\d/, Q),
|
|
4044
|
+
for (var m = o.length; m > 0; )
|
|
4045
|
+
s = s.replace(/\d/, Q), m--;
|
|
4021
4046
|
}
|
|
4022
|
-
var
|
|
4023
|
-
return f || (d ?
|
|
4047
|
+
var $ = l.replace(new RegExp(u), s).replace(new RegExp(It, "g"), Q);
|
|
4048
|
+
return f || (d ? $ = He(Q, d.length) + " " + $ : o && ($ = He(Q, o.length) + this.getSeparatorAfterNationalPrefix(n) + $)), a && ($ = Er($)), $;
|
|
4024
4049
|
}
|
|
4025
4050
|
}
|
|
4026
4051
|
}, {
|
|
@@ -4099,13 +4124,13 @@ function yu(e, t) {
|
|
|
4099
4124
|
function hu(e, t) {
|
|
4100
4125
|
for (var n = 0; n < t.length; n++) {
|
|
4101
4126
|
var r = t[n];
|
|
4102
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e,
|
|
4127
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, mu(r.key), r);
|
|
4103
4128
|
}
|
|
4104
4129
|
}
|
|
4105
|
-
function
|
|
4130
|
+
function gu(e, t, n) {
|
|
4106
4131
|
return t && hu(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
4107
4132
|
}
|
|
4108
|
-
function
|
|
4133
|
+
function mu(e) {
|
|
4109
4134
|
var t = vu(e, "string");
|
|
4110
4135
|
return Fe(t) == "symbol" ? t : t + "";
|
|
4111
4136
|
}
|
|
@@ -4124,7 +4149,7 @@ var bu = "[" + ee + Y + "]+", Cu = new RegExp("^" + bu + "$", "i"), Pu = "(?:["
|
|
|
4124
4149
|
var n = t.defaultCountry, r = t.defaultCallingCode, i = t.metadata, a = t.onNationalSignificantNumberChange;
|
|
4125
4150
|
yu(this, e), this.defaultCountry = n, this.defaultCallingCode = r, this.metadata = i, this.onNationalSignificantNumberChange = a;
|
|
4126
4151
|
}
|
|
4127
|
-
return
|
|
4152
|
+
return gu(e, [{
|
|
4128
4153
|
key: "input",
|
|
4129
4154
|
value: function(n, r) {
|
|
4130
4155
|
var i = Iu(n), a = xr(i, 2), o = a[0], d = a[1], u = Ze(o), l;
|
|
@@ -4284,7 +4309,7 @@ var bu = "[" + ee + Y + "]+", Cu = new RegExp("^" + bu + "$", "i"), Pu = "(?:["
|
|
|
4284
4309
|
}
|
|
4285
4310
|
}]);
|
|
4286
4311
|
})();
|
|
4287
|
-
function
|
|
4312
|
+
function Ou(e) {
|
|
4288
4313
|
var t = e.search(Pu);
|
|
4289
4314
|
if (!(t < 0)) {
|
|
4290
4315
|
e = e.slice(t);
|
|
@@ -4292,12 +4317,12 @@ function Tu(e) {
|
|
|
4292
4317
|
return e[0] === "+" && (n = !0, e = e.slice(1)), e = e.replace(Eu, ""), n && (e = "+" + e), e;
|
|
4293
4318
|
}
|
|
4294
4319
|
}
|
|
4295
|
-
function
|
|
4296
|
-
var t =
|
|
4320
|
+
function Tu(e) {
|
|
4321
|
+
var t = Ou(e) || "";
|
|
4297
4322
|
return t[0] === "+" ? [t.slice(1), !0] : [t];
|
|
4298
4323
|
}
|
|
4299
4324
|
function Iu(e) {
|
|
4300
|
-
var t =
|
|
4325
|
+
var t = Tu(e), n = xr(t, 2), r = n[0], i = n[1];
|
|
4301
4326
|
return Cu.test(r) || (r = ""), [r, i];
|
|
4302
4327
|
}
|
|
4303
4328
|
function Me(e) {
|
|
@@ -4413,7 +4438,7 @@ var Pe = /* @__PURE__ */ (function() {
|
|
|
4413
4438
|
key: "reset",
|
|
4414
4439
|
value: function() {
|
|
4415
4440
|
var n = this;
|
|
4416
|
-
return this.state = new
|
|
4441
|
+
return this.state = new Td({
|
|
4417
4442
|
onCountryChange: function(i) {
|
|
4418
4443
|
n.country = i;
|
|
4419
4444
|
},
|
|
@@ -4598,8 +4623,8 @@ var Pe = /* @__PURE__ */ (function() {
|
|
|
4598
4623
|
c && (o = c);
|
|
4599
4624
|
}
|
|
4600
4625
|
}
|
|
4601
|
-
var
|
|
4602
|
-
return i && (
|
|
4626
|
+
var p = new Ir(o || a, r, this.metadata.metadata);
|
|
4627
|
+
return i && (p.carrierCode = i), p;
|
|
4603
4628
|
}
|
|
4604
4629
|
}
|
|
4605
4630
|
/**
|
|
@@ -4725,23 +4750,23 @@ function Yu(e) {
|
|
|
4725
4750
|
inputFormat: o,
|
|
4726
4751
|
country: a,
|
|
4727
4752
|
metadata: u
|
|
4728
|
-
}),
|
|
4729
|
-
return y && (
|
|
4730
|
-
text:
|
|
4731
|
-
template:
|
|
4753
|
+
}), m = f.input(y + s), $ = f.getTemplate();
|
|
4754
|
+
return y && (m = At(m, y), $ && ($ = At($, y))), {
|
|
4755
|
+
text: m,
|
|
4756
|
+
template: $
|
|
4732
4757
|
};
|
|
4733
|
-
}, [a, u]),
|
|
4758
|
+
}, [a, u]), p = Mr({
|
|
4734
4759
|
onKeyDown: i,
|
|
4735
4760
|
inputFormat: o
|
|
4736
4761
|
});
|
|
4737
|
-
return /* @__PURE__ */
|
|
4762
|
+
return /* @__PURE__ */ O.createElement(Ye, _t({}, l, {
|
|
4738
4763
|
ref: r,
|
|
4739
4764
|
parse: Gu,
|
|
4740
4765
|
format: c,
|
|
4741
|
-
onKeyDown:
|
|
4766
|
+
onKeyDown: p
|
|
4742
4767
|
}));
|
|
4743
4768
|
}
|
|
4744
|
-
return t = /* @__PURE__ */
|
|
4769
|
+
return t = /* @__PURE__ */ O.forwardRef(t), t.propTypes = {
|
|
4745
4770
|
/**
|
|
4746
4771
|
* The parsed phone number.
|
|
4747
4772
|
* "Parsed" not in a sense of "E.164"
|
|
@@ -4813,31 +4838,31 @@ function Ju(e, t) {
|
|
|
4813
4838
|
}
|
|
4814
4839
|
function zu(e) {
|
|
4815
4840
|
function t(n, r) {
|
|
4816
|
-
var i = n.value, a = n.onChange, o = n.onKeyDown, d = n.country, u = n.inputFormat, l = n.metadata, c = l === void 0 ? e : l,
|
|
4841
|
+
var i = n.value, a = n.onChange, o = n.onKeyDown, d = n.country, u = n.inputFormat, l = n.metadata, c = l === void 0 ? e : l, p = n.inputComponent, s = p === void 0 ? "input" : p;
|
|
4817
4842
|
n.international, n.withCountryCallingCode;
|
|
4818
4843
|
var f = Xu(n, Zu), y = Fr({
|
|
4819
4844
|
inputFormat: u,
|
|
4820
4845
|
country: d,
|
|
4821
4846
|
metadata: c
|
|
4822
|
-
}),
|
|
4823
|
-
var
|
|
4824
|
-
if (
|
|
4825
|
-
var N = Jn(y,
|
|
4826
|
-
N.indexOf(
|
|
4847
|
+
}), m = ue(function(C) {
|
|
4848
|
+
var T = Nt(C.target.value);
|
|
4849
|
+
if (T === i) {
|
|
4850
|
+
var N = Jn(y, T, d, c);
|
|
4851
|
+
N.indexOf(C.target.value) === 0 && (T = T.slice(0, -1));
|
|
4827
4852
|
}
|
|
4828
|
-
a(
|
|
4829
|
-
}, [y, i, a, d, c]),
|
|
4853
|
+
a(T);
|
|
4854
|
+
}, [y, i, a, d, c]), $ = Mr({
|
|
4830
4855
|
onKeyDown: o,
|
|
4831
4856
|
inputFormat: u
|
|
4832
4857
|
});
|
|
4833
|
-
return /* @__PURE__ */
|
|
4858
|
+
return /* @__PURE__ */ O.createElement(s, wt({}, f, {
|
|
4834
4859
|
ref: r,
|
|
4835
4860
|
value: Jn(y, i, d, c),
|
|
4836
|
-
onChange:
|
|
4837
|
-
onKeyDown:
|
|
4861
|
+
onChange: m,
|
|
4862
|
+
onKeyDown: $
|
|
4838
4863
|
}));
|
|
4839
4864
|
}
|
|
4840
|
-
return t = /* @__PURE__ */
|
|
4865
|
+
return t = /* @__PURE__ */ O.forwardRef(t), t.propTypes = {
|
|
4841
4866
|
/**
|
|
4842
4867
|
* The parsed phone number.
|
|
4843
4868
|
* "Parsed" not in a sense of "E.164"
|
|
@@ -4953,18 +4978,18 @@ function Dr(e) {
|
|
|
4953
4978
|
}, [n]);
|
|
4954
4979
|
return Ve(function() {
|
|
4955
4980
|
return jr(r, t);
|
|
4956
|
-
}, [r, t]), /* @__PURE__ */
|
|
4981
|
+
}, [r, t]), /* @__PURE__ */ O.createElement("select", Xe({}, o, {
|
|
4957
4982
|
disabled: i || a,
|
|
4958
4983
|
readOnly: a,
|
|
4959
4984
|
value: t || "ZZ",
|
|
4960
4985
|
onChange: d
|
|
4961
4986
|
}), r.map(function(u) {
|
|
4962
|
-
var l = u.value, c = u.label,
|
|
4963
|
-
return /* @__PURE__ */
|
|
4964
|
-
key:
|
|
4965
|
-
value:
|
|
4966
|
-
disabled:
|
|
4967
|
-
style:
|
|
4987
|
+
var l = u.value, c = u.label, p = u.divider;
|
|
4988
|
+
return /* @__PURE__ */ O.createElement("option", {
|
|
4989
|
+
key: p ? "|" : l || "ZZ",
|
|
4990
|
+
value: p ? "|" : l || "ZZ",
|
|
4991
|
+
disabled: !!p,
|
|
4992
|
+
style: p ? ol : void 0
|
|
4968
4993
|
}, c);
|
|
4969
4994
|
}));
|
|
4970
4995
|
}
|
|
@@ -5004,20 +5029,20 @@ function kr(e) {
|
|
|
5004
5029
|
var a = e.arrowComponent, o = a === void 0 ? dl : a, d = e.unicodeFlags, u = Lr(e, nl), l = Ve(function() {
|
|
5005
5030
|
return jr(n, t);
|
|
5006
5031
|
}, [n, t]);
|
|
5007
|
-
return /* @__PURE__ */
|
|
5032
|
+
return /* @__PURE__ */ O.createElement("div", {
|
|
5008
5033
|
className: "PhoneInputCountry"
|
|
5009
|
-
}, /* @__PURE__ */
|
|
5034
|
+
}, /* @__PURE__ */ O.createElement(Dr, Xe({}, u, {
|
|
5010
5035
|
value: t,
|
|
5011
5036
|
options: n,
|
|
5012
5037
|
className: Ke("PhoneInputCountrySelect", r)
|
|
5013
|
-
})), l && (d && t ? /* @__PURE__ */
|
|
5038
|
+
})), l && (d && t ? /* @__PURE__ */ O.createElement("div", {
|
|
5014
5039
|
className: "PhoneInputCountryIconUnicode"
|
|
5015
|
-
}, el(t)) : /* @__PURE__ */
|
|
5040
|
+
}, el(t)) : /* @__PURE__ */ O.createElement(i, {
|
|
5016
5041
|
"aria-hidden": !0,
|
|
5017
5042
|
country: t,
|
|
5018
5043
|
label: l.label,
|
|
5019
5044
|
aspectRatio: d ? 1 : void 0
|
|
5020
|
-
})), /* @__PURE__ */
|
|
5045
|
+
})), /* @__PURE__ */ O.createElement(o, null));
|
|
5021
5046
|
}
|
|
5022
5047
|
kr.propTypes = {
|
|
5023
5048
|
// Country flag component.
|
|
@@ -5028,7 +5053,7 @@ kr.propTypes = {
|
|
|
5028
5053
|
unicodeFlags: g.bool
|
|
5029
5054
|
};
|
|
5030
5055
|
function dl() {
|
|
5031
|
-
return /* @__PURE__ */
|
|
5056
|
+
return /* @__PURE__ */ O.createElement("div", {
|
|
5032
5057
|
className: "PhoneInputCountrySelectArrow"
|
|
5033
5058
|
});
|
|
5034
5059
|
}
|
|
@@ -5074,7 +5099,7 @@ function Kt(e) {
|
|
|
5074
5099
|
var t = e.country, n = e.countryName, r = e.flags, i = e.flagUrl, a = sl(e, ll);
|
|
5075
5100
|
return r && r[t] ? r[t]({
|
|
5076
5101
|
title: n
|
|
5077
|
-
}) : /* @__PURE__ */
|
|
5102
|
+
}) : /* @__PURE__ */ O.createElement("img", Rt({}, a, {
|
|
5078
5103
|
alt: n,
|
|
5079
5104
|
role: n ? void 0 : "presentation",
|
|
5080
5105
|
src: i.replace("{XX}", t).replace("{xx}", t.toLowerCase())
|
|
@@ -5128,7 +5153,7 @@ function yl(e, t) {
|
|
|
5128
5153
|
}
|
|
5129
5154
|
function rt(e) {
|
|
5130
5155
|
var t = e.aspectRatio, n = Yt(e, fl);
|
|
5131
|
-
return t === 1 ? /* @__PURE__ */
|
|
5156
|
+
return t === 1 ? /* @__PURE__ */ O.createElement(Ur, n) : /* @__PURE__ */ O.createElement(Gr, n);
|
|
5132
5157
|
}
|
|
5133
5158
|
rt.propTypes = {
|
|
5134
5159
|
title: g.string.isRequired,
|
|
@@ -5136,37 +5161,37 @@ rt.propTypes = {
|
|
|
5136
5161
|
};
|
|
5137
5162
|
function Gr(e) {
|
|
5138
5163
|
var t = e.title, n = Yt(e, $l);
|
|
5139
|
-
return /* @__PURE__ */
|
|
5164
|
+
return /* @__PURE__ */ O.createElement("svg", Je({}, n, {
|
|
5140
5165
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5141
5166
|
viewBox: "0 0 75 50"
|
|
5142
|
-
}), /* @__PURE__ */
|
|
5167
|
+
}), /* @__PURE__ */ O.createElement("title", null, t), /* @__PURE__ */ O.createElement("g", {
|
|
5143
5168
|
className: "PhoneInputInternationalIconGlobe",
|
|
5144
5169
|
stroke: "currentColor",
|
|
5145
5170
|
fill: "none",
|
|
5146
5171
|
strokeWidth: "2",
|
|
5147
5172
|
strokeMiterlimit: "10"
|
|
5148
|
-
}, /* @__PURE__ */
|
|
5173
|
+
}, /* @__PURE__ */ O.createElement("path", {
|
|
5149
5174
|
strokeLinecap: "round",
|
|
5150
5175
|
d: "M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"
|
|
5151
|
-
}), /* @__PURE__ */
|
|
5176
|
+
}), /* @__PURE__ */ O.createElement("path", {
|
|
5152
5177
|
d: "M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"
|
|
5153
|
-
}), /* @__PURE__ */
|
|
5178
|
+
}), /* @__PURE__ */ O.createElement("line", {
|
|
5154
5179
|
x1: "26",
|
|
5155
5180
|
y1: "25",
|
|
5156
5181
|
x2: "74",
|
|
5157
5182
|
y2: "25"
|
|
5158
|
-
}), /* @__PURE__ */
|
|
5183
|
+
}), /* @__PURE__ */ O.createElement("line", {
|
|
5159
5184
|
x1: "50",
|
|
5160
5185
|
y1: "1",
|
|
5161
5186
|
x2: "50",
|
|
5162
5187
|
y2: "49"
|
|
5163
|
-
}), /* @__PURE__ */
|
|
5188
|
+
}), /* @__PURE__ */ O.createElement("path", {
|
|
5164
5189
|
strokeLinecap: "round",
|
|
5165
5190
|
d: "M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"
|
|
5166
|
-
}), /* @__PURE__ */
|
|
5191
|
+
}), /* @__PURE__ */ O.createElement("path", {
|
|
5167
5192
|
strokeLinecap: "round",
|
|
5168
5193
|
d: "M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"
|
|
5169
|
-
})), /* @__PURE__ */
|
|
5194
|
+
})), /* @__PURE__ */ O.createElement("path", {
|
|
5170
5195
|
className: "PhoneInputInternationalIconPhone",
|
|
5171
5196
|
stroke: "none",
|
|
5172
5197
|
fill: "currentColor",
|
|
@@ -5178,34 +5203,34 @@ Gr.propTypes = {
|
|
|
5178
5203
|
};
|
|
5179
5204
|
function Ur(e) {
|
|
5180
5205
|
var t = e.title, n = Yt(e, pl);
|
|
5181
|
-
return /* @__PURE__ */
|
|
5206
|
+
return /* @__PURE__ */ O.createElement("svg", Je({}, n, {
|
|
5182
5207
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5183
5208
|
viewBox: "0 0 50 50"
|
|
5184
|
-
}), /* @__PURE__ */
|
|
5209
|
+
}), /* @__PURE__ */ O.createElement("title", null, t), /* @__PURE__ */ O.createElement("g", {
|
|
5185
5210
|
className: "PhoneInputInternationalIconGlobe",
|
|
5186
5211
|
stroke: "currentColor",
|
|
5187
5212
|
fill: "none",
|
|
5188
5213
|
strokeWidth: "2",
|
|
5189
5214
|
strokeLinecap: "round"
|
|
5190
|
-
}, /* @__PURE__ */
|
|
5215
|
+
}, /* @__PURE__ */ O.createElement("path", {
|
|
5191
5216
|
d: "M8.45,13A21.44,21.44,0,1,1,37.08,41.56"
|
|
5192
|
-
}), /* @__PURE__ */
|
|
5217
|
+
}), /* @__PURE__ */ O.createElement("path", {
|
|
5193
5218
|
d: "M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"
|
|
5194
|
-
}), /* @__PURE__ */
|
|
5219
|
+
}), /* @__PURE__ */ O.createElement("path", {
|
|
5195
5220
|
d: "M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"
|
|
5196
|
-
}), /* @__PURE__ */
|
|
5221
|
+
}), /* @__PURE__ */ O.createElement("path", {
|
|
5197
5222
|
d: "M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"
|
|
5198
|
-
}), /* @__PURE__ */
|
|
5223
|
+
}), /* @__PURE__ */ O.createElement("line", {
|
|
5199
5224
|
x1: "27.8",
|
|
5200
5225
|
y1: "0.85",
|
|
5201
5226
|
x2: "27.8",
|
|
5202
5227
|
y2: "34.61"
|
|
5203
|
-
}), /* @__PURE__ */
|
|
5228
|
+
}), /* @__PURE__ */ O.createElement("line", {
|
|
5204
5229
|
x1: "15.2",
|
|
5205
5230
|
y1: "22.23",
|
|
5206
5231
|
x2: "49.15",
|
|
5207
5232
|
y2: "22.23"
|
|
5208
|
-
})), /* @__PURE__ */
|
|
5233
|
+
})), /* @__PURE__ */ O.createElement("path", {
|
|
5209
5234
|
className: "PhoneInputInternationalIconPhone",
|
|
5210
5235
|
stroke: "transparent",
|
|
5211
5236
|
fill: "currentColor",
|
|
@@ -5228,10 +5253,10 @@ function hl(e) {
|
|
|
5228
5253
|
function Br(e) {
|
|
5229
5254
|
hl(e) || console.error("[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got", e);
|
|
5230
5255
|
}
|
|
5231
|
-
function
|
|
5256
|
+
function gl(e, t) {
|
|
5232
5257
|
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
5233
5258
|
if (n) return (n = n.call(e)).next.bind(n);
|
|
5234
|
-
if (Array.isArray(e) || (n =
|
|
5259
|
+
if (Array.isArray(e) || (n = ml(e)) || t) {
|
|
5235
5260
|
n && (e = n);
|
|
5236
5261
|
var r = 0;
|
|
5237
5262
|
return function() {
|
|
@@ -5241,7 +5266,7 @@ function ml(e, t) {
|
|
|
5241
5266
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
5242
5267
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
5243
5268
|
}
|
|
5244
|
-
function
|
|
5269
|
+
function ml(e, t) {
|
|
5245
5270
|
if (e) {
|
|
5246
5271
|
if (typeof e == "string") return er(e, t);
|
|
5247
5272
|
var n = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -5268,12 +5293,12 @@ function vl(e, t) {
|
|
|
5268
5293
|
else {
|
|
5269
5294
|
var c;
|
|
5270
5295
|
l === "🌐" ? c = void 0 : c = l;
|
|
5271
|
-
var
|
|
5296
|
+
var p = e.indexOf(e.filter(function(f) {
|
|
5272
5297
|
return f.value === c;
|
|
5273
|
-
})[0]), s = e[
|
|
5274
|
-
e.splice(
|
|
5298
|
+
})[0]), s = e[p];
|
|
5299
|
+
e.splice(p, 1), i.push(s);
|
|
5275
5300
|
}
|
|
5276
|
-
}, o =
|
|
5301
|
+
}, o = gl(t), d; !(d = o()).done; )
|
|
5277
5302
|
a();
|
|
5278
5303
|
return n.concat(e).concat(r);
|
|
5279
5304
|
}
|
|
@@ -5292,7 +5317,7 @@ function bl(e, t) {
|
|
|
5292
5317
|
return e;
|
|
5293
5318
|
}
|
|
5294
5319
|
function it(e, t) {
|
|
5295
|
-
return
|
|
5320
|
+
return gr(e, t) ? !0 : (console.error("Country not found: ".concat(e)), !1);
|
|
5296
5321
|
}
|
|
5297
5322
|
function Wr(e, t) {
|
|
5298
5323
|
return e && (e = e.filter(function(n) {
|
|
@@ -5330,21 +5355,21 @@ function El(e, t) {
|
|
|
5330
5355
|
function Hr(e) {
|
|
5331
5356
|
var t = e.flags, n = e.flagUrl, r = e.flagComponent, i = e.internationalIcon;
|
|
5332
5357
|
function a(o) {
|
|
5333
|
-
var d = o.country, u = o.label, l = o.aspectRatio, c = Pl(o, Cl),
|
|
5334
|
-
return /* @__PURE__ */
|
|
5358
|
+
var d = o.country, u = o.label, l = o.aspectRatio, c = Pl(o, Cl), p = i === rt ? l : void 0;
|
|
5359
|
+
return /* @__PURE__ */ O.createElement("div", xt({}, c, {
|
|
5335
5360
|
className: Ke("PhoneInputCountryIcon", {
|
|
5336
|
-
"PhoneInputCountryIcon--square":
|
|
5361
|
+
"PhoneInputCountryIcon--square": p === 1,
|
|
5337
5362
|
"PhoneInputCountryIcon--border": d
|
|
5338
5363
|
})
|
|
5339
|
-
}), d ? /* @__PURE__ */
|
|
5364
|
+
}), d ? /* @__PURE__ */ O.createElement(r, {
|
|
5340
5365
|
country: d,
|
|
5341
5366
|
countryName: u,
|
|
5342
5367
|
flags: t,
|
|
5343
5368
|
flagUrl: n,
|
|
5344
5369
|
className: "PhoneInputCountryIconImg"
|
|
5345
|
-
}) : /* @__PURE__ */
|
|
5370
|
+
}) : /* @__PURE__ */ O.createElement(i, {
|
|
5346
5371
|
title: u,
|
|
5347
|
-
aspectRatio:
|
|
5372
|
+
aspectRatio: p,
|
|
5348
5373
|
className: "PhoneInputCountryIconImg"
|
|
5349
5374
|
}));
|
|
5350
5375
|
}
|
|
@@ -5386,13 +5411,13 @@ function tr(e, t) {
|
|
|
5386
5411
|
for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
|
|
5387
5412
|
return r;
|
|
5388
5413
|
}
|
|
5389
|
-
function
|
|
5414
|
+
function Ol(e, t) {
|
|
5390
5415
|
for (var n = Nl(e), r; !(r = n()).done; ) {
|
|
5391
5416
|
var i = r.value;
|
|
5392
|
-
i &&
|
|
5417
|
+
i && Tl(i, t);
|
|
5393
5418
|
}
|
|
5394
5419
|
}
|
|
5395
|
-
function
|
|
5420
|
+
function Tl(e, t) {
|
|
5396
5421
|
typeof e == "function" ? e(t) : e.current = t;
|
|
5397
5422
|
}
|
|
5398
5423
|
var Vr = g.shape({
|
|
@@ -5405,7 +5430,7 @@ function ie(e, t) {
|
|
|
5405
5430
|
}
|
|
5406
5431
|
function Il(e) {
|
|
5407
5432
|
var t = e.value, n = e.phoneNumber, r = e.defaultCountry, i = e.getAnyCountry, a = e.countries, o = e.required, d = e.metadata, u;
|
|
5408
|
-
return n && n.country ? u = n.country : r && (!t ||
|
|
5433
|
+
return n && n.country ? u = n.country : r && (!t || me(t, r, d)) && (u = r), a && a.indexOf(u) < 0 && (u = void 0), !u && o && a && a.length > 0 && (u = i()), u;
|
|
5409
5434
|
}
|
|
5410
5435
|
function Al(e) {
|
|
5411
5436
|
var t = e.countries, n = e.countryNames, r = e.addInternationalOption, i = e.compareStringsLocales, a = e.compareStrings;
|
|
@@ -5453,10 +5478,10 @@ function wl(e, t) {
|
|
|
5453
5478
|
}
|
|
5454
5479
|
}
|
|
5455
5480
|
} else if (e[0] !== "+")
|
|
5456
|
-
return
|
|
5481
|
+
return ge(e, n, i) || "";
|
|
5457
5482
|
return e;
|
|
5458
5483
|
}
|
|
5459
|
-
function
|
|
5484
|
+
function ge(e, t, n) {
|
|
5460
5485
|
if (e) {
|
|
5461
5486
|
if (e[0] === "+") {
|
|
5462
5487
|
if (e === "+")
|
|
@@ -5490,10 +5515,10 @@ function qr(e, t) {
|
|
|
5490
5515
|
if (u)
|
|
5491
5516
|
return !r || r.indexOf(u) >= 0 ? u : void 0;
|
|
5492
5517
|
if (n) {
|
|
5493
|
-
if (
|
|
5494
|
-
if (a &&
|
|
5518
|
+
if (me(e, n, d)) {
|
|
5519
|
+
if (a && me(e, a, d))
|
|
5495
5520
|
return a;
|
|
5496
|
-
if (i &&
|
|
5521
|
+
if (i && me(e, i, d))
|
|
5497
5522
|
return i;
|
|
5498
5523
|
if (!o)
|
|
5499
5524
|
return;
|
|
@@ -5503,12 +5528,12 @@ function qr(e, t) {
|
|
|
5503
5528
|
return n;
|
|
5504
5529
|
}
|
|
5505
5530
|
function Fl(e, t) {
|
|
5506
|
-
var n = t.prevPhoneDigits, r = t.country, i = t.defaultCountry, a = t.latestCountrySelectedByUser, o = t.countryRequired, d = t.getAnyCountry, u = t.countries, l = t.international, c = t.limitMaxLength,
|
|
5507
|
-
if (l &&
|
|
5531
|
+
var n = t.prevPhoneDigits, r = t.country, i = t.defaultCountry, a = t.latestCountrySelectedByUser, o = t.countryRequired, d = t.getAnyCountry, u = t.countries, l = t.international, c = t.limitMaxLength, p = t.countryCallingCodeEditable, s = t.metadata;
|
|
5532
|
+
if (l && p === !1 && r) {
|
|
5508
5533
|
var f = ie(r, s);
|
|
5509
5534
|
if (e.indexOf(f) !== 0) {
|
|
5510
|
-
var y,
|
|
5511
|
-
return
|
|
5535
|
+
var y, m = e && e[0] !== "+";
|
|
5536
|
+
return m ? (e = f + e, y = ge(e, r, s)) : e = f, {
|
|
5512
5537
|
phoneDigits: e,
|
|
5513
5538
|
value: y,
|
|
5514
5539
|
country: r
|
|
@@ -5516,8 +5541,8 @@ function Fl(e, t) {
|
|
|
5516
5541
|
}
|
|
5517
5542
|
}
|
|
5518
5543
|
l === !1 && r && e && e[0] === "+" && (e = nr(e, r, s)), e && r && c && (e = Rl(e, r, s)), e && e[0] !== "+" && (!r || l) && (e = "+" + e), !e && n && n[0] === "+" && (l ? r = void 0 : r = i), e === "+" && n && n[0] === "+" && n.length > 1 && (r = void 0);
|
|
5519
|
-
var
|
|
5520
|
-
return e && (e[0] === "+" && (e === "+" || r && ie(r, s).indexOf(e) === 0) ?
|
|
5544
|
+
var $;
|
|
5545
|
+
return e && (e[0] === "+" && (e === "+" || r && ie(r, s).indexOf(e) === 0) ? $ = void 0 : $ = ge(e, r, s)), $ && (r = qr($, {
|
|
5521
5546
|
country: r,
|
|
5522
5547
|
countries: u,
|
|
5523
5548
|
defaultCountry: i,
|
|
@@ -5526,13 +5551,13 @@ function Fl(e, t) {
|
|
|
5526
5551
|
// Instead, it's explicitly checked a bit later in the code.
|
|
5527
5552
|
required: !1,
|
|
5528
5553
|
metadata: s
|
|
5529
|
-
}), l === !1 && r && e && e[0] === "+" && (e = nr(e, r, s),
|
|
5554
|
+
}), l === !1 && r && e && e[0] === "+" && (e = nr(e, r, s), $ = ge(e, r, s))), !r && o && (r = i || d()), {
|
|
5530
5555
|
// `phoneDigits` returned here are a "normalized" version of the original `phoneDigits`.
|
|
5531
5556
|
// The returned `phoneDigits` shouldn't be used anywhere except for passing it as
|
|
5532
5557
|
// `prevPhoneDigits` parameter to this same function on next input change event.
|
|
5533
5558
|
phoneDigits: e,
|
|
5534
5559
|
country: r,
|
|
5535
|
-
value:
|
|
5560
|
+
value: $
|
|
5536
5561
|
};
|
|
5537
5562
|
}
|
|
5538
5563
|
function nr(e, t, n) {
|
|
@@ -5573,7 +5598,7 @@ function Zr(e, t, n) {
|
|
|
5573
5598
|
var i = r.getNumber();
|
|
5574
5599
|
return i && i.nationalNumber;
|
|
5575
5600
|
}
|
|
5576
|
-
function
|
|
5601
|
+
function me(e, t, n) {
|
|
5577
5602
|
for (var r = ie(t, n), i = 0; i < e.length && i < r.length; ) {
|
|
5578
5603
|
if (e[i] !== r[i])
|
|
5579
5604
|
return !1;
|
|
@@ -5632,9 +5657,9 @@ function Gl(e, t) {
|
|
|
5632
5657
|
return (t === "string" ? String : Number)(e);
|
|
5633
5658
|
}
|
|
5634
5659
|
function Ul(e, t, n) {
|
|
5635
|
-
var r = e.metadata, i = e.countries, a = e.defaultCountry, o = e.value, d = e.reset, u = e.international, l = e.displayInitialValueAsLocalNumber, c = e.initialValueFormat,
|
|
5660
|
+
var r = e.metadata, i = e.countries, a = e.defaultCountry, o = e.value, d = e.reset, u = e.international, l = e.displayInitialValueAsLocalNumber, c = e.initialValueFormat, p = t.defaultCountry, s = t.value, f = t.reset;
|
|
5636
5661
|
n.country;
|
|
5637
|
-
var y = n.value,
|
|
5662
|
+
var y = n.value, m = n.hasUserSelectedACountry, $ = n.latestCountrySelectedByUser, C = function(W) {
|
|
5638
5663
|
return Xr(Ue(Ue({}, W), {}, {
|
|
5639
5664
|
international: u,
|
|
5640
5665
|
useNationalFormat: l || c === "national",
|
|
@@ -5643,7 +5668,7 @@ function Ul(e, t, n) {
|
|
|
5643
5668
|
};
|
|
5644
5669
|
if (d !== f)
|
|
5645
5670
|
return {
|
|
5646
|
-
phoneDigits:
|
|
5671
|
+
phoneDigits: C({
|
|
5647
5672
|
value: void 0,
|
|
5648
5673
|
defaultCountry: a
|
|
5649
5674
|
}),
|
|
@@ -5652,19 +5677,19 @@ function Ul(e, t, n) {
|
|
|
5652
5677
|
latestCountrySelectedByUser: void 0,
|
|
5653
5678
|
hasUserSelectedACountry: void 0
|
|
5654
5679
|
};
|
|
5655
|
-
if (a !==
|
|
5656
|
-
var
|
|
5680
|
+
if (a !== p) {
|
|
5681
|
+
var T = !a || it(a, r), N = (
|
|
5657
5682
|
// By default, "no value has been entered" means `value` is `undefined`.
|
|
5658
5683
|
!y || // When `international` is `true`, and some country has been pre-selected,
|
|
5659
5684
|
// then the `<input/>` contains a pre-filled value of `+${countryCallingCode}${leadingDigits}`,
|
|
5660
5685
|
// so in case of `international` being `true`, "the user hasn't entered anything" situation
|
|
5661
5686
|
// doesn't just mean `value` is `undefined`, but could also mean `value` is `+${countryCallingCode}`.
|
|
5662
|
-
u && y ===
|
|
5687
|
+
u && y === C({
|
|
5663
5688
|
value: void 0,
|
|
5664
|
-
defaultCountry:
|
|
5689
|
+
defaultCountry: p
|
|
5665
5690
|
})
|
|
5666
|
-
),
|
|
5667
|
-
if (!
|
|
5691
|
+
), S = !o && N;
|
|
5692
|
+
if (!m && T && S)
|
|
5668
5693
|
return {
|
|
5669
5694
|
country: a,
|
|
5670
5695
|
// If `phoneDigits` is empty, then automatically select the new `country`
|
|
@@ -5672,7 +5697,7 @@ function Ul(e, t, n) {
|
|
|
5672
5697
|
// The code assumes that "no phone number has been entered by the user",
|
|
5673
5698
|
// and no `value` property has been passed, so the `phoneNumber` parameter
|
|
5674
5699
|
// of `_getInitialPhoneDigits({ value, phoneNumber, ... })` is `undefined`.
|
|
5675
|
-
phoneDigits:
|
|
5700
|
+
phoneDigits: C({
|
|
5676
5701
|
value: void 0,
|
|
5677
5702
|
defaultCountry: a
|
|
5678
5703
|
}),
|
|
@@ -5681,21 +5706,21 @@ function Ul(e, t, n) {
|
|
|
5681
5706
|
};
|
|
5682
5707
|
}
|
|
5683
5708
|
if (!ir(o, s) && !ir(o, y)) {
|
|
5684
|
-
var
|
|
5709
|
+
var h, v;
|
|
5685
5710
|
if (o) {
|
|
5686
|
-
o && Br(o),
|
|
5687
|
-
var
|
|
5688
|
-
|
|
5711
|
+
o && Br(o), h = Yr(o, r);
|
|
5712
|
+
var I = Wr(i, r);
|
|
5713
|
+
h && h.country ? (!I || I.indexOf(h.country) >= 0) && (v = h.country) : (v = qr(o, {
|
|
5689
5714
|
country: void 0,
|
|
5690
|
-
countries:
|
|
5715
|
+
countries: I,
|
|
5691
5716
|
metadata: r
|
|
5692
5717
|
}), v || a && o.indexOf(ie(a, r)) === 0 && (v = a));
|
|
5693
5718
|
}
|
|
5694
5719
|
var F;
|
|
5695
5720
|
if (o) {
|
|
5696
|
-
if (
|
|
5697
|
-
var G = v ?
|
|
5698
|
-
G ? v || (v =
|
|
5721
|
+
if ($) {
|
|
5722
|
+
var G = v ? $ === v : me(o, $, r);
|
|
5723
|
+
G ? v || (v = $) : F = {
|
|
5699
5724
|
latestCountrySelectedByUser: void 0
|
|
5700
5725
|
};
|
|
5701
5726
|
}
|
|
@@ -5705,8 +5730,8 @@ function Ul(e, t, n) {
|
|
|
5705
5730
|
hasUserSelectedACountry: void 0
|
|
5706
5731
|
};
|
|
5707
5732
|
return Ue(Ue({}, F), {}, {
|
|
5708
|
-
phoneDigits:
|
|
5709
|
-
phoneNumber:
|
|
5733
|
+
phoneDigits: C({
|
|
5734
|
+
phoneNumber: h,
|
|
5710
5735
|
value: o,
|
|
5711
5736
|
defaultCountry: a
|
|
5712
5737
|
}),
|
|
@@ -5848,35 +5873,35 @@ function Jl(e, t) {
|
|
|
5848
5873
|
var zl = /* @__PURE__ */ (function(e) {
|
|
5849
5874
|
function t(n) {
|
|
5850
5875
|
var r;
|
|
5851
|
-
Vl(this, t), r = Yl(this, t, [n]), z(r, "setInputRef", function(
|
|
5852
|
-
|
|
5853
|
-
}), z(r, "isCountrySupportedWithError", function(
|
|
5854
|
-
var
|
|
5855
|
-
return it(
|
|
5856
|
-
}), z(r, "onCountryChange", function(
|
|
5857
|
-
var
|
|
5876
|
+
Vl(this, t), r = Yl(this, t, [n]), z(r, "setInputRef", function($) {
|
|
5877
|
+
Ol([r.props.inputRef, r.inputRef], $);
|
|
5878
|
+
}), z(r, "isCountrySupportedWithError", function($) {
|
|
5879
|
+
var C = r.props.metadata;
|
|
5880
|
+
return it($, C);
|
|
5881
|
+
}), z(r, "onCountryChange", function($) {
|
|
5882
|
+
var C = r.props, T = C.international, N = C.metadata, S = C.onChange, h = C.focusInputOnCountrySelection, v = r.state, I = v.phoneDigits, F = v.country, G = wl(I, {
|
|
5858
5883
|
prevCountry: F,
|
|
5859
|
-
newCountry:
|
|
5884
|
+
newCountry: $,
|
|
5860
5885
|
metadata: N,
|
|
5861
5886
|
// Convert the phone number to "national" format
|
|
5862
5887
|
// when the user changes the selected country by hand.
|
|
5863
|
-
useNationalFormat: !
|
|
5864
|
-
}), B =
|
|
5865
|
-
|
|
5866
|
-
country:
|
|
5867
|
-
latestCountrySelectedByUser:
|
|
5888
|
+
useNationalFormat: !T
|
|
5889
|
+
}), B = ge(G, $, N);
|
|
5890
|
+
h && r.inputRef.current.focus(), r.setState({
|
|
5891
|
+
country: $,
|
|
5892
|
+
latestCountrySelectedByUser: $,
|
|
5868
5893
|
hasUserSelectedACountry: !0,
|
|
5869
5894
|
phoneDigits: G,
|
|
5870
5895
|
value: B
|
|
5871
5896
|
}, function() {
|
|
5872
|
-
|
|
5897
|
+
S(B);
|
|
5873
5898
|
});
|
|
5874
|
-
}), z(r, "onChange", function(
|
|
5875
|
-
var
|
|
5899
|
+
}), z(r, "onChange", function($) {
|
|
5900
|
+
var C = r.props, T = C.defaultCountry, N = C.onChange, S = C.addInternationalOption, h = C.international, v = C.limitMaxLength, I = C.countryCallingCodeEditable, F = C.metadata, G = r.state, B = G.countries, W = G.phoneDigits, K = G.country, q = G.latestCountrySelectedByUser, te = Fl($, {
|
|
5876
5901
|
prevPhoneDigits: W,
|
|
5877
5902
|
country: K,
|
|
5878
|
-
countryRequired: !
|
|
5879
|
-
defaultCountry:
|
|
5903
|
+
countryRequired: !S,
|
|
5904
|
+
defaultCountry: T,
|
|
5880
5905
|
latestCountrySelectedByUser: q,
|
|
5881
5906
|
getAnyCountry: function() {
|
|
5882
5907
|
return r.getFirstSupportedCountry({
|
|
@@ -5884,16 +5909,16 @@ var zl = /* @__PURE__ */ (function(e) {
|
|
|
5884
5909
|
});
|
|
5885
5910
|
},
|
|
5886
5911
|
countries: B,
|
|
5887
|
-
international:
|
|
5912
|
+
international: h,
|
|
5888
5913
|
limitMaxLength: v,
|
|
5889
|
-
countryCallingCodeEditable:
|
|
5914
|
+
countryCallingCodeEditable: I,
|
|
5890
5915
|
metadata: F
|
|
5891
5916
|
}), $e = te.phoneDigits, J = te.country, X = te.value, oe = {
|
|
5892
5917
|
phoneDigits: $e,
|
|
5893
5918
|
value: X,
|
|
5894
5919
|
country: J
|
|
5895
5920
|
};
|
|
5896
|
-
q && X && !
|
|
5921
|
+
q && X && !me(X, q, F) && (oe.latestCountrySelectedByUser = void 0), I === !1 && !X && $e === r.state.phoneDigits && (oe.forceRerender = {}), r.setState(
|
|
5897
5922
|
oe,
|
|
5898
5923
|
// Update the new `value` property.
|
|
5899
5924
|
// Doing it after the `state` has been updated
|
|
@@ -5911,35 +5936,35 @@ var zl = /* @__PURE__ */ (function(e) {
|
|
|
5911
5936
|
return r.setState({
|
|
5912
5937
|
isFocused: !1
|
|
5913
5938
|
});
|
|
5914
|
-
}), z(r, "onFocus", function(
|
|
5939
|
+
}), z(r, "onFocus", function($) {
|
|
5915
5940
|
r._onFocus();
|
|
5916
|
-
var
|
|
5917
|
-
|
|
5918
|
-
}), z(r, "onBlur", function(
|
|
5919
|
-
var
|
|
5920
|
-
r._onBlur(),
|
|
5921
|
-
}), z(r, "onCountryFocus", function(
|
|
5941
|
+
var C = r.props.onFocus;
|
|
5942
|
+
C && C($);
|
|
5943
|
+
}), z(r, "onBlur", function($) {
|
|
5944
|
+
var C = r.props.onBlur;
|
|
5945
|
+
r._onBlur(), C && C($);
|
|
5946
|
+
}), z(r, "onCountryFocus", function($) {
|
|
5922
5947
|
r._onFocus();
|
|
5923
|
-
var
|
|
5924
|
-
if (
|
|
5925
|
-
var
|
|
5926
|
-
|
|
5948
|
+
var C = r.props.countrySelectProps;
|
|
5949
|
+
if (C) {
|
|
5950
|
+
var T = C.onFocus;
|
|
5951
|
+
T && T($);
|
|
5927
5952
|
}
|
|
5928
|
-
}), z(r, "onCountryBlur", function(
|
|
5953
|
+
}), z(r, "onCountryBlur", function($) {
|
|
5929
5954
|
r._onBlur();
|
|
5930
|
-
var
|
|
5931
|
-
if (
|
|
5932
|
-
var
|
|
5933
|
-
|
|
5955
|
+
var C = r.props.countrySelectProps;
|
|
5956
|
+
if (C) {
|
|
5957
|
+
var T = C.onBlur;
|
|
5958
|
+
T && T($);
|
|
5934
5959
|
}
|
|
5935
|
-
}), r.inputRef = /* @__PURE__ */
|
|
5960
|
+
}), r.inputRef = /* @__PURE__ */ O.createRef();
|
|
5936
5961
|
var i = r.props, a = i.value;
|
|
5937
5962
|
i.labels;
|
|
5938
|
-
var o = i.international, d = i.addInternationalOption, u = i.displayInitialValueAsLocalNumber, l = i.initialValueFormat, c = i.metadata,
|
|
5963
|
+
var o = i.international, d = i.addInternationalOption, u = i.displayInitialValueAsLocalNumber, l = i.initialValueFormat, c = i.metadata, p = r.props, s = p.defaultCountry, f = p.countries;
|
|
5939
5964
|
s && (r.isCountrySupportedWithError(s) || (s = void 0)), a && Br(a), f = Wr(f, c);
|
|
5940
5965
|
var y = Yr(a, c);
|
|
5941
5966
|
r.CountryIcon = Hr(r.props);
|
|
5942
|
-
var
|
|
5967
|
+
var m = Il({
|
|
5943
5968
|
value: a,
|
|
5944
5969
|
phoneNumber: y,
|
|
5945
5970
|
defaultCountry: s,
|
|
@@ -5956,7 +5981,7 @@ var zl = /* @__PURE__ */ (function(e) {
|
|
|
5956
5981
|
// Workaround for `this.props` inside `getDerivedStateFromProps()`.
|
|
5957
5982
|
props: r.props,
|
|
5958
5983
|
// The country selected.
|
|
5959
|
-
country:
|
|
5984
|
+
country: m,
|
|
5960
5985
|
// `countries` are stored in `this.state` because they're filtered.
|
|
5961
5986
|
// For example, a developer might theoretically pass some unsupported
|
|
5962
5987
|
// countries as part of the `countries` property, and because of that
|
|
@@ -6007,13 +6032,13 @@ var zl = /* @__PURE__ */ (function(e) {
|
|
|
6007
6032
|
}, {
|
|
6008
6033
|
key: "getCountrySelectOptions",
|
|
6009
6034
|
value: function(r) {
|
|
6010
|
-
var i = r.countries, a = this.props, o = a.international, d = a.countryCallingCodeEditable, u = a.countryOptionsOrder, l = a.addInternationalOption, c = a.labels,
|
|
6035
|
+
var i = r.countries, a = this.props, o = a.international, d = a.countryCallingCodeEditable, u = a.countryOptionsOrder, l = a.addInternationalOption, c = a.labels, p = a.locales, s = a.metadata;
|
|
6011
6036
|
return this.useMemoCountrySelectOptions(function() {
|
|
6012
6037
|
return vl(Al({
|
|
6013
6038
|
countries: i || Xn(s),
|
|
6014
6039
|
countryNames: c,
|
|
6015
6040
|
addInternationalOption: o && d === !1 ? !1 : l,
|
|
6016
|
-
compareStringsLocales:
|
|
6041
|
+
compareStringsLocales: p
|
|
6017
6042
|
// compareStrings
|
|
6018
6043
|
}), bl(u, s));
|
|
6019
6044
|
}, [i, u, l, c, s]);
|
|
@@ -6036,25 +6061,25 @@ var zl = /* @__PURE__ */ (function(e) {
|
|
|
6036
6061
|
value: function() {
|
|
6037
6062
|
var r = this.props, i = r.name, a = r.disabled, o = r.readOnly, d = r.autoComplete, u = r.style, l = r.className;
|
|
6038
6063
|
r.inputRef;
|
|
6039
|
-
var c = r.inputComponent,
|
|
6064
|
+
var c = r.inputComponent, p = r.numberInputProps, s = r.smartCaret, f = r.countrySelectComponent, y = r.countrySelectProps, m = r.containerComponent, $ = r.containerComponentProps;
|
|
6040
6065
|
r.defaultCountry, r.countries, r.countryOptionsOrder;
|
|
6041
|
-
var
|
|
6066
|
+
var C = r.labels;
|
|
6042
6067
|
r.flags, r.flagComponent, r.flagUrl, r.addInternationalOption, r.internationalIcon, r.displayInitialValueAsLocalNumber, r.initialValueFormat, r.onCountryChange, r.limitMaxLength, r.countryCallingCodeEditable, r.focusInputOnCountrySelection, r.reset;
|
|
6043
|
-
var
|
|
6068
|
+
var T = r.metadata, N = r.international;
|
|
6044
6069
|
r.locales;
|
|
6045
|
-
var
|
|
6046
|
-
countries:
|
|
6070
|
+
var S = Wl(r, Bl), h = this.state, v = h.country, I = h.countries, F = h.phoneDigits, G = h.isFocused, B = s ? qu : Qu, W = this.getCountrySelectOptions({
|
|
6071
|
+
countries: I
|
|
6047
6072
|
});
|
|
6048
|
-
return /* @__PURE__ */
|
|
6073
|
+
return /* @__PURE__ */ O.createElement(m, ve({
|
|
6049
6074
|
style: u,
|
|
6050
6075
|
className: Ke(l, "PhoneInput", {
|
|
6051
6076
|
"PhoneInput--focus": G,
|
|
6052
6077
|
"PhoneInput--disabled": a,
|
|
6053
6078
|
"PhoneInput--readOnly": o
|
|
6054
6079
|
})
|
|
6055
|
-
},
|
|
6080
|
+
}, $), /* @__PURE__ */ O.createElement(f, ve({
|
|
6056
6081
|
name: i ? "".concat(i, "Country") : void 0,
|
|
6057
|
-
"aria-label":
|
|
6082
|
+
"aria-label": C.country
|
|
6058
6083
|
}, y, {
|
|
6059
6084
|
value: v,
|
|
6060
6085
|
options: W,
|
|
@@ -6064,16 +6089,16 @@ var zl = /* @__PURE__ */ (function(e) {
|
|
|
6064
6089
|
disabled: a || y && y.disabled,
|
|
6065
6090
|
readOnly: o || y && y.readOnly,
|
|
6066
6091
|
iconComponent: this.CountryIcon
|
|
6067
|
-
})), /* @__PURE__ */
|
|
6092
|
+
})), /* @__PURE__ */ O.createElement(B, ve({
|
|
6068
6093
|
ref: this.setInputRef,
|
|
6069
6094
|
type: "tel",
|
|
6070
6095
|
autoComplete: d
|
|
6071
|
-
},
|
|
6096
|
+
}, p, S, {
|
|
6072
6097
|
inputFormat: N === !0 ? "INTERNATIONAL" : N === !1 ? "NATIONAL" : "INTERNATIONAL_OR_NATIONAL",
|
|
6073
6098
|
international: N ? !0 : void 0,
|
|
6074
6099
|
withCountryCallingCode: N ? !0 : void 0,
|
|
6075
6100
|
name: i,
|
|
6076
|
-
metadata:
|
|
6101
|
+
metadata: T,
|
|
6077
6102
|
country: v,
|
|
6078
6103
|
value: F || "",
|
|
6079
6104
|
onChange: this.onChange,
|
|
@@ -6082,7 +6107,7 @@ var zl = /* @__PURE__ */ (function(e) {
|
|
|
6082
6107
|
disabled: a,
|
|
6083
6108
|
readOnly: o,
|
|
6084
6109
|
inputComponent: c,
|
|
6085
|
-
className: Ke("PhoneInputInput",
|
|
6110
|
+
className: Ke("PhoneInputInput", p && p.className, S.className)
|
|
6086
6111
|
})));
|
|
6087
6112
|
}
|
|
6088
6113
|
}], [{
|
|
@@ -6101,8 +6126,8 @@ var zl = /* @__PURE__ */ (function(e) {
|
|
|
6101
6126
|
}
|
|
6102
6127
|
)
|
|
6103
6128
|
}]);
|
|
6104
|
-
})(
|
|
6105
|
-
return /* @__PURE__ */
|
|
6129
|
+
})(O.PureComponent), ei = /* @__PURE__ */ O.forwardRef(function(e, t) {
|
|
6130
|
+
return /* @__PURE__ */ O.createElement(zl, ve({}, Ql(e), {
|
|
6106
6131
|
inputRef: t
|
|
6107
6132
|
}));
|
|
6108
6133
|
});
|
|
@@ -6818,9 +6843,9 @@ function i1(e, t) {
|
|
|
6818
6843
|
return n;
|
|
6819
6844
|
}
|
|
6820
6845
|
function ti(e) {
|
|
6821
|
-
var t = /* @__PURE__ */
|
|
6846
|
+
var t = /* @__PURE__ */ O.forwardRef(function(n, r) {
|
|
6822
6847
|
var i = n.metadata, a = i === void 0 ? e : i, o = n.labels, d = o === void 0 ? t1 : o, u = r1(n, n1);
|
|
6823
|
-
return /* @__PURE__ */
|
|
6848
|
+
return /* @__PURE__ */ O.createElement(ei, Mt({}, u, {
|
|
6824
6849
|
ref: r,
|
|
6825
6850
|
metadata: a,
|
|
6826
6851
|
labels: d
|
|
@@ -6933,7 +6958,7 @@ function c1(e, t) {
|
|
|
6933
6958
|
const n = e?.code, r = ri(e).toLowerCase();
|
|
6934
6959
|
return n === "IDENTIFIER_CONFLICT" && t.email || t.email && r.includes("email") && r.includes("exists") ? "email" : n === "IDENTIFIER_CONFLICT" && t.phone || t.phone && (r.includes("mobile") || r.includes("phone")) && r.includes("exists") ? "phone" : null;
|
|
6935
6960
|
}
|
|
6936
|
-
function
|
|
6961
|
+
function gt(e) {
|
|
6937
6962
|
const t = ni(e);
|
|
6938
6963
|
return t ? {
|
|
6939
6964
|
countryCode: t.countryCallingCode,
|
|
@@ -6949,7 +6974,7 @@ function f1({
|
|
|
6949
6974
|
}) {
|
|
6950
6975
|
const n = se(e);
|
|
6951
6976
|
n.current = e;
|
|
6952
|
-
const r = e.tokenStorage ?? l1(), [i, a] =
|
|
6977
|
+
const r = e.tokenStorage ?? l1(), [i, a] = gi(Si, Ni()), o = ue((l) => {
|
|
6953
6978
|
r.set(l.accessToken, l.expiresAt), d1({
|
|
6954
6979
|
method: l.authMethod,
|
|
6955
6980
|
maskedIdentifier: l.authMethod === "phone" ? l.user.phone ?? "***" : l.user.email ?? "***",
|
|
@@ -6962,7 +6987,7 @@ function f1({
|
|
|
6962
6987
|
i.step === "CHECKING_SESSION" || i.step === "AUTHENTICATED" || Ai(i);
|
|
6963
6988
|
}, [i]), Ee(() => {
|
|
6964
6989
|
if (i.step !== "CHECKING_SESSION") return;
|
|
6965
|
-
const l = n.current.apiAdapter, c = r.get(),
|
|
6990
|
+
const l = n.current.apiAdapter, c = r.get(), p = () => {
|
|
6966
6991
|
const s = Ii();
|
|
6967
6992
|
if (s && s.step !== "CHECKING_SESSION" && s.step !== "AUTHENTICATED") {
|
|
6968
6993
|
a({
|
|
@@ -6987,7 +7012,7 @@ function f1({
|
|
|
6987
7012
|
f ? a({
|
|
6988
7013
|
type: "SET_SESSION",
|
|
6989
7014
|
session: f
|
|
6990
|
-
}) :
|
|
7015
|
+
}) : p();
|
|
6991
7016
|
}).catch(() => {
|
|
6992
7017
|
a({
|
|
6993
7018
|
type: "SET_STEP_METHOD_SELECT"
|
|
@@ -6995,14 +7020,14 @@ function f1({
|
|
|
6995
7020
|
});
|
|
6996
7021
|
return;
|
|
6997
7022
|
}
|
|
6998
|
-
|
|
7023
|
+
p();
|
|
6999
7024
|
return;
|
|
7000
7025
|
}
|
|
7001
7026
|
l.validateSession(c).then((s) => {
|
|
7002
7027
|
s ? a({
|
|
7003
7028
|
type: "SET_SESSION",
|
|
7004
7029
|
session: s
|
|
7005
|
-
}) : (r.remove(),
|
|
7030
|
+
}) : (r.remove(), p());
|
|
7006
7031
|
}).catch(() => {
|
|
7007
7032
|
r.remove(), a({
|
|
7008
7033
|
type: "SET_STEP_METHOD_SELECT"
|
|
@@ -7010,47 +7035,50 @@ function f1({
|
|
|
7010
7035
|
});
|
|
7011
7036
|
}, [i.step, r]);
|
|
7012
7037
|
const d = Ve(() => {
|
|
7013
|
-
const l = () => n.current.apiAdapter, c = (s) => n.current.onAuthError?.(s),
|
|
7038
|
+
const l = () => n.current.apiAdapter, c = (s) => n.current.onAuthError?.(s), p = (s, f) => {
|
|
7014
7039
|
const y = c1(s, f);
|
|
7015
7040
|
if (!y) return !1;
|
|
7016
7041
|
if (y === "email") {
|
|
7017
7042
|
const N = (f.email ?? "").trim();
|
|
7018
7043
|
if (!N) return !1;
|
|
7019
|
-
const
|
|
7044
|
+
const S = i.identifierType === "email" ? i.identifierValue : i.pendingEmail, h = i.identifierType === "phone" ? i.identifierValue : i.pendingPhone, v = h ? gt(h) : null;
|
|
7020
7045
|
return a({
|
|
7021
7046
|
type: "SET_STEP_LINK_OR_MERGE",
|
|
7022
7047
|
conflictField: "email",
|
|
7023
7048
|
name: f.fullName,
|
|
7024
|
-
...
|
|
7025
|
-
|
|
7049
|
+
...S && S !== N && {
|
|
7050
|
+
existingEmail: S,
|
|
7051
|
+
oldEmail: S
|
|
7026
7052
|
},
|
|
7027
7053
|
...v?.countryCode && {
|
|
7028
|
-
|
|
7054
|
+
existingCountryCode: v.countryCode
|
|
7029
7055
|
},
|
|
7030
7056
|
...v?.phone && {
|
|
7031
|
-
|
|
7057
|
+
existingPhone: v.phone
|
|
7032
7058
|
},
|
|
7033
7059
|
newEmail: N
|
|
7034
7060
|
}), !0;
|
|
7035
7061
|
}
|
|
7036
|
-
const
|
|
7037
|
-
if (!
|
|
7038
|
-
const
|
|
7062
|
+
const m = at(f.phone, f.countryCode);
|
|
7063
|
+
if (!m) return !1;
|
|
7064
|
+
const $ = gt(m), C = i.identifierType === "phone" && i.identifierValue ? gt(i.identifierValue) : null, T = i.identifierType === "email" ? i.identifierValue : i.pendingEmail;
|
|
7039
7065
|
return a({
|
|
7040
7066
|
type: "SET_STEP_LINK_OR_MERGE",
|
|
7041
7067
|
conflictField: "phone",
|
|
7042
7068
|
name: f.fullName,
|
|
7043
|
-
...
|
|
7044
|
-
|
|
7069
|
+
...T && {
|
|
7070
|
+
existingEmail: T
|
|
7045
7071
|
},
|
|
7046
|
-
...
|
|
7047
|
-
|
|
7072
|
+
...C?.countryCode && {
|
|
7073
|
+
existingCountryCode: C.countryCode,
|
|
7074
|
+
oldCountryCode: C.countryCode
|
|
7048
7075
|
},
|
|
7049
|
-
...
|
|
7050
|
-
|
|
7076
|
+
...C?.phone && {
|
|
7077
|
+
existingPhone: C.phone,
|
|
7078
|
+
oldPhone: C.phone
|
|
7051
7079
|
},
|
|
7052
|
-
newCountryCode:
|
|
7053
|
-
newPhone:
|
|
7080
|
+
newCountryCode: $.countryCode,
|
|
7081
|
+
newPhone: $.phone
|
|
7054
7082
|
}), !0;
|
|
7055
7083
|
};
|
|
7056
7084
|
return {
|
|
@@ -7066,15 +7094,15 @@ function f1({
|
|
|
7066
7094
|
submitIdentifier(s) {
|
|
7067
7095
|
const f = s.phone != null ? "phone" : "email", y = f === "phone" ? at(s.phone, s.countryCode) : (s.email ?? "").trim();
|
|
7068
7096
|
if (f === "phone" && y) {
|
|
7069
|
-
const
|
|
7070
|
-
if ((
|
|
7071
|
-
const
|
|
7097
|
+
const $ = ni(y)?.country;
|
|
7098
|
+
if (($ && $ !== "IN" ? "FOREIGN" : "INDIAN") === "FOREIGN") {
|
|
7099
|
+
const T = y.length > 4 ? `+** ***${y.replaceAll(/\D/g, "").slice(-4)}` : "+** ***", N = l().checkIdentifier;
|
|
7072
7100
|
if (N) {
|
|
7073
7101
|
N({
|
|
7074
7102
|
type: "phone",
|
|
7075
7103
|
value: y
|
|
7076
|
-
}).then((
|
|
7077
|
-
if (!
|
|
7104
|
+
}).then((S) => {
|
|
7105
|
+
if (!S.exists) {
|
|
7078
7106
|
a({
|
|
7079
7107
|
type: "SET_STEP_SIGNUP_DETAILS",
|
|
7080
7108
|
userType: "FOREIGN",
|
|
@@ -7082,16 +7110,16 @@ function f1({
|
|
|
7082
7110
|
pendingPhone: y,
|
|
7083
7111
|
identifierType: "phone",
|
|
7084
7112
|
identifierValue: y,
|
|
7085
|
-
maskedRecipient:
|
|
7113
|
+
maskedRecipient: T
|
|
7086
7114
|
});
|
|
7087
7115
|
return;
|
|
7088
7116
|
}
|
|
7089
7117
|
l().sendOtp({
|
|
7090
7118
|
type: "phone",
|
|
7091
7119
|
value: y
|
|
7092
|
-
}).then((
|
|
7093
|
-
if (!
|
|
7094
|
-
c(
|
|
7120
|
+
}).then((h) => {
|
|
7121
|
+
if (!h.success) {
|
|
7122
|
+
c(h.error ?? {
|
|
7095
7123
|
code: "UNKNOWN"
|
|
7096
7124
|
});
|
|
7097
7125
|
return;
|
|
@@ -7101,7 +7129,7 @@ function f1({
|
|
|
7101
7129
|
userType: "FOREIGN",
|
|
7102
7130
|
identifierType: "phone",
|
|
7103
7131
|
value: y,
|
|
7104
|
-
maskedValue:
|
|
7132
|
+
maskedValue: h.maskedValue ?? T
|
|
7105
7133
|
});
|
|
7106
7134
|
}).catch(() => c({
|
|
7107
7135
|
code: "NETWORK_ERROR"
|
|
@@ -7118,7 +7146,7 @@ function f1({
|
|
|
7118
7146
|
pendingPhone: y,
|
|
7119
7147
|
identifierType: "phone",
|
|
7120
7148
|
identifierValue: y,
|
|
7121
|
-
maskedRecipient:
|
|
7149
|
+
maskedRecipient: T
|
|
7122
7150
|
});
|
|
7123
7151
|
return;
|
|
7124
7152
|
}
|
|
@@ -7127,20 +7155,20 @@ function f1({
|
|
|
7127
7155
|
l().sendOtp({
|
|
7128
7156
|
type: "email",
|
|
7129
7157
|
value: y
|
|
7130
|
-
}).then((
|
|
7131
|
-
if (!
|
|
7132
|
-
c(
|
|
7158
|
+
}).then((m) => {
|
|
7159
|
+
if (!m.success) {
|
|
7160
|
+
c(m.error ?? {
|
|
7133
7161
|
code: "UNKNOWN"
|
|
7134
7162
|
});
|
|
7135
7163
|
return;
|
|
7136
7164
|
}
|
|
7137
|
-
const
|
|
7165
|
+
const $ = m.maskedValue ?? "*@*";
|
|
7138
7166
|
a({
|
|
7139
7167
|
type: "SET_STEP_OTP_VERIFICATION",
|
|
7140
7168
|
userType: "INDIAN",
|
|
7141
7169
|
identifierType: "email",
|
|
7142
7170
|
value: y,
|
|
7143
|
-
maskedValue:
|
|
7171
|
+
maskedValue: $
|
|
7144
7172
|
});
|
|
7145
7173
|
}).catch(() => c({
|
|
7146
7174
|
code: "NETWORK_ERROR"
|
|
@@ -7150,20 +7178,20 @@ function f1({
|
|
|
7150
7178
|
l().sendOtp({
|
|
7151
7179
|
type: f,
|
|
7152
7180
|
value: y
|
|
7153
|
-
}).then((
|
|
7154
|
-
if (!
|
|
7155
|
-
c(
|
|
7181
|
+
}).then((m) => {
|
|
7182
|
+
if (!m.success) {
|
|
7183
|
+
c(m.error ?? {
|
|
7156
7184
|
code: "UNKNOWN"
|
|
7157
7185
|
});
|
|
7158
7186
|
return;
|
|
7159
7187
|
}
|
|
7160
|
-
const
|
|
7188
|
+
const $ = m.maskedValue ?? (f === "phone" ? "+** ***" : "*@*");
|
|
7161
7189
|
a({
|
|
7162
7190
|
type: "SET_STEP_OTP_VERIFICATION",
|
|
7163
7191
|
userType: "INDIAN",
|
|
7164
7192
|
identifierType: f,
|
|
7165
7193
|
value: y,
|
|
7166
|
-
maskedValue:
|
|
7194
|
+
maskedValue: $
|
|
7167
7195
|
});
|
|
7168
7196
|
}).catch(() => c({
|
|
7169
7197
|
code: "NETWORK_ERROR"
|
|
@@ -7174,8 +7202,8 @@ function f1({
|
|
|
7174
7202
|
if (i.userType === "FOREIGN") {
|
|
7175
7203
|
const f = (s.email ?? "").trim(), y = at(s.phone, s.countryCode);
|
|
7176
7204
|
if (y) {
|
|
7177
|
-
const
|
|
7178
|
-
if (!
|
|
7205
|
+
const m = f || i.pendingEmail || (i.identifierType === "email" ? i.identifierValue : "") || "";
|
|
7206
|
+
if (!m) {
|
|
7179
7207
|
c({
|
|
7180
7208
|
code: "UNKNOWN",
|
|
7181
7209
|
message: "Email is required"
|
|
@@ -7185,22 +7213,22 @@ function f1({
|
|
|
7185
7213
|
l().sendOtp({
|
|
7186
7214
|
type: "phone",
|
|
7187
7215
|
value: y
|
|
7188
|
-
}).then((
|
|
7189
|
-
if (
|
|
7190
|
-
c(
|
|
7216
|
+
}).then(($) => {
|
|
7217
|
+
if (!$.success) {
|
|
7218
|
+
c($.error ?? {
|
|
7191
7219
|
code: "UNKNOWN"
|
|
7192
7220
|
});
|
|
7193
7221
|
return;
|
|
7194
7222
|
}
|
|
7195
|
-
const
|
|
7223
|
+
const C = $.maskedValue ?? "+** ***";
|
|
7196
7224
|
a({
|
|
7197
7225
|
type: "SET_STEP_OTP_VERIFICATION",
|
|
7198
7226
|
userType: "FOREIGN",
|
|
7199
7227
|
identifierType: "phone",
|
|
7200
7228
|
value: y,
|
|
7201
|
-
maskedValue:
|
|
7229
|
+
maskedValue: C,
|
|
7202
7230
|
pendingFullName: s.fullName,
|
|
7203
|
-
pendingEmail:
|
|
7231
|
+
pendingEmail: m,
|
|
7204
7232
|
pendingPhone: y
|
|
7205
7233
|
});
|
|
7206
7234
|
}).catch(() => c({
|
|
@@ -7218,20 +7246,20 @@ function f1({
|
|
|
7218
7246
|
l().sendOtp({
|
|
7219
7247
|
type: "email",
|
|
7220
7248
|
value: f
|
|
7221
|
-
}).then((
|
|
7222
|
-
if (!
|
|
7223
|
-
c(
|
|
7249
|
+
}).then((m) => {
|
|
7250
|
+
if (!m.success) {
|
|
7251
|
+
c(m.error ?? {
|
|
7224
7252
|
code: "UNKNOWN"
|
|
7225
7253
|
});
|
|
7226
7254
|
return;
|
|
7227
7255
|
}
|
|
7228
|
-
const
|
|
7256
|
+
const $ = m.maskedValue ?? "*@*";
|
|
7229
7257
|
a({
|
|
7230
7258
|
type: "SET_STEP_OTP_VERIFICATION",
|
|
7231
7259
|
userType: "FOREIGN",
|
|
7232
7260
|
identifierType: "email",
|
|
7233
7261
|
value: f,
|
|
7234
|
-
maskedValue:
|
|
7262
|
+
maskedValue: $,
|
|
7235
7263
|
pendingFullName: s.fullName,
|
|
7236
7264
|
pendingEmail: f,
|
|
7237
7265
|
pendingPhone: s.phone ?? i.pendingPhone
|
|
@@ -7247,7 +7275,7 @@ function f1({
|
|
|
7247
7275
|
session: f
|
|
7248
7276
|
});
|
|
7249
7277
|
}).catch((f) => {
|
|
7250
|
-
if (
|
|
7278
|
+
if (p(f, s)) return;
|
|
7251
7279
|
const y = f?.code != null ? f : {
|
|
7252
7280
|
code: "UNKNOWN",
|
|
7253
7281
|
message: f?.message
|
|
@@ -7260,10 +7288,10 @@ function f1({
|
|
|
7260
7288
|
const {
|
|
7261
7289
|
identifierType: f,
|
|
7262
7290
|
identifierValue: y,
|
|
7263
|
-
userType:
|
|
7264
|
-
pendingFullName:
|
|
7265
|
-
pendingEmail:
|
|
7266
|
-
pendingPhone:
|
|
7291
|
+
userType: m,
|
|
7292
|
+
pendingFullName: $,
|
|
7293
|
+
pendingEmail: C,
|
|
7294
|
+
pendingPhone: T
|
|
7267
7295
|
} = i;
|
|
7268
7296
|
try {
|
|
7269
7297
|
const N = await l().verifyOtp({
|
|
@@ -7279,39 +7307,39 @@ function f1({
|
|
|
7279
7307
|
return;
|
|
7280
7308
|
}
|
|
7281
7309
|
if (N.isNewUser) {
|
|
7282
|
-
if (
|
|
7310
|
+
if (m === "FOREIGN" && $ && C) {
|
|
7283
7311
|
try {
|
|
7284
|
-
const
|
|
7285
|
-
fullName:
|
|
7286
|
-
email:
|
|
7287
|
-
...
|
|
7288
|
-
phone:
|
|
7312
|
+
const S = await l().completeProfile({
|
|
7313
|
+
fullName: $,
|
|
7314
|
+
email: C,
|
|
7315
|
+
...T && {
|
|
7316
|
+
phone: T
|
|
7289
7317
|
}
|
|
7290
7318
|
});
|
|
7291
|
-
o(
|
|
7319
|
+
o(S), a({
|
|
7292
7320
|
type: "SET_STEP_AUTHENTICATED",
|
|
7293
|
-
session:
|
|
7321
|
+
session: S
|
|
7294
7322
|
});
|
|
7295
|
-
} catch (
|
|
7296
|
-
if (
|
|
7297
|
-
fullName:
|
|
7298
|
-
email:
|
|
7299
|
-
...
|
|
7300
|
-
phone:
|
|
7323
|
+
} catch (S) {
|
|
7324
|
+
if (p(S, {
|
|
7325
|
+
fullName: $,
|
|
7326
|
+
email: C,
|
|
7327
|
+
...T && {
|
|
7328
|
+
phone: T
|
|
7301
7329
|
}
|
|
7302
7330
|
}))
|
|
7303
7331
|
return;
|
|
7304
|
-
const
|
|
7332
|
+
const h = S?.message, v = S?.code != null ? S : {
|
|
7305
7333
|
code: "UNKNOWN",
|
|
7306
|
-
...
|
|
7307
|
-
message:
|
|
7334
|
+
...h && {
|
|
7335
|
+
message: h
|
|
7308
7336
|
}
|
|
7309
7337
|
};
|
|
7310
7338
|
throw c(v), v;
|
|
7311
7339
|
}
|
|
7312
7340
|
return;
|
|
7313
7341
|
}
|
|
7314
|
-
if (
|
|
7342
|
+
if (m === "FOREIGN") {
|
|
7315
7343
|
a({
|
|
7316
7344
|
type: "SET_STEP_SIGNUP_DETAILS",
|
|
7317
7345
|
userType: "FOREIGN",
|
|
@@ -7329,11 +7357,11 @@ function f1({
|
|
|
7329
7357
|
});
|
|
7330
7358
|
}
|
|
7331
7359
|
} catch (N) {
|
|
7332
|
-
const
|
|
7360
|
+
const S = N?.code != null ? N : {
|
|
7333
7361
|
code: "OTP_INVALID",
|
|
7334
7362
|
message: N?.message ?? "Invalid OTP"
|
|
7335
7363
|
};
|
|
7336
|
-
throw c(
|
|
7364
|
+
throw c(S), S;
|
|
7337
7365
|
}
|
|
7338
7366
|
},
|
|
7339
7367
|
resendOtp() {
|
|
@@ -7374,63 +7402,60 @@ function f1({
|
|
|
7374
7402
|
code: "PROVIDER_AUTH_FAILED"
|
|
7375
7403
|
}));
|
|
7376
7404
|
},
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7405
|
+
continueLinkOrMerge() {
|
|
7406
|
+
a({
|
|
7407
|
+
type: "SET_LINK_OR_MERGE_VERIFICATION_STAGE"
|
|
7408
|
+
});
|
|
7409
|
+
},
|
|
7410
|
+
async verifyLinkOrMerge(s) {
|
|
7411
|
+
const f = i.linkOrMerge, y = l().linkOrMergeAccount;
|
|
7412
|
+
if (!f || !y) {
|
|
7413
|
+
const $ = {
|
|
7381
7414
|
code: "UNKNOWN",
|
|
7382
7415
|
message: "Link or merge is not configured"
|
|
7383
7416
|
};
|
|
7384
|
-
throw c(
|
|
7417
|
+
throw c($), $;
|
|
7385
7418
|
}
|
|
7386
|
-
|
|
7419
|
+
if (f.conflictField !== s.conflictField) {
|
|
7420
|
+
const $ = {
|
|
7421
|
+
code: "UNKNOWN",
|
|
7422
|
+
message: "Link or merge details changed"
|
|
7423
|
+
};
|
|
7424
|
+
throw c($), $;
|
|
7425
|
+
}
|
|
7426
|
+
const m = s.conflictField === "email" ? {
|
|
7387
7427
|
isLinking: !0,
|
|
7388
|
-
name:
|
|
7428
|
+
name: f.name,
|
|
7389
7429
|
conflictField: "email",
|
|
7390
|
-
|
|
7391
|
-
oldEmail: s.oldEmail
|
|
7392
|
-
},
|
|
7393
|
-
...s.oldCountryCode && {
|
|
7394
|
-
oldCountryCode: s.oldCountryCode
|
|
7395
|
-
},
|
|
7396
|
-
...s.oldPhone && {
|
|
7397
|
-
oldPhone: s.oldPhone
|
|
7398
|
-
},
|
|
7430
|
+
oldEmail: s.oldEmail,
|
|
7399
7431
|
newEmail: s.newEmail
|
|
7400
7432
|
} : {
|
|
7401
7433
|
isLinking: !0,
|
|
7402
|
-
name:
|
|
7434
|
+
name: f.name,
|
|
7403
7435
|
conflictField: "phone",
|
|
7404
|
-
|
|
7405
|
-
|
|
7406
|
-
},
|
|
7407
|
-
...s.oldCountryCode && {
|
|
7408
|
-
oldCountryCode: s.oldCountryCode
|
|
7409
|
-
},
|
|
7410
|
-
...s.oldPhone && {
|
|
7411
|
-
oldPhone: s.oldPhone
|
|
7412
|
-
},
|
|
7436
|
+
oldCountryCode: s.oldCountryCode,
|
|
7437
|
+
oldPhone: s.oldPhone,
|
|
7413
7438
|
newCountryCode: s.newCountryCode,
|
|
7414
7439
|
newPhone: s.newPhone
|
|
7415
7440
|
};
|
|
7416
7441
|
try {
|
|
7417
|
-
const
|
|
7418
|
-
if (
|
|
7419
|
-
o(
|
|
7442
|
+
const $ = await y(m);
|
|
7443
|
+
if ($) {
|
|
7444
|
+
o($), a({
|
|
7420
7445
|
type: "SET_STEP_AUTHENTICATED",
|
|
7421
|
-
session:
|
|
7446
|
+
session: $
|
|
7422
7447
|
});
|
|
7423
7448
|
return;
|
|
7424
7449
|
}
|
|
7425
7450
|
a({
|
|
7426
7451
|
type: "SET_STEP_METHOD_SELECT"
|
|
7427
7452
|
});
|
|
7428
|
-
} catch (
|
|
7429
|
-
const
|
|
7453
|
+
} catch ($) {
|
|
7454
|
+
const C = $?.code != null ? $ : {
|
|
7430
7455
|
code: "UNKNOWN",
|
|
7431
|
-
message: ri(
|
|
7456
|
+
message: ri($) || "Link or merge failed"
|
|
7432
7457
|
};
|
|
7433
|
-
throw c(
|
|
7458
|
+
throw c(C), C;
|
|
7434
7459
|
}
|
|
7435
7460
|
},
|
|
7436
7461
|
goBack() {
|
|
@@ -7486,14 +7511,14 @@ function y1(e) {
|
|
|
7486
7511
|
let n;
|
|
7487
7512
|
return t[0] !== e ? (n = /* @__PURE__ */ H(sr.Preset, { preset: "verification", children: /* @__PURE__ */ H(pi, { ...e }) }), t[0] = e, t[1] = n) : n = t[1], n;
|
|
7488
7513
|
}
|
|
7489
|
-
const
|
|
7514
|
+
const O1 = {
|
|
7490
7515
|
Provider: f1,
|
|
7491
7516
|
Login: $1,
|
|
7492
7517
|
Signup: p1,
|
|
7493
7518
|
Otp: y1
|
|
7494
7519
|
};
|
|
7495
7520
|
export {
|
|
7496
|
-
|
|
7521
|
+
O1 as Auth,
|
|
7497
7522
|
Fi as AuthFlow,
|
|
7498
7523
|
jt as AuthFlowContext,
|
|
7499
7524
|
sr as AuthLayout,
|