Build 545032stable
Module 107773
7,003 characters · in 73ec101fb858d1ed.jsDependencies
Source Raw
function(r,t,o){o.d(t,{A:()=>j});var e=o(627968);o(64700);var i=o(503698),s=o.n(i),l=o(17928),n=o(661531),a=o(462887),u=o(306471),c=o(478016),d=o(565787),E=o(332837),_=o(998445),C=o(834730),f=o(781696),A=o(939249),I=o(404374),p=o(509536),h=o(814925),g=o(363195),m=o(696451),N=o(287809),R=o(816166),T=o(953727);function D(r){let{width:t=10,height:o=10,color:i="currentColor",...s}=r;return(0,e.jsxs)("svg",{...(0,T.A)(s),width:t,height:o,viewBox:"0 0 17 22",fill:i,xmlns:"http://www.w3.org/2000/svg",children:[(0,e.jsxs)("g",{filter:"url(#filter0_d_1296_1706)",children:[(0,e.jsx)("path",{opacity:"0.55",d:"M8.49999 3.7998L4.85999 7.4398V12.5598L8.49999 16.1998L12.14 12.5598V7.4398L8.49999 3.7998ZM10.32 11.7998L8.49999 13.6265L6.67999 11.8065V8.19314L8.49999 6.37314L10.32 8.19314V11.7998Z",fill:"white"}),(0,e.jsx)("path",{opacity:"0.8",d:"M6.67999 8.19354V11.8069L8.49999 13.6269L10.32 11.8069V8.19354L8.49999 6.37354L6.67999 8.19354Z",fill:"white"}),(0,e.jsx)("path",{d:"M8.5 3.7998V6.37314L10.32 8.19314L12.14 7.4398L8.5 3.7998Z",fill:"white"})]}),(0,e.jsx)("defs",{children:(0,e.jsxs)("filter",{id:"filter0_d_1296_1706",x:"-3.5",y:"-1",width:"24",height:"24",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,e.jsx)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,e.jsx)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,e.jsx)("feOffset",{dy:"1"}),(0,e.jsx)("feGaussianBlur",{stdDeviation:"2"}),(0,e.jsx)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),(0,e.jsx)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_1296_1706"}),(0,e.jsx)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_1296_1706",result:"shape"})]})})]})}var w=o(473145),x=o(426983),L=o(176128),b=o(375708);function O(r,t){let o=t===L.qo.PUBLIC?b.intl.string(b.t.op2cJ6):t===L.qo.APPLY_TO_JOIN?b.intl.string(b.t.YwZfbt):b.intl.string(b.t.TME4LJ);switch(r){case x._.STAFF:return{tooltipTitle:b.intl.string(b.t.lMrv96),tooltipSubtitle:b.intl.string(b.t.lMrv96),tooltipDescription:b.intl.string(b.t.lMrv96)};case x._.VERIFIED:return{tooltipTitle:b.intl.string(b.t.K7iRig),tooltipSubtitle:b.intl.string(b.t.iCehw9),tooltipDescription:o};case x._.PARTNERED:return{tooltipTitle:b.intl.string(b.t.K7iRig),tooltipSubtitle:b.intl.string(b.t.hfYfEE),tooltipDescription:o};case x._.VERIFIED_AND_PARTNERED:return{tooltipTitle:b.intl.string(b.t.K7iRig),tooltipSubtitle:b.intl.string(b.t["TX+iFC"]),tooltipDescription:o};case x._.COMMUNITY:return{tooltipTitle:b.intl.string(b.t.K7iRig),tooltipDescription:o};case x._.DISCOVERABLE:return{tooltipTitle:b.intl.string(b.t.K7iRig),tooltipDescription:b.intl.string(b.t.op2cJ6)};default:return{tooltipTitle:b.intl.string(b.t["iZRkC/"])}}}var M=o(652215),v=o(40544);let F={[x._.STAFF]:{IconComponent:u.V,foregroundDarkColor:n.A.unsafe_rawColors.WHITE.css,foregroundLightColor:n.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:n.A.unsafe_rawColors.GREEN_360.css,backgroundLightColor:n.A.unsafe_rawColors.GREEN_360.css},[x._.VERIFIED_AND_PARTNERED]:{IconComponent:c.U,foregroundDarkColor:n.A.unsafe_rawColors.WHITE.css,foregroundLightColor:n.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:n.A.unsafe_rawColors.GREEN_360.css,backgroundLightColor:n.A.unsafe_rawColors.GREEN_360.css},[x._.VERIFIED]:{IconComponent:c.U,foregroundDarkColor:n.A.unsafe_rawColors.WHITE.css,foregroundLightColor:n.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:n.A.unsafe_rawColors.GREEN_360.css,backgroundLightColor:n.A.unsafe_rawColors.GREEN_360.css},[x._.PARTNERED]:{IconComponent:(0,d.k)(R.A),foregroundDarkColor:n.A.unsafe_rawColors.WHITE.css,foregroundLightColor:n.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:n.A.unsafe_rawColors.BRAND_500.css,backgroundLightColor:n.A.unsafe_rawColors.BRAND_500.css},[x._.COMMUNITY]:{IconComponent:E.f,foregroundDarkColor:n.A.unsafe_rawColors.PRIMARY_500.css,foregroundLightColor:n.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:n.A.unsafe_rawColors.WHITE.css,backgroundLightColor:n.A.unsafe_rawColors.PRIMARY_500.css,premiumBackgroundColor:I.k0.PREMIUM_GUILD_BADGE_V2_BACKGROUND,premiumForegroundColor:n.A.unsafe_rawColors.WHITE.css,sizeAdjustment:2},[x._.DISCOVERABLE]:{IconComponent:_.L,foregroundDarkColor:n.A.unsafe_rawColors.PRIMARY_500.css,foregroundLightColor:n.A.unsafe_rawColors.WHITE.css,backgroundDarkColor:n.A.unsafe_rawColors.WHITE.css,backgroundLightColor:n.A.unsafe_rawColors.PRIMARY_500.css,premiumBackgroundColor:I.k0.PREMIUM_GUILD_BADGE_V2_BACKGROUND,premiumForegroundColor:n.A.unsafe_rawColors.WHITE.css,sizeAdjustment:2},[x._.NONE]:{}};function k(r){let{guildTraits:t}=r;return(0,e.jsxs)("div",{className:v.V8,children:[(0,e.jsxs)("div",{className:s()(v.f,v.N5),children:[(0,e.jsx)(D,{width:18,height:18,className:v.F8}),(0,e.jsx)(C.E,{variant:"text-xs/semibold",color:"always-white",children:w.gb(t.premiumTier)})]}),(0,e.jsx)("div",{className:v.f,children:(0,e.jsx)(C.E,{variant:"text-xs/semibold",color:"always-white",children:b.intl.format(b.t["dR/SVH"],{count:t.premiumSubscriberCount})})})]})}function V(r){let{badgeType:t,guildTraits:o}=r,{tooltipTitle:i,tooltipSubtitle:s,tooltipDescription:l}=O(t,o.visibility);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:v.Rf,children:[(0,e.jsx)(C.E,{color:"interactive-text-active",variant:"text-xs/bold",children:i}),null!=s?(0,e.jsx)(C.E,{color:"text-muted",variant:"text-xs/medium",children:s}):null,null!=l?(0,e.jsx)(C.E,{color:"text-muted",variant:"text-xs/medium",children:l}):null]}),o.premium?(0,e.jsx)(k,{guildTraits:o}):null]})}function j(r){let t,o,{guild:i,tooltipColor:s=f.ST.Colors.BRAND,tooltipPosition:n,className:u,flowerStarClassName:c,iconClassName:d,badgeStrokeColor:E,badgeColor:_,disableBoostClick:C,"aria-label":I,...R}=r,T=R.size??18,D=(0,l.bG)([N.default,m.Ay],()=>{let r=N.default.getCurrentUser();return m.Ay.isMember(i?.id,r?.id)}),w=(0,l.bG)([g.A],()=>g.A.theme),b=(0,L.Jp)(i),k=(0,x.K)(b),j=b.premium&&D&&!C,P=r=>{j&&(r.stopPropagation(),r.preventDefault(),(0,p.K4)({guildId:i.id,location:{section:M.JJy.GUILD_HEADER,object:M.ZSU.BOOST_GEM_ICON}}))};if(k===x._.NONE)return null;let{IconComponent:S,backgroundDarkColor:B,backgroundLightColor:G,foregroundDarkColor:U,foregroundLightColor:Y,premiumBackgroundColor:y,premiumForegroundColor:H,sizeAdjustment:W}=F[k];if(null==S)return null;b.premium&&(t=H,o=y);let J=(0,a.M)(w)?U:Y,K=(0,a.M)(w)?B:G;t=t??J,o=o??K;let Z=Math.floor(.75*T)-(W??0),{tooltipTitle:z,tooltipSubtitle:q}=O(k,b.visibility),X=I??(null!=q?q:z);return(0,e.jsx)(f.ST,{color:s,position:n,"aria-label":!1,text:(0,e.jsx)(V,{badgeType:k,guildTraits:b}),tooltipContentClassName:v.Hj,children:r=>(0,e.jsx)(A.D,{"aria-label":X,onClick:P,tabIndex:0,children:(0,e.jsx)(h.A,{...r,className:u,flowerStarClassName:c,allowFullSizedIcon:!0,color:o??_,stroke:E,size:T,children:(0,e.jsx)(S,{size:"custom",width:Z,height:Z,className:d,color:t??"currentColor"})})})})}}