1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5577],{43233:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return _}});var r=t(83658),a=t(68029),i=t(90092),o=t(5490),s=t(34614),c=t(61571),u=t(57391),l=t(21360),d=t(70010),p=t(45443),x=t(38488),h=t(67294),f=t(51097),m=t(63584),g=t(11163),v=t(20930),j=t(49704),k=t.n(j),w=t(85893);var y=function(){var e=(0,h.useState)(),n=e[0],t=e[1],j=(0,h.useState)(),y=j[0],_=j[1],S=(0,g.useRouter)(),b=(0,r.q)(),C=b.isOpen,E=b.onOpen,I=b.onClose;return(0,h.useEffect)((function(){!function(){var e=localStorage.getItem("atk");if(e)try{var n=k().decode(e),t=Date.now()/1e3;n.exp<t&&(console.log("Token expirado"),localStorage.removeItem("atk"),S.push("/admin/login"))}catch(r){console.log("Token inv\xe1lido"),localStorage.removeItem("atk"),S.push("/admin/login")}else S.push("/admin/login")}(),_("Teste"),(0,f.t)().then((function(e){e.data[0].status?t(e.data[0].image_link):t("")})).catch((function(e){E()})),function(e){if((0,v.xb)(S.query.email)){var n=localStorage.getItem("aid");(0,m.wG)(e,n).then((function(e){_(e.data.name)})).catch((function(e){E()}))}else{var t=S.query.email.replace("%40","@");(0,m.UC)(e,t).then((function(e){localStorage.setItem("aid",e.data.id),_(e.data.name)})).catch((function(e){E()}))}}(localStorage.getItem("atk"))}),[]),(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(a.x,{w:"100%",h:"100vh",background:"url(".concat(n,")"),backgroundSize:"cover",backgroundPosition:"50% right",children:(0,w.jsxs)(a.x,{w:["100%","60%","450px"],pt:["40px","40px","8
10px"],pl:["15px","15px","104px"],pr:["15px","15px","0px"],children:[(0,w.jsx)(a.x,{mb:"20px",children:(0,w.jsxs)(i.x,{fontFamily:"Nissan Brand Light",fontSize:"30px",textTransform:"uppercase",lineHeight:"30px",children:["Ol\xe1, ",y,"!"]})}),(0,w.jsx)(a.x,{children:(0,w.jsx)(i.x,{fontFamily:"Nissan Brand Light",fontSize:"15px",children:"Bem vindo \xe0 \xc1rea do Administrador da Loja Virtual da Nissan. Escolha no menu superior a sess\xe3o em que voc\xea deseja navegar!"})})]})}),(0,w.jsxs)(o.u_,{isOpen:C,onClose:I,closeOnOverlayClick:!1,isCentered:!0,children:[(0,w.jsx)(s.Z,{}),(0,w.jsxs)(c.h,{ml:"2rem",mr:"2rem",children:[(0,w.jsx)(u.x,{children:"Erro"}),(0,w.jsx)(l.o,{}),(0,w.jsx)(d.f,{children:(0,w.jsx)(i.x,{children:"Algo deu errado ao carregar suas informa\xe7\xf5es! Por favor recarregue a p\xe1gina ou tente novamente mais tarde!"})}),(0,w.jsx)(p.m,{alignItems:"center",justifyContent:"center",children:(0,w.jsx)(x.z,{w:["100%","100%","195px","195px"],variant:"primary",mt:"10px",onClick:function(){S.reload("/area-do-administrador")},children:"Recarregar"})})]})]})]})};var _=function(){return(0,w.jsx)(a.x,{width:"100%",display:"flex",alignItems:"flex-start",justifyContent:"center",gap:"24px",children:(0,w.jsx)(y,{})})}},51097:function(e,n,t){"use strict";t.d(n,{S:function(){return u},t:function(){return s}});var r=t(50029),a=t(87794),i=t.n(a),o=t(63679);function s(){return c.apply(this,arguments)}function c(){return(c=(0,r.Z)(i().mark((function e(){var n,t,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://loja.nissan.com.br/api/env");case 2:return n=e.sent,e.next=5,n.json();case 5:return t=e.sent,r={headers:{Authorization:"Bearer ".concat(null===t||void 0===t?void 0:t.jwt)}},e.abrupt("return",o.h.get("home-page/image-link",r));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function u(e,n,t){return l.apply(this,arguments)}function l(){return(l=(0,r.Z)(i().mark((function e(n,t,r){var a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={headers:{Authorization:"Bearer ".concat(r)}},e.abrupt("return",o.h.put("home-page/image-link/".concat(n),t,a));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},47424:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/area-do-administrador/AreaDoAdministrador",function(){return t(43233)}])}},function(e){e.O(0,[3714,2231,9774,2888,179],(function(){return n=47424,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.