1"use strict"; 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0da5cebc-3aa9-55db-8f59-4365a2d65463")}catch(e){}}(); 3(self.webpackChunkclient=self.webpackChunkclient||[]).push([["4338"],{89588(e,t,s){s.d(t,{h:()=>m});var a=s(15526),i=s(30495),r=s(79942),n=s(34578),l=s(56823),o=s(97983),d=s(53940),c=s(56177),u=s(28138),h=s(86977),p=10*s(94375).b.second;class m{constructor(e){this.userId=e}checkAvailability(e){return(0,i.Yq)(i.jI.shared().events.post,e,{label:"event.call.games.availability.check",payload:{sender:this.userId}}).pipe((0,r.Fg)(()=>(0,n.h)((0,l.O)(p).pipe((0,o.u)([])),h.I.shared(this.userId).events("ci:event.call.games.availability").pipe((0,d.p)(t=>t.sender===e),(0,c.s)(1),(0,u.T)(e=>e["available-games"]))).toSingle()))}sendAvailability(e,t){return(0,i.Yq)(i.jI.shared().events.post,e,{label:"event.call.games.availability",payload:{sender:this.userId,availableGames:t}}).pipe((0,r.AB)(void 0))}sendEvent(e,t){return(0,i.Yq)(i.jI.shared().events.post,t.attendee,{label:"event.call.games",payload:{game:e.name,version:e.version,sender:this.userId,arguments:t}}).pipe((0,r.AB)(void 0))}}m.shared=(0,a.G)(e=>new m(e))},72602(e,t,s){s.d(t,{j:()=>d});var a=s(42062),i=s(78903),r=s(31085);let n=(0,a.memo)(()=>(0,r.jsx)("div",{className:"chat-call-bad-connection-indicator__badConnectionIndicator",children:(0,r.jsx)(i.Icon,{name:"bad-connection",size:"normal"})}));var l=s(66691),o=s(67276),d=(0,a.memo)(e=>{var{userId:t}=e;return(0,l.J2)(()=>o.M.shared(t).connectionIsBad,[t])?(0,r.jsx)(n,{}):null})},36658(e,t,s){s.d(t,{e:()=>W});var a=s(42062),i=s(66691),r=s(28138),n=s(15654),l=s(84190),o=s(97983),d=s(65052),c=s(75841),u=s(56823),h=s(13462),p=s(43141),m=s(99870),v=s.n(m),b=s(12404),g=s(67276),f=s(65428),I=s(48634),S=s(18407),j=s(15782),x=s(31085);let w=(0,a.memo)(e=>{var{disabled:t,onClick:s}=e,r=(0,i.J2)(()=>h.T.shared().mcs.callInterface,[]),n=(0,j.A)("/dialogs/messages",t?"show-video":"hide-video"),l=(0,a.useMemo)(()=>v()("chat-call-mcs-toggle-local-video-button__button","setting-button",{"chat-call-mcs-toggle-local-video-button__buttonNewDesign":"new-design"===r}),[r]);return(0,x.jsx)("button",{title:n,className:l,onClick:s,children:(0,x.jsx)("span",{children:t?(0,x.jsx)(I.u,{}):(0,x.jsx)(S.i,{})})})});var T=s(98153),y=s(72975),C=["onClick","userId","disabled"],F=s(43751),_=s(79760),k=(0,a.memo)(e=>{var{onClick:t,userId:s,disabled:i}=e,r=function(e,t){if(null==e)return{};var s={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(t.includes(a))continue;s[a]=e[a]}return s}(e,C),n=(0,a.useCallback)(function(){y.F.shared(s).logLocalTrackVideoMediaButtonClick("mcs",!i),t(...arguments)},[t,s,i]);return(0,x.jsx)(w,Object.assign({},r,{disabled:i,onClick:n}))}),A=(0,a.memo)(e=>{var{userId:t}=e,[s,l]=(0,a.useState)(0),o=(0,i.J2)(()=>f.K.shared().camera.pipe((0,r.T)(e=>!!e)),[],!1),d=(0,i.J2)(()=>f.K.shared().camera.pipe((0,r.T)(e=>null==e?void 0:e.permission)),[]),c=(0,i.J2)(()=>h.T.shared().mcs.mediaDevicesPermissionsRecoveryInstructionEnabled,[]),u=(0,i.J2)(()=>g.M.shared(t).state.pipe((0,r.T)(e=>!!e.localTracks.video.length),(0,n.F)()),[t],!1),p=("denied"===d||s>=2)&&c,m=(0,i.uN)(()=>g.M.shared(t).toggleLocalVideo(),[t]),v=(0,a.useCallback)(()=>g.M.shared(t).toggleLocalVideo().subscribe(()=>{l(0)},()=>{l(e=>e+1),p?F.Y.shared().get(_.A).actions.open("media-device-permissions-recovery",[{props:{device:"camera",onPermissionsGranted:m},disableManualClose:!0}]):c||T.A.emit("overlay","camera-blocked","blocked")}),[p,t,c,m]);return o?(0,x.jsx)(k,{userId:t,disabled:!u,onClick:v}):null}),O=s(9778),M=s(16116),L=s(92495),G=s(72602),z=s(89463),E=s.n(z),B=s(57561),D=s(36443);let N=(0,a.memo)(e=>{var{localMediaStream:t,toggleLocalVideoButtonVisible:s,userId:i,thumbnailVisible:r,videoVisible:n,newDesignCallInterface:l}=e,o=(0,a.useRef)(null),d=["ios","android"].includes((0,B.$5)()),c=(0,M.Z)(L.zh.LteTablet),u=(0,a.useRef)(null),h=(0,a.useMemo)(()=>v()("chat-call-mcs-local-video__container",{"chat-call-mcs-local-video__containerNewDesign":l},{"chat-call-mcs-local-video__noVideo":l&&!n&&!c}),[l,n,c]),p=l&&(c||d),{position:m,handleStop:g}=(0,D.W)(p),f=(0,a.useMemo)(()=>v()({"chat-call-mcs-local-video__draggableContainer":p}),[p]),I=(0,a.useMemo)(()=>v()({"chat-call-mcs-local-video__draggableDraggingContainer":p}),[p]);return(0,a.useEffect)(()=>{o.current&&t&&o.current.srcObject!==t&&(o.current.srcObject=t,o.current.play().catch(e=>{var t;if(null!=(t=o.current)&&t.isConnected)throw e}))},[t]),(0,x.jsx)(E(),{cancel:"button",nodeRef:u,bounds:"body",defaultClassName:f,defaultClassNameDragging:I,disabled:!p,position:m,onStop:g,children:(0,x.jsxs)("div",{className:h,ref:u,children:[n&&(0,x.jsx)("video",{className:"chat-call-mcs-local-video__video",autoPlay:!0,playsInl
3ine:!0,muted:!0,ref:o}),r&&(0,x.jsx)("div",{className:"chat-call-mcs-local-video__thumbnailWrapper",children:(0,x.jsx)(O.UserThumbnail,{className:"chat-call-mcs-local-video__thumbnail",ownerId:i,draggable:!1})}),(0,x.jsxs)("div",{className:"chat-call-mcs-local-video__controls",children:[(0,x.jsx)(b.r,{userId:i}),s&&(0,x.jsx)(A,{userId:i})]}),l&&(0,x.jsx)("div",{className:"chat-call-mcs-local-video__badConnectionWrapper",children:(0,x.jsx)(G.j,{userId:i})})]})})});var R=s(81924);let Y=(0,a.memo)(e=>{var{videoRef:t}=e;return(0,x.jsx)("div",{className:"virtual-reality-page-stereo-stream-plane-viewer__container",children:(0,x.jsx)("video",{className:"virtual-reality-page-stereo-stream-plane-viewer__video",autoPlay:!0,playsInline:!0,muted:!0,ref:t,crossOrigin:"anonymous"})})});var V=(0,a.memo)(e=>{var{localMediaStream:t}=e,s=(0,a.useRef)(null);return(0,a.useEffect)(()=>{s.current&&t&&s.current.srcObject!==t&&(s.current.srcObject=t,s.current.play().catch(e=>{var t;if(null!=(t=s.current)&&t.isConnected)throw e}))},[t]),(0,x.jsx)(Y,{videoRef:s})});let P=(0,a.memo)(e=>{var{localMediaStream:t,vrCameraIsActive:s,positionHelperVisible:i}=e,r=(0,a.useMemo)(()=>v()("chat-call-mcs-local-video-vr-view__cameraStatus",{"chat-call-mcs-local-video-vr-view__online":s}),[s]);return(0,x.jsxs)("div",{className:"chat-call-mcs-local-video-vr-view__wrapper",children:[(0,x.jsxs)("div",{className:"chat-call-mcs-local-video-vr-view__cameraStatusContainer",children:[(0,x.jsx)("span",{className:r}),(0,x.jsx)(R.LocalizedText,{href:"/call/mcs#vr-call-camera-status",variant:"body-1",color:"light"})]}),(0,x.jsxs)("div",{className:"chat-call-mcs-local-video-vr-view__videoContainer",children:[(0,x.jsx)("div",{className:"chat-call-mcs-local-video-vr-view__scene",children:(0,x.jsx)(V,{localMediaStream:t})}),i&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("div",{className:"chat-call-mcs-local-video-vr-view__videoOverlay"}),(0,x.jsx)("div",{className:"chat-call-mcs-local-video-vr-view__tooltip",children:(0,x.jsx)(R.LocalizedText,{href:"/call/mcs#vr-camera-position-tooltip",variant:"body-2",color:"light"})})]})]})]})});var Q=s(14321),W=(0,a.memo)(e=>{var{userId:t,vrView:s}=e,m=(0,p.J)(),v=(0,i.J2)(()=>h.T.shared().mcs.callInterface.pipe((0,r.T)(e=>"new-design"===e)),[],!1),b=(0,i.J2)(()=>Q.f.shared(t).userIsFeaturedMember,[t],!1),f=(0,i.J2)(()=>g.M.shared(t).state.pipe((0,n.F)((e,t)=>{var s,a;return(null==(s=e.localTracks.video[0])?void 0:s.id)===(null==(a=t.localTracks.video[0])?void 0:a.id)}),(0,r.T)(e=>{var t=e.localTracks.video[0];if(t){var s=new MediaStream;return s.addTrack(t),s}})),[t]),I=(0,a.useMemo)(()=>["android","ios"].includes((0,B.$5)()),[]),S=(0,i.J2)(()=>g.M.shared(t).state.pipe((0,r.T)(e=>!!e.localTracks.video.length),(0,n.F)()),[t],!1),j=b?I:v&&I||S,w=(0,i.J2)(()=>s?h.T.shared().vrMeets.call.positionHelperTtl.pipe((0,l.n)(e=>(0,u.O)(e).pipe((0,o.u)(!1),(0,d.Z)(!0)))):(0,c.of)(!1),[s],!1),T=v&&!f;return s?(0,x.jsx)(P,{localMediaStream:f,vrCameraIsActive:m,positionHelperVisible:w}):(0,x.jsx)(N,{localMediaStream:f,userId:t,toggleLocalVideoButtonVisible:!b,thumbnailVisible:T,videoVisible:j,newDesignCallInterface:v})})},12404(e,t,s){let a;s.d(t,{r:()=>es});var i=s(42062),r=s(67276),n=s(65428),l=s(66691),o=s(28138),d=s(15654),c=s(43751),u=s(79760),h=s(64147),p=s(72917),m=s(98816),v=s(15526),b=s(56379),g=s(75841),f=s(48830),I=s(84190),S=s(65052),j=s(36580),x=s(33702),w=s.n(x),T={state:"ok"};class y{constructor(e){this.status=b.M.shared(e).initialized.pipe((0,d.F)(),(0,I.n)(t=>t?new f.c(t=>{var s=e=>{t.next(e)},a=b.M.shared(e).localMicSignalStatus;return a&&(t.next(a.getState()),a.addStateListener(s)),()=>{var t;null==(t=b.M.shared(e).localMicSignalStatus)||t.removeStateListener(s)}}):(0,g.of)(T)),(0,S.Z)(T),(0,d.F)(w()),(0,j.t)({refCount:!0,bufferSize:1}))}}y.shared=(0,v.G)(e=>new y(e));var C=s(94415),F=s(55952),_=s(13462),k=s(26584),A=s(34462),O=s(2380),M=s(38792),L=s.n(M),G=s(92495),z=s(16116),E=s(99870),B=s.n(E),D=s(15782),N=s(78903),R=s(97314);let Y={container:"chat-call-mcs-local-mic-signal-tooltip__container",pill:"chat-call-mcs-local-mic-signal-tooltip__pill",pillWarning:"chat-call-mcs-local-mic-signal-tooltip__pillWarning",arrow:"chat-call-mcs-local-mic-signal-tooltip__arrow",arrowLeft:"chat-call-mcs-local-mic-signal-tooltip__arrowLeft",arrowWarning:"chat-call-mcs-local-mic-signal-tooltip__arrowWarning",arrowRight:"chat-call-mcs-local-mic-signal-tooltip__arrowRight",arrowTop:"chat-call-mcs-local-mic-signal-tooltip__arrowTop",arrowBottom:"chat-call-mcs-local-mic-signal-tooltip__arrowBottom",micIconCircle:"chat-call-mcs-local-mic-signal-tooltip__micIconCircle",message:"chat-call-mcs-local-mic-signal-tooltip__message",closeButton:"chat-call-mcs-local-mic-signal-tooltip__closeButton",closeIcon:"chat-call-mcs-local-mic-signal-tooltip__closeIcon",closeIconWarning:"chat-call-mcs-local-mic-signal-tooltip__closeIconWarning"};var V=s(31085),P={muted:"microphone-blocked","no-signal":"microphone","no-speech":"microphone"},Q={muted:"mic-signal-muted-tooltip","no-signal":"mic-signal-no-signal-tooltip","no-speech":"mic-signal-no-speech-tooltip"},W={left:"arrowLeft",right:"arrowRight",top:"arrowTop",bottom:"arrowBottom"};let J=(0,i.memo)(e=>{var{state:t,onCloseButtonClick:s,floatingRef:a,floatingStyles:r,placement:n,arrowRef:l,arrowX:o,arrowY:d}=e,c=(0,D.A)("call",Q[t]),u="no-speech"===t,h=n.startsWith("right")?"left":n.startsWith("left")?"right":n.startsWith("top")?"bottom":"top",p=(0,i.useMemo)(()=>B()(Y.pill,{[Y.pillWarning]:u}),[u]),m=B()(Y.arrow,Y[W[h]],{[Y.arrowWarning]:u}),v=u?"var(--sdv-dark-color)":"var(--sdv-light-color)",b=u?"var(--sdv-dark-color)":"var(--sdv-danger-color)",g=u?"dark":"light";return(0,V.jsx)("div",{ref:a,style:r,className:Y.container,children:(0,V.jsxs)("div",{className:p,children:[(0,V.jsx)("div",{className:Y.micIconCircle,children:(0,V.jsx)(N.Icon,{name:P[t],size:"normal",color:b})}),(0,V.jsx)("div",{className:Y.message,children:(0,V.jsx)(R.E,{variant:"caption-2",color:g,content:c})}),(0,V.jsx)("button",{type:"button",className:Y.closeButton,onClick:s,children:(0,V.jsx)(N.Icon,{name:"thin-cross",size:"small",color:v})}),(0,V.jsx)("div",{ref:l,className:m,style:{left:void 0!==o?o+"px":void 0,top:void 0!==d?d+"px":void 0}})]})})});var q=s(12640);class U{constructor(e){this.userId=e}logShown(e){this.logEvent("mcs-local-mic-signal-tooltip-shown",e)}logClosed(e){this.logEvent("mcs-local-mic-signal-tooltip-closed",e)}logEvent(e,t){q._.shared(this.userId).logEvent(e,Object.assign({},t,{userId:this.userId})).safeSubscribe()}}U.shared=(0,v.G)(e=>new U(e));var K=["userId","attendeeId","callId","state","onCloseButtonClick"],Z={state:"ok"},H=(0,i.memo)(e=>{var{userId:t,attendeeId:s,callId:a,state:r,onCloseButtonClick:n}=e,l=function(e,t){if(null==e)return{};var s={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(t.includes(a))continue;s[a]=e[a]}return s}(e,K),o=(0,i.useRef)(!1),d=(0,i.useRef)(!1),c=(0,i.useRef)(null),u=(0,i.useRef)(t);(0,i.useEffect)(()=>{u.current=t},[t]),(0,i.useEffect)(()=>(o.current=!1,d.current=!1,c.current=null,()=>{o.current&&!d.current&&c.current&&U.shared(u.current).logClosed(Object.assign({},c.current,{reason:"automatic"}))}),[r]),(0,i.useEffect)(()=>
3{if(!o.current&&s&&a){var e={attendeeId:s,type:r,callId:a};U.shared(t).logShown(e),c.current=e,o.current=!0}},[t,s,r,a]);var h=(0,i.useCallback)(()=>{o.current&&!d.current&&c.current&&(d.current=!0,U.shared(t).logClosed(Object.assign({},c.current,{reason:"manual"}))),n()},[t,n]);return(0,V.jsx)(J,Object.assign({},l,{state:r,onCloseButtonClick:h}))}),$=(0,i.memo)(e=>{var t,s,{userId:a,anchorRef:n}=e,c=(0,l.J2)(()=>_.T.shared().mcs.localMicSignalDetectorEnabled,[],!1),u=(0,l.J2)(()=>y.shared(a).status,[a],Z),h=(0,l.J2)(()=>_.T.shared().mcs.callInterface,[]),{audioCall:p,callId:m}=(0,l.J2)(()=>r.M.shared(a).state.pipe((0,o.T)(e=>({audioCall:"voiceonly"===e.callType,callId:e.callId})),(0,d.F)(L())),[a],{audioCall:!1,callId:void 0}),v=(0,l.J2)(()=>r.M.shared(a).attendeeId.pipe((0,I.n)(e=>e?F.K.shared(a).id(e):(0,g.of)(void 0)),(0,d.F)()),[a]),b=(0,z.Z)(G.zh.LteTablet),f=(0,i.useRef)(null),S="new-design"===h?["top-end","bottom","top"]:["left"],j=b&&"new-design"===h?(0,k.UU)({crossAxis:!0,fallbackAxisSideDirection:"start",fallbackPlacements:S}):(0,k.UU)({fallbackPlacements:b?S:p?["bottom","top","right"]:["bottom","top","left"]}),{refs:x,floatingStyles:w,placement:T,middlewareData:M}=(0,A.we)({placement:b?"new-design"===h?"bottom-end":"right":p?"left":"right",strategy:"fixed",whileElementsMounted:O.ll,middleware:[(0,k.cY)(12),j,(0,k.BN)({padding:8}),(0,k.UE)({element:f,padding:8})]});(0,i.useEffect)(()=>{x.setReference(n.current)},[x,n]);var[E,B]=(0,i.useState)(!1);(0,i.useEffect)(()=>{B(!1)},[u]);var D=(0,i.useCallback)(()=>{B(!0)},[]),N=c&&"ok"!==u.state&&!E;return((0,i.useEffect)(()=>{C.l.shared(a).setVisible(N)},[a,N]),(0,i.useEffect)(()=>()=>{C.l.shared(a).setVisible(!1)},[a]),N&&"ok"!==u.state)?(0,V.jsx)(H,{userId:a,attendeeId:v,callId:m,state:u.state,onCloseButtonClick:D,floatingRef:x.setFloating,floatingStyles:w,placement:T,arrowRef:f,arrowX:null==(t=M.arrow)?void 0:t.x,arrowY:null==(s=M.arrow)?void 0:s.y}):null}),X=s(72975),ee=["onClick","userId","audioEnabled"],et=(a=m.Z,(0,i.memo)(e=>{var{onClick:t,userId:s,audioEnabled:r}=e,n=function(e,t){if(null==e)return{};var s={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(t.includes(a))continue;s[a]=e[a]}return s}(e,ee),l=(0,i.useCallback)(function(){X.F.shared(s).logLocalTrackAudioMedia
3ButtonClick("mcs",r),t(...arguments)},[t,s,r]);return(0,V.jsx)(a,Object.assign({},n,{audioEnabled:r,onClick:l}))})),es=(0,i.memo)(e=>{var{userId:t,variant:s}=e,{canOffer:a,rejectOffer:m}=(0,h.g)(p.F.shared(t)),v=(0,l.J2)(()=>_.T.shared().mcs.callInterface,[]),[b,g]=(0,i.useState)(0),f=(0,l.J2)(()=>n.K.shared().microphone.pipe((0,o.T)(e=>!!e)),[],!1),I=(0,l.J2)(()=>r.M.shared(t).state.pipe((0,o.T)(e=>{var t;return!e.localTracks.audioMuted&&!!(null!=(t=e.localTracks.audio[0])&&t.enabled)}),(0,d.F)()),[t],!1),S=(0,l.J2)(()=>n.K.shared().microphone.pipe((0,o.T)(e=>null==e?void 0:e.permission)),[]),j=(0,l.J2)(()=>_.T.shared().mcs.mediaDevicesPermissionsRecoveryInstructionEnabled,[]),x=("denied"===S||b>=2)&&j,w=(0,l.uN)(()=>r.M.shared(t).toggleLocalAudio(),[t]),T=(0,i.useCallback)(()=>{r.M.shared(t).toggleLocalAudio().subscribe(()=>{g(0)},()=>{g(e=>e+1),x?c.Y.shared().get(u.A).actions.open("media-device-permissions-recovery",[{props:{device:"microphone",onPermissionsGranted:w},disableManualClose:!0}]):j||c.Y.shared().get(u.A).actions.open("media-device-blocked-notice",[{props:{state:"microphone-blocked"}}])})},[x,t,j,w]),y=(0,i.useCallback)(()=>{null==m||m()},[m]),C=(0,i.useRef)(null);return f?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(et,{userId:t,tooltipVisible:a,onClick:T,audioEnabled:I,onTooltipCloseButtonClick:y,placement:"new-design"===v?"right":"left",variant:s,buttonRef:C}),(0,V.jsx)($,{userId:t,anchorRef:C})]}):null})},98816(e,t,s){s.d(t,{Z:()=>f});var a=s(42062);let i={id:"sprite-common-b4efbc3a",href:"/app/sprite-common.f91c560d.svg#sprite-common-b4efbc3a",viewBox:"0 0 20 27"};var r=s(27648),n=s(31085);class l extends a.PureComponent{render(){return(0,n.jsx)(r.A,{typeClass:"microphone",icon:i})}}var o=s(82207);class d extends a.PureComponent{render(){return(0,n.jsx)(r.A,{typeClass:"microphone blocked",icon:o.A})}}var c=s(15782),u=s(78186),h=s(61285);let p=(0,a.memo)(e=>{var{onCloseClick:t}=e;return(0,n.jsxs)("div",{className:"chat-call-local-audio-muted-tooltip__container",children:[(0,n.jsx)("button",{className:"chat-call-local-audio-muted-tooltip__button",onClick:t,children:(0,n.jsx)(r.A,{typeClass:"chat-call-local-audio-muted-tooltip__icon",icon:h.A})}),(0,n.jsx)("span",{children:(0,n.jsx)(u.X,{href:"/call#mic-muted"})})]})}),m={container:"chat-call-toggle-local-audio-button-view__container","audio-call":"chat-call-toggle-local-audio-button-view__audio-call",audioDisabled:"chat-call-toggle-local-audio-button-view__audioDisabled",containerRight:"chat-call-toggle-local-audio-button-view__containerRight"};var v=s(78903),b=s(99870),g=s.n(b),f=(0,a.memo)(e=>{var{audioEnabled:t,onClick:s,tooltipVisible:i,onTooltipCloseButtonClick:r,placement:o="left",variant:u="default",buttonRef:h}=e,b=(0,c.A)("dialogs/messages",t?"mic-off":"mic-on"),f=t?(0,n.jsx)(l,{}):(0,n.jsx)(d,{}),I=t?"mic-solid":"mic-blocked-solid",S=(0,a.useMemo)(()=>g()(m.container,m[u],{[m.containerRight]:"right"===o&&"audio-call"!==u,[m.audioDisabled]:!t}),[t,o,u]);return(0,n.jsxs)("div",{className:S,children:[i&&(0,n.jsx)(p,{onCloseClick:r}),(0,n.jsx)("button",{ref:h,title:b,className:"setting-button",onClick:s,children:"audio-call"===u?(0,n.jsx)(v.Icon,{name:I,size:"normal",color:"var(--sdv-light-color)"}):(0,n.jsx)("span",{children:f})})]})})},48634(e,t,s){s.d(t,{u:()=>l});var a=s(42062),i=s(27648),r=s(44212),n=s(31085),l=(0,a.memo)(()=>(0,n.jsx)(i.A,{typeClass:"video-camera blocked",icon:r.A}))},18407(e,t,s){s.d(t,{i:()=>l});var a=s(42062),i=s(27648);let r={id:"sprite-common-da785d7a",href:"/app/sprite-common.f91c560d.svg#sprite-common-da785d7a",viewBox:"0 0 22 15"};var n=s(31085),l=(0,a.memo)(()=>(0,n.jsx)(i.A,{typeClass:"video-camera",icon:r}))},95472(e,t,s){s.d(t,{N:()=>d});var a=s(99870),i=s.n(a),r=s(42062);let n={link:"commons-link__link",dark:"commons-link__dark",dotted:"commons-link__dotted",authorizationOverlay:"commons-link__authorizationOverlay",authorizationOverlayAccent:"commons-link__authorizationOverlayAccent",transparentDark:"commons-link__transparentDark",light:"commons-link__light",secondAccent:"commons-link__secondAccent",accent:"commons-link__accent",active:"commons-link__active",white:"commons-link__white"};var l=s(31085),o=["children","className","colorType","dotted"],d=(0,r.memo)(e=>{var{children:t,className:s,colorType:a="dark",dotted:d}=e,c=function(e,t){if(null==e)return{};var s={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(t.includes(a))continue;s[a]=e[a]}return s}(e,o),u=(0,r.useMemo)(()=>i()(n.link,n[a],{[n.dotted]:!!d},s),[s,a,d]);return(0,l.jsx)("a",Object.assign({className:u},c,{children:t}))})},42213(e,t,s){s.d(t,{g:()=>l});var a=s(43751),i=s(79760),r=s(28138),n=s(15654);function l(){var e=a.Y.shared().get(i.A).store;return e.rxState().pipe((0,r.T)(t=>e.isLeadingToConversion()),(0,n.F)())}},6455(e,t,s){s.d(t,{z:()=>n});var a=s(15526),i=s(97156),r=s(15654);
3class n{constructor(){this.minimizedSubject=new i.t(!1),this.minimized=this.minimizedSubject.asObservable().pipe((0,r.F)())}setMinimized(e){this.minimizedSubject.next(e)}}n.shared=(0,a.G)(()=>new n)},26698(e,t,s){s.d(t,{X:()=>l});var a=s(97156),i=s(98153),r=s(15526),n=s(15654);class l{constructor(){this.chatInputFocusedSubject=new a.t(!1),this.chatInputFocused=this.chatInputFocusedSubject.asObservable().pipe((0,n.F)())}start(e){var t=()=>this.chatInputFocusedSubject.next(!0),s=()=>this.chatInputFocusedSubject.next(!1);i.A.on("event.chat.input.focus",t),i.A.on("event.chat.input.blur",s),e.add(()=>{i.A.removeListener("event.chat.input.focus",t),i.A.removeListener("event.chat.input.blur",s)})}}l.shared=(0,r.G)(()=>new l)},36443(e,t,s){s.d(t,{W:()=>i});var a=s(42062);function i(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],[t,s]=(0,a.useState)({x:0,y:0}),i=(0,a.useCallback)((e,t)=>{s({x:t.x,y:t.y})},[]);return(0,a.useEffect)(()=>{if(e&&screen.orientation){var t=()=>{s(()=>({x:0,y:0}))};return screen.orientation.addEventListener("change",t),()=>{screen.orientation.removeEventListener("change",t)}}},[e]),{position:t,handleStop:i}}},1919(e,t,s){s.d(t,{m:()=>j});var a=s(15526),i=s(89218),r=s(97156),n=s(75841),l=s(34578),o=s(17524),d=s(56823),c=s(39971),u=s(91885),h=s(67276),p=s(13462),m=s(92453),v=s(28138),b=s(15654),g=s(84190),f=s(97983),I=s(36580),S=s(55952);class j extends i.D{constructor(e){super(),this.postponedTimestamp=new r.t(0),this.userId=e,this.canOffer=h.M.shared(this.userId).state.pipe((0,m.M)(e=>{"idle"===e.status&&this.postponedTimestamp.next(0)}),(0,v.T)(e=>{var t;return"speaking"===e.status&&null!=(t=e.callNetworkScores)&&!!t.localPeerHasContinuousIssues&&e.participants[0]}),(0,b.F)(),(0,g.n)(e=>e?(0,l.h)(this.offeringResult.pipe((0,f.u)(!1)),(0,o.z)([p.T.shared().mcs.callScores.badConnectionWarningOfferingCooldownPeriod,this.postponedTimestamp]).pipe((0,g.n)(t=>{var[s,a]=t,i=Date.now()-a;return!a||i>s?(0,n.of)(e):(0,d.O)(s-i).pipe((0,f.u)(e))}),(0,g.n)(e=>S.K.shared(this.userId).id(e)),(0,v.T)(e=>null!=e&&e))):(0,n.of)(!1)),(0,b.F)(),(0,I.t)({bufferSize:1,refCount:!0}))}start(e){return c.v.just(u.Q.success(e))}postpone(){return this.postponedTimestamp.next(Date.now()),c.v.just(u.Q.success())}}j.shared=(0,a.G)(e=>new j(e))},78321(e,t,s){s.d(t,{A:()=>m,I:()=>v});var a=s(88183),i=s.n(a),r=s(43751),n=s(48830),l=s(17524),o=s(28138),d=s(15654),c=s(14321),u=s(65428),h=s(32808),p=s(82483);let m=h.A;class v{constructor(e,t){var s=i().stringify({user:e,attendee:t});this.mediaModel=r.Y.shared().get(h.A,s),this.mediaState=this.mediaModel.store.rxState(),this.userIsFeaturedMember=c.f.shared(e).userIsFeaturedMember,this.camera=u.K.shared().camera,this.localVideo=this.mediaState.pipe((0,o.T)(e=>e.localStream)),this.localVideoEnabled=this.mediaState.pipe((0,o.T)(e=>!!e.localStream)),this.localAudioEnabled=this.mediaState.pipe((0,o.T)(e=>e.audioEnabled),(0,d.F)()),this.localAudioMuted=new n.c(e=>{var t=()=>{e.next(!0)},s=()=>{e.next(!1)};return p.g.shared().source.on("event.stream.mic.muted",t),p.g.shared().source.on("event.stream.mic.ended",t),p.g.shared().source.on("event.stream.mic.unmuted",s),()=>{p.g.shared().source.removeListener("event.stream.mic.muted",t),p.g.shared().source.removeListener("event.stream.mic.ended",t),p.g.shared().source.removeListener("event.stream.mic.unmuted",s)}}).pipe((0,d.F)()),this.remoteVideo=this.mediaState.pipe((0,o.T)(e=>e.remoteStream)),this.remoteVideoEnabled=this.mediaState.pipe((0,o.T)(e=>e.remoteStreamEnabled)),this.hasLocalAudio=this.mediaState.pipe((0,o.T)(e=>!!e.localStream||!!e.localAudioOnlyStream),(0,d.F)()),this.canControlLocalVideo=(0,l.z)([this.camera,this.localVideoEnabled,this.userIsFeaturedMember]).pipe((0,o.T)(e=>{var[t,s,a]=e;return!!t&&"allowed"===t.permission&&(!a||!s)})),this.canControlLocalAudio=(0,l.z)([u.K.shared().microphone,this.hasLocalAudio]).pipe((0,o.T)(e=>{var[t,s]=e;return!!t&&"allowed"===t.permission&&s}))}setLocalVideoEnabled(e){this.mediaModel.actions.setVideoEnabled(e)}setLocalAudioEnabled(e){this.mediaModel.actions.setAudioEnabled(e)}rotateCamera(){this.mediaModel.actions.rotateCamera()}}},16795(e,t,s){s.d(t,{y:()=>o});var a=s(15526),i=s(97156),r=s(54157);
3class n{constructor(e){this.userId=e}uploadImage(e,t){var s="/dialogs/gamification/"+e+"/"+this.userId+"/photos";return r.l.shared().upload(s,t)}}n.shared=(0,a.G)(e=>new n(e));var l=s(92453);class o{constructor(e){this.betsSubject=new i.t({}),this.bets=this.betsSubject.asObservable(),this.userId=e}uploadImage(e,t){return n.shared(this.userId).uploadImage(e,t).pipe((0,l.M)(t=>{"complete"===t.name&&this.betsSubject.next(Object.assign({},this.betsSubject.getValue(),{[e]:t.basename}))}))}resetBet(e){var t=this.betsSubject.getValue();delete t[e],this.betsSubject.next(t)}}o.shared=(0,a.G)(e=>new o(e))},52623(e,t,s){s.d(t,{n:()=>d});var a=s(15526),i=s(89588),r=s(86977),n=s(53940),l=s(28138),o=s(26510);class d{constructor(e){this.userId=e}sendEvent(e,t){return i.h.shared(this.userId).sendEvent(e,t)}events(e){return r.I.shared(this.userId).events("ci:event.call.games").pipe((0,n.p)(t=>t.game===e.name&&t.version===e.version),(0,l.T)(e=>Object.assign({sender:e.sender},(0,o.Gv)(e.arguments))))}}d.shared=(0,a.G)(e=>new d(e))},34504(e,t,s){s.d(t,{V:()=>a});class a{}},78624(e,t,s){s.d(t,{YL:()=>T});var a=s(15526),i=s(13462),r=s(28138),n=s(15654),l=s(84190),o=s(36580),d=s(38107),c=s(97156),u=s(17524),h=s(75841),p=s(58731),m=s(43751),v=s(10845),b=s(67276),g=s(55952),f=s(89588),I=s(86977),S=s(14321),j=s(79942),x="call-games",w="last-game-timestamp";class T{constructor(e){this.lastGames=new d.m(1),this.activeGameSubject=new c.t(void 0),this.activeGame=this.activeGameSubject.asObservable(),this.gameCanBeAcceptedSubject=ne
3w d.m(1),this.userId=e,this.patientPeer=S.f.shared(e).userIsFeaturedMember,this.attendeeId=(0,u.z)([m.Y.shared().get(v.A,this.userId).store.rxState().pipe((0,r.T)(e=>"speaking"===e.status?e.attendee:void 0),(0,n.F)()),b.M.shared(this.userId).state.pipe((0,r.T)(e=>{if("speaking"===e.status)return e.participants[0]}),(0,n.F)(),(0,l.n)(e=>e?g.K.shared(this.userId).id(e):(0,h.of)(void 0)))]).pipe((0,r.T)(e=>{var[t,s]=e;return t||s}),(0,n.F)(),(0,o.t)({bufferSize:1,refCount:!0}));var t=e=>(0,u.z)([i.T.shared().callGames.lastGameThreshold,this.lastGames]).pipe((0,r.T)(t=>{var[s,a]=t,i=a[e];return!i||Date.now()-i>s}),(0,n.F)());this.availableGames=i.T.shared().callGames.enabled.pipe((0,l.n)(e=>e?this.attendeeId.pipe((0,l.n)(e=>e?t(e).pipe((0,l.n)(t=>t?f.h.shared(this.userId).checkAvailability(e):(0,h.of)([])),(0,r.T)(e=>e.length?Object.values(T.games).filter(t=>!!e.find(e=>e.name===t.gameMeta.name&&e.version===t.gameMeta.version)).map(e=>e.gameMeta.name):[])):(0,h.of)([]))):(0,h.of)([])),(0,n.F)(),(0,o.t)({refCount:!0,bufferSize:1})),this.gameCanBeAccepted=(0,u.z)([this.activeGame,this.attendeeId]).pipe((0,l.n)(e=>{var[t,s]=e;return s?t?this.gameCanBeAcceptedSubject.asObservable():(0,h.of)(!0):(0,h.of)(!1)}),(0,n.F)())}static registerGame(e){T.games[e.gameMeta.name]=e}checkAvailability(e){return f.h.shared(this.userId).checkAvailability(e).pipe((0,j.vV)(e=>!!e.length))}start(e){e.add(p.y.shared(x,this.userId).load(w).safeSubscribe(e=>{this.lastGames.next(e||{})})),e.add(I.I.shared(this.userId).events("ci:event.call.games.availability.check").pipe((0,l.n)(e=>{var t=Object.values(T.games).map(e=>e.gameMeta);return f.h.shared(this.userId).sendAvailability(e.sender,t)})).safeSubscribe())}setActiveGame(e){this.activeGameSubject.next(e)}setGameCanBeAccepted(e){this.gameCanBeAcceptedSubject.next(e)}setLastGameFor(e){return this.lastGames.toSingle().pipe((0,j.Fg)(t=>{var s=Object.assign({},t,{[e]:Date.now()});return this.lastGames.next(s),p.y.shared(x,this.userId).store(w,s)}))}}T.shared=(0,a.G)(e=>new T(e)),T.games={}},76259(e,t,s){s.d(t,{Eu:()=>T});var a=s(15526),i=s(34504),r=s(39971),n=s(97156),l=s(82788),o=s(56823),d=s(17524),c=s(78624),u=s(79942),h=s(52623),p=s(5801),m=s(28138),v=s(15654),b=s(53940),g=s(84190),f=s(50626),I=s(97983),S=s(14321),j=s(13462),x=["commando","sex-on-first-date","shameful-pleasures","cheat","like-bad-boys","like-your-body","like-attention","chat-buddy-is-hot","cross-dress","partners-underwear","role-playing","sleep-naked","striptease","erotic-massage","night-with-me"],w=["tell-about-choice","reason-for-choice","more-details","share-story","what-liked-exactly","what-else","their-choice","what-else-they-like","had-experience","want-the-same"];class T extends i.V{getDefaultState(){return{step:"idle",questions:[]}}constructor(e){var t;super(),this.stateSubject=new n.t(this.getDefaultState()),this.state=this.stateSubject.asObservable(),this.userId=e,this.state.pipe((0,m.T)(e=>"idle"!==e.step),(0,v.F)()).safeSubscribe(e=>{t&&t.unsubscribe(),e&&(t=new l.yU,this.startEventListeners(t))})}startEventListeners(e){e.add(c.YL.shared(this.userId).activeGame.safeSubscribe(e=>{e&&e!==T.gameMeta.name&&this.resetGame()})),e.add(h.n.shared(this.userId).events(T.gameMeta).safeSubscribe(e=>{if("initialized"===e.command&&this.stateSubject.next(Object.assign({},this.stateSubject.getValue(),{step:"game",activeQuestionIndex:0,gameStep:"question"})),"cancel"===e.command&&this.resetGame(),"turn"===e.command){var t=this.stateSubject.getValue();if("game"===t.step){var s=t.questions.map((t,s)=>s===e.index?Object.assign({},t,{attendeeAnswer:e.answer}):t);this.stateSubject.next(Object.assign({},t,{questions:s}))}}if("extraDiscussion"===e.command){var a=this.stateSubject.getValue();"game"===a.step&&"question"===a.gameStep&&this.stateSubject.next(Object.assign({},a,{gameStep:"extraDiscussion",activeQuestionIndex:a.activeQuestionIndex-1}))}if("nextQuestion"===e.command){var i=this.stateSubject.getValue();"game"===i.step&&"extraDiscussion"===i.gameStep&&this.stateSubject.next(Object.assign({},i,{gameStep:"question",activeQuestionIndex:i.activeQuestionIndex+1}))}})),e.add(c.YL.shared(this.userId).attendeeId.safeSubscribe(e=>{e||this.resetGame()})),e.add(this.state.pipe((0,b.p)(e=>{if("game"===e.step){var{gameStep:t,questions:s,activeQuestionIndex:a}=e;return"question"===t&&void 0!==s[a].userAnswer&&void 0!==s[a].attendeeAnswer}return!1}),(0,g.n)(()=>j.T.shared().callGames.neverHaveIEver.discussionStepTransitionDelay.pipe((0,g.n)(e=>(0,o.O)(e)))),(0,g.n)(()=>S.f.shared(this.userId).userIsFeaturedMember)).safeSubscribe(e=>{var t=this.stateSubject.getValue();"game"===t.step&&this.stateSubject.next(Object.assign({},t,{gameStep:e?"attendeeDiscussion":"userDiscussion"}))})),e.add(this.state.pipe((0,f.J)(),(0,b.p)(e=>{var[t,s]=e;return"game"===t.step&&"question"===t.gameStep&&"game"===s.step&&("attendeeDiscussion"===s.gameStep||"userDiscussion"===s.gameStep)}),(0,g.n)(e=>{var[,t]=e;return j.T.shared().callGames.neverHaveIEver.discussionTtl.pipe((0,g.n)(e=>(0,o.O)(e).pipe((0,I.u)(t))))})).safeSubscribe(e=>{"game"===e.step&&this.stateSubject.next(Object.assign({},e,{gameStep:"userDiscussion"===e.gameStep?"attendeeDiscussion":"userDiscussion"}))})),e.add(this.state.pipe((0,f.J)(),(0,b.p)(e=>{var[t,s]=e;return"game"===t.step&&("attendeeDiscussion"===t.gameStep||"userDiscussion"===t.gameStep)&&"game"===s.step&&("attendeeDiscussion"===s.gameStep||"userDiscussion"===s.gameStep)}),(0,g.n)(e=>{var[,t]=e;return j.T.shared().callGames.neverHaveIEver.discussionTtl.pipe((0,g.n)(e=>(0,o.O)(e).pipe((0,I.u)(t))))})).safeSubscribe(e=>{"game"===e.step&&(e.activeQuestionIndex===e.questions.length-1?this.stateSubject.next(Object.assign({},e,{step:"result"})):this.stateSubject.next(Object.assign({},e,{gameStep:"question",activeQuestionIndex:e.activeQuestionIndex+1})))})),e.add((0,d.z)([this.state,c.YL.shared(this.userId).patientPeer]).pipe((0,m.T)(e=>{var[t,s]=e;return"result"===t.step||"initializing"===t.step&&s}),(0,v.F)()).safeSubscribe(e=>{c.YL.shared(this.userId).setGameCanBeAccepted(e)}))}generateRandomQuestions(e){var t=w.map(e=>e).sort(()=>.5-Math.random()).slice(0,e);return x.map(e=>e).sort(()=>.5-Math.random()).slice(0,e).map((e,s)=>({key:e,discussionPhraseKey:t[s]}))}resetGame(){this.stateSubject.next(this.getDefaultState())}startGame(){return(0,d.z)([c.YL.shared(this.userId).activeGame,c.YL.shared(this.userId).attendeeId,j.T.shared().callGames.neverHaveIEver.questionsCount]).toSingle().pipe((0,u.Fg)(e=>{var[t,s,a]=e;return t||!s?r.v.just():this.state.toSingle().pipe((0,u.Fg)(e=>{if("idle"===e.step){c.YL.shared(this.userId).setActiveGame(T.gameMeta.name);var t=this.generateRandomQuestions(a);return this.stateSubject.next({step:"initializing",questions:t}),h.n.shared(this.userId).sendEvent(T.gameMeta,{command:"initialize",attendee:s,questions:t})}return r.v.just()}
3))}))}joinGame(e){return r.v.defer(()=>(this.stateSubject.next({step:"initializing",questions:e}),c.YL.shared(this.userId).setActiveGame(T.gameMeta.name),c.YL.shared(this.userId).attendeeId.pipe((0,p.o)()).toSingle().pipe((0,u.Fg)(e=>h.n.shared(this.userId).sendEvent(T.gameMeta,{command:"initialized",attendee:e})),(0,u.ex)(()=>{this.stateSubject.next(Object.assign({},this.stateSubject.getValue(),{step:"game",gameStep:"question",activeQuestionIndex:0}))}))))}cancelGame(){return c.YL.shared(this.userId).attendeeId.toSingle().pipe((0,u.Fg)(e=>e?h.n.shared(this.userId).sendEvent(T.gameMeta,{command:"cancel",attendee:e}):r.v.just()),(0,u.ex)(()=>{this.resetGame()}))}restartGame(){return this.resetGame(),this.startGame()}makeTurn(e){return(0,d.z)([this.state,c.YL.shared(this.userId).attendeeId]).toSingle().pipe((0,u.Fg)(t=>{var[s,a]=t;if(a&&"game"===s.step&&!s.questions[s.activeQuestionIndex].userAnswer){var i=s.questions.map((t,a)=>a===s.activeQuestionIndex?Object.assign({},t,{userAnswer:e}):t);return this.stateSubject.next(Object.assign({},this.stateSubject.getValue(),{questions:i})),h.n.shared(this.userId).sendEvent(T.gameMeta,{command:"turn",attendee:a,answer:e,index:s.activeQuestionIndex})}return r.v.just()}))}openExtraDiscussion(){var e=this.stateSubject.getValue();if("game"!==e.step)return r.v.just();var{gameStep:t,questions:s,activeQuestionIndex:a}=e;return"question"===t&&void 0!==s[a].userAnswer||0===a?r.v.just():(this.stateSubject.next(Object.assign({},e,{gameStep:"extraDiscussion",activeQuestionIndex:a-1})),c.YL.shared(this.userId).attendeeId.toSingle().pipe((0,u.Fg)(e=>e?h.n.shared(this.userId).sendEvent(T.gameMeta,{command:"extraDiscussion",attendee:e}):r.v.just())))}nextQuestion(){var e=this.stateSubject.getValue();return"game"===e.step&&"extraDiscussion"===e.gameStep?c.YL.shared(this.userId).attendeeId.toSingle().pipe((0,u.Fg)(e=>e?h.n.shared(this.userId).sendEvent(T.gameMeta,{command:"nextQuestion",attendee:e}):r.v.just()),(0,u.ex)(()=>{this.stateSubject.next(Object.assign({},e,{gameStep:"question",activeQuestionIndex:e.activeQuestionIndex+1}))})):r.v.just()}}T.gameMeta={name:"never-have-i-ever",version:"1.0.0"},T.shared=(0,a.G)(e=>new T(e))},18175(e,t,s){s.d(t,{t:()=>k});var a=s(15526),i=s(34504),r=s(39971),n=s(97156),l=s(82788),o=s(75841),d=s(56823),c=s(17524),u=s(56607),h=s(79942),p=s(78624),m=s(5801),v=s(28138),b=s(15654),g=s(36580),f=s(84190),I=s(97983),S=s(53940),j=s(56177),x=s(6797),w=s(16795),T=s(52623),y=s(33702),C=s.n(y),F=s(13462),_=["x","o"];class k extends i.V{getDefaultState(){return{step:"idle",bets:{user:void 0,attendee:void 0},turnAvailable:!1,board:this.createBoard()}}constructor(e){var t;super(),this.stateSubject=new n.t(this.getDefaultState()),this.getDiagonalMoves=e=>{for(var t=[],s=[],a=[],i=0;i<e.length;i++)for(var r=0;r<e.length;r++)i===r&&s.push(e[i][r]);for(var n=0;n<e.length;n++)for(var l=0;l<e.length;l++)n+l===e.length-1&&a.push(e[n][l]);return t.push(s,a),t},this.hasWinCombinations=(e,t)=>{var s=e.some(e=>e.every(e=>e===t)),a=e.map((t,s)=>e.map(e=>e[s])).some(e=>e.every(e=>e===t)),i=this.getDiagonalMoves(e).some(e=>e.every(e=>e===t));return s||a||i},this.getBoardResult=(e,t)=>this.hasWinCombinations(e,t.user)?"win":this.hasWinCombinations(e,t.attendee)?"lose":e.every(e=>e.every(e=>!!e))?"draw":void 0,this.userId=e,this.state=this.stateSubject.asObservable().pipe((0,v.T)(e=>{var t=e.attributes?this.getBoardResult(e.board,e.attributes):void 0;return Object.assign({},e,{result:t,step:t?"result":e.step})}),(0,b.F)(C()),(0,g.t)({bufferSize:1,refCount:!0})),this.state.pipe((0,v.T)(e=>"idle"!==e.step),(0,b.F)()).safeSubscribe(e=>{t&&t.unsubscribe(),e&&(t=new l.yU,this.startEventListeners(t))}),this.yourTurnNotificationAvailable=this.state.pipe((0,v.T)(e=>"game"===e.step&&e.turnAvailable),(0,b.F)(),(0,f.n)(e=>e?F.T.shared().callGames.ticTacToe.yourTurnNotificationShowDelay.pipe((0,f.n)(e=>(0,d.O)(e)),(0,I.u)(!0)):(0,o.of)(!1)))}generateAttributes(){var e=_[Math.round(Math.random())],t=_.find(t=>t!==e);return{user:e,attendee:t}}createBoard(){return[void 0,void 0,void 0].map(()=>[,,,].fill(void 0))}resetGame(){this.stateSubject.next(this.getDefaultState())}startGame(){return p.YL.shared(this.userId).activeGame.toSingle().pipe((0,h.Fg)(e=>e?r.v.just():this.state.toSingle().pipe((0,h.Fg)(e=>{if("idle"===e.step){p.YL.shared(this.userId).setActiveGame(k.gameMeta.name);var t=this.generateAttributes();return this.stateSubject.next(Object.assign({},this.stateSubject.getValue(),{step:"initializing",attributes:t,turnAvailable:(null==t?void 0:t.user)==="x"})),p.YL.shared(this.userId).attendeeId.toSingle().pipe((0,h.Fg)(e=>e&&null!=t&&t.attendee?T.n.shared(this.userId).sendEvent(k.gameMeta,{command:"initialize",attendee:e,attribute:t.attendee}):r.v.just()))}return r.v.just()}
3))))}joinGame(e){return r.v.defer(()=>{p.YL.shared(this.userId).setActiveGame(k.gameMeta.name);var t=_.find(t=>t!==e);return this.stateSubject.next(Object.assign({},this.getDefaultState(),{step:"initializing",attributes:{user:e,attendee:t},turnAvailable:"x"===e})),p.YL.shared(this.userId).attendeeId.pipe((0,m.o)()).toSingle().pipe((0,h.Fg)(e=>T.n.shared(this.userId).sendEvent(k.gameMeta,{command:"initialized",attendee:e})),(0,h.ex)(()=>{this.stateSubject.next(Object.assign({},this.stateSubject.getValue(),{step:"image-choosing"}))}))})}restartGame(){return this.resetGame(),this.startGame()}cancelGame(){return p.YL.shared(this.userId).attendeeId.toSingle().pipe((0,h.Fg)(e=>e?T.n.shared(this.userId).sendEvent(k.gameMeta,{command:"cancel",attendee:e}):r.v.just()),(0,h.ex)(()=>{this.resetGame()}))}makeTurn(e,t){return(0,c.z)([this.state,p.YL.shared(this.userId).attendeeId]).toSingle().pipe((0,h.Fg)(s=>{var a,[i,n]=s;return i.turnAvailable&&!i.board[e][t]&&n?(i.board[e][t]=null==(a=i.attributes)?void 0:a.user,this.stateSubject.next(Object.assign({},i,{turnAvailable:!1})),T.n.shared(this.userId).sendEvent(k.gameMeta,{command:"turn",row:e,column:t,attendee:n})):r.v.just()}))}startEventListeners(e){e.add(p.YL.shared(this.userId).activeGame.safeSubscribe(e=>{e&&e!==k.gameMeta.name&&this.resetGame()})),e.add(p.YL.shared(this.userId).attendeeId.safeSubscribe(e=>{e||this.resetGame()})),e.add(T.n.shared(this.userId).events(k.gameMeta).safeSubscribe(e=>{"initialized"===e.command&&this.stateSubject.next(Object.assign({},this.stateSubject.getValue(),{step:"image-choosing"})),"cancel"===e.command&&this.resetGame()})),e.add((0,c.z)([this.state.pipe((0,S.p)(e=>"initializing"===e.step)),w.y.shared(this.userId).bets,p.YL.shared(this.userId).attendeeId.pipe((0,m.o)())]).safeSubscribe(e=>{var[,t,s]=e;t[s]&&this.stateSubject.next(Object.assign({},this.stateSubject.getValue(),{bets:Object.assign({},this.stateSubject.getValue().bets,{user:t[s]})}))})),e.add((0,c.z)([this.state,p.YL.shared(this.userId).attendeeId]).pipe((0,f.n)(e=>{var[t,s]=e;return"image-choosing"===t.step&&t.bets.user&&s?T.n.shared(this.userId).sendEvent(k.gameMeta,{command:"send-image",image:t.bets.user,attendee:s}):u.w})).safeSubscribe()),e.add(T.n.shared(this.userId).events(k.gameMeta).safeSubscribe(e=>{"send-image"===e.command&&this.stateSubject.next(Object.assign({},this.stateSubject.getValue(),{bets:Object.assign({},this.stateSubject.getValue().bets,{attendee:e.image})}))})),e.add(this.state.pipe((0,S.p)(e=>"image-choosing"===e.step),(0,f.n)(e=>e.bets.user&&e.bets.attendee?F.T.shared().callGames.ticTacToe.gameStepTransitionDelay.pipe((0,f.n)(e=>(0,d.O)(e))):u.w)).safeSubscribe(()=>{this.stateSubject.next(Object.assign({},this.stateSubject.getValue(),{step:"game"}))})),e.add(T.n.shared(this.userId).events(k.gameMeta).pipe((0,f.n)(e=>"turn"!==e.command?u.w:this.state.pipe((0,j.s)(1),(0,v.T)(t=>{var{board:s,attributes:a}=t;return s[e.row][e.column]=null==a?void 0:a.attendee,s})))).safeSubscribe(e=>{this.stateSubject.next(Object.assign({},this.stateSubject.getValue(),{board:e,turnAvailable:!0}))})),e.add(p.YL.shared(this.userId).attendeeId.pipe((0,m.o)(),(0,f.n)(e=>this.state.pipe((0,x.w)("result"),(0,S.p)(e=>"win"===e.result||"lose"===e.result),(0,I.u)(e)))).safeSubscribe(e=>{w.y.shared(this.userId).resetBet(e)})),e.add((0,c.z)([this.state,p.YL.shared(this.userId).patientPeer]).pipe((0,v.T)(e=>{var[t,s]=e;return"result"===t.step||"initializing"===t.step&&s}),(0,b.F)()).safeSubscribe(e=>{p.YL.shared(this.userId).setGameCanBeAccepted(e)}))}}k.gameMeta={name:"tic-tac-toe",version:"1.0.0"},k.shared=(0,a.G)(e=>new k(e))},66732(e,t,s){s.d(t,{G:()=>b});var a=s(15526),i=s(53940),r=s(84190),n=s(28138),l=s(15654),o=s(50626),d=s(56177),c=s(97156),u=s(34578),h=s(82483),p=s(43751),m=s(10845),v=s(67276);class b{constructor(e){this.interruptWarningCanShownSubject=new c.t({value:!1}),this.interruptWarningCanShown=this.interruptWarningCanShownSubject.asObservable(),this.userId=e}showInterruptWarning(){this.interruptWarningCanShownSubject.next({value:!0})}hideInterruptWarning(e){this.interruptWarningCanShownSubject.next({value:!1,resolution:e})}interrupt(e){var t=p.Y.shared().get(m.A,this.userId).store.getState();"idle"!==t.status&&"ringing"!==t.status&&h.g.shared().emit("command.chat.media.interrupt",t.attendee,e&&{cta:e})}start(e){var t=()=>{"connecting"===p.Y.shared().get(m.A,this.userId).store.getState().status&&this.interrupt()};h.g.shared().addListener("event.call.payment.canceled",t),e.add(()=>{h.g.shared().removeListener("event.call.payment.canceled",t)}),e.add(this.interruptWarningCanShownSubject.pipe((0,i.p)(e=>e.value),(0,r.n)(()=>(0,u.h)(v.M.shared(this.userId).state.pipe((0,n.T)(e=>e.status),(0,l.F)(),(0,o.J)(),(0,n.T)(e=>{var[t,s]=e;return"idle"!==t&&"idle"===s}),(0,i.p)(e=>e),(0,d.s)(1)),p.Y.shared().get(m.A,this.userId).store.rxState().pipe((0,n.T)(e=>e.status),(0,l.F)(),(0,o.J)(),(0,n.T)(e=>{var[t,s]=e;return"idle"!==t&&"idle"===s}),(0,i.p)(e=>e),(0,d.s)(1))))).safeSubscribe(()=>{this.hideInterruptWarning()}))}}b.shared=(0,a.G)(e=>new b(e))},72917(e,t,s){s.d(t,{F:()=>S});var a=s(89218),i=s(15526),r=s(67276),n=s(28138),l=s(84190),o=s(15654),d=s(97983),c=s(14321),u=s(75841),h=s(34578),p=s(17524),m=s(39971),v=s(91885),b=s(43751),g=s(10845),f=s(78321),I=s(13462);class S extends a.D{constructor(e){super();var t=b.Y.shared().get(g.A,e).store.rxState().pipe((0,n.T)(e=>"speaking"===e.status?e.attendee:void 0)).pipe((0,l.n)(t=>t?new f.I(e,t).localAudioMuted:(0,u.of)(!1)),(0,o.F)());this.canOffer=(0,h.h)(this.offeringResult.pipe((0,d.u)(!1)),c.f.shared(e).userIsFeaturedMember.pipe((0,l.n)(s=>s?(0,p.z)([r.M.shared(e).state.pipe((0,n.T)(e=>!!e.localTracks.audioMuted)),t,I.T.shared().mcs.localMicSignalDetectorEnabled]).pipe((0,n.T)(e=>{var[t,s,a]=e;return t&&!a||s}
3)):(0,u.of)(!1)),(0,o.F)()))}start(){return m.v.just(v.Q.success({}))}}S.shared=(0,i.G)(e=>new S(e))},72975(e,t,s){s.d(t,{F:()=>r});var a=s(15526),i=s(12640);class r{constructor(e){this.userId=e}logLocalTrackAudioMediaButtonClick(e,t){i._.shared(this.userId).logEvent(e+"-call-local-audio-media-button-click",{trackEnabledBeforeClick:t}).safeSubscribe()}logLocalTrackVideoMediaButtonClick(e,t){i._.shared(this.userId).logEvent(e+"-call-local-video-media-button-click",{trackEnabledBeforeClick:t}).safeSubscribe()}}r.shared=(0,a.G)(e=>new r(e))},84409(e,t,s){s.d(t,{P:()=>n});var a=s(15526),i=s(97156),r=s(15654);class n{constructor(){this.minimizedSubject=new i.t(!1),this.minimized=this.minimizedSubject.asObservable().pipe((0,r.F)())}setMinimized(e){this.minimizedSubject.next(e)}}n.shared=(0,a.G)(()=>new n)},27793(e,t,s){s.d(t,{g:()=>a.g});var a=s(42213)},94415(e,t,s){s.d(t,{l:()=>n});var a=s(15526),i=s(97156),r=s(15654);class n{constructor(e){this.visibleSubject=new i.t(!1),this.visible=this.visibleSubject.asObservable().pipe((0,r.F)())}setVisible(e){this.visibleSubject.next(e)}}n.shared=(0,a.G)(e=>new n(e))},42402(e,t,s){s.d(t,{O:()=>G});var a=s(89218),i=s(39971),r=s(91885),n=s(38107),l=s(34578),o=s(75841),d=s(56823),c=s(17524),u=s(53940),h=s(15526),p=s(58731),m=s(79942),v=s(62170),b=s(15654),g=s(36580),f=s(84190),I=s(28138),S=s(65052),j=s(66640),x=s(49073),w=s(56177),T=s(33702),y=s.n(T),C=s(94375),F=s(84321),_=s(66342),k=s(29015),A=s(13462),O="call-speech-to-text-button-tooltip-offering",M="welcome-tooltip-offered",L=3*C.b.second;class G extends a.D{constructor(e){super(),this.welcomeAlreadyOfferedSubject=ne
3w n.m(1),this.userId=e;var t=(0,l.h)(p.y.shared(O,this.userId).load(M).asObservable(),this.welcomeAlreadyOfferedSubject).pipe((0,b.F)(),(0,g.t)({bufferSize:1,refCount:!0})),s=A.T.shared().mcs.callSpeechToText.interface.pipe((0,f.n)(e=>t.pipe((0,f.n)(t=>t&&"default"===e?(0,o.of)(void 0):(0,d.O)(L).pipe((0,f.n)(()=>k.xN.shared(this.userId).state),(0,f.n)(e=>e.available?(0,o.of)(!e.enabled):v.o.shared(this.userId).state.pipe((0,b.F)((e,t)=>!!(null!=e&&e.callId)&&e.callId===(null==t?void 0:t.callId)),(0,I.T)(e=>e&&!e.userEnabled))),(0,I.T)(e=>e?"welcome":void 0),(0,S.Z)(void 0)))))),a=k.xN.shared(this.userId).state.pipe((0,f.n)(e=>e.available?(0,o.of)(e.callId):v.o.shared(this.userId).state.pipe((0,I.T)(e=>null==e?void 0:e.callId))),(0,b.F)(),(0,f.n)(e=>e?s:(0,o.of)(void 0))),i=v.o.shared(this.userId).state.pipe((0,b.F)((e,t)=>(null==e?void 0:e.callId)===(null==t?void 0:t.callId)&&(null==e?void 0:e.userEnabled)===(null==t?void 0:t.userEnabled)&&(null==e?void 0:e.initiatorUserId)===(null==t?void 0:t.initiatorUserId)&&(null==e?void 0:e.userId)===(null==t?void 0:t.userId)),(0,f.n)(e=>null!=e&&e.userEnabled&&e.initiatorUserId!==e.userId?this.offer.pipe((0,b.F)(y()),(0,I.T)(e=>e?void 0:"info"),(0,j.v)(e=>!!e),(0,x.q)(void 0)):(0,o.of)(void 0))),r=e=>e?this.offer.pipe((0,I.T)(t=>t?void 0:e)):(0,o.of)(void 0);this.canOfferType=(0,c.z)([i,a]).pipe((0,I.T)(e=>{var t;return null!=(t=e.find(e=>!!e))?t:void 0}),(0,f.n)(e=>{if(!e)return(0,o.of)(void 0);var t=(0,c.z)([F.n.shared().visible,_.A.shared().visible]).pipe((0,I.T)(t=>t.some(Boolean)?void 0:e));return A.T.shared().mcs.callSpeechToText.interface.pipe((0,f.n)(e=>"new"===e?t.pipe((0,u.p)(Boolean),(0,w.s)(1)):t))}),(0,f.n)(r),(0,b.F)(),(0,g.t)({bufferSize:1,refCount:!0})),this.canOffer=(0,l.h)(this.canOfferType,this.offeringResult.pipe((0,I.T)(()=>!1))).pipe((0,I.T)(e=>!!e),(0,b.F)(),(0,g.t)({bufferSize:1,refCount:!0}))}start(){return this.canOfferType.toSingle().pipe((0,m.Fg)(e=>"welcome"===e?p.y.shared(O,this.userId).store(M,!0).pipe((0,m.ex)(()=>this.welcomeAlreadyOfferedSubject.next(!0)),(0,m.AB)(r.Q.success(e))):"info"===e?i.v.just(r.Q.success(e)):i.v.just(r.Q.failure("offer-not-allowed"))))}}G.shared=(0,h.G)(e=>new G(e))},66342(e,t,s){s.d(t,{A:()=>n});var a=s(15526),i=s(97156),r=s(15654);class n{constructor(){this.visibleSubject=new i.t(!1),this.visible=this.visibleSubject.asObservable().pipe((0,r.F)())}setVisible(e){this.visibleSubject.next(e)}}n.shared=(0,a.G)(()=>new n)},69386(e,t,s){s.d(t,{g:()=>O});var a=s(89218),i=s(91885),r=s(38107),n=s(17524),l=s(75841),o=s(15526),d=s(58731),c=s(79942),u=s(62170),h=s(28138),p=s(15654),m=s(36580),v=s(65052),b=s(53193),g=s(53940),f=s(49073),I=s(84190),S=s(34578),j=s(27793),x=s(33702),w=s.n(x),T=s(66342),y=s(48733),C=s(29015),F=s(56379),_=s(67276),k="call-speech-to-text-settings-popup-offering",A="offered";class O extends a.D{constructor(e){super(),this.initiallyShownSubject=new r.m(1),this.userId=e;var t=(0,S.h)(d.y.shared(k,this.userId).load(A).asObservable(),this.initiallyShownSubject).pipe((0,h.T)(e=>!!e),(0,p.F)(),(0,m.t)({bufferSize:1,refCount:!0})),s=y.T.shared(this.userId).offeringResult.pipe((0,h.T)(e=>"accepted"===e.result),(0,v.Z)(!1)),a=(0,n.z)([(0,j.g)(),t,s]).pipe((0,h.T)(e=>{var[t,s,a]=e;return!t&&(!s||a)}),(0,b.Q)(T.A.shared().visible.pipe((0,g.p)(Boolean))),(0,f.q)(!1)),i=(0,S.h)(F.M.shared(this.userId).speechToSpeechConfigRequired.pipe((0,h.T)(e=>({translationType:"speech-to-speech",callId:e}))),C.xN.shared(this.userId).state.pipe((0,I.n)(e=>e.available&&e.enabled&&!e.locale&&e.callId?_.M.shared(this.userId).state.pipe((0,h.T)(t=>{var s="idle"!==t.status&&"voiceonly"===t.callType;return{callId:e.callId,forceShow:s,translationType:"speech-to-speech"}})):(0,l.of)(!1)))),o=u.o.shared(this.userId).state.pipe((0,h.T)(e=>null!=e&&!!e.callId&&!!e.userEnabled&&{callId:e.callId,forceShow:!1,translationType:"speech-to-text"}));this.canOffer=(0,S.h)(this.offeringResult.pipe((0,h.T)(()=>!1)),(0,n.z)([i,o]).pipe((0,h.T)(e=>{var[t,s]=e;return t||s}))).pipe((0,p.F)(w()),(0,I.n)(e=>{var{callId:t,translationType:s,forceShow:i}=e||{};return i?(0,l.of)({translationType:s}):t?a.pipe((0,h.T)(e=>!!e&&{translationType:s})):(0,l.of)(!1)}),(0,v.Z)(!1),(0,p.F)(w()),(0,m.t)({bufferSize:1,refCount:!0}))}start(e){var{translationType:t}=e;return d.y.shared(k,this.userId).store(A,!0).pipe((0,c.ex)(()=>this.initiallyShownSubject.next(!0)),(0,c.AB)(i.Q.success({translationType:t})))}}O.shared=(0,o.G)(e=>new O(e))},84321(e,t,s){s.d(t,{n:()=>n});var a=s(15526),i=s(97156),r=s(15654);
3class n{constructor(){this.visibleSubject=new i.t(!1),this.visible=this.visibleSubject.asObservable().pipe((0,r.F)())}setVisible(e){this.visibleSubject.next(e)}}n.shared=(0,a.G)(()=>new n)},48733(e,t,s){s.d(t,{T:()=>L});var a=s(89218),i=s(75841),r=s(97156),n=s(64733),l=s(56823),o=s(17524),d=s(15526),c=s(62170),u=s(29015),h=s(84190),p=s(28138),m=s(15654),v=s(82019),b=s(56177),g=s(53193),f=s(53940),I=s(49073),S=s(65052),j=s(36580),x=s(94375),w=s(39971),T=s(91885),y=s(27793),C=s(33702),F=s.n(C),_=s(85378),k=s(55952),A=s(84321),O=s(66342),M=15*x.b.second;class L extends a.D{getUserBrowserLanguage(e){return k.K.shared(this.userId).id(e).asObservable().pipe((0,h.n)(e=>e?_.F.shared(e).cachedProfile:(0,i.of)(void 0)),(0,p.T)(e=>{var t;return null==e||null==(t=e.value)?void 0:t.browserLanguage}))}constructor(e){super(),this.callIds=new Set,this.callIdsUpdated=new r.t(void 0),this.userId=e;var t=c.o.shared(this.userId).state.pipe((0,h.n)(e=>null!=e&&e.attendeeId&&e.userId?(0,n.y)(this.getUserBrowserLanguage(e.attendeeId),this.getUserBrowserLanguage(e.userId)):(0,i.of)(void 0)),(0,p.T)(e=>{if(!e||e.some(e=>!e))return!0;var[t,s]=e;return t===s}),(0,m.F)()),s=u.xN.shared(this.userId).state.pipe((0,h.n)(e=>{if(e.participantsIds.length>1){var t=e.participantsIds.map(e=>this.getUserBrowserLanguage(e));return(0,n.y)(...t)}return(0,i.of)(void 0)}),(0,p.T)(e=>!!(!e||e.some(e=>!e))||e.every(t=>t===e[0])),(0,m.F)()),a=(0,l.O)(M).pipe((0,v.K)((0,o.z)([c.o.shared(this.userId).state.pipe((0,b.s)(1)),t,(0,y.g)(),this.callIdsUpdated])),(0,p.T)(e=>{var[t,s,a]=e;return!(!t||s||this.callIds.has(t.callId))&&!a&&{callId:t.callId,translationType:"speech-to-text"}}),(0,g.Q)(A.n.shared().visible.pipe((0,f.p)(Boolean))),(0,g.Q)(c.o.shared(this.userId).state.pipe((0,f.p)(e=>!!(null!=e&&e.userEnabled)))),(0,I.q)(!1)),d=(0,l.O)(M).pipe((0,v.K)((0,o.z)([u.xN.shared(this.userId).state.pipe((0,b.s)(1)),s,(0,y.g)(),O.A.shared().visible.pipe((0,b.s)(1)),this.callIdsUpdated])),(0,p.T)(e=>{var[t,s,a,i]=e;return!(!t.available||!t.callId||s||this.callIds.has(t.callId))&&!a&&!i&&{callId:t.callId,translationType:"speech-to-speech"}}),(0,g.Q)(A.n.shared().visible.pipe((0,f.p)(Boolean))),(0,g.Q)(u.xN.shared(this.userId).state.pipe((0,f.p)(e=>e.enabled))),(0,I.q)(!1)),x=c.o.shared(this.userId).state.pipe((0,p.T)(e=>null==e?void 0:e.callId),(0,m.F)(),(0,h.n)(e=>e?a:(0,i.of)(!1))),w=u.xN.shared(this.userId).state.pipe((0,p.T)(e=>e.callId),(0,m.F)(),(0,h.n)(e=>e?d:(0,i.of)(!1)));this.canOffer=u.xN.shared(this.userId).state.pipe((0,p.T)(e=>e.available),(0,m.F)(),(0,h.n)(e=>e?w:x),(0,S.Z)(!1),(0,m.F)(F()),(0,j.t)({bufferSize:1,refCount:!0}))}start(e){var{callId:t,translationType:s}=e;return this.callIds.add(t),this.callIdsUpdated.next(),w.v.just(T.Q.success({callId:t,translationType:s}))}}L.shared=(0,d.G)(e=>new L(e))},93580(e,t,s){s.d(t,{l:()=>r});var a=s(15526),i=s(92211);class r{constructor(e){this.cheerMap=new Map}get(e){return this.cheerMap.get(e)}remove(e){this.cheerMap.delete(e)}start(e){e.add(i.N.shared().cheerSendRequestedIntent.safeSubscribe(e=>{var{messageTag:t,cheer:s}=e;this.cheerMap.set(t,Object.assign({},s))}))}}r.shared=(0,a.G)(e=>new r(e))},32210(e,t,s){s.d(t,{u:()=>H});var a=s(15526),i=s(89218),r=s(39971),n=s(97156),l=s(17524),o=s(75841),d=s(56823),c=s(56607),u=s(34578),h=s(84190),p=s(44383),m=s(28138),v=s(97983),b=s(50626),g=s(65052),f=s(15654),I=s(53940),S=s(18228),j=s(66640),x=s(36580),w=s(27585),T=s(33702),y=s.n(T),C=s(13462),F=s(29109),_=s(21512),k=s(41910),A=s(87902),O=s(66382),M=s(46662),L=s(58705),G=s(14789),z=s(91885),E=s(79942),B=s(10845),D=s(43751),N=s(67276),R=s(66342),Y=s(84321),V=s(55952),P=s(46280),Q=s(92211),W=s(84401),J=s(44150),q=s(93580),U=s(65615),K=s(27888),Z=[K.N.OpenLetter,K.N.WatchPhoto,K.N.WatchVideo,K.N.ListenAudio];class H extends i.D{constructor(e){super(),this.rejectedOfferings=new n.t({});var t=(0,l.z)([O.j.shared().chatAttendee,C.T.shared().fastBuyInChat]).pipe((0,h.n)(t=>{var[s,a]=t;return s?a["chat-with-attendee-is-active"]?(0,l.z)([F.u.shared(e).activeChats,(0,o.of)(!1)]).pipe((0,p.S)((e,t)=>e&&s&&!e[0].includes(s)&&t[0].includes(s)?[t[0],!0]:[t[0],!1]),(0,m.T)(e=>{var[t,a]=e;return[!!s&&!!t.length&&t.includes(s),a]}),(0,h.n)(e=>{var[t,s]=e;return s&&t?(0,d.O)(a["offering-delay-after-start-chat"]).pipe((0,v.u)(t)):(0,o.of)(t)})):(0,l.z)([k.K.shared(e).balance,A.t.shared().model(e)]).pipe((0,m.T)(e=>{var[t,s]=e;return"services"===s?t.messages:t.credits}),(0,b.J)(),(0,m.T)(e=>{var[t,s]=e;return t!==s}),(0,g.Z)(!1)):(0,o.of)(!1)}),(0,f.F)()),s=C.T.shared().fastBuyInChat.pipe((0,h.n)(e=>e["show-on-refilling-cancel"]?U.Q.shared().balanceRefillingResult.pipe((0,I.p)(e=>!e.result.isSuccessful&&Z.includes(e.reason.name)),(0,h.n)(e=>O.j.shared().chatAttendee.pipe((0,m.T)(t=>t===e.reason.attendeeId),(0,f.F)(),(0,S.j)(e=>!e),(0,j.v)(e=>e,!0)))):c.w)),a=_.n.shared(e).settings.pipe((0,m.T)(e=>!!e&&e.enabled&&e.available),(0,f.F)()),i=G.P.shared(e).prefersCredits.pipe((0,h.n)(t=>M.he.shared(e).packages(void 0,t?"nosubscription":"common")),(0,f.F)(y()),(0,x.t)({bufferSize:1,refCount:!0})),r=(0,l.z)([i,C.T.shared().fastBuyLastPackageEnabled,C.T.shared().carouselPackages.enabled,A.t.shared().model(e)]).pipe((0,h.n)(e=>{var[t,s,a,i]=e;if(!t.length)return(0,o.of)(void 0);if(s)return(0,o.of)(t.find(e=>e.allowFastbuy));if(a){var r=t.filter(e=>!e.subscription);return r.length?(0,P.J)(r,"services"===i?"messages":"credits"):(0,o.of)(void 0)}return(0,o.of)(t.find(e=>!e.subscription))}),(0,f.F)(y())),T=i.pipe((0,m.T)(e=>!!e.length&&e.some(e=>e.methods.some(e=>"apple"===e||"google"===e))),(0,f.F)()),z=L.J.shared(e).cards.pi
3pe((0,m.T)(e=>!!e.length)),E=i.pipe((0,m.T)(e=>e.some(e=>!e.subscription&&e.creditsAmount>0)),(0,f.F)()),K=(0,l.z)([C.T.shared().cheersFastBuyEnabled,a,E,z]).pipe((0,m.T)(e=>{var[t,s,a,i]=e;return t&&!s&&a&&i}),(0,f.F)(),(0,x.t)(1)),H=N.M.shared(e).state.pipe((0,m.T)(e=>e.status),(0,f.F)()),$=D.Y.shared().get(B.A,e).store.rxState().pipe((0,m.T)(e=>e.status),(0,f.F)()),X=(0,l.z)([H,$]).pipe((0,m.T)(e=>{var[t,s]=e;return"idle"!==t||"idle"!==s})),ee=(0,l.z)([D.Y.shared().get(B.A,e).store.rxState().pipe((0,m.T)(e=>"speaking"===e.status?e.attendee:void 0),(0,f.F)()),N.M.shared(e).state.pipe((0,m.T)(e=>"speaking"===e.status?e.participants[0]:void 0),(0,f.F)(),(0,h.n)(t=>t?V.K.shared(e).id(t):(0,o.of)(void 0)))]).pipe((0,m.T)(e=>{var[t,s]=e;return t||s}),(0,g.Z)(void 0),(0,b.J)(),(0,h.n)(e=>{var[t,s]=e;return!s&&t?C.T.shared().callCreditsFastBuyInChat.delayAfterCallEnd.pipe((0,h.n)(e=>(0,d.O)(e)),(0,v.u)(void 0)):(0,o.of)(s)})),et=t=>(0,l.z)([this.rejectedOfferings.asObservable(),C.T.shared().fastBuyInChat,A.t.shared().model(e)]).pipe((0,h.n)(s=>{var[a,i,r]=s;return k.K.shared(e).balance.pipe((0,m.T)(e=>{let s;if(!t)return!1;var n=(s="services"===r?e.messages:e.credits)>=i["min-balance-for-offering"]&&s<=i["max-balance-for-offering"];return a[t]&&!n&&this.rejectedOfferings.next({}),!a[t]&&n}))})),es=(0,l.z)([R.A.shared().visible,Y.n.shared().visible]).pipe((0,m.T)(e=>e.some(Boolean))),ea=C.T.shared().fastBuyInChatEnabled.pipe((0,h.n)(e=>e?(0,l.z)([(0,u.h)(t,s),a,r,z,O.j.shared().chatAttendee,X,T,C.T.shared().fastBuyLastPackageEnabled,C.T.shared().carouselPackages.enabled]).pipe((0,h.n)(e=>{var[t,s,a,i,r,n,l,d,c]=e;return t&&!s&&a&&(i||l)&&!n?et(r).pipe((0,f.F)(),(0,m.T)(e=>!!e&&!!r&&Object.assign({attendeeId:r,reason:"chat"},(d||c)&&{sku:a.sku}))):(0,o.of)(!1)}),(0,f.F)(y())):(0,o.of)(!1))),ei=C.T.shared().callCreditsFastBuyInChat.enabled.pipe((0,h.n)(t=>t?(0,l.z)([a,r,z,ee,C.T.shared().carouselPackages.enabled]).pipe((0,h.n)(t=>{var[s,a,i,r,n]=t;return!s&&a&&i&&r?(0,l.z)([C.T.shared().callCreditsFastBuyInChat.balanceThreshold,C.T.shared().callCreditsFastBuyInChat.audioCallBalanceThreshold,k.K.shared(e).balance,N.M.shared(e).callIsAudioOnly.toSingle()]).pipe((0,m.T)(e=>{var[t,s,a,i]=e;return i?[a.credits<=s,i]:[a.credits<=t,i]}),(0,f.F)(y()),(0,h.n)(e=>{var[t,s]=e;return t?C.T.shared().callCreditsFastBuyInChat.delayAfterCallStart.pipe((0,h.n)(e=>(0,d.O)(e)),(0,v.u)(Object.assign({attendeeId:r,reason:s?"audio-call":"call"},n&&{sku:a.sku}))):(0,o.of)(!1)})):(0,o.of)(!1)}),(0,h.n)(e=>e?es.pipe((0,m.T)(t=>!t&&e)):(0,o.of)(!1)),(0,f.F)(y())):(0,o.of)(!1))),er=Q.N.shared().sendCheerIntent.pipe((0,I.p)(e=>e.status===W.R.Unpaid&&"chat-resend"!==e.cta&&!!e.price),(0,w.E)(K),(0,I.p)(e=>{var[,t]=e;return t}),(0,h.n)(t=>{var[s]=t,a=q.l.shared(e).get(s.id);return a?J.$.shared(s.recipientId).findByReference(a.basename).asObservable().pipe((0,I.p)(e=>!!e),(0,m.T)(e=>({attendeeId:s.recipientId,cheer:e,resendMessageTag:s.id}))):c.w})),en=Q.N.shared().sendCheerIntent.pipe((0,I.p)(e=>e.status===W.R.Delivered)),el=(0,u.h)(this.offeringResult,O.j.shared().chatAttendee,en).pipe((0,v.u)(null)),eo=(0,u.h)(er,el).pipe((0,g.Z)(null),(0,f.F)(y())).pipe((0,m.T)(e=>!!(null!=e&&e.attendeeId)&&{attendeeId:e.attendeeId,reason:"cheers",cheer:e.cheer,resendMessageTag:e.resendMessageTag}),(0,g.Z)(!1),(0,f.F)(y())),ed=(0,l.z)([eo,ea,ei]).pipe((0,m.T)(e=>{var[t,s,a]=e;return t||s||a}));this.canOffer=(0,u.h)(ed,this.offeringResult.pipe((0,m.T)(()=>!1))).pipe((0,g.Z)(!1),(0,f.F)(),(0,x.t)(1))}start(e){return r.v.just(z.Q.success(e))}accept(){return r.v.just(z.Q.success())}reject(e){return["call","audio-call","cheers"].includes(e.reason)?r.v.just(z.Q.success()):this.rejectedOfferings.toSingle().pipe((0,E.ex)(t=>{this.rejectedOfferings.next(Object.assign({},t,{[e.attendeeId]:!0}))})).pipe((0,E.AB)(z.Q.success()))}}H.shared=(0,a.G)(e=>new H(e))},50006(e,t,s){s.d(t,{LY:()=>v,SY:()=>p,ji:()=>m});var a=s(15526),i=s(4126),r=s(39971),n=s(79942);function l(e,t,s,a,i,r,n){try{var l=e[r](n),o=l.value}catch(e){return void s(e)}l.done?t(o):Promise.resolve(o).then(a,i)}class o{loadDeepARWeb(){var e=this;return r.v.defer(()=>{var t;return r.v.from((t=function*(){return e.deepARWeb||(e.deepARWeb=yield s.e("3135").then(s.t.bind(s,31314,23))),e.deepARWeb},function(){var e=this,s=arguments;return new Promise(function(a,i){var r=t.apply(e,s);function n(e){l(r,a,i,n,o,"next",e)}function o(e){l(r,a,i,n,o,"throw",e)}n(void 0)})})())})}loadFilter(e){return(0,i.v)(()=>this.loadDeepARWeb().pipe((0,n.ex)(t=>{t.changeDeepARFilter(e)}),(0,n.AB)(void 0)))}unloadFilter(){return(0,i.v)(()=>this.loadDeepARWeb().pipe((0,n.ex)(e=>{e.changeDeepARFilter(null)}),(0,n.AB)(void 0)))}}o.shared=(0,a.G)(()=>new o);var d=s(75841),c=s(97156),u=s(92453),h=s(84190),p=["basic","glasses","crown","pendant_w","aviators","cap","cowboy","earrings","hat","headphones","helmet","male_crown","male_mask","mask","necklace"],m="basic";class v{constructor(){this.filters=(0,d.of)(p),this._isLoaded=new c.t(!1),this.isLoaded=this._isLoaded.asObservable()}load(e){return o.shared().loadFilter(e).pipe((0,u.M)(()=>this._isLoaded.next(!0)))}unload(){return this._isLoaded.pipe((0,h.n)(e=>e?o.shared().unloadFilter().pipe((0,u.M)(()=>this._isLoaded.next(!1))):(0,d.of)(void 0)))}}v.shared=(0,a.G)(()=>new v)},15135(e,t,s){s.d(t,{E:()=>r});var a=s(15526),i=s(8733);
3class r{constructor(){this.paymentResultSubject=new i.B,this.paymentResult=this.paymentResultSubject.asObservable()}complete(e){this.paymentResultSubject.next(e)}}r.shared=(0,a.G)(()=>new r)},20750(e,t,s){s.d(t,{Y:()=>n});var a=s(40961),i=s(27888),r=s(79942),n=e=>a.J.shared().refillBalance(e||{name:i.N.UseCase}).toSingle().pipe((0,r.AB)(void 0))},47281(e,t,s){s.d(t,{y:()=>m});var a=s(38107),i=s(97156),r=s(34578),n=s(75841),l=s(15654),o=s(36580),d=s(28138),c=s(15526),u=s(50006),h=s(39971),p=s(79942);class m{constructor(){this.filterSubject=new a.m(1),this.filterIsLoadingSubject=new i.t(!1),this.filterIsLoading=this.filterIsLoadingSubject.asObservable(),this.filterIsEnabledSubject=new i.t(!0),this.filter=(0,r.h)((0,n.of)(u.ji),this.filterSubject.asObservable()).pipe((0,l.F)(),(0,o.t)({bufferSize:1,refCount:!0})),this.active=this.filter.pipe((0,d.T)(e=>e!==u.ji)),this.enabled=this.filterIsEnabledSubject.asObservable()}setFilter(e){return this.filterIsLoadingSubject.next(!0),this.filter.toSingle().pipe((0,p.Fg)(t=>e===t?(this.filterIsLoadingSubject.next(!1),h.v.just(void 0)):u.LY.shared().load(e).toSingle().pipe((0,p.ex)(()=>{this.filterIsLoadingSubject.next(!1),this.filterSubject.next(e),this.filterIsEnabledSubject.next(!0)}))))}unsetFilter(){return u.LY.shared().unload().toSingle().pipe((0,p.ex)(()=>{this.filterIsLoadingSubject.next(!1),this.filterSubject.next(u.ji)}))}toggle(){return this.enabled.toSingle().pipe((0,p.Fg)(e=>e?u.LY.shared().unload().toSingle().pipe((0,p.ex)(()=>{this.filterIsEnabledSubject.next(!1)})):this.filter.toSingle().pipe((0,p.Fg)(e=>u.LY.shared().load(e).toSingle().pipe((0,p.ex)(()=>{this.filterIsEnabledSubject.next(!0)}))))))}}m.shared=(0,c.G)(()=>new m)},33079(e,t,s){s.d(t,{L:()=>d});var a,i=s(63578),r=s(8733),n=s(15526),l=s(79942);class o{constructor(){this.viewProfileIntentSubject=new r.B,this.viewProfileIntent=this.viewProfileIntentSubject.asObservable(),this.viewProfileCompletedSubject=ne
3w r.B,this.viewProfileCompleted=this.viewProfileIntentSubject.asObservable()}intercept(e){this.viewProfileIntentSubject.next(e)}complete(e){this.viewProfileCompletedSubject.next(e)}}o.shared=(0,n.G)(()=>new o);var d=(a=i.L,(e,t)=>(o.shared().intercept(e),a(e,t).pipe((0,l.Zl)(()=>{o.shared().complete(e)}))))},43141(e,t,s){s.d(t,{J:()=>d});var a=s(75841),i=s(66691),r=s(28138),n=s(91994),l=s(96333),o=s(22065);function d(){var e=(0,n.w)(),t=(0,o.$)(e||void 0);return(0,i.J2)(()=>e&&t?l._.shared(e).presence(t).pipe((0,r.T)(e=>!!(null!=e&&e.devices.includes("vr")))):(0,a.of)(!1),[t,e],!1)}},61285(e,t,s){s.d(t,{A:()=>a});let a={id:"sprite-common-40760697",href:"/app/sprite-common.f91c560d.svg#sprite-common-40760697",viewBox:"0 0 24 24"}}}]); 4//# sourceMappingURL=sourcemaps/4338.66714974e531bedb.js.map 5//# debugId=0da5cebc-3aa9-55db-8f59-4365a2d65463
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.