PageSourceSearch

https://mastodon.social/packs/account-D_VuqsdK.js

js mastodon.social collected 2026-10-09 21:33:37 UTC 4,885 bytes, 2 lines download raw bytes

1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{n as t,t as n}from"./jsx-runtime-D3F0h15I.js";import{a as r,c as i,s as a}from"./react-intl-D77hBoiN.js";import{b as o}from"./initial_state-IJJyCPA3.js";import{at as s,b as c,en as l,l as ee,ln as te,tt as u}from"./poll-Cyo3AGGB.js";import{Ea as d,Ka as f,ao as p,ba as m,h,lo as g,ro as _,so as v,uo as y}from"./render-BZ78Gn2E.js";import{o as b,s as x}from"./typed_functions-CS7KSAnT.js";import{at as S,s as ne}from"./accounts_typed-DXYfDMuY.js";import{n as re,t as ie}from"./short_number-UXESbrRC.js";import{t as C}from"./classnames-CfLRLWYq.js";import{Gt as ae,Jt as w}from"./content-B3O-w9WQ.js";import{t as T}from"./follow_button-CydpbSF4.js";import{t as E}from"./counters-Bsdm-SJ9.js";import{t as D}from"./skeleton-BxKC6MH1.js";import{l as O}from"./badge-C3fxq-Jt.js";var k=e(t()),A=e(C()),j=n(),M=a({follow:{id:`account.follow`,defaultMessage:`Follow`},unfollow:{id:`account.unfollow`,defaultMessage:`Unfollow`},cancel_follow_request:{id:`account.cancel_follow_request`,defaultMessage:`Withdraw follow request`},unblock:{id:`account.unblock_short`,defaultMessage:`Unblock`},unmute:{id:`account.unmute_short`,defaultMessage:`Unmute`},mute_notifications:{id:`account.mute_notifications_short`,defaultMessage:`Mute notifications`},unmute_notifications:{id:`account.unmute_notifications_short`,defaultMessage:`Unmute notifications`},mute:{id:`account.mute_short`,defaultMessage:`Mute`},block:{id:`account.block_short`,defaultMessage:`Block`},more:{id:`status.more`,defaultMessage:`More`},addToLists:{id:`account.add_or_remove_from_list`,defaultMessage:`Add or Remove from lists`},openOriginalPage:{id:`account.open_original_page`,defaultMessage:`Open original page`}}),N=({id:e,size:t=46,hidden:n,minimal:a,defaultAction:C,withBio:N,withMenu:P=!0,withBorder:F=!0,extraAccountInfo:I,className:L,children:R,reference:z})=>{let B=i(),{signedIn:V}=te(),H=x(t=>t.accounts.get(e)),U=x(t=>t.relationships.get(e)),W=b(),G=H?.url,K=H?.acct!==H?.username,q=(0,k.useCallback)(()=>{U?.blocking?W(v(e)):W(f(e))},[W,e,U]),oe=(0,k.useCallback)(()=>{U?.muting?W(g(e)):W(h(H))},[W,e,H,U]),J=(0,k.useMemo)(()=>{let t=[];return C===`mute`?t=[{text:B.formatMessage(U?.muting_notifications?M.unmute_notifications:M.mute_notifications),action:U?.muting_notifications?()=>{W(_(e,!1))}:()=>{W(_(e,!0))}}]:C!==`block`&&(K&&G&&t.push({text:B.formatMessage(M.openOriginalPage),href:G}),V&&(t.push({text:B.formatMessage(M.addToLists),action:()=>{let t=()=>{W(m({modalType:`LIST_ADDER`,modalProps:{accountId:e}}))};U?.following||U?.requested||e===o?t():W(m({modalType:`CONFIRM_FOLLOW_TO_LIST`,modalProps:{accountId:e,onConfirm:()=>{S(e,{ref:z}).then(e=>{W(ne({relationship:e,alreadyFollowing:!1})),t()}).catch(e=>{W(d(e))})}}}))}}),e!==o&&(U?.following||U?.requested)&&t.push({text:B.formatMessage(U.endorsed?{id:`account.unendorse`}:{id:`account.endorse`}),action:()=>{U.endorsed?W(y(e)):W(p(e))}}))),t},[W,B,e,G,U,C,K,V,z]);if(n)return(0,j.jsxs)(j.Fragment,{children:[H?.display_name,H?.username]});let Y,X;J.length>0&&P&&(X=(0,j.jsx)(c,{items:J,icon:`ellipsis-h`,iconComponent:ae,title:B.formatMessage(M.more)})),Y=C===`block`?(0,j.jsx)(w,{text:B.formatMessage(U?.blocking?M.unblock:M.block),onClick:q}):C===`mute`?(0,j.jsx)(w,{text:B.formatMessage(U?.muting?M.unmute:M.mute),onClick:oe}):(0,j.jsx)(T,{accountId:e,reference:z});let Z;H?.mute_expires_at&&(Z=(0,j.jsxs)(j.Fragment,{children:[`· `,(0,j.jsx)(ee,{hasFuture:!0,timestamp:H.mute_expires_at})]}));let Q,$=H?.fields.find(e=>!!e.verified_at);return $&&(Q=(0,j.jsx)(O,{link:$.value})),(0,j.jsx)(`div`,{className:(0,A.default)(`account`,L,{"account--minimal":a,"account--without-border":!F}),children:(0,j.jsxs)(`div`,{className:(0,A.default)(`account__wrapper`,{"account__wrapper--with-bio":H&&N}),children:[(0,j.jsxs)(`div`,{className:`account__info-wrapper`,children:[(0,j.jsxs)(re,{className:`account__display-name focusable`,title:H?.acct,to:{pathname:`/@${H?.acct}`,state:{reference:z}},"data-hover-card-account":e,"data-hover-card-reference":z,children:[(0,j.jsx)(`div`,{className:`account__avatar-wrapper`,children:H?(0,j.jsx)(s,{account:H,size:t}):(0,j.jsx)(D,{width:t,height:t})}),(0,j.jsxs)(`div`,{className:`account__contents`,children:[(0,j.jsx)(u,{account:H}),!a&&(0,j.jsx)(`div`,{className:`account__details`,children:H?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ie,{value:H.followers_count,renderer:E}),` `,Q,` `,Z]}):(0,j.jsx)(D,{width:`7ch`})})]})]}),H&&N&&(H.note.length>0?(0,j.jsx)(l,{className:`account__note translate`,htmlString:H.note_emojified,extraEmojis:H.emojis}):(0,j.jsx)(`div`,{className:`account__note account__note--missing`,children:(0,j.jsx)(r,{id:`account.no_bio`,defaultMessage:`No description provided.`})})),I]}),!a&&(0,j.jsxs)(`div`,{className:`account__relationship`,children:[X,Y]}),R]})})};export{N as t};
2//# sourceMappingURL=account-D_VuqsdK.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.