Loading
function(e,t,n){"use strict";n.d(t,{A:()=>eS});var l=n(627968),i=n(64700),s=n(735438),r=n(702841),a=n(885386),o=n(351906),u=n(287809),c=n(375708);let d="legacy_username";function m(e,t){let n=a.m$.useSetting(),l=(0,r.bG)([u.default],()=>u.default.getCurrentUser()),i=(0,r.bG)([o.A],()=>o.A.hidePersonalInformation);if(null==e)return[];let s=e?.getBadges()??[];return null!=l&&l.id===e.userId&&(void 0!==t?t:n)&&(s=s.filter(e=>e.id!==d)),i&&(s=s.map(e=>({...e,description:e.id===d?c.intl.string(c.t.Br1ls3):e.description}))),s}var h=n(503698),p=n.n(h),f=n(17928),g=n(990078),E=n(349288),A=n(464792),C=n(793574),x=n(688810),I=n(682618),_=n(945810);let S=(0,_.mj)({name:"2026-04-badge-discovery",kind:"user",defaultConfig:{enabled:!1},variations:{0:{enabled:!1},1:{enabled:!0}}});(0,_.mj)({name:"2026-05-badge-discovery-milestone-2",kind:"user",defaultConfig:{enabled:!1},variations:{0:{enabled:!1},1:{enabled:!0}}});var y=n(982240);let v=(0,_.mj)({name:"2026-06-use-new-badge-image-source",kind:"user",defaultConfig:{enabled:!1},variations:{0:{enabled:!1},1:{enabled:!0}}});var T=n(70283),N=n(775602),j=n(461536),b=n(841595),R=n(975858);function P(e){let t,n,i,{children:s,legacyBadgeId:r,userId:a,fallbackTitle:o,fallbackIconSrc:u}=e,d=(0,R.w0)(r),{badgeData:m,currentTier:h,obtainedAt:p}=(0,f.cf)([y.Ay],()=>null==d||null==a?{badgeData:void 0,currentTier:void 0,obtainedAt:void 0}:{badgeData:y.Ay.getBadgeById(d,a),currentTier:y.Ay.getCurrentTier(d,a),obtainedAt:y.Ay.getObtainedAt(d,a)},[d,a]),g=(0,f.bG)([N.Ay],()=>N.Ay.useReducedMotion),E=m?.badge_id===T.$.PREMIUM_TENURE,A=d===T.$.LEGACY_USERNAME,C=h?.name,x=E?c.intl.string(c.t.Ipxkog):m?.name??o;E?i=n=null!=C?`${x} ${C}`:x:null!=C?(t=x,n=C,i=`${x} ${C}`):(n=x,i=x);let I=g?void 0:m?.complex_icon_animated_url,_=I??m?.complex_icon_static_url??m?.simple_icon_url??u,S=null!=I&&_===I;if(A)return(0,l.jsx)(L,{userId:a,title:n,badgeImage:_,rarity:m?.rarity,children:s});let v=m?.info_label??(null!=p?c.intl.formatToPlainString(c.t["0aEh2a"],{date:new Date(p)}):void 0);return(0,l.jsx)(j.A,{title:n,eyebrow:t,body:v,badgeImage:_,badgeName:i,rarity:m?.rarity,variant:E?"nitro":"default",isAnimated:S,children:s})}function L(e){let{children:t,userId:n,title:i,badgeImage:s,rarity:r}=e,a=(0,f.bG)([b.A,o.A],()=>o.A.hidePersonalInformation?c.intl.string(c.t.Br1ls3):null!=n?b.A.getUserProfile(n)?.legacyUsername??void 0:void 0,[n]);return(0,l.jsx)(j.A,{title:i,body:a,badgeImage:s,badgeName:i,rarity:r,children:t})}var M=n(470739),O=n(564064),w=n(459192);function k(e){let{targetElementRef:t,delay:n,forceOpen:i,badgeDescription:s,children:r}=e;return(0,l.jsx)(w.u,{targetElementRef:t,delay:n,forceOpen:i,asset:{type:"image",src:"https://cdn.discordapp.com/assets/content/c41152a51207aef6b145fd309053f9fa5d5bd5fab7208289710c70d61a47d2f4.svg"},title:"Last Meadow Online",body:s,children:r})}var D=n(116833),U=n(704640),G=n(425713),F=n(642481),V=n(720879),B=n(788868),H=n(49999),W=n(518477);let K=e=>{let{badgeId:t=B.Ac.PREMIUM_TENURE_1_MONTH,markAsDismissed:n,children:s,targetElementRef:r,progressCircleText:a,progressCirclePercent:o,progressCircleUrgency:u,onShow:d}=e,m=B.VD[t].nameUnformattedNitro,h=c.intl.string(m).toLocaleUpperCase(),p=B.VD[t].rarity,f=(0,U.A)(t),g=(0,G.I)(t).standard;(0,i.useEffect)(()=>{D.m[D.DynamicGraphicComponent.BADGE_IMAGE_WITH_PROGRESS_CIRCLE](),new Image().src=g},[g]);let E=(0,i.useCallback)(()=>{n?.(H.i.USER_DISMISS)},[n]);if("mini-tooltip"===e.mode){let t=function(e,t,n){if(null!=e&&null!=t&&null!=n)return{text:e,percent:t,urgency:n}}(a,o,u);return(0,l.jsx)(j.A,{targetElementRef:r,onShow:d,title:h,body:e.body,variant:"nitro",rarity:p,badgeImage:g,badgeName:h,progressCircle:t,children:s})}let A={gradientColor:f,size:"lg",graphic:{type:"dynamic",component:D.DynamicGraphicComponent.BADGE_IMAGE_WITH_PROGRESS_CIRCLE,aspectRatio:"6/4",props:{src:g,alt:h,progressCircleText:a,progressCirclePercent:o,progressCircleUrgency:u}},title:h,body:e.body,actions:e.actions};return"tooltip"===e.mode?(0,l.jsx)(V.A,{targetElementRef:r,estimatedTooltipHeight:e.estimatedTooltipHeight??300,delay:W.In,onShow:d,...A,children:s}):(0,l.jsxs)(l.Fragment,{children:[s,(0,l.jsx)(F.A,{targetElementRef:r,shouldShow:!0,onRequestClose:E,align:"right",position:"top",caretConfig:{align:"center"},...A})]})};var Y=n(534514),z=n(834730),Z=n(775549);let q=e=>{let{assetComponent:t,tooltipWordmarkComponent:n,children:i}=e;return(0,l.jsxs)("div",{className:Z.R,children:[t,(0,l.jsx)("div",{className:Z.A,children:n}),i]})};var $=n(224016),J=n(74824);let X=e=>{let{profileBadge:t,tenureBadge:n}=e,i=(0,G.I)(n.id).standard;return(0,l.jsxs)(q,{assetComponent:(0,l.jsx)("img",{src:i,alt:""}),tooltipWordmarkComponent:(0,l.jsx)($.A,{width:56,className:J.R}),children:[(0,l.jsx)(Y.D,{variant:"heading-xl/extrabold",children:c.intl.string(n.nameUnformatted)}),(0,l.jsx)(z.E,{variant:"text-xs/normal",color:"text-muted",className:J.K,children:t.description})]})};var Q=n(30084),ee=n(507107),et=n(590202),en=n(976860),el=n(305003),ei=n(312640),es=n(798618),er=n(752079),ea=n(414690);function eo(e){let{children:t,targetElementRef:n,delay:s,showSubtext:r,forceOpen:a}=e,[o,u]=i.useState(!1),c=i.useRef(null),d=i.useCallback(()=>{null!=c.current&&(clearTimeout(c.current),c.current=null)},[]);i.useEffect(()=>d,[d]);let m=i.useCallback(()=>{d(),c.current=window.setTimeout(()=>{c.current=null,u(!0)},s)},[s,d]);i.useEffect(()=>{a&&!o&&m()},[a,o,m]);let h=i.useCallback(()=>{m()},[m]),p=i.useCallback(()=>{d(),u(!1)},[d]);return(0,l.jsxs)("div",{onMouseEnter:h,onMouseLeave:p,children:[t,(0,l.jsxs)(ei.x,{targetElementRef:n,shouldShow:!!(o||a),position:"top",caretConfig:{align:"center"},children:[(0,l.jsx)(eu,{showSubtext:r}),(0,l.jsx)(es.F,{})]})]})}function eu(e){let{showSubtext:t=!1}=e;return(0,l.jsxs)(q,{assetComponent:(0,l.jsx)(er.A,{className:ea.jc}),tooltipWordmarkComponent:(0,l.jsx)(Y.D,{variant:"heading-md/extrabold",className:ea.RK,children:c.intl.string(c.t.ElYQFS)}),children:[(0,l.jsx)(Y.D,{variant:"heading-xl/extrabold",className:t?void 0:ea.Qn,children:c.intl.string(c.t.lTHkqd)}),t?(0,l.jsx)(z.E,{variant:"text-xs/normal",className:ea.lV,children:c.intl.string(c.t.MEV0GI)}):void 0]})}var ec=n(174459),ed=n(474090),em=n(439174),eh=n(183555),ep=n(47675),ef=n(999291),eg=n(652215),eE=n(758836);let eA="premium";var eC=n(992028);function ex(e){let{badges:t,className:n,badgeClassName:s,displayProfile:r,onClose:a,shouldOpenBadgeTooltip:o,shouldGlowTenureBadge:d}=e,h=i.useRef(null),_=i.useRef(null),T=i.useRef(null),{analyticsLocations:N}=(0,x.Ay)(C.A.BADGE),{context:j,trackUserProfileAction:b}=(0,eh.NJ)(),L=u.default.getCurrentUser(),w=(0,ed.CC)(L?.premiumType,B.PremiumTypes.TIER_2),D=function(e){let{location:t}=e;return S.useConfig({location:t}).enabled}({location:"UserProfileBadgeList"}),U=function(e){let{location:t}=e;return v.useConfig({location:t}).enabled}({location:"UserProfileBadgeList"});i.useEffect(()=>{(D||U)&&r?.userId!=null&&!y.Ay.hasCatalogFor(r.userId)&&(0,I.R)(r.userId)},[D,U,r?.userId]);let G=r?.userId,F=(0,f.bG)([y.Ay],()=>{if(!U||null==G)return null;let e={};for(let n of t){let t=(0,R.w0)(n.id);if(null==t)continue;let l=y.Ay.getBadgeById(t,G)?.simple_icon_url;null!=l&&(e[n.id]=l)}return e},[U,G,t]),V=m((0,ef.AP)(L?.id??null)).some(e=>e.id===el.A.ORB_PROFILE_BADGE);return(0,l.jsx)("div",{className:p()(eC.kL,n),"aria-label":c.intl.string(c.t.VWV0y5),role:"group",children:t.map((e,t)=>{let n=e.id===el.A.ORB_PROFILE_BADGE,i=(0,em.e0)(e.id),c=null!=i||e.id===eA,m=r?.userId===L?.id,f="april_fools_2026"===e.id,x=void 0!==i&&e.id!==eA,I=F?.[e.id],S=(0,l.jsx)("img",{alt:" ","aria-hidden":!0,src:e.iconSrc??I??(0,W.L7)(e.icon),className:p()(eC.qS,null!=I&&eC.Do,s)}),y=null!=o&&o(e.id),v={onClick:l=>{b({action:"PRESS_BADGE"}),(0,ep.vP)({badgeId:(0,R.w0)(e.id),badgeAction:"PRESS_BADGE",position:t,analyticsLocations:N,...j});let i=e.id.startsWith("staff")&&!m,s=r?.userId!=null?u.default.getUser(r.userId):null;if(D&&!i&&s?.bot!==!0){l.preventDefault(),(0,M._)({initialBadgeId:(0,R.w0)(e.id),targetUserId:r?.userId,targetUsername:s?.globalName??s?.username});return}if(n){(0,O.Cz)({tab:eE.G2.ORBS,analyticsLocations:N,analyticsSource:C.A.VIRTUAL_CURRENCY_ORB_PROFILE_BADGE}),a?.();return}if(c){if(l.preventDefault(),ec.default.track(eg.HAw.TIERED_TENURE_BADGE_CLICKED,{badge:e.id,premium_type:w,viewed_user_id:r?.userId}),w){m?(0,en.pX)(eg.BVt.NITRO_HOME):(0,Q.D)({analyticsLocations:N,displayProfile:r}),a?.();return}if(m){let t=null!=e.link?(0,A.default)(e.link,{analyticsLocations:N}):null;if(null==t)return;return a?.(),t(l)}return(0,Q.D)({analyticsLocations:N,displayProfile:r}),void a?.()}let o=null!=e.link?(0,A.default)(e.link,{analyticsLocations:N}):null;if(null!=o)return a?.(),o(l)},onMouseEnter:()=>{"quest_completed"===e.id&&ec.default.track(eg.HAw.QUEST_CONTENT_VIEWED,{...(0,et.fF)(ee.uF.QUEST_BADGE),is_targeted:!1}),b({action:"HOVER_BADGE"}),(0,ep.vP)({badgeId:(0,R.w0)(e.id),badgeAction:"HOVER_BADGE",position:t,analyticsLocations:N,...j})},href:e.link,"aria-label":e.description,style:{filter:d&&null!=i?`drop-shadow(0 0 5px ${i.glowColor})`:void 0}};if(D)return(0,l.jsx)(P,{legacyBadgeId:e.id,userId:r?.userId,fallbackTitle:e.description,fallbackIconSrc:e.iconSrc??e.simple_icon_url??(0,W.L7)(e.icon),children:(0,l.jsx)(E.Anchor,{...v,children:S})},`${e.id}-${t}`);if(x){let n=(0,l.jsx)(E.Anchor,{...v,ref:h,children:S});return(0,l.jsx)("div",{children:(0,l.jsx)(K,{badgeId:e.id,targetElementRef:h,mode:"tooltip",body:e.description,onShow:()=>{ec.default.track(eg.HAw.TOOLTIP_VIEWED,{type:"tiered_tenure_badge_profile_"+(m?"self":"other")})},estimatedTooltipHeight:220,children:n})},`${e.id}-${t}`)}if(n){let n=(0,l.jsx)(E.Anchor,{...v,ref:_,children:S});return(0,l.jsx)(eo,{targetElementRef:_,delay:W.In,showSubtext:!V&&!e.isPreviewMode,forceOpen:y,children:n},`${e.id}-${t}`)}if(f){let n=(0,l.jsx)(E.Anchor,{...v,ref:T,children:S});return(0,l.jsx)(k,{targetElementRef:T,delay:W.In,forceOpen:y,badgeDescription:e.description,children:n},`${e.id}-${t}`)}let U=(0,l.jsx)(E.Anchor,{...v,children:S}),G=(e=>{let{badge:t,tieredTenureBadge:n}=e;return void 0!==n&&t.id!==eA?(0,l.jsx)(X,{profileBadge:t,tenureBadge:n}):t.description})({badge:e,tieredTenureBadge:c&&e.id!==eA?i:void 0});return(0,l.jsx)(g.m,{__unsupportedReactNodeAsText:G,forceOpen:y,delay:W.In,ariaHidden:!0,children:U},`${e.id}-${t}`)})})}var eI=n(996988);let e_={[eI.d.POPOUT]:12,[eI.d.MODAL]:26,[eI.d.MODAL_V2]:16,[eI.d.SIDEBAR]:13,[eI.d.VIDEO_TILE_BACKGROUND]:12};function eS(e){let{displayProfile:t,themeType:n,pendingLegacyUsernameDisabled:r,pendingBadges:a,onClose:o,shouldOpenBadgeTooltip:u,shouldGlowTenureBadge:c}=e,d=m(t,r),h=i.useMemo(()=>{if(null==a)return d;let e=new Set(d.map(e=>e.id));return[...d,...a.filter(t=>!e.has(t.id))]},[d,a]);return 0===h.length?null:(0,l.jsx)(l.Fragment,{children:(0,s.chunk)(h,e_[n]).map(e=>(0,l.jsx)(ex,{badges:e,displayProfile:t,onClose:o,shouldOpenBadgeTooltip:u,shouldGlowTenureBadge:c},e[0].id))})}}