Loading
function(e,t,n){n.d(t,{g:()=>lO,A:()=>lP}),n(321073);var i=n(627968),l=n(64700),s=n(503698),a=n.n(s),r=n(735438),o=n.n(r),u=n(158390),c=n(17928),d=n(554146),h=n(451988),m=n(97808),p=n(778712),f=n(922016),g=n(939249),A=n(140735),x=n(312138);if(21552==n.j)var C=n(192308);var E=n(442433),v=n(820284),T=n(717558),j=n(964486),_=n(220839),N=n(397244),S=n(394871),R=n(922139),y=n(866323),I=n(449450);function b(e){let{text:t}=e,n=(0,y.p)(t,{from:{opacity:0,transform:"translate3d(0, 107%, 0)"},enter:{opacity:1,transform:"translate3d(0, 0, 0)"},config:{duration:220,clamp:!0}});return(0,i.jsx)("div",{className:I.k,children:n((e,t)=>(0,i.jsx)(R.animated.div,{className:I.H,style:e,children:t}))})}var M=n(29160),w=n(793574),O=n(688810),U=n(521502),D=n(380610),P=n(313961),k=n(18235),L=n(183184),F=n(384059),G=n(480890),V=n(734066),B=n(710315),H=n(601255),Q=n(562819),W=n(449582),z=n(351952),q=n(88686),Z=n(174755),K=n(302223),$=n(609425),Y=n(922301),X=n(368919),J=n(643501),ee=n(534514),et=n(834730),en=n(789645),ei=n(826673),el=n(750506),es=n(780964),ea=n(766075),er=n(417146),eo=n(552122),eu=n(717421),ec=n(775602),ed=n(993843);let eh={mass:10,tension:550,friction:140};function em(e){let{className:t,pageMultiplier:n}=e,s=(0,c.bG)([ec.A],()=>ec.A.useReducedMotion),[r,u]=l.useState({x:0,y:0}),d=l.useMemo(()=>o().throttle(e=>{s||u({x:(window.innerWidth-e.pageX*n)/90,y:(window.innerHeight-e.pageY*n)/90})},20),[n,s]);l.useEffect(()=>(window.addEventListener("mousemove",d),()=>window.removeEventListener("mousemove",d)),[d]);let[h,m]=(0,eu.z)(()=>({x:0,y:0,config:eh}));return l.useEffect(()=>{m({x:r.x,y:r.y})},[r.x,r.y,m]),(0,i.jsx)(R.animated.div,{style:{transform:(0,R.to)([h.x,h.y],(e,t)=>`translate3d(${e}px, ${t}px, 0)`)},className:a()(ed.T,t)})}var ep=n(49999),ef=n(375708),eg=n(275883);function eA(e){let{dismissibleContent:t,backgroundColor:n,specialTextColor:l}=e,s=eo.A.useIsEligible(),a=(0,ei.JZ)(t),r=null!=n,o=null!=l?{color:l}:void 0,{analyticsLocations:u}=(0,O.Ay)(w.A.HOLIDAY_COACHMARK),c=e=>{(0,ei.Dr)(t,{dismissAction:e})},d=()=>{(0,ea.openUserSettings)(es.X.NOTIFICATIONS_PANEL,{analyticsLocations:u}),c(ep.i.TAKE_ACTION)};return s&&!a?(0,i.jsx)(el.Ay,{children:(0,i.jsxs)("div",{className:eg.iE,style:{backgroundColor:r?n:void 0},children:[!r&&(0,i.jsxs)("div",{className:eg.o5,children:[(0,i.jsx)(em,{className:eg.iL,pageMultiplier:5}),(0,i.jsx)("div",{className:eg.Np})]}),(0,i.jsx)("div",{className:eg.c8}),(0,i.jsxs)("div",{className:eg.Qs,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(ee.D,{variant:"heading-md/bold",color:null!=o?void 0:"always-white",style:o,children:ef.intl.string(ef.t["6CxPoB"])}),(0,i.jsx)(et.E,{variant:"text-xs/normal",color:"always-white",children:ef.intl.format(ef.t.IVzJ8G,{settingsHook:(e,t)=>(0,i.jsx)(g.D,{tag:"span",className:eg.nf,style:o,onClick:d,children:e},t)})})]}),(0,i.jsx)(g.D,{className:eg.l2,onClick:()=>c(ep.i.USER_DISMISS),children:(0,i.jsx)(en.P,{color:"currentColor",size:"xs"})})]})]})}):null}function ex(){return null==er.A.coachmarkDismissibleContent?null:(0,i.jsx)(eA,{dismissibleContent:er.A.coachmarkDismissibleContent,backgroundColor:er.A.coachmarkBackgroundColor,specialTextColor:er.A.coachmarkSpecialTextColor})}var eC=n(74848),eE=n(832248),ev=n(607399),eT=n(707554),ej=n(224640),e_=n(305866),eN=n(364522),eS=n(22231),eR=n(133171),ey=n(780338);if(21552!=n.j)var C=n(192308);var eI=n(980707),eb=n(26137),eM=n(473935),ew=n(765671),eO=n(783041),eU=n(457965),eD=n(176781),eP=n(777666),ek=n(320448),eL=n(993401),eF=n(447349);function eG(e){return(0,i.jsx)("div",{className:eF.wE,children:(0,i.jsx)(eI.W,{"data-menu-migrated":!0,variant:"fixed",hideScroller:!0,onSelect:void 0,...e})})}function eV(e){let{action:t,onClick:n,icon:s,label:a,sublabel:r,trailing:o,renderSubmenu:u,ref:c,submenuTargetElementRef:d,submenuAlign:h}=e,m=null!=n,p=(0,eL.rE)({action:t,onClick:n}),[A,x]=l.useState(!1),E=l.useRef(null),v=c??E,T=null!=u,j=T&&m,_=l.useCallback(()=>{x(!0)},[]),N=l.useCallback(()=>{(0,C.hasAnyModalOpen)()||x(!1)},[]),S=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:eF.iA,children:(0,i.jsx)(s,{size:"xs",color:"currentColor"})}),(0,i.jsxs)("div",{className:eF.$H,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)(et.E,{color:"currentColor",variant:"text-sm/medium",className:eF.W1,children:a}),(0,i.jsx)(et.E,{color:"currentColor",variant:"text-xs/medium",children:r})]}),o]})]}),R=e=>{let t;return t=j?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(g.D,{className:eF.ef,onClick:p,children:S()}),(0,i.jsx)(g.D,{className:eF.ap,"aria-label":ef.intl.string(ef.t.PdRCRg),...e,onClick:_,children:(0,i.jsx)(ek._,{size:"xs",color:"currentColor"})})]}):T?(0,i.jsxs)(g.D,{className:eF.ef,...e,onClick:_,children:[S(),(0,i.jsx)("div",{className:eF.ap,children:(0,i.jsx)(ek._,{size:"xs",color:"currentColor"})})]}):(0,i.jsx)(g.D,{className:eF.ef,onClick:p,children:S()}),(0,i.jsx)("div",{ref:v,className:eF.jG,children:t})};return T?(0,i.jsx)("li",{className:eF.j$,onMouseEnter:_,onMouseLeave:N,children:(0,i.jsx)(f.Y,{targetElementRef:d??v,align:h,spacing:0,renderPopout:u,shouldShow:A,onRequestClose:N,children:R})}):(0,i.jsx)("li",{className:eF.j$,children:R()})}function eB(e){let{children:t,"aria-label":n}=e;return(0,i.jsx)("ul",{"aria-label":n,children:t})}var eH=n(274372),eQ=n(271597),eW=n(990078),ez=n(315710),eq=n(475358),eZ=n(408278),eK=n(625903),e$=n(404778),eY=n(689175),eX=n(821609),eJ=n(532624),e0=n(927813),e1=n(879631),e2=n(350535),e3=n(372684),e6=n(572164),e5=n(953932),e4=n(280483),e8=n(890856),e7=n(713517),e9=n(609174),te=n(241326);let tt=e=>{let{onBeforeDelete:t,onAfterDelete:s,variant:a="overlay-secondary"}=e,r=(0,e9.Y_)(),o=l.useCallback(e=>{e.stopPropagation(),e.preventDefault(),(e=>{let{clips:t,onBeforeDelete:l,onAfterDelete:s}=e;(0,C.openModalLazy)(async()=>{let{default:e}=await n.e("13367").then(n.bind(n,223818));return n=>(0,i.jsx)(e,{clips:t,...n,onBeforeDelete:l,onAfterDelete:async()=>{await n.onClose(),s?.()}})},{stackingBehavior:"stack"})})({clips:[r],onAfterDelete:s,onBeforeDelete:t})},[r,s,t]);return(0,i.jsx)(eW.m,{text:ef.intl.string(ef.t.oyYWHE),position:"top",children:(0,i.jsx)(eZ.K,{onClick:o,icon:te.u,"aria-label":ef.intl.string(ef.t.oyYWHE),variant:a,size:"sm"})})},tn=e=>{let{onBeforeEdit:t,variant:n="primary"}=e,s=(0,e9.Y_)(),a=l.useCallback(e=>{e.stopPropagation(),e.preventDefault(),t?.(),(0,eQ.p)({initialEditingClipId:s.id})},[s,t]);return(0,i.jsx)(eX.$,{onClick:a,icon:eS.R,variant:n,size:"sm",text:ef.intl.string(ef.t.bt75uw),fullWidth:!0})};var ti=n(27232),tl=n(505930),ts=n(877575),ta=n(16590);let tr=()=>{let e=(0,e9.Y_)(),t=l.useCallback(t=>{t.stopPropagation(),t.preventDefault(),(0,ts.XK)(e)},[e]);return(0,i.jsx)(eW.m,{text:ef.intl.string(e.isFavorite?ta.default.IZsalP:ta.default.ihBfyA),position:"top",children:(0,i.jsx)(eZ.K,{onClick:t,icon:e.isFavorite?ti.G:tl.y,"aria-label":ef.intl.string(ef.t.k8fFjp),variant:"overlay-secondary",size:"sm"})},`${e.id}:favorite:${e.isFavorite}`)};var to=n(405433),tu=n(602902);let tc=e=>{let{variant:t="primary"}=e,n=(0,e9.Y_)(),{analyticsLocations:s}=(0,O.Ay)(),a=l.useCallback(e=>{e.stopPropagation(),e.preventDefault(),(0,tu.K)([n],{analyticsLocations:s})},[n,s]);return(0,i.jsx)(eX.$,{onClick:a,icon:to.l,variant:t,size:"sm",text:ef.intl.string(ef.t.RDE0Sc),fullWidth:!0})};var td=n(226870),th=n(285072),tm=n(316305);let tp=l.memo(function(e){let{clip:t,isNew:n,onClose:s,className:r}=e,o=l.useRef(null),{isHoveringOrFocusing:u}=(0,e7.A)(o),c=l.useCallback(()=>{s?.(),(0,eQ.p)({initialEditingClipId:t.id})},[t.id,s]);return(0,i.jsx)(e9.Cl,{clip:t,children:(0,i.jsx)(e8.s,{ref:o,"aria-label":ef.intl.string(ef.t.bt75uw),onClick:c,className:a()(tm.Z1,r),children:(0,i.jsxs)(td.d,{isStatic:!0,children:[n&&(0,i.jsx)(eP.Lp,{className:tm.Ad,text:ef.intl.string(ef.t.y2b7CA)}),(0,i.jsxs)(th.h,{isVisible:u,className:tm.Lw,children:[(0,i.jsxs)("div",{className:tm.mY,children:[(0,i.jsx)(tr,{}),(0,i.jsx)(tt,{})]}),(0,i.jsxs)("div",{className:tm.E_,children:[(0,i.jsx)(tn,{onBeforeEdit:s}),(0,i.jsx)(tc,{})]})]})]})})})});var tf=n(652215),tg=n(753070),tA=n(550350);function tx(e){let{onOpenGallery:t,onOpenSettings:n,onClose:s,setPopoutRef:a}=e;(0,e4.A)();let r=(0,c.yK)([eH.Ay],()=>eH.Ay.getClips()),o=(0,c.bG)([eH.Ay],()=>eH.Ay.getPendingClips()),u=(0,c.bG)([eH.Ay],()=>eH.Ay.getSettings()),d=(0,c.bG)([eH.Ay],()=>eH.Ay.getNewClipIds()),h=(0,c.bG)([eJ.Ay],()=>eJ.Ay.getKeybindForAction(tf.hCu.SAVE_CLIP)),m=l.useRef(null),p=l.useMemo(()=>{let e=[...o,...r].filter(e=>e.type===e3.nQ.CLIP&&""!==e.thumbnail);return e.sort((e,t)=>t.createdAt-e.createdAt),e},[r,o]),f=l.useMemo(()=>p.slice(0,16),[p]),g=p.length>16,A=null!=h?e2.dI(h.shortcut,!0):null;(0,ez.t)(m);let x=(0,e1.$)(u.clipsLength/e0.A.Millis.SECOND),C=(0,tg.zr)(u.clipsQuality.resolution),E=ef.intl.formatToPlainString(ef.t.Qb44XH,{fps:u.clipsQuality.frameRate});return(0,i.jsxs)("div",{ref:e=>{m.current=e,a?.(e)},className:tA.SW,role:"dialog","aria-label":ef.intl.string(ef.t.z2jK6X),children:[(0,i.jsxs)("div",{className:tA.wx,children:[(0,i.jsxs)("div",{className:tA.$,children:[(0,i.jsx)(ee.D,{variant:"heading-lg/semibold",color:"text-strong",children:ef.intl.string(ef.t.z2jK6X)}),null!=A&&(0,i.jsx)(eq.e,{className:tA.P,shortcut:A})]}),(0,i.jsxs)("div",{className:tA.$s,children:[(0,i.jsx)(eW.m,{text:ef.intl.string(ef.t["3D5yo/"]),children:(0,i.jsx)(eZ.K,{onClick:()=>n(),icon:eK.Z,size:"sm",variant:"icon-only","aria-label":ef.intl.string(ef.t["3D5yo/"])})}),(0,i.jsx)(eW.m,{text:ef.intl.string(ta.default["55C2MH"]),children:(0,i.jsx)(eZ.K,{onClick:()=>t(),icon:eD.x,size:"sm",variant:"icon-only","aria-label":ef.intl.string(ta.default["55C2MH"])})})]})]}),(0,i.jsx)(et.E,{variant:"text-sm/medium",color:"text-muted",className:tA.P6,children:[x,C,E].join(" \u2022 ")}),(0,i.jsx)(e$.c,{}),f.length>0?(0,i.jsxs)(eY.Ch,{className:tA.Vg,fade:!0,disableFocusRingScope:!0,children:[f.map(e=>(0,i.jsx)(tp,{clip:e,isNew:d.includes(e.id),onClose:s},e.id)),g&&(0,i.jsx)("div",{className:tA.qr,children:(0,i.jsx)(eX.$,{onClick:()=>t(),text:ef.intl.string(ta.default["55C2MH"]),variant:"secondary",size:"sm"})})]}):(0,i.jsx)(tC,{keybindString:A})]})}function tC(e){let{keybindString:t}=e,n=(0,e6.Et)();return(0,i.jsxs)("div",{className:tA.p$,children:[(0,i.jsx)(et.E,{variant:"text-md/medium",color:"text-default",className:tA.qO,children:ef.intl.string(ta.default.mjfghy)}),n?null!=t&&(0,i.jsx)(et.E,{variant:"text-sm/medium",color:"text-muted",className:tA.CZ,children:ef.intl.format(ta.default.y4zC7j,{protipHook:e=>(0,i.jsx)(et.E,{variant:"text-sm/medium",color:"text-feedback-positive",tag:"span",children:e},"protip"),keybind:(0,i.jsx)(eq.e,{shortcut:t})})}):(0,i.jsx)(e5.A,{})]})}function tE(e){let{onClose:t,popoutContainerRef:n}=e,s=(0,V.sw)(),{userStatusMenu:a}=B.$.useConfig({location:"ClipsUserStatusMenuItem"}),r=(0,c.bG)([eH.Ay],()=>eH.Ay.getNewClipIds().length),o=l.useCallback(e=>{t(),(0,eQ.p)({initialEditingClipId:e})},[t]),u=l.useCallback(()=>{t(),(0,ea.openUserSettings)(es.X.CLIPS_PANEL)},[t]);return s&&a?(0,i.jsx)(eV,{action:"PRESS_CLIPS",icon:eD.x,label:ef.intl.string(ef.t.z2jK6X),trailing:r>0?(0,i.jsx)(eP.hV,{count:r}):null,onClick:()=>o(),submenuTargetElementRef:n,submenuAlign:"bottom",renderSubmenu:e=>(0,i.jsx)(tx,{...e,onOpenGallery:o,onOpenSettings:u,onClose:t})}):null}var tv=n(480335),tT=n(31956),tj=n(361628),t_=n(744808),tN=n(875741),tS=n(645507),tR=n(970931),ty=n(462887),tI=n(736653),tb=n(439174),tM=n(428262),tw=n(878784),tO=n(788868);function tU(){let e=(0,tw.Xb)(),t=(0,tM.nK)();if(null==e||!t)return null;let n=new Date().getTime();for(let t=tO.sp.length-1;t>=0;t--){let i=tO.VD[tO.sp[t]],l=new Date(e);if(l.setMonth(e.getMonth()+i.tenureReqNumMonths),l.setHours(l.getHours()+30),n>l.getTime())if(n-l.getTime()<6048e5)return i.id;else break}return null}let tD={[tO.Ac.PREMIUM_TENURE_1_MONTH]:{dark:" #D76C1F, #F79C53",light:" #8E2A0B, #D4681C"},[tO.Ac.PREMIUM_TENURE_3_MONTH]:{dark:" #8F9E9E, #C0CBD1",light:" #53555F, #697979"},[tO.Ac.PREMIUM_TENURE_6_MONTH]:{dark:" #ED8200, #FFCE46",light:" #744400, #CC7000"},[tO.Ac.PREMIUM_TENURE_12_MONTH]:{dark:" #36AAFF, #7BE7CB",light:" #006394, #0089EB"},[tO.Ac.PREMIUM_TENURE_24_MONTH]:{dark:" #8670FF, #C2BDFF",light:" #5423CC, #8670FF"},[tO.Ac.PREMIUM_TENURE_36_MONTH]:{dark:" #009423, #67FF33",light:" #005C15, #009E25"},[tO.Ac.PREMIUM_TENURE_60_MONTH]:{dark:" #E83068, #FF8F70",light:" #881141, #DD1852"},[tO.Ac.PREMIUM_TENURE_72_MONTH]:{dark:" #829AE8, #DDB4FF, #A2D6FF",light:" #6881D4, #956CB8, #5491A0"}},tP={[tO.Ac.PREMIUM_TENURE_1_MONTH]:{dark:"https://cdn.discordapp.com/assets/content/76b6239d8631db63ae8ddfae2959791fe02bcc550c376cb35d77ef9df1a62ee5.webm",light:"https://cdn.discordapp.com/assets/content/f09f5aa678c2d463109f0ca84a572646c1b6b21974865e84ac92f3c3a3f50b87.webm"},[tO.Ac.PREMIUM_TENURE_3_MONTH]:{dark:"https://cdn.discordapp.com/assets/content/333650072ffe3aa581594ad0a78d525ce57e9e34bd236acb81db8b75aa25df7c.webm",light:"https://cdn.discordapp.com/assets/content/adb6e9b17112ca46167a49c50860b17c3aae5f0e56be9c82baa62ffdd664ad24.webm"},[tO.Ac.PREMIUM_TENURE_6_MONTH]:{dark:"https://cdn.discordapp.com/assets/content/279e3118d1cfcc6cfa8decab76b4153e4c3c1eff8a2e77888ae51b96c7292888.webm",light:"https://cdn.discordapp.com/assets/content/e2d18cff69e5718d2836557c0089cf5056f5e833e25e28b6e98bdbc1503d726f.webm"},[tO.Ac.PREMIUM_TENURE_12_MONTH]:{dark:"https://cdn.discordapp.com/assets/content/74b1267eebcf0dcd18ac9fb16c89d231604489cfa3d0eebcd71a4c24962e3538.webm",light:"https://cdn.discordapp.com/assets/content/20265cc95d50db21c86b4a217c967c535561fcb6bfa733df6ba1d0393ca5f980.webm"},[tO.Ac.PREMIUM_TENURE_24_MONTH]:{dark:"https://cdn.discordapp.com/assets/content/68ae410145a1ab508c52f2431e5f808b4cd60d89d74d41f07d6a85ce75106a2a.webm",light:"https://cdn.discordapp.com/assets/content/7aba50f994ce9e66bacabe14aafb881e43997136887f81054f1f025f032f7aea.webm"},[tO.Ac.PREMIUM_TENURE_36_MONTH]:{dark:"https://cdn.discordapp.com/assets/content/03f8fb27edf5fc0c15d71326623a871339eab9fc36316afab2fcce955049d726.webm",light:"https://cdn.discordapp.com/assets/content/566f4db88f64218ac2df0ac3af6bbc975dcd25044e5fdceb0ee8889b2b13c86c.webm"},[tO.Ac.PREMIUM_TENURE_60_MONTH]:{dark:"https://cdn.discordapp.com/assets/content/d2e0f57d4f0054e58fa2b13a28e2ccef6168ffd752760b84feff4da9b076912a.webm",light:"https://cdn.discordapp.com/assets/content/2bbcfd689cc2c402457c21c93b81c98537936d7e54ac6ac46d6a3133519b0101.webm"},[tO.Ac.PREMIUM_TENURE_72_MONTH]:{dark:"https://cdn.discordapp.com/assets/content/2d56eadb5dd14d8bc5d74a55d04cef85bfc2d083b6b0ea53f389c9f34993237a.webm",light:"https://cdn.discordapp.com/assets/content/c5e4aed8b111912db02d0aa12a73d162720f27aaf432000378344e94cde1ec65.webm"}};var tk=n(682165);let tL=l.lazy(()=>Promise.all([n.e("15323"),n.e("24832")]).then(n.bind(n,748579)));function tF(){let e=(0,c.bG)([ec.A],()=>ec.A.useReducedMotion),t=(0,eE.A)(e=>e.shouldRenderTenureLevelUp),n=function(){let e=tU(),t=(0,ty.M)((0,tI.Ay)());if(null==e)return null;let n=tD[e],i=tP[e],l={currentBadge:(0,tb.e0)(e),currentBadgeTextGradient:t?n?.dark:n?.light,levelUpVideoSrc:t?i?.dark:i?.light},s=tO.sp.indexOf(e);if(s>0){let e=tO.sp[s-1],n=tD[e];l.prevBadge=(0,tb.e0)(e),l.prevBadgeTextGradient=t?n?.dark:n?.light}return l}(),[s,a]=l.useState(null);return(null!=n&&null==s&&a(n),e||!t||null==s)?null:(0,i.jsx)(tG,{levelUpData:s})}function tG(e){let{levelUpData:t}=e,n=l.useRef(null),s=l.useCallback(()=>{eE.A.setState({shouldRenderTenureLevelUp:!1})},[]);return(0,i.jsx)(ez.O,{containerRef:n,children:(0,i.jsxs)("div",{className:tk.i,children:[(0,i.jsx)("div",{className:tk.b,children:(0,i.jsx)(eW.m,{text:ef.intl.string(ef.t.cpT0Cq),children:(0,i.jsx)(eZ.K,{icon:en.P,variant:"secondary",size:"sm",onClick:s,"aria-label":ef.intl.string(ef.t.cpT0Cq)})})}),(0,i.jsx)(l.Suspense,{fallback:null,children:(0,i.jsx)(tL,{levelUpData:t})})]})})}var tV=n(206835),tB=n(183555),tH=n(999291),tQ=n(975732),tW=n(718019),tz=n(328296),tq=n(915614),tZ=n(744753),tK=n(559506),t$=n(646986),tY=n(349419),tX=n(946356),tJ=n(878555),t0=n(624479),t1=n(206845),t2=n(957565),t3=n(427262),t6=n(962352);function t5(e){let{user:t,isVisible:n}=e,{trackUserProfileAction:l}=(0,tB.NJ)();return t2.p5?(0,i.jsx)(t1.A,{text:ef.intl.string(ef.t.y5MwJy),delay:0,"aria-label":!1,copyValue:t3.Ay.getUserTag(t,{decoration:"never",identifiable:"always"}),onCopy:()=>l({action:"COPY_USERNAME"}),children:e=>(0,i.jsx)(g.D,{...e,className:a()(t6.c,{[t6.R]:n}),"aria-label":ef.intl.string(ef.t.y5MwJy),children:(0,i.jsx)(t0.T,{size:"xs",color:"currentColor"})})}):null}var t4=n(983495),t8=n(442228),t7=n(885386),t9=n(290863),ne=n(351906),nt=n(562153),nn=n(661531),ni=n(477782),nl=n(628284),ns=n(695366),na=n(363195),nr=n(889227),no=n(287809),nu=n(174459),nc=n(429707),nd=n(274303),nh=n(994125),nm=n(347853),np=n(573879),nf=n(335020),ng=n(43105),nA=n(704824),nx=n(46225),nC=n(429913),nE=n(379848),nv=n(633075),nT=n(735321),nj=n(667049),n_=n(606758),nN=n(495544),nS=n(403362),nR=n(518477);function ny(e){let{targetElementRef:t,onClose:n}=e,[s,a]=l.useState(!1),{trackUserProfileEditAction:r}=(0,tB.NJ)(),o=(0,c.bG)([nN.default],()=>nN.default.getId()),u=function(){let e,t,n=(0,c.bG)([nN.default],()=>nN.default.getId()),i=(0,nj.A)(n),s=l.useMemo(()=>i.filter(e=>e instanceof nv.R),[i]),a=(e=(0,eU.VA)({location:"UserProfileAccountPopoutApplicationWidgetCoachmark"}),l.useMemo(()=>e?.filter(e=>e.isEligibleForEditProfileUpsell()),[e])),r=l.useMemo(()=>a?.map(e=>e.applicationId)??[],[a]),o=(t=(0,nC.A)(r),l.useMemo(()=>t.filter(nS.Vq),[t])),{tokens:u,fetched:d}=(0,nA.j)(r),h=(0,nx.U9)(o);return l.useMemo(()=>{if(null==a||null==u||!d)return null;let e=[],t=[];for(let n of a){let i=u.find(e=>e.application.id===n.applicationId),l=s.find(e=>e.applicationId===n.applicationId),a=o.find(e=>e.id===n.applicationId),r=h.find(e=>e.context.application.id===n.applicationId);if(null==a)return null;null!=i&&null==l?e.push({type:"linked",config:n,application:a,dismissibleContent:n.editProfileLinkedDc}):null==i&&r?.preferredFlow!=null&&t.push({type:"unlinked",config:n,application:a,dismissibleContent:n.editProfileUnlinkedDc,authFlow:r.preferredFlow})}return[...e,...t]},[a,u,d,s,o,h])}(),{analyticsLocations:d}=(0,O.Ay)();return null==u||0===u.length?null:(0,i.jsx)(nE.Ay,{contentTypes:u.map(e=>e.dismissibleContent),children:e=>{let{visibleContent:l,markAsDismissed:c}=e,h=u.find(e=>e.dismissibleContent===l);if(null==h)return null;let m="linked"===h.type,p=()=>(0,tQ.openUserProfileModal)({userId:o,tabSection:nR.RP.WIDGETS}).then(()=>{c(ep.i.TAKE_ACTION),n()});return(0,i.jsx)(ng.A,{targetElementRef:t,position:"right",gradientColor:"blue",graphic:null!=h.config.editProfileUpsellImage?{type:"image",src:h.config.editProfileUpsellImage}:void 0,title:ef.intl.format(ef.t.TXDztH,{applicationName:h.application.name}),body:m?ef.intl.string(ef.t["63Kso0"]):ef.intl.string(ef.t.HwXoeC),onRequestClose:()=>c(ep.i.USER_DISMISS),actions:[m?{text:ef.intl.string(ef.t.VSLDly),onClick:()=>{a(!0),p().then(()=>{let e;return e=new nv.R({applicationId:h.application.id}),void((0,nT.Y5)(e),r({action:"WIDGET_ADDED",...e.getProfileEditAnalyticsOptions()}),(0,n_.XA)(nR.jM.WIDGET_ADDED))}).finally(()=>a(!1))},loading:s}:{text:ef.intl.string(ef.t["DSJi3+"]),onClick:()=>{h.authFlow.initiate({onConfirm:()=>{a(!0),p().finally(()=>a(!1))},analyticsLocations:d})},loading:s}]})}})}var nI=n(661439),nb=n(385113),nM=n(188951),nw=n(334074),nO=n(90165);function nU(e){let{targetElementRef:t,onClose:s}=e,[a,r]=l.useState(!1),o=(0,c.bG)([nN.default],()=>nN.default.getId()),{eligibleApplications:u,markAsDismissed:h}=function(){let e=(0,c.yK)([nb.A],()=>nb.A.getFeaturedApplicationIds());(0,nM.A)(e),l.useEffect(()=>{(0,nI.X)()},[]);let t=(0,c.bG)([nN.default],()=>nN.default.getId()),n=(0,nj.A)(t),i=l.useMemo(()=>n.filter(e=>e instanceof nv.R),[n]),s=(0,nC.A)(e),a=l.useMemo(()=>s.filter(nS.Vq),[s]),r=(0,c.cf)([nO.A],()=>{let t={};for(let n of e)t[n]=nO.A.getLastPlayedDateTime(n);return t}),o=l.useMemo(()=>{let e=Date.now();return a.filter(t=>{if(i.some(e=>e.applicationId===t.id))return!1;let n=r[t.id];return null!=n&&e-n<7776e6})},[a,i,r]),{eligibleToShow:u,markAsDismissed:h}=(0,nw.hj)({applications:o,dismissibleContent:d.M.APP_WIDGET_V2_PROFILE_UPSELL_COACHMARK,cooldownConfig:nw.SH});return{eligibleApplications:l.useMemo(()=>o.filter(e=>u.includes(e.id)),[o,u]),markAsDismissed:h}}();return 0===u.length?null:(0,i.jsx)(ng.A,{targetElementRef:t,position:"right",gradientColor:"blue",graphic:{type:"image",src:"https://cdn.discordapp.com/assets/content/ea1ea066f1312b56d74e16232ca7da602ee5fc0206f0ea9ecc130e5094334683.svg"},title:ef.intl.string(ef.t.HMWL9c),body:ef.intl.string(ef.t["9hfy3A"]),onRequestClose:()=>h(u.map(e=>e.id),ep.i.USER_DISMISS),actions:[{text:ef.intl.string(ef.t.VSLDly),loading:a,onClick:()=>{r(!0),(0,tQ.openUserProfileModal)({userId:o,tabSection:nR.RP.WIDGETS}).then(()=>{let e=u.map(e=>e.id);(0,C.openModalLazy)(async()=>{let{default:t}=await Promise.all([n.e("68299"),n.e("44136"),n.e("8978"),n.e("78377"),n.e("25594"),n.e("87591")]).then(n.bind(n,333114));return n=>(0,i.jsx)(t,{...n,trackUserProfileEditAction:()=>{},highlightedApplicationIds:e})},{stackingBehavior:"stack"}),h(u.map(e=>e.id),ep.i.TAKE_ACTION),s()}).finally(()=>r(!1))}}]})}var nD=n(461213),nP=n(818348),nk=n(466573);function nL(){let e=(0,c.bG)([nD.A],()=>nD.A.getStatus()),t=(0,t3.MU)(e)??"",n=e===nP.cl.INVISIBLE||e===nP.cl.OFFLINE;return(0,i.jsxs)("div",{className:nk.k,children:[(0,i.jsxs)(A.A,{tag:"div",children:[ef.intl.string(ef.t.AHoLf4),":"]}),t,t.length>0&&n&&(0,i.jsx)(eW.m,{text:ef.intl.string(ef.t.L99HQm),children:(0,i.jsx)(ns.E,{size:"xs",color:nn.A.colors.STATUS_WARNING,"aria-label":ef.intl.string(ef.t.L99HQm)})})]})}var nF=n(841595);let nG=(0,n(945810).mj)({name:"2025-12-social-layer-storefront-wishlist-user-account-popout",kind:"user",defaultConfig:{enabled:!1},variations:{0:{enabled:!1},1:{enabled:!0}}});var nV=n(501838),nB=n(760716),nH=n(915089),nQ=n(13808);function nW(e){let{markAsDismissed:t,heading:n,subheading:s,children:r,height:o,className:u,contentClassName:c}=e,d=(0,nH.GV)(),h=l.useRef(null),m=(0,eu.z)({from:{transform:"translate3d(-110%, 0, 0)",height:o},to:{transform:"translate3d(0, 0, 0)",height:o},config:{mass:1,stiffness:100,damping:15},onRest:()=>{null!=h.current&&h.current.focus()}});return(0,i.jsx)(R.animated.div,{className:a()(nQ.kL,u),style:m,children:(0,i.jsxs)("aside",{"aria-labelledby":d,className:nQ.Qs,children:[(0,i.jsxs)("div",{className:nQ.U1,children:[(0,i.jsx)(g.D,{innerRef:h,"aria-label":ef.intl.string(ef.t.WAI6xu),className:nQ.b,onClick:()=>{t(ep.i.USER_DISMISS)},children:(0,i.jsx)(en.P,{color:"currentColor"})}),(0,i.jsx)(ee.D,{id:d,variant:"heading-lg/semibold",children:n})]}),null!=s&&(0,i.jsx)(et.E,{variant:"text-md/normal",color:"text-subtle",children:s}),(0,i.jsx)(eN.Ip,{className:nQ.XG,fade:!0,children:(0,i.jsx)("div",{className:a()(nQ.gT,c),children:r})})]})})}var nz=n(973912),nq=n(871123),nZ=n(44724),nK=n(501573);function n$(){(0,nZ.default)({guildId:(0,nq.zf)()})}function nY(e){let{profileUserId:t,handleOpenUserProfileModal:n,markAsDismissed:l}=e,{analyticsLocations:s}=(0,O.Ay)([w.A.WISHLIST_ACCOUNT_POPOUT_UPSSELL]);return null==t?null:(0,i.jsxs)(nW,{heading:ef.intl.string(ef.t["vy/61K"]),subheading:ef.intl.string(ef.t.tEee9t),markAsDismissed:l,className:nK.Zj,contentClassName:nK.hQ,height:560,children:[(0,i.jsx)(nz.A,{userId:t,analyticsLocations:s,handleOpenUserProfileModal:n,numWishlistItemsToRecommend:9,className:nK.KN}),(0,i.jsx)("div",{className:nK.UD,children:(0,i.jsx)(eX.$,{variant:"primary",fullWidth:!0,text:ef.intl.string(ef.t.rg9FQp),onClick:n$})})]})}function nX(e){let{displayProfile:t,handleOpenUserProfileModal:n,height:s}=e,a=function(e){let{location:t}=e,n=function(e){let{location:t}=e;return nG.useConfig({location:t}).enabled}({location:t}),i=(0,c.bG)([no.default],()=>no.default.getCurrentUser()),s=(0,c.bG)([nF.A],()=>null!=i?nF.A.getFirstWishlistId(i.id):null),a=(0,nB.i)(e=>e.recommendationApplicationIds),o=(0,nV.rY)(),u=(0,nV.qx)();return l.useMemo(()=>null!=a||null==s&&n?(0,r.uniq)([...a??[],...u,...o]).sort():[],[n,s,u,o,a])}({location:"AccountProfilePopoutUpsell"}),o=l.useMemo(()=>{let e=[];return a.length>0&&e.push(d.M.WISHLIST_USER_PROFILE_ACCOUNT_POPOUT_UPSELL),e},[a]);return(0,i.jsx)(nE.Ay,{contentTypes:o,bypassAutoDismiss:!0,children:e=>{let{visibleContent:l,markAsDismissed:a}=e;return null==s?null:l===d.M.WISHLIST_USER_PROFILE_ACCOUNT_POPOUT_UPSELL?(0,i.jsx)(nY,{profileUserId:t?.userId,handleOpenUserProfileModal:n,markAsDismissed:a}):null}})}var nJ=n(146901),n0=n(827827);let n1=[{duration:15*e0.A.Millis.MINUTE,label:()=>ef.intl.string(ef.t["8ot6gv"])},{duration:e0.A.Millis.HOUR,label:()=>ef.intl.string(ef.t.UMWBZr)},{duration:8*e0.A.Millis.HOUR,label:()=>ef.intl.string(ef.t.EpAXPC)},{duration:e0.A.Millis.DAY,label:()=>ef.intl.string(ef.t["755t4q"])},{duration:3*e0.A.Millis.DAY,label:()=>ef.intl.string(ef.t["f3/1ch"])},{duration:void 0,label:()=>ef.intl.string(ef.t["46dqJY"])}],n2="forever";function n3(e){let{status:t,currentStatus:n,description:l}=e,s=t!==tf.clD.ONLINE,a=(0,i.jsx)(i.Fragment,{children:n1.map(e=>{let{duration:l,label:s}=e;return(0,i.jsx)(ni.Dr,{id:`${t}-${l}`,label:s(),action:()=>(0,n0.A)({nextStatus:t,prevStatus:n,durationMillis:l}),dontCloseOnAction:!0},l??n2)})});return(0,i.jsx)(ni.Dr,{id:t,keepItemStyles:!0,hasSubmenu:s,label:(0,t3.MU)(t),subtext:l,iconLeft:()=>(0,i.jsx)(eR.nW,{status:t,size:10}),leadingAccessory:{type:"status",status:t},action:()=>{(0,n0.A)({nextStatus:t,prevStatus:n})},dontCloseOnAction:!0,children:s?a:void 0})}function n6(e){if(null==e||"0"===e)return;let{kind:t,dateString:n,timeString:i}=(0,nJ._)(e);return"today"===t?ef.intl.formatToPlainString(ef.t.ZxxHIO,{timeString:i}):ef.intl.formatToPlainString(ef.t["9OFjSe"],{dateString:n,timeString:i})}var n5=n(996988),n4=n(656884);function n8(e){let t,n,s,r,o,u,d,h,f,{currentUser:g,onClose:x,setPopoutRef:E,highlightBadge:v,openedAt:T,className:j}=e,_=__OVERLAY__,N=(0,tH.Ay)(g.id,void 0),{analyticsLocations:S}=(0,O.Ay)(w.A.USER_PROFILE_ACCOUNT_POPOUT),R=(0,tB.pb)({layout:"ACCOUNT_POPOUT",userId:g.id,guildId:void 0}),{ref:y,height:I}=(0,ew.Ay)(),{isHoveringOrFocusing:b,isHovering:M}=(0,e7.A)(y);l.useEffect(()=>{E?.(y.current)},[y,E]),l.useEffect(()=>(eE.A.setState({isOpen:!0}),()=>eE.A.setState({isOpen:!1,shouldRenderTenureLevelUp:!1})),[]);let U=(0,c.bG)([t9.A],()=>t9.A.getStatus(g.id)),D=n6(t7.CY.useSetting()),P=(0,c.bG)([ne.A],()=>ne.A.hidePersonalInformation),k=(0,tR.kB)(),L=t7.Q_.useSetting(),F=(t=t7.CY.useSetting(),n=(0,tR.kB)(),s=t7.Jr.useSetting(),r=e=>{let i=n6(t);if(U===e&&null!=i)return i;switch(e){case tf.clD.DND:return n?ef.intl.string(ef.t.day5A6):ef.intl.string(ef.t["tq/fMK"]);case tf.clD.INVISIBLE:return ef.intl.string(ef.t.zPc6Mc);default:return}},o=(0,i.jsx)(i.Fragment,{children:n1.map(e=>{let{duration:t,label:n}=e;return(0,i.jsx)(ni.Dr,{id:`${U}-${t}`,label:n(),action:()=>{(0,tR.ES)(!0,t)},dontCloseOnAction:!0},t??n2)})}),u=n3({status:tf.clD.ONLINE,currentStatus:U}),d=n3({status:tf.clD.IDLE,currentStatus:U,description:r(tf.clD.IDLE)}),h=n3({status:tf.clD.DND,currentStatus:U,description:r(tf.clD.DND)}),f=n3({status:tf.clD.INVISIBLE,currentStatus:U,description:r(tf.clD.INVISIBLE)}),(0,i.jsxs)(i.Fragment,{children:[u,(0,i.jsx)(ni.bX,{},"menu-separator-statuses"),d,h,f,n?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ni.bX,{},"menu-separator-statuses"),(0,i.jsx)(ni.Dr,{id:"quiet-mode","aria-label":"focus mode",keepItemStyles:!0,hasSubmenu:!0,label:ef.intl.string(ef.t.gJRnwK),iconLeft:ey.a,leadingAccessory:{type:"icon",icon:ey.a},badge:{text:ef.intl.string(ef.t.ApAu9f)},subtext:null!=s&&"0"!==s?ef.intl.format(ef.t.BWD8fs,{endTime:new Date(Number(s)).toLocaleString(ef.intl.currentLocale,{month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit"})}):ef.intl.string(ef.t["Br1q+x"]),action:()=>{(0,tR.ES)(!n)},dontCloseOnAction:!0,children:o},"quiet-mode")]}):null]})),G=function(e){let t=(0,c.bG)([no.default],()=>no.default.getCurrentUser()),n=(0,c.bG)([ne.A],()=>ne.A.hidePersonalInformation),l=(0,c.bG)([na.A],()=>(0,ty.M)(na.A.theme)),{multiAccountUsers:s}=(0,nh.K)(),a=s.map(s=>{let a=new nr.A(s),r=a.id===t?.id,o=s.tokenStatus===nd.U.INVALID,u=n?null:`#${a.discriminator}`;return(0,i.jsx)(ni.Dr,{id:a.id,focusedClassName:nf.in,void_label:e=>{let{isFocused:t}=e;return(0,i.jsxs)("div",{className:nf.ci,children:[(0,i.jsx)(m.eu,{src:a.getAvatarURL(void 0,40),size:p._3.SIZE_24,"aria-label":s.username}),(0,i.jsxs)("div",{className:nf.DD,children:[(0,i.jsx)(et.E,{className:nf.gE,variant:"text-sm/normal",children:t3.Ay.getUserTag(a,{mode:"username",identifiable:n?"never":"always"})}),!a.hasUniqueUsername()&&(0,i.jsx)(et.E,{className:nf.df,variant:"text-sm/normal",children:u})]}),r&&(0,i.jsx)(nl.y,{size:"sm",color:t?nn.A.unsafe_rawColors.WHITE.css:nn.A.unsafe_rawColors.BRAND_500.css,secondaryColor:t&&l||t&&!l?nn.A.unsafe_rawColors.BRAND_500.css:nn.A.unsafe_rawColors.WHITE.css,className:nf.s0}),o&&(0,i.jsx)(ns.E,{color:nn.A.unsafe_rawColors.RED_400.css,secondaryColor:t&&l||t&&!l?nn.A.unsafe_rawColors.BRAND_500.css:nn.A.unsafe_rawColors.WHITE.css,size:"xs",className:nf.s0})]})},action:()=>{if(e?.(),o)(0,nm.A)();else{var n;(n=a.id)!==t?.id&&(nu.default.track(tf.HAw.MULTI_ACCOUNT_SWITCH_ATTEMPT,{location:{section:tf.JJy.USER_PROFILE}}),nc.Mx(n,void 0,np.WX.MULTI_ACCOUNT_MENU))}}},a.id)});return a.push((0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ni.bX,{}),(0,i.jsx)(ni.Dr,{id:"manage-accounts",label:ef.intl.string(ef.t.WbFpq4),action:()=>{e?.(),(0,nm.A)()}})]})),a}(x),V=(0,tV.A)({analyticsLocations:S}),B=(0,tM.TW)(g),H=l.useRef(null),Q=l.useRef(null),W=(0,tj.A)(N?.profileFrame?.skuId,"UserProfileAccountPopout"),{profileFrameStyle:z,profileFrameClassName:q}=(0,tN.A)(N?.profileFrame?.skuId);(0,tT.A)({skuId:N?.profileFrame?.skuId,openedAt:T,context:R,analyticsLocations:S});let Z=l.useRef((0,eE.A)(e=>e.shouldRenderTenureLevelUp)),K=l.useMemo(()=>(0,tS.A)(),[]),[$,Y]=l.useState(()=>eE.A.getState().shouldRenderTenureLevelUp);l.useEffect(()=>{let e=setTimeout(()=>{Y(!1)},500);return()=>clearTimeout(e)},[]);let X=e=>{x?.(),(0,tQ.openUserProfileModal)({customStatusPrompt:K,sourceAnalyticsLocations:S,...R,...e})},J=N?.widgets!=null&&N.widgets.length>0,ee=l.useCallback(()=>{x()},[x]),en=l.useCallback(()=>{V(),ee()},[V,ee]),ei=(0,eU.QR)({location:"UserProfileAccountPopout"}),{enabled:el}=eO.A.useConfig({location:"UserProfileAccountPopout"}),es=(0,eU.zd)({location:"UserProfileAccountPopout"}),ea=l.useId();return(0,i.jsx)(O.f5,{value:S,children:(0,i.jsx)(tB.of,{value:R,openedAt:T,fetchStartedAt:N?.fetchStartedAt,fetchEndedAt:N?.fetchEndedAt,isLoaded:N?.isLoaded,children:(0,i.jsxs)(e_.l,{ref:y,"aria-labelledby":ea,className:a()(eF.jC,j),"data-layer":"base",children:[(0,i.jsx)(A.A,{children:(0,i.jsx)(eT.H,{id:ea,children:ef.intl.string(ef.t["5fWB8U"])})}),(0,i.jsxs)(eT.F,{children:[(0,i.jsx)(nX,{displayProfile:N,handleOpenUserProfileModal:X,height:I}),(0,i.jsxs)(tX.A,{className:a()(eF.BK,q),style:z,user:g,displayProfile:N,themeType:n5.d.POPOUT,children:[(0,i.jsxs)("div",{className:n4.wx,children:[(0,i.jsx)(tq.A,{user:g,displayProfile:N,themeType:n5.d.POPOUT}),(0,i.jsx)(tW.A,{user:g,displayProfile:N,themeType:n5.d.POPOUT,onOpenProfile:_?void 0:X}),(0,i.jsx)(t4.A,{ref:H,user:g,themeType:n5.d.POPOUT,onCloseProfile:x,prompt:K})]}),(0,i.jsxs)(eN.Ip,{className:eF.rf,style:{pointerEvents:$?"none":void 0},children:[(0,i.jsx)(tK.A,{userId:g.id}),(0,i.jsx)(tJ.Ay,{className:eF.eF,user:g,displayName:nt.Ay.getName(void 0,null,g),onClickName:_?void 0:X,displayNameTrailing:(0,i.jsx)(t5,{user:g,isVisible:b}),pronouns:N?.pronouns,trailing:(0,i.jsx)(tz.A,{displayProfile:N,themeType:n5.d.POPOUT,onClose:x,shouldOpenBadgeTooltip:null!=v?e=>e===v:void 0,shouldGlowTenureBadge:Z.current})}),(0,i.jsx)(tZ.A,{isPremiumUser:B,onInteraction:x}),(0,i.jsx)(t8.A,{user:g,bio:N?.bio,hidePersonalInformation:P,onClose:x}),J&&(0,i.jsx)(tY.A,{user:g,widgets:N?.widgets,onOpenUserProfileModal:X}),(0,i.jsx)(t$.A,{user:g,currentUser:g,onOpenUserProfileModal:X,onClose:x}),(0,i.jsxs)("div",{className:eF.T_,children:[(0,i.jsx)(tX.A.Overlay,{className:eF.g0,children:(0,i.jsxs)(eB,{children:[(0,i.jsx)(eV,{action:"EDIT_PROFILE",label:ef.intl.string(ef.t.s5vZlQ),icon:eS.R,onClick:en,ref:Q}),(0,i.jsx)(eV,{action:"PRESS_SET_STATUS",label:(0,i.jsx)(nL,{}),sublabel:null!=D&&D,icon:()=>(0,i.jsx)(eR.nW,{status:U,size:12}),trailing:(k||U===tf.clD.DND)&&(0,i.jsx)(ey.a,{size:"xxs"}),renderSubmenu:ev.Fr?void 0:e=>{let{closePopout:t}=e;return(0,i.jsx)(eG,{navId:"set-status-submenu",className:eF.hQ,"aria-label":ef.intl.string(ef.t.E13trI),onClose:t,children:F})},onClick:ev.Fr?()=>{x(),(0,C.openModalLazy)(()=>new Promise(e=>e(e=>{let{onClose:t,...n}=e;return(0,i.jsx)(ej.d,{onClose:t,...n,size:"sm","aria-label":ef.intl.string(ef.t["3Uj+2p"]),children:(0,i.jsx)(eI.W,{"data-menu-migrated":!0,navId:"set-status-submenu-mobile-web",variant:"fixed","aria-label":ef.intl.string(ef.t.E13trI),hideScroller:!0,onClose:t,onSelect:void 0,children:F})})})))}:void 0}),(0,i.jsx)(tE,{onClose:x,popoutContainerRef:y})]})}),(0,i.jsx)(tX.A.Overlay,{className:eF.g0,children:(0,i.jsxs)(eB,{children:[(0,i.jsx)(eV,{action:"PRESS_SWITCH_ACCOUNTS",icon:eb.r,label:ef.intl.string(ef.t.oMNyYN),onClick:()=>{x(),(0,nm.A)()},renderSubmenu:e=>{let{closePopout:t}=e;return(0,i.jsx)(eG,{navId:"switch-accounts-submenu","aria-label":ef.intl.string(ef.t.wFhVqL),onClose:t,children:G})}}),!__OVERLAY__&&t2.p5&&L&&(0,i.jsx)(eV,{action:"COPY_USER_ID",icon:eM.L,label:ef.intl.string(ef.t["/AXYnE"]),onClick:()=>{(0,t2.C)(g.id),x()}})]})})]})]}),N?.profileEffect!=null&&!Z.current&&(0,i.jsx)(tv.A,{skuId:N.profileEffect.skuId,isHovering:M}),null!=W&&(0,i.jsx)(t_.A,{frame:W})]}),el?(0,i.jsx)(nU,{targetElementRef:Q,onClose:x}):ei&&es?(0,i.jsx)(ny,{targetElementRef:Q,onClose:x}):null,(0,i.jsx)(tF,{})]})]})})})}var n7=n(371912),n9=n(655116),ie=n(21973),it=n(454719),ii=n(342296),il=n(852712),is=n(167579),ia=n(173660),ir=n(728555),io=n(763827),iu=n(499156),ic=n(731854);let id=2.5*e0.A.Millis.SECOND,ih=+e0.A.Millis.HOUR;var im=n(459838),ip=n(485296);let ig=3*e0.A.Millis.SECOND,iA=+e0.A.Millis.DAY;var ix=n(616356),iC=n(734057),iE=n(629016),iv=n(186111),iT=n(967198),ij=n(486020),i_=n(625494),iN=n(536194),iS=n(19575),iR=n(994314),iy=n(485599),iI=n(537668),ib=n(626584),iM=n(531685),iw=n(259065),iO=n(864386);let iU=new ib.A("DisplayNameStylesCoachmark");function iD(e){let{markAsDismissed:t,targetElementRef:n,children:s}=e,{analyticsLocations:a}=(0,O.Ay)(),r=(0,l.useRef)(null),o=(0,c.bG)([iM.A],()=>iM.A.isFocused()),u=(0,l.useCallback)(()=>{t(ep.i.TAKE_ACTION),(0,ea.openUserSettings)(es.X.PROFILE_PANEL,{analyticsLocations:a},()=>{(0,iw.L)({analyticsLocations:a})})},[t,a]),d=(0,l.useCallback)(()=>{t(ep.i.USER_DISMISS)},[t]);return(0,l.useEffect)(()=>{o&&r.current?.paused?r.current?.play().catch(iU.error):o||r.current?.pause()},[o]),(0,i.jsxs)(i.Fragment,{children:[s,(0,i.jsx)(ng.A,{targetElementRef:n,shouldShow:!0,onRequestClose:d,align:"right",position:"top",caretConfig:{align:"center"},gradientColor:"nitro-pink",graphic:{type:"video",ref:r,src:"https://cdn.discordapp.com/assets/content/5d90dc1e412ad3aa0b39088fba382025e32b718d7bf5d797512be9701b5f53b4.webm",aspectRatio:"21/9",loop:!0},size:"lg",title:ef.intl.string(iO.default["1AE464"]),body:[ef.intl.string(iO.default.cNc1g9),ef.intl.string(ef.t["4JNXHG"])],actions:[{text:ef.intl.string(ef.t.uw9zI7),variant:"primary",onClick:u}]})]})}var iP=n(131607),ik=n(45780),iL=n(696451),iF=n(71393),iG=n(685073),iV=n(228366);let iB={lastSeenInfos:{}},iH=iB;class iQ extends c.Ay.PersistedStore{static displayName="GuildTagChangedCoachmarkStore";static persistKey="GuildTagChangedCoachmarkStore";initialize(e){iH=e??iB}getState(){return iH}getGuildLastSeenInfo(e){return iH.lastSeenInfos[e]??null}}let iW=new iQ(iV.h,{GUILD_TAG_CHANGED_COACHMARK_SEEN:function(e){let{guildId:t,lastSeenInfo:n}=e;iH.lastSeenInfos[t]=n},LOGOUT:function(){iH=iB}});var iz=n(116833),iq=n(514661);let iZ=new ib.A("GuildTagAvailableCoachmark");function iK(e){let t=(0,c.bG)([iF.A],()=>iF.A.getGuild(e.guildId));function n(n){t?.profile?.tag!=null&&iV.h.dispatch({type:"GUILD_TAG_CHANGED_COACHMARK_SEEN",guildId:t.id,lastSeenInfo:{tag:t.profile.tag}}),e.onDismiss?.(n)}let{isAdopting:l,onAdoptTag:s,onEditProfile:a}=(0,iq.A)(t?.id??null,()=>n(ep.i.TAKE_ACTION));if(null==t||!(0,iG.q0)(t))return iZ.error("GuildTagChangedCoachmark rendered without guildId for a guild with tags."),e.children;let r=[{text:ef.intl.string(ef.t.jwEaiX),loading:l,onClick:s,variant:"primary"},{text:ef.intl.string(ef.t.s5vZlQ),onClick:a,variant:"secondary"}];return(0,i.jsxs)(i.Fragment,{children:[e.children,(0,i.jsx)(ng.A,{targetElementRef:e.targetElementRef,shouldShow:!0,position:"top",graphic:{type:"dynamic",component:iz.DynamicGraphicComponent.GUILD_TAG_COACHMARK_ASSET,props:{guildId:t.id,guildProfile:t.profile}},title:ef.intl.formatToPlainString(ef.t["m/Tc3n"],{guildName:t.name}),body:ef.intl.string(ef.t.DrAXIr),actions:r,size:"md",onRequestClose:()=>n(ep.i.USER_DISMISS)})]})}function i$(e){let t=(0,c.bG)([iF.A],()=>iF.A.getGuild(e.guildId));function n(t){e.onDismiss?.(t)}let{isAdopting:l,onAdoptTag:s,onEditProfile:a}=(0,iq.A)(t?.id??null,()=>n(ep.i.TAKE_ACTION));if(null==t||!(0,iG.q0)(t))return iZ.error("GuildTagAvailableCoachmark rendered without guildId for a guild with tags."),e.children;let r=[{text:ef.intl.string(ef.t.jwEaiX),loading:l,onClick:s,variant:"primary"},{text:ef.intl.string(ef.t.s5vZlQ),onClick:a,variant:"secondary"}];return(0,i.jsxs)(i.Fragment,{children:[e.children,(0,i.jsx)(ng.A,{targetElementRef:e.targetElementRef,shouldShow:!0,position:"top",graphic:{type:"dynamic",component:iz.DynamicGraphicComponent.GUILD_TAG_COACHMARK_ASSET,props:{guildId:t.id,guildProfile:t.profile}},title:ef.intl.formatToPlainString(ef.t.VFqnyU,{guildName:t.name}),body:ef.intl.string(ef.t.DrAXIr),actions:r,size:"md",onRequestClose:()=>n(ep.i.USER_DISMISS)})]})}var iY=n(843010),iX=n(764231),iJ=n(425713);function i0(e){let{groupName:t,targetElementRef:n}=e,l=tU(),s=(0,c.bG)([ec.A],()=>ec.A.useReducedMotion),a=(0,eE.A)(e=>e.isOpen),r=(0,iY.G)();return s||null==l||a||r?null:(0,i.jsx)(nE.zJ,{contentType:d.M.NITRO_TENURE_BADGE_LEVEL_UP,timeRecurringConfig:{cooldownDurationMs:12096e5},groupName:t,children:e=>{let{visibleContent:t,markAsDismissed:s}=e;return(0,i.jsx)(i1,{recentlyLeveledTenureBadge:l,markAsDismissed:s,targetElementRef:n,shouldShow:t===d.M.NITRO_TENURE_BADGE_LEVEL_UP})}})}function i1(e){let{recentlyLeveledTenureBadge:t,markAsDismissed:n,targetElementRef:s,shouldShow:a}=e,r=tO.sp.indexOf(t),o=(0,iJ.I)(tO.sp[r>0?r-1:r]).ambient,u=(0,l.useCallback)(()=>{n(ep.i.TAKE_ACTION),eE.A.setState({shouldRenderTenureLevelUp:!0}),i_._.dispatch(tf.jej.SHOW_ACCOUNT_PROFILE_POPOUT,{})},[n]),c=(0,l.useCallback)(()=>{n(ep.i.USER_DISMISS)},[n]),d=tO.VD[t],h=ef.intl.formatToPlainString(ef.t.ewkaVR,{timeMilestone:(0,iX.T)(d.id,d.tenureReqNumMonths)?.toLocaleLowerCase()}),m=[{text:ef.intl.string(ef.t.RzWDqY),variant:"primary",onClick:u}];return(0,i.jsx)(ng.A,{targetElementRef:s,onRequestClose:c,shouldShow:a,caretConfig:{align:"center"},graphic:null!=o?{type:"image",src:o,aspectRatio:"6/4"}:void 0,size:"lg",title:ef.intl.string(ef.t.VoDxsV),body:h,actions:m})}function i2(e){let{isQuestBarEmpty:t,hasLoadedQuestBar:n}=(0,n7.c9)(),l=null!=e.targetElementRef.current&&t&&n,[s,a]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{shouldShow:n=!0}=t,i=(0,ik.G$)(d.V.ADOPT_CLAN_IDENTITY_NOTICE,e??tf.dJq),l=(0,c.bG)([iF.A,no.default,iL.Ay],()=>{if(null===e)return!1;let t=iF.A.getGuild(e);if(void 0===t||!(0,iG.Rg)(t)||null==t.profile||null===t.profile.tag)return!1;let n=no.default.getCurrentUser();if(void 0===n||n.primaryGuild?.identityGuildId===t.id&&n.primaryGuild?.tag===t.profile.tag)return!1;let i=iL.Ay.getMember(e,n.id);return null!=i&&!i.isPending},[e]);return(0,iP.ww)(l&&n&&!i?[d.M.GUILD_TAG_AVAILABLE_COACHMARK_V2]:[],e??tf.eGj)}(e.guildId,{shouldShow:l}),[r,o]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{shouldShow:n=!0}=t,i=e?.primaryGuild,l=i?.identityGuildId??null,s=(0,c.bG)([iW],()=>null===l?null:iW.getGuildLastSeenInfo(l)),a=(0,c.bG)([iF.A],()=>iF.A.getGuild(l)?.profile?.tag),r=null!=a&&i?.identityGuildId===l&&i?.tag===null,o=null!=l&&s?.tag===a,u=null!==l&&r&&!o;return(0,iP.Wl)(u&&n?d.M.GUILD_TAG_UPDATED_COACHMARK:null,{cooldownDurationMs:864e5})}(e.currentUser,{shouldShow:l});return l?s===d.M.GUILD_TAG_AVAILABLE_COACHMARK_V2?(0,i.jsx)(i$,{guildId:e.guildId,onDismiss:a,targetElementRef:e.targetElementRef,children:e.children}):r===d.M.GUILD_TAG_UPDATED_COACHMARK?(0,i.jsx)(iK,{guildId:e.currentUser.primaryGuild?.identityGuildId??null,onDismiss:o,targetElementRef:e.targetElementRef,children:e.children}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(i0,{groupName:ep.m.ACCOUNT_NAME_ZONE,targetElementRef:e.targetElementRef}),(0,i.jsx)(nE.Ay,{contentTypes:e.additionalDCs??[],groupName:ep.m.ACCOUNT_NAME_ZONE,children:t=>{let{visibleContent:n,markAsDismissed:l}=t;switch(n){case d.M.DISPLAY_NAME_STYLES_COACHMARK:return(0,i.jsx)(iD,{markAsDismissed:l,targetElementRef:e.targetElementRef,children:e.children});case d.M.CLIPS_PRIMARY_ENTRY_POINT_COACHMARK:return(0,i.jsx)(iI.A,{markAsDismissed:l,position:"top",targetElementRef:e.targetElementRef,onCheckItOut:eQ.p,children:e.children});default:return e.children}}})]}):e.children}var i3=n(615675),i6=n(900797),i5=n(847374),i4=n(348858),i8=n(617354),i7=n(206018),i9=n(42473),le=n(490704),lt=n(967194);function ln(e){let{selfDeaf:t,serverDeaf:n,awaitingRemote:s,onClick:r,iconForeground:o,nameplate:u,shouldShowOutputDeviceChangedTooltip:c,dismissTooltips:d}=e,h=t||n,{Component:m,play:p,events:{onMouseEnter:g,onMouseLeave:A}}=(0,i4.I)(h?"undeafen":"deafen"),x=n?i3.T:m,{name:C}=(0,eC.x5)(ic.oh.AUDIO_OUTPUT),E=(0,i8.A)(t,n,s),{analyticsLocations:v}=(0,O.Ay)(w.A.AUDIO_OUTPUT_BUTTON),T=l.useRef(null);return l.useEffect(()=>()=>p(),[h,p]),(0,i.jsx)(O.f5,{value:v,children:(0,i.jsx)(f.Y,{targetElementRef:T,renderPopout:e=>{let{closePopout:t}=e;return d(),(0,i.jsx)(O.f5,{value:v,children:(0,i.jsx)(i7.A,{onInteraction:(0,G.s)("AudioDeviceMenu",w.A.ACCOUNT),onClose:t,renderOutputDevices:!0,renderOutputVolume:!0,renderSettingsButton:!0})})},position:"top",align:"left",animation:f.Y.Animation.FADE,spacing:4,children:(e,t)=>{let{onClick:l}=e,{isShown:d}=t,m=d?i6.t:i5.a;return(0,i.jsxs)("div",{ref:T,className:a()(le.Lh,{[le.v8]:h,[le.q6]:d}),children:[(0,i.jsx)(i9.A,{"aria-checked":h,"aria-label":ef.intl.string(ef.t.wjcRFX),className:le.eT,disabled:s,icon:(0,i.jsx)(x,{size:"custom",width:20,height:20,color:h?nn.A.colors.ICON_VOICE_MUTED:"currentColor",className:o}),iconForeground:h?lt.o:void 0,innerClassName:a()({[lt.T]:n}),onClick:r,onContextMenu:l,onMouseEnter:g,onMouseLeave:A,plated:null!=u,redGlow:h,role:"switch",tooltipText:E}),(0,i.jsx)(i9.A,{className:a()(le.UT,{[le.q6]:d}),disabled:s,icon:(0,i.jsx)(m,{className:le.$$,size:"custom",width:12,height:12,color:h?nn.A.colors.ICON_VOICE_MUTED:"currentColor"}),onClick:l,onContextMenu:l,plated:null!=u,redGlow:h,tooltipType:c?"green_void_do_not_use":void 0,tooltipForceOpen:c,tooltipPositionKey:c?ef.intl.formatToPlainString(ef.t["f+DDY/"],{outputDeviceName:C}):void 0,tooltipShouldShow:!d,tooltipText:c?ef.intl.format(ef.t["f+DDY/"],{outputDeviceName:C}):ef.intl.string(ef.t.aA4Vce),"aria-label":c?ef.intl.formatToPlainString(ef.t["f+DDY/"],{outputDeviceName:C}):ef.intl.string(ef.t.aA4Vce)})]})}})})}var li=n(666654),ll=n(523875),ls=n(993719);let la={};class lr extends c.Ay.Store{static displayName="CallFeedbackTutorialStore";getIsTutorialActive(e){return la[e]??!1}}let lo=new lr(iV.h,{CALL_FEEDBACK_TUTORIAL_SHOW:function(e){let{tutorialKey:t}=e;la[t]=!0},CALL_FEEDBACK_TUTORIAL_DISMISS:function(e){let{tutorialKey:t}=e;la[t]=!1}});var lu=n(362823),lc=n(980923),ld=n(224585),lh=n(949341),lm=n(973324);function lp(e){let t,{selfMute:n,serverMute:s,suppress:r,awaitingRemote:o,iconForeground:u,onMouseEnter:d,onMouseLeave:h,onClick:m,nameplate:p,shouldShowSpeakingWhileMutedTooltip:g,shouldShowSpeakingWhilePTTTooltip:A,shouldShowInputDeviceChangedTooltip:x,shouldShowPTTJoinTooltip:C,dismissTooltips:E,speaking:v}=e,{showPTTIconIndicator:T}=iu.A.useConfig({location:"MicrophoneButton"}),j=(0,c.bG)([ir.Ay],()=>ir.Ay.getMode()===ic.TB.PUSH_TO_TALK),_=(0,c.bG)([ir.Ay],()=>ir.Ay.getSettings().modeOptions.shortcut),N=(0,c.bG)([lo],()=>lo.getIsTutorialActive(lu.v.MUTE_TUTORIAL)),S=(0,c.bG)([io.A],()=>null!=io.A.getChannelId()),{name:R}=(0,eC.x5)(ic.oh.AUDIO_INPUT),{enabledInputProfiles:y}=(0,il.d)({location:"MicrophoneButton"}),I=l.useRef(null),b=n||r||s,M=(0,ll.L)(b?"unmute":"mute"),{analyticsLocations:U}=(0,O.Ay)(w.A.AUDIO_INPUT_BUTTON),{Component:D,events:P,play:k}=M,L=s||r?li.O:D;l.useEffect(()=>()=>k(),[b,k]);let F=(0,lc.A)(n,s,r,o);t=g?{tooltipType:"green_void_do_not_use",tooltipText:ef.intl.string(ef.t["29gnR4"]),tooltipForceOpen:!0}:C||A?{tooltipType:"green_void_do_not_use",tooltipText:ef.intl.format(ef.t.c1qUOQ,{keybind:e2.dI(_).toLocaleUpperCase()}),tooltipForceOpen:!0}:{tooltipText:F};let V=T&&j&&S,B=b?nn.A.colors.ICON_VOICE_MUTED:"currentColor",H=l.useCallback(()=>{m(),N&&ls.N(lu.v.MUTE_TUTORIAL)},[m,N]);return(0,i.jsxs)(O.f5,{value:U,children:[(0,i.jsx)(f.Y,{targetElementRef:I,renderPopout:e=>{let{closePopout:t}=e;return E(),(0,i.jsx)(O.f5,{value:U,children:(0,i.jsx)(i7.A,{onInteraction:(0,G.s)("AudioDeviceMenu",w.A.ACCOUNT),onClose:t,maybeRenderPTTCheckbox:!0,renderInputProfiles:y.length>0,renderInputDevices:!0,maybeRenderInputMeter:!0,renderInputVolume:!0,renderSettingsButton:!0})})},position:"top",align:"left",animation:f.Y.Animation.FADE,spacing:4,children:(e,n)=>{let{onClick:l}=e,{isShown:s}=n,r=s?i6.t:i5.a;return(0,i.jsxs)("div",{ref:I,className:a()(le.Lh,{[le.v8]:b,[le.q6]:s}),children:[(0,i.jsx)(i9.A,{"aria-checked":b,"aria-label":ef.intl.string(ef.t.w4m945),className:le.eT,disabled:o,icon:(0,i.jsx)(L,{size:"custom",width:20,height:20,color:B,className:u}),onClick:H,onContextMenu:l,onMouseEnter:()=>{d(),P.onMouseEnter()},onMouseLeave:()=>{h(),P.onMouseLeave()},plated:null!=p,redGlow:b,role:"switch",...t,children:V?(0,i.jsx)("div",{className:a()(lh.U,{[lh.z]:v})}):null}),(0,i.jsx)(i9.A,{"aria-label":x?ef.intl.formatToPlainString(ef.t["18wnuD"],{inputDeviceName:R}):ef.intl.string(ef.t.fRzCbB),className:a()(le.UT,{[le.q6]:s}),disabled:o,icon:(0,i.jsx)(r,{className:le.$$,size:"custom",width:12,height:12,color:B}),onClick:l,onContextMenu:l,onMouseEnter:d,onMouseLeave:h,plated:null!=p,redGlow:b,tooltipType:x?"green_void_do_not_use":void 0,tooltipForceOpen:x,tooltipPositionKey:x?ef.intl.formatToPlainString(ef.t["18wnuD"],{inputDeviceName:R}):void 0,tooltipShouldShow:!s,tooltipText:x?ef.intl.format(ef.t["18wnuD"],{inputDeviceName:R}):ef.intl.string(ef.t.fRzCbB)})]})}}),(0,i.jsx)(ng.A,{targetElementRef:I,shouldShow:N,graphic:{type:"image",src:lm.A},onRequestClose:()=>{ls.N(lu.v.MUTE_TUTORIAL)},position:"top",title:ef.intl.string(ld.default.VG4zAf),body:ef.intl.string(ld.default["8VIRzR"])})]})}var lf=n(935399),lg=n(505312),lA=n(848847),lx=n(88001),lC=n(466919),lE=n(438705);let lv=e=>{let{targetElementRef:t,shouldShow:n,onDismiss:s}=e,a=l.useCallback(()=>{s(),(0,ea.openUserSettings)(es.X.SUBSCRIPTIONS_PANEL)},[s]);return(0,i.jsx)(ng.A,{targetElementRef:t,position:"top",caretConfig:{align:"start"},size:"md",graphic:{type:"image",src:lE},shouldShow:n,title:ef.intl.format(lC.default.bx8sR9,{premiumGroupProductName:(0,lx.DP)()}),body:ef.intl.format(lC.default.Pw4OFZ,{premiumGroupProductName:(0,lx.DP)()}),onRequestClose:s,actions:[{text:ef.intl.string(lC.default.DD26QR),onClick:a}]})};var lT=n(873298),lj=n(840387);function l_(e){let{markAsDismissed:t,targetElementRef:n}=e,s=(0,lj.Z)(),a=t7.KP.useSetting(),r=s&&a!==lT.KP.FRIENDS_AND_ALL_GUILDS,o=(0,l.useCallback)(()=>{t(ep.i.TAKE_ACTION),(0,ea.openUserSettings)(es.X.PROFILE_PRIVACY_CATEGORY)},[t]),u=(0,l.useCallback)(()=>{t(ep.i.USER_DISMISS)},[t]),c=r?a===lT.KP.FRIENDS_ONLY?ef.intl.string(ef.t["/hogEy"]):ef.intl.string(ef.t["6hEfm1"]):ef.intl.string(ef.t.bnNxW1);return(0,i.jsx)(ng.A,{targetElementRef:n,shouldShow:!0,onRequestClose:u,align:"center",position:"top",caretConfig:{align:"end"},graphic:{type:"image",src:"https://cdn.discordapp.com/assets/content/0710b4aac8339f9213d3c43a8976071c26abe2b3236ccd8817180ce465f33673.svg"},title:ef.intl.string(ef.t.Ve4nS1),body:c,size:"md",gradientColor:"purple",actions:[{text:ef.intl.string(ef.t.eOoTMX),variant:"primary",onClick:o}]})}function lN(e){let t,n,{webBuildOverride:s,onClick:a,onContextMenu:r,dismissibleContents:o,iconForeground:u,nameplate:c}=e,h=l.useRef(null),[m,p]=l.useState(!1);(0,lf.Ay)(()=>{let e=()=>p(!0);return i_._.subscribe(tf.jej.PREMIUM_GROUP_PURCHASE_FLOW_COMPLETED,e),()=>{i_._.unsubscribe(tf.jej.PREMIUM_GROUP_PURCHASE_FLOW_COMPLETED,e)}});let f=l.useCallback(()=>{p(!1),a()},[a]);t=null!=s?ef.intl.formatToPlainString(ef.t.Gzh6ZP,{webBuildOverride:s.id}):ef.intl.string(ef.t.cduTBL);let g=eK.Z,A=(0,lg.w)();return g=null!=s?lA.H:A.Component,(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(i9.A,{ref:h,tooltipText:t,tooltipPositionKey:n,onClick:f,onContextMenu:r,"aria-label":ef.intl.string(ef.t.cduTBL),icon:(0,i.jsx)(g,{size:"refresh_sm",color:"currentColor",className:u}),...A.events,plated:null!=c}),(0,i.jsx)(lv,{targetElementRef:h,shouldShow:m,onDismiss:()=>p(!1)}),(0,i.jsx)(nE.Ay,{contentTypes:o,groupName:ep.m.ACCOUNT_NAME_ZONE,children:e=>{let{visibleContent:t,markAsDismissed:n}=e;return t===d.M.PRIVATE_PROFILE_COACHMARK?(0,i.jsx)(l_,{markAsDismissed:n,targetElementRef:h}):null}})]})}var lS=n(489902);let lR=iS.Ay.getEnableHardwareAcceleration()?m.Js:m.eu,ly=2.5*e0.A.Millis.SECOND,lI=2*e0.A.Millis.MINUTE,lb=2*e0.A.Millis.MINUTE,lM=5*e0.A.Millis.SECOND;function lw(e){let{ref:t,speaking:n,voiceDb:s=-1/0,streaming:r,currentUser:o,status:u,handleClick:c,handleMouseLeave:d,renderNameTag:h,nameplate:m,avatarDecoration:A,"data-jump-section":x}=e,C=l.useRef(null),E=t??C,T=(0,ij.F_)({avatarDecoration:A,size:(0,Q.Te)(p._3.SIZE_32)}),j=(0,$.A)(),{updateOpenPopoutRef:N,highlightBadge:S,setHighlightBadge:R}=function(){let e=l.useRef(null),t=l.useCallback(t=>{e.current=()=>{t.onMouseDown(),t.onClick()}},[]),[n,i]=l.useState(),[s,a]=l.useState(!1);return(0,_.A)(()=>a(!0),750),l.useEffect(()=>{let t=t=>{let{highlightBadge:n}=t;null!=n&&i(n),e.current?.()};return i_._.subscribe(tf.jej.SHOW_ACCOUNT_PROFILE_POPOUT,t),()=>{i_._.unsubscribe(tf.jej.SHOW_ACCOUNT_PROFILE_POPOUT,t)}}),{updateOpenPopoutRef:t,highlightBadge:s?n:void 0,setHighlightBadge:i}}(),y=(0,z.K)(m);return null==o?null:(0,i.jsx)(v.A,{object:tf.ZSU.AVATAR,children:(0,i.jsx)(ii.A,{user:o,targetElementRef:E,clickTrap:!0,preload:()=>(0,it.A)(o.id,o.getAvatarURL(void 0,ii.S),{type:"account_popout",withMutualGuilds:!1,withMutualFriends:!1,guildId:void 0}),renderPopout:(e,t)=>{let{closePopout:n,setPopoutRef:l}=e;return(0,i.jsx)(n8,{currentUser:o,highlightBadge:S,openedAt:t,onClose:n,setPopoutRef:l,className:lS.dI})},position:"top",align:"left",animation:f.Y.Animation.FADE,spacing:14,fixed:!0,ignoreModalClicks:!0,onRequestClose:()=>{d(),R(void 0)},children:e=>{N(e);let{onMouseEnter:t,onMouseDown:l,...d}=e;return(0,i.jsxs)("div",{ref:E,style:y,onMouseEnter:t,onMouseDown:l,onClick:t=>{e.onClick?.(t),c?.(t)},className:a()(lS.Q9,{[lS.ZQ]:null!=m}),children:[(0,i.jsx)(g.D,{...d,onClick:t=>{t.stopPropagation(),e.onClick?.(t),c?.(t)},"aria-label":ef.intl.string(ef.t["5fWB8U"]),focusProps:{ringTarget:E},className:lS.$n,"data-jump-section":x}),(0,i.jsx)(lR,{size:p._3.SIZE_32,src:o.getAvatarURL(void 0,28,!1),avatarDecoration:T,status:r?tf.clD.STREAMING:u,isSpeaking:n,voiceDb:s,className:lS.my,"aria-hidden":!0}),(0,i.jsx)("div",{className:lS.oM,children:h(j)})]})}})})}class lO extends l.PureComponent{speakingWhileMutedTooltipTimeout=new h.Ep;speakingWhilePTTTooltipTimeout=new h.Ep;speakingWhilePTTInactiveBackoff=new u.A(lb,null,!1);lastSpeakingWhileMutedNotificationTime=void 0;lastSpeakingWhilePTTNotificationTime=void 0;state={hovered:!1,shouldShowNametagTooltip:!1,shouldShowSpeakingWhileMutedTooltip:!1,shouldShowSpeakingWhilePTTTooltip:!1,hoveringOnMute:!1};containerRef=l.createRef();avatarWithPopoutRef=l.createRef();componentDidUpdate(e){let{speakingWhileMuted:t,speakingWhilePTTInactive:n,occluded:i}=e,{speakingWhileMuted:l,occluded:s,speakingWhilePTTInactive:a}=this.props;s!==i&&this.handleOccludedChanged(),l!==t&&this.handleSpeakingWhileMutedChanged(),a!==n&&this.handleSpeakingWhilePTTChanged()}componentWillUnmount(){this.speakingWhileMutedTooltipTimeout.stop(),this.speakingWhilePTTTooltipTimeout.stop()}handleToggleSelfMute=()=>{let{serverMute:e,suppress:t,selfMute:n}=this.props;(0,L.A)(e,t,tf.JJy.ACCOUNT_PANEL),(0,F.X)(w.A.ACCOUNT,F.O.MIC,n)};handleToggleSelfDeaf=()=>{let{serverDeaf:e,selfDeaf:t}=this.props;(0,k.A)(e,tf.JJy.ACCOUNT_PANEL),(0,F.X)(w.A.ACCOUNT,F.O.DEAFEN,!t)};handleOpenAccountSettings=()=>{this.dismissTooltips(),io.A.isConnected()?(0,ea.openUserSettings)(es.X.VOICE_AND_VIDEO_PANEL):(0,ea.openUserSettings)()};handleOpenSettingsContextMenu=e=>{let{currentUser:t}=this.props;null!=t&&(0,E.L3)(e,async()=>{let{default:e}=await Promise.all([n.e("66787"),n.e("39713"),n.e("3633"),n.e("81927"),n.e("63635"),n.e("13114"),n.e("61949"),n.e("30402"),n.e("44136"),n.e("99961"),n.e("89209"),n.e("89239"),n.e("59859"),n.e("46461"),n.e("6026"),n.e("90862"),n.e("31329"),n.e("26963"),n.e("51402"),n.e("97177"),n.e("4222"),n.e("18090"),n.e("55785"),n.e("51692"),n.e("25677"),n.e("38518"),n.e("333"),n.e("68299"),n.e("22995"),n.e("22822"),n.e("24716"),n.e("76032"),n.e("11520"),n.e("45249"),n.e("85529"),n.e("52519"),n.e("94242"),n.e("57006"),n.e("83566"),n.e("11328"),n.e("58376"),n.e("84935"),n.e("97549"),n.e("89156"),n.e("81516"),n.e("44123"),n.e("38559"),n.e("80287"),n.e("28885"),n.e("49937"),n.e("88826"),n.e("28510"),n.e("19032"),n.e("3445"),n.e("4981"),n.e("14764"),n.e("89217"),n.e("78576"),n.e("76026"),n.e("18102"),n.e("44078"),n.e("41973"),n.e("5539"),n.e("85471"),n.e("18270"),n.e("21437"),n.e("98651"),n.e("3175"),n.e("81275"),n.e("15086"),n.e("18042"),n.e("94695"),n.e("64235"),n.e("23924"),n.e("42205"),n.e("71091"),n.e("19402"),n.e("13111"),n.e("68201"),n.e("38939"),n.e("3376"),n.e("13554"),n.e("26132"),n.e("28367"),n.e("10471"),n.e("63232"),n.e("11301"),n.e("61737"),n.e("60235"),n.e("64827"),n.e("7167"),n.e("96643"),n.e("99278"),n.e("92789"),n.e("2368"),n.e("47834"),n.e("19551"),n.e("84569"),n.e("62156"),n.e("6338"),n.e("83255"),n.e("85404"),n.e("96811"),n.e("57791"),n.e("2316"),n.e("7743"),n.e("45959"),n.e("60658"),n.e("8304"),n.e("18573"),n.e("55936"),n.e("31988"),n.e("39667"),n.e("5812"),n.e("34303"),n.e("28866"),n.e("2419"),n.e("58038"),n.e("93159"),n.e("56959"),n.e("25246"),n.e("36458"),n.e("94723"),n.e("62931"),n.e("50417"),n.e("64607"),n.e("34552"),n.e("93103"),n.e("76602"),n.e("91763"),n.e("28229"),n.e("21921"),n.e("9233"),n.e("76418"),n.e("68403"),n.e("72963"),n.e("42724"),n.e("43437"),n.e("39970"),n.e("40258"),n.e("66495"),n.e("71210"),n.e("86127"),n.e("82263"),n.e("6174"),n.e("91146"),n.e("8555"),n.e("88342"),n.e("46070"),n.e("37977"),n.e("72789"),n.e("6949"),n.e("86814"),n.e("17249"),n.e("88599"),n.e("75842"),n.e("42451"),n.e("36863"),n.e("35027"),n.e("53917"),n.e("79049"),n.e("98965"),n.e("62422"),n.e("50117"),n.e("90365"),n.e("89088"),n.e("71273"),n.e("67861"),n.e("1518"),n.e("15186"),n.e("9640"),n.e("98765"),n.e("47626"),n.e("23354"),n.e("82644"),n.e("52548"),n.e("3589"),n.e("20590"),n.e("65437"),n.e("74810"),n.e("28083"),n.e("80830"),n.e("79745"),n.e("53984"),n.e("80854"),n.e("35395"),n.e("43780"),n.e("35313"),n.e("46844"),n.e("63235"),n.e("45413"),n.e("86672"),n.e("90664"),n.e("32756"),n.e("64850"),n.e("70104"),n.e("96325"),n.e("2564"),n.e("47417"),n.e("19558"),n.e("58946"),n.e("48330"),n.e("14285"),n.e("95752"),n.e("8362"),n.e("41678"),n.e("72401"),n.e("52617"),n.e("4744"),n.e("2698"),n.e("5500"),n.e("501"),n.e("67837"),n.e("35321"),n.e("73384"),n.e("82783"),n.e("86243"),n.e("32209"),n.e("62862"),n.e("37021"),n.e("62359"),n.e("39171"),n.e("87478"),n.e("36564"),n.e("50033"),n.e("23532"),n.e("83952"),n.e("52229"),n.e("3998"),n.e("44780"),n.e("52557"),n.e("5557"),n.e("95340"),n.e("62718"),n.e("1227"),n.e("89916"),n.e("60773"),n.e("61156"),n.e("91671"),n.e("8018"),n.e("92295"),n.e("49635"),n.e("68763"),n.e("16767"),n.e("59957"),n.e("29666"),n.e("58273"),n.e("6841"),n.e("20930"),n.e("29354"),n.e("38056"),n.e("26001"),n.e("14591"),n.e("52111"),n.e("20379"),n.e("36877"),n.e("57458"),n.e("59466"),n.e("8829"),n.e("19193"),n.e("1243"),n.e("69747"),n.e("75133"),n.e("15920"),n.e("77487"),n.e("58164"),n.e("96804"),n.e("44057"),n.e("28850"),n.e("95998"),n.e("27659"),n.e("37490"),n.e("42234"),n.e("3930"),n.e("3663"),n.e("11617"),n.e("26294"),n.e("74678"),n.e("81189"),n.e("21930"),n.e("92077"),n.e("66580"),n.e("77467"),n.e("80093"),n.e("98972"),n.e("12682"),n.e("203"),n.e("4774"),n.e("49629"),n.e("78601"),n.e("89523"),n.e("80407"),n.e("42726"),n.e("34546"),n.e("10943"),n.e("29260"),n.e("41701"),n.e("17823"),n.e("39894"),n.e("21455"),n.e("60989"),n.e("79435"),n.e("68083"),n.e("48730"),n.e("71467"),n.e("60003"),n.e("49013"),n.e("30167"),n.e("51892"),n.e("94607"),n.e("41838"),n.e("46045"),n.e("755"),n.e("33448"),n.e("3710"),n.e("73122"),n.e("42324"),n.e("45830"),n.e("8979"),n.e("33771"),n.e("77602"),n.e("82178"),n.e("46039"),n.e("95602"),n.e("5896"),n.e("34409"),n.e("43114"),n.e("69537"),n.e("87782"),n.e("29569"),n.e("10637"),n.e("96480"),n.e("79593"),n.e("73611"),n.e("41706"),n.e("62175"),n.e("40003"),n.e("94888"),n.e("89541"),n.e("46430"),n.e("44727"),n.e("46149"),n.e("5871"),n.e("27462"),n.e("22455"),n.e("60816"),n.e("68031"),n.e("97162"),n.e("10147"),n.e("6627"),n.e("60536"),n.e("86546"),n.e("7408"),n.e("46327"),n.e("28011"),n.e("15057"),n.e("91531"),n.e("75284"),n.e("43256"),n.e("64926"),n.e("50541"),n.e("47999"),n.e("37886"),n.e("59587"),n.e("61750"),n.e("20803"),n.e("95782"),n.e("61137"),n.e("96817"),n.e("73566"),n.e("27687"),n.e("55839"),n.e("45419"),n.e("18710"),n.e("86629"),n.e("98384"),n.e("71492"),n.e("24564"),n.e("34428"),n.e("39721"),n.e("19631"),n.e("82384"),n.e("76892"),n.e("16799"),n.e("52694"),n.e("43148"),n.e("71811"),n.e("91685"),n.e("38249"),n.e("40976"),n.e("85216"),n.e("26359"),n.e("83774"),n.e("83102"),n.e("80890"),n.e("2552"),n.e("89588"),n.e("24084"),n.e("44790"),n.e("87641"),n.e("44264"),n.e("74913"),n.e("35476"),n.e("54876"),n.e("14451"),n.e("7755"),n.e("93720"),n.e("54658"),n.e("31828"),n.e("71790"),n.e("81754"),n.e("37193"),n.e("33049"),n.e("21403"),n.e("43456"),n.e("44491")]).then(n.bind(n,907206));return t=>(0,i.jsx)(e,{...t,onClose:E.Z_,onInteraction:(0,G.s)("UserSettingsMenu",w.A.ACCOUNT)})})};audioOnInteractionHandler=(0,G.s)("AudioDeviceMenu",w.A.ACCOUNT);handleInputAudioContextMenu=(e,t)=>{this.dismissTooltips(),(0,E.L3)(e,async()=>{let{default:e}=await Promise.all([n.e("60536"),n.e("78827")]).then(n.bind(n,385318));return()=>{let{enabledInputProfiles:n}=(0,il.d)({location:"Account"});return(0,i.jsx)(O.f5,{value:t,children:(0,i.jsx)(e,{onClose:E.Z_,renderInputDevices:!0,renderInputProfiles:n.length>0,renderInputVolume:!0,minimal:!0,onInteraction:this.audioOnInteractionHandler})})}})};handleOutputAudioContextMenu=(e,t)=>{this.dismissTooltips(),(0,E.L3)(e,async()=>{let{default:e}=await Promise.all([n.e("60536"),n.e("78827")]).then(n.bind(n,385318));return()=>(0,i.jsx)(O.f5,{value:t,children:(0,i.jsx)(e,{onClose:E.Z_,renderOutputDevices:!0,renderOutputVolume:!0,minimal:!0,onInteraction:this.audioOnInteractionHandler})})})};handleMouseEnter=()=>{this.setState({hovered:!0})};handleMouseLeave=()=>{this.setState({hovered:!1})};handleMouseEnterMute=()=>{this.setState({hoveringOnMute:!0,shouldShowSpeakingWhileMutedTooltip:!1,shouldShowSpeakingWhilePTTTooltip:!1}),this.speakingWhileMutedTooltipTimeout.stop(),this.speakingWhilePTTTooltipTimeout.stop()};handleMouseLeaveMute=()=>{this.setState({hoveringOnMute:!1})};dismissSpeakingWhileMutedTooltip=()=>{this.setState({shouldShowSpeakingWhileMutedTooltip:!1}),this.speakingWhileMutedTooltipTimeout.stop()};dismissSpeakingWhilePTTTooltip=()=>{this.setState({shouldShowSpeakingWhilePTTTooltip:!1}),this.speakingWhilePTTTooltipTimeout.stop()};dismissTooltips=()=>{this.props.onDismissDeviceChangedTooltip?.(),this.props.dismissPTTJoinTooltip?.(),this.dismissSpeakingWhileMutedTooltip(),this.dismissSpeakingWhilePTTTooltip()};handleOccludedChanged=()=>{let{occluded:e}=this.props;e&&this.setState({shouldShowNametagTooltip:!1,shouldShowSpeakingWhileMutedTooltip:!1,shouldShowSpeakingWhilePTTTooltip:!1})};handleSpeakingWhileMutedChanged=()=>{let{selfMute:e,serverMute:t,suppress:n,speakingWhileMuted:i,occluded:l,shouldShowPTTJoinTooltip:s,deviceChangedTooltipType:a}=this.props,{hoveringOnMute:r}=this.state,o=void 0===this.lastSpeakingWhileMutedNotificationTime||performance.now()-this.lastSpeakingWhileMutedNotificationTime>lI;i?r||!e||t||n||l||!o||null!=a||s||this.setState({shouldShowSpeakingWhileMutedTooltip:!0},()=>{this.lastSpeakingWhileMutedNotificationTime=performance.now(),this.speakingWhileMutedTooltipTimeout.start(ly,()=>this.setState({shouldShowSpeakingWhileMutedTooltip:!1}))}):(this.setState({shouldShowSpeakingWhileMutedTooltip:!1}),this.speakingWhileMutedTooltipTimeout.stop())};handleSpeakingWhilePTTChanged=()=>{let{selfMute:e,serverMute:t,suppress:n,speakingWhilePTTInactive:i,occluded:l,shouldShowPTTJoinTooltip:s,deviceChangedTooltipType:a}=this.props,{hoveringOnMute:r}=this.state,o=void 0===this.lastSpeakingWhilePTTNotificationTime||performance.now()-this.lastSpeakingWhilePTTNotificationTime>this.speakingWhilePTTInactiveBackoff.current;i?r||e||t||n||l||!o||null!=a||s||this.setState({shouldShowSpeakingWhilePTTTooltip:!0},()=>{this.lastSpeakingWhilePTTNotificationTime=performance.now(),this.speakingWhilePTTInactiveBackoff.fail(),this.speakingWhilePTTTooltipTimeout.start(ly,()=>this.setState({shouldShowSpeakingWhilePTTTooltip:!1}))}):(this.setState({shouldShowSpeakingWhilePTTTooltip:!1}),this.speakingWhilePTTTooltipTimeout.stop())};renderStatus(){let{hovered:e}=this.state,{activities:t,applicationStream:n,currentUser:l,status:s,userTag:a,voiceChannel:r}=this.props;if(null==l)return null;if((0,N.A)({activities:t,status:s,applicationStream:n,voiceChannel:r}))return(0,i.jsxs)(M.A,{hoverText:a,forceHover:e,children:[(0,i.jsx)(A.A,{children:t3.Ay.humanizeStatus(s)}),(0,i.jsx)(S.A,{user:l,activities:t,applicationStream:n,voiceChannel:r,textClassName:lS.XD,hideTooltip:!0})]});let o=t?.find(e=>{let{type:t}=e;return t===tf.$pd.CUSTOM_STATUS});return null!=o?(0,i.jsxs)(M.A,{hoverText:a,forceHover:e,children:[(0,i.jsx)(A.A,{children:t3.Ay.humanizeStatus(s)}),(0,i.jsx)(K.A,{activity:o,emojiClassName:lS.Zg,className:lS.WO})]}):null!=s&&s!==tf.clD.UNKNOWN&&l.hasUniqueUsername()?(0,i.jsx)(M.A,{hoverText:a,forceHover:e,children:(0,i.jsx)(b,{text:t3.Ay.humanizeStatus(s)})}):a}renderNameTag=e=>{let{currentUser:t,username:n}=this.props;return null==t?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:lS.eW,children:(0,i.jsx)(iy.A,{className:a()({[lS.e8]:null!=e}),children:(0,i.jsx)(X.A,{userName:n,displayNameStyles:e,effectDisplayType:this.state.hovered?Y.G.ANIMATED:Y.G.STATIC,loop:!0,inProfile:!0})})}),(0,i.jsx)("div",{className:lS.XP,children:(0,i.jsx)(iR.A,{children:this.renderStatus()})})]})};renderNameZone(e){let{currentUser:t,dismissibleContents:n}=this.props;return null==t?null:(0,i.jsx)(i2,{guildId:this.props.selectedGuildId??null,currentUser:t,targetElementRef:this.avatarWithPopoutRef,additionalDCs:n.avatar,children:(0,i.jsx)(lw,{...this.props,ref:this.avatarWithPopoutRef,handleMouseLeave:this.handleMouseLeave,renderNameTag:this.renderNameTag,"data-jump-section":e["data-jump-section"]})})}render(){let{currentUser:e,nameplate:t,voiceChannel:n,isQuestBarEmpty:l,isListenAlongVisible:s}=this.props,r=this.state.hovered;return null==e?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.sk,{children:e=>(0,i.jsxs)("div",{ref:this.containerRef,className:a()(lS.kL,{[lS.UG]:null!=n,[lS.bc]:!l,[lS.G5]:s}),onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,i.jsx)(Z.A,{nameplate:t,hovered:r,placement:q.u.ACCOUNT}),this.renderNameZone(e),(0,i.jsx)(lU,{...this.props,...this.state,accountContainerRef:this.containerRef,handleMouseEnterMute:this.handleMouseEnterMute,handleMouseLeaveMute:this.handleMouseLeaveMute,handleToggleSelfMute:this.handleToggleSelfMute,handleToggleSelfDeaf:this.handleToggleSelfDeaf,handleInputAudioContextMenu:this.handleInputAudioContextMenu,handleOutputAudioContextMenu:this.handleOutputAudioContextMenu,handleOpenAccountSettings:this.handleOpenAccountSettings,handleOpenSettingsContextMenu:this.handleOpenSettingsContextMenu,dismissTooltips:this.dismissTooltips})]})}),(0,i.jsx)(ex,{})]})}}function lU(e){let{selfDeaf:t,selfMute:n,awaitingRemote:l,serverMute:s,serverDeaf:a,suppress:r,shouldShowSpeakingWhileMutedTooltip:o,shouldShowSpeakingWhilePTTTooltip:u,webBuildOverride:c,handleMouseEnterMute:d,handleMouseLeaveMute:h,handleToggleSelfDeaf:m,handleToggleSelfMute:p,handleInputAudioContextMenu:f,handleOutputAudioContextMenu:g,handleOpenAccountSettings:A,handleOpenSettingsContextMenu:x,dismissibleContents:C,nameplate:E,accountContainerRef:v,deviceChangedTooltipType:T,shouldShowPTTJoinTooltip:j=!1,dismissTooltips:_,speaking:N}=e,S=(0,z.K)(E);return(0,i.jsxs)("div",{className:lS.Uo,style:S,children:[(0,i.jsx)(lp,{accountContainerRef:v,selfMute:n,serverMute:s,suppress:r,awaitingRemote:l,onMouseEnter:d,onMouseLeave:h,onClick:p,onContextMenu:f,iconForeground:null!=E?lS.t4:void 0,nameplate:E,shouldShowSpeakingWhileMutedTooltip:o,shouldShowInputDeviceChangedTooltip:!o&&"input"===T,shouldShowSpeakingWhilePTTTooltip:u,shouldShowPTTJoinTooltip:j,dismissTooltips:_,speaking:N}),(0,i.jsx)(ln,{selfDeaf:t,serverDeaf:a,onClick:m,onContextMenu:g,awaitingRemote:l,iconForeground:null!=E?lS.t4:void 0,nameplate:E,shouldShowOutputDeviceChangedTooltip:"output"===T,dismissTooltips:_}),(0,i.jsx)(lN,{webBuildOverride:c,onClick:A,onContextMenu:x,dismissibleContents:C.settings,iconForeground:null!=E?lS.t4:void 0,nameplate:E})]})}function lD(e){let t=(0,c.bG)([io.A],()=>null!=io.A.getChannelId()),n=(0,eC.Py)(e),i=l.useRef(new h.Ep),[s,a]=l.useState(!1);l.useEffect(()=>{t&&n&&(a(!0),i.current.start(lM,()=>{a(!1)}))},[t,n]);let r=l.useCallback(()=>{a(!1),i.current.stop()},[]);return(0,j.l0)(()=>{i.current.stop()}),{shouldShowTooltip:s,dismissTooltip:r}}function lP(){let e=(0,c.bG)([no.default],()=>no.default.getCurrentUser()),t=(0,c.bG)([nN.default],()=>nN.default.getId()),{activities:n,streaming:s,status:a}=(0,c.cf)([nD.A],()=>{let e=nD.A.getActivities();return{activities:e,streaming:null!=e.find(e=>{let{type:t}=e;return t===tf.$pd.STREAMING}),status:nD.A.getStatus()}}),r=(0,c.bG)([ix.A],()=>ix.A.getAnyStreamForUser(t)),u=(0,T.A)({userId:t}),m=(0,c.bG)([ip.A],()=>ip.A.getVoiceVolume(t)),p=t3.Ay.useUserTag(e,{decoration:"never"}),f=(0,c.bG)([io.A,iC.A],()=>{let e=io.A.getChannelId();return null!=e?iC.A.getChannel(e):null}),{mute:g,selfMute:A,suppress:x}=(0,ia.A)(f),{selfDeaf:E,deaf:v}=(0,is.A)(f),_=(0,c.bG)([U.A],()=>(0,D.kK)()?U.A.getCurrentBuildOverride().overrides?.discord_web:null),N=(0,c.bG)([ir.Ay],()=>ir.Ay.getSpeakingWhileMuted()),S=(0,c.bG)([P.A],()=>P.A.isFullscreenInContext()),R=(0,c.bG)([iv.A],()=>iv.A.hasLayers()),y=(0,C.useModalsStore)(C.hasAnyModalOpenSelector)||R||iN.P.isDisallowPopupsSet()||S,I=(0,V.sw)(),{userStatusMenu:b}=B.$.useConfig({location:"Account"}),M=(0,eE.A)(e=>e.isOpen),k=(0,c.bG)([J.default],()=>null!=J.default.getAwaitingRemoteSessionInfo()),L=(0,c.bG)([iT.A],()=>iT.A.getGuildId()),F=e?.avatarDecoration,G=(0,H.A)(F),Q=t3.Ay.useName(e)??"",{analyticsLocations:z}=(0,O.Ay)(w.A.ACCOUNT),q=(0,W.r)({user:e,guildId:void 0}),{isQuestBarEmpty:Z}=(0,n7.c9)(),K=(0,c.bG)([n9.A,no.default,iE.A],()=>{let e,t=n9.A.getSyncingWith(),n=n9.A.getActivity(),i=[];return null!=t?e=t.partyId:null!=n&&null!=n.party&&null!=n.party.id&&(e=n.party.id),null!=e&&(i=o()(Array.from(iE.A.getParty(e)??[])).map(e=>no.default.getUser(e)).filter(nS.Vq).value()),i.length>1}),$={avatar:[],settings:[]},Y=(0,ie.lX)("AccountCoachmark");!y&&($.avatar.push(d.M.DISPLAY_NAME_STYLES_COACHMARK),I&&b&&!M&&$.avatar.push(d.M.CLIPS_PRIMARY_ENTRY_POINT_COACHMARK),Y&&$.settings.push(d.M.PRIVATE_PROFILE_COACHMARK));let{shouldShowTooltip:X,dismissTooltip:ee}=lD(ic.oh.AUDIO_INPUT),{shouldShowTooltip:et,dismissTooltip:en}=lD(ic.oh.AUDIO_OUTPUT),{shouldShowTooltip:ei,dismissTooltip:el}=function(){let[e,t]=l.useState(!1),n=(0,c.bG)([ir.Ay],()=>ir.Ay.getMode()===ic.TB.PUSH_TO_TALK),i=(0,c.bG)([io.A],()=>null!=io.A.getChannelId()&&(io.A.getDuration()??Number.MAX_VALUE)<id),[s,a]=l.useState(!1),{showPTTJoinTooltip:r}=iu.A.useConfig({location:"usePTTJoinTooltip"}),o=l.useRef(new h.Ep),u=l.useRef(new h.Ep);l.useEffect(()=>{if(i&&n&&!e){if(iu.A.getConfig({location:"usePTTJoinTooltip:couldDisplayTooltip"}),!r)return;a(!0),t(!0),u.current.start(ih,()=>{t(!1)}),o.current.start(id,()=>{a(!1)})}i||a(!1)},[i,n,r,e]);let d=l.useCallback(()=>{a(!1),o.current.stop()},[]);return(0,j.l0)(()=>{o.current.stop(),u.current.stop()}),{shouldShowTooltip:s,dismissTooltip:d}}(),es=function(){let{showPTTSpeakingIndicator:e}=iu.A.useConfig({location:"useSpeakingWhilePTT"}),[t,n]=l.useState(!1),i=(0,c.bG)([ir.Ay],()=>ir.Ay.getMode()===ic.TB.PUSH_TO_TALK),s=(0,c.bG)([io.A],()=>io.A.getRTCConnectionId()),a=(0,c.bG)([ir.Ay],()=>{let e=ir.Ay.getModeOptions().updatedAt;return null!=e&&Date.now()-e<iA}),r=l.useRef(new h.Ep);return l.useEffect(()=>{n(!1)},[s]),l.useEffect(()=>{let t=0,l=r.current;function o(e,i){let s=(i&ic.ME.VOICE)===ic.ME.VOICE,a=ip.A.isCurrentUserPTTActive();s&&!a?++t>=6&&(n(!0),l.start(ig,()=>{n(!1)})):t=0}return a&&e&&i&&null!=s&&ir.Ay.getMediaEngine().on(im.bg.VoiceActivity,o),()=>{ir.Ay.getMediaEngine().removeListener(im.bg.VoiceActivity,o),l.stop()}},[e,i,a,s]),t}(),ea=l.useMemo(()=>X?"input":et?"output":void 0,[X,et]),er=l.useCallback(e=>{switch(e){case"input":ee();break;case"output":en()}},[ee,en]);return(0,i.jsx)(O.f5,{value:z,children:(0,i.jsx)(lO,{currentUser:e,username:Q,activities:n,applicationStream:r,voiceChannel:f,dismissibleContents:$,userTag:p,occluded:y,selfDeaf:E,selfMute:A,serverDeaf:v,serverMute:g,speaking:u,voiceDb:m,speakingWhileMuted:N,speakingWhilePTTInactive:es,status:a,streaming:s,suppress:x,webBuildOverride:_,awaitingRemote:k,nameplate:q,selectedGuildId:L,avatarDecoration:G,isQuestBarEmpty:Z,isListenAlongVisible:K,deviceChangedTooltipType:ea,onDismissDeviceChangedTooltip:()=>er(ea),shouldShowPTTJoinTooltip:ei,dismissPTTJoinTooltip:el})})}}