try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`ab128ec8-b847-4fb6-8abf-73808031d9b0`,e._sentryDebugIdIdentifier=`sentry-dbid-ab128ec8-b847-4fb6-8abf-73808031d9b0`)}catch{}import"./rolldown-runtime-nx40z1zs.js";import{u as e}from"./vendor-misc-dys7qi6h.js";import{Fs as t,Js as n,Xs as r}from"./entry.client-mpghtlrl.js";import{B as i}from"./workspace-leaf-files-oergw4h0.js";import{a}from"./redux-boot-core-pd6f4ovn.js";import{t as o}from"./dist-om7x3958.js";var s=e(),c=o();t();var l=class extends a{hasConsumedSignInAction=!1;get canBeRemoved(){return this.pluginCount===0}pluginCount=0;constructor(e,t,n,r,a,o){super(e,i,o),this.xblTokenProvider=t,this.cVProvider=n,this.interceptors=r,this.logger=a;let l=new c.SeededSeqNumProvider(0);this.chatSocketSagaManager=new c.ChatSocketSagaManager([],l,new s.ReconnectingWebSocketFactory,this.xblTokenProvider,this.cVProvider,this.logger,this.interceptors)}destroy(){}*handleActions(){yield n([this.chatSocketSagaManager.watchForActions()])}addPlugin(e){return new Promise((t,n)=>{let i=this;this.reduxEnvironment.sagaMiddleware.run(this.name,function*(){try{let n=yield r([i.chatSocketSagaManager,i.chatSocketSagaManager.addPlugin],e);i.pluginCount++,t(n)}catch(e){n(e)}})})}removePlugin(e){return new Promise((t,n)=>{let i=this;this.reduxEnvironment.sagaMiddleware.run(this.name,function*(){try{yield r([i.chatSocketSagaManager,i.chatSocketSagaManager.removePlugin],e),i.pluginCount--,t()}catch(e){n(e)}})})}socketConnected(){return this.chatSocketSagaManager.isConnected}};export{l as ChatSocketPlugin};