Module 382483

2,111 characters · in no known chunk
Dependencies
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{Wq:()=>u,i$:()=>A,un:()=>f});var i=n(51906),r=n(636537),a=n(228366),s=n(38405),l=n(385113),o=n(652215);async function d(){a.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_FEATURED_FETCH_START"});try{let e=await r.Bo.get({url:o.Rsh.WIDGET_CONFIGS_FEATURED,rejectWithError:!0});a.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_FEATURED_FETCH_SUCCESS",applications:e.body.applications,configs:e.body.configs})}catch(e){throw a.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_FEATURED_FETCH_FAILURE"}),s.A.captureException(e),e}}let c=new i.Zy;function u(){let{force:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e||l.A.getFeaturedFetchState()!==l.e.SUCCESS?c.one(void 0,d,{force:e}):Promise.resolve()}async function _(){a.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_DEVELOPER_FETCH_START"});try{let e=await r.Bo.get({url:o.Rsh.WIDGET_CONFIGS_DEVELOPER,rejectWithError:!0});a.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_DEVELOPER_FETCH_SUCCESS",applications:e.body.applications,configs:e.body.configs})}catch(e){throw a.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_DEVELOPER_FETCH_FAILURE"}),s.A.captureException(e),e}}let E=new i.Zy;function A(){let{force:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e||l.A.getDeveloperFetchState()!==l.e.SUCCESS?E.one(void 0,_,{force:e}):Promise.resolve()}async function h(e){a.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_FETCH_START",applicationId:e});try{let t=(await r.Bo.get({url:o.Rsh.APPLICATION_WIDGET_CONFIGS(e),rejectWithError:!0})).body;a.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_FETCH_SUCCESS",applicationId:e,applications:function(e){let t=new Map;for(let n of e)null!=n.application&&t.set(n.application.id,n.application);return Array.from(t.values())}(t),configs:t})}catch(t){throw a.h.dispatch({type:"APPLICATION_WIDGET_CONFIG_FETCH_FAILURE",applicationId:e}),s.A.captureException(t),t}}let I=new i.Zy;function f(e){let{force:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=l.A.getFetchState(e);return t||n!==l.e.SUCCESS?I.one(e,()=>h(e),{force:t}):Promise.resolve()}}