Loading
function(e,t,n){n.d(t,{A:()=>s});var l=n(636537),i=n(451988),r=n(228366),a=n(546183),u=n(652215);let o=new i.OC(c,e=>a.default.getFetchStateForApplication(e)!==a.FetchState.FETCHING);async function c(e){r.h.dispatch({type:"USER_AUTHORIZED_APPS_REQUEST",request:null==e?{type:"full"}:{type:"partial",applicationIds:e}}),await l.Bo.get({url:u.Rsh.OAUTH2_TOKENS,oldFormErrors:!0,rejectWithError:!0,query:{application_ids:e}}).then(t=>r.h.dispatch({type:"USER_AUTHORIZED_APPS_UPDATE",isFullFetch:null==e,tokens:function(e,t){let n=Object.fromEntries(t?.map(e=>[e,null])??[]);for(let t of e)n[t.application.id]=t;return n}(t.body,e)}),()=>r.h.dispatch({type:"USER_AUTHORIZED_APPS_REQUEST_FAILED",request:null==e?{type:"full"}:{type:"partial",applicationIds:e}}))}let s={fetch(e){a.default.getFetchState()!==a.FetchState.FETCHING&&(null!=e?o.queue(e):(o.reset(),c()))},delete(e){l.Bo.del({url:u.Rsh.OAUTH2_TOKEN(e),oldFormErrors:!0,rejectWithError:!0}).then(()=>{this.fetch()})}}}