@navservice/usuario 1.51.0 → 1.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es/index.js +1341 -750
- package/package.json +1 -1
package/build/es/index.js
CHANGED
|
@@ -5,11 +5,11 @@ import v4 from "zod/v4";
|
|
|
5
5
|
import react, { createElement, forwardRef, memo, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { QRCodeSVG } from "qrcode.react";
|
|
8
|
+
import { AnimatePresence, motion } from "framer-motion";
|
|
8
9
|
import { createPortal } from "react-dom";
|
|
9
10
|
import { Outlet, useLocation, useNavigate, useSearchParams } from "react-router-dom";
|
|
10
11
|
import { GoogleLogin, GoogleOAuthProvider } from "@react-oauth/google";
|
|
11
12
|
import { $ZodError, parse, parseAsync } from "zod/v4/core";
|
|
12
|
-
import { motion } from "framer-motion";
|
|
13
13
|
var __webpack_require__ = {};
|
|
14
14
|
(()=>{
|
|
15
15
|
__webpack_require__.d = (exports, definition)=>{
|
|
@@ -3728,54 +3728,129 @@ const Shield = createLucideIcon("shield", __iconNode);
|
|
|
3728
3728
|
*
|
|
3729
3729
|
* This source code is licensed under the ISC license.
|
|
3730
3730
|
* See the LICENSE file in the root directory of this source tree.
|
|
3731
|
-
*/ const
|
|
3731
|
+
*/ const qr_code_iconNode = [
|
|
3732
3732
|
[
|
|
3733
|
-
"
|
|
3733
|
+
"rect",
|
|
3734
3734
|
{
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3735
|
+
width: "5",
|
|
3736
|
+
height: "5",
|
|
3737
|
+
x: "3",
|
|
3738
|
+
y: "3",
|
|
3739
|
+
rx: "1",
|
|
3740
|
+
key: "1tu5fj"
|
|
3741
|
+
}
|
|
3742
|
+
],
|
|
3743
|
+
[
|
|
3744
|
+
"rect",
|
|
3745
|
+
{
|
|
3746
|
+
width: "5",
|
|
3747
|
+
height: "5",
|
|
3748
|
+
x: "16",
|
|
3749
|
+
y: "3",
|
|
3750
|
+
rx: "1",
|
|
3751
|
+
key: "1v8r4q"
|
|
3752
|
+
}
|
|
3753
|
+
],
|
|
3754
|
+
[
|
|
3755
|
+
"rect",
|
|
3756
|
+
{
|
|
3757
|
+
width: "5",
|
|
3758
|
+
height: "5",
|
|
3759
|
+
x: "3",
|
|
3760
|
+
y: "16",
|
|
3761
|
+
rx: "1",
|
|
3762
|
+
key: "1x03jg"
|
|
3739
3763
|
}
|
|
3740
3764
|
],
|
|
3741
3765
|
[
|
|
3742
3766
|
"path",
|
|
3743
3767
|
{
|
|
3744
|
-
d: "
|
|
3745
|
-
key: "
|
|
3768
|
+
d: "M21 16h-3a2 2 0 0 0-2 2v3",
|
|
3769
|
+
key: "177gqh"
|
|
3770
|
+
}
|
|
3771
|
+
],
|
|
3772
|
+
[
|
|
3773
|
+
"path",
|
|
3774
|
+
{
|
|
3775
|
+
d: "M21 21v.01",
|
|
3776
|
+
key: "ents32"
|
|
3777
|
+
}
|
|
3778
|
+
],
|
|
3779
|
+
[
|
|
3780
|
+
"path",
|
|
3781
|
+
{
|
|
3782
|
+
d: "M12 7v3a2 2 0 0 1-2 2H7",
|
|
3783
|
+
key: "8crl2c"
|
|
3784
|
+
}
|
|
3785
|
+
],
|
|
3786
|
+
[
|
|
3787
|
+
"path",
|
|
3788
|
+
{
|
|
3789
|
+
d: "M3 12h.01",
|
|
3790
|
+
key: "nlz23k"
|
|
3791
|
+
}
|
|
3792
|
+
],
|
|
3793
|
+
[
|
|
3794
|
+
"path",
|
|
3795
|
+
{
|
|
3796
|
+
d: "M12 3h.01",
|
|
3797
|
+
key: "n36tog"
|
|
3798
|
+
}
|
|
3799
|
+
],
|
|
3800
|
+
[
|
|
3801
|
+
"path",
|
|
3802
|
+
{
|
|
3803
|
+
d: "M12 16v.01",
|
|
3804
|
+
key: "133mhm"
|
|
3805
|
+
}
|
|
3806
|
+
],
|
|
3807
|
+
[
|
|
3808
|
+
"path",
|
|
3809
|
+
{
|
|
3810
|
+
d: "M16 12h1",
|
|
3811
|
+
key: "1slzba"
|
|
3812
|
+
}
|
|
3813
|
+
],
|
|
3814
|
+
[
|
|
3815
|
+
"path",
|
|
3816
|
+
{
|
|
3817
|
+
d: "M21 12v.01",
|
|
3818
|
+
key: "1lwtk9"
|
|
3819
|
+
}
|
|
3820
|
+
],
|
|
3821
|
+
[
|
|
3822
|
+
"path",
|
|
3823
|
+
{
|
|
3824
|
+
d: "M12 21v-1",
|
|
3825
|
+
key: "1880an"
|
|
3746
3826
|
}
|
|
3747
3827
|
]
|
|
3748
3828
|
];
|
|
3749
|
-
const
|
|
3829
|
+
const QrCode = createLucideIcon("qr-code", qr_code_iconNode);
|
|
3750
3830
|
/**
|
|
3751
3831
|
* @license lucide-react v0.544.0 - ISC
|
|
3752
3832
|
*
|
|
3753
3833
|
* This source code is licensed under the ISC license.
|
|
3754
3834
|
* See the LICENSE file in the root directory of this source tree.
|
|
3755
|
-
*/ const
|
|
3756
|
-
[
|
|
3757
|
-
"path",
|
|
3758
|
-
{
|
|
3759
|
-
d: "m2 2 20 20",
|
|
3760
|
-
key: "1ooewy"
|
|
3761
|
-
}
|
|
3762
|
-
],
|
|
3835
|
+
*/ const circle_check_iconNode = [
|
|
3763
3836
|
[
|
|
3764
|
-
"
|
|
3837
|
+
"circle",
|
|
3765
3838
|
{
|
|
3766
|
-
|
|
3767
|
-
|
|
3839
|
+
cx: "12",
|
|
3840
|
+
cy: "12",
|
|
3841
|
+
r: "10",
|
|
3842
|
+
key: "1mglay"
|
|
3768
3843
|
}
|
|
3769
3844
|
],
|
|
3770
3845
|
[
|
|
3771
3846
|
"path",
|
|
3772
3847
|
{
|
|
3773
|
-
d: "
|
|
3774
|
-
key: "
|
|
3848
|
+
d: "m9 12 2 2 4-4",
|
|
3849
|
+
key: "dzmm74"
|
|
3775
3850
|
}
|
|
3776
3851
|
]
|
|
3777
3852
|
];
|
|
3778
|
-
const
|
|
3853
|
+
const CircleCheck = createLucideIcon("circle-check", circle_check_iconNode);
|
|
3779
3854
|
/**
|
|
3780
3855
|
* @license lucide-react v0.544.0 - ISC
|
|
3781
3856
|
*
|
|
@@ -3803,6 +3878,52 @@ const ShieldOff = createLucideIcon("shield-off", shield_off_iconNode);
|
|
|
3803
3878
|
]
|
|
3804
3879
|
];
|
|
3805
3880
|
const Copy = createLucideIcon("copy", copy_iconNode);
|
|
3881
|
+
/**
|
|
3882
|
+
* @license lucide-react v0.544.0 - ISC
|
|
3883
|
+
*
|
|
3884
|
+
* This source code is licensed under the ISC license.
|
|
3885
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
3886
|
+
*/ const key_iconNode = [
|
|
3887
|
+
[
|
|
3888
|
+
"path",
|
|
3889
|
+
{
|
|
3890
|
+
d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",
|
|
3891
|
+
key: "g0fldk"
|
|
3892
|
+
}
|
|
3893
|
+
],
|
|
3894
|
+
[
|
|
3895
|
+
"path",
|
|
3896
|
+
{
|
|
3897
|
+
d: "m21 2-9.6 9.6",
|
|
3898
|
+
key: "1j0ho8"
|
|
3899
|
+
}
|
|
3900
|
+
],
|
|
3901
|
+
[
|
|
3902
|
+
"circle",
|
|
3903
|
+
{
|
|
3904
|
+
cx: "7.5",
|
|
3905
|
+
cy: "15.5",
|
|
3906
|
+
r: "5.5",
|
|
3907
|
+
key: "yqb3hr"
|
|
3908
|
+
}
|
|
3909
|
+
]
|
|
3910
|
+
];
|
|
3911
|
+
const Key = createLucideIcon("key", key_iconNode);
|
|
3912
|
+
/**
|
|
3913
|
+
* @license lucide-react v0.544.0 - ISC
|
|
3914
|
+
*
|
|
3915
|
+
* This source code is licensed under the ISC license.
|
|
3916
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
3917
|
+
*/ const loader_circle_iconNode = [
|
|
3918
|
+
[
|
|
3919
|
+
"path",
|
|
3920
|
+
{
|
|
3921
|
+
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
3922
|
+
key: "13zald"
|
|
3923
|
+
}
|
|
3924
|
+
]
|
|
3925
|
+
];
|
|
3926
|
+
const LoaderCircle = createLucideIcon("loader-circle", loader_circle_iconNode);
|
|
3806
3927
|
/**
|
|
3807
3928
|
* @license lucide-react v0.544.0 - ISC
|
|
3808
3929
|
*
|
|
@@ -4002,10 +4123,99 @@ const PessimisticReveal = /*#__PURE__*/ memo(({ open, children, delay = 500 })=>
|
|
|
4002
4123
|
]
|
|
4003
4124
|
});
|
|
4004
4125
|
});
|
|
4126
|
+
/**
|
|
4127
|
+
* @license lucide-react v0.544.0 - ISC
|
|
4128
|
+
*
|
|
4129
|
+
* This source code is licensed under the ISC license.
|
|
4130
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
4131
|
+
*/ const mail_check_iconNode = [
|
|
4132
|
+
[
|
|
4133
|
+
"path",
|
|
4134
|
+
{
|
|
4135
|
+
d: "M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",
|
|
4136
|
+
key: "12jkf8"
|
|
4137
|
+
}
|
|
4138
|
+
],
|
|
4139
|
+
[
|
|
4140
|
+
"path",
|
|
4141
|
+
{
|
|
4142
|
+
d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",
|
|
4143
|
+
key: "1ocrg3"
|
|
4144
|
+
}
|
|
4145
|
+
],
|
|
4146
|
+
[
|
|
4147
|
+
"path",
|
|
4148
|
+
{
|
|
4149
|
+
d: "m16 19 2 2 4-4",
|
|
4150
|
+
key: "1b14m6"
|
|
4151
|
+
}
|
|
4152
|
+
]
|
|
4153
|
+
];
|
|
4154
|
+
const MailCheck = createLucideIcon("mail-check", mail_check_iconNode);
|
|
4155
|
+
/**
|
|
4156
|
+
* @license lucide-react v0.544.0 - ISC
|
|
4157
|
+
*
|
|
4158
|
+
* This source code is licensed under the ISC license.
|
|
4159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
4160
|
+
*/ const send_iconNode = [
|
|
4161
|
+
[
|
|
4162
|
+
"path",
|
|
4163
|
+
{
|
|
4164
|
+
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
4165
|
+
key: "1ffxy3"
|
|
4166
|
+
}
|
|
4167
|
+
],
|
|
4168
|
+
[
|
|
4169
|
+
"path",
|
|
4170
|
+
{
|
|
4171
|
+
d: "m21.854 2.147-10.94 10.939",
|
|
4172
|
+
key: "12cjpa"
|
|
4173
|
+
}
|
|
4174
|
+
]
|
|
4175
|
+
];
|
|
4176
|
+
const Send = createLucideIcon("send", send_iconNode);
|
|
4177
|
+
/**
|
|
4178
|
+
* @license lucide-react v0.544.0 - ISC
|
|
4179
|
+
*
|
|
4180
|
+
* This source code is licensed under the ISC license.
|
|
4181
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
4182
|
+
*/ const circle_alert_iconNode = [
|
|
4183
|
+
[
|
|
4184
|
+
"circle",
|
|
4185
|
+
{
|
|
4186
|
+
cx: "12",
|
|
4187
|
+
cy: "12",
|
|
4188
|
+
r: "10",
|
|
4189
|
+
key: "1mglay"
|
|
4190
|
+
}
|
|
4191
|
+
],
|
|
4192
|
+
[
|
|
4193
|
+
"line",
|
|
4194
|
+
{
|
|
4195
|
+
x1: "12",
|
|
4196
|
+
x2: "12",
|
|
4197
|
+
y1: "8",
|
|
4198
|
+
y2: "12",
|
|
4199
|
+
key: "1pkeuh"
|
|
4200
|
+
}
|
|
4201
|
+
],
|
|
4202
|
+
[
|
|
4203
|
+
"line",
|
|
4204
|
+
{
|
|
4205
|
+
x1: "12",
|
|
4206
|
+
x2: "12.01",
|
|
4207
|
+
y1: "16",
|
|
4208
|
+
y2: "16",
|
|
4209
|
+
key: "4dfq90"
|
|
4210
|
+
}
|
|
4211
|
+
]
|
|
4212
|
+
];
|
|
4213
|
+
const CircleAlert = createLucideIcon("circle-alert", circle_alert_iconNode);
|
|
4005
4214
|
const TEMPO_COOLDOWN = 60;
|
|
4006
4215
|
const CHAVE_LS = "otp-email-cooldown-ate";
|
|
4007
4216
|
const EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail = /*#__PURE__*/ forwardRef(function({ email, erroExterno, onConfirmarCodigo, title = "Enviar código pelo e-mail", color = "primary" }, ref) {
|
|
4008
4217
|
const [erroEnvio, setErroEnvio] = useState(null);
|
|
4218
|
+
const [sucessoEnvio, setSucessoEnvio] = useState(false);
|
|
4009
4219
|
const [erroOtpInterno, setErroOtpInterno] = useState(null);
|
|
4010
4220
|
const erroOtp = erroExterno ?? erroOtpInterno;
|
|
4011
4221
|
const [segundosRestantes, setSegundosRestantes] = useState(0);
|
|
@@ -4021,6 +4231,7 @@ const EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail = /*#__PURE__*/ forwardRef(f
|
|
|
4021
4231
|
]);
|
|
4022
4232
|
const otpRefs = useRef([]);
|
|
4023
4233
|
const emailValido = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
|
4234
|
+
const [enviando, setEnviando] = useState(false);
|
|
4024
4235
|
useImperativeHandle(ref, ()=>({
|
|
4025
4236
|
reset () {
|
|
4026
4237
|
if (intervaloRef.current) {
|
|
@@ -4029,6 +4240,7 @@ const EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail = /*#__PURE__*/ forwardRef(f
|
|
|
4029
4240
|
}
|
|
4030
4241
|
sessionStorage.removeItem(CHAVE_LS);
|
|
4031
4242
|
setErroEnvio(null);
|
|
4243
|
+
setSucessoEnvio(false);
|
|
4032
4244
|
setErroOtpInterno(null);
|
|
4033
4245
|
setSegundosRestantes(0);
|
|
4034
4246
|
setMostrarOtp(false);
|
|
@@ -4072,24 +4284,25 @@ const EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail = /*#__PURE__*/ forwardRef(f
|
|
|
4072
4284
|
async function enviarCodigo() {
|
|
4073
4285
|
if (!emailValido || segundosRestantes > 0) return;
|
|
4074
4286
|
try {
|
|
4287
|
+
setEnviando(true);
|
|
4075
4288
|
setErroEnvio(null);
|
|
4076
|
-
|
|
4077
|
-
|
|
4289
|
+
setSucessoEnvio(false);
|
|
4290
|
+
await src_utils.api.servidor_pricipal.post({
|
|
4291
|
+
baseURLKey: "PUBLIC_BASE_URL_SERVICE_USUARIO",
|
|
4292
|
+
url: shared_types.Controller.CodigoOtp.EnviarCodigoOtp.route,
|
|
4078
4293
|
data: {
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4294
|
+
data: {
|
|
4295
|
+
codigo_verificacao_otp: {
|
|
4296
|
+
tipo_codigo: "email",
|
|
4297
|
+
email
|
|
4298
|
+
}
|
|
4082
4299
|
}
|
|
4083
4300
|
}
|
|
4084
|
-
};
|
|
4301
|
+
});
|
|
4085
4302
|
const ate = new Date(Date.now() + 1000 * TEMPO_COOLDOWN);
|
|
4086
4303
|
sessionStorage.setItem(CHAVE_LS, ate.toISOString());
|
|
4087
4304
|
iniciarContagem(TEMPO_COOLDOWN);
|
|
4088
|
-
|
|
4089
|
-
baseURLKey: "PUBLIC_BASE_URL_SERVICE_USUARIO",
|
|
4090
|
-
url: shared_types.Controller.CodigoOtp.EnviarCodigoOtp.route,
|
|
4091
|
-
data: dadosBody
|
|
4092
|
-
});
|
|
4305
|
+
setSucessoEnvio(true);
|
|
4093
4306
|
setMostrarOtp(true);
|
|
4094
4307
|
setOtp([
|
|
4095
4308
|
"",
|
|
@@ -4099,9 +4312,14 @@ const EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail = /*#__PURE__*/ forwardRef(f
|
|
|
4099
4312
|
"",
|
|
4100
4313
|
""
|
|
4101
4314
|
]);
|
|
4102
|
-
setTimeout(()=>
|
|
4315
|
+
setTimeout(()=>{
|
|
4316
|
+
otpRefs.current[0]?.focus();
|
|
4317
|
+
setTimeout(()=>setSucessoEnvio(false), 60000);
|
|
4318
|
+
}, 0);
|
|
4103
4319
|
} catch {
|
|
4104
4320
|
setErroEnvio("Não foi possível enviar o código. Tente novamente.");
|
|
4321
|
+
} finally{
|
|
4322
|
+
setEnviando(false);
|
|
4105
4323
|
}
|
|
4106
4324
|
}
|
|
4107
4325
|
function handleOtpChange(i, val) {
|
|
@@ -4110,7 +4328,7 @@ const EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail = /*#__PURE__*/ forwardRef(f
|
|
|
4110
4328
|
const novo = [
|
|
4111
4329
|
...otp
|
|
4112
4330
|
];
|
|
4113
|
-
novo[i] = only;
|
|
4331
|
+
novo[i] = only.slice(-1);
|
|
4114
4332
|
setOtp(novo);
|
|
4115
4333
|
if (only && i < 5) otpRefs.current[i + 1]?.focus();
|
|
4116
4334
|
}
|
|
@@ -4119,16 +4337,9 @@ const EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail = /*#__PURE__*/ forwardRef(f
|
|
|
4119
4337
|
if ("ArrowLeft" === e.key && i > 0) otpRefs.current[i - 1]?.focus();
|
|
4120
4338
|
if ("ArrowRight" === e.key && i < 5) otpRefs.current[i + 1]?.focus();
|
|
4121
4339
|
}
|
|
4122
|
-
function confirmarCodigo() {
|
|
4123
|
-
const codigo = otp.join("");
|
|
4124
|
-
if (6 !== codigo.length) return void setErroOtpInterno("Digite os 6 dígitos do código.");
|
|
4125
|
-
onConfirmarCodigo?.(codigo);
|
|
4126
|
-
}
|
|
4127
|
-
const otpCompleto = 6 === otp.join("").length;
|
|
4128
4340
|
function handleOtpPaste(i, e) {
|
|
4129
4341
|
e.preventDefault();
|
|
4130
|
-
const
|
|
4131
|
-
const numeros = texto.replace(/\D/g, "").slice(0, 6);
|
|
4342
|
+
const numeros = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, 6);
|
|
4132
4343
|
if (!numeros) return;
|
|
4133
4344
|
const novo = [
|
|
4134
4345
|
...otp
|
|
@@ -4138,82 +4349,209 @@ const EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail = /*#__PURE__*/ forwardRef(f
|
|
|
4138
4349
|
const proximoIndex = Math.min(i + numeros.length, 5);
|
|
4139
4350
|
setTimeout(()=>otpRefs.current[proximoIndex]?.focus(), 0);
|
|
4140
4351
|
}
|
|
4352
|
+
function confirmarCodigo() {
|
|
4353
|
+
const codigo = otp.join("");
|
|
4354
|
+
if (6 !== codigo.length) return void setErroOtpInterno("Digite os 6 dígitos.");
|
|
4355
|
+
onConfirmarCodigo?.(codigo);
|
|
4356
|
+
}
|
|
4357
|
+
const otpCompleto = 6 === otp.join("").length;
|
|
4141
4358
|
return /*#__PURE__*/ jsxs("div", {
|
|
4359
|
+
className: "w-full space-y-5",
|
|
4142
4360
|
children: [
|
|
4143
|
-
/*#__PURE__*/ jsx(
|
|
4361
|
+
/*#__PURE__*/ jsx(AnimatePresence, {
|
|
4362
|
+
children: sucessoEnvio && /*#__PURE__*/ jsxs(motion.div, {
|
|
4363
|
+
initial: {
|
|
4364
|
+
opacity: 0,
|
|
4365
|
+
height: 0,
|
|
4366
|
+
y: -10
|
|
4367
|
+
},
|
|
4368
|
+
animate: {
|
|
4369
|
+
opacity: 1,
|
|
4370
|
+
height: "auto",
|
|
4371
|
+
y: 0
|
|
4372
|
+
},
|
|
4373
|
+
exit: {
|
|
4374
|
+
opacity: 0,
|
|
4375
|
+
height: 0
|
|
4376
|
+
},
|
|
4377
|
+
className: "flex items-center gap-3 p-3 rounded-xl bg-emerald-500/10 border border-emerald-500/20 overflow-hidden",
|
|
4378
|
+
children: [
|
|
4379
|
+
/*#__PURE__*/ jsx(MailCheck, {
|
|
4380
|
+
className: "w-5 h-5 text-emerald-500 flex-shrink-0"
|
|
4381
|
+
}),
|
|
4382
|
+
/*#__PURE__*/ jsxs("p", {
|
|
4383
|
+
className: "text-[11px] font-medium text-emerald-600 dark:text-emerald-400 leading-tight",
|
|
4384
|
+
children: [
|
|
4385
|
+
"C\xf3digo enviado para ",
|
|
4386
|
+
/*#__PURE__*/ jsx("span", {
|
|
4387
|
+
className: "font-bold",
|
|
4388
|
+
children: email
|
|
4389
|
+
}),
|
|
4390
|
+
". Verifique sua caixa de entrada."
|
|
4391
|
+
]
|
|
4392
|
+
})
|
|
4393
|
+
]
|
|
4394
|
+
})
|
|
4395
|
+
}),
|
|
4396
|
+
/*#__PURE__*/ jsxs(motion.button, {
|
|
4397
|
+
whileHover: {
|
|
4398
|
+
scale: !emailValido || segundosRestantes > 0 || enviando ? 1 : 1.01
|
|
4399
|
+
},
|
|
4400
|
+
whileTap: {
|
|
4401
|
+
scale: !emailValido || segundosRestantes > 0 || enviando ? 1 : 0.99
|
|
4402
|
+
},
|
|
4144
4403
|
type: "button",
|
|
4145
4404
|
onClick: enviarCodigo,
|
|
4146
|
-
disabled: !emailValido || segundosRestantes > 0,
|
|
4147
|
-
className:
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
children: segundosRestantes > 0 ? `Reenviar em ${segundosRestantes}s` : title
|
|
4155
|
-
}),
|
|
4156
|
-
erroEnvio && /*#__PURE__*/ jsx("p", {
|
|
4157
|
-
className: "text-xs text-error-600 dark:text-error-400 mt-2",
|
|
4158
|
-
children: erroEnvio
|
|
4159
|
-
}),
|
|
4160
|
-
mostrarOtp && /*#__PURE__*/ jsxs("div", {
|
|
4161
|
-
className: "mt-8",
|
|
4405
|
+
disabled: !emailValido || segundosRestantes > 0 || enviando,
|
|
4406
|
+
className: `
|
|
4407
|
+
relative w-full rounded-xl py-3 text-sm font-bold
|
|
4408
|
+
flex items-center justify-center gap-2
|
|
4409
|
+
transition-all duration-300 group
|
|
4410
|
+
${segundosRestantes > 0 ? "bg-transparent border border-slate-200 dark:border-white/10 text-slate-400 cursor-not-allowed" : "bg-transparent border border-blue-500/30 text-blue-500 hover:border-blue-500 dark:text-blue-400 shadow-sm hover:shadow-blue-500/10"}
|
|
4411
|
+
disabled:opacity-50
|
|
4412
|
+
`,
|
|
4162
4413
|
children: [
|
|
4163
|
-
/*#__PURE__*/ jsx("label", {
|
|
4164
|
-
className: "text-sm font-medium text-basic-700 dark:text-basic-300 mb-2 block",
|
|
4165
|
-
children: "Digite o c\xf3digo de verifica\xe7\xe3o enviado para o e-mail"
|
|
4166
|
-
}),
|
|
4167
4414
|
/*#__PURE__*/ jsx("div", {
|
|
4168
|
-
className: "
|
|
4169
|
-
children: otp.map((v, i)=>/*#__PURE__*/ jsx("input", {
|
|
4170
|
-
value: v,
|
|
4171
|
-
ref: (el)=>{
|
|
4172
|
-
otpRefs.current[i] = el;
|
|
4173
|
-
},
|
|
4174
|
-
maxLength: 1,
|
|
4175
|
-
inputMode: "numeric",
|
|
4176
|
-
pattern: "[0-9]*",
|
|
4177
|
-
onChange: (e)=>handleOtpChange(i, e.target.value),
|
|
4178
|
-
onKeyDown: (e)=>handleOtpKeyDown(i, e),
|
|
4179
|
-
onPaste: (e)=>handleOtpPaste(i, e),
|
|
4180
|
-
className: `w-10 h-12 text-center text-lg font-semibold rounded-lg border outline-none transition-all
|
|
4181
|
-
bg-white dark:bg-basic-800
|
|
4182
|
-
text-basic-900 dark:text-basic-100
|
|
4183
|
-
${erroOtp ? "border-error-500 focus:ring-2 ring-error-300 dark:ring-error-600" : "border-default-300 dark:border-default-600 focus:border-primary-500 focus:ring-2 ring-primary-300 dark:ring-primary-600"}`
|
|
4184
|
-
}, i))
|
|
4415
|
+
className: "absolute inset-0 bg-gradient-to-r from-blue-600/0 to-cyan-600/0 group-hover:from-blue-600/5 group-hover:to-cyan-600/5 transition-all duration-500"
|
|
4185
4416
|
}),
|
|
4186
|
-
|
|
4187
|
-
className: "
|
|
4188
|
-
children:
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4417
|
+
enviando ? /*#__PURE__*/ jsxs("div", {
|
|
4418
|
+
className: "flex items-center gap-2",
|
|
4419
|
+
children: [
|
|
4420
|
+
/*#__PURE__*/ jsx(LoaderCircle, {
|
|
4421
|
+
className: "h-4 w-4 animate-spin text-blue-500"
|
|
4422
|
+
}),
|
|
4423
|
+
/*#__PURE__*/ jsx("span", {
|
|
4424
|
+
className: "text-slate-600 dark:text-slate-300",
|
|
4425
|
+
children: "Enviando..."
|
|
4426
|
+
})
|
|
4427
|
+
]
|
|
4428
|
+
}) : segundosRestantes > 0 ? /*#__PURE__*/ jsxs("span", {
|
|
4429
|
+
className: "text-[10px] uppercase tracking-[0.15em] font-black opacity-70",
|
|
4430
|
+
children: [
|
|
4431
|
+
"Dispon\xedvel em ",
|
|
4432
|
+
segundosRestantes,
|
|
4433
|
+
"s"
|
|
4434
|
+
]
|
|
4435
|
+
}) : /*#__PURE__*/ jsxs("div", {
|
|
4436
|
+
className: "relative flex items-center gap-2",
|
|
4437
|
+
children: [
|
|
4438
|
+
/*#__PURE__*/ jsx(Send, {
|
|
4439
|
+
className: "h-4 w-4 text-blue-500 group-hover:text-cyan-500 transition-colors"
|
|
4440
|
+
}),
|
|
4441
|
+
/*#__PURE__*/ jsx("span", {
|
|
4442
|
+
className: "bg-gradient-to-r from-blue-600 to-cyan-600 bg-clip-text text-transparent",
|
|
4443
|
+
children: title
|
|
4444
|
+
})
|
|
4445
|
+
]
|
|
4198
4446
|
})
|
|
4199
4447
|
]
|
|
4200
|
-
})
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4448
|
+
}),
|
|
4449
|
+
/*#__PURE__*/ jsx(AnimatePresence, {
|
|
4450
|
+
children: erroEnvio && /*#__PURE__*/ jsxs(motion.div, {
|
|
4451
|
+
initial: {
|
|
4452
|
+
opacity: 0
|
|
4453
|
+
},
|
|
4454
|
+
animate: {
|
|
4455
|
+
opacity: 1
|
|
4456
|
+
},
|
|
4457
|
+
className: "flex items-center justify-center gap-2 text-red-500",
|
|
4458
|
+
children: [
|
|
4459
|
+
/*#__PURE__*/ jsx(CircleAlert, {
|
|
4460
|
+
className: "w-3.5 h-3.5"
|
|
4461
|
+
}),
|
|
4462
|
+
/*#__PURE__*/ jsx("span", {
|
|
4463
|
+
className: "text-[11px] font-bold",
|
|
4464
|
+
children: erroEnvio
|
|
4465
|
+
})
|
|
4466
|
+
]
|
|
4467
|
+
})
|
|
4468
|
+
}),
|
|
4469
|
+
/*#__PURE__*/ jsx(AnimatePresence, {
|
|
4470
|
+
children: mostrarOtp && /*#__PURE__*/ jsxs(motion.div, {
|
|
4471
|
+
initial: {
|
|
4472
|
+
opacity: 0,
|
|
4473
|
+
height: 0
|
|
4474
|
+
},
|
|
4475
|
+
animate: {
|
|
4476
|
+
opacity: 1,
|
|
4477
|
+
height: "auto"
|
|
4478
|
+
},
|
|
4479
|
+
className: "mt-6 space-y-5 overflow-hidden",
|
|
4480
|
+
children: [
|
|
4481
|
+
/*#__PURE__*/ jsxs("div", {
|
|
4482
|
+
className: "flex items-center gap-4",
|
|
4483
|
+
children: [
|
|
4484
|
+
/*#__PURE__*/ jsx("div", {
|
|
4485
|
+
className: "flex-grow border-t border-slate-200 dark:border-white/10"
|
|
4486
|
+
}),
|
|
4487
|
+
/*#__PURE__*/ jsx("span", {
|
|
4488
|
+
className: "text-[10px] font-black tracking-[0.2em] text-slate-400 uppercase",
|
|
4489
|
+
children: "Validar C\xf3digo"
|
|
4490
|
+
}),
|
|
4491
|
+
/*#__PURE__*/ jsx("div", {
|
|
4492
|
+
className: "flex-grow border-t border-slate-200 dark:border-white/10"
|
|
4493
|
+
})
|
|
4494
|
+
]
|
|
4495
|
+
}),
|
|
4496
|
+
/*#__PURE__*/ jsx("div", {
|
|
4497
|
+
className: "flex justify-between gap-2",
|
|
4498
|
+
children: otp.map((v, i)=>/*#__PURE__*/ jsx("input", {
|
|
4499
|
+
value: v,
|
|
4500
|
+
ref: (el)=>{
|
|
4501
|
+
otpRefs.current[i] = el;
|
|
4502
|
+
},
|
|
4503
|
+
maxLength: 1,
|
|
4504
|
+
inputMode: "numeric",
|
|
4505
|
+
onChange: (e)=>handleOtpChange(i, e.target.value),
|
|
4506
|
+
onKeyDown: (e)=>handleOtpKeyDown(i, e),
|
|
4507
|
+
onPaste: (e)=>handleOtpPaste(i, e),
|
|
4508
|
+
className: `w-full h-14 text-center text-xl font-black rounded-xl border bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-white outline-none transition-all
|
|
4509
|
+
${erroOtp ? "border-red-500 ring-2 ring-red-500/10" : "border-slate-200 dark:border-white/10 focus:border-slate-400 dark:focus:border-slate-500"}`
|
|
4510
|
+
}, i))
|
|
4511
|
+
}),
|
|
4512
|
+
erroOtp && /*#__PURE__*/ jsx("p", {
|
|
4513
|
+
className: "text-[11px] text-red-500 text-center font-bold tracking-tight",
|
|
4514
|
+
children: erroOtp
|
|
4515
|
+
}),
|
|
4516
|
+
/*#__PURE__*/ jsxs(motion.button, {
|
|
4517
|
+
whileHover: {
|
|
4518
|
+
scale: otpCompleto ? 1.01 : 1
|
|
4519
|
+
},
|
|
4520
|
+
whileTap: {
|
|
4521
|
+
scale: otpCompleto ? 0.99 : 1
|
|
4522
|
+
},
|
|
4523
|
+
type: "button",
|
|
4524
|
+
onClick: confirmarCodigo,
|
|
4525
|
+
disabled: !otpCompleto,
|
|
4526
|
+
className: " relative w-full rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3.5 text-sm font-bold flex items-center justify-center gap-2 transition-all shadow-lg shadow-blue-500/25 hover:shadow-blue-500/40 disabled:opacity-50 disabled:cursor-not-allowed disabled:grayscale-[0.5] overflow-hidden ",
|
|
4527
|
+
children: [
|
|
4528
|
+
/*#__PURE__*/ jsx(CircleCheck, {
|
|
4529
|
+
className: "w-4 h-4"
|
|
4530
|
+
}),
|
|
4531
|
+
/*#__PURE__*/ jsx("span", {
|
|
4532
|
+
children: "Confirmar C\xf3digo"
|
|
4533
|
+
})
|
|
4534
|
+
]
|
|
4535
|
+
})
|
|
4536
|
+
]
|
|
4537
|
+
})
|
|
4538
|
+
})
|
|
4539
|
+
]
|
|
4540
|
+
});
|
|
4541
|
+
});
|
|
4542
|
+
const AuthAtivarDesativarAuthenticator = ()=>{
|
|
4543
|
+
const usuario_auth = contexto_contexto_usuario.contexto.jsx.get_user();
|
|
4544
|
+
const otpEmailRef = useRef(null);
|
|
4545
|
+
const [authenticator, setAuthenticator] = useState();
|
|
4546
|
+
const [authenticatorData, setAuthenticatorData] = useState(null);
|
|
4547
|
+
const [codigoOtp, setCodigoOtp] = useState("");
|
|
4548
|
+
const [ativado, setAtivado] = useState(false);
|
|
4549
|
+
const [erro, setErro] = useState("");
|
|
4550
|
+
const [carregando, setCarregando] = useState(false);
|
|
4551
|
+
const [copiado, setCopiado] = useState(false);
|
|
4552
|
+
const handleCopiar = ()=>{
|
|
4553
|
+
if (authenticatorData?.secret) {
|
|
4554
|
+
navigator.clipboard.writeText(authenticatorData.secret);
|
|
4217
4555
|
setCopiado(true);
|
|
4218
4556
|
setTimeout(()=>setCopiado(false), 1800);
|
|
4219
4557
|
}
|
|
@@ -4254,13 +4592,14 @@ const AuthAtivarDesativarAuthenticator = ()=>{
|
|
|
4254
4592
|
if ("SUCCESS" == results.data.code) {
|
|
4255
4593
|
otpEmailRef?.current?.reset();
|
|
4256
4594
|
await buscar_authenticator();
|
|
4257
|
-
} else throw new Error(
|
|
4258
|
-
} catch
|
|
4595
|
+
} else throw new Error();
|
|
4596
|
+
} catch {
|
|
4259
4597
|
setErro("Falha ao desativar o authenticator!");
|
|
4598
|
+
} finally{
|
|
4599
|
+
setCarregando(false);
|
|
4260
4600
|
}
|
|
4261
4601
|
}
|
|
4262
4602
|
async function handleConfirmarCodigoParaAtivarAuthenticator(codigo) {
|
|
4263
|
-
if (!codigo || codigo.length < 6) return void setErro("A codigo deve ter pelo menos 6 caracteres");
|
|
4264
4603
|
setCarregando(true);
|
|
4265
4604
|
setErro("");
|
|
4266
4605
|
try {
|
|
@@ -4282,15 +4621,15 @@ const AuthAtivarDesativarAuthenticator = ()=>{
|
|
|
4282
4621
|
secret: output.data.authenticator.secret_key,
|
|
4283
4622
|
otpAuthUrl: output.data.authenticator.otp_auth_url || ""
|
|
4284
4623
|
});
|
|
4285
|
-
else setErro("Não foi possível gerar o código
|
|
4286
|
-
} catch
|
|
4624
|
+
else setErro("Não foi possível gerar o código");
|
|
4625
|
+
} catch {
|
|
4287
4626
|
setErro("Erro ao verificar código!");
|
|
4288
4627
|
} finally{
|
|
4289
4628
|
setCarregando(false);
|
|
4290
4629
|
}
|
|
4291
4630
|
}
|
|
4292
4631
|
async function handleAtivar() {
|
|
4293
|
-
if (!codigoOtp) return
|
|
4632
|
+
if (!codigoOtp) return setErro("Digite o código OTP");
|
|
4294
4633
|
setCarregando(true);
|
|
4295
4634
|
setErro("");
|
|
4296
4635
|
try {
|
|
@@ -4310,171 +4649,223 @@ const AuthAtivarDesativarAuthenticator = ()=>{
|
|
|
4310
4649
|
if (resp?.status === 200) {
|
|
4311
4650
|
otpEmailRef?.current?.reset();
|
|
4312
4651
|
setAtivado(true);
|
|
4313
|
-
|
|
4652
|
+
await buscar_authenticator();
|
|
4653
|
+
} else setErro("Código inválido");
|
|
4314
4654
|
} catch (e) {
|
|
4315
|
-
setErro("Erro ao ativar
|
|
4655
|
+
setErro("Erro ao ativar");
|
|
4316
4656
|
} finally{
|
|
4317
|
-
await buscar_authenticator();
|
|
4318
4657
|
setCarregando(false);
|
|
4319
4658
|
}
|
|
4320
4659
|
}
|
|
4321
4660
|
return /*#__PURE__*/ jsx("div", {
|
|
4322
|
-
className: "w-full
|
|
4323
|
-
children: /*#__PURE__*/
|
|
4324
|
-
className: "space-y-8",
|
|
4325
|
-
children:
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
children: "Autentica\xe7\xe3o em Dois Fatores"
|
|
4338
|
-
}),
|
|
4339
|
-
/*#__PURE__*/ jsx("p", {
|
|
4340
|
-
className: "text-sm text-basic-600",
|
|
4341
|
-
children: "Proteja sua conta com uma camada extra de seguran\xe7a."
|
|
4342
|
-
})
|
|
4343
|
-
]
|
|
4344
|
-
}) || /*#__PURE__*/ jsx(Fragment, {}),
|
|
4345
|
-
authenticator && !authenticatorData?.secret && /*#__PURE__*/ jsxs("div", {
|
|
4346
|
-
className: "rounded-xl border border-theme-border bg-theme-card p-5 space-y-4",
|
|
4661
|
+
className: "w-full h-full bg-white dark:bg-slate-900/50",
|
|
4662
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
4663
|
+
className: "w-full max-w-md mx-auto px-6 py-8 space-y-8 bg-white dark:bg-slate-900/50",
|
|
4664
|
+
children: /*#__PURE__*/ jsx(AnimatePresence, {
|
|
4665
|
+
mode: "wait",
|
|
4666
|
+
children: authenticatorData?.secret || ativado ? authenticatorData && !ativado ? /*#__PURE__*/ jsxs(motion.div, {
|
|
4667
|
+
initial: {
|
|
4668
|
+
opacity: 0,
|
|
4669
|
+
scale: 0.95
|
|
4670
|
+
},
|
|
4671
|
+
animate: {
|
|
4672
|
+
opacity: 1,
|
|
4673
|
+
scale: 1
|
|
4674
|
+
},
|
|
4675
|
+
className: "space-y-6",
|
|
4347
4676
|
children: [
|
|
4348
4677
|
/*#__PURE__*/ jsxs("div", {
|
|
4349
|
-
className: "
|
|
4678
|
+
className: "text-center space-y-4",
|
|
4350
4679
|
children: [
|
|
4351
|
-
/*#__PURE__*/
|
|
4352
|
-
className: "text-
|
|
4353
|
-
children: "Status"
|
|
4354
|
-
}),
|
|
4355
|
-
authenticator.data.autheticator.ativo ? /*#__PURE__*/ jsxs("span", {
|
|
4356
|
-
className: "inline-flex items-center gap-1 text-success-500 font-medium",
|
|
4680
|
+
/*#__PURE__*/ jsxs("h3", {
|
|
4681
|
+
className: "text-lg font-black text-slate-900 dark:text-white flex items-center justify-center gap-2",
|
|
4357
4682
|
children: [
|
|
4358
|
-
/*#__PURE__*/ jsx(
|
|
4359
|
-
className: "w-
|
|
4683
|
+
/*#__PURE__*/ jsx(QrCode, {
|
|
4684
|
+
className: "w-5 h-5 text-blue-500"
|
|
4360
4685
|
}),
|
|
4361
|
-
"
|
|
4686
|
+
" Vincular Dispositivo"
|
|
4362
4687
|
]
|
|
4363
|
-
})
|
|
4364
|
-
|
|
4688
|
+
}),
|
|
4689
|
+
/*#__PURE__*/ jsx("div", {
|
|
4690
|
+
className: "mx-auto p-4 bg-white rounded-3xl border-4 border-slate-100 dark:border-white/5 shadow-2xl inline-block",
|
|
4691
|
+
children: /*#__PURE__*/ jsx(QRCodeSVG, {
|
|
4692
|
+
value: authenticatorData?.otpAuthUrl,
|
|
4693
|
+
size: 180,
|
|
4694
|
+
level: "H",
|
|
4695
|
+
includeMargin: false
|
|
4696
|
+
})
|
|
4697
|
+
}),
|
|
4698
|
+
/*#__PURE__*/ jsxs("div", {
|
|
4699
|
+
className: "space-y-3",
|
|
4365
4700
|
children: [
|
|
4366
|
-
/*#__PURE__*/ jsx(
|
|
4367
|
-
className: "
|
|
4701
|
+
/*#__PURE__*/ jsx("p", {
|
|
4702
|
+
className: "text-xs text-slate-500 dark:text-slate-400 px-4",
|
|
4703
|
+
children: "Escaneie o c\xf3digo acima ou insira a chave secreta manualmente no seu app."
|
|
4368
4704
|
}),
|
|
4369
|
-
"
|
|
4705
|
+
/*#__PURE__*/ jsxs("div", {
|
|
4706
|
+
className: "flex items-center gap-2 max-w-[280px] mx-auto bg-slate-100 dark:bg-slate-950 p-1.5 rounded-xl border border-slate-200 dark:border-white/5",
|
|
4707
|
+
children: [
|
|
4708
|
+
/*#__PURE__*/ jsx("div", {
|
|
4709
|
+
className: "flex-1 px-3 py-1.5 font-mono text-[11px] truncate text-slate-600 dark:text-slate-300",
|
|
4710
|
+
children: authenticatorData?.secret
|
|
4711
|
+
}),
|
|
4712
|
+
/*#__PURE__*/ jsx("button", {
|
|
4713
|
+
onClick: handleCopiar,
|
|
4714
|
+
className: "p-2 rounded-lg bg-white dark:bg-slate-900 shadow-sm border border-slate-200 dark:border-white/10 hover:text-blue-500 transition-colors",
|
|
4715
|
+
children: copiado ? /*#__PURE__*/ jsx(CircleCheck, {
|
|
4716
|
+
className: "w-4 h-4 text-emerald-500"
|
|
4717
|
+
}) : /*#__PURE__*/ jsx(Copy, {
|
|
4718
|
+
className: "w-4 h-4"
|
|
4719
|
+
})
|
|
4720
|
+
})
|
|
4721
|
+
]
|
|
4722
|
+
})
|
|
4370
4723
|
]
|
|
4371
4724
|
})
|
|
4372
4725
|
]
|
|
4373
4726
|
}),
|
|
4374
|
-
|
|
4375
|
-
className: "
|
|
4727
|
+
/*#__PURE__*/ jsxs("div", {
|
|
4728
|
+
className: "space-y-4",
|
|
4376
4729
|
children: [
|
|
4377
|
-
|
|
4378
|
-
|
|
4730
|
+
/*#__PURE__*/ jsxs("div", {
|
|
4731
|
+
className: "relative group",
|
|
4732
|
+
children: [
|
|
4733
|
+
/*#__PURE__*/ jsx(Key, {
|
|
4734
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 group-focus-within:text-blue-500 transition-colors"
|
|
4735
|
+
}),
|
|
4736
|
+
/*#__PURE__*/ jsx("input", {
|
|
4737
|
+
type: "text",
|
|
4738
|
+
value: codigoOtp,
|
|
4739
|
+
onChange: (e)=>setCodigoOtp(e.target.value),
|
|
4740
|
+
placeholder: "Digite o c\xf3digo de 6 d\xedgitos",
|
|
4741
|
+
className: "w-full pl-10 pr-4 py-3 bg-slate-50 dark:bg-slate-950 border border-slate-200 dark:border-white/10 rounded-xl text-sm outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 transition-all font-bold tracking-[0.2em] text-center"
|
|
4742
|
+
})
|
|
4743
|
+
]
|
|
4744
|
+
}),
|
|
4745
|
+
/*#__PURE__*/ jsx("button", {
|
|
4746
|
+
onClick: handleAtivar,
|
|
4747
|
+
disabled: carregando || codigoOtp.length < 6,
|
|
4748
|
+
className: "w-full py-3.5 rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 text-white font-black text-sm shadow-lg shadow-blue-500/20 hover:shadow-blue-500/40 disabled:opacity-50 transition-all flex items-center justify-center gap-2",
|
|
4749
|
+
children: carregando ? /*#__PURE__*/ jsx(LoaderCircle, {
|
|
4750
|
+
className: "w-4 h-4 animate-spin"
|
|
4751
|
+
}) : "Ativar Agora"
|
|
4752
|
+
})
|
|
4379
4753
|
]
|
|
4380
|
-
})
|
|
4754
|
+
})
|
|
4381
4755
|
]
|
|
4382
|
-
})
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4756
|
+
}, "step-2") : /*#__PURE__*/ jsxs(motion.div, {
|
|
4757
|
+
initial: {
|
|
4758
|
+
opacity: 0,
|
|
4759
|
+
scale: 0.9
|
|
4760
|
+
},
|
|
4761
|
+
animate: {
|
|
4762
|
+
opacity: 1,
|
|
4763
|
+
scale: 1
|
|
4764
|
+
},
|
|
4765
|
+
className: "py-10 text-center space-y-4",
|
|
4766
|
+
children: [
|
|
4767
|
+
/*#__PURE__*/ jsx("div", {
|
|
4768
|
+
className: "mx-auto w-20 h-20 rounded-full bg-emerald-500/10 flex items-center justify-center border border-emerald-500/20",
|
|
4769
|
+
children: /*#__PURE__*/ jsx(CircleCheck, {
|
|
4770
|
+
className: "w-10 h-10 text-emerald-500"
|
|
4771
|
+
})
|
|
4772
|
+
}),
|
|
4773
|
+
/*#__PURE__*/ jsxs("div", {
|
|
4774
|
+
className: "space-y-1",
|
|
4775
|
+
children: [
|
|
4776
|
+
/*#__PURE__*/ jsx("h3", {
|
|
4777
|
+
className: "text-xl font-black text-slate-900 dark:text-white",
|
|
4778
|
+
children: "Tudo pronto!"
|
|
4779
|
+
}),
|
|
4780
|
+
/*#__PURE__*/ jsx("p", {
|
|
4781
|
+
className: "text-sm text-slate-500 dark:text-slate-400 font-medium px-8",
|
|
4782
|
+
children: "Sua conta agora est\xe1 protegida com autentica\xe7\xe3o em duas etapas."
|
|
4783
|
+
})
|
|
4784
|
+
]
|
|
4398
4785
|
})
|
|
4399
|
-
|
|
4400
|
-
}),
|
|
4401
|
-
|
|
4786
|
+
]
|
|
4787
|
+
}, "success") : /*#__PURE__*/ jsxs(motion.div, {
|
|
4788
|
+
initial: {
|
|
4789
|
+
opacity: 0,
|
|
4790
|
+
y: 10
|
|
4791
|
+
},
|
|
4792
|
+
animate: {
|
|
4793
|
+
opacity: 1,
|
|
4794
|
+
y: 0
|
|
4795
|
+
},
|
|
4402
4796
|
className: "space-y-6",
|
|
4403
4797
|
children: [
|
|
4404
4798
|
/*#__PURE__*/ jsxs("div", {
|
|
4405
|
-
className: "text-center space-y-
|
|
4799
|
+
className: "text-center space-y-4",
|
|
4406
4800
|
children: [
|
|
4407
4801
|
/*#__PURE__*/ jsx("div", {
|
|
4408
|
-
className: "mx-auto w-12 h-12 rounded-
|
|
4802
|
+
className: "mx-auto w-12 h-12 rounded-xl bg-slate-100 dark:bg-white/[0.03] flex items-center justify-center border border-slate-200 dark:border-white/10",
|
|
4409
4803
|
children: /*#__PURE__*/ jsx(Shield, {
|
|
4410
|
-
className: "w-6 h-6 text-
|
|
4411
|
-
})
|
|
4412
|
-
}),
|
|
4413
|
-
/*#__PURE__*/ jsx("h1", {
|
|
4414
|
-
className: "text-lg font-semibold",
|
|
4415
|
-
children: "Escaneie o QR Code no app autenticador"
|
|
4416
|
-
}),
|
|
4417
|
-
/*#__PURE__*/ jsx("div", {
|
|
4418
|
-
className: "flex justify-center rounded-xl border border-theme-border bg-theme-bg p-4",
|
|
4419
|
-
children: /*#__PURE__*/ jsx(QRCodeSVG, {
|
|
4420
|
-
value: authenticatorData?.otpAuthUrl,
|
|
4421
|
-
size: 180
|
|
4804
|
+
className: "w-6 h-6 text-slate-400 dark:text-slate-500"
|
|
4422
4805
|
})
|
|
4423
4806
|
}),
|
|
4424
|
-
/*#__PURE__*/ jsx("p", {
|
|
4425
|
-
className: "text-xs text-basic-600",
|
|
4426
|
-
children: "Ou utilize o c\xf3digo manual"
|
|
4427
|
-
}),
|
|
4428
4807
|
/*#__PURE__*/ jsxs("div", {
|
|
4429
|
-
className: "
|
|
4808
|
+
className: "space-y-1",
|
|
4430
4809
|
children: [
|
|
4431
|
-
/*#__PURE__*/ jsx("
|
|
4432
|
-
className: "
|
|
4433
|
-
children:
|
|
4810
|
+
/*#__PURE__*/ jsx("h2", {
|
|
4811
|
+
className: "text-lg font-bold tracking-tight text-slate-800 dark:text-slate-200",
|
|
4812
|
+
children: "Autentica\xe7\xe3o de Seguran\xe7a"
|
|
4434
4813
|
}),
|
|
4435
|
-
/*#__PURE__*/ jsx("
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
children: /*#__PURE__*/ jsx(Copy, {
|
|
4439
|
-
className: "w-4 h-4 text-basic-300"
|
|
4440
|
-
})
|
|
4814
|
+
/*#__PURE__*/ jsx("p", {
|
|
4815
|
+
className: "text-xs text-slate-500 dark:text-slate-500 leading-relaxed max-w-[240px] mx-auto",
|
|
4816
|
+
children: "Proteja seu acesso utilizando um segundo fator de verifica\xe7\xe3o."
|
|
4441
4817
|
})
|
|
4442
4818
|
]
|
|
4443
|
-
}),
|
|
4444
|
-
copiado && /*#__PURE__*/ jsx("span", {
|
|
4445
|
-
className: "text-xs text-primary-400",
|
|
4446
|
-
children: "C\xf3digo copiado com sucesso"
|
|
4447
4819
|
})
|
|
4448
4820
|
]
|
|
4449
4821
|
}),
|
|
4450
|
-
/*#__PURE__*/
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4822
|
+
authenticator && /*#__PURE__*/ jsxs("div", {
|
|
4823
|
+
className: "rounded-2xl border border-slate-200 dark:border-white/10 bg-slate-50 dark:bg-slate-950/50 p-4 space-y-3",
|
|
4824
|
+
children: [
|
|
4825
|
+
/*#__PURE__*/ jsxs("div", {
|
|
4826
|
+
className: "flex items-center justify-between",
|
|
4827
|
+
children: [
|
|
4828
|
+
/*#__PURE__*/ jsx("span", {
|
|
4829
|
+
className: "text-xs font-bold uppercase tracking-wider text-slate-400",
|
|
4830
|
+
children: "Status Atual"
|
|
4831
|
+
}),
|
|
4832
|
+
authenticator.data.autheticator.ativo ? /*#__PURE__*/ jsxs("span", {
|
|
4833
|
+
className: "px-2.5 py-1 rounded-full text-[10px] font-black bg-emerald-500/10 text-emerald-500 border border-emerald-500/20 flex items-center gap-1.5 uppercase",
|
|
4834
|
+
children: [
|
|
4835
|
+
/*#__PURE__*/ jsx("div", {
|
|
4836
|
+
className: "w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"
|
|
4837
|
+
}),
|
|
4838
|
+
" Ativo"
|
|
4839
|
+
]
|
|
4840
|
+
}) : /*#__PURE__*/ jsx("span", {
|
|
4841
|
+
className: "px-2.5 py-1 rounded-full text-[10px] font-black bg-slate-500/10 text-slate-400 border border-slate-500/20 uppercase",
|
|
4842
|
+
children: "Inativo"
|
|
4843
|
+
})
|
|
4844
|
+
]
|
|
4845
|
+
}),
|
|
4846
|
+
authenticator.data.autheticator.ativo && /*#__PURE__*/ jsxs("p", {
|
|
4847
|
+
className: "text-[10px] text-slate-500 font-medium",
|
|
4848
|
+
children: [
|
|
4849
|
+
"Ativado em: ",
|
|
4850
|
+
src_utils.data.SET_SECONDS_TO_DD_MM_YYYY_HH_MM(authenticator.data.autheticator.data_criacao)
|
|
4851
|
+
]
|
|
4852
|
+
})
|
|
4853
|
+
]
|
|
4470
4854
|
}),
|
|
4471
|
-
/*#__PURE__*/ jsx("
|
|
4472
|
-
className: "
|
|
4473
|
-
children:
|
|
4855
|
+
/*#__PURE__*/ jsx("div", {
|
|
4856
|
+
className: "pt-2",
|
|
4857
|
+
children: /*#__PURE__*/ jsx(EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail, {
|
|
4858
|
+
ref: otpEmailRef,
|
|
4859
|
+
erroExterno: erro,
|
|
4860
|
+
title: authenticator?.data?.autheticator?.ativo ? "Desativar Proteção" : "Enviar código para o e-mail",
|
|
4861
|
+
email: usuario_auth?.data?.usuario?.email,
|
|
4862
|
+
color: authenticator?.data?.autheticator?.ativo ? "error" : "primary",
|
|
4863
|
+
onConfirmarCodigo: authenticator?.data?.autheticator?.ativo ? desativarAuthenticator : handleConfirmarCodigoParaAtivarAuthenticator
|
|
4864
|
+
})
|
|
4474
4865
|
})
|
|
4475
4866
|
]
|
|
4476
|
-
})
|
|
4477
|
-
|
|
4867
|
+
}, "step-1")
|
|
4868
|
+
})
|
|
4478
4869
|
})
|
|
4479
4870
|
});
|
|
4480
4871
|
};
|
|
@@ -4542,6 +4933,31 @@ function AuthAtivarDesativarAuthenticatorButton() {
|
|
|
4542
4933
|
]
|
|
4543
4934
|
];
|
|
4544
4935
|
const Lock = createLucideIcon("lock", lock_iconNode);
|
|
4936
|
+
/**
|
|
4937
|
+
* @license lucide-react v0.544.0 - ISC
|
|
4938
|
+
*
|
|
4939
|
+
* This source code is licensed under the ISC license.
|
|
4940
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
4941
|
+
*/ const key_round_iconNode = [
|
|
4942
|
+
[
|
|
4943
|
+
"path",
|
|
4944
|
+
{
|
|
4945
|
+
d: "M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",
|
|
4946
|
+
key: "1s6t7t"
|
|
4947
|
+
}
|
|
4948
|
+
],
|
|
4949
|
+
[
|
|
4950
|
+
"circle",
|
|
4951
|
+
{
|
|
4952
|
+
cx: "16.5",
|
|
4953
|
+
cy: "7.5",
|
|
4954
|
+
r: ".5",
|
|
4955
|
+
fill: "currentColor",
|
|
4956
|
+
key: "w0ekpg"
|
|
4957
|
+
}
|
|
4958
|
+
]
|
|
4959
|
+
];
|
|
4960
|
+
const KeyRound = createLucideIcon("key-round", key_round_iconNode);
|
|
4545
4961
|
const contexto_codigo_otp_store = external_zustand_create()(immer((set)=>({
|
|
4546
4962
|
states: {
|
|
4547
4963
|
recuperar_senha_pelo_app_com_codigo_otp: {
|
|
@@ -4589,12 +5005,10 @@ const RecuperarSenhaComCodigoOtp = ()=>{
|
|
|
4589
5005
|
const usuario_auth = contexto_contexto_usuario.contexto.jsx.get_user();
|
|
4590
5006
|
const otpEmailRef = useRef(null);
|
|
4591
5007
|
const [etapa, setEtapa] = useState(1);
|
|
4592
|
-
const [codigoOtp, setCodigoOtp] = useState("");
|
|
4593
5008
|
const [novaSenha, setNovaSenha] = useState("");
|
|
4594
5009
|
const [confirmacaoSenha, setConfirmacaoSenha] = useState("");
|
|
4595
5010
|
const [erro, setErro] = useState("");
|
|
4596
5011
|
const [sucesso, setSucesso] = useState(false);
|
|
4597
|
-
contexto_contexto_codigo_otp.get_jsx.recuperar_senha_pelo_app_com_codigo_otp.loading;
|
|
4598
5012
|
function avancarParaOtp() {
|
|
4599
5013
|
if (!novaSenha || novaSenha.length < 8) return void setErro("A senha deve ter no mínimo 8 caracteres");
|
|
4600
5014
|
if (novaSenha !== confirmacaoSenha) return void setErro("As senhas não coincidem");
|
|
@@ -4603,7 +5017,6 @@ const RecuperarSenhaComCodigoOtp = ()=>{
|
|
|
4603
5017
|
}
|
|
4604
5018
|
async function confirmarCodigo(codigo) {
|
|
4605
5019
|
if (!codigo || 6 !== codigo.length) return void setErro("Código OTP inválido");
|
|
4606
|
-
setCodigoOtp(codigo);
|
|
4607
5020
|
setErro("");
|
|
4608
5021
|
const data = {
|
|
4609
5022
|
data: {
|
|
@@ -4619,86 +5032,156 @@ const RecuperarSenhaComCodigoOtp = ()=>{
|
|
|
4619
5032
|
setSucesso(true);
|
|
4620
5033
|
} else setErro("Falha ao redefinir a senha");
|
|
4621
5034
|
}
|
|
4622
|
-
if (sucesso) return /*#__PURE__*/ jsxs(
|
|
4623
|
-
|
|
5035
|
+
if (sucesso) return /*#__PURE__*/ jsxs(motion.div, {
|
|
5036
|
+
initial: {
|
|
5037
|
+
opacity: 0,
|
|
5038
|
+
scale: 0.95
|
|
5039
|
+
},
|
|
5040
|
+
animate: {
|
|
5041
|
+
opacity: 1,
|
|
5042
|
+
scale: 1
|
|
5043
|
+
},
|
|
5044
|
+
className: "w-full max-w-md mx-auto px-6 py-12 text-center flex flex-col items-center gap-4",
|
|
4624
5045
|
children: [
|
|
4625
|
-
/*#__PURE__*/ jsx(
|
|
4626
|
-
className: "w-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
children: "Senha alterada com sucesso"
|
|
5046
|
+
/*#__PURE__*/ jsx("div", {
|
|
5047
|
+
className: "w-16 h-16 rounded-full bg-green-500/10 flex items-center justify-center border border-green-500/20",
|
|
5048
|
+
children: /*#__PURE__*/ jsx(CircleCheck, {
|
|
5049
|
+
className: "w-8 h-8 text-green-500"
|
|
5050
|
+
})
|
|
4631
5051
|
}),
|
|
4632
|
-
/*#__PURE__*/ jsx("p", {
|
|
4633
|
-
className: "text-xs text-basic-600",
|
|
4634
|
-
children: "Voc\xea j\xe1 pode acessar sua conta com a nova senha"
|
|
4635
|
-
})
|
|
4636
|
-
]
|
|
4637
|
-
});
|
|
4638
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
4639
|
-
className: "w-full max-w-md mx-auto px-6 py-8 text-theme-text space-y-8",
|
|
4640
|
-
children: [
|
|
4641
5052
|
/*#__PURE__*/ jsxs("div", {
|
|
4642
|
-
className: "
|
|
5053
|
+
className: "space-y-1",
|
|
4643
5054
|
children: [
|
|
4644
|
-
/*#__PURE__*/ jsx("
|
|
4645
|
-
className: "
|
|
4646
|
-
children:
|
|
4647
|
-
className: "w-6 h-6 text-primary-400"
|
|
4648
|
-
})
|
|
4649
|
-
}),
|
|
4650
|
-
/*#__PURE__*/ jsx("h1", {
|
|
4651
|
-
className: "text-lg font-semibold",
|
|
4652
|
-
children: 1 === etapa ? "Definir nova senha" : "Confirmar código"
|
|
5055
|
+
/*#__PURE__*/ jsx("h3", {
|
|
5056
|
+
className: "text-xl font-black text-slate-900 dark:text-white",
|
|
5057
|
+
children: "Senha alterada!"
|
|
4653
5058
|
}),
|
|
4654
5059
|
/*#__PURE__*/ jsx("p", {
|
|
4655
|
-
className: "text-sm text-
|
|
4656
|
-
children:
|
|
5060
|
+
className: "text-sm text-slate-500 dark:text-slate-400 font-medium",
|
|
5061
|
+
children: "Voc\xea j\xe1 pode acessar sua conta com a nova senha."
|
|
4657
5062
|
})
|
|
4658
5063
|
]
|
|
4659
|
-
})
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
/*#__PURE__*/ jsx(
|
|
4673
|
-
|
|
4674
|
-
placeholder: "Confirmar nova senha",
|
|
4675
|
-
value: confirmacaoSenha,
|
|
4676
|
-
onChange: (e)=>setConfirmacaoSenha(e.target.value),
|
|
4677
|
-
className: "w-full rounded-lg border border-theme-border bg-theme-bg px-4 py-2.5 text-sm focus:ring-2 focus:ring-primary-600 outline-none"
|
|
5064
|
+
})
|
|
5065
|
+
]
|
|
5066
|
+
});
|
|
5067
|
+
return /*#__PURE__*/ jsx("div", {
|
|
5068
|
+
className: "w-full h-full bg-white dark:bg-slate-900/50",
|
|
5069
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
5070
|
+
className: "w-full max-w-md mx-auto px-6 py-8 space-y-8",
|
|
5071
|
+
children: [
|
|
5072
|
+
/*#__PURE__*/ jsxs("div", {
|
|
5073
|
+
className: "text-center space-y-4",
|
|
5074
|
+
children: [
|
|
5075
|
+
/*#__PURE__*/ jsx("div", {
|
|
5076
|
+
className: "mx-auto w-12 h-12 rounded-xl bg-slate-100 dark:bg-white/[0.03] flex items-center justify-center border border-slate-200 dark:border-white/10",
|
|
5077
|
+
children: /*#__PURE__*/ jsx(Lock, {
|
|
5078
|
+
className: "w-5 h-5 text-slate-400 dark:text-slate-500"
|
|
4678
5079
|
})
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
5080
|
+
}),
|
|
5081
|
+
/*#__PURE__*/ jsxs("div", {
|
|
5082
|
+
className: "space-y-1",
|
|
5083
|
+
children: [
|
|
5084
|
+
/*#__PURE__*/ jsx("h2", {
|
|
5085
|
+
className: "text-lg font-bold tracking-tight text-slate-800 dark:text-slate-200",
|
|
5086
|
+
children: 1 === etapa ? "Definir nova senha" : "Confirmar código"
|
|
5087
|
+
}),
|
|
5088
|
+
/*#__PURE__*/ jsx("p", {
|
|
5089
|
+
className: "text-xs text-slate-500 dark:text-slate-500 leading-relaxed max-w-[220px] mx-auto font-medium",
|
|
5090
|
+
children: 1 === etapa ? "Escolha uma senha forte para garantir a segurança da sua conta." : "Insira o código enviado para validar a sua identidade."
|
|
5091
|
+
})
|
|
5092
|
+
]
|
|
5093
|
+
})
|
|
5094
|
+
]
|
|
5095
|
+
}),
|
|
5096
|
+
1 === etapa && /*#__PURE__*/ jsxs(motion.div, {
|
|
5097
|
+
initial: {
|
|
5098
|
+
opacity: 0,
|
|
5099
|
+
x: -10
|
|
5100
|
+
},
|
|
5101
|
+
animate: {
|
|
5102
|
+
opacity: 1,
|
|
5103
|
+
x: 0
|
|
5104
|
+
},
|
|
5105
|
+
className: "space-y-5",
|
|
5106
|
+
children: [
|
|
5107
|
+
/*#__PURE__*/ jsxs("div", {
|
|
5108
|
+
className: "space-y-3",
|
|
5109
|
+
children: [
|
|
5110
|
+
/*#__PURE__*/ jsxs("div", {
|
|
5111
|
+
className: "relative group",
|
|
5112
|
+
children: [
|
|
5113
|
+
/*#__PURE__*/ jsx(KeyRound, {
|
|
5114
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 group-focus-within:text-blue-500 transition-colors"
|
|
5115
|
+
}),
|
|
5116
|
+
/*#__PURE__*/ jsx("input", {
|
|
5117
|
+
type: "password",
|
|
5118
|
+
placeholder: "Nova senha",
|
|
5119
|
+
value: novaSenha,
|
|
5120
|
+
onChange: (e)=>setNovaSenha(e.target.value),
|
|
5121
|
+
className: "w-full rounded-xl pl-10 pr-4 py-3 text-sm border border-slate-200 bg-slate-50 text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 dark:border-white/10 dark:bg-slate-950 dark:text-slate-100 transition-all"
|
|
5122
|
+
})
|
|
5123
|
+
]
|
|
5124
|
+
}),
|
|
5125
|
+
/*#__PURE__*/ jsxs("div", {
|
|
5126
|
+
className: "relative group",
|
|
5127
|
+
children: [
|
|
5128
|
+
/*#__PURE__*/ jsx(Lock, {
|
|
5129
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 group-focus-within:text-blue-500 transition-colors"
|
|
5130
|
+
}),
|
|
5131
|
+
/*#__PURE__*/ jsx("input", {
|
|
5132
|
+
type: "password",
|
|
5133
|
+
placeholder: "Confirmar nova senha",
|
|
5134
|
+
value: confirmacaoSenha,
|
|
5135
|
+
onChange: (e)=>setConfirmacaoSenha(e.target.value),
|
|
5136
|
+
className: "w-full rounded-xl pl-10 pr-4 py-3 text-sm border border-slate-200 bg-slate-50 text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 dark:border-white/10 dark:bg-slate-950 dark:text-slate-100 transition-all"
|
|
5137
|
+
})
|
|
5138
|
+
]
|
|
5139
|
+
})
|
|
5140
|
+
]
|
|
5141
|
+
}),
|
|
5142
|
+
erro && /*#__PURE__*/ jsx("p", {
|
|
5143
|
+
className: "text-xs text-red-500 font-semibold",
|
|
5144
|
+
children: erro
|
|
5145
|
+
}),
|
|
5146
|
+
/*#__PURE__*/ jsxs(motion.button, {
|
|
5147
|
+
whileHover: {
|
|
5148
|
+
scale: 1.01
|
|
5149
|
+
},
|
|
5150
|
+
whileTap: {
|
|
5151
|
+
scale: 0.99
|
|
5152
|
+
},
|
|
5153
|
+
onClick: avancarParaOtp,
|
|
5154
|
+
className: "w-full inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 py-3.5 text-sm font-bold text-white shadow-lg shadow-blue-500/25 transition-all hover:shadow-blue-500/40",
|
|
5155
|
+
children: [
|
|
5156
|
+
/*#__PURE__*/ jsx("span", {
|
|
5157
|
+
children: "Pr\xf3ximo passo"
|
|
5158
|
+
}),
|
|
5159
|
+
/*#__PURE__*/ jsx(ChevronRight, {
|
|
5160
|
+
className: "h-4 w-4"
|
|
5161
|
+
})
|
|
5162
|
+
]
|
|
5163
|
+
})
|
|
5164
|
+
]
|
|
5165
|
+
}),
|
|
5166
|
+
2 === etapa && /*#__PURE__*/ jsx(motion.div, {
|
|
5167
|
+
initial: {
|
|
5168
|
+
opacity: 0,
|
|
5169
|
+
x: 10
|
|
5170
|
+
},
|
|
5171
|
+
animate: {
|
|
5172
|
+
opacity: 1,
|
|
5173
|
+
x: 0
|
|
5174
|
+
},
|
|
5175
|
+
children: /*#__PURE__*/ jsx(EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail, {
|
|
5176
|
+
ref: otpEmailRef,
|
|
5177
|
+
email: usuario_auth?.data?.usuario?.email,
|
|
5178
|
+
erroExterno: erro,
|
|
5179
|
+
title: "Confirmar altera\xe7\xe3o",
|
|
5180
|
+
onConfirmarCodigo: confirmarCodigo
|
|
4689
5181
|
})
|
|
4690
|
-
]
|
|
4691
|
-
}),
|
|
4692
|
-
2 === etapa && /*#__PURE__*/ jsx(Fragment, {
|
|
4693
|
-
children: /*#__PURE__*/ jsx(EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail, {
|
|
4694
|
-
ref: otpEmailRef,
|
|
4695
|
-
email: usuario_auth?.data?.usuario?.email,
|
|
4696
|
-
erroExterno: erro,
|
|
4697
|
-
title: "Enviar c\xf3digo de confirma\xe7\xe3o",
|
|
4698
|
-
onConfirmarCodigo: confirmarCodigo
|
|
4699
5182
|
})
|
|
4700
|
-
|
|
4701
|
-
|
|
5183
|
+
]
|
|
5184
|
+
})
|
|
4702
5185
|
});
|
|
4703
5186
|
};
|
|
4704
5187
|
function RecuperarSenhaComCodigoOtpButton() {
|
|
@@ -4735,8 +5218,95 @@ function RecuperarSenhaComCodigoOtpButton() {
|
|
|
4735
5218
|
]
|
|
4736
5219
|
});
|
|
4737
5220
|
}
|
|
5221
|
+
/**
|
|
5222
|
+
* @license lucide-react v0.544.0 - ISC
|
|
5223
|
+
*
|
|
5224
|
+
* This source code is licensed under the ISC license.
|
|
5225
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
5226
|
+
*/ const sparkles_iconNode = [
|
|
5227
|
+
[
|
|
5228
|
+
"path",
|
|
5229
|
+
{
|
|
5230
|
+
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
5231
|
+
key: "1s2grr"
|
|
5232
|
+
}
|
|
5233
|
+
],
|
|
5234
|
+
[
|
|
5235
|
+
"path",
|
|
5236
|
+
{
|
|
5237
|
+
d: "M20 2v4",
|
|
5238
|
+
key: "1rf3ol"
|
|
5239
|
+
}
|
|
5240
|
+
],
|
|
5241
|
+
[
|
|
5242
|
+
"path",
|
|
5243
|
+
{
|
|
5244
|
+
d: "M22 4h-4",
|
|
5245
|
+
key: "gwowj6"
|
|
5246
|
+
}
|
|
5247
|
+
],
|
|
5248
|
+
[
|
|
5249
|
+
"circle",
|
|
5250
|
+
{
|
|
5251
|
+
cx: "4",
|
|
5252
|
+
cy: "20",
|
|
5253
|
+
r: "2",
|
|
5254
|
+
key: "6kqj1y"
|
|
5255
|
+
}
|
|
5256
|
+
]
|
|
5257
|
+
];
|
|
5258
|
+
const Sparkles = createLucideIcon("sparkles", sparkles_iconNode);
|
|
5259
|
+
/**
|
|
5260
|
+
* @license lucide-react v0.544.0 - ISC
|
|
5261
|
+
*
|
|
5262
|
+
* This source code is licensed under the ISC license.
|
|
5263
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
5264
|
+
*/ const mail_iconNode = [
|
|
5265
|
+
[
|
|
5266
|
+
"path",
|
|
5267
|
+
{
|
|
5268
|
+
d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",
|
|
5269
|
+
key: "132q7q"
|
|
5270
|
+
}
|
|
5271
|
+
],
|
|
5272
|
+
[
|
|
5273
|
+
"rect",
|
|
5274
|
+
{
|
|
5275
|
+
x: "2",
|
|
5276
|
+
y: "4",
|
|
5277
|
+
width: "20",
|
|
5278
|
+
height: "16",
|
|
5279
|
+
rx: "2",
|
|
5280
|
+
key: "izxlao"
|
|
5281
|
+
}
|
|
5282
|
+
]
|
|
5283
|
+
];
|
|
5284
|
+
const Mail = createLucideIcon("mail", mail_iconNode);
|
|
5285
|
+
/**
|
|
5286
|
+
* @license lucide-react v0.544.0 - ISC
|
|
5287
|
+
*
|
|
5288
|
+
* This source code is licensed under the ISC license.
|
|
5289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
5290
|
+
*/ const arrow_left_iconNode = [
|
|
5291
|
+
[
|
|
5292
|
+
"path",
|
|
5293
|
+
{
|
|
5294
|
+
d: "m12 19-7-7 7-7",
|
|
5295
|
+
key: "1l729n"
|
|
5296
|
+
}
|
|
5297
|
+
],
|
|
5298
|
+
[
|
|
5299
|
+
"path",
|
|
5300
|
+
{
|
|
5301
|
+
d: "M19 12H5",
|
|
5302
|
+
key: "x3x0zl"
|
|
5303
|
+
}
|
|
5304
|
+
]
|
|
5305
|
+
];
|
|
5306
|
+
const ArrowLeft = createLucideIcon("arrow-left", arrow_left_iconNode);
|
|
4738
5307
|
function EsqueciMinhaSenha({ email: emailProp }) {
|
|
4739
5308
|
const location = useLocation();
|
|
5309
|
+
const navigate = useNavigate();
|
|
4740
5310
|
const [search] = useSearchParams();
|
|
4741
5311
|
const emailDaNavegacao = location.state?.email;
|
|
4742
5312
|
const emailDaQuery = search.get("email") ?? void 0;
|
|
@@ -4785,67 +5355,137 @@ function EsqueciMinhaSenha({ email: emailProp }) {
|
|
|
4785
5355
|
setErroOtp("Erro ao verificar código otp!");
|
|
4786
5356
|
}
|
|
4787
5357
|
}
|
|
4788
|
-
return /*#__PURE__*/
|
|
4789
|
-
className: "flex min-h-
|
|
4790
|
-
children:
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
5358
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
5359
|
+
className: "flex min-h-dvh items-center justify-center p-4 relative overflow-hidden bg-slate-50 text-slate-900 dark:bg-[#020617] dark:text-slate-100",
|
|
5360
|
+
children: [
|
|
5361
|
+
/*#__PURE__*/ jsx("div", {
|
|
5362
|
+
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(circle_at_top_right,_var(--tw-gradient-stops))] from-blue-600/10 via-transparent to-transparent"
|
|
5363
|
+
}),
|
|
5364
|
+
/*#__PURE__*/ jsx("div", {
|
|
5365
|
+
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(circle_at_bottom_left,_var(--tw-gradient-stops))] from-cyan-600/10 via-transparent to-transparent"
|
|
5366
|
+
}),
|
|
5367
|
+
/*#__PURE__*/ jsxs(motion.div, {
|
|
5368
|
+
initial: {
|
|
5369
|
+
opacity: 0,
|
|
5370
|
+
y: 20
|
|
5371
|
+
},
|
|
5372
|
+
animate: {
|
|
5373
|
+
opacity: 1,
|
|
5374
|
+
y: 0
|
|
5375
|
+
},
|
|
5376
|
+
transition: {
|
|
5377
|
+
duration: 0.5
|
|
5378
|
+
},
|
|
5379
|
+
className: "w-full max-w-md flex flex-col gap-6 relative z-10",
|
|
4794
5380
|
children: [
|
|
5381
|
+
/*#__PURE__*/ jsx("div", {
|
|
5382
|
+
className: "flex justify-center",
|
|
5383
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
5384
|
+
className: "inline-flex items-center gap-2 rounded-full px-4 py-2 backdrop-blur-md border border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
5385
|
+
children: [
|
|
5386
|
+
/*#__PURE__*/ jsx(motion.div, {
|
|
5387
|
+
animate: {
|
|
5388
|
+
rotate: 360
|
|
5389
|
+
},
|
|
5390
|
+
transition: {
|
|
5391
|
+
duration: 3,
|
|
5392
|
+
repeat: 1 / 0,
|
|
5393
|
+
ease: "linear"
|
|
5394
|
+
},
|
|
5395
|
+
children: /*#__PURE__*/ jsx(Sparkles, {
|
|
5396
|
+
className: "h-4 w-4"
|
|
5397
|
+
})
|
|
5398
|
+
}),
|
|
5399
|
+
/*#__PURE__*/ jsx("span", {
|
|
5400
|
+
className: "text-sm font-bold tracking-wide",
|
|
5401
|
+
children: "AuthFlow"
|
|
5402
|
+
})
|
|
5403
|
+
]
|
|
5404
|
+
})
|
|
5405
|
+
}),
|
|
4795
5406
|
/*#__PURE__*/ jsxs("div", {
|
|
4796
|
-
className: "text-center
|
|
5407
|
+
className: "text-center",
|
|
4797
5408
|
children: [
|
|
4798
|
-
/*#__PURE__*/ jsx("
|
|
4799
|
-
className: "text-
|
|
4800
|
-
children: "
|
|
4801
|
-
}),
|
|
4802
|
-
/*#__PURE__*/ jsx("p", {
|
|
4803
|
-
className: "text-sm text-basic-600 dark:text-basic-400",
|
|
4804
|
-
children: "Digite o e-mail da conta para entrar sem senha!"
|
|
5409
|
+
/*#__PURE__*/ jsx("h2", {
|
|
5410
|
+
className: "text-3xl font-black tracking-tight bg-gradient-to-r from-blue-400 via-blue-500 to-cyan-400 bg-clip-text text-transparent",
|
|
5411
|
+
children: "Recuperar Acesso"
|
|
4805
5412
|
}),
|
|
4806
5413
|
/*#__PURE__*/ jsx("p", {
|
|
4807
|
-
className: "text-
|
|
4808
|
-
children: "
|
|
5414
|
+
className: "text-sm mt-2 text-slate-500 dark:text-slate-400 font-medium px-6",
|
|
5415
|
+
children: "Digite seu e-mail para receber um c\xf3digo de entrada sem senha."
|
|
4809
5416
|
})
|
|
4810
5417
|
]
|
|
4811
5418
|
}),
|
|
4812
|
-
/*#__PURE__*/
|
|
4813
|
-
className: "
|
|
4814
|
-
children:
|
|
4815
|
-
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
5419
|
+
/*#__PURE__*/ jsxs("div", {
|
|
5420
|
+
className: " relative rounded-2xl p-7 flex flex-col gap-6 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
|
|
5421
|
+
children: [
|
|
5422
|
+
/*#__PURE__*/ jsxs("div", {
|
|
5423
|
+
className: "flex flex-col gap-1.5",
|
|
5424
|
+
children: [
|
|
5425
|
+
/*#__PURE__*/ jsx("label", {
|
|
5426
|
+
htmlFor: "email",
|
|
5427
|
+
className: "text-sm font-bold text-slate-700 dark:text-slate-200",
|
|
5428
|
+
children: "E-mail de Cadastro"
|
|
5429
|
+
}),
|
|
5430
|
+
/*#__PURE__*/ jsxs("div", {
|
|
5431
|
+
className: "relative group",
|
|
5432
|
+
children: [
|
|
5433
|
+
/*#__PURE__*/ jsx(Mail, {
|
|
5434
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 group-focus-within:text-blue-500 transition-colors"
|
|
5435
|
+
}),
|
|
5436
|
+
/*#__PURE__*/ jsx("input", {
|
|
5437
|
+
ref: inputRef,
|
|
5438
|
+
id: "email",
|
|
5439
|
+
type: "email",
|
|
5440
|
+
placeholder: "seu@email.com",
|
|
5441
|
+
value: emailBloqueado ? emailDosParametros : emailInput,
|
|
5442
|
+
disabled: emailBloqueado,
|
|
5443
|
+
onChange: (e)=>{
|
|
5444
|
+
if (emailBloqueado) return;
|
|
5445
|
+
setEmailInput(e.target.value);
|
|
5446
|
+
if (erroEmail && emailValido(e.target.value)) setErroEmail(null);
|
|
5447
|
+
},
|
|
5448
|
+
onBlur: ()=>!emailBloqueado && validarEmailAtual(),
|
|
5449
|
+
autoComplete: "email",
|
|
5450
|
+
className: `w-full rounded-xl pl-10 pr-4 py-3 text-sm border bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 transition-all outline-none
|
|
5451
|
+
${erroEmail ? "border-red-500 ring-2 ring-red-500/10 focus:border-red-500" : "border-slate-200 dark:border-white/10 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500"} ${emailBloqueado ? "opacity-70 cursor-not-allowed border-blue-500/30 bg-blue-500/5" : ""}`
|
|
5452
|
+
})
|
|
5453
|
+
]
|
|
5454
|
+
}),
|
|
5455
|
+
erroEmail && /*#__PURE__*/ jsx("p", {
|
|
5456
|
+
className: "text-xs text-red-500 font-semibold",
|
|
5457
|
+
children: erroEmail
|
|
5458
|
+
})
|
|
5459
|
+
]
|
|
5460
|
+
}),
|
|
5461
|
+
/*#__PURE__*/ jsx("div", {
|
|
5462
|
+
className: "mt-2",
|
|
5463
|
+
children: /*#__PURE__*/ jsx(EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail, {
|
|
5464
|
+
email: emailEfetivo,
|
|
5465
|
+
onConfirmarCodigo: confirmarCodigo,
|
|
5466
|
+
erroExterno: erroOtp,
|
|
5467
|
+
title: "Enviar C\xf3digo de Acesso"
|
|
5468
|
+
})
|
|
5469
|
+
}),
|
|
5470
|
+
/*#__PURE__*/ jsxs("button", {
|
|
5471
|
+
onClick: ()=>navigate(-1),
|
|
5472
|
+
className: "flex items-center justify-center gap-2 text-sm font-bold text-slate-500 hover:text-blue-600 dark:text-slate-400 dark:hover:text-blue-400 transition-colors mt-2",
|
|
5473
|
+
children: [
|
|
5474
|
+
/*#__PURE__*/ jsx(ArrowLeft, {
|
|
5475
|
+
className: "h-4 w-4"
|
|
5476
|
+
}),
|
|
5477
|
+
"Voltar para o Login"
|
|
5478
|
+
]
|
|
5479
|
+
})
|
|
5480
|
+
]
|
|
4837
5481
|
}),
|
|
4838
|
-
/*#__PURE__*/ jsx("
|
|
4839
|
-
className: "
|
|
4840
|
-
children:
|
|
4841
|
-
email: emailEfetivo,
|
|
4842
|
-
onConfirmarCodigo: confirmarCodigo,
|
|
4843
|
-
erroExterno: erroOtp
|
|
4844
|
-
})
|
|
5482
|
+
/*#__PURE__*/ jsx("p", {
|
|
5483
|
+
className: "text-center text-xs text-slate-400 dark:text-slate-500 px-8",
|
|
5484
|
+
children: "Se voc\xea n\xe3o receber o e-mail em alguns minutos, verifique sua caixa de spam."
|
|
4845
5485
|
})
|
|
4846
5486
|
]
|
|
4847
5487
|
})
|
|
4848
|
-
|
|
5488
|
+
]
|
|
4849
5489
|
});
|
|
4850
5490
|
}
|
|
4851
5491
|
function AuthGoogle({ mode }) {
|
|
@@ -6438,137 +7078,58 @@ function zod_i(r, e) {
|
|
|
6438
7078
|
r.shift();
|
|
6439
7079
|
}
|
|
6440
7080
|
return n;
|
|
6441
|
-
}
|
|
6442
|
-
function zod_a(o, a, u) {
|
|
6443
|
-
if (void 0 === u && (u = {}), function(r) {
|
|
6444
|
-
return "_def" in r && "object" == typeof r._def && "typeName" in r._def;
|
|
6445
|
-
}(o)) return function(n, i, c) {
|
|
6446
|
-
try {
|
|
6447
|
-
return Promise.resolve(zod_t(function() {
|
|
6448
|
-
return Promise.resolve(o["sync" === u.mode ? "parse" : "parseAsync"](n, a)).then(function(e) {
|
|
6449
|
-
return c.shouldUseNativeValidation && resolvers_o({}, c), {
|
|
6450
|
-
errors: {},
|
|
6451
|
-
values: u.raw ? Object.assign({}, n) : e
|
|
6452
|
-
};
|
|
6453
|
-
});
|
|
6454
|
-
}, function(r) {
|
|
6455
|
-
if (function(r) {
|
|
6456
|
-
return Array.isArray(null == r ? void 0 : r.issues);
|
|
6457
|
-
}(r)) return {
|
|
6458
|
-
values: {},
|
|
6459
|
-
errors: resolvers_s(zod_s(r.errors, !c.shouldUseNativeValidation && "all" === c.criteriaMode), c)
|
|
6460
|
-
};
|
|
6461
|
-
throw r;
|
|
6462
|
-
}));
|
|
6463
|
-
} catch (r) {
|
|
6464
|
-
return Promise.reject(r);
|
|
6465
|
-
}
|
|
6466
|
-
};
|
|
6467
|
-
if (function(r) {
|
|
6468
|
-
return "_zod" in r && "object" == typeof r._zod;
|
|
6469
|
-
}(o)) return function(s, c, f) {
|
|
6470
|
-
try {
|
|
6471
|
-
return Promise.resolve(zod_t(function() {
|
|
6472
|
-
return Promise.resolve(("sync" === u.mode ? parse : parseAsync)(o, s, a)).then(function(e) {
|
|
6473
|
-
return f.shouldUseNativeValidation && resolvers_o({}, f), {
|
|
6474
|
-
errors: {},
|
|
6475
|
-
values: u.raw ? Object.assign({}, s) : e
|
|
6476
|
-
};
|
|
6477
|
-
});
|
|
6478
|
-
}, function(r) {
|
|
6479
|
-
if (function(r) {
|
|
6480
|
-
return r instanceof $ZodError;
|
|
6481
|
-
}(r)) return {
|
|
6482
|
-
values: {},
|
|
6483
|
-
errors: resolvers_s(zod_i(r.issues, !f.shouldUseNativeValidation && "all" === f.criteriaMode), f)
|
|
6484
|
-
};
|
|
6485
|
-
throw r;
|
|
6486
|
-
}));
|
|
6487
|
-
} catch (r) {
|
|
6488
|
-
return Promise.reject(r);
|
|
6489
|
-
}
|
|
6490
|
-
};
|
|
6491
|
-
throw new Error("Invalid input: not a Zod schema");
|
|
6492
|
-
}
|
|
6493
|
-
/**
|
|
6494
|
-
* @license lucide-react v0.544.0 - ISC
|
|
6495
|
-
*
|
|
6496
|
-
* This source code is licensed under the ISC license.
|
|
6497
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6498
|
-
*/ const sparkles_iconNode = [
|
|
6499
|
-
[
|
|
6500
|
-
"path",
|
|
6501
|
-
{
|
|
6502
|
-
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
6503
|
-
key: "1s2grr"
|
|
6504
|
-
}
|
|
6505
|
-
],
|
|
6506
|
-
[
|
|
6507
|
-
"path",
|
|
6508
|
-
{
|
|
6509
|
-
d: "M20 2v4",
|
|
6510
|
-
key: "1rf3ol"
|
|
6511
|
-
}
|
|
6512
|
-
],
|
|
6513
|
-
[
|
|
6514
|
-
"path",
|
|
6515
|
-
{
|
|
6516
|
-
d: "M22 4h-4",
|
|
6517
|
-
key: "gwowj6"
|
|
6518
|
-
}
|
|
6519
|
-
],
|
|
6520
|
-
[
|
|
6521
|
-
"circle",
|
|
6522
|
-
{
|
|
6523
|
-
cx: "4",
|
|
6524
|
-
cy: "20",
|
|
6525
|
-
r: "2",
|
|
6526
|
-
key: "6kqj1y"
|
|
6527
|
-
}
|
|
6528
|
-
]
|
|
6529
|
-
];
|
|
6530
|
-
const Sparkles = createLucideIcon("sparkles", sparkles_iconNode);
|
|
6531
|
-
/**
|
|
6532
|
-
* @license lucide-react v0.544.0 - ISC
|
|
6533
|
-
*
|
|
6534
|
-
* This source code is licensed under the ISC license.
|
|
6535
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6536
|
-
*/ const mail_iconNode = [
|
|
6537
|
-
[
|
|
6538
|
-
"path",
|
|
6539
|
-
{
|
|
6540
|
-
d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",
|
|
6541
|
-
key: "132q7q"
|
|
6542
|
-
}
|
|
6543
|
-
],
|
|
6544
|
-
[
|
|
6545
|
-
"rect",
|
|
6546
|
-
{
|
|
6547
|
-
x: "2",
|
|
6548
|
-
y: "4",
|
|
6549
|
-
width: "20",
|
|
6550
|
-
height: "16",
|
|
6551
|
-
rx: "2",
|
|
6552
|
-
key: "izxlao"
|
|
7081
|
+
}
|
|
7082
|
+
function zod_a(o, a, u) {
|
|
7083
|
+
if (void 0 === u && (u = {}), function(r) {
|
|
7084
|
+
return "_def" in r && "object" == typeof r._def && "typeName" in r._def;
|
|
7085
|
+
}(o)) return function(n, i, c) {
|
|
7086
|
+
try {
|
|
7087
|
+
return Promise.resolve(zod_t(function() {
|
|
7088
|
+
return Promise.resolve(o["sync" === u.mode ? "parse" : "parseAsync"](n, a)).then(function(e) {
|
|
7089
|
+
return c.shouldUseNativeValidation && resolvers_o({}, c), {
|
|
7090
|
+
errors: {},
|
|
7091
|
+
values: u.raw ? Object.assign({}, n) : e
|
|
7092
|
+
};
|
|
7093
|
+
});
|
|
7094
|
+
}, function(r) {
|
|
7095
|
+
if (function(r) {
|
|
7096
|
+
return Array.isArray(null == r ? void 0 : r.issues);
|
|
7097
|
+
}(r)) return {
|
|
7098
|
+
values: {},
|
|
7099
|
+
errors: resolvers_s(zod_s(r.errors, !c.shouldUseNativeValidation && "all" === c.criteriaMode), c)
|
|
7100
|
+
};
|
|
7101
|
+
throw r;
|
|
7102
|
+
}));
|
|
7103
|
+
} catch (r) {
|
|
7104
|
+
return Promise.reject(r);
|
|
6553
7105
|
}
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
7106
|
+
};
|
|
7107
|
+
if (function(r) {
|
|
7108
|
+
return "_zod" in r && "object" == typeof r._zod;
|
|
7109
|
+
}(o)) return function(s, c, f) {
|
|
7110
|
+
try {
|
|
7111
|
+
return Promise.resolve(zod_t(function() {
|
|
7112
|
+
return Promise.resolve(("sync" === u.mode ? parse : parseAsync)(o, s, a)).then(function(e) {
|
|
7113
|
+
return f.shouldUseNativeValidation && resolvers_o({}, f), {
|
|
7114
|
+
errors: {},
|
|
7115
|
+
values: u.raw ? Object.assign({}, s) : e
|
|
7116
|
+
};
|
|
7117
|
+
});
|
|
7118
|
+
}, function(r) {
|
|
7119
|
+
if (function(r) {
|
|
7120
|
+
return r instanceof $ZodError;
|
|
7121
|
+
}(r)) return {
|
|
7122
|
+
values: {},
|
|
7123
|
+
errors: resolvers_s(zod_i(r.issues, !f.shouldUseNativeValidation && "all" === f.criteriaMode), f)
|
|
7124
|
+
};
|
|
7125
|
+
throw r;
|
|
7126
|
+
}));
|
|
7127
|
+
} catch (r) {
|
|
7128
|
+
return Promise.reject(r);
|
|
6568
7129
|
}
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
7130
|
+
};
|
|
7131
|
+
throw new Error("Invalid input: not a Zod schema");
|
|
7132
|
+
}
|
|
6572
7133
|
const LoginSchema = shared_types.Controller.Usuario.Login.InputSchema.shape.data.shape.usuario;
|
|
6573
7134
|
function AuthLogin() {
|
|
6574
7135
|
const navigate = useNavigate();
|
|
@@ -6602,13 +7163,13 @@ function AuthLogin() {
|
|
|
6602
7163
|
});
|
|
6603
7164
|
}
|
|
6604
7165
|
return /*#__PURE__*/ jsxs("div", {
|
|
6605
|
-
className: "
|
|
7166
|
+
className: "flex min-h-dvh items-center justify-center p-4 relative overflow-hidden bg-slate-50 text-slate-900 dark:bg-[#020617] dark:text-slate-100",
|
|
6606
7167
|
children: [
|
|
6607
7168
|
/*#__PURE__*/ jsx("div", {
|
|
6608
|
-
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(
|
|
7169
|
+
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(circle_at_top_right,_var(--tw-gradient-stops))] from-blue-600/10 via-transparent to-transparent"
|
|
6609
7170
|
}),
|
|
6610
7171
|
/*#__PURE__*/ jsx("div", {
|
|
6611
|
-
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(
|
|
7172
|
+
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(circle_at_bottom_left,_var(--tw-gradient-stops))] from-cyan-600/10 via-transparent to-transparent"
|
|
6612
7173
|
}),
|
|
6613
7174
|
/*#__PURE__*/ jsxs(motion.div, {
|
|
6614
7175
|
initial: {
|
|
@@ -6627,7 +7188,7 @@ function AuthLogin() {
|
|
|
6627
7188
|
/*#__PURE__*/ jsx("div", {
|
|
6628
7189
|
className: "flex justify-center",
|
|
6629
7190
|
children: /*#__PURE__*/ jsxs("div", {
|
|
6630
|
-
className: "
|
|
7191
|
+
className: "inline-flex items-center gap-2 rounded-full px-4 py-2 backdrop-blur-md border border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
6631
7192
|
children: [
|
|
6632
7193
|
/*#__PURE__*/ jsx(motion.div, {
|
|
6633
7194
|
animate: {
|
|
@@ -6643,7 +7204,7 @@ function AuthLogin() {
|
|
|
6643
7204
|
})
|
|
6644
7205
|
}),
|
|
6645
7206
|
/*#__PURE__*/ jsx("span", {
|
|
6646
|
-
className: "text-sm font-
|
|
7207
|
+
className: "text-sm font-bold tracking-wide",
|
|
6647
7208
|
children: "AuthFlow"
|
|
6648
7209
|
})
|
|
6649
7210
|
]
|
|
@@ -6653,18 +7214,18 @@ function AuthLogin() {
|
|
|
6653
7214
|
className: "text-center",
|
|
6654
7215
|
children: [
|
|
6655
7216
|
/*#__PURE__*/ jsx("h2", {
|
|
6656
|
-
className: "
|
|
7217
|
+
className: "text-3xl font-black tracking-tight bg-gradient-to-r from-blue-400 via-blue-500 to-cyan-400 bg-clip-text text-transparent",
|
|
6657
7218
|
children: "Acesse sua conta"
|
|
6658
7219
|
}),
|
|
6659
7220
|
/*#__PURE__*/ jsx("p", {
|
|
6660
|
-
className: "text-sm mt-2 text-
|
|
7221
|
+
className: "text-sm mt-2 text-slate-500 dark:text-slate-400 font-medium",
|
|
6661
7222
|
children: "Bem-vindo de volta! Insira seus dados abaixo."
|
|
6662
7223
|
})
|
|
6663
7224
|
]
|
|
6664
7225
|
}),
|
|
6665
7226
|
/*#__PURE__*/ jsxs(motion.form, {
|
|
6666
7227
|
onSubmit: handleSubmit(onSubmit),
|
|
6667
|
-
className: " rounded-2xl p-
|
|
7228
|
+
className: " relative rounded-2xl p-7 flex flex-col gap-6 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
|
|
6668
7229
|
children: [
|
|
6669
7230
|
/*#__PURE__*/ jsxs("div", {
|
|
6670
7231
|
className: "flex flex-col gap-5",
|
|
@@ -6674,26 +7235,26 @@ function AuthLogin() {
|
|
|
6674
7235
|
children: [
|
|
6675
7236
|
/*#__PURE__*/ jsx("label", {
|
|
6676
7237
|
htmlFor: "email",
|
|
6677
|
-
className: "text-sm font-
|
|
7238
|
+
className: "text-sm font-bold text-slate-700 dark:text-slate-200",
|
|
6678
7239
|
children: "E-mail"
|
|
6679
7240
|
}),
|
|
6680
7241
|
/*#__PURE__*/ jsxs("div", {
|
|
6681
7242
|
className: "relative group",
|
|
6682
7243
|
children: [
|
|
6683
7244
|
/*#__PURE__*/ jsx(Mail, {
|
|
6684
|
-
className: "
|
|
7245
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 group-focus-within:text-blue-500 transition-colors"
|
|
6685
7246
|
}),
|
|
6686
7247
|
/*#__PURE__*/ jsx("input", {
|
|
6687
7248
|
id: "email",
|
|
6688
7249
|
type: "email",
|
|
6689
7250
|
placeholder: "Digite seu e-mail",
|
|
6690
7251
|
...register("email"),
|
|
6691
|
-
className: "
|
|
7252
|
+
className: "w-full rounded-xl pl-10 pr-4 py-3 text-sm border border-slate-200 bg-slate-50 text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 dark:border-white/10 dark:bg-slate-950 dark:text-slate-100 transition-all"
|
|
6692
7253
|
})
|
|
6693
7254
|
]
|
|
6694
7255
|
}),
|
|
6695
7256
|
errors.email && /*#__PURE__*/ jsx("p", {
|
|
6696
|
-
className: "text-xs text-red-500",
|
|
7257
|
+
className: "text-xs text-red-500 font-semibold",
|
|
6697
7258
|
children: errors.email.message
|
|
6698
7259
|
})
|
|
6699
7260
|
]
|
|
@@ -6703,26 +7264,26 @@ function AuthLogin() {
|
|
|
6703
7264
|
children: [
|
|
6704
7265
|
/*#__PURE__*/ jsx("label", {
|
|
6705
7266
|
htmlFor: "senha",
|
|
6706
|
-
className: "text-sm font-
|
|
7267
|
+
className: "text-sm font-bold text-slate-700 dark:text-slate-200",
|
|
6707
7268
|
children: "Senha"
|
|
6708
7269
|
}),
|
|
6709
7270
|
/*#__PURE__*/ jsxs("div", {
|
|
6710
7271
|
className: "relative group",
|
|
6711
7272
|
children: [
|
|
6712
7273
|
/*#__PURE__*/ jsx(Lock, {
|
|
6713
|
-
className: "
|
|
7274
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 group-focus-within:text-blue-500 transition-colors"
|
|
6714
7275
|
}),
|
|
6715
7276
|
/*#__PURE__*/ jsx("input", {
|
|
6716
7277
|
id: "senha",
|
|
6717
7278
|
type: "password",
|
|
6718
7279
|
placeholder: "Digite sua senha",
|
|
6719
7280
|
...register("senha"),
|
|
6720
|
-
className: "
|
|
7281
|
+
className: "w-full rounded-xl pl-10 pr-4 py-3 text-sm border border-slate-200 bg-slate-50 text-slate-900 placeholder:text-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 dark:border-white/10 dark:bg-slate-950 dark:text-slate-100 transition-all"
|
|
6721
7282
|
})
|
|
6722
7283
|
]
|
|
6723
7284
|
}),
|
|
6724
7285
|
errors.senha && /*#__PURE__*/ jsx("p", {
|
|
6725
|
-
className: "text-xs text-red-500",
|
|
7286
|
+
className: "text-xs text-red-500 font-semibold",
|
|
6726
7287
|
children: errors.senha.message
|
|
6727
7288
|
})
|
|
6728
7289
|
]
|
|
@@ -6732,38 +7293,38 @@ function AuthLogin() {
|
|
|
6732
7293
|
/*#__PURE__*/ jsx("button", {
|
|
6733
7294
|
type: "button",
|
|
6734
7295
|
onClick: esqueciMinhaSenha,
|
|
6735
|
-
className: "text-sm text-
|
|
7296
|
+
className: "text-sm text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300 transition-all w-fit font-bold",
|
|
6736
7297
|
children: "Esqueci minha senha"
|
|
6737
7298
|
}),
|
|
6738
7299
|
/*#__PURE__*/ jsxs(motion.button, {
|
|
6739
7300
|
whileHover: {
|
|
6740
|
-
scale: loading_auth ? 1 : 1.
|
|
7301
|
+
scale: loading_auth ? 1 : 1.02
|
|
6741
7302
|
},
|
|
6742
7303
|
whileTap: {
|
|
6743
|
-
scale: loading_auth ? 1 : 0.
|
|
7304
|
+
scale: loading_auth ? 1 : 0.98
|
|
6744
7305
|
},
|
|
6745
7306
|
type: "submit",
|
|
6746
7307
|
disabled: loading_auth,
|
|
6747
|
-
className: " w-full rounded-xl bg-gradient-to-r from-
|
|
7308
|
+
className: " relative w-full rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3.5 text-sm font-bold flex items-center justify-center gap-2 transition-all shadow-lg shadow-blue-500/25 hover:shadow-blue-500/40 disabled:opacity-70 disabled:cursor-not-allowed overflow-hidden ",
|
|
6748
7309
|
children: [
|
|
6749
7310
|
loading_auth && /*#__PURE__*/ jsx(LoaderCircle, {
|
|
6750
7311
|
className: "w-4 h-4 animate-spin"
|
|
6751
7312
|
}),
|
|
6752
|
-
loading_auth ? "
|
|
7313
|
+
loading_auth ? "Processando..." : "Entrar"
|
|
6753
7314
|
]
|
|
6754
7315
|
}),
|
|
6755
7316
|
/*#__PURE__*/ jsxs("div", {
|
|
6756
|
-
className: "flex items-center gap-
|
|
7317
|
+
className: "flex items-center gap-4",
|
|
6757
7318
|
children: [
|
|
6758
7319
|
/*#__PURE__*/ jsx("div", {
|
|
6759
|
-
className: "flex-grow border-t border-
|
|
7320
|
+
className: "flex-grow border-t border-slate-200 dark:border-white/10"
|
|
6760
7321
|
}),
|
|
6761
7322
|
/*#__PURE__*/ jsx("span", {
|
|
6762
|
-
className: "text-
|
|
6763
|
-
children: "
|
|
7323
|
+
className: "text-[10px] font-black tracking-widest text-slate-400 uppercase",
|
|
7324
|
+
children: "Ou continue com"
|
|
6764
7325
|
}),
|
|
6765
7326
|
/*#__PURE__*/ jsx("div", {
|
|
6766
|
-
className: "flex-grow border-t border-
|
|
7327
|
+
className: "flex-grow border-t border-slate-200 dark:border-white/10"
|
|
6767
7328
|
})
|
|
6768
7329
|
]
|
|
6769
7330
|
}),
|
|
@@ -6776,14 +7337,14 @@ function AuthLogin() {
|
|
|
6776
7337
|
]
|
|
6777
7338
|
}),
|
|
6778
7339
|
/*#__PURE__*/ jsxs("p", {
|
|
6779
|
-
className: "text-center text-sm text-
|
|
7340
|
+
className: "text-center text-sm text-slate-500 dark:text-slate-400",
|
|
6780
7341
|
children: [
|
|
6781
|
-
"
|
|
7342
|
+
"Ainda n\xe3o tem conta?",
|
|
6782
7343
|
" ",
|
|
6783
7344
|
/*#__PURE__*/ jsx("button", {
|
|
6784
7345
|
onClick: ()=>navigate("/auth/register"),
|
|
6785
|
-
className: "text-
|
|
6786
|
-
children: "
|
|
7346
|
+
className: "text-blue-500 dark:text-cyan-500 hover:underline font-black transition-all",
|
|
7347
|
+
children: "Crie uma agora"
|
|
6787
7348
|
})
|
|
6788
7349
|
]
|
|
6789
7350
|
})
|
|
@@ -6816,6 +7377,28 @@ function AuthLogin() {
|
|
|
6816
7377
|
]
|
|
6817
7378
|
];
|
|
6818
7379
|
const User = createLucideIcon("user", user_iconNode);
|
|
7380
|
+
/**
|
|
7381
|
+
* @license lucide-react v0.544.0 - ISC
|
|
7382
|
+
*
|
|
7383
|
+
* This source code is licensed under the ISC license.
|
|
7384
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7385
|
+
*/ const arrow_right_iconNode = [
|
|
7386
|
+
[
|
|
7387
|
+
"path",
|
|
7388
|
+
{
|
|
7389
|
+
d: "M5 12h14",
|
|
7390
|
+
key: "1ays0h"
|
|
7391
|
+
}
|
|
7392
|
+
],
|
|
7393
|
+
[
|
|
7394
|
+
"path",
|
|
7395
|
+
{
|
|
7396
|
+
d: "m12 5 7 7-7 7",
|
|
7397
|
+
key: "xquz4c"
|
|
7398
|
+
}
|
|
7399
|
+
]
|
|
7400
|
+
];
|
|
7401
|
+
const ArrowRight = createLucideIcon("arrow-right", arrow_right_iconNode);
|
|
6819
7402
|
const RegisterSchema = shared_types.Controller.Usuario.Register.InputSchema.shape.data.shape.usuario;
|
|
6820
7403
|
function AuthRegister() {
|
|
6821
7404
|
const navigate = useNavigate();
|
|
@@ -6839,13 +7422,13 @@ function AuthRegister() {
|
|
|
6839
7422
|
if (200 === res.status) navigate("/app");
|
|
6840
7423
|
}
|
|
6841
7424
|
return /*#__PURE__*/ jsxs("div", {
|
|
6842
|
-
className: "
|
|
7425
|
+
className: "flex min-h-dvh items-center justify-center p-4 relative overflow-hidden bg-slate-50 text-slate-900 dark:bg-[#020617] dark:text-slate-100",
|
|
6843
7426
|
children: [
|
|
6844
7427
|
/*#__PURE__*/ jsx("div", {
|
|
6845
|
-
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(
|
|
7428
|
+
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(circle_at_top_right,_var(--tw-gradient-stops))] from-blue-600/10 via-transparent to-transparent"
|
|
6846
7429
|
}),
|
|
6847
7430
|
/*#__PURE__*/ jsx("div", {
|
|
6848
|
-
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(
|
|
7431
|
+
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(circle_at_bottom_left,_var(--tw-gradient-stops))] from-cyan-600/10 via-transparent to-transparent"
|
|
6849
7432
|
}),
|
|
6850
7433
|
/*#__PURE__*/ jsxs(motion.div, {
|
|
6851
7434
|
initial: {
|
|
@@ -6864,7 +7447,7 @@ function AuthRegister() {
|
|
|
6864
7447
|
/*#__PURE__*/ jsx("div", {
|
|
6865
7448
|
className: "flex justify-center",
|
|
6866
7449
|
children: /*#__PURE__*/ jsxs("div", {
|
|
6867
|
-
className: "
|
|
7450
|
+
className: "inline-flex items-center gap-2 rounded-full px-4 py-2 backdrop-blur-md border border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400",
|
|
6868
7451
|
children: [
|
|
6869
7452
|
/*#__PURE__*/ jsx(motion.div, {
|
|
6870
7453
|
animate: {
|
|
@@ -6880,7 +7463,7 @@ function AuthRegister() {
|
|
|
6880
7463
|
})
|
|
6881
7464
|
}),
|
|
6882
7465
|
/*#__PURE__*/ jsx("span", {
|
|
6883
|
-
className: "text-sm font-
|
|
7466
|
+
className: "text-sm font-black tracking-wide",
|
|
6884
7467
|
children: "AuthFlow"
|
|
6885
7468
|
})
|
|
6886
7469
|
]
|
|
@@ -6890,47 +7473,48 @@ function AuthRegister() {
|
|
|
6890
7473
|
className: "text-center",
|
|
6891
7474
|
children: [
|
|
6892
7475
|
/*#__PURE__*/ jsx("h2", {
|
|
6893
|
-
className: "
|
|
6894
|
-
children: "
|
|
7476
|
+
className: "text-3xl font-black tracking-tight bg-gradient-to-r from-blue-400 via-blue-500 to-cyan-400 bg-clip-text text-transparent",
|
|
7477
|
+
children: "Criar nova conta"
|
|
6895
7478
|
}),
|
|
6896
7479
|
/*#__PURE__*/ jsx("p", {
|
|
6897
|
-
className: "text-sm mt-2 text-
|
|
6898
|
-
children: "
|
|
7480
|
+
className: "text-sm mt-2 text-slate-500 dark:text-slate-400 font-medium",
|
|
7481
|
+
children: "Junte-se a n\xf3s e comece sua jornada hoje."
|
|
6899
7482
|
})
|
|
6900
7483
|
]
|
|
6901
7484
|
}),
|
|
6902
7485
|
/*#__PURE__*/ jsxs(motion.form, {
|
|
6903
7486
|
onSubmit: handleSubmit(onSubmit),
|
|
6904
|
-
className: " rounded-2xl p-
|
|
7487
|
+
className: " relative rounded-2xl p-7 flex flex-col gap-5 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
|
|
6905
7488
|
children: [
|
|
6906
7489
|
/*#__PURE__*/ jsxs("div", {
|
|
6907
|
-
className: "flex flex-col gap-
|
|
7490
|
+
className: "flex flex-col gap-4",
|
|
6908
7491
|
children: [
|
|
6909
7492
|
/*#__PURE__*/ jsxs("div", {
|
|
6910
7493
|
className: "flex flex-col gap-1.5",
|
|
6911
7494
|
children: [
|
|
6912
7495
|
/*#__PURE__*/ jsx("label", {
|
|
6913
7496
|
htmlFor: "nome",
|
|
6914
|
-
className: "text-sm font-
|
|
6915
|
-
children: "Nome"
|
|
7497
|
+
className: "text-sm font-bold text-slate-700 dark:text-slate-200",
|
|
7498
|
+
children: "Nome Completo"
|
|
6916
7499
|
}),
|
|
6917
7500
|
/*#__PURE__*/ jsxs("div", {
|
|
6918
7501
|
className: "relative group",
|
|
6919
7502
|
children: [
|
|
6920
7503
|
/*#__PURE__*/ jsx(User, {
|
|
6921
|
-
className: "
|
|
7504
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 group-focus-within:text-blue-500 transition-colors"
|
|
6922
7505
|
}),
|
|
6923
7506
|
/*#__PURE__*/ jsx("input", {
|
|
6924
7507
|
id: "nome",
|
|
6925
7508
|
type: "text",
|
|
6926
|
-
placeholder: "
|
|
7509
|
+
placeholder: "Como quer ser chamado?",
|
|
6927
7510
|
...register("nome"),
|
|
6928
|
-
className:
|
|
7511
|
+
className: `w-full rounded-xl pl-10 pr-4 py-3 text-sm border bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 transition-all outline-none
|
|
7512
|
+
${errors.nome ? "border-red-500 ring-2 ring-red-500/10" : "border-slate-200 dark:border-white/10 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500"}`
|
|
6929
7513
|
})
|
|
6930
7514
|
]
|
|
6931
7515
|
}),
|
|
6932
7516
|
errors.nome && /*#__PURE__*/ jsx("p", {
|
|
6933
|
-
className: "text-
|
|
7517
|
+
className: "text-[10px] text-red-500 font-bold uppercase tracking-wider",
|
|
6934
7518
|
children: errors.nome.message
|
|
6935
7519
|
})
|
|
6936
7520
|
]
|
|
@@ -6940,26 +7524,27 @@ function AuthRegister() {
|
|
|
6940
7524
|
children: [
|
|
6941
7525
|
/*#__PURE__*/ jsx("label", {
|
|
6942
7526
|
htmlFor: "email",
|
|
6943
|
-
className: "text-sm font-
|
|
7527
|
+
className: "text-sm font-bold text-slate-700 dark:text-slate-200",
|
|
6944
7528
|
children: "E-mail"
|
|
6945
7529
|
}),
|
|
6946
7530
|
/*#__PURE__*/ jsxs("div", {
|
|
6947
7531
|
className: "relative group",
|
|
6948
7532
|
children: [
|
|
6949
7533
|
/*#__PURE__*/ jsx(Mail, {
|
|
6950
|
-
className: "
|
|
7534
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 group-focus-within:text-blue-500 transition-colors"
|
|
6951
7535
|
}),
|
|
6952
7536
|
/*#__PURE__*/ jsx("input", {
|
|
6953
7537
|
id: "email",
|
|
6954
7538
|
type: "email",
|
|
6955
|
-
placeholder: "
|
|
7539
|
+
placeholder: "seu@email.com",
|
|
6956
7540
|
...register("email"),
|
|
6957
|
-
className:
|
|
7541
|
+
className: `w-full rounded-xl pl-10 pr-4 py-3 text-sm border bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 transition-all outline-none
|
|
7542
|
+
${errors.email ? "border-red-500 ring-2 ring-red-500/10" : "border-slate-200 dark:border-white/10 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500"}`
|
|
6958
7543
|
})
|
|
6959
7544
|
]
|
|
6960
7545
|
}),
|
|
6961
7546
|
errors.email && /*#__PURE__*/ jsx("p", {
|
|
6962
|
-
className: "text-
|
|
7547
|
+
className: "text-[10px] text-red-500 font-bold uppercase tracking-wider",
|
|
6963
7548
|
children: errors.email.message
|
|
6964
7549
|
})
|
|
6965
7550
|
]
|
|
@@ -6969,26 +7554,27 @@ function AuthRegister() {
|
|
|
6969
7554
|
children: [
|
|
6970
7555
|
/*#__PURE__*/ jsx("label", {
|
|
6971
7556
|
htmlFor: "senha",
|
|
6972
|
-
className: "text-sm font-
|
|
7557
|
+
className: "text-sm font-bold text-slate-700 dark:text-slate-200",
|
|
6973
7558
|
children: "Senha"
|
|
6974
7559
|
}),
|
|
6975
7560
|
/*#__PURE__*/ jsxs("div", {
|
|
6976
7561
|
className: "relative group",
|
|
6977
7562
|
children: [
|
|
6978
7563
|
/*#__PURE__*/ jsx(Lock, {
|
|
6979
|
-
className: "
|
|
7564
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-slate-400 group-focus-within:text-blue-500 transition-colors"
|
|
6980
7565
|
}),
|
|
6981
7566
|
/*#__PURE__*/ jsx("input", {
|
|
6982
7567
|
id: "senha",
|
|
6983
7568
|
type: "password",
|
|
6984
|
-
placeholder: "
|
|
7569
|
+
placeholder: "••••••••",
|
|
6985
7570
|
...register("senha"),
|
|
6986
|
-
className:
|
|
7571
|
+
className: `w-full rounded-xl pl-10 pr-4 py-3 text-sm border bg-slate-50 dark:bg-slate-950 text-slate-900 dark:text-slate-100 placeholder:text-slate-400 transition-all outline-none
|
|
7572
|
+
${errors.senha ? "border-red-500 ring-2 ring-red-500/10" : "border-slate-200 dark:border-white/10 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500"}`
|
|
6987
7573
|
})
|
|
6988
7574
|
]
|
|
6989
7575
|
}),
|
|
6990
7576
|
errors.senha && /*#__PURE__*/ jsx("p", {
|
|
6991
|
-
className: "text-
|
|
7577
|
+
className: "text-[10px] text-red-500 font-bold uppercase tracking-wider",
|
|
6992
7578
|
children: errors.senha.message
|
|
6993
7579
|
})
|
|
6994
7580
|
]
|
|
@@ -6997,33 +7583,37 @@ function AuthRegister() {
|
|
|
6997
7583
|
}),
|
|
6998
7584
|
/*#__PURE__*/ jsxs(motion.button, {
|
|
6999
7585
|
whileHover: {
|
|
7000
|
-
scale: loading_auth ? 1 : 1.
|
|
7586
|
+
scale: loading_auth ? 1 : 1.05
|
|
7001
7587
|
},
|
|
7002
7588
|
whileTap: {
|
|
7003
|
-
scale: loading_auth ? 1 : 0.
|
|
7589
|
+
scale: loading_auth ? 1 : 0.95
|
|
7004
7590
|
},
|
|
7005
7591
|
type: "submit",
|
|
7006
7592
|
disabled: loading_auth,
|
|
7007
|
-
className: " w-full rounded-xl
|
|
7593
|
+
className: " w-full mt-2 inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 py-3.5 text-sm font-black tracking-wide text-white shadow-lg shadow-blue-500/30 transition-all hover:shadow-xl hover:shadow-blue-500/50 disabled:opacity-50 disabled:cursor-not-allowed ",
|
|
7008
7594
|
children: [
|
|
7009
|
-
loading_auth
|
|
7010
|
-
className: "
|
|
7595
|
+
loading_auth ? /*#__PURE__*/ jsx(LoaderCircle, {
|
|
7596
|
+
className: "h-4 w-4 animate-spin"
|
|
7597
|
+
}) : /*#__PURE__*/ jsx(ArrowRight, {
|
|
7598
|
+
className: "h-5 w-5 group-hover:translate-x-1 transition-transform"
|
|
7011
7599
|
}),
|
|
7012
|
-
|
|
7600
|
+
/*#__PURE__*/ jsx("span", {
|
|
7601
|
+
children: loading_auth ? "Criando conta..." : "Finalizar cadastro"
|
|
7602
|
+
})
|
|
7013
7603
|
]
|
|
7014
7604
|
}),
|
|
7015
7605
|
/*#__PURE__*/ jsxs("div", {
|
|
7016
|
-
className: "flex items-center gap-3",
|
|
7606
|
+
className: "flex items-center gap-3 py-2",
|
|
7017
7607
|
children: [
|
|
7018
7608
|
/*#__PURE__*/ jsx("div", {
|
|
7019
|
-
className: "flex-grow border-t border-
|
|
7609
|
+
className: "flex-grow border-t border-slate-200 dark:border-white/10"
|
|
7020
7610
|
}),
|
|
7021
7611
|
/*#__PURE__*/ jsx("span", {
|
|
7022
|
-
className: "text-
|
|
7023
|
-
children: "
|
|
7612
|
+
className: "text-[10px] font-black tracking-widest text-slate-400 uppercase",
|
|
7613
|
+
children: "Ou continue com"
|
|
7024
7614
|
}),
|
|
7025
7615
|
/*#__PURE__*/ jsx("div", {
|
|
7026
|
-
className: "flex-grow border-t border-
|
|
7616
|
+
className: "flex-grow border-t border-slate-200 dark:border-white/10"
|
|
7027
7617
|
})
|
|
7028
7618
|
]
|
|
7029
7619
|
}),
|
|
@@ -7036,14 +7626,14 @@ function AuthRegister() {
|
|
|
7036
7626
|
]
|
|
7037
7627
|
}),
|
|
7038
7628
|
/*#__PURE__*/ jsxs("p", {
|
|
7039
|
-
className: "text-center text-sm text-
|
|
7629
|
+
className: "text-center text-sm font-medium text-slate-500 dark:text-slate-400",
|
|
7040
7630
|
children: [
|
|
7041
|
-
"J\xe1
|
|
7631
|
+
"J\xe1 possui acesso?",
|
|
7042
7632
|
" ",
|
|
7043
7633
|
/*#__PURE__*/ jsx("button", {
|
|
7044
7634
|
onClick: ()=>navigate("/auth/login"),
|
|
7045
|
-
className: "text-
|
|
7046
|
-
children: "
|
|
7635
|
+
className: "text-blue-500 dark:text-cyan-500 font-black hover:underline underline-offset-4 transition-all",
|
|
7636
|
+
children: "Fazer login"
|
|
7047
7637
|
})
|
|
7048
7638
|
]
|
|
7049
7639
|
})
|
|
@@ -7052,6 +7642,55 @@ function AuthRegister() {
|
|
|
7052
7642
|
]
|
|
7053
7643
|
});
|
|
7054
7644
|
}
|
|
7645
|
+
/**
|
|
7646
|
+
* @license lucide-react v0.544.0 - ISC
|
|
7647
|
+
*
|
|
7648
|
+
* This source code is licensed under the ISC license.
|
|
7649
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7650
|
+
*/ const shield_check_iconNode = [
|
|
7651
|
+
[
|
|
7652
|
+
"path",
|
|
7653
|
+
{
|
|
7654
|
+
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
7655
|
+
key: "oel41y"
|
|
7656
|
+
}
|
|
7657
|
+
],
|
|
7658
|
+
[
|
|
7659
|
+
"path",
|
|
7660
|
+
{
|
|
7661
|
+
d: "m9 12 2 2 4-4",
|
|
7662
|
+
key: "dzmm74"
|
|
7663
|
+
}
|
|
7664
|
+
]
|
|
7665
|
+
];
|
|
7666
|
+
const ShieldCheck = createLucideIcon("shield-check", shield_check_iconNode);
|
|
7667
|
+
/**
|
|
7668
|
+
* @license lucide-react v0.544.0 - ISC
|
|
7669
|
+
*
|
|
7670
|
+
* This source code is licensed under the ISC license.
|
|
7671
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7672
|
+
*/ const smartphone_iconNode = [
|
|
7673
|
+
[
|
|
7674
|
+
"rect",
|
|
7675
|
+
{
|
|
7676
|
+
width: "14",
|
|
7677
|
+
height: "20",
|
|
7678
|
+
x: "5",
|
|
7679
|
+
y: "2",
|
|
7680
|
+
rx: "2",
|
|
7681
|
+
ry: "2",
|
|
7682
|
+
key: "1yt0o3"
|
|
7683
|
+
}
|
|
7684
|
+
],
|
|
7685
|
+
[
|
|
7686
|
+
"path",
|
|
7687
|
+
{
|
|
7688
|
+
d: "M12 18h.01",
|
|
7689
|
+
key: "mhygvu"
|
|
7690
|
+
}
|
|
7691
|
+
]
|
|
7692
|
+
];
|
|
7693
|
+
const Smartphone = createLucideIcon("smartphone", smartphone_iconNode);
|
|
7055
7694
|
const VerificarAuthenticator = ()=>{
|
|
7056
7695
|
const navigate = useNavigate();
|
|
7057
7696
|
const usuario_login = useLocation()?.state;
|
|
@@ -7100,34 +7739,9 @@ const VerificarAuthenticator = ()=>{
|
|
|
7100
7739
|
setIsLoading(true);
|
|
7101
7740
|
const fullCode = code.join("");
|
|
7102
7741
|
usuario_login.data.usuario.codigo_temporario = fullCode;
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
usuario: {
|
|
7107
|
-
app: usuario_login.data.usuario.app,
|
|
7108
|
-
auth_google_credential: usuario_login.data.usuario.auth_google_credential,
|
|
7109
|
-
usuario_tipo: usuario_login.data.usuario.usuario_tipo,
|
|
7110
|
-
codigo_temporario: usuario_login.data.usuario.codigo_temporario
|
|
7111
|
-
}
|
|
7112
|
-
}
|
|
7113
|
-
});
|
|
7114
|
-
if (200 === resp.status) return navigate("/app");
|
|
7115
|
-
if (400 === resp.status) return setError(true);
|
|
7116
|
-
} else {
|
|
7117
|
-
const resp = await contexto_contexto_usuario.api.login({
|
|
7118
|
-
data: {
|
|
7119
|
-
usuario: {
|
|
7120
|
-
app: usuario_login.data.usuario.app,
|
|
7121
|
-
email: usuario_login.data.usuario.email,
|
|
7122
|
-
senha: usuario_login.data.usuario.senha,
|
|
7123
|
-
usuario_tipo: usuario_login.data.usuario.usuario_tipo,
|
|
7124
|
-
codigo_temporario: usuario_login.data.usuario.codigo_temporario
|
|
7125
|
-
}
|
|
7126
|
-
}
|
|
7127
|
-
});
|
|
7128
|
-
if (200 === resp.status) return navigate("/app");
|
|
7129
|
-
if (400 === resp.status) return setError(true);
|
|
7130
|
-
}
|
|
7742
|
+
const resp = "auth_google_credential" in usuario_login.data.usuario ? await contexto_contexto_usuario.api.login_register_google(usuario_login) : await contexto_contexto_usuario.api.login(usuario_login);
|
|
7743
|
+
if (200 === resp.status || 201 === resp.status) return navigate("/app");
|
|
7744
|
+
setError(true);
|
|
7131
7745
|
} catch {
|
|
7132
7746
|
setError(true);
|
|
7133
7747
|
} finally{
|
|
@@ -7135,168 +7749,145 @@ const VerificarAuthenticator = ()=>{
|
|
|
7135
7749
|
}
|
|
7136
7750
|
};
|
|
7137
7751
|
const isCodeComplete = code.every((d)=>"" !== d);
|
|
7138
|
-
return /*#__PURE__*/
|
|
7139
|
-
className: "min-h-
|
|
7140
|
-
children:
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
|
|
7159
|
-
|
|
7160
|
-
|
|
7752
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
7753
|
+
className: "flex min-h-dvh items-center justify-center p-4 relative overflow-hidden bg-slate-50 text-slate-900 dark:bg-[#020617] dark:text-slate-100",
|
|
7754
|
+
children: [
|
|
7755
|
+
/*#__PURE__*/ jsx("div", {
|
|
7756
|
+
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(circle_at_top_right,_var(--tw-gradient-stops))] from-blue-600/10 via-transparent to-transparent"
|
|
7757
|
+
}),
|
|
7758
|
+
/*#__PURE__*/ jsx("div", {
|
|
7759
|
+
className: "hidden dark:block absolute inset-0 bg-[radial-gradient(circle_at_bottom_left,_var(--tw-gradient-stops))] from-cyan-600/10 via-transparent to-transparent"
|
|
7760
|
+
}),
|
|
7761
|
+
/*#__PURE__*/ jsxs(motion.div, {
|
|
7762
|
+
initial: {
|
|
7763
|
+
opacity: 0,
|
|
7764
|
+
y: 20
|
|
7765
|
+
},
|
|
7766
|
+
animate: {
|
|
7767
|
+
opacity: 1,
|
|
7768
|
+
y: 0
|
|
7769
|
+
},
|
|
7770
|
+
className: "w-full max-w-md flex flex-col gap-6 relative z-10",
|
|
7771
|
+
children: [
|
|
7772
|
+
/*#__PURE__*/ jsxs("div", {
|
|
7773
|
+
className: "text-center space-y-2",
|
|
7774
|
+
children: [
|
|
7775
|
+
/*#__PURE__*/ jsx("h2", {
|
|
7776
|
+
className: "text-3xl font-black tracking-tight bg-gradient-to-r from-blue-400 via-blue-500 to-cyan-400 bg-clip-text text-transparent",
|
|
7777
|
+
children: "Seguran\xe7a em duas etapas"
|
|
7778
|
+
}),
|
|
7779
|
+
/*#__PURE__*/ jsx("p", {
|
|
7780
|
+
className: "text-sm text-slate-500 dark:text-slate-400 font-medium",
|
|
7781
|
+
children: "Abra seu app autenticador para visualizar o c\xf3digo."
|
|
7782
|
+
})
|
|
7783
|
+
]
|
|
7784
|
+
}),
|
|
7785
|
+
/*#__PURE__*/ jsxs("div", {
|
|
7786
|
+
className: "relative rounded-2xl p-7 flex flex-col gap-6 bg-white border border-slate-200 dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] shadow-xl",
|
|
7787
|
+
children: [
|
|
7788
|
+
/*#__PURE__*/ jsx("div", {
|
|
7789
|
+
className: "flex justify-center h-32 overflow-hidden opacity-90",
|
|
7790
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
7791
|
+
className: "w-32 h-64 bg-slate-900 dark:bg-slate-800 rounded-[2rem] p-1.5 shadow-2xl border border-white/10",
|
|
7792
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
7793
|
+
className: "w-full h-full bg-slate-50 dark:bg-slate-950 rounded-[1.7rem] relative overflow-hidden p-3",
|
|
7161
7794
|
children: [
|
|
7162
|
-
/*#__PURE__*/ jsx("
|
|
7163
|
-
|
|
7795
|
+
/*#__PURE__*/ jsx("div", {
|
|
7796
|
+
className: "absolute top-0 left-1/2 -translate-x-1/2 w-12 h-4 bg-slate-900 rounded-b-lg"
|
|
7164
7797
|
}),
|
|
7165
7798
|
/*#__PURE__*/ jsxs("div", {
|
|
7166
|
-
className: "
|
|
7799
|
+
className: "mt-4 space-y-2",
|
|
7167
7800
|
children: [
|
|
7168
7801
|
/*#__PURE__*/ jsx("div", {
|
|
7169
|
-
className: "
|
|
7802
|
+
className: "h-1.5 w-8 bg-blue-500/20 rounded-full"
|
|
7170
7803
|
}),
|
|
7171
7804
|
/*#__PURE__*/ jsx("div", {
|
|
7172
|
-
className: "
|
|
7805
|
+
className: "h-4 w-full bg-blue-500/10 rounded-md flex items-center px-2",
|
|
7806
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
7807
|
+
className: "h-1.5 w-10 bg-blue-500 rounded-full animate-pulse"
|
|
7808
|
+
})
|
|
7173
7809
|
}),
|
|
7174
7810
|
/*#__PURE__*/ jsx("div", {
|
|
7175
|
-
className: "w-
|
|
7811
|
+
className: "h-4 w-full bg-slate-200 dark:bg-slate-800 rounded-md"
|
|
7176
7812
|
})
|
|
7177
7813
|
]
|
|
7178
7814
|
})
|
|
7179
7815
|
]
|
|
7816
|
+
})
|
|
7817
|
+
})
|
|
7818
|
+
}),
|
|
7819
|
+
/*#__PURE__*/ jsx("div", {
|
|
7820
|
+
className: "flex justify-between gap-2",
|
|
7821
|
+
children: code.map((digit, i)=>/*#__PURE__*/ jsx("input", {
|
|
7822
|
+
ref: (el)=>{
|
|
7823
|
+
inputRefs.current[i] = el;
|
|
7824
|
+
},
|
|
7825
|
+
type: "text",
|
|
7826
|
+
inputMode: "numeric",
|
|
7827
|
+
maxLength: 1,
|
|
7828
|
+
value: digit,
|
|
7829
|
+
onChange: (e)=>handleChange(i, e.target.value),
|
|
7830
|
+
onKeyDown: (e)=>handleKeyDown(i, e),
|
|
7831
|
+
onPaste: 0 === i ? handlePaste : void 0,
|
|
7832
|
+
className: `
|
|
7833
|
+
w-12 h-14 text-center text-xl font-black rounded-xl border transition-all outline-none
|
|
7834
|
+
${error ? "border-red-500 bg-red-500/5 text-red-500 ring-red-500/20" : "border-slate-200 bg-slate-50 dark:border-white/10 dark:bg-slate-950 focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500"}
|
|
7835
|
+
`
|
|
7836
|
+
}, i))
|
|
7837
|
+
}),
|
|
7838
|
+
error && /*#__PURE__*/ jsx("p", {
|
|
7839
|
+
className: "text-center text-xs text-red-500 font-bold",
|
|
7840
|
+
children: "C\xf3digo inv\xe1lido ou expirado. Tente novamente."
|
|
7841
|
+
}),
|
|
7842
|
+
/*#__PURE__*/ jsxs("div", {
|
|
7843
|
+
className: "flex gap-3 p-3 rounded-xl bg-blue-500/5 border border-blue-500/10 text-[11px] text-slate-500 dark:text-slate-400 leading-relaxed",
|
|
7844
|
+
children: [
|
|
7845
|
+
/*#__PURE__*/ jsx(ShieldCheck, {
|
|
7846
|
+
className: "h-4 w-4 text-blue-500 shrink-0"
|
|
7180
7847
|
}),
|
|
7181
|
-
/*#__PURE__*/ jsxs("
|
|
7182
|
-
className: "pt-8 px-3",
|
|
7848
|
+
/*#__PURE__*/ jsxs("p", {
|
|
7183
7849
|
children: [
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
/*#__PURE__*/ jsxs("div", {
|
|
7189
|
-
className: "bg-primary-50 border border-primary-200 rounded-md p-2 mb-1",
|
|
7190
|
-
children: [
|
|
7191
|
-
/*#__PURE__*/ jsxs("div", {
|
|
7192
|
-
className: "flex justify-between",
|
|
7193
|
-
children: [
|
|
7194
|
-
/*#__PURE__*/ jsxs("div", {
|
|
7195
|
-
children: [
|
|
7196
|
-
/*#__PURE__*/ jsx("p", {
|
|
7197
|
-
className: "text-[10px]",
|
|
7198
|
-
children: "Nav Software"
|
|
7199
|
-
}),
|
|
7200
|
-
/*#__PURE__*/ jsx("p", {
|
|
7201
|
-
className: "font-mono text-[12px] font-semibold",
|
|
7202
|
-
children: "123 456"
|
|
7203
|
-
})
|
|
7204
|
-
]
|
|
7205
|
-
}),
|
|
7206
|
-
/*#__PURE__*/ jsxs("div", {
|
|
7207
|
-
className: "text-right",
|
|
7208
|
-
children: [
|
|
7209
|
-
/*#__PURE__*/ jsx("p", {
|
|
7210
|
-
className: "text-[9px]",
|
|
7211
|
-
children: "expira em"
|
|
7212
|
-
}),
|
|
7213
|
-
/*#__PURE__*/ jsx("p", {
|
|
7214
|
-
className: "text-[10px] font-semibold",
|
|
7215
|
-
children: "0:28"
|
|
7216
|
-
})
|
|
7217
|
-
]
|
|
7218
|
-
})
|
|
7219
|
-
]
|
|
7220
|
-
}),
|
|
7221
|
-
/*#__PURE__*/ jsx("div", {
|
|
7222
|
-
className: "w-full h-1 bg-default-200 rounded-full mt-1",
|
|
7223
|
-
children: /*#__PURE__*/ jsx("div", {
|
|
7224
|
-
className: "w-[70%] h-1 bg-primary-600 rounded-full"
|
|
7225
|
-
})
|
|
7226
|
-
})
|
|
7227
|
-
]
|
|
7228
|
-
}),
|
|
7229
|
-
/*#__PURE__*/ jsxs("div", {
|
|
7230
|
-
className: "opacity-50 mb-1",
|
|
7231
|
-
children: [
|
|
7232
|
-
/*#__PURE__*/ jsx("p", {
|
|
7233
|
-
className: "text-[10px]",
|
|
7234
|
-
children: "Nav Software (email@email.com)"
|
|
7235
|
-
}),
|
|
7236
|
-
/*#__PURE__*/ jsx("p", {
|
|
7237
|
-
className: "font-mono text-[11px]",
|
|
7238
|
-
children: "000 000"
|
|
7239
|
-
})
|
|
7240
|
-
]
|
|
7850
|
+
"Mantenha sua conta segura. ",
|
|
7851
|
+
/*#__PURE__*/ jsx("span", {
|
|
7852
|
+
className: "text-blue-500 font-bold",
|
|
7853
|
+
children: "N\xe3o compartilhe"
|
|
7241
7854
|
}),
|
|
7242
|
-
|
|
7243
|
-
className: "opacity-30",
|
|
7244
|
-
children: [
|
|
7245
|
-
/*#__PURE__*/ jsx("p", {
|
|
7246
|
-
className: "text-default-600 text-[9px]",
|
|
7247
|
-
children: "C\xf3digo"
|
|
7248
|
-
}),
|
|
7249
|
-
/*#__PURE__*/ jsx("p", {
|
|
7250
|
-
className: "font-mono text-default-400 text-[10px]",
|
|
7251
|
-
children: "000 000"
|
|
7252
|
-
})
|
|
7253
|
-
]
|
|
7254
|
-
})
|
|
7855
|
+
" este c\xf3digo com ningu\xe9m, inclusive suporte da Nav Software."
|
|
7255
7856
|
]
|
|
7256
7857
|
})
|
|
7257
7858
|
]
|
|
7859
|
+
}),
|
|
7860
|
+
/*#__PURE__*/ jsxs(motion.button, {
|
|
7861
|
+
whileHover: {
|
|
7862
|
+
scale: !isCodeComplete || isLoading ? 1 : 1.05
|
|
7863
|
+
},
|
|
7864
|
+
whileTap: {
|
|
7865
|
+
scale: !isCodeComplete || isLoading ? 1 : 0.95
|
|
7866
|
+
},
|
|
7867
|
+
onClick: handleConfirm,
|
|
7868
|
+
disabled: !isCodeComplete || isLoading,
|
|
7869
|
+
className: " w-full inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 py-3.5 text-sm font-black tracking-wide text-white shadow-lg shadow-blue-500/30 transition-all hover:shadow-xl hover:shadow-blue-500/50 disabled:opacity-50 disabled:cursor-not-allowed ",
|
|
7870
|
+
children: [
|
|
7871
|
+
isLoading ? /*#__PURE__*/ jsx(LoaderCircle, {
|
|
7872
|
+
className: "h-4 w-4 animate-spin"
|
|
7873
|
+
}) : /*#__PURE__*/ jsx(Smartphone, {
|
|
7874
|
+
className: "h-4 w-4"
|
|
7875
|
+
}),
|
|
7876
|
+
/*#__PURE__*/ jsx("span", {
|
|
7877
|
+
children: isLoading ? "Verificando..." : "Confirmar código"
|
|
7878
|
+
})
|
|
7879
|
+
]
|
|
7258
7880
|
})
|
|
7259
|
-
|
|
7881
|
+
]
|
|
7882
|
+
}),
|
|
7883
|
+
/*#__PURE__*/ jsx("button", {
|
|
7884
|
+
onClick: ()=>navigate("/auth/login"),
|
|
7885
|
+
className: "text-center text-sm font-bold text-slate-500 hover:text-blue-500 transition-colors",
|
|
7886
|
+
children: "Voltar para o login"
|
|
7260
7887
|
})
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
children: "Insira o c\xf3digo de 6 d\xedgitos mostrado no aplicativo Authenticator."
|
|
7265
|
-
}),
|
|
7266
|
-
/*#__PURE__*/ jsx("div", {
|
|
7267
|
-
className: "flex justify-center gap-3",
|
|
7268
|
-
children: code.map((digit, i)=>/*#__PURE__*/ jsx("input", {
|
|
7269
|
-
ref: (el)=>{
|
|
7270
|
-
inputRefs.current[i] = el;
|
|
7271
|
-
},
|
|
7272
|
-
type: "text",
|
|
7273
|
-
inputMode: "numeric",
|
|
7274
|
-
maxLength: 1,
|
|
7275
|
-
value: digit,
|
|
7276
|
-
onChange: (e)=>handleChange(i, e.target.value),
|
|
7277
|
-
onKeyDown: (e)=>handleKeyDown(i, e),
|
|
7278
|
-
onPaste: 0 === i ? handlePaste : void 0,
|
|
7279
|
-
className: `w-12 h-14 text-center text-xl font-semibold rounded-lg border outline-none transition-all ${error ? "border-error-600 focus:ring-2 ring-error-300" : "border-default-300 focus:border-primary-600 focus:ring-2 ring-primary-300"}`
|
|
7280
|
-
}, i))
|
|
7281
|
-
}),
|
|
7282
|
-
/*#__PURE__*/ jsxs("div", {
|
|
7283
|
-
className: "bg-basic-50 border border-default-200 rounded-lg p-3 text-xs text-basic-700",
|
|
7284
|
-
children: [
|
|
7285
|
-
"A Nav Software nunca solicita c\xf3digos por telefone, WhatsApp ou aplicativos de mensagem.",
|
|
7286
|
-
/*#__PURE__*/ jsx("span", {
|
|
7287
|
-
className: "font-semibold",
|
|
7288
|
-
children: " N\xe3o compartilhe seu c\xf3digo com ningu\xe9m."
|
|
7289
|
-
})
|
|
7290
|
-
]
|
|
7291
|
-
}),
|
|
7292
|
-
/*#__PURE__*/ jsx("button", {
|
|
7293
|
-
onClick: handleConfirm,
|
|
7294
|
-
disabled: !isCodeComplete || isLoading,
|
|
7295
|
-
className: "w-full bg-primary-600 hover:bg-primary-700 disabled:bg-primary-400 text-white font-medium rounded-lg py-2 transition-all",
|
|
7296
|
-
children: isLoading ? "Confirmando..." : "Confirmar código"
|
|
7297
|
-
})
|
|
7298
|
-
]
|
|
7299
|
-
})
|
|
7888
|
+
]
|
|
7889
|
+
})
|
|
7890
|
+
]
|
|
7300
7891
|
});
|
|
7301
7892
|
};
|
|
7302
7893
|
const REFRESH_INTERVAL = 3300000;
|
|
@@ -7981,24 +8572,27 @@ function Header(props) {
|
|
|
7981
8572
|
className: "fixed top-0 left-0 w-full h-16 z-50",
|
|
7982
8573
|
children: [
|
|
7983
8574
|
/*#__PURE__*/ jsx("div", {
|
|
7984
|
-
className: "absolute inset-0 bg-gradient-to-r from-
|
|
8575
|
+
className: "absolute inset-0 bg-gradient-to-r from-blue-900/30 via-slate-950/80 to-cyan-900/30 backdrop-blur-xl border-b border-white/5"
|
|
7985
8576
|
}),
|
|
7986
8577
|
/*#__PURE__*/ jsxs("div", {
|
|
7987
8578
|
className: "relative max-w-6xl mx-auto h-full px-4 sm:px-6 flex items-center justify-between",
|
|
7988
8579
|
children: [
|
|
7989
8580
|
/*#__PURE__*/ jsxs("div", {
|
|
7990
|
-
className: "flex items-center gap-3
|
|
8581
|
+
className: "flex items-center gap-3",
|
|
7991
8582
|
children: [
|
|
7992
8583
|
/*#__PURE__*/ jsx(motion.div, {
|
|
7993
8584
|
whileHover: {
|
|
7994
8585
|
rotate: 8,
|
|
7995
8586
|
scale: 1.05
|
|
7996
8587
|
},
|
|
7997
|
-
className: "w-10 h-10 rounded-xl bg-gradient-to-br from-
|
|
7998
|
-
children: /*#__PURE__*/ jsx(props.icon, {
|
|
8588
|
+
className: "w-10 h-10 rounded-xl bg-gradient-to-br from-blue-600 to-cyan-600 flex items-center justify-center shadow-lg shadow-blue-500/30 text-white",
|
|
8589
|
+
children: /*#__PURE__*/ jsx(props.icon, {
|
|
8590
|
+
size: 20,
|
|
8591
|
+
strokeWidth: 2.5
|
|
8592
|
+
})
|
|
7999
8593
|
}),
|
|
8000
8594
|
/*#__PURE__*/ jsx("h5", {
|
|
8001
|
-
className: "text-lg font-semibold tracking-tight bg-gradient-to-r from-white to-
|
|
8595
|
+
className: "text-lg font-semibold tracking-tight bg-gradient-to-r from-white to-slate-300 bg-clip-text text-transparent",
|
|
8002
8596
|
children: props?.title
|
|
8003
8597
|
})
|
|
8004
8598
|
]
|
|
@@ -8006,27 +8600,24 @@ function Header(props) {
|
|
|
8006
8600
|
/*#__PURE__*/ jsxs("div", {
|
|
8007
8601
|
className: "flex items-center gap-3",
|
|
8008
8602
|
children: [
|
|
8009
|
-
/*#__PURE__*/ jsx(
|
|
8010
|
-
whileHover: {
|
|
8011
|
-
y: -1
|
|
8012
|
-
},
|
|
8013
|
-
whileTap: {
|
|
8014
|
-
scale: 0.95
|
|
8015
|
-
},
|
|
8603
|
+
/*#__PURE__*/ jsx("button", {
|
|
8016
8604
|
onClick: ()=>navigate("/auth/login"),
|
|
8017
|
-
className: "
|
|
8605
|
+
className: "px-4 py-2 rounded-lg text-sm font-medium text-slate-200 hover:text-white hover:bg-white/10 transition-colors border border-white/10 backdrop-blur-md",
|
|
8018
8606
|
children: "Login"
|
|
8019
8607
|
}),
|
|
8020
8608
|
/*#__PURE__*/ jsx(motion.button, {
|
|
8021
8609
|
whileHover: {
|
|
8022
|
-
scale: 1.
|
|
8610
|
+
scale: 1.02
|
|
8023
8611
|
},
|
|
8024
8612
|
whileTap: {
|
|
8025
|
-
scale: 0.
|
|
8613
|
+
scale: 0.98
|
|
8026
8614
|
},
|
|
8027
8615
|
onClick: ()=>navigate("/auth/register"),
|
|
8028
|
-
className: " px-
|
|
8029
|
-
children: "
|
|
8616
|
+
className: " relative group px-5 py-2 rounded-lg text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-cyan-600 transition-all duration-300 /* A Sombra em gradiente usando before */ before:absolute before:inset-0 before:rounded-lg before:bg-gradient-to-r before:from-blue-600 before:to-cyan-600 before:blur-md before:opacity-0 before:transition-opacity before:duration-500 hover:before:opacity-100 before:-z-10 ",
|
|
8617
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
8618
|
+
className: "relative z-10",
|
|
8619
|
+
children: "Registrar"
|
|
8620
|
+
})
|
|
8030
8621
|
})
|
|
8031
8622
|
]
|
|
8032
8623
|
})
|