1"use strict";(self.__LOADABLE_LOADED_CHUNKS_b0883d2160058480bbc6eecd5d8f88a54d4850b0__=self.__LOADABLE_LOADED_CHUNKS_b0883d2160058480bbc6eecd5d8f88a54d4850b0__||[]).push([[569],{39065:function(t,o){o.A={message:"messagePopover-module__message___sAr_i",show:"messagePopover-module__show___ltWTK",abovePlayer:"messagePopover-module__abovePlayer___mbbZU"}},11926:function(t,o){o.A={button:"discord-controls-module__button___OxaSm",disabled:"discord-controls-module__disabled___EqWG1",text:"discord-controls-module__text___L7Dki",wrap:"discord-controls-module__wrap___VcR4Q",left:"discord-controls-module__left___YnkS5",bold:"discord-controls-module__bold___y9OOI",avatar:"discord-controls-module__avatar___lH_sx",actionButton:"discord-controls-module__actionButton___i6OBm",open:"discord-controls-module__open___wVlex",arrow:"discord-controls-module__arrow___DgBOG",up:"discord-controls-module__up___ry1Vi",popover:"discord-controls-module__popover___l5G3C",popoverContent:"discord-controls-module__popoverContent___GCwt3",hostOnly:"discord-controls-module__hostOnly___qfvgw",modeContainer:"discord-controls-module__modeContainer___v7sIc",userListLabel:"discord-controls-module__userListLabel___oeVv2",participantsContainer:"discord-controls-module__participantsContainer___axJrQ",participant:"discord-controls-module__participant___H0mgL",single:"discord-controls-module__single___pXEDH"}},44941:function(t,o){o.A={backButton:"nav-back-arrow-button-module__backButton___SoP9s"}},37832:function(t,o){o.A={switchButtonContainer:"switch-button-module__switchButtonContainer___M0ewp",enabled:"switch-button-module__enabled___dCSj2",switchButton:"switch-button-module__switchButton___KyIg2",icon:"switch-button-module__icon___YmEnO"}},9976:function(t,o,e){var n=e(31085),s=e(54357),i=e(39067),a=e.n(i),r=e(14041),l=e(70541),c=e(95143),d=e(73990),u=e(71793),_=e(63485),m=e(39065);function p(t){let{message:o,showing:e,className:i}=t,{getLocalizedText:a}=(0,r.useContext)(c.dq),p=(0,_.P)(),b=(0,l.d4)(u.zq),v=(0,l.d4)(d.jc),h=(0,l.d4)(d.H6);return o?(0,n.jsx)("div",{className:(0,s.A)(m.A.message,{[m.A.show]:e,[m.A.abovePlayer]:p&&(!b||v&&!h)},i),children:a(o)}):null}p.propTypes={showing:a().bool.isRequired,message:a().string.isRequired,className:a().string},o.Ay=(0,l.Ng)(function(t){let{messagePopover:o}=t;return o})(p)},72700:function(t,o,e){let n;e.d(o,{Z:function(){return w}}),e(18111),e(61701);var s=e(31085),i=e(54357),a=e(39067),r=e.n(a),l=e(14041),c=e(70541),d=e(8960),u=e(41982),_=e(58106),m=e(39393),p=e(67028),b=e(91341),v=e(93735),h=e(95143),A=e(73990),f=e(9183),g=e(11926),x=e(64357);function w(t){var o,e,a,r;let{buttonClassName:w,popoverClassName:y}=t,[C,j]=(0,l.useState)(!1),N=(0,c.d4)(A.yi),{playerStore:k}=(0,v.gy)(),{isLive:B}=k.metadata()||{},{getLocalizedText:H}=(0,l.useContext)(h.dq),{infoLabel:O,buttonLabel:L}=(0,x.D4)(N,H),{handleOnClick:T,isOpen:D,containerRef:M}=(0,p.C)(!0),E=(0,b.A)(N),[S,q]=(0,l.useState)(N.activity.activityMode===d.fT.shared);(0,l.useEffect)(()=>{let{activityMode:t,isHost:o}=N.activity,{activityMode:e,isHost:s}=(null==E?void 0:E.activity)||{};(t!==e||o!==s)&&(clearTimeout(n),j(!1),q(t===d.fT.shared))},[N,E]);let P=(0,l.useCallback)(()=>{n=setTimeout(()=>{j(!1),q(N.activity.activityMode===d.fT.shared)},f.E6)},[N.activity.activityMode]),V=(0,l.useCallback)(()=>{N.isHost&&(j(!0),q(!S),d.discordManager.setMode(S?d.fT.hosted:d.fT.shared),P())},[N.isHost,P,S]);return(0,s.jsxs)("div",{ref:M,children:[(0,s.jsxs)("button",{type:"button",className:(0,i.A)(g.A.button,g.A.actionButton,w,{[g.A.open]:D}),onClick:T,disabled:C,children:[(0,s.jsx)("img",{src:(null==N?void 0:N.isHost)?null==N||null==(o=N.user)?void 0:o.avatarUri:(0,d.bX)(null==N?void 0:N.currentHost),className:g.A.avatar,alt:H(f.Wv)}),!B&&(0,s.jsx)("span",{className:g.A.text,children:L}),(0,s.jsx)(m.A,{className:(0,i.A)(g.A.arrow,{[g.A.up]:D})})]}),(0,s.jsx)(_.A,{isOpen:D,className:(0,i.A)(g.A.popover,y),contentClassName:(0,i.A)(g.A.popoverContent,{[g.A.hostOnly]:(null==(e=N.participants)?void 0:e.length)===1}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:g.A.modeContainer,children:[(0,s.jsx)("span",{id:"discord-controls-info-label",className:g.A.text,children:O}),N.isHost&&(0,s.jsx)(u.A,{onClick:V,isOn:S,ariaLabelledBy:"discord-controls-info-label",disabled:C})]}),(null==(a=N.participants)?void 0:a.length)>1&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("hr",{}),(0,s.jsx)("span",{className:(0,i.A)(g.A.text,g.A.userListLabel),children:H(N.isHost?f.ty:f.Fz)})]}),D&&(0,s.jsx)("div",{className:(0,i.A)("scroller",g.A.participantsContainer),children:null==(r=N.participants)?void 0:r.map(t=>{var o;return(0,x.bV)(t,N)&&(0,s.jsxs)("button",{type:"button","aria-labelledby":"discord-controls-username",className:(0,i.A)(g.A.button,g.A.participant,{[g.A.disabled]:!N.isHost,[g.A.single]:(null==(o=N.participants)?void 0:o.length)===2}),onClick:()=>{var o;
1return o=t.id,void(N.isHost&&(j(!0),d.discordManager.setHost(o),P()))},disabled:C,children:[(0,s.jsx)("img",{className:g.A.avatar,src:(0,d.bX)(t),alt:H(f.Wv)}),(0,s.jsx)("span",{id:"discord-controls-username",className:g.A.text,children:(0,x.vw)(t.nickname||t.username,20)})]},t.id)})})]})})]})}w.propTypes={buttonClassName:r().string,popoverClassName:r().string}},73102:function(t,o,e){e.d(o,{Z:function(){return n.Z}});var n=e(72700)},64357:function(t,o,e){e.d(o,{D4:function(){return l},bV:function(){return c},vw:function(){return r}});var n=e(31085),s=e(43200),i=e(9183),a=e(11926);function r(t){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(null==t?void 0:t.length)>o?`${null==t?void 0:t.slice(0,o)}...`:t}function l(t,o){var e,l;let{activity:c,isHost:d}=t||{},{infoLabelKey:u,buttonLabelKey:_}=(null==(e=i.hH[null==c?void 0:c.activityMode])?void 0:e[d])||{},{nickname:m,username:p}=t.currentHost||{};return{infoLabel:u?o(u):"",buttonLabel:_?(l=o(_).replace("{host}",r(m||p,8)),(0,s.A)({mixedString:l,components:{bold:(0,n.jsx)("span",{className:a.A.bold})}})):""}}function c(t,o){return t.id!==o.user.id&&(o.isHost||t.id===o.currentHost.id)}},73477:function(t,o,e){e.d(o,{m:function(){return A}});var n=e(31085),s=e(39067),i=e.n(s),a=e(14041),r=e(70541),l=e(86090),c=e(32819),d=e(35187),u=e(95143),_=e(73990),m=e(54617),p=e(93226),b=e(91341),v=e(44941);let h=(0,m.A)("assets/img/shared/arrow-left.svg");function A(t){let{onClick:o}=t,{getLocalizedText:e}=(0,a.useContext)(u.dq),s=(0,l.W6)(),i=(0,b.A)(s.location.pathname),m=(0,r.d4)(_.H6);return(0,n.jsx)("button",{type:"button",className:v.A.backButton,"aria-label":e(c.x),onClick:o||function(){(0,p.Kt)()&&m?d.O.goBack():(s.goBack(),setTimeout(()=>{(0,p.Kt)()&&s.location.pathname===i&&d.O.goBack()}))},children:(0,n.jsx)("img",{src:h,width:"30",height:"30",alt:""})})}A.propTypes={onClick:i().func}},61370:function(t,o,e){e.d(o,{m:function(){return n.m}});var n=e(73477)},41982:function(t,o,e){e.d(o,{A:function(){return c}});var n=e(31085),s=e(54357),i=e(39067),a=e.n(i),r=e(14041),l=e(37832);function c(t){let{isOn:o,onClick:e,enabledIconClassName:i,ariaLabelledBy:a,disabled:c}=t,[d,u]=(0,r.useState)(o||!1),_=(0,s.A)(l.A.switchButtonContainer,{[l.A.enabled]:d});return(0,r.useEffect)(()=>{"boolean"==typeof o&&u(o)},[o]),(0,n.jsxs)("button",{type:"button",role:"switch","aria-checked":d,"aria-labelledby":a,className:_,"data-testid":"switchButtonContainer",onClick:function(){if(e)return null==e?void 0:e(d);u(t=>!t)},disabled:c,children:[(0,n.jsx)("div",{className:l.A.switchButton,"data-testid":"switchButton"}),i&&(0,n.jsx)("i",{className:(0,s.A)(l.A.icon,i),"data-testid":"switchButtonIcon"})]})}c.propTypes={isOn:a().bool,onClick:a().func,enabledIconClassName:a().string,ariaLabelledBy:a().string.isRequired,disabled:a().bool}},39393:function(t,o,e){var n=e(31085);o.A=t=>(0,n.jsx)("svg",{width:10,height:8,fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:(0,n.jsx)("path",{d:"m1.5 1.5 3.5 4 3.5-4",stroke:"#F1F2F3",strokeWidth:2,strokeMiterlimit:10})})},58049:function(t,o,e){e.d(o,{l:function(){return r}});var n=e(70541),s=e(73990),i=e(27906),a=e(63485);function r(){let t=(0,n.d4)(t=>t),o=(0,a.P)();return!(0,s.H6)(t)&&!(0,s.jc)(t)&&o&&(0,i.sV)((0,s.Ms)(t))}}}]); 2//# sourceMappingURL=569.04cb1d79edaca057.js.map
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.