
!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]="1d0f483f-15f4-5dce-a760-87aed6c2adae")}catch(e){}}();
import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as d}from"./index-D6da9p6-.js";import{R as P}from"./RecommendationsForm-CK5PX2Ev.js";import{c as M,u as A,L as p}from"./components-1fH5YjVo.js";import{q as g}from"./transition-jWlQb9Jg.js";import{_ as w}from"./dialog-Bw_il7y1.js";import{c as o}from"./index-x2da_zcv.js";import{I as L}from"./Image-ycA_AFLr.js";import{u as R,a as q}from"./WebThemeContext-DttfuZxo.js";import{P as y}from"./index-BWDs2reA.js";import{T as u,n as B}from"./index-CJHGmWl4.js";import{u as E}from"./useTypedLoaderData-CKNseont.js";import{S as W,C as $,B as N,b as D}from"./CreateAction-Ch8S9hjY.js";import{M as h}from"./index-IxBbnf-Q.js";import{L as U,T as F,F as z}from"./index-CiVkisE2.js";import{u as O}from"./useTranslation-CfKJAmGY.js";import{F as Q}from"./index-BMPF7XpZ.js";import{u as Y}from"./useWebBuilderCommunicator-DoXoLq6Y.js";import{g as G}from"./index-BFDoivjB.js";import{g as H}from"./index-BbnTzeLf.js";import{a as K}from"./PageProvider-UC5x2LAl.js";import"./index-CqJN8iQq.js";import"./PoweredByBeehiiv-BmLCj73J.js";import"./i18next-BV1g0mjb.js";import"./index-BdpAPpdN.js";import"./usePublication-eitEkj_L.js";import"./useSignupRedirects-BFAE3Ey4.js";import"./index-DFtJ8-cK.js";import"./Toggle-CqH9SOb_.js";import"./CheckIcon-8bI9teWR.js";import"./XMarkIcon-Y2tO3Ykg.js";import"./switch-COP21Yl5.js";import"./label-CGhICcle.js";import"./keyboard-CaEu2o0u.js";import"./bugs-DVQzBh-s.js";import"./hidden-KuoXmiN5.js";import"./description-BklOXbF-.js";import"./use-is-mounted-BaHv16bB.js";import"./use-root-containers-DR-ugUuM.js";import"./use-owner-vBDpJPdh.js";import"./dayjs.min-B8CfgAhU.js";import"./LockClosedIcon-BluoCUMI.js";import"./index-DcpNk-OI.js";import"./StatusInputs-JkVhk_jg.js";import"./useToast-DK42uF07.js";import"./ChevronDownIcon-CJqY4lqn.js";import"./disclosure-BMs2P2An.js";import"./context-CxfOs_9L.js";function Z({title:i,titleId:a,...l},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":a},l),i?d.createElement("title",{id:a},i):null,d.createElement("path",{fillRule:"evenodd",d:"M12.97 3.97a.75.75 0 0 1 1.06 0l7.5 7.5a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 1 1-1.06-1.06l6.22-6.22H3a.75.75 0 0 1 0-1.5h16.19l-6.22-6.22a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const J=d.forwardRef(Z),V=()=>{const i=M(),a=i.state==="loading",[l,n]=d.useState([]),[s,t]=d.useState([]);return d.useEffect(()=>{i.load("/recommendations?index&page=1")},[]),d.useEffect(()=>{if(i.data){const{recommendations:r,boostedRecommendations:c}=i.data;n(r),t(c)}},[i.data]),{isLoading:a,boostedRecommendations:s,recommendations:l}},C=({isOpen:i,onClose:a,children:l})=>{const{isLoading:n,recommendations:s,boostedRecommendations:t}=V();return e.jsx(g,{appear:!0,show:i,as:d.Fragment,children:e.jsxs(w,{as:"div",className:"relative",onClose:a,children:[e.jsx(g.Child,{as:d.Fragment,enter:"ease-out duration-50",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-50",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e.jsx("div",{className:"fixed inset-0 z-20 bg-black/60"})}),e.jsx(g.Child,{as:d.Fragment,enter:"ease-out duration-50",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-50",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:e.jsx("div",{className:"fixed left-1/2 top-1/2 z-20 h-[94vh] max-h-full w-[94vw] max-w-2xl -translate-x-1/2 -translate-y-1/2 transform rounded-md bg-white p-4 shadow-xl transition-all sm:h-[90vh] sm:w-[90vw]",children:e.jsx(w.Panel,{className:"absolute left-0 top-0 h-full w-full overflow-auto",children:e.jsx(P,{isLoading:n,recommendations:s,boostedRecommendations:t})})})})]})})},X=()=>{const[i]=A();return{isModalOpen:i.get("recommendations")==="true"}},ee=({post:i,screenSize:a,fontFamily:l,headlineColor:n})=>e.jsx(p,{to:`/p/${i.slug}`,children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsx(u,{as:"h4",size:"md",weight:"semibold",fontFamily:l,color:n,className:o({"w-full":!0}),children:i?.web_title}),e.jsx(u,{as:"p",size:"xs",weight:"regular",fontFamily:l,color:n,className:o({"w-full opacity-70":!0}),children:i?.web_subtitle})]})}),T=({post:i,fontFamily:a,headlineColor:l})=>e.jsxs(p,{to:`/p/${i.slug}`,prefetch:"none",className:"w-full max-w-xl rounded bg-transparent shadow-md",children:[e.jsx("div",{className:"z-10 col-span-1 mb-2 w-full overflow-hidden rounded-wt",children:e.jsx(L,{src:i.image_url,alt:i.web_title,maxWidth:800,loading:"lazy",aspectRatio:"social"})}),e.jsxs("div",{className:"w-full space-y-1 p-4",children:[e.jsx(u,{as:"h4",size:"xl",weight:"semibold",fontFamily:a,color:l,className:o({"w-full":!0}),children:i?.web_title}),e.jsx(u,{as:"p",size:"md",weight:"regular",fontFamily:a,color:l,className:o({"w-full opacity-70":!0}),children:i?.web_subtitle})]})]}),b=({text:i,fontFamily:a,fontSize:l,overlineColor:n})=>e.jsx(p,{to:"/",className:"mt-4 flex items-center justify-between space-x-2 hover:underline",children:e.jsx(u,{as:"span",size:l,weight:"semibold",className:"",fontFamily:a,color:n,children:i})}),k=({landingPage:i,featuredPosts:a})=>{const{cardStyles:l}=E(),{isEnabled:n}=R(),{featured_posts_section:s}=i,t=s.headline_font_family,r=s.headline_color,c=()=>a.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:o({"mx-auto mt-16 grid w-full gap-6 sm:grid-cols-2 md:grid-cols-3":!0,"justify-center":s.text_align==="center","justify-start":s.text_align==="left","justify-end":s.text_align==="right"}),children:a.map(m=>n?e.jsx(y,{post:m,cardStyles:l},m.id):e.jsx(T,{post:m,fontFamily:t,color:r},m.id))}),e.jsx("div",{className:o({"mx-auto mt-8 flex w-full flex-col gap-8 sm:flex-row":!0,"justify-center":s.text_align==="center","justify-start":s.text_align==="left","justify-end":s.text_align==="right"}),children:e.jsx(b,{text:s.read_more_cta,size:s.read_more_cta_font_size,fontFamily:s.read_more_cta_font_family,overlineColor:s.overline_color})})]}):null,f=()=>a.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:o({"mx-auto mt-16 flex w-full flex-col gap-8 sm:flex-row":!0,"justify-center":s.text_align==="center","justify-start":s.text_align==="left","justify-end":s.text_align==="right"}),children:[n?e.jsx("div",{className:"w-full max-w-2xl",children:e.jsx(y,{post:a[0],cardStyles:l})}):e.jsx(T,{post:a[0],fontFamily:t,color:r}),a.length!==1&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex w-3/5 flex-col justify-between",children:[e.jsx("div",{className:"flex flex-col space-y-4",children:a?.slice(1).map(m=>e.jsx("div",{children:e.jsx(ee,{post:m,fontFamily:t,headlineColor:r})},m.id))}),e.jsx(b,{text:s.read_more_cta,size:s.read_more_cta_font_size,fontFamily:s.read_more_cta_font_family,overlineColor:s.overline_color})]})})]}),a.length===1&&e.jsx("div",{className:o({"mx-auto mt-6 flex w-full":!0,"justify-center":s.text_align==="center","justify-start":s.text_align==="left","justify-end":s.text_align==="right"}),children:e.jsx(b,{text:s.read_more_cta,size:s.read_more_cta_font_size,fontFamily:s.read_more_cta_font_family})})]}):null;return e.jsx("div",{style:{backgroundColor:s.bg_color},className:"flex flex-col p-16 px-4 pb-24",children:e.jsxs("div",{className:"mx-auto w-full max-w-5xl",children:[e.jsxs("div",{className:"mb-2 flex w-full flex-col items-center space-y-2",children:[s.overline&&e.jsx(u,{as:"span",size:s.overline_font_size,weight:"bold",fontFamily:s.overline_font_family,color:s.overline_color,className:o({"w-full":!0,"text-center":s.text_align==="center","text-left":s.text_align==="left","text-right":s.text_align==="right"}),children:s.overline}),e.jsx(u,{as:"h4",size:s.headline_font_size,weight:"bold",fontFamily:s.headline_font_family,color:s.headline_color,className:o({"w-full":!0,"text-center":s.text_align==="center","text-left":s.text_align==="left","text-right":s.text_align==="right"}),children:s.headline})]}),s.enable_all_post_images?c():f()]})})},te=({ctaText:i,fontFamily:a,fontSize:l})=>{const{t:n}=O();return e.jsx("div",{className:"pt-4",children:e.jsxs(p,{to:"/",prefetch:"intent",className:"duration:300 text-md group inline-flex cursor-pointer items-center no-underline transition",children:[e.jsx(u,{as:"span",size:l,weight:"regular",fontFamily:a,className:o({"mr-1.5 opacity-75 transition duration-200 group-hover:opacity-100":!0}),children:i||n("subscribe.read")}),e.jsx(J,{className:"mt-0.5 h-4 w-4 w-auto opacity-75 transition duration-200 group-hover:opacity-100"})]})})},S=({hasPosts:i,publication:a,landingPage:l,signupWidgetConfigs:n})=>{const{isEnabled:s}=R(),{main_section:t,main_image_url:r,main_bg_image_url:c}=l,f=q[t.bg_gloss_opacity||"0"],m=t?.logo_enabled,x=typeof m=="boolean"&&m===!1;return e.jsxs("div",{style:{backgroundImage:c&&`url(${c})`,backgroundColor:t.bg_color},className:o("relative",c&&"bg-cover bg-center bg-no-repeat"),children:[c&&e.jsx("div",{className:o("absolute left-0 top-0 h-full w-full",f),style:{backgroundColor:t.bg_color}}),e.jsx("div",{className:o({"relative z-10 flex items-center px-4 sm:px-8":!0,"min-h-screen pb-8 pt-16 sm:pb-0 sm:pt-0":!t.disable_full_height,"pb-16 pt-28":t.disable_full_height}),children:e.jsxs("div",{className:o("mx-auto -mt-10 flex w-full max-w-5xl space-x-0 sm:space-x-8"),children:[e.jsx("div",{className:"w-full",children:e.jsxs("div",{className:o({"flex flex-col items-center sm:items-start":!0,"sm:items-center":!r}),children:[!x&&e.jsx("div",{className:"mb-8",children:e.jsx(U,{publication:a,className:"h-24 w-24"})}),e.jsxs("div",{className:"mb-6 w-full",children:[e.jsxs("div",{className:"mb-2 flex w-full flex-col items-center",children:[t.overline&&e.jsx("div",{className:o({"flex w-full justify-center sm:justify-start":!0,"justify-center":!r}),children:e.jsx(u,{as:"span",size:t.overline_font_size,weight:"bold",fontFamily:t.overline_font_family,fontFamilyv2:s?t.overline_font_family:void 0,color:t.overline_color,className:o("w-full",r?"text-center sm:text-left":"text-center"),children:e.jsx(h,{children:t.overline})})}),t.headline&&e.jsx(u,{as:"h1",size:t.headline_font_size,weight:"bold",fontFamily:t.headline_font_family,fontFamilyv2:s?t.headline_font_family:void 0,color:t.headline_color,className:o({"w-full break-words text-center sm:break-normal sm:text-left":!0,"max-w-3xl sm:text-center":!r}),children:e.jsx(h,{children:t.headline})})]}),t.description&&e.jsx(u,{as:"span",size:t.description_font_size,weight:"regular",fontFamily:t.description_font_family,fontFamilyv2:s?t.description_font_family:void 0,color:t.description_color,className:o({"w-full":!0,"text-center sm:text-left":r,"mx-auto max-w-3xl text-center":!r}),children:e.jsx(h,{children:t.description})})]}),e.jsxs("div",{className:o({"mb-10 flex w-full flex-col":!0,"items-center":!r}),children:[e.jsx("div",{className:"w-full max-w-lg",children:s&&n?e.jsx(W,{signupStyles:n}):e.jsx($,{publication:a,autoFocus:!0,backgroundColor:t.signup_bg_color,textColor:t.signup_text_color,placeholderText:t.signup_placeholder_text,cta:t.signup_cta_text,fontFamily:B(t.signup_cta_font_family)})}),t.underline&&e.jsx(u,{as:"span",size:t.underline_font_size,weight:"regular",fontFamily:t.underline_font_family,fontFamilyv2:s?t.underline_font_family:void 0,color:t.underline_color,className:o({"w-full pt-4 text-center sm:text-left":!0,"sm:text-center":!r}),children:e.jsx(h,{children:t.underline})})]}),i&&t.read_more_cta_enabled&&e.jsx("div",{style:{color:t.read_more_cta_color},className:o({"w-full text-center sm:text-left":!0,"sm:text-center":!r}),children:e.jsx(te,{ctaText:t.read_more_cta,fontSize:t.read_more_cta_font_size,fontFamily:t.read_more_cta_font_family})})]})}),r&&e.jsx("div",{className:"flex items-center",children:e.jsx("div",{className:"hidden w-64 sm:block",children:e.jsx("img",{src:r||"",alt:"Main depiction of the publication on the landing page"})})})]})})]})},se=(i,a="-")=>i?i.toLowerCase().replace(/[^a-z0-9\-_]+/gi,a):"",I=({utmSource:i,beehiivBranding:a=!1,color:l})=>{const n=se(i,"_"),{t:s}=O();return e.jsx("div",{style:{color:l},className:"wt-text-on-subscribe-background-color absolute bottom-2 left-1/2 z-10 -translate-x-1/2 transform text-center sm:bottom-4 sm:left-4 sm:translate-x-0",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:space-x-4",children:[a&&e.jsx("p",{className:"whitespace-nowrap text-xs leading-tight sm:text-sm",children:e.jsxs("small",{children:[`${s("footer.article")} `,e.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:`https://beehiiv.com?utm_source=${n}&utm_medium=subscribe_page`,className:"underline",children:"beehiiv"}),` ${s("footer.newsletter")}`]})}),e.jsx("p",{className:"whitespace-nowrap text-xs leading-tight sm:text-sm",children:e.jsx("small",{children:e.jsx("a",{href:`https://beehiiv.com/privacy?utm_source=${n}&utm_medium=subscribe_page`,target:"_blank",className:"underline opacity-30",rel:"noopener noreferrer",children:s("footer.privacy_policy")})})}),e.jsx("p",{className:"whitespace-nowrap text-xs leading-tight sm:text-sm",children:e.jsx("small",{children:e.jsx("a",{href:`https://beehiiv.com/tou?utm_source=${n}&utm_medium=subscribe_page`,target:"_blank",className:"underline opacity-30",rel:"noopener noreferrer",children:s("footer.terms_of_use")})})})]})})},Ve=({data:i,matches:a})=>{const l=i?.publication,n=i?.metaTitle,s=i?.metaDescription||l?.description,t=i?.landingPage?.renderable_fonts||[],r=[];return t?.length>0&&t.forEach(c=>{r.push({rel:"stylesheet",href:c,tagName:"link"})}),i?.landingPage?.main_bg_image_url&&r.push({rel:"preload",href:i?.landingPage?.main_bg_image_url,as:"image"}),i?.landingPage?.main_image_url&&r.push({rel:"preload",href:i?.landingPage?.main_image_url,as:"image"}),H({canonicalUrl:G(i?.requestUrl),matches:a,returnEarlyCheck:!n,overrides:{title:n,description:s},links:r})},ie=()=>{const{hasPosts:i,publication:a,recommendingPublication:l,recommendingPublicationIdInUrl:n,recommendingPublicationIdInCookie:s,landingPage:t,featuredPosts:r,isInitialLoadFromSwarm:c,hasWebThemesEnabled:f,signupWidgetConfigs:m}=E(),{setCookie:x,removeCookie:j}=K();Y({isInitialLoadFromSwarm:c,publicationId:a.id});const v=()=>t?.faq_section?.enabled?t.faq_section.headline_color:t?.featured_posts_section.enabled?t.featured_posts_section.headline_color:t?.testimonials_section.enabled?t.testimonials_section.headline_color:t.main_section.headline_color,{isModalOpen:_}=X();return d.useEffect(()=>{l&&(l.can_signup===!0&&n&&!s?x({name:N,value:n,days:D}):l.can_signup===!1&&s===l.id&&j(N))},[n,s,l,x,j]),l&&l.can_signup===!1?e.jsx(Q,{isFullWidth:!0,customTitle:"Uh oh, it looks like this link is expired.",customDescription:e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:l.name})," needs to update a few things on their end to resume. In the meantime, you can choose to signup to ",l.name," ",e.jsx("strong",{children:e.jsx("a",{href:`${l.url}subscribe`,children:"here"})}),"."]}),errorCode:"404",publicationPresent:!1}):f?e.jsxs("div",{children:[e.jsx(S,{hasPosts:i,publication:a,landingPage:t,signupWidgetConfigs:m}),t?.testimonials_section.enabled&&e.jsx(F,{testimonialsSection:t.testimonials_section,testimonials:t.landing_page_testimonials}),t?.featured_posts_section.enabled&&e.jsx(k,{featuredPosts:r,landingPage:t}),t?.faq_section?.enabled&&e.jsx(z,{faq_section:t.faq_section,isFirstQuestionOpen:c}),e.jsx("div",{className:"relative",children:e.jsx(I,{utmSource:a.name,beehiivBranding:a.beehiiv_branding,color:v()})}),_&&e.jsx(C,{isOpen:_,onClose:()=>{}})]}):e.jsxs("div",{children:[e.jsx(S,{hasPosts:i,publication:a,landingPage:t}),t?.testimonials_section.enabled&&e.jsx(F,{testimonialsSection:t.testimonials_section,testimonials:t.landing_page_testimonials}),t?.featured_posts_section.enabled&&e.jsx(k,{featuredPosts:r,landingPage:t}),t?.faq_section?.enabled&&e.jsx(z,{faq_section:t.faq_section,isFirstQuestionOpen:c}),e.jsx("div",{className:"relative",children:e.jsx(I,{utmSource:a.name,beehiivBranding:a.beehiiv_branding,color:v()})}),_&&e.jsx(C,{isOpen:_,onClose:()=>{}})]})},Xe=ie;export{Xe as default,Ve as meta};
//# sourceMappingURL=index-BHgr8cxJ.js.map

//# debugId=1d0f483f-15f4-5dce-a760-87aed6c2adae
