(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2719],{62368:function(e,t,n){"use strict";n.d(t,{$l:function(){return g},Eo:function(){return b},Fe:function(){return x},KE:function(){return j},MV:function(){return h},Tv:function(){return _},Uz:function(){return v},Vm:function(){return l},XK:function(){return r},be:function(){return o},cE:function(){return u},iA:function(){return d},kL:function(){return p},lN:function(){return N},mH:function(){return c},qy:function(){return f},x5:function(){return m}});var i=n(13480),s=n(3834),a=n(21074);let l=()=>(0,i.Z)(s.dJ.post("/v1/space/list")),o=e=>(0,i.Z)(s.dJ.post("/v1/space/create",{...e})),r=e=>(0,i.Z)(s.dJ.post("/v1/space/del",{...e})),c=e=>(0,i.Z)(s.dJ.post("/v1/space/set",{...e})),d=async e=>{let t=await (0,a.l7)();return(0,i.Z)(s.dJ.post("/v1/space/switch",{...e,device_type:t}))},u=async()=>{let e=await (0,a.l7)();return(0,i.Z)(s.dJ.post("/v1/space/get_current_space",{device_type:e}))},p=e=>(0,i.Z)(s.dJ.post("/v1/space/info",{...e})).then(e=>{let[t,n]=e;return(null==n?void 0:n.code)===200?n.data:[t,n]}),x=e=>(0,i.Z)(s.dJ.post("/v1/space/edit",{...e})),m=e=>(0,i.Z)(s.dJ.get("/v1/space/member_list",{params:e})),h=e=>(0,i.Z)(s.dJ.post("/v1/space/is_in_space",{...e})),v=e=>(0,i.Z)(s.dJ.post("/v1/space/invite_url",{...e})),g=e=>(0,i.Z)(s.dJ.post("/v1/invite/invite_add",{...e})),f=e=>(0,i.Z)(s.dJ.post("/v1/space/sort",{...e})),_=e=>(0,i.Z)(s.dJ.post("/v1/space/apply_join",{...e})),j=e=>(0,i.Z)(s.dJ.post("/v1/space/apply_edit",{...e})),N=e=>(0,i.Z)(s.dJ.post("/v1/space/nickname",{...e})),b=e=>(0,i.Z)(s.dJ.post("/v1/space/audit",{...e}))},92719:function(e,t,n){"use strict";n.d(t,{NC:function(){return ei},hP:function(){return es},ZP:function(){return er},Zl:function(){return ea}});var i=n(79189),s=n(45e3),a=n(38180),l=n(76625),o=n(52057),r=n(45842),c=n(16733),d=n(83026),u=n(40706),p=n(41964),x=n(62368),m=n(16266),h=n(79742),v=n(8814),g=n(79036),f=e=>{let{children:t}=e,[n,s]=(0,r.useState)(!1),[a,c]=(0,r.useState)(""),d=(0,o.useRouter)(),f=async()=>{if(!a.trim()){l.ZP.error("空间名不能为空");return}if(a.trim().length>=25){l.ZP.error("空间名最多25个字符");return}(0,m.gX)("点击埋点-上方操作","10220");let[,e]=await (0,x.be)({name:a});if((null==e?void 0:e.code)===200){var t,n,i;await (0,x.iA)({uuid:null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.uuid}),(0,h.handleAddRemoteSpace)({space_id:(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.uuid)||"0"}),(0,g.KY)("space_info",null==e?void 0:e.data),d.push("/team/".concat(null==e?void 0:null===(i=e.data)||void 0===i?void 0:i.uuid,"/setting")),ei.next(!0),c(""),l.ZP.success("创建成功"),s(!1),setTimeout(()=>{(0,h.handleInitLibTagList)()},1e3)}else l.ZP.error(null==e?void 0:e.msg)},_=()=>{c(""),s(!1)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{onClick:()=>{if(!(0,g.ej)("token")){(0,h.handleOpenPopup)(v.k.Register);return}s(!0)},children:t}),(0,i.jsxs)(u.default,{className:"space-custom-modal",centered:!0,open:n,title:"免费创建团队",width:456,okText:"确认",cancelText:"取消",onCancel:()=>_(),onOk:()=>f(),children:[(0,i.jsx)("div",{className:"text-[#666] text-[14px] leading-[22px] mb-[8px]",children:"创建团队！与您的同事或合作伙伴一起开搜吧。"}),(0,i.jsx)(p.default,{value:a,placeholder:"请输入团队名称",allowClear:!0,onChange:e=>{c(e.target.value)}})]})]})},_=n(66196),j=n(65212),N=n(9462),b=n.n(N),y=n(54682),w=n(12959),F=n(1608),k=n(68265),S=n(2497),A=n.n(S),T=n(17204);let L=e=>Array.isArray(e)?e.map(e=>(e.created_at=A()(e.created_at).format("YYYY-MM-DD HH:mm"),e)):[];var I=e=>{var t,n;let{message:i}=k.Z.useApp(),[{historyList:s,pageInfo:a},l]=(0,w.Z)({historyList:L(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.list)||[],pageInfo:{page:1,page_size:20,total_rows:(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.total_rows)||0}}),{loading:o,run:r}=(0,F.Z)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,T.Jz)({...e,page:e.page||a.page,page_size:e.page_size||a.page_size})},{manual:!0,onSuccess:e=>{var t;let[,n]=e;if(Array.isArray(null==n?void 0:null===(t=n.data)||void 0===t?void 0:t.list)){let{list:e=[],pages:t={}}=(null==n?void 0:n.data)||{};l({historyList:1===t.page?L(e):[...s,...L(e)],pageInfo:t})}}}),{loading:c,run:d,runAsync:u}=(0,F.Z)(e=>(0,T.Rw)(e),{manual:!0,onSuccess:e=>{let[,t]=e;(null==t?void 0:t.code)===200?(i.success("删除成功"),l({historyList:[]}),r()):i.error("删除失败")}});return{historyList:s,pageInfo:a,queryLoading:o,deleteLoading:c,getHistory:r,removeHistory:d,removeHistoryAsync:u}},Z=n(62818),C=n(74051),P=n(80570),M=n(21074),B=n(85555),E=n(3484),D=n(38055),W=n(32717),R=n(74842),J=n(80109),O=n(69882),X=n.n(O),z=n(17259);let H=e=>{let{className:t,style:n,icon:s,name:a}=e;return(0,i.jsxs)("div",{className:(0,m.cn)(X().item,t),style:n,children:[s?(0,i.jsx)("img",{className:(0,m.cn)("rounded-full bg-[#f5f5f5] w-[16px] h-[16px] object-cover relative"),src:"".concat(s||z.c1,"?x-oss-process=image/resize,m_fill,w_100,h_100"),alt:"头像"}):(0,i.jsx)("div",{className:"w-[100%] h-[100%] bg-[#00525b] text-[#fff] text-[10px] flex justify-center items-center rounded-full",children:a.slice(0,1)}),(0,i.jsx)("div",{className:"w-[6px] h-[6px] rounded-[50%] border border-[1px] border-[#fff]  absolute bottom-[0px] right-[0px] bg-[#00B277]"})]})};var U=e=>{let{onlineUserList:t}=e,n=t.slice(0,2),s=t.slice(2);return(0,i.jsxs)("div",{className:X().box,style:{marginRight:1===n.length?"6px":2===n.length?"4px":-((n.length-1)*6)},children:[n.map((e,t)=>(0,i.jsx)("span",{className:"relative",style:{left:-(2*t),zIndex:t},children:(0,i.jsx)(H,{icon:e.icon,name:e.name})},e.id)),s.length>0&&(0,i.jsx)("div",{className:(0,m.cn)(X().plusBox),children:t.length})]})},q=n(49417),K=n(42100);let V=e=>{(0,m.gX)("点击埋点-上方操作",e)},Y={0:"icon-quanwang",4:"icon-wenku-01",2:"icon-Read",3:"icon-FileSearch",1:"icon-damoxing",5:"icon-baikesousuo",7:"icon-Search",8:"icon-Search",9:"icon-Search"},G=(e,t)=>Y[t],Q=e=>{let{item:t,isCurrent:n,handleDelete:s,handleHistoryClick:a}=e,{users:l}=(0,J.zv)(t.order_no),o=(0,r.useMemo)(()=>{var e;let n=null==t?void 0:null===(e=t.update_users_info)||void 0===e?void 0:e.reduce((e,t)=>(l.find(e=>e.id===t.uuid)||e.push({...t,name:t.nickname,id:t.uuid,icon:t.avatar,status:"offline"}),e),[]);return[...l,...n||[]]},[l,t.update_users_info]);return(0,i.jsxs)("div",{onClick:()=>{a(t)},className:(0,m.cn)("ml-[40px] w-[100%] max-w-[calc(100%-40px)] pl-[17px] pr-[8px] border-l-[2px] min-h-[24px] flex justify-between items-center border-[#F5F5F5] text-[12px] text-[#999] hover:bg-[#fafafa] cursor-pointer",b().subMenuItem,{"bg-[#F5FFFD] font-medium text-[#333] border-[#008888]":n}),style:n?{background:"var(--Linear, linear-gradient(92deg, #FBFFF7 0%, #F5FFFD 100%))"}:{},children:[(0,i.jsxs)("span",{className:"truncate",children:[(0,i.jsx)("i",{className:(0,m.cn)("icon !text-[12px] mr-1",G(t.mode,t.type))}),t.query]}),(0,i.jsx)("span",{className:"flex-1"}),l.find(e=>{var t;return e.id!==(null===(t=(0,h.getUserInfo)())||void 0===t?void 0:t.uuid)})&&(0,i.jsx)(q.Z,{userList:o,showOffline:!0,children:(0,i.jsx)("div",{className:"flex justify-center items-center",children:(0,i.jsx)(U,{onlineUserList:l})})}),(0,i.jsx)("div",{className:(0,m.cn)("flex items-center px-1 ml-".concat(2===l.length?2:1," rounded-lg text-center transition-all justify-center w-[24px] h-[24px] hover:bg-[#e8e8e8]"),b().deleteIcon),onClick:e=>{e.stopPropagation(),s(t.order_no)},children:(0,i.jsx)("i",{className:(0,m.cn)("icon icon-shanchu relative !text-[14px] top-[1px]")})})]},t.order_no)};var $=e=>{let{historyList:t,handleHistoryClick:n,removeHistoryAsync:s,showMore:a=!0}=e,l=(0,o.useRouter)(),r=(0,o.usePathname)(),c="/history"===r,d=!r.includes("/lib"),p=(0,W.Z)(e=>{u.default.confirm({title:"确认删除此搜索记录？",content:"删除后，搜索记录将不可恢复",centered:!0,okText:"删除",icon:null,closable:!0,autoFocusButton:null,okButtonProps:{danger:!0,style:{width:96}},cancelButtonProps:{style:{width:96}},onOk:async()=>{let[,t]=await s(e);r==="/s/".concat(e)&&(null==t?void 0:t.code)===200&&l.push("/")}})}),x=e=>{l.push(e)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:(0,m.cn)("cursor-pointer h-[32px] pl-[32px] pr-[16px] py-[8px] text-[14px] leading-[24px] text-[#666] flex justify-between items-center hover:bg-[#fafafa]",{"bg-[#F5FFFD] font-medium text-[#333]":c}),onClick:()=>x(ea("/history")),children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("span",{className:"text-[14px]",children:"\uD83D\uDD0D️"}),(0,i.jsx)("span",{className:"ml-[8px]",children:"最近记录"})]}),(0,i.jsx)("div",{className:b().collapseIcon,style:{transform:"rotate(0deg)"},children:(0,i.jsx)("i",{className:"icon icon-a-jiantou2"})})]}),(0,i.jsx)(K.E.div,{initial:!1,animate:{maxHeight:c||d?"160px":0,minHeight:0},transition:{duration:.3,ease:"easeInOut"},className:b().historyListWrap,children:t.slice(0,5).map(e=>{let t=String(e.mode)===E.Z.PhotoTextNote?r==="".concat(y.pB).concat(e.order_no):7===e.type?r==="/wendang/".concat(e.order_no):r==="/s/".concat(e.order_no);return(0,i.jsx)(Q,{item:e,isCurrent:t,handleDelete:p,handleHistoryClick:n},e.order_no)})}),t.length>8&&a&&(0,i.jsx)("div",{onClick:()=>x(ea("/history")),className:"ml-[25px] pl-[13px] pr-[8px] h-[32px] flex items-center text-[14px] text-[#999] hover:bg-[#f5f5f5] cursor-pointer",children:(0,i.jsxs)(R.Z,{size:4,onClick:()=>V("10006"),children:["查看更多",(0,i.jsx)("i",{className:"icon icon-a-Updownleftandrightshangxiazuoyou1 inline-block text-[12px] transform rotate-180"})]})},"moreHistory")]})};let ee=e=>{(0,m.gX)("点击埋点-上方操作",e)},et=e=>{let{item:t,isCurrent:n,handleLibTagClick:s}=e;return(0,i.jsx)("div",{onClick:()=>{s(t),ee("10005")},className:(0,m.cn)("pl-[32px] w-[100%] max-w-[100%] pr-[8px]  min-h-[32px] flex justify-between items-center border-[#F5F5F5] text-[16px] leading-[24px] text-[#666] hover:bg-[#fafafa] cursor-pointer",b().subMenuItem,{"bg-[#F5FFFD] font-medium text-[#333] border-[#008888]":n}),style:n?{background:"var(--Linear, linear-gradient(92deg, #FBFFF7 0%, #F5FFFD 100%))"}:{},children:(0,i.jsxs)("span",{className:b().subMenuItemTextBox,onClick:()=>ee("10005"),children:[t.emoji?(0,i.jsx)("span",{className:b().subMenuItemTextIcon,children:t.emoji}):(0,i.jsx)("i",{className:"icon icon-Tags ".concat(b().subMenuItemTextIcon)}),(0,i.jsx)("div",{className:"flex-1 truncate",children:t.name})]})},t.tag_id)};var en=e=>{let{libTagList:t,handleLibTagClick:n}=e,s=(0,o.useSearchParams)();return(0,o.useRouter)(),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:b().historyListWrap,children:t.slice(0,5).map(e=>{let t=e.tag_id===Number(s.get("tag_id"));return(0,i.jsx)(et,{item:e,isCurrent:t,handleLibTagClick:n},e.tag_id)})}),t.length>8&&!1]})};let ei=new c.x,es=new c.x,ea=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t&&["/lib","/history"].includes(e)){let t=(0,C.getSpaceId)();return"".concat(e).concat("0"===t?"":"?team=".concat(t))}return e},el=e=>{let{title:t,isLibTag:n,onClick:s,path:a,icon:l,canCollapse:c,itemKey:d,warpStyle:u,children:p}=e,x=(0,o.usePathname)(),v=(0,h.useSelector)(e=>e.openAsideItem),g=()=>{(x.split("/")[1]===a.split("/")[1]||"/s"===x.split("/")[1]&&"/history"===a.split("/")[1])&&d&&(0,P.iP)(d)};(0,r.useEffect)(()=>{g()},[x]);let f=x.split("/")[1]===a.split("/")[1],_=!(0,m.aV)()&&window.location.pathname+window.location.search===a;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{onClick:s,className:(0,m.cn)("px-[16px] h-[48px] flex items-center hover:bg-[#FAFAFA] text-[16px] text-[#666] cursor-pointer shrink-0",{"bg-[#F5FFFD] font-medium text-[#333]":f||_,"mt-[12px]":n}),style:f||_?{background:"var(--Linear, linear-gradient(92deg, #FBFFF7 0%, #F5FFFD 100%))"}:{},children:[(0,i.jsx)("i",{className:(0,m.cn)("icon  text-[#666] !text-[20px] mr-[8px]",l,{"text-[#333]":f||_})}),(0,i.jsx)("a",{href:"".concat(B.ho).concat(a),className:"text-inherit hover:text-inherit",onClick:e=>{e.preventDefault()},children:(0,i.jsx)("div",{className:"".concat(b().asideTitle," ").concat(f||_?b().activeAsideTitle:""),children:t})}),(0,i.jsx)("div",{className:"flex-1"}),c&&(0,i.jsx)("div",{className:(0,m.cn)(b().collapseIcon,{[b().collapse]:d===v}),onClick:e=>{e.stopPropagation(),d&&(0,P.iP)(d===v?"":d)},children:(0,i.jsx)("i",{className:"icon icon-a-Updownleftandrightshangxiazuoyou1"})})]}),(0,i.jsx)(K.E.div,{initial:!1,animate:{height:d===v||n?"auto":0},transition:{duration:.3,ease:"easeInOut"},style:{overflow:"hidden",...u},className:"flex flex-col ".concat(n?"flex-1":""),children:p})]})},eo=e=>{let{item:t,children:n,show:l,setShow:r}=e,c=(0,o.useRouter)();return(0,i.jsx)(s.Z,{mouseLeaveDelay:.3,open:l,overlayInnerStyle:{padding:"4px 0px"},onOpenChange:r,zIndex:999,trigger:"hover",placement:"rightBottom",content:(0,i.jsxs)("div",{className:b().popoverContainer,children:[(0,i.jsx)(_.Z,{item:t,children:(0,i.jsx)("div",{className:b().defaultButton,onClick:()=>{(0,m.gX)("团队空间-团队","10225"),r&&r(!1)},children:"邀请成员"})}),(0,i.jsx)("div",{className:b().defaultButton,onClick:e=>{e.stopPropagation(),(0,m.gX)("我的主页","100102"),c.push("/team/".concat(t.space_uuid,"/setting?type=2")),r&&r(!1)},children:"团队设置"}),(0,i.jsx)("div",{className:b().defaultButton,onClick:e=>{e.stopPropagation(),(0,m.gX)("我的主页","100101"),c.push("/team/".concat(t.space_uuid,"/setting?type=1")),r&&r(!1)},children:"成员管理"}),(0,i.jsx)("div",{className:b().line}),(0,i.jsx)(j.Z,{item:t,children:(0,i.jsx)("div",{className:b().dangerButton,onClick:()=>{r&&r(!1)},children:"退出团队"})}),(0,i.jsx)(d.Z,{item:t,children:(0,i.jsx)(a.ZP,{type:"text",className:"w-full ".concat(b().dangerButton),disabled:(null==t?void 0:t.role)!==1,onClick:()=>{r&&r(!1)},children:"解散团队"})})]}),children:(0,i.jsx)("span",{children:n})})};var er=()=>{let{historyList:e,getHistory:t,removeHistoryAsync:n}=I((0,D.Bj)().ssrHistoryList),a=(0,h.useSelector)(e=>e.libTagList)||[],c=(0,h.useSelector)(e=>e.sourceSearchList)||[],{spaceList:d,getSpaceLists:u}=(0,Z.Z)(),p=(0,o.usePathname)(),_=(0,o.useRouter)(),[j,N]=(0,r.useState)(""),w=null==d?void 0:d.find(e=>e.space_uuid===j),{users:F}=(0,J.ss)((null==w?void 0:w.space_uuid)||""),[k,S]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(0,h.handleInitLibTagList)(),(0,h.handleInitSourceSearchList)(),t();let e=ei.subscribe(()=>{(0,h.handleInitLibTagList)(),(0,h.handleInitSourceSearchList)(),t()});return()=>{e.unsubscribe()}},[j]),(0,r.useEffect)(()=>{u();let e=ei.subscribe(()=>{u()});return()=>{e.unsubscribe()}},[]),(0,r.useEffect)(()=>{N((0,C.getSpaceId)())},[(0,C.getSpaceId)()]),(0,r.useEffect)(()=>{if(p.startsWith("/lib")||p.startsWith("/history")){let e=(0,C.getSpaceId)();if("0"!==e){let t=p.startsWith("/lib")?"/lib":"/history",n=new URLSearchParams(window.location.search);n.set("team",e),window.history.replaceState(null,"","".concat(t,"?").concat(n.toString()))}}},[]);let A=e=>{(0,m.gX)("点击埋点-上方操作",e)},L=(e,t)=>{if(t&&t.stopPropagation(),!e.path){l.ZP.info("敬请期待");return}if(e.needLogin&&!(0,g.ej)("token")){(0,h.handleOpenPopup)(v.k.Register);return}(0,m.gX)("点击埋点-上方操作",e.statsPosition),B(ea(e.path,!0),e.isExternalAtClient)},P=async(e,t)=>{if(!(0,g.ej)("token"))return;let n="0"===e;if(n?(0,m.gX)("点击埋点-上方操作","10221"):(0,m.gX)("点击埋点-上方操作","10222"),t){_.push("/team/".concat(n?"me":e,"/setting"));return}if(e===(0,C.getSpaceId)())return;let[,i]=await (0,x.iA)({uuid:"0"===e?void 0:e});if((null==i?void 0:i.code)===200){var s;if((0,h.handleAddRemoteSpace)({space_id:(null==i?void 0:null===(s=i.data)||void 0===s?void 0:s.uuid)||"0"}),(0,g.KY)("space_info",null==i?void 0:i.data),N(e),ei.next(!0),p.startsWith("/team/")){let t=p.replace(/\/team\/([^/]+)/g,"/team/".concat(n?"":e));"0"===e&&(/\/team\/([^/]*)$/.test(p)||p.includes("setting"))&&(t="/"),_.replace(t)}else p.startsWith("/lib")||p.startsWith("/history")?_.push("/"):p.startsWith("/c/")||p.startsWith("/s/")||p.startsWith("/note/")||"/"===p?_.replace("/"):es.next(!0)}else l.ZP.error("空间切换失败")},B=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t){window.open(e);return}window.location.href=e},W=e=>(A("10005"),(0,M.fY)("侧边历史点击",{request_code:"/"===p?"2000":p.includes("/history")?"2021":"2022"}),7===e.type)?((0,h.handleGetSourceSearchItem)(e.order_no)||(0,h.getStore)().addSourceAsk({query:e.query,type:e.type.toString(),order_no:e.order_no}),B("/wendang/".concat(e.order_no),!0)):String(e.mode)===E.Z.PhotoTextNote?B("".concat(y.pB).concat(e.order_no,"?j=1"),!0):B("/s/".concat(e.order_no),!0),R=e=>{(0,h.handleGetSourceSearchItem)(e.order_no)||(0,h.getStore)().addSourceAsk({query:e.query,type:e.type.toString(),order_no:e.order_no}),setTimeout(()=>B("/wendang/".concat(e.order_no),!0),100)},O=e=>new Promise(async t=>{let[,n]=await (0,T.Rw)(e);(null==n?void 0:n.code)===200&&(0,h.handleInitSourceSearchList)(),t(["",n])}),X=e=>{(0,m.gX)("点击埋点-上方操作","10349");let t=(0,C.getSpaceId)();_.push("/lib?team=".concat("0"===t?"":"?team=".concat(t),"&tag_id=").concat(e.tag_id))};return(0,i.jsxs)("div",{className:b().rightMenuBox,children:[y._j.map(t=>{let s="最近记录"===t.menuName,l="知识库"===t.menuName,o="资源搜索"===t.menuName;return(0,i.jsxs)(el,{title:t.menuName,path:t.path,icon:t.icon,itemKey:t.key,isLibTag:l,canCollapse:s&&e.length>0||o&&c.length>0,onClick:e=>L(t,e),children:[l&&(0,i.jsx)($,{historyList:e,showMore:!1,handleHistoryClick:W,removeHistoryAsync:n}),l&&(null==a?void 0:a.length)>0&&(0,i.jsx)(en,{libTagList:a,handleLibTagClick:X}),o&&(null==c?void 0:c.length)>0&&(0,i.jsx)($,{historyList:c,showMore:!1,handleHistoryClick:R,removeHistoryAsync:O})]},t.path)}),(()=>{let e=F.find(e=>{var t;return e.id!==(null===(t=(0,h.getUserInfo)())||void 0===t?void 0:t.uuid)}),t=d.find(e=>e.space_uuid===j);return(0,i.jsxs)("div",{className:"relative bottom-[12px] right-0 left-0",children:[(0,i.jsx)("div",{className:"h-[24px]"}),(0,i.jsx)("div",{className:"py-[4px] pl-[16px] pr-[8px]",children:(0,i.jsx)("div",{className:"text-[14px] leading-[20px] text-[#999] font-bold",children:"团队"})}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{onClick:()=>P("0"),className:(0,m.cn)("px-[16px] h-[48px] flex items-center hover:bg-[#FAFAFA] text-[16px] text-[#666] cursor-pointer shrink-0",{"font-medium text-[#333]":"0"===j}),style:"0"===j?{background:"var(--Linear, linear-gradient(92deg, #FBFFF7 0%, #F5FFFD 100%))"}:{},children:[(0,i.jsx)("i",{className:(0,m.cn)("icon !text-[20px] pr-[8px] text-[#333]","icon-wode")}),(0,i.jsx)("div",{children:(0,i.jsx)("div",{className:"text-[16px] leading-[24px]",children:"我的空间"})})]}),d.length>0?(0,i.jsxs)("div",{className:(0,m.cn)("group relative px-[16px] h-[48px] flex items-center hover:bg-[#fafafa] text-[16px] text-[#666] cursor-pointer",{"font-medium text-[#333]":"0"!==j},b().teamSpaceItem),style:"0"!==j?{background:"var(--Linear, linear-gradient(92deg, #FBFFF7 0%, #F5FFFD 100%))"}:{},onClick:()=>{P(t?t.space_uuid:d[0].space_uuid)},children:[(0,i.jsx)("div",{className:"".concat(b().logoImgWrap," shrink-0"),children:(0,i.jsx)("img",{className:b().logoImg,src:"".concat((null==w?void 0:w.logo)?"https://img.kaisouai.com/".concat(null==w?void 0:w.logo):"https://img.kaisouai.com/img/default1.png")})}),t?null:(0,i.jsx)("div",{className:"truncate  text-[16px] leading-[22px] mr-[4px] ".concat(t?"text-[#333] font-medium":"text-[#666]"," ").concat(e?"max-w-[88px]":"max-w-[118px]"),onClick:()=>{P(d[0].space_uuid)},children:d[0].name}),(0,i.jsxs)(s.Z,{mouseLeaveDelay:.3,mouseEnterDelay:.3,arrow:!1,overlayInnerStyle:{padding:"4px 0",borderRadius:"8px"},getPopupContainer:()=>document.getElementById("asideContainer")||document.body,content:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:"w-[220px] overflow-y-auto max-h-[288px]",children:d.map(e=>(0,i.jsxs)("div",{onClick:()=>{P(e.space_uuid)},className:"flex items-center text-[16px] h-[48px] leading-[48px] cursor-pointer px-[16px] hover:bg-[#fafafa] ".concat(e.space_uuid===j?"selected-space-item text-[#008888]":"text-[#666]"),children:[(0,i.jsx)("img",{className:"w-[20px] h-[20px] rounded-[10px] mr-[4px]",src:"".concat((null==e?void 0:e.logo)?"https://img.kaisouai.com/".concat(null==e?void 0:e.logo):"https://img.kaisouai.com/img/default1.png"),alt:"logo"}),(0,i.jsx)("div",{className:"text-[14px] leading-[22px] overflow-hidden text-ellipsis whitespace-nowrap",children:e.name}),e.space_uuid===j&&(0,i.jsx)("i",{className:"icon icon-Check !text-[14px] ml-[8px] text-[#008888]"})]},e.space_uuid))}),(0,i.jsx)("div",{className:"mt-[4px] border-t border-[#f5f5f5]"}),(0,i.jsx)(f,{children:(0,i.jsxs)("div",{className:"h-[48px] leading-[48px] flex items-center px-[12px] pb-[8px] pt-[8px] text-[14px] leading-[22px] text-[#666] cursor-pointer hover:bg-[#f5f5f5] rounded-[6px]",children:[(0,i.jsx)("i",{className:"icon icon-Plus text-[#666] cursor-pointer mr-[6px]"}),"创建团队空间"]})})]}),trigger:"click",placement:"bottomLeft",children:[t?(0,i.jsx)("span",{className:"inline-block align-middle max-w-[88px] truncate  text-[16px] leading-[22px] ".concat(t?"text-[#333] font-medium":"text-[#666]"," ").concat(t?"text-[#333] font-medium":"text-[#666]"," ").concat(e?"max-w-[88px]":"max-w-[118px]"),onClick:()=>{P(t.space_uuid)},children:t.name}):null,(0,i.jsx)("i",{className:"icon icon-a-Updownleftandrightshangxiazuoyou align-middle !text-[#666] cursor-pointer opacity-0 icon-show"})]}),(0,i.jsxs)("div",{className:"flex absolute right-[16px] items-center",children:[e&&(0,i.jsx)(q.Z,{userList:F,total:null==w?void 0:w.member_cnt,children:(0,i.jsxs)("span",{className:"flex hover:bg-[#E8E8E8] bg-[#F5F5F5] px-[6.5px] py-[3px] rounded-[27px] text-[#666] text-[12px] leading-[12px]",children:[F.length,"在线"]})}),w?(0,i.jsx)(eo,{item:w,show:k,setShow:S,children:(0,i.jsx)("i",{className:(0,m.cn)("icon icon-Frame hover:bg-[#E8E8E8] px-[2px] -mr-[2px] h-[20px] items-center rounded-[6px] text-[#666] text-[16px] transition-all",{[b().moreBtn]:!0,[b().selected]:k})})}):null]})]}):(0,i.jsx)(f,{children:(0,i.jsxs)("div",{className:"flex items-center px-[16px] pb-[8px] pt-[8px] text-[14px] leading-[22px] text-[#666] cursor-pointer  hover:bg-[#fafafa] rounded-[6px]",children:[(0,i.jsx)("i",{className:"icon icon-Plus text-[#666] cursor-pointer mr-[6px]"}),"创建团队空间"]})})]})]})})()]})}},83026:function(e,t,n){"use strict";var i=n(79189),s=n(76625),a=n(40706),l=n(41964),o=n(52057),r=n(45842),c=n(62368),d=n(92719);t.Z=e=>{let{children:t,item:n}=e,u=(0,o.useRouter)(),[p,x]=(0,r.useState)(""),[m,h]=(0,r.useState)(!1),v={className:"space-custom-modal",centered:!0,open:m,title:(0,i.jsx)(()=>(0,i.jsxs)("div",{className:"text-[#333]",children:["解散「",n.name,"」"]}),{}),width:456,okText:"解散团队",cancelText:"取消",okButtonProps:{danger:!0},onCancel:()=>f(),onOk:()=>g()},g=async()=>{if(p.trim()!==n.name){s.ZP.error("名称不一致，重新输入");return}let[,e]=await (0,c.XK)({uuid:n.space_uuid});if((null==e?void 0:e.code)===200){let[,e]=await (0,c.iA)({uuid:void 0});(null==e?void 0:e.code)===200&&(sessionStorage.removeItem("space_info"),u.push("/"),d.NC.next(!0),s.ZP.success("成功解散"),x(""),h(!1))}else s.ZP.error(null==e?void 0:e.msg)},f=()=>{h(!1)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"inline-block w-full",onClick:()=>{h(!0)},children:t}),(0,i.jsxs)(a.default,{...v,children:[(0,i.jsx)("div",{className:"text-[#333] text-[14px] leading-[22px] mb-[8px] font-medium",children:"这将永久解散团队「".concat(n.name,"」。解散团队将删除所有用户的所有关联数据，例如：搜索记录、收藏记录、知识库。")}),(0,i.jsx)("div",{className:"text-[14px] text-[#666] leading-[22px] mb-[8px]",children:"确认解散，输入团队名称"}),(0,i.jsx)("div",{children:(0,i.jsx)(l.default,{placeholder:"例子",onChange:e=>{x(e.target.value)}})})]})]})}},66196:function(e,t,n){"use strict";var i=n(79189),s=n(65570),a=n(32717),l=n(76625),o=n(40706),r=n(41964),c=n(38180),d=n(45842),u=n(62368),p=n(16266),x=n(80389),m=n(85555);t.Z=e=>{let{children:t,item:n}=e,{userInfo:h}=(0,x.Pc)(),[v,g]=(0,d.useState)(),[f,_]=(0,d.useState)(!1),j={className:"space-custom-modal",centered:!0,open:f,title:(0,i.jsx)(()=>(0,i.jsxs)("div",{className:"text-[#333]",children:["邀请成员加入\xa0",(0,i.jsx)("span",{className:"text-[#008888]",children:n.name}),"\xa0团队"]}),{}),width:456,okText:"确认",cancelText:"取消",footer:null,onCancel:()=>N()},N=()=>{_(!1),g(void 0)},b=(0,a.Z)(()=>{var e;(0,p.vQ)("".concat(null==h?void 0:null===(e=h.info)||void 0===e?void 0:e.nickname," 正在邀请你加入「").concat(n.name,"」团队空间，").concat(m.ho,"/i/").concat(v," 点击加入！"),e=>{e?l.ZP.success("链接复制成功，快去分享吧"):l.ZP.error("链接复制失败")})}),y=async()=>{let[,e]=await (0,u.Uz)({space_uuid:n.space_uuid,invite_code:v});(null==e?void 0:e.code)===200?g(e.data):l.ZP.error(null==e?void 0:e.msg)};return(0,d.useEffect)(()=>{f&&y()},[f]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"inline-block w-full",onClick:()=>{_(!0)},children:t}),(0,i.jsxs)(o.default,{...j,children:[(0,i.jsx)("div",{className:"text-[#333] text-[14px] leading-[22px] mb-[8px] font-medium",children:"链接邀请"}),(0,i.jsxs)("div",{className:"flex justify-between gap-[8px]",children:[(0,i.jsx)(r.default,{placeholder:"邀请链接",disabled:!0,value:"".concat(m.ho,"/i/").concat(v)}),(0,i.jsx)(c.ZP,{type:"primary",onClick:()=>{b()},children:"复制链接"})]}),(0,i.jsxs)("div",{className:"text-[12px] text-[#999] leading-[20px] mt-[8px]",children:["邀请有效期为",(0,i.jsx)("span",{className:"text-[#008888]",children:"3"}),"天",(0,i.jsxs)("span",{className:"text-[#666] ml-[8px] cursor-pointer",onClick:()=>{y()},children:[(0,i.jsx)(s.Z,{}),"重置链接"]})]})]})]})}},65212:function(e,t,n){"use strict";var i=n(79189),s=n(76625),a=n(40706),l=n(41964),o=n(52057),r=n(45842),c=n(62368),d=n(92719),u=n(79036);t.Z=e=>{let{children:t,item:n,fresh:p,action:x="quit",useLocal:m}=e,h=(0,o.useRouter)(),[v,g]=(0,r.useState)(!1),[f,_]=(0,r.useState)(""),j={className:"space-custom-modal",centered:!0,open:v,title:(0,i.jsx)(()=>(0,i.jsxs)("div",{className:"text-[#333]",children:["退出「",n.name,"」"]}),{}),width:456,okText:"退出团队",cancelText:"取消",okButtonProps:{danger:!0},onCancel:()=>b(),onOk:()=>N()},N=async()=>{if(f.trim()!==n.name){s.ZP.error("名称不一致，重新输入");return}let e=(0,u.tv)("user_info"),t=(null==n?void 0:n.uid)?n.uid:null==e?void 0:e.uuid;m&&(t=null==e?void 0:e.uuid);let[,i]=await (0,c.mH)({member_uuid:t,action:x});if((null==i?void 0:i.code)===200){let[,e]=await (0,c.iA)({uuid:void 0});(null==e?void 0:e.code)===200&&(sessionStorage.removeItem("space_info"),h.push("/"),d.NC.next(!0),p&&p(),s.ZP.success("成功退出"),_(""),g(!1))}else s.ZP.error(null==i?void 0:i.msg)},b=()=>{_(""),g(!1)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:"inline-block w-full",onClick:()=>{g(!0)},children:t}),(0,i.jsxs)(a.default,{...j,children:[(0,i.jsx)("div",{className:"text-[#333] text-[14px] leading-[22px] mb-[8px] font-medium",children:"这将永久退出团队「".concat(n.name,"」。退出团队将删除所有用户的所有关联数据，例如：搜索记录、收藏记录、知识库。")}),(0,i.jsx)("div",{className:"text-[14px] text-[#666] leading-[22px] mb-[8px]",children:"确认退出，输入团队名称"}),(0,i.jsx)("div",{children:(0,i.jsx)(l.default,{placeholder:"例子",onChange:e=>{_(e.target.value)},value:f})})]})]})}},49417:function(e,t,n){"use strict";var i=n(79189),s=n(45842),a=n(13434),l=n(37250),o=n.n(l);t.Z=e=>{let{userList:t,children:n,showOffline:l,total:r}=e,c=(0,s.useMemo)(()=>(0,i.jsxs)("div",{className:o().wrap,children:[r&&(0,i.jsxs)("div",{className:o().top,children:[t.length,"人在线 ",r,"位成员"]}),(0,i.jsx)("div",{className:"".concat(o().list," cursor-scroll-wrapper"),children:t.map(e=>{var t;return l||(null==e?void 0:e.status)!=="offline"?(0,i.jsxs)("div",{className:o().item,children:[(0,i.jsxs)("div",{className:o().avatarWrap,children:[(null==e?void 0:e.icon)?(0,i.jsx)("img",{className:o().imgAvatar,src:e.icon,alt:""}):(0,i.jsx)("div",{className:o().textAvatar,children:null==e?void 0:null===(t=e.name)||void 0===t?void 0:t.slice(0,1)}),(0,i.jsx)("div",{className:(null==e?void 0:e.status)==="offline"?o().offlinePoint:o().onlinePotint})]}),(0,i.jsx)("span",{className:o().name,children:e.name}),(0,i.jsxs)("span",{className:o().status,children:["[",(null==e?void 0:e.status)==="offline"?"离线":"在线","]"]})]},null==e?void 0:e.id):null})})]}),[t]);return(0,i.jsx)(a.Z,{overlayInnerStyle:{padding:"4px 0",width:208},trigger:"hover",title:c,children:n})}},17259:function(e,t,n){"use strict";n.d(t,{c1:function(){return a},e4:function(){return s}});let i=e=>"https://".concat("js.kaisouai.com","/assets/").concat(e),s=e=>i("images/".concat(e)),a=s("default_user_avatar.png")},62818:function(e,t,n){"use strict";var i=n(12959),s=n(1608),a=n(76625),l=n(62368),o=n(74051),r=n(38055);t.Z=()=>{let{ssrSpaceList:e}=(0,r.Bj)(),[{spaceList:t},n]=(0,i.Z)({spaceList:(null==e?void 0:e.data)||[]}),{loading:c,run:d}=(0,s.Z)(()=>(0,l.Vm)(),{manual:!0,onSuccess:e=>{let[,t]=e;if(Array.isArray(null==t?void 0:t.data)){if(n({spaceList:null==t?void 0:t.data}),null==t?void 0:t.data.length){let e=null==t?void 0:t.data.find(e=>e.space_uuid===(0,o.getSpaceId)());sessionStorage.setItem("currentSpaceRole",(null==e?void 0:e.role)||1)}}else n({spaceList:[]})}}),u=async(e,i)=>{if(e===i)return;let s=t.length;[t[e],t[i]]=[t[i],t[e]];let o=t.map(e=>({space_uuid:e.space_uuid,sort:s--})),[,r]=await (0,l.qy)({data:o});(null==r?void 0:r.code)===200&&(n({spaceList:t}),a.ZP.success("移动成功"))};return{spaceList:t,queryLoading:c,swapSpace:u,getSpaceLists:d}}},80570:function(e,t,n){"use strict";n.d(t,{BK:function(){return a},iP:function(){return l},oz:function(){return s}});var i=n(79742);let s=e=>{(0,i.getStore)("setCollapsed")(e)},a=e=>{(0,i.getStore)("setOpenTemp")(e)},l=e=>{(0,i.getStore)("setOpenAsideItem")(e)}},69882:function(e){e.exports={box:"LeftSiderOnlineUserBar_box__xUu1T",plus:"LeftSiderOnlineUserBar_plus__261fA",plusBox:"LeftSiderOnlineUserBar_plusBox__NeOjs",big:"LeftSiderOnlineUserBar_big__1tFcX",item:"LeftSiderOnlineUserBar_item__NerED",point:"LeftSiderOnlineUserBar_point__lzM8D"}},9462:function(e){e.exports={subMenuItem:"AideMenu_subMenuItem__15swI",deleteIcon:"AideMenu_deleteIcon___zjf3",subMenuItemTextBox:"AideMenu_subMenuItemTextBox__KgjBV",subMenuItemTextIcon:"AideMenu_subMenuItemTextIcon__PclA8",historyListWrap:"AideMenu_historyListWrap__qYrbW",rightMenuBox:"AideMenu_rightMenuBox__IG2V_",teamSpaceItem:"AideMenu_teamSpaceItem__xtfd3",sortHandle:"AideMenu_sortHandle__oVcKH",selectedName:"AideMenu_selectedName__p7SPA",hoverName:"AideMenu_hoverName__o1PlZ",moreBtn:"AideMenu_moreBtn__Hc_X7",selected:"AideMenu_selected__GDX_V",popoverContainer:"AideMenu_popoverContainer__uwkBc",line:"AideMenu_line__WeGvE",logoImgWrap:"AideMenu_logoImgWrap__UJ1lG",logoImg:"AideMenu_logoImg__AR8m1",defaultButton:"AideMenu_defaultButton__K_K7A",dangerButton:"AideMenu_dangerButton__syo6c",disabled:"AideMenu_disabled___1N1d",collapsed:"AideMenu_collapsed__Vxv4q",iWrap:"AideMenu_iWrap__V7sdF",asideTeamList:"AideMenu_asideTeamList__4_0RS",search:"AideMenu_search__QSTu3",asideTitle:"AideMenu_asideTitle__Ed_tl",asideTitleLib:"AideMenu_asideTitleLib___EsKD",activeAsideTitle:"AideMenu_activeAsideTitle__Dg2N7",collapsedTitle:"AideMenu_collapsedTitle__6vx2t",collapseIcon:"AideMenu_collapseIcon__5Ohtg",collapse:"AideMenu_collapse__LvY1q"}},37250:function(e){e.exports={wrap:"userListToolTip_wrap__Y5xEX",top:"userListToolTip_top__GJgNc",list:"userListToolTip_list__XkhHi",item:"userListToolTip_item__Aex38",avatarWrap:"userListToolTip_avatarWrap__XRQSN",textAvatar:"userListToolTip_textAvatar__zwhXv",imgAvatar:"userListToolTip_imgAvatar__6xWy3",onlinePotint:"userListToolTip_onlinePotint__EYe2P",offlinePoint:"userListToolTip_offlinePoint__Qqb_w",name:"userListToolTip_name__ld7_u",status:"userListToolTip_status__2tVuW"}}}]);