PageSourceSearch

https://rsu.ac.th/_next/static/chunks/pages/admin/login-436e9b90ae1cfa32.js

js rsu.ac.th collected 2026-10-01 10:24:08 UTC 14,646 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2300],{71136:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/login",function(){return n(83414)}])},38575:function(t,e,n){"use strict";n.d(e,{$D:function(){return G},B5:function(){return z},BX:function(){return y},Cb:function(){return k},HT:function(){return o},KI:function(){return L},Lw:function(){return j},NJ:function(){return f},P_:function(){return B},Qf:function(){return x},W2:function(){return P},WL:function(){return d},WR:function(){return a},WW:function(){return h},X2:function(){return c},Y4:function(){return U},Ys:function(){return I},Zn:function(){return v},_W:function(){return D},_e:function(){return Z},a9:function(){return l},aM:function(){return b},cd:function(){return T},cu:function(){return F},d0:function(){return E},eS:function(){return O},gw:function(){return C},iR:function(){return w},mH:function(){return S},mR:function(){return u},mz:function(){return A},nA:function(){return _},nH:function(){return g},qj:function(){return i},rA:function(){return m},rE:function(){return N},tl:function(){return W},uw:function(){return s},w5:function(){return R},yj:function(){return p},zV:function(){return H}});var r=n(50128);let i=t=>"th"==t?"บาท":"Bath",o=t=>"th"==t?"ตั้งค่า":"Settings",u=t=>"th"==t?"สลับภาษา":"Switch language",a=t=>"th"==t?"ออกจากระบบ":"Log out",c=t=>"th"==t?"ภาษา":"Language",l=t=>"th"==t?"ดูตัวอย่าง":"Preview",s=t=>"th"==t?"จัดการ":"Action",d=t=>"th"==t?"ลบ":"Delete",f=t=>"th"==t?"คุณแน่ใจใหม่? เมื่อลบแล้วไม่สามารถนำกลับมาได้":"Are you sure? You can't undo this action afterwards.",p=t=>"th"==t?"ยกเลิก":"Cancel",h=t=>"th"==t?"ลบ":"Delete",m=t=>"th"==t?"คัดลอกจากอีกภาษา":"Copy from another language",g=t=>"th"==t?"คุณแน่ใจใหม่? ข้อมูลทุกช่องจะถูกแทนที่":"Are you sure? All fields will be replaced.",x=t=>"th"==t?"ยกเลิก":"Cancel",v=t=>"th"==t?"กำลังดึงข้อมูล ...":"Loading ...",w=t=>"th"==t?"กำลังบันทึก ...":"Saving ...",y=t=>"th"==t?"ยืนยันและคัดลอก":"Confirm and copy",b=t=>"th"==t?"คัดลอก":"Duplicate",S=t=>"th"==t?"คุณแน่ใจใหม่? แถวที่คัดลอกแล้วจะอยู่ข้างบนแถวปัจจุบัน":"Are you sure? Duplicated row will be above the current row.",j=t=>"th"==t?"ยกเลิก":"Cancel",C=t=>"th"==t?"คัดลอก":"Duplicate",I=t=>"th"==t?"คลิก หรือ ลากไฟล์มาวาง เพื่ออัพโหลด":"Click or Drop file here to upload",_=(t,e)=>{if("th"==e)switch(t){case r.Rn.HasOrder:return"ระบุตำแหน่งการเรียง";case r.Rn.NoOrder:return"ไม่ระบุตำแหน่งการเรียง";default:return"การเรียงทั้งหมด"}else switch(t){case r.Rn.HasOrder:return"Specified Order";case r.Rn.NoOrder:return"No Specified Order";default:return"Any Order"}},E=(t,e)=>{if("th"==e)switch(t){case r.J0.Active:return"Active";case r.J0.InActive:return"Inactive";default:return"สถานะทั้งหมด"}else switch(t){case r.J0.Active:return"Active";case r.J0.InActive:return"Inactive";default:return"Any status"}},A=t=>"th"==t?"คัดลอกจาก":"Copy from",N=t=>"th"==t?"เลือกไฟล์":"Select files",R=t=>"th"==t?"รูปปก":"Cover photo",k=t=>"th"==t?"หน้าแรก":"Home",z=t=>"th"==t?"หลักสูตร":"Programs",O=t=>"th"==t?"ค่าเล่าเรียน":"Tuition fee",F=t=>"th"==t?"ปฏิทินการศึกษา":"Academic Calendar",W=t=>"th"==t?"ปี":"Year",D=t=>"th"==t?"ไม่พบตัวเลือก":"No choices",G=t=>"th"==t?"เพิ่ม":"Add",L=t=>"th"==t?"พิมพ์เพื่อค้นหา":"Type to search",T=t=>"th"==t?"ผลการค้นหา":"Result of",U=t=>"th"==t?"เกิดข้อผิดพลาด: กรอกไม่ครบถ้วน":"Validation: Required fields not properly filled",Z=t=>"th"==t?"ในการบันทึกสถานะ 'เผยแพร่' จำเป็นต้องกรอกช่องที่มี * ให้ครบ":"To save with status 'Published' filling fields with * is required",B=t=>"th"==t?"เพิ่ม":"Add",H=t=>"th"==t?"ตัวกรอง":"Filter",P=t=>"th"==t?"ดาวน์โหลด":"Download"},12171:function(t,e,n){"use strict";var r=n(50128),i=n(61202),o=n(58928),u=n(39917),a=n(1625),c=n(50959);e.Z=(t,e)=>{let n=(0,a.useRouter)(),l=(0,o.getCookie)(r.ml),{facultyId:s}=n.query;return(0,c.useEffect)(()=>{let r;console.log({facultyId:s});let o=!1;try{if(window){var a;let t=null!==(a=null==l?void 0:l.toString().replaceAll("Bearer ",""))&&void 0!==a?a:"",e=JSON.parse(window.atob(t.split(".")[1]));o=Date.now()>=1e3*e.exp,r=(0,u.o)(t),null!=r&&s==i.Qq&&null!=r.facultyId&&n.push("/admin/".concat(r.facultyId))}}catch(t){console.log("error decode token")}l&&!o?t&&(e?n.push(e):n.push("/admin/central/dashboard")):n.push("/admin/login")},[s]),[l]}},83414:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return I}});var r=n(11527),i=n(3658),o=n(64018),u=n(97364),a=n(70115),c=n(5431),l=n(65477),s=n(29957),d=n(78046),f=n(63477),p=n(38062),h=n(50128),m=n(12171),g=n(58928),x=n(1625),v=n(50959),w=n(73257),y=n(62011),b=n(49350),S=n(63885);let j=async(t,e)=>
1(await (0,S._i)("/api/v2/auth/email-login",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t,password:e})})).jwt;var C=n(39917),I=()=>{let[t,e]=(0,v.useState)(!1),n=(0,i.p)(),S=(0,x.useRouter)(),[I,_]=(0,v.useState)(""),[E,A]=(0,v.useState)("");(0,m.Z)(!0);let N=async()=>{try{let t=await j(I,E);if((0,g.setCookie)(h.ml,"Bearer ".concat(t)),t){let e=(0,C.o)(t);null!=e.facultyId?S.push("/admin/".concat(e.facultyId)):S.push("/admin/central")}}catch(t){(0,w.Eo)(n,Error("Username or password incorrect!"))}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.xu,{bgImage:"/login_bg.jpg",bgPosition:"center",bgRepeat:"no-repeat",bgSize:"cover",w:"100vw",h:"90vh",children:(0,r.jsx)(o.xu,{w:"100%",h:"100%",children:(0,r.jsx)(u.M,{h:"100%",children:(0,r.jsx)(y.Z,{fontFamily:"Helvetica",w:"453px",children:(0,r.jsxs)(b.Z,{p:"0",children:[(0,r.jsx)(a.X,{fontSize:"28px",fontWeight:"700",fontFamily:"RSU",color:"#2D3748",mt:"55px",children:"Sign In"}),(0,r.jsxs)(o.xu,{flex:"1",mt:"32px",w:"350px",children:[(0,r.jsxs)(c.g,{spacing:"24px",children:[(0,r.jsxs)(o.xu,{w:"100%",children:[(0,r.jsx)(l.x,{w:"100%",p:1,fontFamily:"RSU",fontSize:"14px",fontWeight:"400",color:"#2D3748",children:"Email"}),(0,r.jsx)(s.B,{children:(0,r.jsx)(d.I,{value:I,onChange:t=>_(t.currentTarget.value),fontFamily:"RSU",fontSize:"16px",_placeholder:{color:"#A0AEC0"},placeholder:"Your email",borderColor:"border",h:"48px"})})]}),(0,r.jsxs)(o.xu,{w:"100%",children:[(0,r.jsx)(l.x,{w:"100%",p:1,fontFamily:"RSU",fontSize:"14px",fontWeight:"400",color:"#2D3748",children:"Password"}),(0,r.jsxs)(s.B,{children:[(0,r.jsx)(d.I,{value:E,onChange:t=>A(t.currentTarget.value),type:t?"text":"password",fontFamily:"RSU",fontSize:"16px",_placeholder:{color:"#A0AEC0"},placeholder:"Your password",borderColor:"border",h:"48px"}),(0,r.jsx)(f.x,{w:"47px",h:"48px",mr:2,children:(0,r.jsx)(p.z,{w:"47px",h:"32px",minW:"47px",px:"8px",borderRadius:"4px",onClick:()=>e(!t),bgColor:"#74C7FB",_hover:{bg:"#4299E1"},fontFamily:"RSU",fontSize:"16px",fontWeight:"700",children:t?"Hide":"Show"})})]})]})]}),(0,r.jsx)(p.z,{w:"100%",bgColor:"#74C7FB",_hover:{bg:"#4299E1"},h:"45px",fontFamily:"RSU",fontSize:"16px",fontWeight:"700",mt:"32px",mb:"55px",onClick:N,children:"SIGN IN"})]})]})})})})}),(0,r.jsx)(o.xu,{w:"100vw",h:"10vh",children:(0,r.jsx)(u.M,{h:"100%",children:(0,r.jsx)(l.x,{color:"#A0AEC0",children:"@ 2024, Rangsit University"})})})]})}},73257:function(t,e,n){"use strict";n.d(e,{Eo:function(){return u},XA:function(){return o},ck:function(){return c},eZ:function(){return l},ee:function(){return i},ys:function(){return a}});var r=n(38575);function i(t,e){if(null==t)return;let n="object"==typeof e?Object.values(e)[0]:e;if(void 0===n||Number.isNaN(n))return;let r=t=>{if("number"==typeof t)return"".concat(t*n,"px");let e=t.match(/^(-?\d*\.?\d+)px$/);if(e)return"".concat(parseFloat(e[1])*n,"px")};if("string"==typeof t||"number"==typeof t)return r(t);let i={};return Object.entries(t).forEach(t=>{let[e,n]=t,o=r(n);o&&(i[e]=o)}),Object.keys(i).length>0?i:void 0}function o(t,e,n,r){t&&t({title:n||"สำเร็จ",description:r||"",duration:e||500,position:"top",status:"success"})}function u(t,e,n,r,i){t&&t({title:r||(null==e?void 0:e.name),description:i||(null==e?void 0:e.message),duration:n||5e3,status:"error",position:"top",isClosable:!0})}function a(t,e){t&&t({title:(0,r.Y4)(e),description:(0,r._e)(e),duration:5e3,status:"warning",position:"top",isClosable:!0})}function c(t,e,n){t&&t({title:e||"Error",description:n||"Somthing went wrong",duration:5e3,status:"error",position:"top",isClosable:!0})}function l(t,e,n,r){t&&t({title:n||"",description:r||"",duration:e||500,position:"top",status:"error"})}},62011:function(t,e,n){"use strict";var r=n(11527),i=n(87828);e.Z=t=>{let{children:e,...n}=t;return(0,r.jsx)(i.Z,{borderRadius:"20px",...n,children:e})}},87828:function(t,e,n){"use strict";var r=n(11527);n(50959);var i=n(89498);e.Z=t=>{let{children:e,...n}=t;return(0,r.jsx)(i.k,{boxShadow:"0px 0px 8px rgba(0, 0, 0, 0.08)",mx:6,mt:6,bgColor:"white",direction:"column",borderRadius:8,...n,children:e})}},49350:function(t,e,n){"use strict";var r=n(11527);n(50959);var i=n(89498);e.Z=t=>{let{children:e,...n}=t;return(0,r.jsx)(i.k,{pt:6,px:{base:"12px",md:6},mb:4,direction:"column",alignItems:"center",alignContent:"center",alignSelf:"center",...n,children:e})}},29957:function(t,e,n){"use strict";n.d(e,{B:function(){return m},m:function(){return h}});var r=n(481),i=n(56428),o=n(52795),u=n(49226),a=n(5179),c=n(78379),l=n(6551),s=n(32920),d=n(50959),f=n(11527),[p,h]=(0,r.k)({name:"InputGroupStylesContext",errorMessage:"useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in \"<InputGroup />\" "}),m=(0,o.G)(function(t,e){let n=(0,u.jC)("Input",t),{children:r,className:o,...h}=(0,a.Lr)(t),m=(0,l.cx)("chakra-input__group",o),g={},x=(0,i.W)(r),v=n.field;x.forEach(t=>{var e,r;n&&(v&&"InputLeftElement"===t.type.id&&(g.paddingStart=null!=(e=v.height)?e:v.h),v&&"InputRightElement"===t.type.id&&(g.paddingEnd=null!=(r=v.height)?r:v.h),"InputRightAddon"===t.type.id&&(g.borderEndRadius=0),"InputLeftAddon"===t.type.id&&(g.borderStartRadius=0))});let w=x.map(e=>{var n,r;let i=(0,s.oA)({size:(null==(n=e.props)?void 0:n.size)||t.size,variant:(null==(r=e.props)?void 0:r.variant)||t.variant});return"Input"!==e.type.id?(0,d.cloneElement)(e,i):(0,d.cloneElement)(e,Object.assign(i,g,e.props))});return(0,f.jsx)(c.m.div,{className:m,ref:e,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate"},...h,children:(0,f.jsx)(p,{value:n,children:w})})});m.displayName="InputGroup"},63477:function(t,e,n){"use strict";n.d(e,{Z:function(){return s},x:function(){return d}});var r=n(29957),i=n(78379),o=n(52795),u=n(6551),a=n(11527),c=(0,i.m)("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),l=(0,o.G)(function(t,e){var n,i;let{placement:o="left",...u}=t,l=(0,r.m)(),s=l.field,d={["left"===o?"insetStart":"insetEnd"]:"0",width:null!=(n=null==s?void 0:s.height)?n:null==s?void 0:s.h,height:null!=(i=null==s?void 0:s.height)?i:null==s?void 0:s.h,fontSize:null==s?void 0:s.fontSize,...l.element};return(0,a.jsx)(c,{ref:e,__css:d,...u})});l.id="InputElement",l.displayName="InputElement";var s=(0,o.G)(function(t,e){let{className:n,...r}=t,i=(0,u.cx)("chakra-input__left-element",n);return(0,a.jsx)(l,{ref:e,placement:"left",className:i,...r})});s.id="InputLeftElement",s.displayName="InputLeftElement";var d=(0,o.G)(function(t,e){let{className:n,...r}=t,i=(0,u.cx)("chakra-input__right-element",n);return(0,a.jsx)(l,{ref:e,placement:"right",className:i,...r})});d.id="InputRightElement",d.displayName="InputRightElement"},97364:function(t,e,n){"use strict";n.d(e,{M:function(){return u}});var r=n(78379),i=n(52795),o=n(11527),u=(0,r.m)("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});u.displayName="Center";var a={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};(0,i.G)(function(t,e){let{axis:n="both",...i}=t;return(0,o.jsx)(r.m.div,{ref:e,__css:a[n],...i,position:"absolute"})})},70115:function(t,e,n){"use strict";n.d(e,{X:function(){return l}});var r=n(52795),i=n(49226),o=n(5179),u=n(78379),a=n(6551),c=n(11527),l=(0,r.G)(function(t,e){let n=(0,i.mq)("Heading",t),{className:r,...l}=(0,o.Lr)(t);return(0,c.jsx)(u.m.h2,{ref:e,className:(0,a.cx)("chakra-heading",t.className),...l,__css:n})});l.displayName="Heading"},5431:function(t,e,n){"use strict";n.d(e,{g:function(){return u}});var r=n(72237),i=n(52795),o=n(11527),u=(0,i.G)((t,e)=>(0,o.jsx)(r.K,{align:"center",...t,direction:"column",ref:e}));u.displayName="VStack"},39917:function(t,e,n){"use strict";n.d(e,{o:function(){return i}});
1class r extends Error{}function i(t,e){let n;if("string"!=typeof t)throw new r("Invalid token specified: must be a string");e||(e={});let i=!0===e.header?0:1,o=t.split(".")[i];if("string"!=typeof o)throw new r(`Invalid token specified: missing part #${i+1}`);try{n=function(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw Error("base64 string is not of the correct length")}try{var n;return n=e,decodeURIComponent(atob(n).replace(/(.)/g,(t,e)=>{let n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(t){return atob(e)}}(o)}catch(t){throw new r(`Invalid token specified: invalid base64 for part #${i+1} (${t.message})`)}try{return JSON.parse(n)}catch(t){throw new r(`Invalid token specified: invalid json for part #${i+1} (${t.message})`)}}r.prototype.name="InvalidTokenError"}},function(t){t.O(0,[2440,1202,2888,9774,179],function(){return t(t.s=71136)}),_N_E=t.O()}]);

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.