1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[12439,27492],{71514:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(621462),a=r(647167);let i=()=>{let e=(0,a.A)(),[t,r]=(0,n.useState)(null),[i,o]=(0,n.useState)(!1);return(0,n.useEffect)(()=>null===t?o(!1):e.y>=t?o(!0):void o(!1),[e.y,t]),[e.y,i,r]}},115395:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(823798),a=r(109562),i=r(488205);let o=function(e){let{className:t,avatarSize:r,authorList:o=[],avatarBorder:c="2px",isTopOverLay:d=!1,overlayWidth:u="4px",isRedirectPage:h=!0}=e;return o&&o.length?(0,n.jsx)(a.NP,{theme:{border:c||""},children:(0,n.jsx)(l,{className:t,children:o.map((e,t)=>(0,n.jsx)(s,{overlayWidth:u,zIndex:d?t:o.length-1-t,children:(0,n.jsx)(i.A,{targetData:e,role:"user",width:r,isRedirectPage:h})},e?._id))})}):null},l=a.Ay.div.withConfig({componentId:"sc-72b254dd-0"})(["display:block;z-index:0;"]),s=a.Ay.div.withConfig({componentId:"sc-72b254dd-1"})(["position:relative;display:inline-block;margin-right:",";z-index:",";& > a{height:0px;}"],e=>{let{overlayWidth:t}=e;return`calc(${t} * (-1))`},e=>e.zIndex)},180712:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(823798),a=r(621462),i=r(109562),o=r(115395),l=r(314548),s=r(239907),c=r(838432),d=r(335320),u=r(313035),h=r(62433);function p(e){let{data:t={_id:"",latestReplyUsers:[],readCount:0,replyCount:0},isOwnerMode:r=!1,isBackstageMode:i=!1}=e,{nextPage:p,setNextPage:x,setPreviousPage:g,setCurrentReviewedMessage:y}=(0,a.useContext)(h.p),{latestReplyUsers:A,readCount:f,replyCount:v}=t,[_,E]=(0,a.useState)(f),[b,S]=(0,a.useState)(v);return((0,u.A)(e=>{let r=e?.event,n=e?.data;if(n)switch(r){case"new_msg":{let e=n?.replyMsg;t?._id===e?.creatorMsgId&&S(b+1);break}case"creator_msg_read":n===t?._id&&E(_+1)}}),_||b)?(0,n.jsxs)(m,{gap:"8px",alignItems:"center",justifyContent:r?"flex-end":"",children:[(0,n.jsx)(o.A,{className:"custom-avatar-list",avatarSize:24,authorList:A,avatarBorder:"2px solid var(--Primary-White)",isRedirectPage:!1}),(0,n.jsx)(l.az,{children:(0,n.jsxs)(c.Ay,{color:"var(--Primary-Gray-L-02)",textStyle:"Label2-Regular",children:["å·²è® ",_]})}),(0,n.jsx)(l.az,{children:(0,n.jsxs)(c.Ay,{color:"var(--Primary-Gray-L-02)",textStyle:"Label2-Regular",children:["åè¦ ",b]})}),r&&(0,n.jsx)(s.A,{icon:"icon-arrowRight",variant:"Ghost",size:"small",style:{padding:"0px",height:"auto",color:"var(--Primary-Gray-L-02)"},onClick:()=>{if(y(t),i){g(d.S.HOME_MY_CHATROOM),x(d.S.ADMIN_REVIEW_MSG_ROOM);return}g(p),x(d.S.REVIEWED_MESSAGE_ROOM)}})]}):null}let m=(0,i.Ay)(l.so).withConfig({componentId:"sc-a4e1cb78-0"})([""])},190931:(e,t,r)=>{r.d(t,{Ay:()=>h,fv:()=>p});var n=r(823798),a=r(621462),i=r(109562),o=r(572498),l=r(314548),s=r(401654),c=r(402346),d=r(71514),u=r(384082);let h=function(e){let{trigger:t,popoverContent:r,popoverStyle:o,contentStyle:l,isOpen:s,setIsOpen:h=()=>{},position:p="bottom-right",isHideOnScroll:y=!0,contentPositionFixedMode:A=!1}=e,f=(0,a.useRef)(),v=(0,a.useRef)(),_=(0,a.useRef)(),[E]=(0,d.A)(),[b]=(0,u.A)();(0,c.A)(f,()=>{s&&h(!1)}),(0,a.useEffect)(()=>{y&&h(!1)},[E,y,h]);let S=(0,a.useMemo)(()=>{if(s&&f?.current&&v?.current&&_?.current)return{wrapper:f.current.getBoundingClientRect(),trigger:v.current.getBoundingClientRect(),content:_.current.getBoundingClientRect()}},[s,f,v,_,b.width,E]);return(0,n.jsx)(i.NP,{theme:{isOpen:s,rectInfo:S,contentPositionFixedMode:A},children:(0,n.jsxs)(m,{ref:f,popoverStyle:o,children:[(0,n.jsx)(x,{ref:v,onClick:e=>{e.stopPropagation(),e.preventDefault(),h(!s)},children:t}),r&&(0,n.jsx)(g,{ref:_,className:"popover-content",position:p,contentStyle:l,onClick:e=>{e.stopPropagation(),e.preventDefault(),h(!s)},children:r})]})})};function p(e){let{className:t="",iconName:r="",iconSize:a=20,iconColor:i,iconPosition:o="left",disabled:l=!1,children:c,onClickCb:d=()=>{},...u}=e;return(0,n.jsxs)(y,{alignItems:"center",minWidth:"140px",className:t,hasIcon:r,disabled:l,onClick:e=>{e.stopPropagation(),e.preventDefault(),d(e)},iconColor:i,...u,children:["left"===o&&r&&(0,n.jsx)(s.zP,{name:r,size:a}),c,"right"===o&&r&&(0,n.jsx)(s.zP,{name:r,size:a})]})}let m=i.Ay.div.withConfig({componentId:"sc-8568bb5-0"})(["position:relative;"," ",""],e=>{let{theme:t}=e;return t.isOpen?(0,i.AH)(["overflow:unset;"]):(0,i.AH)(["overflow:hidden;"])},e=>{let{popoverStyle:t}=e;return t||""}),x=i.Ay.div.withConfig({componentId:"sc-8568bb5-1"})(["position:relative;cursor:pointer;z-index:11;"]),g=i.Ay.div.withConfig({componentId:"sc-8568bb5-2"})(["min-width:100px;width:max-content;position:",";border-radius:16px;box-shadow:0px 0px 8px 1px var(--theme-popover-shadow);padding:8px;background:var(--theme-L_white-B_black-1);z-index:12;"," "," ",""],e=>{let{contentPositionFixedMode:t}=e;return t?"fixed":"absolute"},e=>{let{theme:t}=e;return t.isOpen?(0,i.AH)(['visibility:visible;opacity:1;&:before{content:"";position:fixed;z-index:-1;top:0px;left:0px;width:100%;height:100%;}']):(0,i.AH)(["visibility:hidden;opacity:0;"])},e=>{let{theme:t,position:r,contentPositionFixedMode:n}=e;return r&&"bottom-right"!==r?"bottom-left"===r?n?(0,i.AH)(["top:","px;left:0px;"],t.rectInfo?.trigger.y+t.rectInfo?.trigger.height+16):(0,i.AH)(["top:","px;left:0px;"],t.rectInfo?.trigger.height+16):r&&"top-right"!==r?void 0:n?(0,i.AH)(["top:","px;right:","px;"],t.rectInfo?.trigger.y-16-t.rectInfo?.content.height,-t.rectInfo?.content.width-8):(0,i.AH)(["top:","px;left:","px;"],-16-t.rectInfo?.content.height,-t.rectInfo?.content.width+t.rectInfo?.trigger.width):n?(0,i.AH)(["top:","px;right:","px;"],t.rectInfo?.trigger.y+t.rectInfo?.trigger.height+16,-t.rectInfo?.content.width-8):(0,i.AH)(["top:","px;left:","px;"],t.rectInfo?.trigger.height+16,-t.rectInfo?.content.width+t.rectInfo?.trigger.width)},e=>{let{contentStyle:t}=e;return t||""}
1),y=(0,i.Ay)(l.so).withConfig({componentId:"sc-8568bb5-3"})(["width:100%;min-height:36px;border-radius:8px;gap:",";padding:4px 8px;"," font-weight:500;color:var(--theme-L_black-B_white);white-space:nowrap;i{color:",";}",""],e=>{let{hasIcon:t}=e;return t?"8px":"0px"},o.lG.smBody,e=>{let{iconColor:t}=e;return t||""},e=>{let{disabled:t}=e;return t?(0,i.AH)(["cursor:not-allowed;color:var(--Primary-Gray-L-03);pointer-events:none;span,a,a span{color:var(--Primary-Gray-L-03);}i{color:var(--Primary-Gray-L-04);}"]):(0,i.AH)(["&:hover{cursor:pointer;background:",";}"],o.Tj.neutral.gray5)})},206052:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(141080),a=r(317256),i=r(797015),o=r(675357);let l=function(e){let t=new Date,r=new Date(e),l=(0,n.A)(t,r),s=(0,a.A)(t,r);if(!isNaN(r.getTime()))return(0,i.default)(t,r)?1>Math.abs(l)?(0,o.default)(r,"HH:mm"):`${Math.abs(l)} å°æå
§`:s>0&&s<=3?`${s} 天å`:(0,o.default)(r,"yyyy/MM/dd")}},313035:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(621462),a=r(2291),i=r(965524);let o=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{socket:r,connectionState:o}=(0,n.useContext)(i.P),l=(0,n.useCallback)(t=>{let{data:r}=t;(e=>{try{return JSON.parse(e),!0}catch(e){return!1}})(r)&&e(JSON.parse(r))},[e]);(0,n.useEffect)(()=>{if(!t&&r&&o===a.k.OPEN)return r.addEventListener("message",l),()=>{r.removeEventListener("message",l)}},[o,l,r])}},384654:(e,t,r)=>{r.r(t),r.d(t,{default:()=>eb});var n=r(823798),a=r(621462),i=r(448561),o=r(109562),l=r(314548),s=r(563897),c=r(682461),d=r(707200),u=r(925632),h=r(838432),p=r(464762),m=r(488205),x=r(206052),g=r(335320),y=r(313035),A=r(62433),f=r(72853),v=r(419015),_=r(444187);function E(e){let{userChatroomData:t={}}=e,r=(0,i.wA)(),{chatroomHint:o,userId:s}=(0,i.d4)(e=>e.user),{unreadCount:c}=(0,i.d4)(e=>e.chatroom),{setPreviousPage:d,setNextPage:u,setCurrentSelectedChatroom:_,setIsToMemberChatroom:E}=(0,a.useContext)(A.p),{_id:T,creator:w,everViewed:L,unreadCount:R,latestMsg:O}=t,M=O?.msgContent,P=O?.createdAt,[D,H]=(0,a.useState)(M),[N,z]=(0,a.useState)(R),G=async()=>{try{await (0,p.WJ)(s,{chatroomHint:!0}),r(v.A.setChatroomHint(!0))}catch(e){console.error(e)}u(g.S.TUTORIAL_ROOM),d(g.S.HOME_CHATTING_ROOM)};return(0,y.A)(e=>{let t=e?.event,n=e?.data;n&&n?.userChatroomId===T&&"new_msg"===t&&(H(n.msgContent),z(N+1),r((0,f.Ob)(c+1)))}),(0,a.useEffect)(()=>{H(M),z(R)},[M,R]),(0,n.jsx)(b,{width:"100%",p:"8px",onClick:e=>{if(e.preventDefault(),_(t),!o){E(!0),G();return}d(g.S.HOME_CHATTING_ROOM),u(g.S.MEMBER_CHATROOM)},children:(0,n.jsxs)(l.so,{alignItems:"center",gap:"12px",children:[(0,n.jsx)(m.A,{targetData:w}),(0,n.jsxs)(l.az,{width:"100%",children:[(0,n.jsxs)(l.so,{alignItems:"center",justifyContent:"space-between",width:"100%",mb:"8px",children:[(0,n.jsx)(I,{children:(0,n.jsx)(h.Ay,{textStyle:"Label2-Medium",children:w?.fullname})}),(0,n.jsxs)(l.so,{alignItems:"center",gap:"8px",children:[!L&&(0,n.jsx)(l.az,{children:(0,n.jsx)(S,{textStyle:"Label3-Medium",children:"æ°å å
¥"})}),(0,n.jsx)(l.az,{children:(0,n.jsx)(h.Ay,{color:"var(--Primary-Gray-L-02)",textStyle:"Label3-Regular",children:(0,x.A)(P)})})]})]}),(0,n.jsxs)(l.so,{alignItems:"center",gap:"12px",justifyContent:"space-between",children:[(0,n.jsx)(j,{hasUnreadMsg:N,dangerouslySetInnerHTML:{__html:D?.textHtml||D?.text||"åç"}}),N?(0,n.jsx)(l.az,{children:(0,n.jsx)(C,{children:Math.min(N,99)})}):null]})]})]})})}let b=(0,o.Ay)(l.az).withConfig({componentId:"sc-9800cfc4-0"})(["cursor:pointer;"]),S=(0,o.Ay)(h.Ay).withConfig({componentId:"sc-9800cfc4-1"})(["padding:2px 8px;color:var(--Primary-Red-L-02);background-color:var(--Primary-Red-L-06);border-radius:24px;"]),I=(0,o.Ay)(l.az).withConfig({componentId:"sc-9800cfc4-2"})(["max-width:130px;",""],(0,_.k)({lineClamp:"1"})),j=(0,o.Ay)(l.az).withConfig({componentId:"sc-9800cfc4-3"})(["",";max-height:25px;font-size:16px;a{pointer-events:none;color:var(--Primary-Gray-L-02);}color:",";"],(0,_.k)({lineClamp:"1"}),e=>e.hasUnreadMsg?"var(--Primary-Black-Base)":"var(--Primary-Gray-L-02)"),C=o.Ay.span.withConfig({componentId:"sc-9800cfc4-4"})(["display:flex;justify-content:center;align-items:center;text-align:center;width:24px;height:24px;background:var(--Primary-Base);border-radius:100%;color:var(--Primary-White);font-size:14px;font-weight:500;"]);var T=r(563140);let w=r.p+"static/media/join-chatroom.017b8616.png";var L=r(572498);function R(){let{userId:e=""}=(0,i.d4)(e=>e.user),{data:t,isLoading:r}=function(e){let{userId:t}=e,r=`/api/users/${t}/user-chatrooms`,{data:n,isLoading:a,error:i}=(0,T.Ay)(t&&r);return{data:n||[],isLoading:a,error:i}}({userId:e}),a=t?.items||[];return r?(0,n.jsx)(M,{children:(0,n.jsx)(d.A,{})}):a?.length?(0,n.jsx)(O,{flexDirection:"column",gap:"12px",p:"12px 16px",children:a.map(e=>(0,n.jsx)(E,{userChatroomData:e},e._id))}):(0,n.jsxs)(M,{children:[(0,n.jsx)("img",{src:w,alt:"Join Chatroom"}),(0,n.jsxs)(h.Ay,{textStyle:"Body3",textAlign:"center",color:"var(--Primary-Gray-L-02)",children:["è天室æ¯è®ä½ èåæçåµä½è
",(0,n.jsx)("br",{}),"æ·±å
¥äº¤æµç空é"]}),(0,n.jsx)(u.A,{href:"https://vocus.cc/article/671b08f8fd897800018ec183",children:(0,n.jsx)(h.Ay,{textStyle:"Label2-Medium",color:"var(--Secondary-Blue-Base)",cursor:"pointer",children:"äºè§£æ´å¤"})})]})}
1let O=(0,o.Ay)(l.so).withConfig({componentId:"sc-beb276c5-0"})(["overflow-y:scroll;max-height:calc(100vh - 226px);overscroll-behavior:none;",";@media ","{padding-bottom:120px;min-height:calc(100vh - 80px);max-height:calc(100vh - 80px);}"],L.hZ,L.et.mobile),M=(0,o.Ay)(l.so).withConfig({componentId:"sc-beb276c5-1"})(["flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:50vh;img{width:120px;height:120px;}"]);var P=r(6542),D=r.n(P),H=r(401654);function N(e){let{chatroomData:t={creator:{fullname:""},createdAt:""}}=e,{setPreviousPage:r,setNextPage:i,setCurrentSelectedChatroom:o}=(0,a.useContext)(A.p);return(0,n.jsx)(z,{width:"100%",p:"8px",onClick:()=>{o(t),i(g.S.PAYMENT_ROOM),r(g.S.HOME_EXPLORING)},children:(0,n.jsxs)(l.so,{alignItems:"center",gap:"12px",children:[(0,n.jsx)(m.A,{targetData:t.creator}),(0,n.jsxs)(l.az,{width:"100%",children:[(0,n.jsxs)(l.so,{alignItems:"center",justifyContent:"space-between",width:"100%",mb:"8px",children:[(0,n.jsx)(G,{children:(0,n.jsx)(h.Ay,{textStyle:"Label2-Medium",children:t.creator?.fullname})}),(0,n.jsx)(l.so,{alignItems:"center",gap:"8px",children:(0,n.jsx)(l.az,{children:(0,n.jsx)(h.Ay,{color:"var(--Primary-Gray-L-02)",textStyle:"Label3-Regular",children:(0,x.A)(t.createdAt)})})})]}),(0,n.jsx)(U,{children:(0,n.jsx)(h.Ay,{textStyle:"Label2-Regular",children:"éè«ä½ å å
¥è天室åæä¸èµ·äº¤æµï¼"})})]})]})})}let z=(0,o.Ay)(l.az).withConfig({componentId:"sc-19862351-0"})(["cursor:pointer;"]),G=(0,o.Ay)(l.az).withConfig({componentId:"sc-19862351-1"})(["",""],(0,_.k)({lineClamp:"1"})),U=(0,o.Ay)(l.az).withConfig({componentId:"sc-19862351-2"})(["max-height:25px;",";color:var(--Primary-Gray-L-02);"],(0,_.k)({lineClamp:"1"})),k=r.p+"static/media/no-exploring-content.d61cd21d.png";function B(){let{userId:e}=(0,i.d4)(e=>e.user),{data:t,isLoading:r}=function(e){let{userId:t}=e,r=`/api/users/${t}/explore-chatrooms`,{data:n,isLoading:a,error:i}=(0,T.Ay)(t&&r);return{data:n||[],isLoading:a,error:i}}({userId:e}),{joined_salon_chatrooms:a,recommend_chatrooms:o}=t;return r?(0,n.jsx)(l.so,{minHeight:"50vh",flexDirection:"column",alignItems:"center",justifyContent:"center",children:(0,n.jsx)(d.A,{})}):a?.length||o?.length?(0,n.jsxs)(W,{flexDirection:"column",gap:"12px",p:"12px 16px",children:[a?.length?(0,n.jsxs)($,{open:!0,triggerStyle:{display:"flex",alignItems:"center",justifyContent:"space-between"},transitionTime:1,trigger:[(0,n.jsx)(F,{mb:"18px",width:"100%",children:(0,n.jsxs)(l.so,{justifyContent:"space-between",alignItems:"center",children:[(0,n.jsx)(h.Ay,{textStyle:"Label3-Medium",children:"ä½ å å
¥çæ²é¾"}),(0,n.jsx)(H.zP,{name:"icon-arrowDown",size:20,style:{}})]})},"")],children:[(0,n.jsx)(l.az,{mb:"12px",children:(0,n.jsx)(h.Ay,{color:"var(--Primary-Gray-L-02)",textStyle:"Label3-Regular",children:"åä½ å å
¥çæ²é¾ææè
ç¢çæ´æ·±çäºåï¼"})}),a.map(e=>(0,n.jsx)(N,{chatroomData:e},e._id))]}):null,o?.length?(0,n.jsx)(V,{open:!0,triggerStyle:{display:"flex",alignItems:"center",justifyContent:"space-between"},transitionTime:1,trigger:[(0,n.jsx)(F,{mb:"18px",width:"100%",children:(0,n.jsxs)(l.so,{justifyContent:"space-between",alignItems:"center",children:[(0,n.jsx)(h.Ay,{textStyle:"Label3-Medium",children:"æ¨è¦è天室"}),(0,n.jsx)(H.zP,{name:"icon-arrowDown",size:20,style:{}})]})},"")],children:o.map(e=>(0,n.jsx)(N,{chatroomData:e},e._id))}):null]}):(0,n.jsxs)(l.so,{minHeight:"25vh",flexDirection:"column",alignItems:"center",justifyContent:"center",children:[(0,n.jsx)("img",{src:k,alt:"No-Exploring-Content",width:120}),(0,n.jsx)(l.az,{children:(0,n.jsx)(h.Ay,{color:"var(--Primary-Gray-L-02)",textStyle:"Body3",children:"ãæè¶£çè天室æ£å¨ç§å¯æºåä¸...ã"})})]})}let W=(0,o.Ay)(l.so).withConfig({componentId:"sc-9c7b47ed-0"})(["overflow-y:auto;max-height:calc(100vh - 226px);overscroll-behavior:none;"," @media ","{padding-bottom:120px;min-height:calc(100vh - 80px);max-height:calc(100vh - 80px);}"],L.hZ,L.et.mobile),$=(0,o.Ay)(D()).withConfig({componentId:"sc-9c7b47ed-1"})(["i.icon-arrowDown{transform:rotate(-90deg);}"]),V=(0,o.Ay)(D()).withConfig({componentId:"sc-9c7b47ed-2"})(["i.icon-arrowDown{transform:rotate(-90deg);}"]),F=(0,o.Ay)(l.az).withConfig({componentId:"sc-9c7b47ed-3"})([""]);function J(e){let{label:t,metric:r}=e;return(0,n.jsxs)(Z,{width:"100%",padding:"16px",children:[(0,n.jsx)(l.az,{mb:"8px",children:(0,n.jsx)(h.Ay,{textStyle:"Label3-Regular",children:t})}),(0,n.jsx)(l.az,{children:(0,n.jsx)(h.Ay,{color:"var(--Primary-Black-Base)",fontSize:"18px",fontWeight:"700",children:r})})]})}let Z=(0,o.Ay)(l.az).withConfig({componentId:"sc-a27c26e5-0"})(["border-radius:12px;border:1px solid var(--Primary-Gray-L-04);"]);var X=r(180712);function Y(e){let{messageData:t}=e,{setPreviousPage:r,setNextPage:i,nextPage:o,setCurrentReviewedMessage:s,setCurrentSelectedChatroom:c}=(0,a.useContext)(A.p),{_id:d,msgContent:u,unreadCount:h,chatroomId:p}=t,[m,x]=(0,a.useState)(h),f=u?.type==="image";return((0,a.useEffect)(()=>{c({})},[]),(0,a.useEffect)(()=>{x(h)},[h]),(0,y.A)(e=>{let t=e?.event,r=e?.data;r&&r?.replyCreatorMsgId===d&&"new_msg"===t&&x(m+1)}),t?._id)?(0,n.jsx)(K,{width:"100%",padding:"16px",onClick:()=>{c({_id:p}),s(t),i(g.S.REVIEWED_MESSAGE_ROOM),r(o)},children:(0,n.jsxs)(l.so,{gap:"8px",alignItems:"center",justifyContent:"space-between",children:[(0,n.jsxs)(l.az,{width:"100%",children:[(0,n.jsx)(l.az,{mb:"8px",children:(0,n.jsx)(Q,{dangerouslySetInnerHTML:{__html:f?"åç":u?.textHtml||u?.text}})}),(0,n.jsx)(X.A,{data:t})]}),m?(0,n.jsx)(q,{children:Math.min(m,99)}):null]})}):null}let K=(0,o.Ay)(l.az).withConfig({componentId:"sc-479abb8-0"})(["border-radius:12px;border:1px solid var(--Primary-Gray-L-04);cursor:pointer;"]),q=o.Ay.span.withConfig({componentId:"sc-479abb8-1"})(["display:flex;justify-content:center;align-items:center;text-align:center;width:24px;height:24px;background:var(--Primary-Base);border-radius:100%;color:var(--Primary-White);font-size:14px;font-weight:500;"]),Q=(0,o.Ay)(h.Ay).withConfig({componentId:"sc-479abb8-2"})(["font-size:16px;a{pointer-events:none;color:var(--Primary-Gray-L-02);}",""],(0,_.k)({lineClamp:"2"}));var ee=r(422264);function et(e){let{title:t,description:r,style:a=null,onClick:i,hasDone:o=!1}=e;return(0,n.jsxs)(er,{p:"12px",onClick:i,hasDone:o,...a,children:[(0,n.jsx)(H.zP,{size:24,name:"icon-success_fill",style:{color:o?"var(--Secondary-Green-Base)":"var(--Primary-Gray-L-04)"}}),(0,n.jsxs)(l.az,{children:[(0,n.jsx)(l.az,{mb:"4px",children:(0,n.jsx)(h.Ay,{textStyle:"Label2-Medium",color:o&&"var(--Secondary-Green-Base)",children:t})}),(0,n.jsx)(l.az,{children:(0,n.jsx)(h.Ay,{textStyle:"Body3",color:"var(--Primary-Gray-L-02)",children:r})})]})]})}
1let er=(0,o.Ay)(l.so).withConfig({componentId:"sc-7fff4b48-0"})(["align-items:center;gap:12px;cursor:",";background-color:",";border-radius:12px;border:1px solid ",";"],e=>{let{hasDone:t}=e;return t?"auto":"pointer"},e=>{let{hasDone:t}=e;return t&&"var(--Secondary-Green-L-06)"},e=>{let{hasDone:t}=e;return t?"var(--Secondary-Green-Base)":"var(--Primary-Gray-L-04)"});var en=r(465956);function ea(){let{setPreviousPage:e,setNextPage:t}=(0,a.useContext)(A.p),{userId:r}=(0,i.d4)(e=>e.user),{data:o}=(0,en.A)({userId:r}),s=o?.welcomeMessage,c=o?.planGroupIds;return(0,n.jsxs)(ei,{p:"0px 16px",children:[(0,n.jsxs)(l.az,{textAlign:"center",mb:"24px",children:[(0,n.jsx)(l.az,{mb:"8px",children:(0,n.jsx)(h.Ay,{textStyle:"H5",children:"éåæçè天室"})}),(0,n.jsx)(h.Ay,{textStyle:"Body3",color:"var(--Primary-Gray-L-02)",children:"建ç«å°å±¬æ¼ä½ åæå¡ç深度äºå空é"})]}),(0,n.jsxs)(l.az,{children:[(0,n.jsx)(et,{title:"ä»»å1ï¼åºæ¬è¨å®",description:"è¨å®çµ¦è¨é±æå¡çæ¡è¿è¨æ¯",style:{marginBottom:"16px"},onClick:()=>{t(g.S.BASIC_SETTING_ROOM),e(g.S.HOME_MY_CHATROOM)},hasDone:s}),(0,n.jsx)(et,{title:"ä»»å2ï¼è¨å®æ¹æ¡",description:"鏿鿾åªäºä»è²»æå¡é²å
¥è天室",onClick:()=>{c||(t(g.S.PLAN_SETTING_ROOM),e(g.S.HOME_MY_CHATROOM))},hasDone:c})]})]})}let ei=(0,o.Ay)(l.az).withConfig({componentId:"sc-8ac878ea-0"})([""]);var eo=r(496418),el=r(505724);let es=r.p+"static/media/create-chatroom.14382185.png";var ec=r(442231);function ed(e){let{myChatroomData:t}=e,{setCurrentSelectedChatroom:r}=(0,a.useContext)(A.p),{userId:o,salons:l}=(0,i.d4)(e=>e.user),s=(0,el.A)(),c=l?.length?l[0]._id:null,{trigger:d}=(0,eo.d)(),[p,m]=(0,a.useState)(t?.status==="pending"),x=async()=>{if(!o)return(0,ec.Ng)();if(!c)return void s({type:"error",message:"æ¨å°æªåµå»ºæ²é¾"});try{let e=await d({salonId:c,creatorId:o});r(e),m(!0)}catch(e){console.error(e),s({type:"error",message:"åµå»ºå¤±æ"})}};return(0,n.jsx)(eu,{children:p?(0,n.jsx)(ea,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{src:es,alt:"Open Chatroom"}),(0,n.jsx)(h.Ay,{textStyle:"H5",children:"éåæçè天室"}),(0,n.jsxs)(h.Ay,{textStyle:"Body3",textAlign:"center",color:"var(--Primary-Gray-L-02)",children:["é裡æ¯å°å±¬æ¼ä½ åæå¡ç深度äºå空é",(0,n.jsx)("br",{}),"ä½ å¯ä»¥é¸æéæ¾åªäºä»è²»æå¡é²å
¥è天室"]}),(0,n.jsx)(ee.A,{mt:"16px",mb:"12px",variant:"Outline-Primary",onClick:x,children:"建ç«è天室"}),(0,n.jsx)(u.A,{href:"/article/671b08f8fd897800018ec183",children:(0,n.jsx)(h.Ay,{textStyle:"Label2-Medium",color:"var(--Secondary-Blue-Base)",cursor:"pointer",children:"äºè§£æ´å¤"})})]})})}let eu=(0,o.Ay)(l.so).withConfig({componentId:"sc-fbcf66e6-0"})(["flex-direction:column;align-items:center;justify-content:center;gap:8px;padding-top:80px;img{width:120px;height:120px;}@media ","{padding-bottom:120px;}"],L.et.mobile);function eh(){let e=(0,i.d4)(e=>e.user),{data:t,isLoading:r}=(0,en.A)({userId:e?.userId}),{setCurrentSelectedChatroom:o,setLastCreatorMessageId:s,setPreviousPage:c,setNextPage:u}=(0,a.useContext)(A.p),p=t?.recentMsgs||[],x=t?.lastCreatorMsgId,y=t?.salon||{};return((0,a.useEffect)(()=>{s(x)},[x,s]),r)?(0,n.jsx)(ey,{children:(0,n.jsx)(d.A,{})}):t?._id&&t?.status!=="pending"?(0,n.jsxs)(ep,{flexDirection:"column",gap:"12px",p:"12px 16px",children:[(0,n.jsxs)(em,{alignItems:"center",justifyContent:"space-between",onClick:()=>{o(t),u(g.S.CREATOR_CHATROOM),c(g.S.HOME_MY_CHATROOM)},children:[(0,n.jsxs)(ex,{alignItems:"center",gap:"12px",children:[(0,n.jsx)(m.A,{targetData:y,role:"salon",borderRadius:"4px"}),(0,n.jsxs)(l.az,{children:[(0,n.jsx)(l.az,{children:(0,n.jsx)(h.Ay,{textStyle:"Label2-Medium",children:"æçè天室"})}),(0,n.jsx)(l.az,{children:(0,n.jsx)(h.Ay,{textStyle:"Label2-Regular",color:"var(--Primary-Gray-L-02)",children:`æå¡æ¸ ${t?.chatMemberCount||0}`})})]})]}),(0,n.jsx)(H.zP,{size:24,name:"icon-arrowRight",style:{}})]}),(0,n.jsxs)(eg,{gap:"12px",children:[(0,n.jsx)(J,{label:"å¹³åå·²è®ç",metric:`${t?.avgReadPercentage}%`}),(0,n.jsx)(J,{label:"å¹³ååè¦æ¸",metric:t?.avgReplyCount})]}),(0,n.jsx)(l.az,{children:(0,n.jsx)(h.Ay,{textStyle:"Label3-Medium",children:"æ¡è¿è¨æ¯"})}),(0,n.jsx)(Y,{messageData:t?.welcomeMessage}),(0,n.jsx)(l.az,{children:(0,n.jsx)(h.Ay,{textStyle:"Label3-Medium",children:"æè¿è¨æ¯"})}),(0,n.jsx)(eA,{children:p.map(e=>(0,n.jsx)(Y,{messageData:e},e._id))})]}):(0,n.jsx)(ed,{myChatroomData:t})}
1let ep=(0,o.Ay)(l.so).withConfig({componentId:"sc-dd40b395-0"})(["min-height:calc(100vh - 260px);max-height:calc(100vh - 260px);overflow-y:scroll;overscroll-behavior:none;"," @media ","{padding-bottom:120px;min-height:calc(100vh - 80px);max-height:calc(100vh - 80px);}"],L.hZ,L.et.mobile),em=(0,o.Ay)(l.so).withConfig({componentId:"sc-dd40b395-1"})(["cursor:pointer;"]),ex=(0,o.Ay)(l.so).withConfig({componentId:"sc-dd40b395-2"})([""]),eg=(0,o.Ay)(l.so).withConfig({componentId:"sc-dd40b395-3"})([""]),ey=(0,o.Ay)(l.so).withConfig({componentId:"sc-dd40b395-4"})(["flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:65vh;img{width:120px;height:120px;}"]),eA=(0,o.Ay)(l.so).withConfig({componentId:"sc-dd40b395-5"})(["flex-direction:column;gap:8px;"]);var ef=r(827492),ev=r(888531);let e_=[{value:"homeMyChatroom",label:"æçè天室",contentComponent:()=>(0,n.jsx)(eh,{})},{value:"homeChattingRoom",label:"è天ä¸",contentComponent:()=>(0,n.jsx)(R,{})},{value:"homeExploring",label:"æ¢ç´¢",contentComponent:()=>(0,n.jsx)(B,{})}],eE=(0,o.Ay)(l.az).withConfig({componentId:"sc-4616482-0"})([".tabsTrigger{width:100%;}"]),eb=function(){let{nextPage:e,setNextPage:t}=(0,a.useContext)(A.p),{userId:r}=(0,i.d4)(e=>e.user),{data:o}=(0,ef.A)({userId:r,shouldFetch:!0}),[d,u]=(0,a.useState)(e_[0].value),h=o?.salons?.length?o?.salons[0]:{},p=h?.chatroomPermission,m=p?e_:e_.slice(1);return(0,a.useEffect)(()=>{let t=m.find(t=>t.value===e);if(!t?.value)return void u(m[0].value);u(t.value)},[p]),(0,n.jsxs)(eE,{children:[(0,n.jsx)(c.A,{}),(0,n.jsxs)(ev.bL,{className:"tabsRoot",value:d,onValueChange:e=>{t(e),u(e)},children:[(0,n.jsx)(ev.B8,{children:(0,n.jsx)(l.so,{mb:"16px",children:m?.map(e=>(0,n.jsx)(s.Xi,{variant:"Primary",className:"tabsTrigger",item:e,p:"4px 16px"},e.value))})}),(0,n.jsx)(s.JS,{tabLists:m})]})]})}},387474:(e,t,r)=>{r.d(t,{$_:()=>l,HN:()=>d,Wd:()=>i,ZW:()=>o,c9:()=>c,ni:()=>u,tz:()=>s});var n=r(64472),a=r(624750);let i=async e=>{let{roomId:t="",headers:r,params:i={title:"",abstract:"",thumbnailUrl:""}}=e,{result:o}=await (0,a.A)({url:`${n.config.serverUrl}/api/rooms/${t}`,method:"PATCH",params:i,headers:r});return o},o="/api/contents",l=async e=>{let{salonId:t="",headers:r}=e,{result:i}=await (0,a.A)({url:`${n.config.serverUrl}/api/salons/${t}/rooms`,headers:r});return i},s=async e=>{let{params:t={followType:"room",followFrom:"",followTo:""},headers:r}=e,{result:i}=await (0,a.A)({url:`${n.config.serverUrl}/api/follows`,method:"POST",headers:r,params:t});return i},c=async e=>{let{params:t}=e,{result:r}=await (0,a.A)({url:`${n.config.serverUrl}/api/v2/studio/rooms`,method:"POST",params:t});return r},d=async e=>{let{roomId:t=""}=e,{result:r}=await (0,a.A)({url:`${n.config.serverUrl}/api/rooms/${t}`,method:"DELETE"});return r},u=async e=>{let{urlId:t=""}=e,{result:r}=await (0,a.A)({url:`${n.config.serverUrl}/api/rooms/${t}/exists`});return r}},402346:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(621462);let a=(e,t)=>{let r=r=>{e.current&&!e.current.contains(r.target)&&t()};(0,n.useEffect)(()=>(document.addEventListener("click",r),()=>{document.removeEventListener("click",r)}))}},419015:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(959235),a=r(689196);let i={SET_USER_DATA:"SET_USER_DATA",SET_PREMIUM_ORDER:"SET_PREMIUM_ORDER",SET_IS_VALIDATED:"SET_IS_VALIDATED",UPDATE_USER_DATA:"UPDATE_USER_DATA",USER_LOGOUT:"USER_LOGOUT",ADD_RECOMMEND_AUTHOR_LIST:"ADD_RECOMMEND_AUTHOR_LIST",ADD_RECOMMEND_PUBLICATION_LIST:"ADD_RECOMMEND_PUBLICATION_LIST",DELETE_RECOMMEND_AUTHOR_LIST:"DELETE_RECOMMEND_AUTHOR_LIST",DELETE_RECOMMEND_PUBLICATION_LIST:"DELETE_RECOMMEND_PUBLICATION_LIST",CLEAR_RECOMMEND_AUTHOR_LIST:"CLEAR_RECOMMEND_AUTHOR_LIST",CLEAR_RECOMMEND_PUBLICATION_LIST:"CLEAR_RECOMMEND_PUBLICATION_LIST",SHOW_WELCOME_GIFT_RECEIVED_ALERT:"SHOW_WELCOME_GIFT_RECEIVED_ALERT",SWITCH_USER_HAS_PUBLICATIONS:"SWITCH_USER_HAS_PUBLICATIONS",SET_WELCOME_GIFT_STATUS:"SET_WELCOME_GIFT_STATUS",SET_IS_CHANGE_PWD_MODAL_SHOW:"SET_IS_CHANGE_PWD_MODAL_SHOW",SET_HIDE_ADULT_ALERT:"SET_HIDE_ADULT_ALERT",SET_CHATROOM_HINT:"SET_CHATROOM_HINT",SET_XMAS_HINT:"SET_XMAS_HINT",SET_POLL_HINT:"SET_POLL_HINT",SET_COMMENT_SORT_HINT:"SET_COMMENT_SORT_HINT",SET_IS_PHONE_VERIFIED:"SET_IS_PHONE_VERIFIED",setUserData:e=>{let{name:t="",avatarUrl:r="",fullname:o="",username:l="",_id:s="",level:c="",email:d="",receiveEmail:u="",permissionWrite:h=!1,recommendStatus:p=0,recommendSelection:m=[],premiumDate:x="",mailVerification:g=0,mailAuthor:y=!1,mailAuthorOpp:A=!1,mailFollow:f=0,mailMember:v=!1,mailSubscribe:_=0,welcomeGift:E=0,createdAt:b=null,updatedAt:S=null,welcomeGiftReceivedAt:I=!1,headerColor:j="",isPremium:C=!1,intro:T="",likerId:w="",walletAddress:L="",permissionAuthorization:R=0,socialLinks:O={},socialLinkPosition:M=[],addLikerButtonByDefault:P=!1,permissionDonate:D=!1,reply:H="",hideAdultAlert:N,salons:z=[],isVAFHolder:G=!1,hasSalonPermission:U=!1,interestedCatalogIDs:k=[],salonBurgerHint:B=!1,homePageEventHint:W=!1,chatroomHint:$=!1,cardEventHint:V=!1,createButtonTooltipHint:F=!1,pollHomeHint:J,pollCreateHint:Z,pollToolbarHint:X,commentSortHint:Y=!1,isPhoneVerified:K=!1,canPublishContent:q=!1}=e;return{type:i.SET_USER_DATA,payload:{name:t,avatarUrl:r,fullname:o,username:l,userId:s,level:c,email:d,premiumDate:x,receiveEmail:u,permissionWrite:h,recommendStatus:p,recommendSelection:m,mailVerification:g,mailAuthor:y,mailAuthorOpp:A,mailFollow:f,mailMember:v,mailSubscribe:_,welcomeGift:E,createdAt:b,updatedAt:S,welcomeGiftReceivedAt:I,headerColor:j||n.PL[n.ZV.WHITE],isPremium:C,intro:T,likerId:w,walletAddress:L,socialLinks:O,socialLinkPosition:M,hasPremiumPermission:(0,a.di)({premiumDate:x,level:c,isVAFHolder:G}),permissionAuthorization:R,addLikerButtonByDefault:P,permissionDonate:D,reply:H,hideAdultAlert:N,salons:z,userHasSalon:z?.length>0,isVAFHolder:G,hasSalonPermission:U,interestedCatalogIDs:k,salonBurgerHint:B,homePageEventHint:W,chatroomHint:$,cardEventHint:V,createButtonTooltipHint:F,pollHomeHint:J,pollCreateHint:Z,pollToolbarHint:X,commentSortHint:Y,isPhoneVerified:K,canPublishContent:q}}},setPremiumOrder:e=>{let{premiumOrder:t=!1}=e;return{type:i.SET_PREMIUM_ORDER,payload:{premiumOrder:t}}},setIsValidated:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{type:i.SET_IS_VALIDATED,payload:{isValidated:e}}},updateUserData:e=>({type:i.UPDATE_USER_DATA,payload:e}),addRecommendAuthorList:e=>{let{authorId:t=""}=e;return{type:i.ADD_RECOMMEND_AUTHOR_LIST,payload:{authorId:t}}},deleteRecommendAuthorList:e=>{let{authorId:t=""}=e;return{type:i.DELETE_RECOMMEND_AUTHOR_LIST,payload:{authorId:t}}},clearRecommendAuthorList:()=>({type:i.CLEAR_RECOMMEND_AUTHOR_LIST}),addRecommendPublicationList:e=>{let{publicationId:t=""}=e;return{type:i.ADD_RECOMMEND_PUBLICATION_LIST,payload:{publicationId:t}}},deleteRecommendPublicationList:e=>{let{publicationId:t=""}=e;return{type:i.DELETE_RECOMMEND_PUBLICATION_LIST,payload:{publicationId:t}}},clearRecommendPublicationList:()=>({type:i.CLEAR_RECOMMEND_PUBLICATION_LIST}),showWelcomeGiftAlert:()=>({type:i.SHOW_WELCOME_GIFT_RECEIVED_ALERT}),switchUserHasPublications:e=>({type:i.SWITCH_USER_HAS_PUBLICATIONS,payload:{hasPublications:e}}),setWelcomeGiftStatus:e=>({type:i.SET_WELCOME_GIFT_STATUS,payload:e}),setIsChangePasswordModalShow:e=>({type:i.SET_IS_CHANGE_PWD_MODAL_SHOW,payload:e}),setHideAdultAlert:e=>({type:i.SET_HIDE_ADULT_ALERT,payload:e}),setChatroomHint:e=>({type:i.SET_CHATROOM_HINT,payload:e}),setXmasHint:e=>{let{hasClosedPopup:t,hasClosedTooltip:r}=e;return{type:i.SET_XMAS_HINT,payload:{hasClosedPopup:t,hasClosedTooltip:r}}},setPollHint:e=>{let{pollHomeHint:t,pollCreateHint:r,pollToolbarHint:n}=e;return{type:i.SET_POLL_HINT,payload:{pollHomeHint:t,pollCreateHint:r,pollToolbarHint:n}}},setCommentSortHint:e=>{let{commentSortHint:t}=e;return{type:i.SET_COMMENT_SORT_HINT,payload:{commentSortHint:t}}},setPhoneVerified:e=>{let{isPhoneVerified:t}=e;return{type:i.SET_IS_PHONE_VERIFIED,payload:{isPhoneVerified:t}}}},o=i},422264:(e,t,r)=>{r.d(t,{A:()=>c});
1var n=r(823798),a=r(761139),i=r(109562),o=r(314548),l=r(721318),s=r(935006);let c=function(e){let{variant:t="Fill-Primary",size:r="medium",leftIcon:i="",rightIcon:o="",children:c,className:u,disabled:h,onClick:p=()=>{},...m}=e,x=(0,a.useAmp)();return(0,n.jsxs)(d,{height:l.dK[r].height,padding:l.dK[r].padding,borderRadius:l.dK[r].borderRadius,fontSize:l.dK[r].fontSize,display:"flex",justifyContent:"center",alignItems:"center",className:u,disabled:h,"data-size":r,variant:t,"data-variant":t,onClick:e=>{h||"function"!=typeof p||p(e)},...m,children:[!x&&i?(0,n.jsx)(s.A,{name:i,size:void 0,className:void 0,style:void 0}):null,c?(0,n.jsx)("span",{children:c}):null,!x&&o?(0,n.jsx)(s.A,{name:o,size:void 0,className:void 0,style:void 0}):null]})},d=(0,i.Ay)(o.Zi).withConfig({shouldForwardProp:(e,t)=>t(e)&&!o.IE.includes(e)}).withConfig({componentId:"sc-5e9a1b25-0"})(["letter-spacing:1px;font-weight:500;white-space:nowrap;i:first-child{margin-right:8px;}i:last-child{margin-left:8px;}&:disabled{cursor:not-allowed;}white-space:nowrap;"])},442231:(e,t,r)=>{r.d(t,{Ng:()=>a,yV:()=>i}),r(387474),r(967954);var n=r(966070);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(!window.localStorage.getItem("afterlogin_redirect")||t)&&(0,n.UZ)(window.location.pathname+window.location.search),window.location.assign(`/login${e}`)}let i=e=>{let{articleId:t,fromArticle:r,from:a,source:i,openNewTab:o}=e;if(a&&localStorage.setItem("from",a),r&&localStorage.setItem("fromArticle",r),i&&localStorage.setItem("source",i),o)return void window.open((0,n.p6)(t),"_blank");window.location.href=(0,n.p6)(t)}},465956:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(563140);function a(e){let{userId:t}=e,r=`/api/users/${t}/chatroom`,{data:a,isLoading:i,error:o}=(0,n.Ay)(t&&r);return{data:a,isLoading:i,error:o}}},467150:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(823798),a=r(761139);let i=function(e){let{src:t,width:r=100,height:i=100,layout:o="responsive",borderRadius:l="0%",margin:s="0",classType:c="",style:d={},originalComponent:u=null}=e,h=(0,a.useAmp)(),p=(0,n.jsx)("amp-img",{src:t,width:r,height:i,layout:o,style:{borderRadius:l,margin:s,...d},class:c});return h?p:u}},488205:(e,t,r)=>{r.d(t,{A:()=>_});var n=r(823798),a=r(621462),i=r(109562);let o=r.p+"static/media/ban-icon.0c08859c.png",l=r.p+"static/media/spam-icon.4a985712.png";var s=r(873092),c=r(467150),d=r(317836);let u=i.Ay.img.withConfig({componentId:"sc-991e63be-0"})(["width:",";height:",";background-color:",";cursor:",";margin:",";border:",";clip-path:",";box-shadow:",";border-image:",";border-radius:",";"],e=>`${e.width||40}px`,e=>`${e.width||40}px`,d.Tj.neutral.white,e=>e.cursorType,e=>{let t="0";return e.margin?t=e.margin:e.theme.margin&&(t=e.theme.margin),t},e=>e.theme.border,e=>e.theme.clipPath,e=>e.theme.boxShadow,e=>e.theme.borderImage,e=>e.theme.borderRadius||"100%"),h={clipPath:"",borderRadius:"100%",boxShadow:"",borderImage:"",width:50,margin:"0 12px 0 0"};var p=r(742325),m=r(708607),x=r(596350),g=r(780745),y=r(906932),A=r(689196),f=r(966070);function v(e){let{targetData:t,role:r,isAmpImg:n}=e;switch(r){case"user":return n?t?.avatarUrl||y:t?.avatarUrl;case"publication":case"room":return t?.thumbnailUrl;case"salon":return t?.thumbnailURL;default:return t?.coverURL}}
1function _(e){let{targetData:t,role:r="user",width:d=50,borderRadius:_="",margin:b="0",style:S={},className:I="",redirectUrl:j="",isRedirectPage:C=!0,isSkipCompress:T=!1,isShowUserStatusFlag:w=!0,children:L=null}=e,{level:R}=(0,x.A)(),O="10"===R,[M,P]=(0,m.A)({src:v({targetData:t,role:r,isAmpImg:!1}),isSkipCompress:T,adjustWidthFunc:A.$N}),D={...h,borderRadius:_},H="user"===r?y:g,N=(0,a.useMemo)(()=>w?t?.status===p.HJ.BAN?o:t?.spamHandleType===p.u4.ALWAYS_SPAM?l:null:null,[w,t]),z=(0,a.useMemo)(()=>({ref:M,style:S,margin:b,className:I,width:d||50,cursorType:C?"pointer":""}),[M,S,b,I,d,C]),G=(0,a.useMemo)(()=>{if(!C)return"";if(j)return j;switch(r){case"user":return(0,f.iu)(t,r);case"publication":return(0,f.n9)(t);case"room":return(0,f.x2)(t);case"salon":return(0,f.ah)(t);default:return""}},[C,j,t,r]),U=(0,a.useMemo)(()=>({alt:t?.fullname?`${t.fullname}-avatar-img`:"avatar-img",src:P||H}),[t,P,H]),k=(0,a.useMemo)(()=>(0,n.jsxs)(E,{isAdmin:O,width:z.width,user:t,userStatusImg:N,borderRadius:_,children:[(0,n.jsx)(u,{...z,...U,draggable:!1,onError:(0,s.A)(U?.src,"/static/user-icon.svg")}),L]}),[O,z,U,N,t,_,L]);return(0,n.jsx)(c.A,{src:v({targetData:t,role:r,isAmpImg:!0}),style:S,width:d,height:d,margin:b,draggable:!1,layout:"fixed",borderRadius:_||"100%",originalComponent:(0,n.jsx)(i.NP,{theme:{...D,...S},children:C?(0,n.jsx)("a",{href:G,children:k}):k})})}let E=i.Ay.div.withConfig({componentId:"sc-1892782a-0"})(["position:relative;",""],e=>{let{isAdmin:t}=e;return t?(0,i.AH)(['&:before{content:"";position:absolute;top:0px;left:0px;width:',";height:",";border-radius:",";background:",";background-size:cover;background-position:center;background-repeat:no-repeat;z-index:0;}"],e=>{let{width:t}=e;return`${t}px`},e=>{let{width:t}=e;return`${t}px`},e=>{let{borderRadius:t}=e;return t||"50%"},e=>{let{userStatusImg:t}=e;return t?`url(${t}) rgba(0, 0, 0, 0.5)`:""}):""})},496418:(e,t,r)=>{r.d(t,{T:()=>o,d:()=>i});var n=r(88089),a=r(457684);function i(){let e="/api/chatrooms",{data:t,trigger:r,error:i,isMutating:o}=(0,n.A)(e,(t,r)=>{let{arg:n}=r;return()=>(0,a.A)(e,{method:"POST",body:JSON.stringify(n)})});return{data:t,trigger:r,error:i,isMutating:o}}function o(e){let{chatroomId:t}=e,r=`/api/chatrooms/${t}`,{data:i,trigger:o,error:l,isMutating:s}=(0,n.A)(r,(e,t)=>{let{arg:n}=t;return()=>(0,a.A)(r,{method:"PATCH",body:JSON.stringify(n)})});return{data:i,trigger:o,error:l,isMutating:s}}},505724:(e,t,r)=>{r.d(t,{A:()=>i,a:()=>a});var n=r(884997);function a(){return(0,n.aH)()}let i=function(){return(0,n.Xh)()}},563897:(e,t,r)=>{r.d(t,{Ay:()=>m,JS:()=>d,Xi:()=>u,_x:()=>c});var n=r(823798),a=r(109562),i=r(757743),o=r(314548),l=r(838432),s=r(888531),c=function(e){return e.Primary="Primary",e.Ghost="Ghost",e.Outline="Outline",e}({});function d(e){let{tabLists:t,...r}=e;return t?.map(e=>(0,n.jsx)(s.UC,{value:e.value,...r,children:e.contentComponent()},e.value))}function u(e){let{item:t,variant:r="Primary",...a}=e;return(0,n.jsx)(p,{asChild:!0,value:t.value,style:{zIndex:1},children:(0,n.jsx)(h,{variant:r,p:"4px 16px",...a,children:t.label})},t.value)}let h=(0,a.Ay)(l.Ay).withConfig({componentId:"sc-4dc93ab9-0"})({cursor:"pointer"},(0,i.Ox)({variants:{Primary:{color:"var(--Primary-Gray-L-01)",background:"transparent",borderBottom:"2px solid var(--Primary-Gray-L-04)","&[data-state='active']":{borderColor:"var(--Primary-Black-Base)",color:"var(--Primary-Black-Base)",fontWeight:500}},Ghost:{color:"var(--Primary-Gray-L-01)",background:"transparent",borderRadius:"16px",border:"none","&[data-state='active']":{fontWeight:500,color:"var(--Primary-Black-Base)",background:"var(--Primary-Gray-L-05)"},"&:hover":{color:"var(--Primary-Black-Base)",background:"var(--Primary-Gray-L-05)"}},Outline:{color:"var(--Primary-Gray-L-01)",background:"transparent",borderRadius:"16px",border:"1px solid var(--Primary-Gray-L-04)","&[data-state='active']":{fontWeight:500,color:"var(--Primary-White)",background:"var(--Primary-Gray-L-01)"},"@media (hover: hover)":{"&:hover:not([data-state='active'])":{color:"var(--Primary-Gray-L-01)",background:"transparent",borderColor:"var(--Primary-Gray-L-01)"}}}}})),p=(0,a.Ay)(s.l9).withConfig({componentId:"sc-4dc93ab9-1"})(["z-index:1;white-space:nowrap;text-align:center;width:100%;"]),m=function(e){let{variant:t="Primary",tabLists:r,defaultValue:a=r?.[0]?.value,tabsAriaLabel:i="Tab Primary",...l}=e;return(0,n.jsxs)(s.bL,{defaultValue:a,children:[(0,n.jsx)(s.B8,{"aria-label":i,children:(0,n.jsx)(o.so,{width:"100%",...l,children:r?.map(e=>(0,n.jsx)(u,{variant:t,item:e},e.value))})}),(0,n.jsx)(d,{tabLists:r})]})}},682461:(e,t,r)=>{r.d(t,{A:()=>f});var n=r(823798),a=r(621462),i=r(448561),o=r(109562),l=r(314548),s=r(401654),c=r(190931),d=r(239907),u=r(838432),h=r(935006);
1function p(e){let{controlList:t}=e;return t.map(e=>(0,n.jsx)(m,{children:(0,n.jsx)(c.fv,{onClickCb:e.onClick,children:(0,n.jsxs)(l.so,{gap:"12px",alignItems:"center",children:[(0,n.jsx)(h.A,{name:e.iconName,size:20}),(0,n.jsx)(u.Ay,{textStyle:"Label3-Medium",children:e.label})]})})},e.label))}let m=(0,o.Ay)(l.az).withConfig({componentId:"sc-d81b760a-0"})([""]);var x=r(335320),g=r(384082),y=r(62433),A=r(72853);function f(e){let{headerWord:t="è天室",onlyShowCloseButton:r=!1,customPreviousPage:o=null,controlList:h=[],joinDays:m=null,hideDemoIcon:f=!1}=e,{previousPage:E,setPreviousPage:b,nextPage:S,setNextPage:I}=(0,a.useContext)(y.p),j=(0,i.wA)(),[C]=(0,g.A)(),[T,w]=(0,a.useState)(!1),L=S.includes("home"),R=()=>{b(o||S),I(E)},O=S.includes("home");return(0,n.jsxs)(v,{p:"12px 16px",borderBottom:S.includes("home")?null:"1px solid var(--Primary-Gray-L-04)",children:[(0,n.jsx)(l.so,{alignItems:"center",justifyContent:"space-between",children:r?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{}),(0,n.jsx)(d.A,{icon:"icon-close",variant:"Ghost",size:"small",onClick:R})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(l.so,{alignItems:"center",children:[O?null:(0,n.jsx)(d.A,{icon:"icon-arrowLeft",variant:"Ghost",size:"small",onClick:R}),(0,n.jsx)(u.Ay,{textStyle:"H6",children:t}),O&&!f?(0,n.jsx)(d.A,{icon:"icon-question_fill",variant:"Ghost",size:"small",onClick:()=>{b(S),I(x.S.TUTORIAL_ROOM)},style:{color:"var(--Primary-Gray-L-04)"}}):null]}),h?.length?(0,n.jsx)(c.Ay,{position:"bottom-right",trigger:(0,n.jsx)(d.A,{icon:"icon-more",variant:"Ghost",size:"small"}),popoverContent:(0,n.jsx)(p,{controlList:h}),isOpen:T,setIsOpen:w}):null,C.isMobile&&L?(0,n.jsx)(d.A,{icon:"icon-close",variant:"Ghost",size:"small",onClick:()=>j((0,A.WW)(!1))}):null]})}),m||0===m?(0,n.jsxs)(_,{children:[(0,n.jsx)(s.zP,{name:"icon-emoji-good",size:16,style:{color:"var(--Primary-Gray-L-02)"}}),(0,n.jsxs)(u.Ay,{textStyle:"Label3-Regular",children:["+ ",m," 天"]})]}):null]})}let v=(0,o.Ay)(l.az).withConfig({componentId:"sc-e371d7c6-0"})([""]),_=(0,o.Ay)(l.so).withConfig({componentId:"sc-e371d7c6-1"})(["justify-content:center;align-items:center;gap:4px;"])},689196:(e,t,r)=>{r.d(t,{$N:()=>x,JK:()=>c,VG:()=>h,aZ:()=>u,di:()=>d,gb:()=>o.A,jz:()=>p,l8:()=>m});
1var n=r(552683),a=r(990688),i=r(64472),o=r(35758);let{serverUrl:l}=i.config,s=n.Ay.animateScroll,c=()=>{let{locales:e}=i.config,t=sessionStorage.getItem("country");return e.includes(t)?t:"TW"},d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{level:"",isVAFHolder:!1,premiumDate:""};return!!e&&!!(e?.level==="10"||e?.isVAFHolder||e?.premiumDate&&(0,a.default)(new Date,new Date(e.premiumDate)))},u=e=>{e?document.body.style.overflow="hidden":document.body.style.overflow="auto"},h=e=>{s.scrollTo(e)},p=e=>{let{firstAddress:t=6,lastAddress:r=6,idAddress:n=""}=e;return n?`${n.slice(0,t)}...${n.slice(-1*r)}`:""},m=e=>new Promise(t=>{setTimeout(()=>{t()},e)}),x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50;return e?e<=100?2*e:1.5*e:200}},708607:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(621462),a=r(966070);let i=e=>{let{src:t="",isSkipCompress:r=!1,adjustWidthFunc:i=e=>e}=e,o=(0,n.useRef)(),[l,s]=(0,n.useState)("");return(0,n.useEffect)(()=>{if(t&&o.current&&o.current.offsetWidth&&o.current.offsetWidth>0){if(t.includes("d2a6d2ofes041u.cloudfront.net/resize"))return void s(t);s((0,a.HP)(t,i(o.current.offsetWidth),r))}else s(t)},[t,r,i]),[o,l,()=>{},()=>{}]}},742325:(e,t,r)=>{r.d(t,{HJ:()=>n,Ij:()=>o,QZ:()=>s,cV:()=>l,u4:()=>a,yS:()=>i,zK:()=>c});let n={BAN:0,NORMAL:1},a={NORMAL:0,ALWAYS_SPAM:1,NEVER_SPAM:2},i={[a.NORMAL]:"æ£å¸¸",[a.ALWAYS_SPAM]:"é»åå®",[a.NEVER_SPAM]:"ç½åå®"};n.BAN,n.NORMAL;let o={ROBOT:1,ILLEGAL:2,ELSE:3,DELETE:4},l={[o.ROBOT]:"æ©å¨äºº",[o.ILLEGAL]:"å´ééè¦",[o.ELSE]:"å
¶å®",[o.DELETE]:"åªé¤å¸³è"},s={UNSET:-1,REVIEWING:0,SET:1,REJECTED:2},c={UNSET:-1,REVIEWING:0,SET:1,REJECTED:2}},780745:(e,t,r)=>{e.exports=r.p+"static/media/publicationCard_placeHolder.aadb3f53.jpg"},827492:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(563140),a=r(457684);function i(e){let{userId:t,onSuccessCallback:r=()=>{},shouldFetch:i}=e,o=t&&i?`/api/users/${t}`:null,{data:l,error:s,mutate:c,isLoading:d,isValidating:u}=(0,n.Ay)(o,e=>(0,a.A)(e),{onSuccess:r});return{data:l,error:s,mutate:c,isLoading:d,isValidating:u}}},873092:(e,t,r)=>{r.d(t,{A:()=>a,K:()=>n});let n="/static/default-error-img.svg",a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"scale-down",a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return i=>{let o=i.target.parentNode;if(o?.tagName==="PICTURE"&&o.querySelectorAll("source").forEach(e=>e.remove()),i.target.dataset.forceFallbackSrc||"undefined"===i.target.src||!i.target.src){i.target.src=n,i.target.srcset=n,i.target.dataset.srcset=n,i.target.dataset.lowsrc=n;return}i.target.dataset.hasFailed?(a?(i.target.srcset=t||n,i.target.dataset.srcset=t||n,i.target.dataset.lowsrc=t||n):i.target.src=t||n,i.target.style.objectFit=r,i.target.onerror=null,i.target.dataset.forceFallbackSrc=!0):(i.target.dataset.hasFailed=!0,a?(i.target.srcset=e,i.target.dataset.srcset=e,i.target.dataset.lowsrc=e):i.target.src=e)}}},906932:(e,t,r)=>{e.exports=r.p+"static/media/user-icon.005c47e4.svg"},925632:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(823798),a=r(109562),i=r(757743);let o=function(e){let{variant:t="basic",children:r,href:a,showHoverUnderline:i=!0,...o}=e;return(0,n.jsx)(s,{variant:t,href:a,showHoverUnderline:i,...o,children:r})},l={basic:{default:{color:"var(--Primary-Gray-L-01)",borderBottom:"none"},hover:{color:"var(--Primary-Gray-L-01)",borderBottom:"1px solid var(--Primary-Gray-L-01)"}},blue:{default:{color:"var(--Secondary-Blue-Base)",textDecorationLine:"none"},hover:{color:"var(--Secondary-Blue-D-01)",textDecorationLine:"none"}},"in-article":{default:{color:"var(--Primary-Gray-L-01)",textDecorationLine:"underline",fontWeight:700},hover:{color:"var(--Primary-Gray-L-02)",textDecorationLine:"underline",fontWeight:700}}},s=a.Ay.a.withConfig({componentId:"sc-b49801dc-0"})(["display:inline-flex;gap:8px;align-items:center;cursor:pointer;color:",";font-weight:",";text-decoration:",";",";",";",";",";&&:hover{text-decoration:",";}&:hover{color:",";font-weight:",";}"],e=>{let{variant:t}=e;return l[t].default.color},e=>{let{variant:t}=e;return l[t].default.fontWeight},e=>{let{variant:t}=e;return l[t].default.textDecorationLine},i.xe,i.Zp,i.Il,i.yW,e=>{let{showHoverUnderline:t}=e;return t?"underline":"none"},e=>{let{variant:t}=e;return l[t].hover.color},e=>{let{variant:t}=e;return l[t].hover.fontWeight})}}]);
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.