PageSourceSearch

https://m.wingu.se/packs/collection_preview_card-BEHkYLQ_.js

js wingu.se collected 2026-09-29 15:11:17 UTC 4,123 bytes, 2 lines download raw bytes

1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,c as n}from"./react-intl-DlKP8ATg.js";import{t as r}from"./jsx-runtime-BdxMnOeJ.js";import{c as i}from"./initial_state-DnZ5UeDQ.js";import{t as a}from"./react-router-dom-C1dtKQUg.js";import{t as o}from"./polymorphic-BHw2eKRx.js";import{t as s}from"./classnames-CfLRLWYq.js";import{t as c}from"./close-DIPoUQpY.js";import{t as l}from"./icon_button-DfNtv8BJ.js";import{r as u}from"./utils-B468qXuV.js";import{t as d}from"./useAccount-DhSMQkpH.js";import{r as f,t as p}from"./relative_timestamp-BOzlsJjy.js";import{n as m}from"./default-BJghFIgN.js";import{t as h}from"./warning-DALvmvUf.js";var g=e(s()),_={wrapper:`_comp_list_item__wrapper`,main:`_comp_list_item__main`,title:`_comp_list_item__title`,subtitle:`_comp_list_item__subtitle`,sideContent:`_comp_list_item__sideContent`,icon:`_comp_list_item__icon`},v=r(),y=({icon:e,sideContent:t,children:n,className:r,...i})=>(0,v.jsxs)(`div`,{...i,className:(0,g.default)(_.wrapper,r),children:[e,(0,v.jsx)(`div`,{className:_.main,children:n}),t&&(0,v.jsx)(`span`,{className:_.sideContent,children:t})]}),b=o(({as:e=`h3`,subtitle:t,subtitleId:n,children:r,...i},a)=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(e,{className:_.title,ref:a,...i,children:r}),t&&(0,v.jsx)(`div`,{className:_.subtitle,id:n,children:t})]})),x=o(({as:e,subtitle:t,subtitleId:n,children:r,className:i,...o},s)=>(0,v.jsx)(b,{ref:s,as:e,subtitle:t,subtitleId:n,children:(0,v.jsx)(a,{className:(0,g.default)(i,`focusable`),...o,children:r})})),S=o(({as:e,subtitle:t,subtitleId:n,children:r,className:i,...a},o)=>(0,v.jsx)(b,{as:e,ref:o,subtitle:t,subtitleId:n,children:(0,v.jsx)(`button`,{type:`button`,className:(0,g.default)(i,`focusable`),...a,children:r})})),C={wrapper:`_collections_components_collection_lockup__wrapper`,avatarGrid:`_collections_components_collection_lockup__avatarGrid`,avatarGridSensitive:`_collections_components_collection_lockup__avatarGridSensitive`,avatar:`_collections_components_collection_lockup__avatar`,avatarSensitiveBadge:`_collections_components_collection_lockup__avatarSensitiveBadge`},w=({accountIds:e,sensitive:t})=>{let n=[e[0],e[1],e[2],e[3]];return(0,v.jsxs)(`div`,{className:(0,g.default)(C.avatarGrid,t?C.avatarGridSensitive:null),children:[n.map((e,t)=>(0,v.jsx)(f,{animate:!1,accountId:e,className:C.avatar,size:25},t)),t&&(0,v.jsx)(h,{className:C.avatarSensitiveBadge})]})},T=({collection:e,withAuthorHandle:t=!0,withTimestamp:n,sideContent:r,headingLevel:i=`h3`,titleId:a,subtitleId:o,className:s})=>{let{id:c,name:l}=e;return(0,v.jsx)(y,{className:(0,g.default)(C.wrapper,s),icon:(0,v.jsx)(w,{accountIds:e.items.map(e=>e.account_id),sensitive:e.sensitive}),sideContent:r,children:(0,v.jsx)(x,{as:i,to:u(c),id:a,subtitle:(0,v.jsx)(E,{collection:e,withAuthorHandle:t,withTimestamp:n}),subtitleId:o,children:l})})},E=({collection:e,withAuthorHandle:n,withTimestamp:r})=>{let a=d(e.account_id),o=m(a,i);return(0,v.jsxs)(`ul`,{children:[e.sensitive&&(0,v.jsx)(`li`,{className:`sr-only`,children:(0,v.jsx)(t,{id:`collections.sensitive`,defaultMessage:`Sensitive`})}),n&&a&&(0,v.jsx)(t,{id:`collections.by_account`,defaultMessage:`by {account_handle}`,values:{account_handle:o},tagName:`li`}),(0,v.jsx)(t,{id:`collections.account_count`,defaultMessage:`{count, plural, one {# account} other {# accounts}}`,values:{count:e.item_count},tagName:`li`}),r&&(0,v.jsx)(t,{id:`collections.last_updated_at`,defaultMessage:`Last updated: {date}`,values:{date:(0,v.jsx)(p,{timestamp:e.updated_at,long:!0})},tagName:`li`})]})},D={wrapper:`_collections_components_collection_preview_card__wrapper`,removeButton:`_collections_components_collection_preview_card__removeButton`},O=({collection:e,onRemove:t,...r})=>{let i=n(),a=t&&(0,v.jsx)(l,{icon:`remove`,iconComponent:c,onClick:t,title:i.formatMessage({id:`tag.remove`,defaultMessage:`Remove`}),className:D.removeButton});return(0,v.jsx)(T,{collection:e,className:(0,g.default)(D.wrapper,`collection-preview`),sideContent:a,...r})};export{S as a,y as c,T as i,w as n,b as o,E as r,x as s,O as t};
2//# sourceMappingURL=collection_preview_card-BEHkYLQ_.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.