!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"substack@f4164de"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cf3f3bc2-118e-46c6-99c2-6301cf4eb7c4",e._sentryDebugIdIdentifier="sentry-dbid-cf3f3bc2-118e-46c6-99c2-6301cf4eb7c4")}catch(e){}}();"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["7767"],{52077:function(e,t,o){o.d(t,{Ay:()=>V,Ui:()=>H,vo:()=>j});var i=o(69277),n=o(70408),s=o(4006),r=o(32485),l=o.n(r),a=o(78659),d=o.n(a),c=o(90128),u=o.n(c),p=o(63375),h=o.n(p),m=o(16858),b=o(31050),_=o(56808),f=o(750),g=o(17402),y=o(15734),v=o.n(y),w=o(69715),Y=o(23623),S=o(58925),k=o(54014),C=o(84605),P=o(95064),T=o(39598),R=o(26289),D=o(86500),A=o(90250),E=o(89490),F=o(76977),N=o(22602),I=o(63136),U=o(59294),x=o(50874),O=o(82776),M=o(92967),L=o(7642),B=o(91086);function V(e){var t,o;let{disableSelection:r,player:l,postId:a,renderTranscriptionChunk:c,transcription:u,onUpdateActiveRowIndex:p}=e,{iString:m}=(0,C.GO)(),{onStartClipping:b}=(0,w.MC)(),_=(0,g.useRef)(null),{selection:f,clearSelection:y,selectEndRef:Y,selectStartRef:S}=(0,U.MB)({containerRef:_,disable:null!=r&&r,playerRef:l}),[E,N]=(0,g.useState)(!0),[O,M]=(0,g.useState)(),[L,V]=(0,g.useState)(["nick","mills"]),[H,j]=(0,g.useState)({}),[q,G]=(0,g.useState)(!1),[$,J]=(0,g.useState)(!1),[Z,Q]=(0,g.useState)(),{currentTime:X,isPlaying:ee}=(0,R.yr)(l),et=H?Object.values(H).filter(e=>e):[],eo=!!((null==L?void 0:L.length)&&et.length),{setItems:ei}=(0,P.IS)(),en=null==O?void 0:O.findIndex(e=>e.start<=X&&e.end>X);if((0,g.useEffect)(()=>{p&&void 0!==en&&-1!==en&&p(en)},[en,p]),(0,g.useEffect)(()=>{N(!0),u.cdn_url&&v().get(u.cdn_url).then(e=>{if(!e.text)return;let t=JSON.parse(e.text),o=(0,x.qD)({rows:t});M(o),ei(o);let i=h()(o.map(e=>{var t;return null!=(t=e.speaker)?t:""})).filter(e=>e).sort();i.length&&V(i)}).finally(()=>{N(!1)}),u.speaker_map&&Object.values(u.speaker_map).length&&j(u.speaker_map)},[null==O?void 0:O.length,ei,u.cdn_url,u.cdn_unaligned_url,u.speaker_map]),E)return(0,s.Y)(K,{});if(!(null==O?void 0:O.length))return(0,s.Y)("div",{className:B.A.transcriptionStatus,children:(0,s.Y)(I.EY.Meta,{children:m((null==u?void 0:u.status)==="in_progress"?"Transcription in progress...":"No transcript...")})});let es=(null==l||null==(o=l.current)||null==(t=o.player)?void 0:t.tagName)==="VIDEO",er=es?"videogram":"audiogram";return(0,s.FD)(F.I1,{ref:_,children:[f&&(0,s.Y)(W,{isVideo:es,selection:f,onSelect:es?()=>{if(!f||!O||!S.current||!Y.current)return;let e=S.current,t=Y.current;(e.rowIndex>t.rowIndex||e.rowIndex===t.rowIndex&&e.offset>t.offset)&&([e,t]=[t,e]);let o=(0,A.At)({startRow:O[e.rowIndex],endRow:O[t.rowIndex],startOffset:e.offset,endOffset:t.offset,startNodeText:e.text,endNodeText:t.text});y(),b((0,n._)((0,i._)({},o),{source:"transcription",title:null}))}:function(){if(f&&Y.current&&S.current&&O){let e=(0,i._)({},S.current),t=(0,i._)({},Y.current),[o,n]=(0,A.fE)({selectStart:e,selectEnd:t,alignedRows:O});o>n&&([o,n]=[n,o]),G(!0),v().post("/api/v1/audiogram").send({post_id:a,start_idx:o,end_idx:n,use_draft:!1}).then(e=>{var t,o;(null==(t=e.body)?void 0:t.data)&&(Q(e.body.data),y(),(null==l||null==(o=l.current)?void 0:o.player)&&l.current.player.pause())}).finally(()=>G(!1))}}}),c&&O.map((e,t)=>{var o;return c({isPlaying:ee,row:e,rowIndex:t,words:e.words,showSpeaker:(0===t||null==(o=O[t-1])?void 0:o.speaker)!==e.speaker,speakerName:eo&&e.speaker?H[e.speaker]:void 0,onPause:()=>{var e;(null==l||null==(e=l.current)?void 0:e.player)&&l.current.player.pause()},onPlay:()=>{var t;(null==l||null==(t=l.current)?void 0:t.player)&&(l.current.player.currentTime=e.start+1e-4,l.current.player.play())}})}),!c&&O.map((e,t)=>(0,s.Y)(z,{idx:t,row:e,rows:O,speakerName:eo&&e.speaker?H[e.speaker]:void 0,onReassign:()=>J(!0),currentTime:X,isPlaying:ee,isSelected:!!(f&&Y.current&&S.current&&t===d()(t,Math.min(S.current.rowIndex,Y.current.rowIndex),Math.max(S.current.rowIndex,Y.current.rowIndex))),onClick:()=>{y()},onPause:()=>{var e;(null==l||null==(e=l.current)?void 0:e.player)&&l.current.player.pause()},onPlay:()=>{var t;(null==l||null==(t=l.current)?void 0:t.player)&&(l.current.player.currentTime=e.start+1e-4,l.current.player.play())}},t)),(0,s.Y)(T.B,{isOpen:!!(q||Z),onClose:()=>Q(void 0),isGenerating:q,finishedGram:Z,noun:er,postId:a,onDownload:function(e){return(0,D.u4)(D.qY.AUDIOGRAM_DOWNLOAD_CLICKED,{post_id:a,audiogram_id:null==Z?void 0:Z.id,media_upload_id:u.media_upload_id}),fetch(e,{method:"GET"}).then(e=>e.blob()).then(e=>{var t;let o=null==Z||null==(t=Z.video_url)?void 0:t.split("/").pop(),i=null==o?void 0:o.match(/^([^-]+-[^_]+)_/),n=(null==i?void 0:i[1])||"",s=URL.createObjectURL(e),r=document.createElement("a");r.href=s,r.download="substack-".concat(er,"-").concat(a,"-").concat(n,".mp4"),document.body.appendChild(r),r.click(),URL.revokeObjectURL(s),r.remove()})}}),(0,s.Y)(k.j,{isOpen:L&&!!L.length&&!!$,onClose:()=>J(!1),speakers:L,speakerMap:H,onChangeSpeakerMap:j,postId:a})]})}function W(e){var t,o;let{isVideo:i,selection:n,onSelect:r}=e,{iString:a}=(0,C.GO)(),d=null==(o=n.anchorNode)||null==(t=o.parentElement)?void 0:t.getBoundingClientRect();return d?(0,s.Y)(Y.a,{children:(0,s.Y)(F.I1,{style:{top:(0,O.isTouchDevice)()?Math.max(d.y,0)+d.height+12:Math.max(d.bottom,0)+12,left:d.x+d.width/2,transform:"translateX(-50%)",pointerEvents:"auto",maxWidth:240},justifyContent:"center",outline:"detail",shadow:"md",radius:"md",className:l()(L.A.popover,L.A.mounted),padding:4,gap:4,children:i?(0,s.FD)(S.ut,{onClick:r,children:[(0,s.Y)(m.A,{stroke:"var(--color-utility-white)",size:20}),(0,s.Y)(I.EY.B4,{color:"white",weight:"medium",children:a("Create clip")})]}):(0,s.FD)(S.ut,{onClick:r,children:[(0,s.Y)(b.A,{stroke:"var(--color-utility-white)",size:20}),(0,s.Y)(I.EY.B4,{color:"white",weight:"medium",children:a("Make audiogram")})]})})}):null}function K(){return(0,s.FD)(F.VP,{gap:12,children:[(0,s.Y)(N.O,{width:"80%",height:24}),(0,s.Y)(N.O,{width:"34%",height:24}),(0,s.Y)(N.O,{width:"75%",height:24}),(0,s.Y)(N.O,{width:"100%",height:24}),(0,s.Y)(N.O,{width:"68%",height:24})]})}function H(e){if(!e)return"Unknown Speaker";let t=e.split("_"),o=parseInt(t[1]);return"".concat(u()(t[0])," ").concat(o+1)}function z(e){let{row:t,currentTime:o,onPlay:r,isPlaying:a,onPause:d,isSelected:c,onClick:u,idx:p,rows:h,onReassign:m,speakerName:b}=e,[y,v]=(0,g.useState)(!1),w=(0,g.useRef)(null),Y=t.start<=o&&t.end>=o,S=t.words.map(e=>e.start<=o&&e.end>=o?(0,s.FD)(s.FK,{children:[(0,s.Y)("span",{className:B.A.activeWord,children:e.word})," "]}):"".concat(e.word," "));S.length||(S=t.text.split(" ").map(e=>(0,s.FD)("span",{children:[e," "]})));let k=null;if(t.speaker&&b){var C;let e=0===p||null==(C=h[p-1])?void 0:C.speaker;t.speaker!==e&&(k=(0,s.Y)("div",{className:B.A.speakerText,onClick:m,children:b}))}return(0,s.FD)("div",{ref:w,onClick:u,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),style:{display:"flex",width:"100%",alignItems:"center"},children:[a&&(!y||Y)?(0,s.Y)(f.A,{onClick:d,size:24,className:B.A.playCircle,style:(0,n._)((0,i._)({},y&&{color:"var(--color-accent-themed)"}),{visibility:Y||y?"visible":"hidden"})}):(0,s.Y)(_.A,{onClick:r,size:24,className:B.A.playCircle,style:(0,n._)((0,i._)({},y&&{color:"var(--color-accent-themed)"}),{visibility:Y||y?"visible":"hidden"})}),(0,s.FD)("div",{className:l()(B.A.transcriptionChunk,{[B.A.activeRow]:Y||c,[B.A.hoverChunk]:y}),"data-chunk-index":p,children:[(0,s.Y)("div",{className:l()(B.A.rowIndicator,{[B.A.hoverRow]:y})}),(0,s.FD)("div",{style:{display:"flex",flexDirection:"column",flex:1,padding:"5px 0"},children:[k,(0,s.Y)("div",{className:B.A.rowText,"data-chunk-index":p,children:S})]})]})]})}let j=e=>{let{isActiveRow:t,isPlaying:o,row:i,rowIndex:n,onPause:r,onPlay:a,postId:d,children:c,className:u,activeClassName:p,editable:h}=e,m=t&&o;return(0,s.Y)(E.az,{id:"transcription-".concat(n),paddingRight:16,className:l()(u,{[null!=p?p:""]:m}),onClick:()=>{var e;null!=(e=window.getSelection())&&e.toString()||h||((0,D.u4)(D.qY.TRANSCRIPTION_TIMESTAMP_CLICKED,{post_id:d,timestamp:(0,M.kq)(i.start)}),m?r():a())},children:c})}},6212:function(e,t,o){o.d(t,{$f:()=>e$,$y:()=>e9,DZ:()=>e4,HA:()=>eJ,I0:()=>e6,L4:()=>eX,RR:()=>e1,sT:()=>eZ});var i=o(99851),n=o(69277),s=o(70408),r=o(79785),l=o(4006),a=o(32485),d=o.n(a),c=o(84934),u=o(54687),p=o(17402),h=o(15734),m=o.n(h),b=o(43262),_=o(3526),f=o(70997),g=o(76609),y=o(76219),v=o(95337),w=o(71328),Y=o(80707),S=o(49639),k=o(27437),C=o(9615),P=o(34746),T=o(71857),R=o(13918),D=o(65754),A=o(90177),E=o(41935),F=o(20674),N=o(47789),I=o(3338),U=o(37494),x=o(76185),O=o(58398),M=o(81209),L=o(65207),B=o(49897),V=o(69656),W=o(77921),K=o(1842),H=o(90847),z=o(49984),j=o(81668),q=o(56778),G=o(52820),$=o(84565),J=o(84605),Z=o(13505),Q=o(53989),X=o(86500),ee=o(53928),et=o(66565),eo=o(94729),ei=o(64595),en=o(13022),es=o(1459),er=o(68349),el=o(24078),ea=o(89490),ed=o(35369),ec=o(16074),eu=o(76977),ep=o(20500),eh=o(63136),em=o(36372),eb=o(56007),e_=o(36375),ef=o(61554),eg=o(49095),ey=o(98111),ev=o(56458),ew=o(4016),eY=o(96301),eS=o(83873),ek=o(39318),eC=o(41086),eP=o(49807),eT=o(50963),eR=o(98949),eD=o(82776),eA=o(57324),eE=o(96063);function eF(){let e=(0,r._)(["The full video is for subscribers in the "," plan"]);return eF=function(){return e},e}function eN(){let e=(0,r._)(["The full video is for subscribers in the Founding Member plan"]);return eN=function(){return e},e}function eI(){let e=(0,r._)(["The full video is for paid subscribers"]);return eI=function(){return e},e}function eU(){let e=(0,r._)(["This email is for subscribers in the "," plan"]);return eU=function(){return e},e}function ex(){let e=(0,r._)(["This email is for subscribers in the Founding Member plan"]);return ex=function(){return e},e}function eO(){let e=(0,r._)(["This email is for paid subscribers"]);return eO=function(){return e},e}function eM(){let e=(0,r._)(["Continue reading this post for free, courtesy of ","."]);return eM=function(){return e},e}function eL(){let e=(0,r._)(["This post is for subscribers in the "," plan"]);return eL=function(){return e},e}function eB(){let e=(0,r._)(["This post is for subscribers in the Founding Member plan"]);return eB=function(){return e},e}function eV(){let e=(0,r._)(["This post is for paid subscribers"]);return eV=function(){return e},e}function eW(){let e=(0,r._)(["Subscribe to "," to continue reading"]);return eW=function(){return e},e}function eK(){let e=(0,r._)(["Visit the author’s Substack to subscribe and read more."]);return eK=function(){return e},e}function eH(){let e=(0,r._)(["Visit ",""]);return eH=function(){return e},e}function ez(){let e=(0,r._)(["Support ",""]);return ez=function(){return e},e}function ej(){let e=(0,r._)(["Subscribe to ",""]);return ej=function(){return e},e}function eq(){let e=(0,r._)(["By ",""]);return eq=function(){return e},e}function eG(){let e=(0,r._)(["Subscribe to ",""]);return eG=function(){return e},e}let e$="focus-comment-input",eJ=(e,t)=>!!e&&!e.invite_only&&!!t&&t.has_publication&&!t.is_admin&&!t.is_contributor&&!t.is_public_admin&&(0,es.e)(t,e),eZ=(e,t,o,i)=>"enabled"===e.payments_state?!(null==t?void 0:t.is_subscribed):(null==t?void 0:t.is_free_subscribed)&&"disabled"===e.payments_state&&!e.invite_only?!i&&o&&!(null==t?void 0:t.is_pledged):!(null==t?void 0:t.is_free_subscribed);class eQ extends p.Component{async loadReactors(){let e=await m().get("/api/v1/post/".concat(this.props.post.id,"/facepile"));this.setState({reactors:e.body.reactors,restackers:e.body.restackers})}async componentDidMount(){var e,t,o,i;if(this.props.paywall&&!this.props.postPreview&&this.props.post.hidden)if("forced_registration"!==this.props.post.meter_type||this.props.user){if((0,X.u4)(X.qY.POST_PAYWALL_SHOWN,{post_id:this.props.post.id,post_audience:this.props.post.audience,post_type:this.props.post.type,user_id:null==(t=this.props.user)?void 0:t.id,paywall_variant:this.getPaywallConfiguration(this.state.bypassPostUnlockSubscriptionCheck).variant}),(0,ee.jN)(ee.ti.TRACK_PAYWALL_SHOWN),(0,ew.lu)({pub:this.props.pub})){let e=null==(i=window)||null==(o=i._analyticsConfig)?void 0:o.anonymousId;(0,et.BU)("paywall_shown",(0,n._)({post_id:this.props.post.id},this.props.user?{user_id:this.props.user.id,user_email:this.props.user.email,membership_type:this.props.user.is_subscribed?"paid":this.props.user.is_free_subscribed?"free":"none"}:e?{anonymousId:e}:{}))}}else(0,X.u4)(X.qY.POST_REGWALL_SHOWN,{post_id:this.props.post.id,post_audience:this.props.post.audience,post_type:this.props.post.type});this._triggerShare=()=>this.triggerShare(),null==(e=this.containerRef.current)||e.addEventListener("share-post",this._triggerShare),this.props.post&&this.loadReactors(),.001>Math.random()&&(0,X.kE)({post:this.props.post});let s=(0,eC.y)("subscribe_prompt");s&&("paid"===s?this.props.popToast(()=>(0,l.Y)(em.y,{text:"Subscription purchased for ".concat(this.props.pub.name)})):this.props.popToast(()=>(0,l.Y)(em.y,{text:"Subscribed to ".concat(this.props.pub.name)})));let r=null;0x9f7afc3===this.props.post.id&&alert("userAgent: ".concat(navigator.userAgent)),(0,eR.Fr)({checkFirst4:!0})&&(/Instagram/i.test(navigator.userAgent)?r="instagram":/(Messenger|FBAN|FBAV|FB_IAB)/i.test(navigator.userAgent)?r="facebook":/LinkedIn/i.test(navigator.userAgent)&&(r="linkedin")),r&&!(0,ew.lu)({pub:this.props.pub})?this.setWebviewModalState(r):this.setPostPromptState()}componentWillUnmount(){if(this._triggerShare){var e;null==(e=this.containerRef.current)||e.removeEventListener("share-post",this._triggerShare)}this.props.stopInterval&&this.props.stopInterval()}getPaywallConfiguration(e){let{freeSignup:t,freeTrialCoupon:o,getSettingFor:i,post:n,pub:s,user:r}=this.props,l=!0===this.props.paywall&&s.paywall_free_trial_enabled&&o,a=!!(i("paywall_unlock_tokens")&&"only_paid"===n.audience&&n.teaser_post_eligible&&!(null==r?void 0:r.is_subscribed)&&((null==r?void 0:r.is_free_subscribed)||t||e)&&!(null==r?void 0:r.has_redeemed_post_unlock_token)&&!this.state.hasPostUnlockFailed);return{variant:l?"free_trial":a?"post_unlock":"regular",showPostUnlockPrompt:a}}async setWebviewModalState(e){this.setState({showWebViewModal:{action:"facebook"===e?"read":"follow",platform:e}})}async setPostPromptState(){let{post:e,disableSubscribePrompt:t,readerIsSearchCrawler:o,pub:i,user:n,referringUser:s,forceFollowPrompt:r}=this.props,l="newsletter"===e.type&&!0===this.props.getSettingFor("enable_post_page_conversion")&&!t&&!(0,er.ar)()&&!o,a=this.props.skipFollowPrompt,d=!1;if(r)d=!0;else if(!eD.PUB_IDS_TO_NOT_SHOW_FOLLOW_PROMPT_ON.includes(i.id)&&!a&&l&&s&&s.name&&s.id!==(null==n?void 0:n.id)&&i.author_id!==s.id&&i.contributors.every(e=>e.user_id!==s.id)){let e=[];if(n)try{e=await (0,eo.x6)("/api/v1/feed/following")}catch(e){console.warn("Failed to fetch following state",e)}d=!e.includes(s.id)}let c=l&&!d&&!this.props.paywall&&!this.props.freeSignup&&!n;this.setState({shouldShowFollowPrompt:d,shouldShowSubscribePrompt:c})}triggerShare(){let{fromEmail:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.setState({shareModalOpen:!0,shareModalMedium:e?"email":"web"})}componentDidUpdate(e){var t,o;!(null==(t=e.sessionAttributionHasLoaded)||t)&&(null==(o=this.props.sessionAttributionHasLoaded)||o)&&this.pendingPostSeen&&(this.pendingPostSeen=!1,(0,X.Jw)({post:this.props.post,hasPaywall:!!this.props.paywall,surface:"publication",markRead:!!this.props.user&&!this.props.noPageView,user:this.props.user,trackerUuid:this.props.getCurrentUuid(),attributionParams:this.props.sessionAttributionParams}))}onBottomReached(e){this.state.bottomReached||this.props.postPreview||(this.setState({bottomReached:!0}),(0,X.sM)({post:this.props.post,hasPaywall:e,surface:"publication",trackerUuid:this.props.getCurrentUuid()}))}shouldShowUFI(){let{fromPostPage:e,user:t,pub:o,getSettingFor:i}=this.props,{canShowSubscribeFooterAfterPost:n}=this.state;return!!e&&!!n&&eZ(o,t,!!i("payment_pledges_enabled"),this.shouldShowRecommendCta)}shouldTrackPaywallPostSeen(){if("undefined"==typeof window)return!1;let e=document.createElement("div");e.innerHTML=this.props.post.body_html;let t=this.props.pub.post_preview_limit||eD.DEFAULT_PREVIEW_LIMIT,o="",i=!1;for(let n=e.childNodes.length-1;n>=0;n--){let s=e.childNodes[n];if(s&&(o+=s.textContent).length>t){i=!0;break}}return i}render(){var e,t,o,i,s,r,a,u,p;let{user:h,pub:m,post:f,freeSignup:v,freeSignupEmail:k,isServingFreePodcastUrl:C,isShowsPost:A,isTheFreePressTheme:F,reaction_token:M,invisible:z,paywall:G,onChange:$,hideTitle:J,noTitleLink:Z,showComments:Q,fromPostPage:ee,freeTrialCoupon:et,showRestackModal:eo,stripe_publishable_key:es,crossPostInfo:er,iString:el,iTemplate:ea,themeVariables:ec,referringUser:ep,renderComments:eh,renderContent:eb,startInterval:ef,forceFollowPrompt:eg}=this.props,{showTranscription:ey,truncated:eY,autoPlayVoiceOver:eC,reactors:eT,restackers:eD,shouldShowFollowPrompt:eA,shouldShowSubscribePrompt:eW,showWebViewModal:eK,bypassPostUnlockSubscriptionCheck:eH}=null!=(i=this.state)?i:{};if(f.is_geoblocked)return(0,l.Y)(e5,{});let ez=(0,ew.lu)({pub:m}),ej=!!this.context.getConfigFor("like_posts_enabled"),eq=(0,Y.Rv)(null!=(s=eY||f.body_html)?s:"",ez?"h1, h2, h3":"h1, h2, h3, h4"),eG=!G||G&&this.shouldTrackPaywallPostSeen();ef&&eG&&ef({postId:this.props.post.id,containerElementRef:this.containerRef,elementIsStatic:!0});let e$="video"===f.type&&!G&&(null==(e=f.videoUpload)?void 0:e.transcription),eJ=this.shouldShowUFI()&&!(0,ew.lu)({pub:m}),eZ=(0,T.M)(f),eQ=!!eT&&eT.length>0,{showPostUnlockPrompt:eX}=this.getPaywallConfiguration(eH),e4=(0,eR.Fr)({checkFirst4:!0}),e9="";e9="video"===f.type?"founding"===f.audience&&(0,ev.m4)(m)?ea(eF(),null!=(r=(0,ev.m4)(m))?r:""):ea("founding"===f.audience?eN():eI()):"adhoc_email"===f.type?"founding"===f.audience&&(0,ev.m4)(m)?ea(eU(),null!=(a=(0,ev.m4)(m))?a:""):ea("founding"===f.audience?ex():eO()):eX?e4?el("Continue reading this post for free in the Substack app"):ea(eM(),m.author_name||m.name):"founding"===f.audience&&(0,ev.m4)(m)?ea(eL(),null!=(u=(0,ev.m4)(m))?u:""):ea("founding"===f.audience?eB():eV());let e3=(0,l.Y)("div",{className:d()(!F&&!!this.context.getConfigFor("enable_drop_caps")&&!!this.props.getSettingFor("enable_drop_caps")&&eE.A.dropCap),children:(0,l.FD)(H.Z,{disabled:!F,post:f,isShowsPost:A,children:[(0,l.Y)(N.I,{post:f,user:h,onChange:$,reaction_token:M,children:e=>(0,l.FD)(l.FK,{children:[(0,l.Y)("div",{className:"available-content",children:ey?(0,l.Y)("div",{className:"container",children:(0,l.Y)(e_.A,{post:f,pub:m,user:h,playerRef:this.videoPlayer})}):(0,l.Y)(U.A,{html:eY||f.body_html||null,pub:m,trackSelection:!0,post:f,themeVariables:ec,user:h,freeSignup:v,freeSignupEmail:k,paywall:G,showing_behind_paywall:!!f.post_paywall_content_for_google,onLike:e})}),f.post_paywall_content_for_google&&(0,l.Y)("div",{className:"paywall-content",children:(0,l.Y)(U.A,{html:f.post_paywall_content_for_google,pub:m,trackSelection:!1,post:f,user:h,freeSignup:v,freeSignupEmail:k,paywall:G,onLike:e})})]})}),!z&&eG&&(0,l.Y)(q.A,{onVisible:()=>this.onBottomReached(!!G)})]})}),e8=(0,ew.S2)({pub:m}),te=(0,ei.h8)({post:f,pub:m}),tt=ez?(0,l.Y)(W.n,{post:f,user:h,pub:m,freeSignupEmail:k,freeTrialCoupon:!0===this.props.paywall&&m.paywall_free_trial_enabled?et:null}):(0,l.Y)(P.pU,(0,n._)({user:h,freeSignupEmail:k,freeSignup:v,publication:m,post:f,coupon:!0===this.props.paywall&&this.props.pub.paywall_free_trial_enabled?et:null,showPostUnlockPrompt:eX,magicToken:M,isUnsubscribedPostUnlockUpsell:eH,onOpenPostUnlockModal:eH?()=>this.setState({showPostUnlockModal:!0}):void 0,hasCompletedUnsubscribedUnlock:!!this.state.hasCompletedUnsubscribedUnlock,onPostUnlockError:()=>this.props.popToast(()=>(0,l.Y)(em.y,{text:el("Teaser posts are not currently available for this content")}))},Object.assign({title:e9,reauthenticationTitle:el("To read this, please re-authenticate.")},G)));return(0,l.FD)("article",{className:d()("typography ".concat(f.type,"-post post"),{"shows-post":A,"full-width-image-header":(null==(t=f.postTheme)?void 0:t.header_variant)==="full-width-image",[null!=(p=eE.A.bottomWithTos)?p:"undefined"]:m.has_custom_tos}),ref:this.containerRef,children:[(null==h?void 0:h.is_contributor)&&(null==f?void 0:f.id)&&(null==f?void 0:f.type)==="page"&&(0,l.Y)(ed.$n,{priority:"secondary",href:(0,eP.I_S)(m,f.id,{params:{back:document.location.href}}),localNavigation:!1,leading:(0,l.Y)(c.A,{size:20}),children:el("Edit")}),(0,l.Y)(e7,{post:f,user:h,onChange:$}),(0,l.Y)(O.Z,{isOpen:!!this.state.shareModalOpen,onClose:()=>this.setState({shareModalOpen:!1,shareModalMedium:void 0}),user:h,pub:m,post:f,reaction_token:M,medium:this.state.shareModalMedium||"web"}),this.state.showPostUnlockModal&&(0,l.Y)(I.V,{post:f,pub:m,user:h,freeSignupEmail:k,magicToken:M,onClose:()=>this.setState({showPostUnlockModal:!1}),onSubscriptionComplete:()=>{if(this.setState({hasCompletedUnsubscribedUnlock:!0}),"undefined"!=typeof window&&window.history.replaceState){let e=(0,ek.oRR)({has_completed_unsubscribed_unlock:"true"});window.history.replaceState({},document.title,e)}},onUnlockFailed:()=>{this.setState({hasPostUnlockFailed:!0})},hasCompletedUnlock:!!this.state.hasCompletedUnsubscribedUnlock}),eA&&(0,l.Y)(S.y$,{pub:m,post:f,referringUser:ep,freeSignupEmail:k,forceFollowPrompt:eg,surface:"post-follow-referrer-prompt"}),eW&&(0,l.Y)(L.F,{pub:m,post:f,stripe_publishable_key:es,sharer:ep}),eK&&(0,l.Y)(_.D,{pub:m,slug:f.slug,action:eK.action,platform:eK.platform}),eb?(0,l.FD)(l.FK,{children:[!z&&(0,l.Y)(q.A,{onVisible:()=>{this.onTopReached(!!G)}}),eb({comments:eh?eh():null,crossPostInfo:er,postContent:(0,l.FD)(l.FK,{children:[e3,!!(G&&!f.post_paywall_content_for_google&&!C)&&tt]})})]}):(0,l.FD)(l.FK,{children:[(0,l.Y)(e6,{user:null!=h?h:null,pub:m,post:f,isOnPostPage:!0,reaction_token:M,allowEdit:!0,showShare:!0,showSubtitle:!0,showPhoto:!0,showCommentRestack:!m.hide_post_restacks,hideTitle:!!J,noTitleLink:!!Z,onChange:$,hideDate:"page"===f.type,hideAudience:"page"===f.type,showReactions:ej,showComments:!!Q,showLabel:!0,fromPostPage:!!ee,onClickCommentButton:this.onCommentButtonClicked,reactors:eT,showRestackModal:!!eo,showTranscriptionButton:!!e$,onTranscriptionClick:this.onTranscriptionClick,autoPlayVoiceOver:eC}),f.age_verification&&f.age_verification.status!==eS.Y.CompletedAdult&&(0,l.Y)(b.J,{content:f,description:f.subtitle,source:"post"}),!z&&eG&&(0,l.Y)(q.A,{onVisible:()=>this.onTopReached(!!G)}),(f.has_voiceover||!!f.voiceoverUpload)&&!F&&(0,l.Y)(g.g,{pub:m,post:f,mediaUploadId:f.voiceover_upload_id,duration:null==(o=f.voiceoverUpload)?void 0:o.duration,autoPlay:eC,href:f.canonical_url,isPaywalled:!f.voiceover_upload_id}),!f.voiceoverUpload&&eC&&eZ&&(0,l.Y)(j.w,{postId:f.id,onClose:()=>{(0,X.u4)(X.qY.LISTEN_TO_THIS_POST_MODAL_DISMISSED,{post_id:f.id}),this.setState({autoPlayVoiceOver:!1})}}),er?(0,l.Y)(w.k,{postType:f.type,crossPostInfo:er}):null,(0,l.FD)("div",{children:[eq&&ez&&(0,l.Y)(K._,{postId:null==f?void 0:f.id,toc:eq,leftMargin:24,title:f.title,commentCount:f.comment_count,showComments:!0,wordCount:f.wordcount}),eq&&!ez&&(0,l.Y)(B.M,{toc:eq,position:"fixed"}),e3,te&&(0,l.Y)(y.u,{doiUrl:te.doiUrl,pdfUrl:te.pdfUrl}),G&&!f.post_paywall_content_for_google?(0,l.FD)(l.FK,{children:[tt,(0,l.Y)(D.e,{post:f})]}):eY?(0,l.Y)("p",{children:(0,l.FD)(ed.$n,{className:"expander",onClick:()=>this.setState({truncated:null}),children:["+ ",el("show full post")]})}):!["page"].includes(null==f?void 0:f.type)&&(0,l.FD)(l.FK,{children:[eJ&&(0,l.Y)(e1,{pub:m,post:f,user:h,freeSignup:!!v,freeSignupEmail:k}),!eJ&&this.shouldShowRecommendCta&&(0,l.Y)(x.R,{pub:m}),er&&("only_paid"===f.audience||"founding"===f.audience)&&(0,l.Y)(e0,{pub:m}),(0,en.Ay)("like_posts_enabled")&&m.community_enabled&&eQ&&!F&&(0,l.Y)(eu.fI,{borderTop:"detail-themed",paddingY:16,children:(0,l.Y)(R.d2,{post:f,pub:m,user:h,reactors:eT,secondaryFaces:eD})}),!F&&(0,l.Y)(l.FK,{children:(0,l.Y)("div",{className:"post-footer",children:(0,l.Y)(E.bW,{post:f,pub:m,user:h,onChange:$,postReactionToken:M,position:"post-footer"})})}),(0,l.Y)(D.e,{post:f})]}),f.show_guest_bios&&"podcast"!==f.type&&!ez&&!e8&&(0,l.Y)(e2,{user:h,post:f})]})]}),ez&&G&&!(null==h?void 0:h.is_subscribed)&&"everyone"!==f.audience&&(0,l.Y)(V.Q,{pub:m})]})}constructor(e,t){var o,n,s;super(e,t),(0,i._)(this,"containerRef",void 0),(0,i._)(this,"podcastCommentInput",void 0),(0,i._)(this,"podcastPlayer",void 0),(0,i._)(this,"videoPlayer",void 0),(0,i._)(this,"pendingPostSeen",!1),(0,i._)(this,"shouldShowRecommendCta",void 0),(0,i._)(this,"_triggerShare",void 0),(0,i._)(this,"onTopReached",e=>{var t;this.state.topReached||this.props.postPreview||(this.setState({topReached:!0}),null==(t=this.props.sessionAttributionHasLoaded)||t?(0,X.Jw)({post:this.props.post,hasPaywall:e,surface:"publication",markRead:!!this.props.user&&!this.props.noPageView,user:this.props.user,trackerUuid:this.props.getCurrentUuid(),attributionParams:this.props.sessionAttributionParams}):this.pendingPostSeen=!0)}),(0,i._)(this,"onTranscriptionClick",()=>{this.setState(e=>({showTranscription:!e.showTranscription}))}),(0,i._)(this,"onCommentButtonClicked",e=>{this.props.showComments&&!this.props.post.comment_count&&(e.stopPropagation(),e.preventDefault(),document.dispatchEvent(new CustomEvent(e$)))});const r="true"===(0,eC.y)("has_completed_unsubscribed_unlock")&&(null==(o=this.props.user)?void 0:o.is_free_subscribed),l=!0===this.props.paywall&&"only_paid"===this.props.post.audience&&this.props.post.teaser_post_eligible,a=!this.props.user&&l,d=this.props.user&&l&&!this.props.user.is_subscribed&&!this.props.user.reader_installed_at&&(r||!this.props.user.is_free_subscribed&&!this.props.user.has_redeemed_post_unlock_token),c={bypassPostUnlockSubscriptionCheck:!!(a||d),showTranscription:!1,autoPlay:!1,autoPlayVoiceOver:!1,commentSort:null!=(s=e.post.default_comment_sort)?s:"best_first",loadedWithHeaderLink:"undefined"!=typeof window&&(null==(n=window.location.hash)?void 0:n.startsWith("#".concat(encodeURIComponent("\xa7")))),reactors:null,feedUrl:null,shouldShowSubscribePrompt:!1,shouldShowFollowPrompt:!1,hasCompletedUnsubscribedUnlock:r};e.paywall||e.post.hidden||!e.post.body_html||(c.canShowSubscribeFooterAfterPost=e9(e.post.body_html),c.truncated=e.truncateAt?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;if("undefined"==typeof window)return null;let i=document.createElement("div");if(i.innerHTML=e,null===i.textContent||i.textContent.length1&&i.textContent.length>o);return i.innerHTML}(e.post.body_html,e.truncateAt,e.truncateTo):null),"undefined"!=typeof window&&window.history.replaceState&&("true"===(0,eC.y)("autoPlay")&&(window.history.replaceState({},document.title,(0,ek.oRR)({autoPlay:null})),c.autoPlay=!0),"true"===(0,eC.y)("play_audio")&&(window.history.replaceState({},document.title,(0,ek.oRR)({play_audio:null})),c.autoPlayVoiceOver=!0)),this.state=c,this.containerRef=(0,p.createRef)(),this.podcastCommentInput=(0,p.createRef)(),this.podcastPlayer=(0,p.createRef)(),this.videoPlayer=(0,p.createRef)(),this.shouldShowRecommendCta=eJ(e.pub,e.user)}}(0,i._)(eQ,"contextType",$.Ke),(0,i._)(eQ,"displayName","Post");let eX=(0,eb.Ho)((0,G.WR)((0,Q.S0)((0,J.wr)((0,Z.BF)(eQ))))),e0=e=>{let{pub:t}=e,{iTemplate:o}=(0,J.GO)();return(0,l.FD)(l.FK,{children:[(0,l.Y)(ec.c,{paddingTop:16}),(0,l.FD)(eu.VP,{gap:16,paddingY:32,alignItems:"center",children:[(0,l.FD)(eu.VP,{gap:8,paddingBottom:8,children:[(0,l.Y)(eh.EY.H4,{flex:"grow",align:"center",children:o(eW(),t.name)}),(0,l.Y)(eh.EY.B3,{flex:"grow",align:"center",color:"secondary",children:o(eK())})]}),(0,l.Y)(ed.$n,{priority:"primary",onClick:()=>{(0,X.u4)(X.qY.POST_END_CTA_CLICKED,{type:"cross-post"}),(0,er.V2)((0,eP.eV6)(t,{params:{utm_source:eA.VU.postEndCta,addBase:!0}}),{local_navigation:!1})},children:o(eH(),t.name)})]})]})},e1=e=>{let{pub:t,post:o,user:i,freeSignup:n,freeSignupEmail:s,overridePledgesEnabled:r}=e,{iString:a,iTemplate:d}=(0,J.GO)(),{getSettingFor:c}=(0,Q.Pu)(),[u,h]=(0,p.useState)(null),m=(0,eC.y)("just_subscribed"),b="disabled"===t.payments_state&&!t.invite_only&&(c("payment_pledges_enabled")||r),_="enabled"===t.payments_state&&(null==i?void 0:i.is_free_subscribed)&&!(null==i?void 0:i.is_subscribed)?"paid_upsell":b&&(null==i?void 0:i.is_free_subscribed)&&!(null==i?void 0:i.is_pledged)?"pledge_upsell":"free_upsell",f=b&&(null==i?void 0:i.is_free_subscribed)&&!(null==i?void 0:i.is_pledged);(0,p.useEffect)(()=>{(0,X.u4)(X.qY.POST_END_CTA_RENDERED,{pub_id:t.id,post_id:o.id,type:_})},[t.id,o.id,_,f,null==i?void 0:i.is_free_subscribed]);let g=(0,eD.getByLine)(t);return(0,l.FD)(l.FK,{children:[(0,l.Y)(ec.c,{paddingTop:16}),(0,l.Y)(q.A,{onVisible:()=>{(0,X.u4)(X.qY.POST_END_CTA_SEEN,{pub_id:t.id,post_id:o.id,type:_})}}),(0,l.FD)(eu.VP,{gap:16,paddingY:32,children:[(0,l.FD)(eu.VP,{gap:8,paddingBottom:8,children:[(0,l.Y)(eh.EY.H4,{flex:"grow",align:"center",children:b&&(null==i?void 0:i.is_free_subscribed)?d(ez(),t.name):d(ej(),t.name)}),(0,l.FD)(eh.EY.B3,{flex:"grow",align:"center",color:"secondary",children:[g?d(eq(),g):null,g&&t.rankingDetail?" \xb7 ":null,t.rankingDetail]}),t.hero_text&&(0,l.Y)(eh.EY.B3,{color:"primary",flex:"grow",align:"center",children:t.hero_text})]}),(0,l.Y)(eu.VP,{alignItems:"center",gap:16,children:f?(0,l.Y)(ed.$n,{priority:"primary",onClick:()=>{(0,X.u4)(X.qY.POST_END_CTA_CLICKED,{type:"pledge"}),(0,er.V2)((0,eP.eV6)(t,{params:{utm_source:eA.VU.postEndCta}}),{local_navigation:!1})},children:a("Pledge your support")}):(0,l.FD)(l.FK,{children:[(0,l.Y)(M.A,{pub:t,post:o,user:i,freeSignup:n,freeSignupEmail:s,isStatic:!1,onPrepareData:()=>{h(null)},source:"post-end-cta",className:eE.A.subscribeWidget}),u&&(0,l.Y)(ep.yn,{align:"center",children:u}),!(null==i?void 0:i.is_free_subscribed)&&!m&&(0,l.Y)(eu.VP,{maxWidth:400,children:(0,l.Y)(ef.U,{includeCheckbox:!1,addSubscribePreamble:!0,color:"secondary",textAlign:"center"})})]})})]})]})},e4=e=>{let{pub:t}=e;return(0,l.FD)("div",{className:"post-silhouette",children:[(0,l.Y)("div",{className:"post-silhouette-title"}),(0,l.Y)("div",{className:"post-silhouette-meta ".concat(t&&t.bylines_enabled&&t.byline_images_enabled?"with-byline-image":"")}),(0,l.Y)("div",{className:"post-silhouette-body"})]})},e6=e=>{var t,o,i,n;let s,{allowEdit:r,allowSendEmail:a,allowTruncate:c,base_url:p,children:h,className:m,hideAudience:b,hideDate:_,hideTitle:g,hidePinning:y,noTitleLink:w,isStatic:Y,isFreePreview:S,is_draft:k,onChange:P,post:D,pub:N,reaction_token:I,showComments:U,showDatetime:x,showEmailSent:O,showReactions:M,showShare:L,showAppUpsell:B,showSubtitle:V,showPhoto:W,showLabel:K,showRestack:H,showCommentRestack:j,hideAuthor:q,user:G,utm_source:$,fromPostPage:Z,onClickCommentButton:Q,reactors:X,inThreadHead:ee,publishedPost:et,compEndsSoon:eo,compEndedRecently:ei,siteConfigValues:en={},eligibleForTTS:es,showRestackModal:er,showIcon:el,isOnPostPage:ea,showTranscriptionButton:ed,onTranscriptionClick:ec,isAppMode:ep=!1,republishingPost:em,autoPlayVoiceOver:eb=!1,readInAppText:e_}=e,{iString:ef}=(0,J.GO)(),eg=(0,eR.Fr)({checkFirst4:!0}),ev=em||D,eS="number"==typeof c?c:45,ek=D.title&&D.title.length>eS,eC=k?D.draft_title:D.title,eT=[(el||"thread"===D.type)&&(0,l.Y)(u.A,{size:15,className:D.type}),ek&&c?(0,eD.truncateWords)(eC,eS):eC],eF=k?D.draft_subtitle:D.subtitle;D.section_id&&N.sections&&N.sections.length&&(D.section=N.sections.find(e=>e.id===D.section_id));let eN=(0,eY.ZA)({pub:N,subscriptionType:null==G?void 0:G.subscription_type}),eI=!["page"].includes(null==D?void 0:D.type),eU=eI&&Y&&eo&&!eN&&(null==en?void 0:en.continue_support_cta_in_newsletter_emails),ex=(0,T.M)(D)||es||D.voiceoverUpload,eO=(null==D?void 0:D.type)==="adhoc_email",eM=eI&&Y&&!eO&&!ep,eL=(0,ew.lu)({pub:N})&&(!!D.postTheme||["video","podcast"].includes(D.type)&&ee);s=D.post_url_override?D.post_url_override:Y&&ep?ey.T.POST_TITLE_APP_MODE_URL:Y&&(null==en?void 0:en.publication_has_own_app)?ey.T.POST_URL:Y?ey.T.POST_TITLE_URL:"".concat((0,eP.wu9)(N,D)).concat($?"?utm_source=".concat($):"");let eB="".concat(N.base_url+(ev.section?(0,eP.Dor)(N,{section:ev.section}):""),"/?utm_source=").concat(eA.VU.substack,"&utm_medium=").concat(eA.Jn.menu);return eL?(0,l.Y)(z.Xl,{post:D,postTheme:D.postTheme,title:eC,subtitle:eF,pub:N,inThreadHead:!!ee,autoPlayVoiceOver:eb}):(0,l.FD)("div",{className:d()("post-header",m),role:"region","aria-label":ef("Post header"),children:[(0,ew.S2)({pub:N})&&(null!=(n=null==(t=D.postTags)?void 0:t.length)?n:0)>0&&(0,l.Y)(eu.fI,{alignItems:"center",gap:4,paddingBottom:8,children:null==(o=D.postTags)?void 0:o.map((e,t)=>(0,l.FD)(l.FK,{children:[0!==t&&(0,l.Y)(eh.EY.Meta,{children:"—"}),(0,l.Y)(eh.EY.Meta,{as:"a",size:14,href:(0,eP.ii9)(N,e),children:e.name})]}))}),K&&D.section&&(0,l.Y)(eu.fI,{className:"post-label",children:(0,l.Y)(eh.EY.Meta,{as:"a",size:14,href:eB,children:null==(i=ev.section)?void 0:i.name})}),eU&&(0,l.Y)(v.K,{post:D,compAlreadyExpired:ei}),!g&&(0,l.Y)("h1",{className:d()("post-title",D.is_published?"published":"restack"!==D.type||em?"adhoc_email"===D.type?"adhoc":"unpublished":"email-only-cross-post",{"post-title--the-pillar":(0,ew.S2)({pub:N})},eE.A.title),dir:"auto",children:w?eT:(0,l.Y)("a",{href:s,children:eT})}),V&&eF&&(0,l.Y)("h3",{className:d()("subtitle",{"subtitle--the-pillar":(0,ew.S2)({pub:N})},eE.A.subtitle),dir:"auto",children:eF}),"page"===D.type?(0,l.Y)("div",{style:{height:32}}):ea&&!Y?(0,l.FD)(eu.VP,{paddingBottom:16,"aria-label":ef("Post UFI"),role:"region",children:[(0,l.FD)(eu.fI,{paddingY:16,justifyContent:"space-between",alignItems:"center",children:[(0,l.Y)(F.D,{post:D,pub:N}),(0,l.Y)(C.C,{post:D,pub:N,user:G})]}),(0,l.Y)(f.p,{user:G,isMobile:eg,post:D}),eg?Z&&(0,l.Y)(E.I2,{post:D,pub:N,user:G,isStatic:!!Y,postReactionToken:I,onChange:P,allowEdit:r,hidePinning:y,showEmailSent:O,allowSendEmail:a,hideComments:!U,onCommentsClick:Q,showRestackModal:er}):(0,l.Y)(E.bW,{post:D,pub:N,user:G,onChange:P,showRestackModal:er,showTranscriptionButton:ed,onTranscriptionClick:ec,showClipping:"video"===D.type,postReactionToken:I,position:"post-header"})]}):(0,l.FD)(l.FK,{children:[!eI||Y||et||ee?eI&&!Y&&et?(0,l.Y)(E.xx,{post:D,pub:N,user:G,variant:"compressed",labelStyle:"counts-or-none",postReactionToken:I,showEmailSent:O,hideShare:!L||"restack"===D.type,hideComments:"restack"===D.type,hideSavePost:"restack"===D.type,hideReactions:"restack"===D.type,showPreamble:!0,onChange:void 0,allowEdit:r,allowSendEmail:a,editButtonIsLast:!0,preambleConfig:{showAudience:!b,showDate:!_,showDatetime:x,showAuthor:!q},isStatic:Y,position:"publisher-post-list"}):ee&&!Y?(0,l.Y)(E.xx,{post:D,pub:N,user:G,variant:"compressed",labelStyle:"counts-or-none",postReactionToken:I,hideSavePost:!0,showPreamble:!0,allowEdit:r,allowSendEmail:a,editButtonIsLast:!0,onChange:P,preambleConfig:{showAudience:!b,showDate:!_,showDatetime:x,showAuthor:!q},hideShare:!L,position:"publisher-post-list",isStatic:Y}):eI?(0,l.Y)(R.u3,{user:G,pub:N,post:D,showDate:!_,showDatetime:x,showEmailSent:O,showAudience:!b,showReactions:!eM&&M,showComments:!eM&&U,showShare:!eM&&L,showRestack:!eM&&H,reaction_token:I,onChange:P,isStatic:Y,isFreePreview:S,sharedShareDialog:!0,base_url:p,allowSendEmail:a,allowEdit:r,showAuthor:!q,showPhoto:W,hidePinning:y,inThreadHead:ee,fromPostPage:Z,onClickCommentButton:Q,reactors:X,isAppMode:ep}):(0,l.Y)("div",{className:"spacer",style:{height:24}}):(0,l.Y)(A.s,{className:"meta-subheader",pub:N,post:D,user:G,showDate:!_,showDatetime:!!x,isStatic:!!Y,postReactionToken:I,onChange:P,allowEdit:r,hidePinning:y,showEmailSent:O,allowSendEmail:a,allowMobileFooter:Z,onCommentsClick:Q,showRestackModal:er}),eI&&eM&&(0,l.Y)(E.fz,{readInAppText:e_,customization:{showShare:L,showComments:U,showReactions:M,showListen:!H&&!S&&!!ex,showSave:!H,showRestack:H,showCommentRestack:j,showAppUpsell:B}}),eO&&(0,l.Y)("div",{className:"email-ufi-2-empty"})]}),h]})},e2=e=>{let{user:t,post:o}=e,{iString:i,iTemplate:n}=(0,J.GO)(),s=(0,eD.getBylineUsers)(o).filter(e=>e.is_guest);return 0===s.length?null:(0,l.FD)("div",{className:"post-contributor-footer",children:[(0,l.Y)("div",{className:"container-border"}),s.map(e=>{let o=(0,eT.$k)(e.name),s=e.primaryPublicationSubscribeUrl;s&&(null==t?void 0:t.email)&&(s=(0,ek.oRR)(s,{email:t.email,autoSubmit:!0,utm_source:eA.VU.substack,utm_campaign:eA._9.guestPostBio,utm_medium:eA.Jn.web}));let r=(0,ek.oRR)((0,eP.gYq)(e),{utm_campaign:eA._9.guestPostBio,utm_medium:eA.Jn.web}),a=!!e.photo_url;return(0,l.Y)("div",{className:d()("post-contributor-bio",{"post-contributor-bio-no-text":!e.bio}),"data-user-id":e.id,children:(0,l.Y)("table",{cellpadding:"0",cellspacing:"0",className:"post-contributor-bio-table",children:(0,l.FD)("tr",{className:"post-contributor-bio-table-row",children:[a&&(0,l.Y)("td",{className:"post-contributor-bio-userhead-cell post-contributor-bio-userhead-cell-web",children:(0,l.Y)(el.tp,{size:52,user:e,utmSource:"byline"})}),(0,l.Y)("td",{className:"post-contributor-bio-body-cell post-contributor-bio-body-cell-web",children:(0,l.FD)("div",{className:"post-contributor-bio-body",children:[e.bio&&(0,l.Y)("div",{className:"post-contributor-bio-preamble",children:i("A guest post by")}),(0,l.Y)("table",{cellpadding:"0",cellspacing:"0",className:"post-contributor-bio-body-table",children:(0,l.FD)("tr",{className:"post-contributor-bio-body-table-row",children:[(0,l.FD)("td",{className:"post-contributor-bio-copy-cell",children:[!e.bio&&(0,l.Y)("div",{className:"post-contributor-bio-preamble",children:i("A guest post by")}),(0,l.FD)(eu.fI,{gap:4,alignItems:"center",paddingBottom:4,children:[(0,l.Y)(k.ProfileHoverCard,{subject:e,utmSource:"byline",trigger:(0,l.Y)("a",{className:"post-contributor-bio-title no-margin",href:r,"data-native":!0,children:e.name})}),(0,l.Y)(eg.UserStatusSymbols,{size:"sm",tier:e.bestseller_tier,userId:e.id})]}),e.bio&&(0,l.Y)("div",{className:"post-contributor-bio-text",children:e.bio})]}),(0,l.Y)("td",{className:"post-contributor-bio-controls-cell post-contributor-bio-controls-cell-web",children:(0,l.Y)("div",{className:"post-contributor-bio-controls",children:s&&(0,l.Y)("a",{className:"post-contributor-bio-subscribe-button button primary",href:s,"data-native":!0,children:(0,l.Y)("span",{className:"post-contributor-bio-subscribe-button-label",children:n(eG(),o)})})})})]})})]})})]})})})})]})};function e9(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;if("undefined"==typeof window)return!1;let o=document.createElement("div");o.innerHTML=e;let i="",n=!1;for(let e=o.childNodes.length-1;e>=0;e--){let s=o.childNodes[e];if(s){if(s instanceof Element&&(s.classList.contains("button-wrapper")||s.classList.contains("subscription-widget-wrap")||s.classList.contains("subscribe-widget"))){n=!0;break}if((i+=s.textContent).length>t)break}}return!n}function e7(e){let{post:t,user:o,onChange:i}=e,{onSave:r}=(0,E.Jj)({post:t,isSaved:!1});return(0,p.useEffect)(()=>{if("save"===new URL(location).searchParams.get("action")&&(history.replaceState({},"",(0,ek.oRR)({action:null})),o)){let e=r();i({post:(0,s._)((0,n._)({},t),{is_saved:e})})}},[]),null}let e5=()=>(0,l.Y)("article",{className:d()("typography post",{"shows-post":!1}),children:(0,l.Y)(ea.az,{className:"container",padding:12,children:(0,l.Y)("p",{align:"center",children:(0,l.Y)(eh.EY,{translated:!0,as:"span",children:"This content has been withheld in your country in response to a legal requirement."})})})})},53293:function(e,t,o){o.d(t,{T:()=>l,l:()=>a});var i=o(4006),n=o(17402),s=o(4016);let r=(0,n.createContext)({theme:null,setTheme:()=>void 0}),l=()=>(0,n.useContext)(r),a=e=>{var t;let{pub:o,post:l,children:a}=e,[d,c]=(0,n.useState)(null!=(t=null==l?void 0:l.postTheme)?t:null);return(0,s.lu)({pub:o})?(0,i.Y)(r.Provider,{value:{theme:d,setTheme:c},children:a}):(0,i.Y)(i.FK,{children:a})}},39598:function(e,t,o){o.d(t,{B:()=>h});var i=o(79785),n=o(4006),s=o(48309),r=o(84605),l=o(86500),a=o(35369),d=o(16993),c=o(57820);function u(){let e=(0,i._)(["Generating ","..."]);return u=function(){return e},e}function p(){let e=(0,i._)(["Shareable ",""]);return p=function(){return e},e}function h(e){let{isOpen:t,onClose:o,isGenerating:i,finishedGram:h,noun:m,postId:b,onDownload:_}=e,{iString:f,iTemplate:g}=(0,r.GO)();return(0,n.FD)(d.aF,{isOpen:t,onClose:o,children:[(0,n.Y)(d.rQ,{title:g(i?u():p(),m),showDivider:!0,onClose:o}),(0,n.Y)(d.cw,{children:h?(0,n.Y)("video",{src:h.cdn_url,style:{borderRadius:12},controls:!0,download:!0,width:400}):(0,n.Y)(c.y$,{alignItems:"center",justifyContent:"center",minHeight:220})}),h&&(0,n.Y)(d.jl,{direction:"column",primaryButton:(0,n.Y)(a.$n,{priority:"primary",leading:(0,n.Y)(s.A,{size:20}),onClick:()=>{(0,l.u4)(l.qY.AUDIOGRAM_DOWNLOAD_CLICKED,{post_id:b,audiogram_id:null==h?void 0:h.id,media_upload_id:null==h?void 0:h.media_upload_id}),_(h.cdn_url)},children:f("Download")})})]})}}}]);