
!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]="9aa4bd1e-1bf1-5a74-aa84-f498da107da5")}catch(e){}}();
import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{c as f}from"./index-x2da_zcv.js";import{T as u}from"./index-BdpAPpdN.js";import{g}from"./index-DcpNk-OI.js";import{L as h,c as y,a as b}from"./components-1fH5YjVo.js";import{r as l}from"./index-D6da9p6-.js";import{N as j}from"./NewsFeedPosts-DGClbBox.js";import{B as w}from"./index-CCu-G_ty.js";import{u as N}from"./useDebounce-D-dOlItd.js";import{g as P}from"./index-BFDoivjB.js";import{g as L}from"./index-BbnTzeLf.js";import"./index-DFtJ8-cK.js";import"./WebThemeContext-DttfuZxo.js";import"./index-BEtxnKBU.js";import"./dayjs.min-B8CfgAhU.js";import"./relativeTime-tlGPeD3Q.js";import"./Image-ycA_AFLr.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"./ChevronRightIcon-Dsmk2epM.js";const v=({title:r,description:o,publication:s})=>e.jsx("div",{className:"border-b-2 border-wt-primary",children:e.jsxs("div",{className:"flex flex-col justify-between sm:flex-row sm:items-end",children:[e.jsxs("div",{className:"space-y-2 py-2 text-4xl sm:py-4",children:[e.jsx(u,{as:"h1",type:"title",theme:"default",className:"text-4xl text-wt-text-on-background",children:r}),e.jsx(u,{as:"h2",type:"title",theme:"default",className:"text-sm text-wt-text-on-background sm:text-lg",children:o})]}),e.jsx("div",{className:"flex flex-wrap py-2",children:s.content_tags?.map(t=>{const a=t.display===r;return e.jsx(h,{to:`/t/${g(t.display)}`,className:f("font-regular mb-2 ml-0 mr-2 cursor-pointer rounded rounded-wt border border-gray-300 px-2 py-1 text-xs sm:ml-2 sm:mr-0",a?"bg-wt-primary text-wt-text-on-primary":"text-wt-primary"),children:t.display},t.id)})})]})}),C=v,S=({initialPosts:r,initialPagination:o,contentTagIds:s})=>{const t=y(),a=o.total_pages,[i,p]=l.useState(r),[n,d]=l.useState(o.page),m=t?.data,x=()=>{const c=new URLSearchParams;c.append("page",n+1),s&&c.append("content_tags",s),t.load(`/posts?${c.toString()}`)};return l.useEffect(()=>{i&&(d(1),p(r))},[r]),l.useEffect(()=>{m&&(d(n+1),p(i.concat(m?.posts)))},[m]),{postsToRender:i,showLoadMore:n+1<=a,isLoading:t?.state!=="idle",postsFetcher:t,fetchPosts:x}},E=S,Z=({matches:r,data:o})=>{const s=o?.publication,t=o?.title,a=o?.description;return L({canonicalUrl:P(o?.requestUrl),matches:r,returnEarlyCheck:!t,overrides:{title:`${t} | ${s?.name}`,description:a},structuredData:{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,item:{"@id":s?.url,name:s?.name}}]}})};function tt(){const{title:r,description:o,publication:s,paginatedPosts:t,cardStyles:a,contentTagIds:i}=b(),{isSearching:p}=N(500),{isLoading:n,fetchPosts:d,postsToRender:m,showLoadMore:x}=E({initialPosts:t.posts,initialPagination:t.pagination,contentTagIds:i}),c=[{text:s?.name,href:"../"},{text:"Topics",href:void 0},{text:r,href:void 0}];return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"mx-auto min-h-screen w-full max-w-6xl px-2 py-4",children:[s.render_breadcrumbs&&e.jsx("div",{className:"mt-8 pb-6",children:e.jsx(w,{breadcrumbs:c})}),e.jsxs("div",{className:"space-y-8",children:[e.jsx(C,{title:r,description:o,publication:s}),e.jsx(j,{publication:s,posts:m,isSearching:p,isLoading:n,showLoadMore:x,fetchPosts:d,cardStyles:a})]})]})})}export{tt as default,Z as meta};
//# sourceMappingURL=_category-DqCHiLxc.js.map

//# debugId=9aa4bd1e-1bf1-5a74-aa84-f498da107da5
