Module 651753

3,440 characters · in no known chunk
Dependencies
Required by (3)
Lazily required by (0)none
Lazily requires (0)none
Source Raw
function(e,t,n){"use strict";n.d(t,{A:()=>h,e:()=>u});var i,r=n(635377),s=n.n(r),a=n(994369),o=n(17928),l=n(228366),u=((i={})[i.FETCHING=0]="FETCHING",i[i.FETCHED=1]="FETCHED",i[i.ERROR=2]="ERROR",i);function c(e){let{query:t,guildId:n,page:i,pageSize:r,categoryId:s,integrationType:o,minUserInstallCommandCount:l,excludeAppsWithCustomInstallUrl:u,excludeNonEmbeddedApps:c,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:d,source:_=a.V.APP_DIRECTORY}=e;return`query:'${t}' guildId:${n} page:${i} pageSize:${r} categoryId:${s} integrationType:${o} minUserInstallCommandCount:${l} excludeAppsWithCustomInstallUrl:${u} excludeNonEmbeddedApps:${c} excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:${d} source:${_}`}let d=new(s())({max:20}),_={};class f extends o.Ay.Store{static displayName="ApplicationDirectorySearchStore";getSearchResults(e){let{query:t,guildId:n,page:i,pageSize:r,categoryId:s,integrationType:a,minUserInstallCommandCount:o,excludeAppsWithCustomInstallUrl:l,excludeNonEmbeddedApps:u,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:_,source:f}=e,h=c({query:t,guildId:n,page:i,pageSize:r,categoryId:s,integrationType:a,minUserInstallCommandCount:o,excludeAppsWithCustomInstallUrl:l,excludeNonEmbeddedApps:u,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:_,source:f});return d.get(h)}getFetchState(e){let{query:t,guildId:n,page:i,pageSize:r,categoryId:s,integrationType:a,minUserInstallCommandCount:o,excludeAppsWithCustomInstallUrl:l,excludeNonEmbeddedApps:u,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:d,source:f}=e;return _[c({query:t,guildId:n,page:i,pageSize:r,categoryId:s,integrationType:a,minUserInstallCommandCount:o,excludeAppsWithCustomInstallUrl:l,excludeNonEmbeddedApps:u,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:d,source:f})]}}let h=new f(l.h,{APPLICATION_DIRECTORY_FETCH_SEARCH:function(e){let{query:t,guildId:n,page:i,pageSize:r,categoryId:s,integrationType:a,minUserInstallCommandCount:o,excludeAppsWithCustomInstallUrl:l,excludeNonEmbeddedApps:u,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:d,source:f}=e,h=c({query:t,guildId:n,page:i,pageSize:r,categoryId:s,integrationType:a,minUserInstallCommandCount:o,excludeAppsWithCustomInstallUrl:l,excludeNonEmbeddedApps:u,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:d,source:f});_={..._,[h]:0}},APPLICATION_DIRECTORY_FETCH_SEARCH_SUCCESS:function(e){let{query:t,guildId:n,page:i,pageSize:r,categoryId:s,result:a,integrationType:o,minUserInstallCommandCount:l,excludeAppsWithCustomInstallUrl:u,excludeNonEmbeddedApps:f,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:h,source:p}=e,E=c({query:t,guildId:n,page:i,pageSize:r,categoryId:s,integrationType:o,minUserInstallCommandCount:l,excludeAppsWithCustomInstallUrl:u,excludeNonEmbeddedApps:f,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:h,source:p});d.set(E,{lastFetchTimeMs:Date.now(),...a}),_={..._,[E]:1}},APPLICATION_DIRECTORY_FETCH_SEARCH_FAILURE:function(e){let{query:t,guildId:n,page:i,pageSize:r,categoryId:s,integrationType:a,minUserInstallCommandCount:o,excludeAppsWithCustomInstallUrl:l,excludeNonEmbeddedApps:u,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:d,source:f}=e,h=c({query:t,guildId:n,page:i,pageSize:r,categoryId:s,integrationType:a,minUserInstallCommandCount:o,excludeAppsWithCustomInstallUrl:l,excludeNonEmbeddedApps:u,excludeEmbeddedAppsWithoutPrimaryEntryPointAppCommand:d,source:f});_={..._,[h]:2}}})}