"use strict";(self.webpackChunkDr_Sai=self.webpackChunkDr_Sai||[]).push([[300],{46592:function(e,t,o){o.r(t),o.d(t,{default:function(){return b}});var n=o(96540);const r={minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",margin:0,background:"linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),\n    url('https://images.unsplash.com/photo-1497864149936-d3163f0c0f4b?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80')",backgroundSize:"cover",backgroundPosition:"center",fontFamily:"Arial, sans-serif",position:"relative"},a={position:"fixed",top:20,left:20,zIndex:1e3,color:"white",fontSize:16,lineHeight:1.2},i={textAlign:"center",padding:"2rem",background:"rgba(255,255,255,0.1)",borderRadius:15,backdropFilter:"blur(10px)",boxShadow:"0 8px 32px 0 rgba(31, 38, 135, 0.37)"},l={color:"#fff",fontSize:"1.5rem",marginBottom:"1.5rem",textShadow:"2px 2px 4px rgba(0,0,0,0.5)"},c={padding:"15px 30px",fontSize:"1.1rem",background:"rgba(255,255,255,0.1)",color:"#fff",border:"none",borderRadius:25,cursor:"pointer",transition:"all 0.3s ease",backdropFilter:"blur(5px)",boxShadow:"0 4px 15px rgba(0,0,0,0.2)"},s={background:"rgba(255,255,255,0.2)",transform:"translateY(-2px)",boxShadow:"0 6px 20px rgba(0,0,0,0.3)"},d={position:"fixed",top:0,left:0,width:"100vw",height:"100vh",background:"rgba(0,0,0,0.4)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:2e3},p={background:"#fff",borderRadius:10,padding:"2rem",minWidth:320,boxShadow:"0 8px 32px 0 rgba(31, 38, 135, 0.37)",position:"relative",textAlign:"center"},u={position:"absolute",top:10,right:15,background:"none",border:"none",fontSize:22,cursor:"pointer",color:"#888"};var b=()=>{const[e,t]=n.useState(!1),[o,b]=n.useState(!1),[g,m]=n.useState(""),[f,x]=n.useState(""),[h,S]=n.useState("");return n.createElement("div",{style:r},n.createElement("div",{style:a},"IHEP计算中心&实验物理中心"),n.createElement("div",{style:i},n.createElement("h2",{style:Object.assign({},l,{cursor:"pointer"}),onClick:()=>b(!0),title:"点击使用本地用户登录"},"欢迎探索 Dr. Sai 智能体"),n.createElement("button",{style:e?Object.assign({},c,s):c,onMouseEnter:()=>t(!0),onMouseLeave:()=>t(!1),onClick:()=>{window.location.href="/umt/login"}},"使用高能所统一认证（IHEP-SSO）登录")),o&&n.createElement("div",{style:d,onClick:()=>b(!1)},n.createElement("div",{style:p,onClick:e=>e.stopPropagation()},n.createElement("button",{style:u,onClick:()=>b(!1),title:"关闭"},"×"),n.createElement("h3",{style:{marginBottom:20}},"本地用户登录"),n.createElement("form",{onSubmit:e=>{e.preventDefault(),""===g||""===f?S("请输入账号和密码"):(S(""),console.log("登录用户: "+g),window.location.href="/auth?username="+encodeURIComponent(g)+"&token=local",b(!1))}},n.createElement("div",{style:{marginBottom:15}},n.createElement("input",{type:"text",placeholder:"账号",value:g,onChange:e=>m(e.target.value),style:{width:"90%",padding:"8px",borderRadius:5,border:"1px solid #ccc",fontSize:16},autoFocus:!0})),n.createElement("div",{style:{marginBottom:15}},n.createElement("input",{type:"password",placeholder:"密码",value:f,onChange:e=>x(e.target.value),style:{width:"90%",padding:"8px",borderRadius:5,border:"1px solid #ccc",fontSize:16}})),h&&n.createElement("div",{style:{color:"red",marginBottom:10}},h),n.createElement("button",{type:"submit",style:Object.assign({},c,{color:"#333",background:"#f0f0f0",boxShadow:"none",marginTop:5})},"登录")))))}}}]);
//# sourceMappingURL=component---src-pages-sso-login-tsx-690fb4c18948b79e2a68.js.map