PageSourceSearch

https://newsie.social/packs/status_list-DlQJtqos.js

js newsie.social collected 2026-10-02 03:30:19 UTC 14,547 bytes, 2 lines download raw bytes

1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{t}from"./react-C21x__mS.js";import{a as n,c as r,s as i}from"./react-intl-DlKP8ATg.js";import{t as a}from"./jsx-runtime-BdxMnOeJ.js";import{c as o}from"./initial_state-DnZ5UeDQ.js";import{b as s,y as c}from"./store-Dt6FPjVX.js";import{b as l}from"./react-router-BkmJBoOP.js";import{t as u}from"./debounce-CXuT-gkt.js";import{t as d}from"./defineProperty-BbfpZ9Tg.js";import{o as f,s as p}from"./typed_functions-Whap35TF.js";import{An as m,Bn as h,in as g,on as _}from"./filters-B_-6iXPk.js";import{t as v}from"./react-router-dom-C1dtKQUg.js";import{t as y}from"./classnames-CfLRLWYq.js";import{t as b}from"./close-DIPoUQpY.js";import{t as x}from"./loading_indicator-eceYQNAM.js";import{t as S}from"./icon_button-DfNtv8BJ.js";import{t as C}from"./icon-BNrUFRb_.js";import{S as w,n as T}from"./status_quoted-DDTxUSj6.js";import{n as E}from"./relative_timestamp-oFHWEJSE.js";import{i as D,m as O,u as k}from"./account-B_Xh3Swt.js";import{t as ee}from"./display_name-BHmLvgU_.js";import{t as te}from"./button-BmF3DXsp.js";import{t as ne}from"./gif-nHcAVb7p.js";import{t as re}from"./info-k74D6gw-.js";import{t as ie}from"./chevron_left-Du0bxxM7.js";import{t as ae}from"./chevron_right-CyqmmHhV.js";import{t as oe}from"./ImmutablePropTypes-C_rOJ6cM.js";import{t as se}from"./react-immutable-pure-component.es-DpNNSygw.js";import{n as A,t as j}from"./useObserver-NTyIEx6l.js";import{t as M}from"./load_gap-BNMCv5Bn.js";import{t as N}from"./scrollable_list-D9sScLk3.js";var P=e(l()),F=e(u()),I=e(oe()),L=a(),R=()=>(0,L.jsxs)(`div`,{className:`regeneration-indicator`,children:[(0,L.jsx)(ne,{src:`/loading.gif`,staticSrc:`/loading.png`,className:`regeneration-indicator__figure`}),(0,L.jsxs)(`div`,{className:`regeneration-indicator__label`,children:[(0,L.jsx)(`strong`,{children:(0,L.jsx)(n,{id:`regeneration_indicator.preparing_your_home_feed`,defaultMessage:`Preparing your home feed…`})}),(0,L.jsx)(n,{id:`regeneration_indicator.please_stand_by`,defaultMessage:`Please stand by.`,tagName:`span`})]})]}),z=e(t());function B({autoResize:e,padding:t=4}={}){let[n,r]=(0,z.useState)(-1),[i,a]=(0,z.useState)(0),[o,s]=(0,z.useState)(`none`),c=(0,z.useRef)(null),l=(0,z.useCallback)(()=>{let e=c.current;if(!e)return;let n=()=>{r(-1),a(0),s(`none`)},i=(e.parentElement?.offsetWidth??0)-(e.nextElementSibling?.scrollWidth??0)-t;if(i<=0){n();return}let o=0,l=0,u=0;for(let t of e.children){if(t instanceof HTMLElement){let e=t.offsetLeft+t.offsetWidth;if(e<=i)o+=1,u=e;else break}l++}if(o===e.children.length){n();return}r(l),a(e.children.length-o),s(u)},[t]);(0,z.useEffect)(()=>{c.current&&e&&(c.current.style.maxWidth=typeof o==`number`?`${o}px`:o)},[e,o]);let{listRefCallback:u,wrapperRefCallback:d}=H({onRecalculate:l,onListRef:c});return{hiddenCount:i,hasOverflow:i>0,wrapperRef:d,hiddenIndex:n,maxWidth:o,listRef:u,recalculate:l}}function V({widthOffset:e=200,absoluteDistance:t=!1}={}){let[n,r]=(0,z.useState)(!1),[i,a]=(0,z.useState)(!1),o=(0,z.useRef)(null),s=(0,z.useCallback)(()=>{o.current&&(getComputedStyle(o.current).direction===`rtl`?(r(o.current.clientWidth-o.current.scrollLeft<o.current.scrollWidth),a(o.current.scrollLeft<0)):(r(o.current.scrollLeft>0),a(o.current.scrollLeft+o.current.clientWidth<o.current.scrollWidth)))},[]),{wrapperRefCallback:c}=H({onRecalculate:s,onWrapperRef:o});(0,z.useEffect)(()=>{s()},[s]);let l=(0,z.useCallback)(()=>{requestAnimationFrame(s)},[s]);return{bodyRef:c,canScrollLeft:n,canScrollRight:i,handleLeftNav:(0,z.useCallback)(()=>{o.current&&(o.current.scrollLeft-=t?e:Math.max(e,o.current.clientWidth-e))},[t,e]),handleRightNav:(0,z.useCallback)(()=>{o.current&&(o.current.scrollLeft+=t?e:Math.max(e,o.current.clientWidth-e))},[t,e]),handleScroll:l}}function H({onRecalculate:e,onListRef:t,onWrapperRef:n}){let r=(0,z.useRef)(null),i=A(e),a=(0,z.useCallback)(()=>{let t=r.current;if(t)for(let e of t.children)e instanceof HTMLElement&&i.observe(e);e()},[e,i]),o=j(a),s=(0,z.useCallback)(()=>{c.current&&i.observe(c.current),r.current&&(o.observe(r.current,{childList:!0}),a())},[a,o,i]),c=(0,z.useRef)(null);return{wrapperRefCallback:(0,z.useCallback)(e=>{e&&(c.current=e,s(),typeof n==`function`?n(e):n&&`current`in n&&(n.current=e))},[s,n]),listRefCallback:(0,z.useCallback)(e=>{e&&(r.current=e,s(),typeof t==`function`?t(e):t&&`current`in t&&(t.current=e))},[s,t])}}var U=i({previous:{id:`lightbox.previous`,defaultMessage:`Previous`},next:{id:`lightbox.next`,defaultMessage:`Next`},dismiss:{id:`follow_suggestions.dismiss`,defaultMessage:`Don't show again`},friendsOfFriendsHint:{id:`follow_suggestions.hints.friends_of_friends`,defaultMessage:`This profile is popular among the people you follow.`}
1,similarToRecentlyFollowedHint:{id:`follow_suggestions.hints.similar_to_recently_followed`,defaultMessage:`This profile is similar to the profiles you have most recently followed.`},featuredHint:{id:`follow_suggestions.hints.featured`,defaultMessage:`This profile has been hand-picked by the {domain} team.`},mostFollowedHint:{id:`follow_suggestions.hints.most_followed`,defaultMessage:`This profile is one of the most followed on {domain}.`},mostInteractionsHint:{id:`follow_suggestions.hints.most_interactions`,defaultMessage:`This profile has been recently getting a lot of attention on {domain}.`}}),W=({id:e})=>{let t=r(),i,a;switch(e){case`friends_of_friends`:a=t.formatMessage(U.friendsOfFriendsHint),i=(0,L.jsx)(n,{id:`follow_suggestions.personalized_suggestion`,defaultMessage:`Personalized suggestion`});break;case`similar_to_recently_followed`:a=t.formatMessage(U.similarToRecentlyFollowedHint),i=(0,L.jsx)(n,{id:`follow_suggestions.personalized_suggestion`,defaultMessage:`Personalized suggestion`});break;case`featured`:a=t.formatMessage(U.featuredHint,{domain:o}),i=(0,L.jsx)(n,{id:`follow_suggestions.curated_suggestion`,defaultMessage:`Staff pick`});break;case`most_followed`:a=t.formatMessage(U.mostFollowedHint,{domain:o}),i=(0,L.jsx)(n,{id:`follow_suggestions.popular_suggestion`,defaultMessage:`Popular suggestion`});break;case`most_interactions`:a=t.formatMessage(U.mostInteractionsHint,{domain:o}),i=(0,L.jsx)(n,{id:`follow_suggestions.popular_suggestion`,defaultMessage:`Popular suggestion`})}return(0,L.jsx)(D,{className:`inline-follow-suggestions__body__scrollable__card__text-stack__source`,title:a,label:i,icon:(0,L.jsx)(re,{})})},G=({id:e,sources:t})=>{let n=r(),i=p(t=>t.accounts.get(e)),a=i?.fields.find(e=>!!e.verified_at),o=f(),s=(0,z.useCallback)(()=>{o(c({accountId:e}))},[e,o]);return(0,L.jsxs)(`div`,{className:`inline-follow-suggestions__body__scrollable__card`,children:[(0,L.jsx)(S,{icon:``,iconComponent:b,onClick:s,title:n.formatMessage(U.dismiss)}),(0,L.jsx)(`div`,{className:`inline-follow-suggestions__body__scrollable__card__avatar`,children:(0,L.jsx)(v,{to:`/@${i?.acct}`,"data-hover-card-account":i?.id,children:(0,L.jsx)(E,{account:i,size:72})})}),(0,L.jsxs)(`div`,{className:`inline-follow-suggestions__body__scrollable__card__text-stack`,children:[(0,L.jsx)(v,{to:`/@${i?.acct}`,"data-hover-card-account":i?.id,children:(0,L.jsx)(ee,{account:i})}),a?(0,L.jsx)(k,{link:a.value}):(0,L.jsx)(W,{id:t[0]})]}),(0,L.jsx)(O,{accountId:e})]})},K=`home/follow-suggestions`,ce=({hidden:e})=>{let t=r(),i=(0,z.useId)(),a=f(),o=p(e=>e.suggestions.items),c=p(e=>e.suggestions.isLoading),l=p(e=>!!e.settings.getIn([`dismissed_banners`,K]));(0,z.useEffect)(()=>{a(s())},[a]);let u=(0,z.useCallback)(()=>{a(h([`dismissed_banners`,K],!0))},[a]),{bodyRef:d,handleScroll:m,canScrollLeft:g,canScrollRight:_,handleLeftNav:y,handleRightNav:b}=V({absoluteDistance:!0});return l||!c&&o.length===0?null:e?(0,L.jsx)(`div`,{className:`inline-follow-suggestions`}):(0,L.jsxs)(`div`,{role:`group`,"aria-labelledby":i,className:`inline-follow-suggestions focusable`,tabIndex:-1,children:[(0,L.jsxs)(`div`,{className:`inline-follow-suggestions__header`,children:[(0,L.jsx)(`h2`,{id:i,className:`inline-follow-suggestions__title`,children:(0,L.jsx)(n,{id:`follow_suggestions.who_to_follow`,defaultMessage:`Who to follow`})}),(0,L.jsxs)(`div`,{className:`inline-follow-suggestions__header__actions`,children:[(0,L.jsx)(`button`,{className:`link-button`,onClick:u,type:`button`,children:(0,L.jsx)(n,{id:`follow_suggestions.dismiss`,defaultMessage:`Don't show again`})}),(0,L.jsx)(v,{to:`/explore/suggestions`,className:`link-button`,children:(0,L.jsx)(n,{id:`follow_suggestions.view_all`,defaultMessage:`View all`})})]})]}),(0,L.jsxs)(`div`,{className:`inline-follow-suggestions__body`,children:[(0,L.jsx)(`div`,{className:`inline-follow-suggestions__body__scrollable`,ref:d,onScroll:m,children:c?(0,L.jsx)(x,{}):o.map(e=>(0,L.jsx)(G,{id:e.account_id,sources:e.sources},e.account_id))}),g&&(0,L.jsx)(`button`,{className:`inline-follow-suggestions__body__scroll-button left`,onClick:y,"aria-label":t.formatMessage(U.previous),type:`button`,children:(0,L.jsx)(`div`,{className:`inline-follow-suggestions__body__scroll-button__icon`,children:(0,L.jsx)(C,{id:``,
1icon:ie})})}),_&&(0,L.jsx)(`button`,{className:`inline-follow-suggestions__body__scroll-button right`,onClick:b,"aria-label":t.formatMessage(U.next),type:`button`,children:(0,L.jsx)(`div`,{className:`inline-follow-suggestions__body__scroll-button__icon`,children:(0,L.jsx)(C,{id:``,icon:ae})})})]})]})},le=e(y()),q=e=>(0,L.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 16 16`,...e,children:(0,L.jsx)(`path`,{d:`M13.128 7.586a.666.666 0 0 0 0-.943l-3.771-3.77a.667.667 0 0 0-.943.942 1.333 1.333 0 0 1 0 1.885L6.641 7.473a2 2 0 0 1-2.046.48v.002l-1.263-.414-.004-.002a.668.668 0 0 0-.684.16l-.358.358 5.657 5.657.358-.357a.67.67 0 0 0 .16-.684l-.001-.004-.415-1.265a2.002 2.002 0 0 1 .482-2.045L10.3 7.586a1.333 1.333 0 0 1 1.885 0 .667.667 0 0 0 .943 0Zm.943.942a2 2 0 0 1-2.829 0L9.47 10.301l-.06.07a.666.666 0 0 0-.124.524l.024.09.001.004.416 1.263a1.999 1.999 0 0 1-.483 2.046l-.358.359a1.335 1.335 0 0 1-1.886 0L4.642 12.3l-1.885 1.885a.667.667 0 1 1-.942-.943L3.7 11.357 1.343 9.001a1.335 1.335 0 0 1 0-1.887l.358-.358a2 2 0 0 1 2.051-.481l1.26.414.003.001a.67.67 0 0 0 .614-.1l.07-.06L7.47 4.757A2 2 0 0 1 10.3 1.93l3.77 3.77a2 2 0 0 1 0 2.83Z`,fill:`black`})});function ue({type:e=`local`,prefix:t=``}={}){let n=e===`local`?`localStorage`:`sessionStorage`,r=(0,z.useMemo)(()=>Y(n),[n]);return{isAvailable:r,getItem:(0,z.useCallback)(e=>{if(!r)return null;try{return window[n].getItem(t?`${t};${e}`:e)}catch{return null}},[r,n,t]),setItem:(0,z.useCallback)((e,i)=>{if(r)try{window[n].setItem(t?`${t};${e}`:e,i)}catch{}},[r,n,t]),removeItem:(0,z.useCallback)(e=>{if(r)try{window[n].removeItem(t?`${t};${e}`:e)}catch{}},[r,n,t])}}function J(e,t,n){let{getItem:r,setItem:i,removeItem:a}=ue(n),[o,s]=(0,z.useState)(()=>fe(r(e))??t);return[o,(0,z.useCallback)(t=>{i(e,de(t)),s(t)},[e,i]),(0,z.useCallback)(()=>{a(e),s(t)},[t,e,a])]}function Y(e){let t;try{t=window[e];let n=`__storage_test__`;return t.setItem(n,n),t.removeItem(n),!0}catch(e){return e instanceof DOMException&&e.name===`QuotaExceededError`&&t&&t.length!==0}}function de(e){return typeof e==`boolean`?e?`1`:`0`:e}function fe(e){return e===`1`||e!==`0`&&e}var X=(0,z.createContext)(null);function Z(){let e=(0,z.useContext)(X);if(!e)throw Error(`useAccountFilters must be used within an AccountTimelineProvider`);return e}var pe=e=>{let t={type:`local`,prefix:`account-filters`},[n,r]=J(`boosts`,!0,t),[i,a]=J(`replies`,!1,t),o=(0,z.useCallback)(e=>{r(e)},[r]),s=(0,z.useCallback)(e=>{a(e)},[a]),[c,l]=(0,z.useState)(!1),u=(0,z.useCallback)(()=>{l(!0)},[]);return(0,z.useMemo)(()=>({accountId:e??null,boosts:n,replies:i,showAllPinned:c,setBoosts:o,setReplies:s,onShowAllPinned:u}),[e,n,o,s,u,i,c])},Q={filtersWrapper:`_feat_account_timeline__filtersWrapper`,filterSelectButton:`_feat_account_timeline__filterSelectButton`,filterSelectIcon:`_feat_account_timeline__filterSelectIcon`,filterOverlay:`_feat_account_timeline__filterOverlay`,tagsWrapper:`_feat_account_timeline__tagsWrapper`,tagSuggestions:`_feat_account_timeline__tagSuggestions`,tagsList:`_feat_account_timeline__tagsList`,tagsListShowAll:`_feat_account_timeline__tagsListShowAll`,statusWrapper:`_feat_account_timeline__statusWrapper`,pinnedViewAllButton:`_feat_account_timeline__pinnedViewAllButton`,pinnedStatusHeader:`_feat_account_timeline__pinnedStatusHeader`,pinnedBadge:`_feat_account_timeline__pinnedBadge`},me=({featured:e,...t})=>e?(0,L.jsx)(w,{...t,className:Q.pinnedStatusHeader,contentBeforeDate:(0,L.jsx)(D,{className:Q.pinnedBadge,icon:(0,L.jsx)(C,{id:`pinned`,icon:q}),label:(0,L.jsx)(n,{id:`account.timeline.pinned`,defaultMessage:`Pinned`})})}):(0,L.jsx)(w,{...t}),he=()=>{let{onShowAllPinned:e}=Z();return(0,L.jsxs)(te,{onClick:e,className:(0,le.default)(Q.pinnedViewAllButton,`focusable`),children:[(0,L.jsx)(C,{id:`pinned`,icon:q}),(0,L.jsx)(n,{id:`account.timeline.pinned.view_all`,defaultMessage:`View all pinned posts`})]})},$=class extends se{constructor(...e){super(...e),d(this,`handleLoadOlder`,(0,F.default)(()=>{let{statusIds:e,lastId:t,onLoadMore:n}=this.props;n(t||e.findLast(e=>!m(e)))},300,{leading:!0})),d(this,`setRef`,e=>{this.node=e})}render(){let{statusIds:e,featuredStatusIds:t,onLoadMore:n,timelineId:r,statusProps:i,...a}=this.props,{isLoading:o,isPartial:s}=a;if(s)return(0,L.jsx)(R,{});let c=o||e.size>0?e.map((t,a)=>{switch(t){case _:return(0,L.jsx)(ce,{},_);case null:return(0,L.jsx)(M,{disabled:o,param:a>0?e.get(a-1):null,onClick:n},`gap:`+e.get(a+1));default:return(0,L.jsx)(T,{id:t,contextType:r,scrollKey:this.props.scrollKey,showThread:!0,withCounters:this.props.withCounters,...i},t)}}):null;return c&&t&&(c=t.map(e=>e===`pinned-view-all`?(0,L.jsx)(he,{},g):(0,L.jsx)(T,{id:e,featured:!0,contextType:r,showThread:!0,withCounters:this.props.withCounters,...i},`f-${e}`)).concat(c)),(0,L.jsx)(N,{...a,showLoading:o&&e.size===0,onLoadMore:n&&this.handleLoadOlder,ref:this.setRef,children:c})}};d($,`propTypes`,{scrollKey:P.default.string.isRequired,statusIds:I.default.list.isRequired,featuredStatusIds:I.default.list,onLoadMore:P.default.func,onScrollToTop:P.default.func,onScroll:P.default.func,trackScroll:P.default.bool,isLoading:P.default.bool,isPartial:P.default.bool,hasMore:P.default.bool,prepend:P.default.node,emptyMessage:P.default.node,alwaysPrepend:P.default.bool,withCounters:P.default.bool,timelineId:P.default.string,lastId:P.default.string,bindToDocument:P.default.bool,statusProps:P.default.object}),d($,`defaultProps`,{trackScroll:!0});export{Z as a,X as i,me as n,pe as o,Q as r,B as s,$ as t};
2//# sourceMappingURL=status_list-DlQJtqos.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.