
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e0103852-1b11-5ab9-9f0f-38062f5f1914")}catch(e){}}();
import{j as t}from"./jsx-runtime-BjG_zV1W.js";import{A as x}from"./AuthorIcons-C-IL0ULj.js";import{N as f}from"./NewsFeedPosts-DGClbBox.js";import{B as g}from"./index-CCu-G_ty.js";import{I as b}from"./Image-ycA_AFLr.js";import{T as d}from"./index-BdpAPpdN.js";import{u as j}from"./useDebounce-D-dOlItd.js";import{r as p}from"./index-D6da9p6-.js";import{c as w,a as y}from"./components-1fH5YjVo.js";import{g as N}from"./index-BFDoivjB.js";import{g as v}from"./index-BbnTzeLf.js";import"./index-x2da_zcv.js";import"./YoutubeIcon-DSouMQiN.js";import"./index-DFtJ8-cK.js";import"./WebThemeContext-DttfuZxo.js";import"./index-BEtxnKBU.js";import"./dayjs.min-B8CfgAhU.js";import"./relativeTime-tlGPeD3Q.js";import"./useTranslation-CfKJAmGY.js";import"./context-CxfOs_9L.js";import"./SparklesIcon-DA4hsc2a.js";import"./LockClosedIcon-BluoCUMI.js";import"./index-BWDs2reA.js";import"./index-CJHGmWl4.js";import"./index-DcpNk-OI.js";import"./ChevronRightIcon-Dsmk2epM.js";const P=({initialPosts:r,initialPagination:e,authorId:o})=>{const a=w(),s=e.total_pages,[i,n]=p.useState(r),[m,l]=p.useState(e.page),c=a?.data,h=()=>{const u=new URLSearchParams;u.append("page",m+1),u.append("author_id",o),a.load(`/paginated_author_posts?${u.toString()}`)};return p.useEffect(()=>{i&&(l(1),n(r))},[r]),p.useEffect(()=>{c&&(l(m+1),n(i.concat(c?.posts)))},[c]),{postsToRender:i,showLoadMore:m+1<=s,isLoading:a?.state!=="idle",postsFetcher:a,fetchPosts:h}},Y=({data:r,matches:e})=>{const o=r?.publication,a=r?.requestUrl,s=r?.author;return!o||!s?[]:v({canonicalUrl:N(a),matches:e,returnEarlyCheck:!s,overrides:{title:s?.name||`${o?.name} Authors`,description:s?.bio||`${o?.description}`},structuredData:{"@context":"https://schema.org","@type":"WebPage",author:{"@type":"Person",name:s?.name,image:{"@type":"ImageObject",contentUrl:s?.profile_picture?.url,thumbnailUrl:s?.profile_picture?.thumb?.url}},breadcrumb:{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,item:{"@id":o?.url,name:o?.name}},{"@type":"ListItem",position:2,item:{"@id":`${o?.url}authors`,name:"Authors"}},{"@type":"ListItem",position:3,item:{"@id":a,name:s?.name}}]}}})},L=()=>{const{publication:r,author:e,paginatedAuthorPosts:o,cardStyles:a}=y(),{isSearching:s}=j(500),{isLoading:i,fetchPosts:n,postsToRender:m,showLoadMore:l}=P({initialPosts:o.posts,initialPagination:o.pagination,authorId:e.id}),c=[{text:r?.name,href:"../"},{text:"Authors",href:"./"},{text:e.name,href:e.slug}];return t.jsxs("div",{className:"px-4",children:[r.render_breadcrumbs&&t.jsx("div",{className:"mx-auto mt-8 max-w-6xl py-4",children:t.jsx(g,{breadcrumbs:c})}),t.jsx("div",{className:"mx-auto flex w-full max-w-6xl pb-16 pt-8",children:t.jsxs("div",{className:"flex w-full flex-col space-y-10",children:[t.jsx("div",{children:t.jsxs("div",{className:"flex w-full flex-col items-center space-x-0 space-y-8 sm:flex-row sm:space-x-8 sm:space-y-0",children:[t.jsx("div",{children:t.jsx("div",{className:"z-10 col-span-1 h-40 min-h-40 w-40 min-w-40 overflow-hidden rounded-full",children:t.jsx(b,{src:e.profile_picture.url,alt:e.name,maxWidth:400,loading:"lazy",aspectRatio:"social"})})}),t.jsxs("div",{className:"w-full max-w-2xl space-y-1",children:[t.jsx(d,{as:"h1",size:"3xl",type:"title",theme:"default",className:"w-full text-center font-semibold text-wt-text-on-background sm:text-left",children:e.name}),t.jsx(d,{as:"p",size:"md",type:"body",theme:"default",className:"w-full text-center text-wt-text-on-background sm:text-left",children:e.bio}),t.jsx("div",{className:"pt-4 sm:pt-2",children:t.jsx(x,{author:e,className:"flex justify-center space-x-2 sm:justify-start"})})]})]})}),t.jsx(f,{publication:r,posts:m,isSearching:s,isLoading:i,showLoadMore:l,fetchPosts:n,cardStyles:a})]})})]})},Z=L;export{Z as default,Y as meta};
//# sourceMappingURL=_authorId-B9wA7wFf.js.map

//# debugId=e0103852-1b11-5ab9-9f0f-38062f5f1914
