Loading
function(e,t,n){"use strict";var i=n(477900),r=n(582128),a=n(156828),s=n(991690),l=n(855986),o=n(31728),d=n(933958),c=n(216418),u=n(969151),_=n(108959),E=n(449571),A=n(628983),f=n(71855),h=n(91242),I=n(326843),p=n(210954),m=n(457864),T=n(699426),g=n(853757),S=n(869146),N=n(964404),C=n(806911),O=n(734057),R=n(334463),L=n(309010),y=n(531685),D=n(403362),b=n(652215),v=n(5867),P=n(806931),M=n(165610),U=n(155819);let w=(0,a.Fe)({createPromise:()=>Promise.all([n.e(644013),n.e(896691),n.e(971156),n.e(260009),n.e(779367),n.e(552653),n.e(85427),n.e(66149),n.e(281342),n.e(967850),n.e(505866),n.e(291329),n.e(64769),n.e(329172),n.e(992956),n.e(880150),n.e(490743),n.e(44141),n.e(428643),n.e(512831),n.e(630290),n.e(668756),n.e(60002),n.e(189423),n.e(415695),n.e(715867),n.e(249938),n.e(266201),n.e(752704),n.e(56606),n.e(940298),n.e(738015),n.e(629972),n.e(40791),n.e(358404),n.e(996907),n.e(831130),n.e(377989),n.e(439080),n.e(650376),n.e(587618),n.e(100309),n.e(454048),n.e(508702),n.e(300699),n.e(349619),n.e(922716),n.e(543039),n.e(398125),n.e(221825),n.e(930758),n.e(776195),n.e(901555),n.e(44561),n.e(253729),n.e(593600),n.e(827708),n.e(266900),n.e(707826),n.e(948804),n.e(199999),n.e(879315),n.e(809915),n.e(110116),n.e(37085),n.e(890027),n.e(463095),n.e(851130),n.e(672727),n.e(927211),n.e(361626),n.e(646506),n.e(445124),n.e(76428),n.e(445421),n.e(783988),n.e(832823),n.e(761935),n.e(511527),n.e(763070),n.e(502018),n.e(276863),n.e(955184),n.e(441432),n.e(728633),n.e(628439),n.e(570506),n.e(539620),n.e(225990),n.e(297964),n.e(787672),n.e(248329),n.e(996830),n.e(401590),n.e(466354),n.e(263765),n.e(784103),n.e(509793),n.e(698547),n.e(638114),n.e(911521),n.e(299086),n.e(805775),n.e(615569),n.e(964602),n.e(127079),n.e(983884),n.e(584605),n.e(168871),n.e(891559),n.e(864905),n.e(816197)]).then(n.bind(n,677793)),webpackId:677793,name:"ConjureAppPictureInPictures"}),G={[b.o1q.VIDEO]:C.A,[b.o1q.ACTIVITY]:E.A,[b.o1q.FRAME]:p.A},x={minWidth:P.mn[P.R8.VIDEO],maxWidth:P.cF[P.R8.VIDEO]},k=[];class F extends r.PureComponent{state={selectedPIPWindowHeight:0};render(){let{selectedPIPWindow:e,pipWindows:t,pipWidth:n,maxX:r,maxY:a,dockedRect:s,appContext:l,roundCorners:o,getDockedRectPositionY:d,windowSize:c,inPopoutWindow:u,activityPIPWindow:_,chatOpen:E,callChatSidebarWidth:A,showConjureAppPictureInPictures:f}=this.props,{selectedPIPWindowHeight:h}=this.state,I=document.body.style.getPropertyValue("--custom-guild-sidebar-width"),p=""!==I?parseInt(I,10):240,g=c.width-p-(E?A:0);return(0,i.jsxs)(T.ic,{children:[(0,i.jsx)(m.Ay,{pictureInPictureComponents:G,selectedPIPWindow:e,pipWindows:t,pipWidth:n,maxX:r,maxY:a,dockedRect:s,onWindowMove:this.handleWindowMove,onWindowResize:this.handleWindowResize,onWindowHeightChange:this.handleWindowHeightChange,appContext:l,roundCorners:o,resizeConfig:x,getDockedRectPositionY:d}),f?(0,i.jsx)(w,{maxX:r,maxY:a,appContext:l,floatingPictureInPicture:null!=e&&!0!==e.hidden&&null==s?{position:e.position,height:h}:null}):null,(0,i.jsx)(T.Md,{className:!u&&null!=_&&E&&g<550?U.ah:void 0})]})}handleWindowMove=(e,t)=>{o.tw(e,t)};handleWindowResize=e=>{o.EB(e,P.R8.VIDEO)};handleWindowHeightChange=e=>{this.setState({selectedPIPWindowHeight:e})}}let B=l.Ay.connectStores([S.A,d.Ay,y.A,O.A,L.Ay,R.A,A.A,N.Ay,h.A],e=>{let t,{popoutWindowKey:n,popoutWindowHasTitleBar:i=!1,showConjureAppPictureInPictures:r=!1}=e,a=S.A.getWindowOpen(b.MLl.CHANNEL_CALL_POPOUT),l=S.A.getWindowOpen(b.MLl.ACTIVITY_POPOUT),o=d.Ay.getCurrentEmbeddedActivity(),E=(0,u.H)(o?.location),p=null!=o&&!(0,_.A)(E,O.A,L.Ay),m=d.Ay.getActivityPanelMode(),T=p&&m===v.Gd.PANEL,C=null!=o&&null!=E&&A.A.getSelectedParticipant(E)?.type===P.lp.ACTIVITY,U=(0,M.ny)(h.A.getMainFrame()),w=U?.data.layoutMode===M.y0.FOCUSED,G=null!=n,x=G?S.A.getWindow(n):null,F=!!G&&S.A.isWindowFullScreen(n),B=y.A.windowSize();G&&(B=null==x?B:{width:x.innerWidth,height:x.innerHeight});let V=G?b.BRT.POPOUT:b.BRT.APP;t=null!=o&&l||G&&p||G&&null!=U?null:G||!a||p||null!=U?null!=o&&T?R.A.pipActivityWindow??R.A.pipVideoWindow:null!=U&&w?R.A.pipFrameWindow??R.A.pipVideoWindow??R.A.pipActivityWindow:R.A.pipVideoWindow??R.A.pipActivityWindow??R.A.pipFrameWindow:null;let H=Array.from(R.A.pipWindows.values()),j=R.A.pipWidth(P.R8.VIDEO),W=H.find(e=>e.component===b.o1q.VIDEO),Y=H.find(e=>e.component===b.o1q.ACTIVITY),K=[W,Y,H.find(e=>e.component===b.o1q.FRAME)].filter(D.Vq),$=N.Ay.callChatSidebarWidth,X=L.Ay.getVoiceChannelId(),z=L.Ay.getChannelId()===X,q=null!=X&&A.A.getChatOpen(X),Q=T||C,Z=Q&&null!=o&&(0,c.q)(o.applicationId),J=!Q&&null!=t&&z;return{selectedPIPWindow:t,pipWindows:0===K.length?k:K,pipWidth:j,maxX:B.width-(J&&q?$:0),maxY:B.height,dockedRect:R.A.getDockedRect(t?.id??""),getDockedRectPositionY:function(e){return G&&(0,g.q)({withTitleBar:i,isFullScreen:F})?e-(0,f.LI)({isPopoutWindow:G}):e},appContext:V,roundCorners:!Z,windowSize:B,inPopoutWindow:G,activityPIPWindow:Y,chatOpen:q,callChatSidebarWidth:$,showConjureAppPictureInPictures:r&&h.A.getAllFrames().some(e=>e.surface.type===s.U.APP_CHANNEL&&(0,I.A)(e,N.Ay))}})(F);n.d(t,{},{A:B})}