1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[189],{9378:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/revalidate",function(){return r(9057)}])},9057:function(e,t,r){"use strict";r.r(t);var s=r(1098),n=r(9454),a=r(4051),o=r.n(a),c=r(5893),i=r(9669),u=r.n(i),d=r(2962),l=r(7294),p=r(2439),f=r(6010);t.default=function(){var e=(0,l.useState)(!0),t=e[0],r=e[1],a=(0,l.useState)(!1),i=a[0],h=a[1],m=(0,p.cI)(),x=m.register,w=m.handleSubmit;(0,l.useEffect)((function(){if(localStorage)if(localStorage.getItem("password")){var e=function(){var e=(0,s.Z)(o().mark((function e(){var t,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=localStorage.getItem("password"),e.next=3,u().post("/api/check-admin-access",{password:t});case 3:200===(s=e.sent).status&&"Authorized"===s.data.message?(localStorage.setItem("password",t),h(!0)):h(!1),r(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}else r(!1);else r(!1)}),[]);var g=function(){var e=(0,s.Z)(o().mark((function e(t){var r,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.password,e.next=3,u().post("/api/check-admin-access",{password:r});case 3:200===(s=e.sent).status&&"Authorized"===s.data.message?(localStorage.setItem("password",r),f.ZP.success("Authorized"),h(!0)):(f.ZP.error("Wrong password"),h(!1));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(d.PB,{nofollow:!0,noindex:!0}),(0,c.jsx)("h1",{children:"Revalidate"}),t?(0,c.jsx)("p",{children:"Loading..."}):(0,c.jsx)("div",{className:"mt-8 flex flex-col",children:i?(0,c.jsx)(c.Fragment,{children:(0,c.jsx)("button",{children:"Revalidate home"})}):(0,c.jsxs)("form",{onSubmit:w(g),className:"flex space-x-2",children:[(0,c.jsx)("input",(0,n.Z)({className:"rounded-md border-4 border-secondary bg-tertiary px-4 py-2 text-accent transition duration-200 focus:border-blue-500 focus:outline-none focus:ring-4 focus:ring-opacity-60",placeholder:"Admin Password"},x("password",{required:!0}))),(0,c.jsx)("button",{type:"submit",className:"rounded-lg bg-accent px-4 py-2 text-primary transition duration-200 hover:opacity-60",children:"Submit"})]})})]})}}},function(e){e.O(0,[628,774,888,179],(function(){return t=9378,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.