1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[300],{46863:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/login",function(){return r(9786)}])},67235:function(e,t,r){"use strict";r.d(t,{Fs:function(){return u}});var n=r(15503),o=r(17702),a=r(96257),s=r(71153),c=(0,n.ZF)({apiKey:"AIzaSyDsvKOsCADd4YsvXS5c4kXU_MahcZl7X7w",authDomain:"seven-retail-dev.firebaseapp.com",projectId:"seven-retail-dev",storageBucket:"seven-retail-dev.appspot.com",messagingSenderId:"644358109383",appId:"1:644358109383:web:66bdc85a504c1e4851e6e2",measurementId:"G-50SW0TTH3W"}),u=((0,o.v0)(c),(0,a.ad)(c));(0,s.cF)(c)},9786:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return E}});var n=r(34051),o=r.n(n),a=r(85893),s=r(67294),c=(r(9669),r(11163)),u=r.n(c),i=r(81354),l=r.n(i);function d(e,t,r,n,o,a,s){try{var c=e[a](s),u=c.value}catch(i){return void r(i)}c.done?t(u):Promise.resolve(u).then(n,o)}var p=function(){var e,t=(e=o().mark((function e(t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=l().AES.encrypt(JSON.stringify(t),"secret-key-777").toString(),console.log("encryptedObj : "+r),e.abrupt("return",r);case 6:return e.prev=6,e.t0=e.catch(0),console.log("Error Encrypt Object : "),console.log(e.t0),e.abrupt("return",null);case 11:case"end":return e.stop()}}),e,null,[[0,6]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function s(e){d(a,n,o,s,c,"next",e)}function c(e){d(a,n,o,s,c,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}(),f=p;function m(e,t,r,n,o,a,s){try{var c=e[a](s),u=c.value}catch(i){return void r(i)}c.done?t(u):Promise.resolve(u).then(n,o)}var v=function(){var e,t=(e=o().mark((function e(t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,console.log("userAdminLoginStore : "),console.log("handler : "),console.log(t),e.next=6,f(t);case 6:return r=e.sent,localStorage.setItem("userAdminDataCollection",r),e.abrupt("return",!0);case 11:return e.prev=11,e.t0=e.catch(0),console.log(e.t0),e.abrupt("return",null);case 15:case"end":return e.stop()}}),e,null,[[0,11]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function s(e){m(a,n,o,s,c,"next",e)}function c(e){m(a,n,o,s,c,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}(),h=v;function g(e,t,r,n,o,a,s){try{var c=e[a](s),u=c.value}catch(i){return void r(i)}c.done?t(u):Promise.resolve(u).then(n,o)}var x=function(){var e,t=(e=o().mark((function e(t){var r,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=l().AES.decrypt(t,"secret-key-777"),n=r.toString(l().enc.Utf8),console.log("decryptedDataText : -> "),e.abrupt("return",n);case 7:return e.prev=7,e.t0=e.catch(0),console.log("Error Decrypt Text : "),console.log(e.t0),e.abrupt("return",null);case 12:case"end":return e.stop()}}),e,null,[[0,7]])})),function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function s(e){g(a,n,o,s,c,"next",e)}function c(e){g(a,n,o,s,c,"throw",e)}s(void 0)}))});return function(e){return t.apply(this,arguments)}}(),b=x,y=r(67235),w=r(96257);function j(e,t,r,n,o,a,s){try{var c=e[a](s),u=c.value}catch(i){return void r(i)}c.done?t(u):Promise.resolve(u).then(n,o)}function k(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function s(e){j(a,n,o,s,c,"next",e)}function c(e){j(a,n,o,s,c,"throw",e)}s(void 0)}))}}function N(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){N(e,t,r[t])}))}return e}var E=function(){var e=(0,s.useState)(!1),t=e[0],r=e[1],n=(0,s.useState)(""),c=n[0],i=n[1],l=(0,s.useState)(""),d=l[0],p=l[1],f=(0,s.use
1State)(""),m=f[0],v=f[1],g=function(){var e=k(o().mark((function e(){var t,n,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v(""),r(!0),t=[],e.prev=3,n=(0,w.hJ)(y.Fs,"users-admin"),a=(0,w.IO)(n,(0,w.ar)("email","==",c)),e.next=8,(0,w.PL)(a).then(function(){var e=k(o().mark((function e(n){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r(!1),n.empty){e.next=10;break}if(1!=n.size){e.next=8;break}return n.docs.map((function(e,r){t.push(S({},e.data(),{id:e.id}))})),e.next=6,b(t[0].password);case 6:e.sent==d?(h(t[0]),u().push("/admin")):v("Email/Password salah");case 8:e.next=11;break;case 10:v("Email tidak terdaftar.");case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 8:e.sent,e.next=16;break;case 11:e.prev=11,e.t0=e.catch(3),r(!1),v("Login Failed."),console.log("->error : "+e.t0);case 16:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(){return e.apply(this,arguments)}}();return(0,s.useEffect)((function(){document.querySelector(".js-password-toggle").addEventListener("change",(function(){var e=document.querySelector(".js-password"),t=document.querySelector(".js-password-label");"password"===e.type?(e.type="text",t.innerHTML="hide"):(e.type="password",t.innerHTML="show"),e.focus()}))}),[]),(0,a.jsx)("div",{className:"bg-gray-200 h-screen text-base text-grey-darkest font-normal relative",children:(0,a.jsx)("div",{className:"container mx-auto p-8",children:(0,a.jsx)("div",{className:"mx-auto max-w-sm pt-10",children:(0,a.jsxs)("div",{className:"bg-white rounded-b-md shadow",children:[(0,a.jsx)("div",{className:"py-4 font-bold text-black text-center text-xl tracking-widest uppercase",children:"Golden lamian"}),(0,a.jsxs)("form",{className:"p-4 max-w-md mx-auto bg-white border-t-8 border-red-700 rounded",children:[(0,a.jsx)("h1",{className:"font-medium text-xl text-center py-2 text-gray-800",children:"Coupons Admin"}),(0,a.jsx)("label",{className:"font-medium block mb-1 mt-6 text-gray-700",htmlFor:"username",children:"username"}),(0,a.jsx)("input",{className:"appearance-none border-2 rounded w-full py-3 px-3 leading-tight border-gray-300 bg-gray-100 focus:outline-none focus:border-red-700 focus:bg-white text-gray-700 pr-16 font-mono",id:"username",type:"text",autoComplete:"off",autoFocus:!0,placeholder:"Email",onChange:function(e){return i(e.target.value)}}),(0,a.jsx)("label",{className:"font-medium block mb-1 mt-6 text-gray-700",htmlFor:"password",children:"password"}),(0,a.jsxs)("div",{className:"relative w-full",children:[(0,a.jsxs)("div",{className:"absolute inset-y-0 right-0 flex items-center px-2",children:[(0,a.jsx)("input",{className:"hidden js-password-toggle",id:"toggle",type:"checkbox"}),(0,a.jsx)("label",{className:"bg-gray-300 hover:bg-gray-400 rounded px-2 py-1 text-sm text-gray-600 font-mono cursor-pointer js-password-label",htmlFor:"toggle",children:"show"})]}),(0,a.jsx)("input",{className:"appearance-none border-2 rounded w-full py-3 px-3 leading-tight border-gray-300 bg-gray-100 focus:outline-none focus:border-red-700 focus:bg-white text-gray-700 pr-16 font-mono js-password",id:"password",type:"password",autoComplete:"off",placeholder:"password",onChange:function(e){return p(e.target.value)}})]}),(0,a.jsx)("div",{className:"text-xs text-center mt-3 text-seven-red ",children:m}),(0,a.jsx)("button",{className:"w-full bg-red-700 hover:bg-red-900 text-white font-medium py-3 px-4 mt-5 rounded focus:outline-none focus:shadow-outline",type:"button",onClick:function(){return g()},children:t?"Loading...":"Sign in"})]})]})})})})}},42480:function(){}},function(e){e.O(0,[16,228,792,354,669,774,888,179],(function(){return t=46863,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.