!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@d7c929d"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="eb4a81e5-a624-4a56-89a6-6c8e4ce44a02",e._sentryDebugIdIdentifier="sentry-dbid-eb4a81e5-a624-4a56-89a6-6c8e4ce44a02")}catch(e){}}();"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["31702"],{41640:function(e,t,n){n.d(t,{C:()=>d});var a=n(4006),i=n(32485),r=n.n(i),s=n(97432),o=n(15894),c=n(76977),l=n(57324);let d=e=>{let{isOpen:t,selectedNewsletters:n,user:i,pub:d,disabled:u,endpointOverride:h,onSuccess:p}=e;return(0,a.Y)(c.pT,{className:r()("fixedSubscribeBar-X5I6UT",{"open-CGNCgZ":t}),alignItems:"center",justifyContent:"center",children:(0,a.Y)(c.pT,{direction:"column",className:"fixedSubscribeBarInner-l5Soh3",alignItems:"center",justifyContent:"center",children:(0,a.FD)(c.pT,{direction:"column",alignItems:"start",justifyContent:"start",gap:8,children:[(0,a.Y)(o.T,{preset:"detail-large",color:"white",children:"Enter your email to subscribe:"}),(0,a.Y)(s.A,{onAccentBackground:!0,pub:d,source:l.VU.newsletterPageFixedBar,submitButtonText:"Subscribe",user:i,onSuccess:p,inputClassName:"emailInput-c9dJvv",subscribeButtonClassName:"subscribeButton-mRGW3e",promptClassName:"prompt-CndLXc",subscribeToSpecificSectionIds:Array.from(n),placeholder:"YOUR EMAIL",disabled:null!=u&&u,endpointOverride:h})]})})})}},91370:function(e,t,n){n.d(t,{A:()=>o});var a=n(99851),i=n(4006),r=n(17402),s=n(68349);class o extends r.Component{componentDidMount(){this.rebalance(),"undefined"!=typeof window&&window.addEventListener("resize",this.debouncedRebalance,!0)}componentDidUpdate(){this.rebalance()}componentWillUnmount(){"undefined"!=typeof window&&window.removeEventListener("resize",this.debouncedRebalance,!0)}shouldComponentUpdate(e){return e.children!==this.props.children}rebalance(){if("undefined"!=typeof window&&(0,s.nr)()&&this.base){var e;(function(e){var t;let n=e.innerHTML;if(!e.textContent)return!1;let a=e.textContent.split(" "),i=document.createElement("span");i.id="element-first-word",i.textContent=a.shift(),e.innerHTML="",e.appendChild(i),e.appendChild(document.createTextNode(" ".concat(a.join(" "))));let r=(null==(t=document.getElementById("element-first-word"))?void 0:t.offsetHeight)||i.offsetHeight,s=e.offsetHeight;return e.innerHTML=n,s-10>r})(e=this.base)&&(e.style.maxWidth="",function e(t,n,a,i){if(i-a<4)return void(t.clientHeight>n?t.style.maxWidth="".concat(i,"px"):t.style.maxWidth="".concat(t.scrollWidth+1,"px"));if(a>=i){t.style.maxWidth="".concat(i,"px");return}let r=(a+i)/2;t.style.maxWidth="".concat(r,"px"),t.clientHeight>n?e(t,n,r,i):e(t,n,a,r)}(e,e.clientHeight,0,e.clientWidth)),e.classList.add("visible")}}render(){let{text:e}=this.props;return(0,s.nr)()?(0,i.Y)("span",{"data-testid":"balanced-text",className:"balance-text",style:{display:"inline-block"},children:e}):(0,i.Y)("span",{"data-testid":"balanced-text",style:{textWrap:"balance"},children:e})}constructor(e,t){super(e,t),(0,a._)(this,"debouncedRebalance",void 0),this.debouncedRebalance=(0,s.sg)(()=>this.rebalance(),100)}}},15809:function(e,t,n){n.d(t,{A:()=>o});var a=n(69277),i=n(70408),r=n(4006),s=n(97731);let o=e=>(0,r.Y)(s.A,(0,i._)((0,a._)({},e),{name:"CreditCardIcon",svgParams:{height:21,width:32},children:(0,r.Y)("g",{fill:"none",fillRule:"evenodd",children:(0,r.Y)("g",{fill:e.fill||"var(--color-fg-primary)",stroke:"none",children:(0,r.FD)("g",{transform:"translate(0 2)",children:[(0,r.Y)("path",{d:"M26.58 19H2.42A2.4 2.4 0 0 1 0 16.62V2.38A2.4 2.4 0 0 1 2.42 0h24.16A2.4 2.4 0 0 1 29 2.38v14.25A2.4 2.4 0 0 1 26.58 19zM10 5.83c0-.46-.35-.83-.78-.83H3.78c-.43 0-.78.37-.78.83v3.34c0 .46.35.83.78.83h5.44c.43 0 .78-.37.78-.83V5.83z",opacity:".2"}),(0,r.Y)("path",{d:"M25 15h-3c-.65 0-1-.3-1-1s.35-1 1-1h3c.65 0 1 .3 1 1s-.35 1-1 1zm-6 0h-3c-.65 0-1-.3-1-1s.35-1 1-1h3c.65 0 1 .3 1 1s-.35 1-1 1zm-6 0h-3c-.65 0-1-.3-1-1s.35-1 1-1h3c.65 0 1 .3 1 1s-.35 1-1 1zm-6 0H4c-.65 0-1-.3-1-1s.35-1 1-1h3c.65 0 1 .3 1 1s-.35 1-1 1z",opacity:".3"})]})})})}))},74919:function(e,t,n){n.d(t,{A:()=>o});var a=n(69277),i=n(70408),r=n(4006),s=n(97731);let o=e=>(0,r.FD)(s.A,(0,i._)((0,a._)({},e),{name:"FilledCircleCheckmarkIcon",svgParams:{height:24,width:24},children:[(0,r.Y)("circle",{className:"filled-checkmark-icon-circle",cx:"12",cy:"12",r:"12",fill:"#419E4E",stroke:"none"}),(0,r.Y)("path",{d:"M7 11.7222L10.8462 16L17 9",stroke:e.stroke||"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},72812:function(e,t,n){n.d(t,{B:()=>l});var a=n(69277),i=n(70408),r=n(32641),s=n(4006),o=n(32485),c=n.n(o);let l=(0,n(17402).forwardRef)((e,t)=>{var{className:n,type:o="text",size:l="default"}=e,d=(0,r._)(e,["className","type","size"]);return(0,s.Y)("input",(0,i._)((0,a._)({},d),{ref:t,className:c()(n,"input-yab_Zq","sm"===l&&"inputSm-LeCzcW"),type:o}))})},36520:function(e,t,n){n.d(t,{o:()=>w});var a=n(79785),i=n(4006),r=n(32485),s=n.n(r),o=n(822),c=n(63286),l=n(17402),d=n(13950),u=n(84605),h=n(86500),p=n(25757),m=n(24078),f=n(35369),b=n(76977),g=n(45974),y=n(63136),_=n(39318),v=n(46058),C=n(49807),I=n(50963),A=n(57324);let Y={innerFaceContainer:"innerFaceContainer-c1mODk",primaryFace:"primaryFace-tUpmRt",pubLogo:"pubLogo-KAzK2Q",appButton:"appButton-PcI7xD",chatMessageContainer:"chatMessageContainer-sV4x4I",chatMessage:"chatMessage-pW8jRF",chatMessageReadMore:"chatMessageReadMore-DthKRv"};function x(){let e=(0,a._)(["Join ","’s chat in the Substack app"]);return x=function(){return e},e}function E(){let e=(0,a._)(["Complete your subscription to "," in the Substack app"]);return E=function(){return e},e}let w=e=>{let{pub:t,onNext:n,canSkip:a,hasAppInstalled:r,postSlugForRedirect:w,upsellGroup:N,chatInformation:k,redirectToChat:S}=e,{iString:M,iTemplate:R}=(0,u.GO)();(0,l.useEffect)(()=>{(0,h.u4)(h.qY.MOBILE_SUBSCRIPTION_APP_TAKEOVER_SCREEN_SEEN,{canSkip:a,upsellGroup:N}),fetch("/api/v1/app_intended_state",{headers:{"Content-Type":"application/json"},body:JSON.stringify({data:{publicationId:t.id,category:"publication-subscribe-flow",isAppMode:!0}}),method:"POST"}),(0,p.dX)()},[]);let D=S?(0,C.xWO)({pubKey:t.subdomain,utm_campaign:A._9.threadsPage,redirect:r?void 0:"app-store-no-desktop"}):w&&r?(0,_.XV8)(t.subdomain,w,{params:{utm_campaign:A._9.subscribe},source:"mobile-subscription-app-takeover"}):(0,C.Bte)({subdomain:t.subdomain,utm_campaign:A._9.subscribe,redirect:r?void 0:"app-store-no-desktop"});return(0,i.Y)(b.I1,{gap:(null==k?void 0:k.lastAuthorPost)?32:28,alignItems:"center",justifyContent:"center",children:(0,i.FD)(d.DH,{children:[(0,i.FD)(b.I1,{gap:(null==k?void 0:k.lastAuthorPost)?12:28,alignItems:"center",justifyContent:"center",children:[(0,i.Y)("div",{className:Y.innerFaceContainer,children:k&&(!t.author_photo_url||(0,v.VL)(t.author_photo_url))?(0,i.Y)(g.Nq,{pub:t,size:160}):(0,i.Y)(m.eu,{className:s()(Y.face,!(null==k?void 0:k.lastAuthorPost)&&Y.primaryFace),size:(null==k?void 0:k.lastAuthorPost)?80:160,photoUrl:t.author_photo_url})}),(0,i.Y)(y.EY.H3,{textAlign:"center",children:k?R(x(),t.author_name||t.name):R(E(),t.name)})]}),!!(null==k?void 0:k.lastAuthorPost)&&(0,i.FD)(b.Ye,{gap:12,className:Y.chatMessageContainer,flex:"grow",children:[(0,i.Y)(m.eu,{className:s()(Y.face),size:32,user:{id:t.author_id,name:t.author_name,handle:t.author_handle,photo_url:t.author_photo_url}}),(0,i.FD)(b.I1,{gap:8,flex:"grow",minWidth:0,children:[(0,i.FD)(b.Ye,{gap:4,alignItems:"center",children:[(0,i.Y)(o.A,{size:16}),(0,i.FD)(y.EY.B5,{translated:!0,fontSize:11,lineHeight:16,weight:"semibold",color:"pub-secondary-text",children:["From ",I18N.p((0,I.$k)(t.author_name)),"’s subscriber chat"]})]}),(0,i.FD)(b.I1,{className:Y.chatMessage,radius:"sm",gap:8,padding:12,children:[(0,i.FD)(y.EY.B4,{fontSize:13,lineHeight:20,clamp:2,children:[(0,i.Y)("b",{children:I18N.p(t.author_name)})," ",k.lastAuthorPost.body]}),(0,i.FD)(y.EY.B3,{className:Y.chatMessageReadMore,as:"a",color:"select",paddingTop:2,translated:!0,display:"flex",alignItems:"center",gap:2,href:D,children:["Read more",(0,i.Y)(c.A,{stroke:"var(--color-accent-fg-blue)",size:16})]})]})]})]}),(0,i.FD)(b.I1,{gap:12,style:{width:"100%"},children:[(0,i.Y)(f.$n,{onClick:async()=>{(0,h.u4)(h.qY.MOBILE_SUBSCRIPTION_APP_TAKEOVER_SCREEN_APP_STORE_VISITED,{canSkip:a,upsellGroup:N}),window.location.href=D,window.setTimeout(()=>{n()},5e3)},className:Y.appButton,priority:"primary",size:"lg",children:M(r?"Continue":"Get the app")}),a&&(0,i.Y)(f.$n,{onClick:()=>{(0,h.u4)(h.qY.MOBILE_SUBSCRIPTION_APP_TAKEOVER_SCREEN_SKIPPED,{upsellGroup:N}),n()},priority:"tertiary",children:M("No thanks")})]})]})})}},22057:function(e,t,n){n.d(t,{Z:()=>u});var a=n(69277),i=n(4006),r=n(32485),s=n.n(r),o=n(24078),c=n(89490),l=n(82776),d=n(72458);function u(e){let{users:t,renderAvatar:n=e=>(0,i.Y)(o.eu,(0,a._)({},e)),max:r=5,total:c,size:l=32,direction:u="ltr",className:f,renderCount:b,loading:g}=e,y=r?t.slice(0,r):t,_=c?c-y.length:r?t.length-r:0,v="rtl"===u?[...y].reverse():y,C=(0,i.Y)(h,{size:l,remainingCount:_}),I=null==b?void 0:b(_),A=.25*l,Y=Math.max(.125*l,3);return(0,i.FD)(p,{children:[(0,i.FD)(m,{className:s()(d.A[u],f),style:{"--scale":"".concat(l,"px"),"--offset":"".concat(A,"px"),"--border-width":"".concat(Y,"px")},children:[g?function(e){let{size:t,max:n}=e;return Array(n).fill(null).map((e,a)=>(0,i.Y)(o.mM,{size:t,className:s()(d.A.avatar,0!==a&&d.A.overlap,a===n-1&&d.A.last)},a))}({size:l,max:r}):v.map((e,t)=>n({user:e,size:l,className:s()(d.A.avatar,0!==t&&d.A.overlap,t===v.length-1&&d.A.last)})),_>0&&!b&&C]}),_>0&&b&&I]})}function h(e){let{size:t,remainingCount:n}=e;return(0,i.Y)(o.j0,{className:s()(d.A.avatar,d.A.overlap,d.A.last),size:t,children:(0,i.Y)(o.NV,{size:t,text:"+".concat((0,l.numberToRoughShortString)(Math.max(n,1),{plusSignifier:""}))})})}let p=(0,c.I4)({display:"flex",direction:"row",gap:8,alignItems:"center",justifyContent:"start"}),m=(0,c.I4)({display:"flex",direction:"row",alignItems:"center",justifyContent:"start"})}}]);