Module 198525

5,122 characters · in c9de30d59c40100f.js
Dependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>W});var l=n(627968),i=n(64700),s=n(873174),r=n(837381),a=n(17928),o=n(821609),c=n(462887),u=n(717421),d=n(866323),h=n(192308),m=n(534514),p=n(939249),f=n(834730),g=n(290136),x=n(661531),A=n(730852),C=n(401843),E=n(765671),I=n(775602),y=n(267102),S=n(363195),v=n(734057),N=n(507107),_=n(838077),T=n(859387),j=n(561844),b=n(590202),R=n(792620),O=n(814793),L=n(73473),M=n(371912),w=n(646764),k=n(398025),P=n(617986),D=n(190107),U=n(652215),G=n(818348),V=n(375708),F=n(185952);let H="11px";function B(e){let{quest:t,memberListItemRef:L,applicationStream:B,position:W,closePopout:K,updatePosition:z,impressionRef:Z,name:Y}=e,q=(0,a.bG)([v.A],()=>v.A.getChannel(B?.channelId)??null),J=(0,M.ix)({quest:t,questContent:N.uF.MEMBERS_LIST,sourceQuestContent:N.uF.MEMBERS_LIST}),$=t?.userStatus?.claimedAt!=null,X=t?.userStatus?.enrolledAt!=null,Q=t?.userStatus?.completedAt!=null,ee=(0,a.bG)([S.A],()=>S.A.getState().theme),et=(0,c.M)(ee)?G.NJ.DARK:G.NJ.LIGHT,en=(0,a.bG)([I.A],()=>I.A.useReducedMotion),{ref:el,height:ei}=(0,E.Ay)(),[es,er]=i.useState(en),ea=(0,y.aL)(),eo=(0,r.KF)();i.useEffect(()=>{let e=eo.current;return e?.addEventListener("scroll",K),()=>{e?.removeEventListener("scroll",K)}},[K,eo]),i.useEffect(()=>{let e=eo.current,t=L.current;if(null==e||null==t)return;let n=new MutationObserver(()=>z());return n.observe(e,{childList:!0,subtree:!0}),()=>{n.disconnect()}},[L,eo,z]);let ec=(0,u.z)({from:{height:0},height:ei??0,config:{tension:450,friction:45},onRest:()=>er(!0)}),eu=(0,d.p)(es,{from:{opacity:0,scale:0},enter:{opacity:1,scale:1}}),ed=()=>{ea.dispatch(U.jej.POPOUT_CLOSE)},eh="top"===W?"8px 8px 0 0":"0 0 8px 8px",em=()=>{(0,j.Y5)({questId:t.id,questContent:N.uF.MEMBERS_LIST,questContentCTA:b.Cy.LEARN_MORE,trackGuildAndChannelMetadata:!0,sourceQuestContent:N.uF.MEMBERS_LIST}),(0,P.navigateToQuestHome)({fromContent:N.uF.MEMBERS_LIST,questId:t.id})},ep=()=>{(0,O.Ll)(B,q)&&null!=q?((0,j.Y5)({questId:t.id,questContent:N.uF.MEMBERS_LIST,questContentCTA:b.Cy.WATCH_STREAM,trackGuildAndChannelMetadata:!0,sourceQuestContent:N.uF.MEMBERS_LIST}),(0,h.openModalLazy)(async()=>{let{default:e}=await n.e("72879").then(n.bind(n,48274));return n=>(0,l.jsx)(e,{username:Y??"",onConfirm:()=>((0,j.Y5)({questId:t.id,questContent:N.uF.MEMBERS_LIST,questContentCTA:b.Cy.WATCH_STREAM_CONFIRM,trackGuildAndChannelMetadata:!0,sourceQuestContent:N.uF.MEMBERS_LIST}),A.default.selectVoiceChannel(q.id),(0,C.Nl)(B)),...n})})):em()},ef=(0,_.NA)({quest:t}),eg=(()=>{if(Q&&!$)return{headerText:V.intl.string(V.t.gHerLS),ctaText:V.intl.string(V.t.cfY4PE),handleClickCta:J,tileAssetType:"reward"};if(X&&!$)return{headerText:V.intl.string(V.t.uH2sf2),ctaText:V.intl.string(V.t.VN1Ajl),handleClickCta:em,tileAssetType:"reward"};if((0,O.Ll)(B,q))return{headerText:V.intl.string(V.t.Bz6SkH),ctaText:V.intl.string(V.t.BXFP30),handleClickCta:ep,tileAssetType:"game"};let e=(0,O.vA)(t)?ef:V.intl.string(V.t["BSXPZ+"]);return{headerText:(0,O.vA)(t)&&(0,R.vl)(t)&&!t.config.features.includes(D.Li.CLOUD_GAMING_ACTIVITY)?e:V.intl.string(V.t.Bz6SkH),ctaText:e,handleClickCta:em,tileAssetType:"game"}})();return(0,l.jsx)(s.animated.div,{ref:e=>{Z.current=e},"aria-expanded":es,className:F.iE,style:{width:L.current?.clientWidth??222,height:ec.height,overflow:es?"visible":"hidden",borderRadius:eh},children:(0,l.jsxs)("div",{ref:e=>{el.current=e},className:F.kL,style:{borderRadius:eh},children:[(0,l.jsxs)("div",{className:F.Mn,children:[(0,l.jsxs)("div",{className:F.kb,children:[(0,l.jsx)(m.D,{variant:"heading-sm/semibold",children:eg.headerText}),(0,l.jsxs)(p.D,{className:F.yj,onClick:e=>{ed(),e.stopPropagation(),(0,j.Y5)({questId:t.id,questContent:N.uF.MEMBERS_LIST,questContentCTA:b.Cy.OPEN_DISCLOSURE,trackGuildAndChannelMetadata:!0,sourceQuestContent:N.uF.MEMBERS_LIST}),(0,P.Zc)(t,{content:N.uF.MEMBERS_LIST,ctaContent:b.Cy.OPEN_DISCLOSURE,sourceQuestContent:N.uF.MEMBERS_LIST})},children:[(0,l.jsx)(f.E,{variant:"text-xs/medium",color:"text-muted",className:F.BK,children:V.intl.format(V.t["Lm8/mH"],{gamePublisher:t.config.messages.gamePublisher})}),(0,l.jsx)(g.c,{size:"custom",className:F.$y,width:H,height:H,color:x.A.colors.INTERACTIVE_TEXT_DEFAULT})]})]}),(0,l.jsx)("div",{className:F.pG,children:(0,l.jsxs)("div",{className:F.zc,children:[eu((e,t)=>t&&(0,l.jsx)(s.animated.div,{style:{opacity:(0,k.a)(e.opacity),scale:(0,k.a)(e.scale)},className:F.ae})),"game"===eg.tileAssetType&&(0,l.jsx)("img",{alt:V.intl.formatToPlainString(V.t.IskzPg,{gameTitle:t.config.messages.gameTitle,gamePublisher:t.config.messages.gamePublisher}),className:F.TW,src:(0,T.tW)(t,T.fY.GAME_TILE,et).url}),"reward"===eg.tileAssetType&&(0,l.jsx)(w.A,{className:F.TW,quest:t,questContent:N.uF.MEMBERS_LIST,learnMoreStyle:"icon",onClick:ed,sourceQuestContent:N.uF.MEMBERS_LIST})]})})]}),(0,l.jsx)(o.$,{variant:"secondary",text:eg.ctaText,onClick:()=>{ed(),eg.handleClickCta()},fullWidth:!0})]})})}function W(e){return(0,l.jsx)(L.R,{questOrQuests:e.quest,questContent:N.uF.MEMBERS_LIST,trackGuildAndChannelMetadata:!0,sourceQuestContent:N.uF.MEMBERS_LIST,children:t=>(0,l.jsx)(B,{impressionRef:t,...e})})}}