@ozdao/prometheus-framework 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.client.cjs +7 -7
- package/dist/auth.client.js +304 -309
- package/package.json +1 -1
- package/src/modules/auth/components/pages/EnterCode.vue +44 -23
package/dist/auth.client.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
import { ref as C, onMounted as ut, openBlock as
|
2
|
-
import { v as
|
3
|
-
import { c as oe, d as ht, s as
|
1
|
+
import { ref as C, onMounted as ut, openBlock as g, createBlock as ce, unref as f, withCtx as w, createElementBlock as b, Fragment as fe, renderList as ct, createElementVNode as p, normalizeStyle as q, toDisplayString as h, resolveComponent as be, createVNode as y, Transition as R, resolveDynamicComponent as Ft, reactive as ft, watch as pt, createTextVNode as A, withDirectives as I, vModelText as J, withAsyncContext as Dt, defineComponent as Rt, resolveDirective as Mt, normalizeClass as K, withKeys as ie, createCommentVNode as L, vShow as X, vModelDynamic as zt, renderSlot as Lt, inject as Te } from "vue";
|
2
|
+
import { v as M, b as mt, c as _e, d as Ce } from "./inputs.validation-14e8e01f.mjs";
|
3
|
+
import { c as oe, d as ht, s as m, a as xt, F as z, _ as G, b as V } from "./auth-962e3b73.mjs";
|
4
4
|
import { e as Fi, t as Di } from "./auth-962e3b73.mjs";
|
5
5
|
import { C as kt, S as jt } from "./carousel.es-44c501bc.mjs";
|
6
6
|
import { useI18n as H } from "vue-i18n";
|
7
7
|
import { useRoute as k, useRouter as j } from "vue-router";
|
8
|
-
import { s as
|
8
|
+
import { s as x } from "./globals-96ba60e4.mjs";
|
9
9
|
import { _ as we } from "./Tab-a243605d.mjs";
|
10
10
|
import { _ as Bt } from "./_plugin-vue_export-helper-dad06003.mjs";
|
11
11
|
import { r as W, a as ae, c as Ae } from "./auth.validation-1b60cef5.mjs";
|
@@ -60,7 +60,7 @@ const Ut = { class: "parent-div" }, Gt = { class: "mn-small" }, Vt = { class: "m
|
|
60
60
|
setTimeout(() => {
|
61
61
|
n.value.restartCarousel(), i.value = !0;
|
62
62
|
}, "500");
|
63
|
-
}), (o, a) => (
|
63
|
+
}), (o, a) => (g(), ce(f(kt), {
|
64
64
|
ref_key: "ImagesSlider",
|
65
65
|
ref: n,
|
66
66
|
"items-to-show": 1,
|
@@ -71,18 +71,18 @@ const Ut = { class: "parent-div" }, Gt = { class: "mn-small" }, Vt = { class: "m
|
|
71
71
|
class: "bg-grey w-100"
|
72
72
|
}, {
|
73
73
|
default: w(() => [
|
74
|
-
(
|
74
|
+
(g(!0), b(fe, null, ct(f(d)("features"), (l, s) => (g(), ce(f(jt), {
|
75
75
|
key: s,
|
76
76
|
class: "w-100 flex-v-center flex"
|
77
77
|
}, {
|
78
78
|
default: w(() => [
|
79
|
-
|
80
|
-
|
79
|
+
p("div", Ut, [
|
80
|
+
p("div", {
|
81
81
|
class: "background-div",
|
82
82
|
style: q(`background-image: url(/assets/images/features/${s}.png); background-size: auto 100%; background-repeat: no-repeat; background-position: center center;`)
|
83
83
|
}, null, 4),
|
84
|
-
|
85
|
-
|
84
|
+
p("h4", Gt, h(l.title), 1),
|
85
|
+
p("p", Vt, h(l.description), 1)
|
86
86
|
])
|
87
87
|
]),
|
88
88
|
_: 2
|
@@ -197,7 +197,7 @@ function Z(e) {
|
|
197
197
|
return t.__proto__ || Object.getPrototypeOf(t);
|
198
198
|
}, Z(e);
|
199
199
|
}
|
200
|
-
var
|
200
|
+
var E = /* @__PURE__ */ function(e) {
|
201
201
|
Xt(t, e);
|
202
202
|
var n = Yt(t);
|
203
203
|
function t(d) {
|
@@ -300,11 +300,11 @@ var sn = "1.2.0", ln = "1.7.35", Me = " ext. ", $n = /^\d+$/, S = /* @__PURE__ *
|
|
300
300
|
if (t && $n.test(t) && (d = t, t = null), t && t !== "001") {
|
301
301
|
if (!this.hasCountry(t))
|
302
302
|
throw new Error("Unknown country: ".concat(t));
|
303
|
-
this.numberingPlan = new
|
303
|
+
this.numberingPlan = new ze(this.getCountryMetadata(t), this);
|
304
304
|
} else if (d) {
|
305
305
|
if (!this.hasCallingCode(d))
|
306
306
|
throw new Error("Unknown calling code: ".concat(d));
|
307
|
-
this.numberingPlan = new
|
307
|
+
this.numberingPlan = new ze(this.getNumberingPlanMetadata(d), this);
|
308
308
|
} else
|
309
309
|
this.numberingPlan = void 0;
|
310
310
|
return this;
|
@@ -428,7 +428,7 @@ var sn = "1.2.0", ln = "1.7.35", Me = " ext. ", $n = /^\d+$/, S = /* @__PURE__ *
|
|
428
428
|
return this.numberingPlan !== void 0;
|
429
429
|
}
|
430
430
|
}]), e;
|
431
|
-
}(),
|
431
|
+
}(), ze = /* @__PURE__ */ function() {
|
432
432
|
function e(n, t) {
|
433
433
|
de(this, e), this.globalMetadataObject = t, this.metadata = n, vt.call(this, t.metadata);
|
434
434
|
}
|
@@ -555,8 +555,8 @@ var sn = "1.2.0", ln = "1.7.35", Me = " ext. ", $n = /^\d+$/, S = /* @__PURE__ *
|
|
555
555
|
}, {
|
556
556
|
key: "type",
|
557
557
|
value: function(t) {
|
558
|
-
if (this.hasTypes() &&
|
559
|
-
return new fn(
|
558
|
+
if (this.hasTypes() && Le(this.types(), t))
|
559
|
+
return new fn(Le(this.types(), t), this);
|
560
560
|
}
|
561
561
|
}, {
|
562
562
|
key: "ext",
|
@@ -628,7 +628,7 @@ var sn = "1.2.0", ln = "1.7.35", Me = " ext. ", $n = /^\d+$/, S = /* @__PURE__ *
|
|
628
628
|
}
|
629
629
|
}]), e;
|
630
630
|
}();
|
631
|
-
function
|
631
|
+
function Le(e, n) {
|
632
632
|
switch (n) {
|
633
633
|
case "FIXED_LINE":
|
634
634
|
return e[0];
|
@@ -679,8 +679,8 @@ var yn = ";ext=", B = function(n) {
|
|
679
679
|
return "([".concat(N, "]{1,").concat(n, "})");
|
680
680
|
};
|
681
681
|
function bt(e) {
|
682
|
-
var n = "20", t = "15", d = "9", r = "6", i = "[ \\t,]*", o = "[:\\..]?[ \\t,-]*", a = "#?", l = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", s = "(?:[xx##~~]|int|int)",
|
683
|
-
return
|
682
|
+
var n = "20", t = "15", d = "9", r = "6", i = "[ \\t,]*", o = "[:\\..]?[ \\t,-]*", a = "#?", l = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", s = "(?:[xx##~~]|int|int)", u = "[- ]+", $ = "[ \\t]*", c = "(?:,{2}|;)", v = yn + B(n), _ = i + l + o + B(n) + a, D = i + s + o + B(d) + a, P = u + B(r) + "#", Tt = $ + c + o + B(t) + a, At = $ + "(?:,)+" + o + B(d) + a;
|
683
|
+
return v + "|" + _ + "|" + D + "|" + P + "|" + Tt + "|" + At;
|
684
684
|
}
|
685
685
|
var gn = "[" + N + "]{" + Pe + "}", vn = "[" + Oe + "]{0,1}(?:[" + ee + "]*[" + N + "]){3,}[" + ee + N + "]*", bn = new RegExp("^[" + Oe + "]{0,1}(?:[" + ee + "]*[" + N + "]){1,2}$", "i"), _n = vn + // Phone number extensions
|
686
686
|
"(?:" + bt() + ")?", Cn = new RegExp(
|
@@ -694,12 +694,12 @@ function wn(e) {
|
|
694
694
|
function Pn(e) {
|
695
695
|
return bn.test(e);
|
696
696
|
}
|
697
|
-
var
|
697
|
+
var xe = new RegExp("(?:" + bt() + ")$", "i");
|
698
698
|
function On(e) {
|
699
|
-
var n = e.search(
|
699
|
+
var n = e.search(xe);
|
700
700
|
if (n < 0)
|
701
701
|
return {};
|
702
|
-
for (var t = e.slice(0, n), d = e.match(
|
702
|
+
for (var t = e.slice(0, n), d = e.match(xe), r = 1; r < d.length; ) {
|
703
703
|
if (d[r])
|
704
704
|
return {
|
705
705
|
number: t,
|
@@ -920,7 +920,7 @@ function Mn(e, n) {
|
|
920
920
|
var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
921
921
|
if (t)
|
922
922
|
return (t = t.call(e)).next.bind(t);
|
923
|
-
if (Array.isArray(e) || (t =
|
923
|
+
if (Array.isArray(e) || (t = zn(e)) || n && e && typeof e.length == "number") {
|
924
924
|
t && (e = t);
|
925
925
|
var d = 0;
|
926
926
|
return function() {
|
@@ -930,7 +930,7 @@ function Mn(e, n) {
|
|
930
930
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
931
931
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
932
932
|
}
|
933
|
-
function
|
933
|
+
function zn(e, n) {
|
934
934
|
if (e) {
|
935
935
|
if (typeof e == "string")
|
936
936
|
return Ue(e, n);
|
@@ -947,7 +947,7 @@ function Ue(e, n) {
|
|
947
947
|
d[t] = e[t];
|
948
948
|
return d;
|
949
949
|
}
|
950
|
-
var
|
950
|
+
var Ln = ["MOBILE", "PREMIUM_RATE", "TOLL_FREE", "SHARED_COST", "VOIP", "PERSONAL_NUMBER", "PAGER", "UAN", "VOICEMAIL"];
|
951
951
|
function Ne(e, n, t) {
|
952
952
|
if (n = n || {}, !!e.country) {
|
953
953
|
t = new S(t), t.selectNumberingPlan(e.country, e.countryCallingCode);
|
@@ -955,7 +955,7 @@ function Ne(e, n, t) {
|
|
955
955
|
if (F(d, t.nationalNumberPattern())) {
|
956
956
|
if (le(d, "FIXED_LINE", t))
|
957
957
|
return t.type("MOBILE") && t.type("MOBILE").pattern() === "" || !t.type("MOBILE") || le(d, "MOBILE", t) ? "FIXED_LINE_OR_MOBILE" : "FIXED_LINE";
|
958
|
-
for (var r = Mn(
|
958
|
+
for (var r = Mn(Ln), i; !(i = r()).done; ) {
|
959
959
|
var o = i.value;
|
960
960
|
if (le(d, o, t))
|
961
961
|
return o;
|
@@ -966,7 +966,7 @@ function Ne(e, n, t) {
|
|
966
966
|
function le(e, n, t) {
|
967
967
|
return n = t.type(n), !n || !n.pattern() || n.possibleLengths() && n.possibleLengths().indexOf(e.length) < 0 ? !1 : F(e, n.pattern());
|
968
968
|
}
|
969
|
-
function
|
969
|
+
function xn(e, n, t) {
|
970
970
|
if (n = n || {}, t = new S(t), t.selectNumberingPlan(e.country, e.countryCallingCode), t.hasTypes())
|
971
971
|
return Ne(e, n, t.metadata) !== void 0;
|
972
972
|
var d = n.v2 ? e.nationalNumber : e.phone;
|
@@ -1218,7 +1218,7 @@ var nd = /* @__PURE__ */ function() {
|
|
1218
1218
|
}, {
|
1219
1219
|
key: "isValid",
|
1220
1220
|
value: function() {
|
1221
|
-
return
|
1221
|
+
return xn(this, {
|
1222
1222
|
v2: !0
|
1223
1223
|
}, this.getMetadata());
|
1224
1224
|
}
|
@@ -1316,8 +1316,8 @@ function ad(e, n) {
|
|
1316
1316
|
}
|
1317
1317
|
var s;
|
1318
1318
|
if (a) {
|
1319
|
-
var
|
1320
|
-
|
1319
|
+
var u = e.indexOf(d[1]), $ = e.slice(0, u);
|
1320
|
+
$ === n.numberingPlan.nationalPrefix() && (s = n.numberingPlan.nationalPrefix());
|
1321
1321
|
} else
|
1322
1322
|
s = d[0];
|
1323
1323
|
return {
|
@@ -1404,11 +1404,11 @@ function ud(e, n, t, d) {
|
|
1404
1404
|
return {};
|
1405
1405
|
d = new S(d);
|
1406
1406
|
for (var s = 2; s - 1 <= en && s <= e.length; ) {
|
1407
|
-
var
|
1408
|
-
if (d.hasCallingCode(
|
1409
|
-
return d.selectNumberingPlan(
|
1407
|
+
var u = e.slice(1, s);
|
1408
|
+
if (d.hasCallingCode(u))
|
1409
|
+
return d.selectNumberingPlan(u), {
|
1410
1410
|
countryCallingCodeSource: r ? "FROM_NUMBER_WITH_IDD" : "FROM_NUMBER_WITH_PLUS_SIGN",
|
1411
|
-
countryCallingCode:
|
1411
|
+
countryCallingCode: u,
|
1412
1412
|
number: e.slice(s)
|
1413
1413
|
};
|
1414
1414
|
s++;
|
@@ -1498,7 +1498,7 @@ function Id(e) {
|
|
1498
1498
|
function Nd(e, n) {
|
1499
1499
|
var t = n.extractFormattedPhoneNumber, d = Sd(e);
|
1500
1500
|
if (!Id(d))
|
1501
|
-
throw new
|
1501
|
+
throw new E("NOT_A_NUMBER");
|
1502
1502
|
var r;
|
1503
1503
|
if (d === null)
|
1504
1504
|
r = t(e) || "";
|
@@ -1516,49 +1516,49 @@ function Nd(e, n) {
|
|
1516
1516
|
var Ed = 250, Td = new RegExp("[" + Oe + N + "]"), Ad = new RegExp("[^" + N + "#]+$");
|
1517
1517
|
function Fd(e, n, t) {
|
1518
1518
|
if (n = n || {}, t = new S(t), n.defaultCountry && !t.hasCountry(n.defaultCountry))
|
1519
|
-
throw n.v2 ? new
|
1519
|
+
throw n.v2 ? new E("INVALID_COUNTRY") : new Error("Unknown country: ".concat(n.defaultCountry));
|
1520
1520
|
var d = Rd(e, n.v2, n.extract), r = d.number, i = d.ext, o = d.error;
|
1521
1521
|
if (!r) {
|
1522
1522
|
if (n.v2)
|
1523
|
-
throw o === "TOO_SHORT" ? new
|
1523
|
+
throw o === "TOO_SHORT" ? new E("TOO_SHORT") : new E("NOT_A_NUMBER");
|
1524
1524
|
return {};
|
1525
1525
|
}
|
1526
|
-
var a =
|
1526
|
+
var a = zd(r, n.defaultCountry, n.defaultCallingCode, t), l = a.country, s = a.nationalNumber, u = a.countryCallingCode, $ = a.countryCallingCodeSource, c = a.carrierCode;
|
1527
1527
|
if (!t.hasSelectedNumberingPlan()) {
|
1528
1528
|
if (n.v2)
|
1529
|
-
throw new
|
1529
|
+
throw new E("INVALID_COUNTRY");
|
1530
1530
|
return {};
|
1531
1531
|
}
|
1532
1532
|
if (!s || s.length < Pe) {
|
1533
1533
|
if (n.v2)
|
1534
|
-
throw new
|
1534
|
+
throw new E("TOO_SHORT");
|
1535
1535
|
return {};
|
1536
1536
|
}
|
1537
1537
|
if (s.length > Qt) {
|
1538
1538
|
if (n.v2)
|
1539
|
-
throw new
|
1539
|
+
throw new E("TOO_LONG");
|
1540
1540
|
return {};
|
1541
1541
|
}
|
1542
1542
|
if (n.v2) {
|
1543
|
-
var
|
1544
|
-
return l && (
|
1543
|
+
var v = new nd(u, s, t.metadata);
|
1544
|
+
return l && (v.country = l), c && (v.carrierCode = c), i && (v.ext = i), v.__countryCallingCodeSource = $, v;
|
1545
1545
|
}
|
1546
|
-
var
|
1546
|
+
var _ = (n.extended ? t.hasSelectedNumberingPlan() : l) ? F(s, t.nationalNumberPattern()) : !1;
|
1547
1547
|
return n.extended ? {
|
1548
1548
|
country: l,
|
1549
|
-
countryCallingCode:
|
1550
|
-
carrierCode:
|
1551
|
-
valid:
|
1552
|
-
possible:
|
1549
|
+
countryCallingCode: u,
|
1550
|
+
carrierCode: c,
|
1551
|
+
valid: _,
|
1552
|
+
possible: _ ? !0 : !!(n.extended === !0 && t.possibleLengths() && Ct(s, t)),
|
1553
1553
|
phone: s,
|
1554
1554
|
ext: i
|
1555
|
-
} :
|
1555
|
+
} : _ ? Md(l, s, i) : {};
|
1556
1556
|
}
|
1557
1557
|
function Dd(e, n, t) {
|
1558
1558
|
if (e) {
|
1559
1559
|
if (e.length > Ed) {
|
1560
1560
|
if (t)
|
1561
|
-
throw new
|
1561
|
+
throw new E("TOO_LONG");
|
1562
1562
|
return;
|
1563
1563
|
}
|
1564
1564
|
if (n === !1)
|
@@ -1592,7 +1592,7 @@ function Md(e, n, t) {
|
|
1592
1592
|
};
|
1593
1593
|
return t && (d.ext = t), d;
|
1594
1594
|
}
|
1595
|
-
function
|
1595
|
+
function zd(e, n, t, d) {
|
1596
1596
|
var r = ud(je(e), n, t, d.metadata), i = r.countryCallingCodeSource, o = r.countryCallingCode, a = r.number, l;
|
1597
1597
|
if (o)
|
1598
1598
|
d.selectNumberingPlan(o);
|
@@ -1605,17 +1605,17 @@ function xd(e, n, t, d) {
|
|
1605
1605
|
countryCallingCodeSource: i,
|
1606
1606
|
countryCallingCode: o
|
1607
1607
|
};
|
1608
|
-
var s = he(je(a), d),
|
1609
|
-
nationalNumber:
|
1608
|
+
var s = he(je(a), d), u = s.nationalNumber, $ = s.carrierCode, c = hd(o, {
|
1609
|
+
nationalNumber: u,
|
1610
1610
|
defaultCountry: n,
|
1611
1611
|
metadata: d
|
1612
1612
|
});
|
1613
|
-
return
|
1613
|
+
return c && (l = c, c === "001" || d.country(l)), {
|
1614
1614
|
country: l,
|
1615
1615
|
countryCallingCode: o,
|
1616
1616
|
countryCallingCodeSource: i,
|
1617
|
-
nationalNumber:
|
1618
|
-
carrierCode:
|
1617
|
+
nationalNumber: u,
|
1618
|
+
carrierCode: $
|
1619
1619
|
};
|
1620
1620
|
}
|
1621
1621
|
function Qe(e, n) {
|
@@ -1632,17 +1632,17 @@ function et(e) {
|
|
1632
1632
|
for (var n = 1; n < arguments.length; n++) {
|
1633
1633
|
var t = arguments[n] != null ? arguments[n] : {};
|
1634
1634
|
n % 2 ? Qe(Object(t), !0).forEach(function(d) {
|
1635
|
-
|
1635
|
+
Ld(e, d, t[d]);
|
1636
1636
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Qe(Object(t)).forEach(function(d) {
|
1637
1637
|
Object.defineProperty(e, d, Object.getOwnPropertyDescriptor(t, d));
|
1638
1638
|
});
|
1639
1639
|
}
|
1640
1640
|
return e;
|
1641
1641
|
}
|
1642
|
-
function
|
1642
|
+
function Ld(e, n, t) {
|
1643
1643
|
return n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
|
1644
1644
|
}
|
1645
|
-
function
|
1645
|
+
function xd(e, n, t) {
|
1646
1646
|
return Fd(e, et(et({}, n), {}, {
|
1647
1647
|
v2: !0
|
1648
1648
|
}), t);
|
@@ -1779,9 +1779,9 @@ function Xd(e, n, t) {
|
|
1779
1779
|
defaultCountry: void 0
|
1780
1780
|
}));
|
1781
1781
|
try {
|
1782
|
-
return
|
1782
|
+
return xd(e, n, t);
|
1783
1783
|
} catch (d) {
|
1784
|
-
if (!(d instanceof
|
1784
|
+
if (!(d instanceof E))
|
1785
1785
|
throw d;
|
1786
1786
|
}
|
1787
1787
|
}
|
@@ -1792,20 +1792,20 @@ function Yd() {
|
|
1792
1792
|
function ue() {
|
1793
1793
|
return Kt(Yd, arguments);
|
1794
1794
|
}
|
1795
|
-
const Zd = { class: "cols-2-1_2 gap-small pd-small bg-white" }, Jd = /* @__PURE__ */
|
1795
|
+
const Zd = { class: "cols-2-1_2 gap-small pd-small bg-white" }, Jd = /* @__PURE__ */ p("section", { class: "w-100 desktop-only o-hidden radius-big bg-grad-main" }, null, -1), Qd = {
|
1796
1796
|
__name: "Auth",
|
1797
1797
|
setup(e) {
|
1798
1798
|
return C(null), C(null), C(null), k(), j(), C("email"), (n, t) => {
|
1799
1799
|
const d = be("router-view");
|
1800
|
-
return
|
1801
|
-
|
1800
|
+
return g(), b("div", Zd, [
|
1801
|
+
y(d, { class: "pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center" }, {
|
1802
1802
|
default: w(({ Component: r, route: i }) => [
|
1803
|
-
|
1803
|
+
y(R, {
|
1804
1804
|
name: "scaleIn",
|
1805
1805
|
mode: "out-in"
|
1806
1806
|
}, {
|
1807
1807
|
default: w(() => [
|
1808
|
-
(
|
1808
|
+
(g(), ce(Ft(r), {
|
1809
1809
|
ref: "page",
|
1810
1810
|
key: i.path,
|
1811
1811
|
localPosition: n.localPosition
|
@@ -1877,106 +1877,101 @@ const er = { class: "t-center pd-medium" }, tr = { class: "mn-medium" }, nr = {
|
|
1877
1877
|
});
|
1878
1878
|
pt(
|
1879
1879
|
() => r.digits[0],
|
1880
|
-
(
|
1881
|
-
if (
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1880
|
+
(u) => {
|
1881
|
+
if (console.log(String(u)), console.log(String(u).length), u && String(u).length > 1) {
|
1882
|
+
let $ = String(u).split("");
|
1883
|
+
console.log($);
|
1884
|
+
let c = [...r.digits];
|
1885
|
+
$.forEach((v, _) => {
|
1886
|
+
console.log(_), console.log(c[_]), console.log(v), c[_] = v;
|
1887
|
+
}), r.digits = c, s(3);
|
1885
1888
|
}
|
1886
1889
|
}
|
1887
1890
|
);
|
1888
1891
|
const i = C(null), o = C(0);
|
1889
1892
|
async function a() {
|
1890
1893
|
try {
|
1891
|
-
await ht(
|
1892
|
-
const
|
1893
|
-
o.value > 0 ? o.value -= 1 : clearInterval(
|
1894
|
+
await ht(m.user, n.query.type, m.user.phone ? "phone" : "email"), o.value = 30;
|
1895
|
+
const u = setInterval(() => {
|
1896
|
+
o.value > 0 ? o.value -= 1 : clearInterval(u);
|
1894
1897
|
}, 1e3);
|
1895
1898
|
} catch {
|
1896
|
-
|
1899
|
+
x({ response: { data: { errorCode: "CODE_NOT_SENT" } } });
|
1897
1900
|
}
|
1898
1901
|
}
|
1899
|
-
const l = (
|
1900
|
-
if (
|
1901
|
-
|
1902
|
-
const
|
1903
|
-
|
1902
|
+
const l = (u, $) => {
|
1903
|
+
if (u.key === "Backspace" && (r.digits[$] === null || r.digits[$] === void 0 || r.digits[$] === "")) {
|
1904
|
+
u.preventDefault();
|
1905
|
+
const c = document.querySelectorAll("input"), v = $ > 0 ? c[$ - 1] : null;
|
1906
|
+
v && (v.focus(), v.setSelectionRange(v.value.length, v.value.length));
|
1904
1907
|
}
|
1905
|
-
}, s = (
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
r.digits[$ + b] = u[b];
|
1911
|
-
h($ + 3);
|
1912
|
-
} else
|
1913
|
-
R({ response: { data: { errorCode: "INPUT_ERROR" } } });
|
1914
|
-
}, h = (m) => {
|
1915
|
-
const $ = document.querySelectorAll("input"), u = $[m + 1], b = m > 0 ? $[m - 1] : null;
|
1916
|
-
if (r.digits[m] !== "" && r.digits[m] !== null && r.digits[m] !== void 0 && m < 4 && (m < 3 ? u.focus() : i.value.focus()), (r.digits[m] === null || r.digits[m] === void 0 || r.digits[m] === "") && m > 0 && b.focus(), r.digits.every((E) => E !== "")) {
|
1917
|
-
const E = r.digits.join(""), P = oe.code.code.toString();
|
1918
|
-
E === P ? (oe.code.isValid = !0, t.push({
|
1908
|
+
}, s = (u) => {
|
1909
|
+
const $ = document.querySelectorAll("input"), c = $[u + 1], v = u > 0 ? $[u - 1] : null;
|
1910
|
+
if (r.digits[u] !== "" && r.digits[u] !== null && r.digits[u] !== void 0 && u < 4 && (u < 3 ? c.focus() : i.value.focus()), (r.digits[u] === null || r.digits[u] === void 0 || r.digits[u] === "") && u > 0 && v.focus(), r.digits.every((_) => _ !== "")) {
|
1911
|
+
const _ = r.digits.join(""), D = oe.code.code.toString();
|
1912
|
+
_ === D ? (oe.code.isValid = !0, t.push({
|
1919
1913
|
path: "/auth/enter-password",
|
1920
1914
|
query: { type: oe.code.type, method: n.query.method }
|
1921
|
-
})) : (
|
1915
|
+
})) : (x({ response: { data: { errorCode: "WRONG_CODE" } } }), i.value.focus(), r.digits = ["", "", "", ""]);
|
1922
1916
|
}
|
1923
1917
|
};
|
1924
|
-
return (
|
1925
|
-
|
1926
|
-
|
1927
|
-
f("
|
1928
|
-
|
1918
|
+
return (u, $) => (g(), b("section", er, [
|
1919
|
+
p("h3", tr, h(f(d)("verifyNumberTitle")), 1),
|
1920
|
+
A(" " + h(r.digits) + " ", 1),
|
1921
|
+
p("p", nr, h(f(d)("instructions")), 1),
|
1922
|
+
p("div", dr, [
|
1923
|
+
I(p("input", {
|
1929
1924
|
type: "number",
|
1930
|
-
"onUpdate:modelValue": $[0] || ($[0] = (
|
1925
|
+
"onUpdate:modelValue": $[0] || ($[0] = (c) => r.digits[0] = c),
|
1931
1926
|
ref_key: "firstInput",
|
1932
1927
|
ref: i,
|
1933
1928
|
maxlength: "1",
|
1934
|
-
onInput: $[1] || ($[1] = (
|
1935
|
-
onPaste: $[2] || ($[2] = (
|
1936
|
-
onKeydown: $[3] || ($[3] = (
|
1929
|
+
onInput: $[1] || ($[1] = (c) => s(0)),
|
1930
|
+
onPaste: $[2] || ($[2] = (c) => u.onPaste(c, 0)),
|
1931
|
+
onKeydown: $[3] || ($[3] = (c) => l(c, 0)),
|
1937
1932
|
class: "w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"
|
1938
1933
|
}, null, 544), [
|
1939
1934
|
[J, r.digits[0]]
|
1940
1935
|
]),
|
1941
|
-
I(
|
1936
|
+
I(p("input", {
|
1942
1937
|
type: "number",
|
1943
|
-
"onUpdate:modelValue": $[4] || ($[4] = (
|
1938
|
+
"onUpdate:modelValue": $[4] || ($[4] = (c) => r.digits[1] = c),
|
1944
1939
|
maxlength: "1",
|
1945
|
-
onInput: $[5] || ($[5] = (
|
1946
|
-
onPaste: $[6] || ($[6] = (
|
1947
|
-
onKeydown: $[7] || ($[7] = (
|
1940
|
+
onInput: $[5] || ($[5] = (c) => s(1)),
|
1941
|
+
onPaste: $[6] || ($[6] = (c) => u.onPaste(c, 1)),
|
1942
|
+
onKeydown: $[7] || ($[7] = (c) => l(c, 1)),
|
1948
1943
|
class: "w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"
|
1949
1944
|
}, null, 544), [
|
1950
1945
|
[J, r.digits[1]]
|
1951
1946
|
]),
|
1952
|
-
I(
|
1947
|
+
I(p("input", {
|
1953
1948
|
type: "number",
|
1954
|
-
"onUpdate:modelValue": $[8] || ($[8] = (
|
1949
|
+
"onUpdate:modelValue": $[8] || ($[8] = (c) => r.digits[2] = c),
|
1955
1950
|
maxlength: "1",
|
1956
|
-
onInput: $[9] || ($[9] = (
|
1957
|
-
onPaste: $[10] || ($[10] = (
|
1958
|
-
onKeydown: $[11] || ($[11] = (
|
1951
|
+
onInput: $[9] || ($[9] = (c) => s(2)),
|
1952
|
+
onPaste: $[10] || ($[10] = (c) => u.onPaste(c, 2)),
|
1953
|
+
onKeydown: $[11] || ($[11] = (c) => l(c, 2)),
|
1959
1954
|
class: "w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"
|
1960
1955
|
}, null, 544), [
|
1961
1956
|
[J, r.digits[2]]
|
1962
1957
|
]),
|
1963
|
-
I(
|
1958
|
+
I(p("input", {
|
1964
1959
|
type: "number",
|
1965
|
-
"onUpdate:modelValue": $[12] || ($[12] = (
|
1960
|
+
"onUpdate:modelValue": $[12] || ($[12] = (c) => r.digits[3] = c),
|
1966
1961
|
maxlength: "1",
|
1967
|
-
onInput: $[13] || ($[13] = (
|
1968
|
-
onPaste: $[14] || ($[14] = (
|
1969
|
-
onKeydown: $[15] || ($[15] = (
|
1962
|
+
onInput: $[13] || ($[13] = (c) => s(3)),
|
1963
|
+
onPaste: $[14] || ($[14] = (c) => u.onPaste(c, 3)),
|
1964
|
+
onKeydown: $[15] || ($[15] = (c) => l(c, 3)),
|
1970
1965
|
class: "w-100 h1 pd-small t-center bg-grey radius-small"
|
1971
1966
|
}, null, 544), [
|
1972
1967
|
[J, r.digits[3]]
|
1973
1968
|
])
|
1974
1969
|
]),
|
1975
|
-
o.value < 1 ? (
|
1970
|
+
o.value < 1 ? (g(), b("a", {
|
1976
1971
|
key: 0,
|
1977
1972
|
onClick: a,
|
1978
1973
|
class: "t-blue"
|
1979
|
-
},
|
1974
|
+
}, h(f(d)("resendCode")), 1)) : (g(), b("span", rr, h(o.value) + " " + h(f(d)("secondsResend")), 1))
|
1980
1975
|
]));
|
1981
1976
|
}
|
1982
1977
|
};
|
@@ -1984,57 +1979,57 @@ typeof it == "function" && it(Pt);
|
|
1984
1979
|
const ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1985
1980
|
__proto__: null,
|
1986
1981
|
default: Pt
|
1987
|
-
}, Symbol.toStringTag, { value: "Module" })), U =
|
1982
|
+
}, Symbol.toStringTag, { value: "Module" })), U = xt.create({ baseURL: process.env.API_URL, withCredentials: !0 });
|
1988
1983
|
U.defaults.withCredentials = !0;
|
1989
|
-
const
|
1984
|
+
const T = ft({
|
1990
1985
|
invites: [],
|
1991
1986
|
invite: null,
|
1992
1987
|
error: null
|
1993
1988
|
}), Ot = {
|
1994
1989
|
async read(e) {
|
1995
1990
|
await U.get(`/api/invites/${e}`).then((n) => {
|
1996
|
-
|
1991
|
+
T.invites = n.data, T.error = null;
|
1997
1992
|
}).catch((n) => {
|
1998
|
-
|
1993
|
+
x(n);
|
1999
1994
|
});
|
2000
1995
|
},
|
2001
1996
|
async readOne(e) {
|
2002
1997
|
await U.get(`/api/invites/get/${e}`).then((n) => {
|
2003
|
-
|
1998
|
+
T.invite = n.data, m.user.phone = n.data.invitedPhone, m.user.email = n.data.invitedEmail;
|
2004
1999
|
}).catch((n) => {
|
2005
|
-
|
2000
|
+
x(n);
|
2006
2001
|
});
|
2007
2002
|
},
|
2008
2003
|
async create(e, n) {
|
2009
2004
|
await U.post(`/api/invites/${e}/create`, n).then(() => {
|
2010
|
-
|
2005
|
+
T.error = null;
|
2011
2006
|
}).catch((t) => {
|
2012
|
-
|
2007
|
+
x(t);
|
2013
2008
|
});
|
2014
2009
|
},
|
2015
2010
|
async update(e, n) {
|
2016
2011
|
await U.put(`/api/invites/${e}/update`, n).then(() => {
|
2017
|
-
|
2012
|
+
T.error = null;
|
2018
2013
|
}).catch((t) => {
|
2019
|
-
|
2014
|
+
x(t);
|
2020
2015
|
});
|
2021
2016
|
},
|
2022
2017
|
async delete(e) {
|
2023
2018
|
await U.delete(`/api/invites/${e}/delete`).then(() => {
|
2024
|
-
|
2019
|
+
T.error = null;
|
2025
2020
|
}).catch((n) => {
|
2026
|
-
|
2021
|
+
x(n);
|
2027
2022
|
});
|
2028
2023
|
}
|
2029
2024
|
};
|
2030
|
-
pt(
|
2025
|
+
pt(T, (e, n) => {
|
2031
2026
|
});
|
2032
2027
|
const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
2033
2028
|
__proto__: null,
|
2034
2029
|
actions: Ot,
|
2035
|
-
state:
|
2030
|
+
state: T
|
2036
2031
|
}, Symbol.toStringTag, { value: "Module" }));
|
2037
|
-
const or = { class: "t-left pd-medium" }, ar = /* @__PURE__ */
|
2032
|
+
const or = { class: "t-left pd-medium" }, ar = /* @__PURE__ */ p("h3", { class: "mn-small" }, "Вы были пригилашены в организацию", -1), sr = /* @__PURE__ */ p("p", { class: "mn-semi t-transp" }, "Пожалуйста, укажите пароль, на этом регистрация будет закочена.", -1), lr = { class: "mn-semi radius-small o-hidden" }, $r = { key: 0 }, ur = { key: 1 }, cr = {
|
2038
2033
|
__name: "Invite",
|
2039
2034
|
async setup(e) {
|
2040
2035
|
let n, t;
|
@@ -2042,50 +2037,50 @@ const or = { class: "t-left pd-medium" }, ar = /* @__PURE__ */ f("h3", { class:
|
|
2042
2037
|
[n, t] = Dt(() => Ot.readOne(r.query.inviteCode)), await n, t();
|
2043
2038
|
async function o() {
|
2044
2039
|
try {
|
2045
|
-
await
|
2040
|
+
await M(
|
2046
2041
|
d,
|
2047
2042
|
mt,
|
2048
|
-
|
2043
|
+
m.user.password,
|
2049
2044
|
"Некорректный пароль"
|
2050
2045
|
);
|
2051
2046
|
} catch {
|
2052
2047
|
throw new Error();
|
2053
2048
|
}
|
2054
|
-
await V.signup(
|
2049
|
+
await V.signup(m.user, r.query.type, r.query.inviteCode);
|
2055
2050
|
}
|
2056
2051
|
function a() {
|
2057
2052
|
i.push({ name: "Dashboard" });
|
2058
2053
|
}
|
2059
|
-
return (l, s) => (
|
2054
|
+
return (l, s) => (g(), b("section", or, [
|
2060
2055
|
ar,
|
2061
2056
|
sr,
|
2062
|
-
|
2063
|
-
|
2064
|
-
field:
|
2065
|
-
"onUpdate:field": s[0] || (s[0] = (
|
2057
|
+
p("div", lr, [
|
2058
|
+
y(z, {
|
2059
|
+
field: m.user.password,
|
2060
|
+
"onUpdate:field": s[0] || (s[0] = (u) => m.user.password = u),
|
2066
2061
|
type: "password",
|
2067
2062
|
validation: d.value,
|
2068
2063
|
label: "Пароль",
|
2069
2064
|
placeholder: "******",
|
2070
2065
|
class: "bg-white radius-small mn-small"
|
2071
2066
|
}, null, 8, ["field", "validation"]),
|
2072
|
-
|
2073
|
-
field:
|
2074
|
-
"onUpdate:field": s[1] || (s[1] = (
|
2067
|
+
y(z, {
|
2068
|
+
field: m.user.passwordRepeat,
|
2069
|
+
"onUpdate:field": s[1] || (s[1] = (u) => m.user.passwordRepeat = u),
|
2075
2070
|
type: "password",
|
2076
2071
|
label: "Повторите пароль",
|
2077
2072
|
placeholder: "******",
|
2078
2073
|
class: "bg-white radius-small mn-semi"
|
2079
2074
|
}, null, 8, ["field"])
|
2080
2075
|
]),
|
2081
|
-
|
2082
|
-
disabled:
|
2076
|
+
y(G, {
|
2077
|
+
disabled: T.invite === null,
|
2083
2078
|
submit: o,
|
2084
2079
|
callback: a,
|
2085
2080
|
class: "mn-big"
|
2086
2081
|
}, {
|
2087
2082
|
default: w(() => [
|
2088
|
-
|
2083
|
+
f(r).query.method === "reset-password" ? (g(), b("span", $r, "Поменять пароль")) : (g(), b("span", ur, "Зарегистрироваться"))
|
2089
2084
|
]),
|
2090
2085
|
_: 1
|
2091
2086
|
}, 8, ["disabled"])
|
@@ -2179,47 +2174,47 @@ const pr = { class: "t-left pd-medium" }, mr = { class: "mn-small" }, hr = {
|
|
2179
2174
|
C("phone");
|
2180
2175
|
async function i() {
|
2181
2176
|
try {
|
2182
|
-
await
|
2177
|
+
await M(
|
2183
2178
|
n,
|
2184
2179
|
mt,
|
2185
|
-
|
2180
|
+
m.user.password,
|
2186
2181
|
"Некорректный пароль"
|
2187
2182
|
);
|
2188
2183
|
} catch {
|
2189
2184
|
throw new Error();
|
2190
2185
|
}
|
2191
|
-
d.query.method === "reset-password" && await V.updatePassword(
|
2186
|
+
d.query.method === "reset-password" && await V.updatePassword(m.user, d.query.type), d.query.method !== "reset-password" && await V.signup(m.user, d.query.type);
|
2192
2187
|
}
|
2193
2188
|
function o() {
|
2194
|
-
r.push({ name: "User Profile", params: { _id:
|
2195
|
-
}
|
2196
|
-
return (a, l) => (
|
2197
|
-
|
2198
|
-
|
2199
|
-
|
2200
|
-
|
2201
|
-
field:
|
2202
|
-
"onUpdate:field": l[0] || (l[0] = (s) =>
|
2189
|
+
r.push({ name: "User Profile", params: { _id: m.user._id } });
|
2190
|
+
}
|
2191
|
+
return (a, l) => (g(), b("section", pr, [
|
2192
|
+
p("h3", mr, h(f(t)("almostDone")), 1),
|
2193
|
+
f(d).query.method === "reset-password" ? (g(), b("p", hr, h(f(t)("newPasswordPrompt")), 1)) : (g(), b("p", yr, h(f(t)("registrationPasswordPrompt")), 1)),
|
2194
|
+
p("div", gr, [
|
2195
|
+
y(z, {
|
2196
|
+
field: m.user.password,
|
2197
|
+
"onUpdate:field": l[0] || (l[0] = (s) => m.user.password = s),
|
2203
2198
|
type: "password",
|
2204
2199
|
validation: n.value,
|
2205
|
-
placeholder:
|
2200
|
+
placeholder: f(t)("passwordPlaceholder"),
|
2206
2201
|
class: "bg-grey pd-small radius-small mn-thin"
|
2207
2202
|
}, null, 8, ["field", "validation", "placeholder"]),
|
2208
|
-
|
2209
|
-
field:
|
2210
|
-
"onUpdate:field": l[1] || (l[1] = (s) =>
|
2203
|
+
y(z, {
|
2204
|
+
field: m.user.passwordRepeat,
|
2205
|
+
"onUpdate:field": l[1] || (l[1] = (s) => m.user.passwordRepeat = s),
|
2211
2206
|
type: "password",
|
2212
|
-
placeholder:
|
2207
|
+
placeholder: f(t)("repeatPasswordPlaceholder"),
|
2213
2208
|
class: "bg-grey pd-small radius-small mn-thin"
|
2214
2209
|
}, null, 8, ["field", "placeholder"])
|
2215
2210
|
]),
|
2216
|
-
|
2211
|
+
y(G, {
|
2217
2212
|
submit: i,
|
2218
2213
|
callback: o,
|
2219
2214
|
class: "mn-big"
|
2220
2215
|
}, {
|
2221
2216
|
default: w(() => [
|
2222
|
-
|
2217
|
+
f(d).query.method === "reset-password" ? (g(), b("span", vr, h(f(t)("changePasswordBtn")), 1)) : (g(), b("span", br, h(f(t)("registerBtn")), 1))
|
2223
2218
|
]),
|
2224
2219
|
_: 1
|
2225
2220
|
})
|
@@ -2994,19 +2989,19 @@ const Er = /* @__PURE__ */ Rt({
|
|
2994
2989
|
}), Tr = ["tabindex"], Ar = { class: "flex-nowrap flex flex-v-center p-medium vti__selection" }, Fr = ["innerHTML"], Dr = {
|
2995
2990
|
key: 1,
|
2996
2991
|
class: "vti__country-code"
|
2997
|
-
}, Rr = ["onClick", "onMousemove"], Mr = ["innerHTML"],
|
2992
|
+
}, Rr = ["onClick", "onMousemove"], Mr = ["innerHTML"], zr = { key: 1 }, Lr = ["type", "autocomplete", "autofocus", "disabled", "id", "maxlength", "name", "placeholder", "readonly", "required", "tabindex"], xr = {
|
2998
2993
|
key: 0,
|
2999
2994
|
class: "mn-t-thin mn-b-thin invalid-feedback"
|
3000
2995
|
};
|
3001
2996
|
function kr(e, n, t, d, r, i) {
|
3002
2997
|
const o = Mt("click-outside");
|
3003
|
-
return
|
3004
|
-
|
2998
|
+
return g(), b(fe, null, [
|
2999
|
+
p("div", {
|
3005
3000
|
class: K(["vue3-reactive-tel-input", { "bg-fourth-nano": e.validation }, e.$attrs.class, e.rootClass, { disabled: e.disabled }, e.classes]),
|
3006
3001
|
style: q([e.rootStyle, e.styles]),
|
3007
3002
|
ref: "rootElement"
|
3008
3003
|
}, [
|
3009
|
-
I((
|
3004
|
+
I((g(), b("div", {
|
3010
3005
|
class: K([["vti__dropdown", { open: e.open }], "br-solid br-black-transp br-1px radius-medium"]),
|
3011
3006
|
tabindex: e.dropdownOptions.tabindex,
|
3012
3007
|
onKeydown: [
|
@@ -3016,32 +3011,32 @@ function kr(e, n, t, d, r, i) {
|
|
3016
3011
|
onClick: n[1] || (n[1] = (...a) => e.toggleDropdown && e.toggleDropdown(...a)),
|
3017
3012
|
style: q([e.dropdownStyle])
|
3018
3013
|
}, [
|
3019
|
-
|
3020
|
-
e.dropdownOptions.showFlags ? (
|
3014
|
+
p("span", Ar, [
|
3015
|
+
e.dropdownOptions.showFlags ? (g(), b("span", {
|
3021
3016
|
key: 0,
|
3022
3017
|
innerHTML: e.activeCountryFlag,
|
3023
3018
|
class: "mn-r-thin"
|
3024
3019
|
}, null, 8, Fr)) : L("", !0),
|
3025
|
-
e.dropdownOptions.showDialCodeInSelection ? (
|
3020
|
+
e.dropdownOptions.showDialCodeInSelection ? (g(), b("span", Dr, " +" + h(e.activeCountry && e.activeCountry.dialCode), 1)) : L("", !0)
|
3026
3021
|
]),
|
3027
|
-
I(
|
3022
|
+
I(p("ul", {
|
3028
3023
|
ref: "list",
|
3029
3024
|
class: K(["bs-black radius-small vti__dropdown-list", e.dropdownOpenDirection]),
|
3030
3025
|
style: q([e.listStyle])
|
3031
3026
|
}, [
|
3032
|
-
(
|
3027
|
+
(g(!0), b(fe, null, ct(e.sortedCountries, (a, l) => (g(), b("li", {
|
3033
3028
|
class: K(["flex-nowrap flex w-max", ["vti__dropdown-item", e.getItemClass(l, a.iso2)]]),
|
3034
3029
|
key: a.iso2 + (a.preferred ? "-preferred" : ""),
|
3035
3030
|
onClick: (s) => e.choose(a),
|
3036
3031
|
onMousemove: (s) => e.selectedIndex = l
|
3037
3032
|
}, [
|
3038
|
-
e.dropdownOptions.showFlags ? (
|
3033
|
+
e.dropdownOptions.showFlags ? (g(), b("span", {
|
3039
3034
|
key: 0,
|
3040
3035
|
innerHTML: a.flag,
|
3041
3036
|
class: "mn-r-thin"
|
3042
3037
|
}, null, 8, Mr)) : L("", !0),
|
3043
|
-
|
3044
|
-
e.dropdownOptions.showDialCodeInList ? (
|
3038
|
+
p("strong", null, h(a.name), 1),
|
3039
|
+
e.dropdownOptions.showDialCodeInList ? (g(), b("span", zr, " +" + h(a.dialCode), 1)) : L("", !0)
|
3045
3040
|
], 42, Rr))), 128))
|
3046
3041
|
], 6), [
|
3047
3042
|
[X, e.open]
|
@@ -3049,7 +3044,7 @@ function kr(e, n, t, d, r, i) {
|
|
3049
3044
|
], 46, Tr)), [
|
3050
3045
|
[o, e.clickedOutside]
|
3051
3046
|
]),
|
3052
|
-
I(
|
3047
|
+
I(p("input", {
|
3053
3048
|
"onUpdate:modelValue": n[3] || (n[3] = (a) => e.phone = a),
|
3054
3049
|
pattern: "[0-9]*",
|
3055
3050
|
ref: "input",
|
@@ -3073,14 +3068,14 @@ function kr(e, n, t, d, r, i) {
|
|
3073
3068
|
n[7] || (n[7] = ie((...a) => e.onEnter && e.onEnter(...a), ["enter"])),
|
3074
3069
|
n[8] || (n[8] = ie((...a) => e.onSpace && e.onSpace(...a), ["space"]))
|
3075
3070
|
]
|
3076
|
-
}, null, 46,
|
3077
|
-
[
|
3071
|
+
}, null, 46, Lr), [
|
3072
|
+
[zt, e.phone]
|
3078
3073
|
]),
|
3079
|
-
|
3074
|
+
Lt(e.$slots, "default", {}, void 0, !0)
|
3080
3075
|
], 6),
|
3081
|
-
|
3076
|
+
y(R, { name: "fade" }, {
|
3082
3077
|
default: w(() => [
|
3083
|
-
e.validation ? (
|
3078
|
+
e.validation ? (g(), b("div", xr, " * " + h(e.validation.message), 1)) : L("", !0)
|
3084
3079
|
]),
|
3085
3080
|
_: 1
|
3086
3081
|
})
|
@@ -3188,22 +3183,22 @@ const jr = { class: "t-left pd-medium" }, Br = { class: "mn-small" }, Ur = { cla
|
|
3188
3183
|
const r = j(), i = C("phone");
|
3189
3184
|
async function o() {
|
3190
3185
|
try {
|
3191
|
-
i.value === "phone" && await
|
3186
|
+
i.value === "phone" && await M(
|
3192
3187
|
t,
|
3193
3188
|
_e,
|
3194
|
-
|
3189
|
+
m.user.phone,
|
3195
3190
|
"Некорректный телефон"
|
3196
|
-
), i.value === "email" && await
|
3191
|
+
), i.value === "email" && await M(
|
3197
3192
|
d,
|
3198
3193
|
Ce,
|
3199
|
-
|
3194
|
+
m.user.email,
|
3200
3195
|
"Некорректный email"
|
3201
3196
|
);
|
3202
3197
|
} catch {
|
3203
3198
|
throw new Error();
|
3204
3199
|
}
|
3205
3200
|
try {
|
3206
|
-
await V.resetPassword(
|
3201
|
+
await V.resetPassword(m.user, i.value, "reset-password");
|
3207
3202
|
} catch (l) {
|
3208
3203
|
throw console.log(l), new Error();
|
3209
3204
|
}
|
@@ -3211,27 +3206,27 @@ const jr = { class: "t-left pd-medium" }, Br = { class: "mn-small" }, Ur = { cla
|
|
3211
3206
|
function a() {
|
3212
3207
|
r.push({ name: "Enter Code", query: { type: i.value, method: "reset-password" } });
|
3213
3208
|
}
|
3214
|
-
return (l, s) => (
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3209
|
+
return (l, s) => (g(), b("section", jr, [
|
3210
|
+
p("h3", Br, h(f(n)("forgotPasswordTitle")), 1),
|
3211
|
+
p("p", Ur, h(f(n)("instructions")), 1),
|
3212
|
+
p("div", Gr, [
|
3213
|
+
y(we, {
|
3219
3214
|
selected: i.value,
|
3220
|
-
"onUpdate:selected": s[0] || (s[0] = (
|
3215
|
+
"onUpdate:selected": s[0] || (s[0] = (u) => i.value = u),
|
3221
3216
|
tabs: [
|
3222
|
-
{ name:
|
3223
|
-
{ name:
|
3217
|
+
{ name: f(n)("phone"), value: "phone" },
|
3218
|
+
{ name: f(n)("email"), value: "email" }
|
3224
3219
|
]
|
3225
3220
|
}, null, 8, ["selected", "tabs"])
|
3226
3221
|
]),
|
3227
|
-
|
3228
|
-
|
3222
|
+
p("div", null, [
|
3223
|
+
y(R, { name: "slide-fade" }, {
|
3229
3224
|
default: w(() => [
|
3230
|
-
i.value === "phone" ? (
|
3231
|
-
|
3232
|
-
|
3233
|
-
modelValue:
|
3234
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
3225
|
+
i.value === "phone" ? (g(), b("div", Vr, [
|
3226
|
+
p("p", Hr, h(f(n)("smsInfo")), 1),
|
3227
|
+
y(Ee, {
|
3228
|
+
modelValue: m.user.phone,
|
3229
|
+
"onUpdate:modelValue": s[1] || (s[1] = (u) => m.user.phone = u),
|
3235
3230
|
dropdownOptions: {
|
3236
3231
|
showDialCodeInSelection: !0,
|
3237
3232
|
showFlags: !0,
|
@@ -3239,21 +3234,21 @@ const jr = { class: "t-left pd-medium" }, Br = { class: "mn-small" }, Ur = { cla
|
|
3239
3234
|
},
|
3240
3235
|
validation: t.value,
|
3241
3236
|
mode: "national",
|
3242
|
-
inputOptions: { placeholder:
|
3237
|
+
inputOptions: { placeholder: f(n)("phonePlaceholder") },
|
3243
3238
|
class: "bg-grey pd-small radius-small mn-thin"
|
3244
3239
|
}, null, 8, ["modelValue", "validation", "inputOptions"])
|
3245
3240
|
])) : L("", !0)
|
3246
3241
|
]),
|
3247
3242
|
_: 1
|
3248
3243
|
}),
|
3249
|
-
|
3244
|
+
y(R, { name: "slide-fade" }, {
|
3250
3245
|
default: w(() => [
|
3251
|
-
i.value === "email" ? (
|
3252
|
-
|
3253
|
-
|
3254
|
-
field:
|
3255
|
-
"onUpdate:field": s[2] || (s[2] = (
|
3256
|
-
placeholder:
|
3246
|
+
i.value === "email" ? (g(), b("div", Kr, [
|
3247
|
+
p("p", Wr, h(f(n)("emailInfo")), 1),
|
3248
|
+
y(z, {
|
3249
|
+
field: m.user.email,
|
3250
|
+
"onUpdate:field": s[2] || (s[2] = (u) => m.user.email = u),
|
3251
|
+
placeholder: f(n)("emailPlaceholder"),
|
3257
3252
|
validation: d.value,
|
3258
3253
|
class: "bg-grey pd-medium radius-small"
|
3259
3254
|
}, null, 8, ["field", "placeholder", "validation"])
|
@@ -3262,13 +3257,13 @@ const jr = { class: "t-left pd-medium" }, Br = { class: "mn-small" }, Ur = { cla
|
|
3262
3257
|
_: 1
|
3263
3258
|
})
|
3264
3259
|
]),
|
3265
|
-
|
3260
|
+
y(G, {
|
3266
3261
|
submit: o,
|
3267
3262
|
callback: a,
|
3268
3263
|
class: "mn-big"
|
3269
3264
|
}, {
|
3270
3265
|
default: w(() => [
|
3271
|
-
|
3266
|
+
A(h(f(n)("sendCode")), 1)
|
3272
3267
|
]),
|
3273
3268
|
_: 1
|
3274
3269
|
})
|
@@ -3383,22 +3378,22 @@ const Xr = { class: "t-left pd-medium" }, Yr = { class: "mn-small" }, Zr = { cla
|
|
3383
3378
|
const r = j(), i = C("phone");
|
3384
3379
|
async function o() {
|
3385
3380
|
try {
|
3386
|
-
i.value === "phone" && await
|
3381
|
+
i.value === "phone" && await M(
|
3387
3382
|
t,
|
3388
3383
|
_e,
|
3389
|
-
|
3384
|
+
m.user.phone,
|
3390
3385
|
"Некорректный телефон"
|
3391
|
-
), i.value === "email" && await
|
3386
|
+
), i.value === "email" && await M(
|
3392
3387
|
d,
|
3393
3388
|
Ce,
|
3394
|
-
|
3389
|
+
m.user.email,
|
3395
3390
|
"Некорректный email"
|
3396
3391
|
);
|
3397
3392
|
} catch {
|
3398
3393
|
throw new Error();
|
3399
3394
|
}
|
3400
3395
|
try {
|
3401
|
-
await ht(
|
3396
|
+
await ht(m.user, "signup", i.value);
|
3402
3397
|
} catch {
|
3403
3398
|
throw new Error();
|
3404
3399
|
}
|
@@ -3407,28 +3402,28 @@ const Xr = { class: "t-left pd-medium" }, Yr = { class: "mn-small" }, Zr = { cla
|
|
3407
3402
|
r.push({ name: "Enter Code" });
|
3408
3403
|
}
|
3409
3404
|
return (l, s) => {
|
3410
|
-
const
|
3411
|
-
return
|
3412
|
-
|
3413
|
-
|
3414
|
-
|
3415
|
-
|
3405
|
+
const u = be("router-link");
|
3406
|
+
return g(), b("section", Xr, [
|
3407
|
+
p("h3", Yr, h(f(n)("title")), 1),
|
3408
|
+
p("p", Zr, h(f(n)("description")), 1),
|
3409
|
+
p("div", Jr, [
|
3410
|
+
y(we, {
|
3416
3411
|
selected: i.value,
|
3417
|
-
"onUpdate:selected": s[0] || (s[0] = (
|
3412
|
+
"onUpdate:selected": s[0] || (s[0] = ($) => i.value = $),
|
3418
3413
|
tabs: [
|
3419
|
-
{ name:
|
3420
|
-
{ name:
|
3414
|
+
{ name: f(n)("phone"), value: "phone" },
|
3415
|
+
{ name: f(n)("email"), value: "email" }
|
3421
3416
|
]
|
3422
3417
|
}, null, 8, ["selected", "tabs"])
|
3423
3418
|
]),
|
3424
|
-
|
3425
|
-
|
3419
|
+
p("div", Qr, [
|
3420
|
+
y(R, { name: "slide-fade" }, {
|
3426
3421
|
default: w(() => [
|
3427
|
-
I(
|
3428
|
-
|
3429
|
-
|
3430
|
-
modelValue:
|
3431
|
-
"onUpdate:modelValue": s[1] || (s[1] = (
|
3422
|
+
I(p("div", ei, [
|
3423
|
+
p("p", ti, h(f(n)("smsNotice")), 1),
|
3424
|
+
y(Ee, {
|
3425
|
+
modelValue: m.user.phone,
|
3426
|
+
"onUpdate:modelValue": s[1] || (s[1] = ($) => m.user.phone = $),
|
3432
3427
|
dropdownOptions: {
|
3433
3428
|
showDialCodeInSelection: !0,
|
3434
3429
|
showFlags: !0,
|
@@ -3436,7 +3431,7 @@ const Xr = { class: "t-left pd-medium" }, Yr = { class: "mn-small" }, Zr = { cla
|
|
3436
3431
|
},
|
3437
3432
|
validation: t.value,
|
3438
3433
|
mode: "national",
|
3439
|
-
inputOptions: { placeholder:
|
3434
|
+
inputOptions: { placeholder: f(n)("phonePlaceholder") },
|
3440
3435
|
class: "bg-grey pd-small radius-small mn-thin"
|
3441
3436
|
}, null, 8, ["modelValue", "validation", "inputOptions"])
|
3442
3437
|
], 512), [
|
@@ -3445,14 +3440,14 @@ const Xr = { class: "t-left pd-medium" }, Yr = { class: "mn-small" }, Zr = { cla
|
|
3445
3440
|
]),
|
3446
3441
|
_: 1
|
3447
3442
|
}),
|
3448
|
-
|
3443
|
+
y(R, { name: "slide-fade" }, {
|
3449
3444
|
default: w(() => [
|
3450
|
-
I(
|
3451
|
-
|
3452
|
-
|
3453
|
-
field:
|
3454
|
-
"onUpdate:field": s[2] || (s[2] = (
|
3455
|
-
placeholder:
|
3445
|
+
I(p("div", ni, [
|
3446
|
+
p("p", di, h(f(n)("emailNotice")), 1),
|
3447
|
+
y(z, {
|
3448
|
+
field: m.user.email,
|
3449
|
+
"onUpdate:field": s[2] || (s[2] = ($) => m.user.email = $),
|
3450
|
+
placeholder: f(n)("emailPlaceholder"),
|
3456
3451
|
validation: d.value,
|
3457
3452
|
class: "bg-grey pd-medium radius-small"
|
3458
3453
|
}, null, 8, ["field", "placeholder", "validation"])
|
@@ -3463,23 +3458,23 @@ const Xr = { class: "t-left pd-medium" }, Yr = { class: "mn-small" }, Zr = { cla
|
|
3463
3458
|
_: 1
|
3464
3459
|
})
|
3465
3460
|
]),
|
3466
|
-
|
3461
|
+
y(G, {
|
3467
3462
|
submit: o,
|
3468
3463
|
callback: a,
|
3469
3464
|
class: "mn-big"
|
3470
3465
|
}, {
|
3471
3466
|
default: w(() => [
|
3472
|
-
|
3467
|
+
A(h(f(n)("sendCode")), 1)
|
3473
3468
|
]),
|
3474
3469
|
_: 1
|
3475
3470
|
}),
|
3476
|
-
|
3477
|
-
|
3471
|
+
p("div", ri, [
|
3472
|
+
y(u, {
|
3478
3473
|
to: "/auth/signin",
|
3479
3474
|
class: "underline mn-medium d-block t-blue"
|
3480
3475
|
}, {
|
3481
3476
|
default: w(() => [
|
3482
|
-
|
3477
|
+
A(h(f(n)("haveAccount")), 1)
|
3483
3478
|
]),
|
3484
3479
|
_: 1
|
3485
3480
|
})
|
@@ -3609,7 +3604,7 @@ function $t(e) {
|
|
3609
3604
|
}
|
3610
3605
|
});
|
3611
3606
|
}
|
3612
|
-
const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */
|
3607
|
+
const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */ p("br", null, null, -1), li = { class: "t-semi" }, $i = { class: "mn-big" }, ui = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, ci = { class: "" }, fi = { class: "mn-thin radius-small" }, pi = { class: "mn-thin radius-small o-hidden" }, mi = { class: "w-100 mn-big" }, Et = {
|
3613
3608
|
__name: "SignIn",
|
3614
3609
|
setup(e) {
|
3615
3610
|
const { t: n } = H({
|
@@ -3617,32 +3612,32 @@ const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */ f("b
|
|
3617
3612
|
useScope: "local"
|
3618
3613
|
}), t = C(null), d = C(null), r = C(null);
|
3619
3614
|
k();
|
3620
|
-
const i = j(), o = C("phone"), a = Te("APPLE_CLIENTID"), l = Te("APPLE_REDIRECT_URL"), s = (
|
3615
|
+
const i = j(), o = C("phone"), a = Te("APPLE_CLIENTID"), l = Te("APPLE_REDIRECT_URL"), s = (v) => new Promise((_, D) => {
|
3621
3616
|
const P = document.createElement("script");
|
3622
|
-
P.type = "text/javascript", P.src =
|
3617
|
+
P.type = "text/javascript", P.src = v, P.onload = _, P.onerror = D, document.head.appendChild(P);
|
3623
3618
|
});
|
3624
3619
|
ut(async () => {
|
3625
3620
|
await s("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
|
3626
3621
|
});
|
3627
|
-
async function
|
3622
|
+
async function u() {
|
3628
3623
|
try {
|
3629
|
-
o.value === "phone" && await
|
3624
|
+
o.value === "phone" && await M(
|
3630
3625
|
t,
|
3631
3626
|
_e,
|
3632
|
-
|
3627
|
+
m.user.phone,
|
3633
3628
|
"Некорректный телефон"
|
3634
|
-
), o.value === "email" && await
|
3629
|
+
), o.value === "email" && await M(
|
3635
3630
|
r,
|
3636
3631
|
Ce,
|
3637
|
-
|
3632
|
+
m.user.email,
|
3638
3633
|
"Некорректный email"
|
3639
3634
|
);
|
3640
3635
|
} catch {
|
3641
3636
|
throw new Error();
|
3642
3637
|
}
|
3643
|
-
|
3638
|
+
m.user.phone = m.user.phone.number, await V.login(m.user, o.value);
|
3644
3639
|
}
|
3645
|
-
async function
|
3640
|
+
async function $() {
|
3646
3641
|
try {
|
3647
3642
|
window.AppleID.auth.init({
|
3648
3643
|
clientId: a,
|
@@ -3650,51 +3645,51 @@ const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */ f("b
|
|
3650
3645
|
redirectURI: l,
|
3651
3646
|
usePopup: !0
|
3652
3647
|
});
|
3653
|
-
let
|
3654
|
-
|
3655
|
-
} catch (
|
3656
|
-
throw console.error(
|
3648
|
+
let v = await window.AppleID.auth.signIn();
|
3649
|
+
v && (console.log(v), await V.login(v, "apple"));
|
3650
|
+
} catch (v) {
|
3651
|
+
throw console.error(v), new Error("Error during Apple authentication");
|
3657
3652
|
}
|
3658
3653
|
}
|
3659
|
-
function
|
3660
|
-
i.push({ name: "User Profile", params: { _id:
|
3654
|
+
function c() {
|
3655
|
+
i.push({ name: "User Profile", params: { _id: m.user._id } });
|
3661
3656
|
}
|
3662
|
-
return (
|
3663
|
-
const
|
3664
|
-
return
|
3665
|
-
|
3666
|
-
|
3657
|
+
return (v, _) => {
|
3658
|
+
const D = be("router-link");
|
3659
|
+
return g(), b("section", oi, [
|
3660
|
+
p("h3", ai, [
|
3661
|
+
A(h(f(n)("title")) + " ", 1),
|
3667
3662
|
si,
|
3668
|
-
|
3663
|
+
p("span", li, h(f(n)("subtitle")), 1)
|
3669
3664
|
]),
|
3670
|
-
|
3671
|
-
|
3665
|
+
p("p", $i, [
|
3666
|
+
y(D, {
|
3672
3667
|
to: { name: "Sign Up" },
|
3673
3668
|
class: "underline t-second"
|
3674
3669
|
}, {
|
3675
3670
|
default: w(() => [
|
3676
|
-
|
3671
|
+
A(h(f(n)("signup")), 1)
|
3677
3672
|
]),
|
3678
3673
|
_: 1
|
3679
3674
|
})
|
3680
3675
|
]),
|
3681
|
-
|
3682
|
-
|
3676
|
+
p("div", ui, [
|
3677
|
+
y(we, {
|
3683
3678
|
selected: o.value,
|
3684
|
-
"onUpdate:selected":
|
3679
|
+
"onUpdate:selected": _[0] || (_[0] = (P) => o.value = P),
|
3685
3680
|
tabs: [
|
3686
|
-
{ name:
|
3687
|
-
{ name:
|
3681
|
+
{ name: f(n)("phone"), value: "phone" },
|
3682
|
+
{ name: f(n)("email"), value: "email" }
|
3688
3683
|
]
|
3689
3684
|
}, null, 8, ["selected", "tabs"])
|
3690
3685
|
]),
|
3691
|
-
|
3692
|
-
|
3686
|
+
p("div", ci, [
|
3687
|
+
y(R, { name: "slide-fade" }, {
|
3693
3688
|
default: w(() => [
|
3694
|
-
I(
|
3695
|
-
|
3696
|
-
modelValue:
|
3697
|
-
"onUpdate:modelValue":
|
3689
|
+
I(p("div", fi, [
|
3690
|
+
y(Ee, {
|
3691
|
+
modelValue: m.user.phone,
|
3692
|
+
"onUpdate:modelValue": _[1] || (_[1] = (P) => m.user.phone = P),
|
3698
3693
|
dropdownOptions: {
|
3699
3694
|
showDialCodeInSelection: !0,
|
3700
3695
|
showFlags: !0,
|
@@ -3702,7 +3697,7 @@ const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */ f("b
|
|
3702
3697
|
},
|
3703
3698
|
validation: t.value,
|
3704
3699
|
mode: "national",
|
3705
|
-
inputOptions: { placeholder:
|
3700
|
+
inputOptions: { placeholder: f(n)("phonePlaceholder") },
|
3706
3701
|
class: "bg-grey pd-small radius-small mn-thin"
|
3707
3702
|
}, null, 8, ["modelValue", "validation", "inputOptions"])
|
3708
3703
|
], 512), [
|
@@ -3711,13 +3706,13 @@ const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */ f("b
|
|
3711
3706
|
]),
|
3712
3707
|
_: 1
|
3713
3708
|
}),
|
3714
|
-
|
3709
|
+
y(R, { name: "slide-fade" }, {
|
3715
3710
|
default: w(() => [
|
3716
|
-
I(
|
3717
|
-
|
3718
|
-
field:
|
3719
|
-
"onUpdate:field":
|
3720
|
-
placeholder:
|
3711
|
+
I(p("div", pi, [
|
3712
|
+
y(z, {
|
3713
|
+
field: m.user.email,
|
3714
|
+
"onUpdate:field": _[2] || (_[2] = (P) => m.user.email = P),
|
3715
|
+
placeholder: f(n)("emailPlaceholder"),
|
3721
3716
|
validation: r.value,
|
3722
3717
|
class: "bg-grey pd-medium radius-small"
|
3723
3718
|
}, null, 8, ["field", "placeholder", "validation"])
|
@@ -3728,42 +3723,42 @@ const oi = { class: "" }, ai = { class: "mn-medium" }, si = /* @__PURE__ */ f("b
|
|
3728
3723
|
_: 1
|
3729
3724
|
})
|
3730
3725
|
]),
|
3731
|
-
|
3732
|
-
field:
|
3733
|
-
"onUpdate:field":
|
3726
|
+
y(z, {
|
3727
|
+
field: m.user.password,
|
3728
|
+
"onUpdate:field": _[3] || (_[3] = (P) => m.user.password = P),
|
3734
3729
|
type: "password",
|
3735
3730
|
validation: d.value,
|
3736
|
-
placeholder:
|
3731
|
+
placeholder: f(n)("passwordPlaceholder"),
|
3737
3732
|
class: "bg-grey pd-medium radius-small mn-semi"
|
3738
3733
|
}, null, 8, ["field", "validation", "placeholder"]),
|
3739
|
-
|
3740
|
-
|
3734
|
+
p("div", mi, [
|
3735
|
+
y(D, {
|
3741
3736
|
to: "/auth/reset-password",
|
3742
3737
|
class: "underline d-block t-blue"
|
3743
3738
|
}, {
|
3744
3739
|
default: w(() => [
|
3745
|
-
|
3740
|
+
A(h(f(n)("forgotPassword")), 1)
|
3746
3741
|
]),
|
3747
3742
|
_: 1
|
3748
3743
|
})
|
3749
3744
|
]),
|
3750
|
-
|
3751
|
-
submit:
|
3752
|
-
callback:
|
3745
|
+
y(G, {
|
3746
|
+
submit: u,
|
3747
|
+
callback: c,
|
3753
3748
|
class: "mn-thin"
|
3754
3749
|
}, {
|
3755
3750
|
default: w(() => [
|
3756
|
-
|
3751
|
+
A(h(f(n)("signin")), 1)
|
3757
3752
|
]),
|
3758
3753
|
_: 1
|
3759
3754
|
}),
|
3760
|
-
|
3761
|
-
submit:
|
3762
|
-
callback:
|
3755
|
+
y(G, {
|
3756
|
+
submit: $,
|
3757
|
+
callback: c,
|
3763
3758
|
class: "mn-thin bg-black t-white"
|
3764
3759
|
}, {
|
3765
3760
|
default: w(() => [
|
3766
|
-
|
3761
|
+
A(h(f(n)("signin_apple")), 1)
|
3767
3762
|
]),
|
3768
3763
|
_: 1
|
3769
3764
|
})
|