(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[765],{60233:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/logout",function(){return t(51780)}])},29137:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var o=t(47568),r=t(97582);function i(){return s.apply(this,arguments)}function s(){return(s=(0,o.Z)((function(){var e,n;return(0,r.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,4,,5]),[4,caches.keys()];case 1:return(e=t.sent())[0]?[4,Promise.all(e.map((function(e){return caches.delete(e)})))]:[3,3];case 2:t.sent(),t.label=3;case 3:return[3,5];case 4:return n=t.sent(),console.log("Error in clearing cache =>",n.message),[3,5];case 5:return[2]}}))}))).apply(this,arguments)}},51780:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return d},default:function(){return m}});var o=t(47568),r=t(97582),i=t(85893),s=t(67294),c=t(9008),a=t.n(c),l=t(86729),u=t(29137),g=t(95264),d=!0;function m(e){var n=e.user,t=e.query,c=(0,i.jsxs)(s.Fragment,{children:[(0,i.jsx)("title",{children:"Loging Out | Datasquirel"}),(0,i.jsx)("meta",{name:"description",content:"Login you out"}),(0,i.jsx)("script",{src:"https://accounts.google.com/gsi/client"}),(0,i.jsx)("script",{src:"https://connect.facebook.net/en_US/sdk.js",crossOrigin:"anonymous"})]});return s.useEffect((function(){localStorage.setItem("user","{}"),localStorage.removeItem("csrf")}),[]),s.useEffect((function(){var e=function(){var e,o;return(null===t||void 0===t?void 0:t.invite)&&(null===t||void 0===t?void 0:t.login)?window.location.href="/login"+window.location.search:(null===t||void 0===t?void 0:t.login)||(null===(e=localStorage.getItem("logoutParadigm"))||void 0===e?void 0:e.match(/reset/))?window.location.href="/login":((null===n||void 0===n||null===(o=n.social_platform)||void 0===o?void 0:o.match(/google/))&&localStorage.setItem("google_prompt_skipped","logout"),void(window.location.pathname="/"))};(0,l.Z)("/api/logoutUser").then(function(){var t=(0,o.Z)((function(t){var o,i;return(0,r.__generator)(this,(function(t){switch(t.label){case 0:return[4,(0,u.Z)()];case 1:return t.sent(),[4,navigator.serviceWorker.getRegistrations()];case 2:o=t.sent(),i=0,t.label=3;case 3:return i<o.length?[4,o[i].unregister()]:[3,6];case 4:t.sent(),t.label=5;case 5:return i++,[3,3];case 6:try{FB.init({appId:"2910275882608968",cookie:!0,xfbml:!0,version:"v13.0"}),FB.getLoginStatus((function(t){var o;t.authResponse?FB.logout((function(n){e()})):(google.accounts.id.initialize({client_id:"392696781563-imb0ddojfn6m4bdokjk5v80jn546t9tq.apps.googleusercontent.com"}),(null===n||void 0===n||null===(o=n.social_platform)||void 0===o?void 0:o.match(/google/))&&n.social_id?(google.accounts.id.revoke(),google.accounts.id.revoke(n.social_id,(function(n){console.log(n.error),e()}))):e())}))}catch(r){(0,l.Z)("/api/admin/clientError",{method:"post",body:{component:"logout-page-component/lines-111-142",message:r.message,user:n}})}return[2]}}))}));return function(e){return t.apply(this,arguments)}}())}),[]),(0,i.jsxs)(s.Fragment,{children:[(0,i.jsx)(a(),{children:c}),(0,i.jsx)("main",{className:"w-screen h-screen flex items-center justify-center p-4 md:p-8",children:(0,i.jsxs)("div",{className:"card max-w-md flex-col items-center bg-white p-6 rounded border border-slate-200 border-solid",children:[(0,i.jsxs)("a",{href:"/",className:"flex items-center gap-2",children:[(0,i.jsx)("img",{src:"/images/logo-icon-alt-2.png",alt:"Logo Icon",width:37}),(0,i.jsx)("span",{className:"font-bold text-2xl",children:"Datasquirel"})]}),(0,i.jsx)("h3",{className:"text-lg m-0 mt-4 text-slate-400",children:"Logging out"}),(0,i.jsx)(g.Z,{position:"relative",width:"20px"})]})})]})}}},function(e){e.O(0,[9774,2888,179],(function(){return n=60233,e(e.s=n);var n}));var n=e.O();_N_E=n}]);