Build 573682stable
Module 987144
1,934 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";n.d(t,{g:()=>p}),n(321073);var i=n(627968);n(64700);var r=n(231723),s=n(192308),a=n(820739),o=n(73825),l=n(277984),u=n(287809),d=n(178368),c=n(97352),_=n(473145),h=n(212637),f=n(652215);let E="apply-guild-boost-modal";async function p(e){let{analyticsLocations:t,analyticsLocation:p,analyticsSourceLocation:m,numberOfBoostsToAdd:g,onClose:A,onLoading:I,closeLayer:T,onSubscriptionConfirmation:S,onSubscribeComplete:N,guild:C,handleSubscribeModalClose:y,disablePremiumUpsell:v,inPopout:R,applicationId:O,intent:b}=e,L=R?r.KX:r.SY,D=u.default.getCurrentUser();if(null==D)return;if(!D.verified)return void(0,s.openModalLazy)(async()=>{let{default:e}=await Promise.all([n.e("54681"),n.e("74913"),n.e("12206"),n.e("90406")]).then(n.bind(n,661925));return t=>{let{onClose:n,...r}=t;return(0,i.jsx)(e,{...r,onClose:n})}},{contextKey:L});let P=[];c.A.isLoadedForPremiumSKUs()||P.push((0,o.zS)()),d.A.hasFetched||(P.push(l.hP()),P.push((0,a.CD)())),P.length>0&&(I?.(!0),await Promise.allSettled(P),I?.(!1));let w=(0,_.D$)(d.A.boostSlots),M=w.length;function x(e){A?.(),y?.(e)}if(M>0&&(null==g||M>=g)){let e;1===M?e=w.slice(0,1):null!=g&&(e=w.slice(0,g)),await (0,s.openModalLazy)(async()=>{let{default:t}=await Promise.all([n.e("26142"),n.e("39281"),n.e("58164"),n.e("71470"),n.e("10943"),n.e("95602"),n.e("22455"),n.e("18710"),n.e("34428"),n.e("38249")]).then(n.bind(n,724624));return n=>{let{onClose:r,...s}=n;return(0,i.jsx)(t,{...s,onClose:e=>{r(),x(e)},selectedGuild:C,locationSection:f.liQ.PREMIUM_GUILD_USER_MODAL,guildBoostSlots:e,intent:b})}},{modalKey:E,onCloseRequest:()=>{(0,s.closeModal)(E),x(!1)},contextKey:L})}else(0,h.A)({analyticsLocations:t,analyticsLocation:p,analyticsSourceLocation:m,guildId:C.id,closeLayer:function(){A?.(),T?.()},totalNumberOfSlotsToAssign:g??1,onCloseModal:x,disablePremiumUpsell:v,onSubscriptionConfirmation:S,onSubscribeComplete:N,inPopout:R,applicationId:O,intent:b})}}