page-5ca0e30b4533c081.js 32 KB

1
  1. (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8980],{70074:function(e,t,a){Promise.resolve().then(a.bind(a,69897))},2478:function(e,t,a){"use strict";a.d(t,{q5:function(){return j},AT:function(){return c},hu:function(){return p},m$:function(){return b},gu:function(){return x},z9:function(){return o},n3:function(){return f},bG:function(){return g},AA:function(){return v},gS:function(){return h},n$:function(){return m},ek:function(){return u}});var s=a(28535),r=a(41085),l=a(18963);let n=async e=>{if(!e.headers)return e;let t=e.headers.get("content-type"),a=e.headers.get("content-disposition");return null===t?null:-1!==t.indexOf("application/json")?await e.json():-1!==t.indexOf("text/plain")?await e.text():null!=a&&-1!==a.indexOf("attachment")?await e.blob():e},i=async e=>{let t=await n(e),a=(null==t?void 0:t.message)||(null==t?void 0:t.errMessage)||t;switch(e.status){case 500:a="内部服务器错误,请稍后再试";break;case 401:(0,l.rf)();return;case 403:a="资源拒绝授权访问",(0,l.d6)(1e3);break;case 404:return;default:a="string"==typeof a&&""!==a?a:"操作失败,请稍后再试,或联系技术人员"}throw s.ZP.error(a),t},d=()=>{let e=async(e,t,a)=>{let s=(0,r.kG)(),d="".concat(s).concat(e).concat((null==t?void 0:t.params)?t.params:""),c=(null==t?void 0:t.body)?t.body instanceof FormData?{...t,body:t.body}:{...t,body:JSON.stringify(t.body)}:t,o={...null==t?void 0:t.headers,...(null==t?void 0:t.body)&&t.body instanceof FormData?{}:{"Content-type":"application/json"},Authorization:"Bearer ".concat((0,l.cw)())};return fetch(d,{...c,headers:o,signal:a}).then(async e=>{if(!e.ok)throw e;return n(e)}).catch(async e=>{await i(e)})};return{get:async(t,a)=>e(t,{...a,method:"get"}),post:async(t,a)=>e(t,{...a,method:"post"}),put:async(t,a)=>e(t,{...a,method:"put"}),patch:async(t,a)=>e(t,{...a,method:"patch"}),delete:async(t,a)=>e(t,{...a,method:"delete"})}},c=e=>d().post("/category/list",{body:e}),o=e=>d().post("/employee/search",{body:e}),x=e=>d().post("/employee/detail",{body:e}),m=e=>d().post("/gpts/user/login",{body:e}),u=e=>d().post("/gpts/user/password",{body:e}),h=e=>d().post("/gpts/user/update",{body:e}),g=()=>d().post("/gpts/user/info"),f=()=>d().post("/gpts/user/balance"),p=e=>d().post("/gpts/chat/message",{body:e}),b=e=>d().post("/gpts/chat/session",{body:e}),j=e=>d().post("/gpts/chat/session/delete",{body:e}),v=e=>d().post("/gpts/chat/session/rename",{body:e})},69897:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return p}});var s=a(82267),r=a(41085),l=a(18963),n=a(38786),i=a(54644),d=a(48810),c=a(55448),o=a(41273),x=a(28281),m=a(88904),u=a(2478),h=a(87299),g=a(63501),f=a(52465);function p(){let e=(0,o.useTheme)(),{changeMenuIndex:t,loginShow:a,changeLoginShow:p}=(0,g.useGlobalContext)(),[b,j]=(0,n.useState)(),[v,y]=(0,n.useState)(!0),[N,w]=(0,n.useState)(0),[k,I]=(0,n.useState)(!1),[S,C]=(0,n.useState)(),[A,T]=(0,n.useState)([]),[_,O]=(0,n.useState)(""),[P,R]=(0,n.useState)(""),[q,F]=(0,n.useState)([]),[E,U]=(0,n.useState)(!1),[$,G]=(0,n.useState)(!1),[M,D]=(0,n.useState)(0),[J,L]=(0,n.useState)(""),W=()=>{y(!v)},z=(e,t)=>{""===e||e.includes("guid_0000_")?setTimeout(()=>{I(!0)},500):(0,u.hu)({conversationId:e,firstId:"",limit:100,agentId:t}).then(e=>{e.data.data&&C((0,h.ih)(e.data.data)),setTimeout(()=>{I(!0)},500)})},K=e=>{(0,h.wj)(0),(0,h.$U)(e),I(!1),""==e?(C([]),setTimeout(()=>{I(!0)},200)):z(e,(0,h.Rd)()),G(!1)},Z=e=>{V(e);var t=(0,h.mp)(e);null!==t&&(I(!1),C([]),(0,h.wj)(1),(0,h.wj)(1),(0,h.M)(e),(0,h.$U)(t.ConversationId),""==t.ConversationId?setTimeout(()=>{I(!0)},500):z(t.ConversationId,e),Q(e,"")),G(!1)},B=()=>{var e="guid_0000_"+new Date().getTime();(0,h.wj)(1),(0,h.$U)(e),w(0),I(!1),w(1),C([]),setTimeout(()=>{I(!0)},200),G(!1)},H=e=>{let t=(0,h.IF)(),a=(0,h.S3)();if(0===t&&(a.includes("guid_0000_")||""==a)&&null!==q&&q.length>0){var s=q.findIndex(e=>e.id===a);s>=0?q[s].id=e:q[0].id=e,F(q)}1===t&&T((0,h.nN)((0,h.Rd)(),e)),(0,h.$U)(e)},Q=(e,t)=>{setTimeout(()=>{(0,u.m$)({agentId:e,last_id:t,limit:100}).then(e=>{0===e.code&&null!==e.data.data?""==t?F(e.data.data):F(t=>[...e.data.data,...t]):F([])})})},V=e=>{(0,u.gu)({id:e}).then(e=>{0==e.code&&null!==e.data?j(e.data):j(void 0)})},X=()=>{(0,u.n3)().then(e=>{0==e.code?D(e.data.balance):D(0)})},Y=e=>{(0,u.q5)({conversationId:e,agentId:(0,h.Rd)()}).then(t=>{0==t.code&&(e==(0,h.S3)()&&B(),F(q.filter(t=>t.id!==e)))})},ee=(e,t)=>{R(""),L(""),F(q.map(a=>a.id===e?{...a,name:t}:a)),(0,u.AA)({conversationId:e,agentId:(0,h.Rd)(),name:t}).then(e=>{e.code})},et=(e,t)=>{P===e?(R(""),L("")):(R(e),L(t))};(0,n.useEffect)(()=>{t(1);let e=(0,h.IF)(),a=(0,h.Rd)(),s=(0,h.S3)();if(null!==a&&a>0)(0,u.gu)({id:a}).then(t=>{if(w(e),0==t.code&&null!==t.data){j(t.data);var r=(0,h.Pl)(t.data);T(r),z(s,a)}else{var r=(0,h.oK)();T(r);var l=(0,h.mp)(a);null===l&&null!==r&&r.length>0?((0,h.wj)(1),(0,h.M)(r[0].id),(0,h.$U)(r[0].ConversationId),z(r[0].ConversationId,a)):z(l.ConversationId,a)}});else{var r=(0,h.oK)();T(r);var l=(0,h.mp)(a);null===l&&null!==r&&r.length>0?((0,h.wj)(1),(0,h.M)(r[0].id),(0,h.$U)(r[0].ConversationId),z(r[0].ConversationId,a)):z(l.ConversationId,a),w(1)}null!==s&&""!==s&&H(s),Q(a,_),X()},[a]);let ea=(0,c.cx)((0,c.iv)("\n .ant-pro-chat-list-item-message-content{\n background-color: rgb(7 97 255 / 10%);\n }\n .ant-pro-chat-input-area{\n background-image: none;\n background-color: #202329;\n }\n .ant-pro-chat-input-area-text-container .acss-sbge3k{\n color:rgb(2 91 237);\n }\n ")),es=(0,c.cx)((0,c.iv)("\n .ant-pro-chat-list-item-message-content{\n background-color: rgb(221 222 224 / 24%);\n }\n .ant-pro-chat-input-area{\n background-image: none;\n background-color: #f8f9fa;\n }\n .ant-pro-chat-input-area-text-container .acss-sbge3k{\n color:#9ca3af;\n }\n ")),er=e=>{var t=(0,h.L0)(e);T(t);let a=(0,h.IF)(),s=(0,h.Rd)(),r=(0,h.S3)();if(null!==s&&s>0)(0,u.gu)({id:s}).then(e=>{if(w(a),0==e.code&&null!==e.data){j(e.data);var t=(0,h.Pl)(e.data);T(t),z(r,s)}else{var t=(0,h.oK)();T(t);var l=(0,h.mp)(s);null===l&&null!==t&&t.length>0?((0,h.wj)(1),(0,h.M)(t[0].id),(0,h.$U)(t[0].ConversationId),z(t[0].ConversationId,s)):z(l.ConversationId,s)}});else{var t=(0,h.oK)();T(t);var l=(0,h.mp)(s);null===l&&null!==t&&t.length>0?((0,h.wj)(1),(0,h.M)(t[0].id),(0,h.$U)(t[0].ConversationId),z(t[0].ConversationId,s)):z(l.ConversationId,s),w(1)}null!==r&&""!==r&&H(r),Q(s,_)};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex justify-between items-center bg-[slate-200] dark:bg-[#000] h-full",children:[v&&(0,s.jsxs)("div",{className:"bg-[#f8f9fa] dark:bg-[#202123] border-r-1 border-indigo-100 dark:border-blue-950 w-80 h-calc-8 md:h-calc-5 hidden md:block",children:[(0,s.jsxs)("div",{className:"bg-[#f8f9fa] dark:bg-[#202123] border-r-1 border-indigo-100 dark:border-blue-950 overflow-auto scroll-smooth shrink-0 w-80 h-calc-13 md:h-calc-10",children:[(0,s.jsxs)("div",{className:"sticky top-0 z-50 dark:shadow-[rgba(255,255,255,.15)] backdrop-blur dark:bg-transparent transition-all",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center pt-2 px-2",children:[(0,s.jsx)("div",{children:(0,s.jsxs)("button",{className:"inline-flex py-1 px-1 rounded-lg items-center text-white global-bg-color",onClick:B,children:[(0,s.jsx)(m.OlE,{className:"w-6 h-6"}),(0,s.jsx)("span",{className:"ml-1 pr-2 flex items-start flex-col leading-none",children:(0,s.jsx)("span",{className:"title-font font-medium",children:"新对话"})})]})}),(0,s.jsx)("div",{className:"cursor-pointer text-gray-400 hover:text-blue-600",onClick:W,children:(0,s.jsx)(m.djG,{className:"text-2xl"})})]}),(0,s.jsx)("div",{className:"w-full mt-4",children:(0,s.jsxs)("div",{className:"flex mx-auto flex-wrap justify-center border-b-2 border-blue-50 shadow-sm dark:border-blue-950 pb-2",children:[(0,s.jsx)("a",{className:"cursor-pointer py-1 px-4 mx-4 rounded-lg ".concat(0===N?"global-txt-color":"dark:text-gray-500"),onClick:()=>{w(0)},children:"对话历史"}),(0,s.jsx)("a",{className:"cursor-pointer py-1 px-4 mx-4 rounded-lg ".concat(1===N?"global-txt-color":"dark:text-gray-500"),onClick:()=>{w(1)},children:"助手列表"})]})})]}),0===N&&null!==q&&q.length>0&&(0,s.jsx)("div",{className:"py-4 px-2",children:(0,s.jsx)("div",{className:"mx-auto flex flex-col",children:q.map(e=>(0,s.jsx)("div",{className:"w-full mt-3 cursor-pointer",children:(0,s.jsx)("div",{className:"flex rounded border group ".concat((0,h.S3)()==e.id&&(0,h.IF)()===N?"dark:border-[#0061ff] bg-blue-50 dark:bg-gray-800 text-[#0061ff]":"border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400"," p-3 sm:flex-row flex-col"),children:(0,s.jsxs)("div",{className:"flex-grow text-ellipsis line-clamp-2 relative",children:[(0,s.jsx)(i.Z,{title:"删除提醒",description:"确定删除当前历史会话吗?",onConfirm:()=>Y(e.id),okText:"确定",cancelText:"取消",children:(0,s.jsx)(m.qy0,{className:"absolute top-0.5 right-0.5 cursor-pointer group-hover:block hidden"})}),(0,s.jsx)(m.fqR,{className:"absolute top-0.5 right-6 cursor-pointer group-hover:block hidden",onClick:()=>et(e.id,e.name)}),P===e.id&&(0,s.jsx)("p",{children:(0,s.jsx)("input",{value:J,onChange:e=>L(e.target.value),onKeyDown:t=>{"Enter"===t.key&&ee(e.id,J),"Escape"===t.key&&(R(""),L(""))},className:"h-8 bg-gray-50 dark:bg-[#202123] bg-opacity-50 rounded border border-gray-300 dark:border-slate-700 text-base outline-none text-gray-700 py-1 leading-8 transition-colors duration-200 ease-in-out"})}),P!==e.id&&(0,s.jsx)("h2",{className:"pb-2",onClick:()=>K(e.id),children:e.name}),(0,s.jsx)("p",{className:"text-sm text-gray-400",onClick:()=>K(e.id),children:new Date(e.createdAt).toLocaleString()})]})})},e.id))})}),0===N&&(null===q||0==q.length)&&(0,s.jsxs)("div",{className:"w-full px-5 text-gray-200 dark:text-gray-600 flex flex-col mt-20",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(m.SFW,{className:"w-16 h-16 text-center"})}),(0,s.jsx)("div",{className:"text-center mt-4",children:"对话历史空空如也"})]}),1===N&&null!==A&&A.length>0&&(0,s.jsx)("div",{className:"py-4 px-2",children:(0,s.jsx)("div",{className:"mx-auto flex flex-col",children:A.map(e=>(0,s.jsx)("div",{className:"w-full mt-3",children:(0,s.jsx)("div",{className:"flex rounded border group ".concat((0,h.Rd)()==e.id?"dark:border-[#0061ff] bg-blue-50 dark:bg-gray-800 text-[#0061ff]":"border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400"," p-3 sm:flex-row flex-col"),children:(0,s.jsxs)("div",{className:"flex flex-row relative",children:[(0,s.jsx)(i.Z,{title:"删除提醒",description:"确定删除当前智能助手吗?",onConfirm:()=>er(e.id),okText:"确定",cancelText:"取消",children:(0,s.jsx)(m.qy0,{className:"absolute top-0.5 right-0.5 cursor-pointer group-hover:block hidden"})}),(0,s.jsx)("div",{className:"shrink-0 inline-flex items-center justify-center h-16 overflow-hidden",children:(0,s.jsx)("img",{src:e.avatar,className:"h-16 cursor-pointer",onClick:()=>Z(e.id)})}),(0,s.jsxs)("div",{className:"flex-grow pl-2 pt-2",children:[(0,s.jsx)("h2",{className:"text-base mb-1 line-clamp-1 text-ellipsis pr-5 cursor-pointer",onClick:()=>Z(e.id),children:e.name}),(0,s.jsx)("p",{className:"text-sm line-clamp-1 text-ellipsis cursor-pointer",onClick:()=>Z(e.id),children:e.estimate})]})]})})},e.id))})}),1===N&&(null===A||0==A.length)&&(0,s.jsxs)("div",{className:"w-full px-5 text-gray-200 dark:text-gray-600 flex flex-col mt-20",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(m.SFW,{className:"w-16 h-16 text-center"})}),(0,s.jsx)("div",{className:"text-center mt-4",children:"当前助手空空如也"})]})]}),(0,s.jsx)("div",{className:"hidden text-sm h-20 w-80",children:(0,s.jsxs)("div",{className:"px-3 py-3 border-t-2 border-blue-50 shadow-sm dark:border-blue-950 dark:text-[#bc900c]",children:[(0,s.jsxs)("p",{className:"flex items-center",children:[(0,s.jsx)(m.jHS,{className:"text-[#f4a629]"}),(0,s.jsxs)("span",{className:"ml-2",children:["普通额度 ",M," 积分"]})]}),(0,s.jsxs)("p",{className:"flex items-center mt-2",children:[(0,s.jsx)(m.jHS,{className:"text-[#c81021]"}),(0,s.jsxs)("span",{className:"ml-2",children:["高级额度 ",M," 积分"]})]})]})})]}),(0,s.jsx)(c.f6,{appearance:e.theme,theme:{algorithm:"dark"==e.theme?d.Z.darkAlgorithm:d.Z.defaultAlgorithm},children:(0,s.jsxs)("div",{className:"bg-[#fcfdff] dark:bg-[#202123] grow h-calc-8 md:h-calc-5",children:[k&&(0,s.jsx)(x.j,{className:"dark"==e.theme?ea:es,style:{height:"100%",width:"100%"},initialChats:S,actions:{render:e=>(0,r.tq)()?[(0,s.jsx)("a",{className:"text-gray-400 hover:text-blue-600",onClick:()=>G(!0),children:(0,s.jsx)(m.djG,{className:"text-2xl"})},"handlShowLeftBox"),...e]:v?e:[(0,s.jsx)("a",{className:"text-gray-400 hover:text-blue-600",onClick:W,children:(0,s.jsx)(m.djG,{className:"text-2xl"})},"handlShowLeftLetter"),...e],flexConfig:{gap:24,direction:"horizontal",justify:"space-start"}},request:async e=>{let t=(0,h.Rd)();if(0==t){let e=new TextEncoder,t=new ReadableStream({start(t){t.enqueue(e.encode("请先在应用中心选择您的智能助手,[立即前往](/)")),t.close()}});return new Response(t)}let a=await fetch((0,r.kG)()+"/gpts/chat/submit",{method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8",Authorization:"Bearer ".concat((0,l.cw)())},body:JSON.stringify({content:e[e.length-1].content,conversationId:(0,h.S3)().includes("guid_0000_")?"":(0,h.S3)(),agentId:t})});if(!a.ok||!a.body)return new Response(null,{status:500,statusText:"网络错误,请重试!"});{let e=a.body.getReader(),t=new TextDecoder("utf-8"),s=new TextEncoder,r=new ReadableStream({async start(a){!function r(){e.read().then(e=>{let{done:l,value:n}=e;if(l){a.close();return}for(var i=t.decode(n,{stream:!0}).split("\n"),d=0;d<i.length-1;d++){let e=JSON.parse(i[d].replace("data: ",""));!e.finish&&e.answer?a.enqueue(s.encode(e.answer)):(e.finish&&(H(e.conversation_id),X(),Q((0,h.Rd)(),"")),e.need_login?(a.enqueue(s.encode("请登录后使用")),setTimeout(()=>{p(!0)},200)):e.need_pay&&(a.enqueue(s.encode("当前智能体需要会员才能使用,去开通:[会员套餐](/vip.html)")),setTimeout(()=>{U(!0)},200)))}r()}).catch(e=>{console.error("读取流中的数据时发生错误",e),a.error(e)})}()}});return new Response(r)}}}),!k&&(0,s.jsxs)("div",{className:"w-full px-5 text-gray-300 flex flex-col mt-40",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(m.uur,{className:"animate-spin h-16 w-16"})}),(0,s.jsx)("div",{className:"text-center mt-4",children:"会话加载中"})]})]})}),null!=b&&(0,s.jsxs)("div",{className:"bg-[#ecf1f9] dark:bg-[#202123] border-l-1 border-indigo-100 dark:border-blue-950 overflow-auto scroll-smooth shrink-0 h-calc-8 md:h-calc-5 w-96 hidden xl:block",children:[(0,s.jsx)("div",{className:"",children:(0,s.jsxs)("div",{className:"h-96 w-11/12 mx-auto relative",children:[(0,s.jsx)("div",{className:"h-72 w-10/12 mx-auto absolute rounded-lg bg-[#f6f9fd] top-20 left-0 right-0 shadow-md dark:bg-gray-950"}),(0,s.jsxs)("div",{className:"h-64 w-full absolute rounded-lg bg-[#fff] top-28 text-center shadow-lg dark:bg-gray-900",children:[(0,s.jsx)("div",{className:"mt-16 text-xl p-3 h-12 overflow-hidden dark:text-gray-500",children:b.title}),(0,s.jsx)("div",{className:"p-3 h-12 overflow-hidden",children:(e=>{let t=e.split(",");return(0,s.jsx)("ul",{children:t.map((e,t)=>(0,s.jsx)("span",{className:"text-sm py-1 px-2 mx-1 rounded-md bg-[#fdebaf] text-[#bc900c]",children:e.trim().replace('"',"").replace('"',"")},t))})})(b.tags)}),(0,s.jsx)("div",{className:"p-5 text-sm text-gray-500",children:(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"dark:text-gray-700",children:"被雇佣"}),(0,s.jsx)("p",{className:"text-2xl text-gray-700 dark:text-gray-500",children:b.hireCount})]}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"dark:text-gray-700",children:"已服务"}),(0,s.jsx)("p",{className:"text-2xl text-gray-700 dark:text-gray-500",children:b.serviceCount})]}),(0,s.jsxs)("div",{className:"text-center",children:[(0,s.jsx)("p",{className:"dark:text-gray-700",children:"业绩单"}),(0,s.jsxs)("p",{className:"text-2xl text-gray-700 dark:text-gray-500",children:[b.achievementCount,"w"]})]})]})})]}),(0,s.jsx)("div",{className:"h-32 w-32 absolute rounded-full bg-[#fff] top-10 left-0 right-0 mx-auto overflow-hidden",children:(0,s.jsx)("img",{className:"object-top",src:b.avatar})})]})}),(0,s.jsx)("div",{className:"w-11/12 mx-auto rounded-lg bg-[#fff] dark:bg-gray-900 shadow-md mt-4",children:(0,s.jsxs)("div",{className:"p-3",children:[(0,s.jsx)("h2",{className:"global-txt-color px-3",children:"个人简介"}),(0,s.jsx)("div",{className:"leading-6 text-sm text-gray-700 m-3 p-3 rounded-lg bg-[#f9fafb] dark:bg-gray-950",children:b.intro})]})}),(0,s.jsx)("div",{className:"w-11/12 mx-auto rounded-lg bg-[#fff] dark:bg-gray-900 shadow-md mt-6 ",children:(0,s.jsxs)("div",{className:"p-3",children:[(0,s.jsx)("h2",{className:"global-txt-color px-3",children:"自我评价"}),(0,s.jsx)("div",{className:"leading-6 text-sm text-gray-700 m-3 p-3 rounded-lg bg-[#f9fafb] dark:bg-gray-950",children:b.estimate})]})}),(0,s.jsx)("div",{className:"w-11/12 mx-auto rounded-lg bg-[#fff] dark:bg-gray-900 shadow-md my-6",children:(0,s.jsxs)("div",{className:"p-3",children:[(0,s.jsx)("h2",{className:"global-txt-color px-3",children:"技能"}),(0,s.jsx)("div",{className:"leading-6 text-sm text-gray-700 m-3 p-3 rounded-lg bg-[#f9fafb] dark:bg-gray-950",children:b.skill})]})})]})]}),$&&(0,r.tq)()&&(0,s.jsxs)("div",{className:"pay-box",children:[(0,s.jsx)("div",{className:"pay-mask"}),(0,s.jsx)("div",{className:"pay-div md:p-7 bg-white dark:bg-gray-900 text-base rounded w-full md:container h-screen",children:(0,s.jsx)("div",{className:"h-full overflow-y-auto",children:(0,s.jsxs)("div",{className:"bg-[#f8f9fa] dark:bg-[#202123] w-full",children:[(0,s.jsxs)("div",{className:"bg-[#f8f9fa] dark:bg-[#202123] overflow-auto scroll-smooth shrink-0 w-full h-calc-5",children:[(0,s.jsxs)("div",{className:"sticky top-0 z-50 dark:shadow-[rgba(255,255,255,.15)] backdrop-blur dark:bg-transparent transition-all",children:[(0,s.jsxs)("div",{className:"flex justify-between items-center pt-2 px-2",children:[(0,s.jsx)("div",{children:(0,s.jsxs)("button",{className:"inline-flex py-1 px-1 rounded-lg items-center text-white global-bg-color",onClick:B,children:[(0,s.jsx)(m.OlE,{className:"w-6 h-6"}),(0,s.jsx)("span",{className:"ml-1 pr-2 flex items-start flex-col leading-none",children:(0,s.jsx)("span",{className:"title-font font-medium",children:"新对话"})})]})}),(0,s.jsx)("div",{className:"cursor-pointer text-gray-400 hover:text-blue-600",onClick:()=>{G(!1)},children:(0,s.jsx)(m.tgW,{className:"absolute right-2.5 top-2.5 w-8 h-8 cursor-pointer transform duration-500 ease-in-out hover:scale-125 text-gray-500"})})]}),(0,s.jsx)("div",{className:"w-full mt-4",children:(0,s.jsxs)("div",{className:"flex mx-auto flex-wrap justify-center border-b-2 border-blue-50 shadow-sm dark:border-blue-950 pb-2",children:[(0,s.jsx)("a",{className:"cursor-pointer py-1 px-4 mx-4 rounded-lg ".concat(0===N?"global-txt-color":"dark:text-gray-500"),onClick:()=>{w(0)},children:"对话历史"}),(0,s.jsx)("a",{className:"cursor-pointer py-1 px-4 mx-4 rounded-lg ".concat(1===N?"global-txt-color":"dark:text-gray-500"),onClick:()=>{w(1)},children:"助手列表"})]})})]}),0===N&&null!==q&&q.length>0&&(0,s.jsx)("div",{className:"py-4 px-2",children:(0,s.jsx)("div",{className:"mx-auto flex flex-col",children:q.map(e=>(0,s.jsx)("div",{className:"w-full mt-3 cursor-pointer",onClick:()=>K(e.id),children:(0,s.jsx)("div",{className:"flex rounded border ".concat((0,h.S3)()==e.id&&(0,h.IF)()===N?"dark:border-[#0061ff] bg-blue-50 dark:bg-gray-800 text-[#0061ff]":"border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400"," p-3 sm:flex-row flex-col"),children:(0,s.jsxs)("div",{className:"flex-grow text-ellipsis line-clamp-2",children:[(0,s.jsx)("h2",{className:"pb-2",children:e.name}),(0,s.jsx)("p",{className:"text-sm text-gray-400",children:new Date(e.createdAt).toLocaleString()})]})})},e.id))})}),0===N&&(null===q||0==q.length)&&(0,s.jsxs)("div",{className:"w-full px-5 text-gray-200 dark:text-gray-600 flex flex-col mt-20",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(m.SFW,{className:"w-16 h-16 text-center"})}),(0,s.jsx)("div",{className:"text-center mt-4",children:"对话历史空空如也"})]}),1===N&&null!==A&&A.length>0&&(0,s.jsx)("div",{className:"py-4 px-2",children:(0,s.jsx)("div",{className:"mx-auto flex flex-col",children:A.map(e=>(0,s.jsx)("div",{className:"w-full mt-3",children:(0,s.jsx)("div",{className:"flex rounded border group ".concat((0,h.Rd)()==e.id&&(0,h.IF)()===N?"dark:border-[#0061ff] bg-blue-50 dark:bg-gray-800 text-[#0061ff]":"border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-400"," p-3 sm:flex-row flex-col"),children:(0,s.jsxs)("div",{className:"flex flex-row relative",children:[(0,s.jsx)(i.Z,{title:"删除提醒",description:"确定删除当前智能助手吗?",onConfirm:()=>er(e.id),okText:"确定",cancelText:"取消",children:(0,s.jsx)(m.qy0,{className:"absolute top-0.5 right-0.5 cursor-pointer group-hover:block hidden"})}),(0,s.jsx)("div",{className:"shrink-0 inline-flex items-center justify-center h-16 overflow-hidden",children:(0,s.jsx)("img",{src:e.avatar,className:"h-16 cursor-pointer",onClick:()=>Z(e.id)})}),(0,s.jsxs)("div",{className:"flex-grow pl-2 pt-2",children:[(0,s.jsx)("h2",{className:"text-base mb-1 line-clamp-1 text-ellipsis pr-5 cursor-pointer",onClick:()=>Z(e.id),children:e.name}),(0,s.jsx)("p",{className:"text-sm line-clamp-1 text-ellipsis cursor-pointer",onClick:()=>Z(e.id),children:e.estimate})]})]})})},e.id))})}),1===N&&(null===A||0==A.length)&&(0,s.jsxs)("div",{className:"w-full px-5 text-gray-200 dark:text-gray-600 flex flex-col mt-20",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(m.SFW,{className:"w-16 h-16 text-center"})}),(0,s.jsx)("div",{className:"text-center mt-4",children:"当前助手空空如也"})]})]}),(0,s.jsx)("div",{className:"text-sm h-20 w-full",children:(0,s.jsxs)("div",{className:"px-3 py-3 border-t-2 border-blue-50 dark:border-blue-950 dark:text-[#bc900c]",children:[(0,s.jsxs)("p",{className:"flex items-center",children:[(0,s.jsx)(m.jHS,{className:"text-[#f4a629]"}),(0,s.jsxs)("span",{className:"ml-2",children:["普通额度 ",M," 积分"]})]}),(0,s.jsxs)("p",{className:"flex items-center mt-2",children:[(0,s.jsx)(m.jHS,{className:"text-[#c81021]"}),(0,s.jsxs)("span",{className:"ml-2",children:["高级额度 ",M," 积分"]})]})]})})]})})})]}),E&&(0,s.jsxs)("div",{className:"pay-box",children:[(0,s.jsx)("div",{className:"pay-mask"}),(0,s.jsxs)("div",{className:"pay-div pt-12 md:p-7 bg-white dark:bg-gray-900 text-base rounded w-full md:h-5/6 md:container h-screen",children:[(0,s.jsx)(m.tgW,{className:"absolute right-2.5 top-2.5 w-8 h-8 cursor-pointer transform duration-500 ease-in-out hover:scale-125 text-gray-500",onClick:()=>{U(!1)}}),(0,s.jsx)("div",{className:"h-full overflow-y-auto",children:(0,s.jsx)(f.default,{})})]})]})]})}},52465:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return d}});var s=a(82267),r=a(38786),l=a(63501),n=a(88904);let i=[{id:1,name:"入门体验会员",description:"套餐包含500积分通用AI模型(AI3.5Turbo等模型)、100积分增强AI模型(AI4o大模型)、30积分高级绘画额度",price:"19.99",image:"https://aifile.ascrm.cn/system/gpts/member-a.png",days:30,basePoints:100,seniorPoints:100},{id:2,name:"季度高级会员",description:"套餐包含800积分通用AI模型(AI3.5Turbo等模型)、1000积分增强AI模型(AI4o大模型)、300积分高级绘画额度",price:"99.00",image:"https://aifile.ascrm.cn/system/gpts/member-b.png",days:120,basePoints:800,seniorPoints:1e3},{id:3,name:"年度畅享会员",description:"套餐包含3000积分通用AI模型(AI3.5Turbo等模型)、3000积分增强AI模型(AI4o大模型)、300积分高级绘画额度",price:"365.00",image:"https://aifile.ascrm.cn/system/gpts/member-c.png",days:365,basePoints:3e3,seniorPoints:3e3}];function d(){let{changeMenuIndex:e}=(0,l.useGlobalContext)(),[t,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{},[]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("section",{className:"text-gray-600 body-font mt-6 md:mt-0",children:(0,s.jsxs)("div",{className:"w-full md:container md:px-5 md:py-24 mx-auto",children:[(0,s.jsxs)("div",{className:"flex flex-col text-center w-full",children:[(0,s.jsx)("h1",{className:"sm:text-4xl text-3xl font-medium title-font mb-2 text-gray-900 dark:text-white",children:"会员套餐"}),(0,s.jsx)("p",{className:"lg:w-2/3 mx-auto leading-relaxed text-base text-gray-500",children:"尽情探索,欢迎光临我们的在线商店、感谢您选择我们、让我们一同开启愉悦的购物之旅!"})]}),(0,s.jsx)("div",{className:"px-4 py-8 sm:px-6 sm:py-12 lg:px-8 lg:py-16",children:(0,s.jsx)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2 md:gap-4 xl:grid-cols-3 xl:gap-8",children:i.map(e=>(0,s.jsxs)("div",{className:"rounded-2xl border border-gray-200 shadow-sm dark:border-gray-500",children:[(0,s.jsxs)("div",{className:"p-6 sm:px-8",children:[(0,s.jsx)("img",{className:"lg:h-48 md:h-36 w-full object-cover object-center rounded-2xl",src:e.image,alt:e.name}),(0,s.jsx)("h2",{className:"mt-2 text-lg font-medium text-gray-900 dark:text-white",children:e.name}),(0,s.jsx)("p",{className:"mt-2 text-gray-700 dark:text-gray-500",children:e.description}),(0,s.jsxs)("p",{className:"mt-2 sm:mt-4",children:[(0,s.jsx)("strong",{className:"text-3xl font-bold text-gray-900 sm:text-4xl dark:text-gray-300",children:e.days}),(0,s.jsx)("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-500 ml-1",children:"天"})]}),(0,s.jsxs)("button",{className:"mt-4 block w-full rounded px-12 py-3 text-center text-sm font-medium text-white global-bg-color focus:outline-none focus:ring sm:mt-6 transition ease-in-out hover:-translate-y-1",onClick:()=>a(!0),children:["¥",e.price]})]}),(0,s.jsx)("div",{className:"px-6 pb-6 sm:px-8 sm:pb-8",children:(0,s.jsxs)("ul",{className:"space-y-2 text-gray-700 dark:text-gray-500",children:[(0,s.jsxs)("li",{className:"flex justify-between",children:[(0,s.jsx)("span",{children:"基础模型额度"}),(0,s.jsxs)("span",{children:[e.basePoints," 积分 "]})]}),(0,s.jsxs)("li",{className:"flex justify-between",children:[(0,s.jsx)("span",{children:"高级模型额度"}),(0,s.jsxs)("span",{children:[e.seniorPoints," 积分 "]})]})]})})]},e.id))})})]})}),t&&(0,s.jsxs)("div",{className:"pay-box",children:[(0,s.jsx)("div",{className:"pay-mask"}),(0,s.jsxs)("div",{className:"pay-div p-7 bg-white dark:bg-gray-900 text-base rounded w-11/12 lg:w-full max-w-screen-lg",children:[(0,s.jsx)(n.tgW,{className:"absolute right-2.5 top-2.5 w-8 h-8 cursor-pointer transform duration-500 ease-in-out hover:scale-125 text-gray-500",onClick:()=>{a(!1)}}),(0,s.jsx)("h2",{className:"text-xl global-txt-color",children:"会员套餐支付"}),(0,s.jsxs)("div",{className:"py-10 grid grid-cols-1 md:grid-cols-2 md:gap-8",children:[(0,s.jsxs)("div",{className:"",children:[(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)("div",{className:"w-20 text-nowrap text-left h-6 leading-8 shrink-0",children:"需要支付:"}),(0,s.jsx)("div",{className:"h-6 text-red-700 text-2xl",children:"¥19.90"})]}),(0,s.jsxs)("div",{className:"mt-4 flex ",children:[(0,s.jsx)("div",{className:"w-20 text-nowrap text-left shrink-0",children:"套餐名称:"}),(0,s.jsx)("div",{className:"text-left",children:"入门体验会员"})]}),(0,s.jsxs)("div",{className:"mt-4 flex",children:[(0,s.jsx)("div",{className:"w-20 text-nowrap text-left shrink-0",children:"套餐描述:"}),(0,s.jsx)("div",{className:"text-left w-5/6",children:"套餐包含500积分通用AI模型(AI3.5Turbo等模型)、100积分增强AI模型(AI4o大模型)、30积分高级绘画额度"})]})]}),(0,s.jsxs)("div",{className:"text-center py-4 md:py-0 mt-5 md:mt-0 border-t md:border-t-0",children:[(0,s.jsxs)("div",{children:["请在 ",(0,s.jsx)("span",{className:"text-red-700",children:"00:03:34"})," ","时间内完成支付!"]}),(0,s.jsx)("div",{className:"w-full pt-3",children:(0,s.jsxs)("div",{className:"relative w-72 mx-auto p-3 border rounded",children:[(0,s.jsx)("img",{src:"/temp/wxpay.png",className:"w-12 bg-white p-1 div-center"}),(0,s.jsx)("img",{src:"/temp/qrcode.png"})]})}),(0,s.jsx)("div",{className:"mt-2",children:"打开微信扫码支付"})]})]})]})]})]})}},63501:function(e,t,a){"use strict";a.r(t),a.d(t,{GlobalProvider:function(){return n},useGlobalContext:function(){return i}});var s=a(82267),r=a(38786);let l=(0,r.createContext)(null),n=e=>{let{children:t}=e,[a,n]=(0,r.useState)(0),[i,d]=(0,r.useState)(!1),[c,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{},[]),(0,s.jsx)(l.Provider,{value:{menuIndex:a,changeMenuIndex:e=>{n(e)},loginShow:i,changeLoginShow:e=>{d(e)},uploadUserInfoState:c,changeUploadUserInfoState:e=>{o(e)}},children:t})},i=()=>(0,r.useContext)(l)},87299:function(e,t,a){"use strict";function s(e){let t=[];return e.forEach(e=>{e.query&&t.push({id:e.id,role:"user",parentId:"",model:"",content:e.query,createAt:e.createdAt,updateAt:e.createdAt}),e.answer&&t.push({id:e.id+"_assistant",role:"assistant",parentId:e.id,model:"",content:e.answer,createAt:e.createdAt,updateAt:e.createdAt})}),t}a.d(t,{$U:function(){return b},IF:function(){return g},L0:function(){return o},M:function(){return f},Pl:function(){return i},Rd:function(){return p},S3:function(){return j},ih:function(){return s},mp:function(){return c},nN:function(){return d},oK:function(){return n},wj:function(){return h}});let r="chat-model-list";function l(e){localStorage.setItem(r,JSON.stringify(e))}let n=()=>JSON.parse(localStorage.getItem(r)||"[]"),i=e=>{var t=n();return null===t?t=[{id:e.id,name:e.title,avatar:e.avatar,estimate:e.estimate,createdAt:e.createdAt,ConversationId:""}]:0>t.findIndex(t=>t.id==e.id)&&(t=[{id:e.id,name:e.title,avatar:e.avatar,estimate:e.estimate,createdAt:e.createdAt,ConversationId:""},...t]),l(t),t},d=(e,t)=>{var a=n();if(null!==a){var s=a.findIndex(t=>t.id==e);s>=0&&(""==a[s].ConversationId||a[s].ConversationId.includes("guid_0000_"))&&(a[s].ConversationId=t)}return l(a),a},c=e=>{var t=n();if(null!==t){var a=t.findIndex(t=>t.id==e);if(a>=0)return t[a]}return{id:0,name:"",avatar:"",estimate:"",createdAt:0,ConversationId:""}},o=e=>{var t=n();if(null!==t){var a=t.findIndex(t=>t.id==e);a>=0&&t.splice(a,1)}return l(t),e==p()&&(null!=t&&t.length>0?(h(1),f(t[0].id),b(t[0].ConversationId)):(h(1),f(0),b(""))),t},x="chat-used-list-type",m="chat-used-agent-id",u="chat-used-conversation-id",h=e=>{localStorage.setItem(x,JSON.stringify(e))},g=()=>{let e=0;if("undefined"==typeof localStorage)return e;let t=localStorage.getItem(x);return t&&(e=parseInt(null!=t?t:0)),e},f=e=>{localStorage.setItem(m,e.toString())},p=()=>{let e=0;if("undefined"==typeof localStorage)return e;let t=localStorage.getItem(m);return t&&(e=parseInt(null!=t?t:0)),e},b=e=>{localStorage.setItem(u,e)},j=()=>{let e="";if("undefined"==typeof localStorage)return e;let t=localStorage.getItem(u);return t&&(e=t),e}},41085:function(e,t,a){"use strict";a.d(t,{kG:function(){return r},tq:function(){return s}});let s=()=>{let e=void 0===window.navigator?"":navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|mobile|CriOS/i.test(e)},r=()=>"https://wxadminapi.gkscrm.com/wechat-api"},18963:function(e,t,a){"use strict";a.d(t,{Sm:function(){return n},cw:function(){return i},d6:function(){return l},rf:function(){return r}});let s=()=>"/login",r=()=>{location.href=s()},l=e=>{let t=()=>{location.href="/"};e?setTimeout(t,e):t()},n=(e,t)=>{localStorage.setItem("session",JSON.stringify({sessionId:e,expires:t}))},i=()=>{if("undefined"==typeof localStorage)return"";let e=JSON.parse(localStorage.getItem("session")||"{}");return(null==e?void 0:e.expires)&&(null==e?void 0:e.expires)>new Date().getTime()?e.sessionId:""}}},function(e){e.O(0,[6407,7815,9791,3402,7272,3463,7717,1744],function(){return e(e.s=70074)}),_N_E=e.O()}]);