!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@dc9b15f"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="48617028-f364-4964-8d76-94db172afcf9",e._sentryDebugIdIdentifier="sentry-dbid-48617028-f364-4964-8d76-94db172afcf9")}catch(e){}}();"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["79529"],{93038:function(e,t,n){n.d(t,{Ay:()=>f,_F:()=>g});var i=n(69277),a=n(70408),o=n(4006),r=n(32485),l=n.n(r),s=n(15734),c=n.n(s),u=n(27437),d=n(84777),m=n(95899),h=n(49807),p=n(3223);let f=e=>{let{id:t,type:n,name:i,url:a,photo_url:r,uuid:s,mentionText:c,isStatic:f=!1,isEditorContext:b=!1}=e;return f?(0,o.Y)("span",{className:l()(p.A.mention,p.A.mentionStatic),"data-component-name":"MentionStatic",children:(0,o.Y)("a",{href:(0,h.bzS)(n,t,i,a),children:i||"Substack user"})}):"user"===n?(0,o.Y)(m.HW,{children:(0,o.Y)(u.ProfileHoverCard,{subject:{id:t,name:i||"Substack user",photo_url:r},utmSource:"mention",trigger:(0,o.Y)("a",{className:p.A.mention,href:b?void 0:(0,h.bzS)(n,t,i,a),target:"_blank",rel:"noopener","data-attrs":JSON.stringify({name:i,id:t,type:n,url:a,photo_url:r,uuid:s}),onClick:e=>e.stopPropagation(),"data-component-name":"MentionUser",children:null!=c?c:i})})}):"pub"===n?(0,o.Y)(d.m,{pubId:t,utmSource:"mention",trigger:(0,o.Y)("a",{className:p.A.mention,href:a,target:"_blank",rel:"noopener","data-attrs":JSON.stringify({name:i,id:t,type:n,url:b?void 0:(0,h.bzS)(n,t,i,a),uuid:s}),onClick:e=>e.stopPropagation(),"data-component-name":"MentionPub",children:null!=c?c:i})}):(0,o.Y)("a",{className:p.A.mention,target:"_blank",rel:"noopener",href:(0,h.bzS)(n,t,i,a),"data-attrs":JSON.stringify({name:i,id:t,type:n,url:a,photo_url:r,uuid:s}),"data-component-name":"Mention",children:null!=c?c:i})},b={},g=async function(e){let{pathname:t="/api/v1/posts/mention"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b[e])return b[e];let{profiles:n,publications:o}=(await c().get(t).query({query:e})).body,r=new Map;return n&&n.length&&r.set("Writers",n.map(e=>(0,a._)((0,i._)({},e),{type:"user"}))),o&&o.length&&r.set("Publications",null==o?void 0:o.map(e=>(0,a._)((0,i._)({},e),{type:"pub",url:(0,h.Bte)({subdomain:e.subdomain}),photo_url:e.logo_url}))),b[e]=r,r}},10398:function(e,t,n){n.d(t,{Hr:()=>D});var i=n(69277),a=n(70408),o=n(79785),r=n(4006),l=n(78649),s=n(84605),c=n(42686),u=n(89607),d=n(95282),m=n(81992),h=n(27332),p=n(25859),f=n(60897),b=n(99662),g=n(24078),y=n(76977),_=n(63136),v=n(83629),Y=n(83357),k=n(49095),S=n(49807),I=n(57324),w=n(44307);function A(){let e=(0,o._)(["This content is only visible to paid subscribers of ",""]);return A=function(){return e},e}function D(e){let{parent:t,comment:n,publication:i,readOnly:a,onAttachmentClick:o,utm_content:s,isDm:c,isPermalink:u,commentId:d,isShowingTranslation:m}=e,h=(0,Y.g)({onClick:()=>null==o?void 0:o({commentId:String(n.id)}),href:a?void 0:(0,S.Zgx)(n,{noBase:v.Z}),state:{showBack:!0}});return(0,r.Y)(l.Q,{children:(0,r.Y)(C,{readOnly:a,linkProps:h,isEmbed:b.y,children:(0,r.Y)(F,{parent:t,comment:n,publication:i,readOnly:a,onAttachmentClick:o,utm_content:s,isDm:c,isPermalink:u,commentId:d,isShowingTranslation:m})})})}function C(e){let{children:t,readOnly:n,linkProps:o,isEmbed:l}=e;return(0,r.Y)(y.I1,(0,a._)((0,i._)({as:n?"div":"a",bg:"primary",border:"detail",radius:"md",padding:12,gap:8,target:l()?"_blank":void 0,draggable:!1},o),{showFocus:!0,animate:!0,className:w.A.commentContainer,children:t}))}function F(e){var t,n,i,a;let{parent:o,comment:l,publication:s,readOnly:c,onAttachmentClick:u,utm_content:d,isDm:m,isPermalink:h,commentId:p,isShowingTranslation:b}=e,{truncatedBodyJson:g}=(0,f.A)(l,{truncationProfile:"small",isShowingTranslation:b}),y=null!=(a=l.user)?a:l.user_id?{id:l.user_id,name:null!=(t=l.name)?t:"",photo_url:l.photo_url,bestseller_tier:null!=(n=l.user_bestseller_tier)?n:void 0,status:null!=(i=l.userStatus)?i:null}:null;return(0,r.FD)(r.FK,{children:[y&&(0,r.Y)(T,{commentUser:y,comment:l,readOnly:c,utm_content:d}),(0,r.Y)(N,{parent:o,comment:l,publication:s,truncatedBodyJson:g,isDm:m,onAttachmentClick:u,utm_content:d,readOnly:c,isPermalink:h,commentId:p})]})}function T(e){let{commentUser:t,comment:n,readOnly:i,utm_content:a}=e;return t?(0,r.FD)(y.pT,{gap:8,alignItems:"center",justifyContent:"start",children:[(0,r.Y)(Y.N,{href:(0,S.gYq)(t,{noBase:v.Z,utm_content:I.fL.substackFeedItem,utm_source:null!=a?a:void 0}),target:(0,b.y)()?"_blank":void 0,showBack:!0,radius:"full",showFocus:!0,animate:!0,children:(0,r.Y)(g.eu,{size:20,user:t})}),(0,r.Y)(_.EY.B4,{weight:"medium",color:"primary",children:i?t.name:(0,r.FD)(y.pT,{gap:8,direction:"row",justifyContent:"space-between",children:[(0,r.Y)(p.yp,{user:t,utm_source:I.VU.substackFeedItem,utm_content:a,children:t.name}),(null==t?void 0:t.bestseller_tier)!=null&&(0,r.Y)(k.UserStatusSymbols,{tier:t.bestseller_tier,userId:t.id,size:"xs"})]})}),(0,r.Y)(_.EY.B4,{as:"span",color:"secondary",children:(0,r.Y)(h.Iz,{timestamp:n.date,comment:n})})]}):null}function N(e){var t,n,i,a,o,l;let{parent:c,comment:u,publication:d,truncatedBodyJson:m,isDm:h,isPermalink:p,readOnly:f,onAttachmentClick:b,utm_content:g,commentId:y}=e,{iString:_,iTemplate:v}=(0,s.GO)(),Y=null!=(l=null==d?void 0:d.name)?l:_("this publication"),k=v(A(),Y),S=null==c||null==(t=c.attachments)?void 0:t.some(e=>"image"===e.type||"video"===e.type),I=null==(n=u.attachments)?void 0:n.some(e=>"image"===e.type||"video"===e.type),w=null==(i=u.attachments)?void 0:i.some(e=>"image"!==e.type&&"video"!==e.type&&"live_stream"!==e.type),D=null==(a=u.attachments)?void 0:a.some(e=>"post"===e.type&&(e.postSelection||e.postImageSelection)),C=null==(o=u.attachments)?void 0:o.some(e=>"poll"===e.type);return S||I&&w||w&&!D&&!C?(0,r.Y)(O,{comment:u,truncatedBodyJson:m,hiddenText:k,onAttachmentClick:b,utm_content:g}):(0,r.Y)(P,{comment:u,truncatedBodyJson:m,hiddenText:k,onAttachmentClick:b,utm_content:g,readOnly:f,isDm:h,isPermalink:p,commentId:y})}function O(e){var t,n;let{comment:i,truncatedBodyJson:a,hiddenText:o,onAttachmentClick:l,utm_content:s}=e;return(0,r.Y)(r.FK,{children:(0,r.FD)(y.pT,{gap:8,direction:"row",flex:"grow",justifyContent:"space-between",children:[(0,r.FD)(y.I1,{gap:4,children:[(0,r.Y)(u.T,{content:a,isHidden:i.hidden,hiddenText:o,attachedLinks:(0,d.MT)(i)}),(0,r.Y)(m.ot,{attachments:null!=(t=i.attachments)?t:[],onAttachmentClick:l,utm_content:s})]}),(0,r.Y)(c.Yw,{attachments:null!=(n=i.attachments)?n:[]})]})})}function P(e){var t;let{comment:n,truncatedBodyJson:i,hiddenText:a,onAttachmentClick:o,utm_content:l,readOnly:s,isDm:m,isPermalink:h,commentId:p}=e;return(0,r.FD)(r.FK,{children:[(0,r.Y)(u.T,{content:i,isHidden:n.hidden,hiddenText:a,attachedLinks:(0,d.MT)(n)}),(0,r.Y)(c.ti,{attachments:null!=(t=n.attachments)?t:[],onAttachmentClick:o,utm_content:l,isRestack:!0,readOnly:s,isDm:m,isPermalink:h,commentId:p})]})}},52145:function(e,t,n){n.d(t,{DE:()=>c,MI:()=>u});var i=n(4006),a=n(38376),o=n(49436),r=n(84605);n(94729),n(35369);var l=n(45859);n(36372),n(36319),n(70486),n(16291);var s=n(35407);function c(e){let{onMute:t,customLabel:n}=e,{iString:o}=(0,r.GO)();return(0,i.Y)(l.Dr,{leading:(0,i.Y)(a.A,{className:s.A.muteIcon}),onClick:e=>{e.preventDefault(),e.stopPropagation(),t("indefinitely")},children:n||o("Mute")})}function u(e){let{onClick:t,customLabel:n}=e,{iString:a}=(0,r.GO)();return(0,i.Y)(l.Dr,{leading:(0,i.Y)(o.A,{className:s.A.muteIcon}),onClick:e=>{e.preventDefault(),t()},children:n||a("Unmute")})}},87782:function(e,t,n){n(4006),n(76977),n(63136),n(35407)},69089:function(e,t,n){n.d(t,{e:()=>c});var i=n(69277),a=n(32641),o=n(4006),r=n(26683),l=n(17028),s=n(3898);function c(e){var{children:t,setReactions:n=!0,alignSelf:l}=e,s=(0,a._)(e,["children","setReactions","alignSelf"]);return n?(0,o.FD)(u,{position:"relative",alignSelf:l,children:[t,(0,o.Y)(r.LI,(0,i._)({},s))]}):(0,o.Y)(o.FK,{children:t})}let u=(0,l.yw)({display:"flex",className:s.A.reactionsHoverZone})},80351:function(e,t,n){n(94729)},53457:function(e,t,n){n(76528)}}]);