(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["4327"],{24271:function(e,t,i){"use strict";i.d(t,{Z:()=>r});let r={popover:"popover-Q5L48i",visible:"visible-w2GbD1",mounted:"mounted-xAyTLJ",disabled:"disabled-qyVgYn",explainer:"explainer-FXmc_P",dismissExplainer:"dismissExplainer-ns56FG",mobileFooter:"mobileFooter-CGz8PV",button:"button-r00Nrm"}},98550:function(e,t,i){"use strict";i.d(t,{Z:()=>r});let r={trigger:"trigger-V8d1vI",absolute:"absolute-PTY2O3",fixed:"fixed-n4RrZu",line:"line-DsYVXw",active:"active-Yh0Zwm","indent-1":"indent-1-vdeuvl",indent1:"indent-1-vdeuvl","indent-2":"indent-2-yiZ6hb",indent2:"indent-2-yiZ6hb","indent-3":"indent-3-levoo9",indent3:"indent-3-levoo9",label:"label-ZmMXKp",menu:"menu-IsOZj4",row:"row-gbMU1E",show:"show-n4RWCG",hide:"hide-PNwIsV"}},63523:function(e,t,i){"use strict";i.d(t,{Z:()=>r});let r={transcriptionStatus:"transcriptionStatus-OyxRN5",transcriptionChunk:"transcriptionChunk-DKBYAw",hoverChunk:"hoverChunk-IPtOLw",rowIndicator:"rowIndicator-jiY8sp",hoverRow:"hoverRow-zMw3pV",activeRow:"activeRow-S2HzS9",rowText:"rowText-T4jYBi",speakerText:"speakerText-lh6QvQ",rowEditableText:"rowEditableText-PLHmec",activeWord:"activeWord-J6YmxG",loadingSilhouette:"loadingSilhouette-znOXmS",playCircle:"playCircle-Ech_eu"}},71004:function(e,t,i){"use strict";i.d(t,{Z:()=>r});let r={subscribeButton:"subscribeButton-LcKYi7"}},59961:function(e,t,i){"use strict";i.d(t,{Z:()=>r});let r={"byline-wrapper":"byline-wrapper-rwhTzJ",bylineWrapper:"byline-wrapper-rwhTzJ",bottomWithTos:"bottomWithTos-g5MwKO","byline-wrapper--swap-on-mobile":"byline-wrapper--swap-on-mobile-Cs2Jac",bylineWrapperSwapOnMobile:"byline-wrapper--swap-on-mobile-Cs2Jac","byline-faces--swap-on-mobile":"byline-faces--swap-on-mobile-ucRXf3",bylineFacesSwapOnMobile:"byline-faces--swap-on-mobile-ucRXf3",subscribeWidget:"subscribeWidget-sIP7pQ"}},24407:function(e,t,i){"use strict";i.d(t,{Z:()=>r});let r={customThemeHeader:"customThemeHeader-hnC_lZ",headerImageContainer:"headerImageContainer-RUy6uK",portraitImage:"portraitImage-IxD7Ka",fullWidthImageHeader:"fullWidthImageHeader-t5EqiB",fullWidthHeaderContent:"fullWidthHeaderContent-HjaASe",fullWidthHeaderSubtitle:"fullWidthHeaderSubtitle-VOunOK",titleAndImageContainer:"titleAndImageContainer-Eb9L9t",titleAndImageHeader:"titleAndImageHeader-IHm_Y5",noImage:"noImage-uj9DyC",image:"image-_uMo6d",thickRule:"thickRule-aN1kyk","portrait-image-container":"portrait-image-container-zwwsEI",portraitImageContainer:"portrait-image-container-zwwsEI","landscape-image-container":"landscape-image-container-QgDAqQ",landscapeImageContainer:"landscape-image-container-QgDAqQ",bylineWrapper:"bylineWrapper-AHoCt5",bylineContainer:"bylineContainer-TXwfpr"}},37381:function(e,t,i){"use strict";i.d(t,{Z:()=>r});let r={inputWithIcons:"inputWithIcons-vs0rlV",error:"error-nMG79e",inputWrapper:"inputWrapper-Wvkzvn",icon:"icon-wnhO6c"}},7464:function(e,t,i){"use strict";i.d(t,{m:()=>S,p:()=>x});var r=i(58865),n=i(16584),o=i(30396),a=i(94184),l=i.n(a),s=i(12936),d=i(20888),c=i(95441),u=i(68833),p=i(62981),h=i(94874),m=i(15771),g=i(19081),_=i(6490),b=i(58175),f=i(60308),v=i(23945),Z=i(47929);let y={grow_from_bottom:"grow_from_bottom-zeI7HJ",ig_modal_logo:"ig_modal_logo-jNPKzo",logo_left:"logo_left-HHdifs",logo_right:"logo_right-_og3lw",logo_substack:"logo_substack-xHlM5o",ig_image_border:"ig_image_border-FuLDjr",ig_modal_button_container:"ig_modal_button_container-wKHKdO"};function w(){let e=(0,r._)(["Follow "," in the app"]);return w=function(){return e},e}function C(){let e=(0,r._)(["Get the Substack app to follow ","'s reading and writing."]);return C=function(){return e},e}let S=e=>{let{pub:t,slug:i}=e,{iString:r}=(0,c.M1)(),[a,l]=(0,p.Z)("app-footer-sheet",259200),[d,v]=(0,o.eJ)(!a),w=(0,s.Su)();(0,o.d4)(()=>{d&&(w(),(0,u.j)(u.FP.APP_FOOTER_SHEET_CTA_VIEWED),l())},[]);let C=(0,f.K8_)(t.subdomain,i,{redirect:"app-store",source:Z.b3.postFooter});return(0,n.tZ)(_.u_,{isOpen:d,onClose:()=>{v(!1)},position:"bottom",className:y.grow_from_bottom,children:(0,n.tZ)(_.fe,{children:(0,n.BX)(g.tu,{gap:20,alignItems:"center",paddingY:12,children:[(0,n.tZ)(h.qE,{size:80,user:{id:t.author_id,name:t.author_name,handle:t.author_handle,photo_url:t.author_photo_url}}),(0,n.BX)(g.tu,{gap:8,alignItems:"center",children:[(0,n.BX)(b.xv.H3,{translated:!0,align:"center",weight:"heavy",children:["Continue reading ",I18N.p(t.author_name)]}),(0,n.tZ)(b.xv.B2,{translated:!0,align:"center",children:"Available for iOS and Android"})]}),(0,n.BX)(g.tu,{gap:8,alignItems:"center",children:[(0,n.tZ)(m.zx,{priority:"primary",onClick:()=>{(0,u.j)(u.FP.APP_BANNER_TAPPED,{surface:"post",type:"sheet"})},href:C,style:{width:"355px",boxShadow:"none"},children:r("Read in the app")}),(0,n.tZ)(m.zx,{priority:"tertiary",onClick:()=>{(0,u.j)(u.FP.APP_FOOTER_SHEET_CTA_DISMISSED),v(!1)},style:{width:"355px"},children:r("Read in browser")})]})]})})})},x=e=>{let{pub:t,slug:i,action:r,platform:a}=e,{iString:s,iTemplate:h}=(0,c.M1)(),[S,x]=(0,p.Z)("".concat(a,"_webview_app_upsell"),259200),[k,B]=(0,o.eJ)(!S);(0,o.d4)(()=>{k&&(0,u.j)(u.FP.APP_FOOTER_SHEET_CTA_VIEWED,{surface:"post",type:"webview-sheet",platform:a})},[]);let I=(0,f.K8_)(t.subdomain,i,{redirect:"app-store",source:Z.b3.postFooter}),P="read"===r?t.logo_url:t.author_photo_url||t.logo_url;return(0,n.tZ)(_.u_,{isOpen:k,onClose:()=>{B(!1)},position:"bottom",children:(0,n.tZ)(_.fe,{children:(0,n.BX)(g.tu,{gap:32,alignItems:"center",paddingY:40,paddingX:24,children:[(0,n.tZ)(g.gq,{alignItems:"center",justifyContent:"center",style:{position:"relative"},children:P?(0,n.BX)(n.HY,{children:[(0,n.tZ)(g.hs,{justifyContent:"center",alignItems:"center",className:l()(y.ig_modal_logo,y.logo_substack,y.logo_left),children:(0,n.tZ)(d.e,{src:"/img/substack-white.svg",imageIsFixedWidth:!0,useRetinaSizing:!0,maxWidth:44})}),(0,n.tZ)(g.hs,{justifyContent:"center",alignItems:"center",className:l()(y.ig_modal_logo,y.logo_right),children:(0,n.tZ)(d.e,{className:y.ig_image_border,src:P,imageIsFixedWidth:!0,useRetinaSizing:!0,maxWidth:56})})]}):(0,n.tZ)(g.hs,{justifyContent:"center",alignItems:"center",className:l()(y.ig_modal_logo,y.logo_substack),children:(0,n.tZ)(d.e,{src:"/img/substack-white.svg",imageIsFixedWidth:!0,useRetinaSizing:!0,maxWidth:44})})}),(0,n.BX)(g.tu,{gap:8,alignItems:"center",children:[(0,n.tZ)(b.xv.B1,{align:"center",weight:"semibold",children:"read"===r?s("Read in the Substack app"):h(w(),t.author_name)}),(0,n.tZ)(b.xv.B4,{align:"center",fontSize:14,color:"secondary",children:"read"===r?s("Get the Substack app for the best reading experience on the go."):h(C(),(0,v.Q1)(t.author_name))})]}),(0,n.BX)(g.tu,{gap:16,paddingX:16,alignItems:"center",className:y.ig_modal_button_container,children:[(0,n.tZ)(m.zx,{priority:"primary",onClick:()=>{(0,u.j)(u.FP.APP_BANNER_TAPPED,{surface:"post",type:"webview-sheet",platform:a})},href:I,children:s("Open in app")}),(0,n.tZ)(m.zx,{priority:"tertiary",onClick:()=>{(0,u.j)(u.FP.APP_FOOTER_SHEET_CTA_DISMISSED,{surface:"post",type:"webview-sheet",platform:a}),x(),B(!1)},children:s("Maybe later")})]})]})})})}},84844:function(e,t,i){"use strict";i.d(t,{j:()=>h});var r=i(16584),n=i(30396),o=i(2564),a=i(75778),l=i(68833),s=i(61254),d=i(19081),c=i(58175),u=i(60836),p=i(47929);let h=e=>{let{user:t,isMobile:i,post:h}=e,m=(0,a.LC)(),g=(null==t?void 0:t.is_contributor)&&!m,_=!i||!g;return((0,n.d4)(()=>{_||(0,l.j)(l.FP.POST_STATS_IN_APP_UPSELL_SEEN,{post_id:h.id,source:"mobile_post_page"})}),_)?null:(0,r.BX)(d.sg,{children:[(0,r.tZ)(s.iz,{}),(0,r.BX)(d.X2,{className:"statsLink-zUlL_7",alignItems:"center",justifyContent:"space-between",children:[(0,r.tZ)(c.xv.B3,{paddingY:16,as:"a",weight:"semibold",translated:!0,href:(0,u.rN)({postId:h.id,params:{utm_source:p.b3.substack,utm_medium:p.lP.web,utm_campaign:p.VX.postStatsUpsellMobilePostPage,redirect:"app-store"}}),onClick:()=>(0,l.j)(l.FP.POST_STATS_IN_APP_UPSELL_CLICKED,{post_id:h.id,source:"mobile_post_page"}),children:"View stats in the app"}),(0,r.tZ)(o.Z,{})]}),(0,r.tZ)(s.iz,{})]})}},89074:function(e,t,i){"use strict";i.d(t,{F:()=>m});var r=i(7409),n=i(99282),o=i(16584),a=i(94184),l=i.n(a),s=i(76157),d=i(3258),c=i(19081),u=i(58175),p=i(63651);let h={container:"container-kkGPPk",podcastContainer:"podcastContainer-pYPdn8",attribution:"attribution-l47pL9",icon:"icon-a9qh78",pub:"pub-MZ2bx3"},m=e=>{let{postType:t,crossPostInfo:{introText:i,crossPostedPub:a,crossPostingByLine:m}}=e,g=null==m?void 0:m[0];return(0,o.BX)(c.tu,{className:l()(h.container,"podcast"===t&&h.podcastContainer),paddingLeft:16,gap:20,paddingTop:12,paddingBottom:20,children:[(0,o.BX)(c.hs,{className:h.attribution,gap:4,alignItems:"center",children:[(0,o.tZ)(s.Z,{className:h.icon,height:16})," ",(0,o.BX)(u.xv.Meta,{translated:!0,color:"accent",children:["Cross-post from"," ",(0,o.tZ)("a",{className:h.pub,href:(0,p.SVA)(a),children:I18N.p(a.name)})]})]}),(0,o.BX)(u.xv.B2,{color:"pub-primary-text",children:[i," - ",g?(0,o.tZ)(d.ZP,(0,n._)((0,r._)({},g),{type:"user",uuid:""})):(0,o.tZ)(o.HY,{})]})]})}},92828:function(e,t,i){"use strict";i.d(t,{yi:()=>W});var r=i(7409),n=i(99282),o=i(58865),a=i(16584),l=i(30396),s=i(83034),d=i(75744),c=i(57391),u=i(35543),p=i(95441),h=i(60807),m=i(68833),g=i(48980),_=i(59176),b=i(7882),f=i(98914),v=i(94184),Z=i.n(v),y=i(94874),w=i(19081),C=i(58175),S=i(84864);let x={faceCloudContainer:"faceCloudContainer-_kz9BO",primaryFaceContainer:"primaryFaceContainer-QzdEHY",face:"face-a11rOP",primaryFace:"primaryFace-Zu2iVg",primaryFaceAuthorContainer:"primaryFaceAuthorContainer-mPPOG3",primaryFaceAuthor:"primaryFaceAuthor-N0sPLb",secondaryFaces:"secondaryFaces-RiD4aO",secondaryFace0:"secondaryFace0-cUCgnT",secondaryFace1:"secondaryFace1-rYcX59",secondaryFace2:"secondaryFace2-AmFCpK",secondaryFace3:"secondaryFace3-twgHiS",secondaryFace4:"secondaryFace4-nKprf4",secondaryFace5:"secondaryFace5-nvsfNi",secondaryFace6:"secondaryFace6-R9pNd0",secondaryFace7:"secondaryFace7-KnD5jG",secondaryFace8:"secondaryFace8-Ozyivi"},k=e=>{let{pub:t,suggestions:i}=e,r=[82,68,68,55,54,36,36,36,36];return(0,a.BX)("div",{className:x.faceCloudContainer,children:[(0,a.BX)("div",{className:x.primaryFaceContainer,children:[(0,a.tZ)(y.qE,{className:Z()(x.face,x.primaryFace),size:100,showProfileHovercard:!0,user:{id:t.author_id,name:t.author_name,handle:t.author_handle,photo_url:t.author_photo_url}}),t.author_name&&(0,a.tZ)(w.tu,{className:x.primaryFaceAuthorContainer,alignItems:"center",justifyContent:"center",children:(0,a.tZ)(C.xv.B4,{className:x.primaryFaceAuthor,children:(0,S.guessFirstName)(t.author_name)})})]}),i.map((e,t)=>(0,a.tZ)(y.qE,{className:Z()(x.face,x.secondaryFaces,x["secondaryFace".concat(t)]),size:r[t],showProfileHovercard:!0,user:e.recommendedPublication.author}))]})};var B=i(15771),I=i(6490),P=i(51776),E=i(70379),N=i(91400),X=i(98012),O=i(60308),F=i(26111),H=i(23945),L=i(47929);let T={is_www:!0,is_personal_mode:!1,id:0,name:"Substack",subdomain:"www",copyright:"Substack Inc.",mailing_address:"548 Market Street PMB 72296\nSan Francisco, CA 94104",email_from:"no-reply@substack.com",email_from_name:"Substack",logo_url:"/img/substack.png?v=3",language:"en",theme:void 0,theme_var_color_links:void 0,theme_var_background_pop:void 0,theme_var_cover_bg_color:void 0,custom_domain:void 0,type:void 0},A={avatarContainer:"avatarContainer-Bvvbb6",avatar:"avatar-Gt1fvo",termsFooter:"termsFooter-KerNk3"};function M(){let e=(0,o._)(["Already following ",""]);return M=function(){return e},e}function R(){let e=(0,o._)(["",", a paid subscriber of ",", shared this with you."]);return R=function(){return e},e}function D(){let e=(0,o._)(["",", a subscriber of ",", shared this with you."]);return D=function(){return e},e}function z(){let e=(0,o._)([""," shared this with you."]);return z=function(){return e},e}function V(){let e=(0,o._)(["Follow "," to see what else they're reading."]);return V=function(){return e},e}function j(){let e=(0,o._)(["Follow "," and continue reading"]);return j=function(){return e},e}function U(){let e=(0,o._)(["Sign up and follow ",""]);return U=function(){return e},e}let W=e=>{var t,i;let{pub:o,post:s,referringUser:d,freeSignupEmail:v,forceFollowPrompt:Z,surface:y}=e,[C,S]=(0,l.eJ)(!1),[x,k]=(0,l.eJ)(!1),[B,P]=(0,l.eJ)(0),[L,T]=(0,l.eJ)(v),[A,R]=(0,l.eJ)(!1),{iString:D,iTemplate:z}=(0,p.M1)(),V=(0,N.XA)(),j=(0,E.pm)(),U=(0,h.aF)(),{getExperimentVariant:W}=(0,c.jc)(),G=W("app_upsell_follow_prompt"),K=!!U||!!v,Q=(0,u.Sv)(d,null!=y?y:"follow-referrer-prompt",void 0,{auto:K}),$=(0,b.ib)({pathname:"/api/v1/user/".concat(d.id,"/subscriber-lists?lists=following"),auto:!0}),ee=null!==(i=null===(t=$.result)||void 0===t?void 0:t.subscriberLists.flatMap(e=>e.groups.flatMap(e=>e.users)).slice(0,9))&&void 0!==i?i:[],et=(0,l.Ye)(()=>({free_signup_email:v,post_id:null==s?void 0:s.id,referring_user_id:d.id}),[v,null==s?void 0:s.id,d.id]);(0,l.d4)(()=>{if(!$.hasLoadedOnce||K&&!Q.isLoaded||Q.isFollowing){Z&&Q.isFollowing&&j.popToast(e=>(0,a.tZ)(E.FN,(0,n._)((0,r._)({},e),{text:z(M(),(0,H.Q1)(d.name))})));return}try{let e=new URL(document.referrer);if(/(\b|\.)google\./.test(e.hostname)||["news.ycombinator.com","hckrnews.com"].includes(e.hostname))return}catch(e){}if(U&&(0,F.x)("follow-referrer-on-load")){(0,f.iO)("follow-referrer-on-load"),(0,m.j)(m.FP.FOLLOW_REFERRER_PROMPT_REDIRECTED,et),eo({fromRedirect:!0}).then(()=>S(!0));return}let e="follow-prompt-for-post-".concat(null==s?void 0:s.id,"-and-referrer-").concat(d.id,"-shown-at"),t=(0,_.mM)(e);!(!Z&&t&&(0,X.Z)().subtract(7,"days").isBefore(t))&&((0,_.ex)(e,Date.now()),S(!0),(0,m.j)(m.FP.FOLLOW_REFERRER_PROMPT_SHOWN,et))},[U,$.hasLoadedOnce,Q.isLoaded]);let ei=(0,l.I4)(()=>{(0,m.j)(m.FP.FOLLOW_REFERRER_PROMPT_DISMISSED,(0,n._)((0,r._)({},et),{step:B})),S(!1)},[et,S,B]),er=(0,l.I4)(function(){let{email:e,reason:t="sign-in-click"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,m.j)(m.FP.FOLLOW_REFERRER_PROMPT_SIGN_IN_INITIATED,(0,n._)((0,r._)({},et),{reason:t}));let i=(0,O.rhs)({"follow-referrer-on-load":d.id});(0,f.uX)((0,O.uXE)({email:e,for_pub:null==o?void 0:o.subdomain,redirect:i}))},[et,null==o?void 0:o.subdomain,d.id]),en=(0,l.I4)(async function(){let e,t,i,{email:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{({user:e,userExists:t}=await (0,g.rd)("/api/v1/reader/signup/just_email",{method:"POST",json:{email:o}}))}catch(e){e instanceof g.kp&&(i=e.getMessage())}return e?(T(o),0):t?((0,m.j)(m.FP.FOLLOW_REFERRER_PROMPT_EXISTING_EMAIL_ENTERED,(0,n._)((0,r._)({},et),{email:o})),T(o),2):((0,m.j)(m.FP.FOLLOW_REFERRER_PROMPT_SIGNUP_FAILED,(0,n._)((0,r._)({},et),{email:o,error:i})),j.popToast(e=>(0,a.tZ)(E.FN,(0,n._)((0,r._)({},e),{text:i||D("Something went wrong. Please try again later.")}))),1)},[et,j,D]),eo=(0,l.I4)(async function(){let e,{email:t,fromRedirect:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!x){if(k(!0),i||(0,m.j)(m.FP.FOLLOW_REFERRER_PROMPT_CTA_CLICKED,(0,n._)((0,r._)({},et),{email:t})),!K){if(!t){P(1),k(!1);return}if(1===(e=await en({email:t}))){k(!1);return}}Q.isFollowing||void 0!==e&&0!==e||(await Q.toggle(),R(!0)),!U||i?P(2):S(!1),k(!1)}},[U,K,Q,et,x,k,P,en]);return(0,a.tZ)(I.u_,{position:V?"bottom":"default",fullscreenMobile:0!==B,isOpen:C,onClose:ei,children:(0,a.BX)(w.tu,{style:{height:"100%"},children:[(0,a.tZ)(I.xB,{showClose:!0,onClose:ei}),(0,a.BX)(w.tu,{flex:"grow",gap:48,paddingX:32,paddingBottom:32,paddingTop:12,children:[0===B&&(0,a.tZ)(J,{pub:o,referringUser:d,referrerFollowingList:ee,loading:x,showFaceCloud:!U&&"treatment_cloud"===G,onFollowClick:eo,onDismiss:ei}),1===B&&(0,a.tZ)(q,{referringUser:d,loading:x,onFollowWithEmail:eo,onSignInClick:er}),2===B&&(0,a.tZ)(Y,{email:L,referringUser:d,followed:A,onDismiss:ei})]})]})})},J=e=>{var t,i,r,n,o,l;let s,{pub:d,referringUser:c,referrerFollowingList:u,loading:h,showFaceCloud:m,onFollowClick:g,onDismiss:_}=e,{iTemplate:b,iString:f}=(0,p.M1)(),v=null!==(o=null!==(n=null!==(r=c.photo_url)&&void 0!==r?r:null==d?void 0:d.logo_url)&&void 0!==n?n:null==d?void 0:d.author_photo_url)&&void 0!==o?o:(0,O.I4e)(c.id),Z=(0,H.Q1)(c.name),S=null===(i=c.subscriptions)||void 0===i?void 0:null===(t=i.find(e=>e.publication_id==(null==d?void 0:d.id)))||void 0===t?void 0:t.membership_state;s=d&&"subscribed"===S?b(R(),c.name,d.name):d&&"free_signup"===S?b(D(),c.name,d.name):b(z(),c.name);let x="".concat(s," ").concat(b(V(),Z));return(0,a.BX)(w.tu,{alignItems:"center",gap:8,children:[m?(0,a.BX)(a.HY,{children:[(0,a.BX)(C.xv.H2,{translated:!0,align:"center",weight:"heavy",children:["Follow ",I18N.p(c.name)]}),(0,a.tZ)(C.xv.B3,{align:"center",color:"secondary",children:x}),(0,a.tZ)(w.gq,{paddingY:24,children:(0,a.tZ)(k,{pub:{author_id:c.id,author_name:c.name,author_photo_url:null!==(l=c.photo_url)&&void 0!==l?l:""},suggestions:u.map(e=>({recommendedPublication:{author:e}}))})})]}):(0,a.BX)(w.tu,{alignItems:"center",gap:16,paddingBottom:16,children:[(0,a.tZ)("div",{className:A.avatarContainer,children:(0,a.tZ)(y.qE,{className:A.avatar,user:{photo_url:v},size:64})}),(0,a.tZ)(C.xv.H3,{align:"center",weight:"heavy",children:s})]}),(0,a.tZ)(B.zx,{priority:"primary",disabled:h,onClick:g,children:b(j(),Z)}),(0,a.tZ)(B.zx,{priority:"secondary",onClick:_,children:f("Skip")})]})},q=e=>{let{referringUser:t,loading:i,onFollowWithEmail:r,onSignInClick:n}=e,[o,s]=(0,l.eJ)(""),{iTemplate:c}=(0,p.M1)(),u=(0,l.sO)(null);(0,l.d4)(()=>{var e;null===(e=u.current)||void 0===e||e.focus()},[]);let h=(0,l.I4)(e=>{e.preventDefault(),""!==o&&r({email:o})},[r,o]),m=(0,H.Q1)(t.name);return(0,a.BX)(a.HY,{children:[(0,a.BX)(w.tu,{alignItems:"center",gap:8,children:[(0,a.BX)(C.xv.H3,{translated:!0,align:"center",weight:"heavy",children:["Sign up to follow ",I18N.p(m)]}),(0,a.tZ)(C.xv.B4,{translated:!0,align:"center",color:"secondary",children:"Discover great writing and follow your friends on Substack"})]}),(0,a.BX)(w.tu,{gap:12,children:[(0,a.tZ)(C.xv.B4,{translated:!0,weight:"semibold",children:"Your email address"}),(0,a.tZ)("form",{onSubmit:h,children:(0,a.tZ)(P.oi,{ref:u,placeholder:"bob@gmail.com",value:o,onChange:e=>s(e.currentTarget.value)})})]}),(0,a.BX)(w.tu,{alignItems:"center",gap:16,justifyContent:"center",children:[(0,a.tZ)(B.zx,{disabled:i||""===o,onClick:h,children:c(U(),m)}),(0,a.BX)(C.xv.B4,{translated:!0,align:"center",color:"secondary",children:["Already have a Substack account?"," ",(0,a.tZ)(C.xv.B4,{translated:!0,color:"secondary",decoration:"underline",as:"a",href:"#",onClick:n,children:"Sign in"})]})]}),(0,a.tZ)(w.tu,{flex:"grow",justifyContent:"end",children:(0,a.tZ)(C.xv.B4,{align:"center",children:(0,a.tZ)(d.fJ,{className:A.termsFooter,publication:T})})})]})},Y=e=>{let{onDismiss:t,email:i,referringUser:o,followed:l}=e,{iString:d}=(0,p.M1)(),u=(0,N.XA)(),{getExperimentVariant:h}=(0,c.jc)(),m=h("app_install_send_code"),g={utm_medium:L.lP.web,utm_campaign:L.VX.postFollowReferrerPrompt,utm_source:L.b3.post};return(0,a.BX)(a.HY,{children:[l?(0,a.BX)(w.tu,{alignItems:"center",gap:4,children:[(0,a.tZ)(C.xv.H3,{translated:!0,align:"center",weight:"heavy",children:"Read and follow in the app"}),(0,a.BX)(C.xv.B4,{translated:!0,align:"center",color:"secondary",children:["See who else ",I18N.p((0,H.Q1)(o.name))," reads in the Substack app"]})]}):(0,a.BX)(w.tu,{alignItems:"center",gap:4,children:[(0,a.BX)(C.xv.H3,{translated:!0,align:"center",weight:"heavy",children:["Finish following ",I18N.p((0,H.Q1)(o.name))," in the app"]}),(0,a.BX)(C.xv.B4,{translated:!0,align:"center",color:"secondary",children:["See who else ",I18N.p((0,H.Q1)(o.name))," reads on Substack"]})]}),u?(0,a.BX)(a.HY,{children:[(0,a.tZ)(w.gq,{alignSelf:"center",children:(0,a.tZ)("img",{src:(0,O.zF4)("/img/app-preview-card.png"),height:265})}),(0,a.tZ)(w.gq,{flex:"grow",children:(0,a.BX)(w.tu,{alignItems:"center",flex:"grow",gap:8,children:[(0,a.tZ)(B.zx,{href:(0,O.D4e)(g),children:d("Get the Substack app")}),(0,a.tZ)(B.zx,{priority:"tertiary",onClick:t,children:d("Skip")})]})})]}):(0,a.BX)(w.tu,{alignItems:"center",gap:24,children:[(0,a.tZ)("div",{style:{minHeight:"text"===m?355:"email"===m?325:231},children:(0,a.tZ)(s.AppInstallContent,(0,n._)((0,r._)({},g),{suggestedEmail:i,size:180,padding:0}))}),(0,a.tZ)(B.zx,{priority:"secondary",onClick:t,children:d("Continue reading")})]})]})}},75021:function(e,t,i){"use strict";i.d(t,{E:()=>O,f:()=>E});var r=i(7409),n=i(99282),o=i(58865),a=i(16584),l=i(30396),s=i(84488),d=i(80569),c=i.n(d),u=i(92002),p=i(73580),h=i(64515);let m=function(e){var t=(0,u._)({},(0,p._)(e));return(0,a.BX)(h.l,(0,n._)((0,r._)({name:"ReaderSubscriberGiftBadgeIcon",svgParams:{height:26,width:26,viewBox:"1.5 1.5 23 23",fill:"none"},fill:"none"},t),{children:[(0,a.tZ)("rect",{x:"1.5",y:"1.5",width:"23",height:"23",rx:"11.5",fill:"#fff",stroke:"none"}),(0,a.tZ)("g",{"clip-path":"url(#clip0_24306_47333)",children:(0,a.tZ)("path",{style:"fill:none;strokeWidth:2;strokeLinecap:round;strokeLinejoin:round;stroke:rgb(21.176471%,21.568627%,21.568627%);stroke-opacity:1;stroke-miterlimit:4;",d:"M 12 7.998047 L 12 21 M 12 7.998047 C 11.636719 6.509766 11.015625 5.232422 10.212891 4.341797 C 9.410156 3.451172 8.466797 2.982422 7.5 3 C 6.837891 3 6.199219 3.263672 5.730469 3.732422 C 5.261719 4.201172 4.998047 4.833984 4.998047 5.501953 C 4.998047 6.164062 5.261719 6.796875 5.730469 7.265625 C 6.199219 7.734375 6.837891 7.998047 7.5 7.998047 M 12 7.998047 C 12.363281 6.509766 12.984375 5.232422 13.787109 4.341797 C 14.589844 3.451172 15.533203 2.982422 16.5 3 C 17.162109 3 17.800781 3.263672 18.269531 3.732422 C 18.738281 4.201172 19.001953 4.833984 19.001953 5.501953 C 19.001953 6.164062 18.738281 6.796875 18.269531 7.265625 C 17.800781 7.734375 17.162109 7.998047 16.5 7.998047 M 19.001953 12 L 19.001953 19.001953 C 19.001953 19.529297 18.791016 20.039062 18.416016 20.414062 C 18.041016 20.789062 17.53125 21 16.998047 21 L 7.001953 21 C 6.46875 21 5.958984 20.789062 5.583984 20.414062 C 5.208984 20.039062 4.998047 19.529297 4.998047 19.001953 L 4.998047 12 M 4.001953 7.998047 L 19.998047 7.998047 C 20.554688 7.998047 21 8.449219 21 9 L 21 10.998047 C 21 11.554688 20.554688 12 19.998047 12 L 4.001953 12 C 3.445312 12 3 11.554688 3 10.998047 L 3 9 C 3 8.449219 3.445312 7.998047 4.001953 7.998047 Z M 4.001953 7.998047 ",transform:"matrix(0.75,0,0,0.75,0,0) translate(5 5)"})}),(0,a.tZ)("defs",{children:(0,a.tZ)("clipPath",{id:"clip0_24306_47333",children:(0,a.tZ)("rect",{width:"16",height:"16",fill:"white",transform:"translate(4 4)",stroke:"none"})})})]}))};var g=i(95441),_=i(33668),b=i(68833),f=i(94874),v=i(15771),Z=i(19081),y=i(6490),w=i(58175),C=i(51776),S=i(60308),x=i(23945),k=i(47929);function B(){let e=(0,o._)(["Accept ","gift"]);return B=function(){return e},e}function I(){let e=(0,o._)(["Decline ","gift"]);return I=function(){return e},e}function P(){let e=(0,o._)([""," gifted you this paid post. Unlock it in the free Substack app"]);return P=function(){return e},e}let E=e=>{let{post:t,pub:i,referringUser:r,freeSignupEmail:n,user:o,variant:d,startOnEmailCollection:u}=e,[p,h]=(0,l.eJ)(!0),[m,_]=(0,l.eJ)(!1),[f,w]=(0,l.eJ)(!!u),{iString:C,iTemplate:P}=(0,g.M1)(),E=(0,x.Q1)(r.name);(0,l.d4)(()=>{p&&(0,b.j)(b.FP.GIFT_POST_POPOVER_VIEWED,{post_id:t.id,pub_id:i.id,referring_user_id:r.id,user_id:null==o?void 0:o.id,start_on_email_collection:u,variant:d,source:u?"paywall":"popover"})},[p,t.id,i.id,r.id,null==o?void 0:o.id,u,d]);let O=()=>{h(!1)},F=async e=>{if((0,b.j)(e?b.FP.GIFT_POST_EMAIL_SUBMITTED:b.FP.GIFT_POST_CLAIM_CTA_CLICKED,{post_id:t.id,pub_id:i.id,referring_user_id:r.id,user_id:null==o?void 0:o.id,variant:d,source:u?"paywall":"popover"}),!o&&!e){w(!0);return}_(!0);try{await c().post("/api/v1/post_unlock_token").send({post_id:t.id,gifting_user_id:r.id,email:e}),window.location.href=(0,S.K8_)(i.subdomain,t.slug,{redirect:"app-store",source:k.b3.giftPostPrompt})}catch(e){console.error(e)}finally{_(!1)}};return(0,a.tZ)(y.u_,{position:f?"default":"bottom",isOpen:p,onClose:O,fullscreenMobile:f,className:"grow_from_bottom-xX6ELN",children:(0,a.tZ)(y.fe,{children:f?(0,a.tZ)(Z.tu,{gap:8,children:(0,a.tZ)(X,{freeSignupEmail:n,onClose:O,onSubmit:F,isLoading:m})}):(0,a.BX)(Z.tu,{gap:8,children:[(0,a.tZ)(N,{referringUser:r}),(0,a.tZ)(v.zx,{leading:(0,a.tZ)(s.Z,{}),priority:"primary",paddingY:12,disabled:m,onClick:()=>F(),children:"treatment_more_gifty"===d?P(B(),E?"".concat(E,"'s "):""):C("Claim my free post")}),(0,a.tZ)(v.zx,{priority:"secondary",onClick:O,children:"treatment_more_gifty"===d?P(I(),E?"".concat(E,"'s "):""):C("Continue reading with paywall")})]})})})},N=e=>{let{referringUser:t}=e,{iTemplate:i}=(0,g.M1)(),r=(0,x.Q1)(t.name),n=i(P(),r);return(0,a.tZ)(Z.tu,{alignItems:"stretch",gap:8,children:(0,a.BX)(Z.tu,{alignItems:"center",gap:16,paddingBottom:16,children:[(0,a.BX)("div",{className:"avatarContainer-dQGv93",children:[(0,a.tZ)(f.qE,{user:t,size:80}),(0,a.tZ)(O,{})]}),(0,a.tZ)(w.xv.H3,{textAlign:"center",children:n}),(0,a.tZ)(w.xv.B3,{color:"secondary",align:"center",paddingTop:4,paddingX:12,fontSize:15,translated:!0,children:"Available now for iOS and Android"})]})})},X=e=>{let{freeSignupEmail:t,onClose:i,onSubmit:r,isLoading:n}=e,[o,s]=(0,l.eJ)(null!=t?t:""),{iString:d}=(0,g.M1)(),c=(0,_.e)();return(0,a.BX)(Z.tu,{gap:16,children:[(0,a.tZ)(y.xB,{showClose:!0,onClose:i}),(0,a.tZ)(w.xv.H3,{translated:!0,children:"Claim your Free Post"}),(0,a.tZ)(w.xv.B3,{color:"secondary",translated:!0,children:"Enter your email to claim under your existing Substack account or to create a new one."}),(0,a.tZ)(C.oi,{type:"email",name:"email",placeholder:d("Email Address"),ref:c,value:o,onInput:e=>s(e.currentTarget.value)}),(0,a.tZ)(v.zx,{priority:"primary",onClick:()=>r(o),disabled:n,children:n?"Submitting...":"Submit"})]})},O=e=>{let{size:t=32,style:i}=e;return(0,a.tZ)("div",{className:"badge-ijM1EO",style:(0,n._)((0,r._)({},i),{height:t,width:t}),children:(0,a.tZ)(m,{height:t})})}},3862:function(e,t,i){"use strict";i.d(t,{E:()=>w});var r=i(7409),n=i(99282),o=i(16584),a=i(94184),l=i.n(a),s=i(1548),d=i(85685),c=i(95441),u=i(40647),p=i(94874),h=i(24547),m=i(19081),g=i(58175),_=i(98012),b=i(31377),f=i(60308),v=i(63651),Z=i(84864),y=i(59961);function w(e){let{variant:t="",post:i,pub:a,relativeLinks:w=!1,hideMeta:C=!1,hideFaces:S=!1,showAudience:x=!1,renderBylines:k,className:B}=e,{getConfigFor:I}=(0,u.xR)(),P=!!I("enable_author_pages"),{publishedBylines:E=[]}=i,N=E.map(e=>{if(!P)return e;let t=a.contributors.find(t=>t.user_id===e.id);return t?(0,n._)((0,r._)({},e),{name:t.name||e.name,bio:t.bio||e.bio,photo_url:t.photo_url||e.photo_url}):e}),X=a.bylines_enabled&&(0,Z.getPrintedByline)(a,i),O=!S&&X&&a.byline_images_enabled&&N.some(e=>{let{photo_url:t}=e;return!!t});x||(x="page"!==i.type);let{iContext:F,language:H}=(0,c.M1)(),L=e=>{let t=P?(0,f.rfk)({userId:e.id,pub:a}):null;return P&&!t?{href:void 0}:t?{href:t}:{href:(0,v.NNq)(e)}};return(0,o.BX)(m.hs,{className:l()("byline-wrapper",{[y.Z["byline-wrapper--swap-on-mobile"]]:"shows"===t},B),gap:12,alignItems:"center",children:[O&&(0,o.tZ)(m.hs,{className:l()({[y.Z["byline-faces--swap-on-mobile"]]:"shows"===t}),children:(0,o.tZ)(h.H,{users:N,max:4,size:36,renderAvatar:e=>(0,o.tZ)(p.xV,(0,n._)((0,r._)({},e),{noBase:w}))})}),(0,o.BX)(m.tu,{children:[X&&(k?k({publishedBylines:N,getLinkProps:L}):(0,o.tZ)(g.xv.Meta,{color:"pub-primary-text",children:(0,o.tZ)(s.M,{array:N,formatter:e=>(0,o.tZ)(d.ProfileHoverCard,{disabled:P,subject:e,utmSource:"byline",children:(0,o.tZ)(g.xv,(0,n._)((0,r._)({as:"a"},L(e)),{decoration:"hover-underline",children:e.name}))}),limit:4})})),!C&&(0,o.BX)(m.hs,{gap:4,children:[(0,o.tZ)(g.xv.Meta,{color:"pub-secondary-text",children:(0,_.Z)(i.post_date).locale(H).format("MMM DD, YYYY")}),x&&(0,b.isPaidAudience)(i.audience)&&(0,o.BX)(g.xv.Meta,{color:"pub-secondary-text",children:["∙ ",F("postAudience","Paid")]})]})]})]})}},21316:function(e,t,i){"use strict";i.d(t,{m:()=>m});var r=i(7409),n=i(98848),o=i(16584),a=i(99282),l=i(64515);let s=e=>{var{stroke:t="black",height:i=19,width:s=19}=e,d=(0,n._)(e,["stroke","height","width"]);return(0,o.BX)(l.l,(0,a._)((0,r._)({},d),{name:"AdhocEmailIcon",svgParams:{height:i,width:s,viewBox:"0 0 19 19"},children:[(0,o.tZ)("path",{d:"M3 4C3 3.72386 3.22386 3.5 3.5 3.5H13C13.2761 3.5 13.5 3.72386 13.5 4V12.5C13.5 12.7761 13.2761 13 13 13H3.5C3.22386 13 3 12.7761 3 12.5V4Z",stroke:t}),(0,o.tZ)("path",{d:"M3.5 4L8.25 9.02499L13 4",stroke:t,strokeLinecap:"round","stroke-linejoin":"round"}),(0,o.tZ)("path",{d:"M5 13.5V15C5 15.2761 5.22386 15.5 5.5 15.5H15.3151C15.5913 15.5 15.8151 15.2761 15.8151 15V7C15.8151 6.72386 15.5913 6.5 15.3151 6.5H14",stroke:t})]}))};var d=i(76157),c=i(4878);let u=e=>(0,o.BX)(l.l,(0,a._)((0,r._)({},e),{name:"PodcastIcon",svgParams:{height:19,width:19},children:[(0,o.tZ)("path",{d:"M10.1505 3H8.61291C6.06527 3 4 4.9401 4 7.33333V10","stroke-linejoin":"round"}),(0,o.tZ)("path",{d:"M8.89246 3H10.4301C12.9778 3 15.043 4.9401 15.043 7.33333V10.5","stroke-linejoin":"round"}),(0,o.tZ)("path",{d:"M3 12.1429V13.3571C3 14.5406 3.81359 15.5 4.81721 15.5H6.42473V10H4.81721C3.81359 10 3 10.9594 3 12.1429Z","stroke-linejoin":"round"}),(0,o.tZ)("path",{d:"M16 12.1429V13.3571C16 14.5406 15.1864 15.5 14.1828 15.5H12.5753V10H14.1828C15.1864 10 16 10.9594 16 12.1429Z","stroke-linejoin":"round"})]}));var p=i(34293);let h=e=>{var{stroke:t="black",height:i=19,width:s=19}=e,d=(0,n._)(e,["stroke","height","width"]);return(0,o.tZ)(l.l,(0,a._)((0,r._)({},d),{name:"VideoIcon",svgParams:{height:i,width:s,viewBox:"2 2 15 15"},children:(0,o.BX)("g",{fill:"transparent",children:[(0,o.tZ)("path",{d:"M15.5 15H3.5V4H15.5V15Z",stroke:t,"stroke-linejoin":"round"}),(0,o.tZ)("path",{d:"M11.5 11L8.5 9V12.5L11.5 11Z",stroke:t,"stroke-linejoin":"round"}),(0,o.tZ)("path",{d:"M4 7H15",stroke:t}),(0,o.tZ)("path",{d:"M4.5 4L7.5 7",stroke:t}),(0,o.tZ)("path",{d:"M8 4L11 7",stroke:t}),(0,o.tZ)("path",{d:"M11.5 4L14.5 7",stroke:t})]})}))},m=e=>{var{postType:t}=e,i=(0,n._)(e,["postType"]);switch(t){case"newsletter":return(0,o.tZ)(c.Z,(0,r._)({},i));case"adhoc_email":return(0,o.tZ)(s,(0,r._)({},i));case"thread":return(0,o.tZ)(p.Z,(0,r._)({},i));case"podcast":return(0,o.tZ)(u,(0,r._)({},i));case"video":return(0,o.tZ)(h,(0,r._)({},i));case"restack":return(0,o.tZ)(d.Z,(0,r._)({},i));default:return console.warn("Unrecognized post type: [".concat(t,"]")),null}}},94594:function(e,t,i){"use strict";i.d(t,{o:()=>E});var r=i(7409),n=i(99282),o=i(58865),a=i(16584),l=i(30396),s=i(80569),d=i.n(s),c=i(71375),u=i(50515),p=i(95441),h=i(68833),m=i(98914),g=i(71068),_=i(15771),b=i(19081),f=i(38841),v=i(58175),Z=i(64300),y=i(70379),w=i(84864);function C(){let e=(0,o._)(["Why do you recommend this Substack?"]);return C=function(){return e},e}function S(){let e=(0,o._)(["Optional"]);return S=function(){return e},e}let x={CHOOSE:"choose"},k=e=>{var t;let{pubToRecommendBack:i,recommendingPub:o,recommendedPubs:s,setStep:h,close:k,setLoading:I,source:P}=e,{iString:E,iTemplate:N}=(0,p.M1)(),[X,O]=(0,l.eJ)(null),{popToast:F}=(0,y.pm)();(0,l.d4)(()=>{let e=null==s?void 0:s.find(e=>{let{id:t}=e;return t===i.id});if(null===X&&e){var t;O(null!==(t=e.blurb)&&void 0!==t?t:null)}},[X,s,i.id]);let H=async()=>{if(!o){console.warn("No recommending pub");return}await d().put("/api/v1/recommendations").send((0,r._)({recommended_publication_id:i.id,recommending_publication_id:o.id,source:P||"recommendation_notification_email",suggested:!1},X&&X.trim()?{description:X.trim()}:{})),(null==s?void 0:s.some(e=>{let{id:t}=e;return t!==i.id}))?null==k||k():null==h||h(x.CHOOSE),I?(I(!0),null==k||k()):((0,m.uX)("/publish/recommendations"),F(e=>(0,a.tZ)(y.FN,(0,n._)((0,r._)({},e),{text:E("Recommendation added")}))))},L=(0,w.getByLine)(i);return(0,a.BX)(a.HY,{children:[(0,a.BX)(b.gq,{justifyContent:"space-between",alignItems:"center",flex:"grow",paddingX:20,paddingTop:20,paddingBottom:16,borderBottom:"detail",children:[(0,a.tZ)(v.xv.H3,{weight:"heavy",flex:"grow",children:E("New recommendation")}),(0,a.tZ)(_.hU,{priority:"tertiary",role:"button",size:"sm",title:"Close",onClick:()=>{k&&k()},"aria-label":"close",children:(0,a.tZ)(c.Z,{size:20})})]}),(0,a.tZ)(b.tu,{padding:20,children:(0,a.BX)(b.tu,{gap:24,children:[(0,a.tZ)(b.tu,{padding:12,gap:12,bg:"secondary",radius:"sm",shadow:"xs",children:(0,a.BX)(b.gq,{gap:12,flex:"grow",alignItems:"center",children:[(0,a.tZ)(g.xu,{radius:"xs",border:"detail",children:(0,a.tZ)(f.wk,{pub:i,size:56,radius:"xs"})}),(0,a.BX)(b.tu,{flex:"grow",minWidth:0,children:[(0,a.tZ)(v.xv.B3,{weight:"semibold",ellipsis:!0,children:i.name}),L&&(0,a.tZ)(v.xv.B4,{color:"secondary",children:"By ".concat(L)})]})]})}),(0,a.BX)(b.tu,{gap:8,children:[(0,a.BX)(b.gq,{flex:"grow",justifyContent:"space-between",children:[(0,a.tZ)(v.xv.B4,{weight:"semibold",children:N(C())}),(0,a.tZ)(v.xv.B4,{color:"secondary",children:N(S())})]}),(0,a.tZ)(Z.g,(0,r._)({placeholder:E("Tell your subscribers why they might enjoy ".concat(i.name,"...")),onChange:e=>O(e.currentTarget.value),value:null!=X?X:"",rows:6,maxlength:500},u.J))]}),(0,a.BX)(b.tu,{gap:12,children:[(0,a.tZ)(_.zx,{disabled:(null!==(t=null==X?void 0:X.length)&&void 0!==t?t:0)>500,onClick:H,children:E("Recommend ".concat(i.name))}),(0,a.tZ)(B,{})]})]})})]})},B=()=>{let{iString:e}=(0,p.M1)();return(0,a.BX)(v.xv.B4,{color:"secondary",align:"center",children:[e("Recommendations will be shown to people after they subscribe to your Substack.")," ",(0,a.tZ)(v.hh,{href:"https://support.substack.com/hc/en-us/articles/5036794583828-How-can-I-recommend-other-publications-on-Substack-",onClick:()=>{(0,h.j)(h.FP.MANAGE_RECOMMENDATIONS_LEARN_MORE_CLICKED,{source:"modal-recommend-pub"})},decoration:"underline",children:e("Learn more")})]})};var I=i(6490);function P(){let e=(0,o._)(["Recommend "," to your readers"]);return P=function(){return e},e}let E=e=>{let{pub:t}=e,[i,r]=(0,l.eJ)(!0),[n,o]=(0,l.eJ)(null),[s,c]=(0,l.eJ)(!1),[u,m]=(0,l.eJ)(!1),{iString:g,iTemplate:Z}=(0,p.M1)();return((0,l.d4)(()=>{let e=async()=>{try{let e=(await d().get("/api/v1/publication_user/default")).body;if(o(e),!e||e.id===t.id){c(!0),r(!1);return}let i=await d().get("/api/v1/recommendations/from/".concat(e.id,"/to/").concat(t.id));c(!!i.body),r(!1)}catch(e){console.error("Failed to load recommend cta: ",e)}};!n&&i&&e()},[t,i,n]),i||s||n&&n.invite_only)?null:(0,a.BX)(a.HY,{children:[(0,a.BX)(b.tu,{alignItems:"center",padding:32,gap:20,borderTop:"detail",style:{marginTop:24},"data-testid":"recommendation-footer",children:[(0,a.tZ)(f.jM,{pub:t,size:48,openInNewTab:!0}),(0,a.BX)(b.tu,{gap:8,children:[(0,a.tZ)(v.xv.H4,{align:"center",children:Z(P(),t.name)}),t.hero_text&&(0,a.tZ)(v.xv.B3,{color:"secondary",align:"center",clamp:3,children:t.hero_text})]}),(0,a.tZ)(_.zx,{onClick:()=>{(0,h.j)(h.FP.END_OF_POST_RECOMMEND_CTA_CLICKED,{recommended_pub_id:t.id,recommending_pub_id:null==n?void 0:n.id}),m(!0)},children:g("Recommend")})]}),(0,a.tZ)(N,{isOpen:u,onClose:()=>m(!1),pubToRecommend:t,recommendingPub:n,setStep:()=>{m(!1)},setLoading:r})]})},N=e=>{let{isOpen:t,onClose:i,pubToRecommend:o,recommendingPub:l,setLoading:s,setStep:d}=e,c=(0,y.pm)(),{iString:u}=(0,p.M1)();return(0,a.tZ)(I.u_,{isOpen:t,onClose:i,children:(0,a.tZ)(k,{pubToRecommendBack:o,recommendingPub:l,setStep:d,close:i,setLoading:e=>{s(e),c.popToast(e=>(0,a.tZ)(y.FN,(0,n._)((0,r._)({},e),{text:u("Recommendation added")})))},source:"end-of-post-recommend-cta"})})}},93678:function(e,t,i){"use strict";i.d(t,{O7:()=>J,Up:()=>U});var r=i(92002),n=i(73580),o=i(7409),a=i(99282),l=i(16584),s=i(30396),d=i(94184),c=i.n(d),u=i(31131),p=i(74655),h=i(29032),m=i(71212),g=i(99869),_=i(46990),b=i(27543),f=i(20068),v=i(33804),Z=i(75697),y=i(58474),w=i(2236),C=i(4038),S=i(81821);let x=e=>{let{pub:t,post:i,style:r,selectionId:n,size:o,hoverOverlay:a=!0}=e,{img:d,imgDownload:c,shareData:u,useNativeShare:p}=(0,C.Q)((0,w.lx)({pub:t,post:i,selectionId:n,style:r})),h=(0,s.I4)(async()=>{await (0,w.mT)({post_id:i.id,selection_id:n,aspect_ratio:r.aspectRatio,type:"post_selection",shareData:p?u:void 0,eventName:"SHARE_SELECTION_IMAGE_DOWNLOADED",additionalTrackingData:{interaction:"click"}})},[i.id,n,r.aspectRatio,p,u]);return(0,l.tZ)(w.kA,{onClick:h,href:p?void 0:c,children:(0,l.BX)(w.A4,{size:o,children:[!(0,S.tq)()&&d&&a&&(0,l.tZ)(w.rA,{onClick:h}),(0,l.tZ)(w.M$,{img:d})]})})};var k=i(95441),B=i(60807),I=i(68833),P=i(48980),E=i(7882),N=i(98914),X=i(15771),O=i(19081),F=i(6490),H=i(70379),L=i(60308),T=i(63651),A=i(47929);let M=e=>{let{assetStyle:t,aspectRatio:i,loadingSelection:r,post:n,pub:o,themeVariables:a,setAspectRatio:s,assetTheme:d,setAssetTheme:c,selectionId:u}=e,p=[],h=(null==n?void 0:n.cover_image)||(null==o?void 0:o.cover_photo_url);return h&&p.push("image"),a.background_pop&&p.push("accent"),p.push("primary"),(0,l.tZ)(F.fe,{children:(0,l.BX)(O.tu,{gap:20,children:[(0,l.tZ)(O.hs,{className:"imageContainer-OjAkhl",alignItems:"center",justifyContent:"center",children:n&&u&&!r&&(0,l.tZ)(x,{pub:o,post:n,style:t,selectionId:u,size:400,hoverOverlay:!1})}),(0,l.BX)(y.k2,{children:[(0,l.tZ)(y.Qe,{assetThemes:p,assetTheme:d,setAssetTheme:c,theme:a,pubCoverImageUrl:h}),(0,l.tZ)(y.zw,{aspectRatio:i,setAspectRatio:s,includeInstagram:!0})]})]})})},R=e=>{let{pub:t,post:i,isOpen:r,onClose:n,selection:d,selectionId:c,setSelectionId:u,themeVariables:p}=e,{iString:h}=(0,k.M1)(),[y,w]=(0,s.eJ)(!1),[C,x]=(0,s.eJ)("instagram"),R=(null==i?void 0:i.cover_image)||(null==t?void 0:t.cover_photo_url),[D,z]=(0,s.eJ)(R?"image":"accent"),V=(0,B.aF)(),j=(0,H.pm)(),U=(0,S.tq)({checkFirst4:!0}),{result:W}=(0,E.ib)({pathname:"/api/v1/publication/".concat(t.id,"/theme"),auto:!!d&&i&&r&&!p,cacheTtl:1/0,initialResult:p,deps:[d,i,r,p]}),J=r&&(!!c||y)&&!!W;(0,s.d4)(()=>{J&&(null==i?void 0:i.id)&&(0,I.j)(I.FP.SHARE_SELECTION_MODAL_OPENED,{post_id:i.id})},[J,i]),(0,s.d4)(()=>{d&&i&&r&&(async()=>{w(!0);try{let e=await (0,P.rd)("/api/v1/post_selection",{method:"PUT",json:{postId:i.id,publication_id:t.id,startParagraph:d.startParagraph,endParagraph:d.endParagraph,startOffset:d.startOffset,endOffset:d.endOffset}});if(w(!1),e instanceof Error)throw e;u(e.selection.id.toString())}catch(e){alert((0,P.i)(e)),w(!1),n()}})()},[t,i,d,r,u,n]);let q=(e,r)=>{let n=$(),o=(0,Z.O1)(null,{pub:t,post:i,selectionId:c,user:V||void 0,medium:"web",utm_campaign:A.VX.postShareSelection,params:{aspectRatio:C,bgColor:n.bgColor,textColor:n.textColor}});(0,Z.I)(e,r,{shareUrl:o,post:i,pub:t,selectionId:c,utm_campaign:A.VX.postShareSelection})},Y=async()=>{q("copy",e=>((0,N.vQ)(e),j.popToast(e=>(0,l.tZ)(H.FN,(0,a._)((0,o._)({},e),{text:h("Copied link to clipboard")}))),!1))},G=async()=>{q("facebook",e=>(0,T.n1t)("https://www.facebook.com/sharer/sharer.php",{u:e}))},K=async()=>{i&&q("twitter",e=>(0,L.LaP)({url:e,text:i.title}))},Q=async()=>{q("linkedin",e=>(0,T.n1t)("https://www.linkedin.com/sharing/share-offsite/",{url:e}))},$=()=>{if(!W)return{aspectRatio:C};switch(D){case"image":return{aspectRatio:C,textColor:"#ffffff",bgImage:!0};case"accent":return{aspectRatio:C,bgColor:W.background_pop,textColor:W.print_on_pop};default:return{aspectRatio:C,bgColor:W.web_bg_color||W.cover_bg_color,textColor:W.print_on_web_bg_color||W.cover_print_primary||"#1a1a1a"}}},ee=async()=>{let e=$(),r="Share Selection - ".concat(e.aspectRatio);(0,I.j)(I.FP.SHARE_SELECTION_IMAGE_DOWNLOADED,{post_id:null==i?void 0:i.id,selection_id:c,type:r,aspect_ratio:C,interaction:"click"});let n=document.createElement("a");n.href=i&&c?(0,L.BPe)(t,i,c,e,r):"",n.download="Share Selection - ".concat(C),n.target="_blank",n.rel="noopener noreferrer",n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)};return(0,l.tZ)(F.u_,{isOpen:J,onClose:n,width:640,fullscreenMobile:!0,children:(0,l.BX)(v.w,{children:[(0,l.tZ)(F.xB,{title:h("Share quote"),showClose:!0,onClose:n,showDivider:!0}),(0,l.tZ)(M,{assetStyle:$(),aspectRatio:C,loadingSelection:y,post:i,pub:t,themeVariables:W,setAspectRatio:x,assetTheme:D,setAssetTheme:z,selectionId:c,setSelectionId:u}),(0,l.tZ)(F.mz,{direction:"row",showDivider:!0,primaryButton:U?void 0:(0,l.tZ)(X.zx,{priority:"primary",flex:"grow",disabled:!c,onClick:ee,leading:(0,l.tZ)(m.Z,{size:20}),children:h("Download")}),secondaryButton:(0,l.BX)(O.gq,{gap:8,children:[(0,l.tZ)(X.hU,{priority:"secondary-outline",onClick:Y,disabled:!c,children:(0,l.tZ)(g.Z,{height:20,width:20})}),(0,l.tZ)(X.hU,{priority:"secondary-outline",onClick:K,disabled:!c,children:(0,l.tZ)(f.Z,{height:20,width:20})}),(0,l.tZ)(X.hU,{priority:"secondary-outline",onClick:G,disabled:!c,children:(0,l.tZ)(_.Z,{height:20,width:20})}),(0,l.tZ)(X.hU,{priority:"secondary-outline",onClick:Q,disabled:!c,children:(0,l.tZ)(b.Z,{height:20,width:20})})]})})]})})};var D=i(58175),z=i(75419),V=i(91400),j=i(24271);function U(e){var t,i,r;let{post:n,pub:o,selection:a,onClose:d,themeVariables:c,userInteractionDisabled:u}=e,[p,h]=(0,s.eJ)(!1),[m,g]=(0,s.eJ)(),_=(null==a?void 0:null===(r=a.text)||void 0===r?void 0:null===(i=r.split)||void 0===i?void 0:null===(t=i.call(r," "))||void 0===t?void 0:t.length)||0,b=!a||!(_>=3)||n.is_draft||(null==o?void 0:o.invite_only)?null:(0,l.tZ)(W,{selection:a,onClose:d,userInteractionDisabled:u,onShowSelectionModal:h,post:n,pub:o});return(0,l.BX)(l.HY,{children:[b,(0,l.tZ)(R,{selection:a,pub:o,post:n,isOpen:p,onClose:()=>h(!1),selectionId:m,setSelectionId:g,themeVariables:c})]})}function W(e){let{selection:t,onClose:i,userInteractionDisabled:r,onShowSelectionModal:n,post:d,pub:c}=e,{iString:m}=(0,k.M1)(),g=(0,V.XA)(),_=(0,B.aF)(),b=(0,z.i3)(),f=(0,H.pm)(),v=!d.is_draft&&!!_,[Z,y]=(0,s.eJ)(!1),[w,C]=(0,s.eJ)(!1);(0,s.d4)(()=>{C(!0)},[]),(0,s.d4)(()=>{let e=()=>{C(!1),i()};return window.addEventListener("scroll",e,{passive:!0,capture:!0,once:!0}),()=>{window.removeEventListener("scroll",e,{capture:!0})}},[i]),(0,s.d4)(()=>{let e=()=>{t.y-57*!!g<104?x({top:t.rect.bottom+12}):x({top:t.y-92-12})};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[t,g]);let[S,x]=(0,s.eJ)({top:-1}),E=async()=>{y(!0);try{let e=await (0,P.rd)("/api/v1/post_selection",{method:"PUT",json:{postId:d.id,publication_id:c.id,startParagraph:t.startParagraph,endParagraph:t.endParagraph,startOffset:t.startOffset,endOffset:t.endOffset}});if(y(!1),e instanceof Error)throw e;return e.selection.id}catch(e){alert((0,P.i)(e)),y(!1)}},X=async()=>{let e=await E();if((0,I.j)(I.FP.RESTACK_SELECTION_CLICKED,{post_id:d.id}),!_){let t=(0,L.rhs)(document.location.href,{action:"restack-comment",selection:e}),i=(0,L.uXE)({redirect:t});(0,N.uX)(i,{local_navigation:!1,event});return}let t=(0,L.uRy)(c,d,{urlParams:{r:_?_.id.toString(36):null,selection:e,utm_campaign:A.VX.postShareSelection,utm_medium:A.lP.web}});await b.open({restackUrl:t}) instanceof Error?f.popToast(e=>(0,l.tZ)(H.FN,(0,a._)((0,o._)({},e),{text:"Failed to post"}))):f.popToast(e=>(0,l.tZ)(H.FN,(0,a._)((0,o._)({},e),{text:"Note sent",cta:"View",href:(0,T.E2n)()})))},F=!v&&!Z&&!!_;return -1===S.top?null:(0,l.tZ)(h.C,{children:(0,l.BX)(O.tu,{style:{top:S.top,bottom:S.bottom,left:t.rect.x+t.rect.width/2},justifyContent:"center",outline:"detail",shadow:"md",radius:"md",className:"".concat(j.Z.popover," ").concat(w?j.Z.visible:""," ").concat(r?j.Z.disabled:""),padding:4,gap:4,children:[(0,l.BX)(J,{onClick:()=>{n(!0)},children:[(0,l.tZ)(u.Z,{stroke:"var(--color-utility-white)",size:20}),(0,l.tZ)(D.xv.B4,{color:"vibrance-primary",weight:"medium",children:m("Share")})]}),!c.hide_post_restacks&&v&&(0,l.BX)(J,{onClick:X,disabled:F,children:[(0,l.tZ)(p.Z,{stroke:"var(--color-utility-white)",size:20}),(0,l.tZ)(D.xv.B4,{color:"vibrance-primary",weight:"medium",children:m("Restack")})]})]})})}function J(e){var t=(0,r._)({},(0,n._)(e));return(0,l.tZ)(X.kG,(0,o._)({className:c()(j.Z.button,t.disabled&&j.Z.disabled),resetCss:!0},t))}},90156:function(e,t,i){"use strict";i.d(t,{H:()=>M});var r=i(7409),n=i(58865),o=i(16584),a=i(30396),l=i(80569),s=i.n(l),d=i(7464),c=i(347),u=i(94184),p=i.n(u),h=i(13304),m=i(74626),g=i(7523),_=i(95441),b=i(68833),f=i(98914),v=i(94874),Z=i(19081),y=i(60308);let w={subscribeDialog:"subscribeDialog-ApxQJS",dismissButton:"dismissButton-gWmS4u",pictureBox:"pictureBox-yO_tQ9",childPublicationIcon:"childPublicationIcon-u5S7bv",signInLink:"signInLink-v__pXF",background:"background-qPxN3C",error:"error-ekhTFi",closeIcon:"closeIcon-pSUQVJ",fp:"fp-sXrGxn",form:"form-mUblsD",subscribeButton:"subscribeButton-GT6UQz",signInLinkWrapper:"signInLinkWrapper-WFxaK4",hed:"hed-pyKjVu",dek:"dek-YOBGIH",emailInput:"emailInput-Znhurz"},C=e=>{let{position:t,offset:i,target:r,left:n,modal:a,pub:l,setDismissed:s,subscribe:d,email:c,setEmail:u,loading:C,errors:S,post:x,opacityOfBackground:k,onBackgroundClicked:B}=e,{iString:I}=(0,_.M1)();return(0,o.BX)(o.HY,{children:[(0,o.tZ)(Z.tu,{ref:a,alignItems:"center",className:p()(w.subscribeDialog,w.fp),style:{top:"absolute"===t?"".concat(i,"px"):"".concat(r,"px"),left:"".concat(n,"px"),position:t},children:(0,o.BX)(o.HY,{children:[(0,o.BX)(Z.gq,{alignItems:"end",justifyContent:"center",paddingBottom:8,children:[(0,o.tZ)("div",{className:w.pictureBox,children:(0,o.tZ)(v.qE,{className:w.authorIcon,size:80,user:{photo_url:l.logo_url}})}),(0,o.tZ)("div",{className:w.closeIcon,onClick:()=>s(!0),children:(0,o.tZ)(h.Z,{})})]}),(0,o.BX)(g.Z,{align:"center",className:w.hed,preset:"h4-sans-condensed",children:[I("Discover more from"),(0,o.tZ)("br",{}),I18N.p(l.name)]}),(0,o.tZ)(g.Z,{align:"center",className:w.dek,preset:"body",children:l.hero_text}),(0,o.BX)("form",{className:w.form,onSubmit:e=>{e.preventDefault(),d(c)},children:[(0,o.tZ)("input",{className:w.emailInput,disabled:C,placeholder:I("Enter your email"),value:c,onChange:e=>{e.stopPropagation(),e.preventDefault(),u(e.currentTarget.value)}}),(0,o.tZ)("div",{id:"error-container",children:S&&S.map(e=>(0,o.tZ)("div",{className:w.error,children:e}))}),(0,o.tZ)(m._,{className:w.subscribeButton,disabled:C,type:"submit",children:I("Subscribe")})]}),(0,o.tZ)(m._,{className:w.dismissButton,trailingIcon:"chevron-right",variant:"tertiary",onClick:()=>s(!0),children:I("Continue reading")}),(0,o.BX)(g.Z,{align:"center",className:w.signInLinkWrapper,preset:"caption",children:[(0,o.tZ)("div",{children:I("Already have an account?")}),(0,o.BX)("div",{children:[(0,o.tZ)("a",{className:w.signInLink,style:{cursor:"pointer"},onClick:()=>{(0,b.j)(b.FP.SUBSCRIBE_PROMPT_SIGN_IN_CLICKED,{post_id:x.id}),(0,f.uX)((0,y.uXE)({for_pub:l.subdomain,redirect:(0,y.uRy)(l,x)}))},children:I("Sign in")})," "]})]})]})}),k>0&&(0,o.tZ)("div",{className:w.background,style:{opacity:"".concat(k,"%")},onClick:B})]})};var S=i(57391),x=i(59176),k=i(71068),B=i(15771),I=i(1844),P=i(65523),E=i(58175),N=i(51776),X=i(41233),O=i(91400),F=i(57641),H=i(98012),L=i(6070),T=i(47929);function A(){let e=(0,n._)(["Discover more from ",""]);return A=function(){return e},e}let M=e=>{var t;let{pub:i,post:n,appUpsellEligible:l,isTest:u}=e,[p,h]=(0,a.eJ)(!1),[m,g]=(0,a.eJ)(!1),[M,R]=(0,a.eJ)(!1),[D,z]=(0,a.eJ)(!1),[V,j]=(0,a.eJ)(""),[U,W]=(0,a.eJ)([]),[J,q]=(0,a.eJ)(200),[Y,G]=(0,a.eJ)(0),K=(0,a.sO)(null),{exposeExperiment:Q,getExperimentVariant:$}=(0,S.jc)(),ee=(0,O.XA)(),et="pub-".concat(i.id,"-subscribe-prompt-next-shown-at"),ei="pub-".concat(i.id,"-takeover-next-shown-at"),er="undefined"!=typeof window&&(null===(t=window)||void 0===t?void 0:t.innerHeight)?window.innerHeight:700,en=document.getElementsByClassName("available-content"),eo=en.length>0&&en[0]?en[0].scrollHeight:0,ea=600;ea=Math.max(Math.min(600,eo-er),600),(()=>{var e;let{height:t,width:i}=(null===(e=K.current)||void 0===e?void 0:e.getBoundingClientRect())||{height:0,width:0};q("undefined"!=typeof window&&window&&K.current?(window.innerHeight-t)/2:200),G("undefined"!=typeof window&&window&&K.current?(window.innerWidth-i)/2:0)})();let[el,es]=(0,a.eJ)(er+Math.max(J,ea)),[ed,ec]=(0,a.eJ)(Math.max(document.documentElement.scrollTop||document.body.scrollTop,0)),[eu,ep]=(0,a.eJ)("absolute"),[eh,em]=(0,a.eJ)("fixed"===eu||ed>el-er),eg="fixed"===eu?60:Math.min(Math.max((ed-el+er)/(er-J)*60,0),60),e_=(0,a.I4)(()=>{!ee&&ed>=el-300&&R(!0)},[ed,ee,el,J,R]);(0,a.d4)(()=>{var e;if(u)return;let t=!0;eo<=1.5*er&&(h(!0),t=!1);let i=null;if(null===(e=document)||void 0===e?void 0:e.referrer){try{i=new URL(document.referrer)}catch(e){}((null==i?void 0:i.hostname)==="news.ycombinator.com"||(null==i?void 0:i.hostname)==="hckrnews.com")&&(h(!0),t=!1)}(0,x.mM)(et)>Date.now()&&(h(!0),t=!1),t&&(Q("hide_subscribe_prompt_on_post_page"),"treatment"===$("hide_subscribe_prompt_on_post_page")&&h(!0))},[]),(0,a.d4)(()=>{p&&l&&(Q("app_install_prompts"),"drawer"===$("app_install_prompts")&&g(!0))},[p,l,Q,$]),(0,a.d4)(()=>{eh&&(p||((0,b.j)(b.FP.SUBSCRIBE_PROMPT_SHOWN,{post_id:n.id}),(0,x.ex)(et,(0,H.Z)().add(1,"hour").valueOf()),(0,x.ex)(ei,(0,H.Z)().add(1,"hour").valueOf())))},[eh,p]),(0,a.d4)(()=>{M&&((0,b.j)(b.FP.SUBSCRIBE_PROMPT_DISMISSED,{post_id:n.id}),(0,x.ex)(et,(0,H.Z)().add(1,"day").valueOf()),(0,x.ex)(ei,(0,H.Z)().add(1,"hour").valueOf()))},[M]);let eb=e=>{window.location.href=(0,y.uRy)(i,n,{urlParams:{subscribe_prompt:e}})},ef=(0,a.I4)(async e=>{if(!D){z(!0),W([]),(0,b.j)(b.FP.SUBSCRIBE_PROMPT_SUBMITTED,{post_id:n.id});try{let t=await s().post("/api/v1/free").send({email:e,source:"post-subscribe-prompt"});(0,b.IU)(),"enabled"===i.payments_state||i.has_recommendations?document.location.href=(0,y.W1P)(i,(0,r._)({utm_medium:T.lP.web,utm_source:T.b3.postSubscribePrompt,utm_content:n&&n.id,simple:!0,just_signed_up:!0,next:(0,y.uRy)(i,n),requires_confirmation:t.body.requires_confirmation?"true":""},t.body.subscription_id&&{subscription_id:t.body.subscription_id},t.body.referral_token&&{referral_token:t.body.referral_token})):eb("free")}catch(e){var t,o,a,l,d;(null==e?void 0:null===(o=e.response)||void 0===o?void 0:null===(t=o.body)||void 0===t?void 0:t.error)&&"string"==typeof e.response.body.error?W([e.response.body.error]):(null==e?void 0:null===(l=e.response)||void 0===l?void 0:null===(a=l.body)||void 0===a?void 0:a.errors)&&Array.isArray(e.response.body.errors)&&e.response.body.errors.length>0&&"string"==typeof(null===(d=e.response.body.errors[0])||void 0===d?void 0:d.msg)&&W(e.response.body.errors.map(e=>e.msg))}finally{z(!1)}}},[n,i,D,z]);(0,a.d4)(()=>{if(p||M)return;let e=()=>{let e=Math.max(document.documentElement.scrollTop||document.body.scrollTop,0),t=e-ed;t>0&&"absolute"===eu&&e>el-J&&ep("fixed"),t<0&&"fixed"===eu&&(ep("absolute"),es(ed+J)),t<0&&"absolute"===eu&&e0&&e>el-er)&&em(!0)};return window.addEventListener("scroll",e),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e),window.removeEventListener("resize",e)}},[eu,el,es,ed,ec,em]),(0,a.d4)(()=>{if(p||M)return;let e=e=>{"Escape"===e.key&&R(!0)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[p,M,R]);let{iString:ev,iTemplate:eZ}=(0,_.M1)();return m?(0,o.tZ)(d.m,{pub:i,slug:n.slug}):p||M?(0,o.tZ)(o.HY,{}):(0,L.HD)({pub:i})?(0,o.tZ)(C,{position:eu,offset:el,target:J,left:Y,modal:K,pub:i,setDismissed:R,subscribe:ef,email:V,setEmail:j,loading:D,errors:U,post:n,opacityOfBackground:eg,onBackgroundClicked:e_}):(0,o.BX)(c.h,{children:[(0,o.BX)(Z.tu,{ref:K,bg:"primary",border:"detail",radius:"md",shadow:"xl",className:w.subscribeDialog,style:{top:"absolute"===eu?"".concat(el,"px"):"".concat(J,"px"),left:"".concat(Y,"px"),position:eu},role:"dialog","aria-label":ev("Subscribe modal"),children:[(0,o.BX)(Z.tu,{gap:20,position:"relative",padding:20,children:[(0,o.tZ)(P.hQ,{onClose:()=>R(!0)}),(0,o.tZ)(k.xu,{alignSelf:"center",children:(0,o.tZ)(v.qE,{size:64,photoUrl:i.author_photo_url})}),(0,o.BX)(Z.tu,{justifyContent:"center",gap:4,alignItems:"center",textAlign:"center",children:[(0,o.tZ)(E.xv.B2,{weight:"semibold",color:"primary",children:eZ(A(),i.name)}),i.hero_text&&(0,o.tZ)(E.xv.B3,{color:"secondary",clamp:3,children:i.hero_text}),i.rankingDetailFreeSubscriberCount&&(0,o.tZ)(E.xv.B4,{paddingBottom:24,align:"center",color:"pub-secondary-text",children:i.rankingDetailFreeSubscriberCount})]}),(0,o.tZ)("form",{onSubmit:e=>{e.preventDefault(),ef(V)},children:(0,o.BX)(Z.tu,{gap:8,children:[(0,o.tZ)(N.oi,{placeholder:ev("Enter your email..."),value:V,disabled:D,onChange:e=>{e.stopPropagation(),e.preventDefault(),j(e.currentTarget.value)}}),U.length>0&&(0,o.tZ)(Z.tu,{gap:4,children:U.map(e=>(0,o.tZ)(I.y,{align:"center",children:e}))}),(0,o.tZ)(B.zx,{type:"submit",disabled:D,priority:"primary",children:ev("Subscribe")}),(0,o.tZ)(Z.sg,{paddingTop:8,opacity:80,children:(0,o.tZ)(F.O,{includeCheckbox:!1,addSubscribePreamble:!0,color:"secondary",textAlign:"center"})})]})})]}),(0,o.tZ)(X.et,{children:(0,o.BX)(o.HY,{children:[ev("Already have an account? "),(0,o.tZ)(E.hh,{color:"accent",decoration:"hover-underline",onClick:()=>{(0,b.j)(b.FP.SUBSCRIBE_PROMPT_SIGN_IN_CLICKED,{post_id:n.id}),(0,f.uX)((0,y.uXE)({for_pub:i.subdomain,redirect:(0,y.uRy)(i,n)}))},cursor:"pointer",children:ev("Sign in")})]})})]}),eg>0&&(0,o.tZ)("div",{className:w.background,onClick:e_,style:{opacity:"".concat(eg,"%")}})]})}},44881:function(e,t,i){"use strict";i.d(t,{O:()=>_});var r=i(7409),n=i(99282),o=i(16584),a=i(80569),l=i.n(a),s=i(33804),d=i(72508),c=i(95441),u=i(15771),p=i(19081),h=i(68709),m=i(6490),g=i(51776);function _(e){let{isOpen:t,onClose:i,speakers:a,speakerMap:_,onChangeSpeakerMap:b,postId:f}=e,{iString:v}=(0,c.M1)();return(0,o.tZ)(m.u_,{isOpen:t,onClose:i,children:(0,o.BX)(s.w,{children:[(0,o.tZ)(m.xB,{title:v("Assign Speakers"),description:v("Assign names to each identified speaker to show them on the transcript. If there are too many speakers, you may have to duplicate a name."),showClose:!0,onClose:i,showDivider:!0}),(0,o.tZ)(m.fe,{children:(0,o.tZ)(p.tu,{gap:20,children:a.map(e=>(0,o.BX)(g.fv,{children:[(0,o.tZ)(h.__,{children:(0,d.ml)(e)}),(0,o.tZ)(g.oi,{onChange:t=>{var i;return b((0,n._)((0,r._)({},_),{[e]:null===(i=t.target)||void 0===i?void 0:i.value}))},value:(null==_?void 0:_[e])||"",placeholder:v("Assign a name...")})]}))})}),(0,o.tZ)(m.mz,{direction:"column",showDivider:!0,primaryButton:(0,o.tZ)(u.zx,{priority:"primary",onClick:()=>{_&&Object.keys(_).length>0&&l().put("/api/v1/drafts/".concat(f,"/transcript")).send({speaker_map:_}).then(e=>{e.body.data&&i()})},children:v("Save changes")})})]})})}},9573:function(e,t,i){"use strict";i.d(t,{v:()=>l});var r=i(16584),n=i(60826);let o=e=>{let{children:t,href:i}=e;return(0,r.tZ)(r.HY,{children:(0,r.tZ)("table",{cellSpacing:"0",cellPadding:"8",border:"0",width:"100%",children:(0,r.tZ)("tr",{children:(0,r.tZ)("td",{align:"center",children:(0,r.tZ)("a",{href:i,className:"tw-font-sans tw-text-[13px] tw-font-semibold tw-text-error",children:t})})})})})};var a=i(47929);let l=e=>{let{post:t,compAlreadyExpired:i=!1}=e,l="".concat(n.W.CHECKOUT_URL,"&utm_medium=").concat(a.lP.email,"&utm_campaign=").concat(a.VX.continueYourSupport,"&utm_content=").concat(t.id);return(0,r.BX)("table",{width:"100%",cellSpacing:"0",cellPadding:"0",border:"0",className:"tw-bg-error-wash",bgcolor:"#FFFAFA",children:[(0,r.tZ)("tr",{children:(0,r.tZ)("td",{height:"16"})}),(0,r.tZ)("tr",{children:(0,r.BX)("td",{align:"center",className:"tw-leading-5",children:[(0,r.tZ)("span",{className:"tw-font-sans tw-text-base tw-font-bold tw-text-error",children:"Continue your support"}),(0,r.tZ)("br",{}),i?(0,r.BX)("span",{className:"tw-font-sans tw-text-ssm tw-text-error",children:["Your free trial has ended!",(0,r.tZ)("br",{}),"Continue your support to access paid-only content."]}):(0,r.BX)("span",{className:"tw-font-sans tw-text-ssm tw-text-error",children:["Subscribe now to keep your paid status. You won't be",(0,r.tZ)("br",{}),"charged until your free trial ends on ",n.W.SUBSCRIPTION_EXPIRY_DATE,"."]})]})}),(0,r.tZ)("tr",{children:(0,r.tZ)("td",{height:"16"})}),(0,r.tZ)("tr",{children:(0,r.tZ)("td",{children:(0,r.tZ)(o,{href:l,children:"Subscribe now"})})}),(0,r.tZ)("tr",{children:(0,r.tZ)("td",{height:"16"})})]})}},36441:function(e,t,i){"use strict";i.d(t,{W5:()=>eB,L0:()=>ek,Do:()=>eC,G3:()=>eP,mx:()=>eS,tj:()=>ew,TW:()=>ex,EK:()=>eE,b3:()=>eN,Gz:()=>eI});var r=i(7409),n=i(99282),o=i(16584),a=i(17218),l=i(98848),s=i(94184),d=i.n(s),c=i(26224),u=i(26522),p=i(77116),h=i(57219),m=i(32926),g=i(90099);let _=e=>{let{post:t}=e,{title:i,canonical_url:r}=t,n=(0,m.Q)(t);return(0,o.BX)(g.i$,{gap:4,children:[(0,o.tZ)("div",{className:"heading-UGv4c2",children:n}),(0,o.tZ)("a",{className:"link-jbVsqJ",href:r,children:i})]})};var b=i(1548),f=i(63651);let v={meta:"meta-XhipYq",inheritColor:"inheritColor-eP1Bab"},Z=e=>{let{bylines:t}=e;return(null==t?void 0:t.length)?(0,o.tZ)("div",{className:v.meta,children:(0,o.tZ)(b.M,{array:t||[],formatter:e=>{let{id:t,name:i}=e;return(0,o.tZ)("a",{className:v.inheritColor,href:(0,f.GR3)(t,i),children:i})},limit:3})}):null};var y=i(64343);let w=e=>{var t,i;let{href:r,size:n,cta:a}=e;return(0,o.BX)(g.zK,{gap:8,verticalAlign:"middle",children:[(0,o.tZ)("div",{className:d()("button-fZfkQf",{[(t="buttonSm-PaaWgJ",void 0!==t)?t:""]:"sm"===n,[(i="buttonMd-Lg5kyv",void 0!==i)?i:""]:"md"===n}),children:(0,o.tZ)("a",{href:r,children:a||"Read full story"})}),(0,o.tZ)("a",{href:r,children:(0,o.tZ)(y.Z,{className:"icon-Nb1wbo",isStatic:!0,stroke:"#f2312c"})})]})},C=e=>{let{href:t,size:i,title:r}=e;return(0,o.tZ)("a",{className:"link-AiRTNr",href:t,children:(0,o.tZ)("div",{className:"title-RKep04",style:{fontSize:i},children:r})})};var S=i(17043);let x=e=>{let{caption:t,cta:i,post:r,showBylines:n}=e,{publishedBylines:a,title:l,canonical_url:s,cover_image:d,cover_image_alt:c}=r;return(0,o.BX)(g.i$,{gap:16,style:{width:"100%"},children:[(0,o.tZ)(C,{href:s,size:24,title:l}),n&&(0,o.tZ)(Z,{bylines:a}),d&&(0,o.tZ)("a",{href:s,children:(0,o.tZ)("img",{alt:null!=c?c:l,src:(0,S.zF)(d,1100,{quality:"auto:good",smartCrop:!0}),style:{width:"auto",height:"auto",maxWidth:"100%"},width:550})}),(0,o.BX)(g.i$,{gap:16,children:[(0,o.tZ)("div",{children:t}),(0,o.tZ)(w,{cta:i,href:s,size:"md"})]})]})},k=e=>{let{post:t,cta:i,showBylines:r}=e,{publishedBylines:n,title:a,canonical_url:l,cover_image:s,cover_image_alt:d}=t;return(0,o.tZ)(g.YF,{style:{width:"100%"},children:(0,o.BX)("tr",{children:[s&&(0,o.BX)(o.HY,{children:[(0,o.tZ)("td",{style:{verticalAlign:"top"},width:90,children:(0,o.tZ)("a",{href:l,children:(0,o.tZ)("img",{alt:null!=d?d:a,src:(0,S.zF)(s,180,{quality:"auto:good",smartCrop:!0,aspect:"1:1"}),style:{width:"auto",height:"auto",maxWidth:"100%"},width:90})})}),(0,o.tZ)("td",{style:"min-width: 16px",width:16})]}),(0,o.tZ)("td",{style:{verticalAlign:"top"},children:(0,o.BX)(g.i$,{gap:16,children:[(0,o.tZ)(C,{href:l,size:18,title:a}),r&&(0,o.tZ)(Z,{bylines:n}),(0,o.tZ)(w,{cta:i,href:l,size:"sm"})]})})]})})},B=e=>{let{post:t,cta:i,showBylines:r}=e,{publishedBylines:n,title:a,canonical_url:l}=t;return(0,o.BX)(g.i$,{gap:16,children:[(0,o.tZ)(C,{href:l,size:18,title:a}),r&&(0,o.tZ)(Z,{bylines:n}),(0,o.tZ)(w,{cta:i,href:l,size:"sm"})]})};var I=i(6070),P=i(71075);let E=e=>{var{caption:t,size:i,pub:r,cta:n,showBylines:a}=e,s=(0,l._)(e,["caption","size","pub","cta","showBylines"]);if(!s)return null;let u=(0,I.HD)({pub:r});return(0,o.tZ)("div",{className:d()(P.Z.digestPostEmbed,c.A.digestPostEmbed),"data-component-name":"DigestPostEmbedStatic",children:N({size:i,post:s,caption:t,isTheFP:u,cta:n,showBylines:a})})},N=e=>{let{size:t,post:i,caption:r,isTheFP:n,cta:a,showBylines:l}=e;switch(t){case"lg":return n?(0,o.tZ)(x,{caption:r,cta:a,post:i,showBylines:l}):(0,o.tZ)(u.Y,{post:i,children:X(r)});case"md":return n?(0,o.tZ)(k,{cta:a,post:i,showBylines:l}):(0,o.tZ)(p._,{post:i,children:X(r)});case"sm":return n?(0,o.tZ)(B,{cta:a,post:i,showBylines:l}):(0,o.tZ)(h.o,{post:i});case"xs":return n?(0,o.tZ)(_,{post:i}):(0,o.tZ)(h.o,{post:i});default:return console.warn("unrecognized size",t),null}},X=e=>(0,o.tZ)("p",{className:P.Z.caption,dangerouslySetInnerHTML:{__html:e}});var O=i(58865),F=i(95441);function H(e){let{children:t,href:i,className:r}=e;return(0,o.tZ)("a",{className:d()("button primary email cta subscribe-btn",r),href:i,children:t})}var L=i(62515);function T(){let e=(0,O._)(["Message ",""]);return T=function(){return e},e}let A=e=>{let{userId:t,userName:i}=e,{iTemplate:r}=(0,F.M1)();return(0,o.tZ)("p",{className:"button-wrapper","data-component-name":"DirectMessageStatic",children:(0,o.tZ)(H,{href:(0,L.Ds)({userId:t,userName:i}),children:r(T(),i)})})};var M=i(30396),R=i(28596),D=i(13639),z=i(92027),V=i(347),j=i(14952),U=i(60807),W=i(68833),J=i(7882),q=i(15771),Y=i(19081),G=i(6490),K=i(58175),Q=i(83963),$=i(60308);function ee(){let e=(0,O._)(["Message ",""]);return ee=function(){return e},e}let et=e=>{let{userId:t,userName:i}=e,{iTemplate:r}=(0,F.M1)(),n=(0,j.Ij)(),a=(0,U.aF)(),[l,s]=(0,M.eJ)(!1),[d,c]=(0,M.eJ)([]),[u,p]=(0,M.eJ)(!1),[h,m]=(0,M.eJ)(!1),[g,_]=(0,M.eJ)(!1),b=(0,f.JlE)({userId:t,userName:i}),{result:v}=(0,J.ib)({pathname:(0,f.gKm)({userId:t,userName:i}),deps:[t],auto:!0});(0,M.d4)(()=>{if(v){var e;s(null!==(e=v.can_dm)&&void 0!==e&&e),c(v.dm_upgrade_options||[])}},[v]);let Z=r(ee(),(null==v?void 0:v.name)||i);return(0,o.tZ)(o.HY,{children:(0,o.BX)(V.h,{children:[(0,o.BX)(Y.hs,{flex:"grow",style:{marginBottom:"20px"},justifyContent:"center","data-component-name":"DirectMessageWeb",children:[!!l&&(0,o.tZ)(q.zx,{priority:"primary",onClick:()=>(0,W.j)(W.FP.DIRECT_MESSAGE_WRITER_BUTTON_CLICKED,{locked:!1}),href:(0,L.gp)({urlParams:{user:b,utm_source:"direct-message-writer"}}),newTab:!0,leading:(0,o.tZ)(R.Z,{size:20}),children:Z}),!l&&(0,o.tZ)(q.zx,{onClick:()=>{(0,W.j)(W.FP.DIRECT_MESSAGE_WRITER_BUTTON_CLICKED,{locked:!0}),a?a.id===t?_(!0):p(!0):m(!0)},priority:"secondary",leading:(0,o.tZ)(D.Z,{size:20}),children:Z})]}),(0,o.tZ)(er,{isOpen:h,onClose:()=>m(!1),profile:v,pub:n}),(0,o.tZ)(ei,{isOpen:g,onClose:()=>_(!1)}),(0,o.tZ)(Q.B,{isOpen:u,onClose:()=>p(!1),profile:v,dmUpgradeOptions:d,isEditor:!0})]})})},ei=e=>{let{isOpen:t,onClose:i}=e,{iString:r}=(0,F.M1)();return(0,o.tZ)(G.u_,{width:360,isOpen:t,onClose:i,children:(0,o.tZ)(G.fe,{children:(0,o.BX)(Y.tu,{gap:16,children:[(0,o.tZ)(Y.hs,{alignSelf:"center",flex:"auto",bg:"secondary",radius:"full",padding:16,children:(0,o.tZ)(z.Z,{size:24})}),(0,o.tZ)(Y.tu,{children:(0,o.tZ)(K.xv.B2,{weight:"semibold",align:"center",children:r("You can't message yourself, but others will be able to message you via this button.")})}),(0,o.tZ)(Y.tu,{children:(0,o.tZ)(q.zx,{justifyContent:"center",onClick:i,priority:"secondary",children:r("Okay")})})]})})})},er=e=>{let{isOpen:t,onClose:i,profile:r,pub:n}=e,{iString:a}=(0,F.M1)();return(0,o.tZ)(G.u_,{width:360,isOpen:t,onClose:i,children:(0,o.tZ)(G.fe,{children:(0,o.BX)(Y.tu,{gap:16,children:[(0,o.tZ)(Y.hs,{alignSelf:"center",flex:"auto",bg:"secondary",radius:"full",padding:16,children:(0,o.tZ)(D.Z,{size:24})}),(0,o.tZ)(Y.tu,{children:(0,o.tZ)(K.xv.B2,{weight:"semibold",align:"center",children:a("Sign in to send ".concat(null==r?void 0:r.name," a message"))})}),(0,o.BX)(Y.tu,{gap:8,children:[(0,o.tZ)(q.zx,{justifyContent:"center",href:(0,$.uXE)({for_pub:null==n?void 0:n.subdomain}),children:a("Sign in")}),(0,o.tZ)(q.zx,{justifyContent:"center",onClick:i,priority:"secondary",children:a("Maybe later")})]})]})})})},en=e=>{let{href:t,children:i}=e;return t?(0,o.tZ)("a",{href:t,target:"_blank",rel:"noopener",style:{textDecoration:"none"},children:i}):i};var eo=i(57747);let ea=e=>{let{align:t,width:i}=e,r={};return"center"===t||"100%"===i||i>=$.bxL||(r["left"===t?"paddingRight":"paddingLeft"]=$.bxL-i),r},el=e=>{let{src:t,alt:i,title:r,width:n,height:a,align:l,href:s,captionHtml:c}=e,u="100%"===n?$.bxL:n;return(0,o.tZ)("div",{className:d()(eo.Z.staticView),"data-component-name":"Image3Static",children:(0,o.tZ)(en,{href:s,children:(0,o.BX)("div",{style:ea({align:l,width:n}),className:d()(eo.Z.staticImageWrap),children:[(0,o.tZ)("img",{width:u,height:a,src:(0,$.zF4)(t,2*$.bxL),alt:i}),!c&&r&&(0,o.tZ)("div",{className:d()(eo.Z.caption,eo.Z.static),children:r}),!!c&&(0,o.tZ)("div",{className:d()(eo.Z.caption,eo.Z.static),dangerouslySetInnerHTML:{__html:c}})]})})})};var es=i(2563),ed=i(20888);let ec=e=>{let{src:t,alt:i,title:r,width:n,size:a,align:l,href:s,captionHtml:c}=e,u=s||null,[p,h]=(0,M.eJ)(!1),m=(0,M.sO)(null);return(0,o.BX)("figure",{className:d()(eo.Z.mediaNodeView,l&&eo.Z["align-".concat(l)||""]),"data-component-name":"Image3Dynamic",children:[(0,o.tZ)(Y.gq,{className:d()(eo.Z.imageContainer,eo.Z[a],{[eo.Z.pointer]:u,[eo.Z.zoom]:!u}),onClick:()=>{s?window.open(s,"_blank"):h(!0)},children:(0,o.BX)(Y.tu,{gap:8,children:[(0,o.tZ)(ed.e,{className:eo.Z[a],src:t,alt:i,title:r,maxWidth:(()=>{switch(a){case"large":return $.urw;case"full":if("undefined"!=typeof window)return window.innerWidth;return $.hI6;default:if("100%"===n)return $.qN9;return n}})(),imageRef:m,useRetinaSizing:!0,imageIsFixedWidth:!1}),!c&&!!r&&(0,o.tZ)("figcaption",{"data-component-name":"Image3DynamicTitle",className:eo.Z.caption,children:r}),!!c&&(0,o.tZ)("figcaption",{"data-component-name":"Image3DynamicCaption",className:eo.Z.caption,dangerouslySetInnerHTML:{__html:c}})]})}),(0,o.tZ)(es.ImageViewerModal,{showModal:p,modalContent:[{attrs:{src:t,alt:i,title:r}}],onClose:()=>h(!1),step:0})]})};var eu=i(12277),ep=i(42224),eh=i(22582);let em=e=>{let{text:t,url:i,exposeExperiment:r,variant:n}=e;(0,M.d4)(()=>{n&&r("overwrite_share_button_on_post_pages")},[n]);let a={url:i};return(0,o.tZ)("p",{className:"button-wrapper",children:(0,o.tZ)("a",{className:"button primary",onClick:e=>{e.preventDefault(),navigator.share(a)},children:t})})};var eg=i(84881),e_=i(13693),eb=i(92314),ef=i(12281);let ev=e=>{let{mediaUpload:t,post:i,pub:r}=e;if(!t)return(0,o.tZ)("div",{"data-testid":"video-embed-player-static-missing-media",children:"Did not find video"});let n=(0,f.wsn)({pub:r,post:i,mediaUploadId:t.id});return(0,o.tZ)(ef.L,{mediaUpload:t,href:n})};var eZ=i(93903),ey=i(81821);let ew=(e,t)=>{let{pub:i,props:{isStatic:r,post:n,dataForEmailRender:a}}=t;try{let t=e.getAttribute("data-attrs");if(t){let{mediaUploadId:e}=JSON.parse((0,eZ.Z)(t));if(r){var l,s;return(0,o.tZ)(ev,{pub:i,post:n,mediaUpload:null!==(s=null===(l=a.idToMediaUpload)||void 0===l?void 0:l[e])&&void 0!==s?s:null})}return(0,o.tZ)(eb.c,{pub:i,post:n,mediaUploadId:e})}}catch(e){console.error("Failed to parse video:",e)}return(0,o.tZ)(o.HY,{})},eC=(e,t)=>{let{pub:i,props:{isStatic:l}}=t;try{let t=e.getAttribute("data-attrs");if(t){let e=JSON.parse((0,eZ.Z)(t));return l?(0,o.tZ)(E,(0,n._)((0,r._)({},e),{pub:i,isEditor:!1})):(0,o.tZ)(a.F,(0,n._)((0,r._)({},e),{pub:i,isEditor:!1}))}}catch(e){console.error("Failed to parse digest post embed:",e)}return(0,o.tZ)(o.HY,{})},eS=(e,t)=>{let{pub:i,props:{isStatic:a}}=t;try{let t=e.getAttribute("data-attrs"),l=JSON.parse((0,eZ.Z)(t));return a?(0,o.tZ)(eg.S,(0,n._)((0,r._)({},l),{pub:i})):(0,o.tZ)(eg.y,(0,n._)((0,r._)({},l),{pub:i}))}catch(e){console.error("Failed to parse referrals card:",e)}return(0,o.tZ)(o.HY,{})},ex=(e,t)=>{try{var i;let r=JSON.parse((0,eZ.Z)(e.getAttribute("data-attrs")));if((null==r?void 0:null===(i=r.url)||void 0===i?void 0:i.includes("/p/"))&&"Share"===r.text){let e=!!navigator.share&&navigator.canShare({url:(0,f.uRy)(t.props.pub,t.props.post)})&&(0,ey.tq)();if(e&&"treatment"===t.props.variant)return(0,o.tZ)(em,{text:r.text,url:r.url,variant:t.props.variant,exposeExperiment:t.props.exposeExperiment});if(e&&"control"===t.props.variant){t.props.exposeExperiment("overwrite_share_button_on_post_pages");return}}}catch(e){console.error("Failed to parse button:",e)}},ek=(e,t)=>{let{props:{isStatic:i}}=t;try{let t=e.getAttribute("data-attrs");if(t){var a;let l=null!==(a=JSON.parse(t))&&void 0!==a?a:{};return i?(0,o.tZ)(el,(0,n._)((0,r._)({},l),{captionHtml:e.innerHTML})):(0,o.tZ)(ec,(0,n._)((0,r._)({},l),{captionHtml:e.innerHTML}))}}catch(e){console.error("Failed to parse image3:",e)}return(0,o.tZ)(o.HY,{})},eB=(e,t)=>{let{props:{isStatic:i}}=t;try{let t=e.getAttribute("data-attrs");if(t){let e=JSON.parse(t),a={node:{attrs:(0,n._)((0,r._)({},e),{isEditor:!1})}};return i?(0,o.tZ)(eh.yW,(0,r._)({},a)):(0,o.tZ)(eh.hJ,(0,r._)({},a))}}catch(e){console.error("Failed to parse image gallery embed:",e)}return(0,o.tZ)(o.HY,{})},eI=(e,t)=>{let{props:{isStatic:i}}=t;try{let t=e.getAttribute("data-attrs");if(t){let e=JSON.parse(t),n=(0,r._)({},e);return i?(0,o.tZ)(A,(0,r._)({},n)):(0,o.tZ)(et,(0,r._)({},n))}}catch(e){console.error("Failed to parse direct message embed:",e)}return(0,o.tZ)(o.HY,{})},eP=(e,t)=>{try{let r=JSON.parse((0,eZ.Z)(e.getAttribute("data-attrs")));if(null==r?void 0:r.isEmail){var i;return(0,o.tZ)("table",{className:"recipe-embed recipe-email",cellSpacing:"16px",width:"100%",children:(0,o.tZ)("tbody",{children:(0,o.tZ)("tr",{children:(0,o.tZ)("td",{children:(0,o.tZ)(ep.k,{node:{attrs:{id:r.id}},editable:!1,staticData:null===(i=t.props.dataForEmailRender)||void 0===i?void 0:i.recipes[r.id]})})})})})}return(0,o.tZ)("div",{className:"recipe-embed",dataAttrs:e.getAttribute("data-attrs"),children:(0,o.tZ)(ep.k,{node:{attrs:{id:r.id}},editable:!1})})}catch(e){return console.log("Failed to parse recipe:",e),(0,o.tZ)(o.HY,{})}},eE=e=>{try{let t=JSON.parse((0,eZ.Z)(e.getAttribute("data-attrs")));return(0,o.tZ)(eu.M,{attrs:t})}catch(e){console.error("Failed to parse pinterest:",e)}return(0,o.tZ)(o.HY,{})},eN=(e,t)=>{var i,r,n,a,l,s,d;let c=null!==(d=null===(r=t.props)||void 0===r?void 0:null===(i=r.post)||void 0===i?void 0:i.sponsorshipCampaigns)&&void 0!==d?d:null===(a=t.props)||void 0===a?void 0:null===(n=a.dataForEmailRender)||void 0===n?void 0:n.sponsorshipCampaigns;if(!c)return(0,o.tZ)(o.HY,{});let u=e.getAttribute("data-attrs"),p=c[JSON.parse((0,eZ.Z)(u)).id];if(!p||"archived"===p.status)return(0,o.tZ)(o.HY,{});let h=p.exclude_audience_minimum;if("paid"===h&&!1===t.props.is_freemail||"paid"===h&&(null===(l=t.props.user)||void 0===l?void 0:l.is_subscribed)||"founding"===h&&(null===(s=t.props.user)||void 0===s?void 0:s.is_founding))return(0,o.tZ)(o.HY,{});try{let i=JSON.parse((0,eZ.Z)(e.getAttribute("data-attrs")));if(null==i?void 0:i.isEmail)return(0,o.tZ)(e_.O,{campaign:p,pub:t.pub});return(0,o.tZ)(e_.V,{dataAttrs:e.getAttribute("data-attrs"),pub:t.pub,campaign:p})}catch(e){return console.log("Failed to parse sponsorship campaign:",e),(0,o.tZ)(o.HY,{})}}},80836:function(e,t,i){"use strict";i.d(t,{Z:()=>b});var r=i(16584),n=i(30396),o=i(94184),a=i.n(o),l=i(99869),s=i(347),d=i(75905),c=i(68833),u=i(12799),p=i(98914),h=i(71068),m=i(15771),g=i(19081),_=i(60308);function b(e){let{text:t,post:i,pub:o,offsetTop:b,isAboutPage:f}=e,{isStatic:v}=(0,n.qp)(d.E),Z=(0,p.VA)(t,!0),y=(0,p.VA)(t,!1),w=(0,u.g)(),C=(null==i?void 0:i.id)<0x3f9b46c&&Z!==y?y:Z;if(!i&&!f||!o||v)return null;let S=f?"".concat((0,_.d6h)(o,{addBase:!0}),"#\xa7").concat(Z):"".concat((0,_.SVA)(o),"/i/").concat(null==i?void 0:i.id,"/").concat(Z);return(0,r.tZ)(g.hs,{position:"absolute",alignItems:"center",className:"header-anchor-parent",children:(0,r.BX)(s.h,{children:[(0,r.tZ)(h.xu,{className:a()("header-anchor",{"offset-top":b}),id:"\xa7".concat(C)}),(0,r.tZ)(m.hU,{priority:"secondary",rounded:!1,size:"sm",onClick:e=>{var t;(null===(t=location)||void 0===t?void 0:t.href)&&(e.preventDefault(),(0,c.j)(c.FP.HEADER_ANCHOR_WIDGET_CLICKED,{destination:S}),w(S))},href:S,children:(0,r.tZ)(l.Z,{size:18})})]})})}},39432:function(e,t,i){"use strict";i.d(t,{Z:()=>l});var r=i(7409),n=i(99282),o=i(16584),a=i(64515);let l=e=>(0,o.tZ)(a.l,(0,n._)((0,r._)({},e),{name:"EmailIcon",svgParams:{height:25,width:25,strokeWidth:0,fill:"#000Z"},children:(0,o.tZ)("g",{children:(0,o.tZ)("path",{d:"M22.93,7a2.43,2.43,0,0,0-.41-.93A2.61,2.61,0,0,0,20.39,5H4.61A2.61,2.61,0,0,0,2.48,6.1,2.43,2.43,0,0,0,2.07,7h0A2.78,2.78,0,0,0,2,7.61v9.78A2.61,2.61,0,0,0,4.61,20H20.39A2.61,2.61,0,0,0,23,17.39V7.61A2.25,2.25,0,0,0,22.93,7ZM4.61,6H20.39a1.58,1.58,0,0,1,1.26.62l-8.91,5.31a.49.49,0,0,1-.47,0L3.35,6.62A1.58,1.58,0,0,1,4.61,6ZM22,17.39A1.61,1.61,0,0,1,20.39,19H4.61A1.61,1.61,0,0,1,3,17.39V7.58l8.77,5.22a1.48,1.48,0,0,0,1.47,0L22,7.58Z"})})}))},33296:function(e,t,i){"use strict";i.d(t,{Z:()=>d});var r=i(7409),n=i(99282),o=i(98848),a=i(16584),l=i(64515),s=i(24476);let d=e=>{var{isHovered:t}=e,i=(0,o._)(e,["isHovered"]);let d=t?s.t.brightOrange.hex:s.t.lightGray.hex;return(0,a.BX)(l.l,(0,n._)((0,r._)({},i),{name:"FPCommentIcon",svgParams:{width:24,height:24,viewBox:"0 0 24 24",stroke:"none",fill:"none"},children:[(0,a.tZ)("path",{d:"M22.1538 1V2.83333H24V15.6667H22.1538V17.5H16.6154V19.3333H14.7692V21.1667H12.9231V23H11.0769V21.1667H9.23077V19.3333H7.38462V17.5H1.84615V15.6667H0V2.83333H1.84615V1H22.1538Z",fill:d}),(0,a.tZ)("rect",{x:"5",y:"9",width:"2",height:"2",fill:"white"}),(0,a.tZ)("rect",{x:"11",y:"9",width:"2",height:"2",fill:"white"}),(0,a.tZ)("rect",{x:"17",y:"9",width:"2",height:"2",fill:"white"})]}))}},40034:function(e,t,i){"use strict";i.d(t,{Z:()=>d});var r=i(7409),n=i(99282),o=i(98848),a=i(16584),l=i(64515),s=i(24476);let d=e=>{var{isHovered:t}=e,i=(0,o._)(e,["isHovered"]);let d=t?s.t.brightOrange.hex:s.t.lightGray.hex;return(0,a.BX)(l.l,(0,n._)((0,r._)({},i),{name:"FPShareIcon",svgParams:{width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"none"},children:[(0,a.tZ)("path",{d:"M5 10H1V22H3V24H21V22H23V10H19V20H5V10Z",fill:d}),(0,a.tZ)("path",{d:"M11 0H13V2H15V4H17V6H19V8H15V17H9V8H5V6H7V4H9V2H11V0Z",fill:d})]}))}},64579:function(e,t,i){"use strict";i.d(t,{Z:()=>s});var r=i(7409),n=i(99282),o=i(98848),a=i(16584),l=i(64515);let s=e=>{var{color:t="#B6B6B6",height:i=18}=e,s=(0,o._)(e,["color","height"]);return(0,a.BX)(l.l,(0,n._)((0,r._)({},s),{height:i,name:"LockFullIcon",svgParams:{height:18,width:18,viewBox:"0 0 18 18"},children:[(0,a.tZ)("rect",{x:"5.5",y:"2.5",width:"7",height:"13",rx:"3.5",stroke:t,fill:"none"}),(0,a.tZ)("rect",{x:"3.5",y:"8.5",width:"11",height:"8",rx:"0.5",fill:t,stroke:t})]}))}},21206:function(e,t,i){"use strict";i.d(t,{Z:()=>s});var r=i(7409),n=i(99282),o=i(16584),a=i(96220),l=i(64515);let s=e=>(0,o.tZ)(l.l,(0,n._)((0,r._)({},e),{name:"LucideRecommend",svgParams:{height:24,width:24,fill:"#000000",strokeWidth:0},children:(0,o.tZ)(a.Z,{height:24,stroke:e.stroke,fill:e.fill,strokeWidth:e.strokeWidth})}))},4878:function(e,t,i){"use strict";i.d(t,{Z:()=>s});var r=i(7409),n=i(99282),o=i(98848),a=i(16584),l=i(64515);let s=e=>{var{stroke:t="black",height:i=19,width:s=19}=e,d=(0,o._)(e,["stroke","height","width"]);return(0,a.BX)(l.l,(0,n._)((0,r._)({},d),{name:"NewsletterIcon",svgParams:{height:i,width:s,viewBox:"0 0 19 19"},children:[(0,a.tZ)("path",{d:"M3.5 3.5H15.5",stroke:t,strokeLinecap:"round","stroke-linejoin":"round"}),(0,a.tZ)("path",{d:"M3.5 7.5H15.5",stroke:t,strokeLinecap:"round","stroke-linejoin":"round"}),(0,a.tZ)("path",{d:"M3.5 11.5H15.5",stroke:t,strokeLinecap:"round","stroke-linejoin":"round"}),(0,a.tZ)("path",{d:"M3.5 15.5H12",stroke:t,strokeLinecap:"round","stroke-linejoin":"round"})]}))}},34293:function(e,t,i){"use strict";i.d(t,{Z:()=>s});var r=i(7409),n=i(99282),o=i(98848),a=i(16584),l=i(64515);let s=e=>{var{stroke:t="black"}=e,i=(0,o._)(e,["stroke"]);return(0,a.tZ)(l.l,(0,n._)((0,r._)({},i),{name:"ThreadIcon",svgParams:{height:19,width:19},children:(0,a.tZ)("path",{d:"M10.4286 3H8.57143C5.49441 3 3 5.49441 3 8.57143C3 10.2355 4.16477 12.1934 5.32143 13.2143V16L11.3571 14.1429C14.6071 13.067 16 10.9973 16 8.57143C16 5.49441 13.5056 3 10.4286 3Z",stroke:t,"stroke-linejoin":"round"})}))}},54688:function(e,t,i){"use strict";i.d(t,{Z:()=>l});var r=i(7409),n=i(99282),o=i(16584),a=i(64515);let l=e=>(0,o.BX)(a.l,(0,n._)((0,r._)({},e),{name:"UsersIcon",svgParams:{height:14,width:15,stroke:"#B6B6B6"},children:[(0,o.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.91732 12.249V11.0824C9.91732 9.79369 8.87265 8.74902 7.58398 8.74902H2.91732C1.62865 8.74902 0.583984 9.79369 0.583984 11.0824V12.249",fill:"#838383",stroke:"#838383",strokeLinecap:"round","stroke-linejoin":"round"}),(0,o.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.24935 6.41423C6.53801 6.41423 7.58268 5.36956 7.58268 4.08089C7.58268 2.79223 6.53801 1.74756 5.24935 1.74756C3.96068 1.74756 2.91602 2.79223 2.91602 4.08089C2.91602 5.36956 3.96068 6.41423 5.24935 6.41423Z",fill:"#838383",stroke:"#838383",strokeLinecap:"round","stroke-linejoin":"round"}),(0,o.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.8118 12.2659H13.563C13.5622 11.2025 14.0005 8.82373 11.666 8.82373",fill:"#838383",stroke:"#838383",strokeLinecap:"round","stroke-linejoin":"round"}),(0,o.tZ)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.33398 1.82227C10.3664 2.08661 11.0886 3.01693 11.0886 4.08268C11.0886 5.14844 10.3664 6.07875 9.33398 6.3431",fill:"#838383",stroke:"#838383",strokeLinecap:"round","stroke-linejoin":"round"})]}))},17350:function(e,t,i){"use strict";i.d(t,{i:()=>m});var r=i(16584),n=i(60484),o=i(67749),a=i(20042),l=i(347),s=i(95441),d=i(56629),c=i(68833),u=i(15771),p=i(19081),h=i(91400);let m=e=>{let{post:t}=e,i=(0,d.So)().getSettingFor("enable_prev_next_nav"),m=(0,h.XA)(),{iString:g}=(0,s.M1)();if(!i)return null;let _=t.next_post_slug,b=t.previous_post_slug;return _||b?(0,r.tZ)(l.h,{children:(0,r.BX)(p.hs,{justifyContent:_&&b?"space-between":_?"end":"start",paddingY:16,children:[b&&(0,r.tZ)(u.zx,{leading:(0,r.tZ)(n.Z,{size:20}),priority:m?"tertiary":"secondary",size:m?"sm":"md",onClick:()=>{(0,c.j)(c.FP.PREVIOUS_POST_LINK_CLICKED,{post_id:t.id}),(0,a.route)("/p/".concat(b))},children:g("Previous")}),_&&(0,r.tZ)(u.zx,{trailing:(0,r.tZ)(o.Z,{size:20}),priority:m?"tertiary":"secondary",size:m?"sm":"md",onClick:()=>{(0,c.j)(c.FP.NEXT_POST_LINK_CLICKED,{post_id:t.id}),(0,a.route)("/p/".concat(_))},children:g("Next")})]})}):null}},94922:function(e,t,i){"use strict";i.d(t,{v:()=>c});var r=i(27412),n=i(16584),o=i(6400),a=i(60826),l=i(95398),s=i(47851),d=i(68833);class c extends o.Component{onShare(e){var t,i;this.props.position&&(0,d.j)(d.FP.POST_SHARE_BUTTON_CLICKED,{position:this.props.position}),this.props.isStatic||(e&&e.stopPropagation(),this.props.sharedShareDialog?null===(t=e.target)||void 0===t||t.dispatchEvent(new CustomEvent("share-post",{bubbles:!0})):null===(i=this.modal)||void 0===i||i.open())}render(e){let t,{className:i,linkClassName:r,user:o,pub:d,post:c,reaction_token:u,height:p,onChange:h,isStatic:m,children:g,sharedShareDialog:_,noIcon:b}=e;return t=c.share_url_override?c.share_url_override:m?c?a.W.SHARE_URL:a.W.SHARE_PUB_URL:"javascript:void(0)",(0,n.BX)("span",{className:i,children:[(0,n.BX)("a",{href:t,onClick:e=>this.onShare(e),className:r,children:[!b&&(0,n.tZ)(l.Z,{className:"recommend-icon post-meta-icon",isStatic:m,height:p,alt:"Share",stroke:"#757575",fill:"transparent",strokeWidth:m?1:1.5}),g]}),!m&&!_&&(0,n.tZ)(s.Z,{ref:this.assignModal,user:o,pub:d,post:c,reaction_token:u,onChange:h})]})}constructor(...e){super(...e),(0,r._)(this,"modal",void 0),(0,r._)(this,"assignModal",e=>{this.modal=e})}}},16944:function(e,t,i){"use strict";i.d(t,{a:()=>k});var r=i(7409),n=i(16584),o=i(94184),a=i.n(o),l=i(7703),s=i(54688),d=i(94442),c=i(85685),u=i(60308);function p(e){var t;let{pub:i,post:r}=e,o=(0,u.zF4)("".concat((0,u.SVA)(i),"/p/").concat(r.slug,"/authors.svg"),800,{format:"png",crop:"scale"}),{height:a,width:l}={width:((null==r?void 0:null===(t=r.publishedBylines)||void 0===t?void 0:t.length)-1)*32+40+4,height:44};return(0,n.tZ)("img",{src:o,width:l,height:a})}var h=i(95441),m=i(56629),g=i(49762),_=i(94874),b=i(24547),f=i(19081),v=i(87989),Z=i(98012),y=i(6070),w=i(31377),C=i(79582),S=i(81821),x=i(84864);function k(e){let{post:t,pub:i,user:o,showDate:k,showDatetime:B,isStatic:I,className:P,postReactionToken:E,onChange:N,allowEdit:X,hidePinning:O,showEmailSent:F,allowSendEmail:H,allowMobileFooter:L,onCommentsClick:T,showRestackModal:A,setFooterShown:M}=e,R=(0,S.tq)({checkFirst4:!0}),D="undefined"==typeof window,z=(0,x.getBylineUsers)(t),{language:V}=(0,h.M1)(),j=B?(0,Z.Z)(t.post_date).locale(V).standardDatetime():I?(0,Z.Z)(t.post_date).locale(V).standardDate():(0,Z.Z)(t.post_date).locale(V).standardDateOrTime(),{getSettingFor:U}=(0,m.So)(),W=i.bylines_enabled&&(0,x.getPrintedByline)(i,t)&&"podcast"!==t.type,J=W&&i.byline_images_enabled&&z.some(e=>{let{photo_url:t}=e;return!!t}),q="page"!==t.type,Y=R&&J&&z.length>2,G=(null==i?void 0:i.community_enabled)&&t.slug&&!t.is_draft&&(0,x.showCommentsOnPost)({publication:i,post:t}),K=W&&1===z.length&&z[0].is_guest&&z[0].primaryPublicationSubscribeUrl&&z[0].primaryPublicationId!==i.id&&!t.is_draft&&!(0,g.default)("dont_show_guest_byline"),Q=(0,x.oxfordComma)(z.map(e=>I?(0,n.tZ)("a",{className:"byline-profile-link",href:(0,u.LwU)(e,i,{base:I}),onClick:e=>e.stopPropagation(),children:e.name}):(0,n.BX)(f.gq,{inline:!0,gap:4,alignItems:"center",children:[(0,n.tZ)(c.ProfileHoverCard,{subject:e,utmSource:"byline",children:(0,n.tZ)("a",{className:"byline-profile-link",href:(0,u.LwU)(e,i,{base:I}),onClick:e=>e.stopPropagation(),children:e.name})}),!I&&(0,n.tZ)(v.UserBadge,{tier:e.bestseller_tier,size:"sm",userId:e.id})]}))),$=!t.is_draft&&(0,C.x)(o,{enable_restacking:!!U("enable_restacking")},t,i,I);return(0,n.BX)("div",{className:a()("post-subheader",P),children:[(0,n.BX)("div",{className:a()("left",{vertical:Y}),children:[J&&(I?(0,n.tZ)(p,{pub:i,post:t}):(0,n.tZ)(b.H,{users:z.map(e=>{let{id:t,name:i,photo_url:r}=e;return{id:t,name:i,photo_url:r}}),max:5,size:36,renderAvatar:e=>(0,n.tZ)(_.xV,(0,r._)({},e))})),(0,n.BX)("div",{className:"label-stack",children:[W&&(0,n.tZ)("div",{className:"bylines",children:(0,n.tZ)("span",{className:"byline-names",children:Q})}),K&&(0,n.BX)("div",{className:"guest-author-publication",children:["Writes\xa0",(0,n.tZ)("a",{className:"guest-author-publication-name",href:z[0].primaryPublicationUrl,title:z[0].primaryPublicationName,children:z[0].primaryPublicationName}),"\xa0\xb7\xa0",(0,n.tZ)("a",{className:"guest-author-publication-subscribe",href:z[0].primaryPublicationSubscribeUrl,children:"Subscribe"})]}),(0,n.BX)("div",{className:"publish-context",children:["adhoc_email"===t.type?(0,n.tZ)(s.Z,{className:"audience-icon adhoc-email-icon",height:16,isStatic:I}):q&&(0,w.isPaidAudience)(t.audience)&&!(0,y.lp)({post:t})&&(0,n.tZ)(l.Z,{audience:t.audience,className:"audience-icon audience-lock-icon",size:16,isStatic:I,thin:!0}),(k||B)&&t.post_date&&!t.is_draft&&(0,n.tZ)("time",{dateTime:(0,Z.Z)(t.post_date).toISOString(),children:j}),t.is_draft&&(k||B)&&"Draft"]})]})]}),(0,n.BX)("div",{className:"right",children:[R&&!D&&L&&(0,n.tZ)(d.mt,{post:t,pub:i,user:o,isStatic:I,onChange:N,allowEdit:X,hidePinning:O,showEmailSent:F,allowSendEmail:H,hideComments:!G,onCommentsClick:T,showRestackButton:$,showRestackModal:A,setFooterShown:M,postReactionToken:E}),!R&&(0,n.tZ)(d._2,{post:t,pub:i,user:o,isStatic:I,style:"button",onChange:N,allowEdit:X,hidePinning:O,showEmailSent:F,allowSendEmail:H,labelStyle:"counts-or-none",hideComments:!G,onCommentsClick:T,position:"post-header",showRestackButton:$,showRestackModal:A,showClipping:"podcast"===t.type,editButtonIsLast:!0,postReactionToken:E})]})]})}},11712:function(e,t,i){"use strict";i.d(t,{Z:()=>W});var r=i(27412),n=i(7409),o=i(99282),a=i(98848),l=i(16584),s=i(6400),d=i(39693),c=i.n(d),u=i(23279),p=i.n(u),h=i(18446),m=i.n(h),g=i(30845),_=i(59708),b=i(30396),f=i(14293),v=i.n(f),Z=i(98188),y=i(29032),w=i(93678),C=i(60807),S=i(68833),x=i(98914),k=i(19081),B=i(58175),I=i(39493),P=i(63651),E=i(24271);function N(e){var t,i,r,o,a;let{nuxModal:s,showRestackNux:d}=(0,I.y)("post");return(0,l.BX)(l.HY,{children:[s,!v()(null===(t=e.selection)||void 0===t?void 0:t.text)&&(null===(a=e.selection)||void 0===a?void 0:null===(o=a.text)||void 0===o?void 0:null===(r=o.split)||void 0===r?void 0:null===(i=r.call(o," "))||void 0===i?void 0:i.length)>=3&&(0,l.tZ)(X,(0,n._)({onShare:d},e))]})}function X(e){let{pub:t,post:i,selection:r,onClose:n,userInteractionDisabled:o}=e,a=(0,C.aF)(),[s,d]=(0,b.eJ)(!1);(0,b.d4)(()=>{d(!0)},[]);let c=async()=>{(0,S.j)(S.FP.VIDEO_QUOTE_TEXT_SELECTED,{post_id:i.id,selection_id:r.id}),(0,x.uX)((0,P.fQy)(t,i.id,{selectionForQuote:r.text}),{local_navigation:!1})};(0,b.d4)(()=>(window.addEventListener("scroll",n,{passive:!0,capture:!0,once:!0}),()=>{window.removeEventListener("scroll",n,{capture:!0,once:!0})}),[n]);let u=r.text&&r.text.length>2048;return(0,l.tZ)(y.C,{children:(0,l.tZ)(k.tu,{style:{top:r.y-48-12,left:r.rect.x+r.rect.width/2,transform:"translateX(-50%)",pointerEvents:o?"none":"auto",maxWidth:240},justifyContent:"center",outline:"detail",shadow:"md",radius:"md",className:"".concat(E.Z.popover," ").concat(s?E.Z.visible:""," ").concat(o?E.Z.disabled:""),padding:4,gap:4,children:(0,l.BX)(w.O7,{onClick:c,disabled:!!(!a||u),children:[(0,l.tZ)(Z.Z,{size:20,color:"var(--color-utility-white)"}),(0,l.tZ)(B.xv.B4,{color:"vibrance-primary",weight:"medium",children:u?"Selection too long":"Use this text"})]})})})}var O=i(57391),F=i(2563),H=i(48980),L=i(75419),T=i(47929);let A=(0,s.createContext)({action:null,selectedImage:null}),M=async e=>{let{imgSrc:t,post:i,pub:r}=e,n=await (0,H.rd)("/api/v1/post_selection/image",{method:"PUT",json:{post_id:i.id,publication_id:r.id,img_src:t}});if(n instanceof Error)throw n;return n.selection.id},R=async e=>{let{imgSrc:t,pub:i,post:r}=e,n=await M({imgSrc:t,post:r,pub:i});return(0,P.uRy)(i,r,{urlParams:{utm_campaign:T.VX.postSelection,utm_medium:T.lP.web,imgSelection:n}})},D=e=>{var t;let{children:i,imageState:r,selectedImageIndex:n,selectedImageAction:o=null,onClose:a,pub:s,post:d}=e,c=(0,L.i3)(),[u,p]=(0,b.eJ)(n&&null!==(t=null==r?void 0:r[n])&&void 0!==t?t:null);(0,b.d4)(()=>{if(null!=n&&r){var e;p(null!==(e=r[n])&&void 0!==e?e:null)}},[r,n]);let h=(0,b.I4)(async()=>{(null==u?void 0:u.src)&&c.open({restackUrl:await R({imgSrc:null==u?void 0:u.src,pub:s,post:d}),onCompose(){p(null),a()},onDismiss(){p(null),a()}})},[c,a,d,s,null==u?void 0:u.src]);return(0,b.d4)(()=>{u&&"restack"===o&&!c.state.isOpen&&h()},[o,c.state.isOpen,u,h]),(0,l.BX)(A.Provider,{value:{action:o,selectedImage:u},children:[i,(0,l.tZ)(F.ImageViewerModal,{showModal:"view"===o,modalContent:r,onClose:a,step:null!=n?n:0})]})};var z=i(81355),V=i(60308),j=i(84864);let U="\n:is(\n div.body.markup, .pullquote, blockquote, li, caption, .footnote-content\n) > :is(\n h1, h2, h3, h4, h5, h6, p:not(.button-wrapper)\n)\n";class W extends s.Component{async componentDidMount(){if(!this.body.current)return;let e=Array.from(this.body.current.querySelectorAll(U));this.originalParagraphState=e.map(e=>({text:e.textContent}));let t=new URL(window.location.href).searchParams.get("img"),i=new URL(window.location.href).searchParams.get("cutoffElementIndex"),r=Array.from(this.body.current.querySelectorAll(".image-link.image2"));r.forEach(e=>{"A"!==e.tagName&&console.warn("while parsing prosemirror doc for images, expected an anchor tag, but got",e.tagName)});let n=c()(r.map(e=>{let t=e.querySelector("img");if(!t)return console.warn("missing img when rendering prosemirror document"),null;let i=t.getAttribute("data-attrs"),r=i?JSON.parse(i):{},n=r.width/r.height,o=r.resizeWidth?r.resizeWidth/n:r.height,a=r.resizeWidth?r.resizeWidth/o:n;return{element:e,image:t,attrs:r,extraAttrs:{imageRatio:n,resizeHeight:o,resizeRatio:a}}})),o=0;if(t){let e=n.find(e=>e.attrs.src===t);e&&(o=e.image.getBoundingClientRect().top-65)}else if(i){let e=this.body.current.querySelector("*:nth-child(".concat(i,")"));e&&e.scrollIntoView()}if(n=(n=(n=n.filter(e=>(0,V.UH4)(e.image.src)===(0,V.UH4)(e.element.href))).filter(e=>Number(e.attrs.height)>240&&e.extraAttrs.resizeHeight>240)).filter(e=>e.extraAttrs.imageRatio<4&&e.extraAttrs.resizeRatio<4),this.originalImageState=n.map(e=>{let t=e.image.src,i=null,r=e.element.parentElement;if(r&&"FIGURE"===r.tagName){var n;i=null===(n=r.querySelector(":scope > figcaption"))||void 0===n?void 0:n.textContent}return{src:t,attrs:e.attrs,caption:i}}),t&&this.originalImageState){window.scrollTo({top:o});let e=this.originalImageState.findIndex(e=>e.attrs.src===t);e>=0&&this.setState({selectedImgIndex:e})}"undefined"!=typeof window&&(document.addEventListener("selectionchange",this.onSelectionChange),document.addEventListener("mouseup",this.onMouseUp),window.addEventListener("mouseup",this.onMouseUp))}componentWillUnmount(){"undefined"!=typeof window&&(document.removeEventListener("selectionchange",this.onSelectionChange),document.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("mouseup",this.onMouseUp))}shouldComponentUpdate(e,t){return this.props.html!==e.html||this.state.selectedImgIndex!==t.selectedImgIndex||this.state.selection!==t.selection||this.state.selectionUserInteractionDisabled!==t.selectionUserInteractionDisabled||this.state.selectingTextForQuote!==t.selectingTextForQuote}onLinkClick(e){var t,i;if(!e.target||!(null===(t=e.target)||void 0===t?void 0:t.nodeName)||"A"!==e.target.nodeName&&(null===(i=e.target.parentNode)||void 0===i?void 0:i.nodeName)!=="A")return;let r="A"===e.target.nodeName?e.target:e.target.parentNode;if((0,S.j)(S.FP.POST_LINK_CLICKED,{post_id:this.props.post.id,publication_id:this.props.post.publication_id,url:r.href}),window.location.host===r.host){let t=(0,j.transformDocumentLink)(r.href);t!==r.href&&(0,x.uX)(t,{local_navigation:!1,event:e});return}e.preventDefault(),(0,j.handleDocumentLinkClick)(r.href)}getSelectionState(){if(this.props.trackSelection&&window.getSelection)try{let e=window.getSelection();if(!e||e.isCollapsed||e.anchorNode===e.focusNode&&e.anchorOffset===e.focusOffset)return;let t=this.findParentParagraph(e.anchorNode);if(!t)return;let i=this.findParentParagraph(e.focusNode);if(!i||!this.body.current)return;let r=Array.from(this.body.current.querySelectorAll(U)),n=r.findIndex(e=>e.isSameNode(t));if(-1===n)return;let o=r.findIndex(e=>e.isSameNode(i));if(-1===o)return;let a=this.getCharacterOffsetParagraph(t,e.anchorNode,e.anchorOffset);if(null===a)return;let l=this.getCharacterOffsetParagraph(i,e.focusNode,e.focusOffset);if(null===l)return;let s=n>o||n===o&&a>l,d=e.getRangeAt(0).getBoundingClientRect();return{startParagraph:s?o:n,endParagraph:s?n:o,startOffset:s?l:a,endOffset:s?a:l,y:d.y,height:d.height,rect:d,text:e.toString()}}catch(e){console.error("Failed to parse selection:",e)}}findParentParagraph(e){return e?["P","H1","H2","H3","H4","H5","H6"].includes(e.nodeName)?e:this.findParentParagraph(e.parentNode):null}isAncestorOf(e,t){return null!==e&&(!!e.isSameNode(t)||this.isAncestorOf(e.parentNode,t))}getCharacterOffsetParagraph(e,t,i){let r=i;for(let i=0;i{var t,i,r,n;return(null===(t=e.props)||void 0===t?void 0:t.className)==="latex-rendered"||(null===(n=e.props)||void 0===n?void 0:null===(r=n.children)||void 0===r?void 0:null===(i=r.props)||void 0===i?void 0:i.className)==="latex-rendered"}),b=(0,l.tZ)(l.HY,{children:(0,l.BX)(D,{imageState:this.originalImageState,selectedImageIndex:p,selectedImageAction:g,onClose:this.onCloseViewer,pub:r,post:this.props.post,children:[(0,l.tZ)("div",{className:"body markup",dangerouslySetInnerHTML:i?{__html:i}:null,ref:this.body,onClick:this.onDocumentClick,onMouseDown:this.onBodyMouseDown,onMouseUp:this.onMouseUp,dir:"auto",children:t}),h&&!m?(0,l.tZ)(w.Up,{pub:r,post:this.props.post,selection:u,onClose:this.clearActiveSelection,userInteractionDisabled:this.state.selectionUserInteractionDisabled,themeVariables:this.props.themeVariables}):u&&(0,l.tZ)(N,{pub:r,post:this.props.post,selection:u,onClose:this.clearActiveSelection,userInteractionDisabled:this.state.selectionUserInteractionDisabled})]})});return _&&!c.isStatic?(0,l.tZ)(z.e,{children:b}):b}constructor(e,t){super(e,t),(0,r._)(this,"body",void 0),(0,r._)(this,"originalParagraphState",void 0),(0,r._)(this,"originalImageState",void 0),(0,r._)(this,"state",{selection:null,urlSelection:null,selectedImgIndex:null,selectionUserInteractionDisabled:!1,shouldUseSelectionV2Popover:!1,imgAction:null}),(0,r._)(this,"onBodyMouseDown",()=>{this.setState({selectionUserInteractionDisabled:!0})}),(0,r._)(this,"onMouseUp",()=>{this.setState((e,t)=>e.selectionUserInteractionDisabled?(e.selection&&t.trackSelection&&(0,S.j)(S.FP.POST_TEXT_SELECTED,{post_id:t.post.id,post_audience:t.post.audience,post_type:t.post.type}),{selectionUserInteractionDisabled:!1}):null)}),(0,r._)(this,"onSelectionChange",p()(()=>{let e=this.getSelectionState();if(e){let t=this.shouldShowShareSelectionPopover();this.setState({selection:e,shouldUseSelectionV2Popover:t})}else this.state.selection&&this.setState({selection:null})},10)),(0,r._)(this,"onDocumentClick",e=>{if(!e.target)return;let t=e.target.closest(".image-link.image2");if(t&&this.originalImageState){var i;let r=t.querySelector("img"),n=this.originalImageState.findIndex(e=>e.src===(null==r?void 0:r.src)),o=e.target,a=this.props.canRestackImage&&(null==o?void 0:o.classList.contains("restack-image"))||(null==o?void 0:null===(i=o.parentElement)||void 0===i?void 0:i.classList.contains("restack-image"));if(n>=0){e.preventDefault(),this.setState({selectedImgIndex:n,imgAction:a?"restack":"view"});return}}if(this.props.skipTrackClick)return null;this.onLinkClick(e)}),(0,r._)(this,"onCloseViewer",()=>{this.setState({selectedImgIndex:null,imgAction:null})}),(0,r._)(this,"clearActiveSelection",()=>{this.setState({selection:null})}),(0,r._)(this,"closeImageViewerModal",()=>{this.setState({selectedImgIndex:null})}),(0,r._)(this,"shouldShowShareSelectionPopover",()=>{let e;return"undefined"!=typeof window&&(e="true"===new URLSearchParams(window.location.search).get("selectQuote")),!e}),(0,r._)(this,"memoizedDeepPrepareDocumentBody",(0,g.Z)(_.Kd,m())),this.body=(0,s.createRef)()}}(0,r._)(W,"contextType",O.kx)},33665:function(e,t,i){"use strict";i.d(t,{n:()=>P,Z:()=>E});var r=i(27412),n=i(7409),o=i(99282),a=i(16584),l=i(6400),s=i(94184),d=i.n(s),c=i(25380),u=i(60826),p=i(12620),h=i(64515);let m=e=>(0,a.tZ)(h.l,(0,o._)((0,n._)({},e),{name:"LucideCheck",svgParams:{height:24,width:24,fill:"#000000",strokeWidth:0},children:(0,a.tZ)(c.Z,{height:24,stroke:e.stroke,fill:e.fill,strokeWidth:e.strokeWidth})}));var g=i(64719),_=i(95441),b=i(56629),f=i(75905),v=i(90406),Z=i(71068),y=i(15771),w=i(19081),C=i(60308),S=i(26111),x=i(84864),k=i(47929);let B=["Subscribe","Subscribe now","Sign up","Sign up now"];function I(e){let{isStatic:t,pub:i,user:r,freeSignup:n,children:o,pledgesEnabled:l}=e;if(t)return(0,a.tZ)(f.E.Consumer,{children:e=>{let{isFreemail:t,isFreeSubscribed:r,isPledged:n}=e;return o({isFreeSubscribed:r,isSubscribed:!t,isFullySubscribed:i.plans?!t:!l||n,isForPaidSubscription:!!i.plans&&t,isPledged:n})}});let s=n||(null==r?void 0:r.is_free_subscribed),d=null==r?void 0:r.is_subscribed,c=(null==r?void 0:r.is_subscribed)&&(null==r?void 0:r.is_founding),u=null==r?void 0:r.is_pledged;return o({isFreeSubscribed:s,isSubscribed:d,isFullySubscribed:i.plans?d:s&&(!l||u),isForPaidSubscription:!!i.plans&&s&&!d,isPledged:u,isFoundingSubscribed:c})}function P(e){let{pub:t,user:i,now:r,isStatic:n}=e,{language:o}=(0,_.M1)();return(0,a.tZ)(b.vz.Consumer,{children:e=>{let{getSettingFor:l}=e,s="disabled"===t.payments_state&&!t.invite_only&&!!l("payment_pledges_enabled");return(0,a.tZ)(I,{isStatic:n,user:i,pub:t,pledgesEnabled:s,children:e=>{let{isFreeSubscribed:i,isPledged:n}=e;return(0,a.tZ)(a.HY,{children:(0,x.getSubscribeText)(t,{now:r,isFreeSubscribed:i,isPledged:n,pledgesEnabled:s,language:o})})}})}})}class E extends l.Component{onSignup(e,t){let{pledgesEnabled:i}=t;this.setState({loading:!0}),this.props.onSignup?this.props.onSignup(e):!this.props.forceEmailInput&&(this.props.pub.plans||this.props.pub.has_recommendations||i)?document.location.href=(0,C.W1P)(this.props.pub,(0,n._)((0,o._)((0,n._)({addBase:!0,utm_medium:k.lP.web,utm_source:this.props.source||k.b3.subscribeWidget,utm_content:this.props.post&&this.props.post.id,just_signed_up:!0,requires_confirmation:e.body.requires_confirmation?"true":""},e.body.subscription_id&&{subscription_id:e.body.subscription_id},e.body.referral_token&&{referral_token:e.body.referral_token}),{next:this.props.next||document.location.href}),this.props.foundingUpsell&&{plan:"founding"})):(window.history.replaceState({},"",(0,C.n1t)(document.location.href,{just_subscribed:!0})),document.location.reload())}getHref(e,t){let{pub:i,subscribeButtonAttrs:r,isStatic:o,source:a,post:l,next:s,foundingUpsell:d}=this.props,c=(0,n._)({utm_medium:o?k.lP.email:k.lP.web,utm_source:a||k.b3.subscribeWidget,utm_content:l&&l.id,next:o?s:s||document.location.href,referring_pub_ids:o?void 0:(0,S.x)("referring_pub_ids")},d&&{plan:"founding"});return e?o?u.W.ACCOUNT_URL:(0,C.mGw)(i,{params:c,addBase:t.isSubstack}):(0,C.W1P)(i,(0,n._)({addBase:!0,root:r?r.url:o?u.W.CHECKOUT_URL:void 0},c))}getButtonLabel(e,t,i){let{isPledged:r,pledgesEnabled:n,foundingUpsell:o,isFoundingSubscribed:a}=i,{pub:l,subscribeButtonAttrs:s}=this.props,{iString:d}=I18N.i({pub:l});if(e||r)return d("Subscribed");let c=s&&s.text;return c&&!B.includes(c)?c:(0,x.getSubscribeText)(l,{now:!t,isFreeSubscribed:t,isPledged:r,pledgesEnabled:n,language:this.context.language,foundingUpsell:o,isFoundingSubscribed:a})}render(e,t){let{align:i,pub:r,additionalPubIds:n,user:o,freeSignup:l,freeSignupEmail:s,source:u,isStatic:h,forceEmailInput:_,expectTruncation:f,onPrepareData:C,onError:S,foundingUpsell:B,onConfirmationRequired:P,className:E}=e,{loading:N}=t;return(0,a.tZ)(b.vz.Consumer,{children:e=>{let{getSettingFor:t}=e;return(0,a.tZ)(g._j.Consumer,{children:e=>{let g=!e.isSubstack&&"undefined"!=typeof window&&r.hostname!==window.location.hostname.replace(/[.]localhost$/,"");return(0,a.tZ)(I,{pub:r,user:o,isStatic:h,freeSignup:l,pledgesEnabled:"disabled"===r.payments_state&&!r.invite_only&&!!t("payment_pledges_enabled"),children:b=>{var I;let{isFreeSubscribed:X,isSubscribed:O,isFullySubscribed:F,isPledged:H,isFoundingSubscribed:L}=b,T=this.getButtonLabel(F,X,{isPledged:H,pledgesEnabled:"disabled"===r.payments_state&&!r.invite_only&&!!t("payment_pledges_enabled"),isFoundingSubscribed:L,foundingUpsell:B}),A=X||O;return(0,a.tZ)("div",{className:d()("subscribe-widget",{"is-signed-up":A,"is-fully-subscribed":F},E),"data-component-name":"SubscribeWidget",children:!_&&(A||h)?(0,a.tZ)(Z.xu,{className:"button-wrapper",children:h?(0,a.BX)("a",{className:d()("button subscribe-btn",F?"outline":"primary"),href:this.getHref(F,e),native:!h,children:[F&&(0,a.tZ)(m,{stroke:(null==r?void 0:null===(I=r.theme)||void 0===I?void 0:I.background_pop_color)||(null==r?void 0:r.theme_var_background_pop)||v.Hu,fill:"transparent",isStatic:!0,className:"check-icon static",height:20}),(0,a.tZ)("span",{children:T})]}):(0,a.tZ)(w.gq,{justifyContent:"left"===i?"start":"center",children:(0,a.tZ)(y.zx,{href:this.getHref(F,e),localNavigation:!1,priority:F&&(L||!B)?"secondary-accent":"primary",leading:F&&(L||!B)?(0,a.tZ)(c.Z,{size:20}):null,children:(0,a.tZ)("span",{children:T})})})}):(0,a.tZ)(w.gq,{justifyContent:"center",children:(0,a.tZ)(p.Z,{disabled:A||N,freeSignup:l,freeSignupEmail:s,expectTruncation:f,next:g?window.location.href:null,pub:r,source:u||"subscribe-widget",submitButtonText:A?"✓":(0,x.getSubscribeText)(r,{language:this.context.language}),useSubscribeLink:g,useGenericEndpoint:null==e?void 0:e.isSubstack,additionalPubIds:n,user:o,utm_campaign:(null==e?void 0:e.isSubstack)?k.VX.reader2:g?k.VX.crossPost:null,onConfirmationRequired:P||((null==r?void 0:r.payments_state)==="enabled"?()=>null:void 0),onError:S,onPrepareData:C,onSuccess:e=>this.onSignup(e,{pledgesEnabled:"disabled"===r.payments_state&&!r.invite_only&&!!t("payment_pledges_enabled")})})})})}})}})}})}}(0,r._)(E,"contextType",_.wj)},84722:function(e,t,i){"use strict";i.d(t,{Z:()=>l});var r=i(16584),n=i(12620),o=i(98914),a=i(60308);function l(e){let{pub:t,user:i,post:l,utmSource:s}=e;return(0,r.tZ)(n.Z,{className:"emailContainer-JfVhvU",inputClassName:"emailInput-VN3GpJ",placeholder:"ENTER YOUR EMAIL",promptClassName:"prompt-j7JgJU",pub:t,source:s,submitButtonText:"SIGN UP",subscribeButtonClassName:"subscribeButton-fDC87J",user:i,onAccentBackground:!0,onSuccess:e=>{(0,o.uX)((0,a.Zs0)(t,{just_signed_up:!0,autoSubmit:!!e.body.prompt_to_login||void 0,email:e.body.email,next:(0,a.uRy)(t,l)}),{replace:!0,local_navigation:!1})}})}},16506:function(e,t,i){"use strict";i.d(t,{Z:()=>m});var r=i(16584),n=i(94184),o=i.n(n),a=i(347),l=i(84722),s=i(7523),d=i(15771),c=i(19081),u=i(60308),p=i(47929);let h={wrapper:"wrapper-TFWk0w",fade:"fade-vBsC3Z",signInLink:"signInLink-TZ6ND4",subscribeButtonLarge:"subscribeButtonLarge-lAytbH"},m=e=>{let{post:t,user:i,pub:n,freeSignupEmail:m}=e,g="newsletter"===t.type;return m||(null==i?void 0:i.is_free_subscribed)||!t.current_user_post_meter?(0,r.tZ)(a.h,{children:(0,r.BX)(c.tu,{alignItems:"center",className:o()(h.wrapper,{[h.fade]:g}),gap:24,justifyContent:"center",textAlign:"center",children:[(0,r.BX)(c.tu,{gap:16,children:[(0,r.BX)(s.Z,{preset:"h5-sans",children:["Maintaining ",(0,r.tZ)("em",{children:"The Free Press"})," is Expensive!"]}),!!t.current_user_post_meter&&(0,r.tZ)(s.Z,{preset:"d2-serif",children:"You’ve reached your monthly article limit"}),(0,r.tZ)(s.Z,{preset:"d3-serif",children:"To support independent journalism, and unlock all of our investigative stories and provocative commentary about the world as it actually is, subscribe below."})]}),(0,r.tZ)(d.kG,{className:h.subscribeButtonLarge,href:(0,u.Zs0)(n,{utm_source:p.b3.meteredPostPaywall,next:(0,u.uRy)(n,t)}),localNavigation:!1,children:(0,r.tZ)(s.Z,{color:"white",preset:"detail-large",children:"Subscribe Now"})}),(0,r.BX)(c.gq,{gap:16,children:[(0,r.tZ)(s.Z,{preset:"caption",children:"Already have an account?"}),(0,r.tZ)("a",{className:h.signInLink,href:(0,u.Zs0)(n,{isSignInAttempt:!0}),children:(0,r.tZ)(s.Z,{color:"accent",preset:"caption",children:"Sign In"})})]})]})}):(0,r.tZ)(a.h,{children:(0,r.BX)(c.tu,{alignItems:"center",className:o()(h.wrapper,{[h.fade]:g}),gap:24,justifyContent:"center",textAlign:"center",children:[(0,r.BX)(c.tu,{gap:16,children:[(0,r.tZ)(s.Z,{preset:"h5-sans",children:"Enjoying the story?"}),(0,r.tZ)(s.Z,{preset:"d2-serif",children:"Enter your email to read this article and receive our daily newsletter."})]}),(0,r.tZ)(l.Z,{post:t,pub:n,user:i,utmSource:p.b3.meteredPostRegistrationWall}),(0,r.BX)(c.gq,{gap:16,children:[(0,r.tZ)(s.Z,{preset:"caption",children:"Already have an account?"}),(0,r.tZ)("a",{className:h.signInLink,href:(0,u.Zs0)(n,{isSignInAttempt:!0}),children:(0,r.tZ)(s.Z,{color:"accent",preset:"caption",children:"Sign In"})})]})]})})}},24658:function(e,t,i){"use strict";i.d(t,{R:()=>M});var r=i(16584),n=i(94184),o=i.n(n),a=i(7409),l=i(99282),s=i(30396),d=i(62372),c=i(88216),u=i(74626),p=i(98848),h=i(347);let m={popoverContainer:"popoverContainer-EjJsJc"},g=e=>{let{children:t,closeOnOutsideClick:i,content:n,isOpen:s,onClose:c,onToggle:u}=e,{arrowProps:g,layerProps:_,renderLayer:b,triggerProps:f}=(0,d.sJ)({auto:!0,containerOffset:28,isOpen:s,overflowContainer:!0,placement:"bottom-center",possiblePlacements:["bottom-center"],triggerOffset:16,onOutsideClick:i?c:void 0}),v=_.style,{style:Z}=_,y=(0,p._)(_,["style"]),w="undefined"==typeof window;return(0,r.BX)(r.HY,{children:[(0,r.tZ)("div",(0,l._)((0,a._)({},f),{onClick:()=>{null==u||u(!s)},children:t})),s&&!w&&b((0,r.BX)("div",(0,l._)((0,a._)({style:v},y),{className:o()(m.popoverContainer,"the-free-press-theme"),children:[(0,r.tZ)(h.h,{children:n}),(0,r.tZ)(d.Eh,(0,l._)((0,a._)({},g),{borderColor:"var(--color-fg-primary-themed)",borderWidth:2,size:10}))]})))]})};var _=i(7523),b=i(19081),f=i(60308),v=i(47929);let Z=e=>{let{children:t,isFreeSubscribed:i,isOpen:n,isSubscribed:o,pub:a,onClose:l}=e,s=(0,f.W1P)(a,{utm_source:v.b3.downloadPdfButton,simple:!0,next:(0,f.n1t)(document.location.href,{triggerPDF:!0}),addBase:!0});return(0,r.tZ)(g,{closeOnOutsideClick:!0,content:(0,r.BX)(b.tu,{gap:4,position:"relative",children:[(0,r.tZ)(_.Z,{preset:"d4-serif",children:o?"Paid subscribers can now save articles as PDFs, formatted for printing out and enjoying offline.":"Saving articles as PDFs, formatted for printing and reading offline, is a benefit we're proud to offer our\n paid subscribers. ".concat(i?"Upgrade":"Sign up"," today to unlock this feature.")}),!o&&(0,r.tZ)(b.gq,{children:(0,r.tZ)(u._,{href:s,localNavigation:!1,size:"sm",trailingIcon:"chevron-right",variant:"tertiary",children:i?"Upgrade now":"Subscribe now"})})]}),isOpen:n,onClose:l,children:t})};var y=i(68833),w=i(98914),C=i(63651);let S=e=>{let{post:t,pub:i,user:n}=e,[o,u]=(0,d.XI)(),[p,h]=(0,s.eJ)(!1),m=!!(null==n?void 0:n.is_subscribed),g=!!(null==n?void 0:n.is_free_subscribed);return(0,s.d4)(()=>{let e=new URL(document.location.href);if(e.searchParams.get("triggerPDF")){if(m){var r;(0,w.uX)((0,C.SUl)(i,t.id,{token:"token"in window._preloads&&null!==(r=window._preloads.token)&&void 0!==r?r:void 0}),{local_navigation:!1,newTab:!0})}e.searchParams.delete("triggerPDF"),window.history.replaceState({},"",e)}},[m,t.id,i]),(0,r.tZ)(Z,{isFreeSubscribed:g,isOpen:p,isSubscribed:m,pub:i,onClose:()=>{h(!1)},children:(0,r.tZ)(b.hs,(0,l._)((0,a._)({},u),{cursor:"pointer",onClick:()=>{if((0,y.j)(y.FP.POST_PDF_BUTTON_CLICKED,{post_id:t.id}),!m){h(!p);return}(0,w.uX)((0,C.SUl)(i,t.id),{local_navigation:!1,newTab:!0})},children:(0,r.tZ)(c.Z,{height:24,isHovered:o,width:24})}))})};var x=i(42312),k=i(16564),B=i(86657),I=i(92002),P=i(73580),E=i(64515);let N=e=>{var t=(0,I._)({},(0,P._)(e));return(0,r.tZ)(E.l,(0,l._)((0,a._)({},t),{name:"FPPauseIcon",svgParams:{width:25,height:25,viewBox:"0 0 25 24",fill:"none",stroke:"none"},children:(0,r.BX)("g",{id:"play-circle",children:[(0,r.tZ)("path",{id:"Icon",d:"M12.5 22C18.0228 22 22.5 17.5228 22.5 12C22.5 6.47715 18.0228 2 12.5 2C6.97715 2 2.5 6.47715 2.5 12C2.5 17.5228 6.97715 22 12.5 22Z",stroke:"#F2312C",strokeWidth:"2",strokeLinecap:"round"}),(0,r.tZ)("rect",{id:"Rectangle 2398",x:"8.5",y:"7.08496",width:"3",height:"10",fill:"#F2312C"}),(0,r.tZ)("rect",{id:"Rectangle 2399",x:"13.5",y:"7.08496",width:"3",height:"10",fill:"#F2312C"})]})}))};var X=i(41193),O=i(84864);let F="ctaMode-zO5a9a",H=e=>{let{containerRef:t,currentTime:i,remainingTime:n,progress:o,onMouseDown:a,className:l}=e;return(0,r.BX)(b.gq,{alignItems:"center",className:l,gap:4,children:[(0,r.tZ)(_.Z,{preset:"caption",style:{flexShrink:0,minWidth:"28px"},children:i}),(0,r.BX)("div",{ref:t,className:"progressBar-yUZk3A",onMouseDown:a,children:[(0,r.tZ)("div",{className:"progressBarBackground-rOIsbW"}),(0,r.tZ)("div",{className:"progressBarProgress-EiVcPg",style:{width:"".concat(100*o,"%")}}),(0,r.tZ)("div",{className:"progressBarPlayhead-KWfdzC",style:{left:"".concat(100*o,"%")}})]}),(0,r.tZ)(_.Z,{preset:"caption",style:{flexShrink:0,paddingLeft:"4px",minWidth:"36px"},children:n})]})},L=e=>{var{mediaUploadId:t,user:i,post:n,pub:d}=e,c=(0,p._)(e,["mediaUploadId","user","post","pub"]);let[h,m]=(0,s.eJ)(!0),[Z,w]=(0,s.eJ)(!1),C=!!(null==i?void 0:i.is_subscribed),S=!!(null==i?void 0:i.is_free_subscribed);return(0,s.d4)(()=>{Z&&(0,y.j)(y.FP.TTS_UPGRADE_TO_LISTEN_CLICKED,{post_id:n.id})},[Z,n.id]),(0,r.tZ)(B.Z,(0,l._)((0,a._)({},c),{feature:k.MR.Voiceover,metricsPost:n,post:n,pub:d,render:e=>{let{isPaywalled:t,currentTime:i,isPlaying:a,progress:l,progressBarRef:s,progressBarOnMouseDown:c,remainingTime:p,duration:y,togglePlayback:x}=e,k=()=>{if(t){w(!0);return}h&&m(!1),x()},B=(0,r.BX)(b.gq,{alignItems:"center",className:o()("wrapper-LdgflB",{[F||""]:h}),gap:16,justifyContent:"space-between",children:[(0,r.BX)(b.gq,{alignItems:"center",className:o()("innerWrapper-ersGfZ",{[F||""]:h}),gap:16,onClick:h?k:void 0,children:[(0,r.tZ)(b.tu,{className:o()("playButton-vLW5qd",{[F||""]:h,"static-tP398S":t}),style:{flexShrink:0},onClick:()=>{k()},children:a?(0,r.tZ)(N,{}):(0,r.tZ)(X.Z,{})}),(0,r.tZ)(H,{className:o()("progressBarWrap-vpoiUw",{[F||""]:h}),containerRef:s,currentTime:i,progress:l,remainingTime:p,onMouseDown:c}),(0,r.BX)(b.gq,{alignItems:"center",className:o()("cta-GdLXe1",{[F||""]:h}),gap:16,children:[(0,r.tZ)(_.Z,{preset:"detail-small",children:t?"Upgrade to Listen":"Listen to Article"}),(0,r.tZ)(_.Z,{color:"tertiary",preset:"caption",style:{flexShrink:0},children:(0,O.secondsToLargestUnit)(y||300)})]})]}),(0,r.tZ)(_.Z,{className:o()("disclaimer-i3yYG0",{[F||""]:h}),color:"tertiary",preset:"caption",children:"Produced by ElevenLabs using AI narration"})]});return t?(0,r.tZ)(g,{closeOnOutsideClick:!0,content:(0,r.BX)(b.tu,{gap:4,position:"relative",children:[(0,r.tZ)(_.Z,{preset:"d4-serif",children:"Listening to articles, is a benefit we're proud to offer our paid subscribers. Sign up today to unlock this feature."}),!C&&(0,r.tZ)(b.gq,{children:(0,r.tZ)(u._,{href:(0,f.Zs0)(d,{UTM_SOURCE:v.b3.voiceoverPlayer,next:(0,f.uRy)(d,n)}),localNavigation:!1,size:"sm",trailingIcon:"chevron-right",variant:"tertiary",children:S?"Upgrade now":"Subscribe now"})})]}),isOpen:Z,onClose:()=>{w(!1)},children:B}):B},src:t?"/api/v1/audio/upload/".concat(t,"/src"):null,trackingProps:{}}))};var T=i(40647);let A={postUFI:"postUFI-Oh86n4",hasVoiceover:"hasVoiceover-rbvr3u",editButtonContainer:"editButtonContainer-hWwvUO"},M=e=>{var t;let{post:i,pub:n,user:a,autoPlayVoiceOver:l,variant:s}=e,{getConfigFor:d}=(0,T.xR)(),c=i.has_voiceover||!!i.voiceoverUpload,u="newsletter-post"===s&&(0,O.showCommentsOnPost)({publication:n,post:i}),p="newsletter-post"===s&&n.community_enabled,h="newsletter-post"===s,m=!!(null==a?void 0:a.is_contributor),g="newsletter-post"===s&&!!d("show_open_post_as_pdf_button");return u||p||h||m?(0,r.BX)(b.hs,{className:o()(A.postUFI,{[A.hasVoiceover||""]:c}),gap:24,justifyContent:"end",children:[c&&(0,r.tZ)(L,{autoPlay:l,duration:null===(t=i.voiceoverUpload)||void 0===t?void 0:t.duration,href:i.canonical_url,isPaywalled:!(null==a?void 0:a.is_subscribed),mediaUploadId:i.voiceover_upload_id,post:i,pub:n,user:a}),(0,r.BX)(b.gq,{alignItems:"center",gap:16,children:[u&&(0,r.tZ)(x.Ck,{post:i,pub:n,size:"large"}),p&&(0,r.tZ)(x.gV,{post:i,pub:n,size:"large",user:a}),h&&(0,r.tZ)(x.fA,{post:i,pub:n,user:a}),g&&(0,r.tZ)(S,{post:i,pub:n,user:a}),m&&(0,r.tZ)(x.ND,{className:A.editButtonContainer,context:"post-page",post:i,pub:n,user:a})]})]}):null}},85721:function(e,t,i){"use strict";i.d(t,{T:()=>v});var r=i(16584),n=i(30396),o=i(94184),a=i.n(o),l=i(23279),s=i.n(l),d=i(1852),c=i(33296),u=i(7523),p=i(98914),h=i(19081),m=i(63474),g=i(84864);let _={container:"container-NR9v7N",fixed:"fixed-gIIqpc",header:"header-ggAXv9",title:"title-3Yeuyx",commentContainer:"commentContainer-dmiFCB",label:"label-gHN5_J","active-label":"active-label-ndUdOP"},b=e=>{let[t,i]=(0,n.eJ)("header"),r=[{text:"header",id:"header",selector:".markup > p:first-of-type"},...e,{text:"discussion",id:"discussion",selector:"#discussion > div"}];return(0,n.d4)(()=>{let e=[];return r.forEach(t=>{let r=(0,p.VA)(t.text,!0),n=document.getElementById("\xa7".concat(r))||t.selector&&document.querySelector(t.selector);if(n){let t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.5&&i(r)})},{threshold:.5,rootMargin:"-10% 0px -55% 0px"});t.observe(n),e.push(t)}}),()=>e.forEach(e=>e.disconnect())},[e]),t},f=e=>{let{toc:t,title:i,activeItem:o,wordCount:l,commentCount:d,onItemClick:b}=e,f=(0,n.sO)(null),[v,Z]=(0,n.eJ)(!1),[y,w]=(0,n.eJ)("0"),C=(0,n.I4)(()=>{if(f.current){var e,t,i;let r=f.current.getBoundingClientRect(),n=null===(e=f.current.parentElement)||void 0===e?void 0:e.getBoundingClientRect(),o=window.innerHeight/2;if(r&&n){if(o+2>n.top+r.height/2){let e=Number(null===(i=document.getElementById("discussion"))||void 0===i?void 0:null===(t=i.getBoundingClientRect())||void 0===t?void 0:t.top)+r.height/2+20;e<=o?(Z(!0),w(e.toString())):(Z(!0),w("50%"))}else Z(!1),w("0")}}},[v,f,y]),S=(0,n.Ye)(()=>s()(C,25,{trailing:!0,leading:!0,maxWait:60}),[C]);return(0,n.d4)(()=>(window.addEventListener("scroll",S,{passive:!0}),()=>{window.removeEventListener("scroll",S)}),[v,S]),(0,r.tZ)("div",{id:"toc",style:{position:"relative"},children:(0,r.tZ)("div",{ref:f,className:a()(_.container,v&&_.fixed),style:{top:"50%"===y?"50%":Number(y)},children:(0,r.BX)(h.tu,{flex:"grow",gap:4,children:[(0,r.BX)("div",{className:a()(_.header,_.label),id:"header"===o?_["active-label"]:void 0,onClick:()=>b(document.querySelector(".markup")),children:[(0,r.tZ)(u.Z,{className:_.title,color:"header"===o?"primary":"disabled",preset:"detail-large",children:i}),l&&(0,r.BX)(u.Z,{color:"header"===o?"primary":"disabled",preset:"caption",children:[Math.round(l/g.READ_WORDS_PER_MINUTE)," min read"]})]}),t.map((e,t)=>{let i=(0,p.VA)(e.text,!0),n=o===i;return(0,r.tZ)(m.A0,{href:"#\xa7".concat(i),onClick:e=>{e.preventDefault(),b(document.getElementById("\xa7".concat(i)))},children:(0,r.tZ)(h.gq,{children:(0,r.tZ)(u.Z,{className:_.label,color:n?"primary":"disabled",id:n?_["active-label"]:void 0,preset:"body",children:e.text})})},t)}),(0,r.BX)("div",{className:a()(_.commentContainer,_.label),onClick:()=>b(document.getElementById("discussion")),children:[(0,r.tZ)(c.Z,{isHovered:"discussion"===o}),d]})]})})})},v=e=>{let{toc:t,title:i,wordCount:n,commentCount:o}=e,a=b(t),l=(0,d.useMediaQuery)({maxWidth:1100});return t.length<2||l?null:(0,r.tZ)(f,{activeItem:a,commentCount:o,title:i,toc:t,wordCount:n,onItemClick:e=>{e&&e.scrollIntoView({behavior:"smooth",block:"start"})}})}},89276:function(e,t,i){"use strict";i.d(t,{j:()=>d});var r=i(16584),n=i(94184),o=i.n(n),a=i(347),l=i(71068);let s={thefpPostBodyWrapper:"thefpPostBodyWrapper-Sk9SUV",noPaddingOnMobile:"noPaddingOnMobile-SkPaHP",withDropCap:"withDropCap-izNtyr",withSpaceForMissingDropCap:"withSpaceForMissingDropCap-MMwASG",threadHeadBody:"threadHeadBody-gHFj3E"},d=e=>{var t,i;let{children:n,disabled:d,inThreadHead:c,isCustomPage:u,isShowsPost:p,post:h}=e,m=!!(null==h?void 0:null===(t=h.postTheme)||void 0===t?void 0:t.disable_drop_cap);return d?(0,r.tZ)(r.HY,{children:n}):(0,r.tZ)(a.h,{children:(0,r.tZ)(l.xu,{className:o()(s.thefpPostBodyWrapper,s[null==h?void 0:null===(i=h.postTheme)||void 0===i?void 0:i.header_variant],{[s.withDropCap]:!(c||u||m),[s.withSpaceForMissingDropCap]:m,[s.threadHeadBody]:c,[s.noPaddingOnMobile]:p||c||u}),children:n})})}},42312:function(e,t,i){"use strict";i.d(t,{Ck:()=>x,ND:()=>B,gV:()=>S,fA:()=>k});var r=i(7409),n=i(99282),o=i(16584),a=i(30396),l=i(12297),s=i.n(l),d=i(85200),c=i(62372),u=i(33296),p=i(98848),h=i(64515),m=i(24476);let g=e=>{var{isHovered:t,isLiked:i}=e,a=(0,p._)(e,["isHovered","isLiked"]);let l=i?m.t.mediumRed.hex:t?m.t.brightOrange.hex:m.t.lightGray.hex;return(0,o.BX)(h.l,(0,n._)((0,r._)({},a),{name:"FPLikeIcon",svgParams:{width:24,height:24,viewBox:"0 0 24 24",stroke:"none",fill:"none"},children:[(0,o.tZ)("path",{d:"M3.69231 1H9.23077V2.83333H11.0769V4.66667H12.9231V2.83333H14.7692V1H20.3077V2.83333H22.1538V4.66667H24V12H22.1538V13.8333H20.3077V15.6667H18.4615V17.5H16.6154V19.3333H14.7692V21.1667H12.9231V23H11.0769V21.1667H9.23077V19.3333H7.38462V17.5H5.53846V15.6667H3.69231V13.8333H1.84615V12H0V4.66667H1.84615V2.83333H3.69231V1Z",fill:l}),(0,o.tZ)("rect",{x:"5",y:"4",width:"2",height:"2",fill:"white"}),(0,o.tZ)("rect",{x:"3",y:"6",width:"2",height:"4",fill:"white"})]}))};var _=i(40034),b=i(48917),f=i(94442),v=i(67203),Z=i(7523),y=i(19081),w=i(63651),C=i(84864);let S=e=>{let{cta:t,post:i,pub:a,showCounts:l=!0,size:d,user:u,onChange:p}=e,[h,m]=(0,c.XI)(),_=s()(Object.values((null==i?void 0:i.reactions)||{})),b=(0,C.numberToString)(_||0),v="small"===d?16:24,w="small"===d?"sm-preview-byline":"detail-large";return(0,o.tZ)(f.Hg,{isStatic:!1,post:i,pub:a,style:"button",user:u,onChange:p,children:e=>{let{isLiked:i,handleLike:a}=e;return(0,o.BX)(y.gq,(0,n._)((0,r._)({},m),{alignItems:"center",cursor:"pointer",gap:8,role:"button",onClick:a,children:[(0,o.BX)(y.gq,{alignItems:"center",gap:"small"===d?4:6,children:[(0,o.tZ)(g,{height:v,isHovered:h,isLiked:i,width:v}),l&&_>0&&(0,o.tZ)(Z.Z,{preset:w,children:b})]}),t&&(0,o.tZ)(Z.Z,{preset:"detail-large",children:t})]}))}})},x=e=>{let t,{post:i,pub:a,showCounts:l=!0,size:s,cta:d}=e,[p,h]=(0,c.XI)(),m=(0,C.numberToString)(i.comment_count),g="small"===s?16:24;return t=(null==i?void 0:i.comment_url_override)?i.comment_url_override:(0,w.uRy)(a,i,{comments:!0}),(0,o.BX)(y.gq,(0,n._)((0,r._)({},h),{alignItems:"center",cursor:"pointer",gap:8,role:"button",onClick:e=>{e.stopPropagation(),window.location.href=t},children:[(0,o.BX)(y.gq,{alignItems:"center",gap:"small"===s?4:6,children:[(0,o.tZ)(u.Z,{height:g,isHovered:p,width:g}),i.comment_count>0&&l&&(0,o.tZ)(Z.Z,{preset:"small"===s?"sm-preview-byline":"detail-large",children:m})]}),d&&(0,o.tZ)(Z.Z,{preset:"detail-large",children:d})]}))},k=e=>{let{pub:t,post:i,user:a,cta:l}=e,[s,d]=(0,c.XI)();return(0,o.tZ)(v.sp,{post:i,pub:t,trigger:(0,o.BX)(y.hs,(0,n._)((0,r._)({},d),{alignItems:"center",cursor:"pointer",gap:8,children:[(0,o.tZ)(_.Z,{height:24,isHovered:s,width:24}),l&&(0,o.tZ)(Z.Z,{preset:"detail-large",children:l})]})),user:a})},B=e=>{let{className:t,context:i,post:l,pub:s,user:u}=e,p=(0,a.sO)(),[h,g]=(0,c.XI)();if(!u)return null;let _=h?m.t.brightOrange.hex:m.t.lightGray.hex;return(0,o.BX)("div",{className:t,style:{cursor:"pointer"},children:[(0,o.tZ)(y.gq,(0,n._)((0,r._)({},g),{onClick:e=>{var t;e.stopPropagation(),null===(t=p.current)||void 0===t||t.open()},children:(0,o.tZ)(d.Z,{color:_,size:"post-preview"===i?16:24})})),(0,o.tZ)(b.y,{ref:p,hideDropCapOption:"post-preview"===i,hidePinning:!0,hidePostHeaderOptions:"post-preview"===i,post:l,pub:s,useDrawerOnMobile:!0,user:u})]})}},79160:function(e,t,i){"use strict";i.d(t,{r:()=>m});var r=i(16584),n=i(30396),o=i(95441),a=i(68833),l=i(15771),s=i(19081),d=i(6490),c=i(58175),u=i(4953),p=i(60308),h=i(47929);function m(e){let{postId:t,onClose:i}=e,{iString:u}=(0,o.M1)();return(0,n.d4)(()=>{(0,a.j)(a.FP.LISTEN_TO_THIS_POST_MODAL_SHOWN,{post_id:t})},[]),(0,r.BX)(d.u_,{isOpen:!0,onClose:i,children:[(0,r.tZ)(d.xB,{showClose:!0,onClose:i}),(0,r.tZ)(d.fe,{children:(0,r.BX)(s.tu,{alignItems:"center",gap:24,children:[(0,r.BX)(s.tu,{style:{textAlign:"center"},justifyContent:"center",gap:8,children:[(0,r.tZ)(c.xv.H3,{weight:"heavy",children:u("Listen to this post")}),(0,r.tZ)(c.xv,{color:"secondary",style:{lineHeight:1.5},children:u("Get the Substack app to hear this article read aloud.")})]}),(0,r.tZ)(g,{})]})}),(0,r.tZ)(d.mz,{showDivider:!0,direction:"column",primaryButton:(0,r.tZ)(l.zx,{priority:"primary",href:(0,p.D4e)({utm_source:h.b3.web,utm_campaign:h.VX.ttsModal}),onClick:()=>(0,a.j)(a.FP.LISTEN_TO_THIS_POST_MODAL_GET_THE_APP_CLICKED,{post_id:t}),children:u("Get the app")})})]})}function g(){let e="/img/main/tts-dialog";return(0,r.BX)("video",{height:220,autoPlay:!0,muted:!0,loop:!0,children:[(0,r.tZ)("source",{src:"".concat(e,"/nux.mp4"),type:"video/mp4"}),(0,r.tZ)("img",{width:374,height:233,src:"".concat(e,"/1x.png"),srcset:Array.from((0,u.w)(1,4)).map(t=>"".concat(e,"/").concat(t,"x.png ").concat(t,"x")).join(", ")})]})}},26989:function(e,t,i){"use strict";i.d(t,{Eo:()=>Z});var r=i(16584),n=i(64515),o=i(666);i(91355);var a=i(7409),l=i(99282);let s=e=>(0,r.BX)(n.l,(0,l._)((0,a._)({},e),{name:"MoreIcon",svgParams:{height:24,width:24,fill:e.fill,stroke:e.stroke,strokeWidth:e.strokeWidth},children:[(0,r.tZ)("path",{d:"M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z"}),(0,r.tZ)("path",{d:"M19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11C18.4477 11 18 11.4477 18 12C18 12.5523 18.4477 13 19 13Z"}),(0,r.tZ)("path",{d:"M5 13C5.55228 13 6 12.5523 6 12C6 11.4477 5.55228 11 5 11C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13Z"})]}));var d=i(50137),c=i(1467);i(95441);var u=i(90099),p=i(92291),h=i(71068),m=i(58175);i(87989),i(65749);var g=i(98012),_=i(31377),b=i(60308),f=i(63651),v=i(84864);function Z(e){var t,i,n,a,l,_,Z,B,I;let{comment:P,utmSource:E,hideUfi:N,commentLinkUrl:X}=e;if(!P)return(0,r.tZ)(m.xv.B3,{"data-component-name":"EmailCommentEmbedError",translated:!0,children:"Could not load comment"});let O=null===(t=P.attachments)||void 0===t?void 0:t.find(e=>"image"===e.type),F=null===(i=P.attachments)||void 0===i?void 0:i.find(e=>"post"===e.type),H=null==F?void 0:F.postSelection,L=null===(n=P.attachments)||void 0===n?void 0:n.find(e=>"image"!==e.type),T=L&&(0,p.kW)(L),A=null===(a=P.attachments)||void 0===a?void 0:a.find(e=>"video"===e.type);return(0,r.tZ)(h.xu,{as:"a",href:null!=X?X:(0,f.Sgq)(P,{urlParams:{utm_source:E}}),display:"block",padding:16,radius:"md",border:"detail",color:"primary",className:"note-flsrqQ","data-component-name":"EmailCommentEmbed",children:(0,r.BX)(u.zK,{style:{width:"100%"},verticalAlign:"top",gap:12,growLastChild:!0,children:[(0,r.tZ)(u.NS,{src:null!==(_=P.photo_url)&&void 0!==_?_:(0,b.I4e)(null!==(l=P.user_id)&&void 0!==l?l:0),size:48}),(0,r.BX)(u.i$,{gap:12,style:{lineHeight:1,width:"100%"},children:[(0,r.BX)(h.xu,{children:[(0,r.BX)(m.xv.B3,{children:[(0,r.tZ)(m.xv,{as:"span",weight:"semibold",children:P.name})," ",(0,r.tZ)(m.xv,{as:"span",color:"secondary",children:(0,g.Z)(P.date).fromNowShort()})]}),(0,r.tZ)(m.xv.B3,{children:(0,v.truncateWords)(P.body,420)})]}),F&&H&&(0,r.tZ)(m.xv.B3,{children:(0,r.tZ)(S,{attachment:F,selection:H})}),T&&!F&&(0,r.tZ)(m.xv.B4,{color:"highlight",children:T}),A&&(0,r.tZ)(k,{attachment:A}),O&&(0,r.tZ)(x,{attachment:O}),!N&&(0,r.tZ)(u.YF,{width:"100%",style:{width:"100%"},children:(0,r.BX)("tr",{children:[(0,r.BX)("td",{width:"20%",children:[(0,r.tZ)(o.Z,{width:16,height:16,strokeWidth:1.5,stroke:C,style:y,fill:"none",isStatic:!0}),(0,r.tZ)(w,{count:null!==(Z=P.reaction_count)&&void 0!==Z?Z:0})]}),(0,r.BX)("td",{width:"20%",children:[(0,r.tZ)(c.Z,{height:16,width:16,strokeWidth:1.5,stroke:C,style:y,isStatic:!0}),(0,r.tZ)(w,{count:null!==(B=P.children_count)&&void 0!==B?B:0})]}),(0,r.BX)("td",{width:"20%",children:[(0,r.tZ)(d.Z,{height:16,width:16,strokeWidth:1.5,stroke:C,style:y,isStatic:!0}),(0,r.tZ)(w,{count:null!==(I=P.restacks)&&void 0!==I?I:0})]}),(0,r.tZ)("td",{width:"20%",children:(0,r.tZ)(s,{height:16,width:16,strokeWidth:2,stroke:C,fill:C,style:y,isStatic:!0})})]})})]})]})})}let y={display:"inline-block",verticalAlign:"middle"};function w(e){let{count:t}=e;return(0,r.tZ)(m.xv.B4,{size:12,as:"span",weight:"semibold",color:"secondary",style:{marginLeft:4},children:t>0?(0,v.numberToRoughShortString)(Math.max(t,1),{plusSignifier:""}):" "})}let C="#808080";function S(e){let{attachment:t,selection:i}=e;return(0,r.tZ)(h.xu,{padding:12,radius:"md",bg:"secondary",children:(0,r.BX)(m.xv,{color:"secondary",font:"serif",fontStyle:"italic",lineHeight:24,children:[(0,v.truncateWords)(i.text.replaceAll("“","‘").replaceAll("”","’"),180),"” — ",(0,_.getPostAuthor)(t.publication,t.post).name]})})}function x(e){let{attachment:t}=e;return(0,r.tZ)(h.xu,{as:"img",src:(0,f.zF4)(t.imageUrl,800,{crop:"limit",height:800}),width:400,radius:"md",style:{maxHeight:600,objectFit:"cover",margin:0}})}function k(e){let{attachment:t}=e,i=t.mediaUpload;return(0,r.tZ)(h.xu,{as:"img",src:(0,b.kOB)(i,{isStatic:!0}),width:400,radius:"md",style:{maxHeight:600,objectFit:"cover",margin:0}})}},25530:function(e,t,i){"use strict";i.d(t,{v:()=>n});var r=i(1852);let n=()=>({isPrint:(0,r.useMediaQuery)({query:"print"})})},29927:function(e,t,i){"use strict";i.d(t,{X:()=>b});var r=i(16584),n=i(30396),o=i(83034),a=i(20888),l=i(68833),s=i(98422),d=i(95901),c=i(61254),u=i(19081),p=i(6490),h=i(58175),m=i(60308),g=i(47929);let _="appStoreBadgeButton-PoDbV8",b=e=>{let{onClose:t}=e,{isMobile:i}=(0,s.v9)();return(0,n.d4)(()=>{(0,l.j)(l.FP.SAVE_VIDEO_UPSELL_MODAL_SEEN)},[]),(0,r.tZ)(p.u_,{disableCloseOnBackdropClick:!0,isOpen:!0,width:i?void 0:850,onClose:t,children:(0,r.BX)(u.gq,{position:"relative",padding:20,gap:32,justifyContent:i?"center":void 0,children:[(0,r.tZ)(u.gq,{position:"absolute",style:{top:8,right:8},children:(0,r.tZ)(d.P,{priority:"secondary",size:"sm",onClick:t})}),!i&&(0,r.tZ)("div",{children:(0,r.tZ)(a.e,{src:(0,m.zF4)("/img/marketing/save-video-upsell.png",762),maxWidth:381,useRetinaSizing:!0,imageIsFixedWidth:!0})}),(0,r.BX)(u.tu,{justifyContent:"center",gap:20,children:[(0,r.BX)(u.tu,{gap:8,children:[(0,r.tZ)(h.xv.H3,{align:"center",translated:!0,paddingBottom:8,children:"Video saved to your app"}),(0,r.tZ)(h.xv.B3,{align:"center",translated:!0,children:"Download now on iOS or Android to see all saved videos."})]}),(0,r.tZ)(o.AppInstallContent,{hideEmailPrompt:!0,size:160,padding:0}),(0,r.tZ)(c.ZC,{}),(0,r.BX)(u.gq,{gap:16,justifyContent:"center",paddingTop:8,children:[(0,r.tZ)("a",{className:_,href:(0,m.RMm)({utm_campaign:g.VX.saveVideoUpsellModal,utm_source:g.b3.post}),onClick:()=>{(0,l.j)(l.FP.APP_STORE_LINK_CLICKED,{source:"save_video_upsell_modal",app_store:"ios"})},children:(0,r.tZ)("img",{src:(0,m.zF4)("/img/app_page/app-store.png",320),height:40})}),(0,r.tZ)("a",{className:_,href:(0,m.AaB)({utm_campaign:g.VX.saveVideoUpsellModal,utm_source:g.b3.post}),onClick:()=>{(0,l.j)(l.FP.APP_STORE_LINK_CLICKED,{source:"save_video_upsell_modal",app_store:"android"})},children:(0,r.tZ)("img",{src:(0,m.zF4)("/img/app_page/google-play.png",320),height:40})})]})]})]})})}},23776:function(e,t,i){"use strict";i.d(t,{Z:()=>u});var r=i(16584),n=i(30396),o=i(18787),a=i(72508),l=i(95441),s=i(68833),d=i(24791),c=i(84864);let u=e=>{let{post:t,pub:i,user:u,playerRef:p}=e,h=!(0,c.canSeeTranscription)(u,t),m=(0,d.LH)(t),{iString:g}=(0,l.M1)();return((0,n.d4)(()=>{(0,s.j)(s.FP.TRANSCRIPTION_PAGE_VIEWED,{post_id:t.id})},[t.id]),m)?h?(0,r.tZ)(o.f1,{user:u,publication:i,post:t,title:g("Transcriptions on this post are for paid subscribers"),reauthenticationTitle:g("To see the post, please re-authenticate.")}):(0,r.tZ)(a.ZP,{transcription:m,player:p,postId:t.id}):null}},83963:function(e,t,i){"use strict";i.d(t,{B:()=>_});var r=i(16584),n=i(30396),o=i(13639),a=i(95441),l=i(68833),s=i(71068),d=i(15771),c=i(19081),u=i(6490),p=i(58175),h=i(63651);let m=e=>e?e.includes("free_subscribers")?"free_subscribers":e.includes("paid_subscribers")?"paid_subscribers":e.includes("founding_subscribers")?"founding_subscribers":null:null,g=e=>{switch(e){case"free_subscribers":return"Subscribers";case"paid_subscribers":return"Paid subscribers";case"founding_subscribers":return"Founding members"}},_=e=>{let{isOpen:t,onClose:i,profile:_,dmUpgradeOptions:b,isEditor:f=!1}=e,{iString:v}=(0,a.M1)();(0,n.d4)(()=>{(0,l.j)(l.FP.DIRECT_MESSAGE_WRITER_UPSELL_MODAL_SEEN,{subscribeButtonShown:C})},[]);let Z=null==_?void 0:_.primaryPublication,y=m(b),w=y?g(y):null,C=w&&(f||!f&&Z),S="founding_subscribers"===y?{plan:"founding",utm_source:"direct-message-writer"}:void 0,x=!f&&Z?(0,h.W1P)(Z,{addBase:!f,params:S}):(0,h.W1P)({},{addBase:!1,params:S}),k=(0,s.oB)({width:200});return(0,r.tZ)(u.u_,{isOpen:t,onClose:i,children:(0,r.tZ)(u.fe,{children:(0,r.BX)(c.tu,{gap:16,alignItems:"center",children:[(0,r.tZ)(s.xu,{bg:"secondary",radius:"full",padding:16,children:(0,r.tZ)(o.Z,{size:32})}),(0,r.BX)(c.tu,{gap:8,alignItems:"center",padding:8,children:[!!w&&(0,r.BX)(p.xv.B1,{children:[w," only"]}),!!w&&(0,r.tZ)(p.xv.B3,{color:"secondary",align:"center",children:v("".concat(null==_?void 0:_.name," only accepts messages from ").concat(null==w?void 0:w.toLowerCase()))}),!w&&(0,r.tZ)(p.xv.B3,{color:"secondary",align:"center",children:v("".concat(null==_?void 0:_.name," is not currently accepting message invites"))})]}),(0,r.BX)(c.tu,{gap:8,alignItems:"center",padding:8,children:[C&&(0,r.BX)(r.HY,{children:[(0,r.tZ)(d.zx,{className:k,priority:"primary",href:x,newTab:!0,children:v((null==_?void 0:_.isSubscribed)?"Upgrade":"Subscribe")}),(0,r.tZ)(d.zx,{className:k,onClick:()=>{(0,l.j)(l.FP.DIRECT_MESSAGE_WRITER_UPSELL_MODAL_MAYBE_LATER_CLICKED),i()},priority:"secondary",children:v("Maybe later")})]}),!C&&(0,r.tZ)(d.zx,{className:k,onClick:()=>{(0,l.j)(l.FP.DIRECT_MESSAGE_WRITER_UPSELL_MODAL_OKAY_CLICKED),i()},priority:"secondary",children:v("Okay")})]})]})})})}},65749:function(e){e.exports=function(e){if(!e)return 0;let t=(e=e.replace(/<(.|\n)*?>/g," ")).match(/[a-zA-ZÀ-ÿ0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g)||e.match(/([\u0600-\u06ff]+|[\u0591-\u05F4]+)/g);if(null===t)return 0;let i=0;for(let e=0;e=19968?i+=r.length:i+=1)}return i}},93903:function(e,t,i){"use strict";function r(e){return(e||"").replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(t))}i.d(t,{Z:()=>r})}}]);