1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{a as t,i as n,n as r,r as i,t as a}from"./vendor-html-parser-DOJ8foyv.js";import{n as o,t as s}from"./vendor-react-BREUBCH4.js";import{Rt as c,S as l,f as u,lt as d,o as f,v as p,x as m,zt as h}from"./errorBoundary-CheDi6wM.js";var g=e(t()),_=s(),v=(0,h.cn)(`CategoryHeader`),y=[`primary`,`secondary`,`publications`,`publication-with-entries`,`media-center-collection`],b=o(),x=e=>{let t=(0,_.c)(15),{logo:n,variant:r,showTitleLogo:i,title:a,primaryTitle:o,description:s,childCategories:f,hasUnderline:p}=e,h=o===void 0||o,g;t[0]===f?g=t[1]:(g=f===void 0?[]:f,t[0]=f,t[1]=g);let x=g,S;t[2]!==n||t[3]!==i?(S=e=>{let t=(0,b.jsx)(u,{...n,className:v(`TitleLogo`,{showTitleLogo:i})});return e?(0,b.jsx)(`div`,{className:v(`LogoWrapper`),children:t}):t},t[2]=n,t[3]=i,t[4]=S):S=t[4];let C=S,w=!!(s||x.length>0),T=l(`logo_1v`),E;return t[5]!==w||t[6]!==p||t[7]!==n||t[8]!==h||t[9]!==i||t[10]!==C||t[11]!==T||t[12]!==a||t[13]!==r?(E=a?(0,b.jsxs)(`div`,{className:v(`TitleWrapper`,{primaryTitle:h}),children:[(0,b.jsxs)(`div`,{className:v(`TitleContent`),children:[(0,b.jsx)(c,{tagName:`h${h?1:2}`,props:{className:v(`Title`,{primary:h,underlined:w||p}),"data-testid":`category-header-title`,dangerouslySetInnerHTML:{__html:d(a)}}}),i&&n&&C()]}),r&&y.includes(r)&&(0,b.jsxs)(`div`,{className:v(`SponsorAdsWrapper`),"data-testid":`category-header-sponsor-ads`,children:[T&&(0,b.jsx)(`p`,{className:v(`SponsorAdsTitle`),children:`Brought to you by`}),(0,b.jsx)(m.Slot,{pos:`logo_1v`})]})]}):C(!0),t[5]=w,t[6]=p,t[7]=n,t[8]=h,t[9]=i,t[10]=C,t[11]=T,t[12]=a,t[13]=r,t[14]=E):E=t[14],E},S=e=>{let t=(0,_.c)(30),{description:n}=e,{childCategories:r}=e,i;t[0]===r?i=t[1]:(i=r===void 0?[]:r,t[0]=r,t[1]=i);let a=i,{logo:o}=e,{title:s}=e,{hasUnderline:c,primaryTitle:l,showTitleLogo:u,variant:d}=e,f=l===void 0||l,[m,h]=(0,g.useState)(!1),y;t[2]===n?y=t[3]:(y=C(n),t[2]=n,t[3]=y);let S=y,w;t[4]!==a||t[5]!==n||t[6]!==c||t[7]!==o||t[8]!==f||t[9]!==u||t[10]!==s||t[11]!==d?(w={logo:o,variant:d,showTitleLogo:u,title:s,primaryTitle:f,description:n,childCategories:a,hasUnderline:c},t[4]=a,t[5]=n,t[6]=c,t[7]=o,t[8]=f,t[9]=u,t[10]=s,t[11]=d,t[12]=w):w=t[12];let E=w,D;t[13]!==f||t[14]!==e.classNames?(D=v({primaryTitle:f},[e.classNames]),t[13]=f,t[14]=e.classNames,t[15]=D):D=t[15];let O;t[16]===E?O=t[17]:(O=(0,b.jsx)(x,{...E}),t[16]=E,t[17]=O);let k;t[18]!==n||t[19]!==S?(k=n&&(0,b.jsx)(`div`,{className:v(`DescriptionWrapper`),children:(0,b.jsx)(`p`,{className:v(`Description`),"data-testid":`category-header-description`,children:S})}),t[18]=n,t[19]=S,t[20]=k):k=t[20];let A;t[21]!==a||t[22]!==m||t[23]!==s?(A=a.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:v(`ShowMoreWrapper`),children:(0,b.jsxs)(`span`,{className:v(`ShowMore`),onClick:()=>h(!m),onKeyDown:()=>h(!m),tabIndex:0,role:`button`,"aria-label":`Show more topics`,"data-testid":`category-header-show-more-button`,children:[s===`Publications`?`See All Publications`:`More Topics`,(0,b.jsx)(`span`,{className:v(`ShowMoreIconWrapper`),children:(0,b.jsx)(p,{icon:m?`ChevronUp`:`ChevronDown`,className:v(`ShowMoreIcon`)})})]})}),(0,b.jsx)(`div`,{className:v(`SubCategoriesWrapper`,{showed:m}),"data-testid":`category-header-sub-categories`,children:(0,b.jsx)(`ul`,{className:v(`SubCategories`),children:a.map(T)})})]}),t[21]=a,t[22]=m,t[23]=s,t[24]=A):A=t[24];let j;return t[25]!==D||t[26]!==O||t[27]!==k||t[28]!==A?(j=(0,b.jsxs)(`div`,{"data-module":`category-header`,className:D,children:[O,k,A]}),t[25]=D,t[26]=O,t[27]=k,t[28]=A,t[29]=j):j=t[29],j},C=e=>{let t=e?n(e,w):[];return typeof t==`string`?(0,b.jsx)(b.Fragment,{children:t}):t},w={replace:e=>{if(!(e instanceof a))return null;let{type:t,attribs:n,name:o,children:s}=e;if(t===`tag`&&o===`a`){let e=n?r(n):{href:`#`};return(0,b.jsx)(f,{...e,to:e.href,className:v(`SubCategory`),children:i(s,w)})}return(0,b.jsx)(b.Fragment,{})}};function T(e,t){return(0,b.jsx)(`li`,{children:(0,b.jsx)(f,{to:e.url,className:v(`SubCategory`),"data-testid":`category-header-sub-category`,children:e.title})},t)}export{S as t}; 2//# sourceMappingURL=src-CEWaulni.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.